diff --git a/.babelrc b/.babelrc deleted file mode 100644 index b9359fe771b4..000000000000 --- a/.babelrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "presets": [ - "@babel/preset-env", - "@babel/preset-react" - ] -} diff --git a/.docker-mongo/Dockerfile b/.docker-mongo/Dockerfile deleted file mode 100644 index 56b809851faf..000000000000 --- a/.docker-mongo/Dockerfile +++ /dev/null @@ -1,66 +0,0 @@ -FROM node:14.18.2-bullseye-slim - -LABEL maintainer="buildmaster@rocket.chat" - -# Install MongoDB and dependencies -ENV MONGO_MAJOR=5.0 \ - MONGO_VERSION=5.0.5 - -RUN set -x \ - && apt-get update \ - && apt-get install -y wget gnupg dirmngr pwgen \ - && wget -qO - "https://www.mongodb.org/static/pgp/server-$MONGO_MAJOR.asc" | apt-key add - \ - && echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/$MONGO_MAJOR main" | tee "/etc/apt/sources.list.d/mongodb-org-$MONGO_MAJOR.list" \ - && apt-get update \ - && apt-get install -y \ - mongodb-org=$MONGO_VERSION \ - mongodb-org-server=$MONGO_VERSION \ - mongodb-org-shell=$MONGO_VERSION \ - mongodb-org-mongos=$MONGO_VERSION \ - mongodb-org-tools=$MONGO_VERSION \ - fontconfig \ - && apt-get clean my room \ - && groupadd -g 65533 -r rocketchat \ - && useradd -u 65533 -r -g rocketchat rocketchat \ - && mkdir -p /app/uploads \ - && chown rocketchat:rocketchat /app/uploads - -# --chown requires Docker 17.12 and works only on Linux -ADD --chown=rocketchat:rocketchat . /app -ADD --chown=rocketchat:rocketchat entrypoint.sh /app/bundle/ - -RUN aptMark="$(apt-mark showmanual)" \ - && apt-get install -y --no-install-recommends g++ make python ca-certificates \ - && cd /app/bundle/programs/server \ - && npm install \ - && apt-mark auto '.*' > /dev/null \ - && apt-mark manual $aptMark > /dev/null \ - && find /usr/local -type f -executable -exec ldd '{}' ';' \ - | awk '/=>/ { print $(NF-1) }' \ - | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | xargs -r apt-mark manual \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ - && npm cache clear --force - -VOLUME /app/uploads - -WORKDIR /app/bundle - -# needs a mongoinstance - defaults to container linking with alias 'mongo' -ENV DEPLOY_METHOD=docker-preview \ - NODE_ENV=production \ - MONGO_URL=mongodb://localhost:27017/rocketchat \ - MONGO_OPLOG_URL=mongodb://localhost:27017/local \ - HOME=/tmp \ - PORT=3000 \ - ROOT_URL=http://localhost:3000 \ - Accounts_AvatarStorePath=/app/uploads - -EXPOSE 3000 - -RUN chmod +x /app/bundle/entrypoint.sh - -ENTRYPOINT /app/bundle/entrypoint.sh diff --git a/.docker/Dockerfile b/.docker/Dockerfile deleted file mode 100644 index 316c5e7d8946..000000000000 --- a/.docker/Dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -FROM node:14.18.2-bullseye-slim - -LABEL maintainer="buildmaster@rocket.chat" - -# dependencies -RUN groupadd -g 65533 -r rocketchat \ - && useradd -u 65533 -r -g rocketchat rocketchat \ - && mkdir -p /app/uploads \ - && chown rocketchat:rocketchat /app/uploads \ - && apt-get update \ - && apt-get install -y --no-install-recommends fontconfig - -# --chown requires Docker 17.12 and works only on Linux -ADD --chown=rocketchat:rocketchat . /app - -RUN aptMark="$(apt-mark showmanual)" \ - && apt-get install -y --no-install-recommends g++ make python ca-certificates \ - && cd /app/bundle/programs/server \ - && npm install \ - && apt-mark auto '.*' > /dev/null \ - && apt-mark manual $aptMark > /dev/null \ - && find /usr/local -type f -executable -exec ldd '{}' ';' \ - | awk '/=>/ { print $(NF-1) }' \ - | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | xargs -r apt-mark manual \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ - && npm cache clear --force - -USER rocketchat - -VOLUME /app/uploads - -WORKDIR /app/bundle - -# needs a mongoinstance - defaults to container linking with alias 'mongo' -ENV DEPLOY_METHOD=docker \ - NODE_ENV=production \ - MONGO_URL=mongodb://mongo:27017/rocketchat \ - HOME=/tmp \ - PORT=3000 \ - ROOT_URL=http://localhost:3000 \ - Accounts_AvatarStorePath=/app/uploads - -EXPOSE 3000 - -CMD ["node", "main.js"] diff --git a/.docker/Dockerfile.alpine b/.docker/Dockerfile.alpine deleted file mode 100644 index 5754077e1398..000000000000 --- a/.docker/Dockerfile.alpine +++ /dev/null @@ -1,36 +0,0 @@ -FROM node:14.18.3-alpine3.15 - -RUN apk add --no-cache python3 make g++ libc6-compat ttf-dejavu - -ADD . /app - -MAINTAINER buildmaster@rocket.chat - -RUN set -x \ - && cd /app/bundle/programs/server \ - && npm install --production \ - # Start hack for sharp... - && rm -rf npm/node_modules/sharp \ - && npm install sharp@0.29.3 \ - && mv node_modules/sharp npm/node_modules/sharp \ - # End hack for sharp - && cd npm \ - && npm rebuild bcrypt --build-from-source \ - && npm cache clear --force - -# needs a mongo instance - defaults to container linking with alias 'mongo' -ENV DEPLOY_METHOD=docker \ - NODE_ENV=production \ - MONGO_URL=mongodb://mongo:27017/rocketchat \ - HOME=/tmp \ - PORT=3000 \ - ROOT_URL=http://localhost:3000 \ - Accounts_AvatarStorePath=/app/uploads - -VOLUME /app/uploads - -WORKDIR /app/bundle - -EXPOSE 3000 - -CMD ["node", "main.js"] diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 594684228cd0..000000000000 --- a/.dockerignore +++ /dev/null @@ -1,5 +0,0 @@ -.git -.gitignore -LICENSE -README.md -docker-compose.yml \ No newline at end of file diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index b43c20e9a5fb..000000000000 --- a/.drone.yml +++ /dev/null @@ -1,44 +0,0 @@ -pipeline: - restore-cache: - image: drillster/drone-volume-cache - restore: true - mount: - - /drone/.meteor/ - - ./node_modules - - ./.meteor/local - volumes: - - /tmp/cache/Rocket.Chat:/cache - build: - image: ubuntu:16.04 - environment: - - METEOR_ALLOW_SUPERUSER=true - commands: - - apt update && apt install curl git python g++ build-essential bzip2 -y - - export HOME=/drone - - export PATH="/drone/.meteor:$PATH" - - if [ ! -e "/drone/.meteor/meteor" ]; then export HOME=/drone; curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; fi - - which meteor - - meteor npm install - - set +e - - meteor add rocketchat:lib - - set -e - - mkdir /drone/build - - meteor build --allow-superuser --server-only --directory /drone/build - - cp .docker/Dockerfile.local /drone/build/Dockerfile - rebuild-cache: - image: drillster/drone-volume-cache - rebuild: true - mount: - - /drone/.meteor/ - - ./node_modules - - ./.meteor/local - volumes: - - /tmp/cache/Rocket.Chat:/cache - docker: - image: plugins/docker - repo: rocketchat/rocket.chat - dockerfile: /drone/build/Dockerfile - storage_driver: overlay - context: /drone/build - secrets: [ docker_username, docker_password ] - tag: designpreview diff --git a/.drone.yml.sig b/.drone.yml.sig deleted file mode 100644 index 064d2264dee3..000000000000 --- a/.drone.yml.sig +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJIUzI1NiJ9.cGlwZWxpbmU6CiAgcmVzdG9yZS1jYWNoZToKICAgIGltYWdlOiBkcmlsbHN0ZXIvZHJvbmUtdm9sdW1lLWNhY2hlCiAgICByZXN0b3JlOiB0cnVlCiAgICBtb3VudDoKICAgICAgLSAvZHJvbmUvLm1ldGVvci8KICAgICAgLSAuL25vZGVfbW9kdWxlcwogICAgICAtIC4vLm1ldGVvci9sb2NhbAogICAgdm9sdW1lczoKICAgICAgLSAvdG1wL2NhY2hlL1JvY2tldC5DaGF0Oi9jYWNoZQogIGJ1aWxkOgogICAgaW1hZ2U6IHVidW50dToxNi4wNAogICAgZW52aXJvbm1lbnQ6CiAgICAgIC0gTUVURU9SX0FMTE9XX1NVUEVSVVNFUj10cnVlCiAgICBjb21tYW5kczoKICAgICAgLSBhcHQgdXBkYXRlICYmIGFwdCBpbnN0YWxsIGN1cmwgZ2l0IHB5dGhvbiBnKysgYnVpbGQtZXNzZW50aWFsIGJ6aXAyIC15CiAgICAgIC0gZXhwb3J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hZ2VfZHJpdmVyOiBvdmVybGF5CiAgICBjb250ZXh0OiAvZHJvbmUvYnVpbGQKICAgIHNlY3JldHM6IFsgZG9ja2VyX3VzZXJuYW1lLCBkb2NrZXJfcGFzc3dvcmQgXQogICAgdGFnOiBkZXNpZ25wcmV2aWV3Cg.vIwnazoqiKfxsC6hQHJFmB7jE0dvewf69xJgNxUWNic \ No newline at end of file diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 38a10ea159b1..000000000000 --- a/.eslintignore +++ /dev/null @@ -1,23 +0,0 @@ -node_modules -packages/autoupdate/ -packages/meteor-streams/ -packages/meteor-timesync/ -app/emoji-emojione/generateEmojiIndex.js -app/favico/favico.js -packages/rocketchat-livechat/assets/rocketchat-livechat.min.js -packages/rocketchat-livechat/assets/rocket-livechat.js -app/theme/client/vendor/ -public/packages/rocketchat_videobridge/client/public/external_api.js -packages/tap-i18n/lib/tap_i18next/tap_i18next-1.7.3.js -private/moment-locales/ -public/livechat/ -public/pdf.worker.min.js -public/workers/**/* -imports/client/**/* -ee/server/services/dist/** -!/.mocharc.js -!/.mocharc.*.js -!/.scripts/ -!/.storybook/ -!/client/.eslintrc.js -!/ee/client/.eslintrc.js diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 95a479a26e4b..000000000000 --- a/.eslintrc +++ /dev/null @@ -1,145 +0,0 @@ -{ - "extends": [ - "@rocket.chat/eslint-config", - "plugin:prettier/recommended" - ], - "parser": "babel-eslint", - "globals": { - "__meteor_bootstrap__": false, - "__meteor_runtime_config__": false, - "Assets": false, - "chrome": false, - "jscolor": false - }, - "plugins": [ - "react", - "react-hooks" - ], - "rules": { - "jsx-quotes": [ - "error", - "prefer-single" - ], - "react/jsx-uses-react": "error", - "react/jsx-uses-vars": "error", - "react/jsx-no-undef": "error", - "react/jsx-fragments": [ - "error", - "syntax" - ], - "react-hooks/rules-of-hooks": "error", - "react-hooks/exhaustive-deps": ["warn", { - "additionalHooks": "(useComponentDidUpdate)" - }] - }, - "settings": { - "import/resolver": { - "node": { - "extensions": [ - ".js", - ".ts", - ".tsx" - ] - } - }, - "react": { - "version": "detect" - } - }, - "overrides": [ - { - "files": [ - "**/*.ts", - "**/*.tsx" - ], - "extends": [ - "plugin:@typescript-eslint/recommended", - "plugin:@typescript-eslint/eslint-recommended", - "@rocket.chat/eslint-config", - "plugin:prettier/recommended" - ], - "globals": { - "Atomics": "readonly", - "SharedArrayBuffer": "readonly" - }, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "sourceType": "module", - "ecmaVersion": 2018, - "warnOnUnsupportedTypeScriptVersion": false, - "ecmaFeatures": { - "experimentalObjectRestSpread": true, - "legacyDecorators": true - } - }, - "plugins": [ - "react", - "@typescript-eslint", - "anti-trojan-source" - ], - "rules": { - "func-call-spacing": "off", - "jsx-quotes": [ - "error", - "prefer-single" - ], - "indent": "off", - "no-dupe-class-members": "off", - "no-spaced-func": "off", - "no-unused-vars": "off", - "no-useless-constructor": "off", - "no-use-before-define": "off", - "react/jsx-uses-react": "error", - "react/jsx-uses-vars": "error", - "react/jsx-no-undef": "error", - "react/jsx-fragments": [ - "error", - "syntax" - ], - "@typescript-eslint/ban-ts-ignore": "off", - "@typescript-eslint/interface-name-prefix": [ - "error", - "always" - ], - "@typescript-eslint/no-dupe-class-members": "error", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-unused-vars": ["error", { - "argsIgnorePattern": "^_", - "ignoreRestSiblings": true - }], - "@typescript-eslint/prefer-optional-chain": "warn", - "anti-trojan-source/no-bidi": "error" - }, - "env": { - "browser": true, - "commonjs": true, - "es6": true, - "node": true - }, - "settings": { - "import/resolver": { - "node": { - "extensions": [ - ".js", - ".ts", - ".tsx" - ] - } - }, - "react": { - "version": "detect" - } - } - }, - { - "files": [ - "**/*.tests.js", - "**/*.tests.ts", - "**/*.spec.ts" - ], - "env": { - "mocha": true - } - } - ] -} diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000000..1532be511ea7 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,25 @@ +/packages/* @RocketChat/chat-engine +/packages/core-typings/ @RocketChat/chat-engine +/packages/rest-typings/ @RocketChat/chat-engine +/packages/ui-contexts/ @RocketChat/frontend +/packages/eslint-config/ @RocketChat/chat-engine +/packages/livechat/ @RocketChat/frontend @RocketChat/chat-engine +/.vscode/ @RocketChat/chat-engine +/.github/ @RocketChat/chat-engine +/_templates/ @RocketChat/chat-engine +/apps/meteor/client/ @RocketChat/frontend +/apps/meteor/tests/ @RocketChat/chat-engine +/apps/meteor/app/apps/ @RocketChat/apps +/apps/meteor/app/livechat @RocketChat/omnichannel +/apps/meteor/app/voip @RocketChat/omnichannel +/apps/meteor/app/sms @RocketChat/omnichannel +/apps/meteor/packages/rocketchat-livechat @RocketChat/omnichannel +/apps/meteor/server/services/voip @RocketChat/omnichannel +/apps/meteor/server/services/omnichannel-voip @RocketChat/omnichannel +/apps/meteor/server/features/EmailInbox @RocketChat/omnichannel +/apps/meteor/ee/app/canned-responses @RocketChat/omnichannel +/apps/meteor/ee/app/livechat @RocketChat/omnichannel +/apps/meteor/ee/app/livechat-enterprise @RocketChat/omnichannel +/apps/meteor/ee/client/omnichannel @RocketChat/omnichannel +/apps/meteor/client/components/omnichannel @RocketChat/omnichannel +/apps/meteor/client/components/voip @RocketChat/omnichannel diff --git a/.github/actions/build-docker-image/action.yml b/.github/actions/build-docker-image/action.yml new file mode 100644 index 000000000000..240c502efd1c --- /dev/null +++ b/.github/actions/build-docker-image/action.yml @@ -0,0 +1,88 @@ +name: 'Build Docker image' +description: 'Build Rocket.Chat Docker image' + +inputs: + root-dir: + required: true + docker-tag: + required: true + release: + required: true + username: + required: false + password: + required: false + +outputs: + image-name: + value: ${{ steps.build-image.outputs.image-name }} + +runs: + using: composite + steps: + # - shell: bash + # name: Free disk space + # run: | + # sudo swapoff -a + # sudo rm -f /swapfile + # sudo apt clean + # docker rmi $(docker image ls -aq) + # df -h + + - shell: bash + id: build-image + run: | + cd ${{ inputs.root-dir }} + + LOWERCASE_REPOSITORY=$(echo "${{ github.repository_owner }}" | tr "[:upper:]" "[:lower:]") + + IMAGE_NAME_BASE="ghcr.io/${LOWERCASE_REPOSITORY}/rocket.chat:${{ inputs.docker-tag }}" + + IMAGE_NAME="${IMAGE_NAME_BASE}.${{ inputs.release }}" + + echo "Build Docker image ${IMAGE_NAME}" + + DOCKER_PATH="${GITHUB_WORKSPACE}/apps/meteor/.docker" + if [[ '${{ inputs.release }}' = 'preview' ]]; then + DOCKER_PATH="${DOCKER_PATH}-mongo" + fi; + + DOCKERFILE_PATH="${DOCKER_PATH}/Dockerfile" + if [[ '${{ inputs.release }}' = 'alpine' ]]; then + DOCKERFILE_PATH="${DOCKERFILE_PATH}.${{ inputs.release }}" + fi; + + echo "Copy Dockerfile for release: ${{ inputs.release }}" + cp $DOCKERFILE_PATH ./Dockerfile + if [ -e ${DOCKER_PATH}/entrypoint.sh ]; then + cp ${DOCKER_PATH}/entrypoint.sh . + fi; + + echo "Build ${{ inputs.release }} Docker image" + docker build -t $IMAGE_NAME . + + echo "::set-output name=image-name-base::${IMAGE_NAME_BASE}" + echo "::set-output name=image-name::${IMAGE_NAME}" + + - name: Login to GitHub Container Registry + if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop' + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ inputs.username }} + password: ${{ inputs.password }} + + - name: Publish image + shell: bash + if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop' + run: | + echo "Push Docker image: ${{ steps.build-image.outputs.image-name }}" + + docker push ${{ steps.build-image.outputs.image-name }} + + if [[ '${{ inputs.release }}' = 'official' ]]; then + echo "Push release official without variant" + + docker tag ${{ steps.build-image.outputs.image-name }} ${{ steps.build-image.outputs.image-name-base }} + docker push ${{ steps.build-image.outputs.image-name-base }} + fi; diff --git a/.github/auto-label-action-config.json b/.github/auto-label-action-config.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/.github/auto-label-action-config.json @@ -0,0 +1 @@ +{} diff --git a/.github/history-manual.json b/.github/history-manual.json index 36e399bf4ab5..a951279b0465 100644 --- a/.github/history-manual.json +++ b/.github/history-manual.json @@ -124,6 +124,20 @@ "pierre-lehnen-rc" ] }], + "3.18.6": [{ + "title": "[FIX] Security Hotfix (https://docs.rocket.chat/guides/security/security-updates)", + "userLogin": "d-gubert", + "contributors": [ + "ggazzo" + ] + }], + "3.18.7": [{ + "title": "[FIX] Security Hotfix (https://docs.rocket.chat/guides/security/security-updates)", + "userLogin": "d-gubert", + "contributors": [ + "ggazzo" + ] + }], "4.1.1": [{ "title": "[FIX] Security Hotfix (https://docs.rocket.chat/guides/security/security-updates)", "userLogin": "sampaiodiego", @@ -147,5 +161,40 @@ "contributors": [ "gronke" ] + }], + "4.4.4": [{ + "title": "[FIX] Security Hotfix (https://docs.rocket.chat/guides/security/security-updates)", + "userLogin": "d-gubert", + "contributors": [ + "ggazzo" + ] + }], + "4.4.5": [{ + "title": "[FIX] Security Hotfix (https://docs.rocket.chat/guides/security/security-updates)", + "userLogin": "d-gubert", + "contributors": [ + "ggazzo" + ] + }], + "4.7.3": [{ + "title": "[FIX] Security Hotfix (https://docs.rocket.chat/guides/security/security-updates)", + "userLogin": "d-gubert", + "contributors": [ + "ggazzo" + ] + }], + "4.7.4": [{ + "title": "[FIX] Security Hotfix (https://docs.rocket.chat/guides/security/security-updates)", + "userLogin": "d-gubert", + "contributors": [ + "ggazzo" + ] + }], + "4.8.2": [{ + "title": "[FIX] Security Hotfix (https://docs.rocket.chat/guides/security/security-updates)", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] }] } diff --git a/.github/history.json b/.github/history.json index 7b5bb6a8d2c5..98211dbddd60 100644 --- a/.github/history.json +++ b/.github/history.json @@ -69993,121 +69993,23613 @@ ], "pull_requests": [] }, - "4.4.1": { - "node_version": "14.18.2", + "4.5.0-rc.0": { + "node_version": "14.18.3", "npm_version": "6.14.15", - "apps_engine_version": "1.30.0", + "apps_engine_version": "1.31.0-alpha.5979", + "mongo_versions": [ + "'3.6'", + "'4.0'", + "'4.2'", + "'4.4'", + "'5.0'" + ], + "pull_requests": [ + { + "pr": "24573", + "title": "Chore: Bump Fuselage packages", + "userLogin": "tassoevan", + "description": "It uses the last stable version of Fuselage packages.", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24558", + "title": "i18n: Language update from LingoHub 🤖 on 2022-02-21Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null, + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24572", + "title": "[FIX] 2FA via email when logging in using OAuth", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24568", + "title": "Chore: Update Apps-Engine", + "userLogin": "d-gubert", + "milestone": "4.5.0", + "contributors": [ + "d-gubert", + "web-flow" + ] + }, + { + "pr": "24536", + "title": "Chore: roomTypes: Stop mixing client and server code together", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.5.0", + "contributors": [ + "pierre-lehnen-rc", + "tassoevan", + "web-flow" + ] + }, + { + "pr": "24529", + "title": "[IMPROVE] Replace AutoComplete in UserAutoComplete & UserAutoCompleteMultiple components", + "userLogin": "juliajforesti", + "description": "This PR replaces a deprecated fuselage's component `AutoComplete` in favor of `Select` and `MultiSelect` which fixes some of UX/UI issues in selecting users\r\n\r\n### before\r\n![Screen Shot 2022-02-19 at 13 33 28](https://user-images.githubusercontent.com/27704687/154809737-8181a06c-4f20-48ea-90f7-01e828b9a452.png)\r\n\r\n### after\r\n![Screen Shot 2022-02-19 at 13 30 58](https://user-images.githubusercontent.com/27704687/154809653-a8ec9a80-c0dd-4a25-9c00-0f96147d79e9.png)", + "contributors": [ + "juliajforesti", + "dougfabris", + "tassoevan" + ] + }, + { + "pr": "24513", + "title": "Chore: Run tests using microservices deployment on CI", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow", + "rodrigok" + ] + }, + { + "pr": "24556", + "title": "Bump @types/ws from 8.2.2 to 8.2.3 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24501", + "title": "Chore: Update fuselage deps to match monolith versions", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24538", + "title": "Bump adm-zip from 0.4.14 to 0.5.9", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24454", + "title": "[IMPROVE] Purchase Type Filter for marketplace apps and Categories filter anchor refactoring", + "userLogin": "rique223", + "description": "Implemented a filter by purchase type(free or paid) component for the apps screen of the marketplace. Besides that, new entries on the dictionary, fixed some parts of the App type (purchaseType was typed as unknown and price as string), and created some helpers to work alongside the filter. Will be refactoring the categories filter anchor and then will open this PR for reviews.\r\n\r\nDemo gif:\r\n![purchaseTypeFIlter](https://user-images.githubusercontent.com/43561537/153101228-7b7ebdc3-2d34-420f-aa9d-f7cbc8d4b53f.gif)\r\n\r\nRefactored the categories filter anchor from a plain fuselage select to a select button with dynamic colors.\r\nDemo gif:\r\n![New categories filter anchor(PR)](https://user-images.githubusercontent.com/43561537/153422427-28012b7d-e0ec-45f4-861d-c9368c57ad04.gif)", + "contributors": [ + "rique223", + "dougfabris", + "web-flow" + ] + }, + { + "pr": "24475", + "title": "[IMPROVE] Skip encryption for slash commands in E2E rooms", + "userLogin": "yash-rajpal", + "description": "Currently Slash Commands don't work in an E2EE room, as we encrypt the message before slash command is detected by the server, So removed encryption for slash commands in e2e rooms.", + "contributors": [ + "yash-rajpal", + "albuquerquefabio", + "web-flow" + ] + }, + { + "pr": "24304", + "title": "Chore: Js to ts slash commands archive", + "userLogin": "eduardofcabrera", + "description": "Convert Slash Commands archive files to typescript", + "contributors": [ + "eduardofcabrera", + "web-flow" + ] + }, + { + "pr": "24114", + "title": "[NEW] E2E password generator", + "userLogin": "ostjen", + "contributors": [ + "ostjen", + "web-flow", + "eduardofcabrera", + "tassoevan" + ] + }, + { + "pr": "24553", + "title": "[FIX] Omnichannel managers can't join chats in progress", + "userLogin": "renatobecker", + "milestone": "4.5.0", + "contributors": [ + "renatobecker", + "murtaza98", + "web-flow" + ] + }, + { + "pr": "24559", + "title": "[FIX] Room context tabs not working in Omnichannel current chats page", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24173", + "title": "[FIX] respect `Accounts_Registration_Users_Default_Roles` setting", + "userLogin": "debdutdeb", + "description": "- Fix `user` role being added as default regardless of the `Accounts_Registration_Users_Default_Roles` setting.", + "milestone": "4.5.0", + "contributors": [ + "debdutdeb", + "web-flow", + "matheusbsilva137" + ] + }, + { + "pr": "24485", + "title": "[FIX] Skip admin info in setup wizard for servers with admin registered", + "userLogin": "dougfabris", + "contributors": [ + "dougfabris", + "tassoevan" + ] + }, + { + "pr": "24537", + "title": "Bump pm2 from 5.1.2 to 5.2.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24209", + "title": "[IMPROVE] Team system messages feedback", + "userLogin": "ostjen", + "description": "- Delete some keys that aren't being used (eg: User_left_female).\r\n- Add new Teams' system messages:\r\n - `added-user-to-team`: **added** @\\user to this Team;\r\n - `removed-user-from-team`: **removed** @\\user from this Team;\r\n - `user-converted-to-team`: **converted** #\\room to a Team;\r\n - `user-converted-to-channel`: **converted** #\\room to a Channel;\r\n - `user-removed-room-from-team`: **removed** @\\user from this Team;\r\n - `user-deleted-room-from-team`: **deleted** #\\room from this Team;\r\n - `user-added-room-to-team`: **deleted** #\\room to this Team;\r\n- Add the corresponding options to hide each new system message and the missing `ujt` and `ult` hide options.", + "milestone": "4.5.0", + "contributors": [ + "ostjen", + "tassoevan", + "web-flow", + "dougfabris", + "matheusbsilva137" + ] + }, + { + "pr": "24467", + "title": "Chore: Improve PR title validation regex", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow", + "debdutdeb" + ] + }, + { + "pr": "24058", + "title": "Bump date-fns from 2.24.0 to 2.28.0", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24508", + "title": "[FIX] Read receipts showing first messages of the room as read even if not read by everyone", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow", + "dougfabris" + ] + }, + { + "pr": "24530", + "title": "Chore: Remove storybook build job from CI", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24528", + "title": "Bump url-parse from 1.5.3 to 1.5.7", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24333", + "title": "Chore: Add description to global OTR setting", + "userLogin": "pedrogssouza", + "contributors": [ + "pedrogssouza", + "yash-rajpal", + "web-flow" + ] + }, + { + "pr": "24382", + "title": "[IMPROVE] OTR system messages", + "userLogin": "yash-rajpal", + "description": "OTR system messages to indicate key refresh and joining chat to users.", + "contributors": [ + "yash-rajpal", + "web-flow" + ] + }, + { + "pr": "24121", + "title": "[IMPROVE] Descriptive tooltip for Encrypted Key on Room Header", + "userLogin": "yash-rajpal", + "milestone": "4.5.0", + "contributors": [ + "yash-rajpal", + "web-flow" + ] + }, + { + "pr": "24522", + "title": "Bump express from 4.17.2 to 4.17.3 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24518", + "title": "Chore: `twoFactorRequired` signature", + "userLogin": "tassoevan", + "description": "Improved type checking for decorator `twoFactorRequired`.", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24517", + "title": "Bump body-parser from 1.19.1 to 1.19.2 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24441", + "title": "[FIX] GDPR action to forget visitor data on request", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman", + "murtaza98", + "web-flow" + ] + }, + { + "pr": "24306", + "title": "Chore: Convert to typescript the slash commands create files", + "userLogin": "eduardofcabrera", + "description": "Convert Slash Commands create files to typescript.", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24325", + "title": "Chore: Convert to typescript the mute and unmute slash commands files", + "userLogin": "eduardofcabrera", + "description": "Convert to typescript the mute and unmute slash commands files", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24321", + "title": "Chore: Convert to typescript the me slashCommands files", + "userLogin": "eduardofcabrera", + "description": "Convert to typescript the me slashCommands files", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "23512", + "title": "Bump sodium-native from 3.2.1 to 3.3.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24311", + "title": "Chore: Convert to typescript the slash commands invite files", + "userLogin": "eduardofcabrera", + "description": "Convert to typescript the slash commands invite files", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24509", + "title": "Bump vm2 from 3.9.5 to 3.9.7 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24451", + "title": "[IMPROVE] ChatBox Text to File Description", + "userLogin": "eduardofcabrera", + "description": "The text content from chatbox goes to the file description when drag and drop a file.", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow", + "dougfabris" + ] + }, + { + "pr": "24461", + "title": "Chore: Update Meteor to 2.5.6", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "rodrigok", + "web-flow" + ] + }, + { + "pr": "24477", + "title": "Chore: Update ws package", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24498", + "title": "Bump underscore.string from 3.3.5 to 3.3.6 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24491", + "title": "Bump follow-redirects from 1.14.7 to 1.14.8 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24493", + "title": "i18n: Language update from LingoHub 🤖 on 2022-02-14Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null + ] + }, + { + "pr": "24331", + "title": "Chore: Convert to typescript the unarchive slash commands files", + "userLogin": "eduardofcabrera", + "description": "Convert to typescript the unarchive slash commands files", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24483", + "title": "[IMPROVE] Add tooltips on action buttons of Canned Response message composer", + "userLogin": "LucasFASouza", + "description": "The tooltips were missing on the action buttons of CR message composer.\r\n\r\n![image](https://user-images.githubusercontent.com/32396925/153620327-91107245-4b47-4d39-a99a-6da6d1cf5734.png)\r\n\r\nUsers can now feel more encouraged to use these actions knowing what they are supposed to do.", + "contributors": [ + "LucasFASouza", + "tiagoevanp", + "web-flow" + ] + }, + { + "pr": "24196", + "title": "Chore: Delete unused file (NewAdminInfoPage.js)", + "userLogin": "gabriellsh", + "description": "Just removing a duplicated/unused file.", + "milestone": "4.5.0", + "contributors": [ + "gabriellsh", + "web-flow" + ] + }, + { + "pr": "24388", + "title": "[IMPROVE][ENTERPRISE] Improve how micro services are loaded", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "sampaiodiego" + ] + }, + { + "pr": "24458", + "title": "[IMPROVE] Add return button in chats opened from the list of current chats", + "userLogin": "LucasFASouza", + "description": "The new return button for Omnichannel chats came out with release 3.15 but the feature was only available for chats that were opened from Omnichannel Contact Center.\r\nNow, the same UI/UX is supported for chats opened from Current Chats list.\r\n\r\n![image](https://user-images.githubusercontent.com/32396925/153283190-bd5c9748-c36b-4874-a704-6043afc7e3a1.png)\r\n\r\nThe chat now opens in the Omnichannel settings and has the return button so the user can go back to the Current Chats list.\r\n\r\n![image](https://user-images.githubusercontent.com/32396925/153285591-fad8e4a0-d2ea-4a02-8b2a-15e383b3c876.png)", + "contributors": [ + "LucasFASouza", + "tiagoevanp", + "web-flow" + ] + }, + { + "pr": "24469", + "title": "Bump express from 4.17.1 to 4.17.2 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24472", + "title": "Bump cookie from 0.4.1 to 0.4.2 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24275", + "title": "[IMPROVE] Close modal on esc and outside click", + "userLogin": "gabriellsh", + "description": "This is a QUICK change in order to close modals pressing Esc button and clicking outside of it **intentionally**.", + "milestone": "4.5.0", + "contributors": [ + "gabriellsh", + "dougfabris", + "tassoevan" + ] + }, + { + "pr": "24435", + "title": "Chore(deps-dev): Bump ts-node from 10.0.0 to 10.5.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24041", + "title": "[IMPROVE] Add user to room on \"Click to Join!\" button press", + "userLogin": "matheusbsilva137", + "description": "- Add user to room on \"Click to Join!\" button press;\r\n- Display the \"Join\" button in discussions inside channels (keeping the behavior consistent with discussions inside groups).", + "contributors": [ + "matheusbsilva137", + "web-flow", + "tassoevan", + "pierre-lehnen-rc", + "ostjen" + ] + }, + { + "pr": "24310", + "title": "[FIX] Implement client errors on ddp-streamer", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "23963", + "title": "Bump body-parser from 1.19.0 to 1.19.1 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "23961", + "title": "Bump jaeger-client from 3.18.1 to 3.19.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24466", + "title": "[FIX] typo on register server tooltip of setup wizard", + "userLogin": "filipemarins", + "milestone": "4.5.0", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "24037", + "title": "[FIX] Inconsistent validation of user's access to rooms", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24450", + "title": "[FIX] OAuth mismatch redirect_uri error", + "userLogin": "sampaiodiego", + "milestone": "4.4.2", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24305", + "title": "[FIX] Prevent Apps Bridge to remove visitor status from room", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman", + "d-gubert" + ] + }, + { + "pr": "24453", + "title": "Chore: bump fuselage version", + "userLogin": "dougfabris", + "milestone": "4.4.2", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "24253", + "title": "[FIX] Issues on selecting users when importing CSV", + "userLogin": "guijun13", + "description": "* Fix users selecting by fixing their _id\r\n* Add condition to disable 'Start importing' button if `usersCount`, `channelsCount` and `messageCount` equals 0, or if messageCount is alone\r\n* Remove `disabled={usersCount === 0}` on user Tab", + "contributors": [ + "guijun13", + "tassoevan", + "web-flow", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24299", + "title": "Chore(deps): Bump node-fetch from 2.6.1 to 2.6.7 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24418", + "title": "[FIX] Oembed request not respecting payload limit", + "userLogin": "sampaiodiego", + "milestone": "4.4.1", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24429", + "title": "i18n: Language update from LingoHub 🤖 on 2022-02-07Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null, + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24407", + "title": "[FIX] Skip cloud steps for registered servers on setup wizard", + "userLogin": "dougfabris", + "milestone": "4.4.1", + "contributors": [ + "dougfabris", + "tassoevan", + "gabriellsh", + "web-flow" + ] + }, + { + "pr": "24410", + "title": "Chore: Convert JS files to Typescript", + "userLogin": "felipe-rod123", + "description": "This pull request converts 26 more files from Javascript to Typescript, to check variable types and increase validation on the code.", + "contributors": [ + "felipe-rod123", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "24369", + "title": "[IMPROVE] Convert tag edit with department data to tsx", + "userLogin": "LucasFASouza", + "contributors": [ + "LucasFASouza", + "tiagoevanp", + "web-flow" + ] + }, + { + "pr": "24401", + "title": "[FIX] Outgoing webhook without scripts not saving messages", + "userLogin": "sampaiodiego", + "milestone": "4.4.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24334", + "title": "[IMPROVE] CloudLoginModal visual consistency", + "userLogin": "dougfabris", + "description": "### before\r\n![image](https://user-images.githubusercontent.com/27704687/151585064-dc6a1e29-9903-4241-8fbd-dfbe6c55fbef.png)\r\n\r\n### after\r\n![Screen Shot 2022-01-28 at 13 32 02](https://user-images.githubusercontent.com/27704687/151585101-75b98502-9aae-4198-bc3e-4956750e5d8b.png)", + "milestone": "4.5.0", + "contributors": [ + "dougfabris", + "gabriellsh", + "web-flow" + ] + }, + { + "pr": "24409", + "title": "[FIX] Startup errors creating indexes", + "userLogin": "sampaiodiego", + "description": "Fix `bio` and `prid` startup index creation errors.", + "milestone": "4.4.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24406", + "title": "Chore: Unify ILivechatAgent with ILivechatAgentRecord", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24381", + "title": "[FIX] Add ?close to OAuth callback url", + "userLogin": "sampaiodiego", + "milestone": "4.4.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24387", + "title": "[FIX] Slash commands previews not working", + "userLogin": "ostjen", + "milestone": "4.4.1", + "contributors": [ + "ostjen" + ] + }, + { + "pr": "24357", + "title": "i18n: Language update from LingoHub 🤖 on 2022-01-31Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null + ] + }, + { + "pr": "24341", + "title": "Bump simple-get from 4.0.0 to 4.0.1", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24366", + "title": "Chore: Set Docker image tag to latest only when really latest", + "userLogin": "debdutdeb", + "contributors": [ + "debdutdeb", + "web-flow" + ] + }, + { + "pr": "24109", + "title": "[IMPROVE] Added a new \"All\" tab which shows all integrations in Integrations", + "userLogin": "aswinidev", + "milestone": "4.5.0", + "contributors": [ + "aswinidev", + "dougfabris", + "web-flow" + ] + }, + { + "pr": "24363", + "title": "Merge master into develop & Set version to 4.5.0-develop", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + } + ] + }, + "4.4.1": { + "node_version": "14.18.2", + "npm_version": "6.14.15", + "apps_engine_version": "1.30.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "24432", + "title": "Release 4.4.1", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "sampaiodiego", + "pierre-lehnen-rc", + "dougfabris", + "ostjen" + ] + }, + { + "pr": "24387", + "title": "[FIX] Slash commands previews not working", + "userLogin": "ostjen", + "milestone": "4.4.1", + "contributors": [ + "ostjen" + ] + }, + { + "pr": "24381", + "title": "[FIX] Add ?close to OAuth callback url", + "userLogin": "sampaiodiego", + "milestone": "4.4.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24409", + "title": "[FIX] Startup errors creating indexes", + "userLogin": "sampaiodiego", + "description": "Fix `bio` and `prid` startup index creation errors.", + "milestone": "4.4.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24401", + "title": "[FIX] Outgoing webhook without scripts not saving messages", + "userLogin": "sampaiodiego", + "milestone": "4.4.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24407", + "title": "[FIX] Skip cloud steps for registered servers on setup wizard", + "userLogin": "dougfabris", + "milestone": "4.4.1", + "contributors": [ + "dougfabris", + "tassoevan", + "gabriellsh", + "web-flow" + ] + }, + { + "pr": "24418", + "title": "[FIX] Oembed request not respecting payload limit", + "userLogin": "sampaiodiego", + "milestone": "4.4.1", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + } + ] + }, + "4.4.2": { + "node_version": "14.18.2", + "npm_version": "6.14.15", + "apps_engine_version": "1.30.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "24459", + "title": "Release 4.4.2", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "dougfabris", + "pierre-lehnen-rc", + "sampaiodiego" + ] + }, + { + "pr": "24450", + "title": "[FIX] OAuth mismatch redirect_uri error", + "userLogin": "sampaiodiego", + "milestone": "4.4.2", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24453", + "title": "Chore: bump fuselage version", + "userLogin": "dougfabris", + "milestone": "4.4.2", + "contributors": [ + "dougfabris" + ] + } + ] + }, + "4.5.0-rc.1": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0-alpha.5979", + "mongo_versions": [ + "'3.6'", + "'4.0'", + "'4.2'", + "'4.4'", + "'5.0'" + ], + "pull_requests": [ + { + "pr": "24581", + "title": "Regression: Add support to namespace within micro services", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24583", + "title": "Regression: Error when trying to load name of dm rooms for avatars and notifications", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "24567", + "title": "[NEW] Marketplace sort filter", + "userLogin": "ujorgeleite", + "description": "Implemented a sort filter for the marketplace screen. This component sorts the marketplace apps list in 4 ways, alphabetical order(A-Z), inverse alphabetical order(Z-A), most recently updated(MRU), and least recent updated(LRU). Besides that, I've generalized some components and types to increase code reusability, renamed some helpers as well as deleted some useless ones, and inserted the necessary new translations on the English i18n dictionary.\r\nDemo gif:\r\n![Marketplace sort filter](https://user-images.githubusercontent.com/43561537/155033709-e07a6306-a85a-4f7f-9624-b53ba5dd7fa9.gif)", + "milestone": "4.5.0", + "contributors": [ + "rique223", + "ujorgeleite" + ] + }, + { + "pr": "23102", + "title": "[NEW] VoIP Support for Omnichannel", + "userLogin": "KevLehman", + "description": "- Created VoipService to manage VoIP connections and PBX connection\r\n- Created LivechatVoipService that will handle custom cases for livechat (creating rooms, assigning chats to queue, actions when call is finished, etc)\r\n- Created Basic interfaces to support new services and new model\r\n- Created Endpoints for management interfaces\r\n- Implemented asterisk connector on VoIP service\r\n- Created UI components to show calls incoming and to allow answering/rejecting calls\r\n- Added new settings to control call server/management server connection values\r\n- Added endpoints to associate Omnichannel Agents with PBX Extensions\r\n- Added support for event listening on server side, to get metadata about calls being received/ongoing\r\n- Created new pages to update settings & to see user-extension association\r\n- Created new page to see ongoing calls (and past calls)\r\n- Added support for remote hangup/hold on calls\r\n- Implemented call metrics calculation (hold time, waiting time, talk time)\r\n- Show a notificaiton when call is received", + "milestone": "4.5.0", + "contributors": [ + "KevLehman", + "amolghode1981", + "web-flow", + "tiagoevanp", + "murtaza98", + "MartinSchoeler" + ] + }, + { + "pr": "24562", + "title": "Regression: Fix room not getting created due to null visitor status", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + } + ] + }, + "4.5.0-rc.2": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0-alpha.5979", + "mongo_versions": [ + "'3.6'", + "'4.0'", + "'4.2'", + "'4.4'", + "'5.0'" + ], + "pull_requests": [ + { + "pr": "24594", + "title": "Regression: Bunch of settings fixes for VoIP", + "userLogin": "MartinSchoeler", + "milestone": "4.5.0", + "contributors": [ + "MartinSchoeler", + "web-flow" + ] + }, + { + "pr": "24609", + "title": "Regression: Admin Sidebar colors inverted.", + "userLogin": "gabriellsh", + "milestone": "4.5.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "24602", + "title": "Regression: No audio when call comes from Skype/IP phone", + "userLogin": "amolghode1981", + "description": "The audio was not rendered because of re-rendering of react element based on\r\nqueueCounter and roomInfo. queueCounter and roomInfo cause the dom to re-render when call gets accepted\r\nbecause after accepting call, queueCounter changes or a room gets created.\r\nThe audio element gets recreated. But VoIP user probably holds the old one.\r\nThe behaviour is not predictable when such case happens. If everything gets cleanly setup,\r\neven if the audio element goes headless, it still continues to play the remote audio.\r\nBut in other cases, it is unreferenced the one on dom has its srcObject as null.\r\nThis causes no audio.\r\n\r\nThis fix provides a way to re-initialise the rendering elements in VoIP user\r\nand calls this function on useEffect() if the re-render has happen.", + "milestone": "4.5.0", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24596", + "title": "Regression: Fixes in Voice Contextual Bar and Directory", + "userLogin": "MartinSchoeler", + "milestone": "4.5.0", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24603", + "title": "Regression: Fix time format on Voip system messages", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24598", + "title": "Regression: VoIP service button displayed when VoIP is disabled", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + } + ] + }, + "4.5.0-rc.3": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0-alpha.5979", + "mongo_versions": [ + "'3.6'", + "'4.0'", + "'4.2'", + "'4.4'", + "'5.0'" + ], + "pull_requests": [ + { + "pr": "24630", + "title": "Regression: Fix double value on holdTime and empty msg on last message", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler", + "web-flow" + ] + }, + { + "pr": "24624", + "title": "Regression: If Asterisk suddenly goes down, server has no way to know. Causes server to get stuck. Needs restart", + "userLogin": "amolghode1981", + "milestone": "4.5.0", + "contributors": [ + "amolghode1981", + "KevLehman" + ] + }, + { + "pr": "24601", + "title": "Regression: Prevent connect to asterisk when VoIP is disabled", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98", + "web-flow", + "KevLehman" + ] + }, + { + "pr": "24626", + "title": "Regression: Encode registration info as JWT when signing key is provided", + "userLogin": "KevLehman", + "milestone": "4.5.0", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24625", + "title": "Regression: Fix time fields and wrap up in Voip Room Contexual bar", + "userLogin": "MartinSchoeler", + "milestone": "4.5.0", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24592", + "title": "Regression: Fix in-correct room status shown to agents", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24619", + "title": "Regression: Do not show toast on incoming voip calls", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98", + "web-flow" + ] + }, + { + "pr": "24616", + "title": "Regression: Fix incoming voip call ringtone is not ringing", + "userLogin": "murtaza98", + "contributors": [ + "murtaza98", + "web-flow" + ] + }, + { + "pr": "24610", + "title": "Regression: Mark all rooms as read modal closing instantly.", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "24615", + "title": "Regression: Fix translation for call started message", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98", + "web-flow" + ] + } + ] + }, + "4.5.0-rc.4": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0-alpha.5979", + "mongo_versions": [ + "'3.6'", + "'4.0'", + "'4.2'", + "'4.4'", + "'5.0'" + ], + "pull_requests": [ + { + "pr": "24585", + "title": "Regression: Error setting user avatars and mentioning rooms on Slack Import", + "userLogin": "matheusbsilva137", + "description": "- Fix `Mentioned room not found` error when importing rooms from Slack;\r\n- Fix `Forbidden` error when setting avatars for users imported from Slack (on user import/creation);\r\n- Fix incorrect message count on imported rooms;\r\n- Fix missing username on messages imported from Slack;", + "contributors": [ + "matheusbsilva137", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24647", + "title": "Regression: Fix wrong tab name for VoIP settings", + "userLogin": "renatobecker", + "milestone": "4.5.0", + "contributors": [ + "renatobecker" + ] + }, + { + "pr": "24646", + "title": "Regression: Server crashing if Voip credentials are invalid", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24645", + "title": "Regression: Extension List panel UI not aligned with designs", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24635", + "title": "Regression: Queue counter aggregator for incoming/hanged calls", + "userLogin": "amolghode1981", + "milestone": "4.5.0", + "contributors": [ + "amolghode1981" + ] + } + ] + }, + "4.5.0-rc.5": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0-alpha.5979", + "mongo_versions": [ + "'3.6'", + "'4.0'", + "'4.2'", + "'4.4'", + "'5.0'" + ], + "pull_requests": [ + { + "pr": "24649", + "title": "Regression: Refresh server connection when MI server settings change", + "userLogin": "KevLehman", + "milestone": "4.5.0", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24648", + "title": "Regression: Prevent button from losing state when rerendering", + "userLogin": "KevLehman", + "milestone": "4.5.0", + "contributors": [ + "KevLehman" + ] + } + ] + }, + "4.5.0-rc.6": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0", + "mongo_versions": [ + "'3.6'", + "'4.0'", + "'4.2'", + "'4.4'", + "'5.0'" + ], + "pull_requests": [ + { + "pr": "24651", + "title": "Chore: Update Apps-Engine", + "userLogin": "d-gubert", + "milestone": "4.5.0", + "contributors": [ + "d-gubert" + ] + } + ] + }, + "4.5.0-rc.7": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0", + "mongo_versions": [ + "'3.6'", + "'4.0'", + "'4.2'", + "'4.4'", + "'5.0'" + ], + "pull_requests": [] + }, + "4.5.0": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [] + }, + "4.5.1": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "24782", + "title": "Release 4.5.1", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "renatobecker", + "pierre-lehnen-rc", + "sampaiodiego", + "matheusbsilva137", + "amolghode1981", + "juliajforesti", + "tiagoevanp", + "KevLehman", + "MartinSchoeler", + "Aman-Maheshwari", + "cuonghuunguyen" + ] + }, + { + "pr": "24760", + "title": "[FIX] Apple login script being loaded even when Apple Login is disabled.", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.5.1", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "24754", + "title": "Chore: Update Livechat", + "userLogin": "MartinSchoeler", + "milestone": "4.5.1", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24683", + "title": "[FIX] no id of room closer in livechat-close message", + "userLogin": "cuonghuunguyen", + "milestone": "4.5.1", + "contributors": [ + null + ] + }, + { + "pr": "23795", + "title": "[FIX] Reload roomslist after successful deletion of a room from admin panel.", + "userLogin": "Aman-Maheshwari", + "description": "Removed the logic for calling the `rooms.adminRooms` endPoint from the `RoomsTable` Component and moved it to its parent component `RoomsPage`.\r\nThis allows to call the endPoint `rooms.adminRooms` from `EditRoomContextBar` Component which is also has `RoomPage` Component as its parent.\r\n\r\nAlso added a succes toast message after the successful deletion of room.", + "milestone": "4.5.1", + "contributors": [ + "Aman-Maheshwari", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "24743", + "title": "[FIX] System messages are sent when adding or removing a group from a team", + "userLogin": "matheusbsilva137", + "description": "- Do not send system messages when adding or removing a new or existing _group_ from a team.", + "milestone": "4.5.1", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "24737", + "title": "[FIX] Typo and placeholder on wrap up call modal", + "userLogin": "MartinSchoeler", + "milestone": "4.5.1", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24680", + "title": "[FIX] Show only available agents on extension association modal", + "userLogin": "KevLehman", + "milestone": "4.5.1", + "contributors": [ + "KevLehman", + "tiagoevanp" + ] + }, + { + "pr": "24607", + "title": "[FIX] VoIP Enable/Disable setting on CallContext/CallProvider Notifications", + "userLogin": "tiagoevanp", + "milestone": "4.5.1", + "contributors": [ + "tiagoevanp", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "24677", + "title": "[FIX] Components for user search", + "userLogin": "juliajforesti", + "milestone": "4.5.1", + "contributors": [ + "juliajforesti", + "tassoevan", + "web-flow" + ] + }, + { + "pr": "24657", + "title": "[FIX] Voip Stream Reinitialization Error", + "userLogin": "amolghode1981", + "milestone": "4.5.1", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24696", + "title": "[FIX] Room's message count not being incremented on import", + "userLogin": "matheusbsilva137", + "description": "- Fix rooms' message counter not being incremented on message import.", + "milestone": "4.5.1", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "24674", + "title": "[FIX] Missing username on messages imported from Slack", + "userLogin": "matheusbsilva137", + "description": "- Fix missing sender's username on messages imported from Slack.", + "milestone": "4.5.1", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "24590", + "title": "[FIX] Duplicated 'name' log key", + "userLogin": "sampaiodiego", + "milestone": "4.5.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24661", + "title": "[FIX] Typo in wrap-up term", + "userLogin": "renatobecker", + "milestone": "4.5.1", + "contributors": [ + "renatobecker" + ] + } + ] + }, + "4.5.2": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "24812", + "title": "[FIX] Revert AutoComplete", + "userLogin": "juliajforesti", + "milestone": "4.5.2", + "contributors": [ + "juliajforesti", + "ggazzo" + ] + }, + { + "pr": "24809", + "title": "Regression: Fix ParentRoomWithEndpointData in loop", + "userLogin": "sampaiodiego", + "milestone": "4.5.2", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24732", + "title": "[FIX] `PaginatedSelectFiltered` not handling changes", + "userLogin": "tassoevan", + "milestone": "4.5.2", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24805", + "title": "[FIX] Critical: Incorrect visitor getting assigned to a chat from apps", + "userLogin": "murtaza98", + "milestone": "4.5.2", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24804", + "title": "[FIX] \"livechat/webrtc.call\" endpoint not working", + "userLogin": "murtaza98", + "milestone": "4.5.2", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24792", + "title": "[FIX] VoipExtensionsPage component call", + "userLogin": "KevLehman", + "milestone": "4.5.2", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24705", + "title": "[FIX] Broken multiple OAuth integrations", + "userLogin": "debdutdeb", + "milestone": "4.5.2", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "24623", + "title": "[FIX] Opening a new DM from user card", + "userLogin": "tassoevan", + "description": "A race condition on `useRoomIcon` -- delayed merge of rooms and subscriptions -- was causing a UI crash whenever someone tried to open a DM from the user card component.", + "milestone": "4.5.2", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24750", + "title": "[IMPROVE] Voip Extensions disabled state", + "userLogin": "MartinSchoeler", + "milestone": "4.5.2", + "contributors": [ + "MartinSchoeler" + ] + } + ] + }, + "4.5.3": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "24901", + "title": "[FIX] Custom script not being fired", + "userLogin": "ggazzo", + "milestone": "4.5.3", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "24877", + "title": "Chore: Fix MongoDB versions on release notes", + "userLogin": "sampaiodiego", + "milestone": "4.5.3", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24864", + "title": "[FIX] Disable voip button when call is in progress", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24863", + "title": "[FIX] Broken build caused by PRs modifying same file differently", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman", + "tiagoevanp" + ] + }, + { + "pr": "24838", + "title": "[FIX] [VOIP] SidebarFooter component ", + "userLogin": "tiagoevanp", + "description": "- Improve the CallProvider code;\r\n- Adjust the text case of the VoIP component on the FooterSidebar;\r\n- Fix the bad behavior with the changes in queue's name.", + "milestone": "4.5.3", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24837", + "title": "[IMPROVE] Standarize queue behavior for managers and agents when subscribing", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24829", + "title": "[FIX] Show only enabled departments on forward", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24799", + "title": "[FIX] Wrong param usage on queue summary call", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24789", + "title": "[FIX] VoIP button gets disabled whenever user status changes", + "userLogin": "amolghode1981", + "milestone": "4.5.3", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24752", + "title": "[FIX] Show call icon only when user has extension associated", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24748", + "title": "[IMPROVE] UX - VoIP Call Component", + "userLogin": "tiagoevanp", + "milestone": "4.5.3", + "contributors": [ + "tiagoevanp" + ] + } + ] + }, + "4.6.0-rc.0": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "24052", + "title": "[FIX] Several issues related to custom roles", + "userLogin": "pierre-lehnen-rc", + "description": "- Throw an error when trying to delete a role (User or Subscription role) that are still being used;\r\n- Fix \"Invalid Role\" error for custom roles in Role Editing sidebar;\r\n- Fix \"Users in Role\" screen for custom roles.", + "milestone": "4.6.0", + "contributors": [ + "pierre-lehnen-rc", + "matheusbsilva137", + "web-flow" + ] + }, + { + "pr": "24781", + "title": "[NEW] Telemetry Events", + "userLogin": "eduardofcabrera", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24887", + "title": "[IMPROVE] Adding new statistics related to voip and omnichannel", + "userLogin": "cauefcr", + "description": "- Total of Canned response messages sent\r\n- Total of tags used\r\n- Last-Chatted Agent Preferred (enabled/disabled)\r\n- Assign new conversations to the contact manager (enabled/disabled)\r\n- How to handle Visitor Abandonment setting\r\n- Amount of chats placed on hold\r\n- VoIP Enabled\r\n- Amount of VoIP Calls\r\n- Amount of VoIP Extensions connected\r\n- Amount of Calls placed on hold (1x per call)\r\n- Fixed Session Aggregation type definitions", + "milestone": "4.6.0", + "contributors": [ + "cauefcr", + "KevLehman" + ] + }, + { + "pr": "24911", + "title": "Chore: Remove old scripts", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24898", + "title": "[FIX] DDP Rate Limiter Translation key", + "userLogin": "gabriellsh", + "description": "Before:\r\n\"image\"\r\n\r\n\r\nNow:\r\n\"image\"", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "24831", + "title": "[FIX][ENTERPRISE] Notifications not being sent by ddp-streamer", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24606", + "title": "[FIX] Push privacy config to not show username not being respected", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24901", + "title": "[FIX] Custom script not being fired", + "userLogin": "ggazzo", + "milestone": "4.5.3", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "24896", + "title": "[FIX] Wrong business hour behavior", + "userLogin": "murtaza98", + "milestone": "4.6.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24845", + "title": "[FIX] Ignore customClass on messages", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24879", + "title": "[FIX] Apple OAuth", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24895", + "title": "i18n: Language update from LingoHub 🤖 on 2022-03-21Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null + ] + }, + { + "pr": "24749", + "title": "[IMPROVE] New omnichannel statistics and async statistics processing.", + "userLogin": "cauefcr", + "description": "https://app.clickup.com/t/1z4zg4e", + "contributors": [ + "cauefcr" + ] + }, + { + "pr": "24882", + "title": "[FIX] Missing dependency on useEffect at CallProvider", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24877", + "title": "Chore: Fix MongoDB versions on release notes", + "userLogin": "sampaiodiego", + "milestone": "4.5.3", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24779", + "title": "[FIX] auto-join team channels not honoring user preferences", + "userLogin": "ostjen", + "contributors": [ + "ostjen" + ] + }, + { + "pr": "24869", + "title": "Bump pino from 7.8.1 to 7.9.1 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24870", + "title": "Bump pino-pretty from 7.5.3 to 7.5.4 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24864", + "title": "[FIX] Disable voip button when call is in progress", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24863", + "title": "[FIX] Broken build caused by PRs modifying same file differently", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman", + "tiagoevanp" + ] + }, + { + "pr": "24850", + "title": "Regression: Role Sync not always working", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "24838", + "title": "[FIX] [VOIP] SidebarFooter component ", + "userLogin": "tiagoevanp", + "description": "- Improve the CallProvider code;\r\n- Adjust the text case of the VoIP component on the FooterSidebar;\r\n- Fix the bad behavior with the changes in queue's name.", + "milestone": "4.5.3", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24837", + "title": "[IMPROVE] Standarize queue behavior for managers and agents when subscribing", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24789", + "title": "[FIX] VoIP button gets disabled whenever user status changes", + "userLogin": "amolghode1981", + "milestone": "4.5.3", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24799", + "title": "[FIX] Wrong param usage on queue summary call", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24829", + "title": "[FIX] Show only enabled departments on forward", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24823", + "title": "i18n: Language update from LingoHub 🤖 on 2022-03-14Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null, + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24833", + "title": "Bump @types/mailparser from 3.0.2 to 3.4.0", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24832", + "title": "Bump @types/clipboard from 2.0.1 to 2.0.7", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24822", + "title": "Bump @types/nodemailer from 6.4.2 to 6.4.4", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24821", + "title": "Bump body-parser from 1.19.0 to 1.19.2", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24820", + "title": "Bump @types/ws from 8.5.2 to 8.5.3 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24764", + "title": "Chore: Add E2E tests for livechat/visitor", + "userLogin": "Muramatsu2602", + "description": "- Create a new test suite file under tests/end-to-end/api/livechat\r\n- Create tests for the following endpoints:\r\n + livechat/visitor (create visitor, update visitor, add custom fields to visitors)", + "contributors": [ + "Muramatsu2602", + "KevLehman" + ] + }, + { + "pr": "24729", + "title": "Chore: Add E2E tests for livechat/room.close", + "userLogin": "Muramatsu2602", + "description": "* Create a new test suite file under tests/end-to-end/api/livechat\r\n * Create tests for the following endpoint:\r\n\t + ivechat/room.close", + "contributors": [ + "Muramatsu2602", + "web-flow", + "KevLehman" + ] + }, + { + "pr": "24785", + "title": "[FIX] German translation for Monitore", + "userLogin": "JMoVS", + "contributors": [ + "JMoVS", + "web-flow" + ] + }, + { + "pr": "24812", + "title": "[FIX] Revert AutoComplete", + "userLogin": "juliajforesti", + "milestone": "4.5.2", + "contributors": [ + "juliajforesti", + "ggazzo" + ] + }, + { + "pr": "24747", + "title": "Chore: APIClass types", + "userLogin": "felipe-rod123", + "description": "This pull request creates a new `restivus` module (.d.ts) for the `api.js` file.", + "contributors": [ + "felipe-rod123", + "ggazzo" + ] + }, + { + "pr": "24801", + "title": "Bump is-svg from 4.3.1 to 4.3.2", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24803", + "title": "Bump prometheus-gc-stats from 0.6.2 to 0.6.3", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24810", + "title": "Chore: Skip local services changes when shutting down duplicated services", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24629", + "title": "[FIX] \"Match error\" when converting a team to a channel", + "userLogin": "matheusbsilva137", + "description": "- Fix \"Match error\" when trying to convert a channel to a team;", + "milestone": "4.6.0", + "contributors": [ + "matheusbsilva137", + "web-flow" + ] + }, + { + "pr": "24809", + "title": "Regression: Fix ParentRoomWithEndpointData in loop", + "userLogin": "sampaiodiego", + "milestone": "4.5.2", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24397", + "title": "Chore: Get Settings Statistics", + "userLogin": "albuquerquefabio", + "contributors": [ + "albuquerquefabio" + ] + }, + { + "pr": "24732", + "title": "[FIX] `PaginatedSelectFiltered` not handling changes", + "userLogin": "tassoevan", + "milestone": "4.5.2", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24628", + "title": "Chore: converted more hooks to typescript", + "userLogin": "felipe-rod123", + "description": "Converted some functions on `client/hooks/` from JavaScript to Typescript.", + "contributors": [ + "felipe-rod123", + "ggazzo" + ] + }, + { + "pr": "24506", + "title": "Chore: added settings endpoint types", + "userLogin": "felipe-rod123", + "description": "Created typing for endpoint definitions on `settings.ts`.", + "contributors": [ + "felipe-rod123", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "24226", + "title": "[FIX] Handle Other Formats inside Upload Avatar", + "userLogin": "nishant23122000", + "description": "After resolving issue #24213 : \r\n\r\n\r\nhttps://user-images.githubusercontent.com/53515714/150325012-91413025-786e-4ce0-ae75-629f6b05b024.mp4", + "milestone": "4.6.0", + "contributors": [ + "nishant23122000", + "debdutdeb", + "web-flow", + "murtaza98" + ] + }, + { + "pr": "24424", + "title": "[FIX] Prune Message issue", + "userLogin": "nishant23122000", + "milestone": "4.6.0", + "contributors": [ + "nishant23122000", + "debdutdeb", + "web-flow" + ] + }, + { + "pr": "24805", + "title": "[FIX] Critical: Incorrect visitor getting assigned to a chat from apps", + "userLogin": "murtaza98", + "milestone": "4.5.2", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24804", + "title": "[FIX] \"livechat/webrtc.call\" endpoint not working", + "userLogin": "murtaza98", + "milestone": "4.5.2", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24507", + "title": "Chore: added Server Instances endpoint types", + "userLogin": "felipe-rod123", + "description": "Created typing for endpoint definitions on `instances.ts`.", + "contributors": [ + "felipe-rod123" + ] + }, + { + "pr": "24758", + "title": "[FIX] Prevent call button toggle when user is on call", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24800", + "title": "Regression: Register services right away", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24792", + "title": "[FIX] VoipExtensionsPage component call", + "userLogin": "KevLehman", + "milestone": "4.5.2", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24384", + "title": "Chore: Convert server functions from javascript to typescript", + "userLogin": "felipe-rod123", + "description": "This pull request will be used to rewrite some functions on the Chat Engine to Typescript, in order to increase security and specify variable types on the code.", + "contributors": [ + "felipe-rod123", + "ggazzo" + ] + }, + { + "pr": "24705", + "title": "[FIX] Broken multiple OAuth integrations", + "userLogin": "debdutdeb", + "milestone": "4.5.2", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "24793", + "title": "[FIX][ENTERPRISE] Auto reload feature of ddp-streamer micro service", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24783", + "title": "Bump pino from 7.8.0 to 7.8.1 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "23121", + "title": "Bump jschardet from 1.6.0 to 3.0.0", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24752", + "title": "[FIX] Show call icon only when user has extension associated", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24623", + "title": "[FIX] Opening a new DM from user card", + "userLogin": "tassoevan", + "description": "A race condition on `useRoomIcon` -- delayed merge of rooms and subscriptions -- was causing a UI crash whenever someone tried to open a DM from the user card component.", + "milestone": "4.5.2", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24750", + "title": "[IMPROVE] Voip Extensions disabled state", + "userLogin": "MartinSchoeler", + "milestone": "4.5.2", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24748", + "title": "[IMPROVE] UX - VoIP Call Component", + "userLogin": "tiagoevanp", + "milestone": "4.5.3", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24753", + "title": "Chore: Micro services fixes and cleanup", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24756", + "title": "Regression: Improve Sidenav open/close handling and fixed codeql configs and E2E tests", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "24760", + "title": "[FIX] Apple login script being loaded even when Apple Login is disabled.", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.5.1", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "24754", + "title": "Chore: Update Livechat", + "userLogin": "MartinSchoeler", + "milestone": "4.5.1", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24683", + "title": "[FIX] no id of room closer in livechat-close message", + "userLogin": "cuonghuunguyen", + "milestone": "4.5.1", + "contributors": [ + null + ] + }, + { + "pr": "24771", + "title": "Chore: fix grammatical errors in Features", + "userLogin": "aadishJ01", + "contributors": [ + "aadishJ01", + "web-flow" + ] + }, + { + "pr": "24759", + "title": "Chore: Fix grammatical errors in Code of Conduct", + "userLogin": "aadishJ01", + "contributors": [ + "aadishJ01", + "web-flow" + ] + }, + { + "pr": "23795", + "title": "[FIX] Reload roomslist after successful deletion of a room from admin panel.", + "userLogin": "Aman-Maheshwari", + "description": "Removed the logic for calling the `rooms.adminRooms` endPoint from the `RoomsTable` Component and moved it to its parent component `RoomsPage`.\r\nThis allows to call the endPoint `rooms.adminRooms` from `EditRoomContextBar` Component which is also has `RoomPage` Component as its parent.\r\n\r\nAlso added a succes toast message after the successful deletion of room.", + "milestone": "4.5.1", + "contributors": [ + "Aman-Maheshwari", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "24743", + "title": "[FIX] System messages are sent when adding or removing a group from a team", + "userLogin": "matheusbsilva137", + "description": "- Do not send system messages when adding or removing a new or existing _group_ from a team.", + "milestone": "4.5.1", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "24544", + "title": "Chore: Fix Cypress tests", + "userLogin": "rodrigok", + "contributors": [ + "rodrigok", + "tassoevan", + "dougfabris" + ] + }, + { + "pr": "24737", + "title": "[FIX] Typo and placeholder on wrap up call modal", + "userLogin": "MartinSchoeler", + "milestone": "4.5.1", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24739", + "title": "[IMPROVE][ENTERPRISE] Don't start presence monitor when running micro services", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24738", + "title": "[FIX][ENTERPRISE] DDP streamer not sending data to all clients", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24680", + "title": "[FIX] Show only available agents on extension association modal", + "userLogin": "KevLehman", + "milestone": "4.5.1", + "contributors": [ + "KevLehman", + "tiagoevanp" + ] + }, + { + "pr": "24710", + "title": "[FIX] DDP streamer errors", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24724", + "title": "[FIX][ENTERPRISE] Presence micro service logic", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24717", + "title": "i18n: Language update from LingoHub 🤖 on 2022-03-07Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null, + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24607", + "title": "[FIX] VoIP Enable/Disable setting on CallContext/CallProvider Notifications", + "userLogin": "tiagoevanp", + "milestone": "4.5.1", + "contributors": [ + "tiagoevanp", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "24726", + "title": "Chore: Improve logger to allow log of `unknown` values", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24677", + "title": "[FIX] Components for user search", + "userLogin": "juliajforesti", + "milestone": "4.5.1", + "contributors": [ + "juliajforesti", + "tassoevan", + "web-flow" + ] + }, + { + "pr": "24542", + "title": "[FIX] Date Message Export Filter Fix", + "userLogin": "eduardofcabrera", + "description": "Fix message export filter to get all messages between \"from date\" and \"to date\", including \"to date\".", + "contributors": [ + "eduardofcabrera", + "web-flow" + ] + }, + { + "pr": "24709", + "title": "[FIX] API Error preventing adding an email to users without one (like bot/app users)", + "userLogin": "debdutdeb", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "24716", + "title": "Bump ts-node from 10.6.0 to 10.7.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24476", + "title": "[FIX] Nextcloud OAuth for incomplete token URL", + "userLogin": "debdutdeb", + "milestone": "4.6.0", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "24657", + "title": "[FIX] Voip Stream Reinitialization Error", + "userLogin": "amolghode1981", + "milestone": "4.5.1", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24698", + "title": "Bump pino-pretty from 7.5.2 to 7.5.3 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24696", + "title": "[FIX] Room's message count not being incremented on import", + "userLogin": "matheusbsilva137", + "description": "- Fix rooms' message counter not being incremented on message import.", + "milestone": "4.5.1", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "23824", + "title": "Chore: Improvements on role syncing (ldap, oauth and saml)", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "tassoevan" + ] + }, + { + "pr": "24689", + "title": "Bump pino-pretty from 7.5.1 to 7.5.2 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24674", + "title": "[FIX] Missing username on messages imported from Slack", + "userLogin": "matheusbsilva137", + "description": "- Fix missing sender's username on messages imported from Slack.", + "milestone": "4.5.1", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "24642", + "title": "Bump actions/setup-node from 2 to 3", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24644", + "title": "i18n: Language update from LingoHub 🤖 on 2022-02-28Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null, + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24590", + "title": "[FIX] Duplicated 'name' log key", + "userLogin": "sampaiodiego", + "milestone": "4.5.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24668", + "title": "Bump actions/checkout from 2 to 3", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24574", + "title": "Chore(deps-dev): Bump @types/mock-require from 2.0.0 to 2.0.1", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24667", + "title": "Bump ts-node from 10.5.0 to 10.6.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24666", + "title": "Bump @types/ws from 8.2.3 to 8.5.2 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24640", + "title": "Bump url-parse from 1.5.7 to 1.5.10", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24653", + "title": "Merge master into develop & Set version to 4.6.0-develop", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "web-flow" + ] + }, + { + "pr": "24661", + "title": "[FIX] Typo in wrap-up term", + "userLogin": "renatobecker", + "milestone": "4.5.1", + "contributors": [ + "renatobecker" + ] + }, + { + "pr": "24028", + "title": "[IMPROVE] Updated links in readme", + "userLogin": "aswinidev", + "contributors": [ + "aswinidev", + "web-flow", + "debdutdeb" + ] + } + ] + }, + "4.5.4": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "24938", + "title": "Release 4.5.4", + "userLogin": "AllanPazRibeiro", + "contributors": [ + "geekgonecrazy", + "AllanPazRibeiro" + ] + }, + { + "pr": "24930", + "title": "[FIX] SAML Force name to string", + "userLogin": "geekgonecrazy", + "milestone": "4.5.4", + "contributors": [ + "geekgonecrazy", + "web-flow", + "pierre-lehnen-rc" + ] + } + ] + }, + "4.6.0-rc.1": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "24320", + "title": "[FIX] LDAP avatars being rotated according to metadata even if the setting to rotate uploads is off", + "userLogin": "matheusbsilva137", + "description": "- Use the `FileUpload_RotateImages` setting (**Administration > File Upload > Rotate images on upload**) to control whether avatars should be rotated automatically based on their data (XEIF);\r\n- Display the avatar image preview (orientation) according to the `FileUpload_RotateImages` setting.", + "milestone": "4.6.0", + "contributors": [ + "matheusbsilva137", + "web-flow", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24930", + "title": "[FIX] SAML Force name to string", + "userLogin": "geekgonecrazy", + "milestone": "4.5.4", + "contributors": [ + "geekgonecrazy", + "web-flow", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24908", + "title": "Regression: Call doesn't stop ringing after agent unregistration", + "userLogin": "MartinSchoeler", + "milestone": "4.6.0", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24920", + "title": "Regression: Fix account service login expiration", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24867", + "title": "[FIX] Duplicated \"jump to message\" button on starred messages", + "userLogin": "Himanshu664", + "contributors": [ + "Himanshu664" + ] + }, + { + "pr": "24860", + "title": "[FIX] External search providers not working", + "userLogin": "tkurz", + "contributors": [ + "tkurz" + ] + } + ] + }, + "4.6.0-rc.2": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "24955", + "title": "[FIX] room message not load when is a new message", + "userLogin": "filipemarins", + "description": "When the room object is searched for the first time, it does not exist on the front object yet (subscription), adding a fallback search for room list will guarantee to search the room details.\r\n\r\nbefore:\r\nhttps://user-images.githubusercontent.com/9275105/160223241-d2319f3e-82c5-47d6-867f-695ab2361a17.mp4\r\n\r\nafter:\r\nhttps://user-images.githubusercontent.com/9275105/160223244-84d0d2a1-3d95-464d-8b8a-e264b0d4d690.mp4", + "milestone": "4.5.5", + "contributors": [ + "filipemarins", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24969", + "title": "Chore: Storybook mocking and examples improved", + "userLogin": "tassoevan", + "description": "- Stories from `ee/` included;\r\n- Differentiate root story kinds;\r\n- Mocking of `ServerContext` via Storybook parameters.", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24990", + "title": "Chore: Update Livechat", + "userLogin": "MartinSchoeler", + "milestone": "4.5.5", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24897", + "title": "[FIX] Room archived/unarchived system messages aren't sent when editing room settings", + "userLogin": "matheusbsilva137", + "description": "- Send the \"Room archived\" and \"Room unarchived\" system messages when editing room settings (and not only when rooms are archived/unarchived with the slash-command);\r\n- Fix the \"Hide System Messages\" option for the \"Room archived\" and \"Room unarchived\" system messages;", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "24925", + "title": "Chore: add some missing REST definitions", + "userLogin": "gerzonc", + "description": "On the [mobile client](https://github.com/RocketChat/Rocket.Chat.ReactNative), we made an effort to collect more `REST API` definitions that are missing on the server side during our migration to TypeScript. Since we're both migrating to TypeScript, we thought it would be a good idea to share those so you guys can benefit from our initiative.", + "contributors": [ + "gerzonc" + ] + }, + { + "pr": "24971", + "title": "i18n: Language update from LingoHub 🤖 on 2022-03-28Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null + ] + }, + { + "pr": "24921", + "title": "[FIX] Register with Secret URL", + "userLogin": "yash-rajpal", + "contributors": [ + "yash-rajpal" + ] + }, + { + "pr": "24948", + "title": "Regression: Fix unexpected errors breaking ddp-streamer", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + } + ] + }, + "4.6.0-rc.3": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "24994", + "title": "[FIX] High CPU usage caused by CallProvider", + "userLogin": "tiagoevanp", + "description": "Remove infinity loop inside useVoipClient hook.\r\n\r\n#closes #24970", + "milestone": "4.5.5", + "contributors": [ + "ggazzo", + "tiagoevanp" + ] + } + ] + }, + "4.5.5": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "24998", + "title": "Release 4.5.5", + "userLogin": "sampaiodiego", + "contributors": [ + "MartinSchoeler", + "sampaiodiego", + "filipemarins", + "tiagoevanp" + ] + }, + { + "pr": "24994", + "title": "[FIX] High CPU usage caused by CallProvider", + "userLogin": "tiagoevanp", + "description": "Remove infinity loop inside useVoipClient hook.\r\n\r\n#closes #24970", + "milestone": "4.5.5", + "contributors": [ + "ggazzo", + "tiagoevanp" + ] + }, + { + "pr": "24955", + "title": "[FIX] Multiple issues starting a new DM", + "userLogin": "filipemarins", + "description": "When the room object is searched for the first time, it does not exist on the front object yet (subscription), adding a fallback search for room list will guarantee to search the room details.\r\n\r\nbefore:\r\nhttps://user-images.githubusercontent.com/9275105/160223241-d2319f3e-82c5-47d6-867f-695ab2361a17.mp4\r\n\r\nafter:\r\nhttps://user-images.githubusercontent.com/9275105/160223244-84d0d2a1-3d95-464d-8b8a-e264b0d4d690.mp4", + "milestone": "4.5.5", + "contributors": [ + "filipemarins", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24990", + "title": "Chore: Update Livechat", + "userLogin": "MartinSchoeler", + "milestone": "4.5.5", + "contributors": [ + "MartinSchoeler" + ] + } + ] + }, + "4.6.0-rc.4": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25017", + "title": "Regression: Add createdOTR index", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25015", + "title": "Chore: Bump Fuselage packages", + "userLogin": "dougfabris", + "description": "It uses the last stable version of Fuselage packages.", + "milestone": "4.6.0", + "contributors": [ + "dougfabris", + "tassoevan" + ] + }, + { + "pr": "24999", + "title": "Regression: Custom roles displaying ID instead of name on some admin screens", + "userLogin": "pierre-lehnen-rc", + "description": "![image](https://user-images.githubusercontent.com/55164754/160981416-555bcaa1-c075-4260-937c-64523472da43.png)\r\n![image](https://user-images.githubusercontent.com/55164754/160981452-6eae4e74-8425-4073-8256-472aba72b9db.png)", + "milestone": "4.6.0", + "contributors": [ + "pierre-lehnen-rc", + "dougfabris", + "web-flow" + ] + }, + { + "pr": "24835", + "title": "[NEW] Upgrade Tab", + "userLogin": "gabriellsh", + "description": "![image](https://user-images.githubusercontent.com/27704687/160172260-c656282e-a487-4092-948d-d11c9bacb598.png)", + "milestone": "4.6.0", + "contributors": [ + "gabriellsh", + "dougfabris", + "web-flow", + "tassoevan", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24980", + "title": "Regression: Error is raised when there's no Asterisk queue available yet", + "userLogin": "amolghode1981", + "milestone": "4.7.0", + "contributors": [ + "amolghode1981" + ] + } + ] + }, + "4.6.0-rc.5": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25021", + "title": "Bump @rocket.chat/emitter from 0.31.4 to 0.31.9 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25020", + "title": "Bump @rocket.chat/ui-kit from 0.31.4 to 0.31.9 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25019", + "title": "Bump @rocket.chat/message-parser from 0.31.4 to 0.31.9 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25018", + "title": "Bump @rocket.chat/string-helpers from 0.31.4 to 0.31.9 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + } + ] + }, + "4.6.0": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [] + }, + "4.6.1": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25022", + "title": "[FIX] Proxy settings being ignored", + "userLogin": "pierre-lehnen-rc", + "description": "Modify Meteor's `HTTP.call` to add back proxy support", + "milestone": "4.6.1", + "contributors": [ + "pierre-lehnen-rc", + "sampaiodiego" + ] + }, + { + "pr": "25082", + "title": "[FIX] Invitation links don't redirect to the registration form", + "userLogin": "yash-rajpal", + "milestone": "4.6.1", + "contributors": [ + "yash-rajpal" + ] + }, + { + "pr": "25069", + "title": "[FIX] FormData uploads not working", + "userLogin": "gabriellsh", + "milestone": "4.6.1", + "contributors": [ + "gabriellsh", + "dougfabris" + ] + }, + { + "pr": "25067", + "title": "[FIX] NPS never finishing sending results", + "userLogin": "sampaiodiego", + "milestone": "4.6.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25050", + "title": "[FIX] Upgrade Tab showing for a split second", + "userLogin": "gabriellsh", + "milestone": "4.6.1", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25055", + "title": "[FIX] UserAutoComplete not rendering UserAvatar correctly", + "userLogin": "dougfabris", + "description": "### before\r\n![Screen Shot 2022-04-04 at 16 50 21](https://user-images.githubusercontent.com/27704687/161620921-800bf66a-806d-4f83-b2e1-073c34215001.png)\r\n\r\n### after\r\n![Screen Shot 2022-04-04 at 16 49 00](https://user-images.githubusercontent.com/27704687/161620720-3e27774d-c241-46ca-b764-932a9295d709.png)", + "milestone": "4.6.1", + "contributors": [ + "dougfabris" + ] + } + ] + }, + "4.4.3": { + "node_version": "14.18.2", + "npm_version": "6.14.15", + "apps_engine_version": "1.30.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25022", + "title": "[FIX] Proxy settings being ignored", + "userLogin": "pierre-lehnen-rc", + "description": "Modify Meteor's `HTTP.call` to add back proxy support", + "milestone": "4.6.1", + "contributors": [ + "pierre-lehnen-rc", + "sampaiodiego" + ] + }, + { + "pr": "25067", + "title": "[FIX] NPS never finishing sending results", + "userLogin": "sampaiodiego", + "milestone": "4.6.1", + "contributors": [ + "sampaiodiego" + ] + } + ] + }, + "4.5.6": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25022", + "title": "[FIX] Proxy settings being ignored", + "userLogin": "pierre-lehnen-rc", + "description": "Modify Meteor's `HTTP.call` to add back proxy support", + "milestone": "4.6.1", + "contributors": [ + "pierre-lehnen-rc", + "sampaiodiego" + ] + }, + { + "pr": "25067", + "title": "[FIX] NPS never finishing sending results", + "userLogin": "sampaiodiego", + "milestone": "4.6.1", + "contributors": [ + "sampaiodiego" + ] + } + ] + }, + "4.6.2": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25101", + "title": "[FIX] Database indexes not being created", + "userLogin": "sampaiodiego", + "milestone": "4.6.2", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24933", + "title": "[FIX] Deactivating user breaks if user is the only room owner", + "userLogin": "sidmohanty11", + "description": "## Before\r\n\r\nhttps://user-images.githubusercontent.com/73601258/160000871-cfc2f2a5-2a59-4d27-8049-7754d003dd48.mp4\r\n\r\n\r\n\r\n## After\r\nhttps://user-images.githubusercontent.com/73601258/159998287-681ab475-ff33-4282-82ff-db751c59a392.mp4", + "milestone": "4.6.2", + "contributors": [ + "sidmohanty11", + "sampaiodiego" + ] + } + ] + }, + "4.6.3": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "apps_engine_version": "1.31.0", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25220", + "title": "[FIX] Desktop notification on multi-instance environments", + "userLogin": "sampaiodiego", + "milestone": "4.6.3", + "contributors": [ + "sampaiodiego" + ] + } + ] + }, + "4.7.0-rc.0": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25286", + "title": "Chore: Add root package.json to houston files", + "userLogin": "d-gubert", + "description": "See title", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25284", + "title": "Chore: Sync with master", + "userLogin": "d-gubert", + "contributors": [ + "sampaiodiego", + "d-gubert", + "web-flow" + ] + }, + { + "pr": "25269", + "title": "Chore: Minor dependency updates", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "25224", + "title": "Chore: Add yarn plugin to check node and yarn version", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25280", + "title": "Chore: Remove package-lock.json from houston files", + "userLogin": "d-gubert", + "description": "Houston config in the `package.json` file still mentioned `package-lock.json`, but it doesn't exist anymore", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25260", + "title": "[FIX] Adjust email label in Setup Wizard i18n files", + "userLogin": "guijun13", + "description": "- remove 'Company' label on onboarding email keys in certain languages", + "contributors": [ + "guijun13" + ] + }, + { + "pr": "25275", + "title": "Chore: Fix return type warnings", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "23870", + "title": "[NEW] Expand Apps Engine's environment variable allowed list", + "userLogin": "cuonghuunguyen", + "milestone": "4.7.0", + "contributors": [ + null, + "debdutdeb", + "web-flow", + "cuonghuunguyen", + "dougfabris" + ] + }, + { + "pr": "25273", + "title": "Regression: Fix federation Matrix bridge startup", + "userLogin": "sampaiodiego", + "milestone": "4.7.0", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25092", + "title": "[FIX] Message preview not available for queued chats", + "userLogin": "murtaza98", + "milestone": "4.7.0", + "contributors": [ + "murtaza98", + "KevLehman" + ] + }, + { + "pr": "23688", + "title": "[NEW] Alpha Matrix Federation", + "userLogin": "alansikora", + "description": "Experimental support for Matrix Federation with a Bridge\r\n\r\nhttps://user-images.githubusercontent.com/51996/164530391-e8b17ecd-a4d0-4ef8-a8b7-81230c1773d3.mp4", + "milestone": "4.7.0", + "contributors": [ + "alansikora", + "geekgonecrazy", + "MarcosSpessatto", + "rodrigok" + ] + }, + { + "pr": "25259", + "title": "Chore: Bump Fuselage packages", + "userLogin": "dougfabris", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25261", + "title": "[FIX] Incorrect websocket url in livechat widget", + "userLogin": "debdutdeb", + "milestone": "4.7.0", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "25007", + "title": "[FIX] Showing Blank Message Inside Report", + "userLogin": "nishant23122000", + "description": "https://user-images.githubusercontent.com/53515714/161038085-4a86c7ae-6751-4996-9767-b1c9e0331a6c.mp4", + "contributors": [ + "nishant23122000" + ] + }, + { + "pr": "25251", + "title": "Regression: Add select message to system message and thread preview and allow select on legacy template", + "userLogin": "filipemarins", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "ggazzo", + "web-flow", + "gabriellsh", + "dougfabris" + ] + }, + { + "pr": "25239", + "title": "[FIX] Add katex render to new message react template", + "userLogin": "filipemarins", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "ggazzo", + "dougfabris" + ] + }, + { + "pr": "25257", + "title": "Chore: Update Livechat to the last version", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24515", + "title": "[FIX] Custom sound error toast messages", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "dougfabris" + ] + }, + { + "pr": "25211", + "title": "Regression: Avatar not loading on first direct message", + "userLogin": "filipemarins", + "description": "fix avatar not loading on a first direct message", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "ggazzo" + ] + }, + { + "pr": "25254", + "title": "Regression: Show username and real name on the message system", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25217", + "title": "[IMPROVE] Performance for some Omnichannel features", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25200", + "title": "[FIX] room creation fails if app framework is disabled", + "userLogin": "debdutdeb", + "milestone": "4.7.0", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "24565", + "title": "[IMPROVE] Add OTR Room States", + "userLogin": "yash-rajpal", + "description": "Earlier OTR room uses only 2 states, we need more states to support future features. \r\nThis adds more states for the OTR contextualBar.\r\n\r\n- Expired\r\n\"Screen\r\n\r\n- Declined\r\nScreen Shot 2022-04-20 at 13 49 28\r\n\r\n- Error\r\n\"Screen", + "milestone": "4.7.0", + "contributors": [ + "yash-rajpal", + "dougfabris" + ] + }, + { + "pr": "25170", + "title": "[FIX] Client disconnection on network loss", + "userLogin": "amolghode1981", + "description": "Agent gets disconnected (or Unregistered) from asterisk in multiple ways. The goal is that agent should remain online\r\nunless agent explicitly logs off.\r\nAgent can stop receiving calls in multiple ways due to network loss. Network loss can happen in following ways.\r\n1. User tries to switch the network. User experiences a glitch of disconnectivity. This can be simulated by turning the network off\r\nin the network tab of chrome's dev tool. This can disconnect the UA if the disconnection happens just before the registration refresh.\r\n2. Second reason is when computer goes in sleep mode.\r\n3. Third reason is that when asterisk is crashed/in maintenance mode/explicitly stopped.\r\n\r\nSolution:\r\nThe idea is to detect the network disconnection and start the start the attempts to reconnect.\r\nThe detection of the disconnection does not happen in case#1. The SIPUA's UserAgent transport does not\r\ncall onDisconnected when network loss of such kind happens. To tackle this problem, window's online and offline event handlers are\r\nused.\r\n\r\nThe number of retries is configurable but ideally it is to be kept at -1. Whenever disconnection happens, it should keep on trying to\r\nreconnect with increasing backoff time. This behaviour is useful when the asterisk is stopped.\r\n\r\nWhen the server is disconnected, it should be indicated on the phone button.", + "contributors": [ + "amolghode1981", + "KevLehman" + ] + }, + { + "pr": "25244", + "title": "[FIX] Read receipts show with color gray when not read yet", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25230", + "title": "[FIX] VoIP disabled/enabled sequence puts voip agent in error state", + "userLogin": "amolghode1981", + "description": "Initially it was thought that the issue occurs because of the race condition while changing the client settings vs those settings reflected on server side. So a natural solution to solve this is to wait for setting change event 'private-settings-changed'. Then if 'VoIP_Enabled' is updated and it is true, set voipEnabled to true in useVoipClient.ts (on client side)\r\n\r\nIt was realised that the race does not happen because of the database or server noticing the changes late. But because of the time taken to establish the AMI connection with Asterisk.\r\n\r\nSolution:\r\n\r\n1. Change apps/meteor/app/voip/server/startup.ts. When VoIP_Enabled is changed, await for Voip.init() to complete and then broadcast connector.statuschanged with changed value.\r\n2. From apps/meteor/server/modules/listeners/listeners.module.ts use notifyLoggedInThisInstance to notify all logged in users on current instance.\r\n3. in apps/meteor/client/providers/CallProvider/hooks/useVoipClient.ts add the event handler that receives this event. Change voipEnabled from constant to state. Change this state based on the 'value' that is received by the handler.", + "contributors": [ + "amolghode1981", + "KevLehman" + ] + }, + { + "pr": "25087", + "title": "[NEW] Add expire index to integration history", + "userLogin": "geekgonecrazy", + "milestone": "4.7.0", + "contributors": [ + "geekgonecrazy" + ] + }, + { + "pr": "24521", + "title": "Chore: update OTR icon", + "userLogin": "kibonusp", + "description": "I changed the shredder icon in OTR contextual bar to the stopwatch icon, recently added to the fuselage.", + "milestone": "4.7.0", + "contributors": [ + "kibonusp", + "yash-rajpal", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "25237", + "title": "[FIX] Toolbox hiding under contextual bar", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25231", + "title": "[IMPROVE] Added MaxNickNameLength and MaxBioLength constants", + "userLogin": "aakash-gitdev", + "contributors": [ + "aakash-gitdev", + "web-flow", + "gabriellsh" + ] + }, + { + "pr": "25220", + "title": "[FIX] Desktop notification on multi-instance environments", + "userLogin": "sampaiodiego", + "milestone": "4.6.3", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25175", + "title": "[FIX] Reply button behavior on broadcast channel", + "userLogin": "filipemarins", + "description": "Hide reply button for the user that sent the message", + "contributors": [ + "filipemarins", + "web-flow" + ] + }, + { + "pr": "25216", + "title": "[FIX] Read receipts showing before message read", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25222", + "title": "[FIX] Add reaction not working in legacy messages", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25223", + "title": "Chore: Add error boundary to message component", + "userLogin": "gabriellsh", + "description": "Not crash the whole application if something goes wrong in the MessageList component.\r\n\r\n![image](https://user-images.githubusercontent.com/40830821/162269915-931c5c3c-c979-4234-b74c-371f67467ce0.png)", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25130", + "title": "Chore: Update Livechat version", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "25073", + "title": "[FIX] AgentOverview analytics wrong departmentId parameter", + "userLogin": "paulobernardoaf", + "description": "When filtering the analytics charts by department, data would not appear because the object:\r\n```js\r\n{\r\n value: \"department-id\",\r\n label: \"department-name\"\r\n}\r\n```\r\nwas being used in the `departmentId` parameter.\r\n\r\n- Before:\r\n![image](https://user-images.githubusercontent.com/30026625/161832057-d96ffd21-a7dd-421e-bfaa-3b9f4a9127b2.png)\r\n\r\n- After:\r\n![image](https://user-images.githubusercontent.com/30026625/161831092-9ee77b51-b083-4f45-9c48-ab2e0511c4d6.png)", + "milestone": "4.7.0", + "contributors": [ + "paulobernardoaf" + ] + }, + { + "pr": "25056", + "title": "[FIX] Close room when dismiss wrap up call modal", + "userLogin": "tiagoevanp", + "milestone": "4.7.0", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "25208", + "title": "Regression: yarn dev triggers build dependencies", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "24714", + "title": "[FIX] Added invalid password error message", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "dougfabris" + ] + }, + { + "pr": "25196", + "title": "Chore: Tests with Playwright (task: ROC-28, 09-channels)", + "userLogin": "tmontini", + "contributors": [ + "tmontini" + ] + }, + { + "pr": "25174", + "title": "Chore: Template to generate packages", + "userLogin": "ggazzo", + "description": "```\r\nnpx hygen package new test\r\n```", + "contributors": [ + "ggazzo", + "web-flow", + "sampaiodiego" + ] + }, + { + "pr": "25193", + "title": "Regression: Fix micro services Docker build", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25180", + "title": "Chore: Remove duplicated useUserRoom", + "userLogin": "dougfabris", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25167", + "title": "Chore: TS migration SortList", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "24933", + "title": "[FIX] Deactivating user breaks if user is the only room owner", + "userLogin": "sidmohanty11", + "description": "## Before\r\n\r\nhttps://user-images.githubusercontent.com/73601258/160000871-cfc2f2a5-2a59-4d27-8049-7754d003dd48.mp4\r\n\r\n\r\n\r\n## After\r\nhttps://user-images.githubusercontent.com/73601258/159998287-681ab475-ff33-4282-82ff-db751c59a392.mp4", + "milestone": "4.6.2", + "contributors": [ + "sidmohanty11", + "sampaiodiego" + ] + }, + { + "pr": "25181", + "title": "Regression: Fix services Docker build on CI", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25089", + "title": "[FIX] UserCard sanitization", + "userLogin": "dougfabris", + "description": "- Rewrites the component to TS\r\n- Fixes some visual issues\r\n\r\n### before\r\n![Screen Shot 2022-04-07 at 00 23 11](https://user-images.githubusercontent.com/27704687/162113925-5c9484d1-23e9-4623-8b86-3fbc71b461a1.png)\r\n\r\n### after\r\n![Screen Shot 2022-04-07 at 00 07 13](https://user-images.githubusercontent.com/27704687/162112353-afd6aac6-b27c-4470-a642-631b8080d59e.png)", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25085", + "title": "Chore: move definitions to packages", + "userLogin": "ggazzo", + "milestone": "3.7.0", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25168", + "title": "Regression: CI playwright", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25125", + "title": "Chore: Convert NotificationStatus to TS", + "userLogin": "jeanfbrito", + "contributors": [ + "jeanfbrito", + "ggazzo" + ] + }, + { + "pr": "25148", + "title": "[FIX] Message menu action not working on legacy messages.", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25122", + "title": "Chore: Tests with Playwright (task: All works)", + "userLogin": "weslley543", + "contributors": [ + "weslley543" + ] + }, + { + "pr": "25129", + "title": "Chore: Remove old files from removed Omnichannel feature", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25128", + "title": "Chore: Convert admin custom sound to tsx", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25126", + "title": "Chore: Migrate oauth2server to typescript", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25123", + "title": "Chore: Convert LivechatAgentActivity to raw model and TS", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25124", + "title": "Chore: Remove unused Drone CI files", + "userLogin": "geekgonecrazy", + "contributors": [ + "geekgonecrazy", + "web-flow" + ] + }, + { + "pr": "25121", + "title": "Chore: Convert Mailer to TS", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti", + "sampaiodiego" + ] + }, + { + "pr": "25107", + "title": "Regression: Fix CI monorepo build", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25074", + "title": "Chore: Monorepo ", + "userLogin": "ggazzo", + "milestone": "3.7.0", + "contributors": [ + "sampaiodiego", + "ggazzo" + ] + }, + { + "pr": "25097", + "title": "[IMPROVE] Rename upgrade tab routes", + "userLogin": "guijun13", + "description": "Change 'upgrade tab' routes names from camelCase ('goFullyFeatured') to kebab-case ('go-fully-featured') due to URL naming consistency. Changed types, main function and test.", + "contributors": [ + "guijun13" + ] + }, + { + "pr": "25076", + "title": "Bump eslint-plugin-anti-trojan-source from 1.0.6 to 1.1.0", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24936", + "title": "[FIX] End call button disappearing when on-hold", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24932", + "title": "[FIX] Use correct room property for call ended at", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "25022", + "title": "[FIX] Proxy settings being ignored", + "userLogin": "pierre-lehnen-rc", + "description": "Modify Meteor's `HTTP.call` to add back proxy support", + "milestone": "4.6.1", + "contributors": [ + "pierre-lehnen-rc", + "sampaiodiego" + ] + }, + { + "pr": "25082", + "title": "[FIX] Invitation links don't redirect to the registration form", + "userLogin": "yash-rajpal", + "milestone": "4.6.1", + "contributors": [ + "yash-rajpal" + ] + }, + { + "pr": "23971", + "title": "[NEW] Message Template React Component", + "userLogin": "ggazzo", + "description": "Complete rewrite of the messages component in react. Visual changes should be minimal as well as user impact, with no break changes (unless you've customized the blaze template).\r\n\r\n\r\n\r\n![Screen Shot 2022-04-05 at 11 14 18](https://user-images.githubusercontent.com/27704687/161774027-38dd9c7b-eeeb-45e2-b9d8-ea2a9be8486d.png)\r\nIn case you encounter any problems, or want to compare, temporarily it is possible to use the old version\r\n\r\n\"image\"", + "contributors": [ + "ggazzo", + "sampaiodiego" + ] + }, + { + "pr": "25069", + "title": "[FIX] FormData uploads not working", + "userLogin": "gabriellsh", + "milestone": "4.6.1", + "contributors": [ + "gabriellsh", + "dougfabris" + ] + }, + { + "pr": "19866", + "title": "[FIX] Video and Audio not skipping forward", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler", + "tassoevan", + "web-flow", + "dougfabris" + ] + }, + { + "pr": "25067", + "title": "[FIX] NPS never finishing sending results", + "userLogin": "sampaiodiego", + "milestone": "4.6.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24405", + "title": "[IMPROVE] Add tooltip to sidebar room menu", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "web-flow", + "dougfabris" + ] + }, + { + "pr": "24431", + "title": "[IMPROVE] Added tooltip options for message menu", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "dougfabris" + ] + }, + { + "pr": "24166", + "title": "[FIX] Replace encrypted text to Encrypted Message Placeholder", + "userLogin": "yash-rajpal", + "description": "### before \r\n![image](https://user-images.githubusercontent.com/27704687/150807900-154a9cdb-ee13-4333-8628-f287ab914b40.png)\r\n\r\n### after\r\n\"Screenshot", + "milestone": "4.7.0", + "contributors": [ + "yash-rajpal", + "albuquerquefabio", + "web-flow" + ] + }, + { + "pr": "24984", + "title": "[FIX] Prevent sequential messages edited icon to hide on hover", + "userLogin": "dougfabris", + "description": "### before\r\n\"Screen\r\n\r\n### after\r\n\"Screen", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25024", + "title": "[IMPROVE] Improve active/hover colors in account sidebar", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664" + ] + }, + { + "pr": "24856", + "title": "[FIX] Full error message is visible", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "tassoevan" + ] + }, + { + "pr": "24708", + "title": "Chore: Cancel running jobs if PR is updated", + "userLogin": "debdutdeb", + "contributors": [ + "debdutdeb", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24900", + "title": "Chore: organize test files and fix code coverage", + "userLogin": "tmontini", + "contributors": [ + null, + "tmontini", + "rodrigok" + ] + }, + { + "pr": "24464", + "title": "Chore: Missing keys in APIsDisplay", + "userLogin": "dougfabris", + "milestone": "4.7.0", + "contributors": [ + "dougfabris", + "tassoevan" + ] + }, + { + "pr": "25057", + "title": "Bump ejson from 2.2.1 to 2.2.2", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25053", + "title": "Chore: Remove Alpine image deps after using them", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25052", + "title": "Bump pino and pino-pretty", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25050", + "title": "[FIX] Upgrade Tab showing for a split second", + "userLogin": "gabriellsh", + "milestone": "4.6.1", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25055", + "title": "[FIX] UserAutoComplete not rendering UserAvatar correctly", + "userLogin": "dougfabris", + "description": "### before\r\n![Screen Shot 2022-04-04 at 16 50 21](https://user-images.githubusercontent.com/27704687/161620921-800bf66a-806d-4f83-b2e1-073c34215001.png)\r\n\r\n### after\r\n![Screen Shot 2022-04-04 at 16 49 00](https://user-images.githubusercontent.com/27704687/161620720-3e27774d-c241-46ca-b764-932a9295d709.png)", + "milestone": "4.6.1", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25031", + "title": "Chore: TS conversion folder client", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "24991", + "title": "Bump minimist from 1.2.5 to 1.2.6 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25002", + "title": "Bump template-file from 6.0.0 to 6.0.1", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25042", + "title": "Bump body-parser from 1.19.2 to 1.20.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25043", + "title": "i18n: Language update from LingoHub 🤖 on 2022-04-04Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null + ] + }, + { + "pr": "25028", + "title": "Merge master into develop & Set version to 4.7.0-develop", + "userLogin": "sampaiodiego", + "contributors": [ + "AllanPazRibeiro", + "sampaiodiego", + "web-flow" + ] + } + ] + }, + "4.7.0-rc.1": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25305", + "title": "Regression: eslint not running on packages", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "ggazzo" + ] + }, + { + "pr": "25299", + "title": "Regression: Add `isPending` status to message", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25301", + "title": "Regression: Shows error if micro service cannot connect to Mongo", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25287", + "title": "Regression: Use exact Node version on micro services Docker images", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + } + ] + }, + "4.7.0-rc.2": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25319", + "title": "Regression: Fix the alpine image and dev UX installing matrix-rust-sdk-bindings", + "userLogin": "geekgonecrazy", + "description": "The package only included a few pre-built which caused all macs to have to compile every time they installed and also caused our alpine not to work.\r\n\r\nThis temporarily switches to a fork of the matrix-appservice-bridge package.\r\n\r\nMade changes to one of its child dependencies `matrix-rust-sdk-bindings` that adds pre-built binaries for mac and musl (for alpine).", + "milestone": "4.7.0", + "contributors": [ + "geekgonecrazy", + "web-flow", + "d-gubert" + ] + }, + { + "pr": "25255", + "title": "Regression: Change preference to be default legacy messages", + "userLogin": "gabriellsh", + "milestone": "4.8.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25306", + "title": "Regression: Fix reply button not working when hideFlexTab is enabled", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25311", + "title": "Regression: Add eslint package to micro services Dockerfile", + "userLogin": "sampaiodiego", + "milestone": "4.7.0", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25218", + "title": "Chore: ensure scripts use cross-env and ignore some dirs (ROC-54)", + "userLogin": "souzaramon", + "description": "- data and test-failure should be ignored\r\n- ensure scripts use cross-env", + "contributors": [ + "souzaramon" + ] + }, + { + "pr": "25313", + "title": "Regression: Revert Bugsnag version", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + } + ] + }, + "4.7.0-rc.3": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25327", + "title": "Regression: Messages in new message template Crashing.", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25323", + "title": "Regression: Better MongoDB connection management for micro services", + "userLogin": "sampaiodiego", + "milestone": "4.7.0", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25250", + "title": "Regression: Validate empty fields for Message template", + "userLogin": "gabriellsh", + "milestone": "4.8.0", + "contributors": [ + "gabriellsh" + ] + } + ] + }, + "4.7.0-rc.4": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25336", + "title": "Chore: Add options to debug stdout and rate limiter", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25368", + "title": "Regression: Fix English i18n react text", + "userLogin": "d-gubert", + "description": "Incorrect text in reaction tooltip has been fixed", + "milestone": "4.7.0", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25349", + "title": "Regression: Rocket.Chat Webapp not loading.", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "gabriellsh" + ] + }, + { + "pr": "25317", + "title": "Regression: Fix multi line is not showing an empty line between lines", + "userLogin": "filipemarins", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25320", + "title": "Regression: bump onboarding-ui version", + "userLogin": "guijun13", + "description": "- Bump to 'next' the onboarding-ui package from fuselage.\r\n- Update from 'companyEmail' to 'email' adminData usage types", + "contributors": [ + "guijun13" + ] + }, + { + "pr": "25335", + "title": "Chore: Create README.md for Rest Typings", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + } + ] + }, + "4.7.0-rc.5": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25380", + "title": "Regression: Fix clicking on visitor's chat in the sidebar does not display the chat window", + "userLogin": "filipemarins", + "description": "Fix: livechat room not opening.", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25314", + "title": "Regression: Fix size of custom emoji and render emoji on thread message preview", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25371", + "title": "Chore: Bump fuselage", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + } + ] + }, + "4.7.0": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [] + }, + "4.8.0-rc.0": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25617", + "title": "Chore: Update Apps-Engine version", + "userLogin": "d-gubert", + "milestone": "4.8.0", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25616", + "title": "[FIX] Message menu dropdown not working on Mobile Web", + "userLogin": "gabriellsh", + "milestone": "4.8.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25615", + "title": "[FIX] Fixing app contextual bar functionality", + "userLogin": "AllanPazRibeiro", + "milestone": "4.8.0", + "contributors": [ + "AllanPazRibeiro" + ] + }, + { + "pr": "25499", + "title": "[NEW] New button for network outage", + "userLogin": "amolghode1981", + "description": "When network outage happens it should be conveyed to the user with special icon. This icon should not be clickable.\r\nNetwork outage handling is handled in https://app.clickup.com/t/245c0d8 task.", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24711", + "title": "[NEW] Marketplace new app details page", + "userLogin": "rique223", + "description": "Change the app details page layout for the new marketplace UI. General Task: [MKP12 - New UI - App Detail Page](https://app.clickup.com/t/1na769h)\r\n\r\n## [MKP12 - Tab Navigation](https://app.clickup.com/t/2452f5u)\r\nNew tab navigation layout for the app details page. Now the app details page is divided into three sections, details, logs, and settings, that can each be accessed through a Tabs fuselage component.\r\n\r\nDemo gif:\r\n![tab_navigation_demo_gif](https://user-images.githubusercontent.com/43561537/157276436-3dab34c5-20da-4f5d-99d0-54c1c718ac1f.gif)\r\n\r\n## [MKP12 - Header](https://app.clickup.com/t/25rhm0x)\r\nImplemented a new header for the marketplaces app details page.\r\n-Changed the size of the app name;\r\n-Implemented the app description field on the header;\r\n-Changed the \"metadata\" section of the header(The part with the version and author information) now it also shows the last time the app was updated;\r\n-Created a chip that will show when an app is part of one or more bundles and inform which are the bundles;\r\n-Implemented a tooltip for the bundle chips;\r\n-Created a new button + data badge component to substitute the current App Status;\r\n-Changed the title of the \"purchase button\". Now it shows different text based on the \"purchase type\" of the app;\r\n-Created a new Pricing & Status display which shows the price when the app is not bought/installed and shows the app status(Enabled/Disabled) when it is bought/installed;\r\n-Changed the way the tabs are rendered, now if the app is not installed(and consequently doesn't have logs and settings tab) it will not render these tabs;\r\n\r\nDemo gif:\r\n![new-header-gif](https://user-images.githubusercontent.com/43561537/159064599-fd64dfe2-86a3-47da-81ba-1e83f1b87432.gif)\r\n\r\n## [MKP12 - Configuration Tab](https://app.clickup.com/t/2452gh4)\r\nDelivered together with the tab-navigation task. Changed the app settings from the details of the app to the new settings tab.\r\nDemo image:\r\n![New configuration tab](https://user-images.githubusercontent.com/43561537/160211324-95db0566-85bf-4dde-a814-3c6f23dcee4d.png)\r\n\r\n## [MKP12 - Log Tab](https://app.clickup.com/t/2452gg1)\r\nChanged the place of the app logs from the page to the new logs tab. Also changed some styles of the logs accordions to fit better with the new container.\r\n\r\nBefore:\r\n![Before](https://user-images.githubusercontent.com/43561537/160210302-148ce584-604f-40ff-8209-141667016163.png)\r\n\r\nAfter\r\n![After](https://user-images.githubusercontent.com/43561537/160210984-d4060c5a-f912-4ef9-87e3-fa459080e2d4.png)\r\n\r\n## [MKP12 - Page Header](https://app.clickup.com/t/29b0b12)\r\nChanged the design for the page header of the app details page from a title on the left with a save and back button on the right to a back arrow icon on the left side of the title with the save button still on the right. Also changed the title of the page from App details to Back.\r\nEdit: After some design reconsideration, the page title was changed to App Info.\r\nDemo gif:\r\n![new_page_header_app_details](https://user-images.githubusercontent.com/43561537/160937741-f5514f70-f43b-4400-8b2f-a5a26f95de9d.gif)\r\n\r\n## [MKP12 - Detail Tab](https://app.clickup.com/t/2452gf7)\r\nImplemented markdown on the description section of the app details page, now the description will show the detailedDescription.rendered (as rendered JSX) information in case it exists and show the description (a.k.a. short description) information in case it doesn't. Unfortunately, as of right now no app has a visual example of a markdown description and because of that, I will not be able to provide a demo image/gif for this PR.\r\n\r\n## [MKP12 - Slider Component](https://app.clickup.com/t/2452h26)\r\nCreated an image carousel component on the app details page. This component receives images from the apps/appId/screenshots endpoint and shows them on the content section of the app details of any apps that have screenshots registered, if the app has no screenshots it simply shows nothing where the carousel should be. This component is complete with keyboard arrow navigation on the \"open\" carousel, hover highlight on the carousel preview and close on esc press.\r\nDemo gif:\r\n![new_carousel_component](https://user-images.githubusercontent.com/43561537/167415212-9d8359c7-4132-4afa-a698-8be4ab1e1393.gif)", + "milestone": "4.8.0", + "contributors": [ + "rique223", + "web-flow", + "ggazzo", + "dougfabris" + ] + }, + { + "pr": "25108", + "title": "[IMPROVE] Unify voip streams into single stream", + "userLogin": "KevLehman", + "milestone": "4.8.0", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25444", + "title": "[FIX] Removing user also removes them from Omni collections", + "userLogin": "cauefcr", + "contributors": [ + "cauefcr", + "web-flow", + "KevLehman" + ] + }, + { + "pr": "25398", + "title": "[FIX] Upgrade tab loader in incorrect position", + "userLogin": "guijun13", + "description": "- Add invisible prop to iframe when loading state is active.", + "milestone": "4.8.0", + "contributors": [ + "guijun13", + "tassoevan" + ] + }, + { + "pr": "25436", + "title": "[NEW] Ability for RC server to check the business hour for a specific department", + "userLogin": "murtaza98", + "milestone": "4.8.0", + "contributors": [ + "murtaza98", + "tiagoevanp" + ] + }, + { + "pr": "25606", + "title": "Chore: Code Improvements for #25391", + "userLogin": "MartinSchoeler", + "milestone": "4.8.0", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "25604", + "title": "[FIX] useCurrentChatTags is not a function", + "userLogin": "MartinSchoeler", + "milestone": "4.8.0", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "25535", + "title": "[FIX] Pinned Message display cutting off information", + "userLogin": "hugocostadev", + "milestone": "4.8.0", + "contributors": [ + "hugocostadev", + "gabriellsh" + ] + }, + { + "pr": "25290", + "title": "Chore: Dependencies upgrade", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25605", + "title": "Chore: bump fuselage", + "userLogin": "dougfabris", + "milestone": "4.8.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25457", + "title": "[NEW] Federation (Alpha Stabilization)", + "userLogin": "alansikora", + "milestone": "4.8.0", + "contributors": [ + "alansikora", + "MarcosSpessatto", + "web-flow", + "geekgonecrazy" + ] + }, + { + "pr": "24519", + "title": "Chore: Convert to typescript some functions from app/lib/server/functions", + "userLogin": "eduardofcabrera", + "description": "Convert to typescript some functions from app/lib/server/functions and transfered theses files to server/lib", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25329", + "title": "[NEW] Add option to show mentions badge when show counter is disabled", + "userLogin": "marceloschmidt", + "contributors": [ + "marceloschmidt", + "web-flow", + "ggazzo" + ] + }, + { + "pr": "25391", + "title": "[FIX] Fixing Network connectivity issues with SIP client.", + "userLogin": "amolghode1981", + "description": "The previous PR https://github.com/RocketChat/Rocket.Chat/pull/25170 did not handle the issues completely.\r\nThis PR is expected to handle\r\n1. Clearing call related UI when the network is disconnected or switched.\r\n2. Do clean connectivity. There were few issues discovered in earlier implementation. e.g endpoint would randomly\r\nget disconnected after a while. This was due to the fact that the earlier socket disconnection caused the\r\nremoval of contact on asterisk. This should be fixed in this PR.\r\n3. This PR contains a lot of logs. This will be removed before the final merge.", + "milestone": "4.8.0", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "25494", + "title": "[FIX] Ordered and unordered list styles, Line breaks.", + "userLogin": "gabriellsh", + "description": "Also removed the message.md cache from server, since changes in the parser might break messages in the future (and will in this specific case).", + "milestone": "4.8.0", + "contributors": [ + "gabriellsh", + "tassoevan", + "web-flow" + ] + }, + { + "pr": "25592", + "title": "Chore: Convert slashCommands to typescript", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "25514", + "title": "[NEW] Get user's preferred language via apps", + "userLogin": "murtaza98", + "contributors": [ + "murtaza98", + "d-gubert" + ] + }, + { + "pr": "25383", + "title": "[NEW] Star message, report and delete message events", + "userLogin": "tapiarafael", + "contributors": [ + "tapiarafael", + "d-gubert" + ] + }, + { + "pr": "25234", + "title": "[NEW] Add new events after user login, logout and change his status", + "userLogin": "tapiarafael", + "contributors": [ + "tapiarafael", + "d-gubert" + ] + }, + { + "pr": "25337", + "title": "[NEW] Add new app events for pin, react and follow message", + "userLogin": "tapiarafael", + "contributors": [ + "tapiarafael", + "d-gubert" + ] + }, + { + "pr": "25591", + "title": "Chore: Convert AutoTranslate", + "userLogin": "PedroRorato", + "contributors": [ + "PedroRorato" + ] + }, + { + "pr": "25582", + "title": "Chore: Migrate retention-policy to ts", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24307", + "title": "Chore: Convert to typescript the slash commands help files", + "userLogin": "eduardofcabrera", + "description": "Convert to typescript the slash commands help files", + "contributors": [ + "eduardofcabrera", + "web-flow", + "pierre-lehnen-rc" + ] + }, + { + "pr": "25589", + "title": "Chore: Convert Create Channel", + "userLogin": "juliajforesti", + "contributors": [ + null + ] + }, + { + "pr": "25586", + "title": "Chore: Convert additionalForms", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "MartinSchoeler" + ] + }, + { + "pr": "25425", + "title": "Chore: Rewrite autotranslate to ts", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25165", + "title": "[NEW] Add user events for apps", + "userLogin": "tapiarafael", + "contributors": [ + "tapiarafael", + "d-gubert" + ] + }, + { + "pr": "25283", + "title": "[FIX] Integrations avatar attribute misuse", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25367", + "title": "Chore: Converting orchestrator.js to ts", + "userLogin": "AllanPazRibeiro", + "contributors": [ + "AllanPazRibeiro" + ] + }, + { + "pr": "25504", + "title": "Chore: convert marketplace price display component to use typescript", + "userLogin": "matheuslc", + "description": "**Marketplace apps listing page**\r\n![Screen Shot 2022-05-13 at 12 57 43](https://user-images.githubusercontent.com/4161171/168322189-67990fdf-a447-46dc-8f88-08b16c2a5416.png)\r\n\r\n**Apps detail page**\r\n![Screen Shot 2022-05-13 at 12 58 56](https://user-images.githubusercontent.com/4161171/168322241-505ee5bb-d3d8-4b0e-8757-873a1a65a6a6.png)", + "contributors": [ + "matheuslc" + ] + }, + { + "pr": "25554", + "title": "Chore: Convert apps/meteor/client/components/UserAutoComplete", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti", + "ggazzo" + ] + }, + { + "pr": "25544", + "title": "[FIX] Initial User not added to default channel", + "userLogin": "geekgonecrazy", + "description": "If injecting initial user. The user wasn’t added to the default General channel", + "milestone": "4.7.2", + "contributors": [ + "geekgonecrazy", + "web-flow" + ] + }, + { + "pr": "25078", + "title": "[NEW] New stats rewrite", + "userLogin": "ostjen", + "description": "Add the following new statistics (**metrics**):\r\n\r\n- Total users with TOTP enabled;\r\n- Total users with 2FA enabled;\r\n- Total pinned messages;\r\n- Total starred messages;\r\n- Total email messages;\r\n- Total rooms with at least one starred message;\r\n- Total rooms with at least one pinned message;\r\n- Total encrypted rooms;\r\n- Total link invitations;\r\n- Total email invitations;\r\n- Logo change;\r\n- Number of custom script lines;\r\n- Number of custom CSS lines;\r\n- Number of rooms inside teams;\r\n- Number of default (auto-join) rooms inside teams;\r\n- Number of users created through link invitation;\r\n- Number of users created through manual entry;\r\n- Number of imported users (by import type);", + "contributors": [ + "ostjen", + "matheusbsilva137", + "sampaiodiego" + ] + }, + { + "pr": "25565", + "title": "Chore: Convert apps/meteor/client/views/admin/settings", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti" + ] + }, + { + "pr": "25520", + "title": "[FIX] User abandonment setting was not working doe to failing event hook", + "userLogin": "cauefcr", + "description": "A setting watcher and the query for grabbing abandoned chats were broken, now they're not.", + "milestone": "4.7.2", + "contributors": [ + "cauefcr", + "tiagoevanp" + ] + }, + { + "pr": "25558", + "title": "Test: Migrate 13-permissions from cypress to playwright", + "userLogin": "souzaramon", + "contributors": [ + "souzaramon" + ] + }, + { + "pr": "25445", + "title": "[FIX] Add open user card to user avatar", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25495", + "title": "[FIX] Dynamic load matrix is enabled and handle failure ", + "userLogin": "ggazzo", + "milestone": "4.7.2", + "contributors": [ + "ggazzo", + "geekgonecrazy" + ] + }, + { + "pr": "25409", + "title": "[FIX] One of the triggers was not working correctly", + "userLogin": "MartinSchoeler", + "milestone": "4.7.2", + "contributors": [ + "MartinSchoeler", + "tiagoevanp" + ] + }, + { + "pr": "25555", + "title": "Regression: CI services build", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25381", + "title": "Chore: User set UTC offset", + "userLogin": "albuquerquefabio", + "contributors": [ + "albuquerquefabio", + "web-flow" + ] + }, + { + "pr": "24612", + "title": "[FIX] Rooms' names turn lower case on CSV import", + "userLogin": "guijun13", + "description": "* Change 'Settings' import to not get cached configs\r\n* Remove update `UI_Allow_room_names_with_special_chars` value", + "contributors": [ + "guijun13" + ] + }, + { + "pr": "25542", + "title": "Chore: migrate-to-pw-adjust-in-intermitences", + "userLogin": "weslley543", + "contributors": [ + "weslley543" + ] + }, + { + "pr": "23849", + "title": "[IMPROVE][ENTERPRISE] Allow mapping LDAP groups to multiple RC roles", + "userLogin": "matheusbsilva137", + "description": "- Add support to mapping LDAP groups to multiple roles (by specifying arrays in the \"User Data Group Map\" enterprise setting.", + "contributors": [ + "matheusbsilva137", + "pierre-lehnen-rc" + ] + }, + { + "pr": "25522", + "title": "Chore: Livechat change output level", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25326", + "title": "[NEW] Adding app button on user dropdown", + "userLogin": "AllanPazRibeiro", + "contributors": [ + "AllanPazRibeiro", + "d-gubert", + "web-flow" + ] + }, + { + "pr": "25523", + "title": "Chore: migrate from cypress to pw 14-setting-permission", + "userLogin": "weslley543", + "contributors": [ + "weslley543" + ] + }, + { + "pr": "25253", + "title": "Chore: Tests with Playwright (task: ROC-31, 12-settings)", + "userLogin": "souzaramon", + "contributors": [ + "souzaramon", + "web-flow" + ] + }, + { + "pr": "25462", + "title": "Chore: Migrate 15-message-popup from cypress to playwright", + "userLogin": "souzaramon", + "contributors": [ + "souzaramon" + ] + }, + { + "pr": "25427", + "title": "Chore: Convert apps/meteor/client/views/admin/settings/inputs folder", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti" + ] + }, + { + "pr": "25407", + "title": "[FIX] UI/UX issues on Live Chat widget", + "userLogin": "MartinSchoeler", + "milestone": "4.7.2", + "contributors": [ + "MartinSchoeler", + "dougfabris" + ] + }, + { + "pr": "25348", + "title": "Chore: Convert Admin -> Rooms to TS", + "userLogin": "yash-rajpal", + "contributors": [ + "yash-rajpal", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25509", + "title": "Chore: Migrate NotFoundPage to TS", + "userLogin": "hugocostadev", + "contributors": [ + "hugocostadev" + ] + }, + { + "pr": "25412", + "title": "[FIX] Unable to see channel member list by authorized channel roles", + "userLogin": "hugocostadev", + "contributors": [ + "hugocostadev" + ] + }, + { + "pr": "25519", + "title": "Regression: Fix services-image-build-check", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "25507", + "title": "Chore: Migrate spotify to ts", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25508", + "title": "Chore: Reorder unreleased migrations", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25471", + "title": "[FIX] Spotlight results showing usernames instead of real names", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.7.1", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25434", + "title": "[FIX] LDAP sync removing users from channels when multiple groups are mapped to it", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.7.1", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25413", + "title": "Chore: Move markdown message parser to a `callback`", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25448", + "title": "[FIX] Settings listeners not receiving overwritten values from env vars", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "25246", + "title": "Chore: Move ddp-streamer micro service to its own sub-repo", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25441", + "title": "[NEW] Use setting to determine if initial general channel is needed", + "userLogin": "felipe-menelau", + "description": "- Adds flag responsible for overwriting #general channel creation", + "milestone": "4.7.1", + "contributors": [ + "felipe-menelau", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "25439", + "title": "[IMPROVE] New admin settings Page", + "userLogin": "dougfabris", + "description": "![Screen Shot 2022-05-09 at 11 31 58](https://user-images.githubusercontent.com/27704687/167432811-f4970f23-5dae-48a0-a427-92269d08a859.png)", + "milestone": "4.8.0", + "contributors": [ + "dougfabris", + "ggazzo" + ] + }, + { + "pr": "25473", + "title": "[FIX] Failure to update Integration History index", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25285", + "title": "Chore: Rewrite 2fa to typescript", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25468", + "title": "Chore: solve yarn issues from env var", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25446", + "title": "Chore: REST query and body params validation", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25416", + "title": "Chore: Tests with Playwright (task: ROC-66, Intermittent resolution in tests)", + "userLogin": "weslley543", + "contributors": [ + "weslley543", + "souzaramon" + ] + }, + { + "pr": "25298", + "title": "Chore: Convert email inbox feature to TypeScript", + "userLogin": "ujorgeleite", + "contributors": [ + "ujorgeleite", + "albuquerquefabio", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "25442", + "title": "Chore: Move admin sidebarItems registration to the main file", + "userLogin": "dougfabris", + "milestone": "4.8.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25449", + "title": "[FIX] Sanitize customUserStatus and fix infinite loop", + "userLogin": "dougfabris", + "description": "### Additional improves:\r\n- usage of RHF to avoid unnecessary Add and Edit components separately and form validation\r\n- usage of `GenericTableV2` and some hooks to avoid unnecessary code\r\n- fix `IUserStatus` type\r\n- improves in UI design\r\n- improves **empty** and **loading** state\r\n- improves files structure\r\n\r\n[LOOP ERROR ATTACHMENT]\r\n![Screen Shot 2022-05-09 at 19 42 53](https://user-images.githubusercontent.com/27704687/167510439-1980461c-a885-46d2-9a49-79da432c7521.png)", + "milestone": "4.8.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25318", + "title": "[IMPROVE] Fix multiple bugs with Matrix bridge", + "userLogin": "MarcosSpessatto", + "contributors": [ + "MarcosSpessatto" + ] + }, + { + "pr": "25265", + "title": "Chore: Convert `UserStatusMenu` to TS", + "userLogin": "debdutdeb", + "contributors": [ + "debdutdeb", + "tassoevan" + ] + }, + { + "pr": "25443", + "title": "Chore: Chore add validation option to rest endpoints", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25279", + "title": "Chore: Add channel endpoints (rest-typings)", + "userLogin": "debdutdeb", + "contributors": [ + "debdutdeb", + "ggazzo" + ] + }, + { + "pr": "25432", + "title": "Chore: Dedicated package for UI contexts", + "userLogin": "tassoevan", + "description": "Moving our React contexts to a different package on the monorepo enable us to deliver components from another packages, because they work as a loose connection to the core APIs.", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "25424", + "title": "Chore: Convert RoomForeword, TextCopy and RoomAvatarEditor to TS", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25418", + "title": "Chore: Rewrite action-links to ts", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25421", + "title": "Chore: Rewrite mail-messages to ts", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25430", + "title": "Chore: Convert useUpdateAvatar to TS and type avatar endpoints", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25423", + "title": "[FIX] Change NPS Vote identifier + nps index to unique", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "22374", + "title": "[IMPROVE] Pass allowDiskUse to channel aggregations on engagement dashboard", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25431", + "title": "Chore: Manager Page Rewrite", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler", + "ggazzo" + ] + }, + { + "pr": "25426", + "title": "Chore: Convert useFileInput to TS", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25420", + "title": "Chore: convert info to typescript", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25395", + "title": "Chore: Enable marketplace screenshots endpoint", + "userLogin": "matheuslc", + "contributors": [ + "matheuslc", + "web-flow" + ] + }, + { + "pr": "25312", + "title": "Chore: Add Livechat repo into Monorepo packages", + "userLogin": "tiagoevanp", + "milestone": "4.7.2", + "contributors": [ + "tiagoevanp", + "ggazzo", + "web-flow", + "MartinSchoeler" + ] + }, + { + "pr": "25303", + "title": "Chore: Rewrite Jitsi Contextualbar to TS", + "userLogin": "dougfabris", + "milestone": "4.8.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25372", + "title": "Chore: Convert AdminSideBar to ts", + "userLogin": "jeanfbrito", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25347", + "title": "Chore: Convert push endpoints to TS", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25397", + "title": "Chore: Add client folder to CODEOWNERS ", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25394", + "title": "Chore: Update Volta configuration", + "userLogin": "tassoevan", + "description": "[Volta](https://volta.sh/) need some extra configuration to work on monorepos.", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "25359", + "title": "Chore: Rewrite some Omnichannel files to TypeScript", + "userLogin": "tiagoevanp", + "description": "apps/meteor/client/components/Omnichannel/modals/*\r\napps/meteor/client/components/Omnichannel/Tags.js", + "contributors": [ + "tiagoevanp", + "ggazzo" + ] + }, + { + "pr": "25288", + "title": "Chore: Convert customUserStatus folder to ts", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti" + ] + }, + { + "pr": "25343", + "title": "Chore: Convert federationDashboard folder to ts", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti" + ] + }, + { + "pr": "25252", + "title": "Chore: Tests with Playwright (task: ROC-25, 06-message)", + "userLogin": "weslley543", + "contributors": [ + "weslley543", + "web-flow", + "ggazzo" + ] + }, + { + "pr": "25345", + "title": "Chore: Convert client/views/admin/settings/groups folder to ts", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti" + ] + }, + { + "pr": "25342", + "title": "Chore: Convert getStatistics", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25276", + "title": "Chore: Add typings for /v1/webdav.getMyAccounts", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25274", + "title": "Chore: Convert customSounds folder to ts", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti", + "dougfabris", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25277", + "title": "Chore: Convert Admin/OAuthApps to TS", + "userLogin": "yash-rajpal", + "description": "- Converts Admin/OAuthApps to TS.\r\n- migrated forms to react-hook-form", + "contributors": [ + "yash-rajpal", + "felipe-rod123", + "ggazzo" + ] + }, + { + "pr": "25278", + "title": "Chore: Add /v1/video-conference endpoint types", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "pierre-lehnen-rc", + "ggazzo" + ] + }, + { + "pr": "25380", + "title": "Regression: Fix clicking on visitor's chat in the sidebar does not display the chat window", + "userLogin": "filipemarins", + "description": "Fix: livechat room not opening.", + "milestone": "4.7.0", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25314", + "title": "Regression: Fix size of custom emoji and render emoji on thread message preview", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25371", + "title": "Chore: Bump fuselage", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25336", + "title": "Chore: Add options to debug stdout and rate limiter", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25368", + "title": "Regression: Fix English i18n react text", + "userLogin": "d-gubert", + "description": "Incorrect text in reaction tooltip has been fixed", + "milestone": "4.7.0", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25349", + "title": "Regression: Rocket.Chat Webapp not loading.", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "gabriellsh" + ] + }, + { + "pr": "25317", + "title": "Regression: Fix multi line is not showing an empty line between lines", + "userLogin": "filipemarins", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25320", + "title": "Regression: bump onboarding-ui version", + "userLogin": "guijun13", + "description": "- Bump to 'next' the onboarding-ui package from fuselage.\r\n- Update from 'companyEmail' to 'email' adminData usage types", + "contributors": [ + "guijun13" + ] + }, + { + "pr": "25335", + "title": "Chore: Create README.md for Rest Typings", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25327", + "title": "Regression: Messages in new message template Crashing.", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25323", + "title": "Regression: Better MongoDB connection management for micro services", + "userLogin": "sampaiodiego", + "milestone": "4.7.0", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25250", + "title": "Regression: Validate empty fields for Message template", + "userLogin": "gabriellsh", + "milestone": "4.8.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25319", + "title": "Regression: Fix the alpine image and dev UX installing matrix-rust-sdk-bindings", + "userLogin": "geekgonecrazy", + "description": "The package only included a few pre-built which caused all macs to have to compile every time they installed and also caused our alpine not to work.\r\n\r\nThis temporarily switches to a fork of the matrix-appservice-bridge package.\r\n\r\nMade changes to one of its child dependencies `matrix-rust-sdk-bindings` that adds pre-built binaries for mac and musl (for alpine).", + "milestone": "4.7.0", + "contributors": [ + "geekgonecrazy", + "web-flow", + "d-gubert" + ] + }, + { + "pr": "25255", + "title": "Regression: Change preference to be default legacy messages", + "userLogin": "gabriellsh", + "milestone": "4.8.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25306", + "title": "Regression: Fix reply button not working when hideFlexTab is enabled", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25311", + "title": "Regression: Add eslint package to micro services Dockerfile", + "userLogin": "sampaiodiego", + "milestone": "4.7.0", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25218", + "title": "Chore: ensure scripts use cross-env and ignore some dirs (ROC-54)", + "userLogin": "souzaramon", + "description": "- data and test-failure should be ignored\r\n- ensure scripts use cross-env", + "contributors": [ + "souzaramon" + ] + }, + { + "pr": "25313", + "title": "Regression: Revert Bugsnag version", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25305", + "title": "Regression: eslint not running on packages", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "ggazzo" + ] + }, + { + "pr": "25299", + "title": "Regression: Add `isPending` status to message", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25301", + "title": "Regression: Shows error if micro service cannot connect to Mongo", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25287", + "title": "Regression: Use exact Node version on micro services Docker images", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25286", + "title": "Chore: Add root package.json to houston files", + "userLogin": "d-gubert", + "description": "See title", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25284", + "title": "Chore: Sync with master", + "userLogin": "d-gubert", + "contributors": [ + "sampaiodiego", + "d-gubert", + "web-flow" + ] + }, + { + "pr": "25269", + "title": "Chore: Minor dependency updates", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "25224", + "title": "Chore: Add yarn plugin to check node and yarn version", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25280", + "title": "Chore: Remove package-lock.json from houston files", + "userLogin": "d-gubert", + "description": "Houston config in the `package.json` file still mentioned `package-lock.json`, but it doesn't exist anymore", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25260", + "title": "[FIX] Adjust email label in Setup Wizard i18n files", + "userLogin": "guijun13", + "description": "- remove 'Company' label on onboarding email keys in certain languages", + "contributors": [ + "guijun13" + ] + }, + { + "pr": "25275", + "title": "Chore: Fix return type warnings", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "23870", + "title": "[NEW] Expand Apps Engine's environment variable allowed list", + "userLogin": "cuonghuunguyen", + "milestone": "4.7.0", + "contributors": [ + null, + "debdutdeb", + "web-flow", + "cuonghuunguyen", + "dougfabris" + ] + }, + { + "pr": "25273", + "title": "Regression: Fix federation Matrix bridge startup", + "userLogin": "sampaiodiego", + "milestone": "4.7.0", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25092", + "title": "[FIX] Message preview not available for queued chats", + "userLogin": "murtaza98", + "milestone": "4.7.0", + "contributors": [ + "murtaza98", + "KevLehman" + ] + }, + { + "pr": "23688", + "title": "[NEW] Alpha Matrix Federation", + "userLogin": "alansikora", + "description": "Experimental support for Matrix Federation with a Bridge\r\n\r\nhttps://user-images.githubusercontent.com/51996/164530391-e8b17ecd-a4d0-4ef8-a8b7-81230c1773d3.mp4", + "milestone": "4.7.0", + "contributors": [ + "alansikora", + "geekgonecrazy", + "MarcosSpessatto", + "rodrigok" + ] + }, + { + "pr": "25259", + "title": "Chore: Bump Fuselage packages", + "userLogin": "dougfabris", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25261", + "title": "[FIX] Incorrect websocket url in livechat widget", + "userLogin": "debdutdeb", + "milestone": "4.7.0", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "25007", + "title": "[FIX] Showing Blank Message Inside Report", + "userLogin": "nishant23122000", + "description": "https://user-images.githubusercontent.com/53515714/161038085-4a86c7ae-6751-4996-9767-b1c9e0331a6c.mp4", + "contributors": [ + "nishant23122000" + ] + }, + { + "pr": "25251", + "title": "Regression: Add select message to system message and thread preview and allow select on legacy template", + "userLogin": "filipemarins", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "ggazzo", + "web-flow", + "gabriellsh", + "dougfabris" + ] + }, + { + "pr": "25239", + "title": "[FIX] Add katex render to new message react template", + "userLogin": "filipemarins", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "ggazzo", + "dougfabris" + ] + }, + { + "pr": "25257", + "title": "Chore: Update Livechat to the last version", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24515", + "title": "[FIX] Custom sound error toast messages", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "dougfabris" + ] + }, + { + "pr": "25211", + "title": "Regression: Avatar not loading on first direct message", + "userLogin": "filipemarins", + "description": "fix avatar not loading on a first direct message", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "ggazzo" + ] + }, + { + "pr": "25254", + "title": "Regression: Show username and real name on the message system", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25217", + "title": "[IMPROVE] Performance for some Omnichannel features", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25200", + "title": "[FIX] room creation fails if app framework is disabled", + "userLogin": "debdutdeb", + "milestone": "4.7.0", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "24565", + "title": "[IMPROVE] Add OTR Room States", + "userLogin": "yash-rajpal", + "description": "Earlier OTR room uses only 2 states, we need more states to support future features. \r\nThis adds more states for the OTR contextualBar.\r\n\r\n- Expired\r\n\"Screen\r\n\r\n- Declined\r\nScreen Shot 2022-04-20 at 13 49 28\r\n\r\n- Error\r\n\"Screen", + "milestone": "4.7.0", + "contributors": [ + "yash-rajpal", + "dougfabris" + ] + }, + { + "pr": "25170", + "title": "[FIX] Client disconnection on network loss", + "userLogin": "amolghode1981", + "description": "Agent gets disconnected (or Unregistered) from asterisk in multiple ways. The goal is that agent should remain online\r\nunless agent explicitly logs off.\r\nAgent can stop receiving calls in multiple ways due to network loss. Network loss can happen in following ways.\r\n1. User tries to switch the network. User experiences a glitch of disconnectivity. This can be simulated by turning the network off\r\nin the network tab of chrome's dev tool. This can disconnect the UA if the disconnection happens just before the registration refresh.\r\n2. Second reason is when computer goes in sleep mode.\r\n3. Third reason is that when asterisk is crashed/in maintenance mode/explicitly stopped.\r\n\r\nSolution:\r\nThe idea is to detect the network disconnection and start the start the attempts to reconnect.\r\nThe detection of the disconnection does not happen in case#1. The SIPUA's UserAgent transport does not\r\ncall onDisconnected when network loss of such kind happens. To tackle this problem, window's online and offline event handlers are\r\nused.\r\n\r\nThe number of retries is configurable but ideally it is to be kept at -1. Whenever disconnection happens, it should keep on trying to\r\nreconnect with increasing backoff time. This behaviour is useful when the asterisk is stopped.\r\n\r\nWhen the server is disconnected, it should be indicated on the phone button.", + "contributors": [ + "amolghode1981", + "KevLehman" + ] + }, + { + "pr": "25244", + "title": "[FIX] Read receipts show with color gray when not read yet", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25230", + "title": "[FIX] VoIP disabled/enabled sequence puts voip agent in error state", + "userLogin": "amolghode1981", + "description": "Initially it was thought that the issue occurs because of the race condition while changing the client settings vs those settings reflected on server side. So a natural solution to solve this is to wait for setting change event 'private-settings-changed'. Then if 'VoIP_Enabled' is updated and it is true, set voipEnabled to true in useVoipClient.ts (on client side)\r\n\r\nIt was realised that the race does not happen because of the database or server noticing the changes late. But because of the time taken to establish the AMI connection with Asterisk.\r\n\r\nSolution:\r\n\r\n1. Change apps/meteor/app/voip/server/startup.ts. When VoIP_Enabled is changed, await for Voip.init() to complete and then broadcast connector.statuschanged with changed value.\r\n2. From apps/meteor/server/modules/listeners/listeners.module.ts use notifyLoggedInThisInstance to notify all logged in users on current instance.\r\n3. in apps/meteor/client/providers/CallProvider/hooks/useVoipClient.ts add the event handler that receives this event. Change voipEnabled from constant to state. Change this state based on the 'value' that is received by the handler.", + "contributors": [ + "amolghode1981", + "KevLehman" + ] + }, + { + "pr": "25087", + "title": "[NEW] Add expire index to integration history", + "userLogin": "geekgonecrazy", + "milestone": "4.7.0", + "contributors": [ + "geekgonecrazy" + ] + }, + { + "pr": "24521", + "title": "Chore: update OTR icon", + "userLogin": "kibonusp", + "description": "I changed the shredder icon in OTR contextual bar to the stopwatch icon, recently added to the fuselage.", + "milestone": "4.7.0", + "contributors": [ + "kibonusp", + "yash-rajpal", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "25237", + "title": "[FIX] Toolbox hiding under contextual bar", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25231", + "title": "[IMPROVE] Added MaxNickNameLength and MaxBioLength constants", + "userLogin": "aakash-gitdev", + "contributors": [ + "aakash-gitdev", + "web-flow", + "gabriellsh" + ] + }, + { + "pr": "25220", + "title": "[FIX] Desktop notification on multi-instance environments", + "userLogin": "sampaiodiego", + "milestone": "4.6.3", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25175", + "title": "[FIX] Reply button behavior on broadcast channel", + "userLogin": "filipemarins", + "description": "Hide reply button for the user that sent the message", + "contributors": [ + "filipemarins", + "web-flow" + ] + }, + { + "pr": "25216", + "title": "[FIX] Read receipts showing before message read", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25222", + "title": "[FIX] Add reaction not working in legacy messages", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25223", + "title": "Chore: Add error boundary to message component", + "userLogin": "gabriellsh", + "description": "Not crash the whole application if something goes wrong in the MessageList component.\r\n\r\n![image](https://user-images.githubusercontent.com/40830821/162269915-931c5c3c-c979-4234-b74c-371f67467ce0.png)", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25130", + "title": "Chore: Update Livechat version", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "25073", + "title": "[FIX] AgentOverview analytics wrong departmentId parameter", + "userLogin": "paulobernardoaf", + "description": "When filtering the analytics charts by department, data would not appear because the object:\r\n```js\r\n{\r\n value: \"department-id\",\r\n label: \"department-name\"\r\n}\r\n```\r\nwas being used in the `departmentId` parameter.\r\n\r\n- Before:\r\n![image](https://user-images.githubusercontent.com/30026625/161832057-d96ffd21-a7dd-421e-bfaa-3b9f4a9127b2.png)\r\n\r\n- After:\r\n![image](https://user-images.githubusercontent.com/30026625/161831092-9ee77b51-b083-4f45-9c48-ab2e0511c4d6.png)", + "milestone": "4.7.0", + "contributors": [ + "paulobernardoaf" + ] + }, + { + "pr": "25056", + "title": "[FIX] Close room when dismiss wrap up call modal", + "userLogin": "tiagoevanp", + "milestone": "4.7.0", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "25208", + "title": "Regression: yarn dev triggers build dependencies", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "24714", + "title": "[FIX] Added invalid password error message", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "dougfabris" + ] + }, + { + "pr": "25196", + "title": "Chore: Tests with Playwright (task: ROC-28, 09-channels)", + "userLogin": "tmontini", + "contributors": [ + "tmontini" + ] + }, + { + "pr": "25174", + "title": "Chore: Template to generate packages", + "userLogin": "ggazzo", + "description": "```\r\nnpx hygen package new test\r\n```", + "contributors": [ + "ggazzo", + "web-flow", + "sampaiodiego" + ] + }, + { + "pr": "25193", + "title": "Regression: Fix micro services Docker build", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25180", + "title": "Chore: Remove duplicated useUserRoom", + "userLogin": "dougfabris", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25167", + "title": "Chore: TS migration SortList", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "24933", + "title": "[FIX] Deactivating user breaks if user is the only room owner", + "userLogin": "sidmohanty11", + "description": "## Before\r\n\r\nhttps://user-images.githubusercontent.com/73601258/160000871-cfc2f2a5-2a59-4d27-8049-7754d003dd48.mp4\r\n\r\n\r\n\r\n## After\r\nhttps://user-images.githubusercontent.com/73601258/159998287-681ab475-ff33-4282-82ff-db751c59a392.mp4", + "milestone": "4.6.2", + "contributors": [ + "sidmohanty11", + "sampaiodiego" + ] + }, + { + "pr": "25181", + "title": "Regression: Fix services Docker build on CI", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25089", + "title": "[FIX] UserCard sanitization", + "userLogin": "dougfabris", + "description": "- Rewrites the component to TS\r\n- Fixes some visual issues\r\n\r\n### before\r\n![Screen Shot 2022-04-07 at 00 23 11](https://user-images.githubusercontent.com/27704687/162113925-5c9484d1-23e9-4623-8b86-3fbc71b461a1.png)\r\n\r\n### after\r\n![Screen Shot 2022-04-07 at 00 07 13](https://user-images.githubusercontent.com/27704687/162112353-afd6aac6-b27c-4470-a642-631b8080d59e.png)", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25085", + "title": "Chore: move definitions to packages", + "userLogin": "ggazzo", + "milestone": "3.7.0", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25168", + "title": "Regression: CI playwright", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25125", + "title": "Chore: Convert NotificationStatus to TS", + "userLogin": "jeanfbrito", + "contributors": [ + "jeanfbrito", + "ggazzo" + ] + }, + { + "pr": "25148", + "title": "[FIX] Message menu action not working on legacy messages.", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25122", + "title": "Chore: Tests with Playwright (task: All works)", + "userLogin": "weslley543", + "contributors": [ + "weslley543" + ] + }, + { + "pr": "25129", + "title": "Chore: Remove old files from removed Omnichannel feature", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25128", + "title": "Chore: Convert admin custom sound to tsx", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25126", + "title": "Chore: Migrate oauth2server to typescript", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25123", + "title": "Chore: Convert LivechatAgentActivity to raw model and TS", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25124", + "title": "Chore: Remove unused Drone CI files", + "userLogin": "geekgonecrazy", + "contributors": [ + "geekgonecrazy", + "web-flow" + ] + }, + { + "pr": "25121", + "title": "Chore: Convert Mailer to TS", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti", + "sampaiodiego" + ] + }, + { + "pr": "25107", + "title": "Regression: Fix CI monorepo build", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25074", + "title": "Chore: Monorepo ", + "userLogin": "ggazzo", + "milestone": "3.7.0", + "contributors": [ + "sampaiodiego", + "ggazzo" + ] + }, + { + "pr": "25097", + "title": "[IMPROVE] Rename upgrade tab routes", + "userLogin": "guijun13", + "description": "Change 'upgrade tab' routes names from camelCase ('goFullyFeatured') to kebab-case ('go-fully-featured') due to URL naming consistency. Changed types, main function and test.", + "contributors": [ + "guijun13" + ] + }, + { + "pr": "25076", + "title": "Bump eslint-plugin-anti-trojan-source from 1.0.6 to 1.1.0", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24936", + "title": "[FIX] End call button disappearing when on-hold", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24932", + "title": "[FIX] Use correct room property for call ended at", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "25022", + "title": "[FIX] Proxy settings being ignored", + "userLogin": "pierre-lehnen-rc", + "description": "Modify Meteor's `HTTP.call` to add back proxy support", + "milestone": "4.6.1", + "contributors": [ + "pierre-lehnen-rc", + "sampaiodiego" + ] + }, + { + "pr": "25082", + "title": "[FIX] Invitation links don't redirect to the registration form", + "userLogin": "yash-rajpal", + "milestone": "4.6.1", + "contributors": [ + "yash-rajpal" + ] + }, + { + "pr": "23971", + "title": "[NEW] Message Template React Component", + "userLogin": "ggazzo", + "description": "Complete rewrite of the messages component in react. Visual changes should be minimal as well as user impact, with no break changes (unless you've customized the blaze template).\r\n\r\n\r\n\r\n![Screen Shot 2022-04-05 at 11 14 18](https://user-images.githubusercontent.com/27704687/161774027-38dd9c7b-eeeb-45e2-b9d8-ea2a9be8486d.png)\r\nIn case you encounter any problems, or want to compare, temporarily it is possible to use the old version\r\n\r\n\"image\"", + "contributors": [ + "ggazzo", + "sampaiodiego" + ] + }, + { + "pr": "25069", + "title": "[FIX] FormData uploads not working", + "userLogin": "gabriellsh", + "milestone": "4.6.1", + "contributors": [ + "gabriellsh", + "dougfabris" + ] + }, + { + "pr": "19866", + "title": "[FIX] Video and Audio not skipping forward", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler", + "tassoevan", + "web-flow", + "dougfabris" + ] + }, + { + "pr": "25067", + "title": "[FIX] NPS never finishing sending results", + "userLogin": "sampaiodiego", + "milestone": "4.6.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24405", + "title": "[IMPROVE] Add tooltip to sidebar room menu", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "web-flow", + "dougfabris" + ] + }, + { + "pr": "24431", + "title": "[IMPROVE] Added tooltip options for message menu", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "dougfabris" + ] + }, + { + "pr": "24166", + "title": "[FIX] Replace encrypted text to Encrypted Message Placeholder", + "userLogin": "yash-rajpal", + "description": "### before \r\n![image](https://user-images.githubusercontent.com/27704687/150807900-154a9cdb-ee13-4333-8628-f287ab914b40.png)\r\n\r\n### after\r\n\"Screenshot", + "milestone": "4.7.0", + "contributors": [ + "yash-rajpal", + "albuquerquefabio", + "web-flow" + ] + }, + { + "pr": "24984", + "title": "[FIX] Prevent sequential messages edited icon to hide on hover", + "userLogin": "dougfabris", + "description": "### before\r\n\"Screen\r\n\r\n### after\r\n\"Screen", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25024", + "title": "[IMPROVE] Improve active/hover colors in account sidebar", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664" + ] + }, + { + "pr": "24856", + "title": "[FIX] Full error message is visible", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "tassoevan" + ] + }, + { + "pr": "24708", + "title": "Chore: Cancel running jobs if PR is updated", + "userLogin": "debdutdeb", + "contributors": [ + "debdutdeb", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24900", + "title": "Chore: organize test files and fix code coverage", + "userLogin": "tmontini", + "contributors": [ + null, + "tmontini", + "rodrigok" + ] + }, + { + "pr": "24464", + "title": "Chore: Missing keys in APIsDisplay", + "userLogin": "dougfabris", + "milestone": "4.7.0", + "contributors": [ + "dougfabris", + "tassoevan" + ] + }, + { + "pr": "25057", + "title": "Bump ejson from 2.2.1 to 2.2.2", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25053", + "title": "Chore: Remove Alpine image deps after using them", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25052", + "title": "Bump pino and pino-pretty", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25050", + "title": "[FIX] Upgrade Tab showing for a split second", + "userLogin": "gabriellsh", + "milestone": "4.6.1", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25055", + "title": "[FIX] UserAutoComplete not rendering UserAvatar correctly", + "userLogin": "dougfabris", + "description": "### before\r\n![Screen Shot 2022-04-04 at 16 50 21](https://user-images.githubusercontent.com/27704687/161620921-800bf66a-806d-4f83-b2e1-073c34215001.png)\r\n\r\n### after\r\n![Screen Shot 2022-04-04 at 16 49 00](https://user-images.githubusercontent.com/27704687/161620720-3e27774d-c241-46ca-b764-932a9295d709.png)", + "milestone": "4.6.1", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25031", + "title": "Chore: TS conversion folder client", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "24991", + "title": "Bump minimist from 1.2.5 to 1.2.6 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25002", + "title": "Bump template-file from 6.0.0 to 6.0.1", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25042", + "title": "Bump body-parser from 1.19.2 to 1.20.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25043", + "title": "i18n: Language update from LingoHub 🤖 on 2022-04-04Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null + ] + }, + { + "pr": "25028", + "title": "Merge master into develop & Set version to 4.7.0-develop", + "userLogin": "sampaiodiego", + "contributors": [ + "AllanPazRibeiro", + "sampaiodiego", + "web-flow" + ] + } + ] + }, + "4.7.1": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25510", + "title": "Release 4.7.1", + "userLogin": "d-gubert", + "contributors": [ + "felipe-menelau", + "d-gubert", + "pierre-lehnen-rc" + ] + }, + { + "pr": "25471", + "title": "[FIX] Spotlight results showing usernames instead of real names", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.7.1", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25434", + "title": "[FIX] LDAP sync removing users from channels when multiple groups are mapped to it", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.7.1", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25441", + "title": "[NEW] Use setting to determine if initial general channel is needed", + "userLogin": "felipe-menelau", + "description": "- Adds flag responsible for overwriting #general channel creation", + "milestone": "4.7.1", + "contributors": [ + "felipe-menelau", + "sampaiodiego", + "web-flow" + ] + } + ] + }, + "4.7.2": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25580", + "title": "Release 4.7.2", + "userLogin": "d-gubert", + "contributors": [ + "tiagoevanp", + "d-gubert", + "MartinSchoeler", + "ggazzo", + "cauefcr", + "geekgonecrazy" + ] + }, + { + "pr": "25544", + "title": "[FIX] Initial User not added to default channel", + "userLogin": "geekgonecrazy", + "description": "If injecting initial user. The user wasn’t added to the default General channel", + "milestone": "4.7.2", + "contributors": [ + "geekgonecrazy", + "web-flow" + ] + }, + { + "pr": "25520", + "title": "[FIX] User abandonment setting was not working doe to failing event hook", + "userLogin": "cauefcr", + "description": "A setting watcher and the query for grabbing abandoned chats were broken, now they're not.", + "milestone": "4.7.2", + "contributors": [ + "cauefcr", + "tiagoevanp" + ] + }, + { + "pr": "25495", + "title": "[FIX] Dynamic load matrix is enabled and handle failure ", + "userLogin": "ggazzo", + "milestone": "4.7.2", + "contributors": [ + "ggazzo", + "geekgonecrazy" + ] + }, + { + "pr": "25409", + "title": "[FIX] One of the triggers was not working correctly", + "userLogin": "MartinSchoeler", + "milestone": "4.7.2", + "contributors": [ + "MartinSchoeler", + "tiagoevanp" + ] + }, + { + "pr": "25407", + "title": "[FIX] UI/UX issues on Live Chat widget", + "userLogin": "MartinSchoeler", + "milestone": "4.7.2", + "contributors": [ + "MartinSchoeler", + "dougfabris" + ] + }, + { + "pr": "25312", + "title": "Chore: Add Livechat repo into Monorepo packages", + "userLogin": "tiagoevanp", + "milestone": "4.7.2", + "contributors": [ + "tiagoevanp", + "ggazzo", + "web-flow", + "MartinSchoeler" + ] + } + ] + }, + "4.8.0-rc.1": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25629", + "title": "Regression: Assets & Slack Bridge Setting Page not rendering", + "userLogin": "dougfabris", + "milestone": "4.8.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25627", + "title": "Regression: Subscription menu not appearing for non installed but subscribed apps", + "userLogin": "rique223", + "description": "Fixed a problem on which the AppMenu component did not appear for apps that had an active subscription but weren't installed, now the rendering of the component is also based on the isSubscribed flag, and the appearance of the uninstall and enable/disable options are based on the app.installed flag so that the correct options appear on all the edge cases.\r\nDemo gif:\r\n![subscription-manager-fix](https://user-images.githubusercontent.com/43561537/170132040-dc8535c0-8056-4fb2-b008-afaece744868.gif)", + "milestone": "4.8.0", + "contributors": [ + "rique223" + ] + }, + { + "pr": "25521", + "title": "Chore: Rewrite im and dm endpoints to ts", + "userLogin": "albuquerquefabio", + "description": "- Endpoints rewritten to TS\r\n - dm.create\r\n - dm.delete\r\n - dm.close\r\n - dm.counters\r\n - dm.files\r\n - dm.history\r\n - dm.members\r\n - dm.messages\r\n - dm.messages.others\r\n - dm.list\r\n - dm.list.everyone\r\n - dm.open\r\n - dm.setTopic\r\n - im.create\r\n - im.delete\r\n - im.close\r\n - im.counters\r\n - im.files\r\n - im.history\r\n - im.members\r\n - im.messages\r\n - im.messages.others\r\n - im.list\r\n - im.list.everyone\r\n - im.open\r\n - im.setTopic\r\n- Some lines of code was refactored on `apps/meteor/app/api/server/v1/im.ts`\r\n- Unnecessary functions were deleted on `apps/meteor/app/lib/server/functions/getDirectMessageByNameOrIdWithOptionToJoin.ts`\r\n- New types was added on `apps/meteor/app/api/server/api.d.ts`", + "contributors": [ + "albuquerquefabio", + "ggazzo", + "web-flow" + ] + } + ] + }, + "4.8.0-rc.2": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25618", + "title": "Regression: Change logic to check if connection is online on unstable networks", + "userLogin": "KevLehman", + "milestone": "4.8.0", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25639", + "title": "Regression: Missing settings group descriptions", + "userLogin": "dougfabris", + "description": "", + "milestone": "4.8.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25648", + "title": "Chore: Rest API query parameters handling", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25651", + "title": "Regression: VoIp wrap up modal not opening after call disconnect", + "userLogin": "aleksandernsilva", + "description": "This PR fixes a bug preventing the wrap up call modal from being displayed after caller or agent ends the call.", + "contributors": [ + "aleksandernsilva" + ] + }, + { + "pr": "25638", + "title": "[FIX] Remove 'total' text in admin info page", + "userLogin": "guijun13", + "description": "- Remove initial 'total' text from rooms and messages groups in the admin info page\r\n- Add 'total' before 'rooms' and 'messages' title on the same section. To use the new 'Total Rooms', was created a new key in the en.i18n.json file.", + "contributors": [ + "guijun13" + ] + }, + { + "pr": "25641", + "title": "Chore: Increase performance and security of integrations’ scripts", + "userLogin": "rodrigok", + "description": "Replace internal VM implementation with VM2 which implements many more mechanisms to ensure timeout, security and allow easier configuration for future improvements on the integrations' feature.", + "contributors": [ + "rodrigok", + "ggazzo" + ] + }, + { + "pr": "25613", + "title": "[FIX] Quote message spacing", + "userLogin": "hugocostadev", + "contributors": [ + "hugocostadev" + ] + } + ] + }, + "4.8.0-rc.3": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25663", + "title": "Regression: Update settings groups description", + "userLogin": "dougfabris", + "milestone": "4.8.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25569", + "title": "[FIX] Click to join button Jitsi Call", + "userLogin": "hugocostadev", + "description": "Added `ToolboxProvider` to `MessageListProvider` and fixed actionLink.js open function exec", + "milestone": "4.8.0", + "contributors": [ + "hugocostadev", + "tassoevan", + "web-flow" + ] + }, + { + "pr": "25644", + "title": "Regression: Endpoint types with Ajv Coercing data types", + "userLogin": "albuquerquefabio", + "description": "Ajv Coercing data types should be `true` to accept all kinds of data requested.", + "contributors": [ + "albuquerquefabio" + ] + } + ] + }, + "3.18.7": { + "mongo_versions": [ + "3.4", + "3.6", + "4.0", + "4.2" + ], + "pull_requests": [] + }, + "4.8.0-rc.4": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25689", + "title": "Regression: App event listeners broke Slackbridge integration and importers", + "userLogin": "d-gubert", + "description": "Some event listeners triggered by Apps were calling `Meteor.user()` in functions that could run outside of Meteor environment", + "milestone": "4.8.0", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25686", + "title": "[FIX] Fix max-width message block", + "userLogin": "ggazzo", + "milestone": "4.8.0", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25673", + "title": "[FIX] Change form body parameter charset to UTF-8 to fix issue #25456", + "userLogin": "divinespear", + "description": "since [mscdex/busboy](https://github.com/mscdex/busboy) 1.5.0, new option named `defParamCharset` for form body parameter encoding is added with default value `latin1`, so unicode filenames are broken since 4.7.0.\r\n\r\n![Screenshot from 2022-05-28 16-26-06](https://user-images.githubusercontent.com/126630/170815447-1f3bd579-243a-42d3-86f6-814aeaa30ce9.png)", + "milestone": "4.8.0", + "contributors": [ + "divinespear" + ] + }, + { + "pr": "25687", + "title": "Regression: Fix sort field files.list", + "userLogin": "ggazzo", + "milestone": "4.8.0", + "contributors": [ + "ggazzo", + "albuquerquefabio", + "web-flow" + ] + }, + { + "pr": "25684", + "title": "[IMPROVE] add warnings for federation setup", + "userLogin": "carlosrodrigues94", + "contributors": [ + "carlosrodrigues94" + ] + }, + { + "pr": "25683", + "title": "[FIX] Prevent federation crash on invite users as a non-owner user", + "userLogin": "MarcosSpessatto", + "contributors": [ + "MarcosSpessatto" + ] + }, + { + "pr": "25653", + "title": "Regression: Broken components on Federation and Engagement dashboards", + "userLogin": "tassoevan", + "description": "For reasons I've no clue, any client import path matching `**/data/**` will not be included in the final bundle, failing silently on transpiling/bundling.", + "milestone": "4.8.0", + "contributors": [ + "tassoevan", + "gabriellsh" + ] + } + ] + }, + "4.8.0-rc.5": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25700", + "title": "Chore: Update Apps-Engine and Fuselage", + "userLogin": "d-gubert", + "milestone": "4.8.0", + "contributors": [ + "d-gubert" + ] + } + ] + }, + "4.8.0": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25580", + "title": "Release 4.7.2", + "userLogin": "d-gubert", + "contributors": [ + "tiagoevanp", + "d-gubert", + "MartinSchoeler", + "ggazzo", + "cauefcr", + "geekgonecrazy" + ] + }, + { + "pr": "25544", + "title": "[FIX] Initial User not added to default channel", + "userLogin": "geekgonecrazy", + "description": "If injecting initial user. The user wasn’t added to the default General channel", + "milestone": "4.7.2", + "contributors": [ + "geekgonecrazy", + "web-flow" + ] + }, + { + "pr": "25520", + "title": "[FIX] User abandonment setting was not working doe to failing event hook", + "userLogin": "cauefcr", + "description": "A setting watcher and the query for grabbing abandoned chats were broken, now they're not.", + "milestone": "4.7.2", + "contributors": [ + "cauefcr", + "tiagoevanp" + ] + }, + { + "pr": "25495", + "title": "[FIX] Dynamic load matrix is enabled and handle failure ", + "userLogin": "ggazzo", + "milestone": "4.7.2", + "contributors": [ + "ggazzo", + "geekgonecrazy" + ] + }, + { + "pr": "25409", + "title": "[FIX] One of the triggers was not working correctly", + "userLogin": "MartinSchoeler", + "milestone": "4.7.2", + "contributors": [ + "MartinSchoeler", + "tiagoevanp" + ] + }, + { + "pr": "25407", + "title": "[FIX] UI/UX issues on Live Chat widget", + "userLogin": "MartinSchoeler", + "milestone": "4.7.2", + "contributors": [ + "MartinSchoeler", + "dougfabris" + ] + }, + { + "pr": "25312", + "title": "Chore: Add Livechat repo into Monorepo packages", + "userLogin": "tiagoevanp", + "milestone": "4.7.2", + "contributors": [ + "tiagoevanp", + "ggazzo", + "web-flow", + "MartinSchoeler" + ] + }, + { + "pr": "25510", + "title": "Release 4.7.1", + "userLogin": "d-gubert", + "contributors": [ + "felipe-menelau", + "d-gubert", + "pierre-lehnen-rc" + ] + }, + { + "pr": "25471", + "title": "[FIX] Spotlight results showing usernames instead of real names", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.7.1", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25434", + "title": "[FIX] LDAP sync removing users from channels when multiple groups are mapped to it", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.7.1", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25441", + "title": "[NEW] Use setting to determine if initial general channel is needed", + "userLogin": "felipe-menelau", + "description": "- Adds flag responsible for overwriting #general channel creation", + "milestone": "4.7.1", + "contributors": [ + "felipe-menelau", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "25390", + "title": "Release 4.7.0", + "userLogin": "d-gubert", + "contributors": [ + "sampaiodiego", + "web-flow", + "lingohub[bot]", + "dependabot[bot]", + "ggazzo", + "dougfabris", + "gabriellsh", + "tmontini", + "debdutdeb", + "Himanshu664", + "yash-rajpal", + "MartinSchoeler" + ] + } + ] + }, + "3.18.6": { + "mongo_versions": [ + "3.4", + "3.6", + "4.0", + "4.2" + ], + "pull_requests": [] + }, + "4.1.6": { + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "24553", + "title": "[FIX] Omnichannel managers can't join chats in progress", + "userLogin": "renatobecker", + "milestone": "4.5.0", + "contributors": [ + "renatobecker", + "murtaza98", + "web-flow" + ] + }, + { + "pr": "24592", + "title": "Regression: Fix in-correct room status shown to agents", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + } + ] + }, + "4.4.4": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25580", + "title": "Release 4.7.2", + "userLogin": "d-gubert", + "contributors": [ + "tiagoevanp", + "d-gubert", + "MartinSchoeler", + "ggazzo", + "cauefcr", + "geekgonecrazy" + ] + }, + { + "pr": "25544", + "title": "[FIX] Initial User not added to default channel", + "userLogin": "geekgonecrazy", + "description": "If injecting initial user. The user wasn’t added to the default General channel", + "milestone": "4.7.2", + "contributors": [ + "geekgonecrazy", + "web-flow" + ] + }, + { + "pr": "25520", + "title": "[FIX] User abandonment setting was not working doe to failing event hook", + "userLogin": "cauefcr", + "description": "A setting watcher and the query for grabbing abandoned chats were broken, now they're not.", + "milestone": "4.7.2", + "contributors": [ + "cauefcr", + "tiagoevanp" + ] + }, + { + "pr": "25495", + "title": "[FIX] Dynamic load matrix is enabled and handle failure ", + "userLogin": "ggazzo", + "milestone": "4.7.2", + "contributors": [ + "ggazzo", + "geekgonecrazy" + ] + }, + { + "pr": "25409", + "title": "[FIX] One of the triggers was not working correctly", + "userLogin": "MartinSchoeler", + "milestone": "4.7.2", + "contributors": [ + "MartinSchoeler", + "tiagoevanp" + ] + }, + { + "pr": "25407", + "title": "[FIX] UI/UX issues on Live Chat widget", + "userLogin": "MartinSchoeler", + "milestone": "4.7.2", + "contributors": [ + "MartinSchoeler", + "dougfabris" + ] + }, + { + "pr": "25312", + "title": "Chore: Add Livechat repo into Monorepo packages", + "userLogin": "tiagoevanp", + "milestone": "4.7.2", + "contributors": [ + "tiagoevanp", + "ggazzo", + "web-flow", + "MartinSchoeler" + ] + }, + { + "pr": "25510", + "title": "Release 4.7.1", + "userLogin": "d-gubert", + "contributors": [ + "felipe-menelau", + "d-gubert", + "pierre-lehnen-rc" + ] + }, + { + "pr": "25471", + "title": "[FIX] Spotlight results showing usernames instead of real names", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.7.1", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25434", + "title": "[FIX] LDAP sync removing users from channels when multiple groups are mapped to it", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.7.1", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25441", + "title": "[NEW] Use setting to determine if initial general channel is needed", + "userLogin": "felipe-menelau", + "description": "- Adds flag responsible for overwriting #general channel creation", + "milestone": "4.7.1", + "contributors": [ + "felipe-menelau", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "25390", + "title": "Release 4.7.0", + "userLogin": "d-gubert", + "contributors": [ + "sampaiodiego", + "web-flow", + "lingohub[bot]", + "dependabot[bot]", + "ggazzo", + "dougfabris", + "gabriellsh", + "tmontini", + "debdutdeb", + "Himanshu664", + "yash-rajpal", + "MartinSchoeler" + ] + }, + { + "pr": "25380", + "title": "Regression: Fix clicking on visitor's chat in the sidebar does not display the chat window", + "userLogin": "filipemarins", + "description": "Fix: livechat room not opening.", + "milestone": "4.7.0", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25314", + "title": "Regression: Fix size of custom emoji and render emoji on thread message preview", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25371", + "title": "Chore: Bump fuselage", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25336", + "title": "Chore: Add options to debug stdout and rate limiter", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25368", + "title": "Regression: Fix English i18n react text", + "userLogin": "d-gubert", + "description": "Incorrect text in reaction tooltip has been fixed", + "milestone": "4.7.0", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25349", + "title": "Regression: Rocket.Chat Webapp not loading.", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "gabriellsh" + ] + }, + { + "pr": "25317", + "title": "Regression: Fix multi line is not showing an empty line between lines", + "userLogin": "filipemarins", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25320", + "title": "Regression: bump onboarding-ui version", + "userLogin": "guijun13", + "description": "- Bump to 'next' the onboarding-ui package from fuselage.\r\n- Update from 'companyEmail' to 'email' adminData usage types", + "contributors": [ + "guijun13" + ] + }, + { + "pr": "25335", + "title": "Chore: Create README.md for Rest Typings", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25327", + "title": "Regression: Messages in new message template Crashing.", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25323", + "title": "Regression: Better MongoDB connection management for micro services", + "userLogin": "sampaiodiego", + "milestone": "4.7.0", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25250", + "title": "Regression: Validate empty fields for Message template", + "userLogin": "gabriellsh", + "milestone": "4.8.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25319", + "title": "Regression: Fix the alpine image and dev UX installing matrix-rust-sdk-bindings", + "userLogin": "geekgonecrazy", + "description": "The package only included a few pre-built which caused all macs to have to compile every time they installed and also caused our alpine not to work.\r\n\r\nThis temporarily switches to a fork of the matrix-appservice-bridge package.\r\n\r\nMade changes to one of its child dependencies `matrix-rust-sdk-bindings` that adds pre-built binaries for mac and musl (for alpine).", + "milestone": "4.7.0", + "contributors": [ + "geekgonecrazy", + "web-flow", + "d-gubert" + ] + }, + { + "pr": "25255", + "title": "Regression: Change preference to be default legacy messages", + "userLogin": "gabriellsh", + "milestone": "4.8.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25306", + "title": "Regression: Fix reply button not working when hideFlexTab is enabled", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25311", + "title": "Regression: Add eslint package to micro services Dockerfile", + "userLogin": "sampaiodiego", + "milestone": "4.7.0", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25218", + "title": "Chore: ensure scripts use cross-env and ignore some dirs (ROC-54)", + "userLogin": "souzaramon", + "description": "- data and test-failure should be ignored\r\n- ensure scripts use cross-env", + "contributors": [ + "souzaramon" + ] + }, + { + "pr": "25313", + "title": "Regression: Revert Bugsnag version", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25305", + "title": "Regression: eslint not running on packages", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "ggazzo" + ] + }, + { + "pr": "25299", + "title": "Regression: Add `isPending` status to message", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25301", + "title": "Regression: Shows error if micro service cannot connect to Mongo", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25287", + "title": "Regression: Use exact Node version on micro services Docker images", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25286", + "title": "Chore: Add root package.json to houston files", + "userLogin": "d-gubert", + "description": "See title", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25284", + "title": "Chore: Sync with master", + "userLogin": "d-gubert", + "contributors": [ + "sampaiodiego", + "d-gubert", + "web-flow" + ] + }, + { + "pr": "25269", + "title": "Chore: Minor dependency updates", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "25224", + "title": "Chore: Add yarn plugin to check node and yarn version", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25235", + "title": "Release 4.6.3", + "userLogin": "d-gubert", + "contributors": [ + "sampaiodiego", + "d-gubert" + ] + }, + { + "pr": "25220", + "title": "[FIX] Desktop notification on multi-instance environments", + "userLogin": "sampaiodiego", + "milestone": "4.6.3", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25280", + "title": "Chore: Remove package-lock.json from houston files", + "userLogin": "d-gubert", + "description": "Houston config in the `package.json` file still mentioned `package-lock.json`, but it doesn't exist anymore", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25260", + "title": "[FIX] Adjust email label in Setup Wizard i18n files", + "userLogin": "guijun13", + "description": "- remove 'Company' label on onboarding email keys in certain languages", + "contributors": [ + "guijun13" + ] + }, + { + "pr": "25275", + "title": "Chore: Fix return type warnings", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "23870", + "title": "[NEW] Expand Apps Engine's environment variable allowed list", + "userLogin": "cuonghuunguyen", + "milestone": "4.7.0", + "contributors": [ + null, + "debdutdeb", + "web-flow", + "cuonghuunguyen", + "dougfabris" + ] + }, + { + "pr": "25273", + "title": "Regression: Fix federation Matrix bridge startup", + "userLogin": "sampaiodiego", + "milestone": "4.7.0", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25092", + "title": "[FIX] Message preview not available for queued chats", + "userLogin": "murtaza98", + "milestone": "4.7.0", + "contributors": [ + "murtaza98", + "KevLehman" + ] + }, + { + "pr": "23688", + "title": "[NEW] Alpha Matrix Federation", + "userLogin": "alansikora", + "description": "Experimental support for Matrix Federation with a Bridge\r\n\r\nhttps://user-images.githubusercontent.com/51996/164530391-e8b17ecd-a4d0-4ef8-a8b7-81230c1773d3.mp4", + "milestone": "4.7.0", + "contributors": [ + "alansikora", + "geekgonecrazy", + "MarcosSpessatto", + "rodrigok" + ] + }, + { + "pr": "25259", + "title": "Chore: Bump Fuselage packages", + "userLogin": "dougfabris", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25261", + "title": "[FIX] Incorrect websocket url in livechat widget", + "userLogin": "debdutdeb", + "milestone": "4.7.0", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "25007", + "title": "[FIX] Showing Blank Message Inside Report", + "userLogin": "nishant23122000", + "description": "https://user-images.githubusercontent.com/53515714/161038085-4a86c7ae-6751-4996-9767-b1c9e0331a6c.mp4", + "contributors": [ + "nishant23122000" + ] + }, + { + "pr": "25251", + "title": "Regression: Add select message to system message and thread preview and allow select on legacy template", + "userLogin": "filipemarins", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "ggazzo", + "web-flow", + "gabriellsh", + "dougfabris" + ] + }, + { + "pr": "25239", + "title": "[FIX] Add katex render to new message react template", + "userLogin": "filipemarins", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "ggazzo", + "dougfabris" + ] + }, + { + "pr": "25257", + "title": "Chore: Update Livechat to the last version", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24515", + "title": "[FIX] Custom sound error toast messages", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "dougfabris" + ] + }, + { + "pr": "25211", + "title": "Regression: Avatar not loading on first direct message", + "userLogin": "filipemarins", + "description": "fix avatar not loading on a first direct message", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "ggazzo" + ] + }, + { + "pr": "25254", + "title": "Regression: Show username and real name on the message system", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25217", + "title": "[IMPROVE] Performance for some Omnichannel features", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25200", + "title": "[FIX] room creation fails if app framework is disabled", + "userLogin": "debdutdeb", + "milestone": "4.7.0", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "24565", + "title": "[IMPROVE] Add OTR Room States", + "userLogin": "yash-rajpal", + "description": "Earlier OTR room uses only 2 states, we need more states to support future features. \r\nThis adds more states for the OTR contextualBar.\r\n\r\n- Expired\r\n\"Screen\r\n\r\n- Declined\r\nScreen Shot 2022-04-20 at 13 49 28\r\n\r\n- Error\r\n\"Screen", + "milestone": "4.7.0", + "contributors": [ + "yash-rajpal", + "dougfabris" + ] + }, + { + "pr": "25170", + "title": "[FIX] Client disconnection on network loss", + "userLogin": "amolghode1981", + "description": "Agent gets disconnected (or Unregistered) from asterisk in multiple ways. The goal is that agent should remain online\r\nunless agent explicitly logs off.\r\nAgent can stop receiving calls in multiple ways due to network loss. Network loss can happen in following ways.\r\n1. User tries to switch the network. User experiences a glitch of disconnectivity. This can be simulated by turning the network off\r\nin the network tab of chrome's dev tool. This can disconnect the UA if the disconnection happens just before the registration refresh.\r\n2. Second reason is when computer goes in sleep mode.\r\n3. Third reason is that when asterisk is crashed/in maintenance mode/explicitly stopped.\r\n\r\nSolution:\r\nThe idea is to detect the network disconnection and start the start the attempts to reconnect.\r\nThe detection of the disconnection does not happen in case#1. The SIPUA's UserAgent transport does not\r\ncall onDisconnected when network loss of such kind happens. To tackle this problem, window's online and offline event handlers are\r\nused.\r\n\r\nThe number of retries is configurable but ideally it is to be kept at -1. Whenever disconnection happens, it should keep on trying to\r\nreconnect with increasing backoff time. This behaviour is useful when the asterisk is stopped.\r\n\r\nWhen the server is disconnected, it should be indicated on the phone button.", + "contributors": [ + "amolghode1981", + "KevLehman" + ] + }, + { + "pr": "25244", + "title": "[FIX] Read receipts show with color gray when not read yet", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25230", + "title": "[FIX] VoIP disabled/enabled sequence puts voip agent in error state", + "userLogin": "amolghode1981", + "description": "Initially it was thought that the issue occurs because of the race condition while changing the client settings vs those settings reflected on server side. So a natural solution to solve this is to wait for setting change event 'private-settings-changed'. Then if 'VoIP_Enabled' is updated and it is true, set voipEnabled to true in useVoipClient.ts (on client side)\r\n\r\nIt was realised that the race does not happen because of the database or server noticing the changes late. But because of the time taken to establish the AMI connection with Asterisk.\r\n\r\nSolution:\r\n\r\n1. Change apps/meteor/app/voip/server/startup.ts. When VoIP_Enabled is changed, await for Voip.init() to complete and then broadcast connector.statuschanged with changed value.\r\n2. From apps/meteor/server/modules/listeners/listeners.module.ts use notifyLoggedInThisInstance to notify all logged in users on current instance.\r\n3. in apps/meteor/client/providers/CallProvider/hooks/useVoipClient.ts add the event handler that receives this event. Change voipEnabled from constant to state. Change this state based on the 'value' that is received by the handler.", + "contributors": [ + "amolghode1981", + "KevLehman" + ] + }, + { + "pr": "25087", + "title": "[NEW] Add expire index to integration history", + "userLogin": "geekgonecrazy", + "milestone": "4.7.0", + "contributors": [ + "geekgonecrazy" + ] + }, + { + "pr": "24521", + "title": "Chore: update OTR icon", + "userLogin": "kibonusp", + "description": "I changed the shredder icon in OTR contextual bar to the stopwatch icon, recently added to the fuselage.", + "milestone": "4.7.0", + "contributors": [ + "kibonusp", + "yash-rajpal", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "25237", + "title": "[FIX] Toolbox hiding under contextual bar", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25231", + "title": "[IMPROVE] Added MaxNickNameLength and MaxBioLength constants", + "userLogin": "aakash-gitdev", + "contributors": [ + "aakash-gitdev", + "web-flow", + "gabriellsh" + ] + }, + { + "pr": "25220", + "title": "[FIX] Desktop notification on multi-instance environments", + "userLogin": "sampaiodiego", + "milestone": "4.6.3", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25175", + "title": "[FIX] Reply button behavior on broadcast channel", + "userLogin": "filipemarins", + "description": "Hide reply button for the user that sent the message", + "contributors": [ + "filipemarins", + "web-flow" + ] + }, + { + "pr": "25216", + "title": "[FIX] Read receipts showing before message read", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25222", + "title": "[FIX] Add reaction not working in legacy messages", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25223", + "title": "Chore: Add error boundary to message component", + "userLogin": "gabriellsh", + "description": "Not crash the whole application if something goes wrong in the MessageList component.\r\n\r\n![image](https://user-images.githubusercontent.com/40830821/162269915-931c5c3c-c979-4234-b74c-371f67467ce0.png)", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25130", + "title": "Chore: Update Livechat version", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "25073", + "title": "[FIX] AgentOverview analytics wrong departmentId parameter", + "userLogin": "paulobernardoaf", + "description": "When filtering the analytics charts by department, data would not appear because the object:\r\n```js\r\n{\r\n value: \"department-id\",\r\n label: \"department-name\"\r\n}\r\n```\r\nwas being used in the `departmentId` parameter.\r\n\r\n- Before:\r\n![image](https://user-images.githubusercontent.com/30026625/161832057-d96ffd21-a7dd-421e-bfaa-3b9f4a9127b2.png)\r\n\r\n- After:\r\n![image](https://user-images.githubusercontent.com/30026625/161831092-9ee77b51-b083-4f45-9c48-ab2e0511c4d6.png)", + "milestone": "4.7.0", + "contributors": [ + "paulobernardoaf" + ] + }, + { + "pr": "25056", + "title": "[FIX] Close room when dismiss wrap up call modal", + "userLogin": "tiagoevanp", + "milestone": "4.7.0", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "25208", + "title": "Regression: yarn dev triggers build dependencies", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "24714", + "title": "[FIX] Added invalid password error message", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "dougfabris" + ] + }, + { + "pr": "25196", + "title": "Chore: Tests with Playwright (task: ROC-28, 09-channels)", + "userLogin": "tmontini", + "contributors": [ + "tmontini" + ] + }, + { + "pr": "25174", + "title": "Chore: Template to generate packages", + "userLogin": "ggazzo", + "description": "```\r\nnpx hygen package new test\r\n```", + "contributors": [ + "ggazzo", + "web-flow", + "sampaiodiego" + ] + }, + { + "pr": "25193", + "title": "Regression: Fix micro services Docker build", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25191", + "title": "Release 4.6.2", + "userLogin": "sampaiodiego", + "contributors": [ + "sidmohanty11", + "sampaiodiego" + ] + }, + { + "pr": "25101", + "title": "[FIX] Database indexes not being created", + "userLogin": "sampaiodiego", + "milestone": "4.6.2", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24933", + "title": "[FIX] Deactivating user breaks if user is the only room owner", + "userLogin": "sidmohanty11", + "description": "## Before\r\n\r\nhttps://user-images.githubusercontent.com/73601258/160000871-cfc2f2a5-2a59-4d27-8049-7754d003dd48.mp4\r\n\r\n\r\n\r\n## After\r\nhttps://user-images.githubusercontent.com/73601258/159998287-681ab475-ff33-4282-82ff-db751c59a392.mp4", + "milestone": "4.6.2", + "contributors": [ + "sidmohanty11", + "sampaiodiego" + ] + }, + { + "pr": "25095", + "title": "Release 4.6.1", + "userLogin": "sampaiodiego", + "contributors": [ + "dougfabris", + "sampaiodiego", + "gabriellsh", + "yash-rajpal", + "pierre-lehnen-rc" + ] + }, + { + "pr": "25022", + "title": "[FIX] Proxy settings being ignored", + "userLogin": "pierre-lehnen-rc", + "description": "Modify Meteor's `HTTP.call` to add back proxy support", + "milestone": "4.6.1", + "contributors": [ + "pierre-lehnen-rc", + "sampaiodiego" + ] + }, + { + "pr": "25082", + "title": "[FIX] Invitation links don't redirect to the registration form", + "userLogin": "yash-rajpal", + "milestone": "4.6.1", + "contributors": [ + "yash-rajpal" + ] + }, + { + "pr": "25069", + "title": "[FIX] FormData uploads not working", + "userLogin": "gabriellsh", + "milestone": "4.6.1", + "contributors": [ + "gabriellsh", + "dougfabris" + ] + }, + { + "pr": "25067", + "title": "[FIX] NPS never finishing sending results", + "userLogin": "sampaiodiego", + "milestone": "4.6.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25050", + "title": "[FIX] Upgrade Tab showing for a split second", + "userLogin": "gabriellsh", + "milestone": "4.6.1", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25055", + "title": "[FIX] UserAutoComplete not rendering UserAvatar correctly", + "userLogin": "dougfabris", + "description": "### before\r\n![Screen Shot 2022-04-04 at 16 50 21](https://user-images.githubusercontent.com/27704687/161620921-800bf66a-806d-4f83-b2e1-073c34215001.png)\r\n\r\n### after\r\n![Screen Shot 2022-04-04 at 16 49 00](https://user-images.githubusercontent.com/27704687/161620720-3e27774d-c241-46ca-b764-932a9295d709.png)", + "milestone": "4.6.1", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25180", + "title": "Chore: Remove duplicated useUserRoom", + "userLogin": "dougfabris", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25167", + "title": "Chore: TS migration SortList", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "24933", + "title": "[FIX] Deactivating user breaks if user is the only room owner", + "userLogin": "sidmohanty11", + "description": "## Before\r\n\r\nhttps://user-images.githubusercontent.com/73601258/160000871-cfc2f2a5-2a59-4d27-8049-7754d003dd48.mp4\r\n\r\n\r\n\r\n## After\r\nhttps://user-images.githubusercontent.com/73601258/159998287-681ab475-ff33-4282-82ff-db751c59a392.mp4", + "milestone": "4.6.2", + "contributors": [ + "sidmohanty11", + "sampaiodiego" + ] + }, + { + "pr": "25181", + "title": "Regression: Fix services Docker build on CI", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25089", + "title": "[FIX] UserCard sanitization", + "userLogin": "dougfabris", + "description": "- Rewrites the component to TS\r\n- Fixes some visual issues\r\n\r\n### before\r\n![Screen Shot 2022-04-07 at 00 23 11](https://user-images.githubusercontent.com/27704687/162113925-5c9484d1-23e9-4623-8b86-3fbc71b461a1.png)\r\n\r\n### after\r\n![Screen Shot 2022-04-07 at 00 07 13](https://user-images.githubusercontent.com/27704687/162112353-afd6aac6-b27c-4470-a642-631b8080d59e.png)", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25085", + "title": "Chore: move definitions to packages", + "userLogin": "ggazzo", + "milestone": "3.7.0", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25168", + "title": "Regression: CI playwright", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25125", + "title": "Chore: Convert NotificationStatus to TS", + "userLogin": "jeanfbrito", + "contributors": [ + "jeanfbrito", + "ggazzo" + ] + }, + { + "pr": "25148", + "title": "[FIX] Message menu action not working on legacy messages.", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25122", + "title": "Chore: Tests with Playwright (task: All works)", + "userLogin": "weslley543", + "contributors": [ + "weslley543" + ] + }, + { + "pr": "25129", + "title": "Chore: Remove old files from removed Omnichannel feature", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25128", + "title": "Chore: Convert admin custom sound to tsx", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25126", + "title": "Chore: Migrate oauth2server to typescript", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25123", + "title": "Chore: Convert LivechatAgentActivity to raw model and TS", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25124", + "title": "Chore: Remove unused Drone CI files", + "userLogin": "geekgonecrazy", + "contributors": [ + "geekgonecrazy", + "web-flow" + ] + }, + { + "pr": "25121", + "title": "Chore: Convert Mailer to TS", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti", + "sampaiodiego" + ] + }, + { + "pr": "25107", + "title": "Regression: Fix CI monorepo build", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25074", + "title": "Chore: Monorepo ", + "userLogin": "ggazzo", + "milestone": "3.7.0", + "contributors": [ + "sampaiodiego", + "ggazzo" + ] + }, + { + "pr": "25097", + "title": "[IMPROVE] Rename upgrade tab routes", + "userLogin": "guijun13", + "description": "Change 'upgrade tab' routes names from camelCase ('goFullyFeatured') to kebab-case ('go-fully-featured') due to URL naming consistency. Changed types, main function and test.", + "contributors": [ + "guijun13" + ] + }, + { + "pr": "25076", + "title": "Bump eslint-plugin-anti-trojan-source from 1.0.6 to 1.1.0", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24936", + "title": "[FIX] End call button disappearing when on-hold", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24932", + "title": "[FIX] Use correct room property for call ended at", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "25022", + "title": "[FIX] Proxy settings being ignored", + "userLogin": "pierre-lehnen-rc", + "description": "Modify Meteor's `HTTP.call` to add back proxy support", + "milestone": "4.6.1", + "contributors": [ + "pierre-lehnen-rc", + "sampaiodiego" + ] + }, + { + "pr": "25082", + "title": "[FIX] Invitation links don't redirect to the registration form", + "userLogin": "yash-rajpal", + "milestone": "4.6.1", + "contributors": [ + "yash-rajpal" + ] + }, + { + "pr": "23971", + "title": "[NEW] Message Template React Component", + "userLogin": "ggazzo", + "description": "Complete rewrite of the messages component in react. Visual changes should be minimal as well as user impact, with no break changes (unless you've customized the blaze template).\r\n\r\n\r\n\r\n![Screen Shot 2022-04-05 at 11 14 18](https://user-images.githubusercontent.com/27704687/161774027-38dd9c7b-eeeb-45e2-b9d8-ea2a9be8486d.png)\r\nIn case you encounter any problems, or want to compare, temporarily it is possible to use the old version\r\n\r\n\"image\"", + "contributors": [ + "ggazzo", + "sampaiodiego" + ] + }, + { + "pr": "25069", + "title": "[FIX] FormData uploads not working", + "userLogin": "gabriellsh", + "milestone": "4.6.1", + "contributors": [ + "gabriellsh", + "dougfabris" + ] + }, + { + "pr": "19866", + "title": "[FIX] Video and Audio not skipping forward", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler", + "tassoevan", + "web-flow", + "dougfabris" + ] + }, + { + "pr": "25067", + "title": "[FIX] NPS never finishing sending results", + "userLogin": "sampaiodiego", + "milestone": "4.6.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24405", + "title": "[IMPROVE] Add tooltip to sidebar room menu", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "web-flow", + "dougfabris" + ] + }, + { + "pr": "24431", + "title": "[IMPROVE] Added tooltip options for message menu", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "dougfabris" + ] + }, + { + "pr": "24166", + "title": "[FIX] Replace encrypted text to Encrypted Message Placeholder", + "userLogin": "yash-rajpal", + "description": "### before \r\n![image](https://user-images.githubusercontent.com/27704687/150807900-154a9cdb-ee13-4333-8628-f287ab914b40.png)\r\n\r\n### after\r\n\"Screenshot", + "milestone": "4.7.0", + "contributors": [ + "yash-rajpal", + "albuquerquefabio", + "web-flow" + ] + }, + { + "pr": "24984", + "title": "[FIX] Prevent sequential messages edited icon to hide on hover", + "userLogin": "dougfabris", + "description": "### before\r\n\"Screen\r\n\r\n### after\r\n\"Screen", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25024", + "title": "[IMPROVE] Improve active/hover colors in account sidebar", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664" + ] + }, + { + "pr": "24856", + "title": "[FIX] Full error message is visible", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "tassoevan" + ] + }, + { + "pr": "24708", + "title": "Chore: Cancel running jobs if PR is updated", + "userLogin": "debdutdeb", + "contributors": [ + "debdutdeb", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24900", + "title": "Chore: organize test files and fix code coverage", + "userLogin": "tmontini", + "contributors": [ + null, + "tmontini", + "rodrigok" + ] + }, + { + "pr": "24464", + "title": "Chore: Missing keys in APIsDisplay", + "userLogin": "dougfabris", + "milestone": "4.7.0", + "contributors": [ + "dougfabris", + "tassoevan" + ] + }, + { + "pr": "25057", + "title": "Bump ejson from 2.2.1 to 2.2.2", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25053", + "title": "Chore: Remove Alpine image deps after using them", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25052", + "title": "Bump pino and pino-pretty", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25050", + "title": "[FIX] Upgrade Tab showing for a split second", + "userLogin": "gabriellsh", + "milestone": "4.6.1", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25055", + "title": "[FIX] UserAutoComplete not rendering UserAvatar correctly", + "userLogin": "dougfabris", + "description": "### before\r\n![Screen Shot 2022-04-04 at 16 50 21](https://user-images.githubusercontent.com/27704687/161620921-800bf66a-806d-4f83-b2e1-073c34215001.png)\r\n\r\n### after\r\n![Screen Shot 2022-04-04 at 16 49 00](https://user-images.githubusercontent.com/27704687/161620720-3e27774d-c241-46ca-b764-932a9295d709.png)", + "milestone": "4.6.1", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25031", + "title": "Chore: TS conversion folder client", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "24991", + "title": "Bump minimist from 1.2.5 to 1.2.6 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25002", + "title": "Bump template-file from 6.0.0 to 6.0.1", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25042", + "title": "Bump body-parser from 1.19.2 to 1.20.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25043", + "title": "i18n: Language update from LingoHub 🤖 on 2022-04-04Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null + ] + }, + { + "pr": "25028", + "title": "Merge master into develop & Set version to 4.7.0-develop", + "userLogin": "sampaiodiego", + "contributors": [ + "AllanPazRibeiro", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "25027", + "title": "Release 4.6.0", + "userLogin": "sampaiodiego", + "contributors": [ + "pierre-lehnen-rc", + "aswinidev", + "web-flow", + "renatobecker", + "sampaiodiego", + "dependabot[bot]", + "lingohub[bot]", + "matheusbsilva137", + "amolghode1981", + "debdutdeb", + "eduardofcabrera", + "juliajforesti", + "tiagoevanp", + "KevLehman" + ] + }, + { + "pr": "25021", + "title": "Bump @rocket.chat/emitter from 0.31.4 to 0.31.9 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25020", + "title": "Bump @rocket.chat/ui-kit from 0.31.4 to 0.31.9 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25019", + "title": "Bump @rocket.chat/message-parser from 0.31.4 to 0.31.9 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25018", + "title": "Bump @rocket.chat/string-helpers from 0.31.4 to 0.31.9 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25017", + "title": "Regression: Add createdOTR index", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24998", + "title": "Release 4.5.5", + "userLogin": "sampaiodiego", + "contributors": [ + "MartinSchoeler", + "sampaiodiego", + "filipemarins", + "tiagoevanp" + ] + }, + { + "pr": "24994", + "title": "[FIX] High CPU usage caused by CallProvider", + "userLogin": "tiagoevanp", + "description": "Remove infinity loop inside useVoipClient hook.\r\n\r\n#closes #24970", + "milestone": "4.5.5", + "contributors": [ + "ggazzo", + "tiagoevanp" + ] + }, + { + "pr": "24955", + "title": "[FIX] Multiple issues starting a new DM", + "userLogin": "filipemarins", + "description": "When the room object is searched for the first time, it does not exist on the front object yet (subscription), adding a fallback search for room list will guarantee to search the room details.\r\n\r\nbefore:\r\nhttps://user-images.githubusercontent.com/9275105/160223241-d2319f3e-82c5-47d6-867f-695ab2361a17.mp4\r\n\r\nafter:\r\nhttps://user-images.githubusercontent.com/9275105/160223244-84d0d2a1-3d95-464d-8b8a-e264b0d4d690.mp4", + "milestone": "4.5.5", + "contributors": [ + "filipemarins", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24990", + "title": "Chore: Update Livechat", + "userLogin": "MartinSchoeler", + "milestone": "4.5.5", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24938", + "title": "Release 4.5.4", + "userLogin": "AllanPazRibeiro", + "contributors": [ + "geekgonecrazy", + "AllanPazRibeiro" + ] + }, + { + "pr": "24930", + "title": "[FIX] SAML Force name to string", + "userLogin": "geekgonecrazy", + "milestone": "4.5.4", + "contributors": [ + "geekgonecrazy", + "web-flow", + "pierre-lehnen-rc" + ] + }, + { + "pr": "25015", + "title": "Chore: Bump Fuselage packages", + "userLogin": "dougfabris", + "description": "It uses the last stable version of Fuselage packages.", + "milestone": "4.6.0", + "contributors": [ + "dougfabris", + "tassoevan" + ] + }, + { + "pr": "24999", + "title": "Regression: Custom roles displaying ID instead of name on some admin screens", + "userLogin": "pierre-lehnen-rc", + "description": "![image](https://user-images.githubusercontent.com/55164754/160981416-555bcaa1-c075-4260-937c-64523472da43.png)\r\n![image](https://user-images.githubusercontent.com/55164754/160981452-6eae4e74-8425-4073-8256-472aba72b9db.png)", + "milestone": "4.6.0", + "contributors": [ + "pierre-lehnen-rc", + "dougfabris", + "web-flow" + ] + }, + { + "pr": "24835", + "title": "[NEW] Upgrade Tab", + "userLogin": "gabriellsh", + "description": "![image](https://user-images.githubusercontent.com/27704687/160172260-c656282e-a487-4092-948d-d11c9bacb598.png)", + "milestone": "4.6.0", + "contributors": [ + "gabriellsh", + "dougfabris", + "web-flow", + "tassoevan", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24980", + "title": "Regression: Error is raised when there's no Asterisk queue available yet", + "userLogin": "amolghode1981", + "milestone": "4.6.0", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24994", + "title": "[FIX] High CPU usage caused by CallProvider", + "userLogin": "tiagoevanp", + "description": "Remove infinity loop inside useVoipClient hook.\r\n\r\n#closes #24970", + "milestone": "4.5.5", + "contributors": [ + "ggazzo", + "tiagoevanp" + ] + }, + { + "pr": "24955", + "title": "[FIX] Multiple issues starting a new DM", + "userLogin": "filipemarins", + "description": "When the room object is searched for the first time, it does not exist on the front object yet (subscription), adding a fallback search for room list will guarantee to search the room details.\r\n\r\nbefore:\r\nhttps://user-images.githubusercontent.com/9275105/160223241-d2319f3e-82c5-47d6-867f-695ab2361a17.mp4\r\n\r\nafter:\r\nhttps://user-images.githubusercontent.com/9275105/160223244-84d0d2a1-3d95-464d-8b8a-e264b0d4d690.mp4", + "milestone": "4.5.5", + "contributors": [ + "filipemarins", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24969", + "title": "Chore: Storybook mocking and examples improved", + "userLogin": "tassoevan", + "description": "- Stories from `ee/` included;\r\n- Differentiate root story kinds;\r\n- Mocking of `ServerContext` via Storybook parameters.", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24990", + "title": "Chore: Update Livechat", + "userLogin": "MartinSchoeler", + "milestone": "4.5.5", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24989", + "title": "Revert: [NEW] Engagement Statistics", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24897", + "title": "[FIX] Room archived/unarchived system messages aren't sent when editing room settings", + "userLogin": "matheusbsilva137", + "description": "- Send the \"Room archived\" and \"Room unarchived\" system messages when editing room settings (and not only when rooms are archived/unarchived with the slash-command);\r\n- Fix the \"Hide System Messages\" option for the \"Room archived\" and \"Room unarchived\" system messages;", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "24925", + "title": "Chore: add some missing REST definitions", + "userLogin": "gerzonc", + "description": "On the [mobile client](https://github.com/RocketChat/Rocket.Chat.ReactNative), we made an effort to collect more `REST API` definitions that are missing on the server side during our migration to TypeScript. Since we're both migrating to TypeScript, we thought it would be a good idea to share those so you guys can benefit from our initiative.", + "contributors": [ + "gerzonc" + ] + }, + { + "pr": "24971", + "title": "i18n: Language update from LingoHub 🤖 on 2022-03-28Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null + ] + }, + { + "pr": "24921", + "title": "[FIX] Register with Secret URL", + "userLogin": "yash-rajpal", + "contributors": [ + "yash-rajpal" + ] + }, + { + "pr": "24948", + "title": "Regression: Fix unexpected errors breaking ddp-streamer", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24320", + "title": "[FIX] LDAP avatars being rotated according to metadata even if the setting to rotate uploads is off", + "userLogin": "matheusbsilva137", + "description": "- Use the `FileUpload_RotateImages` setting (**Administration > File Upload > Rotate images on upload**) to control whether avatars should be rotated automatically based on their data (XEIF);\r\n- Display the avatar image preview (orientation) according to the `FileUpload_RotateImages` setting.", + "milestone": "4.6.0", + "contributors": [ + "matheusbsilva137", + "web-flow", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24930", + "title": "[FIX] SAML Force name to string", + "userLogin": "geekgonecrazy", + "milestone": "4.5.4", + "contributors": [ + "geekgonecrazy", + "web-flow", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24908", + "title": "Regression: Call doesn't stop ringing after agent unregistration", + "userLogin": "MartinSchoeler", + "milestone": "4.6.0", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24777", + "title": "[NEW] Engagement Statistics", + "userLogin": "eduardofcabrera", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24920", + "title": "Regression: Fix account service login expiration", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24867", + "title": "[FIX] Duplicated \"jump to message\" button on starred messages", + "userLogin": "Himanshu664", + "contributors": [ + "Himanshu664" + ] + }, + { + "pr": "24860", + "title": "[FIX] External search providers not working", + "userLogin": "tkurz", + "contributors": [ + "tkurz" + ] + }, + { + "pr": "24052", + "title": "[FIX] Several issues related to custom roles", + "userLogin": "pierre-lehnen-rc", + "description": "- Throw an error when trying to delete a role (User or Subscription role) that are still being used;\r\n- Fix \"Invalid Role\" error for custom roles in Role Editing sidebar;\r\n- Fix \"Users in Role\" screen for custom roles.", + "milestone": "4.6.0", + "contributors": [ + "pierre-lehnen-rc", + "matheusbsilva137", + "web-flow" + ] + }, + { + "pr": "24781", + "title": "[NEW] Telemetry Events", + "userLogin": "eduardofcabrera", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24887", + "title": "[IMPROVE] Adding new statistics related to voip and omnichannel", + "userLogin": "cauefcr", + "description": "- Total of Canned response messages sent\r\n- Total of tags used\r\n- Last-Chatted Agent Preferred (enabled/disabled)\r\n- Assign new conversations to the contact manager (enabled/disabled)\r\n- How to handle Visitor Abandonment setting\r\n- Amount of chats placed on hold\r\n- VoIP Enabled\r\n- Amount of VoIP Calls\r\n- Amount of VoIP Extensions connected\r\n- Amount of Calls placed on hold (1x per call)\r\n- Fixed Session Aggregation type definitions", + "milestone": "4.6.0", + "contributors": [ + "cauefcr", + "KevLehman" + ] + }, + { + "pr": "24911", + "title": "Chore: Remove old scripts", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24898", + "title": "[FIX] DDP Rate Limiter Translation key", + "userLogin": "gabriellsh", + "description": "Before:\r\n\"image\"\r\n\r\n\r\nNow:\r\n\"image\"", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "24831", + "title": "[FIX][ENTERPRISE] Notifications not being sent by ddp-streamer", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24884", + "title": "Release 4.5.3", + "userLogin": "AllanPazRibeiro", + "contributors": [ + "tiagoevanp", + "sampaiodiego", + "KevLehman", + "amolghode1981", + "ggazzo" + ] + }, + { + "pr": "24901", + "title": "[FIX] Custom script not being fired", + "userLogin": "ggazzo", + "milestone": "4.5.3", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "24877", + "title": "Chore: Fix MongoDB versions on release notes", + "userLogin": "sampaiodiego", + "milestone": "4.5.3", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24864", + "title": "[FIX] Disable voip button when call is in progress", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24863", + "title": "[FIX] Broken build caused by PRs modifying same file differently", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman", + "tiagoevanp" + ] + }, + { + "pr": "24838", + "title": "[FIX] [VOIP] SidebarFooter component ", + "userLogin": "tiagoevanp", + "description": "- Improve the CallProvider code;\r\n- Adjust the text case of the VoIP component on the FooterSidebar;\r\n- Fix the bad behavior with the changes in queue's name.", + "milestone": "4.5.3", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24837", + "title": "[IMPROVE] Standarize queue behavior for managers and agents when subscribing", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24829", + "title": "[FIX] Show only enabled departments on forward", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24799", + "title": "[FIX] Wrong param usage on queue summary call", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24789", + "title": "[FIX] VoIP button gets disabled whenever user status changes", + "userLogin": "amolghode1981", + "milestone": "4.5.3", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24752", + "title": "[FIX] Show call icon only when user has extension associated", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24748", + "title": "[IMPROVE] UX - VoIP Call Component", + "userLogin": "tiagoevanp", + "milestone": "4.5.3", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24814", + "title": "Release 4.5.2", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "MartinSchoeler", + "pierre-lehnen-rc", + "tassoevan", + "debdutdeb", + "KevLehman", + "murtaza98", + "sampaiodiego", + "juliajforesti" + ] + }, + { + "pr": "24812", + "title": "[FIX] Revert AutoComplete", + "userLogin": "juliajforesti", + "milestone": "4.5.2", + "contributors": [ + "juliajforesti", + "ggazzo" + ] + }, + { + "pr": "24809", + "title": "Regression: Fix ParentRoomWithEndpointData in loop", + "userLogin": "sampaiodiego", + "milestone": "4.5.2", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24732", + "title": "[FIX] `PaginatedSelectFiltered` not handling changes", + "userLogin": "tassoevan", + "milestone": "4.5.2", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24805", + "title": "[FIX] Critical: Incorrect visitor getting assigned to a chat from apps", + "userLogin": "murtaza98", + "milestone": "4.5.2", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24804", + "title": "[FIX] \"livechat/webrtc.call\" endpoint not working", + "userLogin": "murtaza98", + "milestone": "4.5.2", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24792", + "title": "[FIX] VoipExtensionsPage component call", + "userLogin": "KevLehman", + "milestone": "4.5.2", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24705", + "title": "[FIX] Broken multiple OAuth integrations", + "userLogin": "debdutdeb", + "milestone": "4.5.2", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "24623", + "title": "[FIX] Opening a new DM from user card", + "userLogin": "tassoevan", + "description": "A race condition on `useRoomIcon` -- delayed merge of rooms and subscriptions -- was causing a UI crash whenever someone tried to open a DM from the user card component.", + "milestone": "4.5.2", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24750", + "title": "[IMPROVE] Voip Extensions disabled state", + "userLogin": "MartinSchoeler", + "milestone": "4.5.2", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24782", + "title": "Release 4.5.1", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "renatobecker", + "pierre-lehnen-rc", + "sampaiodiego", + "matheusbsilva137", + "amolghode1981", + "juliajforesti", + "tiagoevanp", + "KevLehman", + "MartinSchoeler", + "Aman-Maheshwari", + "cuonghuunguyen" + ] + }, + { + "pr": "24760", + "title": "[FIX] Apple login script being loaded even when Apple Login is disabled.", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.5.1", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "24754", + "title": "Chore: Update Livechat", + "userLogin": "MartinSchoeler", + "milestone": "4.5.1", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24683", + "title": "[FIX] no id of room closer in livechat-close message", + "userLogin": "cuonghuunguyen", + "milestone": "4.5.1", + "contributors": [ + null + ] + }, + { + "pr": "23795", + "title": "[FIX] Reload roomslist after successful deletion of a room from admin panel.", + "userLogin": "Aman-Maheshwari", + "description": "Removed the logic for calling the `rooms.adminRooms` endPoint from the `RoomsTable` Component and moved it to its parent component `RoomsPage`.\r\nThis allows to call the endPoint `rooms.adminRooms` from `EditRoomContextBar` Component which is also has `RoomPage` Component as its parent.\r\n\r\nAlso added a succes toast message after the successful deletion of room.", + "milestone": "4.5.1", + "contributors": [ + "Aman-Maheshwari", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "24743", + "title": "[FIX] System messages are sent when adding or removing a group from a team", + "userLogin": "matheusbsilva137", + "description": "- Do not send system messages when adding or removing a new or existing _group_ from a team.", + "milestone": "4.5.1", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "24737", + "title": "[FIX] Typo and placeholder on wrap up call modal", + "userLogin": "MartinSchoeler", + "milestone": "4.5.1", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24680", + "title": "[FIX] Show only available agents on extension association modal", + "userLogin": "KevLehman", + "milestone": "4.5.1", + "contributors": [ + "KevLehman", + "tiagoevanp" + ] + }, + { + "pr": "24607", + "title": "[FIX] VoIP Enable/Disable setting on CallContext/CallProvider Notifications", + "userLogin": "tiagoevanp", + "milestone": "4.5.1", + "contributors": [ + "tiagoevanp", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "24677", + "title": "[FIX] Components for user search", + "userLogin": "juliajforesti", + "milestone": "4.5.1", + "contributors": [ + "juliajforesti", + "tassoevan", + "web-flow" + ] + }, + { + "pr": "24657", + "title": "[FIX] Voip Stream Reinitialization Error", + "userLogin": "amolghode1981", + "milestone": "4.5.1", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24696", + "title": "[FIX] Room's message count not being incremented on import", + "userLogin": "matheusbsilva137", + "description": "- Fix rooms' message counter not being incremented on message import.", + "milestone": "4.5.1", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "24674", + "title": "[FIX] Missing username on messages imported from Slack", + "userLogin": "matheusbsilva137", + "description": "- Fix missing sender's username on messages imported from Slack.", + "milestone": "4.5.1", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "24590", + "title": "[FIX] Duplicated 'name' log key", + "userLogin": "sampaiodiego", + "milestone": "4.5.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24661", + "title": "[FIX] Typo in wrap-up term", + "userLogin": "renatobecker", + "milestone": "4.5.1", + "contributors": [ + "renatobecker" + ] + }, + { + "pr": "24606", + "title": "[FIX] Push privacy config to not show username not being respected", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24901", + "title": "[FIX] Custom script not being fired", + "userLogin": "ggazzo", + "milestone": "4.5.3", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "24896", + "title": "[FIX] Wrong business hour behavior", + "userLogin": "murtaza98", + "milestone": "4.6.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24845", + "title": "[FIX] Ignore customClass on messages", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24879", + "title": "[FIX] Apple OAuth", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24895", + "title": "i18n: Language update from LingoHub 🤖 on 2022-03-21Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null + ] + }, + { + "pr": "24749", + "title": "[IMPROVE] New omnichannel statistics and async statistics processing.", + "userLogin": "cauefcr", + "description": "https://app.clickup.com/t/1z4zg4e", + "contributors": [ + "cauefcr" + ] + }, + { + "pr": "24882", + "title": "[FIX] Missing dependency on useEffect at CallProvider", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24877", + "title": "Chore: Fix MongoDB versions on release notes", + "userLogin": "sampaiodiego", + "milestone": "4.5.3", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24779", + "title": "[FIX] auto-join team channels not honoring user preferences", + "userLogin": "ostjen", + "contributors": [ + "ostjen" + ] + }, + { + "pr": "24869", + "title": "Bump pino from 7.8.1 to 7.9.1 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24870", + "title": "Bump pino-pretty from 7.5.3 to 7.5.4 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24864", + "title": "[FIX] Disable voip button when call is in progress", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24863", + "title": "[FIX] Broken build caused by PRs modifying same file differently", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman", + "tiagoevanp" + ] + }, + { + "pr": "24850", + "title": "Regression: Role Sync not always working", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "24838", + "title": "[FIX] [VOIP] SidebarFooter component ", + "userLogin": "tiagoevanp", + "description": "- Improve the CallProvider code;\r\n- Adjust the text case of the VoIP component on the FooterSidebar;\r\n- Fix the bad behavior with the changes in queue's name.", + "milestone": "4.5.3", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24837", + "title": "[IMPROVE] Standarize queue behavior for managers and agents when subscribing", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24789", + "title": "[FIX] VoIP button gets disabled whenever user status changes", + "userLogin": "amolghode1981", + "milestone": "4.5.3", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24799", + "title": "[FIX] Wrong param usage on queue summary call", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24829", + "title": "[FIX] Show only enabled departments on forward", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24823", + "title": "i18n: Language update from LingoHub 🤖 on 2022-03-14Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null, + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24833", + "title": "Bump @types/mailparser from 3.0.2 to 3.4.0", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24832", + "title": "Bump @types/clipboard from 2.0.1 to 2.0.7", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24822", + "title": "Bump @types/nodemailer from 6.4.2 to 6.4.4", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24821", + "title": "Bump body-parser from 1.19.0 to 1.19.2", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24820", + "title": "Bump @types/ws from 8.5.2 to 8.5.3 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24764", + "title": "Chore: Add E2E tests for livechat/visitor", + "userLogin": "Muramatsu2602", + "description": "- Create a new test suite file under tests/end-to-end/api/livechat\r\n- Create tests for the following endpoints:\r\n + livechat/visitor (create visitor, update visitor, add custom fields to visitors)", + "contributors": [ + "Muramatsu2602", + "KevLehman" + ] + }, + { + "pr": "24729", + "title": "Chore: Add E2E tests for livechat/room.close", + "userLogin": "Muramatsu2602", + "description": "* Create a new test suite file under tests/end-to-end/api/livechat\r\n * Create tests for the following endpoint:\r\n\t + ivechat/room.close", + "contributors": [ + "Muramatsu2602", + "web-flow", + "KevLehman" + ] + }, + { + "pr": "24785", + "title": "[FIX] German translation for Monitore", + "userLogin": "JMoVS", + "contributors": [ + "JMoVS", + "web-flow" + ] + }, + { + "pr": "24812", + "title": "[FIX] Revert AutoComplete", + "userLogin": "juliajforesti", + "milestone": "4.5.2", + "contributors": [ + "juliajforesti", + "ggazzo" + ] + }, + { + "pr": "24747", + "title": "Chore: APIClass types", + "userLogin": "felipe-rod123", + "description": "This pull request creates a new `restivus` module (.d.ts) for the `api.js` file.", + "contributors": [ + "felipe-rod123", + "ggazzo" + ] + }, + { + "pr": "24801", + "title": "Bump is-svg from 4.3.1 to 4.3.2", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24803", + "title": "Bump prometheus-gc-stats from 0.6.2 to 0.6.3", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24810", + "title": "Chore: Skip local services changes when shutting down duplicated services", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24629", + "title": "[FIX] \"Match error\" when converting a team to a channel", + "userLogin": "matheusbsilva137", + "description": "- Fix \"Match error\" when trying to convert a channel to a team;", + "milestone": "4.6.0", + "contributors": [ + "matheusbsilva137", + "web-flow" + ] + }, + { + "pr": "24809", + "title": "Regression: Fix ParentRoomWithEndpointData in loop", + "userLogin": "sampaiodiego", + "milestone": "4.5.2", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24397", + "title": "Chore: Get Settings Statistics", + "userLogin": "albuquerquefabio", + "contributors": [ + "albuquerquefabio" + ] + }, + { + "pr": "24732", + "title": "[FIX] `PaginatedSelectFiltered` not handling changes", + "userLogin": "tassoevan", + "milestone": "4.5.2", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24628", + "title": "Chore: converted more hooks to typescript", + "userLogin": "felipe-rod123", + "description": "Converted some functions on `client/hooks/` from JavaScript to Typescript.", + "contributors": [ + "felipe-rod123", + "ggazzo" + ] + }, + { + "pr": "24506", + "title": "Chore: added settings endpoint types", + "userLogin": "felipe-rod123", + "description": "Created typing for endpoint definitions on `settings.ts`.", + "contributors": [ + "felipe-rod123", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "24226", + "title": "[FIX] Handle Other Formats inside Upload Avatar", + "userLogin": "nishant23122000", + "description": "After resolving issue #24213 : \r\n\r\n\r\nhttps://user-images.githubusercontent.com/53515714/150325012-91413025-786e-4ce0-ae75-629f6b05b024.mp4", + "milestone": "4.6.0", + "contributors": [ + "nishant23122000", + "debdutdeb", + "web-flow", + "murtaza98" + ] + }, + { + "pr": "24424", + "title": "[FIX] Prune Message issue", + "userLogin": "nishant23122000", + "milestone": "4.6.0", + "contributors": [ + "nishant23122000", + "debdutdeb", + "web-flow" + ] + }, + { + "pr": "24805", + "title": "[FIX] Critical: Incorrect visitor getting assigned to a chat from apps", + "userLogin": "murtaza98", + "milestone": "4.5.2", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24804", + "title": "[FIX] \"livechat/webrtc.call\" endpoint not working", + "userLogin": "murtaza98", + "milestone": "4.5.2", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24507", + "title": "Chore: added Server Instances endpoint types", + "userLogin": "felipe-rod123", + "description": "Created typing for endpoint definitions on `instances.ts`.", + "contributors": [ + "felipe-rod123" + ] + }, + { + "pr": "24758", + "title": "[FIX] Prevent call button toggle when user is on call", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24800", + "title": "Regression: Register services right away", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24792", + "title": "[FIX] VoipExtensionsPage component call", + "userLogin": "KevLehman", + "milestone": "4.5.2", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24384", + "title": "Chore: Convert server functions from javascript to typescript", + "userLogin": "felipe-rod123", + "description": "This pull request will be used to rewrite some functions on the Chat Engine to Typescript, in order to increase security and specify variable types on the code.", + "contributors": [ + "felipe-rod123", + "ggazzo" + ] + }, + { + "pr": "24705", + "title": "[FIX] Broken multiple OAuth integrations", + "userLogin": "debdutdeb", + "milestone": "4.5.2", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "24793", + "title": "[FIX][ENTERPRISE] Auto reload feature of ddp-streamer micro service", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24783", + "title": "Bump pino from 7.8.0 to 7.8.1 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "23121", + "title": "Bump jschardet from 1.6.0 to 3.0.0", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24752", + "title": "[FIX] Show call icon only when user has extension associated", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24623", + "title": "[FIX] Opening a new DM from user card", + "userLogin": "tassoevan", + "description": "A race condition on `useRoomIcon` -- delayed merge of rooms and subscriptions -- was causing a UI crash whenever someone tried to open a DM from the user card component.", + "milestone": "4.5.2", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24750", + "title": "[IMPROVE] Voip Extensions disabled state", + "userLogin": "MartinSchoeler", + "milestone": "4.5.2", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24748", + "title": "[IMPROVE] UX - VoIP Call Component", + "userLogin": "tiagoevanp", + "milestone": "4.5.3", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24753", + "title": "Chore: Micro services fixes and cleanup", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24756", + "title": "Regression: Improve Sidenav open/close handling and fixed codeql configs and E2E tests", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "24760", + "title": "[FIX] Apple login script being loaded even when Apple Login is disabled.", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.5.1", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "24754", + "title": "Chore: Update Livechat", + "userLogin": "MartinSchoeler", + "milestone": "4.5.1", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24683", + "title": "[FIX] no id of room closer in livechat-close message", + "userLogin": "cuonghuunguyen", + "milestone": "4.5.1", + "contributors": [ + null + ] + }, + { + "pr": "24771", + "title": "Chore: fix grammatical errors in Features", + "userLogin": "aadishJ01", + "contributors": [ + "aadishJ01", + "web-flow" + ] + }, + { + "pr": "24759", + "title": "Chore: Fix grammatical errors in Code of Conduct", + "userLogin": "aadishJ01", + "contributors": [ + "aadishJ01", + "web-flow" + ] + }, + { + "pr": "23795", + "title": "[FIX] Reload roomslist after successful deletion of a room from admin panel.", + "userLogin": "Aman-Maheshwari", + "description": "Removed the logic for calling the `rooms.adminRooms` endPoint from the `RoomsTable` Component and moved it to its parent component `RoomsPage`.\r\nThis allows to call the endPoint `rooms.adminRooms` from `EditRoomContextBar` Component which is also has `RoomPage` Component as its parent.\r\n\r\nAlso added a succes toast message after the successful deletion of room.", + "milestone": "4.5.1", + "contributors": [ + "Aman-Maheshwari", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "24743", + "title": "[FIX] System messages are sent when adding or removing a group from a team", + "userLogin": "matheusbsilva137", + "description": "- Do not send system messages when adding or removing a new or existing _group_ from a team.", + "milestone": "4.5.1", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "24544", + "title": "Chore: Fix Cypress tests", + "userLogin": "rodrigok", + "contributors": [ + "rodrigok", + "tassoevan", + "dougfabris" + ] + }, + { + "pr": "24737", + "title": "[FIX] Typo and placeholder on wrap up call modal", + "userLogin": "MartinSchoeler", + "milestone": "4.5.1", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24739", + "title": "[IMPROVE][ENTERPRISE] Don't start presence monitor when running micro services", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24738", + "title": "[FIX][ENTERPRISE] DDP streamer not sending data to all clients", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24680", + "title": "[FIX] Show only available agents on extension association modal", + "userLogin": "KevLehman", + "milestone": "4.5.1", + "contributors": [ + "KevLehman", + "tiagoevanp" + ] + }, + { + "pr": "24710", + "title": "[FIX] DDP streamer errors", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24724", + "title": "[FIX][ENTERPRISE] Presence micro service logic", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24717", + "title": "i18n: Language update from LingoHub 🤖 on 2022-03-07Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null, + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24607", + "title": "[FIX] VoIP Enable/Disable setting on CallContext/CallProvider Notifications", + "userLogin": "tiagoevanp", + "milestone": "4.5.1", + "contributors": [ + "tiagoevanp", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "24726", + "title": "Chore: Improve logger to allow log of `unknown` values", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24677", + "title": "[FIX] Components for user search", + "userLogin": "juliajforesti", + "milestone": "4.5.1", + "contributors": [ + "juliajforesti", + "tassoevan", + "web-flow" + ] + }, + { + "pr": "24542", + "title": "[FIX] Date Message Export Filter Fix", + "userLogin": "eduardofcabrera", + "description": "Fix message export filter to get all messages between \"from date\" and \"to date\", including \"to date\".", + "contributors": [ + "eduardofcabrera", + "web-flow" + ] + }, + { + "pr": "24709", + "title": "[FIX] API Error preventing adding an email to users without one (like bot/app users)", + "userLogin": "debdutdeb", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "24716", + "title": "Bump ts-node from 10.6.0 to 10.7.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24476", + "title": "[FIX] Nextcloud OAuth for incomplete token URL", + "userLogin": "debdutdeb", + "milestone": "4.6.0", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "24657", + "title": "[FIX] Voip Stream Reinitialization Error", + "userLogin": "amolghode1981", + "milestone": "4.5.1", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24698", + "title": "Bump pino-pretty from 7.5.2 to 7.5.3 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24696", + "title": "[FIX] Room's message count not being incremented on import", + "userLogin": "matheusbsilva137", + "description": "- Fix rooms' message counter not being incremented on message import.", + "milestone": "4.5.1", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "23824", + "title": "Chore: Improvements on role syncing (ldap, oauth and saml)", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "tassoevan" + ] + }, + { + "pr": "24689", + "title": "Bump pino-pretty from 7.5.1 to 7.5.2 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24674", + "title": "[FIX] Missing username on messages imported from Slack", + "userLogin": "matheusbsilva137", + "description": "- Fix missing sender's username on messages imported from Slack.", + "milestone": "4.5.1", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "24642", + "title": "Bump actions/setup-node from 2 to 3", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24644", + "title": "i18n: Language update from LingoHub 🤖 on 2022-02-28Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null, + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24590", + "title": "[FIX] Duplicated 'name' log key", + "userLogin": "sampaiodiego", + "milestone": "4.5.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24668", + "title": "Bump actions/checkout from 2 to 3", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24574", + "title": "Chore(deps-dev): Bump @types/mock-require from 2.0.0 to 2.0.1", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24667", + "title": "Bump ts-node from 10.5.0 to 10.6.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24666", + "title": "Bump @types/ws from 8.2.3 to 8.5.2 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24640", + "title": "Bump url-parse from 1.5.7 to 1.5.10", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24653", + "title": "Merge master into develop & Set version to 4.6.0-develop", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "web-flow" + ] + }, + { + "pr": "24652", + "title": "Release 4.5.0", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "sampaiodiego", + "web-flow", + "aswinidev", + "debdutdeb", + "dependabot[bot]", + "lingohub[bot]", + "ostjen", + "KevLehman", + "dougfabris", + "LucasFASouza", + "felipe-rod123", + "guijun13", + "pierre-lehnen-rc", + "filipemarins", + "matheusbsilva137", + "gabriellsh" + ] + }, + { + "pr": "24661", + "title": "[FIX] Typo in wrap-up term", + "userLogin": "renatobecker", + "milestone": "4.5.1", + "contributors": [ + "renatobecker" + ] + }, + { + "pr": "24028", + "title": "[IMPROVE] Updated links in readme", + "userLogin": "aswinidev", + "contributors": [ + "aswinidev", + "web-flow", + "debdutdeb" + ] + }, + { + "pr": "24651", + "title": "Chore: Update Apps-Engine", + "userLogin": "d-gubert", + "milestone": "4.5.0", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "24649", + "title": "Regression: Refresh server connection when MI server settings change", + "userLogin": "KevLehman", + "milestone": "4.5.0", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24648", + "title": "Regression: Prevent button from losing state when rerendering", + "userLogin": "KevLehman", + "milestone": "4.5.0", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24585", + "title": "Regression: Error setting user avatars and mentioning rooms on Slack Import", + "userLogin": "matheusbsilva137", + "description": "- Fix `Mentioned room not found` error when importing rooms from Slack;\r\n- Fix `Forbidden` error when setting avatars for users imported from Slack (on user import/creation);\r\n- Fix incorrect message count on imported rooms;\r\n- Fix missing username on messages imported from Slack;", + "contributors": [ + "matheusbsilva137", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24647", + "title": "Regression: Fix wrong tab name for VoIP settings", + "userLogin": "renatobecker", + "milestone": "4.5.0", + "contributors": [ + "renatobecker" + ] + }, + { + "pr": "24646", + "title": "Regression: Server crashing if Voip credentials are invalid", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24645", + "title": "Regression: Extension List panel UI not aligned with designs", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24635", + "title": "Regression: Queue counter aggregator for incoming/hanged calls", + "userLogin": "amolghode1981", + "milestone": "4.5.0", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24630", + "title": "Regression: Fix double value on holdTime and empty msg on last message", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler", + "web-flow" + ] + }, + { + "pr": "24624", + "title": "Regression: If Asterisk suddenly goes down, server has no way to know. Causes server to get stuck. Needs restart", + "userLogin": "amolghode1981", + "milestone": "4.5.0", + "contributors": [ + "amolghode1981", + "KevLehman" + ] + }, + { + "pr": "24601", + "title": "Regression: Prevent connect to asterisk when VoIP is disabled", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98", + "web-flow", + "KevLehman" + ] + }, + { + "pr": "24626", + "title": "Regression: Encode registration info as JWT when signing key is provided", + "userLogin": "KevLehman", + "milestone": "4.5.0", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24625", + "title": "Regression: Fix time fields and wrap up in Voip Room Contexual bar", + "userLogin": "MartinSchoeler", + "milestone": "4.5.0", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24592", + "title": "Regression: Fix in-correct room status shown to agents", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24619", + "title": "Regression: Do not show toast on incoming voip calls", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98", + "web-flow" + ] + }, + { + "pr": "24616", + "title": "Regression: Fix incoming voip call ringtone is not ringing", + "userLogin": "murtaza98", + "contributors": [ + "murtaza98", + "web-flow" + ] + }, + { + "pr": "24610", + "title": "Regression: Mark all rooms as read modal closing instantly.", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "24615", + "title": "Regression: Fix translation for call started message", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98", + "web-flow" + ] + }, + { + "pr": "24594", + "title": "Regression: Bunch of settings fixes for VoIP", + "userLogin": "MartinSchoeler", + "milestone": "4.5.0", + "contributors": [ + "MartinSchoeler", + "web-flow" + ] + }, + { + "pr": "24609", + "title": "Regression: Admin Sidebar colors inverted.", + "userLogin": "gabriellsh", + "milestone": "4.5.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "24602", + "title": "Regression: No audio when call comes from Skype/IP phone", + "userLogin": "amolghode1981", + "description": "The audio was not rendered because of re-rendering of react element based on\r\nqueueCounter and roomInfo. queueCounter and roomInfo cause the dom to re-render when call gets accepted\r\nbecause after accepting call, queueCounter changes or a room gets created.\r\nThe audio element gets recreated. But VoIP user probably holds the old one.\r\nThe behaviour is not predictable when such case happens. If everything gets cleanly setup,\r\neven if the audio element goes headless, it still continues to play the remote audio.\r\nBut in other cases, it is unreferenced the one on dom has its srcObject as null.\r\nThis causes no audio.\r\n\r\nThis fix provides a way to re-initialise the rendering elements in VoIP user\r\nand calls this function on useEffect() if the re-render has happen.", + "milestone": "4.5.0", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24596", + "title": "Regression: Fixes in Voice Contextual Bar and Directory", + "userLogin": "MartinSchoeler", + "milestone": "4.5.0", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24603", + "title": "Regression: Fix time format on Voip system messages", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24598", + "title": "Regression: VoIP service button displayed when VoIP is disabled", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24581", + "title": "Regression: Add support to namespace within micro services", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24583", + "title": "Regression: Error when trying to load name of dm rooms for avatars and notifications", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "24567", + "title": "[NEW] Marketplace sort filter", + "userLogin": "ujorgeleite", + "description": "Implemented a sort filter for the marketplace screen. This component sorts the marketplace apps list in 4 ways, alphabetical order(A-Z), inverse alphabetical order(Z-A), most recently updated(MRU), and least recent updated(LRU). Besides that, I've generalized some components and types to increase code reusability, renamed some helpers as well as deleted some useless ones, and inserted the necessary new translations on the English i18n dictionary.\r\nDemo gif:\r\n![Marketplace sort filter](https://user-images.githubusercontent.com/43561537/155033709-e07a6306-a85a-4f7f-9624-b53ba5dd7fa9.gif)", + "milestone": "4.5.0", + "contributors": [ + "rique223", + "ujorgeleite" + ] + }, + { + "pr": "23102", + "title": "[NEW] VoIP Support for Omnichannel", + "userLogin": "KevLehman", + "description": "- Created VoipService to manage VoIP connections and PBX connection\r\n- Created LivechatVoipService that will handle custom cases for livechat (creating rooms, assigning chats to queue, actions when call is finished, etc)\r\n- Created Basic interfaces to support new services and new model\r\n- Created Endpoints for management interfaces\r\n- Implemented asterisk connector on VoIP service\r\n- Created UI components to show calls incoming and to allow answering/rejecting calls\r\n- Added new settings to control call server/management server connection values\r\n- Added endpoints to associate Omnichannel Agents with PBX Extensions\r\n- Added support for event listening on server side, to get metadata about calls being received/ongoing\r\n- Created new pages to update settings & to see user-extension association\r\n- Created new page to see ongoing calls (and past calls)\r\n- Added support for remote hangup/hold on calls\r\n- Implemented call metrics calculation (hold time, waiting time, talk time)\r\n- Show a notificaiton when call is received", + "milestone": "4.5.0", + "contributors": [ + "KevLehman", + "amolghode1981", + "web-flow", + "tiagoevanp", + "murtaza98", + "MartinSchoeler" + ] + }, + { + "pr": "24562", + "title": "Regression: Fix room not getting created due to null visitor status", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24573", + "title": "Chore: Bump Fuselage packages", + "userLogin": "tassoevan", + "description": "It uses the last stable version of Fuselage packages.", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24558", + "title": "i18n: Language update from LingoHub 🤖 on 2022-02-21Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null, + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24572", + "title": "[FIX] 2FA via email when logging in using OAuth", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24568", + "title": "Chore: Update Apps-Engine", + "userLogin": "d-gubert", + "milestone": "4.5.0", + "contributors": [ + "d-gubert", + "web-flow" + ] + }, + { + "pr": "24536", + "title": "Chore: roomTypes: Stop mixing client and server code together", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.5.0", + "contributors": [ + "pierre-lehnen-rc", + "tassoevan", + "web-flow" + ] + }, + { + "pr": "24529", + "title": "[IMPROVE] Replace AutoComplete in UserAutoComplete & UserAutoCompleteMultiple components", + "userLogin": "juliajforesti", + "description": "This PR replaces a deprecated fuselage's component `AutoComplete` in favor of `Select` and `MultiSelect` which fixes some of UX/UI issues in selecting users\r\n\r\n### before\r\n![Screen Shot 2022-02-19 at 13 33 28](https://user-images.githubusercontent.com/27704687/154809737-8181a06c-4f20-48ea-90f7-01e828b9a452.png)\r\n\r\n### after\r\n![Screen Shot 2022-02-19 at 13 30 58](https://user-images.githubusercontent.com/27704687/154809653-a8ec9a80-c0dd-4a25-9c00-0f96147d79e9.png)", + "contributors": [ + "juliajforesti", + "dougfabris", + "tassoevan" + ] + }, + { + "pr": "24513", + "title": "Chore: Run tests using microservices deployment on CI", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow", + "rodrigok" + ] + }, + { + "pr": "24556", + "title": "Bump @types/ws from 8.2.2 to 8.2.3 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24501", + "title": "Chore: Update fuselage deps to match monolith versions", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24538", + "title": "Bump adm-zip from 0.4.14 to 0.5.9", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24454", + "title": "[IMPROVE] Purchase Type Filter for marketplace apps and Categories filter anchor refactoring", + "userLogin": "rique223", + "description": "Implemented a filter by purchase type(free or paid) component for the apps screen of the marketplace. Besides that, new entries on the dictionary, fixed some parts of the App type (purchaseType was typed as unknown and price as string), and created some helpers to work alongside the filter. Will be refactoring the categories filter anchor and then will open this PR for reviews.\r\n\r\nDemo gif:\r\n![purchaseTypeFIlter](https://user-images.githubusercontent.com/43561537/153101228-7b7ebdc3-2d34-420f-aa9d-f7cbc8d4b53f.gif)\r\n\r\nRefactored the categories filter anchor from a plain fuselage select to a select button with dynamic colors.\r\nDemo gif:\r\n![New categories filter anchor(PR)](https://user-images.githubusercontent.com/43561537/153422427-28012b7d-e0ec-45f4-861d-c9368c57ad04.gif)", + "contributors": [ + "rique223", + "dougfabris", + "web-flow" + ] + }, + { + "pr": "24475", + "title": "[IMPROVE] Skip encryption for slash commands in E2E rooms", + "userLogin": "yash-rajpal", + "description": "Currently Slash Commands don't work in an E2EE room, as we encrypt the message before slash command is detected by the server, So removed encryption for slash commands in e2e rooms.", + "contributors": [ + "yash-rajpal", + "albuquerquefabio", + "web-flow" + ] + }, + { + "pr": "24304", + "title": "Chore: Js to ts slash commands archive", + "userLogin": "eduardofcabrera", + "description": "Convert Slash Commands archive files to typescript", + "contributors": [ + "eduardofcabrera", + "web-flow" + ] + }, + { + "pr": "24114", + "title": "[NEW] E2E password generator", + "userLogin": "ostjen", + "contributors": [ + "ostjen", + "web-flow", + "eduardofcabrera", + "tassoevan" + ] + }, + { + "pr": "24553", + "title": "[FIX] Omnichannel managers can't join chats in progress", + "userLogin": "renatobecker", + "milestone": "4.5.0", + "contributors": [ + "renatobecker", + "murtaza98", + "web-flow" + ] + }, + { + "pr": "24559", + "title": "[FIX] Room context tabs not working in Omnichannel current chats page", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24173", + "title": "[FIX] respect `Accounts_Registration_Users_Default_Roles` setting", + "userLogin": "debdutdeb", + "description": "- Fix `user` role being added as default regardless of the `Accounts_Registration_Users_Default_Roles` setting.", + "milestone": "4.5.0", + "contributors": [ + "debdutdeb", + "web-flow", + "matheusbsilva137" + ] + }, + { + "pr": "24485", + "title": "[FIX] Skip admin info in setup wizard for servers with admin registered", + "userLogin": "dougfabris", + "contributors": [ + "dougfabris", + "tassoevan" + ] + }, + { + "pr": "24537", + "title": "Bump pm2 from 5.1.2 to 5.2.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24209", + "title": "[IMPROVE] Team system messages feedback", + "userLogin": "ostjen", + "description": "- Delete some keys that aren't being used (eg: User_left_female).\r\n- Add new Teams' system messages:\r\n - `added-user-to-team`: **added** @\\user to this Team;\r\n - `removed-user-from-team`: **removed** @\\user from this Team;\r\n - `user-converted-to-team`: **converted** #\\room to a Team;\r\n - `user-converted-to-channel`: **converted** #\\room to a Channel;\r\n - `user-removed-room-from-team`: **removed** @\\user from this Team;\r\n - `user-deleted-room-from-team`: **deleted** #\\room from this Team;\r\n - `user-added-room-to-team`: **deleted** #\\room to this Team;\r\n- Add the corresponding options to hide each new system message and the missing `ujt` and `ult` hide options.", + "milestone": "4.5.0", + "contributors": [ + "ostjen", + "tassoevan", + "web-flow", + "dougfabris", + "matheusbsilva137" + ] + }, + { + "pr": "24467", + "title": "Chore: Improve PR title validation regex", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow", + "debdutdeb" + ] + }, + { + "pr": "24058", + "title": "Bump date-fns from 2.24.0 to 2.28.0", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24508", + "title": "[FIX] Read receipts showing first messages of the room as read even if not read by everyone", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow", + "dougfabris" + ] + }, + { + "pr": "24530", + "title": "Chore: Remove storybook build job from CI", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24528", + "title": "Bump url-parse from 1.5.3 to 1.5.7", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24333", + "title": "Chore: Add description to global OTR setting", + "userLogin": "pedrogssouza", + "contributors": [ + "pedrogssouza", + "yash-rajpal", + "web-flow" + ] + }, + { + "pr": "24382", + "title": "[IMPROVE] OTR system messages", + "userLogin": "yash-rajpal", + "description": "OTR system messages to indicate key refresh and joining chat to users.", + "contributors": [ + "yash-rajpal", + "web-flow" + ] + }, + { + "pr": "24121", + "title": "[IMPROVE] Descriptive tooltip for Encrypted Key on Room Header", + "userLogin": "yash-rajpal", + "milestone": "4.5.0", + "contributors": [ + "yash-rajpal", + "web-flow" + ] + }, + { + "pr": "24522", + "title": "Bump express from 4.17.2 to 4.17.3 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24518", + "title": "Chore: `twoFactorRequired` signature", + "userLogin": "tassoevan", + "description": "Improved type checking for decorator `twoFactorRequired`.", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24517", + "title": "Bump body-parser from 1.19.1 to 1.19.2 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24441", + "title": "[FIX] GDPR action to forget visitor data on request", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman", + "murtaza98", + "web-flow" + ] + }, + { + "pr": "24306", + "title": "Chore: Convert to typescript the slash commands create files", + "userLogin": "eduardofcabrera", + "description": "Convert Slash Commands create files to typescript.", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24325", + "title": "Chore: Convert to typescript the mute and unmute slash commands files", + "userLogin": "eduardofcabrera", + "description": "Convert to typescript the mute and unmute slash commands files", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24321", + "title": "Chore: Convert to typescript the me slashCommands files", + "userLogin": "eduardofcabrera", + "description": "Convert to typescript the me slashCommands files", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "23512", + "title": "Bump sodium-native from 3.2.1 to 3.3.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24311", + "title": "Chore: Convert to typescript the slash commands invite files", + "userLogin": "eduardofcabrera", + "description": "Convert to typescript the slash commands invite files", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24509", + "title": "Bump vm2 from 3.9.5 to 3.9.7 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24451", + "title": "[IMPROVE] ChatBox Text to File Description", + "userLogin": "eduardofcabrera", + "description": "The text content from chatbox goes to the file description when drag and drop a file.", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow", + "dougfabris" + ] + }, + { + "pr": "24461", + "title": "Chore: Update Meteor to 2.5.6", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "rodrigok", + "web-flow" + ] + }, + { + "pr": "24477", + "title": "Chore: Update ws package", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24498", + "title": "Bump underscore.string from 3.3.5 to 3.3.6 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24491", + "title": "Bump follow-redirects from 1.14.7 to 1.14.8 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24493", + "title": "i18n: Language update from LingoHub 🤖 on 2022-02-14Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null + ] + }, + { + "pr": "24331", + "title": "Chore: Convert to typescript the unarchive slash commands files", + "userLogin": "eduardofcabrera", + "description": "Convert to typescript the unarchive slash commands files", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24483", + "title": "[IMPROVE] Add tooltips on action buttons of Canned Response message composer", + "userLogin": "LucasFASouza", + "description": "The tooltips were missing on the action buttons of CR message composer.\r\n\r\n![image](https://user-images.githubusercontent.com/32396925/153620327-91107245-4b47-4d39-a99a-6da6d1cf5734.png)\r\n\r\nUsers can now feel more encouraged to use these actions knowing what they are supposed to do.", + "contributors": [ + "LucasFASouza", + "tiagoevanp", + "web-flow" + ] + }, + { + "pr": "24196", + "title": "Chore: Delete unused file (NewAdminInfoPage.js)", + "userLogin": "gabriellsh", + "description": "Just removing a duplicated/unused file.", + "milestone": "4.5.0", + "contributors": [ + "gabriellsh", + "web-flow" + ] + }, + { + "pr": "24388", + "title": "[IMPROVE][ENTERPRISE] Improve how micro services are loaded", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "sampaiodiego" + ] + }, + { + "pr": "24458", + "title": "[IMPROVE] Add return button in chats opened from the list of current chats", + "userLogin": "LucasFASouza", + "description": "The new return button for Omnichannel chats came out with release 3.15 but the feature was only available for chats that were opened from Omnichannel Contact Center.\r\nNow, the same UI/UX is supported for chats opened from Current Chats list.\r\n\r\n![image](https://user-images.githubusercontent.com/32396925/153283190-bd5c9748-c36b-4874-a704-6043afc7e3a1.png)\r\n\r\nThe chat now opens in the Omnichannel settings and has the return button so the user can go back to the Current Chats list.\r\n\r\n![image](https://user-images.githubusercontent.com/32396925/153285591-fad8e4a0-d2ea-4a02-8b2a-15e383b3c876.png)", + "contributors": [ + "LucasFASouza", + "tiagoevanp", + "web-flow" + ] + }, + { + "pr": "24469", + "title": "Bump express from 4.17.1 to 4.17.2 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24472", + "title": "Bump cookie from 0.4.1 to 0.4.2 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24275", + "title": "[IMPROVE] Close modal on esc and outside click", + "userLogin": "gabriellsh", + "description": "This is a QUICK change in order to close modals pressing Esc button and clicking outside of it **intentionally**.", + "milestone": "4.5.0", + "contributors": [ + "gabriellsh", + "dougfabris", + "tassoevan" + ] + }, + { + "pr": "24435", + "title": "Chore(deps-dev): Bump ts-node from 10.0.0 to 10.5.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24041", + "title": "[IMPROVE] Add user to room on \"Click to Join!\" button press", + "userLogin": "matheusbsilva137", + "description": "- Add user to room on \"Click to Join!\" button press;\r\n- Display the \"Join\" button in discussions inside channels (keeping the behavior consistent with discussions inside groups).", + "contributors": [ + "matheusbsilva137", + "web-flow", + "tassoevan", + "pierre-lehnen-rc", + "ostjen" + ] + }, + { + "pr": "24310", + "title": "[FIX] Implement client errors on ddp-streamer", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "23963", + "title": "Bump body-parser from 1.19.0 to 1.19.1 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "23961", + "title": "Bump jaeger-client from 3.18.1 to 3.19.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24466", + "title": "[FIX] typo on register server tooltip of setup wizard", + "userLogin": "filipemarins", + "milestone": "4.5.0", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "24037", + "title": "[FIX] Inconsistent validation of user's access to rooms", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24450", + "title": "[FIX] OAuth mismatch redirect_uri error", + "userLogin": "sampaiodiego", + "milestone": "4.4.2", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24305", + "title": "[FIX] Prevent Apps Bridge to remove visitor status from room", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman", + "d-gubert" + ] + }, + { + "pr": "24453", + "title": "Chore: bump fuselage version", + "userLogin": "dougfabris", + "milestone": "4.4.2", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "24253", + "title": "[FIX] Issues on selecting users when importing CSV", + "userLogin": "guijun13", + "description": "* Fix users selecting by fixing their _id\r\n* Add condition to disable 'Start importing' button if `usersCount`, `channelsCount` and `messageCount` equals 0, or if messageCount is alone\r\n* Remove `disabled={usersCount === 0}` on user Tab", + "contributors": [ + "guijun13", + "tassoevan", + "web-flow", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24299", + "title": "Chore(deps): Bump node-fetch from 2.6.1 to 2.6.7 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24418", + "title": "[FIX] Oembed request not respecting payload limit", + "userLogin": "sampaiodiego", + "milestone": "4.4.1", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24429", + "title": "i18n: Language update from LingoHub 🤖 on 2022-02-07Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null, + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24407", + "title": "[FIX] Skip cloud steps for registered servers on setup wizard", + "userLogin": "dougfabris", + "milestone": "4.4.1", + "contributors": [ + "dougfabris", + "tassoevan", + "gabriellsh", + "web-flow" + ] + }, + { + "pr": "24410", + "title": "Chore: Convert JS files to Typescript", + "userLogin": "felipe-rod123", + "description": "This pull request converts 26 more files from Javascript to Typescript, to check variable types and increase validation on the code.", + "contributors": [ + "felipe-rod123", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "24369", + "title": "[IMPROVE] Convert tag edit with department data to tsx", + "userLogin": "LucasFASouza", + "contributors": [ + "LucasFASouza", + "tiagoevanp", + "web-flow" + ] + }, + { + "pr": "24401", + "title": "[FIX] Outgoing webhook without scripts not saving messages", + "userLogin": "sampaiodiego", + "milestone": "4.4.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24334", + "title": "[IMPROVE] CloudLoginModal visual consistency", + "userLogin": "dougfabris", + "description": "### before\r\n![image](https://user-images.githubusercontent.com/27704687/151585064-dc6a1e29-9903-4241-8fbd-dfbe6c55fbef.png)\r\n\r\n### after\r\n![Screen Shot 2022-01-28 at 13 32 02](https://user-images.githubusercontent.com/27704687/151585101-75b98502-9aae-4198-bc3e-4956750e5d8b.png)", + "milestone": "4.5.0", + "contributors": [ + "dougfabris", + "gabriellsh", + "web-flow" + ] + }, + { + "pr": "24409", + "title": "[FIX] Startup errors creating indexes", + "userLogin": "sampaiodiego", + "description": "Fix `bio` and `prid` startup index creation errors.", + "milestone": "4.4.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24406", + "title": "Chore: Unify ILivechatAgent with ILivechatAgentRecord", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24381", + "title": "[FIX] Add ?close to OAuth callback url", + "userLogin": "sampaiodiego", + "milestone": "4.4.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24387", + "title": "[FIX] Slash commands previews not working", + "userLogin": "ostjen", + "milestone": "4.4.1", + "contributors": [ + "ostjen" + ] + }, + { + "pr": "24357", + "title": "i18n: Language update from LingoHub 🤖 on 2022-01-31Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null + ] + }, + { + "pr": "24341", + "title": "Bump simple-get from 4.0.0 to 4.0.1", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24366", + "title": "Chore: Set Docker image tag to latest only when really latest", + "userLogin": "debdutdeb", + "contributors": [ + "debdutdeb", + "web-flow" + ] + }, + { + "pr": "24109", + "title": "[IMPROVE] Added a new \"All\" tab which shows all integrations in Integrations", + "userLogin": "aswinidev", + "milestone": "4.5.0", + "contributors": [ + "aswinidev", + "dougfabris", + "web-flow" + ] + }, + { + "pr": "24363", + "title": "Merge master into develop & Set version to 4.5.0-develop", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "25022", + "title": "[FIX] Proxy settings being ignored", + "userLogin": "pierre-lehnen-rc", + "description": "Modify Meteor's `HTTP.call` to add back proxy support", + "milestone": "4.6.1", + "contributors": [ + "pierre-lehnen-rc", + "sampaiodiego" + ] + }, + { + "pr": "25067", + "title": "[FIX] NPS never finishing sending results", + "userLogin": "sampaiodiego", + "milestone": "4.6.1", + "contributors": [ + "sampaiodiego" + ] + } + ] + }, + "4.4.5": { + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25022", + "title": "[FIX] Proxy settings being ignored", + "userLogin": "pierre-lehnen-rc", + "description": "Modify Meteor's `HTTP.call` to add back proxy support", + "milestone": "4.6.1", + "contributors": [ + "pierre-lehnen-rc", + "sampaiodiego" + ] + }, + { + "pr": "25067", + "title": "[FIX] NPS never finishing sending results", + "userLogin": "sampaiodiego", + "milestone": "4.6.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25580", + "title": "Release 4.7.2", + "userLogin": "d-gubert", + "contributors": [ + "tiagoevanp", + "d-gubert", + "MartinSchoeler", + "ggazzo", + "cauefcr", + "geekgonecrazy" + ] + }, + { + "pr": "25544", + "title": "[FIX] Initial User not added to default channel", + "userLogin": "geekgonecrazy", + "description": "If injecting initial user. The user wasn’t added to the default General channel", + "milestone": "4.7.2", + "contributors": [ + "geekgonecrazy", + "web-flow" + ] + }, + { + "pr": "25520", + "title": "[FIX] User abandonment setting was not working doe to failing event hook", + "userLogin": "cauefcr", + "description": "A setting watcher and the query for grabbing abandoned chats were broken, now they're not.", + "milestone": "4.7.2", + "contributors": [ + "cauefcr", + "tiagoevanp" + ] + }, + { + "pr": "25495", + "title": "[FIX] Dynamic load matrix is enabled and handle failure ", + "userLogin": "ggazzo", + "milestone": "4.7.2", + "contributors": [ + "ggazzo", + "geekgonecrazy" + ] + }, + { + "pr": "25409", + "title": "[FIX] One of the triggers was not working correctly", + "userLogin": "MartinSchoeler", + "milestone": "4.7.2", + "contributors": [ + "MartinSchoeler", + "tiagoevanp" + ] + }, + { + "pr": "25407", + "title": "[FIX] UI/UX issues on Live Chat widget", + "userLogin": "MartinSchoeler", + "milestone": "4.7.2", + "contributors": [ + "MartinSchoeler", + "dougfabris" + ] + }, + { + "pr": "25312", + "title": "Chore: Add Livechat repo into Monorepo packages", + "userLogin": "tiagoevanp", + "milestone": "4.7.2", + "contributors": [ + "tiagoevanp", + "ggazzo", + "web-flow", + "MartinSchoeler" + ] + }, + { + "pr": "25510", + "title": "Release 4.7.1", + "userLogin": "d-gubert", + "contributors": [ + "felipe-menelau", + "d-gubert", + "pierre-lehnen-rc" + ] + }, + { + "pr": "25471", + "title": "[FIX] Spotlight results showing usernames instead of real names", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.7.1", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25434", + "title": "[FIX] LDAP sync removing users from channels when multiple groups are mapped to it", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.7.1", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25441", + "title": "[NEW] Use setting to determine if initial general channel is needed", + "userLogin": "felipe-menelau", + "description": "- Adds flag responsible for overwriting #general channel creation", + "milestone": "4.7.1", + "contributors": [ + "felipe-menelau", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "25390", + "title": "Release 4.7.0", + "userLogin": "d-gubert", + "contributors": [ + "sampaiodiego", + "web-flow", + "lingohub[bot]", + "dependabot[bot]", + "ggazzo", + "dougfabris", + "gabriellsh", + "tmontini", + "debdutdeb", + "Himanshu664", + "yash-rajpal", + "MartinSchoeler" + ] + }, + { + "pr": "25380", + "title": "Regression: Fix clicking on visitor's chat in the sidebar does not display the chat window", + "userLogin": "filipemarins", + "description": "Fix: livechat room not opening.", + "milestone": "4.7.0", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25314", + "title": "Regression: Fix size of custom emoji and render emoji on thread message preview", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25371", + "title": "Chore: Bump fuselage", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25336", + "title": "Chore: Add options to debug stdout and rate limiter", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25368", + "title": "Regression: Fix English i18n react text", + "userLogin": "d-gubert", + "description": "Incorrect text in reaction tooltip has been fixed", + "milestone": "4.7.0", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25349", + "title": "Regression: Rocket.Chat Webapp not loading.", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "gabriellsh" + ] + }, + { + "pr": "25317", + "title": "Regression: Fix multi line is not showing an empty line between lines", + "userLogin": "filipemarins", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25320", + "title": "Regression: bump onboarding-ui version", + "userLogin": "guijun13", + "description": "- Bump to 'next' the onboarding-ui package from fuselage.\r\n- Update from 'companyEmail' to 'email' adminData usage types", + "contributors": [ + "guijun13" + ] + }, + { + "pr": "25335", + "title": "Chore: Create README.md for Rest Typings", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25327", + "title": "Regression: Messages in new message template Crashing.", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25323", + "title": "Regression: Better MongoDB connection management for micro services", + "userLogin": "sampaiodiego", + "milestone": "4.7.0", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25250", + "title": "Regression: Validate empty fields for Message template", + "userLogin": "gabriellsh", + "milestone": "4.8.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25319", + "title": "Regression: Fix the alpine image and dev UX installing matrix-rust-sdk-bindings", + "userLogin": "geekgonecrazy", + "description": "The package only included a few pre-built which caused all macs to have to compile every time they installed and also caused our alpine not to work.\r\n\r\nThis temporarily switches to a fork of the matrix-appservice-bridge package.\r\n\r\nMade changes to one of its child dependencies `matrix-rust-sdk-bindings` that adds pre-built binaries for mac and musl (for alpine).", + "milestone": "4.7.0", + "contributors": [ + "geekgonecrazy", + "web-flow", + "d-gubert" + ] + }, + { + "pr": "25255", + "title": "Regression: Change preference to be default legacy messages", + "userLogin": "gabriellsh", + "milestone": "4.8.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25306", + "title": "Regression: Fix reply button not working when hideFlexTab is enabled", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25311", + "title": "Regression: Add eslint package to micro services Dockerfile", + "userLogin": "sampaiodiego", + "milestone": "4.7.0", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25218", + "title": "Chore: ensure scripts use cross-env and ignore some dirs (ROC-54)", + "userLogin": "souzaramon", + "description": "- data and test-failure should be ignored\r\n- ensure scripts use cross-env", + "contributors": [ + "souzaramon" + ] + }, + { + "pr": "25313", + "title": "Regression: Revert Bugsnag version", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25305", + "title": "Regression: eslint not running on packages", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "ggazzo" + ] + }, + { + "pr": "25299", + "title": "Regression: Add `isPending` status to message", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25301", + "title": "Regression: Shows error if micro service cannot connect to Mongo", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25287", + "title": "Regression: Use exact Node version on micro services Docker images", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25286", + "title": "Chore: Add root package.json to houston files", + "userLogin": "d-gubert", + "description": "See title", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25284", + "title": "Chore: Sync with master", + "userLogin": "d-gubert", + "contributors": [ + "sampaiodiego", + "d-gubert", + "web-flow" + ] + }, + { + "pr": "25269", + "title": "Chore: Minor dependency updates", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "25224", + "title": "Chore: Add yarn plugin to check node and yarn version", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25235", + "title": "Release 4.6.3", + "userLogin": "d-gubert", + "contributors": [ + "sampaiodiego", + "d-gubert" + ] + }, + { + "pr": "25220", + "title": "[FIX] Desktop notification on multi-instance environments", + "userLogin": "sampaiodiego", + "milestone": "4.6.3", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25280", + "title": "Chore: Remove package-lock.json from houston files", + "userLogin": "d-gubert", + "description": "Houston config in the `package.json` file still mentioned `package-lock.json`, but it doesn't exist anymore", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25260", + "title": "[FIX] Adjust email label in Setup Wizard i18n files", + "userLogin": "guijun13", + "description": "- remove 'Company' label on onboarding email keys in certain languages", + "contributors": [ + "guijun13" + ] + }, + { + "pr": "25275", + "title": "Chore: Fix return type warnings", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "23870", + "title": "[NEW] Expand Apps Engine's environment variable allowed list", + "userLogin": "cuonghuunguyen", + "milestone": "4.7.0", + "contributors": [ + null, + "debdutdeb", + "web-flow", + "cuonghuunguyen", + "dougfabris" + ] + }, + { + "pr": "25273", + "title": "Regression: Fix federation Matrix bridge startup", + "userLogin": "sampaiodiego", + "milestone": "4.7.0", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25092", + "title": "[FIX] Message preview not available for queued chats", + "userLogin": "murtaza98", + "milestone": "4.7.0", + "contributors": [ + "murtaza98", + "KevLehman" + ] + }, + { + "pr": "23688", + "title": "[NEW] Alpha Matrix Federation", + "userLogin": "alansikora", + "description": "Experimental support for Matrix Federation with a Bridge\r\n\r\nhttps://user-images.githubusercontent.com/51996/164530391-e8b17ecd-a4d0-4ef8-a8b7-81230c1773d3.mp4", + "milestone": "4.7.0", + "contributors": [ + "alansikora", + "geekgonecrazy", + "MarcosSpessatto", + "rodrigok" + ] + }, + { + "pr": "25259", + "title": "Chore: Bump Fuselage packages", + "userLogin": "dougfabris", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25261", + "title": "[FIX] Incorrect websocket url in livechat widget", + "userLogin": "debdutdeb", + "milestone": "4.7.0", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "25007", + "title": "[FIX] Showing Blank Message Inside Report", + "userLogin": "nishant23122000", + "description": "https://user-images.githubusercontent.com/53515714/161038085-4a86c7ae-6751-4996-9767-b1c9e0331a6c.mp4", + "contributors": [ + "nishant23122000" + ] + }, + { + "pr": "25251", + "title": "Regression: Add select message to system message and thread preview and allow select on legacy template", + "userLogin": "filipemarins", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "ggazzo", + "web-flow", + "gabriellsh", + "dougfabris" + ] + }, + { + "pr": "25239", + "title": "[FIX] Add katex render to new message react template", + "userLogin": "filipemarins", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "ggazzo", + "dougfabris" + ] + }, + { + "pr": "25257", + "title": "Chore: Update Livechat to the last version", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24515", + "title": "[FIX] Custom sound error toast messages", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "dougfabris" + ] + }, + { + "pr": "25211", + "title": "Regression: Avatar not loading on first direct message", + "userLogin": "filipemarins", + "description": "fix avatar not loading on a first direct message", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "ggazzo" + ] + }, + { + "pr": "25254", + "title": "Regression: Show username and real name on the message system", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25217", + "title": "[IMPROVE] Performance for some Omnichannel features", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25200", + "title": "[FIX] room creation fails if app framework is disabled", + "userLogin": "debdutdeb", + "milestone": "4.7.0", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "24565", + "title": "[IMPROVE] Add OTR Room States", + "userLogin": "yash-rajpal", + "description": "Earlier OTR room uses only 2 states, we need more states to support future features. \r\nThis adds more states for the OTR contextualBar.\r\n\r\n- Expired\r\n\"Screen\r\n\r\n- Declined\r\nScreen Shot 2022-04-20 at 13 49 28\r\n\r\n- Error\r\n\"Screen", + "milestone": "4.7.0", + "contributors": [ + "yash-rajpal", + "dougfabris" + ] + }, + { + "pr": "25170", + "title": "[FIX] Client disconnection on network loss", + "userLogin": "amolghode1981", + "description": "Agent gets disconnected (or Unregistered) from asterisk in multiple ways. The goal is that agent should remain online\r\nunless agent explicitly logs off.\r\nAgent can stop receiving calls in multiple ways due to network loss. Network loss can happen in following ways.\r\n1. User tries to switch the network. User experiences a glitch of disconnectivity. This can be simulated by turning the network off\r\nin the network tab of chrome's dev tool. This can disconnect the UA if the disconnection happens just before the registration refresh.\r\n2. Second reason is when computer goes in sleep mode.\r\n3. Third reason is that when asterisk is crashed/in maintenance mode/explicitly stopped.\r\n\r\nSolution:\r\nThe idea is to detect the network disconnection and start the start the attempts to reconnect.\r\nThe detection of the disconnection does not happen in case#1. The SIPUA's UserAgent transport does not\r\ncall onDisconnected when network loss of such kind happens. To tackle this problem, window's online and offline event handlers are\r\nused.\r\n\r\nThe number of retries is configurable but ideally it is to be kept at -1. Whenever disconnection happens, it should keep on trying to\r\nreconnect with increasing backoff time. This behaviour is useful when the asterisk is stopped.\r\n\r\nWhen the server is disconnected, it should be indicated on the phone button.", + "contributors": [ + "amolghode1981", + "KevLehman" + ] + }, + { + "pr": "25244", + "title": "[FIX] Read receipts show with color gray when not read yet", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25230", + "title": "[FIX] VoIP disabled/enabled sequence puts voip agent in error state", + "userLogin": "amolghode1981", + "description": "Initially it was thought that the issue occurs because of the race condition while changing the client settings vs those settings reflected on server side. So a natural solution to solve this is to wait for setting change event 'private-settings-changed'. Then if 'VoIP_Enabled' is updated and it is true, set voipEnabled to true in useVoipClient.ts (on client side)\r\n\r\nIt was realised that the race does not happen because of the database or server noticing the changes late. But because of the time taken to establish the AMI connection with Asterisk.\r\n\r\nSolution:\r\n\r\n1. Change apps/meteor/app/voip/server/startup.ts. When VoIP_Enabled is changed, await for Voip.init() to complete and then broadcast connector.statuschanged with changed value.\r\n2. From apps/meteor/server/modules/listeners/listeners.module.ts use notifyLoggedInThisInstance to notify all logged in users on current instance.\r\n3. in apps/meteor/client/providers/CallProvider/hooks/useVoipClient.ts add the event handler that receives this event. Change voipEnabled from constant to state. Change this state based on the 'value' that is received by the handler.", + "contributors": [ + "amolghode1981", + "KevLehman" + ] + }, + { + "pr": "25087", + "title": "[NEW] Add expire index to integration history", + "userLogin": "geekgonecrazy", + "milestone": "4.7.0", + "contributors": [ + "geekgonecrazy" + ] + }, + { + "pr": "24521", + "title": "Chore: update OTR icon", + "userLogin": "kibonusp", + "description": "I changed the shredder icon in OTR contextual bar to the stopwatch icon, recently added to the fuselage.", + "milestone": "4.7.0", + "contributors": [ + "kibonusp", + "yash-rajpal", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "25237", + "title": "[FIX] Toolbox hiding under contextual bar", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25231", + "title": "[IMPROVE] Added MaxNickNameLength and MaxBioLength constants", + "userLogin": "aakash-gitdev", + "contributors": [ + "aakash-gitdev", + "web-flow", + "gabriellsh" + ] + }, + { + "pr": "25220", + "title": "[FIX] Desktop notification on multi-instance environments", + "userLogin": "sampaiodiego", + "milestone": "4.6.3", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25175", + "title": "[FIX] Reply button behavior on broadcast channel", + "userLogin": "filipemarins", + "description": "Hide reply button for the user that sent the message", + "contributors": [ + "filipemarins", + "web-flow" + ] + }, + { + "pr": "25216", + "title": "[FIX] Read receipts showing before message read", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25222", + "title": "[FIX] Add reaction not working in legacy messages", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25223", + "title": "Chore: Add error boundary to message component", + "userLogin": "gabriellsh", + "description": "Not crash the whole application if something goes wrong in the MessageList component.\r\n\r\n![image](https://user-images.githubusercontent.com/40830821/162269915-931c5c3c-c979-4234-b74c-371f67467ce0.png)", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25130", + "title": "Chore: Update Livechat version", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "25073", + "title": "[FIX] AgentOverview analytics wrong departmentId parameter", + "userLogin": "paulobernardoaf", + "description": "When filtering the analytics charts by department, data would not appear because the object:\r\n```js\r\n{\r\n value: \"department-id\",\r\n label: \"department-name\"\r\n}\r\n```\r\nwas being used in the `departmentId` parameter.\r\n\r\n- Before:\r\n![image](https://user-images.githubusercontent.com/30026625/161832057-d96ffd21-a7dd-421e-bfaa-3b9f4a9127b2.png)\r\n\r\n- After:\r\n![image](https://user-images.githubusercontent.com/30026625/161831092-9ee77b51-b083-4f45-9c48-ab2e0511c4d6.png)", + "milestone": "4.7.0", + "contributors": [ + "paulobernardoaf" + ] + }, + { + "pr": "25056", + "title": "[FIX] Close room when dismiss wrap up call modal", + "userLogin": "tiagoevanp", + "milestone": "4.7.0", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "25208", + "title": "Regression: yarn dev triggers build dependencies", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "24714", + "title": "[FIX] Added invalid password error message", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "dougfabris" + ] + }, + { + "pr": "25196", + "title": "Chore: Tests with Playwright (task: ROC-28, 09-channels)", + "userLogin": "tmontini", + "contributors": [ + "tmontini" + ] + }, + { + "pr": "25174", + "title": "Chore: Template to generate packages", + "userLogin": "ggazzo", + "description": "```\r\nnpx hygen package new test\r\n```", + "contributors": [ + "ggazzo", + "web-flow", + "sampaiodiego" + ] + }, + { + "pr": "25193", + "title": "Regression: Fix micro services Docker build", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25191", + "title": "Release 4.6.2", + "userLogin": "sampaiodiego", + "contributors": [ + "sidmohanty11", + "sampaiodiego" + ] + }, + { + "pr": "25101", + "title": "[FIX] Database indexes not being created", + "userLogin": "sampaiodiego", + "milestone": "4.6.2", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24933", + "title": "[FIX] Deactivating user breaks if user is the only room owner", + "userLogin": "sidmohanty11", + "description": "## Before\r\n\r\nhttps://user-images.githubusercontent.com/73601258/160000871-cfc2f2a5-2a59-4d27-8049-7754d003dd48.mp4\r\n\r\n\r\n\r\n## After\r\nhttps://user-images.githubusercontent.com/73601258/159998287-681ab475-ff33-4282-82ff-db751c59a392.mp4", + "milestone": "4.6.2", + "contributors": [ + "sidmohanty11", + "sampaiodiego" + ] + }, + { + "pr": "25095", + "title": "Release 4.6.1", + "userLogin": "sampaiodiego", + "contributors": [ + "dougfabris", + "sampaiodiego", + "gabriellsh", + "yash-rajpal", + "pierre-lehnen-rc" + ] + }, + { + "pr": "25022", + "title": "[FIX] Proxy settings being ignored", + "userLogin": "pierre-lehnen-rc", + "description": "Modify Meteor's `HTTP.call` to add back proxy support", + "milestone": "4.6.1", + "contributors": [ + "pierre-lehnen-rc", + "sampaiodiego" + ] + }, + { + "pr": "25082", + "title": "[FIX] Invitation links don't redirect to the registration form", + "userLogin": "yash-rajpal", + "milestone": "4.6.1", + "contributors": [ + "yash-rajpal" + ] + }, + { + "pr": "25069", + "title": "[FIX] FormData uploads not working", + "userLogin": "gabriellsh", + "milestone": "4.6.1", + "contributors": [ + "gabriellsh", + "dougfabris" + ] + }, + { + "pr": "25067", + "title": "[FIX] NPS never finishing sending results", + "userLogin": "sampaiodiego", + "milestone": "4.6.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25050", + "title": "[FIX] Upgrade Tab showing for a split second", + "userLogin": "gabriellsh", + "milestone": "4.6.1", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25055", + "title": "[FIX] UserAutoComplete not rendering UserAvatar correctly", + "userLogin": "dougfabris", + "description": "### before\r\n![Screen Shot 2022-04-04 at 16 50 21](https://user-images.githubusercontent.com/27704687/161620921-800bf66a-806d-4f83-b2e1-073c34215001.png)\r\n\r\n### after\r\n![Screen Shot 2022-04-04 at 16 49 00](https://user-images.githubusercontent.com/27704687/161620720-3e27774d-c241-46ca-b764-932a9295d709.png)", + "milestone": "4.6.1", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25180", + "title": "Chore: Remove duplicated useUserRoom", + "userLogin": "dougfabris", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25167", + "title": "Chore: TS migration SortList", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "24933", + "title": "[FIX] Deactivating user breaks if user is the only room owner", + "userLogin": "sidmohanty11", + "description": "## Before\r\n\r\nhttps://user-images.githubusercontent.com/73601258/160000871-cfc2f2a5-2a59-4d27-8049-7754d003dd48.mp4\r\n\r\n\r\n\r\n## After\r\nhttps://user-images.githubusercontent.com/73601258/159998287-681ab475-ff33-4282-82ff-db751c59a392.mp4", + "milestone": "4.6.2", + "contributors": [ + "sidmohanty11", + "sampaiodiego" + ] + }, + { + "pr": "25181", + "title": "Regression: Fix services Docker build on CI", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25089", + "title": "[FIX] UserCard sanitization", + "userLogin": "dougfabris", + "description": "- Rewrites the component to TS\r\n- Fixes some visual issues\r\n\r\n### before\r\n![Screen Shot 2022-04-07 at 00 23 11](https://user-images.githubusercontent.com/27704687/162113925-5c9484d1-23e9-4623-8b86-3fbc71b461a1.png)\r\n\r\n### after\r\n![Screen Shot 2022-04-07 at 00 07 13](https://user-images.githubusercontent.com/27704687/162112353-afd6aac6-b27c-4470-a642-631b8080d59e.png)", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25085", + "title": "Chore: move definitions to packages", + "userLogin": "ggazzo", + "milestone": "3.7.0", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25168", + "title": "Regression: CI playwright", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25125", + "title": "Chore: Convert NotificationStatus to TS", + "userLogin": "jeanfbrito", + "contributors": [ + "jeanfbrito", + "ggazzo" + ] + }, + { + "pr": "25148", + "title": "[FIX] Message menu action not working on legacy messages.", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25122", + "title": "Chore: Tests with Playwright (task: All works)", + "userLogin": "weslley543", + "contributors": [ + "weslley543" + ] + }, + { + "pr": "25129", + "title": "Chore: Remove old files from removed Omnichannel feature", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25128", + "title": "Chore: Convert admin custom sound to tsx", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25126", + "title": "Chore: Migrate oauth2server to typescript", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25123", + "title": "Chore: Convert LivechatAgentActivity to raw model and TS", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25124", + "title": "Chore: Remove unused Drone CI files", + "userLogin": "geekgonecrazy", + "contributors": [ + "geekgonecrazy", + "web-flow" + ] + }, + { + "pr": "25121", + "title": "Chore: Convert Mailer to TS", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti", + "sampaiodiego" + ] + }, + { + "pr": "25107", + "title": "Regression: Fix CI monorepo build", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25074", + "title": "Chore: Monorepo ", + "userLogin": "ggazzo", + "milestone": "3.7.0", + "contributors": [ + "sampaiodiego", + "ggazzo" + ] + }, + { + "pr": "25097", + "title": "[IMPROVE] Rename upgrade tab routes", + "userLogin": "guijun13", + "description": "Change 'upgrade tab' routes names from camelCase ('goFullyFeatured') to kebab-case ('go-fully-featured') due to URL naming consistency. Changed types, main function and test.", + "contributors": [ + "guijun13" + ] + }, + { + "pr": "25076", + "title": "Bump eslint-plugin-anti-trojan-source from 1.0.6 to 1.1.0", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24936", + "title": "[FIX] End call button disappearing when on-hold", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24932", + "title": "[FIX] Use correct room property for call ended at", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "25022", + "title": "[FIX] Proxy settings being ignored", + "userLogin": "pierre-lehnen-rc", + "description": "Modify Meteor's `HTTP.call` to add back proxy support", + "milestone": "4.6.1", + "contributors": [ + "pierre-lehnen-rc", + "sampaiodiego" + ] + }, + { + "pr": "25082", + "title": "[FIX] Invitation links don't redirect to the registration form", + "userLogin": "yash-rajpal", + "milestone": "4.6.1", + "contributors": [ + "yash-rajpal" + ] + }, + { + "pr": "23971", + "title": "[NEW] Message Template React Component", + "userLogin": "ggazzo", + "description": "Complete rewrite of the messages component in react. Visual changes should be minimal as well as user impact, with no break changes (unless you've customized the blaze template).\r\n\r\n\r\n\r\n![Screen Shot 2022-04-05 at 11 14 18](https://user-images.githubusercontent.com/27704687/161774027-38dd9c7b-eeeb-45e2-b9d8-ea2a9be8486d.png)\r\nIn case you encounter any problems, or want to compare, temporarily it is possible to use the old version\r\n\r\n\"image\"", + "contributors": [ + "ggazzo", + "sampaiodiego" + ] + }, + { + "pr": "25069", + "title": "[FIX] FormData uploads not working", + "userLogin": "gabriellsh", + "milestone": "4.6.1", + "contributors": [ + "gabriellsh", + "dougfabris" + ] + }, + { + "pr": "19866", + "title": "[FIX] Video and Audio not skipping forward", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler", + "tassoevan", + "web-flow", + "dougfabris" + ] + }, + { + "pr": "25067", + "title": "[FIX] NPS never finishing sending results", + "userLogin": "sampaiodiego", + "milestone": "4.6.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24405", + "title": "[IMPROVE] Add tooltip to sidebar room menu", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "web-flow", + "dougfabris" + ] + }, + { + "pr": "24431", + "title": "[IMPROVE] Added tooltip options for message menu", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "dougfabris" + ] + }, + { + "pr": "24166", + "title": "[FIX] Replace encrypted text to Encrypted Message Placeholder", + "userLogin": "yash-rajpal", + "description": "### before \r\n![image](https://user-images.githubusercontent.com/27704687/150807900-154a9cdb-ee13-4333-8628-f287ab914b40.png)\r\n\r\n### after\r\n\"Screenshot", + "milestone": "4.7.0", + "contributors": [ + "yash-rajpal", + "albuquerquefabio", + "web-flow" + ] + }, + { + "pr": "24984", + "title": "[FIX] Prevent sequential messages edited icon to hide on hover", + "userLogin": "dougfabris", + "description": "### before\r\n\"Screen\r\n\r\n### after\r\n\"Screen", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25024", + "title": "[IMPROVE] Improve active/hover colors in account sidebar", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664" + ] + }, + { + "pr": "24856", + "title": "[FIX] Full error message is visible", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "tassoevan" + ] + }, + { + "pr": "24708", + "title": "Chore: Cancel running jobs if PR is updated", + "userLogin": "debdutdeb", + "contributors": [ + "debdutdeb", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24900", + "title": "Chore: organize test files and fix code coverage", + "userLogin": "tmontini", + "contributors": [ + null, + "tmontini", + "rodrigok" + ] + }, + { + "pr": "24464", + "title": "Chore: Missing keys in APIsDisplay", + "userLogin": "dougfabris", + "milestone": "4.7.0", + "contributors": [ + "dougfabris", + "tassoevan" + ] + }, + { + "pr": "25057", + "title": "Bump ejson from 2.2.1 to 2.2.2", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25053", + "title": "Chore: Remove Alpine image deps after using them", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25052", + "title": "Bump pino and pino-pretty", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25050", + "title": "[FIX] Upgrade Tab showing for a split second", + "userLogin": "gabriellsh", + "milestone": "4.6.1", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25055", + "title": "[FIX] UserAutoComplete not rendering UserAvatar correctly", + "userLogin": "dougfabris", + "description": "### before\r\n![Screen Shot 2022-04-04 at 16 50 21](https://user-images.githubusercontent.com/27704687/161620921-800bf66a-806d-4f83-b2e1-073c34215001.png)\r\n\r\n### after\r\n![Screen Shot 2022-04-04 at 16 49 00](https://user-images.githubusercontent.com/27704687/161620720-3e27774d-c241-46ca-b764-932a9295d709.png)", + "milestone": "4.6.1", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25031", + "title": "Chore: TS conversion folder client", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "24991", + "title": "Bump minimist from 1.2.5 to 1.2.6 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25002", + "title": "Bump template-file from 6.0.0 to 6.0.1", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25042", + "title": "Bump body-parser from 1.19.2 to 1.20.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25043", + "title": "i18n: Language update from LingoHub 🤖 on 2022-04-04Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null + ] + }, + { + "pr": "25028", + "title": "Merge master into develop & Set version to 4.7.0-develop", + "userLogin": "sampaiodiego", + "contributors": [ + "AllanPazRibeiro", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "25027", + "title": "Release 4.6.0", + "userLogin": "sampaiodiego", + "contributors": [ + "pierre-lehnen-rc", + "aswinidev", + "web-flow", + "renatobecker", + "sampaiodiego", + "dependabot[bot]", + "lingohub[bot]", + "matheusbsilva137", + "amolghode1981", + "debdutdeb", + "eduardofcabrera", + "juliajforesti", + "tiagoevanp", + "KevLehman" + ] + }, + { + "pr": "25021", + "title": "Bump @rocket.chat/emitter from 0.31.4 to 0.31.9 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25020", + "title": "Bump @rocket.chat/ui-kit from 0.31.4 to 0.31.9 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25019", + "title": "Bump @rocket.chat/message-parser from 0.31.4 to 0.31.9 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25018", + "title": "Bump @rocket.chat/string-helpers from 0.31.4 to 0.31.9 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25017", + "title": "Regression: Add createdOTR index", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24998", + "title": "Release 4.5.5", + "userLogin": "sampaiodiego", + "contributors": [ + "MartinSchoeler", + "sampaiodiego", + "filipemarins", + "tiagoevanp" + ] + }, + { + "pr": "24994", + "title": "[FIX] High CPU usage caused by CallProvider", + "userLogin": "tiagoevanp", + "description": "Remove infinity loop inside useVoipClient hook.\r\n\r\n#closes #24970", + "milestone": "4.5.5", + "contributors": [ + "ggazzo", + "tiagoevanp" + ] + }, + { + "pr": "24955", + "title": "[FIX] Multiple issues starting a new DM", + "userLogin": "filipemarins", + "description": "When the room object is searched for the first time, it does not exist on the front object yet (subscription), adding a fallback search for room list will guarantee to search the room details.\r\n\r\nbefore:\r\nhttps://user-images.githubusercontent.com/9275105/160223241-d2319f3e-82c5-47d6-867f-695ab2361a17.mp4\r\n\r\nafter:\r\nhttps://user-images.githubusercontent.com/9275105/160223244-84d0d2a1-3d95-464d-8b8a-e264b0d4d690.mp4", + "milestone": "4.5.5", + "contributors": [ + "filipemarins", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24990", + "title": "Chore: Update Livechat", + "userLogin": "MartinSchoeler", + "milestone": "4.5.5", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24938", + "title": "Release 4.5.4", + "userLogin": "AllanPazRibeiro", + "contributors": [ + "geekgonecrazy", + "AllanPazRibeiro" + ] + }, + { + "pr": "24930", + "title": "[FIX] SAML Force name to string", + "userLogin": "geekgonecrazy", + "milestone": "4.5.4", + "contributors": [ + "geekgonecrazy", + "web-flow", + "pierre-lehnen-rc" + ] + }, + { + "pr": "25015", + "title": "Chore: Bump Fuselage packages", + "userLogin": "dougfabris", + "description": "It uses the last stable version of Fuselage packages.", + "milestone": "4.6.0", + "contributors": [ + "dougfabris", + "tassoevan" + ] + }, + { + "pr": "24999", + "title": "Regression: Custom roles displaying ID instead of name on some admin screens", + "userLogin": "pierre-lehnen-rc", + "description": "![image](https://user-images.githubusercontent.com/55164754/160981416-555bcaa1-c075-4260-937c-64523472da43.png)\r\n![image](https://user-images.githubusercontent.com/55164754/160981452-6eae4e74-8425-4073-8256-472aba72b9db.png)", + "milestone": "4.6.0", + "contributors": [ + "pierre-lehnen-rc", + "dougfabris", + "web-flow" + ] + }, + { + "pr": "24835", + "title": "[NEW] Upgrade Tab", + "userLogin": "gabriellsh", + "description": "![image](https://user-images.githubusercontent.com/27704687/160172260-c656282e-a487-4092-948d-d11c9bacb598.png)", + "milestone": "4.6.0", + "contributors": [ + "gabriellsh", + "dougfabris", + "web-flow", + "tassoevan", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24980", + "title": "Regression: Error is raised when there's no Asterisk queue available yet", + "userLogin": "amolghode1981", + "milestone": "4.6.0", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24994", + "title": "[FIX] High CPU usage caused by CallProvider", + "userLogin": "tiagoevanp", + "description": "Remove infinity loop inside useVoipClient hook.\r\n\r\n#closes #24970", + "milestone": "4.5.5", + "contributors": [ + "ggazzo", + "tiagoevanp" + ] + }, + { + "pr": "24955", + "title": "[FIX] Multiple issues starting a new DM", + "userLogin": "filipemarins", + "description": "When the room object is searched for the first time, it does not exist on the front object yet (subscription), adding a fallback search for room list will guarantee to search the room details.\r\n\r\nbefore:\r\nhttps://user-images.githubusercontent.com/9275105/160223241-d2319f3e-82c5-47d6-867f-695ab2361a17.mp4\r\n\r\nafter:\r\nhttps://user-images.githubusercontent.com/9275105/160223244-84d0d2a1-3d95-464d-8b8a-e264b0d4d690.mp4", + "milestone": "4.5.5", + "contributors": [ + "filipemarins", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24969", + "title": "Chore: Storybook mocking and examples improved", + "userLogin": "tassoevan", + "description": "- Stories from `ee/` included;\r\n- Differentiate root story kinds;\r\n- Mocking of `ServerContext` via Storybook parameters.", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24990", + "title": "Chore: Update Livechat", + "userLogin": "MartinSchoeler", + "milestone": "4.5.5", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24989", + "title": "Revert: [NEW] Engagement Statistics", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24897", + "title": "[FIX] Room archived/unarchived system messages aren't sent when editing room settings", + "userLogin": "matheusbsilva137", + "description": "- Send the \"Room archived\" and \"Room unarchived\" system messages when editing room settings (and not only when rooms are archived/unarchived with the slash-command);\r\n- Fix the \"Hide System Messages\" option for the \"Room archived\" and \"Room unarchived\" system messages;", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "24925", + "title": "Chore: add some missing REST definitions", + "userLogin": "gerzonc", + "description": "On the [mobile client](https://github.com/RocketChat/Rocket.Chat.ReactNative), we made an effort to collect more `REST API` definitions that are missing on the server side during our migration to TypeScript. Since we're both migrating to TypeScript, we thought it would be a good idea to share those so you guys can benefit from our initiative.", + "contributors": [ + "gerzonc" + ] + }, + { + "pr": "24971", + "title": "i18n: Language update from LingoHub 🤖 on 2022-03-28Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null + ] + }, + { + "pr": "24921", + "title": "[FIX] Register with Secret URL", + "userLogin": "yash-rajpal", + "contributors": [ + "yash-rajpal" + ] + }, + { + "pr": "24948", + "title": "Regression: Fix unexpected errors breaking ddp-streamer", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24320", + "title": "[FIX] LDAP avatars being rotated according to metadata even if the setting to rotate uploads is off", + "userLogin": "matheusbsilva137", + "description": "- Use the `FileUpload_RotateImages` setting (**Administration > File Upload > Rotate images on upload**) to control whether avatars should be rotated automatically based on their data (XEIF);\r\n- Display the avatar image preview (orientation) according to the `FileUpload_RotateImages` setting.", + "milestone": "4.6.0", + "contributors": [ + "matheusbsilva137", + "web-flow", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24930", + "title": "[FIX] SAML Force name to string", + "userLogin": "geekgonecrazy", + "milestone": "4.5.4", + "contributors": [ + "geekgonecrazy", + "web-flow", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24908", + "title": "Regression: Call doesn't stop ringing after agent unregistration", + "userLogin": "MartinSchoeler", + "milestone": "4.6.0", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24777", + "title": "[NEW] Engagement Statistics", + "userLogin": "eduardofcabrera", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24920", + "title": "Regression: Fix account service login expiration", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24867", + "title": "[FIX] Duplicated \"jump to message\" button on starred messages", + "userLogin": "Himanshu664", + "contributors": [ + "Himanshu664" + ] + }, + { + "pr": "24860", + "title": "[FIX] External search providers not working", + "userLogin": "tkurz", + "contributors": [ + "tkurz" + ] + }, + { + "pr": "24052", + "title": "[FIX] Several issues related to custom roles", + "userLogin": "pierre-lehnen-rc", + "description": "- Throw an error when trying to delete a role (User or Subscription role) that are still being used;\r\n- Fix \"Invalid Role\" error for custom roles in Role Editing sidebar;\r\n- Fix \"Users in Role\" screen for custom roles.", + "milestone": "4.6.0", + "contributors": [ + "pierre-lehnen-rc", + "matheusbsilva137", + "web-flow" + ] + }, + { + "pr": "24781", + "title": "[NEW] Telemetry Events", + "userLogin": "eduardofcabrera", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24887", + "title": "[IMPROVE] Adding new statistics related to voip and omnichannel", + "userLogin": "cauefcr", + "description": "- Total of Canned response messages sent\r\n- Total of tags used\r\n- Last-Chatted Agent Preferred (enabled/disabled)\r\n- Assign new conversations to the contact manager (enabled/disabled)\r\n- How to handle Visitor Abandonment setting\r\n- Amount of chats placed on hold\r\n- VoIP Enabled\r\n- Amount of VoIP Calls\r\n- Amount of VoIP Extensions connected\r\n- Amount of Calls placed on hold (1x per call)\r\n- Fixed Session Aggregation type definitions", + "milestone": "4.6.0", + "contributors": [ + "cauefcr", + "KevLehman" + ] + }, + { + "pr": "24911", + "title": "Chore: Remove old scripts", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24898", + "title": "[FIX] DDP Rate Limiter Translation key", + "userLogin": "gabriellsh", + "description": "Before:\r\n\"image\"\r\n\r\n\r\nNow:\r\n\"image\"", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "24831", + "title": "[FIX][ENTERPRISE] Notifications not being sent by ddp-streamer", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24884", + "title": "Release 4.5.3", + "userLogin": "AllanPazRibeiro", + "contributors": [ + "tiagoevanp", + "sampaiodiego", + "KevLehman", + "amolghode1981", + "ggazzo" + ] + }, + { + "pr": "24901", + "title": "[FIX] Custom script not being fired", + "userLogin": "ggazzo", + "milestone": "4.5.3", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "24877", + "title": "Chore: Fix MongoDB versions on release notes", + "userLogin": "sampaiodiego", + "milestone": "4.5.3", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24864", + "title": "[FIX] Disable voip button when call is in progress", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24863", + "title": "[FIX] Broken build caused by PRs modifying same file differently", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman", + "tiagoevanp" + ] + }, + { + "pr": "24838", + "title": "[FIX] [VOIP] SidebarFooter component ", + "userLogin": "tiagoevanp", + "description": "- Improve the CallProvider code;\r\n- Adjust the text case of the VoIP component on the FooterSidebar;\r\n- Fix the bad behavior with the changes in queue's name.", + "milestone": "4.5.3", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24837", + "title": "[IMPROVE] Standarize queue behavior for managers and agents when subscribing", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24829", + "title": "[FIX] Show only enabled departments on forward", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24799", + "title": "[FIX] Wrong param usage on queue summary call", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24789", + "title": "[FIX] VoIP button gets disabled whenever user status changes", + "userLogin": "amolghode1981", + "milestone": "4.5.3", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24752", + "title": "[FIX] Show call icon only when user has extension associated", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24748", + "title": "[IMPROVE] UX - VoIP Call Component", + "userLogin": "tiagoevanp", + "milestone": "4.5.3", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24814", + "title": "Release 4.5.2", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "MartinSchoeler", + "pierre-lehnen-rc", + "tassoevan", + "debdutdeb", + "KevLehman", + "murtaza98", + "sampaiodiego", + "juliajforesti" + ] + }, + { + "pr": "24812", + "title": "[FIX] Revert AutoComplete", + "userLogin": "juliajforesti", + "milestone": "4.5.2", + "contributors": [ + "juliajforesti", + "ggazzo" + ] + }, + { + "pr": "24809", + "title": "Regression: Fix ParentRoomWithEndpointData in loop", + "userLogin": "sampaiodiego", + "milestone": "4.5.2", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24732", + "title": "[FIX] `PaginatedSelectFiltered` not handling changes", + "userLogin": "tassoevan", + "milestone": "4.5.2", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24805", + "title": "[FIX] Critical: Incorrect visitor getting assigned to a chat from apps", + "userLogin": "murtaza98", + "milestone": "4.5.2", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24804", + "title": "[FIX] \"livechat/webrtc.call\" endpoint not working", + "userLogin": "murtaza98", + "milestone": "4.5.2", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24792", + "title": "[FIX] VoipExtensionsPage component call", + "userLogin": "KevLehman", + "milestone": "4.5.2", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24705", + "title": "[FIX] Broken multiple OAuth integrations", + "userLogin": "debdutdeb", + "milestone": "4.5.2", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "24623", + "title": "[FIX] Opening a new DM from user card", + "userLogin": "tassoevan", + "description": "A race condition on `useRoomIcon` -- delayed merge of rooms and subscriptions -- was causing a UI crash whenever someone tried to open a DM from the user card component.", + "milestone": "4.5.2", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24750", + "title": "[IMPROVE] Voip Extensions disabled state", + "userLogin": "MartinSchoeler", + "milestone": "4.5.2", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24782", + "title": "Release 4.5.1", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "renatobecker", + "pierre-lehnen-rc", + "sampaiodiego", + "matheusbsilva137", + "amolghode1981", + "juliajforesti", + "tiagoevanp", + "KevLehman", + "MartinSchoeler", + "Aman-Maheshwari", + "cuonghuunguyen" + ] + }, + { + "pr": "24760", + "title": "[FIX] Apple login script being loaded even when Apple Login is disabled.", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.5.1", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "24754", + "title": "Chore: Update Livechat", + "userLogin": "MartinSchoeler", + "milestone": "4.5.1", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24683", + "title": "[FIX] no id of room closer in livechat-close message", + "userLogin": "cuonghuunguyen", + "milestone": "4.5.1", + "contributors": [ + null + ] + }, + { + "pr": "23795", + "title": "[FIX] Reload roomslist after successful deletion of a room from admin panel.", + "userLogin": "Aman-Maheshwari", + "description": "Removed the logic for calling the `rooms.adminRooms` endPoint from the `RoomsTable` Component and moved it to its parent component `RoomsPage`.\r\nThis allows to call the endPoint `rooms.adminRooms` from `EditRoomContextBar` Component which is also has `RoomPage` Component as its parent.\r\n\r\nAlso added a succes toast message after the successful deletion of room.", + "milestone": "4.5.1", + "contributors": [ + "Aman-Maheshwari", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "24743", + "title": "[FIX] System messages are sent when adding or removing a group from a team", + "userLogin": "matheusbsilva137", + "description": "- Do not send system messages when adding or removing a new or existing _group_ from a team.", + "milestone": "4.5.1", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "24737", + "title": "[FIX] Typo and placeholder on wrap up call modal", + "userLogin": "MartinSchoeler", + "milestone": "4.5.1", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24680", + "title": "[FIX] Show only available agents on extension association modal", + "userLogin": "KevLehman", + "milestone": "4.5.1", + "contributors": [ + "KevLehman", + "tiagoevanp" + ] + }, + { + "pr": "24607", + "title": "[FIX] VoIP Enable/Disable setting on CallContext/CallProvider Notifications", + "userLogin": "tiagoevanp", + "milestone": "4.5.1", + "contributors": [ + "tiagoevanp", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "24677", + "title": "[FIX] Components for user search", + "userLogin": "juliajforesti", + "milestone": "4.5.1", + "contributors": [ + "juliajforesti", + "tassoevan", + "web-flow" + ] + }, + { + "pr": "24657", + "title": "[FIX] Voip Stream Reinitialization Error", + "userLogin": "amolghode1981", + "milestone": "4.5.1", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24696", + "title": "[FIX] Room's message count not being incremented on import", + "userLogin": "matheusbsilva137", + "description": "- Fix rooms' message counter not being incremented on message import.", + "milestone": "4.5.1", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "24674", + "title": "[FIX] Missing username on messages imported from Slack", + "userLogin": "matheusbsilva137", + "description": "- Fix missing sender's username on messages imported from Slack.", + "milestone": "4.5.1", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "24590", + "title": "[FIX] Duplicated 'name' log key", + "userLogin": "sampaiodiego", + "milestone": "4.5.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24661", + "title": "[FIX] Typo in wrap-up term", + "userLogin": "renatobecker", + "milestone": "4.5.1", + "contributors": [ + "renatobecker" + ] + }, + { + "pr": "24606", + "title": "[FIX] Push privacy config to not show username not being respected", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24901", + "title": "[FIX] Custom script not being fired", + "userLogin": "ggazzo", + "milestone": "4.5.3", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "24896", + "title": "[FIX] Wrong business hour behavior", + "userLogin": "murtaza98", + "milestone": "4.6.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24845", + "title": "[FIX] Ignore customClass on messages", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24879", + "title": "[FIX] Apple OAuth", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24895", + "title": "i18n: Language update from LingoHub 🤖 on 2022-03-21Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null + ] + }, + { + "pr": "24749", + "title": "[IMPROVE] New omnichannel statistics and async statistics processing.", + "userLogin": "cauefcr", + "description": "https://app.clickup.com/t/1z4zg4e", + "contributors": [ + "cauefcr" + ] + }, + { + "pr": "24882", + "title": "[FIX] Missing dependency on useEffect at CallProvider", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24877", + "title": "Chore: Fix MongoDB versions on release notes", + "userLogin": "sampaiodiego", + "milestone": "4.5.3", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24779", + "title": "[FIX] auto-join team channels not honoring user preferences", + "userLogin": "ostjen", + "contributors": [ + "ostjen" + ] + }, + { + "pr": "24869", + "title": "Bump pino from 7.8.1 to 7.9.1 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24870", + "title": "Bump pino-pretty from 7.5.3 to 7.5.4 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24864", + "title": "[FIX] Disable voip button when call is in progress", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24863", + "title": "[FIX] Broken build caused by PRs modifying same file differently", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman", + "tiagoevanp" + ] + }, + { + "pr": "24850", + "title": "Regression: Role Sync not always working", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "24838", + "title": "[FIX] [VOIP] SidebarFooter component ", + "userLogin": "tiagoevanp", + "description": "- Improve the CallProvider code;\r\n- Adjust the text case of the VoIP component on the FooterSidebar;\r\n- Fix the bad behavior with the changes in queue's name.", + "milestone": "4.5.3", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24837", + "title": "[IMPROVE] Standarize queue behavior for managers and agents when subscribing", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24789", + "title": "[FIX] VoIP button gets disabled whenever user status changes", + "userLogin": "amolghode1981", + "milestone": "4.5.3", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24799", + "title": "[FIX] Wrong param usage on queue summary call", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24829", + "title": "[FIX] Show only enabled departments on forward", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24823", + "title": "i18n: Language update from LingoHub 🤖 on 2022-03-14Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null, + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24833", + "title": "Bump @types/mailparser from 3.0.2 to 3.4.0", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24832", + "title": "Bump @types/clipboard from 2.0.1 to 2.0.7", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24822", + "title": "Bump @types/nodemailer from 6.4.2 to 6.4.4", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24821", + "title": "Bump body-parser from 1.19.0 to 1.19.2", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24820", + "title": "Bump @types/ws from 8.5.2 to 8.5.3 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24764", + "title": "Chore: Add E2E tests for livechat/visitor", + "userLogin": "Muramatsu2602", + "description": "- Create a new test suite file under tests/end-to-end/api/livechat\r\n- Create tests for the following endpoints:\r\n + livechat/visitor (create visitor, update visitor, add custom fields to visitors)", + "contributors": [ + "Muramatsu2602", + "KevLehman" + ] + }, + { + "pr": "24729", + "title": "Chore: Add E2E tests for livechat/room.close", + "userLogin": "Muramatsu2602", + "description": "* Create a new test suite file under tests/end-to-end/api/livechat\r\n * Create tests for the following endpoint:\r\n\t + ivechat/room.close", + "contributors": [ + "Muramatsu2602", + "web-flow", + "KevLehman" + ] + }, + { + "pr": "24785", + "title": "[FIX] German translation for Monitore", + "userLogin": "JMoVS", + "contributors": [ + "JMoVS", + "web-flow" + ] + }, + { + "pr": "24812", + "title": "[FIX] Revert AutoComplete", + "userLogin": "juliajforesti", + "milestone": "4.5.2", + "contributors": [ + "juliajforesti", + "ggazzo" + ] + }, + { + "pr": "24747", + "title": "Chore: APIClass types", + "userLogin": "felipe-rod123", + "description": "This pull request creates a new `restivus` module (.d.ts) for the `api.js` file.", + "contributors": [ + "felipe-rod123", + "ggazzo" + ] + }, + { + "pr": "24801", + "title": "Bump is-svg from 4.3.1 to 4.3.2", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24803", + "title": "Bump prometheus-gc-stats from 0.6.2 to 0.6.3", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24810", + "title": "Chore: Skip local services changes when shutting down duplicated services", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24629", + "title": "[FIX] \"Match error\" when converting a team to a channel", + "userLogin": "matheusbsilva137", + "description": "- Fix \"Match error\" when trying to convert a channel to a team;", + "milestone": "4.6.0", + "contributors": [ + "matheusbsilva137", + "web-flow" + ] + }, + { + "pr": "24809", + "title": "Regression: Fix ParentRoomWithEndpointData in loop", + "userLogin": "sampaiodiego", + "milestone": "4.5.2", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24397", + "title": "Chore: Get Settings Statistics", + "userLogin": "albuquerquefabio", + "contributors": [ + "albuquerquefabio" + ] + }, + { + "pr": "24732", + "title": "[FIX] `PaginatedSelectFiltered` not handling changes", + "userLogin": "tassoevan", + "milestone": "4.5.2", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24628", + "title": "Chore: converted more hooks to typescript", + "userLogin": "felipe-rod123", + "description": "Converted some functions on `client/hooks/` from JavaScript to Typescript.", + "contributors": [ + "felipe-rod123", + "ggazzo" + ] + }, + { + "pr": "24506", + "title": "Chore: added settings endpoint types", + "userLogin": "felipe-rod123", + "description": "Created typing for endpoint definitions on `settings.ts`.", + "contributors": [ + "felipe-rod123", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "24226", + "title": "[FIX] Handle Other Formats inside Upload Avatar", + "userLogin": "nishant23122000", + "description": "After resolving issue #24213 : \r\n\r\n\r\nhttps://user-images.githubusercontent.com/53515714/150325012-91413025-786e-4ce0-ae75-629f6b05b024.mp4", + "milestone": "4.6.0", + "contributors": [ + "nishant23122000", + "debdutdeb", + "web-flow", + "murtaza98" + ] + }, + { + "pr": "24424", + "title": "[FIX] Prune Message issue", + "userLogin": "nishant23122000", + "milestone": "4.6.0", + "contributors": [ + "nishant23122000", + "debdutdeb", + "web-flow" + ] + }, + { + "pr": "24805", + "title": "[FIX] Critical: Incorrect visitor getting assigned to a chat from apps", + "userLogin": "murtaza98", + "milestone": "4.5.2", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24804", + "title": "[FIX] \"livechat/webrtc.call\" endpoint not working", + "userLogin": "murtaza98", + "milestone": "4.5.2", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24507", + "title": "Chore: added Server Instances endpoint types", + "userLogin": "felipe-rod123", + "description": "Created typing for endpoint definitions on `instances.ts`.", + "contributors": [ + "felipe-rod123" + ] + }, + { + "pr": "24758", + "title": "[FIX] Prevent call button toggle when user is on call", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24800", + "title": "Regression: Register services right away", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24792", + "title": "[FIX] VoipExtensionsPage component call", + "userLogin": "KevLehman", + "milestone": "4.5.2", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24384", + "title": "Chore: Convert server functions from javascript to typescript", + "userLogin": "felipe-rod123", + "description": "This pull request will be used to rewrite some functions on the Chat Engine to Typescript, in order to increase security and specify variable types on the code.", + "contributors": [ + "felipe-rod123", + "ggazzo" + ] + }, + { + "pr": "24705", + "title": "[FIX] Broken multiple OAuth integrations", + "userLogin": "debdutdeb", + "milestone": "4.5.2", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "24793", + "title": "[FIX][ENTERPRISE] Auto reload feature of ddp-streamer micro service", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24783", + "title": "Bump pino from 7.8.0 to 7.8.1 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "23121", + "title": "Bump jschardet from 1.6.0 to 3.0.0", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24752", + "title": "[FIX] Show call icon only when user has extension associated", + "userLogin": "KevLehman", + "milestone": "4.5.3", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24623", + "title": "[FIX] Opening a new DM from user card", + "userLogin": "tassoevan", + "description": "A race condition on `useRoomIcon` -- delayed merge of rooms and subscriptions -- was causing a UI crash whenever someone tried to open a DM from the user card component.", + "milestone": "4.5.2", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24750", + "title": "[IMPROVE] Voip Extensions disabled state", + "userLogin": "MartinSchoeler", + "milestone": "4.5.2", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24748", + "title": "[IMPROVE] UX - VoIP Call Component", + "userLogin": "tiagoevanp", + "milestone": "4.5.3", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24753", + "title": "Chore: Micro services fixes and cleanup", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24756", + "title": "Regression: Improve Sidenav open/close handling and fixed codeql configs and E2E tests", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "24760", + "title": "[FIX] Apple login script being loaded even when Apple Login is disabled.", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.5.1", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "24754", + "title": "Chore: Update Livechat", + "userLogin": "MartinSchoeler", + "milestone": "4.5.1", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24683", + "title": "[FIX] no id of room closer in livechat-close message", + "userLogin": "cuonghuunguyen", + "milestone": "4.5.1", + "contributors": [ + null + ] + }, + { + "pr": "24771", + "title": "Chore: fix grammatical errors in Features", + "userLogin": "aadishJ01", + "contributors": [ + "aadishJ01", + "web-flow" + ] + }, + { + "pr": "24759", + "title": "Chore: Fix grammatical errors in Code of Conduct", + "userLogin": "aadishJ01", + "contributors": [ + "aadishJ01", + "web-flow" + ] + }, + { + "pr": "23795", + "title": "[FIX] Reload roomslist after successful deletion of a room from admin panel.", + "userLogin": "Aman-Maheshwari", + "description": "Removed the logic for calling the `rooms.adminRooms` endPoint from the `RoomsTable` Component and moved it to its parent component `RoomsPage`.\r\nThis allows to call the endPoint `rooms.adminRooms` from `EditRoomContextBar` Component which is also has `RoomPage` Component as its parent.\r\n\r\nAlso added a succes toast message after the successful deletion of room.", + "milestone": "4.5.1", + "contributors": [ + "Aman-Maheshwari", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "24743", + "title": "[FIX] System messages are sent when adding or removing a group from a team", + "userLogin": "matheusbsilva137", + "description": "- Do not send system messages when adding or removing a new or existing _group_ from a team.", + "milestone": "4.5.1", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "24544", + "title": "Chore: Fix Cypress tests", + "userLogin": "rodrigok", + "contributors": [ + "rodrigok", + "tassoevan", + "dougfabris" + ] + }, + { + "pr": "24737", + "title": "[FIX] Typo and placeholder on wrap up call modal", + "userLogin": "MartinSchoeler", + "milestone": "4.5.1", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24739", + "title": "[IMPROVE][ENTERPRISE] Don't start presence monitor when running micro services", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24738", + "title": "[FIX][ENTERPRISE] DDP streamer not sending data to all clients", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24680", + "title": "[FIX] Show only available agents on extension association modal", + "userLogin": "KevLehman", + "milestone": "4.5.1", + "contributors": [ + "KevLehman", + "tiagoevanp" + ] + }, + { + "pr": "24710", + "title": "[FIX] DDP streamer errors", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24724", + "title": "[FIX][ENTERPRISE] Presence micro service logic", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24717", + "title": "i18n: Language update from LingoHub 🤖 on 2022-03-07Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null, + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24607", + "title": "[FIX] VoIP Enable/Disable setting on CallContext/CallProvider Notifications", + "userLogin": "tiagoevanp", + "milestone": "4.5.1", + "contributors": [ + "tiagoevanp", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "24726", + "title": "Chore: Improve logger to allow log of `unknown` values", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24677", + "title": "[FIX] Components for user search", + "userLogin": "juliajforesti", + "milestone": "4.5.1", + "contributors": [ + "juliajforesti", + "tassoevan", + "web-flow" + ] + }, + { + "pr": "24542", + "title": "[FIX] Date Message Export Filter Fix", + "userLogin": "eduardofcabrera", + "description": "Fix message export filter to get all messages between \"from date\" and \"to date\", including \"to date\".", + "contributors": [ + "eduardofcabrera", + "web-flow" + ] + }, + { + "pr": "24709", + "title": "[FIX] API Error preventing adding an email to users without one (like bot/app users)", + "userLogin": "debdutdeb", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "24716", + "title": "Bump ts-node from 10.6.0 to 10.7.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24476", + "title": "[FIX] Nextcloud OAuth for incomplete token URL", + "userLogin": "debdutdeb", + "milestone": "4.6.0", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "24657", + "title": "[FIX] Voip Stream Reinitialization Error", + "userLogin": "amolghode1981", + "milestone": "4.5.1", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24698", + "title": "Bump pino-pretty from 7.5.2 to 7.5.3 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24696", + "title": "[FIX] Room's message count not being incremented on import", + "userLogin": "matheusbsilva137", + "description": "- Fix rooms' message counter not being incremented on message import.", + "milestone": "4.5.1", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "23824", + "title": "Chore: Improvements on role syncing (ldap, oauth and saml)", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "tassoevan" + ] + }, + { + "pr": "24689", + "title": "Bump pino-pretty from 7.5.1 to 7.5.2 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24674", + "title": "[FIX] Missing username on messages imported from Slack", + "userLogin": "matheusbsilva137", + "description": "- Fix missing sender's username on messages imported from Slack.", + "milestone": "4.5.1", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "24642", + "title": "Bump actions/setup-node from 2 to 3", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24644", + "title": "i18n: Language update from LingoHub 🤖 on 2022-02-28Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null, + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24590", + "title": "[FIX] Duplicated 'name' log key", + "userLogin": "sampaiodiego", + "milestone": "4.5.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24668", + "title": "Bump actions/checkout from 2 to 3", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24574", + "title": "Chore(deps-dev): Bump @types/mock-require from 2.0.0 to 2.0.1", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24667", + "title": "Bump ts-node from 10.5.0 to 10.6.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24666", + "title": "Bump @types/ws from 8.2.3 to 8.5.2 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24640", + "title": "Bump url-parse from 1.5.7 to 1.5.10", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24653", + "title": "Merge master into develop & Set version to 4.6.0-develop", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "web-flow" + ] + }, + { + "pr": "24652", + "title": "Release 4.5.0", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "sampaiodiego", + "web-flow", + "aswinidev", + "debdutdeb", + "dependabot[bot]", + "lingohub[bot]", + "ostjen", + "KevLehman", + "dougfabris", + "LucasFASouza", + "felipe-rod123", + "guijun13", + "pierre-lehnen-rc", + "filipemarins", + "matheusbsilva137", + "gabriellsh" + ] + }, + { + "pr": "24661", + "title": "[FIX] Typo in wrap-up term", + "userLogin": "renatobecker", + "milestone": "4.5.1", + "contributors": [ + "renatobecker" + ] + }, + { + "pr": "24028", + "title": "[IMPROVE] Updated links in readme", + "userLogin": "aswinidev", + "contributors": [ + "aswinidev", + "web-flow", + "debdutdeb" + ] + }, + { + "pr": "24651", + "title": "Chore: Update Apps-Engine", + "userLogin": "d-gubert", + "milestone": "4.5.0", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "24649", + "title": "Regression: Refresh server connection when MI server settings change", + "userLogin": "KevLehman", + "milestone": "4.5.0", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24648", + "title": "Regression: Prevent button from losing state when rerendering", + "userLogin": "KevLehman", + "milestone": "4.5.0", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24585", + "title": "Regression: Error setting user avatars and mentioning rooms on Slack Import", + "userLogin": "matheusbsilva137", + "description": "- Fix `Mentioned room not found` error when importing rooms from Slack;\r\n- Fix `Forbidden` error when setting avatars for users imported from Slack (on user import/creation);\r\n- Fix incorrect message count on imported rooms;\r\n- Fix missing username on messages imported from Slack;", + "contributors": [ + "matheusbsilva137", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24647", + "title": "Regression: Fix wrong tab name for VoIP settings", + "userLogin": "renatobecker", + "milestone": "4.5.0", + "contributors": [ + "renatobecker" + ] + }, + { + "pr": "24646", + "title": "Regression: Server crashing if Voip credentials are invalid", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24645", + "title": "Regression: Extension List panel UI not aligned with designs", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24635", + "title": "Regression: Queue counter aggregator for incoming/hanged calls", + "userLogin": "amolghode1981", + "milestone": "4.5.0", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24630", + "title": "Regression: Fix double value on holdTime and empty msg on last message", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler", + "web-flow" + ] + }, + { + "pr": "24624", + "title": "Regression: If Asterisk suddenly goes down, server has no way to know. Causes server to get stuck. Needs restart", + "userLogin": "amolghode1981", + "milestone": "4.5.0", + "contributors": [ + "amolghode1981", + "KevLehman" + ] + }, + { + "pr": "24601", + "title": "Regression: Prevent connect to asterisk when VoIP is disabled", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98", + "web-flow", + "KevLehman" + ] + }, + { + "pr": "24626", + "title": "Regression: Encode registration info as JWT when signing key is provided", + "userLogin": "KevLehman", + "milestone": "4.5.0", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24625", + "title": "Regression: Fix time fields and wrap up in Voip Room Contexual bar", + "userLogin": "MartinSchoeler", + "milestone": "4.5.0", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24592", + "title": "Regression: Fix in-correct room status shown to agents", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24619", + "title": "Regression: Do not show toast on incoming voip calls", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98", + "web-flow" + ] + }, + { + "pr": "24616", + "title": "Regression: Fix incoming voip call ringtone is not ringing", + "userLogin": "murtaza98", + "contributors": [ + "murtaza98", + "web-flow" + ] + }, + { + "pr": "24610", + "title": "Regression: Mark all rooms as read modal closing instantly.", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "24615", + "title": "Regression: Fix translation for call started message", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98", + "web-flow" + ] + }, + { + "pr": "24594", + "title": "Regression: Bunch of settings fixes for VoIP", + "userLogin": "MartinSchoeler", + "milestone": "4.5.0", + "contributors": [ + "MartinSchoeler", + "web-flow" + ] + }, + { + "pr": "24609", + "title": "Regression: Admin Sidebar colors inverted.", + "userLogin": "gabriellsh", + "milestone": "4.5.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "24602", + "title": "Regression: No audio when call comes from Skype/IP phone", + "userLogin": "amolghode1981", + "description": "The audio was not rendered because of re-rendering of react element based on\r\nqueueCounter and roomInfo. queueCounter and roomInfo cause the dom to re-render when call gets accepted\r\nbecause after accepting call, queueCounter changes or a room gets created.\r\nThe audio element gets recreated. But VoIP user probably holds the old one.\r\nThe behaviour is not predictable when such case happens. If everything gets cleanly setup,\r\neven if the audio element goes headless, it still continues to play the remote audio.\r\nBut in other cases, it is unreferenced the one on dom has its srcObject as null.\r\nThis causes no audio.\r\n\r\nThis fix provides a way to re-initialise the rendering elements in VoIP user\r\nand calls this function on useEffect() if the re-render has happen.", + "milestone": "4.5.0", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24596", + "title": "Regression: Fixes in Voice Contextual Bar and Directory", + "userLogin": "MartinSchoeler", + "milestone": "4.5.0", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "24603", + "title": "Regression: Fix time format on Voip system messages", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24598", + "title": "Regression: VoIP service button displayed when VoIP is disabled", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24581", + "title": "Regression: Add support to namespace within micro services", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24583", + "title": "Regression: Error when trying to load name of dm rooms for avatars and notifications", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "24567", + "title": "[NEW] Marketplace sort filter", + "userLogin": "ujorgeleite", + "description": "Implemented a sort filter for the marketplace screen. This component sorts the marketplace apps list in 4 ways, alphabetical order(A-Z), inverse alphabetical order(Z-A), most recently updated(MRU), and least recent updated(LRU). Besides that, I've generalized some components and types to increase code reusability, renamed some helpers as well as deleted some useless ones, and inserted the necessary new translations on the English i18n dictionary.\r\nDemo gif:\r\n![Marketplace sort filter](https://user-images.githubusercontent.com/43561537/155033709-e07a6306-a85a-4f7f-9624-b53ba5dd7fa9.gif)", + "milestone": "4.5.0", + "contributors": [ + "rique223", + "ujorgeleite" + ] + }, + { + "pr": "23102", + "title": "[NEW] VoIP Support for Omnichannel", + "userLogin": "KevLehman", + "description": "- Created VoipService to manage VoIP connections and PBX connection\r\n- Created LivechatVoipService that will handle custom cases for livechat (creating rooms, assigning chats to queue, actions when call is finished, etc)\r\n- Created Basic interfaces to support new services and new model\r\n- Created Endpoints for management interfaces\r\n- Implemented asterisk connector on VoIP service\r\n- Created UI components to show calls incoming and to allow answering/rejecting calls\r\n- Added new settings to control call server/management server connection values\r\n- Added endpoints to associate Omnichannel Agents with PBX Extensions\r\n- Added support for event listening on server side, to get metadata about calls being received/ongoing\r\n- Created new pages to update settings & to see user-extension association\r\n- Created new page to see ongoing calls (and past calls)\r\n- Added support for remote hangup/hold on calls\r\n- Implemented call metrics calculation (hold time, waiting time, talk time)\r\n- Show a notificaiton when call is received", + "milestone": "4.5.0", + "contributors": [ + "KevLehman", + "amolghode1981", + "web-flow", + "tiagoevanp", + "murtaza98", + "MartinSchoeler" + ] + }, + { + "pr": "24562", + "title": "Regression: Fix room not getting created due to null visitor status", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24573", + "title": "Chore: Bump Fuselage packages", + "userLogin": "tassoevan", + "description": "It uses the last stable version of Fuselage packages.", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24558", + "title": "i18n: Language update from LingoHub 🤖 on 2022-02-21Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null, + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24572", + "title": "[FIX] 2FA via email when logging in using OAuth", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24568", + "title": "Chore: Update Apps-Engine", + "userLogin": "d-gubert", + "milestone": "4.5.0", + "contributors": [ + "d-gubert", + "web-flow" + ] + }, + { + "pr": "24536", + "title": "Chore: roomTypes: Stop mixing client and server code together", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.5.0", + "contributors": [ + "pierre-lehnen-rc", + "tassoevan", + "web-flow" + ] + }, + { + "pr": "24529", + "title": "[IMPROVE] Replace AutoComplete in UserAutoComplete & UserAutoCompleteMultiple components", + "userLogin": "juliajforesti", + "description": "This PR replaces a deprecated fuselage's component `AutoComplete` in favor of `Select` and `MultiSelect` which fixes some of UX/UI issues in selecting users\r\n\r\n### before\r\n![Screen Shot 2022-02-19 at 13 33 28](https://user-images.githubusercontent.com/27704687/154809737-8181a06c-4f20-48ea-90f7-01e828b9a452.png)\r\n\r\n### after\r\n![Screen Shot 2022-02-19 at 13 30 58](https://user-images.githubusercontent.com/27704687/154809653-a8ec9a80-c0dd-4a25-9c00-0f96147d79e9.png)", + "contributors": [ + "juliajforesti", + "dougfabris", + "tassoevan" + ] + }, + { + "pr": "24513", + "title": "Chore: Run tests using microservices deployment on CI", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow", + "rodrigok" + ] + }, + { + "pr": "24556", + "title": "Bump @types/ws from 8.2.2 to 8.2.3 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24501", + "title": "Chore: Update fuselage deps to match monolith versions", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24538", + "title": "Bump adm-zip from 0.4.14 to 0.5.9", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24454", + "title": "[IMPROVE] Purchase Type Filter for marketplace apps and Categories filter anchor refactoring", + "userLogin": "rique223", + "description": "Implemented a filter by purchase type(free or paid) component for the apps screen of the marketplace. Besides that, new entries on the dictionary, fixed some parts of the App type (purchaseType was typed as unknown and price as string), and created some helpers to work alongside the filter. Will be refactoring the categories filter anchor and then will open this PR for reviews.\r\n\r\nDemo gif:\r\n![purchaseTypeFIlter](https://user-images.githubusercontent.com/43561537/153101228-7b7ebdc3-2d34-420f-aa9d-f7cbc8d4b53f.gif)\r\n\r\nRefactored the categories filter anchor from a plain fuselage select to a select button with dynamic colors.\r\nDemo gif:\r\n![New categories filter anchor(PR)](https://user-images.githubusercontent.com/43561537/153422427-28012b7d-e0ec-45f4-861d-c9368c57ad04.gif)", + "contributors": [ + "rique223", + "dougfabris", + "web-flow" + ] + }, + { + "pr": "24475", + "title": "[IMPROVE] Skip encryption for slash commands in E2E rooms", + "userLogin": "yash-rajpal", + "description": "Currently Slash Commands don't work in an E2EE room, as we encrypt the message before slash command is detected by the server, So removed encryption for slash commands in e2e rooms.", + "contributors": [ + "yash-rajpal", + "albuquerquefabio", + "web-flow" + ] + }, + { + "pr": "24304", + "title": "Chore: Js to ts slash commands archive", + "userLogin": "eduardofcabrera", + "description": "Convert Slash Commands archive files to typescript", + "contributors": [ + "eduardofcabrera", + "web-flow" + ] + }, + { + "pr": "24114", + "title": "[NEW] E2E password generator", + "userLogin": "ostjen", + "contributors": [ + "ostjen", + "web-flow", + "eduardofcabrera", + "tassoevan" + ] + }, + { + "pr": "24553", + "title": "[FIX] Omnichannel managers can't join chats in progress", + "userLogin": "renatobecker", + "milestone": "4.5.0", + "contributors": [ + "renatobecker", + "murtaza98", + "web-flow" + ] + }, + { + "pr": "24559", + "title": "[FIX] Room context tabs not working in Omnichannel current chats page", + "userLogin": "murtaza98", + "milestone": "4.5.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "24173", + "title": "[FIX] respect `Accounts_Registration_Users_Default_Roles` setting", + "userLogin": "debdutdeb", + "description": "- Fix `user` role being added as default regardless of the `Accounts_Registration_Users_Default_Roles` setting.", + "milestone": "4.5.0", + "contributors": [ + "debdutdeb", + "web-flow", + "matheusbsilva137" + ] + }, + { + "pr": "24485", + "title": "[FIX] Skip admin info in setup wizard for servers with admin registered", + "userLogin": "dougfabris", + "contributors": [ + "dougfabris", + "tassoevan" + ] + }, + { + "pr": "24537", + "title": "Bump pm2 from 5.1.2 to 5.2.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24209", + "title": "[IMPROVE] Team system messages feedback", + "userLogin": "ostjen", + "description": "- Delete some keys that aren't being used (eg: User_left_female).\r\n- Add new Teams' system messages:\r\n - `added-user-to-team`: **added** @\\user to this Team;\r\n - `removed-user-from-team`: **removed** @\\user from this Team;\r\n - `user-converted-to-team`: **converted** #\\room to a Team;\r\n - `user-converted-to-channel`: **converted** #\\room to a Channel;\r\n - `user-removed-room-from-team`: **removed** @\\user from this Team;\r\n - `user-deleted-room-from-team`: **deleted** #\\room from this Team;\r\n - `user-added-room-to-team`: **deleted** #\\room to this Team;\r\n- Add the corresponding options to hide each new system message and the missing `ujt` and `ult` hide options.", + "milestone": "4.5.0", + "contributors": [ + "ostjen", + "tassoevan", + "web-flow", + "dougfabris", + "matheusbsilva137" + ] + }, + { + "pr": "24467", + "title": "Chore: Improve PR title validation regex", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow", + "debdutdeb" + ] + }, + { + "pr": "24058", + "title": "Bump date-fns from 2.24.0 to 2.28.0", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24508", + "title": "[FIX] Read receipts showing first messages of the room as read even if not read by everyone", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow", + "dougfabris" + ] + }, + { + "pr": "24530", + "title": "Chore: Remove storybook build job from CI", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24528", + "title": "Bump url-parse from 1.5.3 to 1.5.7", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24333", + "title": "Chore: Add description to global OTR setting", + "userLogin": "pedrogssouza", + "contributors": [ + "pedrogssouza", + "yash-rajpal", + "web-flow" + ] + }, + { + "pr": "24382", + "title": "[IMPROVE] OTR system messages", + "userLogin": "yash-rajpal", + "description": "OTR system messages to indicate key refresh and joining chat to users.", + "contributors": [ + "yash-rajpal", + "web-flow" + ] + }, + { + "pr": "24121", + "title": "[IMPROVE] Descriptive tooltip for Encrypted Key on Room Header", + "userLogin": "yash-rajpal", + "milestone": "4.5.0", + "contributors": [ + "yash-rajpal", + "web-flow" + ] + }, + { + "pr": "24522", + "title": "Bump express from 4.17.2 to 4.17.3 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24518", + "title": "Chore: `twoFactorRequired` signature", + "userLogin": "tassoevan", + "description": "Improved type checking for decorator `twoFactorRequired`.", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "24517", + "title": "Bump body-parser from 1.19.1 to 1.19.2 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24441", + "title": "[FIX] GDPR action to forget visitor data on request", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman", + "murtaza98", + "web-flow" + ] + }, + { + "pr": "24306", + "title": "Chore: Convert to typescript the slash commands create files", + "userLogin": "eduardofcabrera", + "description": "Convert Slash Commands create files to typescript.", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24325", + "title": "Chore: Convert to typescript the mute and unmute slash commands files", + "userLogin": "eduardofcabrera", + "description": "Convert to typescript the mute and unmute slash commands files", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24321", + "title": "Chore: Convert to typescript the me slashCommands files", + "userLogin": "eduardofcabrera", + "description": "Convert to typescript the me slashCommands files", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "23512", + "title": "Bump sodium-native from 3.2.1 to 3.3.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24311", + "title": "Chore: Convert to typescript the slash commands invite files", + "userLogin": "eduardofcabrera", + "description": "Convert to typescript the slash commands invite files", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24509", + "title": "Bump vm2 from 3.9.5 to 3.9.7 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24451", + "title": "[IMPROVE] ChatBox Text to File Description", + "userLogin": "eduardofcabrera", + "description": "The text content from chatbox goes to the file description when drag and drop a file.", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow", + "dougfabris" + ] + }, + { + "pr": "24461", + "title": "Chore: Update Meteor to 2.5.6", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "rodrigok", + "web-flow" + ] + }, + { + "pr": "24477", + "title": "Chore: Update ws package", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24498", + "title": "Bump underscore.string from 3.3.5 to 3.3.6 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24491", + "title": "Bump follow-redirects from 1.14.7 to 1.14.8 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24493", + "title": "i18n: Language update from LingoHub 🤖 on 2022-02-14Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null + ] + }, + { + "pr": "24331", + "title": "Chore: Convert to typescript the unarchive slash commands files", + "userLogin": "eduardofcabrera", + "description": "Convert to typescript the unarchive slash commands files", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24483", + "title": "[IMPROVE] Add tooltips on action buttons of Canned Response message composer", + "userLogin": "LucasFASouza", + "description": "The tooltips were missing on the action buttons of CR message composer.\r\n\r\n![image](https://user-images.githubusercontent.com/32396925/153620327-91107245-4b47-4d39-a99a-6da6d1cf5734.png)\r\n\r\nUsers can now feel more encouraged to use these actions knowing what they are supposed to do.", + "contributors": [ + "LucasFASouza", + "tiagoevanp", + "web-flow" + ] + }, + { + "pr": "24196", + "title": "Chore: Delete unused file (NewAdminInfoPage.js)", + "userLogin": "gabriellsh", + "description": "Just removing a duplicated/unused file.", + "milestone": "4.5.0", + "contributors": [ + "gabriellsh", + "web-flow" + ] + }, + { + "pr": "24388", + "title": "[IMPROVE][ENTERPRISE] Improve how micro services are loaded", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "sampaiodiego" + ] + }, + { + "pr": "24458", + "title": "[IMPROVE] Add return button in chats opened from the list of current chats", + "userLogin": "LucasFASouza", + "description": "The new return button for Omnichannel chats came out with release 3.15 but the feature was only available for chats that were opened from Omnichannel Contact Center.\r\nNow, the same UI/UX is supported for chats opened from Current Chats list.\r\n\r\n![image](https://user-images.githubusercontent.com/32396925/153283190-bd5c9748-c36b-4874-a704-6043afc7e3a1.png)\r\n\r\nThe chat now opens in the Omnichannel settings and has the return button so the user can go back to the Current Chats list.\r\n\r\n![image](https://user-images.githubusercontent.com/32396925/153285591-fad8e4a0-d2ea-4a02-8b2a-15e383b3c876.png)", + "contributors": [ + "LucasFASouza", + "tiagoevanp", + "web-flow" + ] + }, + { + "pr": "24469", + "title": "Bump express from 4.17.1 to 4.17.2 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24472", + "title": "Bump cookie from 0.4.1 to 0.4.2 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24275", + "title": "[IMPROVE] Close modal on esc and outside click", + "userLogin": "gabriellsh", + "description": "This is a QUICK change in order to close modals pressing Esc button and clicking outside of it **intentionally**.", + "milestone": "4.5.0", + "contributors": [ + "gabriellsh", + "dougfabris", + "tassoevan" + ] + }, + { + "pr": "24435", + "title": "Chore(deps-dev): Bump ts-node from 10.0.0 to 10.5.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24041", + "title": "[IMPROVE] Add user to room on \"Click to Join!\" button press", + "userLogin": "matheusbsilva137", + "description": "- Add user to room on \"Click to Join!\" button press;\r\n- Display the \"Join\" button in discussions inside channels (keeping the behavior consistent with discussions inside groups).", + "contributors": [ + "matheusbsilva137", + "web-flow", + "tassoevan", + "pierre-lehnen-rc", + "ostjen" + ] + }, + { + "pr": "24310", + "title": "[FIX] Implement client errors on ddp-streamer", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "23963", + "title": "Bump body-parser from 1.19.0 to 1.19.1 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "23961", + "title": "Bump jaeger-client from 3.18.1 to 3.19.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24466", + "title": "[FIX] typo on register server tooltip of setup wizard", + "userLogin": "filipemarins", + "milestone": "4.5.0", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "24037", + "title": "[FIX] Inconsistent validation of user's access to rooms", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "ostjen", + "web-flow" + ] + }, + { + "pr": "24450", + "title": "[FIX] OAuth mismatch redirect_uri error", + "userLogin": "sampaiodiego", + "milestone": "4.4.2", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24305", + "title": "[FIX] Prevent Apps Bridge to remove visitor status from room", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman", + "d-gubert" + ] + }, + { + "pr": "24453", + "title": "Chore: bump fuselage version", + "userLogin": "dougfabris", + "milestone": "4.4.2", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "24253", + "title": "[FIX] Issues on selecting users when importing CSV", + "userLogin": "guijun13", + "description": "* Fix users selecting by fixing their _id\r\n* Add condition to disable 'Start importing' button if `usersCount`, `channelsCount` and `messageCount` equals 0, or if messageCount is alone\r\n* Remove `disabled={usersCount === 0}` on user Tab", + "contributors": [ + "guijun13", + "tassoevan", + "web-flow", + "pierre-lehnen-rc" + ] + }, + { + "pr": "24299", + "title": "Chore(deps): Bump node-fetch from 2.6.1 to 2.6.7 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24418", + "title": "[FIX] Oembed request not respecting payload limit", + "userLogin": "sampaiodiego", + "milestone": "4.4.1", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24429", + "title": "i18n: Language update from LingoHub 🤖 on 2022-02-07Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null, + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24407", + "title": "[FIX] Skip cloud steps for registered servers on setup wizard", + "userLogin": "dougfabris", + "milestone": "4.4.1", + "contributors": [ + "dougfabris", + "tassoevan", + "gabriellsh", + "web-flow" + ] + }, + { + "pr": "24410", + "title": "Chore: Convert JS files to Typescript", + "userLogin": "felipe-rod123", + "description": "This pull request converts 26 more files from Javascript to Typescript, to check variable types and increase validation on the code.", + "contributors": [ + "felipe-rod123", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "24369", + "title": "[IMPROVE] Convert tag edit with department data to tsx", + "userLogin": "LucasFASouza", + "contributors": [ + "LucasFASouza", + "tiagoevanp", + "web-flow" + ] + }, + { + "pr": "24401", + "title": "[FIX] Outgoing webhook without scripts not saving messages", + "userLogin": "sampaiodiego", + "milestone": "4.4.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24334", + "title": "[IMPROVE] CloudLoginModal visual consistency", + "userLogin": "dougfabris", + "description": "### before\r\n![image](https://user-images.githubusercontent.com/27704687/151585064-dc6a1e29-9903-4241-8fbd-dfbe6c55fbef.png)\r\n\r\n### after\r\n![Screen Shot 2022-01-28 at 13 32 02](https://user-images.githubusercontent.com/27704687/151585101-75b98502-9aae-4198-bc3e-4956750e5d8b.png)", + "milestone": "4.5.0", + "contributors": [ + "dougfabris", + "gabriellsh", + "web-flow" + ] + }, + { + "pr": "24409", + "title": "[FIX] Startup errors creating indexes", + "userLogin": "sampaiodiego", + "description": "Fix `bio` and `prid` startup index creation errors.", + "milestone": "4.4.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24406", + "title": "Chore: Unify ILivechatAgent with ILivechatAgentRecord", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24381", + "title": "[FIX] Add ?close to OAuth callback url", + "userLogin": "sampaiodiego", + "milestone": "4.4.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24387", + "title": "[FIX] Slash commands previews not working", + "userLogin": "ostjen", + "milestone": "4.4.1", + "contributors": [ + "ostjen" + ] + }, + { + "pr": "24357", + "title": "i18n: Language update from LingoHub 🤖 on 2022-01-31Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null + ] + }, + { + "pr": "24341", + "title": "Bump simple-get from 4.0.0 to 4.0.1", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24366", + "title": "Chore: Set Docker image tag to latest only when really latest", + "userLogin": "debdutdeb", + "contributors": [ + "debdutdeb", + "web-flow" + ] + }, + { + "pr": "24109", + "title": "[IMPROVE] Added a new \"All\" tab which shows all integrations in Integrations", + "userLogin": "aswinidev", + "milestone": "4.5.0", + "contributors": [ + "aswinidev", + "dougfabris", + "web-flow" + ] + }, + { + "pr": "24363", + "title": "Merge master into develop & Set version to 4.5.0-develop", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + } + ] + }, + "4.5.7": { + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [] + }, + "5.0.0-rc.0": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26107", + "title": "Chore: move fork of cas module to the monorepo", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25681", + "title": "Chore: Add Agenda fork to the monorepo", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "ggazzo" + ] + }, + { + "pr": "25624", + "title": "Chore: Bump deps", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "pierre-lehnen-rc", + "web-flow" + ] + }, + { + "pr": "25791", + "title": "[NEW][ENTERPRISE] Device Management", + "userLogin": "yash-rajpal", + "milestone": "5.0.0", + "contributors": [ + "yash-rajpal", + "web-flow", + "albuquerquefabio", + "debdutdeb" + ] + }, + { + "pr": "26040", + "title": "Chore: `refactor/tsc-perf`", + "userLogin": "tassoevan", + "milestone": "5.0.0", + "contributors": [ + "tassoevan", + "ggazzo", + "pierre-lehnen-rc", + "web-flow" + ] + }, + { + "pr": "26100", + "title": "[BREAK] Upgrade to version 5.0 can be done only from version 4.x", + "userLogin": "sampaiodiego", + "milestone": "5.0.0", + "contributors": [ + "sampaiodiego", + "pierre-lehnen-rc" + ] + }, + { + "pr": "26098", + "title": "[BREAK] Remove support to old MongoDB versions", + "userLogin": "sampaiodiego", + "description": "As per MongoDB Lifecycle Schedules (https://www.mongodb.com/support-policy/lifecycles) we're removing official support to MongoDB versions **3.6 and 4.0** that have already reached end-of-life.\r\n\r\nAs MongoDB 4.2 was a \"supported\" version before Rocket.Chat 5.0, we'll continue supporting it, but will be flagged as deprecated. We recommend upgrading to MongoDB 4.4+.\r\n\r\nHere are official docs on how to upgrade to some of the supported versions:\r\n\r\n- https://www.mongodb.com/docs/manual/release-notes/4.2-upgrade-replica-set/\r\n- https://www.mongodb.com/docs/v4.4/release-notes/4.4-upgrade-replica-set/\r\n- https://www.mongodb.com/docs/manual/release-notes/5.0-upgrade-replica-set/", + "milestone": "5.0.0", + "contributors": [ + "sampaiodiego", + "KevLehman", + "debdutdeb", + "web-flow" + ] + }, + { + "pr": "25847", + "title": "[NEW] Matrix Federation UX improvements", + "userLogin": "alansikora", + "milestone": "5.0.0", + "contributors": [ + "MarcosSpessatto", + "web-flow", + "carlosrodrigues94", + "alansikora" + ] + }, + { + "pr": "26081", + "title": "[NEW][ENTERPRISE] Introducing dial pad component into sidebar, calls table, contextual bar", + "userLogin": "aleksandernsilva", + "description": "This PR adds a new call button that can be used from Sidebar & Contact Center. This also enables Omnichannel agents to make outbound calls from within Rocket.Chat.\r\n\r\nDepending on your server and call server configuration, you can do international calling, national and domestic calling.\r\n\r\nThe buttons on Contact Center allows an agent to call an existing number without having to type the number again.", + "milestone": "5.0.0", + "contributors": [ + "ggazzo", + "aleksandernsilva", + "KevLehman" + ] + }, + { + "pr": "26053", + "title": "Chore: Settings UI issue", + "userLogin": "dougfabris", + "milestone": "5.0.0", + "contributors": [ + "dougfabris", + "ggazzo" + ] + }, + { + "pr": "26064", + "title": "Chore: Adding default message parser template", + "userLogin": "hugocostadev", + "milestone": "5.0.0", + "contributors": [ + "hugocostadev", + "gabriellsh", + "sampaiodiego" + ] + }, + { + "pr": "26099", + "title": "Regression: [VideoConference] If the caller loses connection, direct calls are never canceled", + "userLogin": "pierre-lehnen-rc", + "milestone": "5.0.0", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "26094", + "title": "Chore: Handle errors on index creation", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "26095", + "title": "Chore: fix watermark condition", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "24534", + "title": "[FIX] Validate room access", + "userLogin": "albuquerquefabio", + "description": "The request must be blocked If the user has no permission to view rooms.", + "milestone": "5.0.0", + "contributors": [ + "albuquerquefabio", + "web-flow", + "yash-rajpal", + "pierre-lehnen-rc" + ] + }, + { + "pr": "25570", + "title": "[BREAK] VideoConference", + "userLogin": "dougfabris", + "description": "In this PR we're deprecating the Video Conference functionality from the core of the application and introducing a **new video conference flow**:\r\n\r\n\r\n\r\nNow the video conference feature will be agnostic so you'll be able to set the provider such as **Jisti** and **BBB** as apps from our marketplace: \r\n\r\n\r\n\r\nVideo conferences settings are now global, allowing you to set the default provider\r\n\r\n\r\n\r\n### [Enterprise Features]\r\n- Video Conferences List\r\n\r\n\r\n- Ringing function for direct messages\r\n\r\n\r\n\r\n", + "milestone": "5.0.0", + "contributors": [ + "pierre-lehnen-rc", + "web-flow", + "dougfabris" + ] + }, + { + "pr": "26083", + "title": "[FIX] Undefined headers on API Client", + "userLogin": "yash-rajpal", + "milestone": "5.0.0", + "contributors": [ + "yash-rajpal" + ] + }, + { + "pr": "26067", + "title": "Regression: Add Error boundary to katex render component", + "userLogin": "gabriellsh", + "milestone": "5.0.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "26084", + "title": "Chore: Allow endpoints to optionally require authentication", + "userLogin": "pierre-lehnen-rc", + "milestone": "5.0.0", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "26088", + "title": "Regression: Unhandled Exceptions metric causing a secondary exception", + "userLogin": "pierre-lehnen-rc", + "milestone": "5.0.0", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "26057", + "title": "[FIX] Unable to close chats when comments is disabled", + "userLogin": "murtaza98", + "description": "Fixes https://github.com/RocketChat/Rocket.Chat/issues/25954", + "milestone": "5.0.0", + "contributors": [ + "murtaza98", + "web-flow" + ] + }, + { + "pr": "26086", + "title": "Chore: Room access validation may be called without user information", + "userLogin": "pierre-lehnen-rc", + "milestone": "5.0.0", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25491", + "title": "[IMPROVE] Avoid using omnichannel-queue collection", + "userLogin": "KevLehman", + "milestone": "5.0.0", + "contributors": [ + "KevLehman", + "murtaza98" + ] + }, + { + "pr": "26087", + "title": "[FIX] Remove duplicated property _USERNAMES from createDirectRoom.ts", + "userLogin": "felipe-rod123", + "description": "This pull request removes the duplicated property `_USERNAMES` from `apps/meteor/app/lib/server/functions/createDirectRoom.ts`, using only the existing property `roomInfo.usernames`.", + "contributors": [ + "felipe-rod123" + ] + }, + { + "pr": "26085", + "title": "Chore: Improve footer Template", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "tiagoevanp" + ] + }, + { + "pr": "26055", + "title": "Regression: Fix call direction", + "userLogin": "murtaza98", + "milestone": "5.0.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "25949", + "title": "[NEW][APPS] Allow dispatchment of actions from input elements", + "userLogin": "thassiov", + "description": "This allows for apps receiving block actions when a user types on a plain text input field or selects an item from the static. A debounce of 700 ms is done when listening for typing action so the app is not flooded with actions.\r\n\r\n\r\nhttps://user-images.githubusercontent.com/733282/174858175-5ea53046-c791-493e-859b-b80431e94ffa.mp4", + "milestone": "5.0.0", + "contributors": [ + "ggazzo", + "thassiov", + "d-gubert" + ] + }, + { + "pr": "26077", + "title": "Regression: Revert Livechat packages upgrades/removals that were causing issues", + "userLogin": "murtaza98", + "milestone": "5.0.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "26079", + "title": "Regression: Users Table loading state", + "userLogin": "dougfabris", + "milestone": "5.0.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "26074", + "title": "Regression: Fix import endpoints", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "20913", + "title": "[BREAK] Suspend push notifications when login token is invalidated", + "userLogin": "g-thome", + "description": "link the auth token to the push token", + "milestone": "5.0.0", + "contributors": [ + "g-thome", + "sampaiodiego", + "pierre-lehnen-rc" + ] + }, + { + "pr": "25724", + "title": "[FIX] Not showing edit message button when blocking edit after N minutes", + "userLogin": "matthias4217", + "description": "Previously, in Rocketchat 4.7.0 and later, as mentioned in https://github.com/RocketChat/Rocket.Chat/issues/25478, the edit button was not displayed on the interface in the minute after having sent a message. This is now fixed : messages can be edited right after sending them.", + "milestone": "5.0.0", + "contributors": [ + "matthias4217", + "sampaiodiego" + ] + }, + { + "pr": "25331", + "title": "[FIX] Misaligned username on Room Info card for omnichannel chats", + "userLogin": "murtaza98", + "milestone": "5.0.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "26075", + "title": "Chore: Revert `yarn dev` implementation", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "26063", + "title": "Regression: Contact manager endpoint usage", + "userLogin": "KevLehman", + "milestone": "5.0.0", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25965", + "title": "[NEW] Create releases tab in the marketplace app info page", + "userLogin": "rique223", + "description": "Added a Releases tab to the app info page of installed marketplace apps. This tab will show all the released versions of a given app with its version number, release date in humanized form, and the changelog of this given release with the information provided by the publisher, this changelog accepts and renders markdown. Also refactored some component names and logic for maintainability reasons.\r\nDemo gif:\r\n![app-releases-tab-final](https://user-images.githubusercontent.com/43561537/176228928-651074ce-1f8b-4531-95be-1dd107938bf3.gif)", + "milestone": "5.0.0", + "contributors": [ + "rique223" + ] + }, + { + "pr": "26071", + "title": "Regression: `yarn dev` not working", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "26070", + "title": "Chore: Close tooltip on click", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "26069", + "title": "Chore: Make kodiak merge message empty", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25930", + "title": "[FIX] Too many watchers in dev environment.", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25855", + "title": "[FIX] Update subscription on update team member", + "userLogin": "LucianoPierdona", + "description": "Added update to subscription when a team member is updated on `teams.updateMember`", + "milestone": "5.0.0", + "contributors": [ + "LucianoPierdona", + "matheusbsilva137", + "web-flow" + ] + }, + { + "pr": "25988", + "title": "Regression: Add appId prop to slashcommand", + "userLogin": "tapiarafael", + "description": "Pass the appId when present to the slashcommand array. This avoid problems with contextual bar and modals not opening.", + "milestone": "5.0.0", + "contributors": [ + "tapiarafael" + ] + }, + { + "pr": "26065", + "title": "Chore: Convert useSidebarPaletteColor", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti" + ] + }, + { + "pr": "26058", + "title": "[FIX] Error \"numRequestsAllowed\" property in rateLimiter for REST API endpoint when upgrading", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "26051", + "title": "[FIX] Remove duplicated icon bell when is thread main message", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "26059", + "title": "Chore: Convert normalizeMessagesForUser", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25916", + "title": "Chore: ui-client package", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "26056", + "title": "Regression: Invalid Voip host issue preventing agents connecting to asterisk", + "userLogin": "murtaza98", + "milestone": "5.0.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "22588", + "title": "[FIX] Direct Reply", + "userLogin": "ggazzo", + "milestone": "5.0.0", + "contributors": [ + "ggazzo", + "dougfabris" + ] + }, + { + "pr": "25913", + "title": "[NEW][APPS] Allow apps to modify a subset of global settings", + "userLogin": "pierre-lehnen-rc", + "milestone": "5.0.0", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25844", + "title": "[NEW] Community Edition Watermark", + "userLogin": "hugocostadev", + "milestone": "5.0.0", + "contributors": [ + "hugocostadev", + "tassoevan", + "ggazzo" + ] + }, + { + "pr": "25889", + "title": "[BREAK] remove unused endpoints and restify others", + "userLogin": "KevLehman", + "milestone": "5.0.0", + "contributors": [ + "KevLehman", + "murtaza98" + ] + }, + { + "pr": "25993", + "title": "[IMPROVE] VoIP admin page cleanup: remove unused settings", + "userLogin": "cauefcr", + "description": "https://app.clickup.com/t/2n4m61m", + "milestone": "5.0.0", + "contributors": [ + "cauefcr", + "murtaza98", + "web-flow", + "KevLehman" + ] + }, + { + "pr": "26054", + "title": "Regression: Fix micro services", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "26052", + "title": "Regression: Fix threads list", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25966", + "title": "[NEW] VoIP Input/Output Device Selection", + "userLogin": "MartinSchoeler", + "milestone": "5.0.0", + "contributors": [ + "amolghode1981", + "web-flow", + "MartinSchoeler", + "KevLehman", + "aleksandernsilva" + ] + }, + { + "pr": "25929", + "title": "Chore: Account/Profile to TS", + "userLogin": "yash-rajpal", + "contributors": [ + "yash-rajpal", + "ggazzo" + ] + }, + { + "pr": "26048", + "title": "Chore: Add missing Swedish livechat translations", + "userLogin": "joakimaho", + "description": "Added missing Swedish translations.", + "contributors": [ + "joakimaho", + "web-flow", + "sampaiodiego" + ] + }, + { + "pr": "25970", + "title": "[IMPROVE] Expand the feature set of the new message rendering", + "userLogin": "tassoevan", + "description": "- Everything inside a new package (`@rocket.chat/gazzodown`);\r\n- KaTeX support;\r\n- Highlighted Words support;\r\n- Emoji rendering expanded;\r\n- Code rendering fixed", + "contributors": [ + "tassoevan", + "gabriellsh" + ] + }, + { + "pr": "26036", + "title": "Chore: Bump fuselage and update icon", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25937", + "title": "[NEW][APPS] Allowing apps to register authenticated routes", + "userLogin": "d-gubert", + "description": "Adds adaptations that allow apps to declare an API endpoint that requires authorization from Rocket.Chat prior to executing", + "milestone": "5.0.0", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25960", + "title": "[NEW] Enable outbound calling for EE (#25843)", + "userLogin": "KevLehman", + "milestone": "5.0.0", + "contributors": [ + "amolghode1981", + "web-flow", + "KevLehman", + "murtaza98", + "aleksandernsilva", + "tiagoevanp", + "ggazzo" + ] + }, + { + "pr": "26047", + "title": "Chore: Introduce new index to query active livechat conversations for cloud scaling", + "userLogin": "murtaza98", + "milestone": "5.0.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "25934", + "title": "[FIX] Importer fails to download files from URLs with query string params", + "userLogin": "pierre-lehnen-rc", + "milestone": "5.0.0", + "contributors": [ + "pierre-lehnen-rc", + "ggazzo" + ] + }, + { + "pr": "26007", + "title": "[IMPROVE] Moved call hold/unhold to EE", + "userLogin": "aleksandernsilva", + "description": "This PR adds a restriction, enabling the feature to hold/unhold calls only for Enterprise Edition users.", + "milestone": "5.0.0", + "contributors": [ + "aleksandernsilva", + "murtaza98" + ] + }, + { + "pr": "25505", + "title": "[NEW] Engagement Metrics - Phase 2", + "userLogin": "matheusbsilva137", + "description": "Add the following new statistics (metrics):\r\n - Total Broadcast rooms\r\n - Total rooms with an active Livestream;\r\n - Total triggered emails;\r\n - Total subscription roles;\r\n - Total User Roles;\r\n - Total uncaught exceptions;\r\n - `homeTitleChanged`: boolean value to indicate whether the `Layout_Home_Title` setting has been changed;\r\n - `homeBodyChanged`: boolean value to indicate whether the `Layout_Home_Body` setting has been changed;\r\n - `customCSSChanged`: boolean value to indicate whether the `theme-custom-css` setting has been changed;\r\n - `onLogoutCustomScriptChanged`: boolean value to indicate whether the `Custom_Script_On_Logout` setting has been changed;\r\n - `loggedOutCustomScriptChanged`: boolean value to indicate whether the `Custom_Script_Logged_Out` setting has been changed;\r\n - `loggedInCustomScriptChanged`: boolean value to indicate whether the `Custom_Script_Logged_In` setting has been changed;\r\n - `matrixBridgeEnabled`: boolean value to indicate whether the Matrix bridge has been enabled;", + "milestone": "5.0.0", + "contributors": [ + "matheusbsilva137", + "web-flow" + ] + }, + { + "pr": "26035", + "title": "Chore: Convert usePreventDefault, useQueryOptions, useShortcutOpenMenu", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti" + ] + }, + { + "pr": "25919", + "title": "[FIX] Importer files are unnecessarily transferred over the network.", + "userLogin": "pierre-lehnen-rc", + "milestone": "5.0.0", + "contributors": [ + "pierre-lehnen-rc", + "ggazzo" + ] + }, + { + "pr": "26038", + "title": "Chore: test turbo params", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "26023", + "title": "Chore: Create a token for each action", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25622", + "title": "Chore: Migrate oembed to ts", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman", + "ggazzo" + ] + }, + { + "pr": "26024", + "title": "Regression: Fix voip call wrap-up model not working", + "userLogin": "murtaza98", + "milestone": "5.0.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "26001", + "title": "Chore: Updating Apps-Engine ", + "userLogin": "d-gubert", + "milestone": "5.0.0", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25643", + "title": "[IMPROVE] Differ Voip calls from Incoming and Outgoing", + "userLogin": "murtaza98", + "description": "Updated this column and its respective endpoints to support inbound/outfound call definitions\r\n![image](https://user-images.githubusercontent.com/34130764/170512008-34202ed8-3ed4-4c28-baa5-25efc17543d5.png)", + "milestone": "5.0.0", + "contributors": [ + "murtaza98", + "web-flow", + "KevLehman" + ] + }, + { + "pr": "24379", + "title": "[FIX] Append path To Route For Custom Emoji", + "userLogin": "nishant23122000", + "milestone": "5.0.0", + "contributors": [ + "nishant23122000", + "web-flow" + ] + }, + { + "pr": "25875", + "title": "[IMPROVE] Moved call wrap up modal to EE", + "userLogin": "aleksandernsilva", + "description": "This PR adds a restriction, enabling the feature to display the call wrap up modal only for Enterprise Edition users.", + "contributors": [ + "aleksandernsilva", + "tiagoevanp" + ] + }, + { + "pr": "26015", + "title": "Chore: Major refactors in pageobjects", + "userLogin": "souzaramon", + "contributors": [ + "souzaramon" + ] + }, + { + "pr": "26002", + "title": "[BREAK] Remove show message in main thread preference", + "userLogin": "dougfabris", + "description": "This PR removes the confusion between the `show message in main thread` and the function `also to send to channel`. In the past, we used the `show message in main thread` as a solution to help users to understand the thread feature, as this feature is now mature enough there's no reason to maintain this preference. \r\n\r\nSend the thread message to the main channel or just inside of the thread, should be a decision from the user where the function `also send to channel` appears. Because of that, and because of a bunch of requests and issues we received, we're introducing a new preference `also send thread to channel` where users will be able to decide the behavior of the checkbox. \r\n\r\n![image](https://user-images.githubusercontent.com/27704687/175655594-023c5907-adc8-4924-ba7d-467608d06fec.png)\r\n\r\nNow there are three behavior options\r\n- `Default`: when it unchecks after sending the first message\r\n\r\n\r\n- `Always`: stay checked for all messages\r\n\r\n\r\n- `Never`: stay unchecked for all messages\r\n", + "milestone": "5.0.0", + "contributors": [ + "dougfabris", + "ggazzo" + ] + }, + { + "pr": "26008", + "title": "Regression: Webhook Integration Creation + string error toast msg", + "userLogin": "dudanogueira", + "milestone": "5.0.0", + "contributors": [ + "dudanogueira", + "debdutdeb", + "web-flow" + ] + }, + { + "pr": "25958", + "title": "Chore: convert e2e to ts", + "userLogin": "felipe-rod123", + "description": "Converted the `apps/meteor/app/api/server/v1/e2e.js` to ts and created endpoint typings on the `packages/rest-typings/src/v1/e2e` folder.", + "contributors": [ + "felipe-rod123", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25928", + "title": "Regression: Room Endpoint Call Issues", + "userLogin": "LucianoPierdona", + "description": "This PR fixes small management bugs related with channels, rooms and teams", + "milestone": "5.0.0", + "contributors": [ + "LucianoPierdona" + ] + }, + { + "pr": "25984", + "title": "Chore: Fixes e2e playwright intermittences", + "userLogin": "souzaramon", + "contributors": [ + "souzaramon", + "ggazzo", + "weslley543" + ] + }, + { + "pr": "26004", + "title": "Chore: Fuselage update", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti" + ] + }, + { + "pr": "25963", + "title": "Chore: Small fix on callProvider", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp", + "ggazzo" + ] + }, + { + "pr": "26000", + "title": "[FIX] Initial members value on Create Channel Modal", + "userLogin": "dougfabris", + "description": "#### before\r\n![Screen Shot 2022-06-24 at 11 58 22](https://user-images.githubusercontent.com/27704687/175562315-221dbc9a-5695-4259-a8f7-644e2ff0ab36.png)\r\n\r\n#### after\r\n![Screen Shot 2022-06-24 at 11 59 38](https://user-images.githubusercontent.com/27704687/175562510-a4a6be49-bbd2-4aeb-aedb-a5a7a6f1159d.png)", + "milestone": "5.0.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25756", + "title": "Chore: Migrate LivechatVisitors model to raw", + "userLogin": "KevLehman", + "milestone": "5.0.0", + "contributors": [ + "KevLehman", + "ggazzo", + "sampaiodiego" + ] + }, + { + "pr": "25994", + "title": "Chore: VoIP Context", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25983", + "title": "Chore: Fuselage update", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti", + "ggazzo" + ] + }, + { + "pr": "25987", + "title": "[FIX] sidebar colors", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti", + "ggazzo" + ] + }, + { + "pr": "25990", + "title": "Regression: Non-reactive routes", + "userLogin": "tassoevan", + "description": "When `Tracker.autorun()` calls are nested, it's possible that an invalidation at the parent render the children non-reactive due to synchronous calls. To avoid that under the callback given by `useSyncExternalStore`, we schedule an `onStoreChange` callback call to not make it reside at the same backtrace.", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "25982", + "title": "[BREAK] use urlParams on omnichannel/agent/extension/", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler", + "ggazzo" + ] + }, + { + "pr": "25925", + "title": "[FIX] toolbox menu behind thread component", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25475", + "title": "[FIX] Sort by scope or creation date not working on canned responses list", + "userLogin": "KevLehman", + "milestone": "5.0.0", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25969", + "title": "Chore: Colors", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti", + "ggazzo" + ] + }, + { + "pr": "25980", + "title": "Revert \"[BREAK] use urlParams on omnichannel/agent/extension/\"", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25874", + "title": "[BREAK] use urlParams on omnichannel/agent/extension/", + "userLogin": "MartinSchoeler", + "milestone": "5.0.0", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "25974", + "title": "Regression: Fix e2e CI", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25964", + "title": "Chore: Update poplib", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25961", + "title": "Regression: Set `offset` and `count` optional on `ChatGetThreadsListSchema`", + "userLogin": "LucianoPierdona", + "contributors": [ + "LucianoPierdona" + ] + }, + { + "pr": "25758", + "title": "Chore: Model Typings", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25962", + "title": "Chore: Introduce Modal Region", + "userLogin": "dougfabris", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "11744", + "title": "[NEW] Accept quoted slash command arguments", + "userLogin": "Hudell", + "milestone": "5.0.0", + "contributors": [ + "pierre-lehnen-rc", + "Hudell", + "web-flow", + "d-gubert", + "sampaiodiego" + ] + }, + { + "pr": "25956", + "title": "Chore: convert import.js endpoints to TS", + "userLogin": "felipe-rod123", + "description": "Converted the `apps/meteor/app/api/server/v1/import.js` to ts and created endpoint typings on the `packages/rest-typings/src/v1/import` folder.", + "contributors": [ + "felipe-rod123" + ] + }, + { + "pr": "25626", + "title": "[NEW] Colors Palette - Buttons", + "userLogin": "juliajforesti", + "contributors": [ + null, + "juliajforesti", + "ggazzo" + ] + }, + { + "pr": "25672", + "title": "Chore: Upgrade and remove unnecessary Livechat dependencies", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp", + "ggazzo" + ] + }, + { + "pr": "25739", + "title": "[NEW] Marketplace security tab app info page", + "userLogin": "rique223", + "description": "Created a new security tab for installed apps that displays information related to the given app security policies, terms of services, and necessary permissions for the use of the app.\r\nDemo gif:\r\n![privacy-tab](https://user-images.githubusercontent.com/43561537/173878394-333057d4-3c7e-434e-a3ca-d3e08f33c7bc.gif)", + "contributors": [ + "rique223" + ] + }, + { + "pr": "25950", + "title": "Regression: Fix blackscreen after app install", + "userLogin": "rique223", + "description": "Fixed an error where the client screen would go black after installing an app. This was hapenning because the handleAppAddedOrUpdated function from the AppsProvider had a wrong type for the return of the getAppFromMarketplace function.\r\n\r\nDemo gifs:\r\n\r\nBefore\r\n![app-install-error-before](https://user-images.githubusercontent.com/43561537/174861410-024dff74-b5d9-49ba-ae67-849f1ff239a9.gif)\r\n\r\nAfter:\r\n![app-install-error-after](https://user-images.githubusercontent.com/43561537/174861448-58b071e6-8e1b-4391-b49a-44b68249acbf.gif)", + "contributors": [ + "rique223" + ] + }, + { + "pr": "25907", + "title": "Chore: Improve CI cache", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "sampaiodiego" + ] + }, + { + "pr": "25876", + "title": "Regression: Re-add view logs button", + "userLogin": "rique223", + "description": "Re-added the view logs button to the appMenu component so that the user can go directly from the marketplace list of apps to the app info page with the logs tab already open.\r\nDemo gif:\r\n![re-add-view-logs-button](https://user-images.githubusercontent.com/43561537/173681990-86c8a93c-bb2e-4540-824d-b7fbb3161356.gif)", + "contributors": [ + "rique223" + ] + }, + { + "pr": "25920", + "title": "Chore: `@rocket.chat/favicon`", + "userLogin": "tassoevan", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "25947", + "title": "[FIX] VOIP CallContext snapshot infinite loop", + "userLogin": "hugocostadev", + "description": "The application was crashing due to an error on the `useCallerInfo()` hook.\r\nThe error was: \r\n![image](https://user-images.githubusercontent.com/20212776/174823914-4832e5dd-c91a-4ae4-9d1f-1b960bcd372c.png)\r\n![image](https://user-images.githubusercontent.com/20212776/174823982-cb543fe0-663f-4530-bb94-0720653ca897.png)\r\n\r\nTo prevent this issue to happen it was added a cached and out-of-scope snapshot variable to the hook using `useSyncExternalStore`", + "contributors": [ + "hugocostadev", + "web-flow" + ] + }, + { + "pr": "25931", + "title": "Regression: Docker image publish", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25936", + "title": "Revert: \"Chore: Collect e2e coverage\"", + "userLogin": "souzaramon", + "contributors": [ + "souzaramon", + "web-flow" + ] + }, + { + "pr": "25743", + "title": "Chore: Collect e2e coverage", + "userLogin": "souzaramon", + "contributors": [ + "souzaramon" + ] + }, + { + "pr": "25923", + "title": "Regression: Unable to edit user details via admin panel", + "userLogin": "murtaza98", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "25871", + "title": "[FIX] Members selection field on creating team modal", + "userLogin": "dougfabris", + "description": "- Fix: add members breaking when searching users\r\n\r\n![image](https://user-images.githubusercontent.com/27704687/121788070-b792f700-cba0-11eb-92b9-5833e1213c74.png)", + "milestone": "5.0.0", + "contributors": [ + "pierre-lehnen-rc", + "dougfabris" + ] + }, + { + "pr": "25911", + "title": "Chore: Remove Imperative Modal from context ", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "25915", + "title": "Chore: Keep the option to run only the meteor app", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25873", + "title": "[FIX] Update chartjs usage to v3", + "userLogin": "KevLehman", + "milestone": "5.0.0", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25830", + "title": "Chore: Rewrite AddUsers to TS", + "userLogin": "csuadev", + "contributors": [ + "csuadev", + "ggazzo", + "web-flow", + "kodiakhq[bot]", + "dougfabris", + "yash-rajpal" + ] + }, + { + "pr": "25909", + "title": "Chore: Replace `useSubscription` with `useSyncExternalStore`", + "userLogin": "tassoevan", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "25556", + "title": "Chore: Run tests on docker", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow", + "ggazzo" + ] + }, + { + "pr": "25914", + "title": "Chore: Convert RoomMenu", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti" + ] + }, + { + "pr": "25868", + "title": "[NEW] Create Team with a member list of usernames", + "userLogin": "pierre-lehnen-rc", + "milestone": "5.0.0", + "contributors": [ + "pierre-lehnen-rc", + "dougfabris" + ] + }, + { + "pr": "25754", + "title": "Chore: Convert apps/meteor/client/sidebar/search", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti", + "ggazzo" + ] + }, + { + "pr": "25747", + "title": "Chore: Split useUserInfoActions into small hooks", + "userLogin": "dougfabris", + "milestone": "5.0.0", + "contributors": [ + "dougfabris", + "gabriellsh" + ] + }, + { + "pr": "25910", + "title": "Chore: Watch for package changes", + "userLogin": "gabriellsh", + "description": "With the current `dev` pipeline, whenever we modify a package (e.g. `api-client`), we have to kill the meteor proccess and run `yarn dev` again in order for the changes to be compiled and the new output to be used by meteor.\r\n\r\nThis has the drawback of taking a little longer to run the dev environment, since we can't cache a watched buid. In the other hand, it reduces the friction of modifying internal packages since we don't need to rebuild the project for changes to take effect.\r\n\r\nThis will enable us to move more things to separate packages without affecting the dev experience too much.", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25358", + "title": "Chore: Convert assets endpoint to Typescript", + "userLogin": "MarcosSpessatto", + "contributors": [ + "MarcosSpessatto", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25635", + "title": "Chore: Convert users endpoints ", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow", + "tassoevan", + "felipe-rod123" + ] + }, + { + "pr": "25891", + "title": "[FIX] Settings not being overwritten to their default values", + "userLogin": "sampaiodiego", + "milestone": "4.8.2", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25872", + "title": "[FIX] Update import from `csv-parse`", + "userLogin": "LucianoPierdona", + "description": "This PR updates the importing of `csv-parse` because the used method wasn't working anymore, we were receiving the following error:\r\n\r\n`error: \"this.csvParser is not a function\"`", + "contributors": [ + "LucianoPierdona" + ] + }, + { + "pr": "25893", + "title": "Regression: TOTP Modal with new rest api package", + "userLogin": "yash-rajpal", + "milestone": "5.0.0", + "contributors": [ + "yash-rajpal", + "ggazzo" + ] + }, + { + "pr": "25884", + "title": "Chore: create a e2e test guideline", + "userLogin": "souzaramon", + "contributors": [ + "souzaramon" + ] + }, + { + "pr": "25870", + "title": "Chore: Fix correct unit test to api files", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25840", + "title": "Chore: convert apps/meteor/app/api/server/lib/ files to TS", + "userLogin": "felipe-rod123", + "description": "This pull request converts files on `apps/meteor/app/api/server/lib/` to Typescript.", + "contributors": [ + "felipe-rod123", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25869", + "title": "[FIX] Kebab menu clicking issue ", + "userLogin": "dougfabris", + "milestone": "5.0.0", + "contributors": [ + "dougfabris", + "tassoevan" + ] + }, + { + "pr": "25887", + "title": "Regression: Fix extended sidebar item", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "dougfabris" + ] + }, + { + "pr": "25690", + "title": "Chore: Translate admin helpers to TS", + "userLogin": "rique223", + "contributors": [ + "rique223", + "web-flow", + "ggazzo" + ] + }, + { + "pr": "25503", + "title": "Chore: convert communication methods to Typescript", + "userLogin": "felipe-rod123", + "description": "Convert files from `apps/meteor/app/apps/server/communication/` to ts.", + "contributors": [ + "felipe-rod123", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25867", + "title": "Chore: update pageobjects to use es6 getters and remove export default", + "userLogin": "souzaramon", + "contributors": [ + "souzaramon" + ] + }, + { + "pr": "25016", + "title": "[BREAK] Deactivated team members are added to auto-join rooms", + "userLogin": "matheusbsilva137", + "description": "- Do not add deactivated users to auto-join rooms.", + "contributors": [ + "matheusbsilva137" + ] + }, + { + "pr": "25714", + "title": "Chore: Broken Storybook", + "userLogin": "tiagoevanp", + "description": "There is another small improvement on the way we got storybook files.", + "contributors": [ + "tiagoevanp", + "tassoevan", + "web-flow", + "ggazzo" + ] + }, + { + "pr": "25603", + "title": "[FIX] User avatar reseting and getting random image", + "userLogin": "guijun13", + "description": "- fixes user avatar not being saved after editing the user profile issue\r\n- fixes user avatar not getting another user picture due to database deletion error", + "contributors": [ + "guijun13", + "filipemarins", + "matheusbsilva137" + ] + }, + { + "pr": "25863", + "title": "Chore: Remove old rest api code", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25719", + "title": "Chore(deps): Bump sharp from 0.30.4 to 0.30.6", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow", + "ggazzo" + ] + }, + { + "pr": "25634", + "title": "Chore: Convert sidebar/item", + "userLogin": "jeanfbrito", + "contributors": [ + "jeanfbrito", + "ggazzo" + ] + }, + { + "pr": "25858", + "title": "Chore: Rewrite RoomWithData", + "userLogin": "dougfabris", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25860", + "title": "Chore: remove unused locators from e2e tests", + "userLogin": "souzaramon", + "contributors": [ + "souzaramon" + ] + }, + { + "pr": "25410", + "title": "[FIX] fixes HTML sanitizing error.", + "userLogin": "MartinSchoeler", + "description": "If the user sent a HTML message over our product to a livechat user the HTML would get rendered on the message box, this prevents it from happening.", + "milestone": "5.0.0", + "contributors": [ + "MartinSchoeler", + "dougfabris", + "cauefcr" + ] + }, + { + "pr": "25698", + "title": "Chore: Rewrite Admin UsersTable to Typescript", + "userLogin": "dougfabris", + "milestone": "5.0.0", + "contributors": [ + "dougfabris", + "tassoevan", + "web-flow", + "ggazzo" + ] + }, + { + "pr": "25813", + "title": "Chore: add _id and name options to JSON Schemas", + "userLogin": "felipe-rod123", + "description": "This pull request adds the `roomId` and `roomName` options for the Ajv JSON Schemas on the `packages/rest-typings/src/v1/channels/` and `packages/rest-typings/src/v1/dm/` folders.", + "contributors": [ + "felipe-rod123", + "web-flow", + "ggazzo" + ] + }, + { + "pr": "25831", + "title": "[BREAK] Chore: Remove unused tokenpass integration code ", + "userLogin": "pierre-lehnen-rc", + "milestone": "5.0.0", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25842", + "title": "Chore: Fix version on develop branch ", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25632", + "title": "Chore: RouteGroup for My Account sidebar ", + "userLogin": "yash-rajpal", + "description": "Refactoring My Accounts routes. Allows to add \"my account\" routes for EE.", + "milestone": "5.0.0", + "contributors": [ + "yash-rajpal", + "dougfabris" + ] + }, + { + "pr": "25713", + "title": "[FIX] Attachments and OEmbed margins", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25835", + "title": "Chore: Typescript Sidebar RoomList", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25835", + "title": "Chore: Typescript Sidebar RoomList", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25835", + "title": "Chore: Typescript Sidebar RoomList", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25768", + "title": "[FIX] Client-generated sort parameters in channel directory ", + "userLogin": "BenWiederhake", + "contributors": [ + "BenWiederhake", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25637", + "title": "Chore: Add tests for agents screens", + "userLogin": "weslley543", + "contributors": [ + "weslley543", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25827", + "title": "Chore: Notification Preferences to TS", + "userLogin": "yash-rajpal", + "description": "- Notifications Preferences to TS.\r\n- Fix broken save action.", + "contributors": [ + "yash-rajpal", + "web-flow", + "ggazzo" + ] + }, + { + "pr": "25572", + "title": "Chore: Convert MemoizedSetting, Setting, Section", + "userLogin": "juliajforesti", + "contributors": [ + null, + "juliajforesti", + "tassoevan", + "web-flow" + ] + }, + { + "pr": "25834", + "title": "Regression: Fix users.create call", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25829", + "title": "Chore: Add auto label and improve Kodiak configuration", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25824", + "title": "Regression: Fix apps wrong typing", + "userLogin": "rique223", + "contributors": [ + "rique223", + "ggazzo" + ] + }, + { + "pr": "23426", + "title": "Chore: Remove compose from main repo", + "userLogin": "debdutdeb", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "25733", + "title": "[FIX] `You and @yourUsername reacted with`title on reactions", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25820", + "title": "[FIX] AgentsPage pagination", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "25160", + "title": "Chore: Move voip's Wrap-up and On-hold functionality to EE (Backend)", + "userLogin": "murtaza98", + "contributors": [ + "murtaza98", + "web-flow" + ] + }, + { + "pr": "25750", + "title": "[FIX] Access issue on chat.getThreadsList", + "userLogin": "murtaza98", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "25819", + "title": "Chore: Remove snap files from Houston config", + "userLogin": "murtaza98", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "25783", + "title": "[FIX] Voip endpoint permissions", + "userLogin": "murtaza98", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "25451", + "title": "[FIX] allow only livechat-agents to be contact manager for any omnichannel contact ", + "userLogin": "murtaza98", + "milestone": "5.0.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "25810", + "title": "Chore: use params instead of URL building on livechat endpoints", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25809", + "title": "Regression: fix apps path", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25774", + "title": "[BREAK] Remove RDStation integration", + "userLogin": "KevLehman", + "milestone": "5.0.0", + "contributors": [ + "KevLehman", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25469", + "title": "Chore: RestApiClient as Package", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25723", + "title": "[FIX] Wrong argument name preventing Omnichannel Chat Forward to User ", + "userLogin": "dudanogueira", + "milestone": "4.8.1", + "contributors": [ + "dudanogueira" + ] + }, + { + "pr": "25708", + "title": "[FIX] AccountBox checks for condition", + "userLogin": "tiagoevanp", + "milestone": "4.8.1", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "25797", + "title": "Chore: Fix CI", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25781", + "title": "[FIX] Fix prom-client new promise usage", + "userLogin": "KevLehman", + "milestone": "4.8.1", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25788", + "title": "[FIX] Discussion alphabetical ordering", + "userLogin": "hugocostadev", + "description": "Added a validation in the prop used for sorting (loweCaseName) checking for a prop that only exists in discussions (prid)", + "contributors": [ + "hugocostadev" + ] + }, + { + "pr": "25794", + "title": "Chore: Testing Kodiak feature", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25731", + "title": "[FIX] Broken Omnichannel>Agents page", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp", + "web-flow" + ] + }, + { + "pr": "25744", + "title": "[FIX] Sanitize styles in message", + "userLogin": "yash-rajpal", + "contributors": [ + "yash-rajpal" + ] + }, + { + "pr": "25536", + "title": "Chore: Convert to TS RoomAutoComplete", + "userLogin": "jeanfbrito", + "contributors": [ + "jeanfbrito", + "ggazzo" + ] + }, + { + "pr": "25769", + "title": "Chore: API test on method GET with params as a number.", + "userLogin": "albuquerquefabio", + "milestone": "5.0.0", + "contributors": [ + "albuquerquefabio", + "web-flow" + ] + }, + { + "pr": "25350", + "title": "Chore: convert invites, misc and subscriptions to TS and create definitions", + "userLogin": "felipe-rod123", + "description": "Converted `apps/meteor/app/api/server/v1/invites.js`, `misc.js` and `subscriptions.js` to Typescript and created their endpoint definitions on the rest-typings folder.", + "contributors": [ + "felipe-rod123", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25787", + "title": "Chore: Remove toastr package", + "userLogin": "dougfabris", + "milestone": "5.0.0", + "contributors": [ + "dougfabris", + "ggazzo" + ] + }, + { + "pr": "25649", + "title": "[BREAK] Remove Blockstack authentication", + "userLogin": "tassoevan", + "description": "Blockstack authentication is broken and is preventing some dependencies to be up to date. As a migration to Stacks authentication is not trivial, we've opted for removing the authentication service.", + "milestone": "5.0.0", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "25748", + "title": "[FIX] getUserMentionsByChannel method room permission", + "userLogin": "gabriellsh", + "milestone": "5.0.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25583", + "title": "[NEW] Fuselage ToastBar", + "userLogin": "dougfabris", + "description": "![Kapture 2022-05-20 at 14 50 19](https://user-images.githubusercontent.com/27704687/169584462-270e73aa-6dbe-4045-9847-d429125f15a6.gif)", + "milestone": "5.0.0", + "contributors": [ + "dougfabris", + "ggazzo" + ] + }, + { + "pr": "25709", + "title": "[FIX] Thread Message Preview", + "userLogin": "tassoevan", + "contributors": [ + "tassoevan", + "gabriellsh" + ] + }, + { + "pr": "25669", + "title": "[FIX] Bump meteor-node-stubs to version 1.2.3", + "userLogin": "Sh0uld", + "description": "With meteor-node-stubs version 1.2.3 a bug was fixed, which occured in issue #25460 and probably #25513 (last one not tested).\r\nFor the issue in meteor see: https://github.com/meteor/meteor/issues/11974", + "milestone": "4.8.1", + "contributors": [ + "Sh0uld", + "ggazzo" + ] + }, + { + "pr": "25680", + "title": "[IMPROVE] Refactor + unit tests for federation-v2", + "userLogin": "MarcosSpessatto", + "description": "The main goal for this PR is to add the ability to add tests in our current federation-v2 implementation.\r\nIn this PR, I've added only unit tests (80%), but the goal is to add other kinds of tests in the near future.\r\n\r\nAlso, I've created a diagram to show how this refactor was done, and how is the structure of the code\r\n\r\n![image](https://user-images.githubusercontent.com/15324204/171039619-22168000-3626-424e-b408-18dea540f786.png)", + "contributors": [ + "MarcosSpessatto" + ] + }, + { + "pr": "24796", + "title": "[FIX] user status Offline misnamed as Invisible in Custom Status edit dropdown menu", + "userLogin": "Kunalvrm555", + "milestone": "5.0.0", + "contributors": [ + "Kunalvrm555", + "web-flow", + "debdutdeb", + "dougfabris" + ] + }, + { + "pr": "25761", + "title": "Chore: Messages raw model rewrite to ts", + "userLogin": "debdutdeb", + "contributors": [ + "debdutdeb", + "pierre-lehnen-rc" + ] + }, + { + "pr": "25501", + "title": "Chore: migrate katex to ts", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25751", + "title": "Chore: AutoTranslate contextualBar rewrite", + "userLogin": "dougfabris", + "milestone": "5.0.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25752", + "title": "Chore: Replace AnnouncementModal in favor of GenericModal", + "userLogin": "dougfabris", + "milestone": "5.0.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25753", + "title": "Chore: Keyboard shortcuts contextualBar rewrite", + "userLogin": "dougfabris", + "milestone": "5.0.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25757", + "title": "Chore: Prune Messages contextualBar rewrite", + "userLogin": "dougfabris", + "milestone": "5.0.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25601", + "title": "Chore: add Ajv JSON Schema to api/v1", + "userLogin": "felipe-rod123", + "description": "This pull request adds Ajv JSON Schema validation to `apps/meteor/app/api/server/v1/` and `packages/rest-typings/src/v1/`, where needed.", + "contributors": [ + "felipe-rod123", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25755", + "title": "Chore: Update package.json update tsc memory ", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25749", + "title": "Chore: remove duplicated NotFoundPage.js", + "userLogin": "dougfabris", + "milestone": "5.0.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25630", + "title": "Chore: command's endpoints", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25741", + "title": "Chore: Fix incorrect checksum for agenda package (cause of breaking develop builds)", + "userLogin": "murtaza98", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "25730", + "title": "Chore: Remove duplicate checksumBehavior key from yarn file", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25393", + "title": "[FIX] Custom emoji reaction size", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25696", + "title": "Chore: Test for department screen", + "userLogin": "weslley543", + "contributors": [ + "weslley543" + ] + }, + { + "pr": "25697", + "title": "Chore: Taking out Blaze from routes with `MainLayout` ", + "userLogin": "tassoevan", + "description": "While working with @guijun13 on the new homepage I saw we're still rendering a Blaze template even to just embedded components into `MainLayout`. This PR addresses it.", + "milestone": "5.0.0", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "25564", + "title": "Chore: Remove all cypress tests, configs and references", + "userLogin": "souzaramon", + "contributors": [ + "souzaramon" + ] + }, + { + "pr": "25612", + "title": "Chore: adjust in some configurations", + "userLogin": "weslley543", + "contributors": [ + "weslley543", + "web-flow" + ] + }, + { + "pr": "25567", + "title": "Chore: migrate-to-pw-16-discussion", + "userLogin": "weslley543", + "contributors": [ + "weslley543" + ] + }, + { + "pr": "25712", + "title": "[FIX] Unnecessary padding on teams channels footer", + "userLogin": "dougfabris", + "description": "#### before\r\n\r\n\r\n### after\r\n", + "milestone": "5.0.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25631", + "title": "[FIX] Messages spacing", + "userLogin": "hugocostadev", + "description": "Adding `sequential` prop to Message component from Fuselage", + "contributors": [ + "hugocostadev", + "gabriellsh" + ] + }, + { + "pr": "25633", + "title": "Chore: Custom Sounds Endpoints", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25682", + "title": "[FIX] User's with non-agent role shown on voip agent association model", + "userLogin": "murtaza98", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "25667", + "title": "Chore: Convert CreateChannelWithData", + "userLogin": "juliajforesti", + "contributors": [ + null, + "juliajforesti" + ] + }, + { + "pr": "25587", + "title": "Chore: Convert UserAutoCompleteMultiple", + "userLogin": "juliajforesti", + "contributors": [ + null, + "juliajforesti" + ] + }, + { + "pr": "25658", + "title": "Chore: Converting files from app/livechat folder from JS to TS", + "userLogin": "amolghode1981", + "description": "Converting files from apps/meteor/app/livechat/lib/ from JS to TS", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "25581", + "title": "Chore: Convert sidebar/header/actions", + "userLogin": "jeanfbrito", + "contributors": [ + "jeanfbrito", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25665", + "title": "Chore: Converting omnichannel installation files to ts", + "userLogin": "aleksandernsilva", + "description": "This PR converts the omnichannel/installation folder from js to ts", + "contributors": [ + "aleksandernsilva" + ] + }, + { + "pr": "25511", + "title": "Chore: Convert to TS omnichannel/agent", + "userLogin": "jeanfbrito", + "contributors": [ + "jeanfbrito", + "ggazzo" + ] + }, + { + "pr": "25429", + "title": "Chore: Convert components/sidebar to TS", + "userLogin": "jeanfbrito", + "contributors": [ + "jeanfbrito", + "ggazzo" + ] + }, + { + "pr": "25671", + "title": "Chore: Convert apps/meteor/client/sidebar/header/index", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti" + ] + }, + { + "pr": "25666", + "title": "Chore: Migrate some small helper functions to TypeScript", + "userLogin": "tassoevan", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "25702", + "title": "Merge master into develop & Set version to 5.0.0", + "userLogin": "d-gubert", + "contributors": [ + "d-gubert", + "web-flow", + "felipe-menelau", + "pierre-lehnen-rc", + "tiagoevanp", + "MartinSchoeler", + "ggazzo", + "cauefcr", + "geekgonecrazy" + ] + }, + { + "pr": "25700", + "title": "Chore: Update Apps-Engine and Fuselage", + "userLogin": "d-gubert", + "milestone": "4.8.0", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25689", + "title": "Regression: App event listeners broke Slackbridge integration and importers", + "userLogin": "d-gubert", + "description": "Some event listeners triggered by Apps were calling `Meteor.user()` in functions that could run outside of Meteor environment", + "milestone": "4.8.0", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25686", + "title": "[FIX] Fix max-width message block", + "userLogin": "ggazzo", + "milestone": "4.8.0", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25673", + "title": "[FIX] Change form body parameter charset to UTF-8 to fix issue #25456", + "userLogin": "divinespear", + "description": "since [mscdex/busboy](https://github.com/mscdex/busboy) 1.5.0, new option named `defParamCharset` for form body parameter encoding is added with default value `latin1`, so unicode filenames are broken since 4.7.0.\r\n\r\n![Screenshot from 2022-05-28 16-26-06](https://user-images.githubusercontent.com/126630/170815447-1f3bd579-243a-42d3-86f6-814aeaa30ce9.png)", + "milestone": "4.8.0", + "contributors": [ + "divinespear" + ] + }, + { + "pr": "25687", + "title": "Regression: Fix sort field files.list", + "userLogin": "ggazzo", + "milestone": "4.8.0", + "contributors": [ + "ggazzo", + "albuquerquefabio", + "web-flow" + ] + }, + { + "pr": "25684", + "title": "[IMPROVE] add warnings for federation setup", + "userLogin": "carlosrodrigues94", + "contributors": [ + "carlosrodrigues94" + ] + }, + { + "pr": "25683", + "title": "[FIX] Prevent federation crash on invite users as a non-owner user", + "userLogin": "MarcosSpessatto", + "contributors": [ + "MarcosSpessatto" + ] + }, + { + "pr": "25653", + "title": "Regression: Broken components on Federation and Engagement dashboards", + "userLogin": "tassoevan", + "description": "For reasons I've no clue, any client import path matching `**/data/**` will not be included in the final bundle, failing silently on transpiling/bundling.", + "milestone": "4.8.0", + "contributors": [ + "tassoevan", + "gabriellsh" + ] + }, + { + "pr": "25663", + "title": "Regression: Update settings groups description", + "userLogin": "dougfabris", + "milestone": "4.8.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25569", + "title": "[FIX] Click to join button Jitsi Call", + "userLogin": "hugocostadev", + "description": "Added `ToolboxProvider` to `MessageListProvider` and fixed actionLink.js open function exec", + "milestone": "4.8.0", + "contributors": [ + "hugocostadev", + "tassoevan", + "web-flow" + ] + }, + { + "pr": "25644", + "title": "Regression: Endpoint types with Ajv Coercing data types", + "userLogin": "albuquerquefabio", + "description": "Ajv Coercing data types should be `true` to accept all kinds of data requested.", + "contributors": [ + "albuquerquefabio" + ] + }, + { + "pr": "25618", + "title": "Regression: Change logic to check if connection is online on unstable networks", + "userLogin": "KevLehman", + "milestone": "4.8.0", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25639", + "title": "Regression: Missing settings group descriptions", + "userLogin": "dougfabris", + "description": "", + "milestone": "4.8.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25648", + "title": "Chore: Rest API query parameters handling", + "userLogin": "ggazzo", + "milestone": "5.0.0", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25651", + "title": "Regression: VoIp wrap up modal not opening after call disconnect", + "userLogin": "aleksandernsilva", + "description": "This PR fixes a bug preventing the wrap up call modal from being displayed after caller or agent ends the call.", + "milestone": "4.8.0", + "contributors": [ + "aleksandernsilva" + ] + }, + { + "pr": "25638", + "title": "[FIX] Remove 'total' text in admin info page", + "userLogin": "guijun13", + "description": "- Remove initial 'total' text from rooms and messages groups in the admin info page\r\n- Add 'total' before 'rooms' and 'messages' title on the same section. To use the new 'Total Rooms', was created a new key in the en.i18n.json file.", + "contributors": [ + "guijun13" + ] + }, + { + "pr": "25641", + "title": "Chore: Increase performance and security of integrations’ scripts", + "userLogin": "rodrigok", + "description": "Replace internal VM implementation with VM2 which implements many more mechanisms to ensure timeout, security and allow easier configuration for future improvements on the integrations' feature.", + "contributors": [ + "rodrigok", + "ggazzo" + ] + }, + { + "pr": "25613", + "title": "[FIX] Quote message spacing", + "userLogin": "hugocostadev", + "contributors": [ + "hugocostadev" + ] + }, + { + "pr": "25629", + "title": "Regression: Assets & Slack Bridge Setting Page not rendering", + "userLogin": "dougfabris", + "milestone": "4.8.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25627", + "title": "Regression: Subscription menu not appearing for non installed but subscribed apps", + "userLogin": "rique223", + "description": "Fixed a problem on which the AppMenu component did not appear for apps that had an active subscription but weren't installed, now the rendering of the component is also based on the isSubscribed flag, and the appearance of the uninstall and enable/disable options are based on the app.installed flag so that the correct options appear on all the edge cases.\r\nDemo gif:\r\n![subscription-manager-fix](https://user-images.githubusercontent.com/43561537/170132040-dc8535c0-8056-4fb2-b008-afaece744868.gif)", + "milestone": "4.8.0", + "contributors": [ + "rique223" + ] + }, + { + "pr": "25521", + "title": "Chore: Rewrite im and dm endpoints to ts", + "userLogin": "albuquerquefabio", + "description": "- Endpoints rewritten to TS\r\n - dm.create\r\n - dm.delete\r\n - dm.close\r\n - dm.counters\r\n - dm.files\r\n - dm.history\r\n - dm.members\r\n - dm.messages\r\n - dm.messages.others\r\n - dm.list\r\n - dm.list.everyone\r\n - dm.open\r\n - dm.setTopic\r\n - im.create\r\n - im.delete\r\n - im.close\r\n - im.counters\r\n - im.files\r\n - im.history\r\n - im.members\r\n - im.messages\r\n - im.messages.others\r\n - im.list\r\n - im.list.everyone\r\n - im.open\r\n - im.setTopic\r\n- Some lines of code was refactored on `apps/meteor/app/api/server/v1/im.ts`\r\n- Unnecessary functions were deleted on `apps/meteor/app/lib/server/functions/getDirectMessageByNameOrIdWithOptionToJoin.ts`\r\n- New types was added on `apps/meteor/app/api/server/api.d.ts`", + "contributors": [ + "albuquerquefabio", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25617", + "title": "Chore: Update Apps-Engine version", + "userLogin": "d-gubert", + "milestone": "4.8.0", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25616", + "title": "[FIX] Message menu dropdown not working on Mobile Web", + "userLogin": "gabriellsh", + "milestone": "4.8.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25615", + "title": "[FIX] Fixing app contextual bar functionality", + "userLogin": "AllanPazRibeiro", + "milestone": "4.8.0", + "contributors": [ + "AllanPazRibeiro" + ] + }, + { + "pr": "25499", + "title": "[NEW] New button for network outage", + "userLogin": "amolghode1981", + "description": "When network outage happens it should be conveyed to the user with special icon. This icon should not be clickable.\r\nNetwork outage handling is handled in https://app.clickup.com/t/245c0d8 task.", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "24711", + "title": "[NEW] Marketplace new app details page", + "userLogin": "rique223", + "description": "Change the app details page layout for the new marketplace UI. General Task: [MKP12 - New UI - App Detail Page](https://app.clickup.com/t/1na769h)\r\n\r\n## [MKP12 - Tab Navigation](https://app.clickup.com/t/2452f5u)\r\nNew tab navigation layout for the app details page. Now the app details page is divided into three sections, details, logs, and settings, that can each be accessed through a Tabs fuselage component.\r\n\r\nDemo gif:\r\n![tab_navigation_demo_gif](https://user-images.githubusercontent.com/43561537/157276436-3dab34c5-20da-4f5d-99d0-54c1c718ac1f.gif)\r\n\r\n## [MKP12 - Header](https://app.clickup.com/t/25rhm0x)\r\nImplemented a new header for the marketplaces app details page.\r\n-Changed the size of the app name;\r\n-Implemented the app description field on the header;\r\n-Changed the \"metadata\" section of the header(The part with the version and author information) now it also shows the last time the app was updated;\r\n-Created a chip that will show when an app is part of one or more bundles and inform which are the bundles;\r\n-Implemented a tooltip for the bundle chips;\r\n-Created a new button + data badge component to substitute the current App Status;\r\n-Changed the title of the \"purchase button\". Now it shows different text based on the \"purchase type\" of the app;\r\n-Created a new Pricing & Status display which shows the price when the app is not bought/installed and shows the app status(Enabled/Disabled) when it is bought/installed;\r\n-Changed the way the tabs are rendered, now if the app is not installed(and consequently doesn't have logs and settings tab) it will not render these tabs;\r\n\r\nDemo gif:\r\n![new-header-gif](https://user-images.githubusercontent.com/43561537/159064599-fd64dfe2-86a3-47da-81ba-1e83f1b87432.gif)\r\n\r\n## [MKP12 - Configuration Tab](https://app.clickup.com/t/2452gh4)\r\nDelivered together with the tab-navigation task. Changed the app settings from the details of the app to the new settings tab.\r\nDemo image:\r\n![New configuration tab](https://user-images.githubusercontent.com/43561537/160211324-95db0566-85bf-4dde-a814-3c6f23dcee4d.png)\r\n\r\n## [MKP12 - Log Tab](https://app.clickup.com/t/2452gg1)\r\nChanged the place of the app logs from the page to the new logs tab. Also changed some styles of the logs accordions to fit better with the new container.\r\n\r\nBefore:\r\n![Before](https://user-images.githubusercontent.com/43561537/160210302-148ce584-604f-40ff-8209-141667016163.png)\r\n\r\nAfter\r\n![After](https://user-images.githubusercontent.com/43561537/160210984-d4060c5a-f912-4ef9-87e3-fa459080e2d4.png)\r\n\r\n## [MKP12 - Page Header](https://app.clickup.com/t/29b0b12)\r\nChanged the design for the page header of the app details page from a title on the left with a save and back button on the right to a back arrow icon on the left side of the title with the save button still on the right. Also changed the title of the page from App details to Back.\r\nEdit: After some design reconsideration, the page title was changed to App Info.\r\nDemo gif:\r\n![new_page_header_app_details](https://user-images.githubusercontent.com/43561537/160937741-f5514f70-f43b-4400-8b2f-a5a26f95de9d.gif)\r\n\r\n## [MKP12 - Detail Tab](https://app.clickup.com/t/2452gf7)\r\nImplemented markdown on the description section of the app details page, now the description will show the detailedDescription.rendered (as rendered JSX) information in case it exists and show the description (a.k.a. short description) information in case it doesn't. Unfortunately, as of right now no app has a visual example of a markdown description and because of that, I will not be able to provide a demo image/gif for this PR.\r\n\r\n## [MKP12 - Slider Component](https://app.clickup.com/t/2452h26)\r\nCreated an image carousel component on the app details page. This component receives images from the apps/appId/screenshots endpoint and shows them on the content section of the app details of any apps that have screenshots registered, if the app has no screenshots it simply shows nothing where the carousel should be. This component is complete with keyboard arrow navigation on the \"open\" carousel, hover highlight on the carousel preview and close on esc press.\r\nDemo gif:\r\n![new_carousel_component](https://user-images.githubusercontent.com/43561537/167415212-9d8359c7-4132-4afa-a698-8be4ab1e1393.gif)", + "milestone": "4.8.0", + "contributors": [ + "rique223", + "web-flow", + "ggazzo", + "dougfabris" + ] + }, + { + "pr": "25108", + "title": "[IMPROVE] Unify voip streams into single stream", + "userLogin": "KevLehman", + "milestone": "4.8.0", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25444", + "title": "[FIX] Removing user also removes them from Omni collections", + "userLogin": "cauefcr", + "contributors": [ + "cauefcr", + "web-flow", + "KevLehman" + ] + }, + { + "pr": "25398", + "title": "[FIX] Upgrade tab loader in incorrect position", + "userLogin": "guijun13", + "description": "- Add invisible prop to iframe when loading state is active.", + "milestone": "4.8.0", + "contributors": [ + "guijun13", + "tassoevan" + ] + }, + { + "pr": "25436", + "title": "[NEW] Ability for RC server to check the business hour for a specific department", + "userLogin": "murtaza98", + "milestone": "4.8.0", + "contributors": [ + "murtaza98", + "tiagoevanp" + ] + }, + { + "pr": "25606", + "title": "Chore: Code Improvements for #25391", + "userLogin": "MartinSchoeler", + "milestone": "4.8.0", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "25604", + "title": "[FIX] useCurrentChatTags is not a function", + "userLogin": "MartinSchoeler", + "milestone": "4.8.0", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "25535", + "title": "[FIX] Pinned Message display cutting off information", + "userLogin": "hugocostadev", + "milestone": "4.8.0", + "contributors": [ + "hugocostadev", + "gabriellsh" + ] + }, + { + "pr": "25290", + "title": "Chore: Dependencies upgrade", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25605", + "title": "Chore: bump fuselage", + "userLogin": "dougfabris", + "milestone": "4.8.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25457", + "title": "[NEW] Federation (Alpha Stabilization)", + "userLogin": "alansikora", + "milestone": "4.8.0", + "contributors": [ + "alansikora", + "MarcosSpessatto", + "web-flow", + "geekgonecrazy" + ] + }, + { + "pr": "24519", + "title": "Chore: Convert to typescript some functions from app/lib/server/functions", + "userLogin": "eduardofcabrera", + "description": "Convert to typescript some functions from app/lib/server/functions and transfered theses files to server/lib", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25329", + "title": "[NEW] Add option to show mentions badge when show counter is disabled", + "userLogin": "marceloschmidt", + "contributors": [ + "marceloschmidt", + "web-flow", + "ggazzo" + ] + }, + { + "pr": "25391", + "title": "[FIX] Fixing Network connectivity issues with SIP client.", + "userLogin": "amolghode1981", + "description": "The previous PR https://github.com/RocketChat/Rocket.Chat/pull/25170 did not handle the issues completely.\r\nThis PR is expected to handle\r\n1. Clearing call related UI when the network is disconnected or switched.\r\n2. Do clean connectivity. There were few issues discovered in earlier implementation. e.g endpoint would randomly\r\nget disconnected after a while. This was due to the fact that the earlier socket disconnection caused the\r\nremoval of contact on asterisk. This should be fixed in this PR.\r\n3. This PR contains a lot of logs. This will be removed before the final merge.", + "milestone": "4.8.0", + "contributors": [ + "amolghode1981" + ] + }, + { + "pr": "25494", + "title": "[FIX] Ordered and unordered list styles, Line breaks.", + "userLogin": "gabriellsh", + "description": "Also removed the message.md cache from server, since changes in the parser might break messages in the future (and will in this specific case).", + "milestone": "4.8.0", + "contributors": [ + "gabriellsh", + "tassoevan", + "web-flow" + ] + }, + { + "pr": "25592", + "title": "Chore: Convert slashCommands to typescript", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "eduardofcabrera", + "ostjen", + "web-flow" + ] + }, + { + "pr": "25514", + "title": "[NEW] Get user's preferred language via apps", + "userLogin": "murtaza98", + "contributors": [ + "murtaza98", + "d-gubert" + ] + }, + { + "pr": "25383", + "title": "[NEW] Star message, report and delete message events", + "userLogin": "tapiarafael", + "contributors": [ + "tapiarafael", + "d-gubert" + ] + }, + { + "pr": "25234", + "title": "[NEW] Add new events after user login, logout and change his status", + "userLogin": "tapiarafael", + "contributors": [ + "tapiarafael", + "d-gubert" + ] + }, + { + "pr": "25337", + "title": "[NEW] Add new app events for pin, react and follow message", + "userLogin": "tapiarafael", + "contributors": [ + "tapiarafael", + "d-gubert" + ] + }, + { + "pr": "25591", + "title": "Chore: Convert AutoTranslate", + "userLogin": "PedroRorato", + "contributors": [ + "PedroRorato" + ] + }, + { + "pr": "25582", + "title": "Chore: Migrate retention-policy to ts", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "24307", + "title": "Chore: Convert to typescript the slash commands help files", + "userLogin": "eduardofcabrera", + "description": "Convert to typescript the slash commands help files", + "contributors": [ + "eduardofcabrera", + "web-flow", + "pierre-lehnen-rc" + ] + }, + { + "pr": "25589", + "title": "Chore: Convert Create Channel", + "userLogin": "juliajforesti", + "contributors": [ + null + ] + }, + { + "pr": "25586", + "title": "Chore: Convert additionalForms", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "MartinSchoeler" + ] + }, + { + "pr": "25425", + "title": "Chore: Rewrite autotranslate to ts", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25165", + "title": "[NEW] Add user events for apps", + "userLogin": "tapiarafael", + "contributors": [ + "tapiarafael", + "d-gubert" + ] + }, + { + "pr": "25283", + "title": "[FIX] Integrations avatar attribute misuse", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25367", + "title": "Chore: Converting orchestrator.js to ts", + "userLogin": "AllanPazRibeiro", + "contributors": [ + "AllanPazRibeiro" + ] + }, + { + "pr": "25504", + "title": "Chore: convert marketplace price display component to use typescript", + "userLogin": "matheuslc", + "description": "**Marketplace apps listing page**\r\n![Screen Shot 2022-05-13 at 12 57 43](https://user-images.githubusercontent.com/4161171/168322189-67990fdf-a447-46dc-8f88-08b16c2a5416.png)\r\n\r\n**Apps detail page**\r\n![Screen Shot 2022-05-13 at 12 58 56](https://user-images.githubusercontent.com/4161171/168322241-505ee5bb-d3d8-4b0e-8757-873a1a65a6a6.png)", + "contributors": [ + "matheuslc" + ] + }, + { + "pr": "25554", + "title": "Chore: Convert apps/meteor/client/components/UserAutoComplete", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti", + "ggazzo" + ] + }, + { + "pr": "25544", + "title": "[FIX] Initial User not added to default channel", + "userLogin": "geekgonecrazy", + "description": "If injecting initial user. The user wasn’t added to the default General channel", + "milestone": "4.7.2", + "contributors": [ + "geekgonecrazy", + "web-flow" + ] + }, + { + "pr": "25078", + "title": "[NEW] New stats rewrite", + "userLogin": "ostjen", + "description": "Add the following new statistics (**metrics**):\r\n\r\n- Total users with TOTP enabled;\r\n- Total users with 2FA enabled;\r\n- Total pinned messages;\r\n- Total starred messages;\r\n- Total email messages;\r\n- Total rooms with at least one starred message;\r\n- Total rooms with at least one pinned message;\r\n- Total encrypted rooms;\r\n- Total link invitations;\r\n- Total email invitations;\r\n- Logo change;\r\n- Number of rooms inside teams;\r\n- Number of default (auto-join) rooms inside teams;\r\n- Number of users created through link invitation;\r\n- Number of users created through manual entry;\r\n- Number of imported users (by import type);", + "contributors": [ + "ostjen", + "matheusbsilva137", + "sampaiodiego" + ] + }, + { + "pr": "25565", + "title": "Chore: Convert apps/meteor/client/views/admin/settings", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti" + ] + }, + { + "pr": "25520", + "title": "[FIX] User abandonment setting was not working doe to failing event hook", + "userLogin": "cauefcr", + "description": "A setting watcher and the query for grabbing abandoned chats were broken, now they're not.", + "milestone": "4.7.2", + "contributors": [ + "cauefcr", + "tiagoevanp" + ] + }, + { + "pr": "25558", + "title": "Test: Migrate 13-permissions from cypress to playwright", + "userLogin": "souzaramon", + "contributors": [ + "souzaramon" + ] + }, + { + "pr": "25445", + "title": "[FIX] Add open user card to user avatar", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25495", + "title": "[FIX] Dynamic load matrix is enabled and handle failure ", + "userLogin": "ggazzo", + "milestone": "4.7.2", + "contributors": [ + "ggazzo", + "geekgonecrazy" + ] + }, + { + "pr": "25409", + "title": "[FIX] One of the triggers was not working correctly", + "userLogin": "MartinSchoeler", + "milestone": "4.7.2", + "contributors": [ + "MartinSchoeler", + "tiagoevanp" + ] + }, + { + "pr": "25555", + "title": "Regression: CI services build", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25381", + "title": "Chore: User set UTC offset", + "userLogin": "albuquerquefabio", + "contributors": [ + "albuquerquefabio", + "web-flow" + ] + }, + { + "pr": "24612", + "title": "[FIX] Rooms' names turn lower case on CSV import", + "userLogin": "guijun13", + "description": "* Change 'Settings' import to not get cached configs\r\n* Remove update `UI_Allow_room_names_with_special_chars` value", + "contributors": [ + "guijun13" + ] + }, + { + "pr": "25542", + "title": "Chore: migrate-to-pw-adjust-in-intermitences", + "userLogin": "weslley543", + "contributors": [ + "weslley543" + ] + }, + { + "pr": "23849", + "title": "[IMPROVE][ENTERPRISE] Allow mapping LDAP groups to multiple RC roles", + "userLogin": "matheusbsilva137", + "description": "- Add support to mapping LDAP groups to multiple roles (by specifying arrays in the \"User Data Group Map\" enterprise setting.", + "contributors": [ + "matheusbsilva137", + "pierre-lehnen-rc" + ] + }, + { + "pr": "25522", + "title": "Chore: Livechat change output level", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25326", + "title": "[NEW] Adding app button on user dropdown", + "userLogin": "AllanPazRibeiro", + "contributors": [ + "AllanPazRibeiro", + "d-gubert", + "web-flow" + ] + }, + { + "pr": "25523", + "title": "Chore: migrate from cypress to pw 14-setting-permission", + "userLogin": "weslley543", + "contributors": [ + "weslley543" + ] + }, + { + "pr": "25253", + "title": "Chore: Tests with Playwright (task: ROC-31, 12-settings)", + "userLogin": "souzaramon", + "contributors": [ + "souzaramon", + "web-flow" + ] + }, + { + "pr": "25462", + "title": "Chore: Migrate 15-message-popup from cypress to playwright", + "userLogin": "souzaramon", + "contributors": [ + "souzaramon" + ] + }, + { + "pr": "25427", + "title": "Chore: Convert apps/meteor/client/views/admin/settings/inputs folder", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti" + ] + }, + { + "pr": "25407", + "title": "[FIX] UI/UX issues on Live Chat widget", + "userLogin": "MartinSchoeler", + "milestone": "4.7.2", + "contributors": [ + "MartinSchoeler", + "dougfabris" + ] + }, + { + "pr": "25348", + "title": "Chore: Convert Admin -> Rooms to TS", + "userLogin": "yash-rajpal", + "contributors": [ + "yash-rajpal", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25509", + "title": "Chore: Migrate NotFoundPage to TS", + "userLogin": "hugocostadev", + "contributors": [ + "hugocostadev" + ] + }, + { + "pr": "25412", + "title": "[FIX] Unable to see channel member list by authorized channel roles", + "userLogin": "hugocostadev", + "contributors": [ + "hugocostadev" + ] + }, + { + "pr": "25519", + "title": "Regression: Fix services-image-build-check", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "25507", + "title": "Chore: Migrate spotify to ts", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25508", + "title": "Chore: Reorder unreleased migrations", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25471", + "title": "[FIX] Spotlight results showing usernames instead of real names", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.7.1", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25434", + "title": "[FIX] LDAP sync removing users from channels when multiple groups are mapped to it", + "userLogin": "pierre-lehnen-rc", + "milestone": "4.7.1", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25413", + "title": "Chore: Move markdown message parser to a `callback`", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25448", + "title": "[FIX] Settings listeners not receiving overwritten values from env vars", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "25246", + "title": "Chore: Move ddp-streamer micro service to its own sub-repo", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25441", + "title": "[NEW] Use setting to determine if initial general channel is needed", + "userLogin": "felipe-menelau", + "description": "- Adds flag responsible for overwriting #general channel creation", + "milestone": "4.7.1", + "contributors": [ + "felipe-menelau", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "25439", + "title": "[IMPROVE] New admin settings Page", + "userLogin": "dougfabris", + "description": "![Screen Shot 2022-05-09 at 11 31 58](https://user-images.githubusercontent.com/27704687/167432811-f4970f23-5dae-48a0-a427-92269d08a859.png)", + "milestone": "4.8.0", + "contributors": [ + "dougfabris", + "ggazzo" + ] + }, + { + "pr": "25473", + "title": "[FIX] Failure to update Integration History index", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "25285", + "title": "Chore: Rewrite 2fa to typescript", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25468", + "title": "Chore: solve yarn issues from env var", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25446", + "title": "Chore: REST query and body params validation", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25416", + "title": "Chore: Tests with Playwright (task: ROC-66, Intermittent resolution in tests)", + "userLogin": "weslley543", + "contributors": [ + "weslley543", + "souzaramon" + ] + }, + { + "pr": "25298", + "title": "Chore: Convert email inbox feature to TypeScript", + "userLogin": "ujorgeleite", + "contributors": [ + "ujorgeleite", + "albuquerquefabio", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "25442", + "title": "Chore: Move admin sidebarItems registration to the main file", + "userLogin": "dougfabris", + "milestone": "4.8.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25449", + "title": "[FIX] Sanitize customUserStatus and fix infinite loop", + "userLogin": "dougfabris", + "description": "### Additional improves:\r\n- usage of RHF to avoid unnecessary Add and Edit components separately and form validation\r\n- usage of `GenericTableV2` and some hooks to avoid unnecessary code\r\n- fix `IUserStatus` type\r\n- improves in UI design\r\n- improves **empty** and **loading** state\r\n- improves files structure\r\n\r\n[LOOP ERROR ATTACHMENT]\r\n![Screen Shot 2022-05-09 at 19 42 53](https://user-images.githubusercontent.com/27704687/167510439-1980461c-a885-46d2-9a49-79da432c7521.png)", + "milestone": "4.8.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25318", + "title": "[IMPROVE] Fix multiple bugs with Matrix bridge", + "userLogin": "MarcosSpessatto", + "contributors": [ + "MarcosSpessatto" + ] + }, + { + "pr": "25265", + "title": "Chore: Convert `UserStatusMenu` to TS", + "userLogin": "debdutdeb", + "contributors": [ + "debdutdeb", + "tassoevan" + ] + }, + { + "pr": "25443", + "title": "Chore: Chore add validation option to rest endpoints", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25279", + "title": "Chore: Add channel endpoints (rest-typings)", + "userLogin": "debdutdeb", + "contributors": [ + "debdutdeb", + "ggazzo" + ] + }, + { + "pr": "25432", + "title": "Chore: Dedicated package for UI contexts", + "userLogin": "tassoevan", + "description": "Moving our React contexts to a different package on the monorepo enable us to deliver components from another packages, because they work as a loose connection to the core APIs.", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "25424", + "title": "Chore: Convert RoomForeword, TextCopy and RoomAvatarEditor to TS", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25418", + "title": "Chore: Rewrite action-links to ts", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25421", + "title": "Chore: Rewrite mail-messages to ts", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25430", + "title": "Chore: Convert useUpdateAvatar to TS and type avatar endpoints", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25423", + "title": "[FIX] Change NPS Vote identifier + nps index to unique", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "22374", + "title": "[IMPROVE] Pass allowDiskUse to channel aggregations on engagement dashboard", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25431", + "title": "Chore: Manager Page Rewrite", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler", + "ggazzo" + ] + }, + { + "pr": "25426", + "title": "Chore: Convert useFileInput to TS", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25420", + "title": "Chore: convert info to typescript", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25395", + "title": "Chore: Enable marketplace screenshots endpoint", + "userLogin": "matheuslc", + "contributors": [ + "matheuslc", + "web-flow" + ] + }, + { + "pr": "25312", + "title": "Chore: Add Livechat repo into Monorepo packages", + "userLogin": "tiagoevanp", + "milestone": "4.7.2", + "contributors": [ + "tiagoevanp", + "ggazzo", + "web-flow", + "MartinSchoeler" + ] + }, + { + "pr": "25303", + "title": "Chore: Rewrite Jitsi Contextualbar to TS", + "userLogin": "dougfabris", + "milestone": "4.8.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25372", + "title": "Chore: Convert AdminSideBar to ts", + "userLogin": "jeanfbrito", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25347", + "title": "Chore: Convert push endpoints to TS", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25397", + "title": "Chore: Add client folder to CODEOWNERS ", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25394", + "title": "Chore: Update Volta configuration", + "userLogin": "tassoevan", + "description": "[Volta](https://volta.sh/) need some extra configuration to work on monorepos.", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "25359", + "title": "Chore: Rewrite some Omnichannel files to TypeScript", + "userLogin": "tiagoevanp", + "description": "apps/meteor/client/components/Omnichannel/modals/*\r\napps/meteor/client/components/Omnichannel/Tags.js", + "contributors": [ + "tiagoevanp", + "ggazzo" + ] + }, + { + "pr": "25288", + "title": "Chore: Convert customUserStatus folder to ts", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti" + ] + }, + { + "pr": "25343", + "title": "Chore: Convert federationDashboard folder to ts", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti" + ] + }, + { + "pr": "25252", + "title": "Chore: Tests with Playwright (task: ROC-25, 06-message)", + "userLogin": "weslley543", + "contributors": [ + "weslley543", + "web-flow", + "ggazzo" + ] + }, + { + "pr": "25345", + "title": "Chore: Convert client/views/admin/settings/groups folder to ts", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti" + ] + }, + { + "pr": "25342", + "title": "Chore: Convert getStatistics", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25276", + "title": "Chore: Add typings for /v1/webdav.getMyAccounts", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25274", + "title": "Chore: Convert customSounds folder to ts", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti", + "dougfabris", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25277", + "title": "Chore: Convert Admin/OAuthApps to TS", + "userLogin": "yash-rajpal", + "description": "- Converts Admin/OAuthApps to TS.\r\n- migrated forms to react-hook-form", + "contributors": [ + "yash-rajpal", + "felipe-rod123", + "ggazzo" + ] + }, + { + "pr": "25278", + "title": "Chore: Add /v1/video-conference endpoint types", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "pierre-lehnen-rc", + "ggazzo" + ] + }, + { + "pr": "25380", + "title": "Regression: Fix clicking on visitor's chat in the sidebar does not display the chat window", + "userLogin": "filipemarins", + "description": "Fix: livechat room not opening.", + "milestone": "4.7.0", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25314", + "title": "Regression: Fix size of custom emoji and render emoji on thread message preview", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25371", + "title": "Chore: Bump fuselage", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25336", + "title": "Chore: Add options to debug stdout and rate limiter", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25368", + "title": "Regression: Fix English i18n react text", + "userLogin": "d-gubert", + "description": "Incorrect text in reaction tooltip has been fixed", + "milestone": "4.7.0", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25349", + "title": "Regression: Rocket.Chat Webapp not loading.", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "gabriellsh" + ] + }, + { + "pr": "25317", + "title": "Regression: Fix multi line is not showing an empty line between lines", + "userLogin": "filipemarins", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25320", + "title": "Regression: bump onboarding-ui version", + "userLogin": "guijun13", + "description": "- Bump to 'next' the onboarding-ui package from fuselage.\r\n- Update from 'companyEmail' to 'email' adminData usage types", + "contributors": [ + "guijun13" + ] + }, + { + "pr": "25335", + "title": "Chore: Create README.md for Rest Typings", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25327", + "title": "Regression: Messages in new message template Crashing.", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25323", + "title": "Regression: Better MongoDB connection management for micro services", + "userLogin": "sampaiodiego", + "milestone": "4.7.0", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25250", + "title": "Regression: Validate empty fields for Message template", + "userLogin": "gabriellsh", + "milestone": "4.8.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25319", + "title": "Regression: Fix the alpine image and dev UX installing matrix-rust-sdk-bindings", + "userLogin": "geekgonecrazy", + "description": "The package only included a few pre-built which caused all macs to have to compile every time they installed and also caused our alpine not to work.\r\n\r\nThis temporarily switches to a fork of the matrix-appservice-bridge package.\r\n\r\nMade changes to one of its child dependencies `matrix-rust-sdk-bindings` that adds pre-built binaries for mac and musl (for alpine).", + "milestone": "4.7.0", + "contributors": [ + "geekgonecrazy", + "web-flow", + "d-gubert" + ] + }, + { + "pr": "25255", + "title": "Regression: Change preference to be default legacy messages", + "userLogin": "gabriellsh", + "milestone": "4.8.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25306", + "title": "Regression: Fix reply button not working when hideFlexTab is enabled", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25311", + "title": "Regression: Add eslint package to micro services Dockerfile", + "userLogin": "sampaiodiego", + "milestone": "4.7.0", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25218", + "title": "Chore: ensure scripts use cross-env and ignore some dirs (ROC-54)", + "userLogin": "souzaramon", + "description": "- data and test-failure should be ignored\r\n- ensure scripts use cross-env", + "contributors": [ + "souzaramon" + ] + }, + { + "pr": "25313", + "title": "Regression: Revert Bugsnag version", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25305", + "title": "Regression: eslint not running on packages", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "ggazzo" + ] + }, + { + "pr": "25299", + "title": "Regression: Add `isPending` status to message", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25301", + "title": "Regression: Shows error if micro service cannot connect to Mongo", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25287", + "title": "Regression: Use exact Node version on micro services Docker images", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25286", + "title": "Chore: Add root package.json to houston files", + "userLogin": "d-gubert", + "description": "See title", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25284", + "title": "Chore: Sync with master", + "userLogin": "d-gubert", + "contributors": [ + "sampaiodiego", + "d-gubert", + "web-flow" + ] + }, + { + "pr": "25269", + "title": "Chore: Minor dependency updates", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "25224", + "title": "Chore: Add yarn plugin to check node and yarn version", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25280", + "title": "Chore: Remove package-lock.json from houston files", + "userLogin": "d-gubert", + "description": "Houston config in the `package.json` file still mentioned `package-lock.json`, but it doesn't exist anymore", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "25260", + "title": "[FIX] Adjust email label in Setup Wizard i18n files", + "userLogin": "guijun13", + "description": "- remove 'Company' label on onboarding email keys in certain languages", + "contributors": [ + "guijun13" + ] + }, + { + "pr": "25275", + "title": "Chore: Fix return type warnings", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "23870", + "title": "[NEW] Expand Apps Engine's environment variable allowed list", + "userLogin": "cuonghuunguyen", + "milestone": "4.7.0", + "contributors": [ + null, + "debdutdeb", + "web-flow", + "cuonghuunguyen", + "dougfabris" + ] + }, + { + "pr": "25273", + "title": "Regression: Fix federation Matrix bridge startup", + "userLogin": "sampaiodiego", + "milestone": "4.7.0", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25092", + "title": "[FIX] Message preview not available for queued chats", + "userLogin": "murtaza98", + "milestone": "4.7.0", + "contributors": [ + "murtaza98", + "KevLehman" + ] + }, + { + "pr": "23688", + "title": "[NEW] Alpha Matrix Federation", + "userLogin": "alansikora", + "description": "Experimental support for Matrix Federation with a Bridge\r\n\r\nhttps://user-images.githubusercontent.com/51996/164530391-e8b17ecd-a4d0-4ef8-a8b7-81230c1773d3.mp4", + "milestone": "4.7.0", + "contributors": [ + "alansikora", + "geekgonecrazy", + "MarcosSpessatto", + "rodrigok" + ] + }, + { + "pr": "25259", + "title": "Chore: Bump Fuselage packages", + "userLogin": "dougfabris", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25261", + "title": "[FIX] Incorrect websocket url in livechat widget", + "userLogin": "debdutdeb", + "milestone": "4.7.0", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "25007", + "title": "[FIX] Showing Blank Message Inside Report", + "userLogin": "nishant23122000", + "description": "https://user-images.githubusercontent.com/53515714/161038085-4a86c7ae-6751-4996-9767-b1c9e0331a6c.mp4", + "contributors": [ + "nishant23122000" + ] + }, + { + "pr": "25251", + "title": "Regression: Add select message to system message and thread preview and allow select on legacy template", + "userLogin": "filipemarins", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "ggazzo", + "web-flow", + "gabriellsh", + "dougfabris" + ] + }, + { + "pr": "25239", + "title": "[FIX] Add katex render to new message react template", + "userLogin": "filipemarins", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "ggazzo", + "dougfabris" + ] + }, + { + "pr": "25257", + "title": "Chore: Update Livechat to the last version", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24515", + "title": "[FIX] Custom sound error toast messages", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "dougfabris" + ] + }, + { + "pr": "25211", + "title": "Regression: Avatar not loading on first direct message", + "userLogin": "filipemarins", + "description": "fix avatar not loading on a first direct message", + "milestone": "4.7.0", + "contributors": [ + "filipemarins", + "ggazzo" + ] + }, + { + "pr": "25254", + "title": "Regression: Show username and real name on the message system", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25217", + "title": "[IMPROVE] Performance for some Omnichannel features", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25200", + "title": "[FIX] room creation fails if app framework is disabled", + "userLogin": "debdutdeb", + "milestone": "4.7.0", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "24565", + "title": "[IMPROVE] Add OTR Room States", + "userLogin": "yash-rajpal", + "description": "Earlier OTR room uses only 2 states, we need more states to support future features. \r\nThis adds more states for the OTR contextualBar.\r\n\r\n- Expired\r\n\"Screen\r\n\r\n- Declined\r\nScreen Shot 2022-04-20 at 13 49 28\r\n\r\n- Error\r\n\"Screen", + "milestone": "4.7.0", + "contributors": [ + "yash-rajpal", + "dougfabris" + ] + }, + { + "pr": "25170", + "title": "[FIX] Client disconnection on network loss", + "userLogin": "amolghode1981", + "description": "Agent gets disconnected (or Unregistered) from asterisk in multiple ways. The goal is that agent should remain online\r\nunless agent explicitly logs off.\r\nAgent can stop receiving calls in multiple ways due to network loss. Network loss can happen in following ways.\r\n1. User tries to switch the network. User experiences a glitch of disconnectivity. This can be simulated by turning the network off\r\nin the network tab of chrome's dev tool. This can disconnect the UA if the disconnection happens just before the registration refresh.\r\n2. Second reason is when computer goes in sleep mode.\r\n3. Third reason is that when asterisk is crashed/in maintenance mode/explicitly stopped.\r\n\r\nSolution:\r\nThe idea is to detect the network disconnection and start the start the attempts to reconnect.\r\nThe detection of the disconnection does not happen in case#1. The SIPUA's UserAgent transport does not\r\ncall onDisconnected when network loss of such kind happens. To tackle this problem, window's online and offline event handlers are\r\nused.\r\n\r\nThe number of retries is configurable but ideally it is to be kept at -1. Whenever disconnection happens, it should keep on trying to\r\nreconnect with increasing backoff time. This behaviour is useful when the asterisk is stopped.\r\n\r\nWhen the server is disconnected, it should be indicated on the phone button.", + "contributors": [ + "amolghode1981", + "KevLehman" + ] + }, + { + "pr": "25244", + "title": "[FIX] Read receipts show with color gray when not read yet", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "25230", + "title": "[FIX] VoIP disabled/enabled sequence puts voip agent in error state", + "userLogin": "amolghode1981", + "description": "Initially it was thought that the issue occurs because of the race condition while changing the client settings vs those settings reflected on server side. So a natural solution to solve this is to wait for setting change event 'private-settings-changed'. Then if 'VoIP_Enabled' is updated and it is true, set voipEnabled to true in useVoipClient.ts (on client side)\r\n\r\nIt was realised that the race does not happen because of the database or server noticing the changes late. But because of the time taken to establish the AMI connection with Asterisk.\r\n\r\nSolution:\r\n\r\n1. Change apps/meteor/app/voip/server/startup.ts. When VoIP_Enabled is changed, await for Voip.init() to complete and then broadcast connector.statuschanged with changed value.\r\n2. From apps/meteor/server/modules/listeners/listeners.module.ts use notifyLoggedInThisInstance to notify all logged in users on current instance.\r\n3. in apps/meteor/client/providers/CallProvider/hooks/useVoipClient.ts add the event handler that receives this event. Change voipEnabled from constant to state. Change this state based on the 'value' that is received by the handler.", + "contributors": [ + "amolghode1981", + "KevLehman" + ] + }, + { + "pr": "25087", + "title": "[NEW] Add expire index to integration history", + "userLogin": "geekgonecrazy", + "milestone": "4.7.0", + "contributors": [ + "geekgonecrazy" + ] + }, + { + "pr": "24521", + "title": "Chore: update OTR icon", + "userLogin": "kibonusp", + "description": "I changed the shredder icon in OTR contextual bar to the stopwatch icon, recently added to the fuselage.", + "milestone": "4.7.0", + "contributors": [ + "kibonusp", + "yash-rajpal", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "25237", + "title": "[FIX] Toolbox hiding under contextual bar", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25231", + "title": "[IMPROVE] Added MaxNickNameLength and MaxBioLength constants", + "userLogin": "aakash-gitdev", + "contributors": [ + "aakash-gitdev", + "web-flow", + "gabriellsh" + ] + }, + { + "pr": "25220", + "title": "[FIX] Desktop notification on multi-instance environments", + "userLogin": "sampaiodiego", + "milestone": "4.6.3", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25175", + "title": "[FIX] Reply button behavior on broadcast channel", + "userLogin": "filipemarins", + "description": "Hide reply button for the user that sent the message", + "contributors": [ + "filipemarins", + "web-flow" + ] + }, + { + "pr": "25216", + "title": "[FIX] Read receipts showing before message read", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "25222", + "title": "[FIX] Add reaction not working in legacy messages", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25223", + "title": "Chore: Add error boundary to message component", + "userLogin": "gabriellsh", + "description": "Not crash the whole application if something goes wrong in the MessageList component.\r\n\r\n![image](https://user-images.githubusercontent.com/40830821/162269915-931c5c3c-c979-4234-b74c-371f67467ce0.png)", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25130", + "title": "Chore: Update Livechat version", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "25073", + "title": "[FIX] AgentOverview analytics wrong departmentId parameter", + "userLogin": "paulobernardoaf", + "description": "When filtering the analytics charts by department, data would not appear because the object:\r\n```js\r\n{\r\n value: \"department-id\",\r\n label: \"department-name\"\r\n}\r\n```\r\nwas being used in the `departmentId` parameter.\r\n\r\n- Before:\r\n![image](https://user-images.githubusercontent.com/30026625/161832057-d96ffd21-a7dd-421e-bfaa-3b9f4a9127b2.png)\r\n\r\n- After:\r\n![image](https://user-images.githubusercontent.com/30026625/161831092-9ee77b51-b083-4f45-9c48-ab2e0511c4d6.png)", + "milestone": "4.7.0", + "contributors": [ + "paulobernardoaf" + ] + }, + { + "pr": "25056", + "title": "[FIX] Close room when dismiss wrap up call modal", + "userLogin": "tiagoevanp", + "milestone": "4.7.0", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "25208", + "title": "Regression: yarn dev triggers build dependencies", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "24714", + "title": "[FIX] Added invalid password error message", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "dougfabris" + ] + }, + { + "pr": "25196", + "title": "Chore: Tests with Playwright (task: ROC-28, 09-channels)", + "userLogin": "tmontini", + "contributors": [ + "tmontini" + ] + }, + { + "pr": "25174", + "title": "Chore: Template to generate packages", + "userLogin": "ggazzo", + "description": "```\r\nnpx hygen package new test\r\n```", + "contributors": [ + "ggazzo", + "web-flow", + "sampaiodiego" + ] + }, + { + "pr": "25193", + "title": "Regression: Fix micro services Docker build", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "25180", + "title": "Chore: Remove duplicated useUserRoom", + "userLogin": "dougfabris", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25167", + "title": "Chore: TS migration SortList", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "24933", + "title": "[FIX] Deactivating user breaks if user is the only room owner", + "userLogin": "sidmohanty11", + "description": "## Before\r\n\r\nhttps://user-images.githubusercontent.com/73601258/160000871-cfc2f2a5-2a59-4d27-8049-7754d003dd48.mp4\r\n\r\n\r\n\r\n## After\r\nhttps://user-images.githubusercontent.com/73601258/159998287-681ab475-ff33-4282-82ff-db751c59a392.mp4", + "milestone": "4.6.2", + "contributors": [ + "sidmohanty11", + "sampaiodiego" + ] + }, + { + "pr": "25181", + "title": "Regression: Fix services Docker build on CI", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25089", + "title": "[FIX] UserCard sanitization", + "userLogin": "dougfabris", + "description": "- Rewrites the component to TS\r\n- Fixes some visual issues\r\n\r\n### before\r\n![Screen Shot 2022-04-07 at 00 23 11](https://user-images.githubusercontent.com/27704687/162113925-5c9484d1-23e9-4623-8b86-3fbc71b461a1.png)\r\n\r\n### after\r\n![Screen Shot 2022-04-07 at 00 07 13](https://user-images.githubusercontent.com/27704687/162112353-afd6aac6-b27c-4470-a642-631b8080d59e.png)", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25085", + "title": "Chore: move definitions to packages", + "userLogin": "ggazzo", + "milestone": "3.7.0", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25168", + "title": "Regression: CI playwright", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25125", + "title": "Chore: Convert NotificationStatus to TS", + "userLogin": "jeanfbrito", + "contributors": [ + "jeanfbrito", + "ggazzo" + ] + }, + { + "pr": "25148", + "title": "[FIX] Message menu action not working on legacy messages.", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25122", + "title": "Chore: Tests with Playwright (task: All works)", + "userLogin": "weslley543", + "contributors": [ + "weslley543" + ] + }, + { + "pr": "25129", + "title": "Chore: Remove old files from removed Omnichannel feature", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25128", + "title": "Chore: Convert admin custom sound to tsx", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25126", + "title": "Chore: Migrate oauth2server to typescript", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "25123", + "title": "Chore: Convert LivechatAgentActivity to raw model and TS", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25124", + "title": "Chore: Remove unused Drone CI files", + "userLogin": "geekgonecrazy", + "contributors": [ + "geekgonecrazy", + "web-flow" + ] + }, + { + "pr": "25121", + "title": "Chore: Convert Mailer to TS", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti", + "sampaiodiego" + ] + }, + { + "pr": "25107", + "title": "Regression: Fix CI monorepo build", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "25074", + "title": "Chore: Monorepo ", + "userLogin": "ggazzo", + "milestone": "3.7.0", + "contributors": [ + "sampaiodiego", + "ggazzo" + ] + }, + { + "pr": "25097", + "title": "[IMPROVE] Rename upgrade tab routes", + "userLogin": "guijun13", + "description": "Change 'upgrade tab' routes names from camelCase ('goFullyFeatured') to kebab-case ('go-fully-featured') due to URL naming consistency. Changed types, main function and test.", + "contributors": [ + "guijun13" + ] + }, + { + "pr": "25076", + "title": "Bump eslint-plugin-anti-trojan-source from 1.0.6 to 1.1.0", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "24936", + "title": "[FIX] End call button disappearing when on-hold", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "24932", + "title": "[FIX] Use correct room property for call ended at", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "25022", + "title": "[FIX] Proxy settings being ignored", + "userLogin": "pierre-lehnen-rc", + "description": "Modify Meteor's `HTTP.call` to add back proxy support", + "milestone": "4.6.1", + "contributors": [ + "pierre-lehnen-rc", + "sampaiodiego" + ] + }, + { + "pr": "25082", + "title": "[FIX] Invitation links don't redirect to the registration form", + "userLogin": "yash-rajpal", + "milestone": "4.6.1", + "contributors": [ + "yash-rajpal" + ] + }, + { + "pr": "23971", + "title": "[NEW] Message Template React Component", + "userLogin": "ggazzo", + "description": "Complete rewrite of the messages component in react. Visual changes should be minimal as well as user impact, with no break changes (unless you've customized the blaze template).\r\n\r\n\r\n\r\n![Screen Shot 2022-04-05 at 11 14 18](https://user-images.githubusercontent.com/27704687/161774027-38dd9c7b-eeeb-45e2-b9d8-ea2a9be8486d.png)\r\nIn case you encounter any problems, or want to compare, temporarily it is possible to use the old version\r\n\r\n\"image\"", + "contributors": [ + "ggazzo", + "sampaiodiego" + ] + }, + { + "pr": "25069", + "title": "[FIX] FormData uploads not working", + "userLogin": "gabriellsh", + "milestone": "4.6.1", + "contributors": [ + "gabriellsh", + "dougfabris" + ] + }, + { + "pr": "19866", + "title": "[FIX] Video and Audio not skipping forward", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler", + "tassoevan", + "web-flow", + "dougfabris" + ] + }, + { + "pr": "25067", + "title": "[FIX] NPS never finishing sending results", + "userLogin": "sampaiodiego", + "milestone": "4.6.1", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "24405", + "title": "[IMPROVE] Add tooltip to sidebar room menu", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "web-flow", + "dougfabris" + ] + }, + { + "pr": "24431", + "title": "[IMPROVE] Added tooltip options for message menu", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "dougfabris" + ] + }, + { + "pr": "24166", + "title": "[FIX] Replace encrypted text to Encrypted Message Placeholder", + "userLogin": "yash-rajpal", + "description": "### before \r\n![image](https://user-images.githubusercontent.com/27704687/150807900-154a9cdb-ee13-4333-8628-f287ab914b40.png)\r\n\r\n### after\r\n\"Screenshot", + "milestone": "4.7.0", + "contributors": [ + "yash-rajpal", + "albuquerquefabio", + "web-flow" + ] + }, + { + "pr": "24984", + "title": "[FIX] Prevent sequential messages edited icon to hide on hover", + "userLogin": "dougfabris", + "description": "### before\r\n\"Screen\r\n\r\n### after\r\n\"Screen", + "milestone": "4.7.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25024", + "title": "[IMPROVE] Improve active/hover colors in account sidebar", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664" + ] + }, + { + "pr": "24856", + "title": "[FIX] Full error message is visible", + "userLogin": "Himanshu664", + "milestone": "4.7.0", + "contributors": [ + "Himanshu664", + "tassoevan" + ] + }, + { + "pr": "24708", + "title": "Chore: Cancel running jobs if PR is updated", + "userLogin": "debdutdeb", + "contributors": [ + "debdutdeb", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "24900", + "title": "Chore: organize test files and fix code coverage", + "userLogin": "tmontini", + "contributors": [ + null, + "tmontini", + "rodrigok" + ] + }, + { + "pr": "24464", + "title": "Chore: Missing keys in APIsDisplay", + "userLogin": "dougfabris", + "milestone": "4.7.0", + "contributors": [ + "dougfabris", + "tassoevan" + ] + }, + { + "pr": "25057", + "title": "Bump ejson from 2.2.1 to 2.2.2", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25053", + "title": "Chore: Remove Alpine image deps after using them", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25052", + "title": "Bump pino and pino-pretty", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25050", + "title": "[FIX] Upgrade Tab showing for a split second", + "userLogin": "gabriellsh", + "milestone": "4.6.1", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "25055", + "title": "[FIX] UserAutoComplete not rendering UserAvatar correctly", + "userLogin": "dougfabris", + "description": "### before\r\n![Screen Shot 2022-04-04 at 16 50 21](https://user-images.githubusercontent.com/27704687/161620921-800bf66a-806d-4f83-b2e1-073c34215001.png)\r\n\r\n### after\r\n![Screen Shot 2022-04-04 at 16 49 00](https://user-images.githubusercontent.com/27704687/161620720-3e27774d-c241-46ca-b764-932a9295d709.png)", + "milestone": "4.6.1", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "25031", + "title": "Chore: TS conversion folder client", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "24991", + "title": "Bump minimist from 1.2.5 to 1.2.6 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25002", + "title": "Bump template-file from 6.0.0 to 6.0.1", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25042", + "title": "Bump body-parser from 1.19.2 to 1.20.0 in /ee/server/services", + "userLogin": "dependabot[bot]", + "contributors": [ + "dependabot[bot]", + "web-flow" + ] + }, + { + "pr": "25043", + "title": "i18n: Language update from LingoHub 🤖 on 2022-04-04Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null + ] + }, + { + "pr": "25028", + "title": "Merge master into develop & Set version to 4.7.0-develop", + "userLogin": "sampaiodiego", + "contributors": [ + "AllanPazRibeiro", + "sampaiodiego", + "web-flow" + ] + } + ] + }, + "4.6.4": { + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [] + }, + "4.7.3": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [] + }, + "4.7.4": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "553", + "title": "Load missed messages from opened rooms when reconnect", + "userLogin": "rodrigok", + "contributors": [ + "rodrigok" + ] + } + ] + }, + "4.8.1": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "25723", + "title": "[FIX] Wrong argument name preventing Omnichannel Chat Forward to User ", + "userLogin": "dudanogueira", + "milestone": "4.8.1", + "contributors": [ + "dudanogueira" + ] + }, + { + "pr": "25669", + "title": "[FIX] Bump meteor-node-stubs to version 1.2.3", + "userLogin": "Sh0uld", + "description": "With meteor-node-stubs version 1.2.3 a bug was fixed, which occured in issue #25460 and probably #25513 (last one not tested).\r\nFor the issue in meteor see: https://github.com/meteor/meteor/issues/11974", + "milestone": "4.8.1", + "contributors": [ + "Sh0uld", + "ggazzo" + ] + }, + { + "pr": "25708", + "title": "[FIX] AccountBox checks for condition", + "userLogin": "tiagoevanp", + "milestone": "4.8.1", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "25781", + "title": "[FIX] Fix prom-client new promise usage", + "userLogin": "KevLehman", + "milestone": "4.8.1", + "contributors": [ + "KevLehman" + ] + } + ] + }, + "5.0.0-rc.1": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26127", + "title": "Regression: Close button on modals created via apps not working", + "userLogin": "murtaza98", + "milestone": "5.0.0", + "contributors": [ + "murtaza98", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "26125", + "title": "Regression: Unable to click on UiKit buttons provided by apps", + "userLogin": "murtaza98", + "milestone": "5.0.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "26140", + "title": "Regression: Fix assets format", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "ggazzo" + ] + }, + { + "pr": "26062", + "title": "Regression: Update error message on `useEndpointActionExperimental`", + "userLogin": "LucianoPierdona", + "description": "This PR changes the way we show an error message to the user on the `useEndpointActionExperimental` hook, previously for `Object` error messages it was being shown as undefined", + "contributors": [ + "LucianoPierdona", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "26129", + "title": "Regression: All users in members list showing as federated", + "userLogin": "gabriellsh", + "milestone": "5.0.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "26115", + "title": "Regression: Do not show federated tooltip on non-federated rooms", + "userLogin": "MarcosSpessatto", + "milestone": "5.0.0", + "contributors": [ + "MarcosSpessatto", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "26117", + "title": "Regression: Users on new sessions are forced to re-configure 2fa", + "userLogin": "pierre-lehnen-rc", + "milestone": "5.0.0", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "26080", + "title": "Regression: Fix marketplace app apis visibility problem", + "userLogin": "rique223", + "description": "Solved a problem that showed an unwanted zero in place of the APIs section for apps that weren't installed/did not have an APIs section.\r\nBefore:\r\n![image](https://user-images.githubusercontent.com/43561537/176743542-8f5d2e97-48e7-4947-a82a-43c3a15ea0ac.png)\r\n\r\nAfter(non installed app):\r\n![image](https://user-images.githubusercontent.com/43561537/176744082-0139e15b-b03b-4c03-9267-9a17d14b70e9.png)\r\n\r\nAfter(installed app)\r\n![image](https://user-images.githubusercontent.com/43561537/176772870-c5382edc-59e6-42e4-8dfa-f1e4fd0267c0.png)", + "milestone": "5.0.0", + "contributors": [ + "rique223" + ] + }, + { + "pr": "26116", + "title": "Regression: Changing isEnterprise useQuery name to prevent conflict of queries", + "userLogin": "hugocostadev", + "description": "Changed the name of useQuery hook to prevent conflict of queries with same name.", + "milestone": "5.0.0", + "contributors": [ + "hugocostadev" + ] + }, + { + "pr": "26101", + "title": "Regression: [VideoConference] Callee client behaves improperly when accepting a call from someone who lost the connection", + "userLogin": "pierre-lehnen-rc", + "description": "If the caller loses connection and the callee accepts the call anyway, the client will wait for five seconds for confirmation that they can join the call. This PR improves the UI behavior during those five seconds.", + "milestone": "5.0.0", + "contributors": [ + "pierre-lehnen-rc" + ] + }, + { + "pr": "26113", + "title": "Chore: Change stats to daily", + "userLogin": "sampaiodiego", + "milestone": "5.0.0", + "contributors": [ + "sampaiodiego" + ] + } + ] + }, + "5.0.0-rc.2": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26184", + "title": "Regression: Align TypeScript version across workspaces", + "userLogin": "tassoevan", + "description": "Some places were still referring to TypeScript 4.3.4 instead of 4.5.5, so this PR targets it.", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "25991", + "title": "Chore: Update Meteor 2.7.3", + "userLogin": "sampaiodiego", + "milestone": "5.0.0", + "contributors": [ + "sampaiodiego", + "ggazzo" + ] + }, + { + "pr": "26153", + "title": "Chore: update avatar colors", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti" + ] + }, + { + "pr": "26119", + "title": "Regression: Added missing call button to contact center calls list", + "userLogin": "aleksandernsilva", + "description": "This PR adds a call button to the contact center calls list rows.", + "milestone": "5.0.0", + "contributors": [ + "aleksandernsilva", + "ggazzo" + ] + }, + { + "pr": "26138", + "title": "Regression: Calling info on VoipFooter when performing an outbound call", + "userLogin": "tiagoevanp", + "description": "![image](https://user-images.githubusercontent.com/17487063/177395438-a0b2d30a-e0e2-4a31-9b55-2c6c3216bbd7.png)", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "26135", + "title": "Regression: Added missing call button in the contact info contextual bar", + "userLogin": "aleksandernsilva", + "contributors": [ + "aleksandernsilva" + ] + }, + { + "pr": "26141", + "title": "Regression: Emojis displaying as `:undefined:`", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "26111", + "title": "Regression: Correct call ringtones", + "userLogin": "murtaza98", + "description": "- outbound-call-ringing ringtone: Should be played when the outbound call is initiated and not yet established(Current implementation is playing the incoming-call ringtone)\r\n- call-ended ringtone: Should be played whenever a call ends.", + "milestone": "5.0.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "26097", + "title": "Regression: Update message reaction text", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "26134", + "title": "Regression: Add better error messages when call fails", + "userLogin": "KevLehman", + "milestone": "5.0.0", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "26128", + "title": "Regression: Broken emoji picker on Livechat", + "userLogin": "murtaza98", + "milestone": "5.0.0", + "contributors": [ + "murtaza98" + ] + } + ] + }, + "5.0.0-rc.3": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26201", + "title": "Chore: Info page", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "26199", + "title": "Regression: Fix command previews", + "userLogin": "d-gubert", + "description": "Fixes slash command previews not being showed", + "milestone": "5.0.0", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "26205", + "title": "Chore: Change Apps-Engine version source for info", + "userLogin": "d-gubert", + "description": "Now that we're using `yarn`, the version stored in the `package.json` is no longer the resolved one, but it matches the input. This means that when we ran `yarn add @rocket.chat/apps-engine@alpha`, yarn saves `\"alpha\"` as the version of the package, while NPM added the resolved version for the tag, e.g. `\"1.33.0-alpha.6507\"`. This ends up breaking a few places where we need the Apps-Engine version for communication with the Marketplace.\r\n\r\nWith this PR we change the source of that info so the problem doesn't happen anymore.", + "milestone": "5.0.0", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "26148", + "title": "Regression: moving Community Watermark to `ee` folder", + "userLogin": "hugocostadev", + "description": "Due to legal reasons, the Watermark used in community Edition was moved to Enterprise folder `ee`", + "contributors": [ + "hugocostadev" + ] + }, + { + "pr": "26136", + "title": "Regression: Send files with `enter` key", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + } + ] + }, + "5.0.0-rc.4": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26226", + "title": "Regression: Fix files list endpoints", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "26194", + "title": "Regression: Fix Omnichannel not working after meteor update", + "userLogin": "KevLehman", + "description": "Fixed things:\r\n- Omnichannel Directory\r\n- Omnichannel Current Chats\r\n- Auto Selection Algo\r\n- Load Balance Algo\r\n- Manual Selection Algo\r\n- Livechat New Conversations\r\n\r\nOther fixed things:\r\n- Warning on fields deprecation\r\n- Warning on \"remove\" deprecation\r\n- Remove findAndModify usage", + "milestone": "5.0.0", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "26160", + "title": "Regression: Empty URL previews in messages.", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "26179", + "title": "Regression: OTR with new React Messages", + "userLogin": "yash-rajpal", + "description": "This PR solves 2 OTR issues with new react message components\r\n\r\n- disable the server side message parser for OTR messages\r\n- adds the stopwatch icon for otr messages\r\n\r\n### Before\r\n\"Screenshot\r\n\r\n### After\r\n\"Screenshot", + "contributors": [ + "yash-rajpal", + "web-flow" + ] + }, + { + "pr": "26216", + "title": "Regression: Replace contact center icon", + "userLogin": "filipemarins", + "milestone": "5.0.0", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "26093", + "title": "Regression: Fix rendered markdown styling on app info page details section", + "userLogin": "rique223", + "description": "Fixed two styling problems on the AppDetails markdown. The first one was a misuse of flex and the second was the fact that the withRichContent flag was missing on the box that received the markdown.\r\nDemo images:\r\nBefore:\r\n![image](https://user-images.githubusercontent.com/43561537/177857346-54476879-2618-452f-8585-1922dcbfa9c1.png)\r\n\r\nAfter:\r\n![image](https://user-images.githubusercontent.com/43561537/177857376-e96e4ad3-3410-4847-89b7-df074ff87b2f.png)\r\n\r\nClickup task: https://app.clickup.com/t/2rwq0q7", + "milestone": "5.0.0", + "contributors": [ + "rique223" + ] + }, + { + "pr": "26225", + "title": "[BREAK] Remove webRTC for channels/dm/groups", + "userLogin": "dougfabris", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "26223", + "title": "Regression: Meteor uses `projection` for its observes", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "26163", + "title": "Chore: Do not log integrations using `name` key", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "26219", + "title": "Chore: Check for env var values and not just if they are set", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "26171", + "title": "Regression: UIKit buttons auth user validation", + "userLogin": "tapiarafael", + "description": "Fix the validation to match the new feature that allows apps to register auth-required routes.", + "milestone": "5.0.0", + "contributors": [ + "tapiarafael", + "d-gubert", + "web-flow" + ] + }, + { + "pr": "26158", + "title": "Regression: Cannot logout when CallProvider is unregistered and mounted", + "userLogin": "KevLehman", + "milestone": "5.0.0", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "26159", + "title": "Regression: Change Audio settings for device settings as modal title", + "userLogin": "KevLehman", + "milestone": "5.0.0", + "contributors": [ + "KevLehman", + "murtaza98", + "web-flow" + ] + }, + { + "pr": "26173", + "title": "Regression: Inline code and copyonly tag styles", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "26152", + "title": "Regression: remove italic from reaction translation", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "26197", + "title": "Regression: Reverting @rocket.chat/mp3-encoder version to fix Audio Message", + "userLogin": "hugocostadev", + "description": "An unknow breaking change (still investigating) happened when upgrading the [@rocket.chat/mp3-encoder](https://github.com/RocketChat/fuselage/tree/develop/packages/mp3-encoder) package to version 0.25.0, because of that we revert the version to 0.24.0 the last know working version.", + "milestone": "5.0.0", + "contributors": [ + "hugocostadev" + ] + } + ] + }, + "5.0.0-rc.5": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26170", + "title": "Regression: Burger menu showing arrow instead of burguer", + "userLogin": "gabriellsh", + "milestone": "5.0.0", + "contributors": [ + "gabriellsh", + "tassoevan", + "web-flow" + ] + }, + { + "pr": "26203", + "title": "Regression: Last_login translation key", + "userLogin": "dougfabris", + "milestone": "5.0.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "26209", + "title": "Regression: Livechat rooms not opening due to route desync", + "userLogin": "aleksandernsilva", + "description": "Due to route information only updating on `Tracker.afterFlush` (https://github.com/RocketChat/Rocket.Chat/pull/25990), we found out that calling the `tabBar.openUserInfo()` method at this point will cause a route change to the previous route instead of the current one, preventing livechat rooms from being opened.\r\n\r\nAs a provisory solution, we're delaying the opening of the contextual bar, which then ensures that the route info is up to date. Although this solution works, we need to find a more reliable way of ensuring consistent route changes with up-to-date information.\r\n\r\n### I'm definitely open for better looking alternatives. Please leave a comment if you have a better solution to share.", + "milestone": "5.0.0", + "contributors": [ + "aleksandernsilva", + "ggazzo", + "web-flow", + "murtaza98" + ] + }, + { + "pr": "26232", + "title": "Regression: Admin Avatar Edit endpoint fix", + "userLogin": "hugocostadev", + "milestone": "5.0.0", + "contributors": [ + "hugocostadev" + ] + }, + { + "pr": "26234", + "title": "Regression: Don't open mdm feature modal on registration page", + "userLogin": "yash-rajpal", + "milestone": "5.0.0", + "contributors": [ + "yash-rajpal", + "web-flow" + ] + }, + { + "pr": "26238", + "title": "Regression: Revert replace contact center icon", + "userLogin": "filipemarins", + "milestone": "5.0.0", + "contributors": [ + "filipemarins" + ] + }, + { + "pr": "26233", + "title": "Regression: Fix routing for public queue and visitor abandonment fiber usage", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "26174", + "title": "Regression: Unavailable devices in unsupported browsers", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler", + "web-flow", + "KevLehman" + ] + }, + { + "pr": "26102", + "title": "Chore: Remove unused migrations", + "userLogin": "debdutdeb", + "description": "After giving it some thought:\r\n\r\n- 234 through 240 are not going to be run anymore. Keeping them does not affect behavior of course, but this (removing) makes it easier to quickly glance at and understand what migrations are actually included in 5.x.y (especially in tag compare view or in general just checking the ref).\r\n\r\n- Also changed the file name of 233 to be more explicit at what it does so to not confuse with actual \"migrations\" without having to open the file. \r\n\r\n- The redirect to the documentation page (go.rocket....) is not yet set up, jfyi.", + "milestone": "5.0.0", + "contributors": [ + "debdutdeb", + "sampaiodiego" + ] + } + ] + }, + "5.0.0-rc.6": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26162", + "title": "Regression: Fix marketplace releases tab crash bug", + "userLogin": "rique223", + "description": "Fixed a bug where RC would crash because the marketplace releases tab was trying to display undefined data from manually installed apps. \r\nDemo gif:\r\n![app-releases-tab-crash-error](https://user-images.githubusercontent.com/43561537/177656489-325790d3-49e0-46c8-8ac2-1f74c6a309ad.gif)", + "milestone": "5.0.0", + "contributors": [ + "rique223", + "ggazzo", + "geekgonecrazy", + "web-flow" + ] + }, + { + "pr": "26257", + "title": "Chore: Disabled icon colors on sidebar", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti", + "web-flow" + ] + }, + { + "pr": "26256", + "title": "Regression: get user from `req` on `ui.interaction` endpoints", + "userLogin": "sampaiodiego", + "milestone": "5.0.0", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "26253", + "title": "Chore: Avoid unneeded permission updates when EE license is applied", + "userLogin": "sampaiodiego", + "milestone": "4.8.2", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "26242", + "title": "Regression: Fix scheduler not working", + "userLogin": "tapiarafael", + "milestone": "5.0.0", + "contributors": [ + "tapiarafael" + ] + }, + { + "pr": "26073", + "title": "Regression: Link not scrolling to message", + "userLogin": "filipemarins", + "milestone": "5.0.0", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + } + ] + }, + "5.0.0-rc.7": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26267", + "title": "Regression: Omni-chats not getting routed automatically to bots", + "userLogin": "murtaza98", + "milestone": "5.0.0", + "contributors": [ + "murtaza98", + "web-flow" + ] + }, + { + "pr": "26172", + "title": "Regression: Cannot open Menu in searched message.", + "userLogin": "gabriellsh", + "milestone": "5.0.0", + "contributors": [ + "gabriellsh", + "tassoevan", + "web-flow" + ] + }, + { + "pr": "26235", + "title": "Regression: REST API calls at Engagement Dashboard", + "userLogin": "tassoevan", + "description": "Parameters for GET requests are *not* serialized as for other methods, therefore sending `Date` objects is not viable due to the way `Date.prototype.toString` works. This PR uses `Date.prototype.toISOString` explicitly to serialize dates.", + "milestone": "5.0.0", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "26237", + "title": "Regression: Call toggle missing network disconnection state", + "userLogin": "aleksandernsilva", + "description": "This PR brings back the network disconnection state to the voip call toggle button\r\n\r\n![image (4)](https://user-images.githubusercontent.com/6494543/178564719-f436505e-3ae3-4d69-ba5a-27ce8e8c5fba.png)", + "milestone": "5.0.0", + "contributors": [ + "aleksandernsilva" + ] + }, + { + "pr": "26258", + "title": "Chore: Update Apps-Engine version", + "userLogin": "d-gubert", + "description": "Bumping Apps-Engine version", + "milestone": "5.0.0", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "26270", + "title": "Chore: Avoid set useless set UTC Offset", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "26139", + "title": "Regression: Sidebar icons spacing", + "userLogin": "guijun13", + "description": "- Fixed the sidebar icons ('display' and 'create new') spacing issue\r\n\r\nbefore:\r\n![image](https://user-images.githubusercontent.com/5263975/178897210-50615ea9-28d5-4b35-a93a-c5facea365e5.png)\r\n\r\n\r\n\r\nafter:\r\n\r\n![image](https://user-images.githubusercontent.com/5263975/178896945-1bf71112-8a01-4db6-9f9b-20ea778496f7.png)", + "milestone": "5.0.0", + "contributors": [ + "guijun13", + "ggazzo" + ] + }, + { + "pr": "26188", + "title": "Chore: Hide deprecation query log on production", + "userLogin": "ggazzo", + "milestone": "5.0.0", + "contributors": [ + "ggazzo", + "web-flow" + ] + } + ] + }, + "5.0.0-rc.8": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26049", + "title": "Regression: AutoTranslate on new message template", + "userLogin": "filipemarins", + "milestone": "5.0.0", + "contributors": [ + "filipemarins", + "tassoevan" + ] + }, + { + "pr": "26224", + "title": "Chore: Plan tag", + "userLogin": "gabriellsh", + "description": "Now we only have one plan tag for all plans \\/\r\n![image](https://user-images.githubusercontent.com/40830821/178366367-12388c4c-6822-4e41-be8d-ca306718be98.png)", + "milestone": "5.0.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "26248", + "title": "Regression: Remove alpha tag and fix initialization process", + "userLogin": "MarcosSpessatto", + "milestone": "5.0.0", + "contributors": [ + "MarcosSpessatto" + ] + }, + { + "pr": "26255", + "title": "Regression: Device management table missing device icon and ip text ellipsis", + "userLogin": "csuadev", + "contributors": [ + "csuadev", + "yash-rajpal" + ] + }, + { + "pr": "26252", + "title": "Regression: UserInfo/RoomInfo Menu", + "userLogin": "dougfabris", + "description": "**note**: next fuselage's version needed\r\n\r\n#### before\r\n![Screen Shot 2022-07-13 at 12 24 38](https://user-images.githubusercontent.com/27704687/178771262-d482b300-de80-4961-be2e-8c034480d237.png)\r\n\r\n#### after\r\n![Screen Shot 2022-07-13 at 12 25 39](https://user-images.githubusercontent.com/27704687/178771460-db10883b-aa6d-4254-82d4-8cadd6991ae8.png)", + "milestone": "5.0.0", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "26249", + "title": "Regression: Federated users not showing as federated in Room Members", + "userLogin": "gabriellsh", + "milestone": "5.0.0", + "contributors": [ + "gabriellsh", + "MarcosSpessatto" + ] + }, + { + "pr": "26239", + "title": "Regression: Removed CE watermark from VoipFooter", + "userLogin": "aleksandernsilva", + "description": "The objective of this change is to remove the CE watermark **only** during an active call. The CE watermark will be displayed normally in all other scenarios. Bellow you can see a demonstration of the expected behavior:\r\n\r\n![ce-watermark-removed-voip](https://user-images.githubusercontent.com/6494543/178615342-8049a2a8-d331-46a9-a8f1-8461ae341b50.gif)", + "milestone": "5.0.0", + "contributors": [ + "aleksandernsilva" + ] + }, + { + "pr": "26154", + "title": "Regression: Parse outbound phone number removing * putting + char", + "userLogin": "tiagoevanp", + "milestone": "5.0.0", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "26273", + "title": "Regression: Search on Member List", + "userLogin": "tassoevan", + "milestone": "5.0.0", + "contributors": [ + "tassoevan", + "sampaiodiego" + ] + } + ] + }, + "5.0.0-rc.9": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26050", + "title": "[FIX] Users without the `view-other-user-info` permission can't use the `users.list` endpoint", + "userLogin": "LucianoPierdona", + "description": "This PR fix the query when a normal users access `users.list`", + "milestone": "5.0.0", + "contributors": [ + "LucianoPierdona", + "tassoevan", + "web-flow" + ] + }, + { + "pr": "26274", + "title": "Chore: Upgrade Fuselage packages to `next` dist-tag", + "userLogin": "tassoevan", + "description": "Upgrade Fuselage packages to the latest development versions.", + "milestone": "5.0.0", + "contributors": [ + "tassoevan" + ] + } + ] + }, + "5.0.0-rc.10": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26311", + "title": "Regression: Add v1 to licenses.add endpoint", + "userLogin": "KevLehman", + "milestone": "5.0.0", + "contributors": [ + "KevLehman", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "26183", + "title": "Chore: VideoConference UX/UI Refactor 1st Interaction ", + "userLogin": "pierre-lehnen-rc", + "milestone": "5.0.0", + "contributors": [ + "pierre-lehnen-rc", + "web-flow", + "debdutdeb", + "dougfabris", + "ggazzo" + ] + }, + { + "pr": "26295", + "title": "Regression: Clear user selection filter after selecting desired user.", + "userLogin": "gabriellsh", + "milestone": "5.0.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "26304", + "title": "Regression: Fix permissions page pagination", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "26305", + "title": "Regression: Fix breaking omnichannel tests", + "userLogin": "murtaza98", + "contributors": [ + "murtaza98", + "web-flow" + ] + }, + { + "pr": "26251", + "title": "Regression: Remove 4.0 version banner", + "userLogin": "hugocostadev", + "description": "Created a migration to disable and dismiss for all users the old 4.0 version banner.\r\nIt happened when a new admin user has been added.", + "milestone": "5.0.0", + "contributors": [ + "hugocostadev", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "26092", + "title": "Chore: Fix Omnichannel E2E tests not running", + "userLogin": "murtaza98", + "contributors": [ + "murtaza98", + "web-flow" + ] + }, + { + "pr": "26294", + "title": "Chore: Remove TimeSync usage", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "26155", + "title": "Regression: Contact manager edit/view not working", + "userLogin": "KevLehman", + "description": "Basically, the Contact Center was working, but not the right way. This PR fixes:\r\n- Ability to select Contact Managers from dropdown\r\n- Ability to validate Contact Edits without requesting data a ton of times\r\n- Ability to remove Contact manager from a contact\r\n- Ability to see Contacts and Contact Managers on Contact View\r\n- Fix endpoints validation\r\n- Add validators (ajv) to endpoint, thou not being used yet (since we hit a special endpoint)", + "milestone": "5.0.0", + "contributors": [ + "KevLehman", + "murtaza98", + "web-flow" + ] + }, + { + "pr": "26245", + "title": "Chore: Tests refactor pageobjects", + "userLogin": "souzaramon", + "contributors": [ + "souzaramon", + "weslley543", + "web-flow" + ] + }, + { + "pr": "26298", + "title": "Regression: Adjusted priority to run canned responses replace before new parser", + "userLogin": "aleksandernsilva", + "description": "Canned responses placeholders were not being replaced properly after we changed to the new md parser. \r\nThis fix changes the priority so that the canned responses replace logic runs before the parser, thus bringing back this functionality.\r\n\r\nBefore:\r\n\"Screen\r\n\r\nAfter:\r\n\"Screen", + "milestone": "5.0.0", + "contributors": [ + "aleksandernsilva" + ] + }, + { + "pr": "26278", + "title": "Regression: Fix app icons breaking UI", + "userLogin": "murtaza98", + "milestone": "5.0.0", + "contributors": [ + "murtaza98", + "web-flow", + "tassoevan" + ] + } + ] + }, + "4.7.5": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [] + }, + "4.8.2": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26326", + "title": "Release 4.8.2", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "matthias4217" + ] + }, + { + "pr": "26253", + "title": "Chore: Avoid unneeded permission updates when EE license is applied", + "userLogin": "sampaiodiego", + "milestone": "4.8.2", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25724", + "title": "[FIX] Not showing edit message button when blocking edit after N minutes", + "userLogin": "matthias4217", + "description": "Previously, in Rocketchat 4.7.0 and later, as mentioned in https://github.com/RocketChat/Rocket.Chat/issues/25478, the edit button was not displayed on the interface in the minute after having sent a message. This is now fixed : messages can be edited right after sending them.", + "milestone": "4.8.2", + "contributors": [ + "matthias4217", + "sampaiodiego" + ] + }, + { + "pr": "26058", + "title": "[FIX] Error \"numRequestsAllowed\" property in rateLimiter for REST API endpoint when upgrading", + "userLogin": "sampaiodiego", + "milestone": "4.8.2", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25891", + "title": "[FIX] Settings not being overwritten to their default values", + "userLogin": "sampaiodiego", + "milestone": "4.8.2", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25814", + "title": "Release 4.8.1", + "userLogin": "ggazzo", + "contributors": [ + "KevLehman", + "ggazzo", + "tiagoevanp", + "Sh0uld", + "dudanogueira" + ] + } + ] + }, + "5.0.0-rc.11": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26310", + "title": "Regression: fix `directory` endpoint not listing teams", + "userLogin": "carlosrodrigues94", + "milestone": "5.0.0", + "contributors": [ + "carlosrodrigues94", + "matheusbsilva137", + "web-flow", + "ggazzo" + ] + }, + { + "pr": "26309", + "title": "Regression: Options overlapping input in Users Autocomplete", + "userLogin": "gabriellsh", + "milestone": "5.0.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "26283", + "title": "Regression: Matrix Federation regressions", + "userLogin": "MarcosSpessatto", + "milestone": "5.0.0", + "contributors": [ + "MarcosSpessatto", + "web-flow", + "carlosrodrigues94", + "gabriellsh", + "ggazzo" + ] + }, + { + "pr": "26319", + "title": "Regression: Use fname instead real unique name for Voip", + "userLogin": "tiagoevanp", + "description": "Affect:\r\n- Voip room header\r\n- Contacts table\r\n- Contact info", + "milestone": "5.0.0", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "26269", + "title": "Regression: Channel `type` icon on Engagement Dashboard", + "userLogin": "LucianoPierdona", + "description": "This PR fixes a bug on which the channel type is inverted.", + "milestone": "5.0.0", + "contributors": [ + "LucianoPierdona", + "tassoevan", + "web-flow", + "ggazzo" + ] + }, + { + "pr": "26315", + "title": "Regression: Fix job Id not returned by agenda", + "userLogin": "murtaza98", + "milestone": "5.0.0", + "contributors": [ + "murtaza98", + "web-flow" + ] + }, + { + "pr": "26241", + "title": "Regression: Special characters on phone number", + "userLogin": "tiagoevanp", + "description": "PR Includes:\r\n- Keep focus on phone input of dial pad\r\n- Handle submit with \"Enter\" key\r\n- Remove mask and mandatory \"+\" char\r\n- Long press for \"0\"/\"+\" button", + "milestone": "5.0.0", + "contributors": [ + "tiagoevanp", + "ggazzo", + "web-flow", + "filipemarins", + "KevLehman", + "aleksandernsilva" + ] + } + ] + }, + "5.0.0-rc.12": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26327", + "title": "Regression: Livechat not rendering UiKit messages with action buttons", + "userLogin": "murtaza98", + "milestone": "5.0.0", + "contributors": [ + "murtaza98", + "ggazzo", + "web-flow", + "aleksandernsilva" + ] + }, + { + "pr": "26325", + "title": "Chore: bump fuselage packages", + "userLogin": "dougfabris", + "milestone": "5.0.0", + "contributors": [ + "dougfabris", + "ggazzo" + ] + }, + { + "pr": "26322", + "title": "Chore: Update useSidebarPalette selectors", + "userLogin": "juliajforesti", + "milestone": "5.0.0", + "contributors": [ + "juliajforesti", + "web-flow", + "ggazzo", + "murtaza98" + ] + }, + { + "pr": "26328", + "title": "Regression: Fix get myself user data", + "userLogin": "sampaiodiego", + "milestone": "5.0.0", + "contributors": [ + "sampaiodiego" + ] + } + ] + }, + "5.0.0": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [] + }, + "3.11.6": { + "mongo_versions": [ + "3.4", + "3.6", + "4.0" + ], + "pull_requests": [ + { + "pr": "23200", + "title": "Chore: Change Ubuntu version to 20.04 on all GitHub Actions", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman", + "sampaiodiego" + ] + }, + { + "pr": "22927", + "title": "[FIX] User presence being processes even if presence monitor was disabled", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "22257", + "title": "[FIX] Support DISABLE_PRESENCE_MONITOR env var in new DB watchers", + "userLogin": "sampaiodiego", + "milestone": "3.14.5", + "contributors": [ + "sampaiodiego" + ] + } + ] + }, + "4.8.3": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26438", + "title": "[FIX] Empty results on `im.list` endpoint", + "userLogin": "albuquerquefabio", + "milestone": "5.0.2", + "contributors": [ + "albuquerquefabio", + "sampaiodiego" + ] + }, + { + "pr": "26276", + "title": "[FIX] Unable to send voice recording to Whatsapp", + "userLogin": "murtaza98", + "milestone": "4.8.3", + "contributors": [ + "murtaza98", + "web-flow" + ] + }, + { + "pr": "26057", + "title": "[FIX] Unable to close chats when comments is disabled", + "userLogin": "murtaza98", + "description": "Fixes https://github.com/RocketChat/Rocket.Chat/issues/25954", + "milestone": "5.0.0", + "contributors": [ + "murtaza98", + "web-flow" + ] + }, + { + "pr": "25873", + "title": "[FIX] Update chartjs usage to v3", + "userLogin": "KevLehman", + "milestone": "5.0.0", + "contributors": [ + "KevLehman" + ] + } + ] + }, + "4.8.4": { + "node_version": "14.18.3", + "npm_version": "6.14.15", + "mongo_versions": [ + "3.6", + "4.0", + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26532", + "title": "[FIX] Endpoints `im.list` not working with Use Real Name setting", + "userLogin": "sampaiodiego", + "milestone": "4.8.4", + "contributors": [ + "sampaiodiego" + ] + } + ] + }, + "5.1.0-rc.0": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26694", + "title": "Chore: Upgrade dependencies", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "murtaza98", + "web-flow" + ] + }, + { + "pr": "26691", + "title": "Chore: More Omnichannel tests", + "userLogin": "KevLehman", + "milestone": "5.1.0", + "contributors": [ + "KevLehman", + "cauefcr", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26693", + "title": "Regression: Banner - Room not found - Omnichannel room", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "26312", + "title": "[NEW] Capability to search visitors by custom fields", + "userLogin": "cauefcr", + "description": "Users of the endpoints [api/v1/omnichannel/contact.search](https://developer.rocket.chat/reference/api/rest-api/endpoints/omnichannel/livechat-endpoints/livechat-contact/omnichannel-search-contact) and [/api/v1/livechat/visitors.search](https://developer.rocket.chat/reference/api/rest-api/endpoints/omnichannel/livechat-endpoints/visitor/search-for-visitors) are now able to search by custom fields in their objects. \r\nCapability of selecting if a custom field can be searched for is added in the Omnichannel pannel as a toggle for `searchable`, the included JSON in the Accounts' Custom Field example has been updated to make it explicit for future configurations that the field has to be enabled as searchable for that to happen.", + "milestone": "5.1.0", + "contributors": [ + "cauefcr", + "web-flow", + "KevLehman" + ] + }, + { + "pr": "26609", + "title": "Chore: Create tests for Omnichannel admin add a custom fields", + "userLogin": "weslley543", + "contributors": [ + "weslley543", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26689", + "title": "[FIX] Avatars of other chats disappear when they located near chat with broken avatar", + "userLogin": "filipemarins", + "contributors": [ + "filipemarins", + "gabriellsh", + "web-flow" + ] + }, + { + "pr": "26334", + "title": "[IMPROVE] Added identification on calls to/from existing contacts", + "userLogin": "aleksandernsilva", + "description": "Before: \r\n\"Screen\r\n\r\nAfter:\r\n\"Screen", + "milestone": "5.1.0", + "contributors": [ + "aleksandernsilva", + "web-flow", + "KevLehman", + "tiagoevanp" + ] + }, + { + "pr": "26684", + "title": "Regression: invalid statistics format ", + "userLogin": "cauefcr", + "milestone": "5.1.0", + "contributors": [ + "cauefcr", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26683", + "title": "Regression: \"Cache size is not a function\" error when booting", + "userLogin": "KevLehman", + "milestone": "5.1.0", + "contributors": [ + "KevLehman", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "25789", + "title": "[FIX] Correct IMAP configuration for email inbox", + "userLogin": "cauefcr", + "description": "The primary change here has been to make the library try and reconnect after some time, up to a certain configured number of times, on a few different error classes.", + "milestone": "5.1.0", + "contributors": [ + "cauefcr", + "web-flow", + "murtaza98", + "KevLehman" + ] + }, + { + "pr": "25957", + "title": "[FIX] Active users count on `@all` and `@here` ", + "userLogin": "LucianoPierdona", + "description": "this PR updates the old `roomMembersCount` to count active users instead of everyone", + "milestone": "5.1.0", + "contributors": [ + "LucianoPierdona", + "matheusbsilva137", + "web-flow", + "gabriellsh", + "kodiakhq[bot]" + ] + }, + { + "pr": "26549", + "title": "[FIX] Autotranslate method should respect setting", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman", + "web-flow", + "filipemarins" + ] + }, + { + "pr": "26655", + "title": "Chore: Remove italic/bold font-style from system messages", + "userLogin": "hugocostadev", + "description": "It was removed from system messages font-styles elements (italic and bold) that highlighted some words as `users`, `room_name` and others.\r\n\r\nIn addition to this PR, was also created a PR to Fuselage to remove italic font style in general at system messages. \r\n\r\nFuselage PR: https://github.com/RocketChat/fuselage/pull/830", + "contributors": [ + "hugocostadev", + "gabriellsh", + "web-flow" + ] + }, + { + "pr": "26625", + "title": "Chore: Convert AppSetting to tsx", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti", + "web-flow" + ] + }, + { + "pr": "26631", + "title": "Chore: Remove & Test old closeChat templates", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler", + "web-flow", + "ggazzo" + ] + }, + { + "pr": "26150", + "title": "[IMPROVE] General federation improvements", + "userLogin": "MarcosSpessatto", + "description": "I know this changed a lot of files, but the main goal for this PR is not to change any behavior, the goals for the PR are:\r\n\r\n- Refactor the code;\r\n- Solve any tech debt;\r\n- Simplify and reuse some parts of the code;\r\n- Remove duplicated code;\r\n- Remove all unsafe type castings;\r\n- Solve all Eslint errors and warnings;\r\n- Split too big files;\r\n- Encapsulate the business logic in a better way, avoiding exposing and leaking internal logic to the unintended layers;\r\n- Improve the actual test cases;\r\n- Add more test cases, since a lot of cases were omitted during the release phase;\r\n- Remove unsafe `Object.assign` statements and prefer to use the class `constructor` instead;", + "milestone": "5.1.0", + "contributors": [ + "MarcosSpessatto" + ] + }, + { + "pr": "26667", + "title": "[NEW] Warn admins about running multiple instances of the monolith", + "userLogin": "pierre-lehnen-rc", + "milestone": "5.1.0", + "contributors": [ + "pierre-lehnen-rc", + "ggazzo", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26668", + "title": "Regression: Prevent message from being temp forever", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26663", + "title": "Regression: Add alsoSendThreadToChannel to user settings api", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26599", + "title": "[IMPROVE] Spotlight search user results", + "userLogin": "pierre-lehnen-rc", + "milestone": "5.1.0", + "contributors": [ + "pierre-lehnen-rc", + "sampaiodiego", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26629", + "title": "[FIX] Slack User CSV importer not working", + "userLogin": "pierre-lehnen-rc", + "milestone": "5.1.0", + "contributors": [ + "pierre-lehnen-rc", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26284", + "title": "Chore: Importer rest types, meteor methods to TS and API unit tests", + "userLogin": "albuquerquefabio", + "milestone": "5.1.0", + "contributors": [ + "albuquerquefabio", + "web-flow", + "pierre-lehnen-rc", + "gabriellsh", + "kodiakhq[bot]" + ] + }, + { + "pr": "26220", + "title": "[NEW] Adding oauth crud on the rocket.chat side", + "userLogin": "AllanPazRibeiro", + "milestone": "5.1.0", + "contributors": [ + "AllanPazRibeiro", + "d-gubert", + "web-flow", + "ggazzo", + "kodiakhq[bot]" + ] + }, + { + "pr": "26118", + "title": "[NEW] allow ephemeral messages to receive a specific id", + "userLogin": "tapiarafael", + "description": "Allow apps to pass a specific ID for ephemeral messages as a way to edit them.", + "milestone": "5.1.0", + "contributors": [ + "tapiarafael", + "d-gubert", + "web-flow", + "kodiakhq[bot]", + "ggazzo" + ] + }, + { + "pr": "26665", + "title": "[FIX] MDM content alignment", + "userLogin": "guijun13", + "description": "- remove left margin of MDM content\r\n\r\nbefore:\r\n![image](https://user-images.githubusercontent.com/48109548/186213428-946d6061-8f8d-415f-9b3b-049082c1bc25.png)\r\n\r\nafter:\r\n\"Screen", + "milestone": "5.1.0", + "contributors": [ + "guijun13", + "gabriellsh", + "web-flow" + ] + }, + { + "pr": "26419", + "title": "Chore: Permissions check per endpoint/method", + "userLogin": "KevLehman", + "milestone": "5.1.0", + "contributors": [ + "KevLehman", + "web-flow", + "murtaza98" + ] + }, + { + "pr": "26658", + "title": "Regression: CI", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "26394", + "title": "[FIX] Not allowed error in discussion room with a private parent channel", + "userLogin": "filipemarins", + "milestone": "5.1.0", + "contributors": [ + "gabriellsh", + "web-flow", + "filipemarins" + ] + }, + { + "pr": "21902", + "title": "Chore: Fix grammatical typo when only one message is pruned", + "userLogin": "shrinish123", + "description": "Whenever only 1 message is pruned it says '1 messages pruned' instead of '1 message pruned' in the toast message", + "milestone": "5.1.0", + "contributors": [ + "shrinish123", + "web-flow", + "ggazzo", + "dougfabris", + "tassoevan" + ] + }, + { + "pr": "26575", + "title": "[FIX] Agents (with user status offline & omni-status as available) not able to take or forward chat", + "userLogin": "murtaza98", + "milestone": "5.1.0", + "contributors": [ + "murtaza98", + "KevLehman", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26645", + "title": "i18n: Language update from LingoHub 🤖 on 2022-08-22Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null, + "dougfabris", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26650", + "title": "Chore: Add license env var to ee tests", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow", + "sampaiodiego", + "kodiakhq[bot]" + ] + }, + { + "pr": "26653", + "title": "Chore: Move `Card` and related components to `@rocket.chat/ui-client`", + "userLogin": "tassoevan", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "26656", + "title": "Regression: Custom status loading forever in Usercard", + "userLogin": "dougfabris", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "26200", + "title": "[FIX] Current Chat Custom Field Filter", + "userLogin": "MartinSchoeler", + "milestone": "5.1.0", + "contributors": [ + "MartinSchoeler", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "25881", + "title": "Chore: Migrate modules related to `room` template to TypeScript", + "userLogin": "tassoevan", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "26578", + "title": "Chore: Create teams management tests", + "userLogin": "souzaramon", + "contributors": [ + "souzaramon", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26385", + "title": "[FIX] Blank screen after requesting transcript", + "userLogin": "MartinSchoeler", + "milestone": "5.1.0", + "contributors": [ + "MartinSchoeler", + "web-flow", + "KevLehman", + "kodiakhq[bot]" + ] + }, + { + "pr": "26649", + "title": "Chore: Fix CI intermittent", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "26626", + "title": "Chore: Convert AppSettingsAssembler to tsx", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26559", + "title": "Chore: Refactor RoomMembers to Typescript", + "userLogin": "dougfabris", + "contributors": [ + "dougfabris", + "ggazzo", + "web-flow", + "gabriellsh", + "kodiakhq[bot]" + ] + }, + { + "pr": "26610", + "title": "Regression: Home cards UI tweaks", + "userLogin": "dougfabris", + "milestone": "5.1.0", + "contributors": [ + "dougfabris", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26635", + "title": "Regression: Modal footer alignment", + "userLogin": "yash-rajpal", + "contributors": [ + "yash-rajpal", + "dougfabris", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26572", + "title": "Chore: Fail-fast on callbacks", + "userLogin": "KevLehman", + "milestone": "5.1.0", + "contributors": [ + "KevLehman", + "murtaza98", + "web-flow", + "sampaiodiego" + ] + }, + { + "pr": "26630", + "title": "Chore: Move fuselage-ui-kit to main repo", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26393", + "title": "Chore: create removeWebdavAccount endpoint", + "userLogin": "felipe-rod123", + "description": "Created the '/v1/webdav.removeWebdavAccount' endpoint for the `apps/meteor/client/views/account/integrations/AccountIntegrationsPage.tsx` file, and added Ajv validations.", + "contributors": [ + "felipe-rod123", + "web-flow", + "ggazzo", + "dougfabris" + ] + }, + { + "pr": "26628", + "title": "Chore: Remove trash collection from models when not used", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26627", + "title": "Chore: Remove Livechat Dashboard Templates", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "26546", + "title": "Chore: Missing permissions translations", + "userLogin": "dougfabris", + "contributors": [ + "dougfabris", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26619", + "title": "Revert: [FIX] Users can access public discussions inside private channels they are not members of", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26618", + "title": "Chore: Remove console.log", + "userLogin": "debdutdeb", + "contributors": [ + "debdutdeb", + "web-flow" + ] + }, + { + "pr": "26452", + "title": "[IMPROVE] New 'not found page' design", + "userLogin": "guijun13", + "description": "- Add a new design for the not-found page\r\n- Add English translation for \"page not found\" and \"Homepage\"\r\n- Update English translation for \"Room_not_exist_or_not_permission\"\r\n- Add \"Homepage\" button on the room not found page", + "milestone": "5.1.0", + "contributors": [ + "guijun13", + "gabriellsh", + "ggazzo", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26617", + "title": "Regression: Fix services Docker build", + "userLogin": "sampaiodiego", + "milestone": "5.0.4", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "26616", + "title": "Chore: skipping tests that are based on kebab menu", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "25793", + "title": "[FIX] Slackbridge Connect Error", + "userLogin": "LucianoPierdona", + "description": "This PR fixes an issue that was happening when an invalid token was passed on SlackBridge, basically the app crashes because the error was not being handled", + "milestone": "5.1.0", + "contributors": [ + "LucianoPierdona", + "matheusbsilva137", + "web-flow", + "gabriellsh", + "kodiakhq[bot]" + ] + }, + { + "pr": "26282", + "title": "[FIX] Add Offline License Endpoint", + "userLogin": "LucianoPierdona", + "description": "This PR updates the endpoint to add a license", + "milestone": "5.1.0", + "contributors": [ + "LucianoPierdona", + "tassoevan", + "web-flow", + "kodiakhq[bot]", + "hugocostadev" + ] + }, + { + "pr": "26612", + "title": "Chore: Prevent tooltip from opening after click", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "26607", + "title": "Chore: omnichannel-departments tests ", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26318", + "title": "[FIX] UI fixes on dropdown titles", + "userLogin": "guijun13", + "description": "- Add paddings on profile dropdown title\r\n- Fix paddings on 'sort' and 'create new' dropdown titles\r\n- Remove inline styles of `OptionTitle` (removing uppercase style)\r\n\r\n| Location | Before | After |\r\n| --------------- | --------------- | --------------- |\r\n| Sort Dropdown | ![image](https://user-images.githubusercontent.com/48109548/183442156-9cc5269e-458e-4b6a-b2e5-91102dcfe153.png) | \"Screen |\r\n| User Dropdown | ![image](https://user-images.githubusercontent.com/48109548/183442678-49667402-57fd-4a5c-9077-eaef53aad10c.png) | \"Screen |\r\n| Create new Dropdown | \"Screen | \"Screen |", + "milestone": "5.1.0", + "contributors": [ + "guijun13", + "dougfabris" + ] + }, + { + "pr": "26608", + "title": "Chore: Fix services image publish do DockerHub", + "userLogin": "sampaiodiego", + "milestone": "5.0.4", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "25912", + "title": "[FIX] add image format validation", + "userLogin": "filipemarins", + "milestone": "5.1.0", + "contributors": [ + "filipemarins", + "gabriellsh", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26481", + "title": "[FIX] Save edited tags for omnichannel departments", + "userLogin": "tiagoevanp", + "milestone": "5.1.0", + "contributors": [ + "tiagoevanp", + "web-flow", + "ggazzo", + "aleksandernsilva", + "kodiakhq[bot]" + ] + }, + { + "pr": "25981", + "title": "[FIX] Users can access public discussions inside private channels they are not members of", + "userLogin": "LucianoPierdona", + "milestone": "5.1.0", + "contributors": [ + "LucianoPierdona", + "matheusbsilva137", + "web-flow", + "kodiakhq[bot]", + "debdutdeb", + "gabriellsh" + ] + }, + { + "pr": "26571", + "title": "Regression: Update custom homepage content behavior", + "userLogin": "gabriellsh", + "milestone": "5.1.0", + "contributors": [ + "gabriellsh", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26195", + "title": "Chore: remove useMethod calls", + "userLogin": "jeanfbrito", + "contributors": [ + "jeanfbrito", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26441", + "title": "[NEW] Fallback Error component for Engagement Dashboard widgets", + "userLogin": "hugocostadev", + "description": "As proposed, was added a fallback component to catch errors at Engagement Dashboard widgets individually.\r\nIt used an Error boundary to catch `react-query` errors, due to this scenario was necessary to install and use the library [react-error-boundary](https://github.com/bvaughn/react-error-boundary) that implements everything and more compared to our ErrorBoundary component, the main reason was to capture Query errors and the implementation with `react-query` library.\r\n\r\n**New layout:**\r\n\r\nBefore:\r\n![image](https://user-images.githubusercontent.com/20212776/184968003-607eda93-ae3f-406c-a775-becd2720a607.png)\r\n\r\nAfter:\r\n![image](https://user-images.githubusercontent.com/20212776/184970152-25a425f3-6aad-4620-b1c1-5f8c8bb35fbb.png)", + "milestone": "5.1.0", + "contributors": [ + "hugocostadev", + "gabriellsh", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "25841", + "title": "[FIX] Permission `view-all-teams` is not checked in the `teams.info` endpoint", + "userLogin": "LucianoPierdona", + "description": "Previously any authenticated user was able to access the `teams.info` endpoint, this PR updates this so only users with the `view-all-teams` permission or team members can access it.", + "milestone": "5.1.0", + "contributors": [ + "LucianoPierdona", + "matheusbsilva137", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26461", + "title": "[FIX] Notification preferences not updated on save", + "userLogin": "yash-rajpal", + "description": "Publish required notification subscription fields on change, so that changes can be seen on save.", + "contributors": [ + "yash-rajpal", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26597", + "title": "[FIX] Reset password errors", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "26600", + "title": "Chore: Wait subscription to expose message composer", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "tassoevan", + "web-flow" + ] + }, + { + "pr": "26471", + "title": "[FIX] Default BH not getting applied in-case any other BH is disabled", + "userLogin": "murtaza98", + "milestone": "5.1.0", + "contributors": [ + "murtaza98", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26443", + "title": "[FIX] Prune messages not removing thumbnails", + "userLogin": "LucianoPierdona", + "description": "This PR adds a method on `Uploads` called `findOneByName`, and excludes a thumbnail of an image on `cleanRoomHistory`", + "milestone": "5.1.0", + "contributors": [ + "LucianoPierdona", + "matheusbsilva137", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26570", + "title": "i18n: Language update from LingoHub 🤖 on 2022-08-15Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null, + "dougfabris", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26579", + "title": "[FIX][ENTERPRISE] User not marked as offline on log out when using micro services", + "userLogin": "sampaiodiego", + "milestone": "5.0.4", + "contributors": [ + "sampaiodiego", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26114", + "title": "Chore: Fix some settings with incompatible default value types", + "userLogin": "pierre-lehnen-rc", + "contributors": [ + "pierre-lehnen-rc", + "sampaiodiego", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26598", + "title": "Chore: Remove translation owners", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "26542", + "title": "[FIX] Katex is not respecting the 'Katex_Enabled' setting", + "userLogin": "filipemarins", + "milestone": "5.1.0", + "contributors": [ + "filipemarins", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26558", + "title": "[FIX] SMS service check", + "userLogin": "KevLehman", + "milestone": "5.1.0", + "contributors": [ + "KevLehman", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26280", + "title": "Chore: Separating user edit form to prevent browser autocomplete", + "userLogin": "hugocostadev", + "description": "Separating user edit form to prevent browser password and username auto-complete. \r\nThe browser will continue showing the suggestion dropdown for the password field, but when you select a suggestion the other text field will not be impacted, as was happening before with 'Nickname' field", + "milestone": "5.1.0", + "contributors": [ + "hugocostadev", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26218", + "title": "[FIX] Unable to remove a user who joined a public team with a mention", + "userLogin": "LucianoPierdona", + "description": "This PR fixes a bug where a user that joins a team by mention don't get added to the team.", + "milestone": "5.1.0", + "contributors": [ + "LucianoPierdona", + "tassoevan", + "web-flow", + "matheusbsilva137", + "kodiakhq[bot]" + ] + }, + { + "pr": "26320", + "title": "[FIX] incorrect error toast messages", + "userLogin": "debdutdeb", + "milestone": "5.1.0", + "contributors": [ + "debdutdeb", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "26372", + "title": "[FIX] Slash commands description as undefined", + "userLogin": "carlosrodrigues94", + "milestone": "5.1.0", + "contributors": [ + "carlosrodrigues94", + "matheusbsilva137", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26574", + "title": "Regression: Team name validation failing always.", + "userLogin": "gabriellsh", + "milestone": "5.1.0", + "contributors": [ + "gabriellsh", + "ggazzo", + "web-flow" + ] + }, + { + "pr": "26377", + "title": "Chore: Migrate omni-chat forwarding to use API instead of meteor method", + "userLogin": "murtaza98", + "description": "- Use `livechat/room.forward` endpoint to forward omnichannel chats instead of using meteor method \"livechat:transfer\"", + "milestone": "5.1.0", + "contributors": [ + "murtaza98", + "web-flow" + ] + }, + { + "pr": "26147", + "title": "[FIX] Chats not getting assigned to offline agents even when \"Accept with No Online agents\" setting is turned on", + "userLogin": "murtaza98", + "milestone": "5.1.0", + "contributors": [ + "murtaza98", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26545", + "title": "Chore: transfer to another agent", + "userLogin": "weslley543", + "contributors": [ + "weslley543", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26149", + "title": "Chore: Remove method calls - Stage 1", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "yash-rajpal", + "web-flow", + "filipemarins", + "juliajforesti", + "tassoevan", + "kodiakhq[bot]" + ] + }, + { + "pr": "26564", + "title": "Chore: Replace timeAgo on WebdavFilePickerTable", + "userLogin": "dougfabris", + "contributors": [ + "dougfabris", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26307", + "title": "[FIX] - Incoming SMSs no longer clash with ongoing livechat conversations by the same visitor", + "userLogin": "cauefcr", + "description": "There was a data race in the defineVisitor function, causing new guests to be created even if a registered guest with that number already existed, also made sure that the open room being searched on is the correct source type, so the clash is not possible anymore.", + "milestone": "5.1.0", + "contributors": [ + "cauefcr", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "24966", + "title": "i18n: Fix Korean set role translation", + "userLogin": "imyaman", + "description": "English https://pbs.twimg.com/media/FO2zby1aQAMB84D?format=png&name=small\r\nKorean https://pbs.twimg.com/media/FO2zWgKaIAYidJ7?format=png&name=small\r\nGoogle Translate https://pbs.twimg.com/media/FO20MPnaUAU-TU_?format=jpg&name=medium", + "contributors": [ + "imyaman", + "web-flow", + "dougfabris" + ] + }, + { + "pr": "26543", + "title": "Chore: test for change avatar", + "userLogin": "weslley543", + "contributors": [ + "weslley543", + "web-flow", + "dougfabris", + "ggazzo" + ] + }, + { + "pr": "26560", + "title": "Chore: Add translations code owner", + "userLogin": "dougfabris", + "contributors": [ + "dougfabris", + "web-flow" + ] + }, + { + "pr": "25771", + "title": "Chore: update codeowners for omnichannel", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman", + "murtaza98", + "web-flow" + ] + }, + { + "pr": "26540", + "title": "Chore: update fuselage rounded edition ", + "userLogin": "dougfabris", + "contributors": [ + "dougfabris", + "ggazzo", + "juliajforesti", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26535", + "title": "[FIX] LDAP fails to sync teams when the user DN has escaped characters.", + "userLogin": "pierre-lehnen-rc", + "milestone": "5.0.3", + "contributors": [ + "pierre-lehnen-rc", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26495", + "title": "[FIX] Allow normal user to open apps contextual bar", + "userLogin": "tapiarafael", + "description": "Fix the bug where normal users cannot open an app contextual bar.\r\nThe request made by the contextual bar to get the app information, which was for admin only, was removed since the response was not being used.", + "contributors": [ + null, + "tapiarafael", + "dougfabris" + ] + }, + { + "pr": "26537", + "title": "Chore: restrict `.only`", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26530", + "title": "[FIX] Endpoints not working when using \"Use Real Name\" setting", + "userLogin": "sampaiodiego", + "description": "The list of endpoints affected is:\r\n\r\n- `/api/v1/channels.list`\r\n- `/api/v1/channels.list.joined`\r\n- `/api/v1/groups.list`\r\n- `/api/v1/groups.listAll`\r\n- `/api/v1/im.list`\r\n- `/api/v1/im.list.everyone`", + "milestone": "5.0.3", + "contributors": [ + "sampaiodiego", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "25734", + "title": "[NEW] `Home` page", + "userLogin": "tassoevan", + "description": "\"image\"", + "milestone": "5.1.0", + "contributors": [ + "tassoevan", + "web-flow", + "gabriellsh", + "LucianoPierdona", + "guijun13", + "hugocostadev" + ] + }, + { + "pr": "26445", + "title": "Chore: ModalFooterControllers adoption", + "userLogin": "dougfabris", + "contributors": [ + "dougfabris", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26386", + "title": "Chore: create roomNameExists endpoint", + "userLogin": "felipe-rod123", + "description": "Created the missing rest endpoint 'roomNameExists' for `apps/meteor/client/sidebar/header/CreateChannel.tsx`, on the packages/rest-typings/src/v1/ folder.", + "contributors": [ + "ggazzo", + "felipe-rod123", + "web-flow" + ] + }, + { + "pr": "26527", + "title": "Chore: Improve test for livechat ", + "userLogin": "weslley543", + "contributors": [ + "weslley543", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "26534", + "title": "Chore: Fix UiKit dependency issue for Livechat", + "userLogin": "murtaza98", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "26330", + "title": "[FIX] Too many REST API requests", + "userLogin": "tassoevan", + "description": "Uses React Query cache as an alternative for querying data \"sorta\" real time.", + "milestone": "5.1.0", + "contributors": [ + "tassoevan", + "web-flow" + ] + }, + { + "pr": "26513", + "title": "Chore: Mocha handling multiple React instances", + "userLogin": "tassoevan", + "description": "Whenever Mocha runs a test file which imports stuff from outside `apps/meteor`, it uses a hoisted version of React (i.e. located at the root `node_modules`) instead of the one tied to `apps/meteor/node_modules`. This PR adds a monkey patch while we can't migrate to another test runner.", + "contributors": [ + "tassoevan", + "web-flow" + ] + }, + { + "pr": "26446", + "title": "Chore: Convert `LivechatCustomField` model to raw model", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "ggazzo", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26508", + "title": "i18n: Language update from LingoHub 🤖 on 2022-08-08Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null, + "dougfabris", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26264", + "title": "[FIX] Open team after room not found page", + "userLogin": "hugocostadev", + "description": "After the room not found page, the `FlowRouter` was not clearing `msg` query param, causing the next redirect to private teams break because it's try to find the unknow msg id", + "milestone": "5.1.0", + "contributors": [ + "hugocostadev", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26478", + "title": "Chore: Refactor ReportMessage Modal to React Component", + "userLogin": "dougfabris", + "milestone": "5.1.0", + "contributors": [ + "dougfabris", + "gabriellsh", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26531", + "title": "Chore: Fix lint issues", + "userLogin": "yash-rajpal", + "description": "#24757 was an old PR and was recently auto-merged, it was not following our latest eslint rules, so now there are some lint issues on the develop.", + "contributors": [ + "yash-rajpal" + ] + }, + { + "pr": "26375", + "title": "[FIX] Don't wrap wrap up notes", + "userLogin": "MartinSchoeler", + "milestone": "5.1.0", + "contributors": [ + "MartinSchoeler", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "24757", + "title": "[IMPROVE] OTR refactoring", + "userLogin": "albuquerquefabio", + "description": "Rewritten OTR files to TS with new code patterns", + "milestone": "5.1.0", + "contributors": [ + "albuquerquefabio", + "web-flow" + ] + }, + { + "pr": "26321", + "title": "[FIX] Prevent VoIP issues during disconnection when network failed", + "userLogin": "KevLehman", + "milestone": "5.1.0", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "26526", + "title": "Chore: Bypass turbo cache on `ui-contexts`", + "userLogin": "tassoevan", + "description": "Skips cache for building `@rocket.chat/ui-contexts`, avoiding Turborepo issues with a symlink.", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "26422", + "title": "Chore: Refactor WebdavFilePicker Modal to React Component", + "userLogin": "dougfabris", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "26425", + "title": "[FIX] Chats holds to load history for some time", + "userLogin": "filipemarins", + "milestone": "5.0.3", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "26133", + "title": "[FIX] Decrypt E2EE messages on thread list", + "userLogin": "yash-rajpal", + "description": "### Before \r\n\"Screenshot\r\n### After\r\n\"Screenshot", + "milestone": "5.1.0", + "contributors": [ + "yash-rajpal", + "gabriellsh" + ] + }, + { + "pr": "26498", + "title": "Chore: Migrate AppPermissionsReviewModal from JS to TS", + "userLogin": "rique223", + "contributors": [ + "rique223" + ] + }, + { + "pr": "26496", + "title": "Chore: Convert `client/views/account/preferences` folder to ts", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti", + "web-flow" + ] + }, + { + "pr": "26504", + "title": "Chore: ESLint warnings", + "userLogin": "tassoevan", + "description": "The current amount of ESLint warning messages is overwhelming to properly debug serious issues. This PR aims to reduce them to a sane amount.", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "26465", + "title": "Chore: Remove settings Fibers usage", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "26493", + "title": "Chore: Refactor create-target-channel util", + "userLogin": "souzaramon", + "contributors": [ + "souzaramon" + ] + }, + { + "pr": "26494", + "title": "Chore: useEndpointData deprecation", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "26416", + "title": "[NEW] Surface featured apps endpoint ", + "userLogin": "rique223", + "description": "Created the /featured endpoints on the rest.js file. Also created the necessary typings to use together with it.", + "contributors": [ + "rique223" + ] + }, + { + "pr": "26490", + "title": "[FIX] Request at least one field in the payload of `/v1/users.setStatus`", + "userLogin": "tassoevan", + "description": "Requests `status` and/or `message` fields on `/v1/users.setStatus` request payload.", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "26467", + "title": "Chore: Exit process on `unhandledRejection` on CI", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "26466", + "title": "[FIX] Clear push token on save user password", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "26396", + "title": "[FIX] Undefined MediaDevices error on HTTP", + "userLogin": "MartinSchoeler", + "milestone": "5.0.2", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "26477", + "title": "Chore: Codecov threshold", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "26464", + "title": "Chore: Tests intermitences", + "userLogin": "weslley543", + "contributors": [ + "weslley543" + ] + }, + { + "pr": "26373", + "title": "[FIX] Don't give errors on outbound voip call Request Terminated", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "26437", + "title": "Chore: Use Docker compose on CI", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "26459", + "title": "[FIX] DialPad call button from end to center", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "26390", + "title": "Chore: Parallelize e2e tests", + "userLogin": "souzaramon", + "contributors": [ + "souzaramon", + "weslley543", + "ggazzo" + ] + }, + { + "pr": "26454", + "title": "[IMPROVE] use enter key to call using DialPad", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp", + "web-flow" + ] + }, + { + "pr": "26434", + "title": "Chore: Accounts/token to TS", + "userLogin": "yash-rajpal", + "milestone": "5.1.0", + "contributors": [ + "yash-rajpal", + "dougfabris" + ] + }, + { + "pr": "26447", + "title": "Chore: Purge some unused modules", + "userLogin": "tassoevan", + "description": "The title says it all.", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "26429", + "title": "i18n: Language update from LingoHub 🤖 on 2022-08-01Z", + "userLogin": "lingohub[bot]", + "contributors": [ + null, + "dougfabris" + ] + }, + { + "pr": "26347", + "title": "Chore: Add end-to-end tests to teams listing in the `directory` endpoint", + "userLogin": "carlosrodrigues94", + "contributors": [ + "carlosrodrigues94" + ] + }, + { + "pr": "26432", + "title": "Chore: Cache playwright ", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "26438", + "title": "[FIX] Empty results on `im.list` endpoint", + "userLogin": "albuquerquefabio", + "milestone": "5.0.2", + "contributors": [ + "albuquerquefabio", + "sampaiodiego" + ] + }, + { + "pr": "26338", + "title": "Chore: Upgrade nivo and React Query", + "userLogin": "tassoevan", + "contributors": [ + "tassoevan", + "web-flow" + ] + }, + { + "pr": "26435", + "title": "Chore: Upgrade Fuselage packages to next dist-tag", + "userLogin": "dougfabris", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "26376", + "title": "Chore: Omnichannel endpoints e2e tests", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman", + "web-flow", + "murtaza98", + "ggazzo" + ] + }, + { + "pr": "26323", + "title": "[FIX] Not possible to deactivate users", + "userLogin": "dougfabris", + "milestone": "5.0.1", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "26196", + "title": "Chore: Rewrite Location modal to React", + "userLogin": "gabriellsh", + "milestone": "5.1.0", + "contributors": [ + "gabriellsh", + "dougfabris" + ] + }, + { + "pr": "24365", + "title": "Chore: Rewrite SaveToWebdav Modal to React Component", + "userLogin": "dougfabris", + "description": "### before\r\n![Screen Shot 2022-01-31 at 11 02 34](https://user-images.githubusercontent.com/27704687/151807376-6dc87be5-287a-45a0-ac1b-47a7cdf4e3d3.png)\r\n\r\n### after\r\n![Screen Shot 2022-01-31 at 10 58 04](https://user-images.githubusercontent.com/27704687/151806686-7110cec8-a006-4ac1-befd-a2684550ecc5.png)", + "milestone": "5.1.0", + "contributors": [ + "dougfabris", + "pierre-lehnen-rc" + ] + }, + { + "pr": "26357", + "title": "Chore: validateParams to accept different validators per request method", + "userLogin": "KevLehman", + "milestone": "5.0.3", + "contributors": [ + "KevLehman", + "web-flow", + "murtaza98", + "ggazzo" + ] + }, + { + "pr": "26421", + "title": "Regression: Fix spacing problem on AppStatus component", + "userLogin": "rique223", + "description": "Fixed a problem where the AppStatus component would show a unwanted margin when an app was installed and had an update.\r\nBefore:\r\n![image](https://user-images.githubusercontent.com/43561537/181837343-c51ed297-442c-4507-aff3-20df5ac9366a.png)\r\n\r\nAfter:\r\n![image](https://user-images.githubusercontent.com/43561537/181838756-b04fe31c-9e85-4830-8dd4-fddf8ec03458.png)", + "contributors": [ + "rique223" + ] + }, + { + "pr": "26413", + "title": "Chore: Convert client/views/account/security folder to ts", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti" + ] + }, + { + "pr": "20895", + "title": "i18n: Makes the text less ambiguous", + "userLogin": "pierreozoux", + "milestone": "5.1.0", + "contributors": [ + "pierreozoux", + "web-flow", + "dougfabris" + ] + }, + { + "pr": "20131", + "title": "Chore: Missing some English translation keywords", + "userLogin": "Karting06", + "description": "Add missing translation keys in `en.i18n.json` to be able to translate them via Lingohub.", + "contributors": [ + "Karting06", + "dougfabris" + ] + }, + { + "pr": "26399", + "title": "Chore: Exclude private/public folders from typecheck", + "userLogin": "KevLehman", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "26181", + "title": "[NEW] Marketplace apps page new list view layout", + "userLogin": "rique223", + "description": "Refactored the layout of the marketplace list of apps, now it has a more minimalist and flexbox-based style. Also implemented a new status filter.\r\n\r\nDemo gif:\r\n![new-app-list](https://user-images.githubusercontent.com/43561537/179572667-792d8d34-1003-4e95-bf10-37ba93f8c1ef.gif)\r\n\r\nClickUp task: \r\nhttps://app.clickup.com/t/1na7437", + "milestone": "5.1.0", + "contributors": [ + "rique223", + "web-flow" + ] + }, + { + "pr": "26204", + "title": "Chore: Rewrite custom OAuth Modals to react", + "userLogin": "gabriellsh", + "milestone": "5.1.0", + "contributors": [ + "gabriellsh", + "dougfabris" + ] + }, + { + "pr": "26397", + "title": "i18n: Manual sync from LingoHub", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego", + "dougfabris" + ] + }, + { + "pr": "26395", + "title": "Chore: Options in BaseRaw model could possibly be undefined", + "userLogin": "MarcosSpessatto", + "description": "I found this while I was doing some refactorings on the federation side. 😬", + "contributors": [ + "MarcosSpessatto" + ] + }, + { + "pr": "26336", + "title": "[IMPROVE] Use single change stream to watch DB changes", + "userLogin": "sampaiodiego", + "milestone": "5.0.1", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "26391", + "title": "Chore: Remove public and node_modules folders from TypeScript server watcher", + "userLogin": "tiagoevanp", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "26363", + "title": "[FIX] Onhold auto chat resume feature not working for email channel", + "userLogin": "murtaza98", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "26293", + "title": "Chore: add playwright ee coverage", + "userLogin": "weslley543", + "contributors": [ + "weslley543", + "rodrigok", + "web-flow", + "souzaramon", + "KevLehman", + "ggazzo", + "murtaza98" + ] + }, + { + "pr": "26368", + "title": "Regression: Fix app privacy links opening in desktop client instead of browser", + "userLogin": "rique223", + "description": "Demo gif:\r\n![privacy-links](https://user-images.githubusercontent.com/43561537/181083695-bc37b5c2-8aa5-4714-9098-9ad02d2fc2bb.gif)", + "milestone": "5.0.1", + "contributors": [ + "rique223" + ] + }, + { + "pr": "26335", + "title": "Chore: fix tests with beforeEach", + "userLogin": "weslley543", + "contributors": [ + "weslley543", + "souzaramon" + ] + }, + { + "pr": "26276", + "title": "[FIX] Unable to send voice recording to Whatsapp", + "userLogin": "murtaza98", + "milestone": "4.8.3", + "contributors": [ + "murtaza98", + "web-flow" + ] + }, + { + "pr": "26192", + "title": "Chore: Convert UserCardWithData to ts", + "userLogin": "dougfabris", + "milestone": "5.0.1", + "contributors": [ + "dougfabris", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26306", + "title": "Chore: cleanup startup of test and put wizard in setup function", + "userLogin": "weslley543", + "contributors": [ + "weslley543" + ] + }, + { + "pr": "26096", + "title": "Chore: Convert AccountPreferencesPage to ts", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti", + "web-flow" + ] + }, + { + "pr": "26345", + "title": "[FIX] Missing bio field UI validation", + "userLogin": "dougfabris", + "milestone": "5.1.0", + "contributors": [ + "dougfabris", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26343", + "title": "Chore: Remove square prop from IconButton", + "userLogin": "dougfabris", + "milestone": "5.0.1", + "contributors": [ + "dougfabris", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26277", + "title": "Chore: Rewrite VerticalBarOldActions to TS", + "userLogin": "dougfabris", + "milestone": "5.1.0", + "contributors": [ + "dougfabris", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26342", + "title": "Chore: Replace direct multiple icon", + "userLogin": "dougfabris", + "milestone": "5.1.0", + "contributors": [ + "dougfabris", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26132", + "title": "Chore: Upgrade ESLint", + "userLogin": "tassoevan", + "description": "Upgrade ESLint (to 8.19.0) and its dependencies, dropping outdated rules.", + "contributors": [ + "tassoevan", + "web-flow" + ] + }, + { + "pr": "25953", + "title": "Chore: convert autotranslate to ts", + "userLogin": "felipe-rod123", + "description": "Converted the `apps/meteor/app/api/server/v1/autotranslate.js` to ts and created endpoint typings on the `packages/rest-typings/src/v1/autotranslate` folder.", + "contributors": [ + "felipe-rod123", + "ggazzo", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26308", + "title": "Chore: Change some places still using `fields` to `projection`", + "userLogin": "sampaiodiego", + "contributors": [ + "sampaiodiego" + ] + } + ] + }, + "5.0.1": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26450", + "title": "Release 5.0.1", + "userLogin": "murtaza98", + "contributors": [ + "dougfabris", + "sampaiodiego", + "rique223" + ] + }, + { + "pr": "26323", + "title": "[FIX] Not possible to deactivate users", + "userLogin": "dougfabris", + "milestone": "5.0.1", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "26336", + "title": "[IMPROVE] Use single change stream to watch DB changes", + "userLogin": "sampaiodiego", + "milestone": "5.0.1", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "26368", + "title": "Regression: Fix app privacy links opening in desktop client instead of browser", + "userLogin": "rique223", + "description": "Demo gif:\r\n![privacy-links](https://user-images.githubusercontent.com/43561537/181083695-bc37b5c2-8aa5-4714-9098-9ad02d2fc2bb.gif)", + "milestone": "5.0.1", + "contributors": [ + "rique223" + ] + }, + { + "pr": "26192", + "title": "Chore: Convert UserCardWithData to ts", + "userLogin": "dougfabris", + "milestone": "5.0.1", + "contributors": [ + "dougfabris", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26343", + "title": "Chore: Remove square prop from IconButton", + "userLogin": "dougfabris", + "milestone": "5.0.1", + "contributors": [ + "dougfabris", + "kodiakhq[bot]", + "web-flow" + ] + } + ] + }, + "5.0.2": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26507", + "title": "Release 5.0.2", + "userLogin": "murtaza98", + "contributors": [ + "MartinSchoeler", + "murtaza98", + "albuquerquefabio" + ] + }, + { + "pr": "26438", + "title": "[FIX] Empty results on `im.list` endpoint", + "userLogin": "albuquerquefabio", + "milestone": "5.0.2", + "contributors": [ + "albuquerquefabio", + "sampaiodiego" + ] + }, + { + "pr": "26396", + "title": "[FIX] Undefined MediaDevices error on HTTP", + "userLogin": "MartinSchoeler", + "milestone": "5.0.2", + "contributors": [ + "MartinSchoeler" + ] + } + ] + }, + "5.0.3": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26551", + "title": "Release 5.0.3", + "userLogin": "sampaiodiego", + "contributors": [ + "KevLehman", + "sampaiodiego", + "filipemarins", + "pierre-lehnen-rc" + ] + }, + { + "pr": "26535", + "title": "[FIX] LDAP fails to sync teams when the user DN has escaped characters.", + "userLogin": "pierre-lehnen-rc", + "milestone": "5.0.3", + "contributors": [ + "pierre-lehnen-rc", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26530", + "title": "[FIX] Endpoints not working when using \"Use Real Name\" setting", + "userLogin": "sampaiodiego", + "description": "The list of endpoints affected is:\r\n\r\n- `/api/v1/channels.list`\r\n- `/api/v1/channels.list.joined`\r\n- `/api/v1/groups.list`\r\n- `/api/v1/groups.listAll`\r\n- `/api/v1/im.list`\r\n- `/api/v1/im.list.everyone`", + "milestone": "5.0.3", + "contributors": [ + "sampaiodiego", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26425", + "title": "[FIX] Chats holds to load history for some time", + "userLogin": "filipemarins", + "milestone": "5.0.3", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "26357", + "title": "Chore: validateParams to accept different validators per request method", + "userLogin": "KevLehman", + "milestone": "5.0.3", + "contributors": [ + "KevLehman", + "web-flow", + "murtaza98", + "ggazzo" + ] + } + ] + }, + "5.0.4": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26620", + "title": "Release 5.0.4", + "userLogin": "murtaza98", + "contributors": [ + "sampaiodiego", + "murtaza98" + ] + }, + { + "pr": "26617", + "title": "Regression: Fix services Docker build", + "userLogin": "sampaiodiego", + "milestone": "5.0.4", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "26608", + "title": "Chore: Fix services image publish do DockerHub", + "userLogin": "sampaiodiego", + "milestone": "5.0.4", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "26579", + "title": "[FIX][ENTERPRISE] User not marked as offline on log out when using micro services", + "userLogin": "sampaiodiego", + "milestone": "5.0.4", + "contributors": [ + "sampaiodiego", + "kodiakhq[bot]", + "web-flow" + ] + } + ] + }, + "5.1.0-rc.1": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26703", + "title": "[FIX][ENTERPRISE] Omnichannel real time data on micro services", + "userLogin": "KevLehman", + "milestone": "5.0.5", + "contributors": [ + "KevLehman", + "sampaiodiego" + ] + }, + { + "pr": "26692", + "title": "[FIX] Omnichannel inquiries being updated even if not needed", + "userLogin": "KevLehman", + "milestone": "5.0.5", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "26704", + "title": "Chore: Convert AutoCompleteAgent to tsx", + "userLogin": "juliajforesti", + "contributors": [ + "juliajforesti", + "web-flow" + ] + }, + { + "pr": "26706", + "title": "Chore: Remove & Test cannedResponse meteor templates", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "26581", + "title": "Chore: create a test for managers screen", + "userLogin": "weslley543", + "contributors": [ + "weslley543", + "web-flow" + ] + }, + { + "pr": "26700", + "title": "Chore: Remove visitor, agent and customTemplate meteor templates", + "userLogin": "MartinSchoeler", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "26702", + "title": "Chore: Engagement Dashboard end to end tests", + "userLogin": "hugocostadev", + "description": "Adding tests to check the behavior of the Engagement Dashboard for the Enterprise Edition license. \r\nThe tests include: \r\n- Visibility and navigation of page and tabs\r\n- Fallback component on widgets error", + "contributors": [ + "hugocostadev" + ] + }, + { + "pr": "26699", + "title": "Regression: Remove log from banners.ts", + "userLogin": "gabriellsh", + "contributors": [ + "gabriellsh" + ] + } + ] + }, + "5.0.5": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26718", + "title": "Release 5.0.5", + "userLogin": "sampaiodiego", + "contributors": [ + "KevLehman", + "sampaiodiego" + ] + }, + { + "pr": "26713", + "title": "[FIX] Business Units endpoints not filtering by Unit type", + "userLogin": "KevLehman", + "milestone": "5.0.5", + "contributors": [ + "KevLehman", + "Harmeet221", + "web-flow", + "murtaza98" + ] + }, + { + "pr": "26703", + "title": "[FIX][ENTERPRISE] Omnichannel real time data on micro services", + "userLogin": "KevLehman", + "milestone": "5.0.5", + "contributors": [ + "KevLehman", + "sampaiodiego" + ] + }, + { + "pr": "26692", + "title": "[FIX] Omnichannel inquiries being updated even if not needed", + "userLogin": "KevLehman", + "milestone": "5.0.5", + "contributors": [ + "KevLehman" + ] + } + ] + }, + "5.1.0-rc.2": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [ + { + "pr": "26753", + "title": "Regression: REST setUserPublicAndPrivateKeys", + "userLogin": "ggazzo", + "milestone": "5.1.0", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "26745", + "title": "Regression: Workaround to handle auto stopped computations 😞 ", + "userLogin": "ggazzo", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "26713", + "title": "[FIX] Business Units endpoints not filtering by Unit type", + "userLogin": "KevLehman", + "milestone": "5.0.5", + "contributors": [ + "KevLehman", + "Harmeet221", + "web-flow", + "murtaza98" + ] + } + ] + }, + "5.1.0-rc.3": { + "node_version": "14.19.3", + "npm_version": "6.14.17", "mongo_versions": [ - "3.6", - "4.0", "4.2", "4.4", "5.0" ], "pull_requests": [ { - "pr": "24432", - "title": "Release 4.4.1", - "userLogin": "pierre-lehnen-rc", + "pr": "26718", + "title": "Release 5.0.5", + "userLogin": "sampaiodiego", + "contributors": [ + "KevLehman", + "sampaiodiego" + ] + }, + { + "pr": "26713", + "title": "[FIX] Business Units endpoints not filtering by Unit type", + "userLogin": "KevLehman", + "milestone": "5.0.5", + "contributors": [ + "KevLehman", + "Harmeet221", + "web-flow", + "murtaza98" + ] + }, + { + "pr": "26703", + "title": "[FIX][ENTERPRISE] Omnichannel real time data on micro services", + "userLogin": "KevLehman", + "milestone": "5.0.5", + "contributors": [ + "KevLehman", + "sampaiodiego" + ] + }, + { + "pr": "26692", + "title": "[FIX] Omnichannel inquiries being updated even if not needed", + "userLogin": "KevLehman", + "milestone": "5.0.5", + "contributors": [ + "KevLehman" + ] + }, + { + "pr": "26620", + "title": "Release 5.0.4", + "userLogin": "murtaza98", "contributors": [ "sampaiodiego", - "pierre-lehnen-rc", - "dougfabris", - "ostjen" + "murtaza98" ] }, { - "pr": "24387", - "title": "[FIX] Slash commands previews not working", - "userLogin": "ostjen", - "milestone": "4.4.1", + "pr": "26617", + "title": "Regression: Fix services Docker build", + "userLogin": "sampaiodiego", + "milestone": "5.0.4", "contributors": [ - "ostjen" + "sampaiodiego", + "web-flow" ] }, { - "pr": "24381", - "title": "[FIX] Add ?close to OAuth callback url", + "pr": "26608", + "title": "Chore: Fix services image publish do DockerHub", "userLogin": "sampaiodiego", - "milestone": "4.4.1", + "milestone": "5.0.4", "contributors": [ "sampaiodiego" ] }, { - "pr": "24409", - "title": "[FIX] Startup errors creating indexes", + "pr": "26579", + "title": "[FIX][ENTERPRISE] User not marked as offline on log out when using micro services", "userLogin": "sampaiodiego", - "description": "Fix `bio` and `prid` startup index creation errors.", - "milestone": "4.4.1", + "milestone": "5.0.4", "contributors": [ - "sampaiodiego" + "sampaiodiego", + "kodiakhq[bot]", + "web-flow" ] }, { - "pr": "24401", - "title": "[FIX] Outgoing webhook without scripts not saving messages", + "pr": "26551", + "title": "Release 5.0.3", "userLogin": "sampaiodiego", - "milestone": "4.4.1", "contributors": [ + "KevLehman", + "sampaiodiego", + "filipemarins", + "pierre-lehnen-rc" + ] + }, + { + "pr": "26535", + "title": "[FIX] LDAP fails to sync teams when the user DN has escaped characters.", + "userLogin": "pierre-lehnen-rc", + "milestone": "5.0.3", + "contributors": [ + "pierre-lehnen-rc", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26530", + "title": "[FIX] Endpoints not working when using \"Use Real Name\" setting", + "userLogin": "sampaiodiego", + "description": "The list of endpoints affected is:\r\n\r\n- `/api/v1/channels.list`\r\n- `/api/v1/channels.list.joined`\r\n- `/api/v1/groups.list`\r\n- `/api/v1/groups.listAll`\r\n- `/api/v1/im.list`\r\n- `/api/v1/im.list.everyone`", + "milestone": "5.0.3", + "contributors": [ + "sampaiodiego", + "web-flow", + "kodiakhq[bot]" + ] + }, + { + "pr": "26425", + "title": "[FIX] Chats holds to load history for some time", + "userLogin": "filipemarins", + "milestone": "5.0.3", + "contributors": [ + "filipemarins", + "gabriellsh" + ] + }, + { + "pr": "26357", + "title": "Chore: validateParams to accept different validators per request method", + "userLogin": "KevLehman", + "milestone": "5.0.3", + "contributors": [ + "KevLehman", + "web-flow", + "murtaza98", + "ggazzo" + ] + }, + { + "pr": "26507", + "title": "Release 5.0.2", + "userLogin": "murtaza98", + "contributors": [ + "MartinSchoeler", + "murtaza98", + "albuquerquefabio" + ] + }, + { + "pr": "26438", + "title": "[FIX] Empty results on `im.list` endpoint", + "userLogin": "albuquerquefabio", + "milestone": "5.0.2", + "contributors": [ + "albuquerquefabio", "sampaiodiego" ] }, { - "pr": "24407", - "title": "[FIX] Skip cloud steps for registered servers on setup wizard", + "pr": "26396", + "title": "[FIX] Undefined MediaDevices error on HTTP", + "userLogin": "MartinSchoeler", + "milestone": "5.0.2", + "contributors": [ + "MartinSchoeler" + ] + }, + { + "pr": "26450", + "title": "Release 5.0.1", + "userLogin": "murtaza98", + "contributors": [ + "dougfabris", + "sampaiodiego", + "rique223" + ] + }, + { + "pr": "26323", + "title": "[FIX] Not possible to deactivate users", "userLogin": "dougfabris", - "milestone": "4.4.1", + "milestone": "5.0.1", + "contributors": [ + "dougfabris" + ] + }, + { + "pr": "26336", + "title": "[IMPROVE] Use single change stream to watch DB changes", + "userLogin": "sampaiodiego", + "milestone": "5.0.1", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "26368", + "title": "Regression: Fix app privacy links opening in desktop client instead of browser", + "userLogin": "rique223", + "description": "Demo gif:\r\n![privacy-links](https://user-images.githubusercontent.com/43561537/181083695-bc37b5c2-8aa5-4714-9098-9ad02d2fc2bb.gif)", + "milestone": "5.0.1", + "contributors": [ + "rique223" + ] + }, + { + "pr": "26192", + "title": "Chore: Convert UserCardWithData to ts", + "userLogin": "dougfabris", + "milestone": "5.0.1", "contributors": [ "dougfabris", - "tassoevan", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26343", + "title": "Chore: Remove square prop from IconButton", + "userLogin": "dougfabris", + "milestone": "5.0.1", + "contributors": [ + "dougfabris", + "kodiakhq[bot]", + "web-flow" + ] + }, + { + "pr": "26732", + "title": "i18n: pt-BR translation typo", + "userLogin": "jeanfbrito", + "contributors": [ + "jeanfbrito" + ] + }, + { + "pr": "26779", + "title": "Regression: Instances Modal breaking", + "userLogin": "gabriellsh", + "description": "Revert back to meteor method for now.", + "milestone": "5.1.0", + "contributors": [ "gabriellsh", "web-flow" ] }, { - "pr": "24418", - "title": "[FIX] Oembed request not respecting payload limit", - "userLogin": "sampaiodiego", - "milestone": "4.4.1", + "pr": "26729", + "title": "[IMPROVE] Remove device-management banner and modal", + "userLogin": "yash-rajpal", + "milestone": "5.1.0", "contributors": [ - "sampaiodiego", + "yash-rajpal", + "filipemarins", "web-flow" ] - } - ] - }, - "4.4.2": { - "node_version": "14.18.2", - "npm_version": "6.14.15", - "apps_engine_version": "1.30.0", - "mongo_versions": [ - "3.6", - "4.0", - "4.2", - "4.4", - "5.0" - ], - "pull_requests": [ + }, { - "pr": "24450", - "title": "[FIX] OAuth mismatch redirect_uri error", - "userLogin": "sampaiodiego", - "milestone": "4.4.2", + "pr": "26756", + "title": "Regression: Visitor being overwritten on call end", + "userLogin": "aleksandernsilva", + "description": "This PR adds a check to the `createRoom` method, responsible for creating VoIP rooms. It checks whether the visitor already exists before creating a new one, if one is found it uses it instead of overwriting existing visitors.", + "milestone": "5.1.0", "contributors": [ - "sampaiodiego" + "aleksandernsilva", + "KevLehman", + "web-flow", + "yash-rajpal" ] }, { - "pr": "24453", - "title": "Chore: bump fuselage version", + "pr": "26765", + "title": "Chore: Update Apps-Engine", + "userLogin": "d-gubert", + "milestone": "5.1.0", + "contributors": [ + "d-gubert" + ] + }, + { + "pr": "26769", + "title": "Chore: Bump fuselage packages", "userLogin": "dougfabris", - "milestone": "4.4.2", "contributors": [ "dougfabris" ] + }, + { + "pr": "26770", + "title": "Chore: Fix docker latest tag push", + "userLogin": "debdutdeb", + "contributors": [ + "debdutdeb" + ] + }, + { + "pr": "26747", + "title": "Regression: Custom fields not being saved for room", + "userLogin": "KevLehman", + "milestone": "5.1.0", + "contributors": [ + "KevLehman", + "web-flow" + ] + }, + { + "pr": "26744", + "title": "Regression: Fix Current Chats Page Issues", + "userLogin": "MartinSchoeler", + "milestone": "5.1.0", + "contributors": [ + "MartinSchoeler", + "web-flow", + "KevLehman" + ] + }, + { + "pr": "26720", + "title": "Regression: Empty custom-fields filter on Current Chats causing issues", + "userLogin": "murtaza98", + "milestone": "5.1.0", + "contributors": [ + "murtaza98", + "KevLehman", + "casalsgh", + "web-flow" + ] + }, + { + "pr": "26764", + "title": "Regression: Sidebar Search list local data cache and keyboard navigation", + "userLogin": "gabriellsh", + "milestone": "5.1.0", + "contributors": [ + "gabriellsh" + ] + }, + { + "pr": "26759", + "title": "Regression: Select settings options not visible on Apps Setting panel", + "userLogin": "murtaza98", + "milestone": "5.1.0", + "contributors": [ + "murtaza98" + ] + }, + { + "pr": "26701", + "title": "Regression: AutoTranslate is disabled error", + "userLogin": "gabriellsh", + "milestone": "5.1.0", + "contributors": [ + "gabriellsh" + ] } ] + }, + "5.1.0": { + "node_version": "14.19.3", + "npm_version": "6.14.17", + "mongo_versions": [ + "4.2", + "4.4", + "5.0" + ], + "pull_requests": [] } } } \ No newline at end of file diff --git a/.github/no-js-action-config.json b/.github/no-js-action-config.json index 435d5ace554c..45e82790b82e 100644 --- a/.github/no-js-action-config.json +++ b/.github/no-js-action-config.json @@ -1,8 +1,13 @@ { "added": { "ignore": [ + "packages/node-poplib/**/*", "packages/accounts-linkedin/**/*", - "packages/linkedin-oauth/**/*" + "packages/linkedin-oauth/**/*", + "tests/cypress/integration/08-resolutions.spec.js", + "**/.eslintrc.js", + "packages/eslint-config/**", + "**/babel.config.js" ] } } diff --git a/.github/pr-title-checker-config.json b/.github/pr-title-checker-config.json index 3b992e891884..07089e99314a 100644 --- a/.github/pr-title-checker-config.json +++ b/.github/pr-title-checker-config.json @@ -4,7 +4,7 @@ "color": "B60205" }, "CHECKS": { - "regexp": "^(?:(?:\\[(NEW|BREAK|IMPROVE|FIX)\\](\\[(ENTERPRISE|APPS)\\])?|(?:Regression|Chore|Revert|i18n):)|(?:Bump) .+|Release [0-9]+\\.[0-9]+\\.[0-9]+|Merge master into develop)", + "regexp": "^(?:(?:\\[(NEW|BREAK|IMPROVE|FIX)\\](\\[(ENTERPRISE|APPS)\\])?|(?:Regression|Chore|Revert|i18n):)|(?:Bump)) .+$|^Release [0-9]+\\.[0-9]+\\.[0-9]+$|^Merge master into develop", "ignoreLabels" : ["[ignore-title]"] } } diff --git a/.github/workflows/auto-label.yml b/.github/workflows/auto-label.yml new file mode 100644 index 000000000000..b02b09a62a91 --- /dev/null +++ b/.github/workflows/auto-label.yml @@ -0,0 +1,11 @@ +name: 'Auto label QA' +on: + pull_request: + types: [opened, synchronize, labeled, unlabeled] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: ggazzo/gh-action-auto-label@beta-5 + with: + GITHUB_TOKEN: ${{ secrets.RC_AUTOLABEL_TOKEN }} diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 642b676e904e..d434f09433f1 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -9,636 +9,791 @@ on: branches: - develop +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + env: CI: true - MONGO_URL: mongodb://localhost:27017 + MONGO_URL: mongodb://localhost:27017/rocketchat?replicaSet=rs0&directConnection=true + MONGO_OPLOG_URL: mongodb://mongodb:27017/local?replicaSet=rs0&directConnection=true TOOL_NODE_FLAGS: --max_old_space_size=4096 + TURBO_TEAM: ${{ secrets.TURBO_TEAM }} jobs: + release-versions: + runs-on: ubuntu-latest + outputs: + release: ${{ steps.by-tag.outputs.release }} + latest-release: ${{ steps.latest.outputs.latest-release }} + docker-tag: ${{ steps.docker.outputs.docker-tag }} + gh-docker-tag: ${{ steps.docker.outputs.gh-docker-tag }} + steps: + - id: by-tag + run: | + if echo "$GITHUB_REF_NAME" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$' ; then + RELEASE="latest" + elif echo "$GITHUB_REF_NAME" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$' ; then + RELEASE="release-candidate" + fi + echo "RELEASE: ${RELEASE}" + echo "::set-output name=release::${RELEASE}" + + - id: latest + run: | + LATEST_RELEASE="$( + git -c 'versionsort.suffix=-' ls-remote -t --exit-code --refs --sort=-v:refname "https://github.com/$GITHUB_REPOSITORY" '*' | + awk -F/ '$NF !~ /rc|beta/ { print $NF; exit }' + )" + echo "LATEST_RELEASE: ${LATEST_RELEASE}" + echo "::set-output name=latest-release::${LATEST_RELEASE}" + + - id: docker + run: | + if [[ '${{ github.event_name }}' == 'pull_request' ]]; then + DOCKER_TAG="pr-${{ github.event.number }}" + else + DOCKER_TAG="gh-${{ github.run_id }}" + fi + echo "DOCKER_TAG: ${DOCKER_TAG}" + echo "::set-output name=gh-docker-tag::${DOCKER_TAG}" + build: runs-on: ubuntu-20.04 steps: + - name: Github Info + run: | + echo "GITHUB_ACTION: $GITHUB_ACTION" + echo "GITHUB_ACTOR: $GITHUB_ACTOR" + echo "GITHUB_REF: $GITHUB_REF" + echo "GITHUB_HEAD_REF: $GITHUB_HEAD_REF" + echo "GITHUB_BASE_REF: $GITHUB_BASE_REF" + echo "github.event_name: ${{ github.event_name }}" + cat $GITHUB_EVENT_PATH + + - name: Set Swap Space + uses: pierotofy/set-swap-space@master + with: + swap-size-gb: 4 + + - uses: actions/checkout@v3 + + - name: Use Node.js 14.19.3 + uses: actions/setup-node@v3 + with: + node-version: '14.19.3' + cache: 'yarn' + + - name: Free disk space + run: | + sudo apt clean + docker rmi $(docker image ls -aq) + df -h + + - name: Cache meteor local + uses: actions/cache@v2 + with: + path: ./apps/meteor/.meteor/local + key: meteor-local-cache-${{ runner.OS }}-${{ hashFiles('apps/meteor/.meteor/versions') }} + restore-keys: | + meteor-local-cache-${{ runner.os }}- + + - name: Cache meteor + uses: actions/cache@v2 + with: + path: ~/.meteor + key: meteor-cache-${{ runner.OS }}-${{ hashFiles('apps/meteor/.meteor/release') }} + restore-keys: | + meteor-cache-${{ runner.os }}- + + - name: Install Meteor + run: | + # Restore bin from cache + set +e + METEOR_SYMLINK_TARGET=$(readlink ~/.meteor/meteor) + METEOR_TOOL_DIRECTORY=$(dirname "$METEOR_SYMLINK_TARGET") + set -e + LAUNCHER=$HOME/.meteor/$METEOR_TOOL_DIRECTORY/scripts/admin/launch-meteor + if [ -e $LAUNCHER ] + then + echo "Cached Meteor bin found, restoring it" + sudo cp "$LAUNCHER" "/usr/local/bin/meteor" + else + echo "No cached Meteor bin found." + fi - - name: Github Info - run: | - echo "GITHUB_ACTION: $GITHUB_ACTION" - echo "GITHUB_ACTOR: $GITHUB_ACTOR" - echo "GITHUB_REF: $GITHUB_REF" - echo "GITHUB_HEAD_REF: $GITHUB_HEAD_REF" - echo "GITHUB_BASE_REF: $GITHUB_BASE_REF" - echo "github.event_name: ${{ github.event_name }}" - cat $GITHUB_EVENT_PATH - - - name: Use Node.js 14.18.2 - uses: actions/setup-node@v2 - with: - node-version: "14.18.2" - - - uses: actions/checkout@v2 - - - name: Free disk space - run: | - sudo swapoff -a - sudo rm -f /swapfile - sudo apt clean - docker rmi $(docker image ls -aq) - df -h - - - name: check package-lock - run: | - npx package-lock-check - - - name: Cache cypress - id: cache-cypress - uses: actions/cache@v2 - with: - path: /home/runner/.cache/Cypress - key: ${{ runner.OS }}-cache-cypress-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }} - - # - name: Cache node modules - # id: cache-nodemodules - # uses: actions/cache@v2 - # with: - # path: | - # ./node_modules - # ./ee/server/services/node_modules - # key: ${{ runner.OS }}-node_modules-4-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }} - - - name: Cache meteor local - uses: actions/cache@v2 - with: - path: ./.meteor/local - key: ${{ runner.OS }}-meteor_cache-${{ hashFiles('.meteor/versions', '.github/workflows/build_and_test.yml') }} - - - name: Cache meteor - uses: actions/cache@v2 - with: - path: ~/.meteor - key: ${{ runner.OS }}-meteor-${{ hashFiles('.meteor/release', '.github/workflows/build_and_test.yml') }} - - - name: Install Meteor - run: | - # Restore bin from cache - set +e - METEOR_SYMLINK_TARGET=$(readlink ~/.meteor/meteor) - METEOR_TOOL_DIRECTORY=$(dirname "$METEOR_SYMLINK_TARGET") - set -e - LAUNCHER=$HOME/.meteor/$METEOR_TOOL_DIRECTORY/scripts/admin/launch-meteor - if [ -e $LAUNCHER ] - then - echo "Cached Meteor bin found, restoring it" - sudo cp "$LAUNCHER" "/usr/local/bin/meteor" - else - echo "No cached Meteor bin found." - fi - - # only install meteor if bin isn't found - command -v meteor >/dev/null 2>&1 || curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh - - - name: Versions - run: | - npm --versions - node -v - meteor --version - meteor npm --versions - meteor node -v - git version - - - name: npm install - # if: steps.cache-nodemodules.outputs.cache-hit != 'true' || steps.cache-cypress.outputs.cache-hit != 'true' - run: | - meteor npm install - cd ./ee/server/services - npm install - cd - - - - run: meteor npm run lint - - - run: meteor npm run translation-check - - - run: meteor npm run typecheck - - - name: Build Storybook to sanity check components - run: npm run build-storybook ; rm -rf ./storybook-static - - - # To reduce memory need during actual build, build the packages solely first - # - name: Build a Meteor cache - # run: | - # # to do this we can clear the main files and it build the rest - # echo "" > server/main.ts - # echo "" > client/main.ts - # sed -i.backup 's/rocketchat:livechat/#rocketchat:livechat/' .meteor/packages - # meteor build --server-only --debug --directory /tmp/build-temp - # git checkout -- server/main.ts client/main.ts .meteor/packages - - - name: Reset Meteor - if: startsWith(github.ref, 'refs/tags/') == 'true' || github.ref == 'refs/heads/develop' - run: | - meteor reset - - - name: Try building micro services - run: | - cd ./ee/server/services - npm run build - # check if build succeeded - [ ! -d ./dist/ee/server/services ] && exit 1 - rm -rf dist/ - - - name: Build Rocket.Chat From Pull Request - if: startsWith(github.ref, 'refs/pull/') == true - env: - METEOR_PROFILE: 1000 - run: | - meteor build --server-only --directory --debug /tmp/build-test - - - name: Build Rocket.Chat - if: startsWith(github.ref, 'refs/pull/') != true - run: | - meteor build --server-only --directory /tmp/build-test - - - name: Prepare build - run: | - mkdir /tmp/build/ - cd /tmp/build-test - tar czf /tmp/build/Rocket.Chat.tar.gz bundle - cd /tmp/build-test/bundle/programs/server - npm install - cd /tmp - tar czf Rocket.Chat.test.tar.gz ./build-test - - - name: Store build for tests - uses: actions/upload-artifact@v2 - with: - name: build-test - path: /tmp/Rocket.Chat.test.tar.gz - - - name: Store build - uses: actions/upload-artifact@v2 - with: - name: build - path: /tmp/build + # only install meteor if bin isn't found + command -v meteor >/dev/null 2>&1 || curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh + + - name: Versions + run: | + npm --versions + yarn -v + node -v + meteor --version + meteor npm --versions + meteor node -v + git version + + - name: yarn install + run: yarn + + - name: TurboRepo local server + uses: felixmosh/turborepo-gh-artifacts@v1 + with: + repo-token: ${{ secrets.RC_TURBO_GH_TOKEN }} + server-token: ${{ secrets.TURBO_SERVER_TOKEN }} + + - name: Lint + run: yarn lint --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" --team='rc' + + - name: Translation check + run: yarn turbo run translation-check --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" --team='rc' + + - name: TS typecheck + run: yarn turbo run typecheck --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" --team='rc' + + - name: Reset Meteor + if: startsWith(github.ref, 'refs/tags/') == 'true' || github.ref == 'refs/heads/develop' + run: | + cd ./apps/meteor + meteor reset + + - name: Build Rocket.Chat From Pull Request + if: startsWith(github.ref, 'refs/pull/') == true + env: + METEOR_PROFILE: 1000 + run: yarn build:ci --api="http://127.0.0.1:9080" -- --debug --directory dist + + - name: Build Rocket.Chat + if: startsWith(github.ref, 'refs/pull/') != true + run: yarn build:ci --api="http://127.0.0.1:9080" -- --directory dist + + - name: Prepare build + run: | + cd apps/meteor/dist + tar czf /tmp/Rocket.Chat.tar.gz bundle + + - name: Store build + uses: actions/upload-artifact@v2 + with: + name: build + path: /tmp/Rocket.Chat.tar.gz + + build-docker-preview: + runs-on: ubuntu-20.04 + needs: [build, release-versions] + if: github.event_name == 'release' || github.ref == 'refs/heads/develop' + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + + - name: Restore build + uses: actions/download-artifact@v2 + with: + name: build + path: /tmp/build + + - name: Unpack build + run: | + cd /tmp/build + tar xzf Rocket.Chat.tar.gz + rm Rocket.Chat.tar.gz + + - name: Build Docker image + id: build-docker-image-preview + uses: ./.github/actions/build-docker-image + with: + root-dir: /tmp/build + docker-tag: ${{ needs.release-versions.outputs.gh-docker-tag }} + release: preview + username: ${{ secrets.CR_USER }} + password: ${{ secrets.CR_PAT }} test: runs-on: ubuntu-20.04 - needs: build + needs: [build, release-versions] strategy: matrix: - node-version: ["14.18.2"] - mongodb-version: ["3.6", "4.0", "4.2", "4.4","5.0"] + node-version: ['14.19.3'] + mongodb-version: ['4.2', '4.4', '5.0'] steps: - - name: Launch MongoDB - uses: wbari/start-mongoDB@v0.2 - with: - mongoDBVersion: ${{ matrix.mongodb-version }} --replSet=rs0 - - - name: Restore build for tests - uses: actions/download-artifact@v2 - with: - name: build-test - path: /tmp - - - name: Decompress build - run: | - cd /tmp - tar xzf Rocket.Chat.test.tar.gz - cd - - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - - - name: Setup Chrome - run: | - npm i chromedriver - - - name: Configure Replica Set - run: | - docker exec mongo mongo --eval 'rs.initiate({_id:"rs0", members: [{"_id":1, "host":"localhost:27017"}]})' - docker exec mongo mongo --eval 'rs.status()' - - - uses: actions/checkout@v2 - - - name: Cache cypress - id: cache-cypress - uses: actions/cache@v2 - with: - path: /home/runner/.cache/Cypress - key: ${{ runner.OS }}-cache-cypress-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }} - - # - name: Cache node modules - # id: cache-nodemodules - # uses: actions/cache@v2 - # with: - # path: | - # ./node_modules - # ./ee/server/services/node_modules - # key: ${{ runner.OS }}-node_modules-4-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }} - - - name: NPM install - # if: steps.cache-nodemodules.outputs.cache-hit != 'true' || steps.cache-cypress.outputs.cache-hit != 'true' - run: | - npm install - - - name: Unit Test (definitions) - run: npm run testunit-definition - - - name: Unit Test - run: npm run testunit - - - name: Unit Test (client) - run: npm run testunit-client - - - name: E2E Test - env: - TEST_MODE: "true" - MONGO_URL: mongodb://localhost:27017/rocketchat - MONGO_OPLOG_URL: mongodb://localhost:27017/local - run: | - echo -e 'pcm.!default {\n type hw\n card 0\n}\n\nctl.!default {\n type hw\n card 0\n}' > ~/.asoundrc - Xvfb -screen 0 1024x768x24 :99 & - for i in $(seq 1 5); do (docker exec mongo mongo rocketchat --eval 'db.dropDatabase()') && npm run testci && s=0 && break || s=$? && sleep 1; done; (exit $s) - -# notification: -# runs-on: ubuntu-20.04 -# needs: test - -# steps: -# - name: Rocket.Chat Notification -# uses: RocketChat/Rocket.Chat.GitHub.Action.Notification@1.1.1 -# with: -# type: ${{ job.status }} -# job_name: '**Build and Test**' -# url: ${{ secrets.ROCKETCHAT_WEBHOOK }} -# commit: true -# token: ${{ secrets.GITHUB_TOKEN }} - - build-image-pr: + - name: Launch MongoDB + uses: supercharge/mongodb-github-action@1.7.0 + with: + mongodb-version: ${{ matrix.mongodb-version }} + mongodb-replica-set: rs0 + + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + + - name: yarn install + run: yarn + + - name: TurboRepo local server + uses: felixmosh/turborepo-gh-artifacts@v1 + with: + repo-token: ${{ secrets.RC_TURBO_GH_TOKEN }} + server-token: ${{ secrets.TURBO_SERVER_TOKEN }} + + - name: Unit Test + run: yarn testunit --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" --team='rc' + + - name: Restore build + uses: actions/download-artifact@v2 + with: + name: build + path: /tmp/build + + - name: Unpack build + run: | + cd /tmp/build + tar xzf Rocket.Chat.tar.gz + rm Rocket.Chat.tar.gz + + - name: Start containers + env: + MONGO_URL: 'mongodb://host.docker.internal:27017/rocketchat?replicaSet=rs0&directConnection=true' + MONGO_OPLOG_URL: 'mongodb://mongodb:27017/local?replicaSet=rs0&directConnection=true' + run: | + export LOWERCASE_REPOSITORY=$(echo "${{ github.repository_owner }}" | tr "[:upper:]" "[:lower:]") + + # test alpine image on mongo 5.0 (no special reason to be mongo 5.0 but we need to test alpine at least once) + if [[ '${{ matrix.mongodb-version }}' = '5.0' ]]; then + export RC_DOCKERFILE="${{ github.workspace }}/apps/meteor/.docker/Dockerfile.alpine" + export RC_DOCKER_TAG="${{ needs.release-versions.outputs.gh-docker-tag }}.alpine" + else + export RC_DOCKERFILE="${{ github.workspace }}/apps/meteor/.docker/Dockerfile" + export RC_DOCKER_TAG="${{ needs.release-versions.outputs.gh-docker-tag }}.official" + fi; + + docker compose -f docker-compose-ci.yml up -d --build rocketchat + + sleep 10 + + until echo "$(docker compose -f docker-compose-ci.yml logs rocketchat)" | grep -q "SERVER RUNNING"; do + echo "Waiting Rocket.Chat to start up" + ((c++)) && ((c==10)) && docker compose -f docker-compose-ci.yml logs rocketchat && exit 1 + sleep 10 + done + + - name: Login to GitHub Container Registry + if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop' + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ secrets.CR_USER }} + password: ${{ secrets.CR_PAT }} + + - name: Publish Docker images to GitHub Container Registry + if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop' + run: | + export LOWERCASE_REPOSITORY=$(echo "${{ github.repository_owner }}" | tr "[:upper:]" "[:lower:]") + + # test alpine image on mongo 5.0 (no special reason to be mongo 5.0 but we need to test alpine at least once) + if [[ '${{ matrix.mongodb-version }}' = '5.0' ]]; then + export RC_DOCKER_TAG="${{ needs.release-versions.outputs.gh-docker-tag }}.alpine" + else + export RC_DOCKER_TAG="${{ needs.release-versions.outputs.gh-docker-tag }}.official" + fi; + + docker compose -f docker-compose-ci.yml push rocketchat + + if [[ '${{ matrix.mongodb-version }}' = '4.4' ]]; then + IMAGE_NAME_BASE="ghcr.io/${LOWERCASE_REPOSITORY}/rocket.chat:${{ needs.release-versions.outputs.gh-docker-tag }}" + + echo "Push Docker image: ${IMAGE_NAME_BASE}" + + docker tag ${IMAGE_NAME_BASE}.official $IMAGE_NAME_BASE + docker push $IMAGE_NAME_BASE + fi; + + - name: E2E Test API + run: | + docker ps + docker compose -f docker-compose-ci.yml logs rocketchat --tail=50 + + cd ./apps/meteor + for i in $(seq 1 5); do + npm run testapi && s=0 && break || s=$? + + docker compose -f ../../docker-compose-ci.yml logs rocketchat --tail=100 + + docker compose -f ../../docker-compose-ci.yml stop rocketchat + + docker exec mongodb mongo rocketchat --eval 'db.dropDatabase()' + + NOW=$(date "+%Y-%m-%dT%H:%M:%SZ") + + docker compose -f ../../docker-compose-ci.yml start rocketchat + + until echo "$(docker compose -f ../../docker-compose-ci.yml logs rocketchat --since $NOW)" | grep -q "SERVER RUNNING"; do + echo "Waiting Rocket.Chat to start up" + ((c++)) && ((c==10)) && exit 1 + sleep 10 + done; + done; + exit $s + + - name: Cache Playwright binaries + uses: actions/cache@v3 + id: cache-playwright + with: + path: | + ~/.cache/ms-playwright + # This is the version of Playwright that we are using, if you are willing to upgrade, you should update this. + key: playwright-1.23.1 + + - name: Install Playwright + if: steps.cache-playwright.outputs.cache-hit != 'true' + run: | + cd ./apps/meteor + npx playwright install --with-deps + + - name: E2E Test UI + run: | + docker ps + docker compose -f docker-compose-ci.yml logs rocketchat --tail=50 + + docker exec mongodb mongo rocketchat --eval 'db.dropDatabase()' + + NOW=$(date "+%Y-%m-%dT%H:%M:%SZ") + + docker compose -f docker-compose-ci.yml restart rocketchat + + until echo "$(docker compose -f docker-compose-ci.yml logs rocketchat --since $NOW)" | grep -q "SERVER RUNNING"; do + echo "Waiting Rocket.Chat to start up" + ((c++)) && ((c==10)) && exit 1 + sleep 10 + done + + cd ./apps/meteor + yarn test:e2e + + - name: Store playwright test trace + uses: actions/upload-artifact@v2 + if: always() + with: + name: playwright-test-trace + path: ./apps/meteor/tests/e2e/.playwright* + + test-ee: runs-on: ubuntu-20.04 - if: github.event.pull_request.head.repo.full_name == github.repository + needs: [build, release-versions] strategy: matrix: - release: ["official", "preview"] + node-version: ['14.19.3'] + mongodb-version-ee: ['4.4'] steps: - - uses: actions/checkout@v2 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ secrets.CR_USER }} - password: ${{ secrets.CR_PAT }} - - - name: Free disk space - run: | - sudo swapoff -a - sudo rm -f /swapfile - sudo apt clean - docker rmi $(docker image ls -aq) - df -h - - # - name: Cache node modules - # id: cache-nodemodules - # uses: actions/cache@v2 - # with: - # path: | - # ./node_modules - # ./ee/server/services/node_modules - # key: ${{ runner.OS }}-node_modules-4-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }} - - - name: Cache meteor local - uses: actions/cache@v2 - with: - path: ./.meteor/local - key: ${{ runner.OS }}-meteor_cache-${{ hashFiles('.meteor/versions', '.github/workflows/build_and_test.yml') }} - - - name: Cache meteor - uses: actions/cache@v2 - with: - path: ~/.meteor - key: ${{ runner.OS }}-meteor-${{ hashFiles('.meteor/release', '.github/workflows/build_and_test.yml') }} - - - name: Use Node.js 14.18.2 - uses: actions/setup-node@v2 - with: - node-version: "14.18.2" - - - name: Install Meteor - run: | - # Restore bin from cache - set +e - METEOR_SYMLINK_TARGET=$(readlink ~/.meteor/meteor) - METEOR_TOOL_DIRECTORY=$(dirname "$METEOR_SYMLINK_TARGET") - set -e - LAUNCHER=$HOME/.meteor/$METEOR_TOOL_DIRECTORY/scripts/admin/launch-meteor - if [ -e $LAUNCHER ] - then - echo "Cached Meteor bin found, restoring it" - sudo cp "$LAUNCHER" "/usr/local/bin/meteor" - else - echo "No cached Meteor bin found." - fi - - # only install meteor if bin isn't found - command -v meteor >/dev/null 2>&1 || curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh - - - name: Versions - run: | - npm --versions - node -v - meteor --version - meteor npm --versions - meteor node -v - git version - - - name: npm install - # if: steps.cache-nodemodules.outputs.cache-hit != 'true' - run: | - meteor npm install - - # To reduce memory need during actual build, build the packages solely first - # - name: Build a Meteor cache - # run: | - # # to do this we can clear the main files and it build the rest - # echo "" > server/main.ts - # echo "" > client/main.ts - # sed -i.backup 's/rocketchat:livechat/#rocketchat:livechat/' .meteor/packages - # meteor build --server-only --debug --directory /tmp/build-temp - # git checkout -- server/main.ts client/main.ts .meteor/packages - - - name: Build Rocket.Chat - run: | - meteor build --server-only --directory /tmp/build-pr - - - name: Build Docker image for PRs - run: | - cd /tmp/build-pr - - LOWERCASE_REPOSITORY=$(echo "${{ github.repository_owner }}" | tr "[:upper:]" "[:lower:]") - IMAGE_NAME="rocket.chat" - if [[ '${{ matrix.release }}' = 'preview' ]]; then - IMAGE_NAME="${IMAGE_NAME}.preview" - fi; - - IMAGE_NAME="ghcr.io/${LOWERCASE_REPOSITORY}/${IMAGE_NAME}:pr-${{ github.event.number }}" - - echo "Build official Docker image ${IMAGE_NAME}" - - DOCKER_PATH="${GITHUB_WORKSPACE}/.docker" - if [[ '${{ matrix.release }}' = 'preview' ]]; then - DOCKER_PATH="${DOCKER_PATH}-mongo" - fi; - - echo "Build ${{ matrix.release }} Docker image" - cp ${DOCKER_PATH}/Dockerfile . - if [ -e ${DOCKER_PATH}/entrypoint.sh ]; then - cp ${DOCKER_PATH}/entrypoint.sh . - fi; - - docker build -t $IMAGE_NAME . - docker push $IMAGE_NAME + - name: Launch MongoDB + uses: supercharge/mongodb-github-action@1.7.0 + with: + mongodb-version: ${{ matrix.mongodb-version-ee }} + mongodb-replica-set: rs0 + + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + + - name: TurboRepo local server + uses: felixmosh/turborepo-gh-artifacts@v1 + with: + repo-token: ${{ secrets.RC_TURBO_GH_TOKEN }} + server-token: ${{ secrets.TURBO_SERVER_TOKEN }} + + - name: yarn install + run: yarn + + - name: Unit Test + run: yarn testunit --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" --team='rc' + + - name: Restore build + uses: actions/download-artifact@v2 + with: + name: build + path: /tmp/build + + - name: Unpack build + run: | + cd /tmp/build + tar xzf Rocket.Chat.tar.gz + rm Rocket.Chat.tar.gz + + - name: Start containers + env: + MONGO_URL: 'mongodb://host.docker.internal:27017/rocketchat?replicaSet=rs0&directConnection=true' + RC_DOCKERFILE: '${{ github.workspace }}/apps/meteor/.docker/Dockerfile' + RC_DOCKER_TAG: '${{ needs.release-versions.outputs.gh-docker-tag }}.official' + DOCKER_TAG: ${{ needs.release-versions.outputs.gh-docker-tag }} + TRANSPORTER: nats://nats:4222 + ENTERPRISE_LICENSE: ${{ secrets.ENTERPRISE_LICENSE }} + run: | + export LOWERCASE_REPOSITORY=$(echo "${{ github.repository_owner }}" | tr "[:upper:]" "[:lower:]") + + docker compose -f docker-compose-ci.yml up -d --build + + sleep 10 + + until echo "$(docker compose -f docker-compose-ci.yml logs ddp-streamer-service)" | grep -q "NetworkBroker started successfully"; do + echo "Waiting 'ddp-streamer' to start up" + ((c++)) && ((c==10)) && docker compose -f docker-compose-ci.yml logs ddp-streamer-service && exit 1 + sleep 10 + done + + until echo "$(docker compose -f docker-compose-ci.yml logs rocketchat)" | grep -q "SERVER RUNNING"; do + echo "Waiting Rocket.Chat to start up" + ((c++)) && ((c==10)) && docker compose -f docker-compose-ci.yml logs rocketchat && exit 1 + sleep 10 + done + + - name: Login to GitHub Container Registry + if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop' + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ secrets.CR_USER }} + password: ${{ secrets.CR_PAT }} + + - name: Publish Docker images to GitHub Container Registry + if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop' + env: + DOCKER_TAG: ${{ needs.release-versions.outputs.gh-docker-tag }} + run: | + export LOWERCASE_REPOSITORY=$(echo "${{ github.repository_owner }}" | tr "[:upper:]" "[:lower:]") + + docker compose -f docker-compose-ci.yml push \ + authorization-service \ + account-service \ + ddp-streamer-service \ + presence-service \ + stream-hub-service + + - name: E2E Test API + run: | + docker ps + docker compose -f docker-compose-ci.yml logs --tail=50 + + cd ./apps/meteor + for i in $(seq 1 5); do + IS_EE=true npm run testapi && s=0 && break || s=$?; + + docker compose -f ../../docker-compose-ci.yml logs --tail=100 + + docker compose -f ../../docker-compose-ci.yml stop + + docker exec mongodb mongo rocketchat --eval 'db.dropDatabase()' + + NOW=$(date "+%Y-%m-%dT%H:%M:%SZ") + + docker compose -f ../../docker-compose-ci.yml start + + until echo "$(docker compose -f ../../docker-compose-ci.yml logs rocketchat --since $NOW)" | grep -q "SERVER RUNNING"; do + echo "Waiting Rocket.Chat to start up" + ((c++)) && ((c==10)) && exit 1 + sleep 10 + done; + done; + exit $s + + - name: Cache Playwright binaries + uses: actions/cache@v3 + id: cache-playwright + with: + path: | + ~/.cache/ms-playwright + # This is the version of Playwright that we are using, if you are willing to upgrade, you should update this. + key: playwright-1.23.1 + + - name: Install Playwright + run: | + cd ./apps/meteor + npx playwright install --with-deps + + - name: E2E Test UI + run: | + docker ps + docker compose -f docker-compose-ci.yml logs rocketchat --tail=50 + + docker exec mongodb mongo rocketchat --eval 'db.dropDatabase()' + + NOW=$(date "+%Y-%m-%dT%H:%M:%SZ") + + docker compose -f docker-compose-ci.yml restart + + until echo "$(docker compose -f docker-compose-ci.yml logs rocketchat --since $NOW)" | grep -q "SERVER RUNNING"; do + echo "Waiting Rocket.Chat to start up" + ((c++)) && ((c==10)) && exit 1 + sleep 10 + done + + cd ./apps/meteor + + E2E_COVERAGE=true IS_EE=true yarn test:e2e + + - name: Store playwright test trace + uses: actions/upload-artifact@v2 + if: always() + with: + name: e2e-ee-testtrace + path: ./apps/meteor/tests/e2e/.playwright* + + - name: Extract e2e:ee:coverage + run: | + cd ./apps/meteor + yarn test:e2e:nyc + + - uses: codecov/codecov-action@v3 + with: + directory: ./apps/meteor + flags: e2e + verbose: true + + - name: Store e2e-ee-coverage + uses: actions/upload-artifact@v2 + with: + name: e2e-ee-coverage + path: ./apps/meteor/coverage* deploy: runs-on: ubuntu-20.04 if: github.event_name == 'release' || github.ref == 'refs/heads/develop' - needs: test + needs: [test, release-versions] steps: - - uses: actions/checkout@v2 - - - name: Restore build - uses: actions/download-artifact@v2 - with: - name: build - path: /tmp/build - - - name: Publish assets - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: 'us-east-1' - GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} - REDHAT_REGISTRY_PID: ${{ secrets.REDHAT_REGISTRY_PID }} - REDHAT_REGISTRY_KEY: ${{ secrets.REDHAT_REGISTRY_KEY }} - UPDATE_TOKEN: ${{ secrets.UPDATE_TOKEN }} - run: | - if [[ '${{ github.event_name }}' = 'release' ]]; then - GIT_TAG="${GITHUB_REF#*tags/}" - GIT_BRANCH="" - ARTIFACT_NAME="$(npm run version --silent)" - RC_VERSION=$GIT_TAG - - if [[ $GIT_TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+ ]]; then - SNAP_CHANNEL=candidate - RC_RELEASE=candidate - elif [[ $GIT_TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - SNAP_CHANNEL=stable - RC_RELEASE=stable + - uses: actions/checkout@v3 + + - name: Restore build + uses: actions/download-artifact@v2 + with: + name: build + path: /tmp/build + + - name: Publish assets + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: 'us-east-1' + GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} + REDHAT_REGISTRY_PID: ${{ secrets.REDHAT_REGISTRY_PID }} + REDHAT_REGISTRY_KEY: ${{ secrets.REDHAT_REGISTRY_KEY }} + UPDATE_TOKEN: ${{ secrets.UPDATE_TOKEN }} + run: | + REPO_VERSION=$(node -p "require('./package.json').version") + if [[ '${{ github.event_name }}' = 'release' ]]; then + GIT_TAG="${GITHUB_REF#*tags/}" + GIT_BRANCH="" + ARTIFACT_NAME="${REPO_VERSION}" + RC_VERSION=$GIT_TAG + + if [[ '${{ needs.release-versions.outputs.release }}' = 'release-candidate' ]]; then + SNAP_CHANNEL=candidate + RC_RELEASE=candidate + elif [[ '${{ needs.release-versions.outputs.release }}' = 'latest' ]]; then + SNAP_CHANNEL=stable + RC_RELEASE=stable + fi + else + GIT_TAG="" + GIT_BRANCH="${GITHUB_REF#*heads/}" + ARTIFACT_NAME="${REPO_VERSION}.$GITHUB_SHA" + RC_VERSION="${REPO_VERSION}" + SNAP_CHANNEL=edge + RC_RELEASE=develop + fi; + ROCKET_DEPLOY_DIR="/tmp/deploy" + FILENAME="$ROCKET_DEPLOY_DIR/rocket.chat-$ARTIFACT_NAME.tgz"; + + aws s3 cp s3://rocketchat/sign.key.gpg .github/sign.key.gpg + + mkdir -p $ROCKET_DEPLOY_DIR + + cp .github/sign.key.gpg /tmp + gpg --yes --batch --passphrase=$GPG_PASSWORD /tmp/sign.key.gpg + gpg --allow-secret-key-import --import /tmp/sign.key + rm /tmp/sign.key + + ln -s /tmp/build/Rocket.Chat.tar.gz "$FILENAME" + gpg --armor --detach-sign "$FILENAME" + + aws s3 cp $ROCKET_DEPLOY_DIR/ s3://download.rocket.chat/build/ --recursive + + curl -H "Content-Type: application/json" -H "X-Update-Token: $UPDATE_TOKEN" -d \ + "{\"nodeVersion\": \"14.19.3\", \"compatibleMongoVersions\": [\"4.2\", \"4.4\", \"5.0\"], \"commit\": \"$GITHUB_SHA\", \"tag\": \"$RC_VERSION\", \"branch\": \"$GIT_BRANCH\", \"artifactName\": \"$ARTIFACT_NAME\", \"releaseType\": \"$RC_RELEASE\"}" \ + https://releases.rocket.chat/update + + # Makes build fail if the release isn't there + curl --fail https://releases.rocket.chat/$RC_VERSION/info + + if [[ $GIT_TAG ]]; then + curl -X POST \ + https://connect.redhat.com/api/v2/projects/$REDHAT_REGISTRY_PID/build \ + -H "Authorization: Bearer $REDHAT_REGISTRY_KEY" \ + -H 'Cache-Control: no-cache' \ + -H 'Content-Type: application/json' \ + -d '{"tag":"'$GIT_TAG'"}' fi - else - GIT_TAG="" - GIT_BRANCH="${GITHUB_REF#*heads/}" - ARTIFACT_NAME="$(npm run version --silent).$GITHUB_SHA" - RC_VERSION="$(npm run version --silent)" - SNAP_CHANNEL=edge - RC_RELEASE=develop - fi; - ROCKET_DEPLOY_DIR="/tmp/deploy" - FILENAME="$ROCKET_DEPLOY_DIR/rocket.chat-$ARTIFACT_NAME.tgz"; - - aws s3 cp s3://rocketchat/sign.key.gpg .github/sign.key.gpg - - mkdir -p $ROCKET_DEPLOY_DIR - - cp .github/sign.key.gpg /tmp - gpg --yes --batch --passphrase=$GPG_PASSWORD /tmp/sign.key.gpg - gpg --allow-secret-key-import --import /tmp/sign.key - rm /tmp/sign.key - - ln -s /tmp/build/Rocket.Chat.tar.gz "$FILENAME" - gpg --armor --detach-sign "$FILENAME" - - aws s3 cp $ROCKET_DEPLOY_DIR/ s3://download.rocket.chat/build/ --recursive - - curl -H "Content-Type: application/json" -H "X-Update-Token: $UPDATE_TOKEN" -d \ - "{\"nodeVersion\": \"14.18.2\", \"compatibleMongoVersions\": [\"3.6\", \"4.0\", \"4.2\", \"4.4\", \"5.0\"], \"commit\": \"$GITHUB_SHA\", \"tag\": \"$RC_VERSION\", \"branch\": \"$GIT_BRANCH\", \"artifactName\": \"$ARTIFACT_NAME\", \"releaseType\": \"$RC_RELEASE\"}" \ - https://releases.rocket.chat/update - - # Makes build fail if the release isn't there - curl --fail https://releases.rocket.chat/$RC_VERSION/info - - if [[ $GIT_TAG ]]; then - curl -X POST \ - https://connect.redhat.com/api/v2/projects/$REDHAT_REGISTRY_PID/build \ - -H "Authorization: Bearer $REDHAT_REGISTRY_KEY" \ - -H 'Cache-Control: no-cache' \ - -H 'Content-Type: application/json' \ - -d '{"tag":"'$GIT_TAG'"}' - fi - - image-build: + + docker-image-publish: runs-on: ubuntu-20.04 - needs: deploy + needs: [deploy, build-docker-preview, release-versions] strategy: matrix: - # this is current a mix of variants and different images - release: ["official", "preview", "alpine"] + # this is currently a mix of variants and different images + release: ['official', 'preview', 'alpine'] env: - IMAGE_NAME: "rocketchat/rocket.chat" + IMAGE_NAME: 'rocketchat/rocket.chat' steps: - - uses: actions/checkout@v2 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} - - - name: Restore build - uses: actions/download-artifact@v2 - with: - name: build - path: /tmp/build - - - name: Unpack build and prepare Docker files - run: | - cd /tmp/build - tar xzf Rocket.Chat.tar.gz - rm Rocket.Chat.tar.gz - - DOCKER_PATH="${GITHUB_WORKSPACE}/.docker" - if [[ '${{ matrix.release }}' = 'preview' ]]; then - DOCKER_PATH="${DOCKER_PATH}-mongo" - fi; - - DOCKERFILE_PATH="${DOCKER_PATH}/Dockerfile" - if [[ '${{ matrix.release }}' = 'alpine' ]]; then - DOCKERFILE_PATH="${DOCKERFILE_PATH}.${{ matrix.release }}" - fi; - - echo "Copy Dockerfile for release: ${{ matrix.release }}" - cp $DOCKERFILE_PATH ./Dockerfile - if [ -e ${DOCKER_PATH}/entrypoint.sh ]; then - cp ${DOCKER_PATH}/entrypoint.sh . - fi; - - - name: Build Docker image for tag - if: github.event_name == 'release' - run: | - cd /tmp/build - - DOCKER_TAG=$GITHUB_REF_NAME - - if [[ '${{ matrix.release }}' = 'preview' ]]; then - IMAGE_NAME="${IMAGE_NAME}.preview" - fi; - - # append the variant name to docker tag - if [[ '${{ matrix.release }}' = 'alpine' ]]; then - DOCKER_TAG="${DOCKER_TAG}-${{ matrix.release }}" - fi; - - if echo "$GITHUB_REF_NAME" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$' ; then - RELEASE="latest" - elif echo "$GITHUB_REF_NAME" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$' ; then - RELEASE="release-candidate" - fi - - if [[ '${{ matrix.release }}' = 'alpine' ]]; then - RELEASE="${RELEASE}-${{ matrix.release }}" - fi; - - echo "IMAGE_NAME: $IMAGE_NAME" - echo "DOCKER_TAG: $DOCKER_TAG" - echo "RELEASE: $RELEASE" - - # build and push the specific tag version - docker build -t $IMAGE_NAME:$DOCKER_TAG . - docker push $IMAGE_NAME:$DOCKER_TAG - - # build and push the broader alias tag - docker tag $IMAGE_NAME:$DOCKER_TAG $IMAGE_NAME:$RELEASE - docker push $IMAGE_NAME:$RELEASE - - - name: Build Docker image for develop - if: github.ref == 'refs/heads/develop' - run: | - cd /tmp/build - - DOCKER_TAG=develop - - if [[ '${{ matrix.release }}' = 'preview' ]]; then - IMAGE_NAME="${IMAGE_NAME}.preview" - fi; - - if [[ '${{ matrix.release }}' = 'alpine' ]]; then - DOCKER_TAG="${DOCKER_TAG}-${{ matrix.release }}" - fi; - - docker build -t $IMAGE_NAME:$DOCKER_TAG . - docker push $IMAGE_NAME:$DOCKER_TAG - - services-image-build: + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PASS }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ secrets.CR_USER }} + password: ${{ secrets.CR_PAT }} + + - name: Get Docker image name + id: gh-docker + run: | + LOWERCASE_REPOSITORY=$(echo "${{ github.repository_owner }}" | tr "[:upper:]" "[:lower:]") + + GH_IMAGE_NAME="ghcr.io/${LOWERCASE_REPOSITORY}/rocket.chat:${{ needs.release-versions.outputs.gh-docker-tag }}.${{ matrix.release }}" + + echo "GH_IMAGE_NAME: $GH_IMAGE_NAME" + + echo "::set-output name=gh-image-name::${GH_IMAGE_NAME}" + + - name: Pull Docker image + run: docker pull ${{ steps.gh-docker.outputs.gh-image-name }} + + - name: Publish Docker image + run: | + if [[ '${{ matrix.release }}' = 'preview' ]]; then + IMAGE_NAME="${IMAGE_NAME}.preview" + fi; + + # 'develop' or 'tag' + DOCKER_TAG=$GITHUB_REF_NAME + + # append the variant name to docker tag + if [[ '${{ matrix.release }}' = 'alpine' ]]; then + DOCKER_TAG="${DOCKER_TAG}-${{ matrix.release }}" + fi; + + echo "IMAGE_NAME: $IMAGE_NAME" + echo "DOCKER_TAG: $DOCKER_TAG" + + # tag and push the specific tag version + docker tag ${{ steps.gh-docker.outputs.gh-image-name }} $IMAGE_NAME:$DOCKER_TAG + docker push $IMAGE_NAME:$DOCKER_TAG + + if [[ $GITHUB_REF == refs/tags/* ]]; then + RELEASE="${{ needs.release-versions.outputs.release }}" + + if [[ '${{ matrix.release }}' = 'alpine' ]]; then + RELEASE="${RELEASE}-${{ matrix.release }}" + fi; + + echo "RELEASE: $RELEASE" + + if [[ $RELEASE == 'latest' ]]; then + if [[ '${{ needs.release-versions.outputs.latest-release }}' == $GITHUB_REF_NAME ]]; then + docker tag ${{ steps.gh-docker.outputs.gh-image-name }} $IMAGE_NAME:$RELEASE + docker push $IMAGE_NAME:$RELEASE + fi + else + docker tag ${{ steps.gh-docker.outputs.gh-image-name }} $IMAGE_NAME:$RELEASE + docker push $IMAGE_NAME:$RELEASE + fi + fi + + services-docker-image-publish: runs-on: ubuntu-20.04 - needs: deploy + needs: [deploy, release-versions] strategy: matrix: - service: ["account", "authorization", "ddp-streamer", "presence", "stream-hub"] + service: ['account', 'authorization', 'ddp-streamer', 'presence', 'stream-hub'] steps: - - uses: actions/checkout@v2 - - - name: Use Node.js 14.18.2 - uses: actions/setup-node@v2 - with: - node-version: "14.18.2" - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} - - - name: Build Docker images - run: | - # defines image tag - if [[ $GITHUB_REF == refs/tags/* ]]; then - IMAGE_TAG="${GITHUB_REF#refs/tags/}" - else - IMAGE_TAG="${GITHUB_REF#refs/heads/}" - fi - - # first install repo dependencies - npm i - - # then micro services dependencies - cd ./ee/server/services - npm i - npm run build - - echo "Building Docker image for service: ${{ matrix.service }}:${IMAGE_TAG}" - - docker build --build-arg SERVICE=${{ matrix.service }} -t rocketchat/${{ matrix.service }}-service:${IMAGE_TAG} . - - docker push rocketchat/${{ matrix.service }}-service:${IMAGE_TAG} - - if [[ $GITHUB_REF == refs/tags/* ]]; then - if echo "$IMAGE_TAG" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$' ; then - RELEASE="latest" - elif echo "$IMAGE_TAG" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$' ; then - RELEASE="release-candidate" + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PASS }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ secrets.CR_USER }} + password: ${{ secrets.CR_PAT }} + + - name: Get Docker image name + id: gh-docker + run: | + LOWERCASE_REPOSITORY=$(echo "${{ github.repository_owner }}" | tr "[:upper:]" "[:lower:]") + + GH_IMAGE_NAME="ghcr.io/${LOWERCASE_REPOSITORY}/${{ matrix.service }}-service:${{ needs.release-versions.outputs.gh-docker-tag }}" + + echo "GH_IMAGE_NAME: $GH_IMAGE_NAME" + + echo "::set-output name=gh-image-name::${GH_IMAGE_NAME}" + + - name: Pull Docker image + run: docker pull ${{ steps.gh-docker.outputs.gh-image-name }} + + - name: Publish Docker images + run: | + DH_IMAGE_NAME="rocketchat/${{ matrix.service }}-service" + + # 'develop' or 'tag' + DOCKER_TAG=$GITHUB_REF_NAME + + echo "DH_IMAGE_NAME: $DH_IMAGE_NAME" + echo "DOCKER_TAG: $DOCKER_TAG" + + # tag and push the specific tag version + docker tag ${{ steps.gh-docker.outputs.gh-image-name }} $DH_IMAGE_NAME:$DOCKER_TAG + docker push $DH_IMAGE_NAME:$DOCKER_TAG + + if [[ $GITHUB_REF == refs/tags/* ]]; then + RELEASE="${{ needs.release-versions.outputs.release }}" + echo "RELEASE: $RELEASE" + + if [[ $RELEASE == 'latest' ]]; then + if [[ '${{ needs.release-versions.outputs.latest-release }}' == $GITHUB_REF_NAME ]]; then + docker tag ${{ steps.gh-docker.outputs.gh-image-name }} $DH_IMAGE_NAME:$RELEASE + docker push $DH_IMAGE_NAME:$RELEASE + fi + else + docker tag ${{ steps.gh-docker.outputs.gh-image-name }} $DH_IMAGE_NAME:$RELEASE + docker push $DH_IMAGE_NAME:$RELEASE + fi fi - - docker tag rocketchat/${{ matrix.service }}-service:${IMAGE_TAG} rocketchat/${{ matrix.service }}-service:${RELEASE} - docker push rocketchat/${{ matrix.service }}-service:${RELEASE} - fi diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index da9570060ed4..3b8c2696cd1c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,4 +1,4 @@ -name: "Code scanning - action" +name: 'Code scanning - action' on: push: @@ -8,45 +8,44 @@ on: jobs: CodeQL-Build: - # CodeQL runs on ubuntu-latest and windows-latest runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - # Override language selection by uncommenting this and choosing your languages - with: - languages: javascript - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + - name: Checkout repository + uses: actions/checkout@v3 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can checkout the head. + fetch-depth: 2 + + # If this run was triggered by a pull request event, then checkout + # the head of the pull request instead of the merge commit. + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + # Override language selection by uncommenting this and choosing your languages + with: + languages: javascript + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/no-new-js-files.yml b/.github/workflows/no-new-js-files.yml index 6a7473643de3..77045946b52c 100644 --- a/.github/workflows/no-new-js-files.yml +++ b/.github/workflows/no-new-js-files.yml @@ -1,4 +1,4 @@ -name: "JS file preventer" +name: 'JS file preventer' on: pull_request: types: [opened, synchronize] diff --git a/.github/workflows/pr-title-checker.yml b/.github/workflows/pr-title-checker.yml index c31a3aef54d2..7c3ec70779c2 100644 --- a/.github/workflows/pr-title-checker.yml +++ b/.github/workflows/pr-title-checker.yml @@ -1,4 +1,4 @@ -name: "PR Title Checker" +name: 'PR Title Checker' on: pull_request: types: [opened, edited] @@ -9,4 +9,4 @@ jobs: steps: - uses: thehanimo/pr-title-checker@v1.3.4 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.RC_TITLE_CHECKER }} diff --git a/.gitignore b/.gitignore index 8d5cc726ac80..310be7ef939d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,84 +1,45 @@ -**/bin/** -**/build/* -**/node_modules/* -**/tmp/* -**/.meteor/.id -**/.meteor/dev_bundle -**/.meteor/local* -**/.meteor/meteorite -/private/certs/* -*.bak -*.iml -*.ipr -*.iws -*.launch -*.log -*.pydevproject -*.sublime-project -*.sublime-workspace -*.swp -*.tmp -*.tokens -*.un~ -*~ -*~.nib -.*.sw[a-z] -.\#* -._* -.buildpath -.classpath -.clover -.cproject -.DS_Store -.elasticbeanstalk -.elc -.emacs.desktop -.emacs.desktop.lock -.env -.externalToolBuilders -.idea -.vscode -.loadpath -.map -.metadata -packages/rocketchat-livechat/assets/rocketchat-livechat.min.js -.mule -.pmd -.project -.sass-cache -.settings -.Spotlight-V100 -tatus -.Trashes -.wtpmodules -\#*\# -Desktop.ini -ehthumbs.db -example.css -jrat.output -jrat.xml -local.properties -meteor-vulcanize -nb-configuration.xml -nbactions.xml -nbproject -profiles.xml -Session.vim -smart.lock -temp_* -Thumbs.db -thumbs.db -tramp -ecosystem.json -pm2.json -settings.json -build.sh -/public/livechat -packages/rocketchat-i18n/i18n/livechat.* -tests/end-to-end/temporary_staged_test -.screenshots -/private/livechat -/storybook-static -/tests/cypress/screenshots +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +node_modules +.pnp +.pnp.js + +# testing coverage -.nyc_output + +# next.js +.next/ +out/ +build +dist +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# local env files +.env.local +.env.development.local +.env.test.local +.env.production.local + +# turbo +.turbo + +# yarn +.pnp.* +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions + +.nvmrc +.idea/ diff --git a/.houston/metadata.js b/.houston/metadata.js index 44ff8721f408..411cff5106c5 100644 --- a/.houston/metadata.js +++ b/.houston/metadata.js @@ -7,7 +7,7 @@ const getMongoVersion = async function({ version, git }) { return []; } - return mongoMatch[1].replace(/"/g, '').replace(/ /g, '').split(','); + return mongoMatch[1].replace(/["' ]/g, '').split(','); } catch (e) { console.error(e); } @@ -16,7 +16,7 @@ const getMongoVersion = async function({ version, git }) { const getNodeNpmVersions = async function({ version, git, request }) { try { - const meteorRelease = await git.show([`${ version }:.meteor/release`]); + const meteorRelease = await git.show([`${ version }:apps/meteor/.meteor/release`]); if (!/^METEOR@(\d+\.){1,2}\d/.test(meteorRelease)) { return {}; } @@ -38,7 +38,7 @@ const getNodeNpmVersions = async function({ version, git, request }) { const getAppsEngineVersion = async function({ version, git }) { try { - const packageJson = await git.show([`${ version }:package-lock.json`]); + const packageJson = await git.show([`${ version }:apps/meteor/package-lock.json`]); const { dependencies } = JSON.parse(packageJson); const { version: appsEngineVersion } = dependencies['@rocket.chat/apps-engine']; diff --git a/.husky/pre-push b/.husky/pre-push index 3c9fedc8460a..040c79f08833 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,3 +1,2 @@ -meteor npm run lint && \ -meteor npm run testunit && \ -meteor npm run testunit-client +yarn lint && \ +yarn testunit diff --git a/.kodiak.toml b/.kodiak.toml new file mode 100644 index 000000000000..b2f9e45da47e --- /dev/null +++ b/.kodiak.toml @@ -0,0 +1,19 @@ +# .kodiak.toml +version = 1 + +[merge] +method = "squash" +automerge_label = ["stat: ready to merge", "automerge"] +block_on_neutral_required_check_runs = true +blocking_labels = ["stat: needs QA", "Invalid PR Title"] +prioritize_ready_to_merge = true + +[merge.message] +title = "pull_request_title" +body = "empty" +include_coauthors=true + +[merge.automerge_dependencies] +versions = ["minor", "patch"] +usernames = ["dependabot"] + diff --git a/.meteor/release b/.meteor/release deleted file mode 100644 index c2ff29ae85a8..000000000000 --- a/.meteor/release +++ /dev/null @@ -1 +0,0 @@ -METEOR@2.5.3 diff --git a/.meteor/versions b/.meteor/versions deleted file mode 100644 index f0bba23468b2..000000000000 --- a/.meteor/versions +++ /dev/null @@ -1,144 +0,0 @@ -accounts-base@2.2.0 -accounts-facebook@1.3.3 -accounts-github@1.5.0 -accounts-google@1.4.0 -accounts-meteor-developer@1.5.0 -accounts-oauth@1.4.0 -accounts-password@2.2.0 -accounts-twitter@1.5.0 -aldeed:simple-schema@1.5.4 -allow-deny@1.1.0 -autoupdate@1.8.0 -babel-compiler@7.8.0 -babel-runtime@1.5.0 -base64@1.0.12 -binary-heap@1.0.11 -blaze@2.5.0 -blaze-html-templates@1.2.1 -blaze-tools@1.1.2 -boilerplate-generator@1.7.1 -caching-compiler@1.2.2 -caching-html-compiler@1.2.1 -callback-hook@1.4.0 -check@1.3.1 -coffeescript@2.4.1 -coffeescript-compiler@2.4.1 -dandv:caret-position@2.1.1 -ddp@1.4.0 -ddp-client@2.5.0 -ddp-common@1.4.0 -ddp-rate-limiter@1.1.0 -ddp-server@2.5.0 -deps@1.0.12 -diff-sequence@1.1.1 -dispatch:run-as-user@1.1.1 -dynamic-import@0.7.2 -ecmascript@0.16.1 -ecmascript-runtime@0.8.0 -ecmascript-runtime-client@0.12.1 -ecmascript-runtime-server@0.11.0 -edgee:slingshot@0.7.1 -ejson@1.1.1 -email@2.2.0 -es5-shim@4.8.0 -facebook-oauth@1.10.0 -facts-base@1.0.1 -fetch@0.1.1 -geojson-utils@1.0.10 -github-oauth@1.3.2 -google-oauth@1.4.1 -hot-code-push@1.0.4 -html-tools@1.1.2 -htmljs@1.1.1 -http@2.0.0 -id-map@1.1.1 -inter-process-messaging@0.1.1 -jalik:ufs@1.0.2 -jalik:ufs-gridfs@1.0.2 -jalik:ufs-local@1.0.2 -jparker:crypto-core@0.1.0 -jparker:crypto-md5@0.1.1 -jparker:gravatar@0.5.1 -jquery@3.0.0 -kadira:flow-router@2.12.1 -konecty:multiple-instances-status@1.1.0 -konecty:user-presence@2.6.3 -launch-screen@1.3.0 -less@3.0.2 -littledata:synced-cron@1.5.1 -localstorage@1.2.0 -logging@1.3.1 -matb33:collection-hooks@1.1.0 -mdg:validation-error@0.5.1 -meteor@1.10.0 -meteor-base@1.5.1 -meteor-developer-oauth@1.3.1 -meteorhacks:inject-initial@1.0.5 -minifier-css@1.6.0 -minifier-js@2.7.3 -minimongo@1.7.0 -mizzao:timesync@0.3.4 -mobile-experience@1.1.0 -mobile-status-bar@1.1.0 -modern-browsers@0.1.7 -modules@0.18.0 -modules-runtime@0.12.0 -mongo@1.13.0 -mongo-decimal@0.1.2 -mongo-dev-server@1.1.0 -mongo-id@1.0.8 -mrt:reactive-store@0.0.1 -mystor:device-detection@0.2.0 -nooitaf:colors@1.2.0 -npm-mongo@3.9.1 -oauth@2.1.1 -oauth1@1.5.0 -oauth2@1.3.1 -observe-sequence@1.0.19 -ordered-dict@1.1.0 -ostrio:cookies@2.7.0 -pauli:accounts-linkedin@6.0.0 -pauli:linkedin-oauth@6.0.0 -promise@0.12.0 -raix:eventemitter@1.0.0 -raix:handlebar-helpers@0.2.5 -raix:ui-dropped-event@0.0.7 -random@1.2.0 -rate-limit@1.0.9 -react-fast-refresh@0.2.2 -reactive-dict@1.3.0 -reactive-var@1.0.11 -reload@1.3.1 -retry@1.1.0 -rocketchat:ddp@0.0.1 -rocketchat:i18n@0.0.1 -rocketchat:livechat@0.0.1 -rocketchat:mongo-config@0.0.1 -rocketchat:oauth2-server@3.0.0 -rocketchat:postcss@1.0.0 -rocketchat:restivus@1.0.0 -rocketchat:streamer@1.1.0 -rocketchat:tap-i18n@3.0.0 -rocketchat:version@1.0.0 -routepolicy@1.1.1 -service-configuration@1.3.0 -session@1.2.0 -sha@1.0.9 -shell-server@0.5.0 -simple:json-routes@2.3.1 -socket-stream-client@0.4.0 -spacebars@1.2.0 -spacebars-compiler@1.3.0 -standard-minifier-js@2.8.0 -templating@1.4.1 -templating-compiler@1.4.1 -templating-runtime@1.5.0 -templating-tools@1.2.1 -tracker@1.2.0 -twitter-oauth@1.3.0 -typescript@4.4.1 -ui@1.0.13 -underscore@1.0.10 -url@1.3.2 -webapp@1.13.0 -webapp-hashing@1.1.0 diff --git a/.meteorignore b/.meteorignore deleted file mode 100644 index 6453c2f01e3d..000000000000 --- a/.meteorignore +++ /dev/null @@ -1,2 +0,0 @@ -ee/server/services -coverage diff --git a/.mocharc.api.js b/.mocharc.api.js deleted file mode 100644 index 982d47181fe9..000000000000 --- a/.mocharc.api.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -/** - * Mocha configuration for REST API integration tests. - */ - -module.exports = { - ...require('./.mocharc.base.json'), // see https://github.com/mochajs/mocha/issues/3916 - timeout: 10000, - bail: true, - file: 'tests/end-to-end/teardown.js', - spec: ['tests/end-to-end/api/*.js', 'tests/end-to-end/api/*.ts', 'tests/end-to-end/apps/*.js'], -}; diff --git a/.mocharc.client.js b/.mocharc.client.js deleted file mode 100644 index c00875915089..000000000000 --- a/.mocharc.client.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -/** - * Mocha configuration for client-side unit and integration tests. - */ - -const base = require('./.mocharc.base.json'); - -/** - * Mocha will run `ts-node` without doing type checking to speed-up the tests. It should be fine as `npm run typecheck` - * covers test files too. - */ - -Object.assign( - process.env, - { - TS_NODE_FILES: true, - TS_NODE_TRANSPILE_ONLY: true, - }, - process.env, -); - -module.exports = { - ...base, // see https://github.com/mochajs/mocha/issues/3916 - require: [...base.require, './tests/setup/registerWebApiMocks.ts', './tests/setup/cleanupTestingLibrary.ts'], - exit: false, - slow: 200, - spec: ['client/**/*.spec.ts', 'client/**/*.spec.tsx'], -}; diff --git a/.mocharc.js b/.mocharc.js deleted file mode 100644 index 5f18ee8009b0..000000000000 --- a/.mocharc.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -/** - * Mocha configuration for general unit tests. - */ - -const base = require('./.mocharc.base.json'); - -/** - * Mocha will run `ts-node` without doing type checking to speed-up the tests. It should be fine as `npm run typecheck` - * covers test files too. - */ - -Object.assign( - process.env, - { - TS_NODE_FILES: true, - TS_NODE_TRANSPILE_ONLY: true, - }, - process.env, -); - -module.exports = { - ...base, // see https://github.com/mochajs/mocha/issues/3916 - exit: true, - spec: ['app/**/*.spec.ts', 'app/**/*.tests.js', 'app/**/*.tests.ts', 'server/**/*.tests.ts'], -}; diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000000..c42da845b449 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +engine-strict = true diff --git a/.scripts/start.js b/.scripts/start.js deleted file mode 100644 index 3203ba1ec5ec..000000000000 --- a/.scripts/start.js +++ /dev/null @@ -1,146 +0,0 @@ -#!/usr/bin/env node - -const path = require('path'); -const fs = require('fs'); -const extend = require('util')._extend; -const { spawn } = require('child_process'); -const net = require('net'); - -const processes = []; -let exitCode; - -const baseDir = path.resolve(__dirname, '..'); -const srcDir = path.resolve(baseDir); - -const isPortTaken = (port) => - new Promise((resolve, reject) => { - const tester = net - .createServer() - .once('error', (err) => (err.code === 'EADDRINUSE' ? resolve(true) : reject(err))) - .once('listening', () => tester.once('close', () => resolve(false)).close()) - .listen(port); - }); - -const waitPortRelease = (port, count = 0) => - new Promise((resolve, reject) => { - isPortTaken(port).then((taken) => { - if (!taken) { - return resolve(); - } - if (count > 60) { - return reject(); - } - console.log('Port', port, 'not release, waiting 1s...'); - setTimeout(() => { - waitPortRelease(port, ++count) - .then(resolve) - .catch(reject); - }, 1000); - }); - }); - -const appOptions = { - env: { - PORT: 3000, - ROOT_URL: 'http://localhost:3000', - // MONGO_URL: 'mongodb://localhost:27017/test', - // MONGO_OPLOG_URL: 'mongodb://localhost:27017/local', - }, -}; - -function startProcess(opts, callback) { - const proc = spawn(opts.command, opts.params, opts.options); - - if (opts.waitForMessage) { - proc.stdout.on('data', function waitForMessage(data) { - if (data.toString().match(opts.waitForMessage)) { - if (callback) { - callback(); - } - } - }); - } - - if (!opts.silent) { - proc.stdout.pipe(process.stdout); - proc.stderr.pipe(process.stderr); - } - - if (opts.logFile) { - const logStream = fs.createWriteStream(opts.logFile, { flags: 'a' }); - proc.stdout.pipe(logStream); - proc.stderr.pipe(logStream); - } - - proc.on('exit', function (code, signal) { - if (code != null) { - exitCode = code; - console.log(opts.name, `exited with code ${code}`); - } else { - console.log(opts.name, `exited with signal ${signal}`); - } - - processes.splice(processes.indexOf(proc), 1); - - processes.forEach((p) => { - console.log('Killing process', p.pid); - p.kill(); - }); - - if (processes.length === 0) { - waitPortRelease(appOptions.env.PORT) - .then(() => { - console.log(`Port ${appOptions.env.PORT} was released, exiting with code ${exitCode}`); - process.exit(exitCode); - }) - .catch((error) => { - console.error(`Error waiting port ${appOptions.env.PORT} to be released, exiting with code ${exitCode}`); - console.error(error); - process.exit(exitCode); - }); - } - }); - processes.push(proc); -} - -function startApp(callback) { - startProcess( - { - name: 'Meteor App', - command: 'node', - params: ['/tmp/build-test/bundle/main.js'], - // command: 'node', - // params: ['.meteor/local/build/main.js'], - waitForMessage: appOptions.waitForMessage, - options: { - cwd: srcDir, - env: extend(appOptions.env, process.env), - }, - }, - callback, - ); -} - -function startChimp() { - startProcess({ - name: 'Chimp', - command: 'npm', - params: ['test'], - // command: 'exit', - // params: ['2'], - options: { - env: Object.assign({}, process.env, { - NODE_PATH: `${process.env.NODE_PATH + path.delimiter + srcDir + path.delimiter + srcDir}/node_modules`, - }), - }, - }); -} - -function chimpNoMirror() { - appOptions.waitForMessage = 'SERVER RUNNING'; - startApp(function () { - startChimp(); - }); -} - -chimpNoMirror(); diff --git a/.snapcraft/launchpadkey.enc b/.snapcraft/launchpadkey.enc deleted file mode 100644 index af91e0e62be9..000000000000 Binary files a/.snapcraft/launchpadkey.enc and /dev/null differ diff --git a/.snapcraft/resources/Caddyfile b/.snapcraft/resources/Caddyfile deleted file mode 100644 index 23299c1d2b7e..000000000000 --- a/.snapcraft/resources/Caddyfile +++ /dev/null @@ -1,5 +0,0 @@ -_caddy-url_ -proxy / localhost:_port_ { - websocket - transparent -} diff --git a/.snapcraft/resources/backupdb b/.snapcraft/resources/backupdb deleted file mode 100755 index b457d325e543..000000000000 --- a/.snapcraft/resources/backupdb +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -if [[ ${EUID} != 0 ]]; then - echo "[-] This task must be run with 'sudo'." - exit 1 -fi - -if $(ps x | grep "node ${SNAP}/main.js" | grep -qv "grep"); then - echo "[-] Please shutdown Rocket.Chat first to get a clean backup" - echo "[-] Use 'sudo systemctl stop snap.rocketchat-server.rocketchat-server'" -fi - -TIMESTAMP=$(date +"%Y%m%d.%H%M") -BACKUP_DIR="${SNAP_COMMON}/backup" - -if [[ ! -d ${BACKUP_DIR} ]]; then - mkdir ${BACKUP_DIR} -fi - -if [[ -d ${BACKUP_DIR}/dump ]]; then - rm -rf ${BACKUP_DIR}/dump -fi - -if [[ -f ${BACKUP_DIR}/rocketchat_backup_${TIMESTAMP}.tar.gz ]]; then - rm -f ${BACKUP_DIR}/rocketchat_backup_${TIMESTAMP}.tar.gz -fi - -if [[ -f ${BACKUP_DIR}/backup_${TIMESTAMP}.log ]]; then - rm -f ${BACKUP_DIR}/backup_${TIMESTAMP}.log -fi - -echo "[*] Creating backup file..." -mkdir ${BACKUP_DIR}/dump -echo "[*] Dumping database with \"mongodump -d parties -o ${BACKUP_DIR}/dump\"" > "${BACKUP_DIR}/backup_${TIMESTAMP}.log" -mongodump -d parties -o ${BACKUP_DIR}/dump &>> "${BACKUP_DIR}/backup_${TIMESTAMP}.log" -echo "[*] Packing archive with \"tar czvf ${BACKUP_DIR}/rocketchat_backup_${TIMESTAMP}.tar.gz ${BACKUP_DIR}/dump\"" >> "${BACKUP_DIR}/backup_${TIMESTAMP}.log" -tar czvf ${BACKUP_DIR}/rocketchat_backup_${TIMESTAMP}.tar.gz -C ${BACKUP_DIR} dump &>> "${BACKUP_DIR}/backup_${TIMESTAMP}.log" -rm -rf ${BACKUP_DIR}/dump - -echo "[+] A backup of your data can be found at ${BACKUP_DIR}/rocketchat_backup_${TIMESTAMP}.tar.gz" diff --git a/.snapcraft/resources/initcaddy b/.snapcraft/resources/initcaddy deleted file mode 100755 index b55d20de02b3..000000000000 --- a/.snapcraft/resources/initcaddy +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -# Config options for Caddyfile -#options="site path port" -options="caddy-url port" - -refresh_opt_in_config() { -# replace an option inside the config file. - opt=$1 - value="$2" - if $(grep -q "_${opt}_" $Caddyfile); then - sed "s,_${opt}_,$value," $Caddyfile 2>/dev/null > ${Caddyfile}.new - mv -f ${Caddyfile}.new $Caddyfile 2>/dev/null - else - echo "Fail to update $opt in Caddyfile" - fi -} - -create_caddyfile(){ -# Copy template to config Caddyfile -cp $SNAP/bin/Caddyfile $SNAP_DATA/Caddyfile -} - -update_caddyfile(){ -# Config file path for Caddyfile -Caddyfile=$SNAP_DATA/Caddyfile - -# Iterate through the config options array -for opt in $options - do - # Use snapctl to get the value registered by the snap set command - refresh_opt_in_config $opt $(snapctl get $opt) -done -} - -caddy="$(snapctl get caddy)" -if [[ $caddy == "disable" ]]; then - echo "Caddy is not enabled, please set caddy-url= and caddy=enable" - exit 1 -fi - -create_caddyfile -update_caddyfile - -echo "Your URL was successfully configured - Please restart rocketchat and caddy services to apply configuration changes" - diff --git a/.snapcraft/resources/initreplset.js b/.snapcraft/resources/initreplset.js deleted file mode 100644 index 6883e248ebd6..000000000000 --- a/.snapcraft/resources/initreplset.js +++ /dev/null @@ -1,13 +0,0 @@ -var ism = db.isMaster(); -if (!ism.ismaster) { - rs.initiate( - { - _id: 'rs0', - members: [ - { - _id: 0, - host: 'localhost:27017' - } - ] - }); -} diff --git a/.snapcraft/resources/prepareRocketChat b/.snapcraft/resources/prepareRocketChat deleted file mode 100755 index 43bf6e18f326..000000000000 --- a/.snapcraft/resources/prepareRocketChat +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -curl -SLf "https://releases.rocket.chat/4.4.2/download/" -o rocket.chat.tgz - -tar xf rocket.chat.tgz --strip 1 - -cd programs/server -rm -rf npm/node_modules/meteor/emojione_emojione/node_modules/grunt-contrib-qunit - -if [[ $(uname -m) == *armv6l* ]] || [[ $(uname -m) == *armv7l* ]] -then - rm -rf npm/node_modules/sharp/vendor -fi - -export NODE_ENV=production -npm i - -# Ideally this will go away. For some reason on install its installing node-v57-linux-x64-glibc but when actually running it is looking for node-v57-linux-x64-unknown -if [[ $(uname -m) == "x86_64" ]] -then - cp -r npm/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc npm/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-unknown - rm npm/node_modules/grpc/node_modules/tar/lib/.unpack.js.swp -fi - -# sharp needs execution stack removed - https://forum.snapcraft.io/t/snap-and-executable-stacks/1812 -ls -l npm/node_modules/sharp/vendor -execstack --clear-execstack npm/node_modules/sharp/vendor/lib/librsvg-2.so* - -# Having to manually remove because of latest warning -rm -rf npm/node_modules/meteor/konecty_user-presence/node_modules/colors/lib/.colors.js.swp -rm -rf node_modules/node-pre-gyp/node_modules/tar/lib/.mkdir.js.swp -rm -rf npm/node_modules/sharp/node_modules/semver/bin/.semver.js.swp -rm -rf npm/node_modules/tar/lib/.mkdir.js.swp - diff --git a/.snapcraft/resources/preparecaddy b/.snapcraft/resources/preparecaddy deleted file mode 100755 index 303020c803e1..000000000000 --- a/.snapcraft/resources/preparecaddy +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/bash - -caddy_version="v1.0.4" - -caddy_bin="caddy" -caddy_dl_ext=".tar.gz" - -# NOTE: `uname -m` is more accurate and universal than `arch` -# See https://en.wikipedia.org/wiki/Uname -unamem="$(uname -m)" -if [[ $unamem == *aarch64* ]]; then - caddy_arch="arm64" -elif [[ $unamem == *64* ]]; then - caddy_arch="amd64" -elif [[ $unamem == *86* ]]; then - caddy_arch="386" -elif [[ $unamem == *armv5* ]]; then - caddy_arch="arm" - caddy_arm="5" -elif [[ $unamem == *armv6l* ]]; then - caddy_arch="arm" - caddy_arm="6" -elif [[ $unamem == *armv7l* ]]; then - caddy_arch="arm" - caddy_arm="7" -else - echo "Aborted, unsupported or unknown architecture: $unamem" - return 2 -fi - -caddy_arch=_linux_$caddy_arch - -echo "Downloading Caddy for $caddy_os/$caddy_arch$caddy_arm..." -caddy_file="caddy_linux_$caddy_arch${caddy_arm}_custom$caddy_dl_ext" -caddy_url="https://github.com/caddyserver/caddy/releases/download/$caddy_version/caddy_$caddy_version$caddy_arch$caddy_arm.tar.gz" -echo "$caddy_url" - -curl -L "$caddy_url" -o "$caddy_file" -tar -xzf $caddy_file -C . "$caddy_bin" -chmod +x $caddy_bin diff --git a/.snapcraft/resources/preparemongo b/.snapcraft/resources/preparemongo deleted file mode 100755 index 3ccfd8b35195..000000000000 --- a/.snapcraft/resources/preparemongo +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/bash - -if [[ $(uname -m) == "x86_64" ]] -then - wget --backups=0 "https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.6.14.tgz" - tar -zxf ./mongodb-linux-x86_64-3.6.14.tgz --strip-components=1 -else - IFS=" " read -a links <<< $(apt-get -y --print-uris install mongodb | egrep -o "https?://[^']+") - for link in ${links[@]} - do - wget --backups=0 ${link} - done - - IFS=" " read -a deb_pkgs <<< $(ls ./ | egrep "\.deb") - for pkg in ${deb_pkgs[@]} - do - echo "Extracting ${pkg}..." - dpkg-deb -R ${pkg} ./ - done - - mv usr/bin bin -fi diff --git a/.snapcraft/resources/preparenode b/.snapcraft/resources/preparenode deleted file mode 100755 index 186fc26dd695..000000000000 --- a/.snapcraft/resources/preparenode +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -node_version="v14.18.2" - -unamem="$(uname -m)" -if [[ $unamem == *aarch64* ]]; then - node_arch="arm64" -elif [[ $unamem == *64* ]]; then - node_arch="x64" -elif [[ $unamem == *86* ]]; then - node_arch="x86" -elif [[ $unamem == *armv6l* ]]; then - node_arch="armv6l" -elif [[ $unamem == *armv7l* ]]; then - node_arch="armv7l" -else - echo "Aborted, unsupported or unknown architecture: $unamem" - return 2 -fi - - -wget https://nodejs.org/dist/$node_version/node-$node_version-linux-$node_arch.tar.xz -tar xf node-$node_version-linux-$node_arch.tar.xz --strip 1 diff --git a/.snapcraft/resources/restoredb b/.snapcraft/resources/restoredb deleted file mode 100755 index 731cc8bbfcb0..000000000000 --- a/.snapcraft/resources/restoredb +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/bash - -function warn { - echo "[!] ${1}" - echo "[*] Check ${RESTORE_DIR}/${LOG_NAME} for details." -} - -function abort { - echo "[!] ${1}" - echo "[*] Check ${RESTORE_DIR}/${LOG_NAME} for details." - echo "[-] Restore aborted!" - exit 1 -} - -if [[ ${EUID} != 0 ]]; then - echo "[-] This task must be run with 'sudo'." - exit 1 -fi - -echo "*** ATTENTION ***" -echo "* Your current database WILL BE DROPPED prior to the restore!" -echo "* Do you want to continue?" - -select yn in "Yes" "No"; do - case $yn in - Yes ) break;; - No ) exit 1;; - esac -done - -if $(ps x | grep "node ${SNAP}/main.js" | grep -qv "grep"); then - echo "[-] Please shutdown Rocket.Chat first to restore a clean backup" - echo "[-] Use 'sudo systemctl stop snap.rocketchat-server.rocketchat-server'" - echo "[-] Backup aborted!" - exit 1 -fi - -TIMESTAMP=$(date +"%Y%m%d.%H%M") -RESTORE_DIR="${SNAP_COMMON}/restore" -DATA_DIR="${RESTORE_DIR}/dump/parties" -LOG_NAME="restore_${TIMESTAMP}.log" - -if [[ ! -d ${RESTORE_DIR} ]]; then - mkdir ${RESTORE_DIR} -fi - -if [[ -d ${RESTORE_DIR}/dump ]]; then - rm -rf ${RESTORE_DIR}/dump -fi - -if [[ -f ${RESTORE_DIR}/${LOG_NAME} ]]; then - rm -f ${RESTORE_DIR}/${LOG_NAME} -fi - -BACKUP_FILE=${1} -if [[ ! -f ${BACKUP_FILE} ]]; then - echo "[-] Usage: sudo snap run rocketchat-server.restoredb ${SNAP_COMMON}/rocketchat_backup_{TIMESTAMP}.tar.gz" - exit 1 -fi - -if ! $(echo "${BACKUP_FILE}" | grep -q "${SNAP_COMMON}"); then - echo "[-] Backup file must be within ${SNAP_COMMON}." - exit 1 -fi - -echo "[*] Extracting backup file..." -echo "[*] Extracting backup file with \"tar --no-same-owner --overwrite -xzvf ${BACKUP_FILE}\"" &> "${RESTORE_DIR}/${LOG_NAME}" -cd ${RESTORE_DIR} -tar --no-same-owner --overwrite -xzvf ${BACKUP_FILE} &>> "${RESTORE_DIR}/${LOG_NAME}" \ - || abort "Failed to extract backup files to ${RESTORE_DIR}!" - -if [ $(ls -l ${DATA_DIR} | wc -l) -le 1 ]; then - abort "No restore data found within ${DATA_DIR}!" -fi -echo "[*] Restoring data..." -echo "[*] Restoring data with \"mongorestore --db parties --noIndexRestore --drop ${DATA_DIR}\"" &>> "${RESTORE_DIR}/${LOG_NAME}" -mongorestore --db parties --noIndexRestore --drop ${DATA_DIR} &>> "${RESTORE_DIR}/${LOG_NAME}" \ - || abort "Failed to execute mongorestore from ${DATA_DIR}!" -if [ $(cat ${RESTORE_DIR}/${LOG_NAME} | grep $(date +%Y) | wc -l) -lt 24 ]; then - warn "Little or no data could be restored from the backup!" -fi - -echo "[*] Preparing database..." -echo "[*] Preparing database with \"mongo parties --eval 'db.repairDatabase()' --verbose\"" &>> "${RESTORE_DIR}/${LOG_NAME}" -mongo parties --eval "db.repairDatabase()" --verbose &>> "${RESTORE_DIR}/${LOG_NAME}" \ - || abort "Failed to prepare database for usage!" - -echo "[+] Restore completed! Please with 'sudo systemctl restart snap.rocketchat-server.rocketchat-server' to verify." diff --git a/.snapcraft/resources/startRocketChat b/.snapcraft/resources/startRocketChat deleted file mode 100755 index 7e1cca2f0787..000000000000 --- a/.snapcraft/resources/startRocketChat +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - -function start_rocketchat { - echo "Checking if oplog has been enabled, and enabling if not" - LC_ALL=C mongo $SNAP/bin/initreplset.js - - echo "Checking if mongo featureCompatibilityVersion is correct, changing if not" - db_version=$(mongo --eval "printjson(db.version())" |tail -1 |tr -d '"' |cut -d. -f1,2) - db_comp_version=$(mongo --eval "printjson(db.adminCommand ({getParameter: 1, featureCompatibilityVersion: 1}))"|grep '"version" :' |cut -d: -f3 |cut -d} -f1|tr -d '[:space:]'|tr -d '"') - db_featureCompatibilityVersion="$(snapctl get db-feature-compatibility-version)" - if [[ $db_version == "3.6" ]] && [[ $db_comp_version == "3.4" ]] && [[ $db_featureCompatibilityVersion == "3.6" ]]; then - LC_ALL=C mongo --eval "printjson(db.adminCommand ({ setFeatureCompatibilityVersion: \"3.6\" }))" - fi - - ## For making fonts work for sharp - export XDG_DATA_HOME=$SNAP/usr/share - - # Font Config - export FONTCONFIG_PATH=$SNAP/etc/fonts/config.d - export FONTCONFIG_FILE=$SNAP/etc/fonts/fonts.conf - - - export DEPLOY_METHOD=snap - export NODE_ENV=production - export BABEL_CACHE_DIR=/tmp - export ROOT_URL=http://localhost - export PORT="$(snapctl get port)" - export MONGO_URL="$(snapctl get mongo-url)" - export MONGO_OPLOG_URL="$(snapctl get mongo-oplog-url)" - export Accounts_AvatarStorePath=$SNAP_COMMON/uploads - siteurl="$(snapctl get siteurl)" - if [ -n "$siteurl" ]; then - export OVERWRITE_SETTING_Site_Url=$siteurl - fi - - if ls $SNAP_COMMON/*.env >/dev/null 2>&1; then - for filename in $SNAP_COMMON/*.env; do - while read env_var; do - export "$env_var" - done < $filename - done - fi - - node $SNAP/main.js -} - -sleep_time=5 -try_times=0 - -function try_start { - - refreshing="$(snapctl get snap-refreshing)" - if [ $refreshing == "true" ]; then - exit 0 - fi - - search=$(ps --pid $(cat $SNAP_COMMON/mongod.pid) -o comm=) - - if [ $search ] - then - start_rocketchat - else - if [[ "$try_times" == 5 || "$try_times" > 5 ]]; then - echo "Was unable to connect to Mongo. Please make sure Mongo has started successfully: sudo systemctl status snap.rocketchat-server.rocketchat-mongo to view logs: sudo journalctl -u snap.rocketchat-server.rocketchat-mongo" - exit 1; - fi - - ((try_times += 1)) - ((sleep_time += 5)) - echo "Mongo is not available, can't start. Waiting ${sleep_time} seconds and trying again" - sleep $sleep_time - try_start - fi -} - -try_start diff --git a/.snapcraft/resources/startmongo b/.snapcraft/resources/startmongo deleted file mode 100755 index 5697c6df6dba..000000000000 --- a/.snapcraft/resources/startmongo +++ /dev/null @@ -1 +0,0 @@ -env LC_ALL=C mongod --bind_ip 127.0.0.1 --pidfilepath $SNAP_COMMON/mongod.pid --smallfiles --journal --dbpath=$SNAP_COMMON --replSet rs0 diff --git a/.snapcraft/snap/hooks/configure b/.snapcraft/snap/hooks/configure deleted file mode 100755 index 3a2863d7de16..000000000000 --- a/.snapcraft/snap/hooks/configure +++ /dev/null @@ -1,145 +0,0 @@ -#!/bin/bash - -export PATH="$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$PATH" -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/lib:$SNAP/usr/lib:$SNAP/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu" -export LD_LIBRARY_PATH=$SNAP_LIBRARY_PATH:$LD_LIBRARY_PATH - -# Obtain caddyurl value -caddyurl="$(snapctl get caddy-url)" -# Validate it -#caddyurl_regex='^https?:\/\/([0-9A-Za-z\.-]+){1,}(\.[a-z\.]{2,6})?([\/\da-z\.-]+)?$' #(supporting path) -caddyurl_regex='^https?:\/\/([0-9A-Za-z\.-]+){1,}(\.[a-z\.]{2,6})?$' -if [ -n "$caddyurl" ]; then - if ! [[ $caddyurl =~ $caddyurl_regex ]]; then - echo "\"$caddyurl\" is not a valid url" >&2 - exit 1 - fi -#else -# if [[ $siteurl =~ ^http: ]] && [[ $siteurl =~ ^http:\/\/([0-9A-Za-z\.-]+){1,}?(\.[a-z\.]{2,6})?\/([\/\da-z\.-]+){1,}$ ]]; then -# path=${siteurl#http://*/} -# site=${siteurl#"http://"} -# site=${site%%/*} -# site=http://$site -# elif [[ $siteurl =~ ^https: ]] && [[ $siteurl =~ ^https:\/\/([0-9A-Za-z\.-]+){1,}?(\.[a-z\.]{2,6})?\/([\/\da-z\.-]+){1,}$ ]]; then -# path=${siteurl#https://*/} -# site=${siteurl#"https://"} -# site=${site%%/*} -# site=https://$site -# else -# path="" -# site=$siteurl -# fi -# snapctl set path=$path -# snapctl set site=$site -fi - -# Obtain caddy value -caddy="$(snapctl get caddy)" -# Validate it -caddy_regex='((enable)|(disable))' -if ! [[ $caddy =~ $caddy_regex ]]; then - echo "\"$caddy_regex\" is not a valid, set to enable or disable" >&2 - exit 1 -else - if [[ $caddy == enable ]]; then - caddyurl="$(snapctl get caddy-url)" - if [ -z "$caddyurl" ]; then - echo "You tried to enable caddy but caddy-url is not set yet, please set up caddy-url first and then enable caddy again" >&2 - snapctl set caddy=disable - exit 1 - else - snapctl set siteurl=$caddyurl - fi - else - siteurl="$(snapctl get siteurl)" - if [ -n "$siteurl" ]; then - snapctl set siteurl= - fi - fi -fi - -# Obtain port value -port="$(snapctl get port)" -# Validate it -port_regex='^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$' -if ! [[ $port =~ $port_regex ]]; then - echo "\"$port\" is not a valid port" >&2 - exit 1 -fi - -# Obtain mongourl value -mongourl="$(snapctl get mongo-url)" -# Validate it -mongourl_regex='^mongodb:\/\/([0-9A-Za-z\.\-\_]+){1,}(([a-z\.\-\_]+){2,6})?(:[0-9]{2,5})?\/([0-9A-Za-z\_\-]+)$' -if ! [[ $mongourl =~ $mongourl_regex ]] ; then - echo "\"$mongourl\" is not a valid url" >&2 - exit 1 -fi - -# Obtain mongooplogurl value -mongooplogurl="$(snapctl get mongo-oplog-url)" -# Validate it -mongooplogurl_regex='^mongodb:\/\/([0-9A-Za-z\.\-\_]+){1,}(([a-z\.\-\_]+){2,6})?(:[0-9]{2,5})?\/local$' -if ! [[ $mongooplogurl =~ $mongooplogurl_regex ]] ; then - echo "\"$mongooplogurl\" is not a valid url" >&2 - exit 1 -fi - -# Obtain site protocol -https="$(snapctl get https)" -# Validate it -https_regex='((enable)|(disable))' -if ! [[ $https =~ $https_regex ]]; then - echo "\"$https\" should be enable or disable" >&2 - exit 1 -else - if [[ $https == enable ]] && [[ $caddyurl =~ ^http: ]]; then - echo "Error: You enabled https but your site URL starts with http, disabling https ..." - snapctl set https=disable - exit 1 - elif [[ $https == enable ]] && [[ $caddyurl =~ ^https: ]]; then - domain=${caddyurl#"https://"} - domain=${domain%%/*} - pubip=$(dig $domain |grep -A1 ";; ANSWER SECTION:" |tail -1 | awk '{print $5}') - if [ -z "$pubip" ]; then - echo "Error: Can't resove DNS query for $domain, check your DNS configuration, disabling https ..." - snapctl set https=disable - exit 1 - else - ip=$(curl ipinfo.io/ip 2>/dev/null) - if [[ $ip != $pubip ]]; then - echo "Error: Your public IP doesn't match the one resolved for caddy-url, disabling https ..." - snapctl set https=disable - exit 1 - fi - fi - elif [[ $https == enable ]] && [ -z "$caddyurl" ]; then - echo "Error: You enabled https but your site URL is empty, please set caddy-url=, disabling https ..." - snapctl set https=disable - exit 1 - fi -fi - -# Obtain backup value -backup="$(snapctl get backup-on-refresh)" -# Validate it -backup_regex='((enable)|(disable))' -if ! [[ $backup =~ $backup_regex ]] ; then - echo "\"$backup\" should be enable or disable" >&2 - exit 1 -fi - -# Obtain db featureCompatibilityVersion -db_featureCompatibilityVersion="$(snapctl get db-feature-compatibility-version)" -db_featureCompatibilityVersion_regex='^3\.[4,6]$' -if ! [[ $db_featureCompatibilityVersion =~ $db_featureCompatibilityVersion_regex ]] ; then - echo "\"$db_featureCompatibilityVersion\" should be 3.4 or 3.6" >&2 - exit 1 -else - db_version=$(mongo --eval "printjson(db.version())" |tail -1 |tr -d '"' |cut -d. -f1,2) - if [[ $db_version == "3.6" ]] && [[ $db_featureCompatibilityVersion == "3.4" ]]; then - mongo --eval "printjson(db.adminCommand ({ setFeatureCompatibilityVersion: \"3.4\" }))" - elif [[ $db_version == "3.6" ]] && [[ $db_featureCompatibilityVersion == "3.6" ]]; then - mongo --eval "printjson(db.adminCommand ({ setFeatureCompatibilityVersion: \"3.6\" }))" - fi -fi diff --git a/.snapcraft/snap/hooks/install b/.snapcraft/snap/hooks/install deleted file mode 100755 index c7ed881d4b82..000000000000 --- a/.snapcraft/snap/hooks/install +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# Initialize the CADDY_URL to a default -snapctl set caddy=disable - -# Initialize the PORT to a default -snapctl set port=3000 - -# Initialize the MONGO_URL to a default -snapctl set mongo-url=mongodb://localhost:27017/parties - -# Initialize the MONGO_OPLOG_URL to a default -snapctl set mongo-oplog-url=mongodb://localhost:27017/local - -# Initialize the protocol to a default -snapctl set https=disable - -# Initialize backup to a default -snapctl set backup-on-refresh=disable - -# Initialize snap-refreshing to false -snapctl set snap-refreshing=false - -# Initialize db-feature-compatibility-version to 3.6 -snapctl set db-feature-compatibility-version=3.6 - diff --git a/.snapcraft/snap/hooks/post-refresh b/.snapcraft/snap/hooks/post-refresh deleted file mode 100755 index ec0a988afd4c..000000000000 --- a/.snapcraft/snap/hooks/post-refresh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -# Initialize the CADDY_URL to a default -caddy="$(snapctl get caddy)" -if [ -z "$caddy" ]; then - snapctl set caddy=disable -fi - -# Initialize the PORT to a default -port="$(snapctl get port)" -if [ -z "$port" ]; then - snapctl set port=3000 -fi - -# Initialize the MONGO_URL to a default -mongourl="$(snapctl get mongo-url)" -if [ -z "$mongourl" ]; then - snapctl set mongo-url=mongodb://localhost:27017/parties -fi - -# Initialize the MONGO_OPLOG_URL to a default -mongooplogurl="$(snapctl get mongo-oplog-url)" -if [ -z "$mongooplogurl" ]; then - snapctl set mongo-oplog-url=mongodb://localhost:27017/local -fi - -# Initialize the protocol to a default -https="$(snapctl get https)" -if [ -z "$https" ]; then - snapctl set https=disable -fi - -# Initialize backup to a default -backup="$(snapctl get backup-on-refresh)" -if [ -z "$backup" ]; then - snapctl set backup-on-refresh=disable -fi - -# Set back snap-refreshing to false -snapctl set snap-refreshing=false - -# Initialize db-feature-compatibility-version to a default -db_featureCompatibilityVersion="$(snapctl get db-feature-compatibility-version)" -if [ -z "$db_featureCompatibilityVersion" ]; then - snapctl set db-feature-compatibility-version=3.6 -fi - diff --git a/.snapcraft/snap/hooks/pre-refresh b/.snapcraft/snap/hooks/pre-refresh deleted file mode 100755 index 41d8df57a1e8..000000000000 --- a/.snapcraft/snap/hooks/pre-refresh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -export PATH="$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$PATH" -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/lib:$SNAP/usr/lib:$SNAP/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu" -export LD_LIBRARY_PATH=$SNAP_LIBRARY_PATH:$LD_LIBRARY_PATH - -TIMESTAMP=$(date +"%Y%m%d.%H%M") - -# stop rocketchat -snapctl set snap-refreshing=true - -rocketchatpid=$(pgrep -f "node $SNAP/main.js") -kill -9 $rocketchatpid -if ! [ $? == 0 ]; then - echo "Failed to stop rocketchat service" > $SNAP_COMMON/refresh_${TIMESTAMP}.log -fi - -backup="$(snapctl get backup-on-refresh)" -if [ $backup == "enable" ]; then - backupdb - if ! [ $? == 0 ]; then - echo "Failed rocketchat database backup before refresh" >> $SNAP_COMMON/refresh_${TIMESTAMP}.log - fi -fi - diff --git a/.snapcraft/snap/snapcraft.yaml b/.snapcraft/snap/snapcraft.yaml deleted file mode 100644 index 4a4ce8aa2ff7..000000000000 --- a/.snapcraft/snap/snapcraft.yaml +++ /dev/null @@ -1,112 +0,0 @@ -# -# Easiest way to work with this file, from an updated Ubuntu 16.04 LTS image -# 1. create a non-root user with sudo priv and perform following steps as non-root -# 2. `sudo apt-get update` -# 3. `sudo apt-get install snapcraft python build-essential` -# 4. `snapcraft stage` -# 5. `snapcraft snap` - -name: rocketchat-server -version: 4.4.2 -summary: Rocket.Chat server -description: Have your own Slack like online chat, built with Meteor. https://rocket.chat/ -confinement: strict -assumes: [snapd2.21] -apps: - rocketchat-server: - command: startRocketChat - daemon: simple - plugs: [network, network-bind, removable-media] - rocketchat-mongo: - command: startmongo - daemon: simple - plugs: [network, network-bind, network-observe] - rocketchat-caddy: - command: env LC_ALL=C caddy -conf=$SNAP_DATA/Caddyfile - daemon: simple - plugs: [network, network-bind] - mongo: - command: env LC_ALL=C mongo - plugs: [network] - restoredb: - command: env LC_ALL=C restoredb - plugs: [network] - backupdb: - command: env LC_ALL=C backupdb - plugs: [network] - initcaddy: - command: env LC_ALL=C initcaddy -hooks: - configure: - plugs: [network] - pre-refresh: - plugs: [network] -parts: - node: - plugin: dump - prepare: ./resources/preparenode - build-packages: - # For fibers - - python - - build-essential - - nodejs - rocketchat-server: - build-packages: - - curl - plugin: dump - prepare: ./resources/prepareRocketChat - after: [node] - source: . - stage-packages: - - execstack - - fontconfig-config - stage: - - programs - - main.js - - .node_version.txt - - etc - - usr - - star.json - mongodb: - build-packages: - - wget - source: ./ - prepare: ./resources/preparemongo - plugin: dump - stage-packages: - - libssl1.0.0 - prime: - - usr - - bin - - lib - scripts: - plugin: dump - source: resources/ - organize: - backupdb: bin/backupdb - restoredb: bin/restoredb - startmongo: bin/startmongo - startRocketChat: bin/startRocketChat - initreplset.js: bin/initreplset.js - Caddyfile: bin/Caddyfile - initcaddy: bin/initcaddy - prime: - - bin - caddy: - prepare: ./resources/preparecaddy - plugin: dump - source: ./ - prime: - - bin - organize: - caddy: bin/caddy - after: [mongodb] - hooks: - plugin: nil - stage-packages: - - dnsutils - - curl - prime: - - usr - - lib - diff --git a/.storybook/.eslintrc.js b/.storybook/.eslintrc.js deleted file mode 120000 index 8589dc8c5324..000000000000 --- a/.storybook/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -../client/.eslintrc.js \ No newline at end of file diff --git a/.storybook/.prettierrc b/.storybook/.prettierrc deleted file mode 120000 index 4031483e531f..000000000000 --- a/.storybook/.prettierrc +++ /dev/null @@ -1 +0,0 @@ -../client/.prettierrc \ No newline at end of file diff --git a/.storybook/babel.config.js b/.storybook/babel.config.js deleted file mode 100644 index f028aa2d2940..000000000000 --- a/.storybook/babel.config.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - presets: [ - [ - '@babel/preset-env', - { - shippedProposals: true, - useBuiltIns: 'usage', - corejs: '3', - modules: 'commonjs', - }, - ], - '@babel/preset-react', - '@babel/preset-flow', - ], - plugins: [ - '@babel/plugin-proposal-class-properties', - '@babel/plugin-proposal-optional-chaining', - '@babel/plugin-proposal-nullish-coalescing-operator', - ], -}; diff --git a/.storybook/decorators.tsx b/.storybook/decorators.tsx deleted file mode 100644 index 9314684c128f..000000000000 --- a/.storybook/decorators.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import React, { ReactElement } from 'react'; - -import { MeteorProviderMock } from './mocks/providers'; -import QueryClientProviderMock from './mocks/providers/QueryClientProviderMock'; -import ServerProviderMock from './mocks/providers/ServerProviderMock'; - -export const rocketChatDecorator = (storyFn: () => ReactElement): ReactElement => { - const linkElement = document.getElementById('theme-styles') || document.createElement('link'); - if (linkElement.id !== 'theme-styles') { - require('../app/theme/client/main.css'); - require('../app/theme/client/vendor/fontello/css/fontello.css'); - require('../app/theme/client/rocketchat.font.css'); - linkElement.setAttribute('id', 'theme-styles'); - linkElement.setAttribute('rel', 'stylesheet'); - linkElement.setAttribute('href', 'https://open.rocket.chat/theme.css'); - document.head.appendChild(linkElement); - } - - /* eslint-disable @typescript-eslint/no-var-requires */ - /* eslint-disable-next-line */ - const { default: icons } = require('!!raw-loader!../private/public/icons.svg'); - - return ( - - - - -
-
{storyFn()}
- - - - ); -}; - -export const fullHeightDecorator = (storyFn: () => ReactElement): ReactElement => ( -
- {storyFn()} -
-); - -export const centeredDecorator = (storyFn: () => ReactElement): ReactElement => ( -
- {storyFn()} -
-); diff --git a/.storybook/hooks/index.ts b/.storybook/hooks/index.ts deleted file mode 100644 index ca0d1db71f7f..000000000000 --- a/.storybook/hooks/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './useAutoToggle'; diff --git a/.storybook/hooks/useAutoToggle.ts b/.storybook/hooks/useAutoToggle.ts deleted file mode 100644 index 542ae89d17a1..000000000000 --- a/.storybook/hooks/useAutoToggle.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { useEffect, useState } from 'react'; - -export const useAutoToggle = (initialValue = false, ms = 1000): boolean => { - const [value, setValue] = useState(initialValue); - - useEffect(() => { - const timer = setInterval(() => setValue((value) => !value), ms); - - return (): void => { - clearInterval(timer); - }; - }, [ms]); - - return value; -}; diff --git a/.storybook/main.js b/.storybook/main.js deleted file mode 100644 index f5d134f36d2e..000000000000 --- a/.storybook/main.js +++ /dev/null @@ -1,73 +0,0 @@ -const { resolve, relative, join } = require('path'); - -const webpack = require('webpack'); - -module.exports = { - stories: [ - '../app/**/*.stories.{js,tsx}', - '../client/**/*.stories.{js,tsx}', - ...(process.env.EE === 'true' ? ['../ee/**/*.stories.{js,tsx}'] : []), - ], - addons: ['@storybook/addon-essentials', '@storybook/addon-postcss'], - typescript: { - reactDocgen: 'none', - }, - webpackFinal: async (config) => { - const cssRule = config.module.rules.find(({ test }) => test.test('index.css')); - - cssRule.use[2].options = { - ...cssRule.use[2].options, - postcssOptions: { - plugins: [ - ['postcss-custom-properties', { preserve: true }], - 'postcss-media-minmax', - 'postcss-nested', - 'autoprefixer', - [ - 'postcss-url', - { - url: ({ absolutePath, relativePath, url }) => { - const absoluteDir = absolutePath.slice(0, -relativePath.length); - const relativeDir = relative(absoluteDir, resolve(__dirname, '../public')); - const newPath = join(relativeDir, url); - return newPath; - }, - }, - ], - ], - }, - }; - - config.module.rules.push({ - test: /\.info$/, - type: 'json', - }); - - config.module.rules.push({ - test: /\.html$/, - use: '@settlin/spacebars-loader', - }); - - config.module.rules.push({ - test: /\.(ts|tsx)$/, - use: [ - { - loader: 'ts-loader', - options: { - configFile: join(__dirname, '../tsconfig.webpack.json'), - }, - }, - ], - }); - - config.plugins.push( - new webpack.NormalModuleReplacementPlugin(/^meteor/, require.resolve('./mocks/meteor.js')), - new webpack.NormalModuleReplacementPlugin(/(app)\/*.*\/(server)\/*/, require.resolve('./mocks/empty.ts')), - ); - - config.mode = 'development'; - config.optimization.usedExports = true; - - return config; - }, -}; diff --git a/.storybook/mocks/providers/ServerProviderMock.tsx b/.storybook/mocks/providers/ServerProviderMock.tsx deleted file mode 100644 index 96088134407a..000000000000 --- a/.storybook/mocks/providers/ServerProviderMock.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import { action } from '@storybook/addon-actions'; -import React, { ContextType, FC } from 'react'; - -import { ServerContext, ServerMethodName, ServerMethodParameters, ServerMethodReturn } from '../../../client/contexts/ServerContext'; -import { Serialized } from '../../../definition/Serialized'; -import { MatchPathPattern, Method, OperationParams, OperationResult, PathFor } from '../../../definition/rest'; - -const logAction = action('ServerProvider'); - -const randomDelay = (): Promise => new Promise((resolve) => setTimeout(resolve, Math.random() * 1000)); - -const absoluteUrl = (path: string): string => new URL(path, '/').toString(); - -const callMethod = ( - methodName: MethodName, - ...args: ServerMethodParameters -): Promise> => - Promise.resolve(logAction('callMethod', methodName, ...args)) - .then(randomDelay) - .then(() => undefined as any); - -const callEndpoint = >( - method: TMethod, - path: TPath, - params: Serialized>>, -): Promise>>> => - Promise.resolve(logAction('callEndpoint', method, path, params)) - .then(randomDelay) - .then(() => undefined as any); - -const uploadToEndpoint = (endpoint: string, params: any, formData: any): Promise => - Promise.resolve(logAction('uploadToEndpoint', endpoint, params, formData)).then(randomDelay); - -const getStream = (streamName: string, options: {} = {}): ((eventName: string, callback: (data: T) => void) => () => void) => { - logAction('getStream', streamName, options); - - return (eventName, callback): (() => void) => { - const subId = Math.random().toString(16).slice(2); - logAction('getStream.subscribe', streamName, eventName, subId); - - randomDelay().then(() => callback(undefined as any)); - - return (): void => { - logAction('getStream.unsubscribe', streamName, eventName, subId); - }; - }; -}; - -const ServerProviderMock: FC>> = ({ children, ...overrides }) => ( - -); - -export default ServerProviderMock; diff --git a/.storybook/mocks/providers/index.tsx b/.storybook/mocks/providers/index.tsx deleted file mode 100644 index 48cbbbaa438c..000000000000 --- a/.storybook/mocks/providers/index.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import i18next from 'i18next'; -import React, { PropsWithChildren, ReactElement } from 'react'; - -import { TranslationContext, TranslationContextValue } from '../../../client/contexts/TranslationContext'; - -let contextValue: TranslationContextValue; - -const getContextValue = (): TranslationContextValue => { - if (contextValue) { - return contextValue; - } - - i18next.init({ - fallbackLng: 'en', - defaultNS: 'project', - resources: { - en: { - project: require('../../../packages/rocketchat-i18n/i18n/en.i18n.json'), - }, - }, - interpolation: { - prefix: '__', - suffix: '__', - }, - initImmediate: false, - }); - - const translate = (key: string, ...replaces: unknown[]): string => { - if (typeof replaces[0] === 'object' && replaces[0] !== null) { - const [options] = replaces; - return i18next.t(key, options); - } - - if (replaces.length === 0) { - return i18next.t(key); - } - - return i18next.t(key, { - postProcess: 'sprintf', - sprintf: replaces, - }); - }; - - translate.has = (key: string): boolean => !!key && i18next.exists(key); - - contextValue = { - languages: [ - { - name: 'English', - en: 'English', - key: 'en', - }, - ], - language: 'en', - translate, - loadLanguage: async (): Promise => undefined, - }; - - return contextValue; -}; - -function TranslationProviderMock({ children }: PropsWithChildren<{}>): ReactElement { - return ; -} - -// eslint-disable-next-line react/no-multi-comp -export function MeteorProviderMock({ children }: PropsWithChildren<{}>): ReactElement { - return {children}; -} diff --git a/.storybook/preview.ts b/.storybook/preview.ts deleted file mode 100644 index ab9bd5a3220d..000000000000 --- a/.storybook/preview.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { DocsPage, DocsContainer } from '@storybook/addon-docs'; -import { addDecorator, addParameters } from '@storybook/react'; - -import { rocketChatDecorator } from './decorators'; - -addDecorator(rocketChatDecorator); - -addParameters({ - backgrounds: { - grid: { - cellSize: 4, - cellAmount: 4, - opacity: 0.5, - }, - }, - docs: { - container: DocsContainer, - page: DocsPage, - }, - options: { - storySort: ([, a], [, b]): number => a.kind.localeCompare(b.kind), - }, -}); diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 58b8073d89b2..000000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - - { - "name": "Attach to meteor debug", - "type": "node", - "request": "attach", - "port": 9229, - "address": "localhost", - "restart": false, - "sourceMaps": true, - "sourceMapPathOverrides": { - "meteor://💻app/*": "${workspaceFolder}/*", - "meteor://💻app/packages/rocketchat:*": "${workspaceFolder}/packages/rocketchat-*", - "meteor://💻app/packages/chatpal:*": "${workspaceFolder}/packages/chatpal-*", - "meteor://💻app/packages/assistify:*": "${workspaceFolder}/packages/assistify-*" - }, - "protocol": "inspector" - }, - { - "type": "chrome", - "request": "launch", - "name": "Frontend (Chrome)", - "url": "http://localhost:3000", - "webRoot": "${workspaceFolder}", - "sourceMapPathOverrides": { - "meteor://💻app/*": "${workspaceFolder}/*", - "meteor://💻app/packages/rocketchat:*": "${workspaceFolder}/packages/rocketchat-*", - "meteor://💻app/packages/chatpal:*": "${workspaceFolder}/packages/chatpal-*", - "meteor://💻app/packages/assistify:*": "${workspaceFolder}/packages/assistify-*" - } - }, - { - "type": "node", - "request": "launch", - "name": "Server (debug)", - "runtimeExecutable": "npm", - "runtimeArgs": [ - "run", - "debug" - ], - "port": 9229, - "timeout": 300000, //Rocket.Chat really takes some time to startup, so play it safe - "sourceMapPathOverrides": { - "meteor://💻app/*": "${workspaceFolder}/*", - "meteor://💻app/packages/rocketchat:*": "${workspaceFolder}/packages/rocketchat-*", - "meteor://💻app/packages/chatpal:*": "${workspaceFolder}/packages/chatpal-*", - "meteor://💻app/packages/assistify:*": "${workspaceFolder}/packages/assistify-*" - }, - "protocol": "inspector" - }, - { - "type": "node", - "request": "launch", - "name": "Server (debug-brk)", - "runtimeExecutable": "npm", - "runtimeArgs": [ - "run", - "debug-brk" - ], - "port": 9229, - "timeout": 300000, //Rocket.Chat really takes some time to startup, so play it safe - "sourceMapPathOverrides": { - "meteor://💻app/*": "${workspaceFolder}/*", - "meteor://💻app/packages/rocketchat:*": "${workspaceFolder}/packages/rocketchat-*", - "meteor://💻app/packages/chatpal:*": "${workspaceFolder}/packages/chatpal-*", - "meteor://💻app/packages/assistify:*": "${workspaceFolder}/packages/assistify-*" - }, - "protocol": "inspector" - }, - { - "type": "node", - "request": "launch", - "name": "Server (Testmode)", - "runtimeExecutable": "npm", - "runtimeArgs": [ - "run", - "debug" - ], - "port": 9229, - "timeout": 300000, //Rocket.Chat really takes some time to startup, so play it safe - "sourceMapPathOverrides": { - "meteor://💻app/*": "${workspaceFolder}/*", - "meteor://💻app/packages/rocketchat:*": "${workspaceFolder}/packages/rocketchat-*", - "meteor://💻app/packages/chatpal:*": "${workspaceFolder}/packages/chatpal-*", - "meteor://💻app/packages/assistify:*": "${workspaceFolder}/packages/assistify-*" - }, - "env": { - "TEST_MODE": "true" - }, - "protocol": "inspector" - } - ], - "compounds": [ - { - "name": "Server + Frontend", - "configurations": [ - "Server (debug-brk)", - "Frontend (Chrome)" - ] - } - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000000..a32489e34a64 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,23 @@ +{ + "eslint.workingDirectories": [ + { + "pattern": "packages/*", + "changeProcessCWD": true + }, + { + "pattern": "apps/*", + "changeProcessCWD": true + }, + { + "pattern": "ee/apps/*", + "changeProcessCWD": true + } + ], + "typescript.tsdk": "./node_modules/typescript/lib", + "cSpell.words": [ + "livechat", + "omnichannel", + "photoswipe", + "tmid" + ] +} diff --git a/.yarn/plugins/@yarnpkg/plugin-engines.cjs b/.yarn/plugins/@yarnpkg/plugin-engines.cjs new file mode 100644 index 000000000000..834718659985 --- /dev/null +++ b/.yarn/plugins/@yarnpkg/plugin-engines.cjs @@ -0,0 +1,9 @@ +/* eslint-disable */ +//prettier-ignore +module.exports = { +name: "@yarnpkg/plugin-engines", +factory: function (require) { +var plugin=(()=>{var l=Object.create,c=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var y=e=>c(e,"__esModule",{value:!0});var t=e=>{if(typeof require!="undefined")return require(e);throw new Error('Dynamic require of "'+e+'" is not supported')};var g=(e,o)=>{for(var r in o)c(e,r,{get:o[r],enumerable:!0})},P=(e,o,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of u(o))!h.call(e,s)&&s!=="default"&&c(e,s,{get:()=>o[s],enumerable:!(r=v(o,s))||r.enumerable});return e},i=e=>P(y(c(e!=null?l(m(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var k={};g(k,{default:()=>$});var n=i(t("@yarnpkg/core")),p=i(t("@yarnpkg/fslib")),d=i(t("fs")),f=i(t("path")),a=i(t("semver")),N={hooks:{validateProject:e=>{let o=(0,d.readFileSync)((0,f.resolve)(p.npath.fromPortablePath(e.cwd),"package.json"),"utf-8"),{engines:r={}}=JSON.parse(o);if(r.node!=null&&!(0,a.satisfies)(process.version,r.node))throw new n.ReportError(n.MessageName.UNNAMED,`The current Node version ${process.version} does not satisfy the required version ${r.node}.`);if(r.yarn!=null&&!(0,a.satisfies)(n.YarnVersion,r.yarn))throw new n.ReportError(n.MessageName.UNNAMED,`The current Yarn version v${n.YarnVersion} does not satisfy the required version ${r.yarn}.`)},setupScriptEnvironment:async e=>{let o=(0,d.readFileSync)((0,f.resolve)(p.npath.fromPortablePath(e.cwd),"package.json"),"utf-8"),{engines:r={}}=JSON.parse(o);r.node!=null&&!(0,a.satisfies)(process.version,r.node)&&(console.error(`The current Node version ${process.version} does not satisfy the required version ${r.node}.`),process.exit(1)),r.yarn!=null&&!(0,a.satisfies)(n.YarnVersion,r.yarn)&&(console.error(`The current Yarn version v${n.YarnVersion} does not satisfy the required version ${r.yarn}.`),process.exit(1))}}},$=N;return k;})(); +return plugin; +} +}; diff --git a/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs b/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs new file mode 100644 index 000000000000..8d3e2a39b7a5 --- /dev/null +++ b/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs @@ -0,0 +1,546 @@ +/* eslint-disable */ +//prettier-ignore +module.exports = { +name: "@yarnpkg/plugin-interactive-tools", +factory: function (require) { +var plugin=(()=>{var $P=Object.create,Py=Object.defineProperty,eI=Object.defineProperties,tI=Object.getOwnPropertyDescriptor,nI=Object.getOwnPropertyDescriptors,rI=Object.getOwnPropertyNames,L_=Object.getOwnPropertySymbols,iI=Object.getPrototypeOf,rD=Object.prototype.hasOwnProperty,sS=Object.prototype.propertyIsEnumerable;var aS=(i,o,a)=>o in i?Py(i,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[o]=a,qt=(i,o)=>{for(var a in o||(o={}))rD.call(o,a)&&aS(i,a,o[a]);if(L_)for(var a of L_(o))sS.call(o,a)&&aS(i,a,o[a]);return i},Zr=(i,o)=>eI(i,nI(o)),uI=i=>Py(i,"__esModule",{value:!0});var wl=(i,o)=>{var a={};for(var c in i)rD.call(i,c)&&o.indexOf(c)<0&&(a[c]=i[c]);if(i!=null&&L_)for(var c of L_(i))o.indexOf(c)<0&&sS.call(i,c)&&(a[c]=i[c]);return a};var Ke=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports),oI=(i,o)=>{for(var a in o)Py(i,a,{get:o[a],enumerable:!0})},lI=(i,o,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let c of rI(o))!rD.call(i,c)&&c!=="default"&&Py(i,c,{get:()=>o[c],enumerable:!(a=tI(o,c))||a.enumerable});return i},ou=i=>lI(uI(Py(i!=null?$P(iI(i)):{},"default",i&&i.__esModule&&"default"in i?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i);var Iy=Ke((mW,fS)=>{"use strict";var cS=Object.getOwnPropertySymbols,sI=Object.prototype.hasOwnProperty,aI=Object.prototype.propertyIsEnumerable;function fI(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function cI(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(o).map(function(t){return o[t]});if(c.join("")!=="0123456789")return!1;var _={};return"abcdefghijklmnopqrst".split("").forEach(function(t){_[t]=t}),Object.keys(Object.assign({},_)).join("")==="abcdefghijklmnopqrst"}catch(t){return!1}}fS.exports=cI()?Object.assign:function(i,o){for(var a,c=fI(i),_,t=1;t{"use strict";var iD=Iy(),$f=typeof Symbol=="function"&&Symbol.for,by=$f?Symbol.for("react.element"):60103,dI=$f?Symbol.for("react.portal"):60106,pI=$f?Symbol.for("react.fragment"):60107,hI=$f?Symbol.for("react.strict_mode"):60108,vI=$f?Symbol.for("react.profiler"):60114,mI=$f?Symbol.for("react.provider"):60109,yI=$f?Symbol.for("react.context"):60110,gI=$f?Symbol.for("react.forward_ref"):60112,_I=$f?Symbol.for("react.suspense"):60113,EI=$f?Symbol.for("react.memo"):60115,DI=$f?Symbol.for("react.lazy"):60116,dS=typeof Symbol=="function"&&Symbol.iterator;function By(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,a=1;aN_.length&&N_.push(i)}function aD(i,o,a,c){var _=typeof i;(_==="undefined"||_==="boolean")&&(i=null);var t=!1;if(i===null)t=!0;else switch(_){case"string":case"number":t=!0;break;case"object":switch(i.$$typeof){case by:case dI:t=!0}}if(t)return a(c,i,o===""?"."+fD(i,0):o),1;if(t=0,o=o===""?".":o+":",Array.isArray(i))for(var M=0;M{"use strict";var RI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";TS.exports=RI});var hD=Ke((_W,xS)=>{"use strict";var pD=function(){};process.env.NODE_ENV!=="production"&&(RS=CS(),F_={},AS=Function.call.bind(Object.prototype.hasOwnProperty),pD=function(i){var o="Warning: "+i;typeof console!="undefined"&&console.error(o);try{throw new Error(o)}catch(a){}});var RS,F_,AS;function OS(i,o,a,c,_){if(process.env.NODE_ENV!=="production"){for(var t in i)if(AS(i,t)){var M;try{if(typeof i[t]!="function"){var N=Error((c||"React class")+": "+a+" type `"+t+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[t]+"`.");throw N.name="Invariant Violation",N}M=i[t](o,t,c,a,null,RS)}catch(T){M=T}if(M&&!(M instanceof Error)&&pD((c||"React class")+": type specification of "+a+" `"+t+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof M+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),M instanceof Error&&!(M.message in F_)){F_[M.message]=!0;var O=_?_():"";pD("Failed "+a+" type: "+M.message+(O!=null?O:""))}}}}OS.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(F_={})};xS.exports=OS});var MS=Ke(Eu=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";var i=Iy(),o=hD(),a="16.13.1",c=typeof Symbol=="function"&&Symbol.for,_=c?Symbol.for("react.element"):60103,t=c?Symbol.for("react.portal"):60106,M=c?Symbol.for("react.fragment"):60107,N=c?Symbol.for("react.strict_mode"):60108,O=c?Symbol.for("react.profiler"):60114,T=c?Symbol.for("react.provider"):60109,B=c?Symbol.for("react.context"):60110,H=c?Symbol.for("react.concurrent_mode"):60111,q=c?Symbol.for("react.forward_ref"):60112,ne=c?Symbol.for("react.suspense"):60113,m=c?Symbol.for("react.suspense_list"):60120,pe=c?Symbol.for("react.memo"):60115,ge=c?Symbol.for("react.lazy"):60116,ve=c?Symbol.for("react.block"):60121,ue=c?Symbol.for("react.fundamental"):60117,_e=c?Symbol.for("react.responder"):60118,ce=c?Symbol.for("react.scope"):60119,me=typeof Symbol=="function"&&Symbol.iterator,re="@@iterator";function we(Q){if(Q===null||typeof Q!="object")return null;var Se=me&&Q[me]||Q[re];return typeof Se=="function"?Se:null}var Ie={current:null},je={suspense:null},ct={current:null},pt=/^(.*)[\\\/]/;function Xe(Q,Se,Ne){var Le="";if(Se){var ht=Se.fileName,Yn=ht.replace(pt,"");if(/^index\./.test(Yn)){var Cn=ht.match(pt);if(Cn){var cr=Cn[1];if(cr){var Si=cr.replace(pt,"");Yn=Si+"/"+Yn}}}Le=" (at "+Yn+":"+Se.lineNumber+")"}else Ne&&(Le=" (created by "+Ne+")");return` + in `+(Q||"Unknown")+Le}var tt=1;function He(Q){return Q._status===tt?Q._result:null}function kt(Q,Se,Ne){var Le=Se.displayName||Se.name||"";return Q.displayName||(Le!==""?Ne+"("+Le+")":Ne)}function zt(Q){if(Q==null)return null;if(typeof Q.tag=="number"&&dt("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof Q=="function")return Q.displayName||Q.name||null;if(typeof Q=="string")return Q;switch(Q){case M:return"Fragment";case t:return"Portal";case O:return"Profiler";case N:return"StrictMode";case ne:return"Suspense";case m:return"SuspenseList"}if(typeof Q=="object")switch(Q.$$typeof){case B:return"Context.Consumer";case T:return"Context.Provider";case q:return kt(Q,Q.render,"ForwardRef");case pe:return zt(Q.type);case ve:return zt(Q.render);case ge:{var Se=Q,Ne=He(Se);if(Ne)return zt(Ne);break}}return null}var nt={},X=null;function fe(Q){X=Q}nt.getCurrentStack=null,nt.getStackAddendum=function(){var Q="";if(X){var Se=zt(X.type),Ne=X._owner;Q+=Xe(Se,X._source,Ne&&zt(Ne.type))}var Le=nt.getCurrentStack;return Le&&(Q+=Le()||""),Q};var xe={current:!1},le={ReactCurrentDispatcher:Ie,ReactCurrentBatchConfig:je,ReactCurrentOwner:ct,IsSomeRendererActing:xe,assign:i};i(le,{ReactDebugCurrentFrame:nt,ReactComponentTreeHook:{}});function qe(Q){{for(var Se=arguments.length,Ne=new Array(Se>1?Se-1:0),Le=1;Le1?Se-1:0),Le=1;Le0&&typeof Ne[Ne.length-1]=="string"&&Ne[Ne.length-1].indexOf(` + in`)===0;if(!Le){var ht=le.ReactDebugCurrentFrame,Yn=ht.getStackAddendum();Yn!==""&&(Se+="%s",Ne=Ne.concat([Yn]))}var Cn=Ne.map(function(Mu){return""+Mu});Cn.unshift("Warning: "+Se),Function.prototype.apply.call(console[Q],console,Cn);try{var cr=0,Si="Warning: "+Se.replace(/%s/g,function(){return Ne[cr++]});throw new Error(Si)}catch(Mu){}}}var nn={};function an(Q,Se){{var Ne=Q.constructor,Le=Ne&&(Ne.displayName||Ne.name)||"ReactClass",ht=Le+"."+Se;if(nn[ht])return;dt("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",Se,Le),nn[ht]=!0}}var Mn={isMounted:function(Q){return!1},enqueueForceUpdate:function(Q,Se,Ne){an(Q,"forceUpdate")},enqueueReplaceState:function(Q,Se,Ne,Le){an(Q,"replaceState")},enqueueSetState:function(Q,Se,Ne,Le){an(Q,"setState")}},lr={};Object.freeze(lr);function ln(Q,Se,Ne){this.props=Q,this.context=Se,this.refs=lr,this.updater=Ne||Mn}ln.prototype.isReactComponent={},ln.prototype.setState=function(Q,Se){if(!(typeof Q=="object"||typeof Q=="function"||Q==null))throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,Q,Se,"setState")},ln.prototype.forceUpdate=function(Q){this.updater.enqueueForceUpdate(this,Q,"forceUpdate")};{var Gt={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},Er=function(Q,Se){Object.defineProperty(ln.prototype,Q,{get:function(){qe("%s(...) is deprecated in plain JavaScript React classes. %s",Se[0],Se[1])}})};for(var w in Gt)Gt.hasOwnProperty(w)&&Er(w,Gt[w])}function jt(){}jt.prototype=ln.prototype;function Xn(Q,Se,Ne){this.props=Q,this.context=Se,this.refs=lr,this.updater=Ne||Mn}var vr=Xn.prototype=new jt;vr.constructor=Xn,i(vr,ln.prototype),vr.isPureReactComponent=!0;function jr(){var Q={current:null};return Object.seal(Q),Q}var fr=Object.prototype.hasOwnProperty,zr={key:!0,ref:!0,__self:!0,__source:!0},Qt,wu,po;po={};function A0(Q){if(fr.call(Q,"ref")){var Se=Object.getOwnPropertyDescriptor(Q,"ref").get;if(Se&&Se.isReactWarning)return!1}return Q.ref!==void 0}function J0(Q){if(fr.call(Q,"key")){var Se=Object.getOwnPropertyDescriptor(Q,"key").get;if(Se&&Se.isReactWarning)return!1}return Q.key!==void 0}function Ps(Q,Se){var Ne=function(){Qt||(Qt=!0,dt("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",Se))};Ne.isReactWarning=!0,Object.defineProperty(Q,"key",{get:Ne,configurable:!0})}function Z0(Q,Se){var Ne=function(){wu||(wu=!0,dt("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",Se))};Ne.isReactWarning=!0,Object.defineProperty(Q,"ref",{get:Ne,configurable:!0})}function $0(Q){if(typeof Q.ref=="string"&&ct.current&&Q.__self&&ct.current.stateNode!==Q.__self){var Se=zt(ct.current.type);po[Se]||(dt('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref',zt(ct.current.type),Q.ref),po[Se]=!0)}}var Wt=function(Q,Se,Ne,Le,ht,Yn,Cn){var cr={$$typeof:_,type:Q,key:Se,ref:Ne,props:Cn,_owner:Yn};return cr._store={},Object.defineProperty(cr._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(cr,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Le}),Object.defineProperty(cr,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ht}),Object.freeze&&(Object.freeze(cr.props),Object.freeze(cr)),cr};function xi(Q,Se,Ne){var Le,ht={},Yn=null,Cn=null,cr=null,Si=null;if(Se!=null){A0(Se)&&(Cn=Se.ref,$0(Se)),J0(Se)&&(Yn=""+Se.key),cr=Se.__self===void 0?null:Se.__self,Si=Se.__source===void 0?null:Se.__source;for(Le in Se)fr.call(Se,Le)&&!zr.hasOwnProperty(Le)&&(ht[Le]=Se[Le])}var Mu=arguments.length-2;if(Mu===1)ht.children=Ne;else if(Mu>1){for(var zu=Array(Mu),Hu=0;Hu1){for(var Su=Array(Hu),Ti=0;Ti is not supported and will be removed in a future major release. Did you mean to render instead?")),Ne.Provider},set:function(Cn){Ne.Provider=Cn}},_currentValue:{get:function(){return Ne._currentValue},set:function(Cn){Ne._currentValue=Cn}},_currentValue2:{get:function(){return Ne._currentValue2},set:function(Cn){Ne._currentValue2=Cn}},_threadCount:{get:function(){return Ne._threadCount},set:function(Cn){Ne._threadCount=Cn}},Consumer:{get:function(){return Le||(Le=!0,dt("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),Ne.Consumer}}}),Ne.Consumer=Yn}return Ne._currentRenderer=null,Ne._currentRenderer2=null,Ne}function Vt(Q){var Se={$$typeof:ge,_ctor:Q,_status:-1,_result:null};{var Ne,Le;Object.defineProperties(Se,{defaultProps:{configurable:!0,get:function(){return Ne},set:function(ht){dt("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),Ne=ht,Object.defineProperty(Se,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return Le},set:function(ht){dt("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),Le=ht,Object.defineProperty(Se,"propTypes",{enumerable:!0})}}})}return Se}function Au(Q){return Q!=null&&Q.$$typeof===pe?dt("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof Q!="function"?dt("forwardRef requires a render function but was given %s.",Q===null?"null":typeof Q):Q.length!==0&&Q.length!==2&&dt("forwardRef render functions accept exactly two parameters: props and ref. %s",Q.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),Q!=null&&(Q.defaultProps!=null||Q.propTypes!=null)&&dt("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:q,render:Q}}function eu(Q){return typeof Q=="string"||typeof Q=="function"||Q===M||Q===H||Q===O||Q===N||Q===ne||Q===m||typeof Q=="object"&&Q!==null&&(Q.$$typeof===ge||Q.$$typeof===pe||Q.$$typeof===T||Q.$$typeof===B||Q.$$typeof===q||Q.$$typeof===ue||Q.$$typeof===_e||Q.$$typeof===ce||Q.$$typeof===ve)}function Jo(Q,Se){return eu(Q)||dt("memo: The first argument must be a component. Instead received: %s",Q===null?"null":typeof Q),{$$typeof:pe,type:Q,compare:Se===void 0?null:Se}}function Yi(){var Q=Ie.current;if(Q===null)throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: +1. You might have mismatching versions of React and the renderer (such as React DOM) +2. You might be breaking the Rules of Hooks +3. You might have more than one copy of React in the same app +See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.`);return Q}function Ql(Q,Se){var Ne=Yi();if(Se!==void 0&&dt("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",Se,typeof Se=="number"&&Array.isArray(arguments[2])?` + +Did you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://fb.me/rules-of-hooks`:""),Q._context!==void 0){var Le=Q._context;Le.Consumer===Q?dt("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):Le.Provider===Q&&dt("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return Ne.useContext(Q,Se)}function k0(Q){var Se=Yi();return Se.useState(Q)}function ai(Q,Se,Ne){var Le=Yi();return Le.useReducer(Q,Se,Ne)}function f0(Q){var Se=Yi();return Se.useRef(Q)}function Jl(Q,Se){var Ne=Yi();return Ne.useEffect(Q,Se)}function L0(Q,Se){var Ne=Yi();return Ne.useLayoutEffect(Q,Se)}function bs(Q,Se){var Ne=Yi();return Ne.useCallback(Q,Se)}function $n(Q,Se){var Ne=Yi();return Ne.useMemo(Q,Se)}function tl(Q,Se,Ne){var Le=Yi();return Le.useImperativeHandle(Q,Se,Ne)}function c0(Q,Se){{var Ne=Yi();return Ne.useDebugValue(Q,Se)}}var bo;bo=!1;function Sl(){if(ct.current){var Q=zt(ct.current.type);if(Q)return` + +Check the render method of \``+Q+"`."}return""}function N0(Q){if(Q!==void 0){var Se=Q.fileName.replace(/^.*[\\\/]/,""),Ne=Q.lineNumber;return` + +Check your code at `+Se+":"+Ne+"."}return""}function wt(Q){return Q!=null?N0(Q.__source):""}var bt={};function Hn(Q){var Se=Sl();if(!Se){var Ne=typeof Q=="string"?Q:Q.displayName||Q.name;Ne&&(Se=` + +Check the top-level render call using <`+Ne+">.")}return Se}function qr(Q,Se){if(!(!Q._store||Q._store.validated||Q.key!=null)){Q._store.validated=!0;var Ne=Hn(Se);if(!bt[Ne]){bt[Ne]=!0;var Le="";Q&&Q._owner&&Q._owner!==ct.current&&(Le=" It was passed a child from "+zt(Q._owner.type)+"."),fe(Q),dt('Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',Ne,Le),fe(null)}}}function Ki(Q,Se){if(typeof Q=="object"){if(Array.isArray(Q))for(var Ne=0;Ne",ht=" Did you accidentally export a JSX literal instead of a component?"):Cn=typeof Q,dt("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Cn,ht)}var cr=xi.apply(this,arguments);if(cr==null)return cr;if(Le)for(var Si=2;Si{"use strict";process.env.NODE_ENV==="production"?vD.exports=SS():vD.exports=MS()});var kS=Ke((Wv,Uy)=>{(function(){var i,o="4.17.21",a=200,c="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",_="Expected a function",t="Invalid `variable` option passed into `_.template`",M="__lodash_hash_undefined__",N=500,O="__lodash_placeholder__",T=1,B=2,H=4,q=1,ne=2,m=1,pe=2,ge=4,ve=8,ue=16,_e=32,ce=64,me=128,re=256,we=512,Ie=30,je="...",ct=800,pt=16,Xe=1,tt=2,He=3,kt=1/0,zt=9007199254740991,nt=17976931348623157e292,X=0/0,fe=4294967295,xe=fe-1,le=fe>>>1,qe=[["ary",me],["bind",m],["bindKey",pe],["curry",ve],["curryRight",ue],["flip",we],["partial",_e],["partialRight",ce],["rearg",re]],dt="[object Arguments]",Rt="[object Array]",nn="[object AsyncFunction]",an="[object Boolean]",Mn="[object Date]",lr="[object DOMException]",ln="[object Error]",Gt="[object Function]",Er="[object GeneratorFunction]",w="[object Map]",jt="[object Number]",Xn="[object Null]",vr="[object Object]",jr="[object Promise]",fr="[object Proxy]",zr="[object RegExp]",Qt="[object Set]",wu="[object String]",po="[object Symbol]",A0="[object Undefined]",J0="[object WeakMap]",Ps="[object WeakSet]",Z0="[object ArrayBuffer]",$0="[object DataView]",Wt="[object Float32Array]",xi="[object Float64Array]",su="[object Int8Array]",mi="[object Int16Array]",Dr="[object Int32Array]",el="[object Uint8Array]",Ko="[object Uint8ClampedArray]",Uu="[object Uint16Array]",Xo="[object Uint32Array]",Xr=/\b__p \+= '';/g,O0=/\b(__p \+=) '' \+/g,M0=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Po=/&(?:amp|lt|gt|quot|#39);/g,au=/[&<>"']/g,ki=RegExp(Po.source),Is=RegExp(au.source),Xl=/<%-([\s\S]+?)%>/g,Io=/<%([\s\S]+?)%>/g,ho=/<%=([\s\S]+?)%>/g,Hr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ri=/^\w*$/,Qo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yi=/[\\^$.*+?()[\]{}|]/g,en=RegExp(yi.source),bn=/^\s+/,Ai=/\s/,gi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Vt=/\{\n\/\* \[wrapped with (.+)\] \*/,Au=/,? & /,eu=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Jo=/[()=,{}\[\]\/\s]/,Yi=/\\(\\)?/g,Ql=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,k0=/\w*$/,ai=/^[-+]0x[0-9a-f]+$/i,f0=/^0b[01]+$/i,Jl=/^\[object .+?Constructor\]$/,L0=/^0o[0-7]+$/i,bs=/^(?:0|[1-9]\d*)$/,$n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tl=/($^)/,c0=/['\n\r\u2028\u2029\\]/g,bo="\\ud800-\\udfff",Sl="\\u0300-\\u036f",N0="\\ufe20-\\ufe2f",wt="\\u20d0-\\u20ff",bt=Sl+N0+wt,Hn="\\u2700-\\u27bf",qr="a-z\\xdf-\\xf6\\xf8-\\xff",Ki="\\xac\\xb1\\xd7\\xf7",Qr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ou="\\u2000-\\u206f",vo=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Li="A-Z\\xc0-\\xd6\\xd8-\\xde",mo="\\ufe0e\\ufe0f",vs=Ki+Qr+Ou+vo,Tt="['\u2019]",d0="["+bo+"]",nl="["+vs+"]",Zl="["+bt+"]",ju="\\d+",ms="["+Hn+"]",Bo="["+qr+"]",Q="[^"+bo+vs+ju+Hn+qr+Li+"]",Se="\\ud83c[\\udffb-\\udfff]",Ne="(?:"+Zl+"|"+Se+")",Le="[^"+bo+"]",ht="(?:\\ud83c[\\udde6-\\uddff]){2}",Yn="[\\ud800-\\udbff][\\udc00-\\udfff]",Cn="["+Li+"]",cr="\\u200d",Si="(?:"+Bo+"|"+Q+")",Mu="(?:"+Cn+"|"+Q+")",zu="(?:"+Tt+"(?:d|ll|m|re|s|t|ve))?",Hu="(?:"+Tt+"(?:D|LL|M|RE|S|T|VE))?",Su=Ne+"?",Ti="["+mo+"]?",F0="(?:"+cr+"(?:"+[Le,ht,Yn].join("|")+")"+Ti+Su+")*",ku="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",p0="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",qu=Ti+Su+F0,Ia="(?:"+[ms,ht,Yn].join("|")+")"+qu,yo="(?:"+[Le+Zl+"?",Zl,ht,Yn,d0].join("|")+")",ua=RegExp(Tt,"g"),Zo=RegExp(Zl,"g"),oa=RegExp(Se+"(?="+Se+")|"+yo+qu,"g"),ba=RegExp([Cn+"?"+Bo+"+"+zu+"(?="+[nl,Cn,"$"].join("|")+")",Mu+"+"+Hu+"(?="+[nl,Cn+Si,"$"].join("|")+")",Cn+"?"+Si+"+"+zu,Cn+"+"+Hu,p0,ku,ju,Ia].join("|"),"g"),ys=RegExp("["+cr+bo+bt+mo+"]"),To=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Qn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],fc=-1,fi={};fi[Wt]=fi[xi]=fi[su]=fi[mi]=fi[Dr]=fi[el]=fi[Ko]=fi[Uu]=fi[Xo]=!0,fi[dt]=fi[Rt]=fi[Z0]=fi[an]=fi[$0]=fi[Mn]=fi[ln]=fi[Gt]=fi[w]=fi[jt]=fi[vr]=fi[zr]=fi[Qt]=fi[wu]=fi[J0]=!1;var $r={};$r[dt]=$r[Rt]=$r[Z0]=$r[$0]=$r[an]=$r[Mn]=$r[Wt]=$r[xi]=$r[su]=$r[mi]=$r[Dr]=$r[w]=$r[jt]=$r[vr]=$r[zr]=$r[Qt]=$r[wu]=$r[po]=$r[el]=$r[Ko]=$r[Uu]=$r[Xo]=!0,$r[ln]=$r[Gt]=$r[J0]=!1;var $l={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},la={"&":"&","<":"<",">":">",'"':""","'":"'"},hf={"&":"&","<":"<",">":">",""":'"',"'":"'"},Bs={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ba=parseFloat,Us=parseInt,go=typeof global=="object"&&global&&global.Object===Object&&global,js=typeof self=="object"&&self&&self.Object===Object&&self,ji=go||js||Function("return this")(),U=typeof Wv=="object"&&Wv&&!Wv.nodeType&&Wv,z=U&&typeof Uy=="object"&&Uy&&!Uy.nodeType&&Uy,G=z&&z.exports===U,$=G&&go.process,Ce=function(){try{var Re=z&&z.require&&z.require("util").types;return Re||$&&$.binding&&$.binding("util")}catch(rt){}}(),Ee=Ce&&Ce.isArrayBuffer,Ae=Ce&&Ce.isDate,Z=Ce&&Ce.isMap,ke=Ce&&Ce.isRegExp,Je=Ce&&Ce.isSet,mt=Ce&&Ce.isTypedArray;function oe(Re,rt,Ye){switch(Ye.length){case 0:return Re.call(rt);case 1:return Re.call(rt,Ye[0]);case 2:return Re.call(rt,Ye[0],Ye[1]);case 3:return Re.call(rt,Ye[0],Ye[1],Ye[2])}return Re.apply(rt,Ye)}function We(Re,rt,Ye,Kt){for(var Xt=-1,pr=Re==null?0:Re.length;++Xt-1}function rn(Re,rt,Ye){for(var Kt=-1,Xt=Re==null?0:Re.length;++Kt-1;);return Ye}function Tl(Re,rt){for(var Ye=Re.length;Ye--&&Dt(rt,Re[Ye],0)>-1;);return Ye}function mf(Re,rt){for(var Ye=Re.length,Kt=0;Ye--;)Re[Ye]===rt&&++Kt;return Kt}var I0=Jn($l),gs=Jn(la);function zs(Re){return"\\"+Bs[Re]}function b0(Re,rt){return Re==null?i:Re[rt]}function B0(Re){return ys.test(Re)}function _s(Re){return To.test(Re)}function Qu(Re){for(var rt,Ye=[];!(rt=Re.next()).done;)Ye.push(rt.value);return Ye}function Tu(Re){var rt=-1,Ye=Array(Re.size);return Re.forEach(function(Kt,Xt){Ye[++rt]=[Xt,Kt]}),Ye}function Ei(Re,rt){return function(Ye){return Re(rt(Ye))}}function xo(Re,rt){for(var Ye=-1,Kt=Re.length,Xt=0,pr=[];++Ye-1}function ca(p,v){var x=this.__data__,P=ns(x,p);return P<0?(++this.size,x.push([p,v])):x[P][1]=v,this}u0.prototype.clear=Ua,u0.prototype.delete=Ef,u0.prototype.get=cc,u0.prototype.has=ws,u0.prototype.set=ca;function jo(p){var v=-1,x=p==null?0:p.length;for(this.clear();++v=v?p:v)),p}function zo(p,v,x,P,W,ee){var he,De=v&T,be=v&B,Et=v&H;if(x&&(he=W?x(p,P,W,ee):x(p)),he!==i)return he;if(!bu(p))return p;var St=tr(p);if(St){if(he=xs(p),!De)return iu(p,he)}else{var At=Iu(p),on=At==Gt||At==Er;if(Zs(p))return mc(p,De);if(At==vr||At==dt||on&&!W){if(he=be||on?{}:Dc(p),!De)return be?rs(p,ol(he,p)):oo(p,Df(he,p))}else{if(!$r[At])return W?p:{};he=Th(p,At,De)}}ee||(ee=new ul);var kn=ee.get(p);if(kn)return kn;ee.set(p,he),bd(p)?p.forEach(function(ar){he.add(zo(ar,v,x,ar,p,ee))}):Dp(p)&&p.forEach(function(ar,ui){he.set(ui,zo(ar,v,x,ui,p,ee))});var rr=Et?be?sr:r1:be?dn:No,br=St?i:rr(p);return it(br||p,function(ar,ui){br&&(ui=ar,ar=p[ui]),Ts(he,ui,zo(ar,v,x,ui,p,ee))}),he}function wf(p){var v=No(p);return function(x){return Wc(x,p,v)}}function Wc(p,v,x){var P=x.length;if(p==null)return!P;for(p=xn(p);P--;){var W=x[P],ee=v[W],he=p[W];if(he===i&&!(W in p)||!ee(he))return!1}return!0}function pc(p,v,x){if(typeof p!="function")throw new ti(_);return Ja(function(){p.apply(i,x)},v)}function Ol(p,v,x,P){var W=-1,ee=sn,he=!0,De=p.length,be=[],Et=v.length;if(!De)return be;x&&(v=Ft(v,_i(x))),P?(ee=rn,he=!1):v.length>=a&&(ee=rl,he=!1,v=new y0(v));e:for(;++WW?0:W+x),P=P===i||P>W?W:Mr(P),P<0&&(P+=W),P=x>P?0:Sp(P);x0&&x(De)?v>1?qi(De,v-1,x,P,W):Dn(W,De):P||(W[W.length]=De)}return W}var g=gc(),y=gc(!0);function R(p,v){return p&&g(p,v,No)}function F(p,v){return p&&y(p,v,No)}function b(p,v){return It(v,function(x){return Ra(p[x])})}function J(p,v){v=Vs(v,p);for(var x=0,P=v.length;p!=null&&xv}function Lt(p,v){return p!=null&&li.call(p,v)}function xr(p,v){return p!=null&&v in xn(p)}function io(p,v,x){return p>=Kn(v,x)&&p=120&&St.length>=120)?new y0(he&&St):i}St=p[0];var At=-1,on=De[0];e:for(;++At-1;)De!==p&&Mo.call(De,be,1),Mo.call(p,be,1);return p}function ad(p,v){for(var x=p?v.length:0,P=x-1;x--;){var W=v[x];if(x==P||W!==ee){var ee=W;D0(W)?Mo.call(p,W,1):A2(p,W)}}return p}function fd(p,v){return p+Ds(Do()*(v-p+1))}function C2(p,v,x,P){for(var W=-1,ee=ni($u((v-p)/(x||1)),0),he=Ye(ee);ee--;)he[P?ee:++W]=p,p+=x;return he}function Yc(p,v){var x="";if(!p||v<1||v>zt)return x;do v%2&&(x+=p),v=Ds(v/2),v&&(p+=p);while(v);return x}function Ir(p,v){return l1(P2(p,v,so),p+"")}function cd(p){return Ha(Nc(p))}function dd(p,v){var x=Nc(p);return Sc(x,ro(v,0,x.length))}function Ya(p,v,x,P){if(!bu(p))return p;v=Vs(v,p);for(var W=-1,ee=v.length,he=ee-1,De=p;De!=null&&++WW?0:W+v),x=x>W?W:x,x<0&&(x+=W),W=v>x?0:x-v>>>0,v>>>=0;for(var ee=Ye(W);++P>>1,he=p[ee];he!==null&&!Bl(he)&&(x?he<=v:he=a){var Et=v?null:fm(p);if(Et)return e0(Et);he=!1,W=rl,be=new y0}else be=v?[]:De;e:for(;++P=P?p:sl(p,v,x)}var Zc=Es||function(p){return ji.clearTimeout(p)};function mc(p,v){if(v)return p.slice();var x=p.length,P=Hi?Hi(x):new p.constructor(x);return p.copy(P),P}function yc(p){var v=new p.constructor(p.byteLength);return new Oo(v).set(new Oo(p)),v}function hd(p,v){var x=v?yc(p.buffer):p.buffer;return new p.constructor(x,p.byteOffset,p.byteLength)}function Eh(p){var v=new p.constructor(p.source,k0.exec(p));return v.lastIndex=p.lastIndex,v}function Cf(p){return Ar?xn(Ar.call(p)):{}}function $c(p,v){var x=v?yc(p.buffer):p.buffer;return new p.constructor(x,p.byteOffset,p.length)}function Dh(p,v){if(p!==v){var x=p!==i,P=p===null,W=p===p,ee=Bl(p),he=v!==i,De=v===null,be=v===v,Et=Bl(v);if(!De&&!Et&&!ee&&p>v||ee&&he&&be&&!De&&!Et||P&&he&&be||!x&&be||!W)return 1;if(!P&&!ee&&!Et&&p=De)return be;var Et=x[P];return be*(Et=="desc"?-1:1)}}return p.index-v.index}function Gs(p,v,x,P){for(var W=-1,ee=p.length,he=x.length,De=-1,be=v.length,Et=ni(ee-he,0),St=Ye(be+Et),At=!P;++De1?x[W-1]:i,he=W>2?x[2]:i;for(ee=p.length>3&&typeof ee=="function"?(W--,ee):i,he&&s0(x[0],x[1],he)&&(ee=W<3?i:ee,W=1),v=xn(v);++P-1?W[ee?v[he]:he]:i}}function t1(p){return cl(function(v){var x=v.length,P=x,W=Vr.prototype.thru;for(p&&v.reverse();P--;){var ee=v[P];if(typeof ee!="function")throw new ti(_);if(W&&!he&&q0(ee)=="wrapper")var he=new Vr([],!0)}for(P=he?P:x;++P1&&di.reverse(),St&&beDe))return!1;var Et=ee.get(p),St=ee.get(v);if(Et&&St)return Et==v&&St==p;var At=-1,on=!0,kn=x&ne?new y0:i;for(ee.set(p,v),ee.set(v,p);++At1?"& ":"")+v[P],v=v.join(x>2?", ":" "),p.replace(gi,`{ +/* [wrapped with `+v+`] */ +`)}function us(p){return tr(p)||pl(p)||!!(v0&&p&&p[v0])}function D0(p,v){var x=typeof p;return v=v==null?zt:v,!!v&&(x=="number"||x!="symbol"&&bs.test(p))&&p>-1&&p%1==0&&p0){if(++v>=ct)return arguments[0]}else v=0;return p.apply(i,arguments)}}function Sc(p,v){var x=-1,P=p.length,W=P-1;for(v=v===i?P:v;++x1?p[v-1]:i;return x=typeof x=="function"?(p.pop(),x):i,Td(p,x)});function zh(p){var v=Y(p);return v.__chain__=!0,v}function Hh(p,v){return v(p),p}function g1(p,v){return v(p)}var $2=cl(function(p){var v=p.length,x=v?p[0]:0,P=this.__wrapped__,W=function(ee){return Wa(ee,p)};return v>1||this.__actions__.length||!(P instanceof at)||!D0(x)?this.thru(W):(P=P.slice(x,+x+(v?1:0)),P.__actions__.push({func:g1,args:[W],thisArg:i}),new Vr(P,this.__chain__).thru(function(ee){return v&&!ee.length&&ee.push(i),ee}))});function qh(){return zh(this)}function ep(){return new Vr(this.value(),this.__chain__)}function Wh(){this.__values__===i&&(this.__values__=fv(this.value()));var p=this.__index__>=this.__values__.length,v=p?i:this.__values__[this.__index__++];return{done:p,value:v}}function _m(){return this}function Em(p){for(var v,x=this;x instanceof ii;){var P=b2(x);P.__index__=0,P.__values__=i,v?W.__wrapped__=P:v=P;var W=P;x=x.__wrapped__}return W.__wrapped__=p,v}function If(){var p=this.__wrapped__;if(p instanceof at){var v=p;return this.__actions__.length&&(v=new at(this)),v=v.reverse(),v.__actions__.push({func:g1,args:[G2],thisArg:i}),new Vr(v,this.__chain__)}return this.thru(G2)}function bf(){return _h(this.__wrapped__,this.__actions__)}var Cd=Ka(function(p,v,x){li.call(p,x)?++p[x]:Gu(p,x,1)});function Dm(p,v,x){var P=tr(p)?Mt:od;return x&&s0(p,v,x)&&(v=i),P(p,Vn(v,3))}function tp(p,v){var x=tr(p)?It:Vc;return x(p,Vn(v,3))}var xd=Ll(z2),np=Ll(a1);function Vh(p,v){return qi(_1(p,v),1)}function rp(p,v){return qi(_1(p,v),kt)}function Gh(p,v,x){return x=x===i?1:Mr(x),qi(_1(p,v),x)}function Yh(p,v){var x=tr(p)?it:Cs;return x(p,Vn(v,3))}function ip(p,v){var x=tr(p)?Ct:pa;return x(p,Vn(v,3))}var wm=Ka(function(p,v,x){li.call(p,x)?p[x].push(v):Gu(p,x,[v])});function Sm(p,v,x,P){p=hl(p)?p:Nc(p),x=x&&!P?Mr(x):0;var W=p.length;return x<0&&(x=ni(W+x,0)),S1(p)?x<=W&&p.indexOf(v,x)>-1:!!W&&Dt(p,v,x)>-1}var Tm=Ir(function(p,v,x){var P=-1,W=typeof v=="function",ee=hl(p)?Ye(p.length):[];return Cs(p,function(he){ee[++P]=W?oe(v,he,x):Ml(he,v,x)}),ee}),Kh=Ka(function(p,v,x){Gu(p,x,v)});function _1(p,v){var x=tr(p)?Ft:S2;return x(p,Vn(v,3))}function Cm(p,v,x,P){return p==null?[]:(tr(v)||(v=v==null?[]:[v]),x=P?i:x,tr(x)||(x=x==null?[]:[x]),g0(p,v,x))}var up=Ka(function(p,v,x){p[x?0:1].push(v)},function(){return[[],[]]});function op(p,v,x){var P=tr(p)?dr:wr,W=arguments.length<3;return P(p,Vn(v,4),x,W,Cs)}function xm(p,v,x){var P=tr(p)?er:wr,W=arguments.length<3;return P(p,Vn(v,4),x,W,pa)}function Rm(p,v){var x=tr(p)?It:Vc;return x(p,Od(Vn(v,3)))}function Xh(p){var v=tr(p)?Ha:cd;return v(p)}function Am(p,v,x){(x?s0(p,v,x):v===i)?v=1:v=Mr(v);var P=tr(p)?qa:dd;return P(p,v)}function Om(p){var v=tr(p)?da:ll;return v(p)}function lp(p){if(p==null)return 0;if(hl(p))return S1(p)?tu(p):p.length;var v=Iu(p);return v==w||v==Qt?p.size:Va(p).length}function sp(p,v,x){var P=tr(p)?Cr:yh;return x&&s0(p,v,x)&&(v=i),P(p,Vn(v,3))}var Ca=Ir(function(p,v){if(p==null)return[];var x=v.length;return x>1&&s0(p,v[0],v[1])?v=[]:x>2&&s0(v[0],v[1],v[2])&&(v=[v[0]]),g0(p,qi(v,1),[])}),E1=fa||function(){return ji.Date.now()};function ap(p,v){if(typeof v!="function")throw new ti(_);return p=Mr(p),function(){if(--p<1)return v.apply(this,arguments)}}function Qh(p,v,x){return v=x?i:v,v=p&&v==null?p.length:v,hn(p,me,i,i,i,i,v)}function Rd(p,v){var x;if(typeof v!="function")throw new ti(_);return p=Mr(p),function(){return--p>0&&(x=v.apply(this,arguments)),p<=1&&(v=i),x}}var D1=Ir(function(p,v,x){var P=m;if(x.length){var W=xo(x,yr(D1));P|=_e}return hn(p,P,v,x,W)}),Jh=Ir(function(p,v,x){var P=m|pe;if(x.length){var W=xo(x,yr(Jh));P|=_e}return hn(v,P,p,x,W)});function fp(p,v,x){v=x?i:v;var P=hn(p,ve,i,i,i,i,i,v);return P.placeholder=fp.placeholder,P}function Zh(p,v,x){v=x?i:v;var P=hn(p,ue,i,i,i,i,i,v);return P.placeholder=Zh.placeholder,P}function cp(p,v,x){var P,W,ee,he,De,be,Et=0,St=!1,At=!1,on=!0;if(typeof p!="function")throw new ti(_);v=vl(v)||0,bu(x)&&(St=!!x.leading,At="maxWait"in x,ee=At?ni(vl(x.maxWait)||0,v):ee,on="trailing"in x?!!x.trailing:on);function kn(ao){var Ms=P,C0=W;return P=W=i,Et=ao,he=p.apply(C0,Ms),he}function rr(ao){return Et=ao,De=Ja(ui,v),St?kn(ao):he}function br(ao){var Ms=ao-be,C0=ao-Et,kv=v-Ms;return At?Kn(kv,ee-C0):kv}function ar(ao){var Ms=ao-be,C0=ao-Et;return be===i||Ms>=v||Ms<0||At&&C0>=ee}function ui(){var ao=E1();if(ar(ao))return di(ao);De=Ja(ui,br(ao))}function di(ao){return De=i,on&&P?kn(ao):(P=W=i,he)}function zl(){De!==i&&Zc(De),Et=0,P=be=W=De=i}function Zi(){return De===i?he:di(E1())}function a0(){var ao=E1(),Ms=ar(ao);if(P=arguments,W=this,be=ao,Ms){if(De===i)return rr(be);if(At)return Zc(De),De=Ja(ui,v),kn(be)}return De===i&&(De=Ja(ui,v)),he}return a0.cancel=zl,a0.flush=Zi,a0}var $h=Ir(function(p,v){return pc(p,1,v)}),ev=Ir(function(p,v,x){return pc(p,vl(v)||0,x)});function dp(p){return hn(p,we)}function Ad(p,v){if(typeof p!="function"||v!=null&&typeof v!="function")throw new ti(_);var x=function(){var P=arguments,W=v?v.apply(this,P):P[0],ee=x.cache;if(ee.has(W))return ee.get(W);var he=p.apply(this,P);return x.cache=ee.set(W,he)||ee,he};return x.cache=new(Ad.Cache||jo),x}Ad.Cache=jo;function Od(p){if(typeof p!="function")throw new ti(_);return function(){var v=arguments;switch(v.length){case 0:return!p.call(this);case 1:return!p.call(this,v[0]);case 2:return!p.call(this,v[0],v[1]);case 3:return!p.call(this,v[0],v[1],v[2])}return!p.apply(this,v)}}function qo(p){return Rd(2,p)}var Md=k2(function(p,v){v=v.length==1&&tr(v[0])?Ft(v[0],_i(Vn())):Ft(qi(v,1),_i(Vn()));var x=v.length;return Ir(function(P){for(var W=-1,ee=Kn(P.length,x);++W=v}),pl=uo(function(){return arguments}())?uo:function(p){return Yu(p)&&li.call(p,"callee")&&!Uo.call(p,"callee")},tr=Ye.isArray,Js=Ee?_i(Ee):Ve;function hl(p){return p!=null&&Pd(p.length)&&!Ra(p)}function lo(p){return Yu(p)&&hl(p)}function rv(p){return p===!0||p===!1||Yu(p)&>(p)==an}var Zs=r0||jp,yp=Ae?_i(Ae):ze;function Fm(p){return Yu(p)&&p.nodeType===1&&!xc(p)}function iv(p){if(p==null)return!0;if(hl(p)&&(tr(p)||typeof p=="string"||typeof p.splice=="function"||Zs(p)||Aa(p)||pl(p)))return!p.length;var v=Iu(p);if(v==w||v==Qt)return!p.size;if(Nf(p))return!Va(p).length;for(var x in p)if(li.call(p,x))return!1;return!0}function gp(p,v){return lt(p,v)}function Pm(p,v,x){x=typeof x=="function"?x:i;var P=x?x(p,v):i;return P===i?lt(p,v,i,x):!!P}function _p(p){if(!Yu(p))return!1;var v=gt(p);return v==ln||v==lr||typeof p.message=="string"&&typeof p.name=="string"&&!xc(p)}function Cc(p){return typeof p=="number"&&nu(p)}function Ra(p){if(!bu(p))return!1;var v=gt(p);return v==Gt||v==Er||v==nn||v==fr}function Ep(p){return typeof p=="number"&&p==Mr(p)}function Pd(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=zt}function bu(p){var v=typeof p;return p!=null&&(v=="object"||v=="function")}function Yu(p){return p!=null&&typeof p=="object"}var Dp=Z?_i(Z):Wn;function wp(p,v){return p===v||si(p,v,jn(v))}function uv(p,v,x){return x=typeof x=="function"?x:i,si(p,v,jn(v),x)}function Im(p){return ov(p)&&p!=+p}function bm(p){if(Nl(p))throw new Xt(c);return ur(p)}function Bm(p){return p===null}function Id(p){return p==null}function ov(p){return typeof p=="number"||Yu(p)&>(p)==jt}function xc(p){if(!Yu(p)||gt(p)!=vr)return!1;var v=il(p);if(v===null)return!0;var x=li.call(v,"constructor")&&v.constructor;return typeof x=="function"&&x instanceof x&&Fu.call(x)==aa}var w1=ke?_i(ke):ci;function Um(p){return Ep(p)&&p>=-zt&&p<=zt}var bd=Je?_i(Je):Qi;function S1(p){return typeof p=="string"||!tr(p)&&Yu(p)&>(p)==wu}function Bl(p){return typeof p=="symbol"||Yu(p)&>(p)==po}var Aa=mt?_i(mt):Gr;function lv(p){return p===i}function jm(p){return Yu(p)&&Iu(p)==J0}function sv(p){return Yu(p)&>(p)==Ps}var av=yd(ld),zm=yd(function(p,v){return p<=v});function fv(p){if(!p)return[];if(hl(p))return S1(p)?ei(p):iu(p);if(Pu&&p[Pu])return Qu(p[Pu]());var v=Iu(p),x=v==w?Tu:v==Qt?e0:Nc;return x(p)}function Oa(p){if(!p)return p===0?p:0;if(p=vl(p),p===kt||p===-kt){var v=p<0?-1:1;return v*nt}return p===p?p:0}function Mr(p){var v=Oa(p),x=v%1;return v===v?x?v-x:v:0}function Sp(p){return p?ro(Mr(p),0,fe):0}function vl(p){if(typeof p=="number")return p;if(Bl(p))return X;if(bu(p)){var v=typeof p.valueOf=="function"?p.valueOf():p;p=bu(v)?v+"":v}if(typeof p!="string")return p===0?p:+p;p=Nu(p);var x=f0.test(p);return x||L0.test(p)?Us(p.slice(2),x?2:8):ai.test(p)?X:+p}function gu(p){return ko(p,dn(p))}function T1(p){return p?ro(Mr(p),-zt,zt):p===0?p:0}function Ui(p){return p==null?"":al(p)}var Tp=o0(function(p,v){if(Nf(v)||hl(v)){ko(v,No(v),p);return}for(var x in v)li.call(v,x)&&Ts(p,x,v[x])}),Bd=o0(function(p,v){ko(v,dn(v),p)}),T0=o0(function(p,v,x,P){ko(v,dn(v),p,P)}),Os=o0(function(p,v,x,P){ko(v,No(v),p,P)}),Bf=cl(Wa);function Ud(p,v){var x=ri(p);return v==null?x:Df(x,v)}var Cp=Ir(function(p,v){p=xn(p);var x=-1,P=v.length,W=P>2?v[2]:i;for(W&&s0(v[0],v[1],W)&&(P=1);++x1),ee}),ko(p,sr(p),x),P&&(x=zo(x,T|B|H,cm));for(var W=v.length;W--;)A2(x,v[W]);return x});function A1(p,v){return tf(p,Od(Vn(v)))}var Ap=cl(function(p,v){return p==null?{}:vh(p,v)});function tf(p,v){if(p==null)return{};var x=Ft(sr(p),function(P){return[P]});return v=Vn(v),mh(p,x,function(P,W){return v(P,W[0])})}function Hm(p,v,x){v=Vs(v,p);var P=-1,W=v.length;for(W||(W=1,p=i);++Pv){var P=p;p=v,v=P}if(x||p%1||v%1){var W=Do();return Kn(p+W*(v-p+Ba("1e-"+((W+"").length-1))),v)}return fd(p,v)}var Gd=xf(function(p,v,x){return v=v.toLowerCase(),p+(x?W0(v):v)});function W0(p){return kp(Ui(p).toLowerCase())}function Yd(p){return p=Ui(p),p&&p.replace($n,I0).replace(Zo,"")}function Wm(p,v,x){p=Ui(p),v=al(v);var P=p.length;x=x===i?P:ro(Mr(x),0,P);var W=x;return x-=v.length,x>=0&&p.slice(x,W)==v}function k1(p){return p=Ui(p),p&&Is.test(p)?p.replace(au,gs):p}function Vm(p){return p=Ui(p),p&&en.test(p)?p.replace(yi,"\\$&"):p}var Gm=xf(function(p,v,x){return p+(x?"-":"")+v.toLowerCase()}),dv=xf(function(p,v,x){return p+(x?" ":"")+v.toLowerCase()}),Ym=wh("toLowerCase");function pv(p,v,x){p=Ui(p),v=Mr(v);var P=v?tu(p):0;if(!v||P>=v)return p;var W=(v-P)/2;return Ea(Ds(W),x)+p+Ea($u(W),x)}function Km(p,v,x){p=Ui(p),v=Mr(v);var P=v?tu(p):0;return v&&P>>0,x?(p=Ui(p),p&&(typeof v=="string"||v!=null&&!w1(v))&&(v=al(v),!v&&B0(p))?ma(ei(p),0,x):p.split(v,x)):[]}var Hf=xf(function(p,v,x){return p+(x?" ":"")+kp(v)});function vv(p,v,x){return p=Ui(p),x=x==null?0:ro(Mr(x),0,p.length),v=al(v),p.slice(x,x+v.length)==v}function mv(p,v,x){var P=Y.templateSettings;x&&s0(p,v,x)&&(v=i),p=Ui(p),v=T0({},v,P,Af);var W=T0({},v.imports,P.imports,Af),ee=No(W),he=P0(W,ee),De,be,Et=0,St=v.interpolate||tl,At="__p += '",on=yu((v.escape||tl).source+"|"+St.source+"|"+(St===ho?Ql:tl).source+"|"+(v.evaluate||tl).source+"|$","g"),kn="//# sourceURL="+(li.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++fc+"]")+` +`;p.replace(on,function(ar,ui,di,zl,Zi,a0){return di||(di=zl),At+=p.slice(Et,a0).replace(c0,zs),ui&&(De=!0,At+=`' + +__e(`+ui+`) + +'`),Zi&&(be=!0,At+=`'; +`+Zi+`; +__p += '`),di&&(At+=`' + +((__t = (`+di+`)) == null ? '' : __t) + +'`),Et=a0+ar.length,ar}),At+=`'; +`;var rr=li.call(v,"variable")&&v.variable;if(!rr)At=`with (obj) { +`+At+` +} +`;else if(Jo.test(rr))throw new Xt(t);At=(be?At.replace(Xr,""):At).replace(O0,"$1").replace(M0,"$1;"),At="function("+(rr||"obj")+`) { +`+(rr?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(De?", __e = _.escape":"")+(be?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+At+`return __p +}`;var br=wv(function(){return pr(ee,kn+"return "+At).apply(i,he)});if(br.source=At,_p(br))throw br;return br}function yv(p){return Ui(p).toLowerCase()}function Kd(p){return Ui(p).toUpperCase()}function Xd(p,v,x){if(p=Ui(p),p&&(x||v===i))return Nu(p);if(!p||!(v=al(v)))return p;var P=ei(p),W=ei(v),ee=vf(P,W),he=Tl(P,W)+1;return ma(P,ee,he).join("")}function Mp(p,v,x){if(p=Ui(p),p&&(x||v===i))return p.slice(0,h0(p)+1);if(!p||!(v=al(v)))return p;var P=ei(p),W=Tl(P,ei(v))+1;return ma(P,0,W).join("")}function gv(p,v,x){if(p=Ui(p),p&&(x||v===i))return p.replace(bn,"");if(!p||!(v=al(v)))return p;var P=ei(p),W=vf(P,ei(v));return ma(P,W).join("")}function Qd(p,v){var x=Ie,P=je;if(bu(v)){var W="separator"in v?v.separator:W;x="length"in v?Mr(v.length):x,P="omission"in v?al(v.omission):P}p=Ui(p);var ee=p.length;if(B0(p)){var he=ei(p);ee=he.length}if(x>=ee)return p;var De=x-tu(P);if(De<1)return P;var be=he?ma(he,0,De).join(""):p.slice(0,De);if(W===i)return be+P;if(he&&(De+=be.length-De),w1(W)){if(p.slice(De).search(W)){var Et,St=be;for(W.global||(W=yu(W.source,Ui(k0.exec(W))+"g")),W.lastIndex=0;Et=W.exec(St);)var At=Et.index;be=be.slice(0,At===i?De:At)}}else if(p.indexOf(al(W),De)!=De){var on=be.lastIndexOf(W);on>-1&&(be=be.slice(0,on))}return be+P}function _v(p){return p=Ui(p),p&&ki.test(p)?p.replace(Po,Bi):p}var Ev=xf(function(p,v,x){return p+(x?" ":"")+v.toUpperCase()}),kp=wh("toUpperCase");function Dv(p,v,x){return p=Ui(p),v=x?i:v,v===i?_s(p)?gf(p):_o(p):p.match(v)||[]}var wv=Ir(function(p,v){try{return oe(p,i,v)}catch(x){return _p(x)?x:new Xt(x)}}),$m=cl(function(p,v){return it(v,function(x){x=Fl(x),Gu(p,x,D1(p[x],p))}),p});function Sv(p){var v=p==null?0:p.length,x=Vn();return p=v?Ft(p,function(P){if(typeof P[1]!="function")throw new ti(_);return[x(P[0]),P[1]]}):[],Ir(function(P){for(var W=-1;++Wzt)return[];var x=fe,P=Kn(p,fe);v=Vn(v),p-=fe;for(var W=Co(P,v);++x0||v<0)?new at(x):(p<0?x=x.takeRight(-p):p&&(x=x.drop(p)),v!==i&&(v=Mr(v),x=v<0?x.dropRight(-v):x.take(v-p)),x)},at.prototype.takeRightWhile=function(p){return this.reverse().takeWhile(p).reverse()},at.prototype.toArray=function(){return this.take(fe)},R(at.prototype,function(p,v){var x=/^(?:filter|find|map|reject)|While$/.test(v),P=/^(?:head|last)$/.test(v),W=Y[P?"take"+(v=="last"?"Right":""):v],ee=P||/^find/.test(v);!W||(Y.prototype[v]=function(){var he=this.__wrapped__,De=P?[1]:arguments,be=he instanceof at,Et=De[0],St=be||tr(he),At=function(ui){var di=W.apply(Y,Dn([ui],De));return P&&on?di[0]:di};St&&x&&typeof Et=="function"&&Et.length!=1&&(be=St=!1);var on=this.__chain__,kn=!!this.__actions__.length,rr=ee&&!on,br=be&&!kn;if(!ee&&St){he=br?he:new at(this);var ar=p.apply(he,De);return ar.__actions__.push({func:g1,args:[At],thisArg:i}),new Vr(ar,on)}return rr&&br?p.apply(this,De):(ar=this.thru(At),rr?P?ar.value()[0]:ar.value():ar)})}),it(["pop","push","shift","sort","splice","unshift"],function(p){var v=Jr[p],x=/^(?:push|sort|unshift)$/.test(p)?"tap":"thru",P=/^(?:pop|shift)$/.test(p);Y.prototype[p]=function(){var W=arguments;if(P&&!this.__chain__){var ee=this.value();return v.apply(tr(ee)?ee:[],W)}return this[x](function(he){return v.apply(tr(he)?he:[],W)})}}),R(at.prototype,function(p,v){var x=Y[v];if(x){var P=x.name+"";li.call(On,P)||(On[P]=[]),On[P].push({name:v,func:x})}}),On[ga(i,pe).name]=[{name:"wrapper",func:i}],at.prototype.clone=Di,at.prototype.reverse=ru,at.prototype.value=wo,Y.prototype.at=$2,Y.prototype.chain=qh,Y.prototype.commit=ep,Y.prototype.next=Wh,Y.prototype.plant=Em,Y.prototype.reverse=If,Y.prototype.toJSON=Y.prototype.valueOf=Y.prototype.value=bf,Y.prototype.first=Y.prototype.head,Pu&&(Y.prototype[Pu]=_m),Y},n0=t0();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ji._=n0,define(function(){return n0})):z?((z.exports=n0)._=n0,U._=n0):ji._=n0}).call(Wv)});var yD=Ke((wW,mD)=>{"use strict";var Pi=mD.exports;mD.exports.default=Pi;var Du="[",jy="]",Vv="\x07",P_=";",LS=process.env.TERM_PROGRAM==="Apple_Terminal";Pi.cursorTo=(i,o)=>{if(typeof i!="number")throw new TypeError("The `x` argument is required");return typeof o!="number"?Du+(i+1)+"G":Du+(o+1)+";"+(i+1)+"H"};Pi.cursorMove=(i,o)=>{if(typeof i!="number")throw new TypeError("The `x` argument is required");let a="";return i<0?a+=Du+-i+"D":i>0&&(a+=Du+i+"C"),o<0?a+=Du+-o+"A":o>0&&(a+=Du+o+"B"),a};Pi.cursorUp=(i=1)=>Du+i+"A";Pi.cursorDown=(i=1)=>Du+i+"B";Pi.cursorForward=(i=1)=>Du+i+"C";Pi.cursorBackward=(i=1)=>Du+i+"D";Pi.cursorLeft=Du+"G";Pi.cursorSavePosition=LS?"7":Du+"s";Pi.cursorRestorePosition=LS?"8":Du+"u";Pi.cursorGetPosition=Du+"6n";Pi.cursorNextLine=Du+"E";Pi.cursorPrevLine=Du+"F";Pi.cursorHide=Du+"?25l";Pi.cursorShow=Du+"?25h";Pi.eraseLines=i=>{let o="";for(let a=0;a[jy,"8",P_,P_,o,Vv,i,jy,"8",P_,P_,Vv].join("");Pi.image=(i,o={})=>{let a=`${jy}1337;File=inline=1`;return o.width&&(a+=`;width=${o.width}`),o.height&&(a+=`;height=${o.height}`),o.preserveAspectRatio===!1&&(a+=";preserveAspectRatio=0"),a+":"+i.toString("base64")+Vv};Pi.iTerm={setCwd:(i=process.cwd())=>`${jy}50;CurrentDir=${i}${Vv}`,annotation:(i,o={})=>{let a=`${jy}1337;`,c=typeof o.x!="undefined",_=typeof o.y!="undefined";if((c||_)&&!(c&&_&&typeof o.length!="undefined"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return i=i.replace(/\|/g,""),a+=o.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",o.length>0?a+=(c?[i,o.length,o.x,o.y]:[o.length,i]).join("|"):a+=i,a+Vv}}});var PS=Ke((SW,gD)=>{"use strict";var NS=(i,o)=>{for(let a of Reflect.ownKeys(o))Object.defineProperty(i,a,Object.getOwnPropertyDescriptor(o,a));return i};gD.exports=NS;gD.exports.default=NS});var bS=Ke((TW,I_)=>{"use strict";var AI=PS(),b_=new WeakMap,IS=(i,o={})=>{if(typeof i!="function")throw new TypeError("Expected a function");let a,c=0,_=i.displayName||i.name||"",t=function(...M){if(b_.set(t,++c),c===1)a=i.apply(this,M),i=null;else if(o.throw===!0)throw new Error(`Function \`${_}\` can only be called once`);return a};return AI(t,i),b_.set(t,c),t};I_.exports=IS;I_.exports.default=IS;I_.exports.callCount=i=>{if(!b_.has(i))throw new Error(`The given function \`${i.name}\` is not wrapped by the \`onetime\` package`);return b_.get(i)}});var BS=Ke((CW,B_)=>{B_.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&B_.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&B_.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var wD=Ke((xW,zy)=>{var OI=require("assert"),Hy=BS(),MI=/^win/i.test(process.platform),U_=require("events");typeof U_!="function"&&(U_=U_.EventEmitter);var Yl;process.__signal_exit_emitter__?Yl=process.__signal_exit_emitter__:(Yl=process.__signal_exit_emitter__=new U_,Yl.count=0,Yl.emitted={});Yl.infinite||(Yl.setMaxListeners(Infinity),Yl.infinite=!0);zy.exports=function(i,o){OI.equal(typeof i,"function","a callback must be provided for exit handler"),qy===!1&&US();var a="exit";o&&o.alwaysLast&&(a="afterexit");var c=function(){Yl.removeListener(a,i),Yl.listeners("exit").length===0&&Yl.listeners("afterexit").length===0&&_D()};return Yl.on(a,i),c};zy.exports.unload=_D;function _D(){!qy||(qy=!1,Hy.forEach(function(i){try{process.removeListener(i,ED[i])}catch(o){}}),process.emit=DD,process.reallyExit=jS,Yl.count-=1)}function Gv(i,o,a){Yl.emitted[i]||(Yl.emitted[i]=!0,Yl.emit(i,o,a))}var ED={};Hy.forEach(function(i){ED[i]=function(){var a=process.listeners(i);a.length===Yl.count&&(_D(),Gv("exit",null,i),Gv("afterexit",null,i),MI&&i==="SIGHUP"&&(i="SIGINT"),process.kill(process.pid,i))}});zy.exports.signals=function(){return Hy};zy.exports.load=US;var qy=!1;function US(){qy||(qy=!0,Yl.count+=1,Hy=Hy.filter(function(i){try{return process.on(i,ED[i]),!0}catch(o){return!1}}),process.emit=LI,process.reallyExit=kI)}var jS=process.reallyExit;function kI(i){process.exitCode=i||0,Gv("exit",process.exitCode,null),Gv("afterexit",process.exitCode,null),jS.call(process,process.exitCode)}var DD=process.emit;function LI(i,o){if(i==="exit"){o!==void 0&&(process.exitCode=o);var a=DD.apply(this,arguments);return Gv("exit",process.exitCode,null),Gv("afterexit",process.exitCode,null),a}else return DD.apply(this,arguments)}});var HS=Ke((RW,zS)=>{"use strict";var NI=bS(),FI=wD();zS.exports=NI(()=>{FI(()=>{process.stderr.write("[?25h")},{alwaysLast:!0})})});var SD=Ke(Yv=>{"use strict";var PI=HS(),j_=!1;Yv.show=(i=process.stderr)=>{!i.isTTY||(j_=!1,i.write("[?25h"))};Yv.hide=(i=process.stderr)=>{!i.isTTY||(PI(),j_=!0,i.write("[?25l"))};Yv.toggle=(i,o)=>{i!==void 0&&(j_=i),j_?Yv.show(o):Yv.hide(o)}});var GS=Ke(Wy=>{"use strict";var qS=Wy&&Wy.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Wy,"__esModule",{value:!0});var WS=qS(yD()),VS=qS(SD()),II=(i,{showCursor:o=!1}={})=>{let a=0,c="",_=!1,t=M=>{!o&&!_&&(VS.default.hide(),_=!0);let N=M+` +`;N!==c&&(c=N,i.write(WS.default.eraseLines(a)+N),a=N.split(` +`).length)};return t.clear=()=>{i.write(WS.default.eraseLines(a)),c="",a=0},t.done=()=>{c="",a=0,o||(VS.default.show(),_=!1)},t};Wy.default={create:II}});var KS=Ke((MW,YS)=>{YS.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY_BUILD_BASE",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}}]});var JS=Ke(Pa=>{"use strict";var XS=KS(),jc=process.env;Object.defineProperty(Pa,"_vendors",{value:XS.map(function(i){return i.constant})});Pa.name=null;Pa.isPR=null;XS.forEach(function(i){var o=Array.isArray(i.env)?i.env:[i.env],a=o.every(function(c){return QS(c)});if(Pa[i.constant]=a,a)switch(Pa.name=i.name,typeof i.pr){case"string":Pa.isPR=!!jc[i.pr];break;case"object":"env"in i.pr?Pa.isPR=i.pr.env in jc&&jc[i.pr.env]!==i.pr.ne:"any"in i.pr?Pa.isPR=i.pr.any.some(function(c){return!!jc[c]}):Pa.isPR=QS(i.pr);break;default:Pa.isPR=null}});Pa.isCI=!!(jc.CI||jc.CONTINUOUS_INTEGRATION||jc.BUILD_NUMBER||jc.RUN_ID||Pa.name);function QS(i){return typeof i=="string"?!!jc[i]:Object.keys(i).every(function(o){return jc[o]===i[o]})}});var $S=Ke((LW,ZS)=>{"use strict";ZS.exports=JS().isCI});var tT=Ke((NW,eT)=>{"use strict";var bI=i=>{let o=new Set;do for(let a of Reflect.ownKeys(i))o.add([i,a]);while((i=Reflect.getPrototypeOf(i))&&i!==Object.prototype);return o};eT.exports=(i,{include:o,exclude:a}={})=>{let c=_=>{let t=M=>typeof M=="string"?_===M:M.test(_);return o?o.some(t):a?!a.some(t):!0};for(let[_,t]of bI(i.constructor.prototype)){if(t==="constructor"||!c(t))continue;let M=Reflect.getOwnPropertyDescriptor(_,t);M&&typeof M.value=="function"&&(i[t]=i[t].bind(i))}return i}});var sT=Ke(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});var Kv,Vy,z_,H_,TD;typeof window=="undefined"||typeof MessageChannel!="function"?(Xv=null,CD=null,xD=function(){if(Xv!==null)try{var i=lu.unstable_now();Xv(!0,i),Xv=null}catch(o){throw setTimeout(xD,0),o}},nT=Date.now(),lu.unstable_now=function(){return Date.now()-nT},Kv=function(i){Xv!==null?setTimeout(Kv,0,i):(Xv=i,setTimeout(xD,0))},Vy=function(i,o){CD=setTimeout(i,o)},z_=function(){clearTimeout(CD)},H_=function(){return!1},TD=lu.unstable_forceFrameRate=function(){}):(q_=window.performance,RD=window.Date,rT=window.setTimeout,iT=window.clearTimeout,typeof console!="undefined"&&(uT=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),typeof uT!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),typeof q_=="object"&&typeof q_.now=="function"?lu.unstable_now=function(){return q_.now()}:(oT=RD.now(),lu.unstable_now=function(){return RD.now()-oT}),Gy=!1,Yy=null,W_=-1,AD=5,OD=0,H_=function(){return lu.unstable_now()>=OD},TD=function(){},lu.unstable_forceFrameRate=function(i){0>i||125G_(M,a))O!==void 0&&0>G_(O,M)?(i[c]=O,i[N]=a,c=N):(i[c]=M,i[t]=a,c=t);else if(O!==void 0&&0>G_(O,a))i[c]=O,i[N]=a,c=N;else break e}}return o}return null}function G_(i,o){var a=i.sortIndex-o.sortIndex;return a!==0?a:i.id-o.id}var ec=[],d2=[],BI=1,Fs=null,ps=3,K_=!1,$p=!1,Ky=!1;function X_(i){for(var o=df(d2);o!==null;){if(o.callback===null)Y_(d2);else if(o.startTime<=i)Y_(d2),o.sortIndex=o.expirationTime,kD(ec,o);else break;o=df(d2)}}function LD(i){if(Ky=!1,X_(i),!$p)if(df(ec)!==null)$p=!0,Kv(ND);else{var o=df(d2);o!==null&&Vy(LD,o.startTime-i)}}function ND(i,o){$p=!1,Ky&&(Ky=!1,z_()),K_=!0;var a=ps;try{for(X_(o),Fs=df(ec);Fs!==null&&(!(Fs.expirationTime>o)||i&&!H_());){var c=Fs.callback;if(c!==null){Fs.callback=null,ps=Fs.priorityLevel;var _=c(Fs.expirationTime<=o);o=lu.unstable_now(),typeof _=="function"?Fs.callback=_:Fs===df(ec)&&Y_(ec),X_(o)}else Y_(ec);Fs=df(ec)}if(Fs!==null)var t=!0;else{var M=df(d2);M!==null&&Vy(LD,M.startTime-o),t=!1}return t}finally{Fs=null,ps=a,K_=!1}}function lT(i){switch(i){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var UI=TD;lu.unstable_ImmediatePriority=1;lu.unstable_UserBlockingPriority=2;lu.unstable_NormalPriority=3;lu.unstable_IdlePriority=5;lu.unstable_LowPriority=4;lu.unstable_runWithPriority=function(i,o){switch(i){case 1:case 2:case 3:case 4:case 5:break;default:i=3}var a=ps;ps=i;try{return o()}finally{ps=a}};lu.unstable_next=function(i){switch(ps){case 1:case 2:case 3:var o=3;break;default:o=ps}var a=ps;ps=o;try{return i()}finally{ps=a}};lu.unstable_scheduleCallback=function(i,o,a){var c=lu.unstable_now();if(typeof a=="object"&&a!==null){var _=a.delay;_=typeof _=="number"&&0<_?c+_:c,a=typeof a.timeout=="number"?a.timeout:lT(i)}else a=lT(i),_=c;return a=_+a,i={id:BI++,callback:o,priorityLevel:i,startTime:_,expirationTime:a,sortIndex:-1},_>c?(i.sortIndex=_,kD(d2,i),df(ec)===null&&i===df(d2)&&(Ky?z_():Ky=!0,Vy(LD,_-c))):(i.sortIndex=a,kD(ec,i),$p||K_||($p=!0,Kv(ND))),i};lu.unstable_cancelCallback=function(i){i.callback=null};lu.unstable_wrapCallback=function(i){var o=ps;return function(){var a=ps;ps=o;try{return i.apply(this,arguments)}finally{ps=a}}};lu.unstable_getCurrentPriorityLevel=function(){return ps};lu.unstable_shouldYield=function(){var i=lu.unstable_now();X_(i);var o=df(ec);return o!==Fs&&Fs!==null&&o!==null&&o.callback!==null&&o.startTime<=i&&o.expirationTime{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});var i=!1,o=!1,a=!0,c,_,t,M,N;if(typeof window=="undefined"||typeof MessageChannel!="function"){var O=null,T=null,B=function(){if(O!==null)try{var wt=Ii.unstable_now(),bt=!0;O(bt,wt),O=null}catch(Hn){throw setTimeout(B,0),Hn}},H=Date.now();Ii.unstable_now=function(){return Date.now()-H},c=function(wt){O!==null?setTimeout(c,0,wt):(O=wt,setTimeout(B,0))},_=function(wt,bt){T=setTimeout(wt,bt)},t=function(){clearTimeout(T)},M=function(){return!1},N=Ii.unstable_forceFrameRate=function(){}}else{var q=window.performance,ne=window.Date,m=window.setTimeout,pe=window.clearTimeout;if(typeof console!="undefined"){var ge=window.requestAnimationFrame,ve=window.cancelAnimationFrame;typeof ge!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),typeof ve!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if(typeof q=="object"&&typeof q.now=="function")Ii.unstable_now=function(){return q.now()};else{var ue=ne.now();Ii.unstable_now=function(){return ne.now()-ue}}var _e=!1,ce=null,me=-1,re=5,we=0,Ie=300,je=!1;if(o&&navigator!==void 0&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0){var ct=navigator.scheduling;M=function(){var wt=Ii.unstable_now();return wt>=we?je||ct.isInputPending()?!0:wt>=Ie:!1},N=function(){je=!0}}else M=function(){return Ii.unstable_now()>=we},N=function(){};Ii.unstable_forceFrameRate=function(wt){if(wt<0||wt>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported");return}wt>0?re=Math.floor(1e3/wt):re=5};var pt=function(){if(ce!==null){var wt=Ii.unstable_now();we=wt+re;var bt=!0;try{var Hn=ce(bt,wt);Hn?tt.postMessage(null):(_e=!1,ce=null)}catch(qr){throw tt.postMessage(null),qr}}else _e=!1;je=!1},Xe=new MessageChannel,tt=Xe.port2;Xe.port1.onmessage=pt,c=function(wt){ce=wt,_e||(_e=!0,tt.postMessage(null))},_=function(wt,bt){me=m(function(){wt(Ii.unstable_now())},bt)},t=function(){pe(me),me=-1}}function He(wt,bt){var Hn=wt.length;wt.push(bt),nt(wt,bt,Hn)}function kt(wt){var bt=wt[0];return bt===void 0?null:bt}function zt(wt){var bt=wt[0];if(bt!==void 0){var Hn=wt.pop();return Hn!==bt&&(wt[0]=Hn,X(wt,Hn,0)),bt}else return null}function nt(wt,bt,Hn){for(var qr=Hn;;){var Ki=Math.floor((qr-1)/2),Qr=wt[Ki];if(Qr!==void 0&&fe(Qr,bt)>0)wt[Ki]=bt,wt[qr]=Qr,qr=Ki;else return}}function X(wt,bt,Hn){for(var qr=Hn,Ki=wt.length;qrfr){if(fr*=2,fr>jr){console.error("Scheduler Profiling: Event log exceeded maximum size. Don't forget to call `stopLoggingProfilingEvents()`."),Dr();return}var Hn=new Int32Array(fr*4);Hn.set(Qt),zr=Hn.buffer,Qt=Hn}Qt.set(wt,bt)}}function mi(){fr=vr,zr=new ArrayBuffer(fr*4),Qt=new Int32Array(zr),wu=0}function Dr(){var wt=zr;return fr=0,zr=null,Qt=null,wu=0,wt}function el(wt,bt){a&&(Gt[Xn]++,Qt!==null&&su([po,bt*1e3,wt.id,wt.priorityLevel]))}function Ko(wt,bt){a&&(Gt[Er]=xe,Gt[w]=0,Gt[Xn]--,Qt!==null&&su([A0,bt*1e3,wt.id]))}function Uu(wt,bt){a&&(Gt[Xn]--,Qt!==null&&su([Ps,bt*1e3,wt.id]))}function Xo(wt,bt){a&&(Gt[Er]=xe,Gt[w]=0,Gt[Xn]--,Qt!==null&&su([J0,bt*1e3,wt.id]))}function Xr(wt,bt){a&&(an++,Gt[Er]=wt.priorityLevel,Gt[w]=wt.id,Gt[jt]=an,Qt!==null&&su([Z0,bt*1e3,wt.id,an]))}function O0(wt,bt){a&&(Gt[Er]=xe,Gt[w]=0,Gt[jt]=0,Qt!==null&&su([$0,bt*1e3,wt.id,an]))}function M0(wt){a&&(Mn++,Qt!==null&&su([Wt,wt*1e3,Mn]))}function Po(wt){a&&Qt!==null&&su([xi,wt*1e3,Mn])}var au=1073741823,ki=-1,Is=250,Xl=5e3,Io=1e4,ho=au,Hr=[],Ri=[],Qo=1,yi=!1,en=null,bn=dt,Ai=!1,gi=!1,Vt=!1;function Au(wt){for(var bt=kt(Ri);bt!==null;){if(bt.callback===null)zt(Ri);else if(bt.startTime<=wt)zt(Ri),bt.sortIndex=bt.expirationTime,He(Hr,bt),a&&(el(bt,wt),bt.isQueued=!0);else return;bt=kt(Ri)}}function eu(wt){if(Vt=!1,Au(wt),!gi)if(kt(Hr)!==null)gi=!0,c(Jo);else{var bt=kt(Ri);bt!==null&&_(eu,bt.startTime-wt)}}function Jo(wt,bt){a&&Po(bt),gi=!1,Vt&&(Vt=!1,t()),Ai=!0;var Hn=bn;try{if(a)try{return Yi(wt,bt)}catch(Qr){if(en!==null){var qr=Ii.unstable_now();Xo(en,qr),en.isQueued=!1}throw Qr}else return Yi(wt,bt)}finally{if(en=null,bn=Hn,Ai=!1,a){var Ki=Ii.unstable_now();M0(Ki)}}}function Yi(wt,bt){var Hn=bt;for(Au(Hn),en=kt(Hr);en!==null&&!(i&&yi)&&!(en.expirationTime>Hn&&(!wt||M()));){var qr=en.callback;if(qr!==null){en.callback=null,bn=en.priorityLevel;var Ki=en.expirationTime<=Hn;Xr(en,Hn);var Qr=qr(Ki);Hn=Ii.unstable_now(),typeof Qr=="function"?(en.callback=Qr,O0(en,Hn)):(a&&(Ko(en,Hn),en.isQueued=!1),en===kt(Hr)&&zt(Hr)),Au(Hn)}else zt(Hr);en=kt(Hr)}if(en!==null)return!0;var Ou=kt(Ri);return Ou!==null&&_(eu,Ou.startTime-Hn),!1}function Ql(wt,bt){switch(wt){case le:case qe:case dt:case Rt:case nn:break;default:wt=dt}var Hn=bn;bn=wt;try{return bt()}finally{bn=Hn}}function k0(wt){var bt;switch(bn){case le:case qe:case dt:bt=dt;break;default:bt=bn;break}var Hn=bn;bn=bt;try{return wt()}finally{bn=Hn}}function ai(wt){var bt=bn;return function(){var Hn=bn;bn=bt;try{return wt.apply(this,arguments)}finally{bn=Hn}}}function f0(wt){switch(wt){case le:return ki;case qe:return Is;case nn:return ho;case Rt:return Io;case dt:default:return Xl}}function Jl(wt,bt,Hn){var qr=Ii.unstable_now(),Ki,Qr;if(typeof Hn=="object"&&Hn!==null){var Ou=Hn.delay;typeof Ou=="number"&&Ou>0?Ki=qr+Ou:Ki=qr,Qr=typeof Hn.timeout=="number"?Hn.timeout:f0(wt)}else Qr=f0(wt),Ki=qr;var vo=Ki+Qr,Li={id:Qo++,callback:bt,priorityLevel:wt,startTime:Ki,expirationTime:vo,sortIndex:-1};return a&&(Li.isQueued=!1),Ki>qr?(Li.sortIndex=Ki,He(Ri,Li),kt(Hr)===null&&Li===kt(Ri)&&(Vt?t():Vt=!0,_(eu,Ki-qr))):(Li.sortIndex=vo,He(Hr,Li),a&&(el(Li,qr),Li.isQueued=!0),!gi&&!Ai&&(gi=!0,c(Jo))),Li}function L0(){yi=!0}function bs(){yi=!1,!gi&&!Ai&&(gi=!0,c(Jo))}function $n(){return kt(Hr)}function tl(wt){if(a&&wt.isQueued){var bt=Ii.unstable_now();Uu(wt,bt),wt.isQueued=!1}wt.callback=null}function c0(){return bn}function bo(){var wt=Ii.unstable_now();Au(wt);var bt=kt(Hr);return bt!==en&&en!==null&&bt!==null&&bt.callback!==null&&bt.startTime<=wt&&bt.expirationTime{"use strict";process.env.NODE_ENV==="production"?FD.exports=sT():FD.exports=aT()});var fT=Ke((bW,Xy)=>{Xy.exports=function i(o){"use strict";var a=Iy(),c=Mi(),_=Q_();function t(g){for(var y="https://reactjs.org/docs/error-decoder.html?invariant="+g,R=1;RQo||(g.current=Ri[Qo],Ri[Qo]=null,Qo--)}function en(g,y){Qo++,Ri[Qo]=g.current,g.current=y}var bn={},Ai={current:bn},gi={current:!1},Vt=bn;function Au(g,y){var R=g.type.contextTypes;if(!R)return bn;var F=g.stateNode;if(F&&F.__reactInternalMemoizedUnmaskedChildContext===y)return F.__reactInternalMemoizedMaskedChildContext;var b={},J;for(J in R)b[J]=y[J];return F&&(g=g.stateNode,g.__reactInternalMemoizedUnmaskedChildContext=y,g.__reactInternalMemoizedMaskedChildContext=b),b}function eu(g){return g=g.childContextTypes,g!=null}function Jo(g){yi(gi,g),yi(Ai,g)}function Yi(g){yi(gi,g),yi(Ai,g)}function Ql(g,y,R){if(Ai.current!==bn)throw Error(t(168));en(Ai,y,g),en(gi,R,g)}function k0(g,y,R){var F=g.stateNode;if(g=y.childContextTypes,typeof F.getChildContext!="function")return R;F=F.getChildContext();for(var b in F)if(!(b in g))throw Error(t(108,Ie(y)||"Unknown",b));return a({},R,{},F)}function ai(g){var y=g.stateNode;return y=y&&y.__reactInternalMemoizedMergedChildContext||bn,Vt=Ai.current,en(Ai,y,g),en(gi,gi.current,g),!0}function f0(g,y,R){var F=g.stateNode;if(!F)throw Error(t(169));R?(y=k0(g,y,Vt),F.__reactInternalMemoizedMergedChildContext=y,yi(gi,g),yi(Ai,g),en(Ai,y,g)):yi(gi,g),en(gi,R,g)}var Jl=_.unstable_runWithPriority,L0=_.unstable_scheduleCallback,bs=_.unstable_cancelCallback,$n=_.unstable_shouldYield,tl=_.unstable_requestPaint,c0=_.unstable_now,bo=_.unstable_getCurrentPriorityLevel,Sl=_.unstable_ImmediatePriority,N0=_.unstable_UserBlockingPriority,wt=_.unstable_NormalPriority,bt=_.unstable_LowPriority,Hn=_.unstable_IdlePriority,qr={},Ki=tl!==void 0?tl:function(){},Qr=null,Ou=null,vo=!1,Li=c0(),mo=1e4>Li?c0:function(){return c0()-Li};function vs(){switch(bo()){case Sl:return 99;case N0:return 98;case wt:return 97;case bt:return 96;case Hn:return 95;default:throw Error(t(332))}}function Tt(g){switch(g){case 99:return Sl;case 98:return N0;case 97:return wt;case 96:return bt;case 95:return Hn;default:throw Error(t(332))}}function d0(g,y){return g=Tt(g),Jl(g,y)}function nl(g,y,R){return g=Tt(g),L0(g,y,R)}function Zl(g){return Qr===null?(Qr=[g],Ou=L0(Sl,ms)):Qr.push(g),qr}function ju(){if(Ou!==null){var g=Ou;Ou=null,bs(g)}ms()}function ms(){if(!vo&&Qr!==null){vo=!0;var g=0;try{var y=Qr;d0(99,function(){for(;g=y&&(h0=!0),g.firstContext=null)}function ku(g,y){if(Mu!==g&&y!==!1&&y!==0)if((typeof y!="number"||y===1073741823)&&(Mu=g,y=1073741823),y={context:g,observedBits:y,next:null},Si===null){if(cr===null)throw Error(t(308));Si=y,cr.dependencies={expirationTime:0,firstContext:y,responders:null}}else Si=Si.next=y;return ln?g._currentValue:g._currentValue2}var p0=!1;function qu(g){return{baseState:g,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Ia(g){return{baseState:g.baseState,firstUpdate:g.firstUpdate,lastUpdate:g.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function yo(g,y){return{expirationTime:g,suspenseConfig:y,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function ua(g,y){g.lastUpdate===null?g.firstUpdate=g.lastUpdate=y:(g.lastUpdate.next=y,g.lastUpdate=y)}function Zo(g,y){var R=g.alternate;if(R===null){var F=g.updateQueue,b=null;F===null&&(F=g.updateQueue=qu(g.memoizedState))}else F=g.updateQueue,b=R.updateQueue,F===null?b===null?(F=g.updateQueue=qu(g.memoizedState),b=R.updateQueue=qu(R.memoizedState)):F=g.updateQueue=Ia(b):b===null&&(b=R.updateQueue=Ia(F));b===null||F===b?ua(F,y):F.lastUpdate===null||b.lastUpdate===null?(ua(F,y),ua(b,y)):(ua(F,y),b.lastUpdate=y)}function oa(g,y){var R=g.updateQueue;R=R===null?g.updateQueue=qu(g.memoizedState):ba(g,R),R.lastCapturedUpdate===null?R.firstCapturedUpdate=R.lastCapturedUpdate=y:(R.lastCapturedUpdate.next=y,R.lastCapturedUpdate=y)}function ba(g,y){var R=g.alternate;return R!==null&&y===R.updateQueue&&(y=g.updateQueue=Ia(y)),y}function ys(g,y,R,F,b,J){switch(R.tag){case 1:return g=R.payload,typeof g=="function"?g.call(J,F,b):g;case 3:g.effectTag=g.effectTag&-4097|64;case 0:if(g=R.payload,b=typeof g=="function"?g.call(J,F,b):g,b==null)break;return a({},F,b);case 2:p0=!0}return F}function To(g,y,R,F,b){p0=!1,y=ba(g,y);for(var J=y.baseState,de=null,gt=0,xt=y.firstUpdate,Lt=J;xt!==null;){var xr=xt.expirationTime;xrci?(Qi=ur,ur=null):Qi=ur.sibling;var Gr=du(Ve,ur,lt[ci],$t);if(Gr===null){ur===null&&(ur=Qi);break}g&&ur&&Gr.alternate===null&&y(Ve,ur),ze=J(Gr,ze,ci),si===null?Wn=Gr:si.sibling=Gr,si=Gr,ur=Qi}if(ci===lt.length)return R(Ve,ur),Wn;if(ur===null){for(;cici?(Qi=ur,ur=null):Qi=ur.sibling;var Cu=du(Ve,ur,Gr.value,$t);if(Cu===null){ur===null&&(ur=Qi);break}g&&ur&&Cu.alternate===null&&y(Ve,ur),ze=J(Cu,ze,ci),si===null?Wn=Cu:si.sibling=Cu,si=Cu,ur=Qi}if(Gr.done)return R(Ve,ur),Wn;if(ur===null){for(;!Gr.done;ci++,Gr=lt.next())Gr=io(Ve,Gr.value,$t),Gr!==null&&(ze=J(Gr,ze,ci),si===null?Wn=Gr:si.sibling=Gr,si=Gr);return Wn}for(ur=F(Ve,ur);!Gr.done;ci++,Gr=lt.next())Gr=Ho(ur,Ve,ci,Gr.value,$t),Gr!==null&&(g&&Gr.alternate!==null&&ur.delete(Gr.key===null?ci:Gr.key),ze=J(Gr,ze,ci),si===null?Wn=Gr:si.sibling=Gr,si=Gr);return g&&ur.forEach(function(Va){return y(Ve,Va)}),Wn}return function(Ve,ze,lt,$t){var Wn=typeof lt=="object"&<!==null&<.type===B&<.key===null;Wn&&(lt=lt.props.children);var si=typeof lt=="object"&<!==null;if(si)switch(lt.$$typeof){case O:e:{for(si=lt.key,Wn=ze;Wn!==null;){if(Wn.key===si)if(Wn.tag===7?lt.type===B:Wn.elementType===lt.type){R(Ve,Wn.sibling),ze=b(Wn,lt.type===B?lt.props.children:lt.props,$t),ze.ref=js(Ve,Wn,lt),ze.return=Ve,Ve=ze;break e}else{R(Ve,Wn);break}else y(Ve,Wn);Wn=Wn.sibling}lt.type===B?(ze=ro(lt.props.children,Ve.mode,$t,lt.key),ze.return=Ve,Ve=ze):($t=Wa(lt.type,lt.key,lt.props,null,Ve.mode,$t),$t.ref=js(Ve,ze,lt),$t.return=Ve,Ve=$t)}return de(Ve);case T:e:{for(Wn=lt.key;ze!==null;){if(ze.key===Wn)if(ze.tag===4&&ze.stateNode.containerInfo===lt.containerInfo&&ze.stateNode.implementation===lt.implementation){R(Ve,ze.sibling),ze=b(ze,lt.children||[],$t),ze.return=Ve,Ve=ze;break e}else{R(Ve,ze);break}else y(Ve,ze);ze=ze.sibling}ze=wf(lt,Ve.mode,$t),ze.return=Ve,Ve=ze}return de(Ve)}if(typeof lt=="string"||typeof lt=="number")return lt=""+lt,ze!==null&&ze.tag===6?(R(Ve,ze.sibling),ze=b(ze,lt,$t),ze.return=Ve,Ve=ze):(R(Ve,ze),ze=zo(lt,Ve.mode,$t),ze.return=Ve,Ve=ze),de(Ve);if(go(lt))return Ml(Ve,ze,lt,$t);if(re(lt))return uo(Ve,ze,lt,$t);if(si&&ji(Ve,lt),typeof lt=="undefined"&&!Wn)switch(Ve.tag){case 1:case 0:throw Ve=Ve.type,Error(t(152,Ve.displayName||Ve.name||"Component"))}return R(Ve,ze)}}var z=U(!0),G=U(!1),$={},Ce={current:$},Ee={current:$},Ae={current:$};function Z(g){if(g===$)throw Error(t(174));return g}function ke(g,y){en(Ae,y,g),en(Ee,g,g),en(Ce,$,g),y=kt(y),yi(Ce,g),en(Ce,y,g)}function Je(g){yi(Ce,g),yi(Ee,g),yi(Ae,g)}function mt(g){var y=Z(Ae.current),R=Z(Ce.current);y=zt(R,g.type,y),R!==y&&(en(Ee,g,g),en(Ce,y,g))}function oe(g){Ee.current===g&&(yi(Ce,g),yi(Ee,g))}var We={current:0};function it(g){for(var y=g;y!==null;){if(y.tag===13){var R=y.memoizedState;if(R!==null&&(R=R.dehydrated,R===null||Xr(R)||O0(R)))return y}else if(y.tag===19&&y.memoizedProps.revealOrder!==void 0){if((y.effectTag&64)!=0)return y}else if(y.child!==null){y.child.return=y,y=y.child;continue}if(y===g)break;for(;y.sibling===null;){if(y.return===null||y.return===g)return null;y=y.return}y.sibling.return=y.return,y=y.sibling}return null}function Ct(g,y){return{responder:g,props:y}}var Mt=M.ReactCurrentDispatcher,It=M.ReactCurrentBatchConfig,sn=0,rn=null,Ft=null,Dn=null,dr=null,er=null,Cr=null,An=0,Lr=null,_o=0,Nr=!1,ut=null,Dt=0;function et(){throw Error(t(321))}function Pt(g,y){if(y===null)return!1;for(var R=0;RAn&&(An=xr,ja(An))):(dc(xr,xt.suspenseConfig),J=xt.eagerReducer===g?xt.eagerState:g(J,xt.action)),de=xt,xt=xt.next}while(xt!==null&&xt!==F);Lt||(gt=de,b=J),Ne(J,y.memoizedState)||(h0=!0),y.memoizedState=J,y.baseUpdate=gt,y.baseState=b,R.lastRenderedState=J}return[y.memoizedState,R.dispatch]}function Co(g){var y=Jn();return typeof g=="function"&&(g=g()),y.memoizedState=y.baseState=g,g=y.queue={last:null,dispatch:null,lastRenderedReducer:fu,lastRenderedState:g},g=g.dispatch=zs.bind(null,rn,g),[y.memoizedState,g]}function $o(g){return Lu(fu,g)}function Nu(g,y,R,F){return g={tag:g,create:y,destroy:R,deps:F,next:null},Lr===null?(Lr={lastEffect:null},Lr.lastEffect=g.next=g):(y=Lr.lastEffect,y===null?Lr.lastEffect=g.next=g:(R=y.next,y.next=g,g.next=R,Lr.lastEffect=g)),g}function _i(g,y,R,F){var b=Jn();_o|=g,b.memoizedState=Nu(y,R,void 0,F===void 0?null:F)}function P0(g,y,R,F){var b=wr();F=F===void 0?null:F;var J=void 0;if(Ft!==null){var de=Ft.memoizedState;if(J=de.destroy,F!==null&&Pt(F,de.deps)){Nu(0,R,J,F);return}}_o|=g,b.memoizedState=Nu(y,R,J,F)}function rl(g,y){return _i(516,192,g,y)}function vf(g,y){return P0(516,192,g,y)}function Tl(g,y){if(typeof y=="function")return g=g(),y(g),function(){y(null)};if(y!=null)return g=g(),y.current=g,function(){y.current=null}}function mf(){}function I0(g,y){return Jn().memoizedState=[g,y===void 0?null:y],g}function gs(g,y){var R=wr();y=y===void 0?null:y;var F=R.memoizedState;return F!==null&&y!==null&&Pt(y,F[1])?F[0]:(R.memoizedState=[g,y],g)}function zs(g,y,R){if(!(25>Dt))throw Error(t(301));var F=g.alternate;if(g===rn||F!==null&&F===rn)if(Nr=!0,g={expirationTime:sn,suspenseConfig:null,action:R,eagerReducer:null,eagerState:null,next:null},ut===null&&(ut=new Map),R=ut.get(y),R===void 0)ut.set(y,g);else{for(y=R;y.next!==null;)y=y.next;y.next=g}else{var b=wo(),J=fi.suspense;b=Un(b,g,J),J={expirationTime:b,suspenseConfig:J,action:R,eagerReducer:null,eagerState:null,next:null};var de=y.last;if(de===null)J.next=J;else{var gt=de.next;gt!==null&&(J.next=gt),de.next=J}if(y.last=J,g.expirationTime===0&&(F===null||F.expirationTime===0)&&(F=y.lastRenderedReducer,F!==null))try{var xt=y.lastRenderedState,Lt=F(xt,R);if(J.eagerReducer=F,J.eagerState=Lt,Ne(Lt,xt))return}catch(xr){}finally{}to(g,b)}}var b0={readContext:ku,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useResponder:et,useDeferredValue:et,useTransition:et},B0={readContext:ku,useCallback:I0,useContext:ku,useEffect:rl,useImperativeHandle:function(g,y,R){return R=R!=null?R.concat([g]):null,_i(4,36,Tl.bind(null,y,g),R)},useLayoutEffect:function(g,y){return _i(4,36,g,y)},useMemo:function(g,y){var R=Jn();return y=y===void 0?null:y,g=g(),R.memoizedState=[g,y],g},useReducer:function(g,y,R){var F=Jn();return y=R!==void 0?R(y):y,F.memoizedState=F.baseState=y,g=F.queue={last:null,dispatch:null,lastRenderedReducer:g,lastRenderedState:y},g=g.dispatch=zs.bind(null,rn,g),[F.memoizedState,g]},useRef:function(g){var y=Jn();return g={current:g},y.memoizedState=g},useState:Co,useDebugValue:mf,useResponder:Ct,useDeferredValue:function(g,y){var R=Co(g),F=R[0],b=R[1];return rl(function(){_.unstable_next(function(){var J=It.suspense;It.suspense=y===void 0?null:y;try{b(g)}finally{It.suspense=J}})},[g,y]),F},useTransition:function(g){var y=Co(!1),R=y[0],F=y[1];return[I0(function(b){F(!0),_.unstable_next(function(){var J=It.suspense;It.suspense=g===void 0?null:g;try{F(!1),b()}finally{It.suspense=J}})},[g,R]),R]}},_s={readContext:ku,useCallback:gs,useContext:ku,useEffect:vf,useImperativeHandle:function(g,y,R){return R=R!=null?R.concat([g]):null,P0(4,36,Tl.bind(null,y,g),R)},useLayoutEffect:function(g,y){return P0(4,36,g,y)},useMemo:function(g,y){var R=wr();y=y===void 0?null:y;var F=R.memoizedState;return F!==null&&y!==null&&Pt(y,F[1])?F[0]:(g=g(),R.memoizedState=[g,y],g)},useReducer:Lu,useRef:function(){return wr().memoizedState},useState:$o,useDebugValue:mf,useResponder:Ct,useDeferredValue:function(g,y){var R=$o(g),F=R[0],b=R[1];return vf(function(){_.unstable_next(function(){var J=It.suspense;It.suspense=y===void 0?null:y;try{b(g)}finally{It.suspense=J}})},[g,y]),F},useTransition:function(g){var y=$o(!1),R=y[0],F=y[1];return[gs(function(b){F(!0),_.unstable_next(function(){var J=It.suspense;It.suspense=g===void 0?null:g;try{F(!1),b()}finally{It.suspense=J}})},[g,R]),R]}},Qu=null,Tu=null,Ei=!1;function xo(g,y){var R=H0(5,null,null,0);R.elementType="DELETED",R.type="DELETED",R.stateNode=y,R.return=g,R.effectTag=8,g.lastEffect!==null?(g.lastEffect.nextEffect=R,g.lastEffect=R):g.firstEffect=g.lastEffect=R}function e0(g,y){switch(g.tag){case 5:return y=Uu(y,g.type,g.pendingProps),y!==null?(g.stateNode=y,!0):!1;case 6:return y=Xo(y,g.pendingProps),y!==null?(g.stateNode=y,!0):!1;case 13:return!1;default:return!1}}function U0(g){if(Ei){var y=Tu;if(y){var R=y;if(!e0(g,y)){if(y=M0(R),!y||!e0(g,y)){g.effectTag=g.effectTag&-1025|2,Ei=!1,Qu=g;return}xo(Qu,R)}Qu=g,Tu=Po(y)}else g.effectTag=g.effectTag&-1025|2,Ei=!1,Qu=g}}function sa(g){for(g=g.return;g!==null&&g.tag!==5&&g.tag!==3&&g.tag!==13;)g=g.return;Qu=g}function es(g){if(!w||g!==Qu)return!1;if(!Ei)return sa(g),Ei=!0,!1;var y=g.type;if(g.tag!==5||y!=="head"&&y!=="body"&&!dt(y,g.memoizedProps))for(y=Tu;y;)xo(g,y),y=M0(y);if(sa(g),g.tag===13){if(!w)throw Error(t(316));if(g=g.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(t(317));Tu=Is(g)}else Tu=Qu?M0(g.stateNode):null;return!0}function tu(){w&&(Tu=Qu=null,Ei=!1)}var ei=M.ReactCurrentOwner,h0=!1;function Bi(g,y,R,F){y.child=g===null?G(y,null,R,F):z(y,g.child,R,F)}function Ci(g,y,R,F,b){R=R.render;var J=y.ref;return F0(y,b),F=un(g,y,R,F,J,b),g!==null&&!h0?(y.updateQueue=g.updateQueue,y.effectTag&=-517,g.expirationTime<=b&&(g.expirationTime=0),yu(g,y,b)):(y.effectTag|=1,Bi(g,y,F,b),y.child)}function yf(g,y,R,F,b,J){if(g===null){var de=R.type;return typeof de=="function"&&!Df(de)&&de.defaultProps===void 0&&R.compare===null&&R.defaultProps===void 0?(y.tag=15,y.type=de,gf(g,y,de,F,b,J)):(g=Wa(R.type,null,F,null,y.mode,J),g.ref=y.ref,g.return=y,y.child=g)}return de=g.child,by)&&Vr.set(g,y)))}}function i0(g,y){g.expirationTimeg?y:g)}function no(g){if(g.lastExpiredTime!==0)g.callbackExpirationTime=1073741823,g.callbackPriority=99,g.callbackNode=Zl(u0.bind(null,g));else{var y=m0(g),R=g.callbackNode;if(y===0)R!==null&&(g.callbackNode=null,g.callbackExpirationTime=0,g.callbackPriority=90);else{var F=wo();if(y===1073741823?F=99:y===1||y===2?F=95:(F=10*(1073741821-y)-10*(1073741821-F),F=0>=F?99:250>=F?98:5250>=F?97:95),R!==null){var b=g.callbackPriority;if(g.callbackExpirationTime===y&&b>=F)return;R!==qr&&bs(R)}g.callbackExpirationTime=y,g.callbackPriority=F,y=y===1073741823?Zl(u0.bind(null,g)):nl(F,j0.bind(null,g),{timeout:10*(1073741821-y)-mo()}),g.callbackNode=y}}}function j0(g,y){if(ru=0,y)return y=wo(),pa(g,y),no(g),null;var R=m0(g);if(R!==0){if(y=g.callbackNode,(Fn&(nu|cu))!==Rr)throw Error(t(327));if(Ws(),g===ae&&R===Fe||ws(g,R),ie!==null){var F=Fn;Fn|=nu;var b=jo(g);do try{rd();break}catch(gt){ca(g,gt)}while(1);if(zu(),Fn=F,$u.current=b,Oe===ni)throw y=st,ws(g,R),Ol(g,R),no(g),y;if(ie===null)switch(b=g.finishedWork=g.current.alternate,g.finishedExpirationTime=R,F=Oe,ae=null,F){case Ni:case ni:throw Error(t(345));case Kn:pa(g,2=R){g.lastPingedTime=R,ws(g,R);break}}if(J=m0(g),J!==0&&J!==R)break;if(F!==0&&F!==R){g.lastPingedTime=F;break}g.timeoutHandle=an(Rl.bind(null,g),b);break}Rl(g);break;case Eo:if(Ol(g,R),F=g.lastSuspendedTime,R===F&&(g.nextKnownPendingLevel=qc(b)),_n&&(b=g.lastPingedTime,b===0||b>=R)){g.lastPingedTime=R,ws(g,R);break}if(b=m0(g),b!==0&&b!==R)break;if(F!==0&&F!==R){g.lastPingedTime=F;break}if(Jt!==1073741823?F=10*(1073741821-Jt)-mo():yt===1073741823?F=0:(F=10*(1073741821-yt)-5e3,b=mo(),R=10*(1073741821-R)-b,F=b-F,0>F&&(F=0),F=(120>F?120:480>F?480:1080>F?1080:1920>F?1920:3e3>F?3e3:4320>F?4320:1960*_f(F/1960))-F,R=F?F=0:(b=de.busyDelayMs|0,J=mo()-(10*(1073741821-J)-(de.timeoutMs|0||5e3)),F=J<=b?0:b+F-J),10 component higher in the tree to provide a loading indicator or placeholder to display.`+Hr(b))}Oe!==Do&&(Oe=Kn),J=Cl(J,b),xt=F;do{switch(xt.tag){case 3:de=J,xt.effectTag|=4096,xt.expirationTime=y;var ze=Es(xt,de,y);oa(xt,ze);break e;case 1:de=J;var lt=xt.type,$t=xt.stateNode;if((xt.effectTag&64)==0&&(typeof lt.getDerivedStateFromError=="function"||$t!==null&&typeof $t.componentDidCatch=="function"&&(mr===null||!mr.has($t)))){xt.effectTag|=4096,xt.expirationTime=y;var Wn=fa(xt,de,y);oa(xt,Wn);break e}}xt=xt.return}while(xt!==null)}ie=y0(ie)}catch(si){y=si;continue}break}while(1)}function jo(){var g=$u.current;return $u.current=b0,g===null?b0:g}function dc(g,y){gSn&&(Sn=g)}function D2(){for(;ie!==null;)ie=id(ie)}function rd(){for(;ie!==null&&!$n();)ie=id(ie)}function id(g){var y=qa(g.alternate,g,Fe);return g.memoizedProps=g.pendingProps,y===null&&(y=y0(g)),Ds.current=null,y}function y0(g){ie=g;do{var y=ie.alternate;if(g=ie.return,(ie.effectTag&2048)==0){e:{var R=y;y=ie;var F=Fe,b=y.pendingProps;switch(y.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:eu(y.type)&&Jo(y);break;case 3:Je(y),Yi(y),b=y.stateNode,b.pendingContext&&(b.context=b.pendingContext,b.pendingContext=null),(R===null||R.child===null)&&es(y)&&Ju(y),Jr(y);break;case 5:oe(y);var J=Z(Ae.current);if(F=y.type,R!==null&&y.stateNode!=null)Wu(R,y,F,b,J),R.ref!==y.ref&&(y.effectTag|=128);else if(b){if(R=Z(Ce.current),es(y)){if(b=y,!w)throw Error(t(175));R=au(b.stateNode,b.type,b.memoizedProps,J,R,b),b.updateQueue=R,R=R!==null,R&&Ju(y)}else{var de=fe(F,b,J,R,y);ti(de,y,!1,!1),y.stateNode=de,le(de,F,b,J,R)&&Ju(y)}y.ref!==null&&(y.effectTag|=128)}else if(y.stateNode===null)throw Error(t(166));break;case 6:if(R&&y.stateNode!=null)Rn(R,y,R.memoizedProps,b);else{if(typeof b!="string"&&y.stateNode===null)throw Error(t(166));if(R=Z(Ae.current),J=Z(Ce.current),es(y)){if(R=y,!w)throw Error(t(176));(R=ki(R.stateNode,R.memoizedProps,R))&&Ju(y)}else y.stateNode=nn(b,R,J,y)}break;case 11:break;case 13:if(yi(We,y),b=y.memoizedState,(y.effectTag&64)!=0){y.expirationTime=F;break e}b=b!==null,J=!1,R===null?y.memoizedProps.fallback!==void 0&&es(y):(F=R.memoizedState,J=F!==null,b||F===null||(F=R.child.sibling,F!==null&&(de=y.firstEffect,de!==null?(y.firstEffect=F,F.nextEffect=de):(y.firstEffect=y.lastEffect=F,F.nextEffect=null),F.effectTag=8))),b&&!J&&(y.mode&2)!=0&&(R===null&&y.memoizedProps.unstable_avoidThisFallback!==!0||(We.current&1)!=0?Oe===Ni&&(Oe=eo):((Oe===Ni||Oe===eo)&&(Oe=Eo),Sn!==0&&ae!==null&&(Ol(ae,Fe),Cs(ae,Sn)))),Er&&b&&(y.effectTag|=4),Gt&&(b||J)&&(y.effectTag|=4);break;case 7:break;case 8:break;case 12:break;case 4:Je(y),Jr(y);break;case 10:Su(y);break;case 9:break;case 14:break;case 17:eu(y.type)&&Jo(y);break;case 19:if(yi(We,y),b=y.memoizedState,b===null)break;if(J=(y.effectTag&64)!=0,de=b.rendering,de===null){if(J)Fu(b,!1);else if(Oe!==Ni||R!==null&&(R.effectTag&64)!=0)for(R=y.child;R!==null;){if(de=it(R),de!==null){for(y.effectTag|=64,Fu(b,!1),R=de.updateQueue,R!==null&&(y.updateQueue=R,y.effectTag|=4),b.lastEffect===null&&(y.firstEffect=null),y.lastEffect=b.lastEffect,R=F,b=y.child;b!==null;)J=b,F=R,J.effectTag&=2,J.nextEffect=null,J.firstEffect=null,J.lastEffect=null,de=J.alternate,de===null?(J.childExpirationTime=0,J.expirationTime=F,J.child=null,J.memoizedProps=null,J.memoizedState=null,J.updateQueue=null,J.dependencies=null):(J.childExpirationTime=de.childExpirationTime,J.expirationTime=de.expirationTime,J.child=de.child,J.memoizedProps=de.memoizedProps,J.memoizedState=de.memoizedState,J.updateQueue=de.updateQueue,F=de.dependencies,J.dependencies=F===null?null:{expirationTime:F.expirationTime,firstContext:F.firstContext,responders:F.responders}),b=b.sibling;en(We,We.current&1|2,y),y=y.child;break e}R=R.sibling}}else{if(!J)if(R=it(de),R!==null){if(y.effectTag|=64,J=!0,R=R.updateQueue,R!==null&&(y.updateQueue=R,y.effectTag|=4),Fu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!de.alternate){y=y.lastEffect=b.lastEffect,y!==null&&(y.nextEffect=null);break}}else mo()>b.tailExpiration&&1b&&(b=F),de>b&&(b=de),J=J.sibling;R.childExpirationTime=b}if(y!==null)return y;g!==null&&(g.effectTag&2048)==0&&(g.firstEffect===null&&(g.firstEffect=ie.firstEffect),ie.lastEffect!==null&&(g.lastEffect!==null&&(g.lastEffect.nextEffect=ie.firstEffect),g.lastEffect=ie.lastEffect),1g?y:g}function Rl(g){var y=vs();return d0(99,ul.bind(null,g,y)),null}function ul(g,y){do Ws();while(ri!==null);if((Fn&(nu|cu))!==Rr)throw Error(t(327));var R=g.finishedWork,F=g.finishedExpirationTime;if(R===null)return null;if(g.finishedWork=null,g.finishedExpirationTime=0,R===g.current)throw Error(t(177));g.callbackNode=null,g.callbackExpirationTime=0,g.callbackPriority=90,g.nextKnownPendingLevel=0;var b=qc(R);if(g.firstPendingTime=b,F<=g.lastSuspendedTime?g.firstSuspendedTime=g.lastSuspendedTime=g.nextKnownPendingLevel=0:F<=g.firstSuspendedTime&&(g.firstSuspendedTime=F-1),F<=g.lastPingedTime&&(g.lastPingedTime=0),F<=g.lastExpiredTime&&(g.lastExpiredTime=0),g===ae&&(ie=ae=null,Fe=0),1=R?Xt(g,y,R):(en(We,We.current&1,y),y=yu(g,y,R),y!==null?y.sibling:null);en(We,We.current&1,y);break;case 19:if(F=y.childExpirationTime>=R,(g.effectTag&64)!=0){if(F)return xn(g,y,R);y.effectTag|=64}if(b=y.memoizedState,b!==null&&(b.rendering=null,b.tail=null),en(We,We.current,y),!F)return null}return yu(g,y,R)}h0=!1}}else h0=!1;switch(y.expirationTime=0,y.tag){case 2:if(F=y.type,g!==null&&(g.alternate=null,y.alternate=null,y.effectTag|=2),g=y.pendingProps,b=Au(y,Ai.current),F0(y,R),b=un(null,y,F,g,b,R),y.effectTag|=1,typeof b=="object"&&b!==null&&typeof b.render=="function"&&b.$$typeof===void 0){if(y.tag=1,fn(),eu(F)){var J=!0;ai(y)}else J=!1;y.memoizedState=b.state!==null&&b.state!==void 0?b.state:null;var de=F.getDerivedStateFromProps;typeof de=="function"&&$l(y,F,de,g),b.updater=la,y.stateNode=b,b._reactInternalFiber=y,Us(y,F,g,R),y=rt(null,y,F,!0,J,R)}else y.tag=0,Bi(null,y,b,R),y=y.child;return y;case 16:if(b=y.elementType,g!==null&&(g.alternate=null,y.alternate=null,y.effectTag|=2),g=y.pendingProps,we(b),b._status!==1)throw b._result;switch(b=b._result,y.type=b,J=y.tag=ol(b),g=Yn(b,g),J){case 0:y=n0(null,y,b,g,R);break;case 1:y=Re(null,y,b,g,R);break;case 11:y=Ci(null,y,b,g,R);break;case 14:y=yf(null,y,b,Yn(b.type,g),F,R);break;default:throw Error(t(306,b,""))}return y;case 0:return F=y.type,b=y.pendingProps,b=y.elementType===F?b:Yn(F,b),n0(g,y,F,b,R);case 1:return F=y.type,b=y.pendingProps,b=y.elementType===F?b:Yn(F,b),Re(g,y,F,b,R);case 3:if(Ye(y),F=y.updateQueue,F===null)throw Error(t(282));if(b=y.memoizedState,b=b!==null?b.element:null,To(y,F,y.pendingProps,null,R),F=y.memoizedState.element,F===b)tu(),y=yu(g,y,R);else{if((b=y.stateNode.hydrate)&&(w?(Tu=Po(y.stateNode.containerInfo),Qu=y,b=Ei=!0):b=!1),b)for(R=G(y,null,F,R),y.child=R;R;)R.effectTag=R.effectTag&-3|1024,R=R.sibling;else Bi(g,y,F,R),tu();y=y.child}return y;case 5:return mt(y),g===null&&U0(y),F=y.type,b=y.pendingProps,J=g!==null?g.memoizedProps:null,de=b.children,dt(F,b)?de=null:J!==null&&dt(F,J)&&(y.effectTag|=16),t0(g,y),y.mode&4&&R!==1&&Rt(F,b)?(y.expirationTime=y.childExpirationTime=1,y=null):(Bi(g,y,de,R),y=y.child),y;case 6:return g===null&&U0(y),null;case 13:return Xt(g,y,R);case 4:return ke(y,y.stateNode.containerInfo),F=y.pendingProps,g===null?y.child=z(y,null,F,R):Bi(g,y,F,R),y.child;case 11:return F=y.type,b=y.pendingProps,b=y.elementType===F?b:Yn(F,b),Ci(g,y,F,b,R);case 7:return Bi(g,y,y.pendingProps,R),y.child;case 8:return Bi(g,y,y.pendingProps.children,R),y.child;case 12:return Bi(g,y,y.pendingProps.children,R),y.child;case 10:e:{if(F=y.type._context,b=y.pendingProps,de=y.memoizedProps,J=b.value,Hu(y,J),de!==null){var gt=de.value;if(J=Ne(gt,J)?0:(typeof F._calculateChangedBits=="function"?F._calculateChangedBits(gt,J):1073741823)|0,J===0){if(de.children===b.children&&!gi.current){y=yu(g,y,R);break e}}else for(gt=y.child,gt!==null&&(gt.return=y);gt!==null;){var xt=gt.dependencies;if(xt!==null){de=gt.child;for(var Lt=xt.firstContext;Lt!==null;){if(Lt.context===F&&(Lt.observedBits&J)!=0){gt.tag===1&&(Lt=yo(R,null),Lt.tag=2,Zo(gt,Lt)),gt.expirationTime=y&&g<=y}function Ol(g,y){var R=g.firstSuspendedTime,F=g.lastSuspendedTime;Ry||R===0)&&(g.lastSuspendedTime=y),y<=g.lastPingedTime&&(g.lastPingedTime=0),y<=g.lastExpiredTime&&(g.lastExpiredTime=0)}function Cs(g,y){y>g.firstPendingTime&&(g.firstPendingTime=y);var R=g.firstSuspendedTime;R!==0&&(y>=R?g.firstSuspendedTime=g.lastSuspendedTime=g.nextKnownPendingLevel=0:y>=g.lastSuspendedTime&&(g.lastSuspendedTime=y+1),y>g.nextKnownPendingLevel&&(g.nextKnownPendingLevel=y))}function pa(g,y){var R=g.lastExpiredTime;(R===0||R>y)&&(g.lastExpiredTime=y)}function od(g){var y=g._reactInternalFiber;if(y===void 0)throw typeof g.render=="function"?Error(t(188)):Error(t(268,Object.keys(g)));return g=Xe(y),g===null?null:g.stateNode}function ha(g,y){g=g.memoizedState,g!==null&&g.dehydrated!==null&&g.retryTime{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var jI=0;tc.__interactionsRef=null;tc.__subscriberRef=null;tc.unstable_clear=function(i){return i()};tc.unstable_getCurrent=function(){return null};tc.unstable_getThreadID=function(){return++jI};tc.unstable_trace=function(i,o,a){return a()};tc.unstable_wrap=function(i){return i};tc.unstable_subscribe=function(){};tc.unstable_unsubscribe=function(){}});var dT=Ke(mu=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";Object.defineProperty(mu,"__esModule",{value:!0});var i=!0,o=0,a=0,c=0;mu.__interactionsRef=null,mu.__subscriberRef=null,i&&(mu.__interactionsRef={current:new Set},mu.__subscriberRef={current:null});function _(ue){if(!i)return ue();var _e=mu.__interactionsRef.current;mu.__interactionsRef.current=new Set;try{return ue()}finally{mu.__interactionsRef.current=_e}}function t(){return i?mu.__interactionsRef.current:null}function M(){return++c}function N(ue,_e,ce){var me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:o;if(!i)return ce();var re={__count:1,id:a++,name:ue,timestamp:_e},we=mu.__interactionsRef.current,Ie=new Set(we);Ie.add(re),mu.__interactionsRef.current=Ie;var je=mu.__subscriberRef.current,ct;try{je!==null&&je.onInteractionTraced(re)}finally{try{je!==null&&je.onWorkStarted(Ie,me)}finally{try{ct=ce()}finally{mu.__interactionsRef.current=we;try{je!==null&&je.onWorkStopped(Ie,me)}finally{re.__count--,je!==null&&re.__count===0&&je.onInteractionScheduledWorkCompleted(re)}}}}return ct}function O(ue){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o;if(!i)return ue;var ce=mu.__interactionsRef.current,me=mu.__subscriberRef.current;me!==null&&me.onWorkScheduled(ce,_e),ce.forEach(function(Ie){Ie.__count++});var re=!1;function we(){var Ie=mu.__interactionsRef.current;mu.__interactionsRef.current=ce,me=mu.__subscriberRef.current;try{var je;try{me!==null&&me.onWorkStarted(ce,_e)}finally{try{je=ue.apply(void 0,arguments)}finally{mu.__interactionsRef.current=Ie,me!==null&&me.onWorkStopped(ce,_e)}}return je}finally{re||(re=!0,ce.forEach(function(ct){ct.__count--,me!==null&&ct.__count===0&&me.onInteractionScheduledWorkCompleted(ct)}))}}return we.cancel=function(){me=mu.__subscriberRef.current;try{me!==null&&me.onWorkCanceled(ce,_e)}finally{ce.forEach(function(je){je.__count--,me&&je.__count===0&&me.onInteractionScheduledWorkCompleted(je)})}},we}var T=null;i&&(T=new Set);function B(ue){i&&(T.add(ue),T.size===1&&(mu.__subscriberRef.current={onInteractionScheduledWorkCompleted:ne,onInteractionTraced:q,onWorkCanceled:ve,onWorkScheduled:m,onWorkStarted:pe,onWorkStopped:ge}))}function H(ue){i&&(T.delete(ue),T.size===0&&(mu.__subscriberRef.current=null))}function q(ue){var _e=!1,ce=null;if(T.forEach(function(me){try{me.onInteractionTraced(ue)}catch(re){_e||(_e=!0,ce=re)}}),_e)throw ce}function ne(ue){var _e=!1,ce=null;if(T.forEach(function(me){try{me.onInteractionScheduledWorkCompleted(ue)}catch(re){_e||(_e=!0,ce=re)}}),_e)throw ce}function m(ue,_e){var ce=!1,me=null;if(T.forEach(function(re){try{re.onWorkScheduled(ue,_e)}catch(we){ce||(ce=!0,me=we)}}),ce)throw me}function pe(ue,_e){var ce=!1,me=null;if(T.forEach(function(re){try{re.onWorkStarted(ue,_e)}catch(we){ce||(ce=!0,me=we)}}),ce)throw me}function ge(ue,_e){var ce=!1,me=null;if(T.forEach(function(re){try{re.onWorkStopped(ue,_e)}catch(we){ce||(ce=!0,me=we)}}),ce)throw me}function ve(ue,_e){var ce=!1,me=null;if(T.forEach(function(re){try{re.onWorkCanceled(ue,_e)}catch(we){ce||(ce=!0,me=we)}}),ce)throw me}mu.unstable_clear=_,mu.unstable_getCurrent=t,mu.unstable_getThreadID=M,mu.unstable_trace=N,mu.unstable_wrap=O,mu.unstable_subscribe=B,mu.unstable_unsubscribe=H}()});var pT=Ke((jW,PD)=>{"use strict";process.env.NODE_ENV==="production"?PD.exports=cT():PD.exports=dT()});var hT=Ke((zW,Qy)=>{"use strict";process.env.NODE_ENV!=="production"&&(Qy.exports=function i(o){"use strict";var a=Iy(),c=Mi(),_=hD(),t=Q_(),M=pT(),N=0,O=1,T=2,B=3,H=4,q=5,ne=6,m=7,pe=8,ge=9,ve=10,ue=11,_e=12,ce=13,me=14,re=15,we=16,Ie=17,je=18,ct=19,pt=20,Xe=21,tt=function(){};tt=function(f,d){for(var E=arguments.length,C=new Array(E>2?E-2:0),A=2;A8)throw new Error("warningWithoutStack() currently supports at most 8 arguments.");if(!f){if(typeof console!="undefined"){var j=C.map(function(se){return""+se});j.unshift("Warning: "+d),Function.prototype.apply.call(console.error,console,j)}try{var V=0,te="Warning: "+d.replace(/%s/g,function(){return C[V++]});throw new Error(te)}catch(se){}}};var He=tt;function kt(f){return f._reactInternalFiber}function zt(f,d){f._reactInternalFiber=d}var nt=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;nt.hasOwnProperty("ReactCurrentDispatcher")||(nt.ReactCurrentDispatcher={current:null}),nt.hasOwnProperty("ReactCurrentBatchConfig")||(nt.ReactCurrentBatchConfig={suspense:null});var X=typeof Symbol=="function"&&Symbol.for,fe=X?Symbol.for("react.element"):60103,xe=X?Symbol.for("react.portal"):60106,le=X?Symbol.for("react.fragment"):60107,qe=X?Symbol.for("react.strict_mode"):60108,dt=X?Symbol.for("react.profiler"):60114,Rt=X?Symbol.for("react.provider"):60109,nn=X?Symbol.for("react.context"):60110,an=X?Symbol.for("react.concurrent_mode"):60111,Mn=X?Symbol.for("react.forward_ref"):60112,lr=X?Symbol.for("react.suspense"):60113,ln=X?Symbol.for("react.suspense_list"):60120,Gt=X?Symbol.for("react.memo"):60115,Er=X?Symbol.for("react.lazy"):60116,w=X?Symbol.for("react.fundamental"):60117,jt=X?Symbol.for("react.responder"):60118,Xn=X?Symbol.for("react.scope"):60119,vr=typeof Symbol=="function"&&Symbol.iterator,jr="@@iterator";function fr(f){if(f===null||typeof f!="object")return null;var d=vr&&f[vr]||f[jr];return typeof d=="function"?d:null}var zr=He;zr=function(f,d){if(!f){for(var E=nt.ReactDebugCurrentFrame,C=E.getStackAddendum(),A=arguments.length,j=new Array(A>2?A-2:0),V=2;V import('./MyComponent'))`,C),f._status=A0,f._result=A}},function(C){f._status===po&&(f._status=J0,f._result=C)})}}function $0(f,d,E){var C=d.displayName||d.name||"";return f.displayName||(C!==""?E+"("+C+")":E)}function Wt(f){if(f==null)return null;if(typeof f.tag=="number"&&He(!1,"Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case le:return"Fragment";case xe:return"Portal";case dt:return"Profiler";case qe:return"StrictMode";case lr:return"Suspense";case ln:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case nn:return"Context.Consumer";case Rt:return"Context.Provider";case Mn:return $0(f,f.render,"ForwardRef");case Gt:return Wt(f.type);case Er:{var d=f,E=Ps(d);if(E)return Wt(E);break}}return null}var xi=0,su=1,mi=2,Dr=4,el=6,Ko=8,Uu=16,Xo=32,Xr=64,O0=128,M0=256,Po=512,au=1024,ki=1028,Is=932,Xl=2047,Io=2048,ho=4096,Hr=!0,Ri=!0,Qo=!0,yi=!0,en=!0,bn=!0,Ai=!1,gi=!1,Vt=!1,Au=!1,eu=!1,Jo=!0,Yi=!1,Ql=!1,k0=!1,ai=!1,f0=!1,Jl=nt.ReactCurrentOwner;function L0(f){var d=f,E=f;if(f.alternate)for(;d.return;)d=d.return;else{var C=d;do d=C,(d.effectTag&(mi|au))!==xi&&(E=d.return),C=d.return;while(C)}return d.tag===B?E:null}function bs(f){return L0(f)===f}function $n(f){{var d=Jl.current;if(d!==null&&d.tag===O){var E=d,C=E.stateNode;C._warnedAboutRefsInRender||He(!1,"%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",Wt(E.type)||"A component"),C._warnedAboutRefsInRender=!0}}var A=kt(f);return A?L0(A)===A:!1}function tl(f){if(L0(f)!==f)throw Error("Unable to find node on an unmounted component.")}function c0(f){var d=f.alternate;if(!d){var E=L0(f);if(E===null)throw Error("Unable to find node on an unmounted component.");return E!==f?null:f}for(var C=f,A=d;;){var j=C.return;if(j===null)break;var V=j.alternate;if(V===null){var te=j.return;if(te!==null){C=A=te;continue}break}if(j.child===V.child){for(var se=j.child;se;){if(se===C)return tl(j),f;if(se===A)return tl(j),d;se=se.sibling}throw Error("Unable to find node on an unmounted component.")}if(C.return!==A.return)C=j,A=V;else{for(var Ue=!1,Qe=j.child;Qe;){if(Qe===C){Ue=!0,C=j,A=V;break}if(Qe===A){Ue=!0,A=j,C=V;break}Qe=Qe.sibling}if(!Ue){for(Qe=V.child;Qe;){if(Qe===C){Ue=!0,C=V,A=j;break}if(Qe===A){Ue=!0,A=V,C=j;break}Qe=Qe.sibling}if(!Ue)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(C.alternate!==A)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(C.tag!==B)throw Error("Unable to find node on an unmounted component.");return C.stateNode.current===C?f:d}function bo(f){var d=c0(f);if(!d)return null;for(var E=d;;){if(E.tag===q||E.tag===ne)return E;if(E.child){E.child.return=E,E=E.child;continue}if(E===d)return null;for(;!E.sibling;){if(!E.return||E.return===d)return null;E=E.return}E.sibling.return=E.return,E=E.sibling}return null}function Sl(f){var d=c0(f);if(!d)return null;for(var E=d;;){if(E.tag===q||E.tag===ne||Vt&&E.tag===pt)return E;if(E.child&&E.tag!==H){E.child.return=E,E=E.child;continue}if(E===d)return null;for(;!E.sibling;){if(!E.return||E.return===d)return null;E=E.return}E.sibling.return=E.return,E=E.sibling}return null}var N0=o.getPublicInstance,wt=o.getRootHostContext,bt=o.getChildHostContext,Hn=o.prepareForCommit,qr=o.resetAfterCommit,Ki=o.createInstance,Qr=o.appendInitialChild,Ou=o.finalizeInitialChildren,vo=o.prepareUpdate,Li=o.shouldSetTextContent,mo=o.shouldDeprioritizeSubtree,vs=o.createTextInstance,Tt=o.setTimeout,d0=o.clearTimeout,nl=o.noTimeout,Zl=o.now,ju=o.isPrimaryRenderer,ms=o.warnsIfNotActing,Bo=o.supportsMutation,Q=o.supportsPersistence,Se=o.supportsHydration,Ne=o.mountResponderInstance,Le=o.unmountResponderInstance,ht=o.getFundamentalComponentInstance,Yn=o.mountFundamentalComponent,Cn=o.shouldUpdateFundamentalComponent,cr=o.getInstanceFromNode,Si=o.appendChild,Mu=o.appendChildToContainer,zu=o.commitTextUpdate,Hu=o.commitMount,Su=o.commitUpdate,Ti=o.insertBefore,F0=o.insertInContainerBefore,ku=o.removeChild,p0=o.removeChildFromContainer,qu=o.resetTextContent,Ia=o.hideInstance,yo=o.hideTextInstance,ua=o.unhideInstance,Zo=o.unhideTextInstance,oa=o.updateFundamentalComponent,ba=o.unmountFundamentalComponent,ys=o.cloneInstance,To=o.createContainerChildSet,Qn=o.appendChildToContainerChildSet,fc=o.finalizeContainerChildren,fi=o.replaceContainerChildren,$r=o.cloneHiddenInstance,$l=o.cloneHiddenTextInstance,la=o.cloneInstance,hf=o.canHydrateInstance,Bs=o.canHydrateTextInstance,Ba=o.canHydrateSuspenseInstance,Us=o.isSuspenseInstancePending,go=o.isSuspenseInstanceFallback,js=o.registerSuspenseInstanceRetry,ji=o.getNextHydratableSibling,U=o.getFirstHydratableChild,z=o.hydrateInstance,G=o.hydrateTextInstance,$=o.hydrateSuspenseInstance,Ce=o.getNextHydratableInstanceAfterSuspenseInstance,Ee=o.commitHydratedContainer,Ae=o.commitHydratedSuspenseInstance,Z=o.clearSuspenseBoundary,ke=o.clearSuspenseBoundaryFromContainer,Je=o.didNotMatchHydratedContainerTextInstance,mt=o.didNotMatchHydratedTextInstance,oe=o.didNotHydrateContainerInstance,We=o.didNotHydrateInstance,it=o.didNotFindHydratableContainerInstance,Ct=o.didNotFindHydratableContainerTextInstance,Mt=o.didNotFindHydratableContainerSuspenseInstance,It=o.didNotFindHydratableInstance,sn=o.didNotFindHydratableTextInstance,rn=o.didNotFindHydratableSuspenseInstance,Ft=/^(.*)[\\\/]/,Dn=function(f,d,E){var C="";if(d){var A=d.fileName,j=A.replace(Ft,"");if(/^index\./.test(j)){var V=A.match(Ft);if(V){var te=V[1];if(te){var se=te.replace(Ft,"");j=se+"/"+j}}}C=" (at "+j+":"+d.lineNumber+")"}else E&&(C=" (created by "+E+")");return` + in `+(f||"Unknown")+C},dr=nt.ReactDebugCurrentFrame;function er(f){switch(f.tag){case B:case H:case ne:case m:case ve:case ge:return"";default:var d=f._debugOwner,E=f._debugSource,C=Wt(f.type),A=null;return d&&(A=Wt(d.type)),Dn(C,E,A)}}function Cr(f){var d="",E=f;do d+=er(E),E=E.return;while(E);return d}var An=null,Lr=null;function _o(){{if(An===null)return null;var f=An._debugOwner;if(f!==null&&typeof f!="undefined")return Wt(f.type)}return null}function Nr(){return An===null?"":Cr(An)}function ut(){dr.getCurrentStack=null,An=null,Lr=null}function Dt(f){dr.getCurrentStack=Nr,An=f,Lr=null}function et(f){Lr=f}var Pt="\u269B",un="\u26D4",fn=typeof performance!="undefined"&&typeof performance.mark=="function"&&typeof performance.clearMarks=="function"&&typeof performance.measure=="function"&&typeof performance.clearMeasures=="function",Jn=null,wr=null,fu=null,Lu=!1,Co=!1,$o=!1,Nu=0,_i=0,P0=new Set,rl=function(f){return Pt+" "+f},vf=function(f,d){var E=d?un+" ":Pt+" ",C=d?" Warning: "+d:"";return""+E+f+C},Tl=function(f){performance.mark(rl(f))},mf=function(f){performance.clearMarks(rl(f))},I0=function(f,d,E){var C=rl(d),A=vf(f,E);try{performance.measure(A,C)}catch(j){}performance.clearMarks(C),performance.clearMeasures(A)},gs=function(f,d){return f+" (#"+d+")"},zs=function(f,d,E){return E===null?f+" ["+(d?"update":"mount")+"]":f+"."+E},b0=function(f,d){var E=Wt(f.type)||"Unknown",C=f._debugID,A=f.alternate!==null,j=zs(E,A,d);if(Lu&&P0.has(j))return!1;P0.add(j);var V=gs(j,C);return Tl(V),!0},B0=function(f,d){var E=Wt(f.type)||"Unknown",C=f._debugID,A=f.alternate!==null,j=zs(E,A,d),V=gs(j,C);mf(V)},_s=function(f,d,E){var C=Wt(f.type)||"Unknown",A=f._debugID,j=f.alternate!==null,V=zs(C,j,d),te=gs(V,A);I0(V,te,E)},Qu=function(f){switch(f.tag){case B:case q:case ne:case H:case m:case ve:case ge:case pe:return!0;default:return!1}},Tu=function(){wr!==null&&fu!==null&&B0(fu,wr),fu=null,wr=null,$o=!1},Ei=function(){for(var f=Jn;f;)f._debugIsCurrentlyTiming&&_s(f,null,null),f=f.return},xo=function(f){f.return!==null&&xo(f.return),f._debugIsCurrentlyTiming&&b0(f,null)},e0=function(){Jn!==null&&xo(Jn)};function U0(){Hr&&_i++}function sa(){Hr&&(Lu&&(Co=!0),wr!==null&&wr!=="componentWillMount"&&wr!=="componentWillReceiveProps"&&($o=!0))}function es(f){if(Hr){if(!fn||Qu(f)||(Jn=f,!b0(f,null)))return;f._debugIsCurrentlyTiming=!0}}function tu(f){if(Hr){if(!fn||Qu(f))return;f._debugIsCurrentlyTiming=!1,B0(f,null)}}function ei(f){if(Hr){if(!fn||Qu(f)||(Jn=f.return,!f._debugIsCurrentlyTiming))return;f._debugIsCurrentlyTiming=!1,_s(f,null,null)}}function h0(f){if(Hr){if(!fn||Qu(f)||(Jn=f.return,!f._debugIsCurrentlyTiming))return;f._debugIsCurrentlyTiming=!1;var d=f.tag===ce?"Rendering was suspended":"An error was thrown inside this error boundary";_s(f,null,d)}}function Bi(f,d){if(Hr){if(!fn||(Tu(),!b0(f,d)))return;fu=f,wr=d}}function Ci(){if(Hr){if(!fn)return;if(wr!==null&&fu!==null){var f=$o?"Scheduled a cascading update":null;_s(fu,wr,f)}wr=null,fu=null}}function yf(f){if(Hr){if(Jn=f,!fn)return;Nu=0,Tl("(React Tree Reconciliation)"),e0()}}function gf(f,d){if(Hr){if(!fn)return;var E=null;if(f!==null)if(f.tag===B)E="A top-level update interrupted the previous render";else{var C=Wt(f.type)||"Unknown";E="An update to "+C+" interrupted the previous render"}else Nu>1&&(E="There were cascading updates");Nu=0;var A=d?"(React Tree Reconciliation: Completed Root)":"(React Tree Reconciliation: Yielded)";Ei(),I0(A,"(React Tree Reconciliation)",E)}}function t0(){if(Hr){if(!fn)return;Lu=!0,Co=!1,P0.clear(),Tl("(Committing Changes)")}}function n0(){if(Hr){if(!fn)return;var f=null;Co?f="Lifecycle hook scheduled a cascading update":Nu>0&&(f="Caused by a cascading update in earlier commit"),Co=!1,Nu++,Lu=!1,P0.clear(),I0("(Committing Changes)","(Committing Changes)",f)}}function Re(){if(Hr){if(!fn)return;_i=0,Tl("(Committing Snapshot Effects)")}}function rt(){if(Hr){if(!fn)return;var f=_i;_i=0,I0("(Committing Snapshot Effects: "+f+" Total)","(Committing Snapshot Effects)",null)}}function Ye(){if(Hr){if(!fn)return;_i=0,Tl("(Committing Host Effects)")}}function Kt(){if(Hr){if(!fn)return;var f=_i;_i=0,I0("(Committing Host Effects: "+f+" Total)","(Committing Host Effects)",null)}}function Xt(){if(Hr){if(!fn)return;_i=0,Tl("(Calling Lifecycle Methods)")}}function pr(){if(Hr){if(!fn)return;var f=_i;_i=0,I0("(Calling Lifecycle Methods: "+f+" Total)","(Calling Lifecycle Methods)",null)}}var Wr=[],xn;xn=[];var yu=-1;function Ju(f){return{current:f}}function ti(f,d){if(yu<0){He(!1,"Unexpected pop.");return}d!==xn[yu]&&He(!1,"Unexpected Fiber popped."),f.current=Wr[yu],Wr[yu]=null,xn[yu]=null,yu--}function Jr(f,d,E){yu++,Wr[yu]=f.current,xn[yu]=E,f.current=d}var Wu;Wu={};var Rn={};Object.freeze(Rn);var Ro=Ju(Rn),Fu=Ju(!1),li=Rn;function Cl(f,d,E){return ai?Rn:E&&Xi(d)?li:Ro.current}function Hs(f,d,E){if(!ai){var C=f.stateNode;C.__reactInternalMemoizedUnmaskedChildContext=d,C.__reactInternalMemoizedMaskedChildContext=E}}function Vu(f,d){if(ai)return Rn;var E=f.type,C=E.contextTypes;if(!C)return Rn;var A=f.stateNode;if(A&&A.__reactInternalMemoizedUnmaskedChildContext===d)return A.__reactInternalMemoizedMaskedChildContext;var j={};for(var V in C)j[V]=d[V];{var te=Wt(E)||"Unknown";_(C,j,"context",te,Nr)}return A&&Hs(f,d,j),j}function aa(){return ai?!1:Fu.current}function Xi(f){if(ai)return!1;var d=f.childContextTypes;return d!=null}function qs(f){ai||(ti(Fu,f),ti(Ro,f))}function Ao(f){ai||(ti(Fu,f),ti(Ro,f))}function zi(f,d,E){if(!ai){if(Ro.current!==Rn)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Jr(Ro,d,f),Jr(Fu,E,f)}}function Oo(f,d,E){if(ai)return E;var C=f.stateNode,A=d.childContextTypes;if(typeof C.getChildContext!="function"){{var j=Wt(d)||"Unknown";Wu[j]||(Wu[j]=!0,He(!1,"%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",j,j))}return E}var V;et("getChildContext"),Bi(f,"getChildContext"),V=C.getChildContext(),Ci(),et(null);for(var te in V)if(!(te in A))throw Error((Wt(d)||"Unknown")+'.getChildContext(): key "'+te+'" is not defined in childContextTypes.');{var se=Wt(d)||"Unknown";_(A,V,"child context",se,Nr)}return a({},E,{},V)}function Hi(f){if(ai)return!1;var d=f.stateNode,E=d&&d.__reactInternalMemoizedMergedChildContext||Rn;return li=Ro.current,Jr(Ro,E,f),Jr(Fu,Fu.current,f),!0}function il(f,d,E){if(!ai){var C=f.stateNode;if(!C)throw Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(E){var A=Oo(f,d,li);C.__reactInternalMemoizedMergedChildContext=A,ti(Fu,f),ti(Ro,f),Jr(Ro,A,f),Jr(Fu,E,f)}else ti(Fu,f),Jr(Fu,E,f)}}function xl(f){if(ai)return Rn;if(!(bs(f)&&f.tag===O))throw Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var d=f;do{switch(d.tag){case B:return d.stateNode.context;case O:{var E=d.type;if(Xi(E))return d.stateNode.__reactInternalMemoizedMergedChildContext;break}}d=d.return}while(d!==null);throw Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}var Uo=1,Mo=2,v0=t.unstable_runWithPriority,Pu=t.unstable_scheduleCallback,Zu=t.unstable_cancelCallback,ts=t.unstable_shouldYield,Es=t.unstable_requestPaint,fa=t.unstable_now,_f=t.unstable_getCurrentPriorityLevel,$u=t.unstable_ImmediatePriority,Ds=t.unstable_UserBlockingPriority,Rr=t.unstable_NormalPriority,r0=t.unstable_LowPriority,nu=t.unstable_IdlePriority;if(bn&&!(M.__interactionsRef!=null&&M.__interactionsRef.current!=null))throw Error("It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling");var cu={},Ni=99,ni=98,Kn=97,eo=96,Eo=95,Do=90,Fn=ts,ae=Es!==void 0?Es:function(){},ie=null,Fe=null,Oe=!1,st=fa(),yt=st<1e4?fa:function(){return fa()-st};function Jt(){switch(_f()){case $u:return Ni;case Ds:return ni;case Rr:return Kn;case r0:return eo;case nu:return Eo;default:throw Error("Unknown priority level.")}}function On(f){switch(f){case Ni:return $u;case ni:return Ds;case Kn:return Rr;case eo:return r0;case Eo:return nu;default:throw Error("Unknown priority level.")}}function Sn(f,d){var E=On(f);return v0(E,d)}function _n(f,d,E){var C=On(f);return Pu(C,d,E)}function Tn(f){return ie===null?(ie=[f],Fe=Pu($u,Fi)):ie.push(f),cu}function ir(f){f!==cu&&Zu(f)}function Bt(){if(Fe!==null){var f=Fe;Fe=null,Zu(f)}Fi()}function Fi(){if(!Oe&&ie!==null){Oe=!0;var f=0;try{var d=!0,E=ie;Sn(Ni,function(){for(;f1?d-1:0),C=1;C2?E-2:0),A=2;A0&&(za.forEach(function(Nt){f.add(Wt(Nt.type)||"Component"),ns.add(Nt.type)}),za=[]);var d=new Set;Ha.length>0&&(Ha.forEach(function(Nt){d.add(Wt(Nt.type)||"Component"),ns.add(Nt.type)}),Ha=[]);var E=new Set;qa.length>0&&(qa.forEach(function(Nt){E.add(Wt(Nt.type)||"Component"),ns.add(Nt.type)}),qa=[]);var C=new Set;da.length>0&&(da.forEach(function(Nt){C.add(Wt(Nt.type)||"Component"),ns.add(Nt.type)}),da=[]);var A=new Set;Ss.length>0&&(Ss.forEach(function(Nt){A.add(Wt(Nt.type)||"Component"),ns.add(Nt.type)}),Ss=[]);var j=new Set;if(Ts.length>0&&(Ts.forEach(function(Nt){j.add(Wt(Nt.type)||"Component"),ns.add(Nt.type)}),Ts=[]),d.size>0){var V=z0(d);He(!1,`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details. + +* Move code with side effects to componentDidMount, and set initial state in the constructor. + +Please update the following components: %s`,V)}if(C.size>0){var te=z0(C);He(!1,`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details. + +* Move data fetching code or side effects to componentDidUpdate. +* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state + +Please update the following components: %s`,te)}if(j.size>0){var se=z0(j);He(!1,`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details. + +* Move data fetching code or side effects to componentDidUpdate. + +Please update the following components: %s`,se)}if(f.size>0){var Ue=z0(f);Ws(!1,`componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. + +* Move code with side effects to componentDidMount, and set initial state in the constructor. +* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. + +Please update the following components: %s`,Ue)}if(E.size>0){var Qe=z0(E);Ws(!1,`componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. + +* Move data fetching code or side effects to componentDidUpdate. +* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state +* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. + +Please update the following components: %s`,Qe)}if(A.size>0){var vt=z0(A);Ws(!1,`componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. + +* Move data fetching code or side effects to componentDidUpdate. +* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. + +Please update the following components: %s`,vt)}};var H0=new Map,Df=new Set;Al.recordLegacyContextWarning=function(f,d){var E=ud(f);if(E===null){He(!1,"Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(!Df.has(f.type)){var C=H0.get(E);(f.type.contextTypes!=null||f.type.childContextTypes!=null||d!==null&&typeof d.getChildContext=="function")&&(C===void 0&&(C=[],H0.set(E,C)),C.push(f))}},Al.flushLegacyContextWarning=function(){H0.forEach(function(f,d){var E=new Set;f.forEach(function(j){E.add(Wt(j.type)||"Component"),Df.add(j.type)});var C=z0(E),A=Cr(d);He(!1,`Legacy context API has been detected within a strict-mode tree. + +The old API will be supported in all 16.x releases, but applications using it should migrate to the new version. + +Please update the following components: %s + +Learn more about this warning here: https://fb.me/react-legacy-context%s`,C,A)})},Al.discardPendingWarnings=function(){za=[],Ha=[],qa=[],da=[],Ss=[],Ts=[],H0=new Map}}var ol=null,Gu=null,Wa=function(f){ol=f};function ro(f){{if(ol===null)return f;var d=ol(f);return d===void 0?f:d.current}}function zo(f){return ro(f)}function wf(f){{if(ol===null)return f;var d=ol(f);if(d===void 0){if(f!=null&&typeof f.render=="function"){var E=ro(f.render);if(f.render!==E){var C={$$typeof:Mn,render:E};return f.displayName!==void 0&&(C.displayName=f.displayName),C}}return f}return d.current}}function Wc(f,d){{if(ol===null)return!1;var E=f.elementType,C=d.type,A=!1,j=typeof C=="object"&&C!==null?C.$$typeof:null;switch(f.tag){case O:{typeof C=="function"&&(A=!0);break}case N:{(typeof C=="function"||j===Er)&&(A=!0);break}case ue:{(j===Mn||j===Er)&&(A=!0);break}case me:case re:{(j===Gt||j===Er)&&(A=!0);break}default:return!1}if(A){var V=ol(E);if(V!==void 0&&V===ol(C))return!0}return!1}}function pc(f){{if(ol===null||typeof WeakSet!="function")return;Gu===null&&(Gu=new WeakSet),Gu.add(f)}}var Ol=function(f,d){{if(ol===null)return;var E=d.staleFamilies,C=d.updatedFamilies;nf(),Op(function(){pa(f.current,C,E)})}},Cs=function(f,d){{if(f.context!==Rn)return;nf(),pv(function(){o_(d,f,null,null)})}};function pa(f,d,E){{var C=f.alternate,A=f.child,j=f.sibling,V=f.tag,te=f.type,se=null;switch(V){case N:case re:case O:se=te;break;case ue:se=te.render;break;default:break}if(ol===null)throw new Error("Expected resolveFamily to be set during hot reload.");var Ue=!1,Qe=!1;if(se!==null){var vt=ol(se);vt!==void 0&&(E.has(vt)?Qe=!0:d.has(vt)&&(V===O?Qe=!0:Ue=!0))}Gu!==null&&(Gu.has(f)||C!==null&&Gu.has(C))&&(Qe=!0),Qe&&(f._debugNeedsRemount=!0),(Qe||Ue)&&yl(f,Un),A!==null&&!Qe&&pa(A,d,E),j!==null&&pa(j,d,E)}}var od=function(f,d){{var E=new Set,C=new Set(d.map(function(A){return A.current}));return ha(f.current,C,E),E}};function ha(f,d,E){{var C=f.child,A=f.sibling,j=f.tag,V=f.type,te=null;switch(j){case N:case re:case O:te=V;break;case ue:te=V.render;break;default:break}var se=!1;te!==null&&d.has(te)&&(se=!0),se?hc(f,E):C!==null&&ha(C,d,E),A!==null&&ha(A,d,E)}}function hc(f,d){{var E=Vc(f,d);if(E)return;for(var C=f;;){switch(C.tag){case q:d.add(C.stateNode);return;case H:d.add(C.stateNode.containerInfo);return;case B:d.add(C.stateNode.containerInfo);return}if(C.return===null)throw new Error("Expected to reach root first.");C=C.return}}}function Vc(f,d){for(var E=f,C=!1;;){if(E.tag===q)C=!0,d.add(E.stateNode);else if(E.child!==null){E.child.return=E,E=E.child;continue}if(E===f)return C;for(;E.sibling===null;){if(E.return===null||E.return===f)return C;E=E.return}E.sibling.return=E.return,E=E.sibling}return!1}function qi(f,d){if(f&&f.defaultProps){var E=a({},d),C=f.defaultProps;for(var A in C)E[A]===void 0&&(E[A]=C[A]);return E}return d}function g(f){if(Z0(f),f._status!==A0)throw f._result;return f._result}var y=Ju(null),R;R={};var F=null,b=null,J=null,de=!1;function gt(){F=null,b=null,J=null,de=!1}function xt(){de=!0}function Lt(){de=!1}function xr(f,d){var E=f.type._context;ju?(Jr(y,E._currentValue,f),E._currentValue=d,E._currentRenderer===void 0||E._currentRenderer===null||E._currentRenderer===R||He(!1,"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),E._currentRenderer=R):(Jr(y,E._currentValue2,f),E._currentValue2=d,E._currentRenderer2===void 0||E._currentRenderer2===null||E._currentRenderer2===R||He(!1,"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),E._currentRenderer2=R)}function io(f){var d=y.current;ti(y,f);var E=f.type._context;ju?E._currentValue=d:E._currentValue2=d}function du(f,d,E){if(y0(E,d))return 0;var C=typeof f._calculateChangedBits=="function"?f._calculateChangedBits(E,d):Vr;return(C&Vr)!==C&&Qt(!1,"calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: %s",C),C|0}function Ho(f,d){for(var E=f;E!==null;){var C=E.alternate;if(E.childExpirationTime=d&&sp(),E.firstContext=null)}}function Ve(f,d){if(de&&Qt(!1,"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),J!==f){if(!(d===!1||d===0)){var E;typeof d!="number"||d===Vr?(J=f,E=Vr):E=d;var C={context:f,observedBits:E,next:null};if(b===null){if(F===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");b=C,F.dependencies={expirationTime:at,firstContext:C,responders:null}}else b=b.next=C}}return ju?f._currentValue:f._currentValue2}var ze=0,lt=1,$t=2,Wn=3,si=!1,ur,ci;ur=!1,ci=null;function Qi(f){var d={baseState:f,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null};return d}function Gr(f){var d={baseState:f.baseState,firstUpdate:f.firstUpdate,lastUpdate:f.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null};return d}function Cu(f,d){var E={expirationTime:f,suspenseConfig:d,tag:ze,payload:null,callback:null,next:null,nextEffect:null};return E.priority=Jt(),E}function Va(f,d){f.lastUpdate===null?f.firstUpdate=f.lastUpdate=d:(f.lastUpdate.next=d,f.lastUpdate=d)}function Ga(f,d){var E=f.alternate,C,A;E===null?(C=f.updateQueue,A=null,C===null&&(C=f.updateQueue=Qi(f.memoizedState))):(C=f.updateQueue,A=E.updateQueue,C===null?A===null?(C=f.updateQueue=Qi(f.memoizedState),A=E.updateQueue=Qi(E.memoizedState)):C=f.updateQueue=Gr(A):A===null&&(A=E.updateQueue=Gr(C))),A===null||C===A?Va(C,d):C.lastUpdate===null||A.lastUpdate===null?(Va(C,d),Va(A,d)):(Va(C,d),A.lastUpdate=d),f.tag===O&&(ci===C||A!==null&&ci===A)&&!ur&&(He(!1,"An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),ur=!0)}function ld(f,d){var E=f.updateQueue;E===null?E=f.updateQueue=Qi(f.memoizedState):E=S2(f,E),E.lastCapturedUpdate===null?E.firstCapturedUpdate=E.lastCapturedUpdate=d:(E.lastCapturedUpdate.next=d,E.lastCapturedUpdate=d)}function S2(f,d){var E=f.alternate;return E!==null&&d===E.updateQueue&&(d=f.updateQueue=Gr(d)),d}function T2(f,d,E,C,A,j){switch(E.tag){case lt:{var V=E.payload;if(typeof V=="function"){xt(),Ri&&f.mode&mr&&V.call(j,C,A);var te=V.call(j,C,A);return Lt(),te}return V}case Wn:f.effectTag=f.effectTag&~ho|Xr;case ze:{var se=E.payload,Ue;return typeof se=="function"?(xt(),Ri&&f.mode&mr&&se.call(j,C,A),Ue=se.call(j,C,A),Lt()):Ue=se,Ue==null?C:a({},C,Ue)}case $t:return si=!0,C}return C}function Sf(f,d,E,C,A){si=!1,d=S2(f,d),ci=d;for(var j=d.baseState,V=null,te=at,se=d.firstUpdate,Ue=j;se!==null;){var Qe=se.expirationTime;if(Qe from render. Or maybe you meant to call this function rather than return it."))}function Eh(f){function d(ot,Ot){if(!!f){var $e=ot.lastEffect;$e!==null?($e.nextEffect=Ot,ot.lastEffect=Ot):ot.firstEffect=ot.lastEffect=Ot,Ot.nextEffect=null,Ot.effectTag=Ko}}function E(ot,Ot){if(!f)return null;for(var $e=Ot;$e!==null;)d(ot,$e),$e=$e.sibling;return null}function C(ot,Ot){for(var $e=new Map,Ut=Ot;Ut!==null;)Ut.key!==null?$e.set(Ut.key,Ut):$e.set(Ut.index,Ut),Ut=Ut.sibling;return $e}function A(ot,Ot,$e){var Ut=C0(ot,Ot,$e);return Ut.index=0,Ut.sibling=null,Ut}function j(ot,Ot,$e){if(ot.index=$e,!f)return Ot;var Ut=ot.alternate;if(Ut!==null){var Pn=Ut.index;return PnKr?(xu=hr,hr=null):xu=hr.sibling;var So=Nt(ot,hr,$e[Kr],Ut);if(So===null){hr===null&&(hr=xu);break}f&&hr&&So.alternate===null&&d(ot,hr),hu=j(So,hu,Kr),Ku===null?pi=So:Ku.sibling=So,Ku=So,hr=xu}if(Kr===$e.length)return E(ot,hr),pi;if(hr===null){for(;Kr<$e.length;Kr++){var Vo=vt(ot,$e[Kr],Ut);Vo!==null&&(hu=j(Vo,hu,Kr),Ku===null?pi=Vo:Ku.sibling=Vo,Ku=Vo)}return pi}for(var ks=C(ot,hr);Kr<$e.length;Kr++){var Xu=Yt(ks,ot,Kr,$e[Kr],Ut);Xu!==null&&(f&&Xu.alternate!==null&&ks.delete(Xu.key===null?Kr:Xu.key),hu=j(Xu,hu,Kr),Ku===null?pi=Xu:Ku.sibling=Xu,Ku=Xu)}return f&&ks.forEach(function(gl){return d(ot,gl)}),pi}function kr(ot,Ot,$e,Ut){var Pn=fr($e);if(typeof Pn!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");{typeof Symbol=="function"&&$e[Symbol.toStringTag]==="Generator"&&(Qc||Qt(!1,"Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),Qc=!0),$e.entries===Pn&&(pd||Qt(!1,"Using Maps as children is unsupported and will likely yield unexpected results. Convert it to a sequence/iterable of keyed ReactElements instead."),pd=!0);var vn=Pn.call($e);if(vn)for(var Wi=null,pi=vn.next();!pi.done;pi=vn.next()){var Ku=pi.value;Wi=Ht(Ku,Wi)}}var hr=Pn.call($e);if(hr==null)throw Error("An iterable object provided no iterator.");for(var hu=null,Kr=null,xu=Ot,So=0,Vo=0,ks=null,Xu=hr.next();xu!==null&&!Xu.done;Vo++,Xu=hr.next()){xu.index>Vo?(ks=xu,xu=null):ks=xu.sibling;var gl=Nt(ot,xu,Xu.value,Ut);if(gl===null){xu===null&&(xu=ks);break}f&&xu&&gl.alternate===null&&d(ot,xu),So=j(gl,So,Vo),Kr===null?hu=gl:Kr.sibling=gl,Kr=gl,xu=ks}if(Xu.done)return E(ot,xu),hu;if(xu===null){for(;!Xu.done;Vo++,Xu=hr.next()){var uf=vt(ot,Xu.value,Ut);uf!==null&&(So=j(uf,So,Vo),Kr===null?hu=uf:Kr.sibling=uf,Kr=uf)}return hu}for(var V0=C(ot,xu);!Xu.done;Vo++,Xu=hr.next()){var Ls=Yt(V0,ot,Vo,Xu.value,Ut);Ls!==null&&(f&&Ls.alternate!==null&&V0.delete(Ls.key===null?Vo:Ls.key),So=j(Ls,So,Vo),Kr===null?hu=Ls:Kr.sibling=Ls,Kr=Ls)}return f&&V0.forEach(function($d){return d(ot,$d)}),hu}function oi(ot,Ot,$e,Ut){if(Ot!==null&&Ot.tag===ne){E(ot,Ot.sibling);var Pn=A(Ot,$e,Ut);return Pn.return=ot,Pn}E(ot,Ot);var vn=_y($e,ot.mode,Ut);return vn.return=ot,vn}function Oi(ot,Ot,$e,Ut){for(var Pn=$e.key,vn=Ot;vn!==null;){if(vn.key===Pn)if(vn.tag===m?$e.type===le:vn.elementType===$e.type||Wc(vn,$e)){E(ot,vn.sibling);var Wi=A(vn,$e.type===le?$e.props.children:$e.props,Ut);return Wi.ref=mc(ot,vn,$e),Wi.return=ot,Wi._debugSource=$e._source,Wi._debugOwner=$e._owner,Wi}else{E(ot,vn);break}else d(ot,vn);vn=vn.sibling}if($e.type===le){var pi=rf($e.props.children,ot.mode,Ut,$e.key);return pi.return=ot,pi}else{var Ku=gy($e,ot.mode,Ut);return Ku.ref=mc(ot,Ot,$e),Ku.return=ot,Ku}}function Fo(ot,Ot,$e,Ut){for(var Pn=$e.key,vn=Ot;vn!==null;){if(vn.key===Pn)if(vn.tag===H&&vn.stateNode.containerInfo===$e.containerInfo&&vn.stateNode.implementation===$e.implementation){E(ot,vn.sibling);var Wi=A(vn,$e.children||[],Ut);return Wi.return=ot,Wi}else{E(ot,vn);break}else d(ot,vn);vn=vn.sibling}var pi=Ey($e,ot.mode,Ut);return pi.return=ot,pi}function $i(ot,Ot,$e,Ut){var Pn=typeof $e=="object"&&$e!==null&&$e.type===le&&$e.key===null;Pn&&($e=$e.props.children);var vn=typeof $e=="object"&&$e!==null;if(vn)switch($e.$$typeof){case fe:return V(Oi(ot,Ot,$e,Ut));case xe:return V(Fo(ot,Ot,$e,Ut))}if(typeof $e=="string"||typeof $e=="number")return V(oi(ot,Ot,""+$e,Ut));if(Zc($e))return yn(ot,Ot,$e,Ut);if(fr($e))return kr(ot,Ot,$e,Ut);if(vn&&yc(ot,$e),typeof $e=="function"&&hd(),typeof $e=="undefined"&&!Pn)switch(ot.tag){case O:{var Wi=ot.stateNode;if(Wi.render._isMockFunction)break}case N:{var pi=ot.type;throw Error((pi.displayName||pi.name||"Component")+"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.")}}return E(ot,Ot)}return $i}var Cf=Eh(!0),$c=Eh(!1);function Dh(f,d){if(!(f===null||d.child===f.child))throw Error("Resuming work not yet implemented.");if(d.child!==null){var E=d.child,C=C0(E,E.pendingProps,E.expirationTime);for(d.child=C,C.return=d;E.sibling!==null;)E=E.sibling,C=C.sibling=C0(E,E.pendingProps,E.expirationTime),C.return=d;C.sibling=null}}function am(f,d){for(var E=f.child;E!==null;)kv(E,d),E=E.sibling}var Gs={},ya=Ju(Gs),iu=Ju(Gs),ko=Ju(Gs);function oo(f){if(f===Gs)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return f}function rs(){var f=oo(ko.current);return f}function Ka(f,d){Jr(ko,d,f),Jr(iu,f,f),Jr(ya,Gs,f);var E=wt(d);ti(ya,f),Jr(ya,E,f)}function o0(f){ti(ya,f),ti(iu,f),ti(ko,f)}function fl(){var f=oo(ya.current);return f}function gc(f){var d=oo(ko.current),E=oo(ya.current),C=bt(E,f.type,d);E!==C&&(Jr(iu,f,f),Jr(ya,C,f))}function L2(f){iu.current===f&&(ti(ya,f),ti(iu,f))}var wh=0,xf=1,Rf=1,e1=2,Ll=Ju(wh);function t1(f,d){return(f&d)!=0}function ga(f){return f&xf}function vd(f,d){return f&xf|d}function md(f,d){return f|d}function Fr(f,d){Jr(Ll,d,f)}function Ea(f){ti(Ll,f)}function N2(f,d){var E=f.memoizedState;if(E!==null)return E.dehydrated!==null;var C=f.memoizedProps;return C.fallback===void 0?!1:C.unstable_avoidThisFallback!==!0?!0:!d}function n1(f){for(var d=f;d!==null;){if(d.tag===ce){var E=d.memoizedState;if(E!==null){var C=E.dehydrated;if(C===null||Us(C)||go(C))return d}}else if(d.tag===ct&&d.memoizedProps.revealOrder!==void 0){var A=(d.effectTag&Xr)!==xi;if(A)return d}else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===f)return null;for(;d.sibling===null;){if(d.return===null||d.return===f)return null;d=d.return}d.sibling.return=d.return,d=d.sibling}return null}var yd={},wi=Array.isArray;function F2(f,d,E,C){return{fiber:C,props:d,responder:f,rootEventTypes:null,state:E}}function fm(f,d,E,C,A){var j=yd,V=f.getInitialState;V!==null&&(j=V(d));var te=F2(f,d,j,E);if(!A)for(var se=E;se!==null;){var Ue=se.tag;if(Ue===q){A=se.stateNode;break}else if(Ue===B){A=se.stateNode.containerInfo;break}se=se.return}Ne(f,te,d,j,A),C.set(f,te)}function gd(f,d,E,C,A){var j,V;if(f&&(j=f.responder,V=f.props),!(j&&j.$$typeof===jt))throw Error("An invalid value was used as an event listener. Expect one or many event listeners created via React.unstable_useResponder().");var te=V;if(E.has(j)){Qt(!1,'Duplicate event responder "%s" found in event listeners. Event listeners passed to elements cannot use the same event responder more than once.',j.displayName);return}E.add(j);var se=C.get(j);se===void 0?fm(j,te,d,C,A):(se.props=te,se.fiber=d)}function hn(f,d,E){var C=new Set,A=d.dependencies;if(f!=null){A===null&&(A=d.dependencies={expirationTime:at,firstContext:null,responders:new Map});var j=A.responders;if(j===null&&(j=new Map),wi(f))for(var V=0,te=f.length;V0){var j=A.dispatch;if(xs!==null){var V=xs.get(A);if(V!==void 0){xs.delete(A);var te=C.memoizedState,se=V;do{var Ue=se.action;te=f(te,Ue),se=se.next}while(se!==null);return y0(te,C.memoizedState)||sp(),C.memoizedState=te,C.baseUpdate===A.last&&(C.baseState=te),A.lastRenderedState=te,[te,j]}}return[C.memoizedState,j]}var Qe=A.last,vt=C.baseUpdate,Nt=C.baseState,Yt;if(vt!==null?(Qe!==null&&(Qe.next=null),Yt=vt.next):Yt=Qe!==null?Qe.next:null,Yt!==null){var Ht=Nt,yn=null,kr=null,oi=vt,Oi=Yt,Fo=!1;do{var $i=Oi.expirationTime;if($iIu&&(Iu=$i,Qd(Iu));else if(gv($i,Oi.suspenseConfig),Oi.eagerReducer===f)Ht=Oi.eagerState;else{var ot=Oi.action;Ht=f(Ht,ot)}oi=Oi,Oi=Oi.next}while(Oi!==null&&Oi!==Yt);Fo||(kr=oi,yn=Ht),y0(Ht,C.memoizedState)||sp(),C.memoizedState=Ht,C.baseUpdate=kr,C.baseState=yn,A.lastRenderedState=Ht}var Ot=A.dispatch;return[C.memoizedState,Ot]}function Pf(f){var d=wc();typeof f=="function"&&(f=f()),d.memoizedState=d.baseState=f;var E=d.queue={last:null,dispatch:null,lastRenderedReducer:P2,lastRenderedState:f},C=E.dispatch=a1.bind(null,dl,E);return[d.memoizedState,C]}function o1(f){return u1(P2,f)}function Ja(f,d,E,C){var A={tag:f,create:d,destroy:E,deps:C,next:null};if(is===null)is=Qa(),is.lastEffect=A.next=A;else{var j=is.lastEffect;if(j===null)is.lastEffect=A.next=A;else{var V=j.next;j.next=A,A.next=V,is.lastEffect=A}}return A}function l1(f){var d=wc(),E={current:f};return Object.seal(E),d.memoizedState=E,E}function I2(f){var d=i1();return d.memoizedState}function wd(f,d,E,C){var A=wc(),j=C===void 0?null:C;kf|=f,A.memoizedState=Ja(d,E,void 0,j)}function Sc(f,d,E,C){var A=i1(),j=C===void 0?null:C,V=void 0;if(jn!==null){var te=jn.memoizedState;if(V=te.destroy,j!==null){var se=te.deps;if(Nf(j,se)){Ja(Of,E,V,j);return}}}kf|=f,A.memoizedState=Ja(d,E,V,j)}function s1(f,d){return typeof jest!="undefined"&&Mv(dl),wd(Dr|Po,sr|r1,f,d)}function Fl(f,d){return typeof jest!="undefined"&&Mv(dl),Sc(Dr|Po,sr|r1,f,d)}function Da(f,d){return wd(Dr,Mf|cl,f,d)}function Ch(f,d){return Sc(Dr,Mf|cl,f,d)}function b2(f,d){if(typeof d=="function"){var E=d,C=f();return E(C),function(){E(null)}}else if(d!=null){var A=d;A.hasOwnProperty("current")||Qt(!1,"Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(A).join(", ")+"}");var j=f();return A.current=j,function(){A.current=null}}}function B2(f,d,E){typeof d!="function"&&Qt(!1,"Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",d!==null?typeof d:"null");var C=E!=null?E.concat([f]):null;return wd(Dr,Mf|cl,b2.bind(null,d,f),C)}function xh(f,d,E){typeof d!="function"&&Qt(!1,"Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",d!==null?typeof d:"null");var C=E!=null?E.concat([f]):null;return Sc(Dr,Mf|cl,b2.bind(null,d,f),C)}function Sd(f,d){}var Rh=Sd;function Pl(f,d){var E=wc(),C=d===void 0?null:d;return E.memoizedState=[f,C],f}function os(f,d){var E=i1(),C=d===void 0?null:d,A=E.memoizedState;if(A!==null&&C!==null){var j=A[1];if(Nf(C,j))return A[0]}return E.memoizedState=[f,C],f}function Rs(f,d){var E=wc(),C=d===void 0?null:d,A=f();return E.memoizedState=[A,C],A}function Ys(f,d){var E=i1(),C=d===void 0?null:d,A=E.memoizedState;if(A!==null&&C!==null){var j=A[1];if(Nf(C,j))return A[0]}var V=f();return E.memoizedState=[V,C],V}function U2(f,d){var E=Pf(f),C=E[0],A=E[1];return s1(function(){t.unstable_next(function(){var j=q0.suspense;q0.suspense=d===void 0?null:d;try{A(f)}finally{q0.suspense=j}})},[f,d]),C}function Ah(f,d){var E=o1(f),C=E[0],A=E[1];return Fl(function(){t.unstable_next(function(){var j=q0.suspense;q0.suspense=d===void 0?null:d;try{A(f)}finally{q0.suspense=j}})},[f,d]),C}function j2(f){var d=Pf(!1),E=d[0],C=d[1],A=Pl(function(j){C(!0),t.unstable_next(function(){var V=q0.suspense;q0.suspense=f===void 0?null:f;try{C(!1),j()}finally{q0.suspense=V}})},[f,E]);return[A,E]}function z2(f){var d=o1(!1),E=d[0],C=d[1],A=os(function(j){C(!0),t.unstable_next(function(){var V=q0.suspense;q0.suspense=f===void 0?null:f;try{C(!1),j()}finally{q0.suspense=V}})},[f,E]);return[A,E]}function a1(f,d,E){if(!(Dc=0){var E=c1()-d1;f.actualDuration+=E,d&&(f.selfBaseDuration=E),d1=-1}}var bl=null,$a=null,wa=!1;function V2(){wa&&Qt(!1,"We should not be hydrating here. This is a bug in React. Please file a bug.")}function G2(f){if(!Se)return!1;var d=f.stateNode.containerInfo;return $a=U(d),bl=f,wa=!0,!0}function hm(f,d){return Se?($a=ji(d),X2(f),wa=!0,!0):!1}function Y2(f,d){switch(f.tag){case B:oe(f.stateNode.containerInfo,d);break;case q:We(f.type,f.memoizedProps,f.stateNode,d);break}var E=rE();E.stateNode=d,E.return=f,E.effectTag=Ko,f.lastEffect!==null?(f.lastEffect.nextEffect=E,f.lastEffect=E):f.firstEffect=f.lastEffect=E}function Fh(f,d){switch(d.effectTag=d.effectTag&~au|mi,f.tag){case B:{var E=f.stateNode.containerInfo;switch(d.tag){case q:var C=d.type,A=d.pendingProps;it(E,C,A);break;case ne:var j=d.pendingProps;Ct(E,j);break;case ce:Mt(E);break}break}case q:{var V=f.type,te=f.memoizedProps,se=f.stateNode;switch(d.tag){case q:var Ue=d.type,Qe=d.pendingProps;It(V,te,se,Ue,Qe);break;case ne:var vt=d.pendingProps;sn(V,te,se,vt);break;case ce:rn(V,te,se);break}break}default:return}}function Ph(f,d){switch(f.tag){case q:{var E=f.type,C=f.pendingProps,A=hf(d,E,C);return A!==null?(f.stateNode=A,!0):!1}case ne:{var j=f.pendingProps,V=Bs(d,j);return V!==null?(f.stateNode=V,!0):!1}case ce:{if(Ai){var te=Ba(d);if(te!==null){var se={dehydrated:te,retryTime:Di};f.memoizedState=se;var Ue=iE(te);return Ue.return=f,f.child=Ue,!0}}return!1}default:return!1}}function K2(f){if(!!wa){var d=$a;if(!d){Fh(bl,f),wa=!1,bl=f;return}var E=d;if(!Ph(f,d)){if(d=ji(E),!d||!Ph(f,d)){Fh(bl,f),wa=!1,bl=f;return}Y2(bl,E)}bl=f,$a=U(d)}}function vm(f,d,E){if(!Se)throw Error("Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var C=f.stateNode,A=z(C,f.type,f.memoizedProps,d,E,f);return f.updateQueue=A,A!==null}function mm(f){if(!Se)throw Error("Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var d=f.stateNode,E=f.memoizedProps,C=G(d,E,f);if(C){var A=bl;if(A!==null)switch(A.tag){case B:{var j=A.stateNode.containerInfo;Je(j,d,E);break}case q:{var V=A.type,te=A.memoizedProps,se=A.stateNode;mt(V,te,se,d,E);break}}}return C}function Ih(f){if(!Se)throw Error("Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var d=f.memoizedState,E=d!==null?d.dehydrated:null;if(!E)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");$(E,f)}function ym(f){if(!Se)throw Error("Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var d=f.memoizedState,E=d!==null?d.dehydrated:null;if(!E)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return Ce(E)}function X2(f){for(var d=f.return;d!==null&&d.tag!==q&&d.tag!==B&&d.tag!==ce;)d=d.return;bl=d}function h1(f){if(!Se||f!==bl)return!1;if(!wa)return X2(f),wa=!0,!1;var d=f.type;if(f.tag!==q||d!=="head"&&d!=="body"&&!Li(d,f.memoizedProps))for(var E=$a;E;)Y2(f,E),E=ji(E);return X2(f),f.tag===ce?$a=ym(f):$a=bl?ji(f.stateNode):null,!0}function v1(){!Se||(bl=null,$a=null,wa=!1)}var m1=nt.ReactCurrentOwner,Sa=!1,Q2,Ks,Xs,Qs,J2,Ta,y1,Td,Tc,Z2;Q2={},Ks={},Xs={},Qs={},J2={},Ta=!1,y1=!1,Td={},Tc={},Z2={};function w0(f,d,E,C){f===null?d.child=$c(d,null,E,C):d.child=Cf(d,f.child,E,C)}function bh(f,d,E,C){d.child=Cf(d,f.child,null,C),d.child=Cf(d,null,E,C)}function Bh(f,d,E,C,A){if(d.type!==d.elementType){var j=E.propTypes;j&&_(j,C,"prop",Wt(E),Nr)}var V=E.render,te=d.ref,se;return uo(d,A),m1.current=d,et("render"),se=Ff(f,d,V,C,te,A),Ri&&d.mode&mr&&d.memoizedState!==null&&(se=Ff(f,d,V,C,te,A)),et(null),f!==null&&!Sa?(_d(f,d,A),Ca(f,d,A)):(d.effectTag|=su,w0(f,d,se,A),d.child)}function Uh(f,d,E,C,A,j){if(f===null){var V=E.type;if(ao(V)&&E.compare===null&&E.defaultProps===void 0){var te=V;return te=ro(V),d.tag=re,d.type=te,tp(d,V),jh(f,d,te,C,A,j)}{var se=V.propTypes;se&&_(se,C,"prop",Wt(V),Nr)}var Ue=yy(E.type,null,C,null,d.mode,j);return Ue.ref=d.ref,Ue.return=d,d.child=Ue,Ue}{var Qe=E.type,vt=Qe.propTypes;vt&&_(vt,C,"prop",Wt(Qe),Nr)}var Nt=f.child;if(A component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",se,se),Q2[se]=!0)}d.mode&mr&&Al.recordLegacyContextWarning(d,null),m1.current=d,te=Ff(null,d,E,A,j,C)}if(d.effectTag|=su,typeof te=="object"&&te!==null&&typeof te.render=="function"&&te.$$typeof===void 0){{var Ue=Wt(E)||"Unknown";Ks[Ue]||(He(!1,"The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",Ue,Ue,Ue),Ks[Ue]=!0)}d.tag=O,Ed();var Qe=!1;Xi(E)?(Qe=!0,Hi(d)):Qe=!1,d.memoizedState=te.state!==null&&te.state!==void 0?te.state:null;var vt=E.getDerivedStateFromProps;return typeof vt=="function"&&Tf(d,E,vt,A),al(d,te),vc(d,E,A,C),ep(null,d,E,!0,Qe,C)}else return d.tag=N,ai&&E.contextTypes&&He(!1,"%s uses the legacy contextTypes API which is no longer supported. Use React.createContext() with React.useContext() instead.",Wt(E)||"Unknown"),Ri&&d.mode&mr&&d.memoizedState!==null&&(te=Ff(null,d,E,A,j,C)),w0(null,d,te,C),tp(d,E),d.child}function tp(f,d){if(d&&d.childContextTypes&&He(!1,"%s(...): childContextTypes cannot be defined on a function component.",d.displayName||d.name||"Component"),f.ref!==null){var E="",C=_o();C&&(E+=` + +Check the render method of \``+C+"`.");var A=C||f._debugID||"",j=f._debugSource;j&&(A=j.fileName+":"+j.lineNumber),J2[A]||(J2[A]=!0,Qt(!1,"Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",E))}if(Ql&&d.defaultProps!==void 0){var V=Wt(d)||"Unknown";Z2[V]||(He(!1,"%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",V),Z2[V]=!0)}if(typeof d.getDerivedStateFromProps=="function"){var te=Wt(d)||"Unknown";Qs[te]||(He(!1,"%s: Function components do not support getDerivedStateFromProps.",te),Qs[te]=!0)}if(typeof d.contextType=="object"&&d.contextType!==null){var se=Wt(d)||"Unknown";Xs[se]||(He(!1,"%s: Function components do not support contextType.",se),Xs[se]=!0)}}var xd={dehydrated:null,retryTime:at};function np(f,d,E){return t1(f,e1)&&(d===null||d.memoizedState!==null)}function Vh(f,d,E){var C=d.mode,A=d.pendingProps;s_(d)&&(d.effectTag|=Xr);var j=Ll.current,V=!1,te=(d.effectTag&Xr)!==xi;if(te||np(j,f,d)?(V=!0,d.effectTag&=~Xr):(f===null||f.memoizedState!==null)&&A.fallback!==void 0&&A.unstable_avoidThisFallback!==!0&&(j=md(j,Rf)),j=ga(j),Fr(d,j),"maxDuration"in A&&(y1||(y1=!0,Qt(!1,"maxDuration has been removed from React. Remove the maxDuration prop."))),f===null){if(A.fallback!==void 0&&(K2(d),Ai)){var se=d.memoizedState;if(se!==null){var Ue=se.dehydrated;if(Ue!==null)return Gh(d,Ue,E)}}if(V){var Qe=A.fallback,vt=rf(null,C,at,null);if(vt.return=d,(d.mode&Y)===Ar){var Nt=d.memoizedState,Yt=Nt!==null?d.child.child:d.child;vt.child=Yt;for(var Ht=Yt;Ht!==null;)Ht.return=vt,Ht=Ht.sibling}var yn=rf(Qe,C,E,null);return yn.return=d,vt.sibling=yn,d.memoizedState=xd,d.child=vt,yn}else{var kr=A.children;return d.memoizedState=null,d.child=$c(d,null,kr,E)}}else{var oi=f.memoizedState;if(oi!==null){if(Ai){var Oi=oi.dehydrated;if(Oi!==null)if(te){if(d.memoizedState!==null)return d.child=f.child,d.effectTag|=Xr,null;var Fo=A.fallback,$i=rf(null,C,at,null);if($i.return=d,$i.child=null,(d.mode&Y)===Ar)for(var ot=$i.child=d.child;ot!==null;)ot.return=$i,ot=ot.sibling;else Cf(d,f.child,null,E);if(en&&d.mode&ii){for(var Ot=0,$e=$i.child;$e!==null;)Ot+=$e.treeBaseDuration,$e=$e.sibling;$i.treeBaseDuration=Ot}var Ut=rf(Fo,C,E,null);return Ut.return=d,$i.sibling=Ut,Ut.effectTag|=mi,$i.childExpirationTime=at,d.memoizedState=xd,d.child=$i,Ut}else return Yh(f,d,Oi,oi,E)}var Pn=f.child,vn=Pn.sibling;if(V){var Wi=A.fallback,pi=C0(Pn,Pn.pendingProps,at);if(pi.return=d,(d.mode&Y)===Ar){var Ku=d.memoizedState,hr=Ku!==null?d.child.child:d.child;if(hr!==Pn.child){pi.child=hr;for(var hu=hr;hu!==null;)hu.return=pi,hu=hu.sibling}}if(en&&d.mode&ii){for(var Kr=0,xu=pi.child;xu!==null;)Kr+=xu.treeBaseDuration,xu=xu.sibling;pi.treeBaseDuration=Kr}var So=C0(vn,Wi,vn.expirationTime);return So.return=d,pi.sibling=So,pi.childExpirationTime=at,d.memoizedState=xd,d.child=pi,So}else{var Vo=A.children,ks=Pn.child,Xu=Cf(d,ks,Vo,E);return d.memoizedState=null,d.child=Xu}}else{var gl=f.child;if(V){var uf=A.fallback,V0=rf(null,C,at,null);if(V0.return=d,V0.child=gl,gl!==null&&(gl.return=V0),(d.mode&Y)===Ar){var Ls=d.memoizedState,$d=Ls!==null?d.child.child:d.child;V0.child=$d;for(var Gf=$d;Gf!==null;)Gf.return=V0,Gf=Gf.sibling}if(en&&d.mode&ii){for(var Fc=0,Hl=V0.child;Hl!==null;)Fc+=Hl.treeBaseDuration,Hl=Hl.sibling;V0.treeBaseDuration=Fc}var G0=rf(uf,C,E,null);return G0.return=d,V0.sibling=G0,G0.effectTag|=mi,V0.childExpirationTime=at,d.memoizedState=xd,d.child=V0,G0}else{d.memoizedState=null;var N1=A.children;return d.child=Cf(d,gl,N1,E)}}}}function rp(f,d,E){d.memoizedState=null;var C=d.pendingProps,A=C.children;return w0(f,d,A,E),d.child}function Gh(f,d,E){if((f.mode&Y)===Ar)Qt(!1,"Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOM.createBlockingRoot(container, { hydrate: true }).render(element) or remove the Suspense components from the server rendered components."),f.expirationTime=Un;else if(go(d)){var C=jl(),A=ws(C);bn&&x(A),f.expirationTime=A}else f.expirationTime=Di,bn&&x(Di);return null}function Yh(f,d,E,C,A){if(V2(),(d.mode&Y)===Ar||go(E))return rp(f,d,A);var j=f.childExpirationTime>=A;if(Sa||j){if(A. Use lowercase "%s" instead.',f,f.toLowerCase());break}case"forward":case"backward":{Qt(!1,'"%s" is not a valid value for revealOrder on . React uses the -s suffix in the spelling. Use "%ss" instead.',f,f.toLowerCase());break}default:Qt(!1,'"%s" is not a supported revealOrder on . Did you mean "together", "forwards" or "backwards"?',f);break}else Qt(!1,'%s is not a supported value for revealOrder on . Did you mean "together", "forwards" or "backwards"?',f)}function Kh(f,d){f!==void 0&&!Tc[f]&&(f!=="collapsed"&&f!=="hidden"?(Tc[f]=!0,Qt(!1,'"%s" is not a supported value for tail on . Did you mean "collapsed" or "hidden"?',f)):d!=="forwards"&&d!=="backwards"&&(Tc[f]=!0,Qt(!1,' is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',f)))}function _1(f,d){{var E=Array.isArray(f),C=!E&&typeof fr(f)=="function";if(E||C){var A=E?"array":"iterable";return Qt(!1,"A nested %s was passed to row #%s in . Wrap it in an additional SuspenseList to configure its revealOrder: ... {%s} ... ",A,d,A),!1}}return!0}function Cm(f,d){if((d==="forwards"||d==="backwards")&&f!==void 0&&f!==null&&f!==!1)if(Array.isArray(f)){for(var E=0;E. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',d)}}function up(f,d,E,C,A,j){var V=f.memoizedState;V===null?f.memoizedState={isBackwards:d,rendering:null,last:C,tail:E,tailExpiration:0,tailMode:A,lastEffect:j}:(V.isBackwards=d,V.rendering=null,V.last=C,V.tail=E,V.tailExpiration=0,V.tailMode=A,V.lastEffect=j)}function op(f,d,E){var C=d.pendingProps,A=C.revealOrder,j=C.tail,V=C.children;Tm(A),Kh(j,A),Cm(V,A),w0(f,d,V,E);var te=Ll.current,se=t1(te,e1);if(se)te=vd(te,e1),d.effectTag|=Xr;else{var Ue=f!==null&&(f.effectTag&Xr)!==xi;Ue&&wm(d,d.child,E),te=ga(te)}if(Fr(d,te),(d.mode&Y)===Ar)d.memoizedState=null;else switch(A){case"forwards":{var Qe=Sm(d.child),vt;Qe===null?(vt=d.child,d.child=null):(vt=Qe.sibling,Qe.sibling=null),up(d,!1,vt,Qe,j,d.lastEffect);break}case"backwards":{var Nt=null,Yt=d.child;for(d.child=null;Yt!==null;){var Ht=Yt.alternate;if(Ht!==null&&n1(Ht)===null){d.child=Yt;break}var yn=Yt.sibling;Yt.sibling=Nt,Nt=Yt,Yt=yn}up(d,!0,Nt,null,j,d.lastEffect);break}case"together":{up(d,!1,null,null,void 0,d.lastEffect);break}default:d.memoizedState=null}return d.child}function xm(f,d,E){Ka(d,d.stateNode.containerInfo);var C=d.pendingProps;return f===null?d.child=Cf(d,null,C,E):w0(f,d,C,E),d.child}function Rm(f,d,E){var C=d.type,A=C._context,j=d.pendingProps,V=d.memoizedProps,te=j.value;{var se=d.type.propTypes;se&&_(se,j,"prop","Context.Provider",Nr)}if(xr(d,te),V!==null){var Ue=V.value,Qe=du(A,te,Ue);if(Qe===0){if(V.children===j.children&&!aa())return Ca(f,d,E)}else Ml(d,A,Qe,E)}var vt=j.children;return w0(f,d,vt,E),d.child}var Xh=!1;function Am(f,d,E){var C=d.type;C._context===void 0?C!==C.Consumer&&(Xh||(Xh=!0,Qt(!1,"Rendering directly is not supported and will be removed in a future major release. Did you mean to render instead?"))):C=C._context;var A=d.pendingProps,j=A.children;typeof j!="function"&&He(!1,"A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),uo(d,E);var V=Ve(C,A.unstable_observedBits),te;return m1.current=d,et("render"),te=j(V),et(null),d.effectTag|=su,w0(f,d,te,E),d.child}function Om(f,d,E){var C=d.type.impl;if(C.reconcileChildren===!1)return null;var A=d.pendingProps,j=A.children;return w0(f,d,j,E),d.child}function lp(f,d,E){var C=d.pendingProps,A=C.children;return w0(f,d,A,E),d.child}function sp(){Sa=!0}function Ca(f,d,E){tu(d),f!==null&&(d.dependencies=f.dependencies),en&&Nh(d);var C=d.expirationTime;C!==at&&Qd(C);var A=d.childExpirationTime;return A=E;se&&(d.effectTag|=Dr)}break;case ce:{var Ue=d.memoizedState;if(Ue!==null){if(Ai&&Ue.dehydrated!==null){Fr(d,ga(Ll.current)),d.effectTag|=Xr;break}var Qe=d.child,vt=Qe.childExpirationTime;if(vt!==at&&vt>=E)return Vh(f,d,E);Fr(d,ga(Ll.current));var Nt=Ca(f,d,E);return Nt!==null?Nt.sibling:null}else Fr(d,ga(Ll.current));break}case ct:{var Yt=(f.effectTag&Xr)!==xi,Ht=d.childExpirationTime>=E;if(Yt){if(Ht)return op(f,d,E);d.effectTag|=Xr}var yn=d.memoizedState;if(yn!==null&&(yn.rendering=null,yn.tail=null),Fr(d,Ll.current),Ht)break;return null}}return Ca(f,d,E)}else Sa=!1}else Sa=!1;switch(d.expirationTime=at,d.tag){case T:return Dm(f,d,d.type,E);case we:{var kr=d.elementType;return bf(f,d,kr,C,E)}case N:{var oi=d.type,Oi=d.pendingProps,Fo=d.elementType===oi?Oi:qi(oi,Oi);return $2(f,d,oi,Fo,E)}case O:{var $i=d.type,ot=d.pendingProps,Ot=d.elementType===$i?ot:qi($i,ot);return qh(f,d,$i,Ot,E)}case B:return _m(f,d,E);case q:return Em(f,d,E);case ne:return If(f,d);case ce:return Vh(f,d,E);case H:return xm(f,d,E);case ue:{var $e=d.type,Ut=d.pendingProps,Pn=d.elementType===$e?Ut:qi($e,Ut);return Bh(f,d,$e,Pn,E)}case m:return gm(f,d,E);case pe:return zh(f,d,E);case _e:return Hh(f,d,E);case ve:return Rm(f,d,E);case ge:return Am(f,d,E);case me:{var vn=d.type,Wi=d.pendingProps,pi=qi(vn,Wi);if(d.type!==d.elementType){var Ku=vn.propTypes;Ku&&_(Ku,pi,"prop",Wt(vn),Nr)}return pi=qi(vn.type,pi),Uh(f,d,vn,pi,C,E)}case re:return jh(f,d,d.type,d.pendingProps,C,E);case Ie:{var hr=d.type,hu=d.pendingProps,Kr=d.elementType===hr?hu:qi(hr,hu);return Cd(f,d,hr,Kr,E)}case ct:return op(f,d,E);case pt:{if(Vt)return Om(f,d,E);break}case Xe:{if(Au)return lp(f,d,E);break}}throw Error("Unknown unit of work tag ("+d.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Qh(f,d,E,C){return{currentFiber:f,impl:E,instance:null,prevProps:null,props:d,state:C}}function Rd(f){return f.tag===ce&&f.memoizedState!==null}function D1(f){return f.child.sibling.child}var Jh={};function fp(f,d,E){if(Au){if(f.tag===q){var C=f.type,A=f.memoizedProps,j=f.stateNode,V=N0(j);V!==null&&d(C,A||Jh,V)===!0&&E.push(V)}var te=f.child;Rd(f)&&(te=D1(f)),te!==null&&cp(te,d,E)}}function Zh(f,d){if(Au){if(f.tag===q){var E=f.type,C=f.memoizedProps,A=f.stateNode,j=N0(A);if(j!==null&&d(E,C,j)===!0)return j}var V=f.child;if(Rd(f)&&(V=D1(f)),V!==null)return $h(V,d)}return null}function cp(f,d,E){for(var C=f;C!==null;)fp(C,d,E),C=C.sibling}function $h(f,d){for(var E=f;E!==null;){var C=Zh(E,d);if(C!==null)return C;E=E.sibling}return null}function ev(f,d,E){if(Ad(f,d))E.push(f.stateNode.methods);else{var C=f.child;Rd(f)&&(C=D1(f)),C!==null&&dp(C,d,E)}}function dp(f,d,E){for(var C=f;C!==null;)ev(C,d,E),C=C.sibling}function Ad(f,d){return f.tag===Xe&&f.type===d&&f.stateNode!==null}function Od(f,d){return{getChildren:function(){var E=d.fiber,C=E.child,A=[];return C!==null&&dp(C,f,A),A.length===0?null:A},getChildrenFromRoot:function(){for(var E=d.fiber,C=E;C!==null;){var A=C.return;if(A===null||(C=A,C.tag===Xe&&C.type===f))break}var j=[];return dp(C.child,f,j),j.length===0?null:j},getParent:function(){for(var E=d.fiber.return;E!==null;){if(E.tag===Xe&&E.type===f)return E.stateNode.methods;E=E.return}return null},getProps:function(){var E=d.fiber;return E.memoizedProps},queryAllNodes:function(E){var C=d.fiber,A=C.child,j=[];return A!==null&&cp(A,E,j),j.length===0?null:j},queryFirstNode:function(E){var C=d.fiber,A=C.child;return A!==null?$h(A,E):null},containsNode:function(E){for(var C=cr(E);C!==null;){if(C.tag===Xe&&C.type===f&&C.stateNode===d)return!0;C=C.return}return!1}}}function qo(f){f.effectTag|=Dr}function Md(f){f.effectTag|=O0}var xa,ef,kd,Ld;if(Bo)xa=function(f,d,E,C){for(var A=d.child;A!==null;){if(A.tag===q||A.tag===ne)Qr(f,A.stateNode);else if(Vt&&A.tag===pt)Qr(f,A.stateNode.instance);else if(A.tag!==H){if(A.child!==null){A.child.return=A,A=A.child;continue}}if(A===d)return;for(;A.sibling===null;){if(A.return===null||A.return===d)return;A=A.return}A.sibling.return=A.return,A=A.sibling}},ef=function(f){},kd=function(f,d,E,C,A){var j=f.memoizedProps;if(j!==C){var V=d.stateNode,te=fl(),se=vo(V,E,j,C,A,te);d.updateQueue=se,se&&qo(d)}},Ld=function(f,d,E,C){E!==C&&qo(d)};else if(Q){xa=function(f,d,E,C){for(var A=d.child;A!==null;){e:if(A.tag===q){var j=A.stateNode;if(E&&C){var V=A.memoizedProps,te=A.type;j=$r(j,te,V,A)}Qr(f,j)}else if(A.tag===ne){var se=A.stateNode;if(E&&C){var Ue=A.memoizedProps;se=$l(se,Ue,A)}Qr(f,se)}else if(Vt&&A.tag===pt){var Qe=A.stateNode.instance;if(E&&C){var vt=A.memoizedProps,Nt=A.type;Qe=$r(Qe,Nt,vt,A)}Qr(f,Qe)}else if(A.tag!==H){if(A.tag===ce){if((A.effectTag&Dr)!==xi){var Yt=A.memoizedState!==null;if(Yt){var Ht=A.child;if(Ht!==null){Ht.child!==null&&(Ht.child.return=Ht,xa(f,Ht,!0,Yt));var yn=Ht.sibling;if(yn!==null){yn.return=A,A=yn;continue}}}}if(A.child!==null){A.child.return=A,A=A.child;continue}}else if(A.child!==null){A.child.return=A,A=A.child;continue}}if(A=A,A===d)return;for(;A.sibling===null;){if(A.return===null||A.return===d)return;A=A.return}A.sibling.return=A.return,A=A.sibling}};var pp=function(f,d,E,C){for(var A=d.child;A!==null;){e:if(A.tag===q){var j=A.stateNode;if(E&&C){var V=A.memoizedProps,te=A.type;j=$r(j,te,V,A)}Qn(f,j)}else if(A.tag===ne){var se=A.stateNode;if(E&&C){var Ue=A.memoizedProps;se=$l(se,Ue,A)}Qn(f,se)}else if(Vt&&A.tag===pt){var Qe=A.stateNode.instance;if(E&&C){var vt=A.memoizedProps,Nt=A.type;Qe=$r(Qe,Nt,vt,A)}Qn(f,Qe)}else if(A.tag!==H){if(A.tag===ce){if((A.effectTag&Dr)!==xi){var Yt=A.memoizedState!==null;if(Yt){var Ht=A.child;if(Ht!==null){Ht.child!==null&&(Ht.child.return=Ht,pp(f,Ht,!0,Yt));var yn=Ht.sibling;if(yn!==null){yn.return=A,A=yn;continue}}}}if(A.child!==null){A.child.return=A,A=A.child;continue}}else if(A.child!==null){A.child.return=A,A=A.child;continue}}if(A=A,A===d)return;for(;A.sibling===null;){if(A.return===null||A.return===d)return;A=A.return}A.sibling.return=A.return,A=A.sibling}};ef=function(f){var d=f.stateNode,E=f.firstEffect===null;if(!E){var C=d.containerInfo,A=To(C);pp(A,f,!1,!1),d.pendingChildren=A,qo(f),fc(C,A)}},kd=function(f,d,E,C,A){var j=f.stateNode,V=f.memoizedProps,te=d.firstEffect===null;if(te&&V===C){d.stateNode=j;return}var se=d.stateNode,Ue=fl(),Qe=null;if(V!==C&&(Qe=vo(se,E,V,C,A,Ue)),te&&Qe===null){d.stateNode=j;return}var vt=ys(j,Qe,E,V,C,d,te,se);Ou(vt,E,C,A,Ue)&&qo(d),d.stateNode=vt,te?qo(d):xa(vt,d,!1,!1)},Ld=function(f,d,E,C){if(E!==C){var A=rs(),j=fl();d.stateNode=vs(C,A,j,d),qo(d)}}}else ef=function(f){},kd=function(f,d,E,C,A){},Ld=function(f,d,E,C){};function Nd(f,d){switch(f.tailMode){case"hidden":{for(var E=f.tail,C=null;E!==null;)E.alternate!==null&&(C=E),E=E.sibling;C===null?f.tail=null:C.sibling=null;break}case"collapsed":{for(var A=f.tail,j=null;A!==null;)A.alternate!==null&&(j=A),A=A.sibling;j===null?!d&&f.tail!==null?f.tail.sibling=null:f.tail=null:j.sibling=null;break}}}function tv(f,d,E){var C=d.pendingProps;switch(d.tag){case T:break;case we:break;case re:case N:break;case O:{var A=d.type;Xi(A)&&qs(d);break}case B:{o0(d),Ao(d);var j=d.stateNode;if(j.pendingContext&&(j.context=j.pendingContext,j.pendingContext=null),f===null||f.child===null){var V=h1(d);V&&qo(d)}ef(d);break}case q:{L2(d);var te=rs(),se=d.type;if(f!==null&&d.stateNode!=null){if(kd(f,d,se,C,te),gi){var Ue=f.memoizedProps.listeners,Qe=C.listeners;Ue!==Qe&&qo(d)}f.ref!==d.ref&&Md(d)}else{if(!C){if(d.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");break}var vt=fl(),Nt=h1(d);if(Nt){if(vm(d,te,vt)&&qo(d),gi){var Yt=C.listeners;Yt!=null&&hn(Yt,d,te)}}else{var Ht=Ki(se,C,te,vt,d);if(xa(Ht,d,!1,!1),d.stateNode=Ht,gi){var yn=C.listeners;yn!=null&&hn(yn,d,te)}Ou(Ht,se,C,te,vt)&&qo(d)}d.ref!==null&&Md(d)}break}case ne:{var kr=C;if(f&&d.stateNode!=null){var oi=f.memoizedProps;Ld(f,d,oi,kr)}else{if(typeof kr!="string"&&d.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var Oi=rs(),Fo=fl(),$i=h1(d);$i?mm(d)&&qo(d):d.stateNode=vs(kr,Oi,Fo,d)}break}case ue:break;case ce:{Ea(d);var ot=d.memoizedState;if(Ai&&ot!==null&&ot.dehydrated!==null)if(f===null){var Ot=h1(d);if(!Ot)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");return Ih(d),bn&&x(Di),null}else return v1(),(d.effectTag&Xr)===xi&&(d.memoizedState=null),d.effectTag|=Dr,null;if((d.effectTag&Xr)!==xi)return d.expirationTime=E,d;var $e=ot!==null,Ut=!1;if(f===null)d.memoizedProps.fallback!==void 0&&h1(d);else{var Pn=f.memoizedState;if(Ut=Pn!==null,!$e&&Pn!==null){var vn=f.child.sibling;if(vn!==null){var Wi=d.firstEffect;Wi!==null?(d.firstEffect=vn,vn.nextEffect=Wi):(d.firstEffect=d.lastEffect=vn,vn.nextEffect=null),vn.effectTag=Ko}}}if($e&&!Ut&&(d.mode&Y)!==Ar){var pi=f===null&&d.memoizedProps.unstable_avoidThisFallback!==!0;pi||t1(Ll.current,Rf)?_v():Ev()}Q&&$e&&(d.effectTag|=Dr),Bo&&($e||Ut)&&(d.effectTag|=Dr),Yi&&d.updateQueue!==null&&d.memoizedProps.suspenseCallback!=null&&(d.effectTag|=Dr);break}case m:break;case pe:break;case _e:break;case H:o0(d),ef(d);break;case ve:io(d);break;case ge:break;case me:break;case Ie:{var Ku=d.type;Xi(Ku)&&qs(d);break}case ct:{Ea(d);var hr=d.memoizedState;if(hr===null)break;var hu=(d.effectTag&Xr)!==xi,Kr=hr.rendering;if(Kr===null)if(hu)Nd(hr,!1);else{var xu=Dv()&&(f===null||(f.effectTag&Xr)===xi);if(!xu)for(var So=d.child;So!==null;){var Vo=n1(So);if(Vo!==null){hu=!0,d.effectTag|=Xr,Nd(hr,!1);var ks=Vo.updateQueue;return ks!==null&&(d.updateQueue=ks,d.effectTag|=Dr),hr.lastEffect===null&&(d.firstEffect=null),d.lastEffect=hr.lastEffect,am(d,E),Fr(d,vd(Ll.current,e1)),d.child}So=So.sibling}}else{if(!hu){var Xu=n1(Kr);if(Xu!==null){d.effectTag|=Xr,hu=!0;var gl=Xu.updateQueue;if(gl!==null&&(d.updateQueue=gl,d.effectTag|=Dr),Nd(hr,!0),hr.tail===null&&hr.tailMode==="hidden"&&!Kr.alternate){var uf=d.lastEffect=hr.lastEffect;return uf!==null&&(uf.nextEffect=null),null}}else if(yt()>hr.tailExpiration&&E>Di){d.effectTag|=Xr,hu=!0,Nd(hr,!1);var V0=E-1;d.expirationTime=d.childExpirationTime=V0,bn&&x(V0)}}if(hr.isBackwards)Kr.sibling=d.child,d.child=Kr;else{var Ls=hr.last;Ls!==null?Ls.sibling=Kr:d.child=Kr,hr.last=Kr}}if(hr.tail!==null){if(hr.tailExpiration===0){var $d=500;hr.tailExpiration=yt()+$d}var Gf=hr.tail;hr.rendering=Gf,hr.tail=Gf.sibling,hr.lastEffect=d.lastEffect,Gf.sibling=null;var Fc=Ll.current;return hu?Fc=vd(Fc,e1):Fc=ga(Fc),Fr(d,Fc),Gf}break}case pt:{if(Vt){var Hl=d.type.impl,G0=d.stateNode;if(G0===null){var N1=Hl.getInitialState,v_;N1!==void 0&&(v_=N1(C)),G0=d.stateNode=Qh(d,C,Hl,v_||{});var m_=ht(G0);if(G0.instance=m_,Hl.reconcileChildren===!1)return null;xa(m_,d,!1,!1),Yn(G0)}else{var EE=G0.props;if(G0.prevProps=EE,G0.props=C,G0.currentFiber=d,Q){var y_=la(G0);G0.instance=y_,xa(y_,d,!1,!1)}var DE=Cn(G0);DE&&qo(d)}}break}case Xe:{if(Au)if(f===null){var wE=d.type,Ry={fiber:d,methods:null};if(d.stateNode=Ry,Ry.methods=Od(wE,Ry),gi){var g_=C.listeners;if(g_!=null){var SE=rs();hn(g_,d,SE)}}d.ref!==null&&(Md(d),qo(d))}else{if(gi){var TE=f.memoizedProps.listeners,CE=C.listeners;(TE!==CE||d.ref!==null)&&qo(d)}else d.ref!==null&&qo(d);f.ref!==d.ref&&Md(d)}break}default:throw Error("Unknown unit of work tag ("+d.tag+"). This error is likely caused by a bug in React. Please file an issue.")}return null}function Mm(f,d){switch(f.tag){case O:{var E=f.type;Xi(E)&&qs(f);var C=f.effectTag;return C&ho?(f.effectTag=C&~ho|Xr,f):null}case B:{o0(f),Ao(f);var A=f.effectTag;if((A&Xr)!==xi)throw Error("The root failed to unmount after an error. This is likely a bug in React. Please file an issue.");return f.effectTag=A&~ho|Xr,f}case q:return L2(f),null;case ce:{if(Ea(f),Ai){var j=f.memoizedState;if(j!==null&&j.dehydrated!==null){if(f.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");v1()}}var V=f.effectTag;return V&ho?(f.effectTag=V&~ho|Xr,f):null}case ct:return Ea(f),null;case H:return o0(f),null;case ve:return io(f),null;default:return null}}function nv(f){switch(f.tag){case O:{var d=f.type.childContextTypes;d!=null&&qs(f);break}case B:{o0(f),Ao(f);break}case q:{L2(f);break}case H:o0(f);break;case ce:Ea(f);break;case ct:Ea(f);break;case ve:io(f);break;default:break}}function hp(f,d){return{value:f,source:d,stack:Cr(d)}}var vp=function(f,d,E,C,A,j,V,te,se){var Ue=Array.prototype.slice.call(arguments,3);try{d.apply(E,Ue)}catch(Qe){this.onError(Qe)}};if(typeof window!="undefined"&&typeof window.dispatchEvent=="function"&&typeof document!="undefined"&&typeof document.createEvent=="function"){var mp=document.createElement("react"),km=function(f,d,E,C,A,j,V,te,se){if(typeof document=="undefined")throw Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var Ue=document.createEvent("Event"),Qe=!0,vt=window.event,Nt=Object.getOwnPropertyDescriptor(window,"event"),Yt=Array.prototype.slice.call(arguments,3);function Ht(){mp.removeEventListener(Fo,Ht,!1),typeof window.event!="undefined"&&window.hasOwnProperty("event")&&(window.event=vt),d.apply(E,Yt),Qe=!1}var yn,kr=!1,oi=!1;function Oi($i){if(yn=$i.error,kr=!0,yn===null&&$i.colno===0&&$i.lineno===0&&(oi=!0),$i.defaultPrevented&&yn!=null&&typeof yn=="object")try{yn._suppressLogging=!0}catch(ot){}}var Fo="react-"+(f||"invokeguardedcallback");window.addEventListener("error",Oi),mp.addEventListener(Fo,Ht,!1),Ue.initEvent(Fo,!1,!1),mp.dispatchEvent(Ue),Nt&&Object.defineProperty(window,"event",Nt),Qe&&(kr?oi&&(yn=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://fb.me/react-crossorigin-error for more information.")):yn=new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`),this.onError(yn)),window.removeEventListener("error",Oi)};vp=km}var Lm=vp,S0=!1,Fd=null,Nm={onError:function(f){S0=!0,Fd=f}};function pl(f,d,E,C,A,j,V,te,se){S0=!1,Fd=null,Lm.apply(Nm,arguments)}function tr(){return S0}function Js(){if(S0){var f=Fd;return S0=!1,Fd=null,f}else throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}function hl(f){return!0}function lo(f){var d=hl(f);if(d!==!1){var E=f.error;{var C=f.componentName,A=f.componentStack,j=f.errorBoundaryName,V=f.errorBoundaryFound,te=f.willRetry;if(E!=null&&E._suppressLogging){if(V&&te)return;console.error(E)}var se=C?"The above error occurred in the <"+C+"> component:":"The above error occurred in one of your React components:",Ue;V&&j?te?Ue="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+j+"."):Ue="This error was initially handled by the error boundary "+j+`. +Recreating the tree from scratch failed so React will unmount the tree.`:Ue=`Consider adding an error boundary to your tree to customize error handling behavior. +Visit https://fb.me/react-error-boundaries to learn more about error boundaries.`;var Qe=""+se+A+` + +`+(""+Ue);console.error(Qe)}}}var rv=null;rv=new Set;var Zs=typeof WeakSet=="function"?WeakSet:Set;function yp(f,d){var E=d.source,C=d.stack;C===null&&E!==null&&(C=Cr(E));var A={componentName:E!==null?Wt(E.type):null,componentStack:C!==null?C:"",error:d.value,errorBoundary:null,errorBoundaryName:null,errorBoundaryFound:!1,willRetry:!1};f!==null&&f.tag===O&&(A.errorBoundary=f.stateNode,A.errorBoundaryName=Wt(f.type),A.errorBoundaryFound=!0,A.willRetry=!0);try{lo(A)}catch(j){setTimeout(function(){throw j})}}var Fm=function(f,d){Bi(f,"componentWillUnmount"),d.props=f.memoizedProps,d.state=f.memoizedState,d.componentWillUnmount(),Ci()};function iv(f,d){if(pl(null,Fm,null,f,d),tr()){var E=Js();qf(f,E)}}function gp(f){var d=f.ref;if(d!==null)if(typeof d=="function"){if(pl(null,d,null,null),tr()){var E=Js();qf(f,E)}}else d.current=null}function Pm(f,d){if(pl(null,d,null),tr()){var E=Js();qf(f,E)}}function _p(f,d){switch(d.tag){case N:case ue:case re:{Cc(cm,Of,d);return}case O:{if(d.effectTag&M0&&f!==null){var E=f.memoizedProps,C=f.memoizedState;Bi(d,"getSnapshotBeforeUpdate");var A=d.stateNode;d.type===d.elementType&&!Ta&&(A.props!==d.memoizedProps&&Qt(!1,"Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Wt(d.type)||"instance"),A.state!==d.memoizedState&&Qt(!1,"Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Wt(d.type)||"instance"));var j=A.getSnapshotBeforeUpdate(d.elementType===d.type?E:qi(d.type,E),C);{var V=rv;j===void 0&&!V.has(d.type)&&(V.add(d.type),He(!1,"%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",Wt(d.type)))}A.__reactInternalSnapshotBeforeUpdate=j,Ci()}return}case B:case q:case ne:case H:case Ie:return;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function Cc(f,d,E){var C=E.updateQueue,A=C!==null?C.lastEffect:null;if(A!==null){var j=A.next,V=j;do{if((V.tag&f)!==Of){var te=V.destroy;V.destroy=void 0,te!==void 0&&te()}if((V.tag&d)!==Of){var se=V.create;V.destroy=se();{var Ue=V.destroy;if(Ue!==void 0&&typeof Ue!="function"){var Qe=void 0;Ue===null?Qe=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof Ue.then=="function"?Qe=` + +It looks like you wrote useEffect(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately: + +useEffect(() => { + async function fetchData() { + // You can await here + const response = await MyAPI.getData(someId); + // ... + } + fetchData(); +}, [someId]); // Or [] if effect doesn't need props or state + +Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching`:Qe=" You returned: "+Ue,He(!1,"An effect function must not return anything besides a function, which is used for clean-up.%s%s",Qe,Cr(E))}}}V=V.next}while(V!==j)}}function Ra(f){if((f.effectTag&Po)!==xi)switch(f.tag){case N:case ue:case re:{Cc(sr,Of,f),Cc(Of,r1,f);break}default:break}}function Ep(f,d,E,C){switch(E.tag){case N:case ue:case re:{Cc(dm,cl,E);break}case O:{var A=E.stateNode;if(E.effectTag&Dr)if(d===null)Bi(E,"componentDidMount"),E.type===E.elementType&&!Ta&&(A.props!==E.memoizedProps&&Qt(!1,"Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Wt(E.type)||"instance"),A.state!==E.memoizedState&&Qt(!1,"Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Wt(E.type)||"instance")),A.componentDidMount(),Ci();else{var j=E.elementType===E.type?d.memoizedProps:qi(E.type,d.memoizedProps),V=d.memoizedState;Bi(E,"componentDidUpdate"),E.type===E.elementType&&!Ta&&(A.props!==E.memoizedProps&&Qt(!1,"Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Wt(E.type)||"instance"),A.state!==E.memoizedState&&Qt(!1,"Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Wt(E.type)||"instance")),A.componentDidUpdate(j,V,A.__reactInternalSnapshotBeforeUpdate),Ci()}var te=E.updateQueue;te!==null&&(E.type===E.elementType&&!Ta&&(A.props!==E.memoizedProps&&Qt(!1,"Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Wt(E.type)||"instance"),A.state!==E.memoizedState&&Qt(!1,"Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Wt(E.type)||"instance")),g0(E,te,A,C));return}case B:{var se=E.updateQueue;if(se!==null){var Ue=null;if(E.child!==null)switch(E.child.tag){case q:Ue=N0(E.child.stateNode);break;case O:Ue=E.child.stateNode;break}g0(E,se,Ue,C)}return}case q:{var Qe=E.stateNode;if(d===null&&E.effectTag&Dr){var vt=E.type,Nt=E.memoizedProps;Hu(Qe,vt,Nt,E)}return}case ne:return;case H:return;case _e:{if(en){var Yt=E.memoizedProps.onRender;typeof Yt=="function"&&(bn?Yt(E.memoizedProps.id,d===null?"mount":"update",E.actualDuration,E.treeBaseDuration,E.actualStartTime,Il(),f.memoizedInteractions):Yt(E.memoizedProps.id,d===null?"mount":"update",E.actualDuration,E.treeBaseDuration,E.actualStartTime,Il()))}return}case ce:{Bl(f,E);return}case ct:case Ie:case pt:case Xe:return;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function Pd(f,d){if(Bo)for(var E=f;;){if(E.tag===q){var C=E.stateNode;d?Ia(C):ua(E.stateNode,E.memoizedProps)}else if(E.tag===ne){var A=E.stateNode;d?yo(A):Zo(A,E.memoizedProps)}else if(E.tag===ce&&E.memoizedState!==null&&E.memoizedState.dehydrated===null){var j=E.child.sibling;j.return=E,E=j;continue}else if(E.child!==null){E.child.return=E,E=E.child;continue}if(E===f)return;for(;E.sibling===null;){if(E.return===null||E.return===f)return;E=E.return}E.sibling.return=E.return,E=E.sibling}}function bu(f){var d=f.ref;if(d!==null){var E=f.stateNode,C;switch(f.tag){case q:C=N0(E);break;default:C=E}Au&&f.tag===Xe&&(C=E.methods),typeof d=="function"?d(C):(d.hasOwnProperty("current")||He(!1,"Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().%s",Wt(f.type),Cr(f)),d.current=C)}}function Yu(f){var d=f.ref;d!==null&&(typeof d=="function"?d(null):d.current=null)}function Dp(f,d,E){switch(kn(d),d.tag){case N:case ue:case me:case re:{var C=d.updateQueue;if(C!==null){var A=C.lastEffect;if(A!==null){var j=A.next,V=E>Kn?Kn:E;Sn(V,function(){var oi=j;do{var Oi=oi.destroy;Oi!==void 0&&Pm(d,Oi),oi=oi.next}while(oi!==j)})}}break}case O:{gp(d);var te=d.stateNode;typeof te.componentWillUnmount=="function"&&iv(d,te);return}case q:{if(gi){var se=d.dependencies;if(se!==null){var Ue=se.responders;if(Ue!==null){for(var Qe=Array.from(Ue.values()),vt=0,Nt=Qe.length;vt component higher in the tree to provide a loading indicator or placeholder to display.`+Cr(E))}kp(),C=hp(C,E);var Nt=d;do{switch(Nt.tag){case B:{var Yt=C;Nt.effectTag|=ho,Nt.expirationTime=A;var Ht=sv(Nt,Yt,A);ld(Nt,Ht);return}case O:var yn=C,kr=Nt.type,oi=Nt.stateNode;if((Nt.effectTag&Xr)===xi&&(typeof kr.getDerivedStateFromError=="function"||oi!==null&&typeof oi.componentDidCatch=="function"&&!Ip(oi))){Nt.effectTag|=ho,Nt.expirationTime=A;var Oi=av(Nt,yn,A);ld(Nt,Oi);return}break;default:break}Nt=Nt.return}while(Nt!==null)}var Oa=Math.ceil,Mr=nt.ReactCurrentDispatcher,Sp=nt.ReactCurrentOwner,vl=nt.IsSomeRendererActing,gu=0,T1=1,Ui=2,Tp=4,Bd=8,T0=16,Os=32,Bf=0,Ud=1,Cp=2,C1=3,x1=4,xp=5,nr=gu,ml=null,Gn=null,Wo=at,Lo=Bf,jd=null,Ul=Un,R1=Un,Rc=null,Ac=at,zd=!1,Rp=0,No=500,dn=null,Hd=!1,qd=null,Oc=null,Mc=!1,kc=null,A1=Do,Ap=at,tf=null,Hm=50,Lc=0,Wd=null,cv=50,O1=0,Uf=null,jf=null,M1=at;function jl(){return(nr&(T0|Os))!==gu?no(yt()):(M1!==at||(M1=no(yt())),M1)}function Nc(){return no(yt())}function zf(f,d,E){var C=d.mode;if((C&Y)===Ar)return Un;var A=Jt();if((C&ri)===Ar)return A===Ni?Un:to;if((nr&T0)!==gu)return Wo;var j;if(E!==null)j=ca(f,E.timeoutMs|0||Ef);else switch(A){case Ni:j=Un;break;case ni:j=ja(f);break;case Kn:case eo:j=ws(f);break;case Eo:j=ru;break;default:throw Error("Expected a valid priority level")}return ml!==null&&j===Wo&&(j-=1),j}function qm(f,d){sy(),dy(f);var E=Vd(f,d);if(E===null){fy(f);return}Hp(f,d),sa();var C=Jt();if(d===Un?(nr&Bd)!==gu&&(nr&(T0|Os))===gu?(W(E,d),k1(E)):(W0(E),W(E,d),nr===gu&&Bt()):(W0(E),W(E,d)),(nr&Tp)!==gu&&(C===ni||C===Ni))if(tf===null)tf=new Map([[E,d]]);else{var A=tf.get(E);(A===void 0||A>d)&&tf.set(E,d)}}var yl=qm;function Vd(f,d){f.expirationTimeA?C:A}function W0(f){var d=f.lastExpiredTime;if(d!==at){f.callbackExpirationTime=Un,f.callbackPriority=Ni,f.callbackNode=Tn(k1.bind(null,f));return}var E=Gd(f),C=f.callbackNode;if(E===at){C!==null&&(f.callbackNode=null,f.callbackExpirationTime=at,f.callbackPriority=Do);return}var A=jl(),j=rd(A,E);if(C!==null){var V=f.callbackPriority,te=f.callbackExpirationTime;if(te===E&&V>=j)return;ir(C)}f.callbackExpirationTime=E,f.callbackPriority=j;var se;E===Un?se=Tn(k1.bind(null,f)):f0?se=_n(j,Yd.bind(null,f)):se=_n(j,Yd.bind(null,f),{timeout:j0(E)-yt()}),f.callbackNode=se}function Yd(f,d){if(M1=at,d){var E=jl();return Vp(f,E),W0(f),null}var C=Gd(f);if(C!==at){var A=f.callbackNode;if((nr&(T0|Os))!==gu)throw Error("Should not already be working.");if(nf(),(f!==ml||C!==Wo)&&(Hf(f,C),ee(f,C)),Gn!==null){var j=nr;nr|=T0;var V=mv(f),te=Kd(f);yf(Gn);do try{ey();break}catch(Qe){vv(f,Qe)}while(!0);if(gt(),nr=j,yv(V),bn&&Xd(te),Lo===Ud){var se=jd;throw zp(),Hf(f,C),Vf(f,C),W0(f),se}if(Gn!==null)zp();else{Rv();var Ue=f.finishedWork=f.current.alternate;f.finishedExpirationTime=C,Wm(f,Ue,Lo,C)}if(W0(f),f.callbackNode===A)return Yd.bind(null,f)}}return null}function Wm(f,d,E,C){switch(ml=null,E){case Bf:case Ud:throw Error("Root did not complete. This is a bug in React.");case Cp:{Vp(f,C>ru?ru:C);break}case C1:{Vf(f,C);var A=f.lastSuspendedTime;C===A&&(f.nextKnownPendingLevel=Lp(d)),p();var j=Ul===Un;if(j&&!(Jo&&Wf.current)){var V=Rp+No-yt();if(V>10){if(zd){var te=f.lastPingedTime;if(te===at||te>=C){f.lastPingedTime=C,Hf(f,C);break}}var se=Gd(f);if(se!==at&&se!==C)break;if(A!==at&&A!==C){f.lastPingedTime=A;break}f.timeoutHandle=Tt(so.bind(null,f),V);break}}so(f);break}case x1:{Vf(f,C);var Ue=f.lastSuspendedTime;if(C===Ue&&(f.nextKnownPendingLevel=Lp(d)),p(),!(Jo&&Wf.current)){if(zd){var Qe=f.lastPingedTime;if(Qe===at||Qe>=C){f.lastPingedTime=C,Hf(f,C);break}}var vt=Gd(f);if(vt!==at&&vt!==C)break;if(Ue!==at&&Ue!==C){f.lastPingedTime=Ue;break}var Nt;if(R1!==Un)Nt=j0(R1)-yt();else if(Ul===Un)Nt=0;else{var Yt=wv(Ul),Ht=yt(),yn=j0(C)-Ht,kr=Ht-Yt;kr<0&&(kr=0),Nt=Up(kr)-kr,yn10){f.timeoutHandle=Tt(so.bind(null,f),Nt);break}}so(f);break}case xp:{if(!(Jo&&Wf.current)&&Ul!==Un&&Rc!==null){var oi=jp(Ul,C,Rc);if(oi>10){Vf(f,C),f.timeoutHandle=Tt(so.bind(null,f),oi);break}}so(f);break}default:throw Error("Unknown root exit status.")}}function k1(f){var d=f.lastExpiredTime,E=d!==at?d:Un;if(f.finishedExpirationTime===E)so(f);else{if((nr&(T0|Os))!==gu)throw Error("Should not already be working.");if(nf(),(f!==ml||E!==Wo)&&(Hf(f,E),ee(f,E)),Gn!==null){var C=nr;nr|=T0;var A=mv(f),j=Kd(f);yf(Gn);do try{Sv();break}catch(te){vv(f,te)}while(!0);if(gt(),nr=C,yv(A),bn&&Xd(j),Lo===Ud){var V=jd;throw zp(),Hf(f,E),Vf(f,E),W0(f),V}if(Gn!==null)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");Rv(),f.finishedWork=f.current.alternate,f.finishedExpirationTime=E,Vm(f,Lo,E),W0(f)}}return null}function Vm(f,d,E){ml=null,(d===C1||d===x1)&&p(),so(f)}function Gm(f,d){Vp(f,d),W0(f),(nr&(T0|Os))===gu&&Bt()}function dv(){if((nr&(T1|T0|Os))!==gu){(nr&T0)!==gu&&Qt(!1,"unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.");return}Km(),nf()}function Ym(f){return Sn(Kn,f)}function pv(f,d,E,C){return Sn(Ni,f.bind(null,d,E,C))}function Km(){if(tf!==null){var f=tf;tf=null,f.forEach(function(d,E){Vp(E,d),W0(E)}),Bt()}}function Xm(f,d){var E=nr;nr|=T1;try{return f(d)}finally{nr=E,nr===gu&&Bt()}}function Qm(f,d){var E=nr;nr|=Ui;try{return f(d)}finally{nr=E,nr===gu&&Bt()}}function hv(f,d,E,C){var A=nr;nr|=Tp;try{return Sn(ni,f.bind(null,d,E,C))}finally{nr=A,nr===gu&&Bt()}}function Jm(f,d){var E=nr;nr&=~T1,nr|=Bd;try{return f(d)}finally{nr=E,nr===gu&&Bt()}}function Op(f,d){if((nr&(T0|Os))!==gu)throw Error("flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.");var E=nr;nr|=T1;try{return Sn(Ni,f.bind(null,d))}finally{nr=E,Bt()}}function Zm(f){var d=nr;nr|=T1;try{Sn(Ni,f)}finally{nr=d,nr===gu&&Bt()}}function Hf(f,d){f.finishedWork=null,f.finishedExpirationTime=at;var E=f.timeoutHandle;if(E!==nl&&(f.timeoutHandle=nl,d0(E)),Gn!==null)for(var C=Gn.return;C!==null;)nv(C),C=C.return;ml=f,Gn=C0(f.current,null,d),Wo=d,Lo=Bf,jd=null,Ul=Un,R1=Un,Rc=null,Ac=at,zd=!1,bn&&(jf=null),Al.discardPendingWarnings(),$s=null}function vv(f,d){do{try{if(gt(),Ed(),ut(),Gn===null||Gn.return===null)return Lo=Ud,jd=d,null;en&&Gn.mode&ii&&p1(Gn,!0),fv(f,Gn.return,Gn,d,Wo),Gn=Tv(Gn)}catch(E){d=E;continue}return}while(!0)}function mv(f){var d=Mr.current;return Mr.current=f1,d===null?f1:d}function yv(f){Mr.current=f}function Kd(f){if(bn){var d=M.__interactionsRef.current;return M.__interactionsRef.current=f.memoizedInteractions,d}return null}function Xd(f){bn&&(M.__interactionsRef.current=f)}function Mp(){Rp=yt()}function gv(f,d){fru&&(Ul=f),d!==null&&fru&&(R1=f,Rc=d)}function Qd(f){f>Ac&&(Ac=f)}function _v(){Lo===Bf&&(Lo=C1)}function Ev(){(Lo===Bf||Lo===C1)&&(Lo=x1),Ac!==at&&ml!==null&&(Vf(ml,Wo),u_(ml,Ac))}function kp(){Lo!==xp&&(Lo=Cp)}function Dv(){return Lo===Bf}function wv(f){var d=j0(f);return d-Ef}function $m(f,d){var E=j0(f);return E-(d.timeoutMs|0||Ef)}function Sv(){for(;Gn!==null;)Gn=Jd(Gn)}function ey(){for(;Gn!==null&&!Fn();)Gn=Jd(Gn)}function Jd(f){var d=f.alternate;es(f),Dt(f);var E;return en&&(f.mode&ii)!==Ar?(W2(f),E=L1(d,f,Wo),p1(f,!0)):E=L1(d,f,Wo),ut(),f.memoizedProps=f.pendingProps,E===null&&(E=Tv(f)),Sp.current=null,E}function Tv(f){Gn=f;do{var d=Gn.alternate,E=Gn.return;if((Gn.effectTag&Io)===xi){Dt(Gn);var C=void 0;if(!en||(Gn.mode&ii)===Ar?C=tv(d,Gn,Wo):(W2(Gn),C=tv(d,Gn,Wo),p1(Gn,!1)),ei(Gn),ut(),ty(Gn),C!==null)return C;if(E!==null&&(E.effectTag&Io)===xi){E.firstEffect===null&&(E.firstEffect=Gn.firstEffect),Gn.lastEffect!==null&&(E.lastEffect!==null&&(E.lastEffect.nextEffect=Gn.firstEffect),E.lastEffect=Gn.lastEffect);var A=Gn.effectTag;A>su&&(E.lastEffect!==null?E.lastEffect.nextEffect=Gn:E.firstEffect=Gn,E.lastEffect=Gn)}}else{var j=Mm(Gn,Wo);if(en&&(Gn.mode&ii)!==Ar){p1(Gn,!1);for(var V=Gn.actualDuration,te=Gn.child;te!==null;)V+=te.actualDuration,te=te.sibling;Gn.actualDuration=V}if(j!==null)return h0(Gn),j.effectTag&=Xl,j;ei(Gn),E!==null&&(E.firstEffect=E.lastEffect=null,E.effectTag|=Io)}var se=Gn.sibling;if(se!==null)return se;Gn=E}while(Gn!==null);return Lo===Bf&&(Lo=xp),null}function Lp(f){var d=f.expirationTime,E=f.childExpirationTime;return d>E?d:E}function ty(f){if(!(Wo!==Di&&f.childExpirationTime===Di)){var d=at;if(en&&(f.mode&ii)!==Ar){for(var E=f.actualDuration,C=f.selfBaseDuration,A=f.alternate===null||f.child!==f.alternate.child,j=f.child;j!==null;){var V=j.expirationTime,te=j.childExpirationTime;V>d&&(d=V),te>d&&(d=te),A&&(E+=j.actualDuration),C+=j.treeBaseDuration,j=j.sibling}f.actualDuration=E,f.treeBaseDuration=C}else for(var se=f.child;se!==null;){var Ue=se.expirationTime,Qe=se.childExpirationTime;Ue>d&&(d=Ue),Qe>d&&(d=Qe),se=se.sibling}f.childExpirationTime=d}}function so(f){var d=Jt();return Sn(Ni,Np.bind(null,f,d)),null}function Np(f,d){do nf();while(kc!==null);if(ay(),(nr&(T0|Os))!==gu)throw Error("Should not already be working.");var E=f.finishedWork,C=f.finishedExpirationTime;if(E===null)return null;if(f.finishedWork=null,f.finishedExpirationTime=at,E===f.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");f.callbackNode=null,f.callbackExpirationTime=at,f.callbackPriority=Do,f.nextKnownPendingLevel=at,t0();var A=Lp(E);lE(f,C,A),f===ml&&(ml=null,Gn=null,Wo=at);var j;if(E.effectTag>su?E.lastEffect!==null?(E.lastEffect.nextEffect=E,j=E.firstEffect):j=E:j=E.firstEffect,j!==null){var V=nr;nr|=Os;var te=Kd(f);Sp.current=null,Re(),Hn(f.containerInfo),dn=j;do if(pl(null,ny,null),tr()){if(dn===null)throw Error("Should be working on an effect.");var se=Js();qf(dn,se),dn=dn.nextEffect}while(dn!==null);rt(),en&&Lh(),Ye(),dn=j;do if(pl(null,ry,null,f,d),tr()){if(dn===null)throw Error("Should be working on an effect.");var Ue=Js();qf(dn,Ue),dn=dn.nextEffect}while(dn!==null);Kt(),qr(f.containerInfo),f.current=E,Xt(),dn=j;do if(pl(null,Fp,null,f,C),tr()){if(dn===null)throw Error("Should be working on an effect.");var Qe=Js();qf(dn,Qe),dn=dn.nextEffect}while(dn!==null);pr(),dn=null,ae(),bn&&Xd(te),nr=V}else f.current=E,Re(),rt(),en&&Lh(),Ye(),Kt(),Xt(),pr();n0();var vt=Mc;if(Mc)Mc=!1,kc=f,Ap=C,A1=d;else for(dn=j;dn!==null;){var Nt=dn.nextEffect;dn.nextEffect=null,dn=Nt}var Yt=f.firstPendingTime;if(Yt!==at){if(bn){if(jf!==null){var Ht=jf;jf=null;for(var yn=0;ynKn?Kn:A1;return A1=Do,Sn(f,Pp)}}function Pp(){if(kc===null)return!1;var f=kc,d=Ap;if(kc=null,Ap=at,(nr&(T0|Os))!==gu)throw Error("Cannot flush passive effects while already rendering.");var E=nr;nr|=Os;for(var C=Kd(f),A=f.current.firstEffect;A!==null;){{if(Dt(A),pl(null,Ra,null,A),tr()){if(A===null)throw Error("Should be working on an effect.");var j=Js();qf(A,j)}ut()}var V=A.nextEffect;A.nextEffect=null,A=V}return bn&&(Xd(C),he(f,d)),nr=E,Bt(),O1=kc===null?0:O1+1,!0}function Ip(f){return Oc!==null&&Oc.has(f)}function bp(f){Oc===null?Oc=new Set([f]):Oc.add(f)}function iy(f){Hd||(Hd=!0,qd=f)}var uy=iy;function Cv(f,d,E){var C=hp(E,d),A=sv(f,C,Un);Ga(f,A);var j=Vd(f,Un);j!==null&&(W0(j),W(j,Un))}function qf(f,d){if(f.tag===B){Cv(f,f,d);return}for(var E=f.return;E!==null;){if(E.tag===B){Cv(E,f,d);return}else if(E.tag===O){var C=E.type,A=E.stateNode;if(typeof C.getDerivedStateFromError=="function"||typeof A.componentDidCatch=="function"&&!Ip(A)){var j=hp(d,f),V=av(E,j,Un);Ga(E,V);var te=Vd(E,Un);te!==null&&(W0(te),W(te,Un));return}}E=E.return}}function Bp(f,d,E){var C=f.pingCache;if(C!==null&&C.delete(d),ml===f&&Wo===E){Lo===x1||Lo===C1&&Ul===Un&&yt()-RpHm)throw Lc=0,Wd=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");O1>cv&&(O1=0,Qt(!1,"Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}function ay(){Al.flushLegacyContextWarning(),yi&&Al.flushPendingUnsafeLifecycleWarnings()}function Rv(){var f=!0;gf(Uf,f),Uf=null}function zp(){var f=!1;gf(Uf,f),Uf=null}function Hp(f,d){Hr&&ml!==null&&d>Wo&&(Uf=f)}var Zd=null;function fy(f){{var d=f.tag;if(d!==B&&d!==O&&d!==N&&d!==ue&&d!==me&&d!==re)return;var E=Wt(f.type)||"ReactComponent";if(Zd!==null){if(Zd.has(E))return;Zd.add(E)}else Zd=new Set([E]);He(!1,"Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in %s.%s",d===O?"the componentWillUnmount method":"a useEffect cleanup function",Cr(f))}}var L1;if(Qo){var cy=null;L1=function(f,d,E){var C=r_(cy,d);try{return ap(f,d,E)}catch(j){if(j!==null&&typeof j=="object"&&typeof j.then=="function")throw j;if(gt(),Ed(),nv(d),r_(d,C),en&&d.mode&ii&&W2(d),pl(null,ap,null,f,d,E),tr()){var A=Js();throw A}else throw j}}}else L1=ap;var Av=!1,Ov=!1;function dy(f){if(f.tag===O)switch(Lr){case"getChildContext":if(Ov)return;He(!1,"setState(...): Cannot call setState() inside getChildContext()"),Ov=!0;break;case"render":if(Av)return;He(!1,"Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),Av=!0;break}}var Wf={current:!1};function qp(f){ms===!0&&vl.current===!0&&Wf.current!==!0&&He(!1,`It looks like you're using the wrong act() around your test interactions. +Be sure to use the matching version of act() corresponding to your renderer: + +// for react-dom: +import {act} from 'react-dom/test-utils'; +// ... +act(() => ...); + +// for react-test-renderer: +import TestRenderer from 'react-test-renderer'; +const {act} = TestRenderer; +// ... +act(() => ...);%s`,Cr(f))}function Mv(f){ms===!0&&(f.mode&mr)!==Ar&&vl.current===!1&&Wf.current===!1&&He(!1,`An update to %s ran an effect, but was not wrapped in act(...). + +When testing, code that causes React state updates should be wrapped into act(...): + +act(() => { + /* fire events that update state */ +}); +/* assert on the output */ + +This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act%s`,Wt(f.type),Cr(f))}function py(f){ms===!0&&nr===gu&&vl.current===!1&&Wf.current===!1&&He(!1,`An update to %s inside a test was not wrapped in act(...). + +When testing, code that causes React state updates should be wrapped into act(...): + +act(() => { + /* fire events that update state */ +}); +/* assert on the output */ + +This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act%s`,Wt(f.type),Cr(f))}var hy=py,Wp=!1;function vy(f){Wp===!1&&t.unstable_flushAllWithoutAsserting===void 0&&(f.mode&Y||f.mode&ri?(Wp=!0,He(!1,`In Concurrent or Sync modes, the "scheduler" module needs to be mocked to guarantee consistent behaviour across tests and browsers. For example, with jest: +jest.mock('scheduler', () => require('scheduler/unstable_mock')); + +For more info, visit https://fb.me/react-mock-scheduler`)):eu===!0&&(Wp=!0,He(!1,`Starting from React v17, the "scheduler" module will need to be mocked to guarantee consistent behaviour across tests and browsers. For example, with jest: +jest.mock('scheduler', () => require('scheduler/unstable_mock')); + +For more info, visit https://fb.me/react-mock-scheduler`)))}var $s=null;function my(f){{var d=Jt();if((f.mode&ri)!==xi&&(d===ni||d===Ni))for(var E=f;E!==null;){var C=E.alternate;if(C!==null)switch(E.tag){case O:var A=C.updateQueue;if(A!==null)for(var j=A.firstUpdate;j!==null;){var V=j.priority;if(V===ni||V===Ni){$s===null?$s=new Set([Wt(E.type)]):$s.add(Wt(E.type));break}j=j.next}break;case N:case ue:case re:if(E.memoizedState!==null&&E.memoizedState.baseUpdate!==null)for(var te=E.memoizedState.baseUpdate;te!==null;){var se=te.priority;if(se===ni||se===Ni){$s===null?$s=new Set([Wt(E.type)]):$s.add(Wt(E.type));break}if(te.next===E.memoizedState.baseUpdate)break;te=te.next}break;default:break}E=E.return}}}function p(){if($s!==null){var f=[];$s.forEach(function(d){return f.push(d)}),$s=null,f.length>0&&He(!1,`%s triggered a user-blocking update that suspended. + +The fix is to split the update into multiple parts: a user-blocking update to provide immediate feedback, and another update that triggers the bulk of the changes. + +Refer to the documentation for useTransition to learn how to implement this pattern.`,f.sort().join(", "))}}function v(f,d){return d*1e3+f.interactionThreadID}function x(f){!bn||(jf===null?jf=[f]:jf.push(f))}function P(f,d,E){if(!!bn&&E.size>0){var C=f.pendingInteractionMap,A=C.get(d);A!=null?E.forEach(function(te){A.has(te)||te.__count++,A.add(te)}):(C.set(d,new Set(E)),E.forEach(function(te){te.__count++}));var j=M.__subscriberRef.current;if(j!==null){var V=v(f,d);j.onWorkScheduled(E,V)}}}function W(f,d){!bn||P(f,d,M.__interactionsRef.current)}function ee(f,d){if(!!bn){var E=new Set;if(f.pendingInteractionMap.forEach(function(j,V){V>=d&&j.forEach(function(te){return E.add(te)})}),f.memoizedInteractions=E,E.size>0){var C=M.__subscriberRef.current;if(C!==null){var A=v(f,d);try{C.onWorkStarted(E,A)}catch(j){_n(Ni,function(){throw j})}}}}}function he(f,d){if(!!bn){var E=f.firstPendingTime,C;try{if(C=M.__subscriberRef.current,C!==null&&f.memoizedInteractions.size>0){var A=v(f,d);C.onWorkStopped(f.memoizedInteractions,A)}}catch(V){_n(Ni,function(){throw V})}finally{var j=f.pendingInteractionMap;j.forEach(function(V,te){te>E&&(j.delete(te),V.forEach(function(se){if(se.__count--,C!==null&&se.__count===0)try{C.onInteractionScheduledWorkCompleted(se)}catch(Ue){_n(Ni,function(){throw Ue})}}))})}}}var De=null,be=null,Et=!1,St=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined";function At(f){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined")return!1;var d=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(d.isDisabled)return!0;if(!d.supportsFiber)return He(!1,"The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://fb.me/react-devtools"),!0;try{var E=d.inject(f);De=function(C,A){try{var j=(C.current.effectTag&Xr)===Xr;if(en){var V=Nc(),te=rd(V,A);d.onCommitFiberRoot(E,C,te,j)}else d.onCommitFiberRoot(E,C,void 0,j)}catch(se){Et||(Et=!0,He(!1,"React DevTools encountered an error: %s",se))}},be=function(C){try{d.onCommitFiberUnmount(E,C)}catch(A){Et||(Et=!0,He(!1,"React DevTools encountered an error: %s",A))}}}catch(C){He(!1,"React DevTools encountered an error: %s.",C)}return!0}function on(f,d){typeof De=="function"&&De(f,d)}function kn(f){typeof be=="function"&&be(f)}var rr;{rr=!1;try{var br=Object.preventExtensions({}),ar=new Map([[br,null]]),ui=new Set([br]);ar.set(0,0),ui.add(0)}catch(f){rr=!0}}var di=1;function zl(f,d,E,C){this.tag=f,this.key=E,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=d,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=C,this.effectTag=xi,this.nextEffect=null,this.firstEffect=null,this.lastEffect=null,this.expirationTime=at,this.childExpirationTime=at,this.alternate=null,en&&(this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0),Hr&&(this._debugID=di++,this._debugIsCurrentlyTiming=!1),this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!rr&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var Zi=function(f,d,E,C){return new zl(f,d,E,C)};function a0(f){var d=f.prototype;return!!(d&&d.isReactComponent)}function ao(f){return typeof f=="function"&&!a0(f)&&f.defaultProps===void 0}function Ms(f){if(typeof f=="function")return a0(f)?O:N;if(f!=null){var d=f.$$typeof;if(d===Mn)return ue;if(d===Gt)return me}return T}function C0(f,d,E){var C=f.alternate;C===null?(C=Zi(f.tag,d,f.key,f.mode),C.elementType=f.elementType,C.type=f.type,C.stateNode=f.stateNode,C._debugID=f._debugID,C._debugSource=f._debugSource,C._debugOwner=f._debugOwner,C._debugHookTypes=f._debugHookTypes,C.alternate=f,f.alternate=C):(C.pendingProps=d,C.effectTag=xi,C.nextEffect=null,C.firstEffect=null,C.lastEffect=null,en&&(C.actualDuration=0,C.actualStartTime=-1)),C.childExpirationTime=f.childExpirationTime,C.expirationTime=f.expirationTime,C.child=f.child,C.memoizedProps=f.memoizedProps,C.memoizedState=f.memoizedState,C.updateQueue=f.updateQueue;var A=f.dependencies;switch(C.dependencies=A===null?null:{expirationTime:A.expirationTime,firstContext:A.firstContext,responders:A.responders},C.sibling=f.sibling,C.index=f.index,C.ref=f.ref,en&&(C.selfBaseDuration=f.selfBaseDuration,C.treeBaseDuration=f.treeBaseDuration),C._debugNeedsRemount=f._debugNeedsRemount,C.tag){case T:case N:case re:C.type=ro(f.type);break;case O:C.type=zo(f.type);break;case ue:C.type=wf(f.type);break;default:break}return C}function kv(f,d){f.effectTag&=mi,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null;var E=f.alternate;if(E===null)f.childExpirationTime=at,f.expirationTime=d,f.child=null,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,en&&(f.selfBaseDuration=0,f.treeBaseDuration=0);else{f.childExpirationTime=E.childExpirationTime,f.expirationTime=E.expirationTime,f.child=E.child,f.memoizedProps=E.memoizedProps,f.memoizedState=E.memoizedState,f.updateQueue=E.updateQueue;var C=E.dependencies;f.dependencies=C===null?null:{expirationTime:C.expirationTime,firstContext:C.firstContext,responders:C.responders},en&&(f.selfBaseDuration=E.selfBaseDuration,f.treeBaseDuration=E.treeBaseDuration)}return f}function Z4(f){var d;return f===Mo?d=ri|Y|mr:f===Uo?d=Y|mr:d=Ar,en&&St&&(d|=ii),Zi(B,null,null,d)}function yy(f,d,E,C,A,j){var V,te=T,se=f;if(typeof f=="function")a0(f)?(te=O,se=zo(se)):se=ro(se);else if(typeof f=="string")te=q;else{e:switch(f){case le:return rf(E.children,A,j,d);case an:te=pe,A|=ri|Y|mr;break;case qe:te=pe,A|=mr;break;case dt:return eE(E,A,j,d);case lr:return tE(E,A,j,d);case ln:return nE(E,A,j,d);default:{if(typeof f=="object"&&f!==null)switch(f.$$typeof){case Rt:te=ve;break e;case nn:te=ge;break e;case Mn:te=ue,se=wf(se);break e;case Gt:te=me;break e;case Er:te=we,se=null;break e;case w:if(Vt)return n_(f,E,A,j,d);break;case Xn:if(Au)return $4(f,E,A,j,d)}var Ue="";{(f===void 0||typeof f=="object"&&f!==null&&Object.keys(f).length===0)&&(Ue+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Qe=C?Wt(C.type):null;Qe&&(Ue+=` + +Check the render method of \``+Qe+"`.")}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(f==null?f:typeof f)+"."+Ue)}}}return V=Zi(te,E,d,A),V.elementType=f,V.type=se,V.expirationTime=j,V}function gy(f,d,E){var C=null;C=f._owner;var A=f.type,j=f.key,V=f.props,te=yy(A,j,V,C,d,E);return te._debugSource=f._source,te._debugOwner=f._owner,te}function rf(f,d,E,C){var A=Zi(m,f,C,d);return A.expirationTime=E,A}function n_(f,d,E,C,A){var j=Zi(pt,d,A,E);return j.elementType=f,j.type=f,j.expirationTime=C,j}function $4(f,d,E,C,A){var j=Zi(Xe,d,A,E);return j.type=f,j.elementType=f,j.expirationTime=C,j}function eE(f,d,E,C){(typeof f.id!="string"||typeof f.onRender!="function")&&He(!1,'Profiler must specify an "id" string and "onRender" function as props');var A=Zi(_e,f,C,d|ii);return A.elementType=dt,A.type=dt,A.expirationTime=E,A}function tE(f,d,E,C){var A=Zi(ce,f,C,d);return A.type=lr,A.elementType=lr,A.expirationTime=E,A}function nE(f,d,E,C){var A=Zi(ct,f,C,d);return A.type=ln,A.elementType=ln,A.expirationTime=E,A}function _y(f,d,E){var C=Zi(ne,f,null,d);return C.expirationTime=E,C}function rE(){var f=Zi(q,null,null,Ar);return f.elementType="DELETED",f.type="DELETED",f}function iE(f){var d=Zi(je,null,null,Ar);return d.stateNode=f,d}function Ey(f,d,E){var C=f.children!==null?f.children:[],A=Zi(H,C,f.key,d);return A.expirationTime=E,A.stateNode={containerInfo:f.containerInfo,pendingChildren:null,implementation:f.implementation},A}function r_(f,d){return f===null&&(f=Zi(T,null,null,Ar)),f.tag=d.tag,f.key=d.key,f.elementType=d.elementType,f.type=d.type,f.stateNode=d.stateNode,f.return=d.return,f.child=d.child,f.sibling=d.sibling,f.index=d.index,f.ref=d.ref,f.pendingProps=d.pendingProps,f.memoizedProps=d.memoizedProps,f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.dependencies=d.dependencies,f.mode=d.mode,f.effectTag=d.effectTag,f.nextEffect=d.nextEffect,f.firstEffect=d.firstEffect,f.lastEffect=d.lastEffect,f.expirationTime=d.expirationTime,f.childExpirationTime=d.childExpirationTime,f.alternate=d.alternate,en&&(f.actualDuration=d.actualDuration,f.actualStartTime=d.actualStartTime,f.selfBaseDuration=d.selfBaseDuration,f.treeBaseDuration=d.treeBaseDuration),f._debugID=d._debugID,f._debugSource=d._debugSource,f._debugOwner=d._debugOwner,f._debugIsCurrentlyTiming=d._debugIsCurrentlyTiming,f._debugNeedsRemount=d._debugNeedsRemount,f._debugHookTypes=d._debugHookTypes,f}function uE(f,d,E){this.tag=d,this.current=null,this.containerInfo=f,this.pendingChildren=null,this.pingCache=null,this.finishedExpirationTime=at,this.finishedWork=null,this.timeoutHandle=nl,this.context=null,this.pendingContext=null,this.hydrate=E,this.callbackNode=null,this.callbackPriority=Do,this.firstPendingTime=at,this.firstSuspendedTime=at,this.lastSuspendedTime=at,this.nextKnownPendingLevel=at,this.lastPingedTime=at,this.lastExpiredTime=at,bn&&(this.interactionThreadID=M.unstable_getThreadID(),this.memoizedInteractions=new Set,this.pendingInteractionMap=new Map),Yi&&(this.hydrationCallbacks=null)}function oE(f,d,E,C){var A=new uE(f,d,E);Yi&&(A.hydrationCallbacks=C);var j=Z4(d);return A.current=j,j.stateNode=A,A}function i_(f,d){var E=f.firstSuspendedTime,C=f.lastSuspendedTime;return E!==at&&E>=d&&C<=d}function Vf(f,d){var E=f.firstSuspendedTime,C=f.lastSuspendedTime;Ed||E===at)&&(f.lastSuspendedTime=d),d<=f.lastPingedTime&&(f.lastPingedTime=at),d<=f.lastExpiredTime&&(f.lastExpiredTime=at)}function u_(f,d){var E=f.firstPendingTime;d>E&&(f.firstPendingTime=d);var C=f.firstSuspendedTime;C!==at&&(d>=C?f.firstSuspendedTime=f.lastSuspendedTime=f.nextKnownPendingLevel=at:d>=f.lastSuspendedTime&&(f.lastSuspendedTime=d+1),d>f.nextKnownPendingLevel&&(f.nextKnownPendingLevel=d))}function lE(f,d,E){f.firstPendingTime=E,d<=f.lastSuspendedTime?f.firstSuspendedTime=f.lastSuspendedTime=f.nextKnownPendingLevel=at:d<=f.firstSuspendedTime&&(f.firstSuspendedTime=d-1),d<=f.lastPingedTime&&(f.lastPingedTime=at),d<=f.lastExpiredTime&&(f.lastExpiredTime=at)}function Vp(f,d){var E=f.lastExpiredTime;(E===at||E>d)&&(f.lastExpiredTime=d)}var sE={debugTool:null},Lv=sE,Dy,wy;Dy=!1,wy={};function aE(f){if(!f)return Rn;var d=kt(f),E=xl(d);if(d.tag===O){var C=d.type;if(Xi(C))return Oo(d,C,E)}return E}function Sy(f){var d=kt(f);if(d===void 0)throw typeof f.render=="function"?Error("Unable to find node on an unmounted component."):Error("Argument appears to not be a ReactComponent. Keys: "+Object.keys(f));var E=bo(d);return E===null?null:E.stateNode}function fE(f,d){{var E=kt(f);if(E===void 0)throw typeof f.render=="function"?Error("Unable to find node on an unmounted component."):Error("Argument appears to not be a ReactComponent. Keys: "+Object.keys(f));var C=bo(E);if(C===null)return null;if(C.mode&mr){var A=Wt(E.type)||"Component";wy[A]||(wy[A]=!0,E.mode&mr?He(!1,"%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node%s",d,d,A,Cr(C)):He(!1,"%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node%s",d,d,A,Cr(C)))}return C.stateNode}return Sy(f)}function cE(f,d,E,C){return oE(f,d,E,C)}function o_(f,d,E,C){var A=d.current,j=jl();typeof jest!="undefined"&&(vy(A),qp(A));var V=_0(),te=zf(j,A,V);Lv.debugTool&&(A.alternate===null?Lv.debugTool.onMountContainer(d):f===null?Lv.debugTool.onUnmountContainer(d):Lv.debugTool.onUpdateContainer(d));var se=aE(E);d.context===null?d.context=se:d.pendingContext=se,Lr==="render"&&An!==null&&!Dy&&(Dy=!0,He(!1,`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate. + +Check the render method of %s.`,Wt(An.type)||"Unknown"));var Ue=Cu(te,V);return Ue.payload={element:f},C=C===void 0?null:C,C!==null&&(typeof C!="function"&&He(!1,"render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",C),Ue.callback=C),Ga(A,Ue),yl(A,te),te}function dE(f){var d=f.current;if(!d.child)return null;switch(d.child.tag){case q:return N0(d.child.stateNode);default:return d.child.stateNode}}function pE(f){switch(f.tag){case B:var d=f.stateNode;d.hydrate&&Gm(d,d.firstPendingTime);break;case ce:Op(function(){return yl(f,Un)});var E=ja(jl());Nv(f,E);break}}function l_(f,d){var E=f.memoizedState;E!==null&&E.dehydrated!==null&&E.retryTime=d.length)return C;var A=d[E],j=Array.isArray(f)?f.slice():a({},f);return j[A]=xy(f[A],d,E+1,C),j},p_=function(f,d,E){return xy(f,d,0,E)};a_=function(f,d,E,C){for(var A=f.memoizedState;A!==null&&d>0;)A=A.next,d--;if(A!==null){var j=p_(A.memoizedState,E,C);A.memoizedState=j,A.baseState=j,f.memoizedProps=a({},f.memoizedProps),yl(f,Un)}},f_=function(f,d,E){f.pendingProps=p_(f.memoizedProps,d,E),f.alternate&&(f.alternate.pendingProps=f.pendingProps),yl(f,Un)},c_=function(f){yl(f,Un)},d_=function(f){Cy=f}}function yE(f){var d=f.findFiberByHostInstance,E=nt.ReactCurrentDispatcher;return At(a({},f,{overrideHookState:a_,overrideProps:f_,setSuspenseHandler:d_,scheduleUpdate:c_,currentDispatcherRef:E,findHostInstanceByFiber:function(C){var A=bo(C);return A===null?null:A.stateNode},findFiberByHostInstance:function(C){return d?d(C):null},findHostInstancesForRefresh:od,scheduleRefresh:Ol,scheduleRoot:Cs,setRefreshHandler:Wa,getCurrentFiber:function(){return An}}))}var h_=Object.freeze({createContainer:cE,updateContainer:o_,batchedEventUpdates:Qm,batchedUpdates:Xm,unbatchedUpdates:Jm,deferredUpdates:Ym,syncUpdates:pv,discreteUpdates:hv,flushDiscreteUpdates:dv,flushControlled:Zm,flushSync:Op,flushPassiveEffects:nf,IsThisRendererActing:Wf,getPublicRootInstance:dE,attemptSynchronousHydration:pE,attemptUserBlockingHydration:hE,attemptContinuousHydration:Ty,attemptHydrationAtCurrentPriority:vE,findHostInstance:Sy,findHostInstanceWithWarning:fE,findHostInstanceWithNoPortals:mE,shouldSuspend:s_,injectIntoDevTools:yE}),gE=h_.default||h_;Qy.exports=gE;var _E=Qy.exports;return Qy.exports=i,_E})});var vT=Ke((HW,ID)=>{"use strict";process.env.NODE_ENV==="production"?ID.exports=fT():ID.exports=hT()});var yT=Ke((qW,mT)=>{"use strict";var zI={ALIGN_COUNT:8,ALIGN_AUTO:0,ALIGN_FLEX_START:1,ALIGN_CENTER:2,ALIGN_FLEX_END:3,ALIGN_STRETCH:4,ALIGN_BASELINE:5,ALIGN_SPACE_BETWEEN:6,ALIGN_SPACE_AROUND:7,DIMENSION_COUNT:2,DIMENSION_WIDTH:0,DIMENSION_HEIGHT:1,DIRECTION_COUNT:3,DIRECTION_INHERIT:0,DIRECTION_LTR:1,DIRECTION_RTL:2,DISPLAY_COUNT:2,DISPLAY_FLEX:0,DISPLAY_NONE:1,EDGE_COUNT:9,EDGE_LEFT:0,EDGE_TOP:1,EDGE_RIGHT:2,EDGE_BOTTOM:3,EDGE_START:4,EDGE_END:5,EDGE_HORIZONTAL:6,EDGE_VERTICAL:7,EDGE_ALL:8,EXPERIMENTAL_FEATURE_COUNT:1,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:0,FLEX_DIRECTION_COUNT:4,FLEX_DIRECTION_COLUMN:0,FLEX_DIRECTION_COLUMN_REVERSE:1,FLEX_DIRECTION_ROW:2,FLEX_DIRECTION_ROW_REVERSE:3,JUSTIFY_COUNT:6,JUSTIFY_FLEX_START:0,JUSTIFY_CENTER:1,JUSTIFY_FLEX_END:2,JUSTIFY_SPACE_BETWEEN:3,JUSTIFY_SPACE_AROUND:4,JUSTIFY_SPACE_EVENLY:5,LOG_LEVEL_COUNT:6,LOG_LEVEL_ERROR:0,LOG_LEVEL_WARN:1,LOG_LEVEL_INFO:2,LOG_LEVEL_DEBUG:3,LOG_LEVEL_VERBOSE:4,LOG_LEVEL_FATAL:5,MEASURE_MODE_COUNT:3,MEASURE_MODE_UNDEFINED:0,MEASURE_MODE_EXACTLY:1,MEASURE_MODE_AT_MOST:2,NODE_TYPE_COUNT:2,NODE_TYPE_DEFAULT:0,NODE_TYPE_TEXT:1,OVERFLOW_COUNT:3,OVERFLOW_VISIBLE:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2,POSITION_TYPE_COUNT:2,POSITION_TYPE_RELATIVE:0,POSITION_TYPE_ABSOLUTE:1,PRINT_OPTIONS_COUNT:3,PRINT_OPTIONS_LAYOUT:1,PRINT_OPTIONS_STYLE:2,PRINT_OPTIONS_CHILDREN:4,UNIT_COUNT:4,UNIT_UNDEFINED:0,UNIT_POINT:1,UNIT_PERCENT:2,UNIT_AUTO:3,WRAP_COUNT:3,WRAP_NO_WRAP:0,WRAP_WRAP:1,WRAP_WRAP_REVERSE:2};mT.exports=zI});var DT=Ke((WW,gT)=>{"use strict";var HI=Object.assign||function(i){for(var o=1;o"}}]),i}(),_T=function(){J_(i,null,[{key:"fromJS",value:function(a){var c=a.width,_=a.height;return new i(c,_)}}]);function i(o,a){BD(this,i),this.width=o,this.height=a}return J_(i,[{key:"fromJS",value:function(a){a(this.width,this.height)}},{key:"toString",value:function(){return""}}]),i}(),ET=function(){function i(o,a){BD(this,i),this.unit=o,this.value=a}return J_(i,[{key:"fromJS",value:function(a){a(this.unit,this.value)}},{key:"toString",value:function(){switch(this.unit){case nc.UNIT_POINT:return String(this.value);case nc.UNIT_PERCENT:return this.value+"%";case nc.UNIT_AUTO:return"auto";default:return this.value+"?"}}},{key:"valueOf",value:function(){return this.value}}]),i}();gT.exports=function(i,o){function a(M,N,O){var T=M[N];M[N]=function(){for(var B=arguments.length,H=Array(B),q=0;q1?H-1:0),ne=1;ne1&&arguments[1]!==void 0?arguments[1]:NaN,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:nc.DIRECTION_LTR;return M.call(this,N,O,T)}),HI({Config:o.Config,Node:o.Node,Layout:i("Layout",qI),Size:i("Size",_T),Value:i("Value",ET),getInstanceCount:function(){return o.getInstanceCount.apply(o,arguments)}},nc)}});var wT=Ke((exports,module)=>{(function(i,o){typeof define=="function"&&define.amd?define([],function(){return o}):typeof module=="object"&&module.exports?module.exports=o:(i.nbind=i.nbind||{}).init=o})(exports,function(Module,cb){typeof Module=="function"&&(cb=Module,Module={}),Module.onRuntimeInitialized=function(i,o){return function(){i&&i.apply(this,arguments);try{Module.ccall("nbind_init")}catch(a){o(a);return}o(null,{bind:Module._nbind_value,reflect:Module.NBind.reflect,queryType:Module.NBind.queryType,toggleLightGC:Module.toggleLightGC,lib:Module})}}(Module.onRuntimeInitialized,cb);var Module;Module||(Module=(typeof Module!="undefined"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if(Module.ENVIRONMENT==="WEB")ENVIRONMENT_IS_WEB=!0;else if(Module.ENVIRONMENT==="WORKER")ENVIRONMENT_IS_WORKER=!0;else if(Module.ENVIRONMENT==="NODE")ENVIRONMENT_IS_NODE=!0;else if(Module.ENVIRONMENT==="SHELL")ENVIRONMENT_IS_SHELL=!0;else throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");else ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof require=="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn);var nodeFS,nodePath;Module.read=function(o,a){nodeFS||(nodeFS={}("")),nodePath||(nodePath={}("")),o=nodePath.normalize(o);var c=nodeFS.readFileSync(o);return a?c:c.toString()},Module.readBinary=function(o){var a=Module.read(o,!0);return a.buffer||(a=new Uint8Array(a)),assert(a.buffer),a},Module.load=function(o){globalEval(read(o))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),typeof module!="undefined"&&(module.exports=Module),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr!="undefined"&&(Module.printErr=printErr),typeof read!="undefined"?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(o){if(typeof readbuffer=="function")return new Uint8Array(readbuffer(o));var a=read(o,"binary");return assert(typeof a=="object"),a},typeof scriptArgs!="undefined"?Module.arguments=scriptArgs:typeof arguments!="undefined"&&(Module.arguments=arguments),typeof quit=="function"&&(Module.quit=function(i,o){quit(i)});else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(Module.read=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.send(null),a.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.responseType="arraybuffer",a.send(null),new Uint8Array(a.response)}),Module.readAsync=function(o,a,c){var _=new XMLHttpRequest;_.open("GET",o,!0),_.responseType="arraybuffer",_.onload=function(){_.status==200||_.status==0&&_.response?a(_.response):c()},_.onerror=c,_.send(null)},typeof arguments!="undefined"&&(Module.arguments=arguments),typeof console!="undefined")Module.print||(Module.print=function(o){console.log(o)}),Module.printErr||(Module.printErr=function(o){console.warn(o)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump!="undefined"?function(i){dump(i)}:function(i){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle=="undefined"&&(Module.setWindowTitle=function(i){document.title=i})}else throw"Unknown runtime environment. Where are we?";function globalEval(i){eval.call(null,i)}!Module.load&&Module.read&&(Module.load=function(o){globalEval(Module.read(o))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(i,o){throw o}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(i){return tempRet0=i,i},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(i){STACKTOP=i},getNativeTypeSize:function(i){switch(i){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(i[i.length-1]==="*")return Runtime.QUANTUM_SIZE;if(i[0]==="i"){var o=parseInt(i.substr(1));return assert(o%8==0),o/8}else return 0}}},getNativeFieldSize:function(i){return Math.max(Runtime.getNativeTypeSize(i),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(i,o){return o==="double"||o==="i64"?i&7&&(assert((i&7)==4),i+=4):assert((i&3)==0),i},getAlignSize:function(i,o,a){return!a&&(i=="i64"||i=="double")?8:i?Math.min(o||(i?Runtime.getNativeFieldSize(i):0),Runtime.QUANTUM_SIZE):Math.min(o,8)},dynCall:function(i,o,a){return a&&a.length?Module["dynCall_"+i].apply(null,[o].concat(a)):Module["dynCall_"+i].call(null,o)},functionPointers:[],addFunction:function(i){for(var o=0;o>2],a=(o+i+15|0)&-16;if(HEAP32[DYNAMICTOP_PTR>>2]=a,a>=TOTAL_MEMORY){var c=enlargeMemory();if(!c)return HEAP32[DYNAMICTOP_PTR>>2]=o,0}return o},alignMemory:function(i,o){var a=i=Math.ceil(i/(o||16))*(o||16);return a},makeBigInt:function(i,o,a){var c=a?+(i>>>0)+ +(o>>>0)*4294967296:+(i>>>0)+ +(o|0)*4294967296;return c},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,EXITSTATUS=0;function assert(i,o){i||abort("Assertion failed: "+o)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(i){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}var cwrap,ccall;(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(i){var o=Runtime.stackAlloc(i.length);return writeArrayToMemory(i,o),o},stringToC:function(i){var o=0;if(i!=null&&i!==0){var a=(i.length<<2)+1;o=Runtime.stackAlloc(a),stringToUTF8(i,o,a)}return o}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(o,a,c,_,t){var M=getCFunc(o),N=[],O=0;if(_)for(var T=0;T<_.length;T++){var B=toC[c[T]];B?(O===0&&(O=Runtime.stackSave()),N[T]=B(_[T])):N[T]=_[T]}var H=M.apply(null,N);if(a==="string"&&(H=Pointer_stringify(H)),O!==0){if(t&&t.async){EmterpreterAsync.asyncFinalizers.push(function(){Runtime.stackRestore(O)});return}Runtime.stackRestore(O)}return H};var sourceRegex=/^function\s*[a-zA-Z$_0-9]*\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;function parseJSFunc(i){var o=i.toString().match(sourceRegex).slice(1);return{arguments:o[0],body:o[1],returnValue:o[2]}}var JSsource=null;function ensureJSsource(){if(!JSsource){JSsource={};for(var i in JSfuncs)JSfuncs.hasOwnProperty(i)&&(JSsource[i]=parseJSFunc(JSfuncs[i]))}}cwrap=function(ident,returnType,argTypes){argTypes=argTypes||[];var cfunc=getCFunc(ident),numericArgs=argTypes.every(function(i){return i==="number"}),numericRet=returnType!=="string";if(numericRet&&numericArgs)return cfunc;var argNames=argTypes.map(function(i,o){return"$"+o}),funcstr="(function("+argNames.join(",")+") {",nargs=argTypes.length;if(!numericArgs){ensureJSsource(),funcstr+="var stack = "+JSsource.stackSave.body+";";for(var i=0;i>0]=o;break;case"i8":HEAP8[i>>0]=o;break;case"i16":HEAP16[i>>1]=o;break;case"i32":HEAP32[i>>2]=o;break;case"i64":tempI64=[o>>>0,(tempDouble=o,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[i>>2]=tempI64[0],HEAP32[i+4>>2]=tempI64[1];break;case"float":HEAPF32[i>>2]=o;break;case"double":HEAPF64[i>>3]=o;break;default:abort("invalid type for setValue: "+a)}}Module.setValue=setValue;function getValue(i,o,a){switch(o=o||"i8",o.charAt(o.length-1)==="*"&&(o="i32"),o){case"i1":return HEAP8[i>>0];case"i8":return HEAP8[i>>0];case"i16":return HEAP16[i>>1];case"i32":return HEAP32[i>>2];case"i64":return HEAP32[i>>2];case"float":return HEAPF32[i>>2];case"double":return HEAPF64[i>>3];default:abort("invalid type for setValue: "+o)}return null}Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE;function allocate(i,o,a,c){var _,t;typeof i=="number"?(_=!0,t=i):(_=!1,t=i.length);var M=typeof o=="string"?o:null,N;if(a==ALLOC_NONE?N=c:N=[typeof _malloc=="function"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][a===void 0?ALLOC_STATIC:a](Math.max(t,M?1:o.length)),_){var c=N,O;for(assert((N&3)==0),O=N+(t&~3);c>2]=0;for(O=N+t;c>0]=0;return N}if(M==="i8")return i.subarray||i.slice?HEAPU8.set(i,N):HEAPU8.set(new Uint8Array(i),N),N;for(var T=0,B,H,q;T>0],a|=c,!(c==0&&!o||(_++,o&&_==o)););o||(o=_);var t="";if(a<128){for(var M=1024,N;o>0;)N=String.fromCharCode.apply(String,HEAPU8.subarray(i,i+Math.min(o,M))),t=t?t+N:N,i+=M,o-=M;return t}return Module.UTF8ToString(i)}Module.Pointer_stringify=Pointer_stringify;function AsciiToString(i){for(var o="";;){var a=HEAP8[i++>>0];if(!a)return o;o+=String.fromCharCode(a)}}Module.AsciiToString=AsciiToString;function stringToAscii(i,o){return writeAsciiToMemory(i,o,!1)}Module.stringToAscii=stringToAscii;var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(i,o){for(var a=o;i[a];)++a;if(a-o>16&&i.subarray&&UTF8Decoder)return UTF8Decoder.decode(i.subarray(o,a));for(var c,_,t,M,N,O,T="";;){if(c=i[o++],!c)return T;if(!(c&128)){T+=String.fromCharCode(c);continue}if(_=i[o++]&63,(c&224)==192){T+=String.fromCharCode((c&31)<<6|_);continue}if(t=i[o++]&63,(c&240)==224?c=(c&15)<<12|_<<6|t:(M=i[o++]&63,(c&248)==240?c=(c&7)<<18|_<<12|t<<6|M:(N=i[o++]&63,(c&252)==248?c=(c&3)<<24|_<<18|t<<12|M<<6|N:(O=i[o++]&63,c=(c&1)<<30|_<<24|t<<18|M<<12|N<<6|O))),c<65536)T+=String.fromCharCode(c);else{var B=c-65536;T+=String.fromCharCode(55296|B>>10,56320|B&1023)}}}Module.UTF8ArrayToString=UTF8ArrayToString;function UTF8ToString(i){return UTF8ArrayToString(HEAPU8,i)}Module.UTF8ToString=UTF8ToString;function stringToUTF8Array(i,o,a,c){if(!(c>0))return 0;for(var _=a,t=a+c-1,M=0;M=55296&&N<=57343&&(N=65536+((N&1023)<<10)|i.charCodeAt(++M)&1023),N<=127){if(a>=t)break;o[a++]=N}else if(N<=2047){if(a+1>=t)break;o[a++]=192|N>>6,o[a++]=128|N&63}else if(N<=65535){if(a+2>=t)break;o[a++]=224|N>>12,o[a++]=128|N>>6&63,o[a++]=128|N&63}else if(N<=2097151){if(a+3>=t)break;o[a++]=240|N>>18,o[a++]=128|N>>12&63,o[a++]=128|N>>6&63,o[a++]=128|N&63}else if(N<=67108863){if(a+4>=t)break;o[a++]=248|N>>24,o[a++]=128|N>>18&63,o[a++]=128|N>>12&63,o[a++]=128|N>>6&63,o[a++]=128|N&63}else{if(a+5>=t)break;o[a++]=252|N>>30,o[a++]=128|N>>24&63,o[a++]=128|N>>18&63,o[a++]=128|N>>12&63,o[a++]=128|N>>6&63,o[a++]=128|N&63}}return o[a]=0,a-_}Module.stringToUTF8Array=stringToUTF8Array;function stringToUTF8(i,o,a){return stringToUTF8Array(i,HEAPU8,o,a)}Module.stringToUTF8=stringToUTF8;function lengthBytesUTF8(i){for(var o=0,a=0;a=55296&&c<=57343&&(c=65536+((c&1023)<<10)|i.charCodeAt(++a)&1023),c<=127?++o:c<=2047?o+=2:c<=65535?o+=3:c<=2097151?o+=4:c<=67108863?o+=5:o+=6}return o}Module.lengthBytesUTF8=lengthBytesUTF8;var UTF16Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):void 0;function demangle(i){var o=Module.___cxa_demangle||Module.__cxa_demangle;if(o){try{var a=i.substr(1),c=lengthBytesUTF8(a)+1,_=_malloc(c);stringToUTF8(a,_,c);var t=_malloc(4),M=o(_,0,0,t);if(getValue(t,"i32")===0&&M)return Pointer_stringify(M)}catch(N){}finally{_&&_free(_),t&&_free(t),M&&_free(M)}return i}return Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),i}function demangleAll(i){var o=/__Z[\w\d_]+/g;return i.replace(o,function(a){var c=demangle(a);return a===c?a:a+" ["+c+"]"})}function jsStackTrace(){var i=new Error;if(!i.stack){try{throw new Error(0)}catch(o){i=o}if(!i.stack)return"(no stack trace available)"}return i.stack.toString()}function stackTrace(){var i=jsStackTrace();return Module.extraStackTrace&&(i+=` +`+Module.extraStackTrace()),demangleAll(i)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY0;){var o=i.shift();if(typeof o=="function"){o();continue}var a=o.func;typeof a=="number"?o.arg===void 0?Module.dynCall_v(a):Module.dynCall_vi(a,o.arg):a(o.arg===void 0?null:o.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(i){__ATPRERUN__.unshift(i)}Module.addOnPreRun=addOnPreRun;function addOnInit(i){__ATINIT__.unshift(i)}Module.addOnInit=addOnInit;function addOnPreMain(i){__ATMAIN__.unshift(i)}Module.addOnPreMain=addOnPreMain;function addOnExit(i){__ATEXIT__.unshift(i)}Module.addOnExit=addOnExit;function addOnPostRun(i){__ATPOSTRUN__.unshift(i)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(i,o,a){var c=a>0?a:lengthBytesUTF8(i)+1,_=new Array(c),t=stringToUTF8Array(i,_,0,_.length);return o&&(_.length=t),_}Module.intArrayFromString=intArrayFromString;function intArrayToString(i){for(var o=[],a=0;a255&&(c&=255),o.push(String.fromCharCode(c))}return o.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(i,o,a){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var c,_;a&&(_=o+lengthBytesUTF8(i),c=HEAP8[_]),stringToUTF8(i,o,Infinity),a&&(HEAP8[_]=c)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(i,o){HEAP8.set(i,o)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(i,o,a){for(var c=0;c>0]=i.charCodeAt(c);a||(HEAP8[o>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function(o,a){var c=o>>>16,_=o&65535,t=a>>>16,M=a&65535;return _*M+(c*M+_*t<<16)|0}),Math.imul=Math.imul,!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(i){return froundBuffer[0]=i,froundBuffer[0]}}Math.fround=Math.fround,Math.clz32||(Math.clz32=function(i){i=i>>>0;for(var o=0;o<32;o++)if(i&1<<31-o)return o;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(i){return i<0?Math.ceil(i):Math.floor(i)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_round=Math.round,Math_min=Math.min,Math_clz32=Math.clz32,Math_trunc=Math.trunc,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(i){return i}function addRunDependency(i){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}Module.addRunDependency=addRunDependency;function removeRunDependency(i){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var o=dependenciesFulfilled;dependenciesFulfilled=null,o()}}Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={};var ASM_CONSTS=[function(i,o,a,c,_,t,M,N){return _nbind.callbackSignatureList[i].apply(this,arguments)}];function _emscripten_asm_const_iiiiiiii(i,o,a,c,_,t,M,N){return ASM_CONSTS[i](o,a,c,_,t,M,N)}function _emscripten_asm_const_iiiii(i,o,a,c,_){return ASM_CONSTS[i](o,a,c,_)}function _emscripten_asm_const_iiidddddd(i,o,a,c,_,t,M,N,O){return ASM_CONSTS[i](o,a,c,_,t,M,N,O)}function _emscripten_asm_const_iiididi(i,o,a,c,_,t,M){return ASM_CONSTS[i](o,a,c,_,t,M)}function _emscripten_asm_const_iiii(i,o,a,c){return ASM_CONSTS[i](o,a,c)}function _emscripten_asm_const_iiiid(i,o,a,c,_){return ASM_CONSTS[i](o,a,c,_)}function _emscripten_asm_const_iiiiii(i,o,a,c,_,t){return ASM_CONSTS[i](o,a,c,_,t)}STATIC_BASE=Runtime.GLOBAL_BASE,STATICTOP=STATIC_BASE+12800,__ATINIT__.push({func:function(){__GLOBAL__sub_I_Yoga_cpp()}},{func:function(){__GLOBAL__sub_I_nbind_cc()}},{func:function(){__GLOBAL__sub_I_common_cc()}},{func:function(){__GLOBAL__sub_I_Binding_cc()}}),allocate([0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,192,127,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,128,191,0,0,128,191,0,0,192,127,0,0,0,0,0,0,0,0,0,0,128,63,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,190,12,0,0,200,12,0,0,208,12,0,0,216,12,0,0,230,12,0,0,242,12,0,0,1,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,0,0,192,127,3,0,0,0,180,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,182,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,183,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,184,45,0,0,185,45,0,0,181,45,0,0,181,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,148,4,0,0,3,0,0,0,187,45,0,0,164,4,0,0,188,45,0,0,2,0,0,0,189,45,0,0,164,4,0,0,188,45,0,0,185,45,0,0,164,4,0,0,185,45,0,0,164,4,0,0,188,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,5,0,0,0,6,0,0,0,1,0,0,0,7,0,0,0,183,45,0,0,182,45,0,0,181,45,0,0,190,45,0,0,190,45,0,0,182,45,0,0,182,45,0,0,185,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,185,45,0,0,48,5,0,0,3,0,0,0,56,5,0,0,1,0,0,0,189,45,0,0,185,45,0,0,164,4,0,0,76,5,0,0,2,0,0,0,191,45,0,0,186,45,0,0,182,45,0,0,185,45,0,0,192,45,0,0,185,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,76,5,0,0,76,5,0,0,136,5,0,0,182,45,0,0,181,45,0,0,2,0,0,0,190,45,0,0,136,5,0,0,56,19,0,0,156,5,0,0,2,0,0,0,184,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,0,0,0,9,0,0,0,1,0,0,0,10,0,0,0,204,5,0,0,181,45,0,0,181,45,0,0,2,0,0,0,180,45,0,0,204,5,0,0,2,0,0,0,195,45,0,0,236,5,0,0,97,19,0,0,198,45,0,0,211,45,0,0,212,45,0,0,213,45,0,0,214,45,0,0,215,45,0,0,188,45,0,0,182,45,0,0,216,45,0,0,217,45,0,0,218,45,0,0,219,45,0,0,192,45,0,0,181,45,0,0,0,0,0,0,185,45,0,0,110,19,0,0,186,45,0,0,115,19,0,0,221,45,0,0,120,19,0,0,148,4,0,0,132,19,0,0,96,6,0,0,145,19,0,0,222,45,0,0,164,19,0,0,223,45,0,0,173,19,0,0,0,0,0,0,3,0,0,0,104,6,0,0,1,0,0,0,187,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,11,0,0,0,12,0,0,0,1,0,0,0,13,0,0,0,185,45,0,0,224,45,0,0,164,6,0,0,188,45,0,0,172,6,0,0,180,6,0,0,2,0,0,0,188,6,0,0,7,0,0,0,224,45,0,0,7,0,0,0,164,6,0,0,1,0,0,0,213,45,0,0,185,45,0,0,224,45,0,0,172,6,0,0,185,45,0,0,224,45,0,0,164,6,0,0,185,45,0,0,224,45,0,0,211,45,0,0,211,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,172,6,0,0,222,45,0,0,211,45,0,0,224,45,0,0,188,45,0,0,222,45,0,0,211,45,0,0,40,7,0,0,188,45,0,0,2,0,0,0,224,45,0,0,185,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,222,45,0,0,224,45,0,0,148,4,0,0,185,45,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,185,45,0,0,164,6,0,0,148,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,14,0,0,0,15,0,0,0,1,0,0,0,16,0,0,0,148,7,0,0,2,0,0,0,225,45,0,0,183,45,0,0,188,45,0,0,168,7,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,234,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,148,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,9,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,242,45,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,110,111,100,101,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,119,104,105,99,104,32,115,116,105,108,108,32,104,97,115,32,99,104,105,108,100,114,101,110,32,97,116,116,97,99,104,101,100,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,115,116,105,108,108,32,97,116,116,97,99,104,101,100,32,116,111,32,97,32,112,97,114,101,110,116,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,99,111,110,102,105,103,0,67,97,110,110,111,116,32,115,101,116,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,67,104,105,108,100,32,97,108,114,101,97,100,121,32,104,97,115,32,97,32,112,97,114,101,110,116,44,32,105,116,32,109,117,115,116,32,98,101,32,114,101,109,111,118,101,100,32,102,105,114,115,116,46,0,67,97,110,110,111,116,32,97,100,100,32,99,104,105,108,100,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,79,110,108,121,32,108,101,97,102,32,110,111,100,101,115,32,119,105,116,104,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,115,104,111,117,108,100,32,109,97,110,117,97,108,108,121,32,109,97,114,107,32,116,104,101,109,115,101,108,118,101,115,32,97,115,32,100,105,114,116,121,0,67,97,110,110,111,116,32,103,101,116,32,108,97,121,111,117,116,32,112,114,111,112,101,114,116,105,101,115,32,111,102,32,109,117,108,116,105,45,101,100,103,101,32,115,104,111,114,116,104,97,110,100,115,0,37,115,37,100,46,123,91,115,107,105,112,112,101,100,93,32,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,61,62,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,37,115,37,100,46,123,37,115,0,42,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,37,115,10,0,37,115,37,100,46,125,37,115,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,79,117,116,32,111,102,32,99,97,99,104,101,32,101,110,116,114,105,101,115,33,10,0,83,99,97,108,101,32,102,97,99,116,111,114,32,115,104,111,117,108,100,32,110,111,116,32,98,101,32,108,101,115,115,32,116,104,97,110,32,122,101,114,111,0,105,110,105,116,105,97,108,0,37,115,10,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,85,78,68,69,70,73,78,69,68,0,69,88,65,67,84,76,89,0,65,84,95,77,79,83,84,0,76,65,89,95,85,78,68,69,70,73,78,69,68,0,76,65,89,95,69,88,65,67,84,76,89,0,76,65,89,95,65,84,95,77,79,83,84,0,97,118,97,105,108,97,98,108,101,87,105,100,116,104,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,119,105,100,116,104,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,97,118,97,105,108,97,98,108,101,72,101,105,103,104,116,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,104,101,105,103,104,116,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,102,108,101,120,0,115,116,114,101,116,99,104,0,109,117,108,116,105,108,105,110,101,45,115,116,114,101,116,99,104,0,69,120,112,101,99,116,101,100,32,110,111,100,101,32,116,111,32,104,97,118,101,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,0,109,101,97,115,117,114,101,0,69,120,112,101,99,116,32,99,117,115,116,111,109,32,98,97,115,101,108,105,110,101,32,102,117,110,99,116,105,111,110,32,116,111,32,110,111,116,32,114,101,116,117,114,110,32,78,97,78,0,97,98,115,45,109,101,97,115,117,114,101,0,97,98,115,45,108,97,121,111,117,116,0,78,111,100,101,0,99,114,101,97,116,101,68,101,102,97,117,108,116,0,99,114,101,97,116,101,87,105,116,104,67,111,110,102,105,103,0,100,101,115,116,114,111,121,0,114,101,115,101,116,0,99,111,112,121,83,116,121,108,101,0,115,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,115,101,116,80,111,115,105,116,105,111,110,0,115,101,116,80,111,115,105,116,105,111,110,80,101,114,99,101,110,116,0,115,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,115,101,116,65,108,105,103,110,73,116,101,109,115,0,115,101,116,65,108,105,103,110,83,101,108,102,0,115,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,115,101,116,70,108,101,120,87,114,97,112,0,115,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,115,101,116,77,97,114,103,105,110,0,115,101,116,77,97,114,103,105,110,80,101,114,99,101,110,116,0,115,101,116,77,97,114,103,105,110,65,117,116,111,0,115,101,116,79,118,101,114,102,108,111,119,0,115,101,116,68,105,115,112,108,97,121,0,115,101,116,70,108,101,120,0,115,101,116,70,108,101,120,66,97,115,105,115,0,115,101,116,70,108,101,120,66,97,115,105,115,80,101,114,99,101,110,116,0,115,101,116,70,108,101,120,71,114,111,119,0,115,101,116,70,108,101,120,83,104,114,105,110,107,0,115,101,116,87,105,100,116,104,0,115,101,116,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,87,105,100,116,104,65,117,116,111,0,115,101,116,72,101,105,103,104,116,0,115,101,116,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,72,101,105,103,104,116,65,117,116,111,0,115,101,116,77,105,110,87,105,100,116,104,0,115,101,116,77,105,110,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,105,110,72,101,105,103,104,116,0,115,101,116,77,105,110,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,77,97,120,87,105,100,116,104,0,115,101,116,77,97,120,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,97,120,72,101,105,103,104,116,0,115,101,116,77,97,120,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,65,115,112,101,99,116,82,97,116,105,111,0,115,101,116,66,111,114,100,101,114,0,115,101,116,80,97,100,100,105,110,103,0,115,101,116,80,97,100,100,105,110,103,80,101,114,99,101,110,116,0,103,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,103,101,116,80,111,115,105,116,105,111,110,0,103,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,103,101,116,65,108,105,103,110,73,116,101,109,115,0,103,101,116,65,108,105,103,110,83,101,108,102,0,103,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,103,101,116,70,108,101,120,87,114,97,112,0,103,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,103,101,116,77,97,114,103,105,110,0,103,101,116,70,108,101,120,66,97,115,105,115,0,103,101,116,70,108,101,120,71,114,111,119,0,103,101,116,70,108,101,120,83,104,114,105,110,107,0,103,101,116,87,105,100,116,104,0,103,101,116,72,101,105,103,104,116,0,103,101,116,77,105,110,87,105,100,116,104,0,103,101,116,77,105,110,72,101,105,103,104,116,0,103,101,116,77,97,120,87,105,100,116,104,0,103,101,116,77,97,120,72,101,105,103,104,116,0,103,101,116,65,115,112,101,99,116,82,97,116,105,111,0,103,101,116,66,111,114,100,101,114,0,103,101,116,79,118,101,114,102,108,111,119,0,103,101,116,68,105,115,112,108,97,121,0,103,101,116,80,97,100,100,105,110,103,0,105,110,115,101,114,116,67,104,105,108,100,0,114,101,109,111,118,101,67,104,105,108,100,0,103,101,116,67,104,105,108,100,67,111,117,110,116,0,103,101,116,80,97,114,101,110,116,0,103,101,116,67,104,105,108,100,0,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,117,110,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,109,97,114,107,68,105,114,116,121,0,105,115,68,105,114,116,121,0,99,97,108,99,117,108,97,116,101,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,76,101,102,116,0,103,101,116,67,111,109,112,117,116,101,100,82,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,84,111,112,0,103,101,116,67,111,109,112,117,116,101,100,66,111,116,116,111,109,0,103,101,116,67,111,109,112,117,116,101,100,87,105,100,116,104,0,103,101,116,67,111,109,112,117,116,101,100,72,101,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,77,97,114,103,105,110,0,103,101,116,67,111,109,112,117,116,101,100,66,111,114,100,101,114,0,103,101,116,67,111,109,112,117,116,101,100,80,97,100,100,105,110,103,0,67,111,110,102,105,103,0,99,114,101,97,116,101,0,115,101,116,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,115,101,116,80,111,105,110,116,83,99,97,108,101,70,97,99,116,111,114,0,105,115,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,86,97,108,117,101,0,76,97,121,111,117,116,0,83,105,122,101,0,103,101,116,73,110,115,116,97,110,99,101,67,111,117,110,116,0,73,110,116,54,52,0,1,1,1,2,2,4,4,4,4,8,8,4,8,118,111,105,100,0,98,111,111,108,0,115,116,100,58,58,115,116,114,105,110,103,0,99,98,70,117,110,99,116,105,111,110,32,38,0,99,111,110,115,116,32,99,98,70,117,110,99,116,105,111,110,32,38,0,69,120,116,101,114,110,97,108,0,66,117,102,102,101,114,0,78,66,105,110,100,73,68,0,78,66,105,110,100,0,98,105,110,100,95,118,97,108,117,101,0,114,101,102,108,101,99,116,0,113,117,101,114,121,84,121,112,101,0,108,97,108,108,111,99,0,108,114,101,115,101,116,0,123,114,101,116,117,114,110,40,95,110,98,105,110,100,46,99,97,108,108,98,97,99,107,83,105,103,110,97,116,117,114,101,76,105,115,116,91,36,48,93,46,97,112,112,108,121,40,116,104,105,115,44,97,114,103,117,109,101,110,116,115,41,41,59,125,0,95,110,98,105,110,100,95,110,101,119,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;STATICTOP+=16;function _atexit(i,o){__ATEXIT__.unshift({func:i,arg:o})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}function _abort(){Module.abort()}function __ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj(){Module.printErr("missing function: _ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj"),abort(-1)}function __decorate(i,o,a,c){var _=arguments.length,t=_<3?o:c===null?c=Object.getOwnPropertyDescriptor(o,a):c,M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,o,a,c);else for(var N=i.length-1;N>=0;N--)(M=i[N])&&(t=(_<3?M(t):_>3?M(o,a,t):M(o,a))||t);return _>3&&t&&Object.defineProperty(o,a,t),t}function _defineHidden(i){return function(o,a){Object.defineProperty(o,a,{configurable:!1,enumerable:!1,value:i,writable:!0})}}var _nbind={};function __nbind_free_external(i){_nbind.externalList[i].dereference(i)}function __nbind_reference_external(i){_nbind.externalList[i].reference()}function _llvm_stackrestore(i){var o=_llvm_stacksave,a=o.LLVM_SAVEDSTACKS[i];o.LLVM_SAVEDSTACKS.splice(i,1),Runtime.stackRestore(a)}function __nbind_register_pool(i,o,a,c){_nbind.Pool.pageSize=i,_nbind.Pool.usedPtr=o/4,_nbind.Pool.rootPtr=a,_nbind.Pool.pagePtr=c/4,HEAP32[o/4]=16909060,HEAP8[o]==1&&(_nbind.bigEndian=!0),HEAP32[o/4]=0,_nbind.makeTypeKindTbl=(t={},t[1024]=_nbind.PrimitiveType,t[64]=_nbind.Int64Type,t[2048]=_nbind.BindClass,t[3072]=_nbind.BindClassPtr,t[4096]=_nbind.SharedClassPtr,t[5120]=_nbind.ArrayType,t[6144]=_nbind.ArrayType,t[7168]=_nbind.CStringType,t[9216]=_nbind.CallbackType,t[10240]=_nbind.BindType,t),_nbind.makeTypeNameTbl={Buffer:_nbind.BufferType,External:_nbind.ExternalType,Int64:_nbind.Int64Type,_nbind_new:_nbind.CreateValueType,bool:_nbind.BooleanType,"cbFunction &":_nbind.CallbackType,"const cbFunction &":_nbind.CallbackType,"const std::string &":_nbind.StringType,"std::string":_nbind.StringType},Module.toggleLightGC=_nbind.toggleLightGC,_nbind.callUpcast=Module.dynCall_ii;var _=_nbind.makeType(_nbind.constructType,{flags:2048,id:0,name:""});_.proto=Module,_nbind.BindClass.list.push(_);var t}function _emscripten_set_main_loop_timing(i,o){if(Browser.mainLoop.timingMode=i,Browser.mainLoop.timingValue=o,!Browser.mainLoop.func)return 1;if(i==0)Browser.mainLoop.scheduler=function(){var M=Math.max(0,Browser.mainLoop.tickStartTime+o-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,M)},Browser.mainLoop.method="timeout";else if(i==1)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method="rAF";else if(i==2){if(!window.setImmediate){let t=function(M){M.source===window&&M.data===c&&(M.stopPropagation(),a.shift()())};var _=t,a=[],c="setimmediate";window.addEventListener("message",t,!0),window.setImmediate=function(N){a.push(N),ENVIRONMENT_IS_WORKER?(Module.setImmediates===void 0&&(Module.setImmediates=[]),Module.setImmediates.push(N),window.postMessage({target:c})):window.postMessage(c,"*")}}Browser.mainLoop.scheduler=function(){window.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method="immediate"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(i,o,a,c,_){Module.noExitRuntime=!0,assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Browser.mainLoop.func=i,Browser.mainLoop.arg=c;var t;typeof c!="undefined"?t=function(){Module.dynCall_vi(i,c)}:t=function(){Module.dynCall_v(i)};var M=Browser.mainLoop.currentlyRunningMainloop;if(Browser.mainLoop.runner=function(){if(!ABORT){if(Browser.mainLoop.queue.length>0){var O=Date.now(),T=Browser.mainLoop.queue.shift();if(T.func(T.arg),Browser.mainLoop.remainingBlockers){var B=Browser.mainLoop.remainingBlockers,H=B%1==0?B-1:Math.floor(B);T.counted?Browser.mainLoop.remainingBlockers=H:(H=H+.5,Browser.mainLoop.remainingBlockers=(8*B+H)/9)}if(console.log('main loop blocker "'+T.name+'" took '+(Date.now()-O)+" ms"),Browser.mainLoop.updateStatus(),M1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else Browser.mainLoop.timingMode==0&&(Browser.mainLoop.tickStartTime=_emscripten_get_now());Browser.mainLoop.method==="timeout"&&Module.ctx&&(Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),Browser.mainLoop.method=""),Browser.mainLoop.runIter(t),!(M0?_emscripten_set_main_loop_timing(0,1e3/o):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),a)throw"SimulateInfiniteLoop"}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var i=Browser.mainLoop.timingMode,o=Browser.mainLoop.timingValue,a=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(a,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(i,o),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var i=Module.statusMessage||"Please wait...",o=Browser.mainLoop.remainingBlockers,a=Browser.mainLoop.expectedBlockers;o?o=6;){var je=re>>we-6&63;we-=6,me+=_e[je]}return we==2?(me+=_e[(re&3)<<4],me+=ce+ce):we==4&&(me+=_e[(re&15)<<2],me+=ce),me}m.src="data:audio/x-"+M.substr(-3)+";base64,"+ve(t),B(m)},m.src=ne,Browser.safeSetTimeout(function(){B(m)},1e4)}else return H()},Module.preloadPlugins.push(o);function a(){Browser.pointerLock=document.pointerLockElement===Module.canvas||document.mozPointerLockElement===Module.canvas||document.webkitPointerLockElement===Module.canvas||document.msPointerLockElement===Module.canvas}var c=Module.canvas;c&&(c.requestPointerLock=c.requestPointerLock||c.mozRequestPointerLock||c.webkitRequestPointerLock||c.msRequestPointerLock||function(){},c.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},c.exitPointerLock=c.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",a,!1),document.addEventListener("mozpointerlockchange",a,!1),document.addEventListener("webkitpointerlockchange",a,!1),document.addEventListener("mspointerlockchange",a,!1),Module.elementPointerLock&&c.addEventListener("click",function(_){!Browser.pointerLock&&Module.canvas.requestPointerLock&&(Module.canvas.requestPointerLock(),_.preventDefault())},!1))},createContext:function(i,o,a,c){if(o&&Module.ctx&&i==Module.canvas)return Module.ctx;var _,t;if(o){var M={antialias:!1,alpha:!1};if(c)for(var N in c)M[N]=c[N];t=GL.createContext(i,M),t&&(_=GL.getContext(t).GLctx)}else _=i.getContext("2d");return _?(a&&(o||assert(typeof GLctx=="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=_,o&&GL.makeContextCurrent(t),Module.useWebGL=o,Browser.moduleContextCreatedCallbacks.forEach(function(O){O()}),Browser.init()),_):null},destroyContext:function(i,o,a){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(i,o,a){Browser.lockPointer=i,Browser.resizeCanvas=o,Browser.vrDevice=a,typeof Browser.lockPointer=="undefined"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas=="undefined"&&(Browser.resizeCanvas=!1),typeof Browser.vrDevice=="undefined"&&(Browser.vrDevice=null);var c=Module.canvas;function _(){Browser.isFullscreen=!1;var M=c.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===M?(c.exitFullscreen=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){},c.exitFullscreen=c.exitFullscreen.bind(document),Browser.lockPointer&&c.requestPointerLock(),Browser.isFullscreen=!0,Browser.resizeCanvas&&Browser.setFullscreenCanvasSize()):(M.parentNode.insertBefore(c,M),M.parentNode.removeChild(M),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullscreen),Module.onFullscreen&&Module.onFullscreen(Browser.isFullscreen),Browser.updateCanvasDimensions(c)}Browser.fullscreenHandlersInstalled||(Browser.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",_,!1),document.addEventListener("mozfullscreenchange",_,!1),document.addEventListener("webkitfullscreenchange",_,!1),document.addEventListener("MSFullscreenChange",_,!1));var t=document.createElement("div");c.parentNode.insertBefore(t,c),t.appendChild(c),t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||(t.webkitRequestFullscreen?function(){t.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(t.webkitRequestFullScreen?function(){t.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),a?t.requestFullscreen({vrDisplay:a}):t.requestFullscreen()},requestFullScreen:function(i,o,a){return Module.printErr("Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead."),Browser.requestFullScreen=function(c,_,t){return Browser.requestFullscreen(c,_,t)},Browser.requestFullscreen(i,o,a)},nextRAF:0,fakeRequestAnimationFrame:function(i){var o=Date.now();if(Browser.nextRAF===0)Browser.nextRAF=o+1e3/60;else for(;o+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var a=Math.max(Browser.nextRAF-o,0);setTimeout(i,a)},requestAnimationFrame:function(o){typeof window=="undefined"?Browser.fakeRequestAnimationFrame(o):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(o))},safeCallback:function(i){return function(){if(!ABORT)return i.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var i=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],i.forEach(function(o){o()})}},safeRequestAnimationFrame:function(i){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?i():Browser.queuedAsyncCallbacks.push(i))})},safeSetTimeout:function(i,o){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?i():Browser.queuedAsyncCallbacks.push(i))},o)},safeSetInterval:function(i,o){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&i()},o)},getMimetype:function(i){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[i.substr(i.lastIndexOf(".")+1)]},getUserMedia:function(i){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(i)},getMovementX:function(i){return i.movementX||i.mozMovementX||i.webkitMovementX||0},getMovementY:function(i){return i.movementY||i.mozMovementY||i.webkitMovementY||0},getMouseWheelDelta:function(i){var o=0;switch(i.type){case"DOMMouseScroll":o=i.detail;break;case"mousewheel":o=i.wheelDelta;break;case"wheel":o=i.deltaY;break;default:throw"unrecognized mouse wheel event: "+i.type}return o},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(i){if(Browser.pointerLock)i.type!="mousemove"&&"mozMovementX"in i?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(i),Browser.mouseMovementY=Browser.getMovementY(i)),typeof SDL!="undefined"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var o=Module.canvas.getBoundingClientRect(),a=Module.canvas.width,c=Module.canvas.height,_=typeof window.scrollX!="undefined"?window.scrollX:window.pageXOffset,t=typeof window.scrollY!="undefined"?window.scrollY:window.pageYOffset;if(i.type==="touchstart"||i.type==="touchend"||i.type==="touchmove"){var M=i.touch;if(M===void 0)return;var N=M.pageX-(_+o.left),O=M.pageY-(t+o.top);N=N*(a/o.width),O=O*(c/o.height);var T={x:N,y:O};if(i.type==="touchstart")Browser.lastTouches[M.identifier]=T,Browser.touches[M.identifier]=T;else if(i.type==="touchend"||i.type==="touchmove"){var B=Browser.touches[M.identifier];B||(B=T),Browser.lastTouches[M.identifier]=B,Browser.touches[M.identifier]=T}return}var H=i.pageX-(_+o.left),q=i.pageY-(t+o.top);H=H*(a/o.width),q=q*(c/o.height),Browser.mouseMovementX=H-Browser.mouseX,Browser.mouseMovementY=q-Browser.mouseY,Browser.mouseX=H,Browser.mouseY=q}},asyncLoad:function(i,o,a,c){var _=c?"":getUniqueRunDependency("al "+i);Module.readAsync(i,function(t){assert(t,'Loading data file "'+i+'" failed (no arrayBuffer).'),o(new Uint8Array(t)),_&&removeRunDependency(_)},function(t){if(a)a();else throw'Loading data file "'+i+'" failed.'}),_&&addRunDependency(_)},resizeListeners:[],updateResizeListeners:function(){var i=Module.canvas;Browser.resizeListeners.forEach(function(o){o(i.width,i.height)})},setCanvasSize:function(i,o,a){var c=Module.canvas;Browser.updateCanvasDimensions(c,i,o),a||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var i=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];i=i|8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=i}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var i=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];i=i&~8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=i}Browser.updateResizeListeners()},updateCanvasDimensions:function(i,o,a){o&&a?(i.widthNative=o,i.heightNative=a):(o=i.widthNative,a=i.heightNative);var c=o,_=a;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(c/_>2];return o},getStr:function(){var i=Pointer_stringify(SYSCALLS.get());return i},get64:function(){var i=SYSCALLS.get(),o=SYSCALLS.get();return i>=0?assert(o===0):assert(o===-1),i},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall6(i,o){SYSCALLS.varargs=o;try{var a=SYSCALLS.getStreamFromFD();return FS.close(a),0}catch(c){return(typeof FS=="undefined"||!(c instanceof FS.ErrnoError))&&abort(c),-c.errno}}function ___syscall54(i,o){SYSCALLS.varargs=o;try{return 0}catch(a){return(typeof FS=="undefined"||!(a instanceof FS.ErrnoError))&&abort(a),-a.errno}}function _typeModule(i){var o=[[0,1,"X"],[1,1,"const X"],[128,1,"X *"],[256,1,"X &"],[384,1,"X &&"],[512,1,"std::shared_ptr"],[640,1,"std::unique_ptr"],[5120,1,"std::vector"],[6144,2,"std::array"],[9216,-1,"std::function"]];function a(O,T,B,H,q,ne){if(T==1){var m=H&896;(m==128||m==256||m==384)&&(O="X const")}var pe;return ne?pe=B.replace("X",O).replace("Y",q):pe=O.replace("X",B).replace("Y",q),pe.replace(/([*&]) (?=[*&])/g,"$1")}function c(O,T,B,H,q){throw new Error(O+" type "+B.replace("X",T+"?")+(H?" with flag "+H:"")+" in "+q)}function _(O,T,B,H,q,ne,m,pe){ne===void 0&&(ne="X"),pe===void 0&&(pe=1);var ge=B(O);if(ge)return ge;var ve=H(O),ue=ve.placeholderFlag,_e=o[ue];m&&_e&&(ne=a(m[2],m[0],ne,_e[0],"?",!0));var ce;ue==0&&(ce="Unbound"),ue>=10&&(ce="Corrupt"),pe>20&&(ce="Deeply nested"),ce&&c(ce,O,ne,ue,q||"?");var me=ve.paramList[0],re=_(me,T,B,H,q,ne,_e,pe+1),we,Ie={flags:_e[0],id:O,name:"",paramList:[re]},je=[],ct="?";switch(ve.placeholderFlag){case 1:we=re.spec;break;case 2:if((re.flags&15360)==1024&&re.spec.ptrSize==1){Ie.flags=7168;break}case 3:case 6:case 5:we=re.spec,(re.flags&15360)!=2048;break;case 8:ct=""+ve.paramList[1],Ie.paramList.push(ve.paramList[1]);break;case 9:for(var pt=0,Xe=ve.paramList[1];pt>2]=i),i}function _llvm_stacksave(){var i=_llvm_stacksave;return i.LLVM_SAVEDSTACKS||(i.LLVM_SAVEDSTACKS=[]),i.LLVM_SAVEDSTACKS.push(Runtime.stackSave()),i.LLVM_SAVEDSTACKS.length-1}function ___syscall140(i,o){SYSCALLS.varargs=o;try{var a=SYSCALLS.getStreamFromFD(),c=SYSCALLS.get(),_=SYSCALLS.get(),t=SYSCALLS.get(),M=SYSCALLS.get(),N=_;return FS.llseek(a,N,M),HEAP32[t>>2]=a.position,a.getdents&&N===0&&M===0&&(a.getdents=null),0}catch(O){return(typeof FS=="undefined"||!(O instanceof FS.ErrnoError))&&abort(O),-O.errno}}function ___syscall146(i,o){SYSCALLS.varargs=o;try{var a=SYSCALLS.get(),c=SYSCALLS.get(),_=SYSCALLS.get(),t=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(B,H){var q=___syscall146.buffers[B];assert(q),H===0||H===10?((B===1?Module.print:Module.printErr)(UTF8ArrayToString(q,0)),q.length=0):q.push(H)});for(var M=0;M<_;M++){for(var N=HEAP32[c+M*8>>2],O=HEAP32[c+(M*8+4)>>2],T=0;Ti.pageSize/2||o>i.pageSize-a){var c=_nbind.typeNameTbl.NBind.proto;return c.lalloc(o)}else return HEAPU32[i.usedPtr]=a+o,i.rootPtr+a},i.lreset=function(o,a){var c=HEAPU32[i.pagePtr];if(c){var _=_nbind.typeNameTbl.NBind.proto;_.lreset(o,a)}else HEAPU32[i.usedPtr]=o},i}();_nbind.Pool=Pool;function constructType(i,o){var a=i==10240?_nbind.makeTypeNameTbl[o.name]||_nbind.BindType:_nbind.makeTypeKindTbl[i],c=new a(o);return typeIdTbl[o.id]=c,_nbind.typeNameTbl[o.name]=c,c}_nbind.constructType=constructType;function getType(i){return typeIdTbl[i]}_nbind.getType=getType;function queryType(i){var o=HEAPU8[i],a=_nbind.structureList[o][1];i/=4,a<0&&(++i,a=HEAPU32[i]+1);var c=Array.prototype.slice.call(HEAPU32.subarray(i+1,i+1+a));return o==9&&(c=[c[0],c.slice(1)]),{paramList:c,placeholderFlag:o}}_nbind.queryType=queryType;function getTypes(i,o){return i.map(function(a){return typeof a=="number"?_nbind.getComplexType(a,constructType,getType,queryType,o):_nbind.typeNameTbl[a]})}_nbind.getTypes=getTypes;function readTypeIdList(i,o){return Array.prototype.slice.call(HEAPU32,i/4,i/4+o)}_nbind.readTypeIdList=readTypeIdList;function readAsciiString(i){for(var o=i;HEAPU8[o++];);return String.fromCharCode.apply("",HEAPU8.subarray(i,o-1))}_nbind.readAsciiString=readAsciiString;function readPolicyList(i){var o={};if(i)for(;;){var a=HEAPU32[i/4];if(!a)break;o[readAsciiString(a)]=!0,i+=4}return o}_nbind.readPolicyList=readPolicyList;function getDynCall(i,o){var a={float32_t:"d",float64_t:"d",int64_t:"d",uint64_t:"d",void:"v"},c=i.map(function(t){return a[t.name]||"i"}).join(""),_=Module["dynCall_"+c];if(!_)throw new Error("dynCall_"+c+" not found for "+o+"("+i.map(function(t){return t.name}).join(", ")+")");return _}_nbind.getDynCall=getDynCall;function addMethod(i,o,a,c){var _=i[o];i.hasOwnProperty(o)&&_?((_.arity||_.arity===0)&&(_=_nbind.makeOverloader(_,_.arity),i[o]=_),_.addMethod(a,c)):(a.arity=c,i[o]=a)}_nbind.addMethod=addMethod;function throwError(i){throw new Error(i)}_nbind.throwError=throwError,_nbind.bigEndian=!1,_a=_typeModule(_typeModule),_nbind.Type=_a.Type,_nbind.makeType=_a.makeType,_nbind.getComplexType=_a.getComplexType,_nbind.structureList=_a.structureList;var BindType=function(i){__extends(o,i);function o(){var a=i!==null&&i.apply(this,arguments)||this;return a.heap=HEAPU32,a.ptrSize=4,a}return o.prototype.needsWireRead=function(a){return!!this.wireRead||!!this.makeWireRead},o.prototype.needsWireWrite=function(a){return!!this.wireWrite||!!this.makeWireWrite},o}(_nbind.Type);_nbind.BindType=BindType;var PrimitiveType=function(i){__extends(o,i);function o(a){var c=i.call(this,a)||this,_=a.flags&32?{32:HEAPF32,64:HEAPF64}:a.flags&8?{8:HEAPU8,16:HEAPU16,32:HEAPU32}:{8:HEAP8,16:HEAP16,32:HEAP32};return c.heap=_[a.ptrSize*8],c.ptrSize=a.ptrSize,c}return o.prototype.needsWireWrite=function(a){return!!a&&!!a.Strict},o.prototype.makeWireWrite=function(a,c){return c&&c.Strict&&function(_){if(typeof _=="number")return _;throw new Error("Type mismatch")}},o}(BindType);_nbind.PrimitiveType=PrimitiveType;function pushCString(i,o){if(i==null){if(o&&o.Nullable)return 0;throw new Error("Type mismatch")}if(o&&o.Strict){if(typeof i!="string")throw new Error("Type mismatch")}else i=i.toString();var a=Module.lengthBytesUTF8(i)+1,c=_nbind.Pool.lalloc(a);return Module.stringToUTF8Array(i,HEAPU8,c,a),c}_nbind.pushCString=pushCString;function popCString(i){return i===0?null:Module.Pointer_stringify(i)}_nbind.popCString=popCString;var CStringType=function(i){__extends(o,i);function o(){var a=i!==null&&i.apply(this,arguments)||this;return a.wireRead=popCString,a.wireWrite=pushCString,a.readResources=[_nbind.resources.pool],a.writeResources=[_nbind.resources.pool],a}return o.prototype.makeWireWrite=function(a,c){return function(_){return pushCString(_,c)}},o}(BindType);_nbind.CStringType=CStringType;var BooleanType=function(i){__extends(o,i);function o(){var a=i!==null&&i.apply(this,arguments)||this;return a.wireRead=function(c){return!!c},a}return o.prototype.needsWireWrite=function(a){return!!a&&!!a.Strict},o.prototype.makeWireRead=function(a){return"!!("+a+")"},o.prototype.makeWireWrite=function(a,c){return c&&c.Strict&&function(_){if(typeof _=="boolean")return _;throw new Error("Type mismatch")}||a},o}(BindType);_nbind.BooleanType=BooleanType;var Wrapper=function(){function i(){}return i.prototype.persist=function(){this.__nbindState|=1},i}();_nbind.Wrapper=Wrapper;function makeBound(i,o){var a=function(c){__extends(_,c);function _(t,M,N,O){var T=c.call(this)||this;if(!(T instanceof _))return new(Function.prototype.bind.apply(_,Array.prototype.concat.apply([null],arguments)));var B=M,H=N,q=O;if(t!==_nbind.ptrMarker){var ne=T.__nbindConstructor.apply(T,arguments);B=4096|512,q=HEAPU32[ne/4],H=HEAPU32[ne/4+1]}var m={configurable:!0,enumerable:!1,value:null,writable:!1},pe={__nbindFlags:B,__nbindPtr:H};q&&(pe.__nbindShared=q,_nbind.mark(T));for(var ge=0,ve=Object.keys(pe);ge>=1;var a=_nbind.valueList[i];return _nbind.valueList[i]=firstFreeValue,firstFreeValue=i,a}else{if(o)return _nbind.popShared(i,o);throw new Error("Invalid value slot "+i)}}_nbind.popValue=popValue;var valueBase=18446744073709552e3;function push64(i){return typeof i=="number"?i:pushValue(i)*4096+valueBase}function pop64(i){return i=3?M=Buffer.from(t):M=new Buffer(t),M.copy(c)}else getBuffer(c).set(t)}}_nbind.commitBuffer=commitBuffer;var dirtyList=[],gcTimer=0;function sweep(){for(var i=0,o=dirtyList;i>2]=DYNAMIC_BASE,staticSealed=!0;function invoke_viiiii(i,o,a,c,_,t){try{Module.dynCall_viiiii(i,o,a,c,_,t)}catch(M){if(typeof M!="number"&&M!=="longjmp")throw M;Module.setThrew(1,0)}}function invoke_vif(i,o,a){try{Module.dynCall_vif(i,o,a)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_vid(i,o,a){try{Module.dynCall_vid(i,o,a)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_fiff(i,o,a,c){try{return Module.dynCall_fiff(i,o,a,c)}catch(_){if(typeof _!="number"&&_!=="longjmp")throw _;Module.setThrew(1,0)}}function invoke_vi(i,o){try{Module.dynCall_vi(i,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_vii(i,o,a){try{Module.dynCall_vii(i,o,a)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_ii(i,o){try{return Module.dynCall_ii(i,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_viddi(i,o,a,c,_){try{Module.dynCall_viddi(i,o,a,c,_)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}function invoke_vidd(i,o,a,c){try{Module.dynCall_vidd(i,o,a,c)}catch(_){if(typeof _!="number"&&_!=="longjmp")throw _;Module.setThrew(1,0)}}function invoke_iiii(i,o,a,c){try{return Module.dynCall_iiii(i,o,a,c)}catch(_){if(typeof _!="number"&&_!=="longjmp")throw _;Module.setThrew(1,0)}}function invoke_diii(i,o,a,c){try{return Module.dynCall_diii(i,o,a,c)}catch(_){if(typeof _!="number"&&_!=="longjmp")throw _;Module.setThrew(1,0)}}function invoke_di(i,o){try{return Module.dynCall_di(i,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_iid(i,o,a){try{return Module.dynCall_iid(i,o,a)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_iii(i,o,a){try{return Module.dynCall_iii(i,o,a)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_viiddi(i,o,a,c,_,t){try{Module.dynCall_viiddi(i,o,a,c,_,t)}catch(M){if(typeof M!="number"&&M!=="longjmp")throw M;Module.setThrew(1,0)}}function invoke_viiiiii(i,o,a,c,_,t,M){try{Module.dynCall_viiiiii(i,o,a,c,_,t,M)}catch(N){if(typeof N!="number"&&N!=="longjmp")throw N;Module.setThrew(1,0)}}function invoke_dii(i,o,a){try{return Module.dynCall_dii(i,o,a)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_i(i){try{return Module.dynCall_i(i)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_iiiiii(i,o,a,c,_,t){try{return Module.dynCall_iiiiii(i,o,a,c,_,t)}catch(M){if(typeof M!="number"&&M!=="longjmp")throw M;Module.setThrew(1,0)}}function invoke_viiid(i,o,a,c,_){try{Module.dynCall_viiid(i,o,a,c,_)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}function invoke_viififi(i,o,a,c,_,t,M){try{Module.dynCall_viififi(i,o,a,c,_,t,M)}catch(N){if(typeof N!="number"&&N!=="longjmp")throw N;Module.setThrew(1,0)}}function invoke_viii(i,o,a,c){try{Module.dynCall_viii(i,o,a,c)}catch(_){if(typeof _!="number"&&_!=="longjmp")throw _;Module.setThrew(1,0)}}function invoke_v(i){try{Module.dynCall_v(i)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_viid(i,o,a,c){try{Module.dynCall_viid(i,o,a,c)}catch(_){if(typeof _!="number"&&_!=="longjmp")throw _;Module.setThrew(1,0)}}function invoke_idd(i,o,a){try{return Module.dynCall_idd(i,o,a)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_viiii(i,o,a,c,_){try{Module.dynCall_viiii(i,o,a,c,_)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}Module.asmGlobalArg={Math,Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Float32Array,Float64Array,NaN:NaN,Infinity:Infinity},Module.asmLibraryArg={abort,assert,enlargeMemory,getTotalMemory,abortOnCannotGrowMemory,invoke_viiiii,invoke_vif,invoke_vid,invoke_fiff,invoke_vi,invoke_vii,invoke_ii,invoke_viddi,invoke_vidd,invoke_iiii,invoke_diii,invoke_di,invoke_iid,invoke_iii,invoke_viiddi,invoke_viiiiii,invoke_dii,invoke_i,invoke_iiiiii,invoke_viiid,invoke_viififi,invoke_viii,invoke_v,invoke_viid,invoke_idd,invoke_viiii,_emscripten_asm_const_iiiii,_emscripten_asm_const_iiidddddd,_emscripten_asm_const_iiiid,__nbind_reference_external,_emscripten_asm_const_iiiiiiii,_removeAccessorPrefix,_typeModule,__nbind_register_pool,__decorate,_llvm_stackrestore,___cxa_atexit,__extends,__nbind_get_value_object,__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,_emscripten_set_main_loop_timing,__nbind_register_primitive,__nbind_register_type,_emscripten_memcpy_big,__nbind_register_function,___setErrNo,__nbind_register_class,__nbind_finish,_abort,_nbind_value,_llvm_stacksave,___syscall54,_defineHidden,_emscripten_set_main_loop,_emscripten_get_now,__nbind_register_callback_signature,_emscripten_asm_const_iiiiii,__nbind_free_external,_emscripten_asm_const_iiii,_emscripten_asm_const_iiididi,___syscall6,_atexit,___syscall140,___syscall146,DYNAMICTOP_PTR,tempDoublePtr,ABORT,STACKTOP,STACK_MAX,cttz_i8,___dso_handle};var asm=function(i,o,a){var c=new i.Int8Array(a),_=new i.Int16Array(a),t=new i.Int32Array(a),M=new i.Uint8Array(a),N=new i.Uint16Array(a),O=new i.Uint32Array(a),T=new i.Float32Array(a),B=new i.Float64Array(a),H=o.DYNAMICTOP_PTR|0,q=o.tempDoublePtr|0,ne=o.ABORT|0,m=o.STACKTOP|0,pe=o.STACK_MAX|0,ge=o.cttz_i8|0,ve=o.___dso_handle|0,ue=0,_e=0,ce=0,me=0,re=i.NaN,we=i.Infinity,Ie=0,je=0,ct=0,pt=0,Xe=0,tt=0,He=i.Math.floor,kt=i.Math.abs,zt=i.Math.sqrt,nt=i.Math.pow,X=i.Math.cos,fe=i.Math.sin,xe=i.Math.tan,le=i.Math.acos,qe=i.Math.asin,dt=i.Math.atan,Rt=i.Math.atan2,nn=i.Math.exp,an=i.Math.log,Mn=i.Math.ceil,lr=i.Math.imul,ln=i.Math.min,Gt=i.Math.max,Er=i.Math.clz32,w=i.Math.fround,jt=o.abort,Xn=o.assert,vr=o.enlargeMemory,jr=o.getTotalMemory,fr=o.abortOnCannotGrowMemory,zr=o.invoke_viiiii,Qt=o.invoke_vif,wu=o.invoke_vid,po=o.invoke_fiff,A0=o.invoke_vi,J0=o.invoke_vii,Ps=o.invoke_ii,Z0=o.invoke_viddi,$0=o.invoke_vidd,Wt=o.invoke_iiii,xi=o.invoke_diii,su=o.invoke_di,mi=o.invoke_iid,Dr=o.invoke_iii,el=o.invoke_viiddi,Ko=o.invoke_viiiiii,Uu=o.invoke_dii,Xo=o.invoke_i,Xr=o.invoke_iiiiii,O0=o.invoke_viiid,M0=o.invoke_viififi,Po=o.invoke_viii,au=o.invoke_v,ki=o.invoke_viid,Is=o.invoke_idd,Xl=o.invoke_viiii,Io=o._emscripten_asm_const_iiiii,ho=o._emscripten_asm_const_iiidddddd,Hr=o._emscripten_asm_const_iiiid,Ri=o.__nbind_reference_external,Qo=o._emscripten_asm_const_iiiiiiii,yi=o._removeAccessorPrefix,en=o._typeModule,bn=o.__nbind_register_pool,Ai=o.__decorate,gi=o._llvm_stackrestore,Vt=o.___cxa_atexit,Au=o.__extends,eu=o.__nbind_get_value_object,Jo=o.__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,Yi=o._emscripten_set_main_loop_timing,Ql=o.__nbind_register_primitive,k0=o.__nbind_register_type,ai=o._emscripten_memcpy_big,f0=o.__nbind_register_function,Jl=o.___setErrNo,L0=o.__nbind_register_class,bs=o.__nbind_finish,$n=o._abort,tl=o._nbind_value,c0=o._llvm_stacksave,bo=o.___syscall54,Sl=o._defineHidden,N0=o._emscripten_set_main_loop,wt=o._emscripten_get_now,bt=o.__nbind_register_callback_signature,Hn=o._emscripten_asm_const_iiiiii,qr=o.__nbind_free_external,Ki=o._emscripten_asm_const_iiii,Qr=o._emscripten_asm_const_iiididi,Ou=o.___syscall6,vo=o._atexit,Li=o.___syscall140,mo=o.___syscall146,vs=w(0);let Tt=w(0);function d0(e){e=e|0;var n=0;return n=m,m=m+e|0,m=m+15&-16,n|0}function nl(){return m|0}function Zl(e){e=e|0,m=e}function ju(e,n){e=e|0,n=n|0,m=e,pe=n}function ms(e,n){e=e|0,n=n|0,ue||(ue=e,_e=n)}function Bo(e){e=e|0,tt=e}function Q(){return tt|0}function Se(){var e=0,n=0;gr(8104,8,400)|0,gr(8504,408,540)|0,e=9044,n=e+44|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));c[9088]=0,c[9089]=1,t[2273]=0,t[2274]=948,t[2275]=948,Vt(17,8104,ve|0)|0}function Ne(e){e=e|0,fc(e+948|0)}function Le(e){return e=w(e),((mr(e)|0)&2147483647)>>>0>2139095040|0}function ht(e,n,r){e=e|0,n=n|0,r=r|0;e:do if(t[e+(n<<3)+4>>2]|0)e=e+(n<<3)|0;else{if((n|2|0)==3?t[e+60>>2]|0:0){e=e+56|0;break}switch(n|0){case 0:case 2:case 4:case 5:{if(t[e+52>>2]|0){e=e+48|0;break e}break}default:}if(t[e+68>>2]|0){e=e+64|0;break}else{e=(n|1|0)==5?948:r;break}}while(0);return e|0}function Yn(e){e=e|0;var n=0;return n=T_(1e3)|0,Cn(e,(n|0)!=0,2456),t[2276]=(t[2276]|0)+1,gr(n|0,8104,1e3)|0,c[e+2>>0]|0&&(t[n+4>>2]=2,t[n+12>>2]=4),t[n+976>>2]=e,n|0}function Cn(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;l=m,m=m+16|0,u=l,n||(t[u>>2]=r,Cl(e,5,3197,u)),m=l}function cr(){return Yn(956)|0}function Si(e){e=e|0;var n=0;return n=pn(1e3)|0,Mu(n,e),Cn(t[e+976>>2]|0,1,2456),t[2276]=(t[2276]|0)+1,t[n+944>>2]=0,n|0}function Mu(e,n){e=e|0,n=n|0;var r=0;gr(e|0,n|0,948)|0,aa(e+948|0,n+948|0),r=e+960|0,e=n+960|0,n=r+40|0;do t[r>>2]=t[e>>2],r=r+4|0,e=e+4|0;while((r|0)<(n|0))}function zu(e){e=e|0;var n=0,r=0,u=0,l=0;if(n=e+944|0,r=t[n>>2]|0,r|0&&(Hu(r+948|0,e)|0,t[n>>2]=0),r=Su(e)|0,r|0){n=0;do t[(Ti(e,n)|0)+944>>2]=0,n=n+1|0;while((n|0)!=(r|0))}r=e+948|0,u=t[r>>2]|0,l=e+952|0,n=t[l>>2]|0,(n|0)!=(u|0)&&(t[l>>2]=n+(~((n+-4-u|0)>>>2)<<2)),F0(r),C_(e),t[2276]=(t[2276]|0)+-1}function Hu(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0;u=t[e>>2]|0,D=e+4|0,r=t[D>>2]|0,s=r;e:do if((u|0)==(r|0))l=u,h=4;else for(e=u;;){if((t[e>>2]|0)==(n|0)){l=e,h=4;break e}if(e=e+4|0,(e|0)==(r|0)){e=0;break}}while(0);return(h|0)==4&&((l|0)!=(r|0)?(u=l+4|0,e=s-u|0,n=e>>2,n&&(ky(l|0,u|0,e|0)|0,r=t[D>>2]|0),e=l+(n<<2)|0,(r|0)==(e|0)||(t[D>>2]=r+(~((r+-4-e|0)>>>2)<<2)),e=1):e=0),e|0}function Su(e){return e=e|0,(t[e+952>>2]|0)-(t[e+948>>2]|0)>>2|0}function Ti(e,n){e=e|0,n=n|0;var r=0;return r=t[e+948>>2]|0,(t[e+952>>2]|0)-r>>2>>>0>n>>>0?e=t[r+(n<<2)>>2]|0:e=0,e|0}function F0(e){e=e|0;var n=0,r=0,u=0,l=0;u=m,m=m+32|0,n=u,l=t[e>>2]|0,r=(t[e+4>>2]|0)-l|0,((t[e+8>>2]|0)-l|0)>>>0>r>>>0&&(l=r>>2,Y(n,l,l,e+8|0),ri(e,n),ii(n)),m=u}function ku(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0;L=Su(e)|0;do if(L|0){if((t[(Ti(e,0)|0)+944>>2]|0)==(e|0)){if(!(Hu(e+948|0,n)|0))break;gr(n+400|0,8504,540)|0,t[n+944>>2]=0,Qn(e);break}h=t[(t[e+976>>2]|0)+12>>2]|0,D=e+948|0,S=(h|0)==0,r=0,s=0;do u=t[(t[D>>2]|0)+(s<<2)>>2]|0,(u|0)==(n|0)?Qn(e):(l=Si(u)|0,t[(t[D>>2]|0)+(r<<2)>>2]=l,t[l+944>>2]=e,S||nD[h&15](u,l,e,r),r=r+1|0),s=s+1|0;while((s|0)!=(L|0));if(r>>>0>>0){S=e+948|0,D=e+952|0,h=r,r=t[D>>2]|0;do s=(t[S>>2]|0)+(h<<2)|0,u=s+4|0,l=r-u|0,n=l>>2,n&&(ky(s|0,u|0,l|0)|0,r=t[D>>2]|0),l=r,u=s+(n<<2)|0,(l|0)!=(u|0)&&(r=l+(~((l+-4-u|0)>>>2)<<2)|0,t[D>>2]=r),h=h+1|0;while((h|0)!=(L|0))}}while(0)}function p0(e){e=e|0;var n=0,r=0,u=0,l=0;qu(e,(Su(e)|0)==0,2491),qu(e,(t[e+944>>2]|0)==0,2545),n=e+948|0,r=t[n>>2]|0,u=e+952|0,l=t[u>>2]|0,(l|0)!=(r|0)&&(t[u>>2]=l+(~((l+-4-r|0)>>>2)<<2)),F0(n),n=e+976|0,r=t[n>>2]|0,gr(e|0,8104,1e3)|0,c[r+2>>0]|0&&(t[e+4>>2]=2,t[e+12>>2]=4),t[n>>2]=r}function qu(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;l=m,m=m+16|0,u=l,n||(t[u>>2]=r,pr(e,5,3197,u)),m=l}function Ia(){return t[2276]|0}function yo(){var e=0;return e=T_(20)|0,ua((e|0)!=0,2592),t[2277]=(t[2277]|0)+1,t[e>>2]=t[239],t[e+4>>2]=t[240],t[e+8>>2]=t[241],t[e+12>>2]=t[242],t[e+16>>2]=t[243],e|0}function ua(e,n){e=e|0,n=n|0;var r=0,u=0;u=m,m=m+16|0,r=u,e||(t[r>>2]=n,pr(0,5,3197,r)),m=u}function Zo(e){e=e|0,C_(e),t[2277]=(t[2277]|0)+-1}function oa(e,n){e=e|0,n=n|0;var r=0;n?(qu(e,(Su(e)|0)==0,2629),r=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>0>>0?u:s:l,n-k>>2,e+8|0),k=ye+8|0,u=t[k>>2]|0,s=ye+12|0,L=t[s>>2]|0,h=L,S=u;do if((u|0)==(L|0)){if(L=ye+4|0,u=t[L>>2]|0,Ge=t[ye>>2]|0,l=Ge,u>>>0<=Ge>>>0){u=h-l>>1,u=(u|0)==0?1:u,Y(K,u,u>>>2,t[ye+16>>2]|0),t[Be>>2]=t[L>>2],t[Te>>2]=t[k>>2],t[D>>2]=t[Be>>2],t[I>>2]=t[Te>>2],Di(K,D,I),u=t[ye>>2]|0,t[ye>>2]=t[K>>2],t[K>>2]=u,u=K+4|0,Ge=t[L>>2]|0,t[L>>2]=t[u>>2],t[u>>2]=Ge,u=K+8|0,Ge=t[k>>2]|0,t[k>>2]=t[u>>2],t[u>>2]=Ge,u=K+12|0,Ge=t[s>>2]|0,t[s>>2]=t[u>>2],t[u>>2]=Ge,ii(K),u=t[k>>2]|0;break}s=u,h=((s-l>>2)+1|0)/-2|0,D=u+(h<<2)|0,l=S-s|0,s=l>>2,s&&(ky(D|0,u|0,l|0)|0,u=t[L>>2]|0),Ge=D+(s<<2)|0,t[k>>2]=Ge,t[L>>2]=u+(h<<2),u=Ge}while(0);t[u>>2]=t[r>>2],t[k>>2]=(t[k>>2]|0)+4,n=at(e,ye,n)|0,ii(ye)}while(0);return m=Ze,n|0}function Qn(e){e=e|0;var n=0;do{if(n=e+984|0,c[n>>0]|0)break;c[n>>0]=1,T[e+504>>2]=w(re),e=t[e+944>>2]|0}while((e|0)!=0)}function fc(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-4-u|0)>>>2)<<2)),_t(r))}function fi(e){return e=e|0,t[e+944>>2]|0}function $r(e){e=e|0,qu(e,(t[e+964>>2]|0)!=0,2832),Qn(e)}function $l(e){return e=e|0,(c[e+984>>0]|0)!=0|0}function la(e,n){e=e|0,n=n|0,LF(e,n,400)|0&&(gr(e|0,n|0,400)|0,Qn(e))}function hf(e){e=e|0;var n=Tt;return n=w(T[e+44>>2]),e=Le(n)|0,w(e?w(0):n)}function Bs(e){e=e|0;var n=Tt;return n=w(T[e+48>>2]),Le(n)|0&&(n=c[(t[e+976>>2]|0)+2>>0]|0?w(1):w(0)),w(n)}function Ba(e,n){e=e|0,n=n|0,t[e+980>>2]=n}function Us(e){return e=e|0,t[e+980>>2]|0}function go(e,n){e=e|0,n=n|0;var r=0;r=e+4|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function js(e){return e=e|0,t[e+4>>2]|0}function ji(e,n){e=e|0,n=n|0;var r=0;r=e+8|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function U(e){return e=e|0,t[e+8>>2]|0}function z(e,n){e=e|0,n=n|0;var r=0;r=e+12|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function G(e){return e=e|0,t[e+12>>2]|0}function $(e,n){e=e|0,n=n|0;var r=0;r=e+16|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function Ce(e){return e=e|0,t[e+16>>2]|0}function Ee(e,n){e=e|0,n=n|0;var r=0;r=e+20|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function Ae(e){return e=e|0,t[e+20>>2]|0}function Z(e,n){e=e|0,n=n|0;var r=0;r=e+24|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function ke(e){return e=e|0,t[e+24>>2]|0}function Je(e,n){e=e|0,n=n|0;var r=0;r=e+28|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function mt(e){return e=e|0,t[e+28>>2]|0}function oe(e,n){e=e|0,n=n|0;var r=0;r=e+32|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function We(e){return e=e|0,t[e+32>>2]|0}function it(e,n){e=e|0,n=n|0;var r=0;r=e+36|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function Ct(e){return e=e|0,t[e+36>>2]|0}function Mt(e,n){e=e|0,n=w(n);var r=0;r=e+40|0,w(T[r>>2])!=n&&(T[r>>2]=n,Qn(e))}function It(e,n){e=e|0,n=w(n);var r=0;r=e+44|0,w(T[r>>2])!=n&&(T[r>>2]=n,Qn(e))}function sn(e,n){e=e|0,n=w(n);var r=0;r=e+48|0,w(T[r>>2])!=n&&(T[r>>2]=n,Qn(e))}function rn(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Le(n)|0,r=(s^1)&1,u=e+52|0,l=e+56|0,(s|w(T[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(T[u>>2]=n,t[l>>2]=r,Qn(e))}function Ft(e,n){e=e|0,n=w(n);var r=0,u=0;u=e+52|0,r=e+56|0,(w(T[u>>2])==n?(t[r>>2]|0)==2:0)||(T[u>>2]=n,u=Le(n)|0,t[r>>2]=u?3:2,Qn(e))}function Dn(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+52|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function dr(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Le(r)|0,u=(s^1)&1,l=e+132+(n<<3)|0,n=e+132+(n<<3)+4|0,(s|w(T[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(T[l>>2]=r,t[n>>2]=u,Qn(e))}function er(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Le(r)|0,u=s?0:2,l=e+132+(n<<3)|0,n=e+132+(n<<3)+4|0,(s|w(T[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(T[l>>2]=r,t[n>>2]=u,Qn(e))}function Cr(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=n+132+(r<<3)|0,n=t[u+4>>2]|0,r=e,t[r>>2]=t[u>>2],t[r+4>>2]=n}function An(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Le(r)|0,u=(s^1)&1,l=e+60+(n<<3)|0,n=e+60+(n<<3)+4|0,(s|w(T[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(T[l>>2]=r,t[n>>2]=u,Qn(e))}function Lr(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Le(r)|0,u=s?0:2,l=e+60+(n<<3)|0,n=e+60+(n<<3)+4|0,(s|w(T[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(T[l>>2]=r,t[n>>2]=u,Qn(e))}function _o(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=n+60+(r<<3)|0,n=t[u+4>>2]|0,r=e,t[r>>2]=t[u>>2],t[r+4>>2]=n}function Nr(e,n){e=e|0,n=n|0;var r=0;r=e+60+(n<<3)+4|0,(t[r>>2]|0)!=3&&(T[e+60+(n<<3)>>2]=w(re),t[r>>2]=3,Qn(e))}function ut(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Le(r)|0,u=(s^1)&1,l=e+204+(n<<3)|0,n=e+204+(n<<3)+4|0,(s|w(T[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(T[l>>2]=r,t[n>>2]=u,Qn(e))}function Dt(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Le(r)|0,u=s?0:2,l=e+204+(n<<3)|0,n=e+204+(n<<3)+4|0,(s|w(T[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(T[l>>2]=r,t[n>>2]=u,Qn(e))}function et(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=n+204+(r<<3)|0,n=t[u+4>>2]|0,r=e,t[r>>2]=t[u>>2],t[r+4>>2]=n}function Pt(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Le(r)|0,u=(s^1)&1,l=e+276+(n<<3)|0,n=e+276+(n<<3)+4|0,(s|w(T[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(T[l>>2]=r,t[n>>2]=u,Qn(e))}function un(e,n){return e=e|0,n=n|0,w(T[e+276+(n<<3)>>2])}function fn(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Le(n)|0,r=(s^1)&1,u=e+348|0,l=e+352|0,(s|w(T[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(T[u>>2]=n,t[l>>2]=r,Qn(e))}function Jn(e,n){e=e|0,n=w(n);var r=0,u=0;u=e+348|0,r=e+352|0,(w(T[u>>2])==n?(t[r>>2]|0)==2:0)||(T[u>>2]=n,u=Le(n)|0,t[r>>2]=u?3:2,Qn(e))}function wr(e){e=e|0;var n=0;n=e+352|0,(t[n>>2]|0)!=3&&(T[e+348>>2]=w(re),t[n>>2]=3,Qn(e))}function fu(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+348|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function Lu(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Le(n)|0,r=(s^1)&1,u=e+356|0,l=e+360|0,(s|w(T[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(T[u>>2]=n,t[l>>2]=r,Qn(e))}function Co(e,n){e=e|0,n=w(n);var r=0,u=0;u=e+356|0,r=e+360|0,(w(T[u>>2])==n?(t[r>>2]|0)==2:0)||(T[u>>2]=n,u=Le(n)|0,t[r>>2]=u?3:2,Qn(e))}function $o(e){e=e|0;var n=0;n=e+360|0,(t[n>>2]|0)!=3&&(T[e+356>>2]=w(re),t[n>>2]=3,Qn(e))}function Nu(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+356|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function _i(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Le(n)|0,r=(s^1)&1,u=e+364|0,l=e+368|0,(s|w(T[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(T[u>>2]=n,t[l>>2]=r,Qn(e))}function P0(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Le(n)|0,r=s?0:2,u=e+364|0,l=e+368|0,(s|w(T[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(T[u>>2]=n,t[l>>2]=r,Qn(e))}function rl(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+364|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function vf(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Le(n)|0,r=(s^1)&1,u=e+372|0,l=e+376|0,(s|w(T[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(T[u>>2]=n,t[l>>2]=r,Qn(e))}function Tl(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Le(n)|0,r=s?0:2,u=e+372|0,l=e+376|0,(s|w(T[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(T[u>>2]=n,t[l>>2]=r,Qn(e))}function mf(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+372|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function I0(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Le(n)|0,r=(s^1)&1,u=e+380|0,l=e+384|0,(s|w(T[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(T[u>>2]=n,t[l>>2]=r,Qn(e))}function gs(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Le(n)|0,r=s?0:2,u=e+380|0,l=e+384|0,(s|w(T[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(T[u>>2]=n,t[l>>2]=r,Qn(e))}function zs(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+380|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function b0(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Le(n)|0,r=(s^1)&1,u=e+388|0,l=e+392|0,(s|w(T[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(T[u>>2]=n,t[l>>2]=r,Qn(e))}function B0(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Le(n)|0,r=s?0:2,u=e+388|0,l=e+392|0,(s|w(T[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(T[u>>2]=n,t[l>>2]=r,Qn(e))}function _s(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+388|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function Qu(e,n){e=e|0,n=w(n);var r=0;r=e+396|0,w(T[r>>2])!=n&&(T[r>>2]=n,Qn(e))}function Tu(e){return e=e|0,w(T[e+396>>2])}function Ei(e){return e=e|0,w(T[e+400>>2])}function xo(e){return e=e|0,w(T[e+404>>2])}function e0(e){return e=e|0,w(T[e+408>>2])}function U0(e){return e=e|0,w(T[e+412>>2])}function sa(e){return e=e|0,w(T[e+416>>2])}function es(e){return e=e|0,w(T[e+420>>2])}function tu(e,n){switch(e=e|0,n=n|0,qu(e,(n|0)<6,2918),n|0){case 0:{n=(t[e+496>>2]|0)==2?5:4;break}case 2:{n=(t[e+496>>2]|0)==2?4:5;break}default:}return w(T[e+424+(n<<2)>>2])}function ei(e,n){switch(e=e|0,n=n|0,qu(e,(n|0)<6,2918),n|0){case 0:{n=(t[e+496>>2]|0)==2?5:4;break}case 2:{n=(t[e+496>>2]|0)==2?4:5;break}default:}return w(T[e+448+(n<<2)>>2])}function h0(e,n){switch(e=e|0,n=n|0,qu(e,(n|0)<6,2918),n|0){case 0:{n=(t[e+496>>2]|0)==2?5:4;break}case 2:{n=(t[e+496>>2]|0)==2?4:5;break}default:}return w(T[e+472+(n<<2)>>2])}function Bi(e,n){e=e|0,n=n|0;var r=0,u=Tt;return r=t[e+4>>2]|0,(r|0)==(t[n+4>>2]|0)?r?(u=w(T[e>>2]),e=w(kt(w(u-w(T[n>>2]))))>2]=0,t[u+4>>2]=0,t[u+8>>2]=0,Jo(u|0,e|0,n|0,0),pr(e,3,(c[u+11>>0]|0)<0?t[u>>2]|0:u,r),tP(u),m=r}function t0(e,n,r,u){e=w(e),n=w(n),r=r|0,u=u|0;var l=Tt;e=w(e*n),l=w(QE(e,w(1)));do if(Ci(l,w(0))|0)e=w(e-l);else{if(e=w(e-l),Ci(l,w(1))|0){e=w(e+w(1));break}if(r){e=w(e+w(1));break}u||(l>w(.5)?l=w(1):(u=Ci(l,w(.5))|0,l=w(u?1:0)),e=w(e+l))}while(0);return w(e/n)}function n0(e,n,r,u,l,s,h,D,S,L,k,I,K){e=e|0,n=w(n),r=r|0,u=w(u),l=l|0,s=w(s),h=h|0,D=w(D),S=w(S),L=w(L),k=w(k),I=w(I),K=K|0;var Be=0,Te=Tt,ye=Tt,Ze=Tt,Ge=Tt,ft=Tt,Me=Tt;return S>2]),Te!=w(0)):0)?(Ze=w(t0(n,Te,0,0)),Ge=w(t0(u,Te,0,0)),ye=w(t0(s,Te,0,0)),Te=w(t0(D,Te,0,0))):(ye=s,Ze=n,Te=D,Ge=u),(l|0)==(e|0)?Be=Ci(ye,Ze)|0:Be=0,(h|0)==(r|0)?K=Ci(Te,Ge)|0:K=0,((Be?0:(ft=w(n-k),!(Re(e,ft,S)|0)))?!(rt(e,ft,l,S)|0):0)?Be=Ye(e,ft,l,s,S)|0:Be=1,((K?0:(Me=w(u-I),!(Re(r,Me,L)|0)))?!(rt(r,Me,h,L)|0):0)?K=Ye(r,Me,h,D,L)|0:K=1,K=Be&K),K|0}function Re(e,n,r){return e=e|0,n=w(n),r=w(r),(e|0)==1?e=Ci(n,r)|0:e=0,e|0}function rt(e,n,r,u){return e=e|0,n=w(n),r=r|0,u=w(u),(e|0)==2&(r|0)==0?n>=u?e=1:e=Ci(n,u)|0:e=0,e|0}function Ye(e,n,r,u,l){return e=e|0,n=w(n),r=r|0,u=w(u),l=w(l),(e|0)==2&(r|0)==2&u>n?l<=n?e=1:e=Ci(n,l)|0:e=0,e|0}function Kt(e,n,r,u,l,s,h,D,S,L,k){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=s|0,h=w(h),D=w(D),S=S|0,L=L|0,k=k|0;var I=0,K=0,Be=0,Te=0,ye=Tt,Ze=Tt,Ge=0,ft=0,Me=0,Pe=0,Zt=0,Br=0,In=0,gn=0,_r=0,Pr=0,Ln=0,uu=Tt,ls=Tt,ss=Tt,as=0,ta=0;Ln=m,m=m+160|0,gn=Ln+152|0,In=Ln+120|0,Br=Ln+104|0,Me=Ln+72|0,Te=Ln+56|0,Zt=Ln+8|0,ft=Ln,Pe=(t[2279]|0)+1|0,t[2279]=Pe,_r=e+984|0,((c[_r>>0]|0)!=0?(t[e+512>>2]|0)!=(t[2278]|0):0)?Ge=4:(t[e+516>>2]|0)==(u|0)?Pr=0:Ge=4,(Ge|0)==4&&(t[e+520>>2]=0,t[e+924>>2]=-1,t[e+928>>2]=-1,T[e+932>>2]=w(-1),T[e+936>>2]=w(-1),Pr=1);e:do if(t[e+964>>2]|0)if(ye=w(Xt(e,2,h)),Ze=w(Xt(e,0,h)),I=e+916|0,ss=w(T[I>>2]),ls=w(T[e+920>>2]),uu=w(T[e+932>>2]),n0(l,n,s,r,t[e+924>>2]|0,ss,t[e+928>>2]|0,ls,uu,w(T[e+936>>2]),ye,Ze,k)|0)Ge=22;else if(Be=t[e+520>>2]|0,!Be)Ge=21;else for(K=0;;){if(I=e+524+(K*24|0)|0,uu=w(T[I>>2]),ls=w(T[e+524+(K*24|0)+4>>2]),ss=w(T[e+524+(K*24|0)+16>>2]),n0(l,n,s,r,t[e+524+(K*24|0)+8>>2]|0,uu,t[e+524+(K*24|0)+12>>2]|0,ls,ss,w(T[e+524+(K*24|0)+20>>2]),ye,Ze,k)|0){Ge=22;break e}if(K=K+1|0,K>>>0>=Be>>>0){Ge=21;break}}else{if(S){if(I=e+916|0,!(Ci(w(T[I>>2]),n)|0)){Ge=21;break}if(!(Ci(w(T[e+920>>2]),r)|0)){Ge=21;break}if((t[e+924>>2]|0)!=(l|0)){Ge=21;break}I=(t[e+928>>2]|0)==(s|0)?I:0,Ge=22;break}if(Be=t[e+520>>2]|0,!Be)Ge=21;else for(K=0;;){if(I=e+524+(K*24|0)|0,((Ci(w(T[I>>2]),n)|0?Ci(w(T[e+524+(K*24|0)+4>>2]),r)|0:0)?(t[e+524+(K*24|0)+8>>2]|0)==(l|0):0)?(t[e+524+(K*24|0)+12>>2]|0)==(s|0):0){Ge=22;break e}if(K=K+1|0,K>>>0>=Be>>>0){Ge=21;break}}}while(0);do if((Ge|0)==21)c[11697]|0?(I=0,Ge=28):(I=0,Ge=31);else if((Ge|0)==22){if(K=(c[11697]|0)!=0,!((I|0)!=0&(Pr^1)))if(K){Ge=28;break}else{Ge=31;break}Te=I+16|0,t[e+908>>2]=t[Te>>2],Be=I+20|0,t[e+912>>2]=t[Be>>2],(c[11698]|0)==0|K^1||(t[ft>>2]=Wr(Pe)|0,t[ft+4>>2]=Pe,pr(e,4,2972,ft),K=t[e+972>>2]|0,K|0&&P1[K&127](e),l=xn(l,S)|0,s=xn(s,S)|0,ta=+w(T[Te>>2]),as=+w(T[Be>>2]),t[Zt>>2]=l,t[Zt+4>>2]=s,B[Zt+8>>3]=+n,B[Zt+16>>3]=+r,B[Zt+24>>3]=ta,B[Zt+32>>3]=as,t[Zt+40>>2]=L,pr(e,4,2989,Zt))}while(0);return(Ge|0)==28&&(K=Wr(Pe)|0,t[Te>>2]=K,t[Te+4>>2]=Pe,t[Te+8>>2]=Pr?3047:11699,pr(e,4,3038,Te),K=t[e+972>>2]|0,K|0&&P1[K&127](e),Zt=xn(l,S)|0,Ge=xn(s,S)|0,t[Me>>2]=Zt,t[Me+4>>2]=Ge,B[Me+8>>3]=+n,B[Me+16>>3]=+r,t[Me+24>>2]=L,pr(e,4,3049,Me),Ge=31),(Ge|0)==31&&(yu(e,n,r,u,l,s,h,D,S,k),c[11697]|0&&(K=t[2279]|0,Zt=Wr(K)|0,t[Br>>2]=Zt,t[Br+4>>2]=K,t[Br+8>>2]=Pr?3047:11699,pr(e,4,3083,Br),K=t[e+972>>2]|0,K|0&&P1[K&127](e),Zt=xn(l,S)|0,Br=xn(s,S)|0,as=+w(T[e+908>>2]),ta=+w(T[e+912>>2]),t[In>>2]=Zt,t[In+4>>2]=Br,B[In+8>>3]=as,B[In+16>>3]=ta,t[In+24>>2]=L,pr(e,4,3092,In)),t[e+516>>2]=u,I||(K=e+520|0,I=t[K>>2]|0,(I|0)==16&&(c[11697]|0&&pr(e,4,3124,gn),t[K>>2]=0,I=0),S?I=e+916|0:(t[K>>2]=I+1,I=e+524+(I*24|0)|0),T[I>>2]=n,T[I+4>>2]=r,t[I+8>>2]=l,t[I+12>>2]=s,t[I+16>>2]=t[e+908>>2],t[I+20>>2]=t[e+912>>2],I=0)),S&&(t[e+416>>2]=t[e+908>>2],t[e+420>>2]=t[e+912>>2],c[e+985>>0]=1,c[_r>>0]=0),t[2279]=(t[2279]|0)+-1,t[e+512>>2]=t[2278],m=Ln,Pr|(I|0)==0|0}function Xt(e,n,r){e=e|0,n=n|0,r=w(r);var u=Tt;return u=w(zi(e,n,r)),w(u+w(Oo(e,n,r)))}function pr(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=m,m=m+16|0,l=s,t[l>>2]=u,e?u=t[e+976>>2]|0:u=0,Hs(u,e,n,r,l),m=s}function Wr(e){return e=e|0,(e>>>0>60?3201:3201+(60-e)|0)|0}function xn(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;return l=m,m=m+32|0,r=l+12|0,u=l,t[r>>2]=t[254],t[r+4>>2]=t[255],t[r+8>>2]=t[256],t[u>>2]=t[257],t[u+4>>2]=t[258],t[u+8>>2]=t[259],(e|0)>2?e=11699:e=t[(n?u:r)+(e<<2)>>2]|0,m=l,e|0}function yu(e,n,r,u,l,s,h,D,S,L){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=s|0,h=w(h),D=w(D),S=S|0,L=L|0;var k=0,I=0,K=0,Be=0,Te=Tt,ye=Tt,Ze=Tt,Ge=Tt,ft=Tt,Me=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101}else vi=101;e:do if((vi|0)==101)switch(vi=0,a2|0){case 1:{k=0,Ge=w(ye*w(.5)),r=w(0);break e}case 2:{k=0,Ge=ye,r=w(0);break e}case 3:{if(s>>>0<=1){k=0,Ge=w(0),r=w(0);break e}r=w((s+-1|0)>>>0),k=0,Ge=w(0),r=w(w(Ru(ye,w(0)))/r);break e}case 5:{r=w(ye/w((s+1|0)>>>0)),k=0,Ge=r;break e}case 4:{r=w(ye/w(s>>>0)),k=0,Ge=w(r*w(.5));break e}default:{k=0,Ge=w(0),r=w(0);break e}}while(0);if(n=w(f2+Ge),Zt){Ze=w(ye/w(k|0)),K=t[ds>>2]|0,I=Pr,ye=w(0);do{k=t[K+(I<<2)>>2]|0;e:do if((t[k+36>>2]|0)!=1){switch(t[k+24>>2]|0){case 1:{if(ae(k,Or)|0){if(!S)break e;mn=w(ie(k,Or,Ln)),mn=w(mn+w(Mo(e,Or))),mn=w(mn+w(zi(k,Or,Sr))),T[k+400+(t[Ic>>2]<<2)>>2]=mn;break e}break}case 0:if(fo=(t[(Eo(k,Or)|0)+4>>2]|0)==3,mn=w(Ze+n),n=fo?mn:n,S&&(fo=k+400+(t[Ic>>2]<<2)|0,T[fo>>2]=w(n+w(T[fo>>2]))),fo=(t[(Do(k,Or)|0)+4>>2]|0)==3,mn=w(Ze+n),n=fo?mn:n,ta){mn=w(r+w(Xt(k,Or,Sr))),ye=vu,n=w(n+w(mn+w(T[k+504>>2])));break e}else{n=w(n+w(r+w(Fe(k,Or,Sr)))),ye=w(Ru(ye,w(Fe(k,Bn,Sr))));break e}default:}S&&(mn=w(Ge+w(Mo(e,Or))),fo=k+400+(t[Ic>>2]<<2)|0,T[fo>>2]=w(mn+w(T[fo>>2])))}while(0);I=I+1|0}while((I|0)!=(In|0))}else ye=w(0);if(r=w(c2+n),u2?Ge=w(w(Kn(e,Bn,w(Vl+ye),Zf,h))-Vl):Ge=vu,Ze=w(w(Kn(e,Bn,w(Vl+(s2?vu:ye)),Zf,h))-Vl),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(w(0),n)));break}switch(k|0){case 1:{n=Te;break e}case 2:{n=w(Te+w(n*w(.5)));break e}default:{n=w(Te+n);break e}}}while(0);mn=w(El+n),fo=K+400+(t[Pc>>2]<<2)|0,T[fo>>2]=w(mn+w(T[fo>>2]))}while(0);I=I+1|0}while((I|0)!=(In|0))}if(El=w(El+Ze),Xf=w(Ru(Xf,r)),s=as+1|0,In>>>0>=Gl>>>0)break;n=Ln,Pr=In,as=s}do if(S){if(k=s>>>0>1,k?0:!(Oe(e)|0))break;if(!(Le(vu)|0)){n=w(vu-El);e:do switch(t[e+12>>2]|0){case 3:{Te=w(Te+n),Me=w(0);break}case 2:{Te=w(Te+w(n*w(.5))),Me=w(0);break}case 4:{vu>El?Me=w(n/w(s>>>0)):Me=w(0);break}case 7:if(vu>El){Te=w(Te+w(n/w(s<<1>>>0))),Me=w(n/w(s>>>0)),Me=k?Me:w(0);break e}else{Te=w(Te+w(n*w(.5))),Me=w(0);break e}case 6:{Me=w(n/w(as>>>0)),Me=vu>El&k?Me:w(0);break}default:Me=w(0)}while(0);if(s|0)for(Zt=1040+(Bn<<2)|0,Br=976+(Bn<<2)|0,Be=0,I=0;;){e:do if(I>>>0>>0)for(ye=w(0),Ze=w(0),n=w(0),K=I;;){k=t[(t[ds>>2]|0)+(K<<2)>>2]|0;do if((t[k+36>>2]|0)!=1?(t[k+24>>2]|0)==0:0){if((t[k+940>>2]|0)!=(Be|0))break e;if(st(k,Bn)|0&&(mn=w(T[k+908+(t[Br>>2]<<2)>>2]),n=w(Ru(n,w(mn+w(Xt(k,Bn,Sr)))))),(eo(e,k)|0)!=5)break;Wl=w(yt(k)),Wl=w(Wl+w(zi(k,0,Sr))),mn=w(T[k+912>>2]),mn=w(w(mn+w(Xt(k,0,Sr)))-Wl),Wl=w(Ru(Ze,Wl)),mn=w(Ru(ye,mn)),ye=mn,Ze=Wl,n=w(Ru(n,w(Wl+mn)))}while(0);if(k=K+1|0,k>>>0>>0)K=k;else{K=k;break}}else Ze=w(0),n=w(0),K=I;while(0);if(ft=w(Me+n),r=Te,Te=w(Te+ft),I>>>0>>0){Ge=w(r+Ze),k=I;do{I=t[(t[ds>>2]|0)+(k<<2)>>2]|0;e:do if((t[I+36>>2]|0)!=1?(t[I+24>>2]|0)==0:0)switch(eo(e,I)|0){case 1:{mn=w(r+w(zi(I,Bn,Sr))),T[I+400+(t[Zt>>2]<<2)>>2]=mn;break e}case 3:{mn=w(w(Te-w(Oo(I,Bn,Sr)))-w(T[I+908+(t[Br>>2]<<2)>>2])),T[I+400+(t[Zt>>2]<<2)>>2]=mn;break e}case 2:{mn=w(r+w(w(ft-w(T[I+908+(t[Br>>2]<<2)>>2]))*w(.5))),T[I+400+(t[Zt>>2]<<2)>>2]=mn;break e}case 4:{if(mn=w(r+w(zi(I,Bn,Sr))),T[I+400+(t[Zt>>2]<<2)>>2]=mn,Wu(I,Bn,vu)|0||(Bu?(ye=w(T[I+908>>2]),n=w(ye+w(Xt(I,Or,Sr))),Ze=ft):(Ze=w(T[I+912>>2]),Ze=w(Ze+w(Xt(I,Bn,Sr))),n=ft,ye=w(T[I+908>>2])),Ci(n,ye)|0?Ci(Ze,w(T[I+912>>2]))|0:0))break e;Kt(I,n,Ze,Dl,1,1,Sr,fs,1,3501,L)|0;break e}case 5:{T[I+404>>2]=w(w(Ge-w(yt(I)))+w(ie(I,0,vu)));break e}default:break e}while(0);k=k+1|0}while((k|0)!=(K|0))}if(Be=Be+1|0,(Be|0)==(s|0))break;I=K}}}while(0);if(T[e+908>>2]=w(Kn(e,2,Qf,h,h)),T[e+912>>2]=w(Kn(e,0,z1,D,h)),((af|0)!=0?(H1=t[e+32>>2]|0,q1=(af|0)==2,!(q1&(H1|0)!=2)):0)?q1&(H1|0)==2&&(n=w(Jf+Ln),n=w(Ru(w(Qp(n,w(Jt(e,Or,Xf,cs)))),Jf)),vi=198):(n=w(Kn(e,Or,Xf,cs,h)),vi=198),(vi|0)==198&&(T[e+908+(t[976+(Or<<2)>>2]<<2)>>2]=n),((ff|0)!=0?(V1=t[e+32>>2]|0,G1=(ff|0)==2,!(G1&(V1|0)!=2)):0)?G1&(V1|0)==2&&(n=w(Vl+vu),n=w(Ru(w(Qp(n,w(Jt(e,Bn,w(Vl+El),Zf)))),Vl)),vi=204):(n=w(Kn(e,Bn,w(Vl+El),Zf,h)),vi=204),(vi|0)==204&&(T[e+908+(t[976+(Bn<<2)>>2]<<2)>>2]=n),S){if((t[W1>>2]|0)==2){I=976+(Bn<<2)|0,K=1040+(Bn<<2)|0,k=0;do Be=Ti(e,k)|0,t[Be+24>>2]|0||(Y1=t[I>>2]|0,mn=w(T[e+908+(Y1<<2)>>2]),fo=Be+400+(t[K>>2]<<2)|0,mn=w(mn-w(T[fo>>2])),T[fo>>2]=w(mn-w(T[Be+908+(Y1<<2)>>2]))),k=k+1|0;while((k|0)!=(Gl|0))}if(u|0){k=Bu?af:l;do On(e,u,Sr,k,fs,Dl,L),u=t[u+960>>2]|0;while((u|0)!=0)}if(k=(Or|2|0)==3,I=(Bn|2|0)==3,k|I){u=0;do K=t[(t[ds>>2]|0)+(u<<2)>>2]|0,(t[K+36>>2]|0)!=1&&(k&&Sn(e,K,Or),I&&Sn(e,K,Bn)),u=u+1|0;while((u|0)!=(Gl|0))}}}while(0);m=cf}function Ju(e,n){e=e|0,n=w(n);var r=0;Cn(e,n>=w(0),3147),r=n==w(0),T[e+4>>2]=r?w(0):n}function ti(e,n,r,u){e=e|0,n=w(n),r=w(r),u=u|0;var l=Tt,s=Tt,h=0,D=0,S=0;t[2278]=(t[2278]|0)+1,Jr(e),Wu(e,2,n)|0?(l=w(Rn(t[e+992>>2]|0,n)),S=1,l=w(l+w(Xt(e,2,n)))):(l=w(Rn(e+380|0,n)),l>=w(0)?S=2:(S=((Le(n)|0)^1)&1,l=n)),Wu(e,0,r)|0?(s=w(Rn(t[e+996>>2]|0,r)),D=1,s=w(s+w(Xt(e,0,n)))):(s=w(Rn(e+388|0,r)),s>=w(0)?D=2:(D=((Le(r)|0)^1)&1,s=r)),h=e+976|0,(Kt(e,l,s,u,S,D,n,r,1,3189,t[h>>2]|0)|0?(Ro(e,t[e+496>>2]|0,n,r,n),Fu(e,w(T[(t[h>>2]|0)+4>>2]),w(0),w(0)),c[11696]|0):0)&&yf(e,7)}function Jr(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0;D=m,m=m+32|0,h=D+24|0,s=D+16|0,u=D+8|0,l=D,r=0;do n=e+380+(r<<3)|0,((t[e+380+(r<<3)+4>>2]|0)!=0?(S=n,L=t[S+4>>2]|0,k=u,t[k>>2]=t[S>>2],t[k+4>>2]=L,k=e+364+(r<<3)|0,L=t[k+4>>2]|0,S=l,t[S>>2]=t[k>>2],t[S+4>>2]=L,t[s>>2]=t[u>>2],t[s+4>>2]=t[u+4>>2],t[h>>2]=t[l>>2],t[h+4>>2]=t[l+4>>2],Bi(s,h)|0):0)||(n=e+348+(r<<3)|0),t[e+992+(r<<2)>>2]=n,r=r+1|0;while((r|0)!=2);m=D}function Wu(e,n,r){e=e|0,n=n|0,r=w(r);var u=0;switch(e=t[e+992+(t[976+(n<<2)>>2]<<2)>>2]|0,t[e+4>>2]|0){case 0:case 3:{e=0;break}case 1:{w(T[e>>2])>2])>2]|0){case 2:{n=w(w(w(T[e>>2])*n)/w(100));break}case 1:{n=w(T[e>>2]);break}default:n=w(re)}return w(n)}function Ro(e,n,r,u,l){e=e|0,n=n|0,r=w(r),u=w(u),l=w(l);var s=0,h=Tt;n=t[e+944>>2]|0?n:1,s=Uo(t[e+4>>2]|0,n)|0,n=_f(s,n)|0,r=w(Ar(e,s,r)),u=w(Ar(e,n,u)),h=w(r+w(zi(e,s,l))),T[e+400+(t[1040+(s<<2)>>2]<<2)>>2]=h,r=w(r+w(Oo(e,s,l))),T[e+400+(t[1e3+(s<<2)>>2]<<2)>>2]=r,r=w(u+w(zi(e,n,l))),T[e+400+(t[1040+(n<<2)>>2]<<2)>>2]=r,l=w(u+w(Oo(e,n,l))),T[e+400+(t[1e3+(n<<2)>>2]<<2)>>2]=l}function Fu(e,n,r,u){e=e|0,n=w(n),r=w(r),u=w(u);var l=0,s=0,h=Tt,D=Tt,S=0,L=0,k=Tt,I=0,K=Tt,Be=Tt,Te=Tt,ye=Tt;if(n!=w(0)&&(l=e+400|0,ye=w(T[l>>2]),s=e+404|0,Te=w(T[s>>2]),I=e+416|0,Be=w(T[I>>2]),L=e+420|0,h=w(T[L>>2]),K=w(ye+r),k=w(Te+u),u=w(K+Be),D=w(k+h),S=(t[e+988>>2]|0)==1,T[l>>2]=w(t0(ye,n,0,S)),T[s>>2]=w(t0(Te,n,0,S)),r=w(QE(w(Be*n),w(1))),Ci(r,w(0))|0?s=0:s=(Ci(r,w(1))|0)^1,r=w(QE(w(h*n),w(1))),Ci(r,w(0))|0?l=0:l=(Ci(r,w(1))|0)^1,ye=w(t0(u,n,S&s,S&(s^1))),T[I>>2]=w(ye-w(t0(K,n,0,S))),ye=w(t0(D,n,S&l,S&(l^1))),T[L>>2]=w(ye-w(t0(k,n,0,S))),s=(t[e+952>>2]|0)-(t[e+948>>2]|0)>>2,s|0)){l=0;do Fu(Ti(e,l)|0,n,K,k),l=l+1|0;while((l|0)!=(s|0))}}function li(e,n,r,u,l){switch(e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,r|0){case 5:case 0:{e=b8(t[489]|0,u,l)|0;break}default:e=JF(u,l)|0}return e|0}function Cl(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;l=m,m=m+16|0,s=l,t[s>>2]=u,Hs(e,0,n,r,s),m=l}function Hs(e,n,r,u,l){if(e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,e=e|0?e:956,iS[t[e+8>>2]&1](e,n,r,u,l)|0,(r|0)==5)$n();else return}function Vu(e,n,r){e=e|0,n=n|0,r=r|0,c[e+n>>0]=r&1}function aa(e,n){e=e|0,n=n|0;var r=0,u=0;t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,r=n+4|0,u=(t[r>>2]|0)-(t[n>>2]|0)>>2,u|0&&(Xi(e,u),qs(e,t[n>>2]|0,t[r>>2]|0,u))}function Xi(e,n){e=e|0,n=n|0;var r=0;if((Ao(e)|0)>>>0>>0&&hi(e),n>>>0>1073741823)$n();else{r=pn(n<<2)|0,t[e+4>>2]=r,t[e>>2]=r,t[e+8>>2]=r+(n<<2);return}}function qs(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,u=e+4|0,e=r-n|0,(e|0)>0&&(gr(t[u>>2]|0,n|0,e|0)|0,t[u>>2]=(t[u>>2]|0)+(e>>>2<<2))}function Ao(e){return e=e|0,1073741823}function zi(e,n,r){return e=e|0,n=n|0,r=w(r),(Hi(n)|0?(t[e+96>>2]|0)!=0:0)?e=e+92|0:e=ht(e+60|0,t[1040+(n<<2)>>2]|0,992)|0,w(il(e,r))}function Oo(e,n,r){return e=e|0,n=n|0,r=w(r),(Hi(n)|0?(t[e+104>>2]|0)!=0:0)?e=e+100|0:e=ht(e+60|0,t[1e3+(n<<2)>>2]|0,992)|0,w(il(e,r))}function Hi(e){return e=e|0,(e|1|0)==3|0}function il(e,n){return e=e|0,n=w(n),(t[e+4>>2]|0)==3?n=w(0):n=w(Rn(e,n)),w(n)}function xl(e,n){return e=e|0,n=n|0,e=t[e>>2]|0,((e|0)==0?(n|0)>1?n:1:e)|0}function Uo(e,n){e=e|0,n=n|0;var r=0;e:do if((n|0)==2){switch(e|0){case 2:{e=3;break e}case 3:break;default:{r=4;break e}}e=2}else r=4;while(0);return e|0}function Mo(e,n){e=e|0,n=n|0;var r=Tt;return((Hi(n)|0?(t[e+312>>2]|0)!=0:0)?(r=w(T[e+308>>2]),r>=w(0)):0)||(r=w(Ru(w(T[(ht(e+276|0,t[1040+(n<<2)>>2]|0,992)|0)>>2]),w(0)))),w(r)}function v0(e,n){e=e|0,n=n|0;var r=Tt;return((Hi(n)|0?(t[e+320>>2]|0)!=0:0)?(r=w(T[e+316>>2]),r>=w(0)):0)||(r=w(Ru(w(T[(ht(e+276|0,t[1e3+(n<<2)>>2]|0,992)|0)>>2]),w(0)))),w(r)}function Pu(e,n,r){e=e|0,n=n|0,r=w(r);var u=Tt;return((Hi(n)|0?(t[e+240>>2]|0)!=0:0)?(u=w(Rn(e+236|0,r)),u>=w(0)):0)||(u=w(Ru(w(Rn(ht(e+204|0,t[1040+(n<<2)>>2]|0,992)|0,r)),w(0)))),w(u)}function Zu(e,n,r){e=e|0,n=n|0,r=w(r);var u=Tt;return((Hi(n)|0?(t[e+248>>2]|0)!=0:0)?(u=w(Rn(e+244|0,r)),u>=w(0)):0)||(u=w(Ru(w(Rn(ht(e+204|0,t[1e3+(n<<2)>>2]|0,992)|0,r)),w(0)))),w(u)}function ts(e,n,r,u,l,s,h){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=w(s),h=w(h);var D=Tt,S=Tt,L=Tt,k=Tt,I=Tt,K=Tt,Be=0,Te=0,ye=0;ye=m,m=m+16|0,Be=ye,Te=e+964|0,qu(e,(t[Te>>2]|0)!=0,3519),D=w(Rr(e,2,n)),S=w(Rr(e,0,n)),L=w(Xt(e,2,n)),k=w(Xt(e,0,n)),Le(n)|0?I=n:I=w(Ru(w(0),w(w(n-L)-D))),Le(r)|0?K=r:K=w(Ru(w(0),w(w(r-k)-S))),(u|0)==1&(l|0)==1?(T[e+908>>2]=w(Kn(e,2,w(n-L),s,s)),n=w(Kn(e,0,w(r-k),h,s))):(uS[t[Te>>2]&1](Be,e,I,u,K,l),I=w(D+w(T[Be>>2])),K=w(n-L),T[e+908>>2]=w(Kn(e,2,(u|2|0)==2?I:K,s,s)),K=w(S+w(T[Be+4>>2])),n=w(r-k),n=w(Kn(e,0,(l|2|0)==2?K:n,h,s))),T[e+912>>2]=n,m=ye}function Es(e,n,r,u,l,s,h){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=w(s),h=w(h);var D=Tt,S=Tt,L=Tt,k=Tt;L=w(Rr(e,2,s)),D=w(Rr(e,0,s)),k=w(Xt(e,2,s)),S=w(Xt(e,0,s)),n=w(n-k),T[e+908>>2]=w(Kn(e,2,(u|2|0)==2?L:n,s,s)),r=w(r-S),T[e+912>>2]=w(Kn(e,0,(l|2|0)==2?D:r,h,s))}function fa(e,n,r,u,l,s,h){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=w(s),h=w(h);var D=0,S=Tt,L=Tt;return D=(u|0)==2,((n<=w(0)&D?0:!(r<=w(0)&(l|0)==2))?!((u|0)==1&(l|0)==1):0)?e=0:(S=w(Xt(e,0,s)),L=w(Xt(e,2,s)),D=n>2]=w(Kn(e,2,D?w(0):n,s,s)),n=w(r-S),D=r>2]=w(Kn(e,0,D?w(0):n,h,s)),e=1),e|0}function _f(e,n){return e=e|0,n=n|0,_n(e)|0?e=Uo(2,n)|0:e=0,e|0}function $u(e,n,r){return e=e|0,n=n|0,r=w(r),r=w(Pu(e,n,r)),w(r+w(Mo(e,n)))}function Ds(e,n,r){return e=e|0,n=n|0,r=w(r),r=w(Zu(e,n,r)),w(r+w(v0(e,n)))}function Rr(e,n,r){e=e|0,n=n|0,r=w(r);var u=Tt;return u=w($u(e,n,r)),w(u+w(Ds(e,n,r)))}function r0(e){return e=e|0,t[e+24>>2]|0?e=0:w(nu(e))!=w(0)?e=1:e=w(cu(e))!=w(0),e|0}function nu(e){e=e|0;var n=Tt;if(t[e+944>>2]|0){if(n=w(T[e+44>>2]),Le(n)|0)return n=w(T[e+40>>2]),e=n>w(0)&((Le(n)|0)^1),w(e?n:w(0))}else n=w(0);return w(n)}function cu(e){e=e|0;var n=Tt,r=0,u=Tt;do if(t[e+944>>2]|0){if(n=w(T[e+48>>2]),Le(n)|0){if(r=c[(t[e+976>>2]|0)+2>>0]|0,r<<24>>24==0?(u=w(T[e+40>>2]),u>24?w(1):w(0)}}else n=w(0);while(0);return w(n)}function Ni(e){e=e|0;var n=0,r=0;if(jv(e+400|0,0,540)|0,c[e+985>>0]=1,ys(e),r=Su(e)|0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n>>2]=2,Be=2,Te=r),(((K|0)==2&ft?0:Le(I)|0)?!(Le(l)|0):0)&&(T[In>>2]=l,t[_r>>2]=2,k=2,I=l),ye=w(T[n+396>>2]),Ze=Le(ye)|0;do if(Ze)K=Be;else{if((Be|0)==1&ft){T[In>>2]=w(w(Te-Ge)/ye),t[_r>>2]=1,k=1,K=1;break}Pe&(k|0)==1?(T[Br>>2]=w(ye*w(I-Me)),t[gn>>2]=1,k=1,K=1):K=Be}while(0);ls=Le(r)|0,Be=(eo(e,n)|0)!=4,(Pe|Zt|((u|0)!=1|ls)|(Be|(K|0)==1)?0:(T[Br>>2]=r,t[gn>>2]=1,!Ze))&&(T[In>>2]=w(w(r-Ge)/ye),t[_r>>2]=1,k=1),(Pr|ft|((D|0)!=1|(Le(l)|0))|(Be|(k|0)==1)?0:(T[In>>2]=l,t[_r>>2]=1,!Ze))&&(T[Br>>2]=w(ye*w(l-Me)),t[gn>>2]=1),Fn(n,2,s,s,gn,Br),Fn(n,0,h,s,_r,In),r=w(T[Br>>2]),l=w(T[In>>2]),Kt(n,r,l,S,t[gn>>2]|0,t[_r>>2]|0,s,h,0,3565,L)|0,h=w(T[n+908+(t[976+(Ln<<2)>>2]<<2)>>2]),T[n+504>>2]=w(Ru(h,w(Rr(n,Ln,s))))}while(0);t[n+500>>2]=t[2278],m=uu}function Kn(e,n,r,u,l){return e=e|0,n=n|0,r=w(r),u=w(u),l=w(l),u=w(Jt(e,n,r,u)),w(Ru(u,w(Rr(e,n,l))))}function eo(e,n){return e=e|0,n=n|0,n=n+20|0,n=t[((t[n>>2]|0)==0?e+16|0:n)>>2]|0,((n|0)==5?_n(t[e+4>>2]|0)|0:0)&&(n=1),n|0}function Eo(e,n){return e=e|0,n=n|0,(Hi(n)|0?(t[e+96>>2]|0)!=0:0)?n=4:n=t[1040+(n<<2)>>2]|0,e+60+(n<<3)|0}function Do(e,n){return e=e|0,n=n|0,(Hi(n)|0?(t[e+104>>2]|0)!=0:0)?n=5:n=t[1e3+(n<<2)>>2]|0,e+60+(n<<3)|0}function Fn(e,n,r,u,l,s){switch(e=e|0,n=n|0,r=w(r),u=w(u),l=l|0,s=s|0,r=w(Rn(e+380+(t[976+(n<<2)>>2]<<3)|0,r)),r=w(r+w(Xt(e,n,u))),t[l>>2]|0){case 2:case 1:{l=Le(r)|0,u=w(T[s>>2]),T[s>>2]=l|u>2]=2,T[s>>2]=r);break}default:}}function ae(e,n){return e=e|0,n=n|0,e=e+132|0,(Hi(n)|0?(t[(ht(e,4,948)|0)+4>>2]|0)!=0:0)?e=1:e=(t[(ht(e,t[1040+(n<<2)>>2]|0,948)|0)+4>>2]|0)!=0,e|0}function ie(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0;return e=e+132|0,(Hi(n)|0?(u=ht(e,4,948)|0,(t[u+4>>2]|0)!=0):0)?l=4:(u=ht(e,t[1040+(n<<2)>>2]|0,948)|0,t[u+4>>2]|0?l=4:r=w(0)),(l|0)==4&&(r=w(Rn(u,r))),w(r)}function Fe(e,n,r){e=e|0,n=n|0,r=w(r);var u=Tt;return u=w(T[e+908+(t[976+(n<<2)>>2]<<2)>>2]),u=w(u+w(zi(e,n,r))),w(u+w(Oo(e,n,r)))}function Oe(e){e=e|0;var n=0,r=0,u=0;e:do if(_n(t[e+4>>2]|0)|0)n=0;else if((t[e+16>>2]|0)!=5)if(r=Su(e)|0,!r)n=0;else for(n=0;;){if(u=Ti(e,n)|0,(t[u+24>>2]|0)==0?(t[u+20>>2]|0)==5:0){n=1;break e}if(n=n+1|0,n>>>0>=r>>>0){n=0;break}}else n=1;while(0);return n|0}function st(e,n){e=e|0,n=n|0;var r=Tt;return r=w(T[e+908+(t[976+(n<<2)>>2]<<2)>>2]),r>=w(0)&((Le(r)|0)^1)|0}function yt(e){e=e|0;var n=Tt,r=0,u=0,l=0,s=0,h=0,D=0,S=Tt;if(r=t[e+968>>2]|0,r)S=w(T[e+908>>2]),n=w(T[e+912>>2]),n=w(eS[r&0](e,S,n)),qu(e,(Le(n)|0)^1,3573);else{s=Su(e)|0;do if(s|0){for(r=0,l=0;;){if(u=Ti(e,l)|0,t[u+940>>2]|0){h=8;break}if((t[u+24>>2]|0)!=1)if(D=(eo(e,u)|0)==5,D){r=u;break}else r=(r|0)==0?u:r;if(l=l+1|0,l>>>0>=s>>>0){h=8;break}}if((h|0)==8&&!r)break;return n=w(yt(r)),w(n+w(T[r+404>>2]))}while(0);n=w(T[e+912>>2])}return w(n)}function Jt(e,n,r,u){e=e|0,n=n|0,r=w(r),u=w(u);var l=Tt,s=0;return _n(n)|0?(n=1,s=3):Hi(n)|0?(n=0,s=3):(u=w(re),l=w(re)),(s|0)==3&&(l=w(Rn(e+364+(n<<3)|0,u)),u=w(Rn(e+380+(n<<3)|0,u))),s=u=w(0)&((Le(u)|0)^1)),r=s?u:r,s=l>=w(0)&((Le(l)|0)^1)&r>2]|0,s)|0,Te=_f(Ze,s)|0,ye=Hi(Ze)|0,I=w(Xt(n,2,r)),K=w(Xt(n,0,r)),Wu(n,2,r)|0?D=w(I+w(Rn(t[n+992>>2]|0,r))):(ae(n,2)|0?Bt(n,2)|0:0)?(D=w(T[e+908>>2]),S=w(Mo(e,2)),S=w(D-w(S+w(v0(e,2)))),D=w(ie(n,2,r)),D=w(Kn(n,2,w(S-w(D+w(Fi(n,2,r)))),r,r))):D=w(re),Wu(n,0,l)|0?S=w(K+w(Rn(t[n+996>>2]|0,l))):(ae(n,0)|0?Bt(n,0)|0:0)?(S=w(T[e+912>>2]),ft=w(Mo(e,0)),ft=w(S-w(ft+w(v0(e,0)))),S=w(ie(n,0,l)),S=w(Kn(n,0,w(ft-w(S+w(Fi(n,0,l)))),l,r))):S=w(re),L=Le(D)|0,k=Le(S)|0;do if(L^k?(Be=w(T[n+396>>2]),!(Le(Be)|0)):0)if(L){D=w(I+w(w(S-K)*Be));break}else{ft=w(K+w(w(D-I)/Be)),S=k?ft:S;break}while(0);k=Le(D)|0,L=Le(S)|0,k|L&&(Me=(k^1)&1,u=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me<<2)>>2]))*w(.5)),T[n+400+(t[1040+(Te<<2)>>2]<<2)>>2]=ft;break}Me=(eo(e,n)|0)==3,Me^(t[e+28>>2]|0)==2&&(Me=t[976+(Te<<2)>>2]|0,ft=w(T[e+908+(Me<<2)>>2]),ft=w(ft-w(T[n+908+(Me<<2)>>2])),T[n+400+(t[1040+(Te<<2)>>2]<<2)>>2]=ft)}while(0)}function Sn(e,n,r){e=e|0,n=n|0,r=r|0;var u=Tt,l=0;l=t[976+(r<<2)>>2]|0,u=w(T[n+908+(l<<2)>>2]),u=w(w(T[e+908+(l<<2)>>2])-u),u=w(u-w(T[n+400+(t[1040+(r<<2)>>2]<<2)>>2])),T[n+400+(t[1e3+(r<<2)>>2]<<2)>>2]=u}function _n(e){return e=e|0,(e|1|0)==1|0}function Tn(e){e=e|0;var n=Tt;switch(t[e+56>>2]|0){case 0:case 3:{n=w(T[e+40>>2]),n>w(0)&((Le(n)|0)^1)?e=c[(t[e+976>>2]|0)+2>>0]|0?1056:992:e=1056;break}default:e=e+52|0}return e|0}function ir(e,n){return e=e|0,n=n|0,(c[e+n>>0]|0)!=0|0}function Bt(e,n){return e=e|0,n=n|0,e=e+132|0,(Hi(n)|0?(t[(ht(e,5,948)|0)+4>>2]|0)!=0:0)?e=1:e=(t[(ht(e,t[1e3+(n<<2)>>2]|0,948)|0)+4>>2]|0)!=0,e|0}function Fi(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0;return e=e+132|0,(Hi(n)|0?(u=ht(e,5,948)|0,(t[u+4>>2]|0)!=0):0)?l=4:(u=ht(e,t[1e3+(n<<2)>>2]|0,948)|0,t[u+4>>2]|0?l=4:r=w(0)),(l|0)==4&&(r=w(Rn(u,r))),w(r)}function Ar(e,n,r){return e=e|0,n=n|0,r=w(r),ae(e,n)|0?r=w(ie(e,n,r)):r=w(-w(Fi(e,n,r))),w(r)}function mr(e){return e=w(e),T[q>>2]=e,t[q>>2]|0|0}function Y(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>1073741823)$n();else{l=pn(n<<2)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<2)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<2)}function ri(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>2)<<2)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function ii(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-4-n|0)>>>2)<<2)),e=t[e>>2]|0,e|0&&_t(e)}function Vr(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;if(h=e+4|0,D=t[h>>2]|0,l=D-u|0,s=l>>2,e=n+(s<<2)|0,e>>>0>>0){u=D;do t[u>>2]=t[e>>2],e=e+4|0,u=(t[h>>2]|0)+4|0,t[h>>2]=u;while(e>>>0>>0)}s|0&&ky(D+(0-s<<2)|0,n|0,l|0)|0}function at(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0;return D=n+4|0,S=t[D>>2]|0,l=t[e>>2]|0,h=r,s=h-l|0,u=S+(0-(s>>2)<<2)|0,t[D>>2]=u,(s|0)>0&&gr(u|0,l|0,s|0)|0,l=e+4|0,s=n+8|0,u=(t[l>>2]|0)-h|0,(u|0)>0&&(gr(t[s>>2]|0,r|0,u|0)|0,t[s>>2]=(t[s>>2]|0)+(u>>>2<<2)),h=t[e>>2]|0,t[e>>2]=t[D>>2],t[D>>2]=h,h=t[l>>2]|0,t[l>>2]=t[s>>2],t[s>>2]=h,h=e+8|0,r=n+12|0,e=t[h>>2]|0,t[h>>2]=t[r>>2],t[r>>2]=e,t[n>>2]=t[D>>2],S|0}function Di(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;if(h=t[n>>2]|0,s=t[r>>2]|0,(h|0)!=(s|0)){l=e+8|0,r=((s+-4-h|0)>>>2)+1|0,e=h,u=t[l>>2]|0;do t[u>>2]=t[e>>2],u=(t[l>>2]|0)+4|0,t[l>>2]=u,e=e+4|0;while((e|0)!=(s|0));t[n>>2]=h+(r<<2)}}function ru(){Se()}function wo(){var e=0;return e=pn(4)|0,Un(e),e|0}function Un(e){e=e|0,t[e>>2]=yo()|0}function to(e){e=e|0,e|0&&(i0(e),_t(e))}function i0(e){e=e|0,Zo(t[e>>2]|0)}function m0(e,n,r){e=e|0,n=n|0,r=r|0,Vu(t[e>>2]|0,n,r)}function no(e,n){e=e|0,n=w(n),Ju(t[e>>2]|0,n)}function j0(e,n){return e=e|0,n=n|0,ir(t[e>>2]|0,n)|0}function u0(){var e=0;return e=pn(8)|0,Ua(e,0),e|0}function Ua(e,n){e=e|0,n=n|0,n?n=Yn(t[n>>2]|0)|0:n=cr()|0,t[e>>2]=n,t[e+4>>2]=0,Ba(n,e)}function Ef(e){e=e|0;var n=0;return n=pn(8)|0,Ua(n,e),n|0}function cc(e){e=e|0,e|0&&(ws(e),_t(e))}function ws(e){e=e|0;var n=0;zu(t[e>>2]|0),n=e+4|0,e=t[n>>2]|0,t[n>>2]=0,e|0&&(ca(e),_t(e))}function ca(e){e=e|0,jo(e)}function jo(e){e=e|0,e=t[e>>2]|0,e|0&&qr(e|0)}function dc(e){return e=e|0,Us(e)|0}function ja(e){e=e|0;var n=0,r=0;r=e+4|0,n=t[r>>2]|0,t[r>>2]=0,n|0&&(ca(n),_t(n)),p0(t[e>>2]|0)}function D2(e,n){e=e|0,n=n|0,la(t[e>>2]|0,t[n>>2]|0)}function rd(e,n){e=e|0,n=n|0,Z(t[e>>2]|0,n)}function id(e,n,r){e=e|0,n=n|0,r=+r,dr(t[e>>2]|0,n,w(r))}function y0(e,n,r){e=e|0,n=n|0,r=+r,er(t[e>>2]|0,n,w(r))}function qc(e,n){e=e|0,n=n|0,z(t[e>>2]|0,n)}function Rl(e,n){e=e|0,n=n|0,$(t[e>>2]|0,n)}function ul(e,n){e=e|0,n=n|0,Ee(t[e>>2]|0,n)}function w2(e,n){e=e|0,n=n|0,go(t[e>>2]|0,n)}function Ws(e,n){e=e|0,n=n|0,Je(t[e>>2]|0,n)}function Al(e,n){e=e|0,n=n|0,ji(t[e>>2]|0,n)}function ud(e,n,r){e=e|0,n=n|0,r=+r,An(t[e>>2]|0,n,w(r))}function z0(e,n,r){e=e|0,n=n|0,r=+r,Lr(t[e>>2]|0,n,w(r))}function za(e,n){e=e|0,n=n|0,Nr(t[e>>2]|0,n)}function Ha(e,n){e=e|0,n=n|0,oe(t[e>>2]|0,n)}function qa(e,n){e=e|0,n=n|0,it(t[e>>2]|0,n)}function da(e,n){e=e|0,n=+n,Mt(t[e>>2]|0,w(n))}function Ss(e,n){e=e|0,n=+n,rn(t[e>>2]|0,w(n))}function Ts(e,n){e=e|0,n=+n,Ft(t[e>>2]|0,w(n))}function ns(e,n){e=e|0,n=+n,It(t[e>>2]|0,w(n))}function H0(e,n){e=e|0,n=+n,sn(t[e>>2]|0,w(n))}function Df(e,n){e=e|0,n=+n,fn(t[e>>2]|0,w(n))}function ol(e,n){e=e|0,n=+n,Jn(t[e>>2]|0,w(n))}function Gu(e){e=e|0,wr(t[e>>2]|0)}function Wa(e,n){e=e|0,n=+n,Lu(t[e>>2]|0,w(n))}function ro(e,n){e=e|0,n=+n,Co(t[e>>2]|0,w(n))}function zo(e){e=e|0,$o(t[e>>2]|0)}function wf(e,n){e=e|0,n=+n,_i(t[e>>2]|0,w(n))}function Wc(e,n){e=e|0,n=+n,P0(t[e>>2]|0,w(n))}function pc(e,n){e=e|0,n=+n,vf(t[e>>2]|0,w(n))}function Ol(e,n){e=e|0,n=+n,Tl(t[e>>2]|0,w(n))}function Cs(e,n){e=e|0,n=+n,I0(t[e>>2]|0,w(n))}function pa(e,n){e=e|0,n=+n,gs(t[e>>2]|0,w(n))}function od(e,n){e=e|0,n=+n,b0(t[e>>2]|0,w(n))}function ha(e,n){e=e|0,n=+n,B0(t[e>>2]|0,w(n))}function hc(e,n){e=e|0,n=+n,Qu(t[e>>2]|0,w(n))}function Vc(e,n,r){e=e|0,n=n|0,r=+r,Pt(t[e>>2]|0,n,w(r))}function qi(e,n,r){e=e|0,n=n|0,r=+r,ut(t[e>>2]|0,n,w(r))}function g(e,n,r){e=e|0,n=n|0,r=+r,Dt(t[e>>2]|0,n,w(r))}function y(e){return e=e|0,ke(t[e>>2]|0)|0}function R(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,Cr(l,t[n>>2]|0,r),F(e,l),m=u}function F(e,n){e=e|0,n=n|0,b(e,t[n+4>>2]|0,+w(T[n>>2]))}function b(e,n,r){e=e|0,n=n|0,r=+r,t[e>>2]=n,B[e+8>>3]=r}function J(e){return e=e|0,G(t[e>>2]|0)|0}function de(e){return e=e|0,Ce(t[e>>2]|0)|0}function gt(e){return e=e|0,Ae(t[e>>2]|0)|0}function xt(e){return e=e|0,js(t[e>>2]|0)|0}function Lt(e){return e=e|0,mt(t[e>>2]|0)|0}function xr(e){return e=e|0,U(t[e>>2]|0)|0}function io(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,_o(l,t[n>>2]|0,r),F(e,l),m=u}function du(e){return e=e|0,We(t[e>>2]|0)|0}function Ho(e){return e=e|0,Ct(t[e>>2]|0)|0}function Ml(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,Dn(u,t[n>>2]|0),F(e,u),m=r}function uo(e){return e=e|0,+ +w(hf(t[e>>2]|0))}function Ve(e){return e=e|0,+ +w(Bs(t[e>>2]|0))}function ze(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,fu(u,t[n>>2]|0),F(e,u),m=r}function lt(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,Nu(u,t[n>>2]|0),F(e,u),m=r}function $t(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,rl(u,t[n>>2]|0),F(e,u),m=r}function Wn(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,mf(u,t[n>>2]|0),F(e,u),m=r}function si(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,zs(u,t[n>>2]|0),F(e,u),m=r}function ur(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,_s(u,t[n>>2]|0),F(e,u),m=r}function ci(e){return e=e|0,+ +w(Tu(t[e>>2]|0))}function Qi(e,n){return e=e|0,n=n|0,+ +w(un(t[e>>2]|0,n))}function Gr(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,et(l,t[n>>2]|0,r),F(e,l),m=u}function Cu(e,n,r){e=e|0,n=n|0,r=r|0,ba(t[e>>2]|0,t[n>>2]|0,r)}function Va(e,n){e=e|0,n=n|0,ku(t[e>>2]|0,t[n>>2]|0)}function Ga(e){return e=e|0,Su(t[e>>2]|0)|0}function ld(e){return e=e|0,e=fi(t[e>>2]|0)|0,e?e=dc(e)|0:e=0,e|0}function S2(e,n){return e=e|0,n=n|0,e=Ti(t[e>>2]|0,n)|0,e?e=dc(e)|0:e=0,e|0}function T2(e,n){e=e|0,n=n|0;var r=0,u=0;u=pn(4)|0,Sf(u,n),r=e+4|0,n=t[r>>2]|0,t[r>>2]=u,n|0&&(ca(n),_t(n)),oa(t[e>>2]|0,1)}function Sf(e,n){e=e|0,n=n|0,sl(e,n)}function sd(e,n,r,u,l,s){e=e|0,n=n|0,r=w(r),u=u|0,l=w(l),s=s|0;var h=0,D=0;h=m,m=m+16|0,D=h,hh(D,Us(n)|0,+r,u,+l,s),T[e>>2]=w(+B[D>>3]),T[e+4>>2]=w(+B[D+8>>3]),m=h}function hh(e,n,r,u,l,s){e=e|0,n=n|0,r=+r,u=u|0,l=+l,s=s|0;var h=0,D=0,S=0,L=0,k=0;h=m,m=m+32|0,k=h+8|0,L=h+20|0,S=h,D=h+16|0,B[k>>3]=r,t[L>>2]=u,B[S>>3]=l,t[D>>2]=s,Gc(e,t[n+4>>2]|0,k,L,S,D),m=h}function Gc(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0;h=m,m=m+16|0,D=h,ka(D),n=g0(n)|0,vh(e,n,+B[r>>3],t[u>>2]|0,+B[l>>3],t[s>>2]|0),La(D),m=h}function g0(e){return e=e|0,t[e>>2]|0}function vh(e,n,r,u,l,s){e=e|0,n=n|0,r=+r,u=u|0,l=+l,s=s|0;var h=0;h=_0(mh()|0)|0,r=+kl(r),u=ad(u)|0,l=+kl(l),fd(e,Qr(0,h|0,n|0,+r,u|0,+l,ad(s)|0)|0)}function mh(){var e=0;return c[7608]|0||(Kc(9120),e=7608,t[e>>2]=1,t[e+4>>2]=0),9120}function _0(e){return e=e|0,t[e+8>>2]|0}function kl(e){return e=+e,+ +Ya(e)}function ad(e){return e=e|0,dd(e)|0}function fd(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;l=m,m=m+32|0,r=l,u=n,u&1?(C2(r,0),eu(u|0,r|0)|0,Yc(e,r),Ir(r)):(t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=t[n+8>>2],t[e+12>>2]=t[n+12>>2]),m=l}function C2(e,n){e=e|0,n=n|0,cd(e,n),t[e+8>>2]=0,c[e+24>>0]=0}function Yc(e,n){e=e|0,n=n|0,n=n+8|0,t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=t[n+8>>2],t[e+12>>2]=t[n+12>>2]}function Ir(e){e=e|0,c[e+24>>0]=0}function cd(e,n){e=e|0,n=n|0,t[e>>2]=n}function dd(e){return e=e|0,e|0}function Ya(e){return e=+e,+e}function Kc(e){e=e|0,ll(e,x2()|0,4)}function x2(){return 1064}function ll(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r,t[e+8>>2]=bt(n|0,r+1|0)|0}function sl(e,n){e=e|0,n=n|0,n=t[n>>2]|0,t[e>>2]=n,Ri(n|0)}function yh(e){e=e|0;var n=0,r=0;r=e+4|0,n=t[r>>2]|0,t[r>>2]=0,n|0&&(ca(n),_t(n)),oa(t[e>>2]|0,0)}function Tf(e){e=e|0,$r(t[e>>2]|0)}function Xc(e){return e=e|0,$l(t[e>>2]|0)|0}function R2(e,n,r,u){e=e|0,n=+n,r=+r,u=u|0,ti(t[e>>2]|0,w(n),w(r),u)}function gh(e){return e=e|0,+ +w(Ei(t[e>>2]|0))}function al(e){return e=e|0,+ +w(e0(t[e>>2]|0))}function va(e){return e=e|0,+ +w(xo(t[e>>2]|0))}function A2(e){return e=e|0,+ +w(U0(t[e>>2]|0))}function O2(e){return e=e|0,+ +w(sa(t[e>>2]|0))}function vc(e){return e=e|0,+ +w(es(t[e>>2]|0))}function _h(e,n){e=e|0,n=n|0,B[e>>3]=+w(Ei(t[n>>2]|0)),B[e+8>>3]=+w(e0(t[n>>2]|0)),B[e+16>>3]=+w(xo(t[n>>2]|0)),B[e+24>>3]=+w(U0(t[n>>2]|0)),B[e+32>>3]=+w(sa(t[n>>2]|0)),B[e+40>>3]=+w(es(t[n>>2]|0))}function M2(e,n){return e=e|0,n=n|0,+ +w(tu(t[e>>2]|0,n))}function pd(e,n){return e=e|0,n=n|0,+ +w(ei(t[e>>2]|0,n))}function Qc(e,n){return e=e|0,n=n|0,+ +w(h0(t[e>>2]|0,n))}function Jc(){return Ia()|0}function Vs(){k2(),ma(),Zc(),mc(),yc(),hd()}function k2(){IO(11713,4938,1)}function ma(){tO(10448)}function Zc(){I7(10408)}function mc(){u7(10324)}function yc(){EE(10096)}function hd(){Eh(9132)}function Eh(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0,Be=0,Te=0,ye=0,Ze=0,Ge=0,ft=0,Me=0,Pe=0,Zt=0,Br=0,In=0,gn=0,_r=0,Pr=0,Ln=0,uu=0,ls=0,ss=0,as=0,ta=0,r2=0,i2=0,of=0,u2=0,Pc=0,Ic=0,o2=0,l2=0,s2=0,vi=0,lf=0,a2=0,Kf=0,f2=0,c2=0,bc=0,Bc=0,Xf=0,ql=0,Fa=0,Ns=0,sf=0,b1=0,B1=0,Uc=0,U1=0,j1=0,Wl=0,El=0,af=0,vu=0,z1=0,fs=0,Qf=0,cs=0,Jf=0,H1=0,q1=0,Zf=0,Vl=0,ff=0,W1=0,V1=0,G1=0,Sr=0,Bu=0,Dl=0,ds=0,Gl=0,Or=0,Bn=0,cf=0;n=m,m=m+672|0,r=n+656|0,cf=n+648|0,Bn=n+640|0,Or=n+632|0,Gl=n+624|0,ds=n+616|0,Dl=n+608|0,Bu=n+600|0,Sr=n+592|0,G1=n+584|0,V1=n+576|0,W1=n+568|0,ff=n+560|0,Vl=n+552|0,Zf=n+544|0,q1=n+536|0,H1=n+528|0,Jf=n+520|0,cs=n+512|0,Qf=n+504|0,fs=n+496|0,z1=n+488|0,vu=n+480|0,af=n+472|0,El=n+464|0,Wl=n+456|0,j1=n+448|0,U1=n+440|0,Uc=n+432|0,B1=n+424|0,b1=n+416|0,sf=n+408|0,Ns=n+400|0,Fa=n+392|0,ql=n+384|0,Xf=n+376|0,Bc=n+368|0,bc=n+360|0,c2=n+352|0,f2=n+344|0,Kf=n+336|0,a2=n+328|0,lf=n+320|0,vi=n+312|0,s2=n+304|0,l2=n+296|0,o2=n+288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t[r>>2]=t[h>>2],t[r+4>>2]=t[h+4>>2],vd(e,4754,r)|0,t[s>>2]=2,t[s+4>>2]=0,t[r>>2]=t[s>>2],t[r+4>>2]=t[s+4>>2],gc(e,4772,r)|0,t[l>>2]=3,t[l+4>>2]=0,t[r>>2]=t[l>>2],t[r+4>>2]=t[l+4>>2],gc(e,4790,r)|0,t[u>>2]=4,t[u+4>>2]=0,t[r>>2]=t[u>>2],t[r+4>>2]=t[u+4>>2],gc(e,4808,r)|0,m=n}function Cf(e,n){e=e|0,n=n|0;var r=0;r=uf()|0,t[e>>2]=r,V0(r,n),e2(t[e>>2]|0)}function $c(e,n,r){return e=e|0,n=n|0,r=r|0,Ot(e,Fr(n)|0,r,0),e|0}function Dh(e,n,r){return e=e|0,n=n|0,r=r|0,d(e,Fr(n)|0,r,0),e|0}function am(e,n,r){return e=e|0,n=n|0,r=r|0,hE(e,Fr(n)|0,r,0),e|0}function Gs(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],oE(e,n,l),m=u,e|0}function ya(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],zl(e,n,l),m=u,e|0}function iu(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],p(e,n,l),m=u,e|0}function ko(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Rv(e,n,l),m=u,e|0}function oo(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ny(e,n,l),m=u,e|0}function rs(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Kd(e,n,l),m=u,e|0}function Ka(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Yd(e,n,l),m=u,e|0}function o0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Lo(e,n,l),m=u,e|0}function fl(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Sp(e,n,l),m=u,e|0}function gc(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],bm(e,n,l),m=u,e|0}function L2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],lo(e,n,l),m=u,e|0}function wh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Md(e,n,l),m=u,e|0}function xf(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Am(e,n,l),m=u,e|0}function Rf(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],tp(e,n,l),m=u,e|0}function e1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],y1(e,n,l),m=u,e|0}function Ll(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],$a(e,n,l),m=u,e|0}function t1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],j2(e,n,l),m=u,e|0}function ga(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],P2(e,n,l),m=u,e|0}function vd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],md(e,n,l),m=u,e|0}function md(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Ea(e,r,l,1),m=u}function Fr(e){return e=e|0,e|0}function Ea(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=N2()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=n1(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,yd(s,u)|0,u),m=l}function N2(){var e=0,n=0;if(c[7616]|0||(cl(9136),Vt(24,9136,ve|0)|0,n=7616,t[n>>2]=1,t[n+4>>2]=0),!(sr(9136)|0)){e=9136,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));cl(9136)}return 9136}function n1(e){return e=e|0,0}function yd(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=N2()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Af(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Of(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function wi(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,L=0,k=0,I=0,K=0,Be=0;h=m,m=m+32|0,K=h+24|0,I=h+20|0,S=h+16|0,k=h+12|0,L=h+8|0,D=h+4|0,Be=h,t[I>>2]=n,t[S>>2]=r,t[k>>2]=u,t[L>>2]=l,t[D>>2]=s,s=e+28|0,t[Be>>2]=t[s>>2],t[K>>2]=t[Be>>2],F2(e+24|0,K,I,k,L,S,D)|0,t[s>>2]=t[t[s>>2]>>2],m=h}function F2(e,n,r,u,l,s,h){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0,e=fm(n)|0,n=pn(24)|0,gd(n+4|0,t[r>>2]|0,t[u>>2]|0,t[l>>2]|0,t[s>>2]|0,t[h>>2]|0),t[n>>2]=t[e>>2],t[e>>2]=n,n|0}function fm(e){return e=e|0,t[e>>2]|0}function gd(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,t[e>>2]=n,t[e+4>>2]=r,t[e+8>>2]=u,t[e+12>>2]=l,t[e+16>>2]=s}function hn(e,n){return e=e|0,n=n|0,n|e|0}function Af(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Of(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=cm(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,Mf(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Af(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Sh(e,D),dm(D),m=L;return}}function cm(e){return e=e|0,357913941}function Mf(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Sh(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function dm(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function cl(e){e=e|0,q0(e)}function r1(e){e=e|0,qn(e+24|0)}function sr(e){return e=e|0,t[e>>2]|0}function qn(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function q0(e){e=e|0;var n=0;n=yr()|0,jn(e,2,3,n,Vn()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function yr(){return 9228}function Vn(){return 1140}function dl(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=E0(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=_c(n,u)|0,m=r,n|0}function jn(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,t[e>>2]=n,t[e+4>>2]=r,t[e+8>>2]=u,t[e+12>>2]=l,t[e+16>>2]=s}function E0(e){return e=e|0,(t[(N2()|0)+24>>2]|0)+(e*12|0)|0}function _c(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;return l=m,m=m+48|0,u=l,r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),I1[r&31](u,e),u=l0(u)|0,m=l,u|0}function l0(e){e=e|0;var n=0,r=0,u=0,l=0;return l=m,m=m+32|0,n=l+12|0,r=l,u=Iu(Xa()|0)|0,u?(is(n,u),kf(r,n),Ec(e,r),e=xs(n)|0):e=Dc(e)|0,m=l,e|0}function Xa(){var e=0;return c[7632]|0||(Nf(9184),Vt(25,9184,ve|0)|0,e=7632,t[e>>2]=1,t[e+4>>2]=0),9184}function Iu(e){return e=e|0,t[e+36>>2]|0}function is(e,n){e=e|0,n=n|0,t[e>>2]=n,t[e+4>>2]=e,t[e+8>>2]=0}function kf(e,n){e=e|0,n=n|0,t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=0}function Ec(e,n){e=e|0,n=n|0,s0(n,e,e+8|0,e+16|0,e+24|0,e+32|0,e+40|0)|0}function xs(e){return e=e|0,t[(t[e+4>>2]|0)+8>>2]|0}function Dc(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0;S=m,m=m+16|0,r=S+4|0,u=S,l=Ma(8)|0,s=l,h=pn(48)|0,D=h,n=D+48|0;do t[D>>2]=t[e>>2],D=D+4|0,e=e+4|0;while((D|0)<(n|0));return n=s+4|0,t[n>>2]=h,D=pn(8)|0,h=t[n>>2]|0,t[u>>2]=0,t[r>>2]=t[u>>2],Th(D,h,r),t[l>>2]=D,m=S,s|0}function Th(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=pn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1092,t[r+12>>2]=n,t[e+4>>2]=r}function cn(e){e=e|0,Uv(e),_t(e)}function us(e){e=e|0,e=t[e+12>>2]|0,e|0&&_t(e)}function D0(e){e=e|0,_t(e)}function s0(e,n,r,u,l,s,h){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0,s=Ji(t[e>>2]|0,n,r,u,l,s,h)|0,h=e+4|0,t[(t[h>>2]|0)+8>>2]=s,t[(t[h>>2]|0)+8>>2]|0}function Ji(e,n,r,u,l,s,h){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0;var D=0,S=0;return D=m,m=m+16|0,S=D,ka(S),e=g0(e)|0,h=Yr(e,+B[n>>3],+B[r>>3],+B[u>>3],+B[l>>3],+B[s>>3],+B[h>>3])|0,La(S),m=D,h|0}function Yr(e,n,r,u,l,s,h){e=e|0,n=+n,r=+r,u=+u,l=+l,s=+s,h=+h;var D=0;return D=_0(Lf()|0)|0,n=+kl(n),r=+kl(r),u=+kl(u),l=+kl(l),s=+kl(s),ho(0,D|0,e|0,+n,+r,+u,+l,+s,+ +kl(h))|0}function Lf(){var e=0;return c[7624]|0||(pm(9172),e=7624,t[e>>2]=1,t[e+4>>2]=0),9172}function pm(e){e=e|0,ll(e,Nl()|0,6)}function Nl(){return 1112}function Nf(e){e=e|0,Qa(e)}function Ff(e){e=e|0,_d(e+24|0),Ed(e+16|0)}function _d(e){e=e|0,i1(e)}function Ed(e){e=e|0,wc(e)}function wc(e){e=e|0;var n=0,r=0;if(n=t[e>>2]|0,n|0)do r=n,n=t[n>>2]|0,_t(r);while((n|0)!=0);t[e>>2]=0}function i1(e){e=e|0;var n=0,r=0;if(n=t[e>>2]|0,n|0)do r=n,n=t[n>>2]|0,_t(r);while((n|0)!=0);t[e>>2]=0}function Qa(e){e=e|0;var n=0;t[e+16>>2]=0,t[e+20>>2]=0,n=e+24|0,t[n>>2]=0,t[e+28>>2]=n,t[e+36>>2]=0,c[e+40>>0]=0,c[e+41>>0]=0}function P2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Dd(e,r,l,0),m=u}function Dd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=u1()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=Pf(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,o1(s,u)|0,u),m=l}function u1(){var e=0,n=0;if(c[7640]|0||(Fl(9232),Vt(26,9232,ve|0)|0,n=7640,t[n>>2]=1,t[n+4>>2]=0),!(sr(9232)|0)){e=9232,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Fl(9232)}return 9232}function Pf(e){return e=e|0,0}function o1(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=u1()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Ja(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(l1(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function Ja(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function l1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=I2(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,wd(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Ja(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Sc(e,D),s1(D),m=L;return}}function I2(e){return e=e|0,357913941}function wd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Sc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function s1(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Fl(e){e=e|0,b2(e)}function Da(e){e=e|0,Ch(e+24|0)}function Ch(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function b2(e){e=e|0;var n=0;n=yr()|0,jn(e,2,1,n,B2()|0,3),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function B2(){return 1144}function xh(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0;var s=0,h=0,D=0,S=0;s=m,m=m+16|0,h=s+8|0,D=s,S=Sd(e)|0,e=t[S+4>>2]|0,t[D>>2]=t[S>>2],t[D+4>>2]=e,t[h>>2]=t[D>>2],t[h+4>>2]=t[D+4>>2],Rh(n,h,r,u,l),m=s}function Sd(e){return e=e|0,(t[(u1()|0)+24>>2]|0)+(e*12|0)|0}function Rh(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0;var s=0,h=0,D=0,S=0,L=0;L=m,m=m+16|0,h=L+2|0,D=L+1|0,S=L,s=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(s=t[(t[e>>2]|0)+s>>2]|0),Pl(h,r),r=+os(h,r),Pl(D,u),u=+os(D,u),Rs(S,l),S=Ys(S,l)|0,tS[s&1](e,r,u,S),m=L}function Pl(e,n){e=e|0,n=+n}function os(e,n){return e=e|0,n=+n,+ +Ah(n)}function Rs(e,n){e=e|0,n=n|0}function Ys(e,n){return e=e|0,n=n|0,U2(n)|0}function U2(e){return e=e|0,e|0}function Ah(e){return e=+e,+e}function j2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],z2(e,r,l,1),m=u}function z2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=a1()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=f1(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Oh(s,u)|0,u),m=l}function a1(){var e=0,n=0;if(c[7648]|0||(c1(9268),Vt(27,9268,ve|0)|0,n=7648,t[n>>2]=1,t[n+4>>2]=0),!(sr(9268)|0)){e=9268,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));c1(9268)}return 9268}function f1(e){return e=e|0,0}function Oh(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=a1()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],H2(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(q2(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function H2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function q2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=As(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,Za(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],H2(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Mh(e,D),pu(D),m=L;return}}function As(e){return e=e|0,357913941}function Za(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Mh(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function pu(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function c1(e){e=e|0,Il(e)}function kh(e){e=e|0,d1(e+24|0)}function d1(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Il(e){e=e|0;var n=0;n=yr()|0,jn(e,2,4,n,Lh()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Lh(){return 1160}function W2(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=Nh(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=p1(n,u)|0,m=r,n|0}function Nh(e){return e=e|0,(t[(a1()|0)+24>>2]|0)+(e*12|0)|0}function p1(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),bl(Zp[r&31](e)|0)|0}function bl(e){return e=e|0,e&1|0}function $a(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],wa(e,r,l,0),m=u}function wa(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=V2()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=G2(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,hm(s,u)|0,u),m=l}function V2(){var e=0,n=0;if(c[7656]|0||(Ih(9304),Vt(28,9304,ve|0)|0,n=7656,t[n>>2]=1,t[n+4>>2]=0),!(sr(9304)|0)){e=9304,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Ih(9304)}return 9304}function G2(e){return e=e|0,0}function hm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=V2()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Y2(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Fh(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function Y2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Fh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Ph(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,K2(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Y2(s,u,r),t[S>>2]=(t[S>>2]|0)+12,vm(e,D),mm(D),m=L;return}}function Ph(e){return e=e|0,357913941}function K2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function vm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function mm(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Ih(e){e=e|0,h1(e)}function ym(e){e=e|0,X2(e+24|0)}function X2(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function h1(e){e=e|0;var n=0;n=yr()|0,jn(e,2,5,n,v1()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function v1(){return 1164}function m1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=Sa(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Q2(n,l,r),m=u}function Sa(e){return e=e|0,(t[(V2()|0)+24>>2]|0)+(e*12|0)|0}function Q2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Ks(l,r),r=Xs(l,r)|0,I1[u&31](e,r),Qs(l),m=s}function Ks(e,n){e=e|0,n=n|0,J2(e,n)}function Xs(e,n){return e=e|0,n=n|0,e|0}function Qs(e){e=e|0,ca(e)}function J2(e,n){e=e|0,n=n|0,Ta(e,n)}function Ta(e,n){e=e|0,n=n|0,t[e>>2]=n}function y1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Td(e,r,l,0),m=u}function Td(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Tc()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=Z2(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,w0(s,u)|0,u),m=l}function Tc(){var e=0,n=0;if(c[7664]|0||(Hh(9340),Vt(29,9340,ve|0)|0,n=7664,t[n>>2]=1,t[n+4>>2]=0),!(sr(9340)|0)){e=9340,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Hh(9340)}return 9340}function Z2(e){return e=e|0,0}function w0(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Tc()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],bh(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Bh(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function bh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Bh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Uh(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,jh(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],bh(s,u,r),t[S>>2]=(t[S>>2]|0)+12,gm(e,D),zh(D),m=L;return}}function Uh(e){return e=e|0,357913941}function jh(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function gm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function zh(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Hh(e){e=e|0,qh(e)}function g1(e){e=e|0,$2(e+24|0)}function $2(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function qh(e){e=e|0;var n=0;n=yr()|0,jn(e,2,4,n,ep()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function ep(){return 1180}function Wh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=_m(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=Em(n,l,r)|0,m=u,r|0}function _m(e){return e=e|0,(t[(Tc()|0)+24>>2]|0)+(e*12|0)|0}function Em(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;return s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),If(l,r),l=bf(l,r)|0,l=Cd(tD[u&15](e,l)|0)|0,m=s,l|0}function If(e,n){e=e|0,n=n|0}function bf(e,n){return e=e|0,n=n|0,Dm(n)|0}function Cd(e){return e=e|0,e|0}function Dm(e){return e=e|0,e|0}function tp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],xd(e,r,l,0),m=u}function xd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=np()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=Vh(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,rp(s,u)|0,u),m=l}function np(){var e=0,n=0;if(c[7672]|0||(Kh(9376),Vt(30,9376,ve|0)|0,n=7672,t[n>>2]=1,t[n+4>>2]=0),!(sr(9376)|0)){e=9376,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Kh(9376)}return 9376}function Vh(e){return e=e|0,0}function rp(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=np()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Gh(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Yh(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function Gh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Yh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=ip(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,wm(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Gh(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Sm(e,D),Tm(D),m=L;return}}function ip(e){return e=e|0,357913941}function wm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Sm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Tm(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Kh(e){e=e|0,up(e)}function _1(e){e=e|0,Cm(e+24|0)}function Cm(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function up(e){e=e|0;var n=0;n=yr()|0,jn(e,2,5,n,op()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function op(){return 1196}function xm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=Rm(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=Xh(n,u)|0,m=r,n|0}function Rm(e){return e=e|0,(t[(np()|0)+24>>2]|0)+(e*12|0)|0}function Xh(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),Cd(Zp[r&31](e)|0)|0}function Am(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Om(e,r,l,1),m=u}function Om(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=lp()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=sp(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Ca(s,u)|0,u),m=l}function lp(){var e=0,n=0;if(c[7680]|0||(fp(9412),Vt(31,9412,ve|0)|0,n=7680,t[n>>2]=1,t[n+4>>2]=0),!(sr(9412)|0)){e=9412,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));fp(9412)}return 9412}function sp(e){return e=e|0,0}function Ca(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=lp()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],E1(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(ap(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function E1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function ap(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Qh(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,Rd(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],E1(s,u,r),t[S>>2]=(t[S>>2]|0)+12,D1(e,D),Jh(D),m=L;return}}function Qh(e){return e=e|0,357913941}function Rd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function D1(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Jh(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function fp(e){e=e|0,$h(e)}function Zh(e){e=e|0,cp(e+24|0)}function cp(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function $h(e){e=e|0;var n=0;n=yr()|0,jn(e,2,6,n,ev()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function ev(){return 1200}function dp(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=Ad(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=Od(n,u)|0,m=r,n|0}function Ad(e){return e=e|0,(t[(lp()|0)+24>>2]|0)+(e*12|0)|0}function Od(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),qo(Zp[r&31](e)|0)|0}function qo(e){return e=e|0,e|0}function Md(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],xa(e,r,l,0),m=u}function xa(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=ef()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=kd(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Ld(s,u)|0,u),m=l}function ef(){var e=0,n=0;if(c[7688]|0||(vp(9448),Vt(32,9448,ve|0)|0,n=7688,t[n>>2]=1,t[n+4>>2]=0),!(sr(9448)|0)){e=9448,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));vp(9448)}return 9448}function kd(e){return e=e|0,0}function Ld(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=ef()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],pp(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Nd(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function pp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Nd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=tv(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,Mm(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],pp(s,u,r),t[S>>2]=(t[S>>2]|0)+12,nv(e,D),hp(D),m=L;return}}function tv(e){return e=e|0,357913941}function Mm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function nv(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function hp(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function vp(e){e=e|0,Lm(e)}function mp(e){e=e|0,km(e+24|0)}function km(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Lm(e){e=e|0;var n=0;n=yr()|0,jn(e,2,6,n,S0()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function S0(){return 1204}function Fd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=Nm(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],pl(n,l,r),m=u}function Nm(e){return e=e|0,(t[(ef()|0)+24>>2]|0)+(e*12|0)|0}function pl(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),tr(l,r),l=Js(l,r)|0,I1[u&31](e,l),m=s}function tr(e,n){e=e|0,n=n|0}function Js(e,n){return e=e|0,n=n|0,hl(n)|0}function hl(e){return e=e|0,e|0}function lo(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],rv(e,r,l,0),m=u}function rv(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Zs()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=yp(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Fm(s,u)|0,u),m=l}function Zs(){var e=0,n=0;if(c[7696]|0||(Ep(9484),Vt(33,9484,ve|0)|0,n=7696,t[n>>2]=1,t[n+4>>2]=0),!(sr(9484)|0)){e=9484,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Ep(9484)}return 9484}function yp(e){return e=e|0,0}function Fm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Zs()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],iv(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(gp(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function iv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function gp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Pm(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,_p(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],iv(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Cc(e,D),Ra(D),m=L;return}}function Pm(e){return e=e|0,357913941}function _p(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Cc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Ra(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Ep(e){e=e|0,Yu(e)}function Pd(e){e=e|0,bu(e+24|0)}function bu(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Yu(e){e=e|0;var n=0;n=yr()|0,jn(e,2,1,n,Dp()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Dp(){return 1212}function wp(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+8|0,h=l,D=uv(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],Im(n,s,r,u),m=l}function uv(e){return e=e|0,(t[(Zs()|0)+24>>2]|0)+(e*12|0)|0}function Im(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;D=m,m=m+16|0,s=D+1|0,h=D,l=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(l=t[(t[e>>2]|0)+l>>2]|0),tr(s,r),s=Js(s,r)|0,If(h,u),h=bf(h,u)|0,Fy[l&15](e,s,h),m=D}function bm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Bm(e,r,l,1),m=u}function Bm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Id()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=ov(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,xc(s,u)|0,u),m=l}function Id(){var e=0,n=0;if(c[7704]|0||(lv(9520),Vt(34,9520,ve|0)|0,n=7704,t[n>>2]=1,t[n+4>>2]=0),!(sr(9520)|0)){e=9520,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));lv(9520)}return 9520}function ov(e){return e=e|0,0}function xc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Id()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],w1(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Um(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function w1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Um(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=bd(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,S1(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],w1(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Bl(e,D),Aa(D),m=L;return}}function bd(e){return e=e|0,357913941}function S1(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Bl(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Aa(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function lv(e){e=e|0,av(e)}function jm(e){e=e|0,sv(e+24|0)}function sv(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function av(e){e=e|0;var n=0;n=yr()|0,jn(e,2,1,n,zm()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function zm(){return 1224}function fv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;return l=m,m=m+16|0,s=l+8|0,h=l,D=Oa(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],u=+Mr(n,s,r),m=l,+u}function Oa(e){return e=e|0,(t[(Id()|0)+24>>2]|0)+(e*12|0)|0}function Mr(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Rs(l,r),l=Ys(l,r)|0,h=+Ya(+rS[u&7](e,l)),m=s,+h}function Sp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],vl(e,r,l,1),m=u}function vl(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=gu()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=T1(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Ui(s,u)|0,u),m=l}function gu(){var e=0,n=0;if(c[7712]|0||(Cp(9556),Vt(35,9556,ve|0)|0,n=7712,t[n>>2]=1,t[n+4>>2]=0),!(sr(9556)|0)){e=9556,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Cp(9556)}return 9556}function T1(e){return e=e|0,0}function Ui(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=gu()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Tp(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Bd(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function Tp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Bd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=T0(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,Os(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Tp(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Bf(e,D),Ud(D),m=L;return}}function T0(e){return e=e|0,357913941}function Os(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Bf(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Ud(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Cp(e){e=e|0,xp(e)}function C1(e){e=e|0,x1(e+24|0)}function x1(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function xp(e){e=e|0;var n=0;n=yr()|0,jn(e,2,5,n,nr()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function nr(){return 1232}function ml(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=Gn(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=+Wo(n,l),m=u,+r}function Gn(e){return e=e|0,(t[(gu()|0)+24>>2]|0)+(e*12|0)|0}function Wo(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),+ +Ya(+nS[r&15](e))}function Lo(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],jd(e,r,l,1),m=u}function jd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Ul()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=R1(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Rc(s,u)|0,u),m=l}function Ul(){var e=0,n=0;if(c[7720]|0||(qd(9592),Vt(36,9592,ve|0)|0,n=7720,t[n>>2]=1,t[n+4>>2]=0),!(sr(9592)|0)){e=9592,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));qd(9592)}return 9592}function R1(e){return e=e|0,0}function Rc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Ul()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Ac(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(zd(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function Ac(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function zd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Rp(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,No(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Ac(s,u,r),t[S>>2]=(t[S>>2]|0)+12,dn(e,D),Hd(D),m=L;return}}function Rp(e){return e=e|0,357913941}function No(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function dn(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Hd(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function qd(e){e=e|0,kc(e)}function Oc(e){e=e|0,Mc(e+24|0)}function Mc(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function kc(e){e=e|0;var n=0;n=yr()|0,jn(e,2,7,n,A1()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function A1(){return 1276}function Ap(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=tf(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=Hm(n,u)|0,m=r,n|0}function tf(e){return e=e|0,(t[(Ul()|0)+24>>2]|0)+(e*12|0)|0}function Hm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;return l=m,m=m+16|0,u=l,r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),I1[r&31](u,e),u=Lc(u)|0,m=l,u|0}function Lc(e){e=e|0;var n=0,r=0,u=0,l=0;return l=m,m=m+32|0,n=l+12|0,r=l,u=Iu(Wd()|0)|0,u?(is(n,u),kf(r,n),cv(e,r),e=xs(n)|0):e=O1(e)|0,m=l,e|0}function Wd(){var e=0;return c[7736]|0||(W0(9640),Vt(25,9640,ve|0)|0,e=7736,t[e>>2]=1,t[e+4>>2]=0),9640}function cv(e,n){e=e|0,n=n|0,Nc(n,e,e+8|0)|0}function O1(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0;return r=m,m=m+16|0,l=r+4|0,h=r,u=Ma(8)|0,n=u,D=pn(16)|0,t[D>>2]=t[e>>2],t[D+4>>2]=t[e+4>>2],t[D+8>>2]=t[e+8>>2],t[D+12>>2]=t[e+12>>2],s=n+4|0,t[s>>2]=D,e=pn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],Uf(e,s,l),t[u>>2]=e,m=r,n|0}function Uf(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=pn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1244,t[r+12>>2]=n,t[e+4>>2]=r}function jf(e){e=e|0,Uv(e),_t(e)}function M1(e){e=e|0,e=t[e+12>>2]|0,e|0&&_t(e)}function jl(e){e=e|0,_t(e)}function Nc(e,n,r){return e=e|0,n=n|0,r=r|0,n=zf(t[e>>2]|0,n,r)|0,r=e+4|0,t[(t[r>>2]|0)+8>>2]=n,t[(t[r>>2]|0)+8>>2]|0}function zf(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;return u=m,m=m+16|0,l=u,ka(l),e=g0(e)|0,r=qm(e,t[n>>2]|0,+B[r>>3])|0,La(l),m=u,r|0}function qm(e,n,r){e=e|0,n=n|0,r=+r;var u=0;return u=_0(yl()|0)|0,n=ad(n)|0,Hr(0,u|0,e|0,n|0,+ +kl(r))|0}function yl(){var e=0;return c[7728]|0||(Vd(9628),e=7728,t[e>>2]=1,t[e+4>>2]=0),9628}function Vd(e){e=e|0,ll(e,Gd()|0,2)}function Gd(){return 1264}function W0(e){e=e|0,Qa(e)}function Yd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Wm(e,r,l,1),m=u}function Wm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=k1()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=Vm(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Gm(s,u)|0,u),m=l}function k1(){var e=0,n=0;if(c[7744]|0||(hv(9684),Vt(37,9684,ve|0)|0,n=7744,t[n>>2]=1,t[n+4>>2]=0),!(sr(9684)|0)){e=9684,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));hv(9684)}return 9684}function Vm(e){return e=e|0,0}function Gm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=k1()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],dv(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Ym(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function dv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Ym(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=pv(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,Km(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],dv(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Xm(e,D),Qm(D),m=L;return}}function pv(e){return e=e|0,357913941}function Km(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Xm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Qm(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function hv(e){e=e|0,Zm(e)}function Jm(e){e=e|0,Op(e+24|0)}function Op(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Zm(e){e=e|0;var n=0;n=yr()|0,jn(e,2,5,n,Hf()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Hf(){return 1280}function vv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=mv(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=yv(n,l,r)|0,m=u,r|0}function mv(e){return e=e|0,(t[(k1()|0)+24>>2]|0)+(e*12|0)|0}function yv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return h=m,m=m+32|0,l=h,s=h+16|0,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Rs(s,r),s=Ys(s,r)|0,Fy[u&15](l,e,s),s=Lc(l)|0,m=h,s|0}function Kd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Xd(e,r,l,1),m=u}function Xd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Mp()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=gv(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Qd(s,u)|0,u),m=l}function Mp(){var e=0,n=0;if(c[7752]|0||(Sv(9720),Vt(38,9720,ve|0)|0,n=7752,t[n>>2]=1,t[n+4>>2]=0),!(sr(9720)|0)){e=9720,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Sv(9720)}return 9720}function gv(e){return e=e|0,0}function Qd(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Mp()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],_v(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Ev(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function _v(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Ev(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=kp(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,Dv(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],_v(s,u,r),t[S>>2]=(t[S>>2]|0)+12,wv(e,D),$m(D),m=L;return}}function kp(e){return e=e|0,357913941}function Dv(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function wv(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function $m(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Sv(e){e=e|0,Tv(e)}function ey(e){e=e|0,Jd(e+24|0)}function Jd(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Tv(e){e=e|0;var n=0;n=yr()|0,jn(e,2,8,n,Lp()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Lp(){return 1288}function ty(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=so(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=Np(n,u)|0,m=r,n|0}function so(e){return e=e|0,(t[(Mp()|0)+24>>2]|0)+(e*12|0)|0}function Np(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),dd(Zp[r&31](e)|0)|0}function ny(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ry(e,r,l,0),m=u}function ry(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Fp()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=nf(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Pp(s,u)|0,u),m=l}function Fp(){var e=0,n=0;if(c[7760]|0||(Bp(9756),Vt(39,9756,ve|0)|0,n=7760,t[n>>2]=1,t[n+4>>2]=0),!(sr(9756)|0)){e=9756,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Bp(9756)}return 9756}function nf(e){return e=e|0,0}function Pp(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Fp()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Ip(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(bp(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function Ip(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function bp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=iy(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,uy(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Ip(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Cv(e,D),qf(D),m=L;return}}function iy(e){return e=e|0,357913941}function uy(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Cv(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function qf(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Bp(e){e=e|0,ly(e)}function xv(e){e=e|0,oy(e+24|0)}function oy(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function ly(e){e=e|0;var n=0;n=yr()|0,jn(e,2,8,n,Up()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Up(){return 1292}function jp(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=sy(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ay(n,l,r),m=u}function sy(e){return e=e|0,(t[(Fp()|0)+24>>2]|0)+(e*12|0)|0}function ay(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Pl(l,r),r=+os(l,r),$8[u&31](e,r),m=s}function Rv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],zp(e,r,l,0),m=u}function zp(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Hp()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=Zd(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,fy(s,u)|0,u),m=l}function Hp(){var e=0,n=0;if(c[7768]|0||(qp(9792),Vt(40,9792,ve|0)|0,n=7768,t[n>>2]=1,t[n+4>>2]=0),!(sr(9792)|0)){e=9792,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));qp(9792)}return 9792}function Zd(e){return e=e|0,0}function fy(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Hp()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],L1(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(cy(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function L1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function cy(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Av(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,Ov(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],L1(s,u,r),t[S>>2]=(t[S>>2]|0)+12,dy(e,D),Wf(D),m=L;return}}function Av(e){return e=e|0,357913941}function Ov(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function dy(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Wf(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function qp(e){e=e|0,hy(e)}function Mv(e){e=e|0,py(e+24|0)}function py(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function hy(e){e=e|0;var n=0;n=yr()|0,jn(e,2,1,n,Wp()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Wp(){return 1300}function vy(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+8|0,h=l,D=$s(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],my(n,s,r,u),m=l}function $s(e){return e=e|0,(t[(Hp()|0)+24>>2]|0)+(e*12|0)|0}function my(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u;var l=0,s=0,h=0,D=0;D=m,m=m+16|0,s=D+1|0,h=D,l=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(l=t[(t[e>>2]|0)+l>>2]|0),Rs(s,r),s=Ys(s,r)|0,Pl(h,u),u=+os(h,u),lS[l&15](e,s,u),m=D}function p(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],v(e,r,l,0),m=u}function v(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=x()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=P(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,W(s,u)|0,u),m=l}function x(){var e=0,n=0;if(c[7776]|0||(At(9828),Vt(41,9828,ve|0)|0,n=7776,t[n>>2]=1,t[n+4>>2]=0),!(sr(9828)|0)){e=9828,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));At(9828)}return 9828}function P(e){return e=e|0,0}function W(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=x()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],ee(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(he(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function ee(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function he(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=De(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,be(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],ee(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Et(e,D),St(D),m=L;return}}function De(e){return e=e|0,357913941}function be(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Et(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function St(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function At(e){e=e|0,rr(e)}function on(e){e=e|0,kn(e+24|0)}function kn(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function rr(e){e=e|0;var n=0;n=yr()|0,jn(e,2,7,n,br()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function br(){return 1312}function ar(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=ui(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],di(n,l,r),m=u}function ui(e){return e=e|0,(t[(x()|0)+24>>2]|0)+(e*12|0)|0}function di(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Rs(l,r),l=Ys(l,r)|0,I1[u&31](e,l),m=s}function zl(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Zi(e,r,l,0),m=u}function Zi(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=a0()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=ao(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Ms(s,u)|0,u),m=l}function a0(){var e=0,n=0;if(c[7784]|0||(n_(9864),Vt(42,9864,ve|0)|0,n=7784,t[n>>2]=1,t[n+4>>2]=0),!(sr(9864)|0)){e=9864,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));n_(9864)}return 9864}function ao(e){return e=e|0,0}function Ms(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=a0()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],C0(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(kv(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function C0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function kv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Z4(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,yy(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],C0(s,u,r),t[S>>2]=(t[S>>2]|0)+12,gy(e,D),rf(D),m=L;return}}function Z4(e){return e=e|0,357913941}function yy(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function gy(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function rf(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function n_(e){e=e|0,tE(e)}function $4(e){e=e|0,eE(e+24|0)}function eE(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function tE(e){e=e|0;var n=0;n=yr()|0,jn(e,2,8,n,nE()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function nE(){return 1320}function _y(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=rE(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],iE(n,l,r),m=u}function rE(e){return e=e|0,(t[(a0()|0)+24>>2]|0)+(e*12|0)|0}function iE(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Ey(l,r),l=r_(l,r)|0,I1[u&31](e,l),m=s}function Ey(e,n){e=e|0,n=n|0}function r_(e,n){return e=e|0,n=n|0,uE(n)|0}function uE(e){return e=e|0,e|0}function oE(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],i_(e,r,l,0),m=u}function i_(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Vf()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=u_(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,lE(s,u)|0,u),m=l}function Vf(){var e=0,n=0;if(c[7792]|0||(Sy(9900),Vt(43,9900,ve|0)|0,n=7792,t[n>>2]=1,t[n+4>>2]=0),!(sr(9900)|0)){e=9900,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Sy(9900)}return 9900}function u_(e){return e=e|0,0}function lE(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Vf()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Vp(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(sE(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function Vp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function sE(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Lv(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,Dy(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Vp(s,u,r),t[S>>2]=(t[S>>2]|0)+12,wy(e,D),aE(D),m=L;return}}function Lv(e){return e=e|0,357913941}function Dy(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function wy(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function aE(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Sy(e){e=e|0,o_(e)}function fE(e){e=e|0,cE(e+24|0)}function cE(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function o_(e){e=e|0;var n=0;n=yr()|0,jn(e,2,22,n,dE()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function dE(){return 1344}function pE(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;r=m,m=m+16|0,u=r+8|0,l=r,s=l_(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],Nv(n,u),m=r}function l_(e){return e=e|0,(t[(Vf()|0)+24>>2]|0)+(e*12|0)|0}function Nv(e,n){e=e|0,n=n|0;var r=0;r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),P1[r&127](e)}function hE(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=Ty()|0,e=vE(r)|0,wi(s,n,l,e,mE(r,u)|0,u)}function Ty(){var e=0,n=0;if(c[7800]|0||(xy(9936),Vt(44,9936,ve|0)|0,n=7800,t[n>>2]=1,t[n+4>>2]=0),!(sr(9936)|0)){e=9936,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));xy(9936)}return 9936}function vE(e){return e=e|0,e|0}function mE(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=Ty()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(Cy(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(s_(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function Cy(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function s_(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=a_(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,k=(t[e+8>>2]|0)-S|0,L=k>>2,f_(l,k>>3>>>0>>1>>>0?L>>>0>>0?h:L:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,Cy(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,c_(e,l),d_(l),m=D;return}}function a_(e){return e=e|0,536870911}function f_(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function c_(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function d_(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function xy(e){e=e|0,h_(e)}function p_(e){e=e|0,yE(e+24|0)}function yE(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function h_(e){e=e|0;var n=0;n=yr()|0,jn(e,1,23,n,S0()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function gE(e,n){e=e|0,n=n|0,f(t[(_E(e)|0)>>2]|0,n)}function _E(e){return e=e|0,(t[(Ty()|0)+24>>2]|0)+(e<<3)|0}function f(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,tr(u,n),n=Js(u,n)|0,P1[e&127](n),m=r}function d(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=E()|0,e=C(r)|0,wi(s,n,l,e,A(r,u)|0,u)}function E(){var e=0,n=0;if(c[7808]|0||(vt(9972),Vt(45,9972,ve|0)|0,n=7808,t[n>>2]=1,t[n+4>>2]=0),!(sr(9972)|0)){e=9972,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));vt(9972)}return 9972}function C(e){return e=e|0,e|0}function A(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=E()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(j(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(V(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function j(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function V(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=te(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,k=(t[e+8>>2]|0)-S|0,L=k>>2,se(l,k>>3>>>0>>1>>>0?L>>>0>>0?h:L:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,j(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,Ue(e,l),Qe(l),m=D;return}}function te(e){return e=e|0,536870911}function se(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function Ue(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Qe(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function vt(e){e=e|0,Ht(e)}function Nt(e){e=e|0,Yt(e+24|0)}function Yt(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function Ht(e){e=e|0;var n=0;n=yr()|0,jn(e,1,9,n,yn()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function yn(){return 1348}function kr(e,n){return e=e|0,n=n|0,Oi(t[(oi(e)|0)>>2]|0,n)|0}function oi(e){return e=e|0,(t[(E()|0)+24>>2]|0)+(e<<3)|0}function Oi(e,n){e=e|0,n=n|0;var r=0,u=0;return r=m,m=m+16|0,u=r,Fo(u,n),n=$i(u,n)|0,n=Cd(Zp[e&31](n)|0)|0,m=r,n|0}function Fo(e,n){e=e|0,n=n|0}function $i(e,n){return e=e|0,n=n|0,ot(n)|0}function ot(e){return e=e|0,e|0}function Ot(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=$e()|0,e=Ut(r)|0,wi(s,n,l,e,Pn(r,u)|0,u)}function $e(){var e=0,n=0;if(c[7816]|0||(Kr(10008),Vt(46,10008,ve|0)|0,n=7816,t[n>>2]=1,t[n+4>>2]=0),!(sr(10008)|0)){e=10008,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Kr(10008)}return 10008}function Ut(e){return e=e|0,e|0}function Pn(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=$e()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(vn(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(Wi(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function vn(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function Wi(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=pi(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,k=(t[e+8>>2]|0)-S|0,L=k>>2,Ku(l,k>>3>>>0>>1>>>0?L>>>0>>0?h:L:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,vn(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,hr(e,l),hu(l),m=D;return}}function pi(e){return e=e|0,536870911}function Ku(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function hr(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function hu(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function Kr(e){e=e|0,Vo(e)}function xu(e){e=e|0,So(e+24|0)}function So(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function Vo(e){e=e|0;var n=0;n=yr()|0,jn(e,1,15,n,op()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function ks(e){return e=e|0,gl(t[(Xu(e)|0)>>2]|0)|0}function Xu(e){return e=e|0,(t[($e()|0)+24>>2]|0)+(e<<3)|0}function gl(e){return e=e|0,Cd(k_[e&7]()|0)|0}function uf(){var e=0;return c[7832]|0||(m_(10052),Vt(25,10052,ve|0)|0,e=7832,t[e>>2]=1,t[e+4>>2]=0),10052}function V0(e,n){e=e|0,n=n|0,t[e>>2]=Ls()|0,t[e+4>>2]=$d()|0,t[e+12>>2]=n,t[e+8>>2]=Gf()|0,t[e+32>>2]=2}function Ls(){return 11709}function $d(){return 1188}function Gf(){return N1()|0}function Fc(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Hl(u,896)|0)==512?r|0&&(G0(r),_t(r)):n|0&&(ws(n),_t(n))}function Hl(e,n){return e=e|0,n=n|0,n&e|0}function G0(e){e=e|0,e=t[e+4>>2]|0,e|0&&t2(e)}function N1(){var e=0;return c[7824]|0||(t[2511]=v_()|0,t[2512]=0,e=7824,t[e>>2]=1,t[e+4>>2]=0),10044}function v_(){return 0}function m_(e){e=e|0,Qa(e)}function EE(e){e=e|0;var n=0,r=0,u=0,l=0,s=0;n=m,m=m+32|0,r=n+24|0,s=n+16|0,l=n+8|0,u=n,y_(e,4827),DE(e,4834,3)|0,wE(e,3682,47)|0,t[s>>2]=9,t[s+4>>2]=0,t[r>>2]=t[s>>2],t[r+4>>2]=t[s+4>>2],Ry(e,4841,r)|0,t[l>>2]=1,t[l+4>>2]=0,t[r>>2]=t[l>>2],t[r+4>>2]=t[l+4>>2],g_(e,4871,r)|0,t[u>>2]=10,t[u+4>>2]=0,t[r>>2]=t[u>>2],t[r+4>>2]=t[u+4>>2],SE(e,4891,r)|0,m=n}function y_(e,n){e=e|0,n=n|0;var r=0;r=JA()|0,t[e>>2]=r,ZA(r,n),e2(t[e>>2]|0)}function DE(e,n,r){return e=e|0,n=n|0,r=r|0,PA(e,Fr(n)|0,r,0),e|0}function wE(e,n,r){return e=e|0,n=n|0,r=r|0,EA(e,Fr(n)|0,r,0),e|0}function Ry(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],tA(e,n,l),m=u,e|0}function g_(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],IR(e,n,l),m=u,e|0}function SE(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],TE(e,n,l),m=u,e|0}function TE(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],CE(e,r,l,1),m=u}function CE(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=xE()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=wR(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,SR(s,u)|0,u),m=l}function xE(){var e=0,n=0;if(c[7840]|0||(I3(10100),Vt(48,10100,ve|0)|0,n=7840,t[n>>2]=1,t[n+4>>2]=0),!(sr(10100)|0)){e=10100,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));I3(10100)}return 10100}function wR(e){return e=e|0,0}function SR(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=xE()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],P3(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(TR(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function P3(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function TR(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=CR(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,xR(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],P3(s,u,r),t[S>>2]=(t[S>>2]|0)+12,RR(e,D),AR(D),m=L;return}}function CR(e){return e=e|0,357913941}function xR(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function RR(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function AR(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function I3(e){e=e|0,kR(e)}function OR(e){e=e|0,MR(e+24|0)}function MR(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function kR(e){e=e|0;var n=0;n=yr()|0,jn(e,2,6,n,LR()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function LR(){return 1364}function NR(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=FR(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=PR(n,l,r)|0,m=u,r|0}function FR(e){return e=e|0,(t[(xE()|0)+24>>2]|0)+(e*12|0)|0}function PR(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;return s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Rs(l,r),l=Ys(l,r)|0,l=bl(tD[u&15](e,l)|0)|0,m=s,l|0}function IR(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],bR(e,r,l,0),m=u}function bR(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=RE()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=BR(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,UR(s,u)|0,u),m=l}function RE(){var e=0,n=0;if(c[7848]|0||(B3(10136),Vt(49,10136,ve|0)|0,n=7848,t[n>>2]=1,t[n+4>>2]=0),!(sr(10136)|0)){e=10136,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));B3(10136)}return 10136}function BR(e){return e=e|0,0}function UR(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=RE()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],b3(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(jR(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function b3(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function jR(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=zR(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,HR(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],b3(s,u,r),t[S>>2]=(t[S>>2]|0)+12,qR(e,D),WR(D),m=L;return}}function zR(e){return e=e|0,357913941}function HR(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function qR(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function WR(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function B3(e){e=e|0,YR(e)}function VR(e){e=e|0,GR(e+24|0)}function GR(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function YR(e){e=e|0;var n=0;n=yr()|0,jn(e,2,9,n,KR()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function KR(){return 1372}function XR(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=QR(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],JR(n,l,r),m=u}function QR(e){return e=e|0,(t[(RE()|0)+24>>2]|0)+(e*12|0)|0}function JR(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=Tt;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),ZR(l,r),h=w($R(l,r)),Z8[u&1](e,h),m=s}function ZR(e,n){e=e|0,n=+n}function $R(e,n){return e=e|0,n=+n,w(eA(n))}function eA(e){return e=+e,w(e)}function tA(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],nA(e,r,l,0),m=u}function nA(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,L=0,k=0;l=m,m=m+32|0,s=l+16|0,k=l+8|0,D=l,L=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=AE()|0,t[k>>2]=L,t[k+4>>2]=S,t[s>>2]=t[k>>2],t[s+4>>2]=t[k+4>>2],r=rA(s)|0,t[D>>2]=L,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,iA(s,u)|0,u),m=l}function AE(){var e=0,n=0;if(c[7856]|0||(j3(10172),Vt(50,10172,ve|0)|0,n=7856,t[n>>2]=1,t[n+4>>2]=0),!(sr(10172)|0)){e=10172,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));j3(10172)}return 10172}function rA(e){return e=e|0,0}function iA(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0;return k=m,m=m+32|0,l=k+24|0,h=k+16|0,D=k,S=k+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=AE()|0,L=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],U3(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(uA(L,D,S),e=t[n>>2]|0),m=k,((e-(t[L>>2]|0)|0)/12|0)+-1|0}function U3(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function uA(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;if(L=m,m=m+48|0,u=L+32|0,h=L+24|0,D=L,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=oA(e)|0,s>>>0>>0)hi(e);else{k=t[e>>2]|0,K=((t[e+8>>2]|0)-k|0)/12|0,I=K<<1,lA(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-k|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],U3(s,u,r),t[S>>2]=(t[S>>2]|0)+12,sA(e,D),aA(D),m=L;return}}function oA(e){return e=e|0,357913941}function lA(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function sA(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function aA(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function j3(e){e=e|0,dA(e)}function fA(e){e=e|0,cA(e+24|0)}function cA(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function dA(e){e=e|0;var n=0;n=yr()|0,jn(e,2,3,n,pA()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function pA(){return 1380}function hA(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+8|0,h=l,D=vA(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],mA(n,s,r,u),m=l}function vA(e){return e=e|0,(t[(AE()|0)+24>>2]|0)+(e*12|0)|0}function mA(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;D=m,m=m+16|0,s=D+1|0,h=D,l=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(l=t[(t[e>>2]|0)+l>>2]|0),Rs(s,r),s=Ys(s,r)|0,yA(h,u),h=gA(h,u)|0,Fy[l&15](e,s,h),m=D}function yA(e,n){e=e|0,n=n|0}function gA(e,n){return e=e|0,n=n|0,_A(n)|0}function _A(e){return e=e|0,(e|0)!=0|0}function EA(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=OE()|0,e=DA(r)|0,wi(s,n,l,e,wA(r,u)|0,u)}function OE(){var e=0,n=0;if(c[7864]|0||(H3(10208),Vt(51,10208,ve|0)|0,n=7864,t[n>>2]=1,t[n+4>>2]=0),!(sr(10208)|0)){e=10208,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));H3(10208)}return 10208}function DA(e){return e=e|0,e|0}function wA(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=OE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(z3(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(SA(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function z3(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function SA(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=TA(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,k=(t[e+8>>2]|0)-S|0,L=k>>2,CA(l,k>>3>>>0>>1>>>0?L>>>0>>0?h:L:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,z3(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,xA(e,l),RA(l),m=D;return}}function TA(e){return e=e|0,536870911}function CA(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function xA(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function RA(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function H3(e){e=e|0,MA(e)}function AA(e){e=e|0,OA(e+24|0)}function OA(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function MA(e){e=e|0;var n=0;n=yr()|0,jn(e,1,24,n,kA()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function kA(){return 1392}function LA(e,n){e=e|0,n=n|0,FA(t[(NA(e)|0)>>2]|0,n)}function NA(e){return e=e|0,(t[(OE()|0)+24>>2]|0)+(e<<3)|0}function FA(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,Fo(u,n),n=$i(u,n)|0,P1[e&127](n),m=r}function PA(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=ME()|0,e=IA(r)|0,wi(s,n,l,e,bA(r,u)|0,u)}function ME(){var e=0,n=0;if(c[7872]|0||(W3(10244),Vt(52,10244,ve|0)|0,n=7872,t[n>>2]=1,t[n+4>>2]=0),!(sr(10244)|0)){e=10244,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));W3(10244)}return 10244}function IA(e){return e=e|0,e|0}function bA(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=ME()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(q3(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(BA(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function q3(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function BA(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=UA(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,k=(t[e+8>>2]|0)-S|0,L=k>>2,jA(l,k>>3>>>0>>1>>>0?L>>>0>>0?h:L:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,q3(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,zA(e,l),HA(l),m=D;return}}function UA(e){return e=e|0,536870911}function jA(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function zA(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function HA(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function W3(e){e=e|0,VA(e)}function qA(e){e=e|0,WA(e+24|0)}function WA(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function VA(e){e=e|0;var n=0;n=yr()|0,jn(e,1,16,n,GA()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function GA(){return 1400}function YA(e){return e=e|0,XA(t[(KA(e)|0)>>2]|0)|0}function KA(e){return e=e|0,(t[(ME()|0)+24>>2]|0)+(e<<3)|0}function XA(e){return e=e|0,QA(k_[e&7]()|0)|0}function QA(e){return e=e|0,e|0}function JA(){var e=0;return c[7880]|0||(i7(10280),Vt(25,10280,ve|0)|0,e=7880,t[e>>2]=1,t[e+4>>2]=0),10280}function ZA(e,n){e=e|0,n=n|0,t[e>>2]=$A()|0,t[e+4>>2]=e7()|0,t[e+12>>2]=n,t[e+8>>2]=t7()|0,t[e+32>>2]=4}function $A(){return 11711}function e7(){return 1356}function t7(){return N1()|0}function n7(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Hl(u,896)|0)==512?r|0&&(r7(r),_t(r)):n|0&&(i0(n),_t(n))}function r7(e){e=e|0,e=t[e+4>>2]|0,e|0&&t2(e)}function i7(e){e=e|0,Qa(e)}function u7(e){e=e|0,o7(e,4920),l7(e)|0,s7(e)|0}function o7(e,n){e=e|0,n=n|0;var r=0;r=Wd()|0,t[e>>2]=r,O7(r,n),e2(t[e>>2]|0)}function l7(e){e=e|0;var n=0;return n=t[e>>2]|0,Gp(n,_7()|0),e|0}function s7(e){e=e|0;var n=0;return n=t[e>>2]|0,Gp(n,a7()|0),e|0}function a7(){var e=0;return c[7888]|0||(V3(10328),Vt(53,10328,ve|0)|0,e=7888,t[e>>2]=1,t[e+4>>2]=0),sr(10328)|0||V3(10328),10328}function Gp(e,n){e=e|0,n=n|0,wi(e,0,n,0,0,0)}function V3(e){e=e|0,d7(e),Yp(e,10)}function f7(e){e=e|0,c7(e+24|0)}function c7(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function d7(e){e=e|0;var n=0;n=yr()|0,jn(e,5,1,n,m7()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function p7(e,n,r){e=e|0,n=n|0,r=+r,h7(e,n,r)}function Yp(e,n){e=e|0,n=n|0,t[e+20>>2]=n}function h7(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,s=u+8|0,D=u+13|0,l=u,h=u+12|0,Rs(D,n),t[s>>2]=Ys(D,n)|0,Pl(h,r),B[l>>3]=+os(h,r),v7(e,s,l),m=u}function v7(e,n,r){e=e|0,n=n|0,r=r|0,b(e+8|0,t[n>>2]|0,+B[r>>3]),c[e+24>>0]=1}function m7(){return 1404}function y7(e,n){return e=e|0,n=+n,g7(e,n)|0}function g7(e,n){e=e|0,n=+n;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return u=m,m=m+16|0,s=u+4|0,h=u+8|0,D=u,l=Ma(8)|0,r=l,S=pn(16)|0,Rs(s,e),e=Ys(s,e)|0,Pl(h,n),b(S,e,+os(h,n)),h=r+4|0,t[h>>2]=S,e=pn(8)|0,h=t[h>>2]|0,t[D>>2]=0,t[s>>2]=t[D>>2],Uf(e,h,s),t[l>>2]=e,m=u,r|0}function _7(){var e=0;return c[7896]|0||(G3(10364),Vt(54,10364,ve|0)|0,e=7896,t[e>>2]=1,t[e+4>>2]=0),sr(10364)|0||G3(10364),10364}function G3(e){e=e|0,w7(e),Yp(e,55)}function E7(e){e=e|0,D7(e+24|0)}function D7(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function w7(e){e=e|0;var n=0;n=yr()|0,jn(e,5,4,n,x7()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function S7(e){e=e|0,T7(e)}function T7(e){e=e|0,C7(e)}function C7(e){e=e|0,Y3(e+8|0),c[e+24>>0]=1}function Y3(e){e=e|0,t[e>>2]=0,B[e+8>>3]=0}function x7(){return 1424}function R7(){return A7()|0}function A7(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0;return n=m,m=m+16|0,l=n+4|0,h=n,r=Ma(8)|0,e=r,u=pn(16)|0,Y3(u),s=e+4|0,t[s>>2]=u,u=pn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],Uf(u,s,l),t[r>>2]=u,m=n,e|0}function O7(e,n){e=e|0,n=n|0,t[e>>2]=M7()|0,t[e+4>>2]=k7()|0,t[e+12>>2]=n,t[e+8>>2]=L7()|0,t[e+32>>2]=5}function M7(){return 11710}function k7(){return 1416}function L7(){return __()|0}function N7(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Hl(u,896)|0)==512?r|0&&(F7(r),_t(r)):n|0&&_t(n)}function F7(e){e=e|0,e=t[e+4>>2]|0,e|0&&t2(e)}function __(){var e=0;return c[7904]|0||(t[2600]=P7()|0,t[2601]=0,e=7904,t[e>>2]=1,t[e+4>>2]=0),10400}function P7(){return t[357]|0}function I7(e){e=e|0,b7(e,4926),B7(e)|0}function b7(e,n){e=e|0,n=n|0;var r=0;r=Xa()|0,t[e>>2]=r,X7(r,n),e2(t[e>>2]|0)}function B7(e){e=e|0;var n=0;return n=t[e>>2]|0,Gp(n,U7()|0),e|0}function U7(){var e=0;return c[7912]|0||(K3(10412),Vt(56,10412,ve|0)|0,e=7912,t[e>>2]=1,t[e+4>>2]=0),sr(10412)|0||K3(10412),10412}function K3(e){e=e|0,H7(e),Yp(e,57)}function j7(e){e=e|0,z7(e+24|0)}function z7(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function H7(e){e=e|0;var n=0;n=yr()|0,jn(e,5,5,n,G7()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function q7(e){e=e|0,W7(e)}function W7(e){e=e|0,V7(e)}function V7(e){e=e|0;var n=0,r=0;n=e+8|0,r=n+48|0;do t[n>>2]=0,n=n+4|0;while((n|0)<(r|0));c[e+56>>0]=1}function G7(){return 1432}function Y7(){return K7()|0}function K7(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0,D=0;h=m,m=m+16|0,e=h+4|0,n=h,r=Ma(8)|0,u=r,l=pn(48)|0,s=l,D=s+48|0;do t[s>>2]=0,s=s+4|0;while((s|0)<(D|0));return s=u+4|0,t[s>>2]=l,D=pn(8)|0,s=t[s>>2]|0,t[n>>2]=0,t[e>>2]=t[n>>2],Th(D,s,e),t[r>>2]=D,m=h,u|0}function X7(e,n){e=e|0,n=n|0,t[e>>2]=Q7()|0,t[e+4>>2]=J7()|0,t[e+12>>2]=n,t[e+8>>2]=Z7()|0,t[e+32>>2]=6}function Q7(){return 11704}function J7(){return 1436}function Z7(){return __()|0}function $7(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Hl(u,896)|0)==512?r|0&&(eO(r),_t(r)):n|0&&_t(n)}function eO(e){e=e|0,e=t[e+4>>2]|0,e|0&&t2(e)}function tO(e){e=e|0,nO(e,4933),rO(e)|0,iO(e)|0}function nO(e,n){e=e|0,n=n|0;var r=0;r=AO()|0,t[e>>2]=r,OO(r,n),e2(t[e>>2]|0)}function rO(e){e=e|0;var n=0;return n=t[e>>2]|0,Gp(n,gO()|0),e|0}function iO(e){e=e|0;var n=0;return n=t[e>>2]|0,Gp(n,uO()|0),e|0}function uO(){var e=0;return c[7920]|0||(X3(10452),Vt(58,10452,ve|0)|0,e=7920,t[e>>2]=1,t[e+4>>2]=0),sr(10452)|0||X3(10452),10452}function X3(e){e=e|0,sO(e),Yp(e,1)}function oO(e){e=e|0,lO(e+24|0)}function lO(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function sO(e){e=e|0;var n=0;n=yr()|0,jn(e,5,1,n,dO()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function aO(e,n,r){e=e|0,n=+n,r=+r,fO(e,n,r)}function fO(e,n,r){e=e|0,n=+n,r=+r;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+32|0,s=u+8|0,D=u+17|0,l=u,h=u+16|0,Pl(D,n),B[s>>3]=+os(D,n),Pl(h,r),B[l>>3]=+os(h,r),cO(e,s,l),m=u}function cO(e,n,r){e=e|0,n=n|0,r=r|0,Q3(e+8|0,+B[n>>3],+B[r>>3]),c[e+24>>0]=1}function Q3(e,n,r){e=e|0,n=+n,r=+r,B[e>>3]=n,B[e+8>>3]=r}function dO(){return 1472}function pO(e,n){return e=+e,n=+n,hO(e,n)|0}function hO(e,n){e=+e,n=+n;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return u=m,m=m+16|0,h=u+4|0,D=u+8|0,S=u,l=Ma(8)|0,r=l,s=pn(16)|0,Pl(h,e),e=+os(h,e),Pl(D,n),Q3(s,e,+os(D,n)),D=r+4|0,t[D>>2]=s,s=pn(8)|0,D=t[D>>2]|0,t[S>>2]=0,t[h>>2]=t[S>>2],J3(s,D,h),t[l>>2]=s,m=u,r|0}function J3(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=pn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1452,t[r+12>>2]=n,t[e+4>>2]=r}function vO(e){e=e|0,Uv(e),_t(e)}function mO(e){e=e|0,e=t[e+12>>2]|0,e|0&&_t(e)}function yO(e){e=e|0,_t(e)}function gO(){var e=0;return c[7928]|0||(Z3(10488),Vt(59,10488,ve|0)|0,e=7928,t[e>>2]=1,t[e+4>>2]=0),sr(10488)|0||Z3(10488),10488}function Z3(e){e=e|0,DO(e),Yp(e,60)}function _O(e){e=e|0,EO(e+24|0)}function EO(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function DO(e){e=e|0;var n=0;n=yr()|0,jn(e,5,6,n,CO()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function wO(e){e=e|0,SO(e)}function SO(e){e=e|0,TO(e)}function TO(e){e=e|0,$3(e+8|0),c[e+24>>0]=1}function $3(e){e=e|0,t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,t[e+12>>2]=0}function CO(){return 1492}function xO(){return RO()|0}function RO(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0;return n=m,m=m+16|0,l=n+4|0,h=n,r=Ma(8)|0,e=r,u=pn(16)|0,$3(u),s=e+4|0,t[s>>2]=u,u=pn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],J3(u,s,l),t[r>>2]=u,m=n,e|0}function AO(){var e=0;return c[7936]|0||(PO(10524),Vt(25,10524,ve|0)|0,e=7936,t[e>>2]=1,t[e+4>>2]=0),10524}function OO(e,n){e=e|0,n=n|0,t[e>>2]=MO()|0,t[e+4>>2]=kO()|0,t[e+12>>2]=n,t[e+8>>2]=LO()|0,t[e+32>>2]=7}function MO(){return 11700}function kO(){return 1484}function LO(){return __()|0}function NO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Hl(u,896)|0)==512?r|0&&(FO(r),_t(r)):n|0&&_t(n)}function FO(e){e=e|0,e=t[e+4>>2]|0,e|0&&t2(e)}function PO(e){e=e|0,Qa(e)}function IO(e,n,r){e=e|0,n=n|0,r=r|0,e=Fr(n)|0,n=bO(r)|0,r=BO(r,0)|0,hM(e,n,r,kE()|0,0)}function bO(e){return e=e|0,e|0}function BO(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=kE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(t8(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(VO(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function kE(){var e=0,n=0;if(c[7944]|0||(e8(10568),Vt(61,10568,ve|0)|0,n=7944,t[n>>2]=1,t[n+4>>2]=0),!(sr(10568)|0)){e=10568,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));e8(10568)}return 10568}function e8(e){e=e|0,zO(e)}function UO(e){e=e|0,jO(e+24|0)}function jO(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function zO(e){e=e|0;var n=0;n=yr()|0,jn(e,1,17,n,ev()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function HO(e){return e=e|0,WO(t[(qO(e)|0)>>2]|0)|0}function qO(e){return e=e|0,(t[(kE()|0)+24>>2]|0)+(e<<3)|0}function WO(e){return e=e|0,qo(k_[e&7]()|0)|0}function t8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function VO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=GO(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,k=(t[e+8>>2]|0)-S|0,L=k>>2,YO(l,k>>3>>>0>>1>>>0?L>>>0>>0?h:L:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,t8(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,KO(e,l),XO(l),m=D;return}}function GO(e){return e=e|0,536870911}function YO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function KO(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function XO(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function QO(){JO()}function JO(){ZO(10604)}function ZO(e){e=e|0,$O(e,4955)}function $O(e,n){e=e|0,n=n|0;var r=0;r=eM()|0,t[e>>2]=r,tM(r,n),e2(t[e>>2]|0)}function eM(){var e=0;return c[7952]|0||(fM(10612),Vt(25,10612,ve|0)|0,e=7952,t[e>>2]=1,t[e+4>>2]=0),10612}function tM(e,n){e=e|0,n=n|0,t[e>>2]=uM()|0,t[e+4>>2]=oM()|0,t[e+12>>2]=n,t[e+8>>2]=lM()|0,t[e+32>>2]=8}function e2(e){e=e|0;var n=0,r=0;n=m,m=m+16|0,r=n,Fv()|0,t[r>>2]=e,nM(10608,r),m=n}function Fv(){return c[11714]|0||(t[2652]=0,Vt(62,10608,ve|0)|0,c[11714]=1),10608}function nM(e,n){e=e|0,n=n|0;var r=0;r=pn(8)|0,t[r+4>>2]=t[n>>2],t[r>>2]=t[e>>2],t[e>>2]=r}function rM(e){e=e|0,iM(e)}function iM(e){e=e|0;var n=0,r=0;if(n=t[e>>2]|0,n|0)do r=n,n=t[n>>2]|0,_t(r);while((n|0)!=0);t[e>>2]=0}function uM(){return 11715}function oM(){return 1496}function lM(){return N1()|0}function sM(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Hl(u,896)|0)==512?r|0&&(aM(r),_t(r)):n|0&&_t(n)}function aM(e){e=e|0,e=t[e+4>>2]|0,e|0&&t2(e)}function fM(e){e=e|0,Qa(e)}function cM(e,n){e=e|0,n=n|0;var r=0,u=0;Fv()|0,r=t[2652]|0;e:do if(r|0){for(;u=t[r+4>>2]|0,!(u|0?(I8(LE(u)|0,e)|0)==0:0);)if(r=t[r>>2]|0,!r)break e;dM(u,n)}while(0)}function LE(e){return e=e|0,t[e+12>>2]|0}function dM(e,n){e=e|0,n=n|0;var r=0;e=e+36|0,r=t[e>>2]|0,r|0&&(ca(r),_t(r)),r=pn(4)|0,Sf(r,n),t[e>>2]=r}function NE(){return c[11716]|0||(t[2664]=0,Vt(63,10656,ve|0)|0,c[11716]=1),10656}function n8(){var e=0;return c[11717]|0?e=t[2665]|0:(pM(),t[2665]=1504,c[11717]=1,e=1504),e|0}function pM(){c[11740]|0||(c[11718]=hn(hn(8,0)|0,0)|0,c[11719]=hn(hn(0,0)|0,0)|0,c[11720]=hn(hn(0,16)|0,0)|0,c[11721]=hn(hn(8,0)|0,0)|0,c[11722]=hn(hn(0,0)|0,0)|0,c[11723]=hn(hn(8,0)|0,0)|0,c[11724]=hn(hn(0,0)|0,0)|0,c[11725]=hn(hn(8,0)|0,0)|0,c[11726]=hn(hn(0,0)|0,0)|0,c[11727]=hn(hn(8,0)|0,0)|0,c[11728]=hn(hn(0,0)|0,0)|0,c[11729]=hn(hn(0,0)|0,32)|0,c[11730]=hn(hn(0,0)|0,32)|0,c[11740]=1)}function r8(){return 1572}function hM(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,L=0,k=0;s=m,m=m+32|0,k=s+16|0,L=s+12|0,S=s+8|0,D=s+4|0,h=s,t[k>>2]=e,t[L>>2]=n,t[S>>2]=r,t[D>>2]=u,t[h>>2]=l,NE()|0,vM(10656,k,L,S,D,h),m=s}function vM(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0;h=pn(24)|0,gd(h+4|0,t[n>>2]|0,t[r>>2]|0,t[u>>2]|0,t[l>>2]|0,t[s>>2]|0),t[h>>2]=t[e>>2],t[e>>2]=h}function i8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0,Be=0,Te=0,ye=0,Ze=0,Ge=0,ft=0;if(ft=m,m=m+32|0,Te=ft+20|0,ye=ft+8|0,Ze=ft+4|0,Ge=ft,n=t[n>>2]|0,n|0){Be=Te+4|0,S=Te+8|0,L=ye+4|0,k=ye+8|0,I=ye+8|0,K=Te+8|0;do{if(h=n+4|0,D=FE(h)|0,D|0){if(l=Ay(D)|0,t[Te>>2]=0,t[Be>>2]=0,t[S>>2]=0,u=(Oy(D)|0)+1|0,mM(Te,u),u|0)for(;u=u+-1|0,Yf(ye,t[l>>2]|0),s=t[Be>>2]|0,s>>>0<(t[K>>2]|0)>>>0?(t[s>>2]=t[ye>>2],t[Be>>2]=(t[Be>>2]|0)+4):PE(Te,ye),u;)l=l+4|0;u=My(D)|0,t[ye>>2]=0,t[L>>2]=0,t[k>>2]=0;e:do if(t[u>>2]|0)for(l=0,s=0;;){if((l|0)==(s|0)?yM(ye,u):(t[l>>2]=t[u>>2],t[L>>2]=(t[L>>2]|0)+4),u=u+4|0,!(t[u>>2]|0))break e;l=t[L>>2]|0,s=t[I>>2]|0}while(0);t[Ze>>2]=E_(h)|0,t[Ge>>2]=sr(D)|0,gM(r,e,Ze,Ge,Te,ye),IE(ye),F1(Te)}n=t[n>>2]|0}while((n|0)!=0)}m=ft}function FE(e){return e=e|0,t[e+12>>2]|0}function Ay(e){return e=e|0,t[e+12>>2]|0}function Oy(e){return e=e|0,t[e+16>>2]|0}function mM(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;l=m,m=m+32|0,r=l,u=t[e>>2]|0,(t[e+8>>2]|0)-u>>2>>>0>>0&&(d8(r,n,(t[e+4>>2]|0)-u>>2,e+8|0),p8(e,r),h8(r)),m=l}function PE(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0;if(h=m,m=m+32|0,r=h,u=e+4|0,l=((t[u>>2]|0)-(t[e>>2]|0)>>2)+1|0,s=c8(e)|0,s>>>0>>0)hi(e);else{D=t[e>>2]|0,L=(t[e+8>>2]|0)-D|0,S=L>>1,d8(r,L>>2>>>0>>1>>>0?S>>>0>>0?l:S:s,(t[u>>2]|0)-D>>2,e+8|0),s=r+8|0,t[t[s>>2]>>2]=t[n>>2],t[s>>2]=(t[s>>2]|0)+4,p8(e,r),h8(r),m=h;return}}function My(e){return e=e|0,t[e+8>>2]|0}function yM(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0;if(h=m,m=m+32|0,r=h,u=e+4|0,l=((t[u>>2]|0)-(t[e>>2]|0)>>2)+1|0,s=f8(e)|0,s>>>0>>0)hi(e);else{D=t[e>>2]|0,L=(t[e+8>>2]|0)-D|0,S=L>>1,bM(r,L>>2>>>0>>1>>>0?S>>>0>>0?l:S:s,(t[u>>2]|0)-D>>2,e+8|0),s=r+8|0,t[t[s>>2]>>2]=t[n>>2],t[s>>2]=(t[s>>2]|0)+4,BM(e,r),UM(r),m=h;return}}function E_(e){return e=e|0,t[e>>2]|0}function gM(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,_M(e,n,r,u,l,s)}function IE(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-4-u|0)>>>2)<<2)),_t(r))}function F1(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-4-u|0)>>>2)<<2)),_t(r))}function _M(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,L=0,k=0,I=0;h=m,m=m+48|0,k=h+40|0,D=h+32|0,I=h+24|0,S=h+12|0,L=h,ka(D),e=g0(e)|0,t[I>>2]=t[n>>2],r=t[r>>2]|0,u=t[u>>2]|0,bE(S,l),EM(L,s),t[k>>2]=t[I>>2],DM(e,k,r,u,S,L),IE(L),F1(S),La(D),m=h}function bE(e,n){e=e|0,n=n|0;var r=0,u=0;t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,r=n+4|0,u=(t[r>>2]|0)-(t[n>>2]|0)>>2,u|0&&(PM(e,u),IM(e,t[n>>2]|0,t[r>>2]|0,u))}function EM(e,n){e=e|0,n=n|0;var r=0,u=0;t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,r=n+4|0,u=(t[r>>2]|0)-(t[n>>2]|0)>>2,u|0&&(NM(e,u),FM(e,t[n>>2]|0,t[r>>2]|0,u))}function DM(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,L=0,k=0,I=0;h=m,m=m+32|0,k=h+28|0,I=h+24|0,D=h+12|0,S=h,L=_0(wM()|0)|0,t[I>>2]=t[n>>2],t[k>>2]=t[I>>2],n=Kp(k)|0,r=u8(r)|0,u=BE(u)|0,t[D>>2]=t[l>>2],k=l+4|0,t[D+4>>2]=t[k>>2],I=l+8|0,t[D+8>>2]=t[I>>2],t[I>>2]=0,t[k>>2]=0,t[l>>2]=0,l=UE(D)|0,t[S>>2]=t[s>>2],k=s+4|0,t[S+4>>2]=t[k>>2],I=s+8|0,t[S+8>>2]=t[I>>2],t[I>>2]=0,t[k>>2]=0,t[s>>2]=0,Qo(0,L|0,e|0,n|0,r|0,u|0,l|0,SM(S)|0)|0,IE(S),F1(D),m=h}function wM(){var e=0;return c[7968]|0||(kM(10708),e=7968,t[e>>2]=1,t[e+4>>2]=0),10708}function Kp(e){return e=e|0,l8(e)|0}function u8(e){return e=e|0,o8(e)|0}function BE(e){return e=e|0,qo(e)|0}function UE(e){return e=e|0,CM(e)|0}function SM(e){return e=e|0,TM(e)|0}function TM(e){e=e|0;var n=0,r=0,u=0;if(u=(t[e+4>>2]|0)-(t[e>>2]|0)|0,r=u>>2,u=Ma(u+4|0)|0,t[u>>2]=r,r|0){n=0;do t[u+4+(n<<2)>>2]=o8(t[(t[e>>2]|0)+(n<<2)>>2]|0)|0,n=n+1|0;while((n|0)!=(r|0))}return u|0}function o8(e){return e=e|0,e|0}function CM(e){e=e|0;var n=0,r=0,u=0;if(u=(t[e+4>>2]|0)-(t[e>>2]|0)|0,r=u>>2,u=Ma(u+4|0)|0,t[u>>2]=r,r|0){n=0;do t[u+4+(n<<2)>>2]=l8((t[e>>2]|0)+(n<<2)|0)|0,n=n+1|0;while((n|0)!=(r|0))}return u|0}function l8(e){e=e|0;var n=0,r=0,u=0,l=0;return l=m,m=m+32|0,n=l+12|0,r=l,u=Iu(s8()|0)|0,u?(is(n,u),kf(r,n),sF(e,r),e=xs(n)|0):e=xM(e)|0,m=l,e|0}function s8(){var e=0;return c[7960]|0||(MM(10664),Vt(25,10664,ve|0)|0,e=7960,t[e>>2]=1,t[e+4>>2]=0),10664}function xM(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0;return r=m,m=m+16|0,l=r+4|0,h=r,u=Ma(8)|0,n=u,D=pn(4)|0,t[D>>2]=t[e>>2],s=n+4|0,t[s>>2]=D,e=pn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],a8(e,s,l),t[u>>2]=e,m=r,n|0}function a8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=pn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1656,t[r+12>>2]=n,t[e+4>>2]=r}function RM(e){e=e|0,Uv(e),_t(e)}function AM(e){e=e|0,e=t[e+12>>2]|0,e|0&&_t(e)}function OM(e){e=e|0,_t(e)}function MM(e){e=e|0,Qa(e)}function kM(e){e=e|0,ll(e,LM()|0,5)}function LM(){return 1676}function NM(e,n){e=e|0,n=n|0;var r=0;if((f8(e)|0)>>>0>>0&&hi(e),n>>>0>1073741823)$n();else{r=pn(n<<2)|0,t[e+4>>2]=r,t[e>>2]=r,t[e+8>>2]=r+(n<<2);return}}function FM(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,u=e+4|0,e=r-n|0,(e|0)>0&&(gr(t[u>>2]|0,n|0,e|0)|0,t[u>>2]=(t[u>>2]|0)+(e>>>2<<2))}function f8(e){return e=e|0,1073741823}function PM(e,n){e=e|0,n=n|0;var r=0;if((c8(e)|0)>>>0>>0&&hi(e),n>>>0>1073741823)$n();else{r=pn(n<<2)|0,t[e+4>>2]=r,t[e>>2]=r,t[e+8>>2]=r+(n<<2);return}}function IM(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,u=e+4|0,e=r-n|0,(e|0)>0&&(gr(t[u>>2]|0,n|0,e|0)|0,t[u>>2]=(t[u>>2]|0)+(e>>>2<<2))}function c8(e){return e=e|0,1073741823}function bM(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>1073741823)$n();else{l=pn(n<<2)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<2)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<2)}function BM(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>2)<<2)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function UM(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-4-n|0)>>>2)<<2)),e=t[e>>2]|0,e|0&&_t(e)}function d8(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>1073741823)$n();else{l=pn(n<<2)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<2)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<2)}function p8(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>2)<<2)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|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>>>0<(t[r>>2]|0)>>>0?(t[D>>2]=t[Be>>2],t[e>>2]=(t[e>>2]|0)+4):PE(k,Be),h=t[h>>2]|0;while((h|0)!=0);VM(u,I,k),F1(k)}t[Te>>2]=t[I>>2],L=m8(S)|0,t[k>>2]=t[Te>>2],i8(k,L,l),Ed(K),s=t[s>>2]|0}while((s|0)!=0)}m=ye}function zM(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,rk(e,n,r,u)}function HM(e,n,r){e=e|0,n=n|0,r=r|0,nk(e,n,r)}function Pv(e){return e=e|0,e|0}function qM(e,n,r){e=e|0,n=n|0,r=r|0,ZM(e,n,r)}function v8(e){return e=e|0,e+16|0}function WM(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;if(s=m,m=m+16|0,l=s+8|0,r=s,t[e>>2]=0,u=t[n>>2]|0,t[l>>2]=u,t[r>>2]=e,r=JM(r)|0,u|0){if(u=pn(12)|0,h=(y8(l)|0)+4|0,e=t[h+4>>2]|0,n=u+4|0,t[n>>2]=t[h>>2],t[n+4>>2]=e,n=t[t[l>>2]>>2]|0,t[l>>2]=n,!n)e=u;else for(n=u;e=pn(12)|0,S=(y8(l)|0)+4|0,D=t[S+4>>2]|0,h=e+4|0,t[h>>2]=t[S>>2],t[h+4>>2]=D,t[n>>2]=e,h=t[t[l>>2]>>2]|0,t[l>>2]=h,h;)n=e;t[e>>2]=t[r>>2],t[r>>2]=u}m=s}function VM(e,n,r){e=e|0,n=n|0,r=r|0,GM(e,n,r)}function m8(e){return e=e|0,e+24|0}function GM(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+32|0,h=u+24|0,l=u+16|0,D=u+12|0,s=u,ka(l),e=g0(e)|0,t[D>>2]=t[n>>2],bE(s,r),t[h>>2]=t[D>>2],YM(e,h,s),F1(s),La(l),m=u}function YM(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+32|0,h=u+16|0,D=u+12|0,l=u,s=_0(KM()|0)|0,t[D>>2]=t[n>>2],t[h>>2]=t[D>>2],n=Kp(h)|0,t[l>>2]=t[r>>2],h=r+4|0,t[l+4>>2]=t[h>>2],D=r+8|0,t[l+8>>2]=t[D>>2],t[D>>2]=0,t[h>>2]=0,t[r>>2]=0,Io(0,s|0,e|0,n|0,UE(l)|0)|0,F1(l),m=u}function KM(){var e=0;return c[7976]|0||(XM(10720),e=7976,t[e>>2]=1,t[e+4>>2]=0),10720}function XM(e){e=e|0,ll(e,QM()|0,2)}function QM(){return 1732}function JM(e){return e=e|0,t[e>>2]|0}function y8(e){return e=e|0,t[e>>2]|0}function ZM(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+32|0,s=u+16|0,l=u+8|0,h=u,ka(l),e=g0(e)|0,t[h>>2]=t[n>>2],r=t[r>>2]|0,t[s>>2]=t[h>>2],g8(e,s,r),La(l),m=u}function g8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,s=u+4|0,h=u,l=_0($M()|0)|0,t[h>>2]=t[n>>2],t[s>>2]=t[h>>2],n=Kp(s)|0,Io(0,l|0,e|0,n|0,u8(r)|0)|0,m=u}function $M(){var e=0;return c[7984]|0||(ek(10732),e=7984,t[e>>2]=1,t[e+4>>2]=0),10732}function ek(e){e=e|0,ll(e,tk()|0,2)}function tk(){return 1744}function nk(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+32|0,s=u+16|0,l=u+8|0,h=u,ka(l),e=g0(e)|0,t[h>>2]=t[n>>2],r=t[r>>2]|0,t[s>>2]=t[h>>2],g8(e,s,r),La(l),m=u}function rk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+32|0,h=l+16|0,s=l+8|0,D=l,ka(s),e=g0(e)|0,t[D>>2]=t[n>>2],r=c[r>>0]|0,u=c[u>>0]|0,t[h>>2]=t[D>>2],ik(e,h,r,u),La(s),m=l}function ik(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,h=l+4|0,D=l,s=_0(uk()|0)|0,t[D>>2]=t[n>>2],t[h>>2]=t[D>>2],n=Kp(h)|0,r=Iv(r)|0,Hn(0,s|0,e|0,n|0,r|0,Iv(u)|0)|0,m=l}function uk(){var e=0;return c[7992]|0||(lk(10744),e=7992,t[e>>2]=1,t[e+4>>2]=0),10744}function Iv(e){return e=e|0,ok(e)|0}function ok(e){return e=e|0,e&255|0}function lk(e){e=e|0,ll(e,sk()|0,3)}function sk(){return 1756}function ak(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;switch(K=m,m=m+32|0,D=K+8|0,S=K+4|0,L=K+20|0,k=K,Ta(e,0),u=lF(n)|0,t[D>>2]=0,I=D+4|0,t[I>>2]=0,t[D+8>>2]=0,u<<24>>24){case 0:{c[L>>0]=0,fk(S,r,L),D_(e,S)|0,jo(S);break}case 8:{I=VE(n)|0,c[L>>0]=8,Yf(k,t[I+4>>2]|0),ck(S,r,L,k,I+8|0),D_(e,S)|0,jo(S);break}case 9:{if(s=VE(n)|0,n=t[s+4>>2]|0,n|0)for(h=D+8|0,l=s+12|0;n=n+-1|0,Yf(S,t[l>>2]|0),u=t[I>>2]|0,u>>>0<(t[h>>2]|0)>>>0?(t[u>>2]=t[S>>2],t[I>>2]=(t[I>>2]|0)+4):PE(D,S),n;)l=l+4|0;c[L>>0]=9,Yf(k,t[s+8>>2]|0),dk(S,r,L,k,D),D_(e,S)|0,jo(S);break}default:I=VE(n)|0,c[L>>0]=u,Yf(k,t[I+4>>2]|0),pk(S,r,L,k),D_(e,S)|0,jo(S)}F1(D),m=K}function fk(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,ka(l),n=g0(n)|0,xk(e,n,c[r>>0]|0),La(l),m=u}function D_(e,n){e=e|0,n=n|0;var r=0;return r=t[e>>2]|0,r|0&&qr(r|0),t[e>>2]=t[n>>2],t[n>>2]=0,e|0}function ck(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0;s=m,m=m+32|0,D=s+16|0,h=s+8|0,S=s,ka(h),n=g0(n)|0,r=c[r>>0]|0,t[S>>2]=t[u>>2],l=t[l>>2]|0,t[D>>2]=t[S>>2],wk(e,n,r,D,l),La(h),m=s}function dk(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,L=0;s=m,m=m+32|0,S=s+24|0,h=s+16|0,L=s+12|0,D=s,ka(h),n=g0(n)|0,r=c[r>>0]|0,t[L>>2]=t[u>>2],bE(D,l),t[S>>2]=t[L>>2],gk(e,n,r,S,D),F1(D),La(h),m=s}function pk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+32|0,h=l+16|0,s=l+8|0,D=l,ka(s),n=g0(n)|0,r=c[r>>0]|0,t[D>>2]=t[u>>2],t[h>>2]=t[D>>2],hk(e,n,r,h),La(s),m=l}function hk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+4|0,D=l,h=_0(vk()|0)|0,r=Iv(r)|0,t[D>>2]=t[u>>2],t[s>>2]=t[D>>2],w_(e,Io(0,h|0,n|0,r|0,Kp(s)|0)|0),m=l}function vk(){var e=0;return c[8e3]|0||(mk(10756),e=8e3,t[e>>2]=1,t[e+4>>2]=0),10756}function w_(e,n){e=e|0,n=n|0,Ta(e,n)}function mk(e){e=e|0,ll(e,yk()|0,2)}function yk(){return 1772}function gk(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,L=0;s=m,m=m+32|0,S=s+16|0,L=s+12|0,h=s,D=_0(_k()|0)|0,r=Iv(r)|0,t[L>>2]=t[u>>2],t[S>>2]=t[L>>2],u=Kp(S)|0,t[h>>2]=t[l>>2],S=l+4|0,t[h+4>>2]=t[S>>2],L=l+8|0,t[h+8>>2]=t[L>>2],t[L>>2]=0,t[S>>2]=0,t[l>>2]=0,w_(e,Hn(0,D|0,n|0,r|0,u|0,UE(h)|0)|0),F1(h),m=s}function _k(){var e=0;return c[8008]|0||(Ek(10768),e=8008,t[e>>2]=1,t[e+4>>2]=0),10768}function Ek(e){e=e|0,ll(e,Dk()|0,3)}function Dk(){return 1784}function wk(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0;s=m,m=m+16|0,D=s+4|0,S=s,h=_0(Sk()|0)|0,r=Iv(r)|0,t[S>>2]=t[u>>2],t[D>>2]=t[S>>2],u=Kp(D)|0,w_(e,Hn(0,h|0,n|0,r|0,u|0,BE(l)|0)|0),m=s}function Sk(){var e=0;return c[8016]|0||(Tk(10780),e=8016,t[e>>2]=1,t[e+4>>2]=0),10780}function Tk(e){e=e|0,ll(e,Ck()|0,3)}function Ck(){return 1800}function xk(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=_0(Rk()|0)|0,w_(e,Ki(0,u|0,n|0,Iv(r)|0)|0)}function Rk(){var e=0;return c[8024]|0||(Ak(10792),e=8024,t[e>>2]=1,t[e+4>>2]=0),10792}function Ak(e){e=e|0,ll(e,Ok()|0,1)}function Ok(){return 1816}function Mk(){kk(),Lk(),Nk()}function kk(){t[2702]=G8(65536)|0}function Lk(){$k(10856)}function Nk(){Fk(10816)}function Fk(e){e=e|0,Pk(e,5044),Ik(e)|0}function Pk(e,n){e=e|0,n=n|0;var r=0;r=s8()|0,t[e>>2]=r,Yk(r,n),e2(t[e>>2]|0)}function Ik(e){e=e|0;var n=0;return n=t[e>>2]|0,Gp(n,bk()|0),e|0}function bk(){var e=0;return c[8032]|0||(_8(10820),Vt(64,10820,ve|0)|0,e=8032,t[e>>2]=1,t[e+4>>2]=0),sr(10820)|0||_8(10820),10820}function _8(e){e=e|0,jk(e),Yp(e,25)}function Bk(e){e=e|0,Uk(e+24|0)}function Uk(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function jk(e){e=e|0;var n=0;n=yr()|0,jn(e,5,18,n,Wk()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function zk(e,n){e=e|0,n=n|0,Hk(e,n)}function Hk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;r=m,m=m+16|0,u=r,l=r+4|0,If(l,n),t[u>>2]=bf(l,n)|0,qk(e,u),m=r}function qk(e,n){e=e|0,n=n|0,E8(e+4|0,t[n>>2]|0),c[e+8>>0]=1}function E8(e,n){e=e|0,n=n|0,t[e>>2]=n}function Wk(){return 1824}function Vk(e){return e=e|0,Gk(e)|0}function Gk(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0;return r=m,m=m+16|0,l=r+4|0,h=r,u=Ma(8)|0,n=u,D=pn(4)|0,If(l,e),E8(D,bf(l,e)|0),s=n+4|0,t[s>>2]=D,e=pn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],a8(e,s,l),t[u>>2]=e,m=r,n|0}function Ma(e){e=e|0;var n=0,r=0;return e=e+7&-8,(e>>>0<=32768?(n=t[2701]|0,e>>>0<=(65536-n|0)>>>0):0)?(r=(t[2702]|0)+n|0,t[2701]=n+e,e=r):(e=G8(e+8|0)|0,t[e>>2]=t[2703],t[2703]=e,e=e+8|0),e|0}function Yk(e,n){e=e|0,n=n|0,t[e>>2]=Kk()|0,t[e+4>>2]=Xk()|0,t[e+12>>2]=n,t[e+8>>2]=Qk()|0,t[e+32>>2]=9}function Kk(){return 11744}function Xk(){return 1832}function Qk(){return __()|0}function Jk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Hl(u,896)|0)==512?r|0&&(Zk(r),_t(r)):n|0&&_t(n)}function Zk(e){e=e|0,e=t[e+4>>2]|0,e|0&&t2(e)}function $k(e){e=e|0,eL(e,5052),tL(e)|0,nL(e,5058,26)|0,rL(e,5069,1)|0,iL(e,5077,10)|0,uL(e,5087,19)|0,oL(e,5094,27)|0}function eL(e,n){e=e|0,n=n|0;var r=0;r=$N()|0,t[e>>2]=r,eF(r,n),e2(t[e>>2]|0)}function tL(e){e=e|0;var n=0;return n=t[e>>2]|0,Gp(n,UN()|0),e|0}function nL(e,n,r){return e=e|0,n=n|0,r=r|0,DN(e,Fr(n)|0,r,0),e|0}function rL(e,n,r){return e=e|0,n=n|0,r=r|0,oN(e,Fr(n)|0,r,0),e|0}function iL(e,n,r){return e=e|0,n=n|0,r=r|0,bL(e,Fr(n)|0,r,0),e|0}function uL(e,n,r){return e=e|0,n=n|0,r=r|0,wL(e,Fr(n)|0,r,0),e|0}function D8(e,n){e=e|0,n=n|0;var r=0,u=0;e:for(;;){for(r=t[2703]|0;;){if((r|0)==(n|0))break e;if(u=t[r>>2]|0,t[2703]=u,!r)r=u;else break}_t(r)}t[2701]=e}function oL(e,n,r){return e=e|0,n=n|0,r=r|0,lL(e,Fr(n)|0,r,0),e|0}function lL(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=jE()|0,e=sL(r)|0,wi(s,n,l,e,aL(r,u)|0,u)}function jE(){var e=0,n=0;if(c[8040]|0||(S8(10860),Vt(65,10860,ve|0)|0,n=8040,t[n>>2]=1,t[n+4>>2]=0),!(sr(10860)|0)){e=10860,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));S8(10860)}return 10860}function sL(e){return e=e|0,e|0}function aL(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=jE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(w8(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(fL(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function w8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function fL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=cL(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,k=(t[e+8>>2]|0)-S|0,L=k>>2,dL(l,k>>3>>>0>>1>>>0?L>>>0>>0?h:L:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,w8(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,pL(e,l),hL(l),m=D;return}}function cL(e){return e=e|0,536870911}function dL(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function pL(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function hL(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function S8(e){e=e|0,yL(e)}function vL(e){e=e|0,mL(e+24|0)}function mL(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function yL(e){e=e|0;var n=0;n=yr()|0,jn(e,1,11,n,gL()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function gL(){return 1840}function _L(e,n,r){e=e|0,n=n|0,r=r|0,DL(t[(EL(e)|0)>>2]|0,n,r)}function EL(e){return e=e|0,(t[(jE()|0)+24>>2]|0)+(e<<3)|0}function DL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;u=m,m=m+16|0,s=u+1|0,l=u,If(s,n),n=bf(s,n)|0,If(l,r),r=bf(l,r)|0,I1[e&31](n,r),m=u}function wL(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=zE()|0,e=SL(r)|0,wi(s,n,l,e,TL(r,u)|0,u)}function zE(){var e=0,n=0;if(c[8048]|0||(C8(10896),Vt(66,10896,ve|0)|0,n=8048,t[n>>2]=1,t[n+4>>2]=0),!(sr(10896)|0)){e=10896,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));C8(10896)}return 10896}function SL(e){return e=e|0,e|0}function TL(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=zE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(T8(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(CL(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function T8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function CL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=xL(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,k=(t[e+8>>2]|0)-S|0,L=k>>2,RL(l,k>>3>>>0>>1>>>0?L>>>0>>0?h:L:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,T8(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,AL(e,l),OL(l),m=D;return}}function xL(e){return e=e|0,536870911}function RL(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function AL(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function OL(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function C8(e){e=e|0,LL(e)}function ML(e){e=e|0,kL(e+24|0)}function kL(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function LL(e){e=e|0;var n=0;n=yr()|0,jn(e,1,11,n,NL()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function NL(){return 1852}function FL(e,n){return e=e|0,n=n|0,IL(t[(PL(e)|0)>>2]|0,n)|0}function PL(e){return e=e|0,(t[(zE()|0)+24>>2]|0)+(e<<3)|0}function IL(e,n){e=e|0,n=n|0;var r=0,u=0;return r=m,m=m+16|0,u=r,If(u,n),n=bf(u,n)|0,n=qo(Zp[e&31](n)|0)|0,m=r,n|0}function bL(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=HE()|0,e=BL(r)|0,wi(s,n,l,e,UL(r,u)|0,u)}function HE(){var e=0,n=0;if(c[8056]|0||(R8(10932),Vt(67,10932,ve|0)|0,n=8056,t[n>>2]=1,t[n+4>>2]=0),!(sr(10932)|0)){e=10932,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));R8(10932)}return 10932}function BL(e){return e=e|0,e|0}function UL(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=HE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(x8(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(jL(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function x8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function jL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=zL(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,k=(t[e+8>>2]|0)-S|0,L=k>>2,HL(l,k>>3>>>0>>1>>>0?L>>>0>>0?h:L:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,x8(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,qL(e,l),WL(l),m=D;return}}function zL(e){return e=e|0,536870911}function HL(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function qL(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function WL(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function R8(e){e=e|0,KL(e)}function VL(e){e=e|0,YL(e+24|0)}function YL(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function KL(e){e=e|0;var n=0;n=yr()|0,jn(e,1,7,n,XL()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function XL(){return 1860}function QL(e,n,r){return e=e|0,n=n|0,r=r|0,ZL(t[(JL(e)|0)>>2]|0,n,r)|0}function JL(e){return e=e|0,(t[(HE()|0)+24>>2]|0)+(e<<3)|0}function ZL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0;return u=m,m=m+32|0,h=u+12|0,s=u+8|0,D=u,S=u+16|0,l=u+4|0,$L(S,n),eN(D,S,n),Ks(l,r),r=Xs(l,r)|0,t[h>>2]=t[D>>2],Fy[e&15](s,h,r),r=tN(s)|0,jo(s),Qs(l),m=u,r|0}function $L(e,n){e=e|0,n=n|0}function eN(e,n,r){e=e|0,n=n|0,r=r|0,nN(e,r)}function tN(e){return e=e|0,g0(e)|0}function nN(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;l=m,m=m+16|0,r=l,u=n,u&1?(rN(r,0),eu(u|0,r|0)|0,iN(e,r),uN(r)):t[e>>2]=t[n>>2],m=l}function rN(e,n){e=e|0,n=n|0,cd(e,n),t[e+4>>2]=0,c[e+8>>0]=0}function iN(e,n){e=e|0,n=n|0,t[e>>2]=t[n+4>>2]}function uN(e){e=e|0,c[e+8>>0]=0}function oN(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=qE()|0,e=lN(r)|0,wi(s,n,l,e,sN(r,u)|0,u)}function qE(){var e=0,n=0;if(c[8064]|0||(O8(10968),Vt(68,10968,ve|0)|0,n=8064,t[n>>2]=1,t[n+4>>2]=0),!(sr(10968)|0)){e=10968,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));O8(10968)}return 10968}function lN(e){return e=e|0,e|0}function sN(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=qE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(A8(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(aN(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function A8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function aN(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=fN(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,k=(t[e+8>>2]|0)-S|0,L=k>>2,cN(l,k>>3>>>0>>1>>>0?L>>>0>>0?h:L:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,A8(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,dN(e,l),pN(l),m=D;return}}function fN(e){return e=e|0,536870911}function cN(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function dN(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function pN(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function O8(e){e=e|0,mN(e)}function hN(e){e=e|0,vN(e+24|0)}function vN(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function mN(e){e=e|0;var n=0;n=yr()|0,jn(e,1,1,n,yN()|0,5),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function yN(){return 1872}function gN(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,EN(t[(_N(e)|0)>>2]|0,n,r,u,l,s)}function _N(e){return e=e|0,(t[(qE()|0)+24>>2]|0)+(e<<3)|0}function EN(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,L=0,k=0,I=0;h=m,m=m+32|0,D=h+16|0,S=h+12|0,L=h+8|0,k=h+4|0,I=h,Ks(D,n),n=Xs(D,n)|0,Ks(S,r),r=Xs(S,r)|0,Ks(L,u),u=Xs(L,u)|0,Ks(k,l),l=Xs(k,l)|0,Ks(I,s),s=Xs(I,s)|0,J8[e&1](n,r,u,l,s),Qs(I),Qs(k),Qs(L),Qs(S),Qs(D),m=h}function DN(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=WE()|0,e=wN(r)|0,wi(s,n,l,e,SN(r,u)|0,u)}function WE(){var e=0,n=0;if(c[8072]|0||(k8(11004),Vt(69,11004,ve|0)|0,n=8072,t[n>>2]=1,t[n+4>>2]=0),!(sr(11004)|0)){e=11004,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));k8(11004)}return 11004}function wN(e){return e=e|0,e|0}function SN(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=WE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(M8(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(TN(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function M8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function TN(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=CN(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,k=(t[e+8>>2]|0)-S|0,L=k>>2,xN(l,k>>3>>>0>>1>>>0?L>>>0>>0?h:L:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,M8(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,RN(e,l),AN(l),m=D;return}}function CN(e){return e=e|0,536870911}function xN(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function RN(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function AN(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function k8(e){e=e|0,kN(e)}function ON(e){e=e|0,MN(e+24|0)}function MN(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function kN(e){e=e|0;var n=0;n=yr()|0,jn(e,1,12,n,LN()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function LN(){return 1896}function NN(e,n,r){e=e|0,n=n|0,r=r|0,PN(t[(FN(e)|0)>>2]|0,n,r)}function FN(e){return e=e|0,(t[(WE()|0)+24>>2]|0)+(e<<3)|0}function PN(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;u=m,m=m+16|0,s=u+4|0,l=u,IN(s,n),n=bN(s,n)|0,Ks(l,r),r=Xs(l,r)|0,I1[e&31](n,r),Qs(l),m=u}function IN(e,n){e=e|0,n=n|0}function bN(e,n){return e=e|0,n=n|0,BN(n)|0}function BN(e){return e=e|0,e|0}function UN(){var e=0;return c[8080]|0||(L8(11040),Vt(70,11040,ve|0)|0,e=8080,t[e>>2]=1,t[e+4>>2]=0),sr(11040)|0||L8(11040),11040}function L8(e){e=e|0,HN(e),Yp(e,71)}function jN(e){e=e|0,zN(e+24|0)}function zN(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function HN(e){e=e|0;var n=0;n=yr()|0,jn(e,5,7,n,GN()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function qN(e){e=e|0,WN(e)}function WN(e){e=e|0,VN(e)}function VN(e){e=e|0,c[e+8>>0]=1}function GN(){return 1936}function YN(){return KN()|0}function KN(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0;return n=m,m=m+16|0,l=n+4|0,h=n,r=Ma(8)|0,e=r,s=e+4|0,t[s>>2]=pn(1)|0,u=pn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],XN(u,s,l),t[r>>2]=u,m=n,e|0}function XN(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=pn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1916,t[r+12>>2]=n,t[e+4>>2]=r}function QN(e){e=e|0,Uv(e),_t(e)}function JN(e){e=e|0,e=t[e+12>>2]|0,e|0&&_t(e)}function ZN(e){e=e|0,_t(e)}function $N(){var e=0;return c[8088]|0||(oF(11076),Vt(25,11076,ve|0)|0,e=8088,t[e>>2]=1,t[e+4>>2]=0),11076}function eF(e,n){e=e|0,n=n|0,t[e>>2]=tF()|0,t[e+4>>2]=nF()|0,t[e+12>>2]=n,t[e+8>>2]=rF()|0,t[e+32>>2]=10}function tF(){return 11745}function nF(){return 1940}function rF(){return N1()|0}function iF(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Hl(u,896)|0)==512?r|0&&(uF(r),_t(r)):n|0&&_t(n)}function uF(e){e=e|0,e=t[e+4>>2]|0,e|0&&t2(e)}function oF(e){e=e|0,Qa(e)}function Yf(e,n){e=e|0,n=n|0,t[e>>2]=n}function VE(e){return e=e|0,t[e>>2]|0}function lF(e){return e=e|0,c[t[e>>2]>>0]|0}function sF(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,t[u>>2]=t[e>>2],aF(n,u)|0,m=r}function aF(e,n){e=e|0,n=n|0;var r=0;return r=fF(t[e>>2]|0,n)|0,n=e+4|0,t[(t[n>>2]|0)+8>>2]=r,t[(t[n>>2]|0)+8>>2]|0}function fF(e,n){e=e|0,n=n|0;var r=0,u=0;return r=m,m=m+16|0,u=r,ka(u),e=g0(e)|0,n=cF(e,t[n>>2]|0)|0,La(u),m=r,n|0}function ka(e){e=e|0,t[e>>2]=t[2701],t[e+4>>2]=t[2703]}function cF(e,n){e=e|0,n=n|0;var r=0;return r=_0(dF()|0)|0,Ki(0,r|0,e|0,BE(n)|0)|0}function La(e){e=e|0,D8(t[e>>2]|0,t[e+4>>2]|0)}function dF(){var e=0;return c[8096]|0||(pF(11120),e=8096,t[e>>2]=1,t[e+4>>2]=0),11120}function pF(e){e=e|0,ll(e,hF()|0,1)}function hF(){return 1948}function vF(){mF()}function mF(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0,Be=0,Te=0,ye=0;if(Te=m,m=m+16|0,k=Te+4|0,I=Te,bn(65536,10804,t[2702]|0,10812),r=n8()|0,n=t[r>>2]|0,e=t[n>>2]|0,e|0)for(u=t[r+8>>2]|0,r=t[r+4>>2]|0;Ql(e|0,M[r>>0]|0|0,c[u>>0]|0),n=n+4|0,e=t[n>>2]|0,e;)u=u+1|0,r=r+1|0;if(e=r8()|0,n=t[e>>2]|0,n|0)do k0(n|0,t[e+4>>2]|0),e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);break n}case 1:{h=My(u)|0,D=Ay(u)|0,S=(Oy(u)|0)+1|0,L=S_(u)|0,k=F8(n)|0,I=sr(u)|0,ye=E_(n)|0,f0(K|0,h|0,D|0,S|0,L|0,k|0,I|0,ye|0,GE(n)|0,YE(n)|0);break n}case 5:{L=My(u)|0,k=Ay(u)|0,I=(Oy(u)|0)+1|0,ye=S_(u)|0,f0(K|0,L|0,k|0,I|0,ye|0,TF(u)|0,sr(u)|0,0,0,0);break n}default:break n}while(0);r=t[r>>2]|0}while((r|0)!=0)}if(e=t[e>>2]|0,!e)break e}$n()}while(0);bs(),m=Te}function yF(){return 11703}function gF(e){e=e|0,c[e+40>>0]=0}function _F(e){return e=e|0,(c[e+40>>0]|0)!=0|0}function EF(e,n){return e=e|0,n=n|0,n=CF(n)|0,e=t[n>>2]|0,t[n>>2]=t[e>>2],_t(e),t[n>>2]|0}function DF(e){e=e|0,c[e+40>>0]=1}function N8(e){return e=e|0,t[e+20>>2]|0}function wF(e){return e=e|0,t[e+8>>2]|0}function SF(e){return e=e|0,t[e+32>>2]|0}function S_(e){return e=e|0,t[e+4>>2]|0}function F8(e){return e=e|0,t[e+4>>2]|0}function GE(e){return e=e|0,t[e+8>>2]|0}function YE(e){return e=e|0,t[e+16>>2]|0}function TF(e){return e=e|0,t[e+20>>2]|0}function CF(e){return e=e|0,t[e>>2]|0}function T_(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0,Be=0,Te=0,ye=0,Ze=0,Ge=0,ft=0,Me=0,Pe=0,Zt=0;Zt=m,m=m+16|0,K=Zt;do if(e>>>0<245){if(L=e>>>0<11?16:e+11&-8,e=L>>>3,I=t[2783]|0,r=I>>>e,r&3|0)return n=(r&1^1)+e|0,e=11172+(n<<1<<2)|0,r=e+8|0,u=t[r>>2]|0,l=u+8|0,s=t[l>>2]|0,(e|0)==(s|0)?t[2783]=I&~(1<>2]=e,t[r>>2]=s),Pe=n<<3,t[u+4>>2]=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,e=r;else break}t[e>>2]=0,r=n}else r=t[S+8>>2]|0,t[r+12>>2]=n,t[n+8>>2]=r,r=n;while(0);do if(l|0){if(n=t[S+28>>2]|0,e=11436+(n<<2)|0,(S|0)==(t[e>>2]|0)){if(t[e>>2]=r,!r){t[2784]=D&~(1<>2]|0)!=(S|0)&1)<<2)>>2]=r,!r)break;t[r+24>>2]=l,n=t[S+16>>2]|0,n|0&&(t[r+16>>2]=n,t[n+24>>2]=r),n=t[S+20>>2]|0,n|0&&(t[r+20>>2]=n,t[n+24>>2]=r)}while(0);return s>>>0<16?(Pe=s+L|0,t[S+4>>2]=Pe|3,Pe=S+Pe+4|0,t[Pe>>2]=t[Pe>>2]|1):(t[S+4>>2]=L|3,t[h+4>>2]=s|1,t[h+s>>2]=s,k|0&&(u=t[2788]|0,n=k>>>3,r=11172+(n<<1<<2)|0,n=1<>2]|0):(t[2783]=I|n,n=r,e=r+8|0),t[e>>2]=u,t[n+12>>2]=u,t[u+8>>2]=n,t[u+12>>2]=r),t[2785]=s,t[2788]=h),Pe=S+8|0,m=Zt,Pe|0}else I=L}else I=L}else I=L}else if(e>>>0<=4294967231)if(e=e+11|0,L=e&-8,S=t[2784]|0,S){u=0-L|0,e=e>>>8,e?L>>>0>16777215?D=31:(I=(e+1048320|0)>>>16&8,Me=e<>>16&4,Me=Me<>>16&2,D=14-(k|I|D)+(Me<>>15)|0,D=L>>>(D+7|0)&1|D<<1):D=0,r=t[11436+(D<<2)>>2]|0;e:do if(!r)r=0,e=0,Me=57;else for(e=0,h=L<<((D|0)==31?0:25-(D>>>1)|0),s=0;;){if(l=(t[r+4>>2]&-8)-L|0,l>>>0>>0)if(l)e=r,u=l;else{e=r,u=0,l=r,Me=61;break e}if(l=t[r+20>>2]|0,r=t[r+16+(h>>>31<<2)>>2]|0,s=(l|0)==0|(l|0)==(r|0)?s:l,l=(r|0)==0,l){r=s,Me=57;break}else h=h<<((l^1)&1)}while(0);if((Me|0)==57){if((r|0)==0&(e|0)==0){if(e=2<>>12&16,I=I>>>h,s=I>>>5&8,I=I>>>s,D=I>>>2&4,I=I>>>D,k=I>>>1&2,I=I>>>k,r=I>>>1&1,e=0,r=t[11436+((s|h|D|k|r)+(I>>>r)<<2)>>2]|0}r?(l=r,Me=61):(D=e,h=u)}if((Me|0)==61)for(;;)if(Me=0,r=(t[l+4>>2]&-8)-L|0,I=r>>>0>>0,r=I?r:u,e=I?l:e,l=t[l+16+(((t[l+16>>2]|0)==0&1)<<2)>>2]|0,l)u=r,Me=61;else{D=e,h=r;break}if((D|0)!=0?h>>>0<((t[2785]|0)-L|0)>>>0:0){if(s=D+L|0,D>>>0>=s>>>0)return Pe=0,m=Zt,Pe|0;l=t[D+24>>2]|0,n=t[D+12>>2]|0;do if((n|0)==(D|0)){if(e=D+20|0,n=t[e>>2]|0,!n&&(e=D+16|0,n=t[e>>2]|0,!n)){n=0;break}for(;;){if(r=n+20|0,u=t[r>>2]|0,u|0){n=u,e=r;continue}if(r=n+16|0,u=t[r>>2]|0,u)n=u,e=r;else break}t[e>>2]=0}else Pe=t[D+8>>2]|0,t[Pe+12>>2]=n,t[n+8>>2]=Pe;while(0);do if(l){if(e=t[D+28>>2]|0,r=11436+(e<<2)|0,(D|0)==(t[r>>2]|0)){if(t[r>>2]=n,!n){u=S&~(1<>2]|0)!=(D|0)&1)<<2)>>2]=n,!n){u=S;break}t[n+24>>2]=l,e=t[D+16>>2]|0,e|0&&(t[n+16>>2]=e,t[e+24>>2]=n),e=t[D+20>>2]|0,e&&(t[n+20>>2]=e,t[e+24>>2]=n),u=S}else u=S;while(0);do if(h>>>0>=16){if(t[D+4>>2]=L|3,t[s+4>>2]=h|1,t[s+h>>2]=h,n=h>>>3,h>>>0<256){r=11172+(n<<1<<2)|0,e=t[2783]|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=s,t[n+12>>2]=s,t[s+8>>2]=n,t[s+12>>2]=r;break}if(n=h>>>8,n?h>>>0>16777215?n=31:(Me=(n+1048320|0)>>>16&8,Pe=n<>>16&4,Pe=Pe<>>16&2,n=14-(ft|Me|n)+(Pe<>>15)|0,n=h>>>(n+7|0)&1|n<<1):n=0,r=11436+(n<<2)|0,t[s+28>>2]=n,e=s+16|0,t[e+4>>2]=0,t[e>>2]=0,e=1<>2]=s,t[s+24>>2]=r,t[s+12>>2]=s,t[s+8>>2]=s;break}for(e=h<<((n|0)==31?0:25-(n>>>1)|0),r=t[r>>2]|0;;){if((t[r+4>>2]&-8|0)==(h|0)){Me=97;break}if(u=r+16+(e>>>31<<2)|0,n=t[u>>2]|0,n)e=e<<1,r=n;else{Me=96;break}}if((Me|0)==96){t[u>>2]=s,t[s+24>>2]=r,t[s+12>>2]=s,t[s+8>>2]=s;break}else if((Me|0)==97){Me=r+8|0,Pe=t[Me>>2]|0,t[Pe+12>>2]=s,t[Me>>2]=s,t[s+8>>2]=Pe,t[s+12>>2]=r,t[s+24>>2]=0;break}}else Pe=h+L|0,t[D+4>>2]=Pe|3,Pe=D+Pe+4|0,t[Pe>>2]=t[Pe>>2]|1;while(0);return Pe=D+8|0,m=Zt,Pe|0}else I=L}else I=L;else I=-1;while(0);if(r=t[2785]|0,r>>>0>=I>>>0)return n=r-I|0,e=t[2788]|0,n>>>0>15?(Pe=e+I|0,t[2788]=Pe,t[2785]=n,t[Pe+4>>2]=n|1,t[Pe+n>>2]=n,t[e+4>>2]=I|3):(t[2785]=0,t[2788]=0,t[e+4>>2]=r|3,Pe=e+r+4|0,t[Pe>>2]=t[Pe>>2]|1),Pe=e+8|0,m=Zt,Pe|0;if(h=t[2786]|0,h>>>0>I>>>0)return ft=h-I|0,t[2786]=ft,Pe=t[2789]|0,Me=Pe+I|0,t[2789]=Me,t[Me+4>>2]=ft|1,t[Pe+4>>2]=I|3,Pe=Pe+8|0,m=Zt,Pe|0;if(t[2901]|0?e=t[2903]|0:(t[2903]=4096,t[2902]=4096,t[2904]=-1,t[2905]=-1,t[2906]=0,t[2894]=0,e=K&-16^1431655768,t[K>>2]=e,t[2901]=e,e=4096),D=I+48|0,S=I+47|0,s=e+S|0,l=0-e|0,L=s&l,L>>>0<=I>>>0||(e=t[2893]|0,e|0?(k=t[2891]|0,K=k+L|0,K>>>0<=k>>>0|K>>>0>e>>>0):0))return Pe=0,m=Zt,Pe|0;e:do if(t[2894]&4)n=0,Me=133;else{r=t[2789]|0;t:do if(r){for(u=11580;e=t[u>>2]|0,!(e>>>0<=r>>>0?(ye=u+4|0,(e+(t[ye>>2]|0)|0)>>>0>r>>>0):0);)if(e=t[u+8>>2]|0,e)u=e;else{Me=118;break t}if(n=s-h&l,n>>>0<2147483647)if(e=n2(n|0)|0,(e|0)==((t[u>>2]|0)+(t[ye>>2]|0)|0)){if((e|0)!=(-1|0)){h=n,s=e,Me=135;break e}}else u=e,Me=126;else n=0}else Me=118;while(0);do if((Me|0)==118)if(r=n2(0)|0,(r|0)!=(-1|0)?(n=r,Be=t[2902]|0,Te=Be+-1|0,n=((Te&n|0)==0?0:(Te+n&0-Be)-n|0)+L|0,Be=t[2891]|0,Te=n+Be|0,n>>>0>I>>>0&n>>>0<2147483647):0){if(ye=t[2893]|0,ye|0?Te>>>0<=Be>>>0|Te>>>0>ye>>>0:0){n=0;break}if(e=n2(n|0)|0,(e|0)==(r|0)){h=n,s=r,Me=135;break e}else u=e,Me=126}else n=0;while(0);do if((Me|0)==126){if(r=0-n|0,!(D>>>0>n>>>0&(n>>>0<2147483647&(u|0)!=(-1|0))))if((u|0)==(-1|0)){n=0;break}else{h=n,s=u,Me=135;break e}if(e=t[2903]|0,e=S-n+e&0-e,e>>>0>=2147483647){h=n,s=u,Me=135;break e}if((n2(e|0)|0)==(-1|0)){n2(r|0)|0,n=0;break}else{h=e+n|0,s=u,Me=135;break e}}while(0);t[2894]=t[2894]|4,Me=133}while(0);if((((Me|0)==133?L>>>0<2147483647:0)?(ft=n2(L|0)|0,ye=n2(0)|0,Ze=ye-ft|0,Ge=Ze>>>0>(I+40|0)>>>0,!((ft|0)==(-1|0)|Ge^1|ft>>>0>>0&((ft|0)!=(-1|0)&(ye|0)!=(-1|0))^1)):0)&&(h=Ge?Ze:n,s=ft,Me=135),(Me|0)==135){n=(t[2891]|0)+h|0,t[2891]=n,n>>>0>(t[2892]|0)>>>0&&(t[2892]=n),S=t[2789]|0;do if(S){for(n=11580;;){if(e=t[n>>2]|0,r=n+4|0,u=t[r>>2]|0,(s|0)==(e+u|0)){Me=145;break}if(l=t[n+8>>2]|0,l)n=l;else break}if(((Me|0)==145?(t[n+12>>2]&8|0)==0:0)?S>>>0>>0&S>>>0>=e>>>0:0){t[r>>2]=u+h,Pe=S+8|0,Pe=(Pe&7|0)==0?0:0-Pe&7,Me=S+Pe|0,Pe=(t[2786]|0)+(h-Pe)|0,t[2789]=Me,t[2786]=Pe,t[Me+4>>2]=Pe|1,t[Me+Pe+4>>2]=40,t[2790]=t[2905];break}for(s>>>0<(t[2787]|0)>>>0&&(t[2787]=s),r=s+h|0,n=11580;;){if((t[n>>2]|0)==(r|0)){Me=153;break}if(e=t[n+8>>2]|0,e)n=e;else break}if((Me|0)==153?(t[n+12>>2]&8|0)==0:0){t[n>>2]=s,k=n+4|0,t[k>>2]=(t[k>>2]|0)+h,k=s+8|0,k=s+((k&7|0)==0?0:0-k&7)|0,n=r+8|0,n=r+((n&7|0)==0?0:0-n&7)|0,L=k+I|0,D=n-k-I|0,t[k+4>>2]=I|3;do if((n|0)!=(S|0)){if((n|0)==(t[2788]|0)){Pe=(t[2785]|0)+D|0,t[2785]=Pe,t[2788]=L,t[L+4>>2]=Pe|1,t[L+Pe>>2]=Pe;break}if(e=t[n+4>>2]|0,(e&3|0)==1){h=e&-8,u=e>>>3;e:do if(e>>>0<256)if(e=t[n+8>>2]|0,r=t[n+12>>2]|0,(r|0)==(e|0)){t[2783]=t[2783]&~(1<>2]=r,t[r+8>>2]=e;break}else{s=t[n+24>>2]|0,e=t[n+12>>2]|0;do if((e|0)==(n|0)){if(u=n+16|0,r=u+4|0,e=t[r>>2]|0,!e)if(e=t[u>>2]|0,e)r=u;else{e=0;break}for(;;){if(u=e+20|0,l=t[u>>2]|0,l|0){e=l,r=u;continue}if(u=e+16|0,l=t[u>>2]|0,l)e=l,r=u;else break}t[r>>2]=0}else Pe=t[n+8>>2]|0,t[Pe+12>>2]=e,t[e+8>>2]=Pe;while(0);if(!s)break;r=t[n+28>>2]|0,u=11436+(r<<2)|0;do if((n|0)!=(t[u>>2]|0)){if(t[s+16+(((t[s+16>>2]|0)!=(n|0)&1)<<2)>>2]=e,!e)break e}else{if(t[u>>2]=e,e|0)break;t[2784]=t[2784]&~(1<>2]=s,r=n+16|0,u=t[r>>2]|0,u|0&&(t[e+16>>2]=u,t[u+24>>2]=e),r=t[r+4>>2]|0,!r)break;t[e+20>>2]=r,t[r+24>>2]=e}while(0);n=n+h|0,l=h+D|0}else l=D;if(n=n+4|0,t[n>>2]=t[n>>2]&-2,t[L+4>>2]=l|1,t[L+l>>2]=l,n=l>>>3,l>>>0<256){r=11172+(n<<1<<2)|0,e=t[2783]|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=L,t[n+12>>2]=L,t[L+8>>2]=n,t[L+12>>2]=r;break}n=l>>>8;do if(!n)n=0;else{if(l>>>0>16777215){n=31;break}Me=(n+1048320|0)>>>16&8,Pe=n<>>16&4,Pe=Pe<>>16&2,n=14-(ft|Me|n)+(Pe<>>15)|0,n=l>>>(n+7|0)&1|n<<1}while(0);if(u=11436+(n<<2)|0,t[L+28>>2]=n,e=L+16|0,t[e+4>>2]=0,t[e>>2]=0,e=t[2784]|0,r=1<>2]=L,t[L+24>>2]=u,t[L+12>>2]=L,t[L+8>>2]=L;break}for(e=l<<((n|0)==31?0:25-(n>>>1)|0),r=t[u>>2]|0;;){if((t[r+4>>2]&-8|0)==(l|0)){Me=194;break}if(u=r+16+(e>>>31<<2)|0,n=t[u>>2]|0,n)e=e<<1,r=n;else{Me=193;break}}if((Me|0)==193){t[u>>2]=L,t[L+24>>2]=r,t[L+12>>2]=L,t[L+8>>2]=L;break}else if((Me|0)==194){Me=r+8|0,Pe=t[Me>>2]|0,t[Pe+12>>2]=L,t[Me>>2]=L,t[L+8>>2]=Pe,t[L+12>>2]=r,t[L+24>>2]=0;break}}else Pe=(t[2786]|0)+D|0,t[2786]=Pe,t[2789]=L,t[L+4>>2]=Pe|1;while(0);return Pe=k+8|0,m=Zt,Pe|0}for(n=11580;e=t[n>>2]|0,!(e>>>0<=S>>>0?(Pe=e+(t[n+4>>2]|0)|0,Pe>>>0>S>>>0):0);)n=t[n+8>>2]|0;l=Pe+-47|0,e=l+8|0,e=l+((e&7|0)==0?0:0-e&7)|0,l=S+16|0,e=e>>>0>>0?S:e,n=e+8|0,r=s+8|0,r=(r&7|0)==0?0:0-r&7,Me=s+r|0,r=h+-40-r|0,t[2789]=Me,t[2786]=r,t[Me+4>>2]=r|1,t[Me+r+4>>2]=40,t[2790]=t[2905],r=e+4|0,t[r>>2]=27,t[n>>2]=t[2895],t[n+4>>2]=t[2896],t[n+8>>2]=t[2897],t[n+12>>2]=t[2898],t[2895]=s,t[2896]=h,t[2898]=0,t[2897]=n,n=e+24|0;do Me=n,n=n+4|0,t[n>>2]=7;while((Me+8|0)>>>0>>0);if((e|0)!=(S|0)){if(s=e-S|0,t[r>>2]=t[r>>2]&-2,t[S+4>>2]=s|1,t[e>>2]=s,n=s>>>3,s>>>0<256){r=11172+(n<<1<<2)|0,e=t[2783]|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=S,t[n+12>>2]=S,t[S+8>>2]=n,t[S+12>>2]=r;break}if(n=s>>>8,n?s>>>0>16777215?r=31:(Me=(n+1048320|0)>>>16&8,Pe=n<>>16&4,Pe=Pe<>>16&2,r=14-(ft|Me|r)+(Pe<>>15)|0,r=s>>>(r+7|0)&1|r<<1):r=0,u=11436+(r<<2)|0,t[S+28>>2]=r,t[S+20>>2]=0,t[l>>2]=0,n=t[2784]|0,e=1<>2]=S,t[S+24>>2]=u,t[S+12>>2]=S,t[S+8>>2]=S;break}for(e=s<<((r|0)==31?0:25-(r>>>1)|0),r=t[u>>2]|0;;){if((t[r+4>>2]&-8|0)==(s|0)){Me=216;break}if(u=r+16+(e>>>31<<2)|0,n=t[u>>2]|0,n)e=e<<1,r=n;else{Me=215;break}}if((Me|0)==215){t[u>>2]=S,t[S+24>>2]=r,t[S+12>>2]=S,t[S+8>>2]=S;break}else if((Me|0)==216){Me=r+8|0,Pe=t[Me>>2]|0,t[Pe+12>>2]=S,t[Me>>2]=S,t[S+8>>2]=Pe,t[S+12>>2]=r,t[S+24>>2]=0;break}}}else{Pe=t[2787]|0,(Pe|0)==0|s>>>0>>0&&(t[2787]=s),t[2895]=s,t[2896]=h,t[2898]=0,t[2792]=t[2901],t[2791]=-1,n=0;do Pe=11172+(n<<1<<2)|0,t[Pe+12>>2]=Pe,t[Pe+8>>2]=Pe,n=n+1|0;while((n|0)!=32);Pe=s+8|0,Pe=(Pe&7|0)==0?0:0-Pe&7,Me=s+Pe|0,Pe=h+-40-Pe|0,t[2789]=Me,t[2786]=Pe,t[Me+4>>2]=Pe|1,t[Me+Pe+4>>2]=40,t[2790]=t[2905]}while(0);if(n=t[2786]|0,n>>>0>I>>>0)return ft=n-I|0,t[2786]=ft,Pe=t[2789]|0,Me=Pe+I|0,t[2789]=Me,t[Me+4>>2]=ft|1,t[Pe+4>>2]=I|3,Pe=Pe+8|0,m=Zt,Pe|0}return t[(bv()|0)>>2]=12,Pe=0,m=Zt,Pe|0}function C_(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0;if(!!e){r=e+-8|0,l=t[2787]|0,e=t[e+-4>>2]|0,n=e&-8,S=r+n|0;do if(e&1)D=r,h=r;else{if(u=t[r>>2]|0,!(e&3)||(h=r+(0-u)|0,s=u+n|0,h>>>0>>0))return;if((h|0)==(t[2788]|0)){if(e=S+4|0,n=t[e>>2]|0,(n&3|0)!=3){D=h,n=s;break}t[2785]=s,t[e>>2]=n&-2,t[h+4>>2]=s|1,t[h+s>>2]=s;return}if(r=u>>>3,u>>>0<256)if(e=t[h+8>>2]|0,n=t[h+12>>2]|0,(n|0)==(e|0)){t[2783]=t[2783]&~(1<>2]=n,t[n+8>>2]=e,D=h,n=s;break}l=t[h+24>>2]|0,e=t[h+12>>2]|0;do if((e|0)==(h|0)){if(r=h+16|0,n=r+4|0,e=t[n>>2]|0,!e)if(e=t[r>>2]|0,e)n=r;else{e=0;break}for(;;){if(r=e+20|0,u=t[r>>2]|0,u|0){e=u,n=r;continue}if(r=e+16|0,u=t[r>>2]|0,u)e=u,n=r;else break}t[n>>2]=0}else D=t[h+8>>2]|0,t[D+12>>2]=e,t[e+8>>2]=D;while(0);if(l){if(n=t[h+28>>2]|0,r=11436+(n<<2)|0,(h|0)==(t[r>>2]|0)){if(t[r>>2]=e,!e){t[2784]=t[2784]&~(1<>2]|0)!=(h|0)&1)<<2)>>2]=e,!e){D=h,n=s;break}t[e+24>>2]=l,n=h+16|0,r=t[n>>2]|0,r|0&&(t[e+16>>2]=r,t[r+24>>2]=e),n=t[n+4>>2]|0,n?(t[e+20>>2]=n,t[n+24>>2]=e,D=h,n=s):(D=h,n=s)}else D=h,n=s}while(0);if(!(h>>>0>=S>>>0)&&(e=S+4|0,u=t[e>>2]|0,!!(u&1))){if(u&2)t[e>>2]=u&-2,t[D+4>>2]=n|1,t[h+n>>2]=n,l=n;else{if(e=t[2788]|0,(S|0)==(t[2789]|0)){if(S=(t[2786]|0)+n|0,t[2786]=S,t[2789]=D,t[D+4>>2]=S|1,(D|0)!=(e|0))return;t[2788]=0,t[2785]=0;return}if((S|0)==(e|0)){S=(t[2785]|0)+n|0,t[2785]=S,t[2788]=h,t[D+4>>2]=S|1,t[h+S>>2]=S;return}l=(u&-8)+n|0,r=u>>>3;do if(u>>>0<256)if(n=t[S+8>>2]|0,e=t[S+12>>2]|0,(e|0)==(n|0)){t[2783]=t[2783]&~(1<>2]=e,t[e+8>>2]=n;break}else{s=t[S+24>>2]|0,e=t[S+12>>2]|0;do if((e|0)==(S|0)){if(r=S+16|0,n=r+4|0,e=t[n>>2]|0,!e)if(e=t[r>>2]|0,e)n=r;else{r=0;break}for(;;){if(r=e+20|0,u=t[r>>2]|0,u|0){e=u,n=r;continue}if(r=e+16|0,u=t[r>>2]|0,u)e=u,n=r;else break}t[n>>2]=0,r=e}else r=t[S+8>>2]|0,t[r+12>>2]=e,t[e+8>>2]=r,r=e;while(0);if(s|0){if(e=t[S+28>>2]|0,n=11436+(e<<2)|0,(S|0)==(t[n>>2]|0)){if(t[n>>2]=r,!r){t[2784]=t[2784]&~(1<>2]|0)!=(S|0)&1)<<2)>>2]=r,!r)break;t[r+24>>2]=s,e=S+16|0,n=t[e>>2]|0,n|0&&(t[r+16>>2]=n,t[n+24>>2]=r),e=t[e+4>>2]|0,e|0&&(t[r+20>>2]=e,t[e+24>>2]=r)}}while(0);if(t[D+4>>2]=l|1,t[h+l>>2]=l,(D|0)==(t[2788]|0)){t[2785]=l;return}}if(e=l>>>3,l>>>0<256){r=11172+(e<<1<<2)|0,n=t[2783]|0,e=1<>2]|0):(t[2783]=n|e,e=r,n=r+8|0),t[n>>2]=D,t[e+12>>2]=D,t[D+8>>2]=e,t[D+12>>2]=r;return}e=l>>>8,e?l>>>0>16777215?e=31:(h=(e+1048320|0)>>>16&8,S=e<>>16&4,S=S<>>16&2,e=14-(s|h|e)+(S<>>15)|0,e=l>>>(e+7|0)&1|e<<1):e=0,u=11436+(e<<2)|0,t[D+28>>2]=e,t[D+20>>2]=0,t[D+16>>2]=0,n=t[2784]|0,r=1<>>1)|0),r=t[u>>2]|0;;){if((t[r+4>>2]&-8|0)==(l|0)){e=73;break}if(u=r+16+(n>>>31<<2)|0,e=t[u>>2]|0,e)n=n<<1,r=e;else{e=72;break}}if((e|0)==72){t[u>>2]=D,t[D+24>>2]=r,t[D+12>>2]=D,t[D+8>>2]=D;break}else if((e|0)==73){h=r+8|0,S=t[h>>2]|0,t[S+12>>2]=D,t[h>>2]=D,t[D+8>>2]=S,t[D+12>>2]=r,t[D+24>>2]=0;break}}else t[2784]=n|r,t[u>>2]=D,t[D+24>>2]=u,t[D+12>>2]=D,t[D+8>>2]=D;while(0);if(S=(t[2791]|0)+-1|0,t[2791]=S,!S)e=11588;else return;for(;e=t[e>>2]|0,e;)e=e+8|0;t[2791]=-1}}}function xF(){return 11628}function RF(e){e=e|0;var n=0,r=0;return n=m,m=m+16|0,r=n,t[r>>2]=MF(t[e+60>>2]|0)|0,e=x_(Ou(6,r|0)|0)|0,m=n,e|0}function P8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0,Be=0;I=m,m=m+48|0,L=I+16|0,s=I,l=I+32|0,D=e+28|0,u=t[D>>2]|0,t[l>>2]=u,S=e+20|0,u=(t[S>>2]|0)-u|0,t[l+4>>2]=u,t[l+8>>2]=n,t[l+12>>2]=r,u=u+r|0,h=e+60|0,t[s>>2]=t[h>>2],t[s+4>>2]=l,t[s+8>>2]=2,s=x_(mo(146,s|0)|0)|0;e:do if((u|0)!=(s|0)){for(n=2;!((s|0)<0);)if(u=u-s|0,Be=t[l+4>>2]|0,K=s>>>0>Be>>>0,l=K?l+8|0:l,n=(K<<31>>31)+n|0,Be=s-(K?Be:0)|0,t[l>>2]=(t[l>>2]|0)+Be,K=l+4|0,t[K>>2]=(t[K>>2]|0)-Be,t[L>>2]=t[h>>2],t[L+4>>2]=l,t[L+8>>2]=n,s=x_(mo(146,L|0)|0)|0,(u|0)==(s|0)){k=3;break e}t[e+16>>2]=0,t[D>>2]=0,t[S>>2]=0,t[e>>2]=t[e>>2]|32,(n|0)==2?r=0:r=r-(t[l+4>>2]|0)|0}else k=3;while(0);return(k|0)==3&&(Be=t[e+44>>2]|0,t[e+16>>2]=Be+(t[e+48>>2]|0),t[D>>2]=Be,t[S>>2]=Be),m=I,r|0}function AF(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;return l=m,m=m+32|0,s=l,u=l+20|0,t[s>>2]=t[e+60>>2],t[s+4>>2]=0,t[s+8>>2]=n,t[s+12>>2]=u,t[s+16>>2]=r,(x_(Li(140,s|0)|0)|0)<0?(t[u>>2]=-1,e=-1):e=t[u>>2]|0,m=l,e|0}function x_(e){return e=e|0,e>>>0>4294963200&&(t[(bv()|0)>>2]=0-e,e=-1),e|0}function bv(){return(OF()|0)+64|0}function OF(){return KE()|0}function KE(){return 2084}function MF(e){return e=e|0,e|0}function kF(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;return l=m,m=m+32|0,u=l,t[e+36>>2]=1,((t[e>>2]&64|0)==0?(t[u>>2]=t[e+60>>2],t[u+4>>2]=21523,t[u+8>>2]=l+16,bo(54,u|0)|0):0)&&(c[e+75>>0]=-1),u=P8(e,n,r)|0,m=l,u|0}function I8(e,n){e=e|0,n=n|0;var r=0,u=0;if(r=c[e>>0]|0,u=c[n>>0]|0,r<<24>>24==0?1:r<<24>>24!=u<<24>>24)e=u;else{do e=e+1|0,n=n+1|0,r=c[e>>0]|0,u=c[n>>0]|0;while(!(r<<24>>24==0?1:r<<24>>24!=u<<24>>24));e=u}return(r&255)-(e&255)|0}function LF(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;e:do if(!r)e=0;else{for(;u=c[e>>0]|0,l=c[n>>0]|0,u<<24>>24==l<<24>>24;)if(r=r+-1|0,r)e=e+1|0,n=n+1|0;else{e=0;break e}e=(u&255)-(l&255)|0}while(0);return e|0}function b8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0,Be=0,Te=0,ye=0;ye=m,m=m+224|0,k=ye+120|0,I=ye+80|0,Be=ye,Te=ye+136|0,u=I,l=u+40|0;do t[u>>2]=0,u=u+4|0;while((u|0)<(l|0));return t[k>>2]=t[r>>2],(XE(0,n,k,Be,I)|0)<0?r=-1:((t[e+76>>2]|0)>-1?K=NF(e)|0:K=0,r=t[e>>2]|0,L=r&32,(c[e+74>>0]|0)<1&&(t[e>>2]=r&-33),u=e+48|0,t[u>>2]|0?r=XE(e,n,k,Be,I)|0:(l=e+44|0,s=t[l>>2]|0,t[l>>2]=Te,h=e+28|0,t[h>>2]=Te,D=e+20|0,t[D>>2]=Te,t[u>>2]=80,S=e+16|0,t[S>>2]=Te+80,r=XE(e,n,k,Be,I)|0,s&&(M_[t[e+36>>2]&7](e,0,0)|0,r=(t[D>>2]|0)==0?-1:r,t[l>>2]=s,t[u>>2]=0,t[S>>2]=0,t[h>>2]=0,t[D>>2]=0)),u=t[e>>2]|0,t[e>>2]=u|L,K|0&&FF(e),r=(u&32|0)==0?r:-1),m=ye,r|0}function XE(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0,Be=0,Te=0,ye=0,Ze=0,Ge=0,ft=0,Me=0,Pe=0,Zt=0,Br=0,In=0,gn=0,_r=0,Pr=0,Ln=0;Ln=m,m=m+64|0,In=Ln+16|0,gn=Ln,Zt=Ln+24|0,_r=Ln+8|0,Pr=Ln+20|0,t[In>>2]=n,ft=(e|0)!=0,Me=Zt+40|0,Pe=Me,Zt=Zt+39|0,Br=_r+4|0,h=0,s=0,k=0;e:for(;;){do if((s|0)>-1)if((h|0)>(2147483647-s|0)){t[(bv()|0)>>2]=75,s=-1;break}else{s=h+s|0;break}while(0);if(h=c[n>>0]|0,h<<24>>24)D=n;else{Ge=87;break}t:for(;;){switch(h<<24>>24){case 37:{h=D,Ge=9;break t}case 0:{h=D;break t}default:}Ze=D+1|0,t[In>>2]=Ze,h=c[Ze>>0]|0,D=Ze}t:do if((Ge|0)==9)for(;;){if(Ge=0,(c[D+1>>0]|0)!=37)break t;if(h=h+1|0,D=D+2|0,t[In>>2]=D,(c[D>>0]|0)==37)Ge=9;else break}while(0);if(h=h-n|0,ft&&Y0(e,n,h),h|0){n=D;continue}S=D+1|0,h=(c[S>>0]|0)+-48|0,h>>>0<10?(Ze=(c[D+2>>0]|0)==36,ye=Ze?h:-1,k=Ze?1:k,S=Ze?D+3|0:S):ye=-1,t[In>>2]=S,h=c[S>>0]|0,D=(h<<24>>24)+-32|0;t:do if(D>>>0<32)for(L=0,I=h;;){if(h=1<>2]=S,h=c[S>>0]|0,D=(h<<24>>24)+-32|0,D>>>0>=32)break;I=h}else L=0;while(0);if(h<<24>>24==42){if(D=S+1|0,h=(c[D>>0]|0)+-48|0,h>>>0<10?(c[S+2>>0]|0)==36:0)t[l+(h<<2)>>2]=10,h=t[u+((c[D>>0]|0)+-48<<3)>>2]|0,k=1,S=S+3|0;else{if(k|0){s=-1;break}ft?(k=(t[r>>2]|0)+(4-1)&~(4-1),h=t[k>>2]|0,t[r>>2]=k+4,k=0,S=D):(h=0,k=0,S=D)}t[In>>2]=S,Ze=(h|0)<0,h=Ze?0-h|0:h,L=Ze?L|8192:L}else{if(h=B8(In)|0,(h|0)<0){s=-1;break}S=t[In>>2]|0}do if((c[S>>0]|0)==46){if((c[S+1>>0]|0)!=42){t[In>>2]=S+1,D=B8(In)|0,S=t[In>>2]|0;break}if(I=S+2|0,D=(c[I>>0]|0)+-48|0,D>>>0<10?(c[S+3>>0]|0)==36:0){t[l+(D<<2)>>2]=10,D=t[u+((c[I>>0]|0)+-48<<3)>>2]|0,S=S+4|0,t[In>>2]=S;break}if(k|0){s=-1;break e}ft?(Ze=(t[r>>2]|0)+(4-1)&~(4-1),D=t[Ze>>2]|0,t[r>>2]=Ze+4):D=0,t[In>>2]=I,S=I}else D=-1;while(0);for(Te=0;;){if(((c[S>>0]|0)+-65|0)>>>0>57){s=-1;break e}if(Ze=S+1|0,t[In>>2]=Ze,I=c[(c[S>>0]|0)+-65+(5178+(Te*58|0))>>0]|0,K=I&255,(K+-1|0)>>>0<8)Te=K,S=Ze;else break}if(!(I<<24>>24)){s=-1;break}Be=(ye|0)>-1;do if(I<<24>>24==19)if(Be){s=-1;break e}else Ge=49;else{if(Be){t[l+(ye<<2)>>2]=K,Be=u+(ye<<3)|0,ye=t[Be+4>>2]|0,Ge=gn,t[Ge>>2]=t[Be>>2],t[Ge+4>>2]=ye,Ge=49;break}if(!ft){s=0;break e}U8(gn,K,r)}while(0);if((Ge|0)==49?(Ge=0,!ft):0){h=0,n=Ze;continue}S=c[S>>0]|0,S=(Te|0)!=0&(S&15|0)==3?S&-33:S,Be=L&-65537,ye=(L&8192|0)==0?L:Be;t:do switch(S|0){case 110:switch((Te&255)<<24>>24){case 0:{t[t[gn>>2]>>2]=s,h=0,n=Ze;continue e}case 1:{t[t[gn>>2]>>2]=s,h=0,n=Ze;continue e}case 2:{h=t[gn>>2]|0,t[h>>2]=s,t[h+4>>2]=((s|0)<0)<<31>>31,h=0,n=Ze;continue e}case 3:{_[t[gn>>2]>>1]=s,h=0,n=Ze;continue e}case 4:{c[t[gn>>2]>>0]=s,h=0,n=Ze;continue e}case 6:{t[t[gn>>2]>>2]=s,h=0,n=Ze;continue e}case 7:{h=t[gn>>2]|0,t[h>>2]=s,t[h+4>>2]=((s|0)<0)<<31>>31,h=0,n=Ze;continue e}default:{h=0,n=Ze;continue e}}case 112:{S=120,D=D>>>0>8?D:8,n=ye|8,Ge=61;break}case 88:case 120:{n=ye,Ge=61;break}case 111:{S=gn,n=t[S>>2]|0,S=t[S+4>>2]|0,K=IF(n,S,Me)|0,Be=Pe-K|0,L=0,I=5642,D=(ye&8|0)==0|(D|0)>(Be|0)?D:Be+1|0,Be=ye,Ge=67;break}case 105:case 100:if(S=gn,n=t[S>>2]|0,S=t[S+4>>2]|0,(S|0)<0){n=R_(0,0,n|0,S|0)|0,S=tt,L=gn,t[L>>2]=n,t[L+4>>2]=S,L=1,I=5642,Ge=66;break t}else{L=(ye&2049|0)!=0&1,I=(ye&2048|0)==0?(ye&1|0)==0?5642:5644:5643,Ge=66;break t}case 117:{S=gn,L=0,I=5642,n=t[S>>2]|0,S=t[S+4>>2]|0,Ge=66;break}case 99:{c[Zt>>0]=t[gn>>2],n=Zt,L=0,I=5642,K=Me,S=1,D=Be;break}case 109:{S=bF(t[(bv()|0)>>2]|0)|0,Ge=71;break}case 115:{S=t[gn>>2]|0,S=S|0?S:5652,Ge=71;break}case 67:{t[_r>>2]=t[gn>>2],t[Br>>2]=0,t[gn>>2]=_r,K=-1,S=_r,Ge=75;break}case 83:{n=t[gn>>2]|0,D?(K=D,S=n,Ge=75):(_l(e,32,h,0,ye),n=0,Ge=84);break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{h=UF(e,+B[gn>>3],h,D,ye,S)|0,n=Ze;continue e}default:L=0,I=5642,K=Me,S=D,D=ye}while(0);t:do if((Ge|0)==61)ye=gn,Te=t[ye>>2]|0,ye=t[ye+4>>2]|0,K=PF(Te,ye,Me,S&32)|0,I=(n&8|0)==0|(Te|0)==0&(ye|0)==0,L=I?0:2,I=I?5642:5642+(S>>4)|0,Be=n,n=Te,S=ye,Ge=67;else if((Ge|0)==66)K=Bv(n,S,Me)|0,Be=ye,Ge=67;else if((Ge|0)==71)Ge=0,ye=BF(S,0,D)|0,Te=(ye|0)==0,n=S,L=0,I=5642,K=Te?S+D|0:ye,S=Te?D:ye-S|0,D=Be;else if((Ge|0)==75){for(Ge=0,I=S,n=0,D=0;L=t[I>>2]|0,!(!L||(D=j8(Pr,L)|0,(D|0)<0|D>>>0>(K-n|0)>>>0));)if(n=D+n|0,K>>>0>n>>>0)I=I+4|0;else break;if((D|0)<0){s=-1;break e}if(_l(e,32,h,n,ye),!n)n=0,Ge=84;else for(L=0;;){if(D=t[S>>2]|0,!D){Ge=84;break t}if(D=j8(Pr,D)|0,L=D+L|0,(L|0)>(n|0)){Ge=84;break t}if(Y0(e,Pr,D),L>>>0>=n>>>0){Ge=84;break}else S=S+4|0}}while(0);if((Ge|0)==67)Ge=0,S=(n|0)!=0|(S|0)!=0,ye=(D|0)!=0|S,S=((S^1)&1)+(Pe-K)|0,n=ye?K:Me,K=Me,S=ye?(D|0)>(S|0)?D:S:D,D=(D|0)>-1?Be&-65537:Be;else if((Ge|0)==84){Ge=0,_l(e,32,h,n,ye^8192),h=(h|0)>(n|0)?h:n,n=Ze;continue}Te=K-n|0,Be=(S|0)<(Te|0)?Te:S,ye=Be+L|0,h=(h|0)<(ye|0)?ye:h,_l(e,32,h,ye,D),Y0(e,I,L),_l(e,48,h,ye,D^65536),_l(e,48,Be,Te,0),Y0(e,n,Te),_l(e,32,h,ye,D^8192),n=Ze}e:do if((Ge|0)==87&&!e)if(!k)s=0;else{for(s=1;n=t[l+(s<<2)>>2]|0,!!n;)if(U8(u+(s<<3)|0,n,r),s=s+1|0,(s|0)>=10){s=1;break e}for(;;){if(t[l+(s<<2)>>2]|0){s=-1;break e}if(s=s+1|0,(s|0)>=10){s=1;break}}}while(0);return m=Ln,s|0}function NF(e){return e=e|0,0}function FF(e){e=e|0}function Y0(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]&32||KF(n,r,e)|0}function B8(e){e=e|0;var n=0,r=0,u=0;if(r=t[e>>2]|0,u=(c[r>>0]|0)+-48|0,u>>>0<10){n=0;do n=u+(n*10|0)|0,r=r+1|0,t[e>>2]=r,u=(c[r>>0]|0)+-48|0;while(u>>>0<10)}else n=0;return n|0}function U8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;e:do if(n>>>0<=20)do switch(n|0){case 9:{u=(t[r>>2]|0)+(4-1)&~(4-1),n=t[u>>2]|0,t[r>>2]=u+4,t[e>>2]=n;break e}case 10:{u=(t[r>>2]|0)+(4-1)&~(4-1),n=t[u>>2]|0,t[r>>2]=u+4,u=e,t[u>>2]=n,t[u+4>>2]=((n|0)<0)<<31>>31;break e}case 11:{u=(t[r>>2]|0)+(4-1)&~(4-1),n=t[u>>2]|0,t[r>>2]=u+4,u=e,t[u>>2]=n,t[u+4>>2]=0;break e}case 12:{u=(t[r>>2]|0)+(8-1)&~(8-1),n=u,l=t[n>>2]|0,n=t[n+4>>2]|0,t[r>>2]=u+8,u=e,t[u>>2]=l,t[u+4>>2]=n;break e}case 13:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,u=(u&65535)<<16>>16,l=e,t[l>>2]=u,t[l+4>>2]=((u|0)<0)<<31>>31;break e}case 14:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,l=e,t[l>>2]=u&65535,t[l+4>>2]=0;break e}case 15:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,u=(u&255)<<24>>24,l=e,t[l>>2]=u,t[l+4>>2]=((u|0)<0)<<31>>31;break e}case 16:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,l=e,t[l>>2]=u&255,t[l+4>>2]=0;break e}case 17:{l=(t[r>>2]|0)+(8-1)&~(8-1),s=+B[l>>3],t[r>>2]=l+8,B[e>>3]=s;break e}case 18:{l=(t[r>>2]|0)+(8-1)&~(8-1),s=+B[l>>3],t[r>>2]=l+8,B[e>>3]=s;break e}default:break e}while(0);while(0)}function PF(e,n,r,u){if(e=e|0,n=n|0,r=r|0,u=u|0,!((e|0)==0&(n|0)==0))do r=r+-1|0,c[r>>0]=M[5694+(e&15)>>0]|0|u,e=A_(e|0,n|0,4)|0,n=tt;while(!((e|0)==0&(n|0)==0));return r|0}function IF(e,n,r){if(e=e|0,n=n|0,r=r|0,!((e|0)==0&(n|0)==0))do r=r+-1|0,c[r>>0]=e&7|48,e=A_(e|0,n|0,3)|0,n=tt;while(!((e|0)==0&(n|0)==0));return r|0}function Bv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;if(n>>>0>0|(n|0)==0&e>>>0>4294967295){for(;u=$E(e|0,n|0,10,0)|0,r=r+-1|0,c[r>>0]=u&255|48,u=e,e=ZE(e|0,n|0,10,0)|0,n>>>0>9|(n|0)==9&u>>>0>4294967295;)n=tt;n=e}else n=e;if(n)for(;r=r+-1|0,c[r>>0]=(n>>>0)%10|0|48,!(n>>>0<10);)n=(n>>>0)/10|0;return r|0}function bF(e){return e=e|0,WF(e,t[(qF()|0)+188>>2]|0)|0}function BF(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;s=n&255,u=(r|0)!=0;e:do if(u&(e&3|0)!=0)for(l=n&255;;){if((c[e>>0]|0)==l<<24>>24){h=6;break e}if(e=e+1|0,r=r+-1|0,u=(r|0)!=0,!(u&(e&3|0)!=0)){h=5;break}}else h=5;while(0);(h|0)==5&&(u?h=6:r=0);e:do if((h|0)==6&&(l=n&255,(c[e>>0]|0)!=l<<24>>24)){u=lr(s,16843009)|0;t:do if(r>>>0>3){for(;s=t[e>>2]^u,!((s&-2139062144^-2139062144)&s+-16843009|0);)if(e=e+4|0,r=r+-4|0,r>>>0<=3){h=11;break t}}else h=11;while(0);if((h|0)==11&&!r){r=0;break}for(;;){if((c[e>>0]|0)==l<<24>>24)break e;if(e=e+1|0,r=r+-1|0,!r){r=0;break}}}while(0);return(r|0?e:0)|0}function _l(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0;if(h=m,m=m+256|0,s=h,(r|0)>(u|0)&(l&73728|0)==0){if(l=r-u|0,jv(s|0,n|0,(l>>>0<256?l:256)|0)|0,l>>>0>255){n=r-u|0;do Y0(e,s,256),l=l+-256|0;while(l>>>0>255);l=n&255}Y0(e,s,l)}m=h}function j8(e,n){return e=e|0,n=n|0,e?e=zF(e,n,0)|0:e=0,e|0}function UF(e,n,r,u,l,s){e=e|0,n=+n,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,L=0,k=0,I=0,K=0,Be=0,Te=0,ye=0,Ze=0,Ge=0,ft=0,Me=0,Pe=0,Zt=0,Br=0,In=0,gn=0,_r=0,Pr=0,Ln=0,uu=0;uu=m,m=m+560|0,S=uu+8|0,Ze=uu,Ln=uu+524|0,Pr=Ln,L=uu+512|0,t[Ze>>2]=0,_r=L+12|0,z8(n)|0,(tt|0)<0?(n=-n,In=1,Br=5659):(In=(l&2049|0)!=0&1,Br=(l&2048|0)==0?(l&1|0)==0?5660:5665:5662),z8(n)|0,gn=tt&2146435072;do if(gn>>>0<2146435072|(gn|0)==2146435072&0<0){if(Be=+jF(n,Ze)*2,h=Be!=0,h&&(t[Ze>>2]=(t[Ze>>2]|0)+-1),ft=s|32,(ft|0)==97){Te=s&32,K=(Te|0)==0?Br:Br+9|0,I=In|2,h=12-u|0;do if(u>>>0>11|(h|0)==0)n=Be;else{n=8;do h=h+-1|0,n=n*16;while((h|0)!=0);if((c[K>>0]|0)==45){n=-(n+(-Be-n));break}else{n=Be+n-n;break}}while(0);D=t[Ze>>2]|0,h=(D|0)<0?0-D|0:D,h=Bv(h,((h|0)<0)<<31>>31,_r)|0,(h|0)==(_r|0)&&(h=L+11|0,c[h>>0]=48),c[h+-1>>0]=(D>>31&2)+43,k=h+-2|0,c[k>>0]=s+15,L=(u|0)<1,S=(l&8|0)==0,h=Ln;do gn=~~n,D=h+1|0,c[h>>0]=M[5694+gn>>0]|Te,n=(n-+(gn|0))*16,((D-Pr|0)==1?!(S&(L&n==0)):0)?(c[D>>0]=46,h=h+2|0):h=D;while(n!=0);gn=h-Pr|0,Pr=_r-k|0,_r=(u|0)!=0&(gn+-2|0)<(u|0)?u+2|0:gn,h=Pr+I+_r|0,_l(e,32,r,h,l),Y0(e,K,I),_l(e,48,r,h,l^65536),Y0(e,Ln,gn),_l(e,48,_r-gn|0,0,0),Y0(e,k,Pr),_l(e,32,r,h,l^8192);break}D=(u|0)<0?6:u,h?(h=(t[Ze>>2]|0)+-28|0,t[Ze>>2]=h,n=Be*268435456):(n=Be,h=t[Ze>>2]|0),gn=(h|0)<0?S:S+288|0,S=gn;do Pe=~~n>>>0,t[S>>2]=Pe,S=S+4|0,n=(n-+(Pe>>>0))*1e9;while(n!=0);if((h|0)>0)for(L=gn,I=S;;){if(k=(h|0)<29?h:29,h=I+-4|0,h>>>0>=L>>>0){S=0;do Me=Y8(t[h>>2]|0,0,k|0)|0,Me=JE(Me|0,tt|0,S|0,0)|0,Pe=tt,Ge=$E(Me|0,Pe|0,1e9,0)|0,t[h>>2]=Ge,S=ZE(Me|0,Pe|0,1e9,0)|0,h=h+-4|0;while(h>>>0>=L>>>0);S&&(L=L+-4|0,t[L>>2]=S)}for(S=I;!(S>>>0<=L>>>0);)if(h=S+-4|0,!(t[h>>2]|0))S=h;else break;if(h=(t[Ze>>2]|0)-k|0,t[Ze>>2]=h,(h|0)>0)I=S;else break}else L=gn;if((h|0)<0){u=((D+25|0)/9|0)+1|0,ye=(ft|0)==102;do{if(Te=0-h|0,Te=(Te|0)<9?Te:9,L>>>0>>0){k=(1<>>Te,K=0,h=L;do Pe=t[h>>2]|0,t[h>>2]=(Pe>>>Te)+K,K=lr(Pe&k,I)|0,h=h+4|0;while(h>>>0>>0);h=(t[L>>2]|0)==0?L+4|0:L,K?(t[S>>2]=K,L=h,h=S+4|0):(L=h,h=S)}else L=(t[L>>2]|0)==0?L+4|0:L,h=S;S=ye?gn:L,S=(h-S>>2|0)>(u|0)?S+(u<<2)|0:h,h=(t[Ze>>2]|0)+Te|0,t[Ze>>2]=h}while((h|0)<0);h=L,u=S}else h=L,u=S;if(Pe=gn,h>>>0>>0){if(S=(Pe-h>>2)*9|0,k=t[h>>2]|0,k>>>0>=10){L=10;do L=L*10|0,S=S+1|0;while(k>>>0>=L>>>0)}}else S=0;if(ye=(ft|0)==103,Ge=(D|0)!=0,L=D-((ft|0)!=102?S:0)+((Ge&ye)<<31>>31)|0,(L|0)<(((u-Pe>>2)*9|0)+-9|0)){if(L=L+9216|0,Te=gn+4+(((L|0)/9|0)+-1024<<2)|0,L=((L|0)%9|0)+1|0,(L|0)<9){k=10;do k=k*10|0,L=L+1|0;while((L|0)!=9)}else k=10;if(I=t[Te>>2]|0,K=(I>>>0)%(k>>>0)|0,L=(Te+4|0)==(u|0),L&(K|0)==0)L=Te;else if(Be=(((I>>>0)/(k>>>0)|0)&1|0)==0?9007199254740992:9007199254740994,Me=(k|0)/2|0,n=K>>>0>>0?.5:L&(K|0)==(Me|0)?1:1.5,In&&(Me=(c[Br>>0]|0)==45,n=Me?-n:n,Be=Me?-Be:Be),L=I-K|0,t[Te>>2]=L,Be+n!=Be){if(Me=L+k|0,t[Te>>2]=Me,Me>>>0>999999999)for(S=Te;L=S+-4|0,t[S>>2]=0,L>>>0>>0&&(h=h+-4|0,t[h>>2]=0),Me=(t[L>>2]|0)+1|0,t[L>>2]=Me,Me>>>0>999999999;)S=L;else L=Te;if(S=(Pe-h>>2)*9|0,I=t[h>>2]|0,I>>>0>=10){k=10;do k=k*10|0,S=S+1|0;while(I>>>0>=k>>>0)}}else L=Te;L=L+4|0,L=u>>>0>L>>>0?L:u,Me=h}else L=u,Me=h;for(ft=L;;){if(ft>>>0<=Me>>>0){Ze=0;break}if(h=ft+-4|0,!(t[h>>2]|0))ft=h;else{Ze=1;break}}u=0-S|0;do if(ye)if(h=((Ge^1)&1)+D|0,(h|0)>(S|0)&(S|0)>-5?(k=s+-1|0,D=h+-1-S|0):(k=s+-2|0,D=h+-1|0),h=l&8,h)Te=h;else{if(Ze?(Zt=t[ft+-4>>2]|0,(Zt|0)!=0):0)if((Zt>>>0)%10|0)L=0;else{L=0,h=10;do h=h*10|0,L=L+1|0;while(!((Zt>>>0)%(h>>>0)|0|0))}else L=9;if(h=((ft-Pe>>2)*9|0)+-9|0,(k|32|0)==102){Te=h-L|0,Te=(Te|0)>0?Te:0,D=(D|0)<(Te|0)?D:Te,Te=0;break}else{Te=h+S-L|0,Te=(Te|0)>0?Te:0,D=(D|0)<(Te|0)?D:Te,Te=0;break}}else k=s,Te=l&8;while(0);if(ye=D|Te,I=(ye|0)!=0&1,K=(k|32|0)==102,K)Ge=0,h=(S|0)>0?S:0;else{if(h=(S|0)<0?u:S,h=Bv(h,((h|0)<0)<<31>>31,_r)|0,L=_r,(L-h|0)<2)do h=h+-1|0,c[h>>0]=48;while((L-h|0)<2);c[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=n|!1?Ln?5686:5690:Ln?5678:5682,3),_l(e,32,r,h,l^8192);while(0);return m=uu,((h|0)<(r|0)?r:h)|0}function z8(e){e=+e;var n=0;return B[q>>3]=e,n=t[q>>2]|0,tt=t[q+4>>2]|0,n|0}function jF(e,n){return e=+e,n=n|0,+ +H8(e,n)}function H8(e,n){e=+e,n=n|0;var r=0,u=0,l=0;switch(B[q>>3]=e,r=t[q>>2]|0,u=t[q+4>>2]|0,l=A_(r|0,u|0,52)|0,l&2047){case 0:{e!=0?(e=+H8(e*18446744073709552e3,n),r=(t[n>>2]|0)+-64|0):r=0,t[n>>2]=r;break}case 2047:break;default:t[n>>2]=(l&2047)+-1022,t[q>>2]=r,t[q+4>>2]=u&-2146435073|1071644672,e=+B[q>>3]}return+e}function zF(e,n,r){e=e|0,n=n|0,r=r|0;do if(e){if(n>>>0<128){c[e>>0]=n,e=1;break}if(!(t[t[(HF()|0)+188>>2]>>2]|0))if((n&-128|0)==57216){c[e>>0]=n,e=1;break}else{t[(bv()|0)>>2]=84,e=-1;break}if(n>>>0<2048){c[e>>0]=n>>>6|192,c[e+1>>0]=n&63|128,e=2;break}if(n>>>0<55296|(n&-8192|0)==57344){c[e>>0]=n>>>12|224,c[e+1>>0]=n>>>6&63|128,c[e+2>>0]=n&63|128,e=3;break}if((n+-65536|0)>>>0<1048576){c[e>>0]=n>>>18|240,c[e+1>>0]=n>>>12&63|128,c[e+2>>0]=n>>>6&63|128,c[e+3>>0]=n&63|128,e=4;break}else{t[(bv()|0)>>2]=84,e=-1;break}}else e=1;while(0);return e|0}function HF(){return KE()|0}function qF(){return KE()|0}function WF(e,n){e=e|0,n=n|0;var r=0,u=0;for(u=0;;){if((M[5712+u>>0]|0)==(e|0)){e=2;break}if(r=u+1|0,(r|0)==87){r=5800,u=87,e=5;break}else u=r}if((e|0)==2&&(u?(r=5800,e=5):r=5800),(e|0)==5)for(;;){do e=r,r=r+1|0;while((c[e>>0]|0)!=0);if(u=u+-1|0,u)e=5;else break}return VF(r,t[n+20>>2]|0)|0}function VF(e,n){return e=e|0,n=n|0,GF(e,n)|0}function GF(e,n){return e=e|0,n=n|0,n?n=YF(t[n>>2]|0,t[n+4>>2]|0,e)|0:n=0,(n|0?n:e)|0}function YF(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0;K=(t[e>>2]|0)+1794895138|0,s=Xp(t[e+8>>2]|0,K)|0,u=Xp(t[e+12>>2]|0,K)|0,l=Xp(t[e+16>>2]|0,K)|0;e:do if((s>>>0>>2>>>0?(I=n-(s<<2)|0,u>>>0>>0&l>>>0>>0):0)?((l|u)&3|0)==0:0){for(I=u>>>2,k=l>>>2,L=0;;){if(D=s>>>1,S=L+D|0,h=S<<1,l=h+I|0,u=Xp(t[e+(l<<2)>>2]|0,K)|0,l=Xp(t[e+(l+1<<2)>>2]|0,K)|0,!(l>>>0>>0&u>>>0<(n-l|0)>>>0)){u=0;break e}if(c[e+(l+u)>>0]|0){u=0;break e}if(u=I8(r,e+l|0)|0,!u)break;if(u=(u|0)<0,(s|0)==1){u=0;break e}else L=u?L:S,s=u?D:s-D|0}u=h+k|0,l=Xp(t[e+(u<<2)>>2]|0,K)|0,u=Xp(t[e+(u+1<<2)>>2]|0,K)|0,u>>>0>>0&l>>>0<(n-u|0)>>>0?u=(c[e+(u+l)>>0]|0)==0?e+u|0:0:u=0}else u=0;while(0);return u|0}function Xp(e,n){e=e|0,n=n|0;var r=0;return r=Q8(e|0)|0,((n|0)==0?e:r)|0}function KF(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=r+16|0,l=t[u>>2]|0,l?s=5:XF(r)|0?u=0:(l=t[u>>2]|0,s=5);e:do if((s|0)==5){if(D=r+20|0,h=t[D>>2]|0,u=h,(l-h|0)>>>0>>0){u=M_[t[r+36>>2]&7](r,e,n)|0;break}t:do if((c[r+75>>0]|0)>-1){for(h=n;;){if(!h){s=0,l=e;break t}if(l=h+-1|0,(c[e+l>>0]|0)==10)break;h=l}if(u=M_[t[r+36>>2]&7](r,e,h)|0,u>>>0>>0)break e;s=h,l=e+h|0,n=n-h|0,u=t[D>>2]|0}else s=0,l=e;while(0);gr(u|0,l|0,n|0)|0,t[D>>2]=(t[D>>2]|0)+n,u=s+n|0}while(0);return u|0}function XF(e){e=e|0;var n=0,r=0;return n=e+74|0,r=c[n>>0]|0,c[n>>0]=r+255|r,n=t[e>>2]|0,n&8?(t[e>>2]=n|32,e=-1):(t[e+8>>2]=0,t[e+4>>2]=0,r=t[e+44>>2]|0,t[e+28>>2]=r,t[e+20>>2]=r,t[e+16>>2]=r+(t[e+48>>2]|0),e=0),e|0}function Ru(e,n){e=w(e),n=w(n);var r=0,u=0;r=q8(e)|0;do if((r&2147483647)>>>0<=2139095040){if(u=q8(n)|0,(u&2147483647)>>>0<=2139095040)if((u^r|0)<0){e=(r|0)<0?n:e;break}else{e=e>2]=e,t[q>>2]|0|0}function Qp(e,n){e=w(e),n=w(n);var r=0,u=0;r=W8(e)|0;do if((r&2147483647)>>>0<=2139095040){if(u=W8(n)|0,(u&2147483647)>>>0<=2139095040)if((u^r|0)<0){e=(r|0)<0?e:n;break}else{e=e>2]=e,t[q>>2]|0|0}function QE(e,n){e=w(e),n=w(n);var r=0,u=0,l=0,s=0,h=0,D=0,S=0,L=0;s=(T[q>>2]=e,t[q>>2]|0),D=(T[q>>2]=n,t[q>>2]|0),r=s>>>23&255,h=D>>>23&255,S=s&-2147483648,l=D<<1;e:do if((l|0)!=0?!((r|0)==255|((QF(n)|0)&2147483647)>>>0>2139095040):0){if(u=s<<1,u>>>0<=l>>>0)return n=w(e*w(0)),w((u|0)==(l|0)?n:e);if(r)u=s&8388607|8388608;else{if(r=s<<9,(r|0)>-1){u=r,r=0;do r=r+-1|0,u=u<<1;while((u|0)>-1)}else r=0;u=s<<1-r}if(h)D=D&8388607|8388608;else{if(s=D<<9,(s|0)>-1){l=0;do l=l+-1|0,s=s<<1;while((s|0)>-1)}else l=0;h=l,D=D<<1-l}l=u-D|0,s=(l|0)>-1;t:do if((r|0)>(h|0)){for(;;){if(s)if(l)u=l;else break;if(u=u<<1,r=r+-1|0,l=u-D|0,s=(l|0)>-1,(r|0)<=(h|0))break t}n=w(e*w(0));break e}while(0);if(s)if(l)u=l;else{n=w(e*w(0));break}if(u>>>0<8388608)do u=u<<1,r=r+-1|0;while(u>>>0<8388608);(r|0)>0?r=u+-8388608|r<<23:r=u>>>(1-r|0),n=(t[q>>2]=r|S,w(T[q>>2]))}else L=3;while(0);return(L|0)==3&&(n=w(e*n),n=w(n/n)),w(n)}function QF(e){return e=w(e),T[q>>2]=e,t[q>>2]|0|0}function JF(e,n){return e=e|0,n=n|0,b8(t[582]|0,e,n)|0}function hi(e){e=e|0,$n()}function Uv(e){e=e|0}function ZF(e,n){return e=e|0,n=n|0,0}function $F(e){return e=e|0,(V8(e+4|0)|0)==-1?(P1[t[(t[e>>2]|0)+8>>2]&127](e),e=1):e=0,e|0}function V8(e){e=e|0;var n=0;return n=t[e>>2]|0,t[e>>2]=n+-1,n+-1|0}function t2(e){e=e|0,$F(e)|0&&eP(e)}function eP(e){e=e|0;var n=0;n=e+8|0,((t[n>>2]|0)!=0?(V8(n)|0)!=-1:0)||P1[t[(t[e>>2]|0)+16>>2]&127](e)}function pn(e){e=e|0;var n=0;for(n=(e|0)==0?1:e;e=T_(n)|0,!(e|0);){if(e=nP()|0,!e){e=0;break}oS[e&0]()}return e|0}function G8(e){return e=e|0,pn(e)|0}function _t(e){e=e|0,C_(e)}function tP(e){e=e|0,(c[e+11>>0]|0)<0&&_t(t[e>>2]|0)}function nP(){var e=0;return e=t[2923]|0,t[2923]=e+0,e|0}function rP(){}function R_(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,u=n-u-(r>>>0>e>>>0|0)>>>0,tt=u,e-r>>>0|0|0}function JE(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,r=e+r>>>0,tt=n+u+(r>>>0>>0|0)>>>0,r|0|0}function jv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;if(s=e+r|0,n=n&255,(r|0)>=67){for(;e&3;)c[e>>0]=n,e=e+1|0;for(u=s&-4|0,l=u-64|0,h=n|n<<8|n<<16|n<<24;(e|0)<=(l|0);)t[e>>2]=h,t[e+4>>2]=h,t[e+8>>2]=h,t[e+12>>2]=h,t[e+16>>2]=h,t[e+20>>2]=h,t[e+24>>2]=h,t[e+28>>2]=h,t[e+32>>2]=h,t[e+36>>2]=h,t[e+40>>2]=h,t[e+44>>2]=h,t[e+48>>2]=h,t[e+52>>2]=h,t[e+56>>2]=h,t[e+60>>2]=h,e=e+64|0;for(;(e|0)<(u|0);)t[e>>2]=h,e=e+4|0}for(;(e|0)<(s|0);)c[e>>0]=n,e=e+1|0;return s-r|0}function Y8(e,n,r){return e=e|0,n=n|0,r=r|0,(r|0)<32?(tt=n<>>32-r,e<>>r,e>>>r|(n&(1<>>r-32|0)}function gr(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;if((r|0)>=8192)return ai(e|0,n|0,r|0)|0;if(s=e|0,l=e+r|0,(e&3)==(n&3)){for(;e&3;){if(!r)return s|0;c[e>>0]=c[n>>0]|0,e=e+1|0,n=n+1|0,r=r-1|0}for(r=l&-4|0,u=r-64|0;(e|0)<=(u|0);)t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=t[n+8>>2],t[e+12>>2]=t[n+12>>2],t[e+16>>2]=t[n+16>>2],t[e+20>>2]=t[n+20>>2],t[e+24>>2]=t[n+24>>2],t[e+28>>2]=t[n+28>>2],t[e+32>>2]=t[n+32>>2],t[e+36>>2]=t[n+36>>2],t[e+40>>2]=t[n+40>>2],t[e+44>>2]=t[n+44>>2],t[e+48>>2]=t[n+48>>2],t[e+52>>2]=t[n+52>>2],t[e+56>>2]=t[n+56>>2],t[e+60>>2]=t[n+60>>2],e=e+64|0,n=n+64|0;for(;(e|0)<(r|0);)t[e>>2]=t[n>>2],e=e+4|0,n=n+4|0}else for(r=l-4|0;(e|0)<(r|0);)c[e>>0]=c[n>>0]|0,c[e+1>>0]=c[n+1>>0]|0,c[e+2>>0]=c[n+2>>0]|0,c[e+3>>0]=c[n+3>>0]|0,e=e+4|0,n=n+4|0;for(;(e|0)<(l|0);)c[e>>0]=c[n>>0]|0,e=e+1|0,n=n+1|0;return s|0}function K8(e){e=e|0;var n=0;return n=c[ge+(e&255)>>0]|0,(n|0)<8?n|0:(n=c[ge+(e>>8&255)>>0]|0,(n|0)<8?n+8|0:(n=c[ge+(e>>16&255)>>0]|0,(n|0)<8?n+16|0:(c[ge+(e>>>24)>>0]|0)+24|0))}function X8(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,L=0,k=0,I=0,K=0,Be=0,Te=0;if(k=e,S=n,L=S,h=r,K=u,D=K,!L)return s=(l|0)!=0,D?s?(t[l>>2]=e|0,t[l+4>>2]=n&0,K=0,l=0,tt=K,l|0):(K=0,l=0,tt=K,l|0):(s&&(t[l>>2]=(k>>>0)%(h>>>0),t[l+4>>2]=0),K=0,l=(k>>>0)/(h>>>0)>>>0,tt=K,l|0);s=(D|0)==0;do if(h){if(!s){if(s=(Er(D|0)|0)-(Er(L|0)|0)|0,s>>>0<=31){I=s+1|0,D=31-s|0,n=s-31>>31,h=I,e=k>>>(I>>>0)&n|L<>>(I>>>0)&n,s=0,D=k<>2]=e|0,t[l+4>>2]=S|n&0,K=0,l=0,tt=K,l|0):(K=0,l=0,tt=K,l|0)}if(s=h-1|0,s&h|0){D=(Er(h|0)|0)+33-(Er(L|0)|0)|0,Te=64-D|0,I=32-D|0,S=I>>31,Be=D-32|0,n=Be>>31,h=D,e=I-1>>31&L>>>(Be>>>0)|(L<>>(D>>>0))&n,n=n&L>>>(D>>>0),s=k<>>(Be>>>0))&S|k<>31;break}return l|0&&(t[l>>2]=s&k,t[l+4>>2]=0),(h|0)==1?(Be=S|n&0,Te=e|0|0,tt=Be,Te|0):(Te=K8(h|0)|0,Be=L>>>(Te>>>0)|0,Te=L<<32-Te|k>>>(Te>>>0)|0,tt=Be,Te|0)}else{if(s)return l|0&&(t[l>>2]=(L>>>0)%(h>>>0),t[l+4>>2]=0),Be=0,Te=(L>>>0)/(h>>>0)>>>0,tt=Be,Te|0;if(!k)return l|0&&(t[l>>2]=0,t[l+4>>2]=(L>>>0)%(D>>>0)),Be=0,Te=(L>>>0)/(D>>>0)>>>0,tt=Be,Te|0;if(s=D-1|0,!(s&D))return l|0&&(t[l>>2]=e|0,t[l+4>>2]=s&L|n&0),Be=0,Te=L>>>((K8(D|0)|0)>>>0),tt=Be,Te|0;if(s=(Er(D|0)|0)-(Er(L|0)|0)|0,s>>>0<=30){n=s+1|0,D=31-s|0,h=n,e=L<>>(n>>>0),n=L>>>(n>>>0),s=0,D=k<>2]=e|0,t[l+4>>2]=S|n&0,Be=0,Te=0,tt=Be,Te|0):(Be=0,Te=0,tt=Be,Te|0)}while(0);if(!h)L=D,S=0,D=0;else{I=r|0|0,k=K|u&0,L=JE(I|0,k|0,-1,-1)|0,r=tt,S=D,D=0;do u=S,S=s>>>31|S<<1,s=D|s<<1,u=e<<1|u>>>31|0,K=e>>>31|n<<1|0,R_(L|0,r|0,u|0,K|0)|0,Te=tt,Be=Te>>31|((Te|0)<0?-1:0)<<1,D=Be&1,e=R_(u|0,K|0,Be&I|0,(((Te|0)<0?-1:0)>>31|((Te|0)<0?-1:0)<<1)&k|0)|0,n=tt,h=h-1|0;while((h|0)!=0);L=S,S=0}return h=0,l|0&&(t[l>>2]=e,t[l+4>>2]=n),Be=(s|0)>>>31|(L|h)<<1|(h<<1|s>>>31)&0|S,Te=(s<<1|0>>>31)&-2|D,tt=Be,Te|0}function ZE(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,X8(e,n,r,u,0)|0}function n2(e){e=e|0;var n=0,r=0;return r=e+15&-16|0,n=t[H>>2]|0,e=n+r|0,(r|0)>0&(e|0)<(n|0)|(e|0)<0?(fr()|0,Jl(12),-1):(t[H>>2]=e,((e|0)>(jr()|0)?(vr()|0)==0:0)?(t[H>>2]=n,Jl(12),-1):n|0)}function ky(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;if((n|0)<(e|0)&(e|0)<(n+r|0)){for(u=e,n=n+r|0,e=e+r|0;(r|0)>0;)e=e-1|0,n=n-1|0,r=r-1|0,c[e>>0]=c[n>>0]|0;e=u}else gr(e,n,r)|0;return e|0}function $E(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;return s=m,m=m+16|0,l=s|0,X8(e,n,r,u,l)|0,m=s,tt=t[l+4>>2]|0,t[l>>2]|0|0}function Q8(e){return e=e|0,(e&255)<<24|(e>>8&255)<<16|(e>>16&255)<<8|e>>>24|0}function iP(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,J8[e&1](n|0,r|0,u|0,l|0,s|0)}function uP(e,n,r){e=e|0,n=n|0,r=w(r),Z8[e&1](n|0,w(r))}function oP(e,n,r){e=e|0,n=n|0,r=+r,$8[e&31](n|0,+r)}function lP(e,n,r,u){return e=e|0,n=n|0,r=w(r),u=w(u),w(eS[e&0](n|0,w(r),w(u)))}function sP(e,n){e=e|0,n=n|0,P1[e&127](n|0)}function aP(e,n,r){e=e|0,n=n|0,r=r|0,I1[e&31](n|0,r|0)}function fP(e,n){return e=e|0,n=n|0,Zp[e&31](n|0)|0}function cP(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0,tS[e&1](n|0,+r,+u,l|0)}function dP(e,n,r,u){e=e|0,n=n|0,r=+r,u=+u,GP[e&1](n|0,+r,+u)}function pP(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,M_[e&7](n|0,r|0,u|0)|0}function hP(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,+YP[e&1](n|0,r|0,u|0)}function vP(e,n){return e=e|0,n=n|0,+nS[e&15](n|0)}function mP(e,n,r){return e=e|0,n=n|0,r=+r,KP[e&1](n|0,+r)|0}function yP(e,n,r){return e=e|0,n=n|0,r=r|0,tD[e&15](n|0,r|0)|0}function gP(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=+u,l=+l,s=s|0,XP[e&1](n|0,r|0,+u,+l,s|0)}function _P(e,n,r,u,l,s,h){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0,QP[e&1](n|0,r|0,u|0,l|0,s|0,h|0)}function EP(e,n,r){return e=e|0,n=n|0,r=r|0,+rS[e&7](n|0,r|0)}function DP(e){return e=e|0,k_[e&7]()|0}function wP(e,n,r,u,l,s){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,iS[e&1](n|0,r|0,u|0,l|0,s|0)|0}function SP(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=+l,JP[e&1](n|0,r|0,u|0,+l)}function TP(e,n,r,u,l,s,h){e=e|0,n=n|0,r=r|0,u=w(u),l=l|0,s=w(s),h=h|0,uS[e&1](n|0,r|0,w(u),l|0,w(s),h|0)}function CP(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,Fy[e&15](n|0,r|0,u|0)}function xP(e){e=e|0,oS[e&0]()}function RP(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u,lS[e&15](n|0,r|0,+u)}function AP(e,n,r){return e=e|0,n=+n,r=+r,ZP[e&1](+n,+r)|0}function OP(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,nD[e&15](n|0,r|0,u|0,l|0)}function MP(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,jt(0)}function kP(e,n){e=e|0,n=w(n),jt(1)}function ea(e,n){e=e|0,n=+n,jt(2)}function LP(e,n,r){return e=e|0,n=w(n),r=w(r),jt(3),Tt}function Zn(e){e=e|0,jt(4)}function Ly(e,n){e=e|0,n=n|0,jt(5)}function Na(e){return e=e|0,jt(6),0}function NP(e,n,r,u){e=e|0,n=+n,r=+r,u=u|0,jt(7)}function FP(e,n,r){e=e|0,n=+n,r=+r,jt(8)}function PP(e,n,r){return e=e|0,n=n|0,r=r|0,jt(9),0}function IP(e,n,r){return e=e|0,n=n|0,r=r|0,jt(10),0}function Jp(e){return e=e|0,jt(11),0}function bP(e,n){return e=e|0,n=+n,jt(12),0}function Ny(e,n){return e=e|0,n=n|0,jt(13),0}function BP(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0,jt(14)}function UP(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,jt(15)}function eD(e,n){return e=e|0,n=n|0,jt(16),0}function jP(){return jt(17),0}function zP(e,n,r,u,l){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,jt(18),0}function HP(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u,jt(19)}function qP(e,n,r,u,l,s){e=e|0,n=n|0,r=w(r),u=u|0,l=w(l),s=s|0,jt(20)}function O_(e,n,r){e=e|0,n=n|0,r=r|0,jt(21)}function WP(){jt(22)}function zv(e,n,r){e=e|0,n=n|0,r=+r,jt(23)}function VP(e,n){return e=+e,n=+n,jt(24),0}function Hv(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,jt(25)}var J8=[MP,jM],Z8=[kP,no],$8=[ea,da,Ss,Ts,ns,H0,Df,ol,Wa,ro,wf,Wc,pc,Ol,Cs,pa,od,ha,hc,ea,ea,ea,ea,ea,ea,ea,ea,ea,ea,ea,ea,ea],eS=[LP],P1=[Zn,Uv,cn,us,D0,jf,M1,jl,vO,mO,yO,RM,AM,OM,QN,JN,ZN,Ne,cc,ja,Gu,zo,yh,Tf,r1,Ff,Da,kh,ym,g1,_1,Zh,mp,Pd,jm,C1,Oc,Jm,ey,xv,Mv,on,$4,fE,p_,Nt,xu,to,OR,VR,fA,AA,qA,f7,E7,S7,j7,q7,oO,_O,wO,UO,rM,_d,Bk,v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,_bitshift64Lshr:A_,_bitshift64Shl:Y8,dynCall_vi:sP,dynCall_viiddi:gP,dynCall_diii:hP,dynCall_iii:yP,_memset:jv,_sbrk:n2,_memcpy:gr,__GLOBAL__sub_I_Yoga_cpp:ru,dynCall_vii:aP,___uremdi3:$E,dynCall_vid:oP,stackAlloc:d0,_nbind_init:vF,getTempRet0:Q,dynCall_di:vP,dynCall_iid:mP,setTempRet0:Bo,_i64Add:JE,dynCall_fiff:lP,dynCall_iiii:pP,_emscripten_get_global_libc:xF,dynCall_viid:RP,dynCall_viiid:SP,dynCall_viififi:TP,dynCall_ii:fP,__GLOBAL__sub_I_Binding_cc:Mk,dynCall_viiii:OP,dynCall_iiiiii:wP,stackSave:nl,dynCall_viiiii:iP,__GLOBAL__sub_I_nbind_cc:Vs,dynCall_vidd:dP,_free:C_,runPostSets:rP,dynCall_viiiiii:_P,establishStackSpace:ju,_memmove:ky,stackRestore:Zl,_malloc:T_,__GLOBAL__sub_I_common_cc:QO,dynCall_viddi:cP,dynCall_dii:EP,dynCall_v:xP}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer),_llvm_bswap_i32=Module._llvm_bswap_i32=asm._llvm_bswap_i32,getTempRet0=Module.getTempRet0=asm.getTempRet0,___udivdi3=Module.___udivdi3=asm.___udivdi3,setThrew=Module.setThrew=asm.setThrew,_bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr,_bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl,_memset=Module._memset=asm._memset,_sbrk=Module._sbrk=asm._sbrk,_memcpy=Module._memcpy=asm._memcpy,stackAlloc=Module.stackAlloc=asm.stackAlloc,___uremdi3=Module.___uremdi3=asm.___uremdi3,_nbind_init=Module._nbind_init=asm._nbind_init,_i64Subtract=Module._i64Subtract=asm._i64Subtract,setTempRet0=Module.setTempRet0=asm.setTempRet0,_i64Add=Module._i64Add=asm._i64Add,_emscripten_get_global_libc=Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,__GLOBAL__sub_I_Yoga_cpp=Module.__GLOBAL__sub_I_Yoga_cpp=asm.__GLOBAL__sub_I_Yoga_cpp,__GLOBAL__sub_I_Binding_cc=Module.__GLOBAL__sub_I_Binding_cc=asm.__GLOBAL__sub_I_Binding_cc,stackSave=Module.stackSave=asm.stackSave,__GLOBAL__sub_I_nbind_cc=Module.__GLOBAL__sub_I_nbind_cc=asm.__GLOBAL__sub_I_nbind_cc,_free=Module._free=asm._free,runPostSets=Module.runPostSets=asm.runPostSets,establishStackSpace=Module.establishStackSpace=asm.establishStackSpace,_memmove=Module._memmove=asm._memmove,stackRestore=Module.stackRestore=asm.stackRestore,_malloc=Module._malloc=asm._malloc,__GLOBAL__sub_I_common_cc=Module.__GLOBAL__sub_I_common_cc=asm.__GLOBAL__sub_I_common_cc,dynCall_viiiii=Module.dynCall_viiiii=asm.dynCall_viiiii,dynCall_vif=Module.dynCall_vif=asm.dynCall_vif,dynCall_vid=Module.dynCall_vid=asm.dynCall_vid,dynCall_fiff=Module.dynCall_fiff=asm.dynCall_fiff,dynCall_vi=Module.dynCall_vi=asm.dynCall_vi,dynCall_vii=Module.dynCall_vii=asm.dynCall_vii,dynCall_ii=Module.dynCall_ii=asm.dynCall_ii,dynCall_viddi=Module.dynCall_viddi=asm.dynCall_viddi,dynCall_vidd=Module.dynCall_vidd=asm.dynCall_vidd,dynCall_iiii=Module.dynCall_iiii=asm.dynCall_iiii,dynCall_diii=Module.dynCall_diii=asm.dynCall_diii,dynCall_di=Module.dynCall_di=asm.dynCall_di,dynCall_iid=Module.dynCall_iid=asm.dynCall_iid,dynCall_iii=Module.dynCall_iii=asm.dynCall_iii,dynCall_viiddi=Module.dynCall_viiddi=asm.dynCall_viiddi,dynCall_viiiiii=Module.dynCall_viiiiii=asm.dynCall_viiiiii,dynCall_dii=Module.dynCall_dii=asm.dynCall_dii,dynCall_i=Module.dynCall_i=asm.dynCall_i,dynCall_iiiiii=Module.dynCall_iiiiii=asm.dynCall_iiiiii,dynCall_viiid=Module.dynCall_viiid=asm.dynCall_viiid,dynCall_viififi=Module.dynCall_viififi=asm.dynCall_viififi,dynCall_viii=Module.dynCall_viii=asm.dynCall_viii,dynCall_v=Module.dynCall_v=asm.dynCall_v,dynCall_viid=Module.dynCall_viid=asm.dynCall_viid,dynCall_idd=Module.dynCall_idd=asm.dynCall_idd,dynCall_viiii=Module.dynCall_viiii=asm.dynCall_viiii;Runtime.stackAlloc=Module.stackAlloc,Runtime.stackSave=Module.stackSave,Runtime.stackRestore=Module.stackRestore,Runtime.establishStackSpace=Module.establishStackSpace,Runtime.setTempRet0=Module.setTempRet0,Runtime.getTempRet0=Module.getTempRet0,Module.asm=asm;function ExitStatus(i){this.name="ExitStatus",this.message="Program terminated with exit("+i+")",this.status=i}ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var initialStackTop,preloadStartTime=null,calledMain=!1;dependenciesFulfilled=function i(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=i)},Module.callMain=Module.callMain=function(o){o=o||[],ensureInitRuntime();var a=o.length+1;function c(){for(var O=0;O<4-1;O++)_.push(0)}var _=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];c();for(var t=0;t0||(preRun(),runDependencies>0)||Module.calledRun)return;function o(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(i),postRun()))}Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),o()},1)):o()}Module.run=Module.run=run;function exit(i,o){o&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,EXITSTATUS=i,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(i)),ENVIRONMENT_IS_NODE&&process.exit(i),Module.quit(i,new ExitStatus(i)))}Module.exit=Module.exit=exit;var abortDecorators=[];function abort(i){Module.onAbort&&Module.onAbort(i),i!==void 0?(Module.print(i),Module.printErr(i),i=JSON.stringify(i)):i="",ABORT=!0,EXITSTATUS=1;var o=` +If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,a="abort("+i+") at "+stackTrace()+o;throw abortDecorators&&abortDecorators.forEach(function(c){a=c(a,i)}),a}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var eh=Ke((VW,ST)=>{"use strict";var WI=DT(),VI=wT(),UD=!1,jD=null;VI({},function(i,o){if(!UD){if(UD=!0,i)throw i;jD=o}});if(!UD)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");ST.exports=WI(jD.bind,jD.lib)});var CT=Ke((GW,TT)=>{"use strict";TT.exports=({onlyFirst:i=!1}={})=>{let o=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(o,i?void 0:"g")}});var zD=Ke((YW,xT)=>{"use strict";var GI=CT();xT.exports=i=>typeof i=="string"?i.replace(GI(),""):i});var qD=Ke((KW,HD)=>{"use strict";var RT=i=>Number.isNaN(i)?!1:i>=4352&&(i<=4447||i===9001||i===9002||11904<=i&&i<=12871&&i!==12351||12880<=i&&i<=19903||19968<=i&&i<=42182||43360<=i&&i<=43388||44032<=i&&i<=55203||63744<=i&&i<=64255||65040<=i&&i<=65049||65072<=i&&i<=65131||65281<=i&&i<=65376||65504<=i&&i<=65510||110592<=i&&i<=110593||127488<=i&&i<=127569||131072<=i&&i<=262141);HD.exports=RT;HD.exports.default=RT});var OT=Ke((XW,AT)=>{"use strict";AT.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD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C82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var Z_=Ke((QW,WD)=>{"use strict";var YI=zD(),KI=qD(),XI=OT(),MT=i=>{if(i=i.replace(XI()," "),typeof i!="string"||i.length===0)return 0;i=YI(i);let o=0;for(let a=0;a=127&&c<=159||c>=768&&c<=879||(c>65535&&a++,o+=KI(c)?2:1)}return o};WD.exports=MT;WD.exports.default=MT});var GD=Ke((JW,VD)=>{"use strict";var QI=Z_(),kT=i=>{let o=0;for(let a of i.split(` +`))o=Math.max(o,QI(a));return o};VD.exports=kT;VD.exports.default=kT});var LT=Ke(Jy=>{"use strict";var JI=Jy&&Jy.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Jy,"__esModule",{value:!0});var ZI=JI(GD()),YD={};Jy.default=i=>{if(i.length===0)return{width:0,height:0};if(YD[i])return YD[i];let o=ZI.default(i),a=i.split(` +`).length;return YD[i]={width:o,height:a},{width:o,height:a}}});var NT=Ke(Zy=>{"use strict";var $I=Zy&&Zy.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Zy,"__esModule",{value:!0});var Vi=$I(eh()),eb=(i,o)=>{"position"in o&&i.setPositionType(o.position==="absolute"?Vi.default.POSITION_TYPE_ABSOLUTE:Vi.default.POSITION_TYPE_RELATIVE)},tb=(i,o)=>{"marginLeft"in o&&i.setMargin(Vi.default.EDGE_START,o.marginLeft||0),"marginRight"in o&&i.setMargin(Vi.default.EDGE_END,o.marginRight||0),"marginTop"in o&&i.setMargin(Vi.default.EDGE_TOP,o.marginTop||0),"marginBottom"in o&&i.setMargin(Vi.default.EDGE_BOTTOM,o.marginBottom||0)},nb=(i,o)=>{"paddingLeft"in o&&i.setPadding(Vi.default.EDGE_LEFT,o.paddingLeft||0),"paddingRight"in o&&i.setPadding(Vi.default.EDGE_RIGHT,o.paddingRight||0),"paddingTop"in o&&i.setPadding(Vi.default.EDGE_TOP,o.paddingTop||0),"paddingBottom"in o&&i.setPadding(Vi.default.EDGE_BOTTOM,o.paddingBottom||0)},rb=(i,o)=>{var a;"flexGrow"in o&&i.setFlexGrow((a=o.flexGrow)!==null&&a!==void 0?a:0),"flexShrink"in o&&i.setFlexShrink(typeof o.flexShrink=="number"?o.flexShrink:1),"flexDirection"in o&&(o.flexDirection==="row"&&i.setFlexDirection(Vi.default.FLEX_DIRECTION_ROW),o.flexDirection==="row-reverse"&&i.setFlexDirection(Vi.default.FLEX_DIRECTION_ROW_REVERSE),o.flexDirection==="column"&&i.setFlexDirection(Vi.default.FLEX_DIRECTION_COLUMN),o.flexDirection==="column-reverse"&&i.setFlexDirection(Vi.default.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in o&&(typeof o.flexBasis=="number"?i.setFlexBasis(o.flexBasis):typeof o.flexBasis=="string"?i.setFlexBasisPercent(Number.parseInt(o.flexBasis,10)):i.setFlexBasis(NaN)),"alignItems"in o&&((o.alignItems==="stretch"||!o.alignItems)&&i.setAlignItems(Vi.default.ALIGN_STRETCH),o.alignItems==="flex-start"&&i.setAlignItems(Vi.default.ALIGN_FLEX_START),o.alignItems==="center"&&i.setAlignItems(Vi.default.ALIGN_CENTER),o.alignItems==="flex-end"&&i.setAlignItems(Vi.default.ALIGN_FLEX_END)),"alignSelf"in o&&((o.alignSelf==="auto"||!o.alignSelf)&&i.setAlignSelf(Vi.default.ALIGN_AUTO),o.alignSelf==="flex-start"&&i.setAlignSelf(Vi.default.ALIGN_FLEX_START),o.alignSelf==="center"&&i.setAlignSelf(Vi.default.ALIGN_CENTER),o.alignSelf==="flex-end"&&i.setAlignSelf(Vi.default.ALIGN_FLEX_END)),"justifyContent"in o&&((o.justifyContent==="flex-start"||!o.justifyContent)&&i.setJustifyContent(Vi.default.JUSTIFY_FLEX_START),o.justifyContent==="center"&&i.setJustifyContent(Vi.default.JUSTIFY_CENTER),o.justifyContent==="flex-end"&&i.setJustifyContent(Vi.default.JUSTIFY_FLEX_END),o.justifyContent==="space-between"&&i.setJustifyContent(Vi.default.JUSTIFY_SPACE_BETWEEN),o.justifyContent==="space-around"&&i.setJustifyContent(Vi.default.JUSTIFY_SPACE_AROUND))},ib=(i,o)=>{var a,c;"width"in o&&(typeof o.width=="number"?i.setWidth(o.width):typeof o.width=="string"?i.setWidthPercent(Number.parseInt(o.width,10)):i.setWidthAuto()),"height"in o&&(typeof o.height=="number"?i.setHeight(o.height):typeof o.height=="string"?i.setHeightPercent(Number.parseInt(o.height,10)):i.setHeightAuto()),"minWidth"in o&&(typeof o.minWidth=="string"?i.setMinWidthPercent(Number.parseInt(o.minWidth,10)):i.setMinWidth((a=o.minWidth)!==null&&a!==void 0?a:0)),"minHeight"in o&&(typeof o.minHeight=="string"?i.setMinHeightPercent(Number.parseInt(o.minHeight,10)):i.setMinHeight((c=o.minHeight)!==null&&c!==void 0?c:0))},ub=(i,o)=>{"display"in o&&i.setDisplay(o.display==="flex"?Vi.default.DISPLAY_FLEX:Vi.default.DISPLAY_NONE)},ob=(i,o)=>{if("borderStyle"in o){let a=typeof o.borderStyle=="string"?1:0;i.setBorder(Vi.default.EDGE_TOP,a),i.setBorder(Vi.default.EDGE_BOTTOM,a),i.setBorder(Vi.default.EDGE_LEFT,a),i.setBorder(Vi.default.EDGE_RIGHT,a)}};Zy.default=(i,o={})=>{eb(i,o),tb(i,o),nb(i,o),rb(i,o),ib(i,o),ub(i,o),ob(i,o)}});var PT=Ke((eV,FT)=>{"use strict";FT.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var KD=Ke((tV,IT)=>{var $y=PT(),bT={};for(let i of Object.keys($y))bT[$y[i]]=i;var zn={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};IT.exports=zn;for(let i of Object.keys(zn)){if(!("channels"in zn[i]))throw new Error("missing channels property: "+i);if(!("labels"in zn[i]))throw new Error("missing channel labels property: "+i);if(zn[i].labels.length!==zn[i].channels)throw new Error("channel and label counts mismatch: "+i);let{channels:o,labels:a}=zn[i];delete zn[i].channels,delete zn[i].labels,Object.defineProperty(zn[i],"channels",{value:o}),Object.defineProperty(zn[i],"labels",{value:a})}zn.rgb.hsl=function(i){let o=i[0]/255,a=i[1]/255,c=i[2]/255,_=Math.min(o,a,c),t=Math.max(o,a,c),M=t-_,N,O;t===_?N=0:o===t?N=(a-c)/M:a===t?N=2+(c-o)/M:c===t&&(N=4+(o-a)/M),N=Math.min(N*60,360),N<0&&(N+=360);let T=(_+t)/2;return t===_?O=0:T<=.5?O=M/(t+_):O=M/(2-t-_),[N,O*100,T*100]};zn.rgb.hsv=function(i){let o,a,c,_,t,M=i[0]/255,N=i[1]/255,O=i[2]/255,T=Math.max(M,N,O),B=T-Math.min(M,N,O),H=function(q){return(T-q)/6/B+1/2};return B===0?(_=0,t=0):(t=B/T,o=H(M),a=H(N),c=H(O),M===T?_=c-a:N===T?_=1/3+o-c:O===T&&(_=2/3+a-o),_<0?_+=1:_>1&&(_-=1)),[_*360,t*100,T*100]};zn.rgb.hwb=function(i){let o=i[0],a=i[1],c=i[2],_=zn.rgb.hsl(i)[0],t=1/255*Math.min(o,Math.min(a,c));return c=1-1/255*Math.max(o,Math.max(a,c)),[_,t*100,c*100]};zn.rgb.cmyk=function(i){let o=i[0]/255,a=i[1]/255,c=i[2]/255,_=Math.min(1-o,1-a,1-c),t=(1-o-_)/(1-_)||0,M=(1-a-_)/(1-_)||0,N=(1-c-_)/(1-_)||0;return[t*100,M*100,N*100,_*100]};function lb(i,o){return(i[0]-o[0])**2+(i[1]-o[1])**2+(i[2]-o[2])**2}zn.rgb.keyword=function(i){let o=bT[i];if(o)return o;let a=Infinity,c;for(let _ of Object.keys($y)){let t=$y[_],M=lb(i,t);M.04045?((o+.055)/1.055)**2.4:o/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92,c=c>.04045?((c+.055)/1.055)**2.4:c/12.92;let _=o*.4124+a*.3576+c*.1805,t=o*.2126+a*.7152+c*.0722,M=o*.0193+a*.1192+c*.9505;return[_*100,t*100,M*100]};zn.rgb.lab=function(i){let o=zn.rgb.xyz(i),a=o[0],c=o[1],_=o[2];a/=95.047,c/=100,_/=108.883,a=a>.008856?a**(1/3):7.787*a+16/116,c=c>.008856?c**(1/3):7.787*c+16/116,_=_>.008856?_**(1/3):7.787*_+16/116;let t=116*c-16,M=500*(a-c),N=200*(c-_);return[t,M,N]};zn.hsl.rgb=function(i){let o=i[0]/360,a=i[1]/100,c=i[2]/100,_,t,M;if(a===0)return M=c*255,[M,M,M];c<.5?_=c*(1+a):_=c+a-c*a;let N=2*c-_,O=[0,0,0];for(let T=0;T<3;T++)t=o+1/3*-(T-1),t<0&&t++,t>1&&t--,6*t<1?M=N+(_-N)*6*t:2*t<1?M=_:3*t<2?M=N+(_-N)*(2/3-t)*6:M=N,O[T]=M*255;return O};zn.hsl.hsv=function(i){let o=i[0],a=i[1]/100,c=i[2]/100,_=a,t=Math.max(c,.01);c*=2,a*=c<=1?c:2-c,_*=t<=1?t:2-t;let M=(c+a)/2,N=c===0?2*_/(t+_):2*a/(c+a);return[o,N*100,M*100]};zn.hsv.rgb=function(i){let o=i[0]/60,a=i[1]/100,c=i[2]/100,_=Math.floor(o)%6,t=o-Math.floor(o),M=255*c*(1-a),N=255*c*(1-a*t),O=255*c*(1-a*(1-t));switch(c*=255,_){case 0:return[c,O,M];case 1:return[N,c,M];case 2:return[M,c,O];case 3:return[M,N,c];case 4:return[O,M,c];case 5:return[c,M,N]}};zn.hsv.hsl=function(i){let o=i[0],a=i[1]/100,c=i[2]/100,_=Math.max(c,.01),t,M;M=(2-a)*c;let N=(2-a)*_;return t=a*_,t/=N<=1?N:2-N,t=t||0,M/=2,[o,t*100,M*100]};zn.hwb.rgb=function(i){let o=i[0]/360,a=i[1]/100,c=i[2]/100,_=a+c,t;_>1&&(a/=_,c/=_);let M=Math.floor(6*o),N=1-c;t=6*o-M,(M&1)!=0&&(t=1-t);let O=a+t*(N-a),T,B,H;switch(M){default:case 6:case 0:T=N,B=O,H=a;break;case 1:T=O,B=N,H=a;break;case 2:T=a,B=N,H=O;break;case 3:T=a,B=O,H=N;break;case 4:T=O,B=a,H=N;break;case 5:T=N,B=a,H=O;break}return[T*255,B*255,H*255]};zn.cmyk.rgb=function(i){let o=i[0]/100,a=i[1]/100,c=i[2]/100,_=i[3]/100,t=1-Math.min(1,o*(1-_)+_),M=1-Math.min(1,a*(1-_)+_),N=1-Math.min(1,c*(1-_)+_);return[t*255,M*255,N*255]};zn.xyz.rgb=function(i){let o=i[0]/100,a=i[1]/100,c=i[2]/100,_,t,M;return _=o*3.2406+a*-1.5372+c*-.4986,t=o*-.9689+a*1.8758+c*.0415,M=o*.0557+a*-.204+c*1.057,_=_>.0031308?1.055*_**(1/2.4)-.055:_*12.92,t=t>.0031308?1.055*t**(1/2.4)-.055:t*12.92,M=M>.0031308?1.055*M**(1/2.4)-.055:M*12.92,_=Math.min(Math.max(0,_),1),t=Math.min(Math.max(0,t),1),M=Math.min(Math.max(0,M),1),[_*255,t*255,M*255]};zn.xyz.lab=function(i){let o=i[0],a=i[1],c=i[2];o/=95.047,a/=100,c/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,c=c>.008856?c**(1/3):7.787*c+16/116;let _=116*a-16,t=500*(o-a),M=200*(a-c);return[_,t,M]};zn.lab.xyz=function(i){let o=i[0],a=i[1],c=i[2],_,t,M;t=(o+16)/116,_=a/500+t,M=t-c/200;let N=t**3,O=_**3,T=M**3;return t=N>.008856?N:(t-16/116)/7.787,_=O>.008856?O:(_-16/116)/7.787,M=T>.008856?T:(M-16/116)/7.787,_*=95.047,t*=100,M*=108.883,[_,t,M]};zn.lab.lch=function(i){let o=i[0],a=i[1],c=i[2],_;_=Math.atan2(c,a)*360/2/Math.PI,_<0&&(_+=360);let M=Math.sqrt(a*a+c*c);return[o,M,_]};zn.lch.lab=function(i){let o=i[0],a=i[1],_=i[2]/360*2*Math.PI,t=a*Math.cos(_),M=a*Math.sin(_);return[o,t,M]};zn.rgb.ansi16=function(i,o=null){let[a,c,_]=i,t=o===null?zn.rgb.hsv(i)[2]:o;if(t=Math.round(t/50),t===0)return 30;let M=30+(Math.round(_/255)<<2|Math.round(c/255)<<1|Math.round(a/255));return t===2&&(M+=60),M};zn.hsv.ansi16=function(i){return zn.rgb.ansi16(zn.hsv.rgb(i),i[2])};zn.rgb.ansi256=function(i){let o=i[0],a=i[1],c=i[2];return o===a&&a===c?o<8?16:o>248?231:Math.round((o-8)/247*24)+232:16+36*Math.round(o/255*5)+6*Math.round(a/255*5)+Math.round(c/255*5)};zn.ansi16.rgb=function(i){let o=i%10;if(o===0||o===7)return i>50&&(o+=3.5),o=o/10.5*255,[o,o,o];let a=(~~(i>50)+1)*.5,c=(o&1)*a*255,_=(o>>1&1)*a*255,t=(o>>2&1)*a*255;return[c,_,t]};zn.ansi256.rgb=function(i){if(i>=232){let t=(i-232)*10+8;return[t,t,t]}i-=16;let o,a=Math.floor(i/36)/5*255,c=Math.floor((o=i%36)/6)/5*255,_=o%6/5*255;return[a,c,_]};zn.rgb.hex=function(i){let a=(((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255)).toString(16).toUpperCase();return"000000".substring(a.length)+a};zn.hex.rgb=function(i){let o=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!o)return[0,0,0];let a=o[0];o[0].length===3&&(a=a.split("").map(N=>N+N).join(""));let c=parseInt(a,16),_=c>>16&255,t=c>>8&255,M=c&255;return[_,t,M]};zn.rgb.hcg=function(i){let o=i[0]/255,a=i[1]/255,c=i[2]/255,_=Math.max(Math.max(o,a),c),t=Math.min(Math.min(o,a),c),M=_-t,N,O;return M<1?N=t/(1-M):N=0,M<=0?O=0:_===o?O=(a-c)/M%6:_===a?O=2+(c-o)/M:O=4+(o-a)/M,O/=6,O%=1,[O*360,M*100,N*100]};zn.hsl.hcg=function(i){let o=i[1]/100,a=i[2]/100,c=a<.5?2*o*a:2*o*(1-a),_=0;return c<1&&(_=(a-.5*c)/(1-c)),[i[0],c*100,_*100]};zn.hsv.hcg=function(i){let o=i[1]/100,a=i[2]/100,c=o*a,_=0;return c<1&&(_=(a-c)/(1-c)),[i[0],c*100,_*100]};zn.hcg.rgb=function(i){let o=i[0]/360,a=i[1]/100,c=i[2]/100;if(a===0)return[c*255,c*255,c*255];let _=[0,0,0],t=o%1*6,M=t%1,N=1-M,O=0;switch(Math.floor(t)){case 0:_[0]=1,_[1]=M,_[2]=0;break;case 1:_[0]=N,_[1]=1,_[2]=0;break;case 2:_[0]=0,_[1]=1,_[2]=M;break;case 3:_[0]=0,_[1]=N,_[2]=1;break;case 4:_[0]=M,_[1]=0,_[2]=1;break;default:_[0]=1,_[1]=0,_[2]=N}return O=(1-a)*c,[(a*_[0]+O)*255,(a*_[1]+O)*255,(a*_[2]+O)*255]};zn.hcg.hsv=function(i){let o=i[1]/100,a=i[2]/100,c=o+a*(1-o),_=0;return c>0&&(_=o/c),[i[0],_*100,c*100]};zn.hcg.hsl=function(i){let o=i[1]/100,c=i[2]/100*(1-o)+.5*o,_=0;return c>0&&c<.5?_=o/(2*c):c>=.5&&c<1&&(_=o/(2*(1-c))),[i[0],_*100,c*100]};zn.hcg.hwb=function(i){let o=i[1]/100,a=i[2]/100,c=o+a*(1-o);return[i[0],(c-o)*100,(1-c)*100]};zn.hwb.hcg=function(i){let o=i[1]/100,a=i[2]/100,c=1-a,_=c-o,t=0;return _<1&&(t=(c-_)/(1-_)),[i[0],_*100,t*100]};zn.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]};zn.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]};zn.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]};zn.gray.hsl=function(i){return[0,0,i[0]]};zn.gray.hsv=zn.gray.hsl;zn.gray.hwb=function(i){return[0,100,i[0]]};zn.gray.cmyk=function(i){return[0,0,0,i[0]]};zn.gray.lab=function(i){return[i[0],0,0]};zn.gray.hex=function(i){let o=Math.round(i[0]/100*255)&255,c=((o<<16)+(o<<8)+o).toString(16).toUpperCase();return"000000".substring(c.length)+c};zn.rgb.gray=function(i){return[(i[0]+i[1]+i[2])/3/255*100]}});var UT=Ke((nV,BT)=>{var $_=KD();function sb(){let i={},o=Object.keys($_);for(let a=o.length,c=0;c{var XD=KD(),db=UT(),Qv={},pb=Object.keys(XD);function hb(i){let o=function(...a){let c=a[0];return c==null?c:(c.length>1&&(a=c),i(a))};return"conversion"in i&&(o.conversion=i.conversion),o}function vb(i){let o=function(...a){let c=a[0];if(c==null)return c;c.length>1&&(a=c);let _=i(a);if(typeof _=="object")for(let t=_.length,M=0;M{Qv[i]={},Object.defineProperty(Qv[i],"channels",{value:XD[i].channels}),Object.defineProperty(Qv[i],"labels",{value:XD[i].labels});let o=db(i);Object.keys(o).forEach(c=>{let _=o[c];Qv[i][c]=vb(_),Qv[i][c].raw=hb(_)})});jT.exports=Qv});var t4=Ke((iV,HT)=>{"use strict";var qT=(i,o)=>(...a)=>`[${i(...a)+o}m`,WT=(i,o)=>(...a)=>{let c=i(...a);return`[${38+o};5;${c}m`},VT=(i,o)=>(...a)=>{let c=i(...a);return`[${38+o};2;${c[0]};${c[1]};${c[2]}m`},e4=i=>i,GT=(i,o,a)=>[i,o,a],Jv=(i,o,a)=>{Object.defineProperty(i,o,{get:()=>{let c=a();return Object.defineProperty(i,o,{value:c,enumerable:!0,configurable:!0}),c},enumerable:!0,configurable:!0})},QD,Zv=(i,o,a,c)=>{QD===void 0&&(QD=zT());let _=c?10:0,t={};for(let[M,N]of Object.entries(QD)){let O=M==="ansi16"?"ansi":M;M===o?t[O]=i(a,_):typeof N=="object"&&(t[O]=i(N[o],_))}return t};function mb(){let i=new Map,o={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};o.color.gray=o.color.blackBright,o.bgColor.bgGray=o.bgColor.bgBlackBright,o.color.grey=o.color.blackBright,o.bgColor.bgGrey=o.bgColor.bgBlackBright;for(let[a,c]of Object.entries(o)){for(let[_,t]of Object.entries(c))o[_]={open:`[${t[0]}m`,close:`[${t[1]}m`},c[_]=o[_],i.set(t[0],t[1]);Object.defineProperty(o,a,{value:c,enumerable:!1})}return Object.defineProperty(o,"codes",{value:i,enumerable:!1}),o.color.close="",o.bgColor.close="",Jv(o.color,"ansi",()=>Zv(qT,"ansi16",e4,!1)),Jv(o.color,"ansi256",()=>Zv(WT,"ansi256",e4,!1)),Jv(o.color,"ansi16m",()=>Zv(VT,"rgb",GT,!1)),Jv(o.bgColor,"ansi",()=>Zv(qT,"ansi16",e4,!0)),Jv(o.bgColor,"ansi256",()=>Zv(WT,"ansi256",e4,!0)),Jv(o.bgColor,"ansi16m",()=>Zv(VT,"rgb",GT,!0)),o}Object.defineProperty(HT,"exports",{enumerable:!0,get:mb})});var XT=Ke((uV,YT)=>{"use strict";var eg=Z_(),yb=zD(),gb=t4(),JD=new Set(["","\x9B"]),_b=39,KT=i=>`${JD.values().next().value}[${i}m`,Eb=i=>i.split(" ").map(o=>eg(o)),ZD=(i,o,a)=>{let c=[...o],_=!1,t=eg(yb(i[i.length-1]));for(let[M,N]of c.entries()){let O=eg(N);if(t+O<=a?i[i.length-1]+=N:(i.push(N),t=0),JD.has(N))_=!0;else if(_&&N==="m"){_=!1;continue}_||(t+=O,t===a&&M0&&i.length>1&&(i[i.length-2]+=i.pop())},Db=i=>{let o=i.split(" "),a=o.length;for(;a>0&&!(eg(o[a-1])>0);)a--;return a===o.length?i:o.slice(0,a).join(" ")+o.slice(a).join("")},wb=(i,o,a={})=>{if(a.trim!==!1&&i.trim()==="")return"";let c="",_="",t,M=Eb(i),N=[""];for(let[O,T]of i.split(" ").entries()){a.trim!==!1&&(N[N.length-1]=N[N.length-1].trimLeft());let B=eg(N[N.length-1]);if(O!==0&&(B>=o&&(a.wordWrap===!1||a.trim===!1)&&(N.push(""),B=0),(B>0||a.trim===!1)&&(N[N.length-1]+=" ",B++)),a.hard&&M[O]>o){let H=o-B,q=1+Math.floor((M[O]-H-1)/o);Math.floor((M[O]-1)/o)o&&B>0&&M[O]>0){if(a.wordWrap===!1&&Bo&&a.wordWrap===!1){ZD(N,T,o);continue}N[N.length-1]+=T}a.trim!==!1&&(N=N.map(Db)),c=N.join(` +`);for(let[O,T]of[...c].entries()){if(_+=T,JD.has(T)){let H=parseFloat(/\d[^m]*/.exec(c.slice(O,O+4)));t=H===_b?null:H}let B=gb.codes.get(Number(t));t&&B&&(c[O+1]===` +`?_+=KT(B):T===` +`&&(_+=KT(t)))}return _};YT.exports=(i,o,a)=>String(i).normalize().replace(/\r\n/g,` +`).split(` +`).map(c=>wb(c,o,a)).join(` +`)});var ZT=Ke((oV,QT)=>{"use strict";var JT="[\uD800-\uDBFF][\uDC00-\uDFFF]",Sb=i=>i&&i.exact?new RegExp(`^${JT}$`):new RegExp(JT,"g");QT.exports=Sb});var $D=Ke((lV,$T)=>{"use strict";var Tb=qD(),Cb=ZT(),eC=t4(),tC=["","\x9B"],n4=i=>`${tC[0]}[${i}m`,nC=(i,o,a)=>{let c=[];i=[...i];for(let _ of i){let t=_;_.match(";")&&(_=_.split(";")[0][0]+"0");let M=eC.codes.get(parseInt(_,10));if(M){let N=i.indexOf(M.toString());N>=0?i.splice(N,1):c.push(n4(o?M:t))}else if(o){c.push(n4(0));break}else c.push(n4(t))}if(o&&(c=c.filter((_,t)=>c.indexOf(_)===t),a!==void 0)){let _=n4(eC.codes.get(parseInt(a,10)));c=c.reduce((t,M)=>M===_?[M,...t]:[...t,M],[])}return c.join("")};$T.exports=(i,o,a)=>{let c=[...i.normalize()],_=[];a=typeof a=="number"?a:c.length;let t=!1,M,N=0,O="";for(let[T,B]of c.entries()){let H=!1;if(tC.includes(B)){let q=/\d[^m]*/.exec(i.slice(T,T+18));M=q&&q.length>0?q[0]:void 0,No&&N<=a)O+=B;else if(N===o&&!t&&M!==void 0)O=nC(_);else if(N>=a){O+=nC(_,!0,M);break}}return O}});var iC=Ke((sV,rC)=>{"use strict";var p2=$D(),xb=Z_();function r4(i,o,a){if(i.charAt(o)===" ")return o;for(let c=1;c<=3;c++)if(a){if(i.charAt(o+c)===" ")return o+c}else if(i.charAt(o-c)===" ")return o-c;return o}rC.exports=(i,o,a)=>{a=qt({position:"end",preferTruncationOnSpace:!1},a);let{position:c,space:_,preferTruncationOnSpace:t}=a,M="\u2026",N=1;if(typeof i!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof i}`);if(typeof o!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof o}`);if(o<1)return"";if(o===1)return M;let O=xb(i);if(O<=o)return i;if(c==="start"){if(t){let T=r4(i,O-o+1,!0);return M+p2(i,T,O).trim()}return _===!0&&(M+=" ",N=2),M+p2(i,O-o+N,O)}if(c==="middle"){_===!0&&(M=" "+M+" ",N=3);let T=Math.floor(o/2);if(t){let B=r4(i,T),H=r4(i,O-(o-T)+1,!0);return p2(i,0,B)+M+p2(i,H,O).trim()}return p2(i,0,T)+M+p2(i,O-(o-T)+N,O)}if(c==="end"){if(t){let T=r4(i,o-1);return p2(i,0,T)+M}return _===!0&&(M=" "+M,N=2),p2(i,0,o-N)+M}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${c}`)}});var tw=Ke(tg=>{"use strict";var uC=tg&&tg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(tg,"__esModule",{value:!0});var Rb=uC(XT()),Ab=uC(iC()),ew={};tg.default=(i,o,a)=>{let c=i+String(o)+String(a);if(ew[c])return ew[c];let _=i;if(a==="wrap"&&(_=Rb.default(i,o,{trim:!1,hard:!0})),a.startsWith("truncate")){let t="end";a==="truncate-middle"&&(t="middle"),a==="truncate-start"&&(t="start"),_=Ab.default(i,o,{position:t})}return ew[c]=_,_}});var rw=Ke(nw=>{"use strict";Object.defineProperty(nw,"__esModule",{value:!0});var oC=i=>{let o="";if(i.childNodes.length>0)for(let a of i.childNodes){let c="";a.nodeName==="#text"?c=a.nodeValue:((a.nodeName==="ink-text"||a.nodeName==="ink-virtual-text")&&(c=oC(a)),c.length>0&&typeof a.internal_transform=="function"&&(c=a.internal_transform(c))),o+=c}return o};nw.default=oC});var iw=Ke(co=>{"use strict";var ng=co&&co.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(co,"__esModule",{value:!0});co.setTextNodeValue=co.createTextNode=co.setStyle=co.setAttribute=co.removeChildNode=co.insertBeforeNode=co.appendChildNode=co.createNode=co.TEXT_NAME=void 0;var Ob=ng(eh()),lC=ng(LT()),Mb=ng(NT()),kb=ng(tw()),Lb=ng(rw());co.TEXT_NAME="#text";co.createNode=i=>{var o;let a={nodeName:i,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:i==="ink-virtual-text"?void 0:Ob.default.Node.create()};return i==="ink-text"&&((o=a.yogaNode)===null||o===void 0||o.setMeasureFunc(Nb.bind(null,a))),a};co.appendChildNode=(i,o)=>{var a;o.parentNode&&co.removeChildNode(o.parentNode,o),o.parentNode=i,i.childNodes.push(o),o.yogaNode&&((a=i.yogaNode)===null||a===void 0||a.insertChild(o.yogaNode,i.yogaNode.getChildCount())),(i.nodeName==="ink-text"||i.nodeName==="ink-virtual-text")&&i4(i)};co.insertBeforeNode=(i,o,a)=>{var c,_;o.parentNode&&co.removeChildNode(o.parentNode,o),o.parentNode=i;let t=i.childNodes.indexOf(a);if(t>=0){i.childNodes.splice(t,0,o),o.yogaNode&&((c=i.yogaNode)===null||c===void 0||c.insertChild(o.yogaNode,t));return}i.childNodes.push(o),o.yogaNode&&((_=i.yogaNode)===null||_===void 0||_.insertChild(o.yogaNode,i.yogaNode.getChildCount())),(i.nodeName==="ink-text"||i.nodeName==="ink-virtual-text")&&i4(i)};co.removeChildNode=(i,o)=>{var a,c;o.yogaNode&&((c=(a=o.parentNode)===null||a===void 0?void 0:a.yogaNode)===null||c===void 0||c.removeChild(o.yogaNode)),o.parentNode=null;let _=i.childNodes.indexOf(o);_>=0&&i.childNodes.splice(_,1),(i.nodeName==="ink-text"||i.nodeName==="ink-virtual-text")&&i4(i)};co.setAttribute=(i,o,a)=>{i.attributes[o]=a};co.setStyle=(i,o)=>{i.style=o,i.yogaNode&&Mb.default(i.yogaNode,o)};co.createTextNode=i=>{let o={nodeName:"#text",nodeValue:i,yogaNode:void 0,parentNode:null,style:{}};return co.setTextNodeValue(o,i),o};var Nb=function(i,o){var a,c;let _=i.nodeName==="#text"?i.nodeValue:Lb.default(i),t=lC.default(_);if(t.width<=o||t.width>=1&&o>0&&o<1)return t;let M=(c=(a=i.style)===null||a===void 0?void 0:a.textWrap)!==null&&c!==void 0?c:"wrap",N=kb.default(_,o,M);return lC.default(N)},sC=i=>{var o;if(!(!i||!i.parentNode))return(o=i.yogaNode)!==null&&o!==void 0?o:sC(i.parentNode)},i4=i=>{let o=sC(i);o==null||o.markDirty()};co.setTextNodeValue=(i,o)=>{typeof o!="string"&&(o=String(o)),i.nodeValue=o,i4(i)}});var th=Ke((dV,aC)=>{"use strict";aC.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),EMPTY_BUFFER:Buffer.alloc(0),NOOP:()=>{}}});var rg=Ke((pV,uw)=>{"use strict";var{EMPTY_BUFFER:Fb}=th();function fC(i,o){if(i.length===0)return Fb;if(i.length===1)return i[0];let a=Buffer.allocUnsafe(o),c=0;for(let _=0;_{"use strict";var vC=Symbol("kDone"),ow=Symbol("kRun"),mC=class{constructor(o){this[vC]=()=>{this.pending--,this[ow]()},this.concurrency=o||Infinity,this.jobs=[],this.pending=0}add(o){this.jobs.push(o),this[ow]()}[ow](){if(this.pending!==this.concurrency&&this.jobs.length){let o=this.jobs.shift();this.pending++,o(this[vC])}}};hC.exports=mC});var og=Ke((vV,gC)=>{"use strict";var ig=require("zlib"),_C=rg(),Pb=yC(),{kStatusCode:EC,NOOP:Ib}=th(),bb=Buffer.from([0,0,255,255]),o4=Symbol("permessage-deflate"),X1=Symbol("total-length"),ug=Symbol("callback"),h2=Symbol("buffers"),lw=Symbol("error"),l4,DC=class{constructor(o,a,c){if(this._maxPayload=c|0,this._options=o||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!a,this._deflate=null,this._inflate=null,this.params=null,!l4){let _=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;l4=new Pb(_)}}static get extensionName(){return"permessage-deflate"}offer(){let o={};return this._options.serverNoContextTakeover&&(o.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(o.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(o.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?o.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(o.client_max_window_bits=!0),o}accept(o){return o=this.normalizeParams(o),this.params=this._isServer?this.acceptAsServer(o):this.acceptAsClient(o),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let o=this._deflate[ug];this._deflate.close(),this._deflate=null,o&&o(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(o){let a=this._options,c=o.find(_=>!(a.serverNoContextTakeover===!1&&_.server_no_context_takeover||_.server_max_window_bits&&(a.serverMaxWindowBits===!1||typeof a.serverMaxWindowBits=="number"&&a.serverMaxWindowBits>_.server_max_window_bits)||typeof a.clientMaxWindowBits=="number"&&!_.client_max_window_bits));if(!c)throw new Error("None of the extension offers can be accepted");return a.serverNoContextTakeover&&(c.server_no_context_takeover=!0),a.clientNoContextTakeover&&(c.client_no_context_takeover=!0),typeof a.serverMaxWindowBits=="number"&&(c.server_max_window_bits=a.serverMaxWindowBits),typeof a.clientMaxWindowBits=="number"?c.client_max_window_bits=a.clientMaxWindowBits:(c.client_max_window_bits===!0||a.clientMaxWindowBits===!1)&&delete c.client_max_window_bits,c}acceptAsClient(o){let a=o[0];if(this._options.clientNoContextTakeover===!1&&a.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!a.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(a.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&a.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return a}normalizeParams(o){return o.forEach(a=>{Object.keys(a).forEach(c=>{let _=a[c];if(_.length>1)throw new Error(`Parameter "${c}" must have only a single value`);if(_=_[0],c==="client_max_window_bits"){if(_!==!0){let t=+_;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${c}": ${_}`);_=t}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${c}": ${_}`)}else if(c==="server_max_window_bits"){let t=+_;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${c}": ${_}`);_=t}else if(c==="client_no_context_takeover"||c==="server_no_context_takeover"){if(_!==!0)throw new TypeError(`Invalid value for parameter "${c}": ${_}`)}else throw new Error(`Unknown parameter "${c}"`);a[c]=_})}),o}decompress(o,a,c){l4.add(_=>{this._decompress(o,a,(t,M)=>{_(),c(t,M)})})}compress(o,a,c){l4.add(_=>{this._compress(o,a,(t,M)=>{_(),c(t,M)})})}_decompress(o,a,c){let _=this._isServer?"client":"server";if(!this._inflate){let t=`${_}_max_window_bits`,M=typeof this.params[t]!="number"?ig.Z_DEFAULT_WINDOWBITS:this.params[t];this._inflate=ig.createInflateRaw(Zr(qt({},this._options.zlibInflateOptions),{windowBits:M})),this._inflate[o4]=this,this._inflate[X1]=0,this._inflate[h2]=[],this._inflate.on("error",Ub),this._inflate.on("data",wC)}this._inflate[ug]=c,this._inflate.write(o),a&&this._inflate.write(bb),this._inflate.flush(()=>{let t=this._inflate[lw];if(t){this._inflate.close(),this._inflate=null,c(t);return}let M=_C.concat(this._inflate[h2],this._inflate[X1]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[X1]=0,this._inflate[h2]=[],a&&this.params[`${_}_no_context_takeover`]&&this._inflate.reset()),c(null,M)})}_compress(o,a,c){let _=this._isServer?"server":"client";if(!this._deflate){let t=`${_}_max_window_bits`,M=typeof this.params[t]!="number"?ig.Z_DEFAULT_WINDOWBITS:this.params[t];this._deflate=ig.createDeflateRaw(Zr(qt({},this._options.zlibDeflateOptions),{windowBits:M})),this._deflate[X1]=0,this._deflate[h2]=[],this._deflate.on("error",Ib),this._deflate.on("data",Bb)}this._deflate[ug]=c,this._deflate.write(o),this._deflate.flush(ig.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let t=_C.concat(this._deflate[h2],this._deflate[X1]);a&&(t=t.slice(0,t.length-4)),this._deflate[ug]=null,this._deflate[X1]=0,this._deflate[h2]=[],a&&this.params[`${_}_no_context_takeover`]&&this._deflate.reset(),c(null,t)})}};gC.exports=DC;function Bb(i){this[h2].push(i),this[X1]+=i.length}function wC(i){if(this[X1]+=i.length,this[o4]._maxPayload<1||this[X1]<=this[o4]._maxPayload){this[h2].push(i);return}this[lw]=new RangeError("Max payload size exceeded"),this[lw][EC]=1009,this.removeListener("data",wC),this.reset()}function Ub(i){this[o4]._inflate=null,i[EC]=1007,this[ug](i)}});var aw=Ke((mV,sw)=>{"use strict";function SC(i){return i>=1e3&&i<=1014&&i!==1004&&i!==1005&&i!==1006||i>=3e3&&i<=4999}function TC(i){let o=i.length,a=0;for(;a=o||(i[a+1]&192)!=128||(i[a+2]&192)!=128||i[a]===224&&(i[a+1]&224)==128||i[a]===237&&(i[a+1]&224)==160)return!1;a+=3}else if((i[a]&248)==240){if(a+3>=o||(i[a+1]&192)!=128||(i[a+2]&192)!=128||(i[a+3]&192)!=128||i[a]===240&&(i[a+1]&240)==128||i[a]===244&&i[a+1]>143||i[a]>244)return!1;a+=4}else return!1;return!0}try{let i=require("utf-8-validate");typeof i=="object"&&(i=i.Validation.isValidUTF8),sw.exports={isValidStatusCode:SC,isValidUTF8(o){return o.length<150?TC(o):i(o)}}}catch(i){sw.exports={isValidStatusCode:SC,isValidUTF8:TC}}});var dw=Ke((yV,CC)=>{"use strict";var{Writable:jb}=require("stream"),xC=og(),{BINARY_TYPES:zb,EMPTY_BUFFER:Hb,kStatusCode:qb,kWebSocket:Wb}=th(),{concat:fw,toArrayBuffer:Vb,unmask:Gb}=rg(),{isValidStatusCode:Yb,isValidUTF8:RC}=aw(),lg=0,AC=1,OC=2,MC=3,cw=4,Kb=5,kC=class extends jb{constructor(o,a,c,_){super();this._binaryType=o||zb[0],this[Wb]=void 0,this._extensions=a||{},this._isServer=!!c,this._maxPayload=_|0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=lg,this._loop=!1}_write(o,a,c){if(this._opcode===8&&this._state==lg)return c();this._bufferedBytes+=o.length,this._buffers.push(o),this.startLoop(c)}consume(o){if(this._bufferedBytes-=o,o===this._buffers[0].length)return this._buffers.shift();if(o=c.length?a.set(this._buffers.shift(),_):(a.set(new Uint8Array(c.buffer,c.byteOffset,o),_),this._buffers[0]=c.slice(o)),o-=c.length}while(o>0);return a}startLoop(o){let a;this._loop=!0;do switch(this._state){case lg:a=this.getInfo();break;case AC:a=this.getPayloadLength16();break;case OC:a=this.getPayloadLength64();break;case MC:this.getMask();break;case cw:a=this.getData(o);break;default:this._loop=!1;return}while(this._loop);o(a)}getInfo(){if(this._bufferedBytes<2){this._loop=!1;return}let o=this.consume(2);if((o[0]&48)!=0)return this._loop=!1,K0(RangeError,"RSV2 and RSV3 must be clear",!0,1002);let a=(o[0]&64)==64;if(a&&!this._extensions[xC.extensionName])return this._loop=!1,K0(RangeError,"RSV1 must be clear",!0,1002);if(this._fin=(o[0]&128)==128,this._opcode=o[0]&15,this._payloadLength=o[1]&127,this._opcode===0){if(a)return this._loop=!1,K0(RangeError,"RSV1 must be clear",!0,1002);if(!this._fragmented)return this._loop=!1,K0(RangeError,"invalid opcode 0",!0,1002);this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented)return this._loop=!1,K0(RangeError,`invalid opcode ${this._opcode}`,!0,1002);this._compressed=a}else if(this._opcode>7&&this._opcode<11){if(!this._fin)return this._loop=!1,K0(RangeError,"FIN must be set",!0,1002);if(a)return this._loop=!1,K0(RangeError,"RSV1 must be clear",!0,1002);if(this._payloadLength>125)return this._loop=!1,K0(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002)}else return this._loop=!1,K0(RangeError,`invalid opcode ${this._opcode}`,!0,1002);if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(o[1]&128)==128,this._isServer){if(!this._masked)return this._loop=!1,K0(RangeError,"MASK must be set",!0,1002)}else if(this._masked)return this._loop=!1,K0(RangeError,"MASK must be clear",!0,1002);if(this._payloadLength===126)this._state=AC;else if(this._payloadLength===127)this._state=OC;else return this.haveLength()}getPayloadLength16(){if(this._bufferedBytes<2){this._loop=!1;return}return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength()}getPayloadLength64(){if(this._bufferedBytes<8){this._loop=!1;return}let o=this.consume(8),a=o.readUInt32BE(0);return a>Math.pow(2,53-32)-1?(this._loop=!1,K0(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009)):(this._payloadLength=a*Math.pow(2,32)+o.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,K0(RangeError,"Max payload size exceeded",!1,1009);this._masked?this._state=MC:this._state=cw}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=cw}getData(o){let a=Hb;if(this._payloadLength){if(this._bufferedBytes7)return this.controlMessage(a);if(this._compressed){this._state=Kb,this.decompress(a,o);return}return a.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(a)),this.dataMessage()}decompress(o,a){this._extensions[xC.extensionName].decompress(o,this._fin,(_,t)=>{if(_)return a(_);if(t.length){if(this._messageLength+=t.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return a(K0(RangeError,"Max payload size exceeded",!1,1009));this._fragments.push(t)}let M=this.dataMessage();if(M)return a(M);this.startLoop(a)})}dataMessage(){if(this._fin){let o=this._messageLength,a=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let c;this._binaryType==="nodebuffer"?c=fw(a,o):this._binaryType==="arraybuffer"?c=Vb(fw(a,o)):c=a,this.emit("message",c)}else{let c=fw(a,o);if(!RC(c))return this._loop=!1,K0(Error,"invalid UTF-8 sequence",!0,1007);this.emit("message",c.toString())}}this._state=lg}controlMessage(o){if(this._opcode===8)if(this._loop=!1,o.length===0)this.emit("conclude",1005,""),this.end();else{if(o.length===1)return K0(RangeError,"invalid payload length 1",!0,1002);{let a=o.readUInt16BE(0);if(!Yb(a))return K0(RangeError,`invalid status code ${a}`,!0,1002);let c=o.slice(2);if(!RC(c))return K0(Error,"invalid UTF-8 sequence",!0,1007);this.emit("conclude",a,c.toString()),this.end()}}else this._opcode===9?this.emit("ping",o):this.emit("pong",o);this._state=lg}};CC.exports=kC;function K0(i,o,a,c){let _=new i(a?`Invalid WebSocket frame: ${o}`:o);return Error.captureStackTrace(_,K0),_[qb]=c,_}});var pw=Ke((gV,LC)=>{"use strict";var{randomFillSync:Xb}=require("crypto"),NC=og(),{EMPTY_BUFFER:Qb}=th(),{isValidStatusCode:Jb}=aw(),{mask:FC,toBuffer:Q1}=rg(),nh=Buffer.alloc(4),J1=class{constructor(o,a){this._extensions=a||{},this._socket=o,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(o,a){let c=a.mask&&a.readOnly,_=a.mask?6:2,t=o.length;o.length>=65536?(_+=8,t=127):o.length>125&&(_+=2,t=126);let M=Buffer.allocUnsafe(c?o.length+_:_);return M[0]=a.fin?a.opcode|128:a.opcode,a.rsv1&&(M[0]|=64),M[1]=t,t===126?M.writeUInt16BE(o.length,2):t===127&&(M.writeUInt32BE(0,2),M.writeUInt32BE(o.length,6)),a.mask?(Xb(nh,0,4),M[1]|=128,M[_-4]=nh[0],M[_-3]=nh[1],M[_-2]=nh[2],M[_-1]=nh[3],c?(FC(o,nh,M,_,o.length),[M]):(FC(o,nh,o,0,o.length),[M,o])):[M,o]}close(o,a,c,_){let t;if(o===void 0)t=Qb;else{if(typeof o!="number"||!Jb(o))throw new TypeError("First argument must be a valid error code number");if(a===void 0||a==="")t=Buffer.allocUnsafe(2),t.writeUInt16BE(o,0);else{let M=Buffer.byteLength(a);if(M>123)throw new RangeError("The message must not be greater than 123 bytes");t=Buffer.allocUnsafe(2+M),t.writeUInt16BE(o,0),t.write(a,2)}}this._deflating?this.enqueue([this.doClose,t,c,_]):this.doClose(t,c,_)}doClose(o,a,c){this.sendFrame(J1.frame(o,{fin:!0,rsv1:!1,opcode:8,mask:a,readOnly:!1}),c)}ping(o,a,c){let _=Q1(o);if(_.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPing,_,a,Q1.readOnly,c]):this.doPing(_,a,Q1.readOnly,c)}doPing(o,a,c,_){this.sendFrame(J1.frame(o,{fin:!0,rsv1:!1,opcode:9,mask:a,readOnly:c}),_)}pong(o,a,c){let _=Q1(o);if(_.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPong,_,a,Q1.readOnly,c]):this.doPong(_,a,Q1.readOnly,c)}doPong(o,a,c,_){this.sendFrame(J1.frame(o,{fin:!0,rsv1:!1,opcode:10,mask:a,readOnly:c}),_)}send(o,a,c){let _=Q1(o),t=this._extensions[NC.extensionName],M=a.binary?2:1,N=a.compress;if(this._firstFragment?(this._firstFragment=!1,N&&t&&(N=_.length>=t._threshold),this._compress=N):(N=!1,M=0),a.fin&&(this._firstFragment=!0),t){let O={fin:a.fin,rsv1:N,opcode:M,mask:a.mask,readOnly:Q1.readOnly};this._deflating?this.enqueue([this.dispatch,_,this._compress,O,c]):this.dispatch(_,this._compress,O,c)}else this.sendFrame(J1.frame(_,{fin:a.fin,rsv1:!1,opcode:M,mask:a.mask,readOnly:Q1.readOnly}),c)}dispatch(o,a,c,_){if(!a){this.sendFrame(J1.frame(o,c),_);return}let t=this._extensions[NC.extensionName];this._bufferedBytes+=o.length,this._deflating=!0,t.compress(o,c.fin,(M,N)=>{if(this._socket.destroyed){let O=new Error("The socket was closed while data was being compressed");typeof _=="function"&&_(O);for(let T=0;T{"use strict";var sg=class{constructor(o,a){this.target=a,this.type=o}},IC=class extends sg{constructor(o,a){super("message",a);this.data=o}},bC=class extends sg{constructor(o,a,c){super("close",c);this.wasClean=c._closeFrameReceived&&c._closeFrameSent,this.reason=a,this.code=o}},BC=class extends sg{constructor(o){super("open",o)}},UC=class extends sg{constructor(o,a){super("error",a);this.message=o.message,this.error=o}},Zb={addEventListener(i,o,a){if(typeof o!="function")return;function c(O){o.call(this,new IC(O,this))}function _(O,T){o.call(this,new bC(O,T,this))}function t(O){o.call(this,new UC(O,this))}function M(){o.call(this,new BC(this))}let N=a&&a.once?"once":"on";i==="message"?(c._listener=o,this[N](i,c)):i==="close"?(_._listener=o,this[N](i,_)):i==="error"?(t._listener=o,this[N](i,t)):i==="open"?(M._listener=o,this[N](i,M)):this[N](i,o)},removeEventListener(i,o){let a=this.listeners(i);for(let c=0;c{"use strict";var ag=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function zc(i,o,a){i[o]===void 0?i[o]=[a]:i[o].push(a)}function $b(i){let o=Object.create(null);if(i===void 0||i==="")return o;let a=Object.create(null),c=!1,_=!1,t=!1,M,N,O=-1,T=-1,B=0;for(;B{let a=i[o];return Array.isArray(a)||(a=[a]),a.map(c=>[o].concat(Object.keys(c).map(_=>{let t=c[_];return Array.isArray(t)||(t=[t]),t.map(M=>M===!0?_:`${_}=${M}`).join("; ")})).join("; ")).join(", ")}).join(", ")}zC.exports={format:eB,parse:$b}});var _w=Ke((DV,HC)=>{"use strict";var tB=require("events"),nB=require("https"),rB=require("http"),qC=require("net"),iB=require("tls"),{randomBytes:uB,createHash:oB}=require("crypto"),{URL:vw}=require("url"),v2=og(),lB=dw(),sB=pw(),{BINARY_TYPES:WC,EMPTY_BUFFER:mw,GUID:aB,kStatusCode:fB,kWebSocket:na,NOOP:VC}=th(),{addEventListener:cB,removeEventListener:dB}=jC(),{format:pB,parse:hB}=hw(),{toBuffer:vB}=rg(),GC=["CONNECTING","OPEN","CLOSING","CLOSED"],yw=[8,13],mB=30*1e3,Gi=class extends tB{constructor(o,a,c){super();this._binaryType=WC[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage="",this._closeTimer=null,this._extensions={},this._protocol="",this._readyState=Gi.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,o!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,Array.isArray(a)?a=a.join(", "):typeof a=="object"&&a!==null&&(c=a,a=void 0),YC(this,o,a,c)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(o){!WC.includes(o)||(this._binaryType=o,this._receiver&&(this._receiver._binaryType=o))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(o,a,c){let _=new lB(this.binaryType,this._extensions,this._isServer,c);this._sender=new sB(o,this._extensions),this._receiver=_,this._socket=o,_[na]=this,o[na]=this,_.on("conclude",yB),_.on("drain",gB),_.on("error",_B),_.on("message",EB),_.on("ping",DB),_.on("pong",wB),o.setTimeout(0),o.setNoDelay(),a.length>0&&o.unshift(a),o.on("close",KC),o.on("data",s4),o.on("end",XC),o.on("error",QC),this._readyState=Gi.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=Gi.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[v2.extensionName]&&this._extensions[v2.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Gi.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(o,a){if(this.readyState!==Gi.CLOSED){if(this.readyState===Gi.CONNECTING){let c="WebSocket was closed before the connection was established";return Z1(this,this._req,c)}if(this.readyState===Gi.CLOSING){this._closeFrameSent&&this._closeFrameReceived&&this._socket.end();return}this._readyState=Gi.CLOSING,this._sender.close(o,a,!this._isServer,c=>{c||(this._closeFrameSent=!0,this._closeFrameReceived&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),mB)}}ping(o,a,c){if(this.readyState===Gi.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof o=="function"?(c=o,o=a=void 0):typeof a=="function"&&(c=a,a=void 0),typeof o=="number"&&(o=o.toString()),this.readyState!==Gi.OPEN){gw(this,o,c);return}a===void 0&&(a=!this._isServer),this._sender.ping(o||mw,a,c)}pong(o,a,c){if(this.readyState===Gi.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof o=="function"?(c=o,o=a=void 0):typeof a=="function"&&(c=a,a=void 0),typeof o=="number"&&(o=o.toString()),this.readyState!==Gi.OPEN){gw(this,o,c);return}a===void 0&&(a=!this._isServer),this._sender.pong(o||mw,a,c)}send(o,a,c){if(this.readyState===Gi.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof a=="function"&&(c=a,a={}),typeof o=="number"&&(o=o.toString()),this.readyState!==Gi.OPEN){gw(this,o,c);return}let _=qt({binary:typeof o!="string",mask:!this._isServer,compress:!0,fin:!0},a);this._extensions[v2.extensionName]||(_.compress=!1),this._sender.send(o||mw,_,c)}terminate(){if(this.readyState!==Gi.CLOSED){if(this.readyState===Gi.CONNECTING){let o="WebSocket was closed before the connection was established";return Z1(this,this._req,o)}this._socket&&(this._readyState=Gi.CLOSING,this._socket.destroy())}}};GC.forEach((i,o)=>{let a={enumerable:!0,value:o};Object.defineProperty(Gi.prototype,i,a),Object.defineProperty(Gi,i,a)});["binaryType","bufferedAmount","extensions","protocol","readyState","url"].forEach(i=>{Object.defineProperty(Gi.prototype,i,{enumerable:!0})});["open","error","close","message"].forEach(i=>{Object.defineProperty(Gi.prototype,`on${i}`,{configurable:!0,enumerable:!0,get(){let o=this.listeners(i);for(let a=0;a{Z1(i,q,"Opening handshake has timed out")}),q.on("error",ne=>{q===null||q.aborted||(q=i._req=null,i._readyState=Gi.CLOSING,i.emit("error",ne),i.emitClose())}),q.on("response",ne=>{let m=ne.headers.location,pe=ne.statusCode;if(m&&_.followRedirects&&pe>=300&&pe<400){if(++i._redirects>_.maxRedirects){Z1(i,q,"Maximum redirects exceeded");return}q.abort();let ge=new vw(m,o);YC(i,ge,a,c)}else i.emit("unexpected-response",q,ne)||Z1(i,q,`Unexpected server response: ${ne.statusCode}`)}),q.on("upgrade",(ne,m,pe)=>{if(i.emit("upgrade",ne),i.readyState!==Gi.CONNECTING)return;q=i._req=null;let ge=oB("sha1").update(T+aB).digest("base64");if(ne.headers["sec-websocket-accept"]!==ge){Z1(i,m,"Invalid Sec-WebSocket-Accept header");return}let ve=ne.headers["sec-websocket-protocol"],ue=(a||"").split(/, */),_e;if(!a&&ve?_e="Server sent a subprotocol but none was requested":a&&!ve?_e="Server sent no subprotocol":ve&&!ue.includes(ve)&&(_e="Server sent an invalid subprotocol"),_e){Z1(i,m,_e);return}if(ve&&(i._protocol=ve),H)try{let ce=hB(ne.headers["sec-websocket-extensions"]);ce[v2.extensionName]&&(H.accept(ce[v2.extensionName]),i._extensions[v2.extensionName]=H)}catch(ce){Z1(i,m,"Invalid Sec-WebSocket-Extensions header");return}i.setSocket(m,pe,_.maxPayload)})}function SB(i){return i.path=i.socketPath,qC.connect(i)}function TB(i){return i.path=void 0,!i.servername&&i.servername!==""&&(i.servername=qC.isIP(i.host)?"":i.host),iB.connect(i)}function Z1(i,o,a){i._readyState=Gi.CLOSING;let c=new Error(a);Error.captureStackTrace(c,Z1),o.setHeader?(o.abort(),o.socket&&!o.socket.destroyed&&o.socket.destroy(),o.once("abort",i.emitClose.bind(i)),i.emit("error",c)):(o.destroy(c),o.once("error",i.emit.bind(i,"error")),o.once("close",i.emitClose.bind(i)))}function gw(i,o,a){if(o){let c=vB(o).length;i._socket?i._sender._bufferedBytes+=c:i._bufferedAmount+=c}if(a){let c=new Error(`WebSocket is not open: readyState ${i.readyState} (${GC[i.readyState]})`);a(c)}}function yB(i,o){let a=this[na];a._socket.removeListener("data",s4),a._socket.resume(),a._closeFrameReceived=!0,a._closeMessage=o,a._closeCode=i,i===1005?a.close():a.close(i,o)}function gB(){this[na]._socket.resume()}function _B(i){let o=this[na];o._socket.removeListener("data",s4),o._readyState=Gi.CLOSING,o._closeCode=i[fB],o.emit("error",i),o._socket.destroy()}function JC(){this[na].emitClose()}function EB(i){this[na].emit("message",i)}function DB(i){let o=this[na];o.pong(i,!o._isServer,VC),o.emit("ping",i)}function wB(i){this[na].emit("pong",i)}function KC(){let i=this[na];this.removeListener("close",KC),this.removeListener("end",XC),i._readyState=Gi.CLOSING,i._socket.read(),i._receiver.end(),this.removeListener("data",s4),this[na]=void 0,clearTimeout(i._closeTimer),i._receiver._writableState.finished||i._receiver._writableState.errorEmitted?i.emitClose():(i._receiver.on("error",JC),i._receiver.on("finish",JC))}function s4(i){this[na]._receiver.write(i)||this.pause()}function XC(){let i=this[na];i._readyState=Gi.CLOSING,i._receiver.end(),this.end()}function QC(){let i=this[na];this.removeListener("error",QC),this.on("error",VC),i&&(i._readyState=Gi.CLOSING,this.destroy())}});var t6=Ke((wV,ZC)=>{"use strict";var{Duplex:CB}=require("stream");function $C(i){i.emit("close")}function xB(){!this.destroyed&&this._writableState.finished&&this.destroy()}function e6(i){this.removeListener("error",e6),this.destroy(),this.listenerCount("error")===0&&this.emit("error",i)}function RB(i,o){let a=!0;function c(){a&&i._socket.resume()}i.readyState===i.CONNECTING?i.once("open",function(){i._receiver.removeAllListeners("drain"),i._receiver.on("drain",c)}):(i._receiver.removeAllListeners("drain"),i._receiver.on("drain",c));let _=new CB(Zr(qt({},o),{autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1}));return i.on("message",function(M){_.push(M)||(a=!1,i._socket.pause())}),i.once("error",function(M){_.destroyed||_.destroy(M)}),i.once("close",function(){_.destroyed||_.push(null)}),_._destroy=function(t,M){if(i.readyState===i.CLOSED){M(t),process.nextTick($C,_);return}let N=!1;i.once("error",function(T){N=!0,M(T)}),i.once("close",function(){N||M(t),process.nextTick($C,_)}),i.terminate()},_._final=function(t){if(i.readyState===i.CONNECTING){i.once("open",function(){_._final(t)});return}i._socket!==null&&(i._socket._writableState.finished?(t(),_._readableState.endEmitted&&_.destroy()):(i._socket.once("finish",function(){t()}),i.close()))},_._read=function(){i.readyState===i.OPEN&&!a&&(a=!0,i._receiver._writableState.needDrain||i._socket.resume())},_._write=function(t,M,N){if(i.readyState===i.CONNECTING){i.once("open",function(){_._write(t,M,N)});return}i.send(t,N)},_.on("end",xB),_.on("error",e6),_}ZC.exports=RB});var i6=Ke((SV,n6)=>{"use strict";var AB=require("events"),{createHash:OB}=require("crypto"),{createServer:MB,STATUS_CODES:Ew}=require("http"),rh=og(),kB=_w(),{format:LB,parse:NB}=hw(),{GUID:FB,kWebSocket:PB}=th(),IB=/^[+/0-9A-Za-z]{22}==$/,r6=class extends AB{constructor(o,a){super();if(o=qt({maxPayload:100*1024*1024,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null},o),o.port==null&&!o.server&&!o.noServer)throw new TypeError('One of the "port", "server", or "noServer" options must be specified');if(o.port!=null?(this._server=MB((c,_)=>{let t=Ew[426];_.writeHead(426,{"Content-Length":t.length,"Content-Type":"text/plain"}),_.end(t)}),this._server.listen(o.port,o.host,o.backlog,a)):o.server&&(this._server=o.server),this._server){let c=this.emit.bind(this,"connection");this._removeListeners=bB(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(_,t,M)=>{this.handleUpgrade(_,t,M,c)}})}o.perMessageDeflate===!0&&(o.perMessageDeflate={}),o.clientTracking&&(this.clients=new Set),this.options=o}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(o){if(o&&this.once("close",o),this.clients)for(let c of this.clients)c.terminate();let a=this._server;if(a&&(this._removeListeners(),this._removeListeners=this._server=null,this.options.port!=null)){a.close(()=>this.emit("close"));return}process.nextTick(BB,this)}shouldHandle(o){if(this.options.path){let a=o.url.indexOf("?");if((a!==-1?o.url.slice(0,a):o.url)!==this.options.path)return!1}return!0}handleUpgrade(o,a,c,_){a.on("error",Dw);let t=o.headers["sec-websocket-key"]!==void 0?o.headers["sec-websocket-key"].trim():!1,M=+o.headers["sec-websocket-version"],N={};if(o.method!=="GET"||o.headers.upgrade.toLowerCase()!=="websocket"||!t||!IB.test(t)||M!==8&&M!==13||!this.shouldHandle(o))return a4(a,400);if(this.options.perMessageDeflate){let O=new rh(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let T=NB(o.headers["sec-websocket-extensions"]);T[rh.extensionName]&&(O.accept(T[rh.extensionName]),N[rh.extensionName]=O)}catch(T){return a4(a,400)}}if(this.options.verifyClient){let O={origin:o.headers[`${M===8?"sec-websocket-origin":"origin"}`],secure:!!(o.socket.authorized||o.socket.encrypted),req:o};if(this.options.verifyClient.length===2){this.options.verifyClient(O,(T,B,H,q)=>{if(!T)return a4(a,B||401,H,q);this.completeUpgrade(t,N,o,a,c,_)});return}if(!this.options.verifyClient(O))return a4(a,401)}this.completeUpgrade(t,N,o,a,c,_)}completeUpgrade(o,a,c,_,t,M){if(!_.readable||!_.writable)return _.destroy();if(_[PB])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");let N=OB("sha1").update(o+FB).digest("base64"),O=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${N}`],T=new kB(null),B=c.headers["sec-websocket-protocol"];if(B&&(B=B.split(",").map(UB),this.options.handleProtocols?B=this.options.handleProtocols(B,c):B=B[0],B&&(O.push(`Sec-WebSocket-Protocol: ${B}`),T._protocol=B)),a[rh.extensionName]){let H=a[rh.extensionName].params,q=LB({[rh.extensionName]:[H]});O.push(`Sec-WebSocket-Extensions: ${q}`),T._extensions=a}this.emit("headers",O,c),_.write(O.concat(`\r +`).join(`\r +`)),_.removeListener("error",Dw),T.setSocket(_,t,this.options.maxPayload),this.clients&&(this.clients.add(T),T.on("close",()=>this.clients.delete(T))),M(T,c)}};n6.exports=r6;function bB(i,o){for(let a of Object.keys(o))i.on(a,o[a]);return function(){for(let c of Object.keys(o))i.removeListener(c,o[c])}}function BB(i){i.emit("close")}function Dw(){this.destroy()}function a4(i,o,a,c){i.writable&&(a=a||Ew[o],c=qt({Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(a)},c),i.write(`HTTP/1.1 ${o} ${Ew[o]}\r +`+Object.keys(c).map(_=>`${_}: ${c[_]}`).join(`\r +`)+`\r +\r +`+a)),i.removeListener("error",Dw),i.destroy()}function UB(i){return i.trim()}});var o6=Ke((TV,u6)=>{"use strict";var fg=_w();fg.createWebSocketStream=t6();fg.Server=i6();fg.Receiver=dw();fg.Sender=pw();u6.exports=fg});var l6=Ke(f4=>{"use strict";var jB=f4&&f4.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(f4,"__esModule",{value:!0});var zB=jB(o6()),cg=global;cg.WebSocket||(cg.WebSocket=zB.default);cg.window||(cg.window=global);cg.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__=[{type:1,value:7,isEnabled:!0},{type:2,value:"InternalApp",isEnabled:!0,isValid:!0},{type:2,value:"InternalAppContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdoutContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStderrContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdinContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalFocusContext",isEnabled:!0,isValid:!0}]});var s6=Ke((c4,ww)=>{(function(i,o){typeof c4=="object"&&typeof ww=="object"?ww.exports=o():typeof define=="function"&&define.amd?define([],o):typeof c4=="object"?c4.ReactDevToolsBackend=o():i.ReactDevToolsBackend=o()})(window,function(){return function(i){var o={};function a(c){if(o[c])return o[c].exports;var _=o[c]={i:c,l:!1,exports:{}};return i[c].call(_.exports,_,_.exports,a),_.l=!0,_.exports}return a.m=i,a.c=o,a.d=function(c,_,t){a.o(c,_)||Object.defineProperty(c,_,{enumerable:!0,get:t})},a.r=function(c){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})},a.t=function(c,_){if(1&_&&(c=a(c)),8&_||4&_&&typeof c=="object"&&c&&c.__esModule)return c;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:c}),2&_&&typeof c!="string")for(var M in c)a.d(t,M,function(N){return c[N]}.bind(null,M));return t},a.n=function(c){var _=c&&c.__esModule?function(){return c.default}:function(){return c};return a.d(_,"a",_),_},a.o=function(c,_){return Object.prototype.hasOwnProperty.call(c,_)},a.p="",a(a.s=20)}([function(i,o,a){"use strict";i.exports=a(12)},function(i,o,a){"use strict";var c=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function M(N){if(N==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(N)}i.exports=function(){try{if(!Object.assign)return!1;var N=new String("abc");if(N[5]="de",Object.getOwnPropertyNames(N)[0]==="5")return!1;for(var O={},T=0;T<10;T++)O["_"+String.fromCharCode(T)]=T;if(Object.getOwnPropertyNames(O).map(function(H){return O[H]}).join("")!=="0123456789")return!1;var B={};return"abcdefghijklmnopqrst".split("").forEach(function(H){B[H]=H}),Object.keys(Object.assign({},B)).join("")==="abcdefghijklmnopqrst"}catch(H){return!1}}()?Object.assign:function(N,O){for(var T,B,H=M(N),q=1;q=re||nn<0||zt&&Rt-He>=ct}function le(){var Rt=ge();if(xe(Rt))return qe(Rt);Xe=setTimeout(le,function(nn){var an=re-(nn-tt);return zt?pe(an,ct-(nn-He)):an}(Rt))}function qe(Rt){return Xe=void 0,nt&&Ie?X(Rt):(Ie=je=void 0,pt)}function dt(){var Rt=ge(),nn=xe(Rt);if(Ie=arguments,je=this,tt=Rt,nn){if(Xe===void 0)return fe(tt);if(zt)return Xe=setTimeout(le,re),X(tt)}return Xe===void 0&&(Xe=setTimeout(le,re)),pt}return re=ce(re)||0,ue(we)&&(kt=!!we.leading,ct=(zt="maxWait"in we)?m(ce(we.maxWait)||0,re):ct,nt="trailing"in we?!!we.trailing:nt),dt.cancel=function(){Xe!==void 0&&clearTimeout(Xe),He=0,Ie=tt=je=Xe=void 0},dt.flush=function(){return Xe===void 0?pt:qe(ge())},dt}function ue(me){var re=_(me);return!!me&&(re=="object"||re=="function")}function _e(me){return _(me)=="symbol"||function(re){return!!re&&_(re)=="object"}(me)&&ne.call(me)=="[object Symbol]"}function ce(me){if(typeof me=="number")return me;if(_e(me))return NaN;if(ue(me)){var re=typeof me.valueOf=="function"?me.valueOf():me;me=ue(re)?re+"":re}if(typeof me!="string")return me===0?me:+me;me=me.replace(t,"");var we=N.test(me);return we||O.test(me)?T(me.slice(2),we?2:8):M.test(me)?NaN:+me}i.exports=function(me,re,we){var Ie=!0,je=!0;if(typeof me!="function")throw new TypeError("Expected a function");return ue(we)&&(Ie="leading"in we?!!we.leading:Ie,je="trailing"in we?!!we.trailing:je),ve(me,re,{leading:Ie,maxWait:re,trailing:je})}}).call(this,a(4))},function(i,o,a){(function(c){function _(X){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(fe){return typeof fe}:function(fe){return fe&&typeof Symbol=="function"&&fe.constructor===Symbol&&fe!==Symbol.prototype?"symbol":typeof fe})(X)}var t;o=i.exports=m,t=(c===void 0?"undefined":_(c))==="object"&&c.env&&c.env.NODE_DEBUG&&/\bsemver\b/i.test(c.env.NODE_DEBUG)?function(){var X=Array.prototype.slice.call(arguments,0);X.unshift("SEMVER"),console.log.apply(console,X)}:function(){},o.SEMVER_SPEC_VERSION="2.0.0";var M=Number.MAX_SAFE_INTEGER||9007199254740991,N=o.re=[],O=o.src=[],T=o.tokens={},B=0;function H(X){T[X]=B++}H("NUMERICIDENTIFIER"),O[T.NUMERICIDENTIFIER]="0|[1-9]\\d*",H("NUMERICIDENTIFIERLOOSE"),O[T.NUMERICIDENTIFIERLOOSE]="[0-9]+",H("NONNUMERICIDENTIFIER"),O[T.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*",H("MAINVERSION"),O[T.MAINVERSION]="("+O[T.NUMERICIDENTIFIER]+")\\.("+O[T.NUMERICIDENTIFIER]+")\\.("+O[T.NUMERICIDENTIFIER]+")",H("MAINVERSIONLOOSE"),O[T.MAINVERSIONLOOSE]="("+O[T.NUMERICIDENTIFIERLOOSE]+")\\.("+O[T.NUMERICIDENTIFIERLOOSE]+")\\.("+O[T.NUMERICIDENTIFIERLOOSE]+")",H("PRERELEASEIDENTIFIER"),O[T.PRERELEASEIDENTIFIER]="(?:"+O[T.NUMERICIDENTIFIER]+"|"+O[T.NONNUMERICIDENTIFIER]+")",H("PRERELEASEIDENTIFIERLOOSE"),O[T.PRERELEASEIDENTIFIERLOOSE]="(?:"+O[T.NUMERICIDENTIFIERLOOSE]+"|"+O[T.NONNUMERICIDENTIFIER]+")",H("PRERELEASE"),O[T.PRERELEASE]="(?:-("+O[T.PRERELEASEIDENTIFIER]+"(?:\\."+O[T.PRERELEASEIDENTIFIER]+")*))",H("PRERELEASELOOSE"),O[T.PRERELEASELOOSE]="(?:-?("+O[T.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+O[T.PRERELEASEIDENTIFIERLOOSE]+")*))",H("BUILDIDENTIFIER"),O[T.BUILDIDENTIFIER]="[0-9A-Za-z-]+",H("BUILD"),O[T.BUILD]="(?:\\+("+O[T.BUILDIDENTIFIER]+"(?:\\."+O[T.BUILDIDENTIFIER]+")*))",H("FULL"),H("FULLPLAIN"),O[T.FULLPLAIN]="v?"+O[T.MAINVERSION]+O[T.PRERELEASE]+"?"+O[T.BUILD]+"?",O[T.FULL]="^"+O[T.FULLPLAIN]+"$",H("LOOSEPLAIN"),O[T.LOOSEPLAIN]="[v=\\s]*"+O[T.MAINVERSIONLOOSE]+O[T.PRERELEASELOOSE]+"?"+O[T.BUILD]+"?",H("LOOSE"),O[T.LOOSE]="^"+O[T.LOOSEPLAIN]+"$",H("GTLT"),O[T.GTLT]="((?:<|>)?=?)",H("XRANGEIDENTIFIERLOOSE"),O[T.XRANGEIDENTIFIERLOOSE]=O[T.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",H("XRANGEIDENTIFIER"),O[T.XRANGEIDENTIFIER]=O[T.NUMERICIDENTIFIER]+"|x|X|\\*",H("XRANGEPLAIN"),O[T.XRANGEPLAIN]="[v=\\s]*("+O[T.XRANGEIDENTIFIER]+")(?:\\.("+O[T.XRANGEIDENTIFIER]+")(?:\\.("+O[T.XRANGEIDENTIFIER]+")(?:"+O[T.PRERELEASE]+")?"+O[T.BUILD]+"?)?)?",H("XRANGEPLAINLOOSE"),O[T.XRANGEPLAINLOOSE]="[v=\\s]*("+O[T.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+O[T.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+O[T.XRANGEIDENTIFIERLOOSE]+")(?:"+O[T.PRERELEASELOOSE]+")?"+O[T.BUILD]+"?)?)?",H("XRANGE"),O[T.XRANGE]="^"+O[T.GTLT]+"\\s*"+O[T.XRANGEPLAIN]+"$",H("XRANGELOOSE"),O[T.XRANGELOOSE]="^"+O[T.GTLT]+"\\s*"+O[T.XRANGEPLAINLOOSE]+"$",H("COERCE"),O[T.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",H("COERCERTL"),N[T.COERCERTL]=new RegExp(O[T.COERCE],"g"),H("LONETILDE"),O[T.LONETILDE]="(?:~>?)",H("TILDETRIM"),O[T.TILDETRIM]="(\\s*)"+O[T.LONETILDE]+"\\s+",N[T.TILDETRIM]=new RegExp(O[T.TILDETRIM],"g"),H("TILDE"),O[T.TILDE]="^"+O[T.LONETILDE]+O[T.XRANGEPLAIN]+"$",H("TILDELOOSE"),O[T.TILDELOOSE]="^"+O[T.LONETILDE]+O[T.XRANGEPLAINLOOSE]+"$",H("LONECARET"),O[T.LONECARET]="(?:\\^)",H("CARETTRIM"),O[T.CARETTRIM]="(\\s*)"+O[T.LONECARET]+"\\s+",N[T.CARETTRIM]=new RegExp(O[T.CARETTRIM],"g"),H("CARET"),O[T.CARET]="^"+O[T.LONECARET]+O[T.XRANGEPLAIN]+"$",H("CARETLOOSE"),O[T.CARETLOOSE]="^"+O[T.LONECARET]+O[T.XRANGEPLAINLOOSE]+"$",H("COMPARATORLOOSE"),O[T.COMPARATORLOOSE]="^"+O[T.GTLT]+"\\s*("+O[T.LOOSEPLAIN]+")$|^$",H("COMPARATOR"),O[T.COMPARATOR]="^"+O[T.GTLT]+"\\s*("+O[T.FULLPLAIN]+")$|^$",H("COMPARATORTRIM"),O[T.COMPARATORTRIM]="(\\s*)"+O[T.GTLT]+"\\s*("+O[T.LOOSEPLAIN]+"|"+O[T.XRANGEPLAIN]+")",N[T.COMPARATORTRIM]=new RegExp(O[T.COMPARATORTRIM],"g"),H("HYPHENRANGE"),O[T.HYPHENRANGE]="^\\s*("+O[T.XRANGEPLAIN]+")\\s+-\\s+("+O[T.XRANGEPLAIN]+")\\s*$",H("HYPHENRANGELOOSE"),O[T.HYPHENRANGELOOSE]="^\\s*("+O[T.XRANGEPLAINLOOSE]+")\\s+-\\s+("+O[T.XRANGEPLAINLOOSE]+")\\s*$",H("STAR"),O[T.STAR]="(<|>)?=?\\s*\\*";for(var q=0;q256||!(fe.loose?N[T.LOOSE]:N[T.FULL]).test(X))return null;try{return new m(X,fe)}catch(xe){return null}}function m(X,fe){if(fe&&_(fe)==="object"||(fe={loose:!!fe,includePrerelease:!1}),X instanceof m){if(X.loose===fe.loose)return X;X=X.version}else if(typeof X!="string")throw new TypeError("Invalid Version: "+X);if(X.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof m))return new m(X,fe);t("SemVer",X,fe),this.options=fe,this.loose=!!fe.loose;var xe=X.trim().match(fe.loose?N[T.LOOSE]:N[T.FULL]);if(!xe)throw new TypeError("Invalid Version: "+X);if(this.raw=X,this.major=+xe[1],this.minor=+xe[2],this.patch=+xe[3],this.major>M||this.major<0)throw new TypeError("Invalid major version");if(this.minor>M||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>M||this.patch<0)throw new TypeError("Invalid patch version");xe[4]?this.prerelease=xe[4].split(".").map(function(le){if(/^[0-9]+$/.test(le)){var qe=+le;if(qe>=0&&qe=0;)typeof this.prerelease[xe]=="number"&&(this.prerelease[xe]++,xe=-2);xe===-1&&this.prerelease.push(0)}fe&&(this.prerelease[0]===fe?isNaN(this.prerelease[1])&&(this.prerelease=[fe,0]):this.prerelease=[fe,0]);break;default:throw new Error("invalid increment argument: "+X)}return this.format(),this.raw=this.version,this},o.inc=function(X,fe,xe,le){typeof xe=="string"&&(le=xe,xe=void 0);try{return new m(X,xe).inc(fe,le).version}catch(qe){return null}},o.diff=function(X,fe){if(ce(X,fe))return null;var xe=ne(X),le=ne(fe),qe="";if(xe.prerelease.length||le.prerelease.length){qe="pre";var dt="prerelease"}for(var Rt in xe)if((Rt==="major"||Rt==="minor"||Rt==="patch")&&xe[Rt]!==le[Rt])return qe+Rt;return dt},o.compareIdentifiers=ge;var pe=/^[0-9]+$/;function ge(X,fe){var xe=pe.test(X),le=pe.test(fe);return xe&&le&&(X=+X,fe=+fe),X===fe?0:xe&&!le?-1:le&&!xe?1:X0}function _e(X,fe,xe){return ve(X,fe,xe)<0}function ce(X,fe,xe){return ve(X,fe,xe)===0}function me(X,fe,xe){return ve(X,fe,xe)!==0}function re(X,fe,xe){return ve(X,fe,xe)>=0}function we(X,fe,xe){return ve(X,fe,xe)<=0}function Ie(X,fe,xe,le){switch(fe){case"===":return _(X)==="object"&&(X=X.version),_(xe)==="object"&&(xe=xe.version),X===xe;case"!==":return _(X)==="object"&&(X=X.version),_(xe)==="object"&&(xe=xe.version),X!==xe;case"":case"=":case"==":return ce(X,xe,le);case"!=":return me(X,xe,le);case">":return ue(X,xe,le);case">=":return re(X,xe,le);case"<":return _e(X,xe,le);case"<=":return we(X,xe,le);default:throw new TypeError("Invalid operator: "+fe)}}function je(X,fe){if(fe&&_(fe)==="object"||(fe={loose:!!fe,includePrerelease:!1}),X instanceof je){if(X.loose===!!fe.loose)return X;X=X.value}if(!(this instanceof je))return new je(X,fe);t("comparator",X,fe),this.options=fe,this.loose=!!fe.loose,this.parse(X),this.semver===ct?this.value="":this.value=this.operator+this.semver.version,t("comp",this)}o.rcompareIdentifiers=function(X,fe){return ge(fe,X)},o.major=function(X,fe){return new m(X,fe).major},o.minor=function(X,fe){return new m(X,fe).minor},o.patch=function(X,fe){return new m(X,fe).patch},o.compare=ve,o.compareLoose=function(X,fe){return ve(X,fe,!0)},o.compareBuild=function(X,fe,xe){var le=new m(X,xe),qe=new m(fe,xe);return le.compare(qe)||le.compareBuild(qe)},o.rcompare=function(X,fe,xe){return ve(fe,X,xe)},o.sort=function(X,fe){return X.sort(function(xe,le){return o.compareBuild(xe,le,fe)})},o.rsort=function(X,fe){return X.sort(function(xe,le){return o.compareBuild(le,xe,fe)})},o.gt=ue,o.lt=_e,o.eq=ce,o.neq=me,o.gte=re,o.lte=we,o.cmp=Ie,o.Comparator=je;var ct={};function pt(X,fe){if(fe&&_(fe)==="object"||(fe={loose:!!fe,includePrerelease:!1}),X instanceof pt)return X.loose===!!fe.loose&&X.includePrerelease===!!fe.includePrerelease?X:new pt(X.raw,fe);if(X instanceof je)return new pt(X.value,fe);if(!(this instanceof pt))return new pt(X,fe);if(this.options=fe,this.loose=!!fe.loose,this.includePrerelease=!!fe.includePrerelease,this.raw=X,this.set=X.split(/\s*\|\|\s*/).map(function(xe){return this.parseRange(xe.trim())},this).filter(function(xe){return xe.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+X);this.format()}function Xe(X,fe){for(var xe=!0,le=X.slice(),qe=le.pop();xe&&le.length;)xe=le.every(function(dt){return qe.intersects(dt,fe)}),qe=le.pop();return xe}function tt(X){return!X||X.toLowerCase()==="x"||X==="*"}function He(X,fe,xe,le,qe,dt,Rt,nn,an,Mn,lr,ln,Gt){return((fe=tt(xe)?"":tt(le)?">="+xe+".0.0":tt(qe)?">="+xe+"."+le+".0":">="+fe)+" "+(nn=tt(an)?"":tt(Mn)?"<"+(+an+1)+".0.0":tt(lr)?"<"+an+"."+(+Mn+1)+".0":ln?"<="+an+"."+Mn+"."+lr+"-"+ln:"<="+nn)).trim()}function kt(X,fe,xe){for(var le=0;le0){var qe=X[le].semver;if(qe.major===fe.major&&qe.minor===fe.minor&&qe.patch===fe.patch)return!0}return!1}return!0}function zt(X,fe,xe){try{fe=new pt(fe,xe)}catch(le){return!1}return fe.test(X)}function nt(X,fe,xe,le){var qe,dt,Rt,nn,an;switch(X=new m(X,le),fe=new pt(fe,le),xe){case">":qe=ue,dt=we,Rt=_e,nn=">",an=">=";break;case"<":qe=_e,dt=re,Rt=ue,nn="<",an="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(zt(X,fe,le))return!1;for(var Mn=0;Mn=0.0.0")),ln=ln||Er,Gt=Gt||Er,qe(Er.semver,ln.semver,le)?ln=Er:Rt(Er.semver,Gt.semver,le)&&(Gt=Er)}),ln.operator===nn||ln.operator===an||(!Gt.operator||Gt.operator===nn)&&dt(X,Gt.semver)||Gt.operator===an&&Rt(X,Gt.semver))return!1}return!0}je.prototype.parse=function(X){var fe=this.options.loose?N[T.COMPARATORLOOSE]:N[T.COMPARATOR],xe=X.match(fe);if(!xe)throw new TypeError("Invalid comparator: "+X);this.operator=xe[1]!==void 0?xe[1]:"",this.operator==="="&&(this.operator=""),xe[2]?this.semver=new m(xe[2],this.options.loose):this.semver=ct},je.prototype.toString=function(){return this.value},je.prototype.test=function(X){if(t("Comparator.test",X,this.options.loose),this.semver===ct||X===ct)return!0;if(typeof X=="string")try{X=new m(X,this.options)}catch(fe){return!1}return Ie(X,this.operator,this.semver,this.options)},je.prototype.intersects=function(X,fe){if(!(X instanceof je))throw new TypeError("a Comparator is required");var xe;if(fe&&_(fe)==="object"||(fe={loose:!!fe,includePrerelease:!1}),this.operator==="")return this.value===""||(xe=new pt(X.value,fe),zt(this.value,xe,fe));if(X.operator==="")return X.value===""||(xe=new pt(this.value,fe),zt(X.semver,xe,fe));var le=!(this.operator!==">="&&this.operator!==">"||X.operator!==">="&&X.operator!==">"),qe=!(this.operator!=="<="&&this.operator!=="<"||X.operator!=="<="&&X.operator!=="<"),dt=this.semver.version===X.semver.version,Rt=!(this.operator!==">="&&this.operator!=="<="||X.operator!==">="&&X.operator!=="<="),nn=Ie(this.semver,"<",X.semver,fe)&&(this.operator===">="||this.operator===">")&&(X.operator==="<="||X.operator==="<"),an=Ie(this.semver,">",X.semver,fe)&&(this.operator==="<="||this.operator==="<")&&(X.operator===">="||X.operator===">");return le||qe||dt&&Rt||nn||an},o.Range=pt,pt.prototype.format=function(){return this.range=this.set.map(function(X){return X.join(" ").trim()}).join("||").trim(),this.range},pt.prototype.toString=function(){return this.range},pt.prototype.parseRange=function(X){var fe=this.options.loose;X=X.trim();var xe=fe?N[T.HYPHENRANGELOOSE]:N[T.HYPHENRANGE];X=X.replace(xe,He),t("hyphen replace",X),X=X.replace(N[T.COMPARATORTRIM],"$1$2$3"),t("comparator trim",X,N[T.COMPARATORTRIM]),X=(X=(X=X.replace(N[T.TILDETRIM],"$1~")).replace(N[T.CARETTRIM],"$1^")).split(/\s+/).join(" ");var le=fe?N[T.COMPARATORLOOSE]:N[T.COMPARATOR],qe=X.split(" ").map(function(dt){return function(Rt,nn){return t("comp",Rt,nn),Rt=function(an,Mn){return an.trim().split(/\s+/).map(function(lr){return function(ln,Gt){t("caret",ln,Gt);var Er=Gt.loose?N[T.CARETLOOSE]:N[T.CARET];return ln.replace(Er,function(w,jt,Xn,vr,jr){var fr;return t("caret",ln,w,jt,Xn,vr,jr),tt(jt)?fr="":tt(Xn)?fr=">="+jt+".0.0 <"+(+jt+1)+".0.0":tt(vr)?fr=jt==="0"?">="+jt+"."+Xn+".0 <"+jt+"."+(+Xn+1)+".0":">="+jt+"."+Xn+".0 <"+(+jt+1)+".0.0":jr?(t("replaceCaret pr",jr),fr=jt==="0"?Xn==="0"?">="+jt+"."+Xn+"."+vr+"-"+jr+" <"+jt+"."+Xn+"."+(+vr+1):">="+jt+"."+Xn+"."+vr+"-"+jr+" <"+jt+"."+(+Xn+1)+".0":">="+jt+"."+Xn+"."+vr+"-"+jr+" <"+(+jt+1)+".0.0"):(t("no pr"),fr=jt==="0"?Xn==="0"?">="+jt+"."+Xn+"."+vr+" <"+jt+"."+Xn+"."+(+vr+1):">="+jt+"."+Xn+"."+vr+" <"+jt+"."+(+Xn+1)+".0":">="+jt+"."+Xn+"."+vr+" <"+(+jt+1)+".0.0"),t("caret return",fr),fr})}(lr,Mn)}).join(" ")}(Rt,nn),t("caret",Rt),Rt=function(an,Mn){return an.trim().split(/\s+/).map(function(lr){return function(ln,Gt){var Er=Gt.loose?N[T.TILDELOOSE]:N[T.TILDE];return ln.replace(Er,function(w,jt,Xn,vr,jr){var fr;return t("tilde",ln,w,jt,Xn,vr,jr),tt(jt)?fr="":tt(Xn)?fr=">="+jt+".0.0 <"+(+jt+1)+".0.0":tt(vr)?fr=">="+jt+"."+Xn+".0 <"+jt+"."+(+Xn+1)+".0":jr?(t("replaceTilde pr",jr),fr=">="+jt+"."+Xn+"."+vr+"-"+jr+" <"+jt+"."+(+Xn+1)+".0"):fr=">="+jt+"."+Xn+"."+vr+" <"+jt+"."+(+Xn+1)+".0",t("tilde return",fr),fr})}(lr,Mn)}).join(" ")}(Rt,nn),t("tildes",Rt),Rt=function(an,Mn){return t("replaceXRanges",an,Mn),an.split(/\s+/).map(function(lr){return function(ln,Gt){ln=ln.trim();var Er=Gt.loose?N[T.XRANGELOOSE]:N[T.XRANGE];return ln.replace(Er,function(w,jt,Xn,vr,jr,fr){t("xRange",ln,w,jt,Xn,vr,jr,fr);var zr=tt(Xn),Qt=zr||tt(vr),wu=Qt||tt(jr),po=wu;return jt==="="&&po&&(jt=""),fr=Gt.includePrerelease?"-0":"",zr?w=jt===">"||jt==="<"?"<0.0.0-0":"*":jt&&po?(Qt&&(vr=0),jr=0,jt===">"?(jt=">=",Qt?(Xn=+Xn+1,vr=0,jr=0):(vr=+vr+1,jr=0)):jt==="<="&&(jt="<",Qt?Xn=+Xn+1:vr=+vr+1),w=jt+Xn+"."+vr+"."+jr+fr):Qt?w=">="+Xn+".0.0"+fr+" <"+(+Xn+1)+".0.0"+fr:wu&&(w=">="+Xn+"."+vr+".0"+fr+" <"+Xn+"."+(+vr+1)+".0"+fr),t("xRange return",w),w})}(lr,Mn)}).join(" ")}(Rt,nn),t("xrange",Rt),Rt=function(an,Mn){return t("replaceStars",an,Mn),an.trim().replace(N[T.STAR],"")}(Rt,nn),t("stars",Rt),Rt}(dt,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(qe=qe.filter(function(dt){return!!dt.match(le)})),qe=qe.map(function(dt){return new je(dt,this.options)},this)},pt.prototype.intersects=function(X,fe){if(!(X instanceof pt))throw new TypeError("a Range is required");return this.set.some(function(xe){return Xe(xe,fe)&&X.set.some(function(le){return Xe(le,fe)&&xe.every(function(qe){return le.every(function(dt){return qe.intersects(dt,fe)})})})})},o.toComparators=function(X,fe){return new pt(X,fe).set.map(function(xe){return xe.map(function(le){return le.value}).join(" ").trim().split(" ")})},pt.prototype.test=function(X){if(!X)return!1;if(typeof X=="string")try{X=new m(X,this.options)}catch(xe){return!1}for(var fe=0;fe":dt.prerelease.length===0?dt.patch++:dt.prerelease.push(0),dt.raw=dt.format();case"":case">=":xe&&!ue(xe,dt)||(xe=dt);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+qe.operator)}});return xe&&X.test(xe)?xe:null},o.validRange=function(X,fe){try{return new pt(X,fe).range||"*"}catch(xe){return null}},o.ltr=function(X,fe,xe){return nt(X,fe,"<",xe)},o.gtr=function(X,fe,xe){return nt(X,fe,">",xe)},o.outside=nt,o.prerelease=function(X,fe){var xe=ne(X,fe);return xe&&xe.prerelease.length?xe.prerelease:null},o.intersects=function(X,fe,xe){return X=new pt(X,xe),fe=new pt(fe,xe),X.intersects(fe)},o.coerce=function(X,fe){if(X instanceof m)return X;if(typeof X=="number"&&(X=String(X)),typeof X!="string")return null;var xe=null;if((fe=fe||{}).rtl){for(var le;(le=N[T.COERCERTL].exec(X))&&(!xe||xe.index+xe[0].length!==X.length);)xe&&le.index+le[0].length===xe.index+xe[0].length||(xe=le),N[T.COERCERTL].lastIndex=le.index+le[1].length+le[2].length;N[T.COERCERTL].lastIndex=-1}else xe=X.match(N[T.COERCE]);return xe===null?null:ne(xe[2]+"."+(xe[3]||"0")+"."+(xe[4]||"0"),fe)}}).call(this,a(5))},function(i,o){function a(_){return(a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(_)}var c;c=function(){return this}();try{c=c||new Function("return this")()}catch(_){(typeof window=="undefined"?"undefined":a(window))==="object"&&(c=window)}i.exports=c},function(i,o){var a,c,_=i.exports={};function t(){throw new Error("setTimeout has not been defined")}function M(){throw new Error("clearTimeout has not been defined")}function N(ge){if(a===setTimeout)return setTimeout(ge,0);if((a===t||!a)&&setTimeout)return a=setTimeout,setTimeout(ge,0);try{return a(ge,0)}catch(ve){try{return a.call(null,ge,0)}catch(ue){return a.call(this,ge,0)}}}(function(){try{a=typeof setTimeout=="function"?setTimeout:t}catch(ge){a=t}try{c=typeof clearTimeout=="function"?clearTimeout:M}catch(ge){c=M}})();var O,T=[],B=!1,H=-1;function q(){B&&O&&(B=!1,O.length?T=O.concat(T):H=-1,T.length&&ne())}function ne(){if(!B){var ge=N(q);B=!0;for(var ve=T.length;ve;){for(O=T,T=[];++H1)for(var ue=1;uethis[M])return me(this,this[m].get(Xe)),!1;var nt=this[m].get(Xe).value;return this[H]&&(this[q]||this[H](Xe,nt.value)),nt.now=kt,nt.maxAge=He,nt.value=tt,this[N]+=zt-nt.length,nt.length=zt,this.get(Xe),ce(this),!0}var X=new re(Xe,tt,zt,kt,He);return X.length>this[M]?(this[H]&&this[H](Xe,tt),!1):(this[N]+=X.length,this[ne].unshift(X),this[m].set(Xe,this[ne].head),ce(this),!0)}},{key:"has",value:function(Xe){if(!this[m].has(Xe))return!1;var tt=this[m].get(Xe).value;return!_e(this,tt)}},{key:"get",value:function(Xe){return ue(this,Xe,!0)}},{key:"peek",value:function(Xe){return ue(this,Xe,!1)}},{key:"pop",value:function(){var Xe=this[ne].tail;return Xe?(me(this,Xe),Xe.value):null}},{key:"del",value:function(Xe){me(this,this[m].get(Xe))}},{key:"load",value:function(Xe){this.reset();for(var tt=Date.now(),He=Xe.length-1;He>=0;He--){var kt=Xe[He],zt=kt.e||0;if(zt===0)this.set(kt.k,kt.v);else{var nt=zt-tt;nt>0&&this.set(kt.k,kt.v,nt)}}}},{key:"prune",value:function(){var Xe=this;this[m].forEach(function(tt,He){return ue(Xe,He,!1)})}},{key:"max",set:function(Xe){if(typeof Xe!="number"||Xe<0)throw new TypeError("max must be a non-negative number");this[M]=Xe||1/0,ce(this)},get:function(){return this[M]}},{key:"allowStale",set:function(Xe){this[T]=!!Xe},get:function(){return this[T]}},{key:"maxAge",set:function(Xe){if(typeof Xe!="number")throw new TypeError("maxAge must be a non-negative number");this[B]=Xe,ce(this)},get:function(){return this[B]}},{key:"lengthCalculator",set:function(Xe){var tt=this;typeof Xe!="function"&&(Xe=ge),Xe!==this[O]&&(this[O]=Xe,this[N]=0,this[ne].forEach(function(He){He.length=tt[O](He.value,He.key),tt[N]+=He.length})),ce(this)},get:function(){return this[O]}},{key:"length",get:function(){return this[N]}},{key:"itemCount",get:function(){return this[ne].length}}])&&_(je.prototype,ct),pt&&_(je,pt),Ie}(),ue=function(Ie,je,ct){var pt=Ie[m].get(je);if(pt){var Xe=pt.value;if(_e(Ie,Xe)){if(me(Ie,pt),!Ie[T])return}else ct&&(Ie[pe]&&(pt.value.now=Date.now()),Ie[ne].unshiftNode(pt));return Xe.value}},_e=function(Ie,je){if(!je||!je.maxAge&&!Ie[B])return!1;var ct=Date.now()-je.now;return je.maxAge?ct>je.maxAge:Ie[B]&&ct>Ie[B]},ce=function(Ie){if(Ie[N]>Ie[M])for(var je=Ie[ne].tail;Ie[N]>Ie[M]&&je!==null;){var ct=je.prev;me(Ie,je),je=ct}},me=function(Ie,je){if(je){var ct=je.value;Ie[H]&&Ie[H](ct.key,ct.value),Ie[N]-=ct.length,Ie[m].delete(ct.key),Ie[ne].removeNode(je)}},re=function Ie(je,ct,pt,Xe,tt){c(this,Ie),this.key=je,this.value=ct,this.length=pt,this.now=Xe,this.maxAge=tt||0},we=function(Ie,je,ct,pt){var Xe=ct.value;_e(Ie,Xe)&&(me(Ie,ct),Ie[T]||(Xe=void 0)),Xe&&je.call(pt,Xe.value,Xe.key,Ie)};i.exports=ve},function(i,o,a){(function(c){function _(t){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M})(t)}i.exports=function(){if(typeof document=="undefined"||!document.addEventListener)return null;var t,M,N,O={};return O.copy=function(){var T=!1,B=null,H=!1;function q(){T=!1,B=null,H&&window.getSelection().removeAllRanges(),H=!1}return document.addEventListener("copy",function(ne){if(T){for(var m in B)ne.clipboardData.setData(m,B[m]);ne.preventDefault()}}),function(ne){return new Promise(function(m,pe){T=!0,typeof ne=="string"?B={"text/plain":ne}:ne instanceof Node?B={"text/html":new XMLSerializer().serializeToString(ne)}:ne instanceof Object?B=ne:pe("Invalid data type. Must be string, DOM node, or an object mapping MIME types to strings."),function ge(ve){try{if(document.execCommand("copy"))q(),m();else{if(ve)throw q(),new Error("Unable to copy. Perhaps it's not available in your browser?");(function(){var ue=document.getSelection();if(!document.queryCommandEnabled("copy")&&ue.isCollapsed){var _e=document.createRange();_e.selectNodeContents(document.body),ue.removeAllRanges(),ue.addRange(_e),H=!0}})(),ge(!0)}}catch(ue){q(),pe(ue)}}(!1)})}}(),O.paste=(N=!1,document.addEventListener("paste",function(T){if(N){N=!1,T.preventDefault();var B=t;t=null,B(T.clipboardData.getData(M))}}),function(T){return new Promise(function(B,H){N=!0,t=B,M=T||"text/plain";try{document.execCommand("paste")||(N=!1,H(new Error("Unable to paste. Pasting only works in Internet Explorer at the moment.")))}catch(q){N=!1,H(new Error(q))}})}),typeof ClipboardEvent=="undefined"&&window.clipboardData!==void 0&&window.clipboardData.setData!==void 0&&(function(T){function B(ce,me){return function(){ce.apply(me,arguments)}}function H(ce){if(_(this)!="object")throw new TypeError("Promises must be constructed via new");if(typeof ce!="function")throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],ve(ce,B(ne,this),B(m,this))}function q(ce){var me=this;return this._state===null?void this._deferreds.push(ce):void ue(function(){var re=me._state?ce.onFulfilled:ce.onRejected;if(re!==null){var we;try{we=re(me._value)}catch(Ie){return void ce.reject(Ie)}ce.resolve(we)}else(me._state?ce.resolve:ce.reject)(me._value)})}function ne(ce){try{if(ce===this)throw new TypeError("A promise cannot be resolved with itself.");if(ce&&(_(ce)=="object"||typeof ce=="function")){var me=ce.then;if(typeof me=="function")return void ve(B(me,ce),B(ne,this),B(m,this))}this._state=!0,this._value=ce,pe.call(this)}catch(re){m.call(this,re)}}function m(ce){this._state=!1,this._value=ce,pe.call(this)}function pe(){for(var ce=0,me=this._deferreds.length;me>ce;ce++)q.call(this,this._deferreds[ce]);this._deferreds=null}function ge(ce,me,re,we){this.onFulfilled=typeof ce=="function"?ce:null,this.onRejected=typeof me=="function"?me:null,this.resolve=re,this.reject=we}function ve(ce,me,re){var we=!1;try{ce(function(Ie){we||(we=!0,me(Ie))},function(Ie){we||(we=!0,re(Ie))})}catch(Ie){if(we)return;we=!0,re(Ie)}}var ue=H.immediateFn||typeof c=="function"&&c||function(ce){setTimeout(ce,1)},_e=Array.isArray||function(ce){return Object.prototype.toString.call(ce)==="[object Array]"};H.prototype.catch=function(ce){return this.then(null,ce)},H.prototype.then=function(ce,me){var re=this;return new H(function(we,Ie){q.call(re,new ge(ce,me,we,Ie))})},H.all=function(){var ce=Array.prototype.slice.call(arguments.length===1&&_e(arguments[0])?arguments[0]:arguments);return new H(function(me,re){function we(ct,pt){try{if(pt&&(_(pt)=="object"||typeof pt=="function")){var Xe=pt.then;if(typeof Xe=="function")return void Xe.call(pt,function(tt){we(ct,tt)},re)}ce[ct]=pt,--Ie==0&&me(ce)}catch(tt){re(tt)}}if(ce.length===0)return me([]);for(var Ie=ce.length,je=0;jewe;we++)ce[we].then(me,re)})},i.exports?i.exports=H:T.Promise||(T.Promise=H)}(this),O.copy=function(T){return new Promise(function(B,H){if(typeof T!="string"&&!("text/plain"in T))throw new Error("You must provide a text/plain type.");var q=typeof T=="string"?T:T["text/plain"];window.clipboardData.setData("Text",q)?B():H(new Error("Copying was rejected."))})},O.paste=function(){return new Promise(function(T,B){var H=window.clipboardData.getData("Text");H?T(H):B(new Error("Pasting was rejected."))})}),O}()}).call(this,a(13).setImmediate)},function(i,o,a){"use strict";i.exports=a(15)},function(i,o,a){"use strict";a.r(o),o.default=`:root { + /** + * IMPORTANT: When new theme variables are added below\u2013 also add them to SettingsContext updateThemeVariables() + */ + + /* Light theme */ + --light-color-attribute-name: #ef6632; + --light-color-attribute-name-not-editable: #23272f; + --light-color-attribute-name-inverted: rgba(255, 255, 255, 0.7); + --light-color-attribute-value: #1a1aa6; + --light-color-attribute-value-inverted: #ffffff; + --light-color-attribute-editable-value: #1a1aa6; + --light-color-background: #ffffff; + --light-color-background-hover: rgba(0, 136, 250, 0.1); + --light-color-background-inactive: #e5e5e5; + --light-color-background-invalid: #fff0f0; + --light-color-background-selected: #0088fa; + --light-color-button-background: #ffffff; + --light-color-button-background-focus: #ededed; + --light-color-button: #5f6673; + --light-color-button-disabled: #cfd1d5; + --light-color-button-active: #0088fa; + --light-color-button-focus: #23272f; + --light-color-button-hover: #23272f; + --light-color-border: #eeeeee; + --light-color-commit-did-not-render-fill: #cfd1d5; + --light-color-commit-did-not-render-fill-text: #000000; + --light-color-commit-did-not-render-pattern: #cfd1d5; + --light-color-commit-did-not-render-pattern-text: #333333; + --light-color-commit-gradient-0: #37afa9; + --light-color-commit-gradient-1: #63b19e; + --light-color-commit-gradient-2: #80b393; + --light-color-commit-gradient-3: #97b488; + --light-color-commit-gradient-4: #abb67d; + --light-color-commit-gradient-5: #beb771; + --light-color-commit-gradient-6: #cfb965; + --light-color-commit-gradient-7: #dfba57; + --light-color-commit-gradient-8: #efbb49; + --light-color-commit-gradient-9: #febc38; + --light-color-commit-gradient-text: #000000; + --light-color-component-name: #6a51b2; + --light-color-component-name-inverted: #ffffff; + --light-color-component-badge-background: rgba(0, 0, 0, 0.1); + --light-color-component-badge-background-inverted: rgba(255, 255, 255, 0.25); + --light-color-component-badge-count: #777d88; + --light-color-component-badge-count-inverted: rgba(255, 255, 255, 0.7); + --light-color-context-background: rgba(0,0,0,.9); + --light-color-context-background-hover: rgba(255, 255, 255, 0.1); + --light-color-context-background-selected: #178fb9; + --light-color-context-border: #3d424a; + --light-color-context-text: #ffffff; + --light-color-context-text-selected: #ffffff; + --light-color-dim: #777d88; + --light-color-dimmer: #cfd1d5; + --light-color-dimmest: #eff0f1; + --light-color-error-background: hsl(0, 100%, 97%); + --light-color-error-border: hsl(0, 100%, 92%); + --light-color-error-text: #ff0000; + --light-color-expand-collapse-toggle: #777d88; + --light-color-link: #0000ff; + --light-color-modal-background: rgba(255, 255, 255, 0.75); + --light-color-record-active: #fc3a4b; + --light-color-record-hover: #3578e5; + --light-color-record-inactive: #0088fa; + --light-color-scroll-thumb: #c2c2c2; + --light-color-scroll-track: #fafafa; + --light-color-search-match: yellow; + --light-color-search-match-current: #f7923b; + --light-color-selected-tree-highlight-active: rgba(0, 136, 250, 0.1); + --light-color-selected-tree-highlight-inactive: rgba(0, 0, 0, 0.05); + --light-color-shadow: rgba(0, 0, 0, 0.25); + --light-color-tab-selected-border: #0088fa; + --light-color-text: #000000; + --light-color-text-invalid: #ff0000; + --light-color-text-selected: #ffffff; + --light-color-toggle-background-invalid: #fc3a4b; + --light-color-toggle-background-on: #0088fa; + --light-color-toggle-background-off: #cfd1d5; + --light-color-toggle-text: #ffffff; + --light-color-tooltip-background: rgba(0, 0, 0, 0.9); + --light-color-tooltip-text: #ffffff; + + /* Dark theme */ + --dark-color-attribute-name: #9d87d2; + --dark-color-attribute-name-not-editable: #ededed; + --dark-color-attribute-name-inverted: #282828; + --dark-color-attribute-value: #cedae0; + --dark-color-attribute-value-inverted: #ffffff; + --dark-color-attribute-editable-value: yellow; + --dark-color-background: #282c34; + --dark-color-background-hover: rgba(255, 255, 255, 0.1); + --dark-color-background-inactive: #3d424a; + --dark-color-background-invalid: #5c0000; + --dark-color-background-selected: #178fb9; + --dark-color-button-background: #282c34; + --dark-color-button-background-focus: #3d424a; + --dark-color-button: #afb3b9; + --dark-color-button-active: #61dafb; + --dark-color-button-disabled: #4f5766; + --dark-color-button-focus: #a2e9fc; + --dark-color-button-hover: #ededed; + --dark-color-border: #3d424a; + --dark-color-commit-did-not-render-fill: #777d88; + --dark-color-commit-did-not-render-fill-text: #000000; + --dark-color-commit-did-not-render-pattern: #666c77; + --dark-color-commit-did-not-render-pattern-text: #ffffff; + --dark-color-commit-gradient-0: #37afa9; + --dark-color-commit-gradient-1: #63b19e; + --dark-color-commit-gradient-2: #80b393; + --dark-color-commit-gradient-3: #97b488; + --dark-color-commit-gradient-4: #abb67d; + --dark-color-commit-gradient-5: #beb771; + --dark-color-commit-gradient-6: #cfb965; + --dark-color-commit-gradient-7: #dfba57; + --dark-color-commit-gradient-8: #efbb49; + --dark-color-commit-gradient-9: #febc38; + --dark-color-commit-gradient-text: #000000; + --dark-color-component-name: #61dafb; + --dark-color-component-name-inverted: #282828; + --dark-color-component-badge-background: rgba(255, 255, 255, 0.25); + --dark-color-component-badge-background-inverted: rgba(0, 0, 0, 0.25); + --dark-color-component-badge-count: #8f949d; + --dark-color-component-badge-count-inverted: rgba(255, 255, 255, 0.7); + --dark-color-context-background: rgba(255,255,255,.9); + --dark-color-context-background-hover: rgba(0, 136, 250, 0.1); + --dark-color-context-background-selected: #0088fa; + --dark-color-context-border: #eeeeee; + --dark-color-context-text: #000000; + --dark-color-context-text-selected: #ffffff; + --dark-color-dim: #8f949d; + --dark-color-dimmer: #777d88; + --dark-color-dimmest: #4f5766; + --dark-color-error-background: #200; + --dark-color-error-border: #900; + --dark-color-error-text: #f55; + --dark-color-expand-collapse-toggle: #8f949d; + --dark-color-link: #61dafb; + --dark-color-modal-background: rgba(0, 0, 0, 0.75); + --dark-color-record-active: #fc3a4b; + --dark-color-record-hover: #a2e9fc; + --dark-color-record-inactive: #61dafb; + --dark-color-scroll-thumb: #afb3b9; + --dark-color-scroll-track: #313640; + --dark-color-search-match: yellow; + --dark-color-search-match-current: #f7923b; + --dark-color-selected-tree-highlight-active: rgba(23, 143, 185, 0.15); + --dark-color-selected-tree-highlight-inactive: rgba(255, 255, 255, 0.05); + --dark-color-shadow: rgba(0, 0, 0, 0.5); + --dark-color-tab-selected-border: #178fb9; + --dark-color-text: #ffffff; + --dark-color-text-invalid: #ff8080; + --dark-color-text-selected: #ffffff; + --dark-color-toggle-background-invalid: #fc3a4b; + --dark-color-toggle-background-on: #178fb9; + --dark-color-toggle-background-off: #777d88; + --dark-color-toggle-text: #ffffff; + --dark-color-tooltip-background: rgba(255, 255, 255, 0.9); + --dark-color-tooltip-text: #000000; + + /* Font smoothing */ + --light-font-smoothing: auto; + --dark-font-smoothing: antialiased; + --font-smoothing: auto; + + /* Compact density */ + --compact-font-size-monospace-small: 9px; + --compact-font-size-monospace-normal: 11px; + --compact-font-size-monospace-large: 15px; + --compact-font-size-sans-small: 10px; + --compact-font-size-sans-normal: 12px; + --compact-font-size-sans-large: 14px; + --compact-line-height-data: 18px; + --compact-root-font-size: 16px; + + /* Comfortable density */ + --comfortable-font-size-monospace-small: 10px; + --comfortable-font-size-monospace-normal: 13px; + --comfortable-font-size-monospace-large: 17px; + --comfortable-font-size-sans-small: 12px; + --comfortable-font-size-sans-normal: 14px; + --comfortable-font-size-sans-large: 16px; + --comfortable-line-height-data: 22px; + --comfortable-root-font-size: 20px; + + /* GitHub.com system fonts */ + --font-family-monospace: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, + Courier, monospace; + --font-family-sans: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, + Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; + + /* Constant values shared between JS and CSS */ + --interaction-commit-size: 10px; + --interaction-label-width: 200px; +} +`},function(i,o,a){"use strict";function c(O){var T=this;if(T instanceof c||(T=new c),T.tail=null,T.head=null,T.length=0,O&&typeof O.forEach=="function")O.forEach(function(q){T.push(q)});else if(arguments.length>0)for(var B=0,H=arguments.length;B1)B=T;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");H=this.head.next,B=this.head.value}for(var q=0;H!==null;q++)B=O(B,H.value,q),H=H.next;return B},c.prototype.reduceReverse=function(O,T){var B,H=this.tail;if(arguments.length>1)B=T;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");H=this.tail.prev,B=this.tail.value}for(var q=this.length-1;H!==null;q--)B=O(B,H.value,q),H=H.prev;return B},c.prototype.toArray=function(){for(var O=new Array(this.length),T=0,B=this.head;B!==null;T++)O[T]=B.value,B=B.next;return O},c.prototype.toArrayReverse=function(){for(var O=new Array(this.length),T=0,B=this.tail;B!==null;T++)O[T]=B.value,B=B.prev;return O},c.prototype.slice=function(O,T){(T=T||this.length)<0&&(T+=this.length),(O=O||0)<0&&(O+=this.length);var B=new c;if(Tthis.length&&(T=this.length);for(var H=0,q=this.head;q!==null&&Hthis.length&&(T=this.length);for(var H=this.length,q=this.tail;q!==null&&H>T;H--)q=q.prev;for(;q!==null&&H>O;H--,q=q.prev)B.push(q.value);return B},c.prototype.splice=function(O,T){O>this.length&&(O=this.length-1),O<0&&(O=this.length+O);for(var B=0,H=this.head;H!==null&&B=0&&(N._idleTimeoutId=setTimeout(function(){N._onTimeout&&N._onTimeout()},O))},a(14),o.setImmediate=typeof self!="undefined"&&self.setImmediate||c!==void 0&&c.setImmediate||this&&this.setImmediate,o.clearImmediate=typeof self!="undefined"&&self.clearImmediate||c!==void 0&&c.clearImmediate||this&&this.clearImmediate}).call(this,a(4))},function(i,o,a){(function(c,_){(function(t,M){"use strict";if(!t.setImmediate){var N,O,T,B,H,q=1,ne={},m=!1,pe=t.document,ge=Object.getPrototypeOf&&Object.getPrototypeOf(t);ge=ge&&ge.setTimeout?ge:t,{}.toString.call(t.process)==="[object process]"?N=function(_e){_.nextTick(function(){ue(_e)})}:function(){if(t.postMessage&&!t.importScripts){var _e=!0,ce=t.onmessage;return t.onmessage=function(){_e=!1},t.postMessage("","*"),t.onmessage=ce,_e}}()?(B="setImmediate$"+Math.random()+"$",H=function(_e){_e.source===t&&typeof _e.data=="string"&&_e.data.indexOf(B)===0&&ue(+_e.data.slice(B.length))},t.addEventListener?t.addEventListener("message",H,!1):t.attachEvent("onmessage",H),N=function(_e){t.postMessage(B+_e,"*")}):t.MessageChannel?((T=new MessageChannel).port1.onmessage=function(_e){ue(_e.data)},N=function(_e){T.port2.postMessage(_e)}):pe&&"onreadystatechange"in pe.createElement("script")?(O=pe.documentElement,N=function(_e){var ce=pe.createElement("script");ce.onreadystatechange=function(){ue(_e),ce.onreadystatechange=null,O.removeChild(ce),ce=null},O.appendChild(ce)}):N=function(_e){setTimeout(ue,0,_e)},ge.setImmediate=function(_e){typeof _e!="function"&&(_e=new Function(""+_e));for(var ce=new Array(arguments.length-1),me=0;mefe;fe++)if((X=ve(nt,kt,fe))!==-1){ge=fe,kt=X;break e}kt=-1}}e:{if(nt=zt,(X=q().get(He.primitive))!==void 0){for(fe=0;fekt-nt?null:zt.slice(nt,kt-1))!==null){if(kt=0,je!==null){for(;ktkt;je--)ct=Xe.pop()}for(je=zt.length-kt-1;1<=je;je--)kt=[],ct.push({id:null,isStateEditable:!1,name:_e(zt[je-1].functionName),value:void 0,subHooks:kt}),Xe.push(ct),ct=kt;je=zt}kt=(zt=He.primitive)==="Context"||zt==="DebugValue"?null:pt++,ct.push({id:kt,isStateEditable:zt==="Reducer"||zt==="State",name:zt,value:He.value,subHooks:[]})}return function xe(le,qe){for(var dt=[],Rt=0;Rt-1&&(ne=ne.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var m=ne.replace(/^\s+/,"").replace(/\(eval code/g,"("),pe=m.match(/ (\((.+):(\d+):(\d+)\)$)/),ge=(m=pe?m.replace(pe[0],""):m).split(/\s+/).slice(1),ve=this.extractLocation(pe?pe[1]:ge.pop()),ue=ge.join(" ")||void 0,_e=["eval",""].indexOf(ve[0])>-1?void 0:ve[0];return new O({functionName:ue,fileName:_e,lineNumber:ve[1],columnNumber:ve[2],source:ne})},this)},parseFFOrSafari:function(q){return q.stack.split(` +`).filter(function(ne){return!ne.match(H)},this).map(function(ne){if(ne.indexOf(" > eval")>-1&&(ne=ne.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),ne.indexOf("@")===-1&&ne.indexOf(":")===-1)return new O({functionName:ne});var m=/((.*".+"[^@]*)?[^@]*)(?:@)/,pe=ne.match(m),ge=pe&&pe[1]?pe[1]:void 0,ve=this.extractLocation(ne.replace(m,""));return new O({functionName:ge,fileName:ve[0],lineNumber:ve[1],columnNumber:ve[2],source:ne})},this)},parseOpera:function(q){return!q.stacktrace||q.message.indexOf(` +`)>-1&&q.message.split(` +`).length>q.stacktrace.split(` +`).length?this.parseOpera9(q):q.stack?this.parseOpera11(q):this.parseOpera10(q)},parseOpera9:function(q){for(var ne=/Line (\d+).*script (?:in )?(\S+)/i,m=q.message.split(` +`),pe=[],ge=2,ve=m.length;ge/,"$2").replace(/\([^)]*\)/g,"")||void 0;ve.match(/\(([^)]*)\)/)&&(m=ve.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var _e=m===void 0||m==="[arguments not available]"?void 0:m.split(",");return new O({functionName:ue,args:_e,fileName:ge[0],lineNumber:ge[1],columnNumber:ge[2],source:ne})},this)}}})=="function"?c.apply(o,_):c)===void 0||(i.exports=t)})()},function(i,o,a){var c,_,t;(function(M,N){"use strict";_=[],(t=typeof(c=function(){function O(ue){return ue.charAt(0).toUpperCase()+ue.substring(1)}function T(ue){return function(){return this[ue]}}var B=["isConstructor","isEval","isNative","isToplevel"],H=["columnNumber","lineNumber"],q=["fileName","functionName","source"],ne=B.concat(H,q,["args"]);function m(ue){if(ue)for(var _e=0;_e1?Ae-1:0),ke=1;ke=0&&Ae.splice(Z,1)}}}])&&c(z.prototype,G),$&&c(z,$),U}(),t=a(2),M=a.n(t);try{var N=a(9).default,O=function(U){var z=new RegExp("".concat(U,": ([0-9]+)")),G=N.match(z);return parseInt(G[1],10)};O("comfortable-line-height-data"),O("compact-line-height-data")}catch(U){}function T(U){try{return sessionStorage.getItem(U)}catch(z){return null}}function B(U){try{sessionStorage.removeItem(U)}catch(z){}}function H(U,z){try{return sessionStorage.setItem(U,z)}catch(G){}}var q=function(U,z){return U===z},ne=a(1),m=a.n(ne);function pe(U){return U.ownerDocument?U.ownerDocument.defaultView:null}function ge(U){var z=pe(U);return z?z.frameElement:null}function ve(U){var z=ce(U);return ue([U.getBoundingClientRect(),{top:z.borderTop,left:z.borderLeft,bottom:z.borderBottom,right:z.borderRight,width:0,height:0}])}function ue(U){return U.reduce(function(z,G){return z==null?G:{top:z.top+G.top,left:z.left+G.left,width:z.width,height:z.height,bottom:z.bottom+G.bottom,right:z.right+G.right}})}function _e(U,z){var G=ge(U);if(G&&G!==z){for(var $=[U.getBoundingClientRect()],Ce=G,Ee=!1;Ce;){var Ae=ve(Ce);if($.push(Ae),Ce=ge(Ce),Ee)break;Ce&&pe(Ce)===z&&(Ee=!0)}return ue($)}return U.getBoundingClientRect()}function ce(U){var z=window.getComputedStyle(U);return{borderLeft:parseInt(z.borderLeftWidth,10),borderRight:parseInt(z.borderRightWidth,10),borderTop:parseInt(z.borderTopWidth,10),borderBottom:parseInt(z.borderBottomWidth,10),marginLeft:parseInt(z.marginLeft,10),marginRight:parseInt(z.marginRight,10),marginTop:parseInt(z.marginTop,10),marginBottom:parseInt(z.marginBottom,10),paddingLeft:parseInt(z.paddingLeft,10),paddingRight:parseInt(z.paddingRight,10),paddingTop:parseInt(z.paddingTop,10),paddingBottom:parseInt(z.paddingBottom,10)}}function me(U,z){var G;if(typeof Symbol=="undefined"||U[Symbol.iterator]==null){if(Array.isArray(U)||(G=function(ke,Je){if(!!ke){if(typeof ke=="string")return re(ke,Je);var mt=Object.prototype.toString.call(ke).slice(8,-1);if(mt==="Object"&&ke.constructor&&(mt=ke.constructor.name),mt==="Map"||mt==="Set")return Array.from(ke);if(mt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(mt))return re(ke,Je)}}(U))||z&&U&&typeof U.length=="number"){G&&(U=G);var $=0,Ce=function(){};return{s:Ce,n:function(){return $>=U.length?{done:!0}:{done:!1,value:U[$++]}},e:function(ke){throw ke},f:Ce}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ee,Ae=!0,Z=!1;return{s:function(){G=U[Symbol.iterator]()},n:function(){var ke=G.next();return Ae=ke.done,ke},e:function(ke){Z=!0,Ee=ke},f:function(){try{Ae||G.return==null||G.return()}finally{if(Z)throw Ee}}}}function re(U,z){(z==null||z>U.length)&&(z=U.length);for(var G=0,$=new Array(z);GAe.left+Ae.width&&(oe=Ae.left+Ae.width-mt-5),{style:{top:ke+="px",left:oe+="px"}}}(z,G,{width:$.width,height:$.height});m()(this.tip.style,Ce.style)}}]),U}(),Xe=function(){function U(){we(this,U);var z=window.__REACT_DEVTOOLS_TARGET_WINDOW__||window;this.window=z;var G=window.__REACT_DEVTOOLS_TARGET_WINDOW__||window;this.tipBoundsWindow=G;var $=z.document;this.container=$.createElement("div"),this.container.style.zIndex="10000000",this.tip=new pt($,this.container),this.rects=[],$.body.appendChild(this.container)}return je(U,[{key:"remove",value:function(){this.tip.remove(),this.rects.forEach(function(z){z.remove()}),this.rects.length=0,this.container.parentNode&&this.container.parentNode.removeChild(this.container)}},{key:"inspect",value:function(z,G){for(var $=this,Ce=z.filter(function(Ct){return Ct.nodeType===Node.ELEMENT_NODE});this.rects.length>Ce.length;)this.rects.pop().remove();if(Ce.length!==0){for(;this.rects.length1&&arguments[1]!==void 0?arguments[1]:q,it=void 0,Ct=[],Mt=void 0,It=!1,sn=function(Ft,Dn){return We(Ft,Ct[Dn])},rn=function(){for(var Ft=arguments.length,Dn=Array(Ft),dr=0;dr5&&arguments[5]!==void 0?arguments[5]:0,Z=M0(U);switch(Z){case"html_element":return z.push($),{inspectable:!1,preview_short:ki(U,!1),preview_long:ki(U,!0),name:U.tagName,type:Z};case"function":return z.push($),{inspectable:!1,preview_short:ki(U,!1),preview_long:ki(U,!0),name:typeof U.name!="function"&&U.name?U.name:"function",type:Z};case"string":return U.length<=500?U:U.slice(0,500)+"...";case"bigint":case"symbol":return z.push($),{inspectable:!1,preview_short:ki(U,!1),preview_long:ki(U,!0),name:U.toString(),type:Z};case"react_element":return z.push($),{inspectable:!1,preview_short:ki(U,!1),preview_long:ki(U,!0),name:Po(U)||"Unknown",type:Z};case"array_buffer":case"data_view":return z.push($),{inspectable:!1,preview_short:ki(U,!1),preview_long:ki(U,!0),name:Z==="data_view"?"DataView":"ArrayBuffer",size:U.byteLength,type:Z};case"array":return Ee=Ce($),Ae>=2&&!Ee?po(Z,!0,U,z,$):U.map(function(mt,oe){return A0(mt,z,G,$.concat([oe]),Ce,Ee?1:Ae+1)});case"html_all_collection":case"typed_array":case"iterator":if(Ee=Ce($),Ae>=2&&!Ee)return po(Z,!0,U,z,$);var ke={unserializable:!0,type:Z,readonly:!0,size:Z==="typed_array"?U.length:void 0,preview_short:ki(U,!1),preview_long:ki(U,!0),name:U.constructor&&U.constructor.name!=="Object"?U.constructor.name:""};return Qt(U[Symbol.iterator])&&Array.from(U).forEach(function(mt,oe){return ke[oe]=A0(mt,z,G,$.concat([oe]),Ce,Ee?1:Ae+1)}),G.push($),ke;case"opaque_iterator":return z.push($),{inspectable:!1,preview_short:ki(U,!1),preview_long:ki(U,!0),name:U[Symbol.toStringTag],type:Z};case"date":case"regexp":return z.push($),{inspectable:!1,preview_short:ki(U,!1),preview_long:ki(U,!0),name:U.toString(),type:Z};case"object":if(Ee=Ce($),Ae>=2&&!Ee)return po(Z,!0,U,z,$);var Je={};return su(U).forEach(function(mt){var oe=mt.toString();Je[oe]=A0(U[mt],z,G,$.concat([oe]),Ce,Ee?1:Ae+1)}),Je;case"infinity":case"nan":case"undefined":return z.push($),{type:Z};default:return U}}function J0(U){return(J0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(U)}function Ps(U){return function(z){if(Array.isArray(z))return Z0(z)}(U)||function(z){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(z))return Array.from(z)}(U)||function(z,G){if(!!z){if(typeof z=="string")return Z0(z,G);var $=Object.prototype.toString.call(z).slice(8,-1);if($==="Object"&&z.constructor&&($=z.constructor.name),$==="Map"||$==="Set")return Array.from(z);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return Z0(z,G)}}(U)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Z0(U,z){(z==null||z>U.length)&&(z=U.length);for(var G=0,$=new Array(z);Gz.toString()?1:z.toString()>U.toString()?-1:0}function su(U){for(var z=[],G=U,$=function(){var Ce=[].concat(Ps(Object.keys(G)),Ps(Object.getOwnPropertySymbols(G))),Ee=Object.getOwnPropertyDescriptors(G);Ce.forEach(function(Ae){Ee[Ae].enumerable&&z.push(Ae)}),G=Object.getPrototypeOf(G)};G!=null;)$();return z}function mi(U){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Anonymous",G=$0.get(U);if(G!=null)return G;var $=z;return typeof U.displayName=="string"?$=U.displayName:typeof U.name=="string"&&U.name!==""&&($=U.name),$0.set(U,$),$}var Dr=0;function el(){return++Dr}function Ko(U){var z=Wt.get(U);if(z!==void 0)return z;for(var G=new Array(U.length),$=0;$1&&arguments[1]!==void 0?arguments[1]:50;return U.length>z?U.substr(0,z)+"\u2026":U}function ki(U,z){if(U!=null&&hasOwnProperty.call(U,wu.type))return z?U[wu.preview_long]:U[wu.preview_short];switch(M0(U)){case"html_element":return"<".concat(au(U.tagName.toLowerCase())," />");case"function":return au("\u0192 ".concat(typeof U.name=="function"?"":U.name,"() {}"));case"string":return'"'.concat(U,'"');case"bigint":return au(U.toString()+"n");case"regexp":case"symbol":return au(U.toString());case"react_element":return"<".concat(au(Po(U)||"Unknown")," />");case"array_buffer":return"ArrayBuffer(".concat(U.byteLength,")");case"data_view":return"DataView(".concat(U.buffer.byteLength,")");case"array":if(z){for(var G="",$=0;$0&&(G+=", "),!((G+=ki(U[$],!1)).length>50));$++);return"[".concat(au(G),"]")}var Ce=hasOwnProperty.call(U,wu.size)?U[wu.size]:U.length;return"Array(".concat(Ce,")");case"typed_array":var Ee="".concat(U.constructor.name,"(").concat(U.length,")");if(z){for(var Ae="",Z=0;Z0&&(Ae+=", "),!((Ae+=U[Z]).length>50));Z++);return"".concat(Ee," [").concat(au(Ae),"]")}return Ee;case"iterator":var ke=U.constructor.name;if(z){for(var Je=Array.from(U),mt="",oe=0;oe0&&(mt+=", "),Array.isArray(We)){var it=ki(We[0],!0),Ct=ki(We[1],!1);mt+="".concat(it," => ").concat(Ct)}else mt+=ki(We,!1);if(mt.length>50)break}return"".concat(ke,"(").concat(U.size,") {").concat(au(mt),"}")}return"".concat(ke,"(").concat(U.size,")");case"opaque_iterator":return U[Symbol.toStringTag];case"date":return U.toString();case"object":if(z){for(var Mt=su(U).sort(xi),It="",sn=0;sn0&&(It+=", "),(It+="".concat(rn.toString(),": ").concat(ki(U[rn],!1))).length>50)break}return"{".concat(au(It),"}")}return"{\u2026}";case"boolean":case"number":case"infinity":case"nan":case"null":case"undefined":return U;default:try{return au(""+U)}catch(Ft){return"unserializable"}}}var Is=a(7);function Xl(U){return(Xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(U)}function Io(U,z){var G=Object.keys(U);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(U);z&&($=$.filter(function(Ce){return Object.getOwnPropertyDescriptor(U,Ce).enumerable})),G.push.apply(G,$)}return G}function ho(U){for(var z=1;z2&&arguments[2]!==void 0?arguments[2]:[];if(U!==null){var $=[],Ce=[],Ee=A0(U,$,Ce,G,z);return{data:Ee,cleaned:$,unserializable:Ce}}return null}function Qo(U){var z,G,$=(z=U,G=new Set,JSON.stringify(z,function(Ae,Z){if(Xl(Z)==="object"&&Z!==null){if(G.has(Z))return;G.add(Z)}return typeof Z=="bigint"?Z.toString()+"n":Z})),Ce=$===void 0?"undefined":$,Ee=window.__REACT_DEVTOOLS_GLOBAL_HOOK__.clipboardCopyText;typeof Ee=="function"?Ee(Ce).catch(function(Ae){}):Object(Is.copy)(Ce)}function yi(U,z){var G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,$=z[G],Ce=Array.isArray(U)?U.slice():ho({},U);return G+1===z.length?Array.isArray(Ce)?Ce.splice($,1):delete Ce[$]:Ce[$]=yi(U[$],z,G+1),Ce}function en(U,z,G){var $=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,Ce=z[$],Ee=Array.isArray(U)?U.slice():ho({},U);if($+1===z.length){var Ae=G[$];Ee[Ae]=Ee[Ce],Array.isArray(Ee)?Ee.splice(Ce,1):delete Ee[Ce]}else Ee[Ce]=en(U[Ce],z,G,$+1);return Ee}function bn(U,z,G){var $=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;if($>=z.length)return G;var Ce=z[$],Ee=Array.isArray(U)?U.slice():ho({},U);return Ee[Ce]=bn(U[Ce],z,G,$+1),Ee}var Ai=a(8);function gi(U,z){var G=Object.keys(U);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(U);z&&($=$.filter(function(Ce){return Object.getOwnPropertyDescriptor(U,Ce).enumerable})),G.push.apply(G,$)}return G}function Vt(U){for(var z=1;z=U.length?{done:!0}:{done:!1,value:U[$++]}},e:function(ke){throw ke},f:Ce}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ee,Ae=!0,Z=!1;return{s:function(){G=U[Symbol.iterator]()},n:function(){var ke=G.next();return Ae=ke.done,ke},e:function(ke){Z=!0,Ee=ke},f:function(){try{Ae||G.return==null||G.return()}finally{if(Z)throw Ee}}}}function Ql(U,z){if(U){if(typeof U=="string")return k0(U,z);var G=Object.prototype.toString.call(U).slice(8,-1);return G==="Object"&&U.constructor&&(G=U.constructor.name),G==="Map"||G==="Set"?Array.from(U):G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G)?k0(U,z):void 0}}function k0(U,z){(z==null||z>U.length)&&(z=U.length);for(var G=0,$=new Array(z);G0){var yt=Ee(ae);if(yt!=null){var Jt,On=Yi(I0);try{for(On.s();!(Jt=On.n()).done;)if(Jt.value.test(yt))return!0}catch(ir){On.e(ir)}finally{On.f()}}}if(ie!=null&&gs.size>0){var Sn,_n=ie.fileName,Tn=Yi(gs);try{for(Tn.s();!(Sn=Tn.n()).done;)if(Sn.value.test(_n))return!0}catch(ir){Tn.e(ir)}finally{Tn.f()}}return!1}function Tu(ae){var ie=ae.type;switch(ae.tag){case Ct:case Cr:return 1;case it:case An:return 5;case rn:return 6;case Ft:return 11;case dr:return 7;case Dn:case er:case sn:return 9;case Lr:case Nr:return 8;case ut:return 12;case Dt:return 13;default:switch(Ae(ie)){case 60111:case"Symbol(react.concurrent_mode)":case"Symbol(react.async_mode)":return 9;case 60109:case"Symbol(react.provider)":return 2;case 60110:case"Symbol(react.context)":return 2;case 60108:case"Symbol(react.strict_mode)":return 9;case 60114:case"Symbol(react.profiler)":return 10;default:return 9}}}function Ei(ae){if(U0.has(ae))return ae;var ie=ae.alternate;return ie!=null&&U0.has(ie)?ie:(U0.add(ae),ae)}window.__REACT_DEVTOOLS_COMPONENT_FILTERS__!=null?_s(window.__REACT_DEVTOOLS_COMPONENT_FILTERS__):_s([{type:1,value:7,isEnabled:!0}]);var xo=new Map,e0=new Map,U0=new Set,sa=new Map,es=new Map,tu=-1;function ei(ae){if(!xo.has(ae)){var ie=el();xo.set(ae,ie),e0.set(ie,ae)}return xo.get(ae)}function h0(ae){switch(Tu(ae)){case 1:if(Uo!==null){var ie=ei(Ei(ae)),Fe=Ci(ae);Fe!==null&&Uo.set(ie,Fe)}}}var Bi={};function Ci(ae){switch(Tu(ae)){case 1:var ie=ae.stateNode,Fe=Bi,Oe=Bi;return ie!=null&&(ie.constructor&&ie.constructor.contextType!=null?Oe=ie.context:(Fe=ie.context)&&Object.keys(Fe).length===0&&(Fe=Bi)),[Fe,Oe];default:return null}}function yf(ae){switch(Tu(ae)){case 1:if(Uo!==null){var ie=ei(Ei(ae)),Fe=Uo.has(ie)?Uo.get(ie):null,Oe=Ci(ae);if(Fe==null||Oe==null)return null;var st=Jo(Fe,2),yt=st[0],Jt=st[1],On=Jo(Oe,2),Sn=On[0],_n=On[1];if(Sn!==Bi)return t0(yt,Sn);if(_n!==Bi)return Jt!==_n}}return null}function gf(ae,ie){if(ae==null||ie==null)return!1;if(ie.hasOwnProperty("baseState")&&ie.hasOwnProperty("memoizedState")&&ie.hasOwnProperty("next")&&ie.hasOwnProperty("queue"))for(;ie!==null;){if(ie.memoizedState!==ae.memoizedState)return!0;ie=ie.next,ae=ae.next}return!1}function t0(ae,ie){if(ae==null||ie==null||ie.hasOwnProperty("baseState")&&ie.hasOwnProperty("memoizedState")&&ie.hasOwnProperty("next")&&ie.hasOwnProperty("queue"))return null;var Fe,Oe=[],st=Yi(new Set([].concat(eu(Object.keys(ae)),eu(Object.keys(ie)))));try{for(st.s();!(Fe=st.n()).done;){var yt=Fe.value;ae[yt]!==ie[yt]&&Oe.push(yt)}}catch(Jt){st.e(Jt)}finally{st.f()}return Oe}function n0(ae,ie){switch(ie.tag){case Ct:case it:case Mt:case Lr:case Nr:return(f0(ie)&oe)===oe;default:return ae.memoizedProps!==ie.memoizedProps||ae.memoizedState!==ie.memoizedState||ae.ref!==ie.ref}}var Re=[],rt=[],Ye=[],Kt=[],Xt=new Map,pr=0,Wr=null;function xn(ae){Re.push(ae)}function yu(ae){if(Re.length!==0||rt.length!==0||Ye.length!==0||Wr!==null||Pu){var ie=rt.length+Ye.length+(Wr===null?0:1),Fe=new Array(3+pr+(ie>0?2+ie:0)+Re.length),Oe=0;if(Fe[Oe++]=z,Fe[Oe++]=tu,Fe[Oe++]=pr,Xt.forEach(function(On,Sn){Fe[Oe++]=Sn.length;for(var _n=Ko(Sn),Tn=0;Tn<_n.length;Tn++)Fe[Oe+Tn]=_n[Tn];Oe+=Sn.length}),ie>0){Fe[Oe++]=2,Fe[Oe++]=ie;for(var st=rt.length-1;st>=0;st--)Fe[Oe++]=rt[st];for(var yt=0;yt0?ae.forEach(function(ie){U.emit("operations",ie)}):(Rr!==null&&(cu=!0),U.getFiberRoots(z).forEach(function(ie){eo(tu=ei(Ei(ie.current)),ie.current),Pu&&ie.memoizedInteractions!=null&&(il={changeDescriptions:ts?new Map:null,durations:[],commitTime:Jl()-Zu,interactions:Array.from(ie.memoizedInteractions).map(function(Fe){return Vt(Vt({},Fe),{},{timestamp:Fe.timestamp-Zu})}),maxActualDuration:0,priorityLevel:null}),Jr(ie.current,null,!1,!1),yu(),tu=-1}))},getBestMatchForTrackedPath:function(){if(Rr===null||r0===null)return null;for(var ae=r0;ae!==null&&Qu(ae);)ae=ae.return;return ae===null?null:{id:ei(Ei(ae)),isFullMatch:nu===Rr.length-1}},getDisplayNameForFiberID:function(ae){var ie=e0.get(ae);return ie!=null?Ee(ie):null},getFiberIDForNative:function(ae){var ie=arguments.length>1&&arguments[1]!==void 0&&arguments[1],Fe=G.findFiberByHostInstance(ae);if(Fe!=null){if(ie)for(;Fe!==null&&Qu(Fe);)Fe=Fe.return;return ei(Ei(Fe))}return null},getInstanceAndStyle:function(ae){var ie=null,Fe=null,Oe=Vu(ae);return Oe!==null&&(ie=Oe.stateNode,Oe.memoizedProps!==null&&(Fe=Oe.memoizedProps.style)),{instance:ie,style:Fe}},getOwnersList:function(ae){var ie=Vu(ae);if(ie==null)return null;var Fe=ie._debugOwner,Oe=[{displayName:Ee(ie)||"Anonymous",id:ae,type:Tu(ie)}];if(Fe)for(var st=Fe;st!==null;)Oe.unshift({displayName:Ee(st)||"Anonymous",id:ei(Ei(st)),type:Tu(st)}),st=st._debugOwner||null;return Oe},getPathForElement:function(ae){var ie=e0.get(ae);if(ie==null)return null;for(var Fe=[];ie!==null;)Fe.push(Do(ie)),ie=ie.return;return Fe.reverse(),Fe},getProfilingData:function(){var ae=[];if(Es===null)throw Error("getProfilingData() called before any profiling data was recorded");return Es.forEach(function(ie,Fe){var Oe=[],st=[],yt=new Map,Jt=new Map,On=xl!==null&&xl.get(Fe)||"Unknown";Mo!=null&&Mo.forEach(function(Sn,_n){v0!=null&&v0.get(_n)===Fe&&st.push([_n,Sn])}),ie.forEach(function(Sn,_n){var Tn=Sn.changeDescriptions,ir=Sn.durations,Bt=Sn.interactions,Fi=Sn.maxActualDuration,Ar=Sn.priorityLevel,mr=Sn.commitTime,Y=[];Bt.forEach(function(Di){yt.has(Di.id)||yt.set(Di.id,Di),Y.push(Di.id);var ru=Jt.get(Di.id);ru!=null?ru.push(_n):Jt.set(Di.id,[_n])});for(var ri=[],ii=[],Vr=0;Vr1?Kn.set(Tn,ir-1):Kn.delete(Tn),ni.delete(Sn)}(tu),ti(Fe,!1))}else eo(tu,Fe),Jr(Fe,null,!1,!1);if(Pu&&st){var On=Es.get(tu);On!=null?On.push(il):Es.set(tu,[il])}yu(),b0&&U.emit("traceUpdates",B0),tu=-1},handleCommitFiberUnmount:function(ae){ti(ae,!1)},inspectElement:function(ae,ie){if(zi(ae)){if(ie!=null){Oo(ie);var Fe=null;return ie[0]==="hooks"&&(Fe="hooks"),{id:ae,type:"hydrated-path",path:ie,value:Ri(Uu(Xi,ie),Hi(null,Fe),ie)}}return{id:ae,type:"no-change"}}if(qs=!1,Xi!==null&&Xi.id===ae||(Ao={}),(Xi=aa(ae))===null)return{id:ae,type:"not-found"};ie!=null&&Oo(ie),function(st){var yt=st.hooks,Jt=st.id,On=st.props,Sn=e0.get(Jt);if(Sn!=null){var _n=Sn.elementType,Tn=Sn.stateNode,ir=Sn.tag,Bt=Sn.type;switch(ir){case Ct:case Cr:case An:$.$r=Tn;break;case it:$.$r={hooks:yt,props:On,type:Bt};break;case rn:$.$r={props:On,type:Bt.render};break;case Lr:case Nr:$.$r={props:On,type:_n!=null&&_n.type!=null?_n.type:Bt};break;default:$.$r=null}}else console.warn('Could not find Fiber with id "'.concat(Jt,'"'))}(Xi);var Oe=Vt({},Xi);return Oe.context=Ri(Oe.context,Hi("context",null)),Oe.hooks=Ri(Oe.hooks,Hi("hooks","hooks")),Oe.props=Ri(Oe.props,Hi("props",null)),Oe.state=Ri(Oe.state,Hi("state",null)),{id:ae,type:"full-data",value:Oe}},logElementToConsole:function(ae){var ie=zi(ae)?Xi:aa(ae);if(ie!==null){var Fe=typeof console.groupCollapsed=="function";Fe&&console.groupCollapsed("[Click to expand] %c<".concat(ie.displayName||"Component"," />"),"color: var(--dom-tag-name-color); font-weight: normal;"),ie.props!==null&&console.log("Props:",ie.props),ie.state!==null&&console.log("State:",ie.state),ie.hooks!==null&&console.log("Hooks:",ie.hooks);var Oe=Cl(ae);Oe!==null&&console.log("Nodes:",Oe),ie.source!==null&&console.log("Location:",ie.source),(window.chrome||/firefox/i.test(navigator.userAgent))&&console.log("Right-click any value to save it as a global variable for further inspection."),Fe&&console.groupEnd()}else console.warn('Could not find Fiber with id "'.concat(ae,'"'))},prepareViewAttributeSource:function(ae,ie){zi(ae)&&(window.$attribute=Uu(Xi,ie))},prepareViewElementSource:function(ae){var ie=e0.get(ae);if(ie!=null){var Fe=ie.elementType,Oe=ie.tag,st=ie.type;switch(Oe){case Ct:case Cr:case An:case it:$.$type=st;break;case rn:$.$type=st.render;break;case Lr:case Nr:$.$type=Fe!=null&&Fe.type!=null?Fe.type:st;break;default:$.$type=null}}else console.warn('Could not find Fiber with id "'.concat(ae,'"'))},overrideSuspense:function(ae,ie){if(typeof P0!="function"||typeof rl!="function")throw new Error("Expected overrideSuspense() to not get called for earlier React versions.");ie?($u.add(ae),$u.size===1&&P0(Ds)):($u.delete(ae),$u.size===0&&P0(_f));var Fe=e0.get(ae);Fe!=null&&rl(Fe)},overrideValueAtPath:function(ae,ie,Fe,Oe,st){var yt=Vu(ie);if(yt!==null){var Jt=yt.stateNode;switch(ae){case"context":switch(Oe=Oe.slice(1),yt.tag){case Ct:Oe.length===0?Jt.context=st:O0(Jt.context,Oe,st),Jt.forceUpdate()}break;case"hooks":typeof fu=="function"&&fu(yt,Fe,Oe,st);break;case"props":switch(yt.tag){case Ct:yt.pendingProps=bn(Jt.props,Oe,st),Jt.forceUpdate();break;default:typeof $o=="function"&&$o(yt,Oe,st)}break;case"state":switch(yt.tag){case Ct:O0(Jt.state,Oe,st),Jt.forceUpdate()}}}},renamePath:function(ae,ie,Fe,Oe,st){var yt=Vu(ie);if(yt!==null){var Jt=yt.stateNode;switch(ae){case"context":switch(Oe=Oe.slice(1),st=st.slice(1),yt.tag){case Ct:Oe.length===0||Xr(Jt.context,Oe,st),Jt.forceUpdate()}break;case"hooks":typeof Co=="function"&&Co(yt,Fe,Oe,st);break;case"props":Jt===null?typeof _i=="function"&&_i(yt,Oe,st):(yt.pendingProps=en(Jt.props,Oe,st),Jt.forceUpdate());break;case"state":Xr(Jt.state,Oe,st),Jt.forceUpdate()}}},renderer:G,setTraceUpdatesEnabled:function(ae){b0=ae},setTrackedPath:Ni,startProfiling:fa,stopProfiling:function(){Pu=!1,ts=!1},storeAsGlobal:function(ae,ie,Fe){if(zi(ae)){var Oe=Uu(Xi,ie),st="$reactTemp".concat(Fe);window[st]=Oe,console.log(st),console.log(Oe)}},updateComponentFilters:function(ae){if(Pu)throw Error("Cannot modify filter preferences while profiling");U.getFiberRoots(z).forEach(function(ie){tu=ei(Ei(ie.current)),Wu(ie.current),ti(ie.current,!1),tu=-1}),_s(ae),Kn.clear(),U.getFiberRoots(z).forEach(function(ie){eo(tu=ei(Ei(ie.current)),ie.current),Jr(ie.current,null,!1,!1),yu(ie),tu=-1})}}}var $n;function tl(U){return(tl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(U)}function c0(U,z,G){if($n===void 0)try{throw Error()}catch(Ce){var $=Ce.stack.trim().match(/\n( *(at )?)/);$n=$&&$[1]||""}return` +`+$n+U}var bo=!1;function Sl(U,z,G){if(!U||bo)return"";var $,Ce=Error.prepareStackTrace;Error.prepareStackTrace=void 0,bo=!0;var Ee=G.current;G.current=null;try{if(z){var Ae=function(){throw Error()};if(Object.defineProperty(Ae.prototype,"props",{set:function(){throw Error()}}),(typeof Reflect=="undefined"?"undefined":tl(Reflect))==="object"&&Reflect.construct){try{Reflect.construct(Ae,[])}catch(We){$=We}Reflect.construct(U,[],Ae)}else{try{Ae.call()}catch(We){$=We}U.call(Ae.prototype)}}else{try{throw Error()}catch(We){$=We}U()}}catch(We){if(We&&$&&typeof We.stack=="string"){for(var Z=We.stack.split(` +`),ke=$.stack.split(` +`),Je=Z.length-1,mt=ke.length-1;Je>=1&&mt>=0&&Z[Je]!==ke[mt];)mt--;for(;Je>=1&&mt>=0;Je--,mt--)if(Z[Je]!==ke[mt]){if(Je!==1||mt!==1)do if(Je--,--mt<0||Z[Je]!==ke[mt])return` +`+Z[Je].replace(" at new "," at ");while(Je>=1&&mt>=0);break}}}finally{bo=!1,Error.prepareStackTrace=Ce,G.current=Ee}var oe=U?U.displayName||U.name:"";return oe?c0(oe):""}function N0(U,z,G,$){return Sl(U,!1,$)}function wt(U,z,G){var $=U.HostComponent,Ce=U.LazyComponent,Ee=U.SuspenseComponent,Ae=U.SuspenseListComponent,Z=U.FunctionComponent,ke=U.IndeterminateComponent,Je=U.SimpleMemoComponent,mt=U.ForwardRef,oe=U.Block,We=U.ClassComponent;switch(z.tag){case $:return c0(z.type);case Ce:return c0("Lazy");case Ee:return c0("Suspense");case Ae:return c0("SuspenseList");case Z:case ke:case Je:return N0(z.type,0,0,G);case mt:return N0(z.type.render,0,0,G);case oe:return N0(z.type._render,0,0,G);case We:return function(it,Ct,Mt,It){return Sl(it,!0,It)}(z.type,0,0,G);default:return""}}function bt(U,z,G){try{var $="",Ce=z;do $+=wt(U,Ce,G),Ce=Ce.return;while(Ce);return $}catch(Ee){return` +Error generating stack: `+Ee.message+` +`+Ee.stack}}function Hn(U,z){var G;if(typeof Symbol=="undefined"||U[Symbol.iterator]==null){if(Array.isArray(U)||(G=function(ke,Je){if(!!ke){if(typeof ke=="string")return qr(ke,Je);var mt=Object.prototype.toString.call(ke).slice(8,-1);if(mt==="Object"&&ke.constructor&&(mt=ke.constructor.name),mt==="Map"||mt==="Set")return Array.from(ke);if(mt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(mt))return qr(ke,Je)}}(U))||z&&U&&typeof U.length=="number"){G&&(U=G);var $=0,Ce=function(){};return{s:Ce,n:function(){return $>=U.length?{done:!0}:{done:!1,value:U[$++]}},e:function(ke){throw ke},f:Ce}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ee,Ae=!0,Z=!1;return{s:function(){G=U[Symbol.iterator]()},n:function(){var ke=G.next();return Ae=ke.done,ke},e:function(ke){Z=!0,Ee=ke},f:function(){try{Ae||G.return==null||G.return()}finally{if(Z)throw Ee}}}}function qr(U,z){(z==null||z>U.length)&&(z=U.length);for(var G=0,$=new Array(z);G0?Je[Je.length-1]:null,We=oe!==null&&(Qr.test(oe)||Ou.test(oe));if(!We){var it,Ct=Hn(vo.values());try{for(Ct.s();!(it=Ct.n()).done;){var Mt=it.value,It=Mt.currentDispatcherRef,sn=Mt.getCurrentFiber,rn=Mt.workTagMap,Ft=sn();if(Ft!=null){var Dn=bt(rn,Ft,It);Dn!==""&&Je.push(Dn);break}}}catch(dr){Ct.e(dr)}finally{Ct.f()}}}catch(dr){}Ee.apply(void 0,Je)};Ae.__REACT_DEVTOOLS_ORIGINAL_METHOD__=Ee,Li[Ce]=Ae}catch(Z){}})}}function ju(U){return(ju=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(U)}function ms(U,z){for(var G=0;GU.length)&&(z=U.length);for(var G=0,$=new Array(z);G1?Z-1:0),Je=1;Je0?oe[oe.length-1]:0),oe.push(un),Z.set(et,Je(Pt._topLevelWrapper));try{var fn=ut.apply(this,Dt);return oe.pop(),fn}catch(wr){throw oe=[],wr}finally{if(oe.length===0){var Jn=Z.get(et);if(Jn===void 0)throw new Error("Expected to find root ID.");dr(Jn)}}},performUpdateIfNecessary:function(ut,Dt){var et=Dt[0];if(To(et)===9)return ut.apply(this,Dt);var Pt=Je(et);oe.push(Pt);var un=Qn(et);try{var fn=ut.apply(this,Dt),Jn=Qn(et);return mt(un,Jn)||Ct(et,Pt,Jn),oe.pop(),fn}catch(fu){throw oe=[],fu}finally{if(oe.length===0){var wr=Z.get(et);if(wr===void 0)throw new Error("Expected to find root ID.");dr(wr)}}},receiveComponent:function(ut,Dt){var et=Dt[0];if(To(et)===9)return ut.apply(this,Dt);var Pt=Je(et);oe.push(Pt);var un=Qn(et);try{var fn=ut.apply(this,Dt),Jn=Qn(et);return mt(un,Jn)||Ct(et,Pt,Jn),oe.pop(),fn}catch(fu){throw oe=[],fu}finally{if(oe.length===0){var wr=Z.get(et);if(wr===void 0)throw new Error("Expected to find root ID.");dr(wr)}}},unmountComponent:function(ut,Dt){var et=Dt[0];if(To(et)===9)return ut.apply(this,Dt);var Pt=Je(et);oe.push(Pt);try{var un=ut.apply(this,Dt);return oe.pop(),function(Jn,wr){rn.push(wr),Ee.delete(wr)}(0,Pt),un}catch(Jn){throw oe=[],Jn}finally{if(oe.length===0){var fn=Z.get(et);if(fn===void 0)throw new Error("Expected to find root ID.");dr(fn)}}}}));var It=[],sn=new Map,rn=[],Ft=0,Dn=null;function dr(ut){if(It.length!==0||rn.length!==0||Dn!==null){var Dt=rn.length+(Dn===null?0:1),et=new Array(3+Ft+(Dt>0?2+Dt:0)+It.length),Pt=0;if(et[Pt++]=z,et[Pt++]=ut,et[Pt++]=Ft,sn.forEach(function(Jn,wr){et[Pt++]=wr.length;for(var fu=Ko(wr),Lu=0;Lu0){et[Pt++]=2,et[Pt++]=Dt;for(var un=0;un"),"color: var(--dom-tag-name-color); font-weight: normal;"),Dt.props!==null&&console.log("Props:",Dt.props),Dt.state!==null&&console.log("State:",Dt.state),Dt.context!==null&&console.log("Context:",Dt.context);var Pt=Ce(ut);Pt!==null&&console.log("Node:",Pt),(window.chrome||/firefox/i.test(navigator.userAgent))&&console.log("Right-click any value to save it as a global variable for further inspection."),et&&console.groupEnd()}else console.warn('Could not find element with id "'.concat(ut,'"'))},overrideSuspense:function(){throw new Error("overrideSuspense not supported by this renderer")},overrideValueAtPath:function(ut,Dt,et,Pt,un){var fn=Ee.get(Dt);if(fn!=null){var Jn=fn._instance;if(Jn!=null)switch(ut){case"context":O0(Jn.context,Pt,un),yo(Jn);break;case"hooks":throw new Error("Hooks not supported by this renderer");case"props":var wr=fn._currentElement;fn._currentElement=Zo(Zo({},wr),{},{props:bn(wr.props,Pt,un)}),yo(Jn);break;case"state":O0(Jn.state,Pt,un),yo(Jn)}}},renamePath:function(ut,Dt,et,Pt,un){var fn=Ee.get(Dt);if(fn!=null){var Jn=fn._instance;if(Jn!=null)switch(ut){case"context":Xr(Jn.context,Pt,un),yo(Jn);break;case"hooks":throw new Error("Hooks not supported by this renderer");case"props":var wr=fn._currentElement;fn._currentElement=Zo(Zo({},wr),{},{props:en(wr.props,Pt,un)}),yo(Jn);break;case"state":Xr(Jn.state,Pt,un),yo(Jn)}}},prepareViewAttributeSource:function(ut,Dt){var et=Nr(ut);et!==null&&(window.$attribute=Uu(et,Dt))},prepareViewElementSource:function(ut){var Dt=Ee.get(ut);if(Dt!=null){var et=Dt._currentElement;et!=null?$.$type=et.type:console.warn('Could not find element with id "'.concat(ut,'"'))}else console.warn('Could not find instance with id "'.concat(ut,'"'))},renderer:G,setTraceUpdatesEnabled:function(ut){},setTrackedPath:function(ut){},startProfiling:function(){},stopProfiling:function(){},storeAsGlobal:function(ut,Dt,et){var Pt=Nr(ut);if(Pt!==null){var un=Uu(Pt,Dt),fn="$reactTemp".concat(et);window[fn]=un,console.log(fn),console.log(un)}},updateComponentFilters:function(ut){}}}function fi(U,z){var G=!1,$={bottom:0,left:0,right:0,top:0},Ce=z[U];if(Ce!=null){for(var Ee=0,Ae=Object.keys($);Ee0?"development":"production";var It=Function.prototype.toString;if(Mt.Mount&&Mt.Mount._renderNewRootComponent){var sn=It.call(Mt.Mount._renderNewRootComponent);return sn.indexOf("function")!==0?"production":sn.indexOf("storedMeasure")!==-1?"development":sn.indexOf("should be a pure function")!==-1?sn.indexOf("NODE_ENV")!==-1||sn.indexOf("development")!==-1||sn.indexOf("true")!==-1?"development":sn.indexOf("nextElement")!==-1||sn.indexOf("nextComponent")!==-1?"unminified":"development":sn.indexOf("nextElement")!==-1||sn.indexOf("nextComponent")!==-1?"unminified":"outdated"}}catch(rn){}return"production"}(ke);try{var oe=window.__REACT_DEVTOOLS_APPEND_COMPONENT_STACK__!==!1,We=window.__REACT_DEVTOOLS_BREAK_ON_CONSOLE_ERRORS__===!0;(oe||We)&&(d0(ke),Zl({appendComponentStack:oe,breakOnConsoleErrors:We}))}catch(Mt){}var it=U.__REACT_DEVTOOLS_ATTACH__;if(typeof it=="function"){var Ct=it(Z,Je,ke,U);Z.rendererInterfaces.set(Je,Ct)}return Z.emit("renderer",{id:Je,renderer:ke,reactBuildType:mt}),Je},on:function(ke,Je){Ee[ke]||(Ee[ke]=[]),Ee[ke].push(Je)},off:function(ke,Je){if(Ee[ke]){var mt=Ee[ke].indexOf(Je);mt!==-1&&Ee[ke].splice(mt,1),Ee[ke].length||delete Ee[ke]}},sub:function(ke,Je){return Z.on(ke,Je),function(){return Z.off(ke,Je)}},supportsFiber:!0,checkDCE:function(ke){try{Function.prototype.toString.call(ke).indexOf("^_^")>-1&&(G=!0,setTimeout(function(){throw new Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")}))}catch(Je){}},onCommitFiberUnmount:function(ke,Je){var mt=Ce.get(ke);mt!=null&&mt.handleCommitFiberUnmount(Je)},onCommitFiberRoot:function(ke,Je,mt){var oe=Z.getFiberRoots(ke),We=Je.current,it=oe.has(Je),Ct=We.memoizedState==null||We.memoizedState.element==null;it||Ct?it&&Ct&&oe.delete(Je):oe.add(Je);var Mt=Ce.get(ke);Mt!=null&&Mt.handleCommitFiberRoot(Je,mt)}};Object.defineProperty(U,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!1,enumerable:!1,get:function(){return Z}})})(window);var go=window.__REACT_DEVTOOLS_GLOBAL_HOOK__,js=[{type:1,value:7,isEnabled:!0}];function ji(U){if(go!=null){var z=U||{},G=z.host,$=G===void 0?"localhost":G,Ce=z.nativeStyleEditorValidAttributes,Ee=z.useHttps,Ae=Ee!==void 0&&Ee,Z=z.port,ke=Z===void 0?8097:Z,Je=z.websocket,mt=z.resolveRNStyle,oe=mt===void 0?null:mt,We=z.isAppActive,it=Ae?"wss":"ws",Ct=null;if((We===void 0?function(){return!0}:We)()){var Mt=null,It=[],sn=it+"://"+$+":"+ke,rn=Je||new window.WebSocket(sn);rn.onclose=function(){Mt!==null&&Mt.emit("shutdown"),Ft()},rn.onerror=function(){Ft()},rn.onmessage=function(Dn){var dr;try{if(typeof Dn.data!="string")throw Error();dr=JSON.parse(Dn.data)}catch(er){return void console.error("[React DevTools] Failed to parse JSON: "+Dn.data)}It.forEach(function(er){try{er(dr)}catch(Cr){throw console.log("[React DevTools] Error calling listener",dr),console.log("error:",Cr),Cr}})},rn.onopen=function(){(Mt=new p0({listen:function(An){return It.push(An),function(){var Lr=It.indexOf(An);Lr>=0&&It.splice(Lr,1)}},send:function(An,Lr,_o){rn.readyState===rn.OPEN?rn.send(JSON.stringify({event:An,payload:Lr})):(Mt!==null&&Mt.shutdown(),Ft())}})).addListener("inspectElement",function(An){var Lr=An.id,_o=An.rendererID,Nr=Dn.rendererInterfaces[_o];if(Nr!=null){var ut=Nr.findNativeNodesForFiberID(Lr);ut!=null&&ut[0]!=null&&Dn.emit("showNativeHighlight",ut[0])}}),Mt.addListener("updateComponentFilters",function(An){js=An}),window.__REACT_DEVTOOLS_COMPONENT_FILTERS__==null&&Mt.send("overrideComponentFilters",js);var Dn=new Yn(Mt);if(Dn.addListener("shutdown",function(){go.emit("shutdown")}),function(An,Lr,_o){if(An==null)return function(){};var Nr=[An.sub("renderer-attached",function(et){var Pt=et.id,un=(et.renderer,et.rendererInterface);Lr.setRendererInterface(Pt,un),un.flushInitialOperations()}),An.sub("unsupported-renderer-version",function(et){Lr.onUnsupportedRenderer(et)}),An.sub("operations",Lr.onHookOperations),An.sub("traceUpdates",Lr.onTraceUpdates)],ut=function(et,Pt){var un=An.rendererInterfaces.get(et);un==null&&(typeof Pt.findFiberByHostInstance=="function"?un=bs(An,et,Pt,_o):Pt.ComponentTree&&(un=fc(An,et,Pt,_o)),un!=null&&An.rendererInterfaces.set(et,un)),un!=null?An.emit("renderer-attached",{id:et,renderer:Pt,rendererInterface:un}):An.emit("unsupported-renderer-version",et)};An.renderers.forEach(function(et,Pt){ut(Pt,et)}),Nr.push(An.sub("renderer",function(et){var Pt=et.id,un=et.renderer;ut(Pt,un)})),An.emit("react-devtools",Lr),An.reactDevtoolsAgent=Lr;var Dt=function(){Nr.forEach(function(et){return et()}),An.rendererInterfaces.forEach(function(et){et.cleanup()}),An.reactDevtoolsAgent=null};Lr.addListener("shutdown",Dt),Nr.push(function(){Lr.removeListener("shutdown",Dt)})}(go,Dn,window),oe!=null||go.resolveRNStyle!=null)la(Mt,Dn,oe||go.resolveRNStyle,Ce||go.nativeStyleEditorValidAttributes||null);else{var dr,er,Cr=function(){Mt!==null&&la(Mt,Dn,dr,er)};go.hasOwnProperty("resolveRNStyle")||Object.defineProperty(go,"resolveRNStyle",{enumerable:!1,get:function(){return dr},set:function(An){dr=An,Cr()}}),go.hasOwnProperty("nativeStyleEditorValidAttributes")||Object.defineProperty(go,"nativeStyleEditorValidAttributes",{enumerable:!1,get:function(){return er},set:function(An){er=An,Cr()}})}}}else Ft()}function Ft(){Ct===null&&(Ct=setTimeout(function(){return ji(U)},2e3))}}}])})});var f6=Ke(a6=>{"use strict";Object.defineProperty(a6,"__esModule",{value:!0});l6();var HB=s6();HB.connectToDevTools()});var v6=Ke(dg=>{"use strict";var c6=dg&&dg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(dg,"__esModule",{value:!0});var d6=Q_(),qB=c6(vT()),p6=c6(eh()),hs=iw();process.env.DEV==="true"&&f6();var h6=i=>{i==null||i.unsetMeasureFunc(),i==null||i.freeRecursive()};dg.default=qB.default({schedulePassiveEffects:d6.unstable_scheduleCallback,cancelPassiveEffects:d6.unstable_cancelCallback,now:Date.now,getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>{},resetAfterCommit:i=>{if(i.isStaticDirty){i.isStaticDirty=!1,typeof i.onImmediateRender=="function"&&i.onImmediateRender();return}typeof i.onRender=="function"&&i.onRender()},getChildHostContext:(i,o)=>{let a=i.isInsideText,c=o==="ink-text"||o==="ink-virtual-text";return a===c?i:{isInsideText:c}},shouldSetTextContent:()=>!1,createInstance:(i,o,a,c)=>{if(c.isInsideText&&i==="ink-box")throw new Error(" can\u2019t be nested inside component");let _=i==="ink-text"&&c.isInsideText?"ink-virtual-text":i,t=hs.createNode(_);for(let[M,N]of Object.entries(o))M!=="children"&&(M==="style"?hs.setStyle(t,N):M==="internal_transform"?t.internal_transform=N:M==="internal_static"?t.internal_static=!0:hs.setAttribute(t,M,N));return t},createTextInstance:(i,o,a)=>{if(!a.isInsideText)throw new Error(`Text string "${i}" must be rendered inside component`);return hs.createTextNode(i)},resetTextContent:()=>{},hideTextInstance:i=>{hs.setTextNodeValue(i,"")},unhideTextInstance:(i,o)=>{hs.setTextNodeValue(i,o)},getPublicInstance:i=>i,hideInstance:i=>{var o;(o=i.yogaNode)===null||o===void 0||o.setDisplay(p6.default.DISPLAY_NONE)},unhideInstance:i=>{var o;(o=i.yogaNode)===null||o===void 0||o.setDisplay(p6.default.DISPLAY_FLEX)},appendInitialChild:hs.appendChildNode,appendChild:hs.appendChildNode,insertBefore:hs.insertBeforeNode,finalizeInitialChildren:(i,o,a,c)=>(i.internal_static&&(c.isStaticDirty=!0,c.staticNode=i),!1),supportsMutation:!0,appendChildToContainer:hs.appendChildNode,insertInContainerBefore:hs.insertBeforeNode,removeChildFromContainer:(i,o)=>{hs.removeChildNode(i,o),h6(o.yogaNode)},prepareUpdate:(i,o,a,c,_)=>{i.internal_static&&(_.isStaticDirty=!0);let t={},M=Object.keys(c);for(let N of M)if(c[N]!==a[N]){if(N==="style"&&typeof c.style=="object"&&typeof a.style=="object"){let T=c.style,B=a.style,H=Object.keys(T);for(let q of H){if(q==="borderStyle"||q==="borderColor"){if(typeof t.style!="object"){let ne={};t.style=ne}t.style.borderStyle=T.borderStyle,t.style.borderColor=T.borderColor}if(T[q]!==B[q]){if(typeof t.style!="object"){let ne={};t.style=ne}t.style[q]=T[q]}}continue}t[N]=c[N]}return t},commitUpdate:(i,o)=>{for(let[a,c]of Object.entries(o))a!=="children"&&(a==="style"?hs.setStyle(i,c):a==="internal_transform"?i.internal_transform=c:a==="internal_static"?i.internal_static=!0:hs.setAttribute(i,a,c))},commitTextUpdate:(i,o,a)=>{hs.setTextNodeValue(i,a)},removeChild:(i,o)=>{hs.removeChildNode(i,o),h6(o.yogaNode)}})});var y6=Ke((AV,m6)=>{"use strict";m6.exports=(i,o=1,a)=>{if(a=qt({indent:" ",includeEmptyLines:!1},a),typeof i!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof i}\``);if(typeof o!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof o}\``);if(typeof a.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof a.indent}\``);if(o===0)return i;let c=a.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return i.replace(c,a.indent.repeat(o))}});var g6=Ke(pg=>{"use strict";var WB=pg&&pg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(pg,"__esModule",{value:!0});var d4=WB(eh());pg.default=i=>i.getComputedWidth()-i.getComputedPadding(d4.default.EDGE_LEFT)-i.getComputedPadding(d4.default.EDGE_RIGHT)-i.getComputedBorder(d4.default.EDGE_LEFT)-i.getComputedBorder(d4.default.EDGE_RIGHT)});var E6=Ke((MV,_6)=>{_6.exports={single:{topLeft:"\u250C",topRight:"\u2510",bottomRight:"\u2518",bottomLeft:"\u2514",vertical:"\u2502",horizontal:"\u2500"},double:{topLeft:"\u2554",topRight:"\u2557",bottomRight:"\u255D",bottomLeft:"\u255A",vertical:"\u2551",horizontal:"\u2550"},round:{topLeft:"\u256D",topRight:"\u256E",bottomRight:"\u256F",bottomLeft:"\u2570",vertical:"\u2502",horizontal:"\u2500"},bold:{topLeft:"\u250F",topRight:"\u2513",bottomRight:"\u251B",bottomLeft:"\u2517",vertical:"\u2503",horizontal:"\u2501"},singleDouble:{topLeft:"\u2553",topRight:"\u2556",bottomRight:"\u255C",bottomLeft:"\u2559",vertical:"\u2551",horizontal:"\u2500"},doubleSingle:{topLeft:"\u2552",topRight:"\u2555",bottomRight:"\u255B",bottomLeft:"\u2558",vertical:"\u2502",horizontal:"\u2550"},classic:{topLeft:"+",topRight:"+",bottomRight:"+",bottomLeft:"+",vertical:"|",horizontal:"-"}}});var w6=Ke((kV,Sw)=>{"use strict";var D6=E6();Sw.exports=D6;Sw.exports.default=D6});var T6=Ke((LV,S6)=>{"use strict";S6.exports=(i,o=process.argv)=>{let a=i.startsWith("-")?"":i.length===1?"-":"--",c=o.indexOf(a+i),_=o.indexOf("--");return c!==-1&&(_===-1||c<_)}});var R6=Ke((NV,C6)=>{"use strict";var VB=require("os"),x6=require("tty"),pf=T6(),{env:X0}=process,m2;pf("no-color")||pf("no-colors")||pf("color=false")||pf("color=never")?m2=0:(pf("color")||pf("colors")||pf("color=true")||pf("color=always"))&&(m2=1);"FORCE_COLOR"in X0&&(X0.FORCE_COLOR==="true"?m2=1:X0.FORCE_COLOR==="false"?m2=0:m2=X0.FORCE_COLOR.length===0?1:Math.min(parseInt(X0.FORCE_COLOR,10),3));function Tw(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function Cw(i,o){if(m2===0)return 0;if(pf("color=16m")||pf("color=full")||pf("color=truecolor"))return 3;if(pf("color=256"))return 2;if(i&&!o&&m2===void 0)return 0;let a=m2||0;if(X0.TERM==="dumb")return a;if(process.platform==="win32"){let c=VB.release().split(".");return Number(c[0])>=10&&Number(c[2])>=10586?Number(c[2])>=14931?3:2:1}if("CI"in X0)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(c=>c in X0)||X0.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in X0)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(X0.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in X0)return 1;if(X0.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in X0){let c=parseInt((X0.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(X0.TERM_PROGRAM){case"iTerm.app":return c>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(X0.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(X0.TERM)||"COLORTERM"in X0?1:a}function GB(i){let o=Cw(i,i&&i.isTTY);return Tw(o)}C6.exports={supportsColor:GB,stdout:Tw(Cw(!0,x6.isatty(1))),stderr:Tw(Cw(!0,x6.isatty(2)))}});var O6=Ke((FV,A6)=>{"use strict";var YB=(i,o,a)=>{let c=i.indexOf(o);if(c===-1)return i;let _=o.length,t=0,M="";do M+=i.substr(t,c-t)+o+a,t=c+_,c=i.indexOf(o,t);while(c!==-1);return M+=i.substr(t),M},KB=(i,o,a,c)=>{let _=0,t="";do{let M=i[c-1]==="\r";t+=i.substr(_,(M?c-1:c)-_)+o+(M?`\r +`:` +`)+a,_=c+1,c=i.indexOf(` +`,_)}while(c!==-1);return t+=i.substr(_),t};A6.exports={stringReplaceAll:YB,stringEncaseCRLFWithFirstIndex:KB}});var F6=Ke((PV,M6)=>{"use strict";var XB=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,k6=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,QB=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,JB=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,ZB=new Map([["n",` +`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a","\x07"]]);function L6(i){let o=i[0]==="u",a=i[1]==="{";return o&&!a&&i.length===5||i[0]==="x"&&i.length===3?String.fromCharCode(parseInt(i.slice(1),16)):o&&a?String.fromCodePoint(parseInt(i.slice(2,-1),16)):ZB.get(i)||i}function $B(i,o){let a=[],c=o.trim().split(/\s*,\s*/g),_;for(let t of c){let M=Number(t);if(!Number.isNaN(M))a.push(M);else if(_=t.match(QB))a.push(_[2].replace(JB,(N,O,T)=>O?L6(O):T));else throw new Error(`Invalid Chalk template style argument: ${t} (in style '${i}')`)}return a}function eU(i){k6.lastIndex=0;let o=[],a;for(;(a=k6.exec(i))!==null;){let c=a[1];if(a[2]){let _=$B(c,a[2]);o.push([c].concat(_))}else o.push([c])}return o}function N6(i,o){let a={};for(let _ of o)for(let t of _.styles)a[t[0]]=_.inverse?null:t.slice(1);let c=i;for(let[_,t]of Object.entries(a))if(!!Array.isArray(t)){if(!(_ in c))throw new Error(`Unknown Chalk style: ${_}`);c=t.length>0?c[_](...t):c[_]}return c}M6.exports=(i,o)=>{let a=[],c=[],_=[];if(o.replace(XB,(t,M,N,O,T,B)=>{if(M)_.push(L6(M));else if(O){let H=_.join("");_=[],c.push(a.length===0?H:N6(i,a)(H)),a.push({inverse:N,styles:eU(O)})}else if(T){if(a.length===0)throw new Error("Found extraneous } in Chalk template literal");c.push(N6(i,a)(_.join(""))),_=[],a.pop()}else _.push(B)}),c.push(_.join("")),a.length>0){let t=`Chalk template literal is missing ${a.length} closing bracket${a.length===1?"":"s"} (\`}\`)`;throw new Error(t)}return c.join("")}});var y4=Ke((IV,P6)=>{"use strict";var hg=t4(),{stdout:xw,stderr:Rw}=R6(),{stringReplaceAll:tU,stringEncaseCRLFWithFirstIndex:nU}=O6(),{isArray:p4}=Array,I6=["ansi","ansi","ansi256","ansi16m"],$v=Object.create(null),rU=(i,o={})=>{if(o.level&&!(Number.isInteger(o.level)&&o.level>=0&&o.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let a=xw?xw.level:0;i.level=o.level===void 0?a:o.level},b6=class{constructor(o){return B6(o)}},B6=i=>{let o={};return rU(o,i),o.template=(...a)=>U6(o.template,...a),Object.setPrototypeOf(o,h4.prototype),Object.setPrototypeOf(o.template,o),o.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},o.template.Instance=b6,o.template};function h4(i){return B6(i)}for(let[i,o]of Object.entries(hg))$v[i]={get(){let a=v4(this,Aw(o.open,o.close,this._styler),this._isEmpty);return Object.defineProperty(this,i,{value:a}),a}};$v.visible={get(){let i=v4(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:i}),i}};var j6=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let i of j6)$v[i]={get(){let{level:o}=this;return function(...a){let c=Aw(hg.color[I6[o]][i](...a),hg.color.close,this._styler);return v4(this,c,this._isEmpty)}}};for(let i of j6){let o="bg"+i[0].toUpperCase()+i.slice(1);$v[o]={get(){let{level:a}=this;return function(...c){let _=Aw(hg.bgColor[I6[a]][i](...c),hg.bgColor.close,this._styler);return v4(this,_,this._isEmpty)}}}}var iU=Object.defineProperties(()=>{},Zr(qt({},$v),{level:{enumerable:!0,get(){return this._generator.level},set(i){this._generator.level=i}}})),Aw=(i,o,a)=>{let c,_;return a===void 0?(c=i,_=o):(c=a.openAll+i,_=o+a.closeAll),{open:i,close:o,openAll:c,closeAll:_,parent:a}},v4=(i,o,a)=>{let c=(..._)=>p4(_[0])&&p4(_[0].raw)?z6(c,U6(c,..._)):z6(c,_.length===1?""+_[0]:_.join(" "));return Object.setPrototypeOf(c,iU),c._generator=i,c._styler=o,c._isEmpty=a,c},z6=(i,o)=>{if(i.level<=0||!o)return i._isEmpty?"":o;let a=i._styler;if(a===void 0)return o;let{openAll:c,closeAll:_}=a;if(o.indexOf("")!==-1)for(;a!==void 0;)o=tU(o,a.close,a.open),a=a.parent;let t=o.indexOf(` +`);return t!==-1&&(o=nU(o,_,c,t)),c+o+_},Ow,U6=(i,...o)=>{let[a]=o;if(!p4(a)||!p4(a.raw))return o.join(" ");let c=o.slice(1),_=[a.raw[0]];for(let t=1;t{"use strict";var uU=vg&&vg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(vg,"__esModule",{value:!0});var mg=uU(y4()),oU=/^(rgb|hsl|hsv|hwb)\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,lU=/^(ansi|ansi256)\(\s?(\d+)\s?\)$/,g4=(i,o)=>o==="foreground"?i:"bg"+i[0].toUpperCase()+i.slice(1);vg.default=(i,o,a)=>{if(!o)return i;if(o in mg.default){let _=g4(o,a);return mg.default[_](i)}if(o.startsWith("#")){let _=g4("hex",a);return mg.default[_](o)(i)}if(o.startsWith("ansi")){let _=lU.exec(o);if(!_)return i;let t=g4(_[1],a),M=Number(_[2]);return mg.default[t](M)(i)}if(o.startsWith("rgb")||o.startsWith("hsl")||o.startsWith("hsv")||o.startsWith("hwb")){let _=oU.exec(o);if(!_)return i;let t=g4(_[1],a),M=Number(_[2]),N=Number(_[3]),O=Number(_[4]);return mg.default[t](M,N,O)(i)}return i}});var q6=Ke(yg=>{"use strict";var H6=yg&&yg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(yg,"__esModule",{value:!0});var sU=H6(w6()),kw=H6(Mw());yg.default=(i,o,a,c)=>{if(typeof a.style.borderStyle=="string"){let _=a.yogaNode.getComputedWidth(),t=a.yogaNode.getComputedHeight(),M=a.style.borderColor,N=sU.default[a.style.borderStyle],O=kw.default(N.topLeft+N.horizontal.repeat(_-2)+N.topRight,M,"foreground"),T=(kw.default(N.vertical,M,"foreground")+` +`).repeat(t-2),B=kw.default(N.bottomLeft+N.horizontal.repeat(_-2)+N.bottomRight,M,"foreground");c.write(i,o,O,{transformers:[]}),c.write(i,o+1,T,{transformers:[]}),c.write(i+_-1,o+1,T,{transformers:[]}),c.write(i,o+t-1,B,{transformers:[]})}}});var V6=Ke(gg=>{"use strict";var ih=gg&&gg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(gg,"__esModule",{value:!0});var aU=ih(eh()),fU=ih(GD()),cU=ih(y6()),dU=ih(tw()),pU=ih(g6()),hU=ih(rw()),vU=ih(q6()),mU=(i,o)=>{var a;let c=(a=i.childNodes[0])===null||a===void 0?void 0:a.yogaNode;if(c){let _=c.getComputedLeft(),t=c.getComputedTop();o=` +`.repeat(t)+cU.default(o,_)}return o},W6=(i,o,a)=>{var c;let{offsetX:_=0,offsetY:t=0,transformers:M=[],skipStaticElements:N}=a;if(N&&i.internal_static)return;let{yogaNode:O}=i;if(O){if(O.getDisplay()===aU.default.DISPLAY_NONE)return;let T=_+O.getComputedLeft(),B=t+O.getComputedTop(),H=M;if(typeof i.internal_transform=="function"&&(H=[i.internal_transform,...M]),i.nodeName==="ink-text"){let q=hU.default(i);if(q.length>0){let ne=fU.default(q),m=pU.default(O);if(ne>m){let pe=(c=i.style.textWrap)!==null&&c!==void 0?c:"wrap";q=dU.default(q,m,pe)}q=mU(i,q),o.write(T,B,q,{transformers:H})}return}if(i.nodeName==="ink-box"&&vU.default(T,B,i,o),i.nodeName==="ink-root"||i.nodeName==="ink-box")for(let q of i.childNodes)W6(q,o,{offsetX:T,offsetY:B,transformers:H,skipStaticElements:N})}};gg.default=W6});var Y6=Ke((jV,G6)=>{"use strict";G6.exports=i=>{i=Object.assign({onlyFirst:!1},i);let o=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(o,i.onlyFirst?void 0:"g")}});var X6=Ke((zV,Lw)=>{"use strict";var yU=Y6(),K6=i=>typeof i=="string"?i.replace(yU(),""):i;Lw.exports=K6;Lw.exports.default=K6});var Z6=Ke((HV,Q6)=>{"use strict";var J6="[\uD800-\uDBFF][\uDC00-\uDFFF]";Q6.exports=i=>i&&i.exact?new RegExp(`^${J6}$`):new RegExp(J6,"g")});var ex=Ke((qV,Nw)=>{"use strict";var gU=X6(),_U=Z6(),$6=i=>gU(i).replace(_U()," ").length;Nw.exports=$6;Nw.exports.default=$6});var ix=Ke(_g=>{"use strict";var tx=_g&&_g.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(_g,"__esModule",{value:!0});var nx=tx($D()),EU=tx(ex()),rx=class{constructor(o){this.writes=[];let{width:a,height:c}=o;this.width=a,this.height=c}write(o,a,c,_){let{transformers:t}=_;!c||this.writes.push({x:o,y:a,text:c,transformers:t})}get(){let o=[];for(let c=0;cc.trimRight()).join(` +`),height:o.length}}};_g.default=rx});var lx=Ke(Eg=>{"use strict";var Fw=Eg&&Eg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Eg,"__esModule",{value:!0});var DU=Fw(eh()),ux=Fw(V6()),ox=Fw(ix());Eg.default=(i,o)=>{var a;if(i.yogaNode.setWidth(o),i.yogaNode){i.yogaNode.calculateLayout(void 0,void 0,DU.default.DIRECTION_LTR);let c=new ox.default({width:i.yogaNode.getComputedWidth(),height:i.yogaNode.getComputedHeight()});ux.default(i,c,{skipStaticElements:!0});let _;((a=i.staticNode)===null||a===void 0?void 0:a.yogaNode)&&(_=new ox.default({width:i.staticNode.yogaNode.getComputedWidth(),height:i.staticNode.yogaNode.getComputedHeight()}),ux.default(i.staticNode,_,{skipStaticElements:!1}));let{output:t,height:M}=c.get();return{output:t,outputHeight:M,staticOutput:_?`${_.get().output} +`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var cx=Ke((GV,sx)=>{"use strict";var ax=require("stream"),fx=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],Pw={},wU=i=>{let o=new ax.PassThrough,a=new ax.PassThrough;o.write=_=>i("stdout",_),a.write=_=>i("stderr",_);let c=new console.Console(o,a);for(let _ of fx)Pw[_]=console[_],console[_]=c[_];return()=>{for(let _ of fx)console[_]=Pw[_];Pw={}}};sx.exports=wU});var bw=Ke(Iw=>{"use strict";Object.defineProperty(Iw,"__esModule",{value:!0});Iw.default=new WeakMap});var Uw=Ke(Bw=>{"use strict";Object.defineProperty(Bw,"__esModule",{value:!0});var SU=Mi(),dx=SU.createContext({exit:()=>{}});dx.displayName="InternalAppContext";Bw.default=dx});var zw=Ke(jw=>{"use strict";Object.defineProperty(jw,"__esModule",{value:!0});var TU=Mi(),px=TU.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});px.displayName="InternalStdinContext";jw.default=px});var qw=Ke(Hw=>{"use strict";Object.defineProperty(Hw,"__esModule",{value:!0});var CU=Mi(),hx=CU.createContext({stdout:void 0,write:()=>{}});hx.displayName="InternalStdoutContext";Hw.default=hx});var Vw=Ke(Ww=>{"use strict";Object.defineProperty(Ww,"__esModule",{value:!0});var xU=Mi(),vx=xU.createContext({stderr:void 0,write:()=>{}});vx.displayName="InternalStderrContext";Ww.default=vx});var _4=Ke(Gw=>{"use strict";Object.defineProperty(Gw,"__esModule",{value:!0});var RU=Mi(),mx=RU.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{}});mx.displayName="InternalFocusContext";Gw.default=mx});var gx=Ke(($V,yx)=>{"use strict";var AU=/[|\\{}()[\]^$+*?.-]/g;yx.exports=i=>{if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(AU,"\\$&")}});var wx=Ke((eG,_x)=>{"use strict";var OU=gx(),Ex=[].concat(require("module").builtinModules,"bootstrap_node","node").map(i=>new RegExp(`(?:\\(${i}\\.js:\\d+:\\d+\\)$|^\\s*at ${i}\\.js:\\d+:\\d+$)`));Ex.push(/\(internal\/[^:]+:\d+:\d+\)$/,/\s*at internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var E4=class{constructor(o){o=qt({ignoredPackages:[]},o),"internals"in o||(o.internals=E4.nodeInternals()),"cwd"in o||(o.cwd=process.cwd()),this._cwd=o.cwd.replace(/\\/g,"/"),this._internals=[].concat(o.internals,MU(o.ignoredPackages)),this._wrapCallSite=o.wrapCallSite||!1}static nodeInternals(){return[...Ex]}clean(o,a=0){a=" ".repeat(a),Array.isArray(o)||(o=o.split(` +`)),!/^\s*at /.test(o[0])&&/^\s*at /.test(o[1])&&(o=o.slice(1));let c=!1,_=null,t=[];return o.forEach(M=>{if(M=M.replace(/\\/g,"/"),this._internals.some(O=>O.test(M)))return;let N=/^\s*at /.test(M);c?M=M.trimEnd().replace(/^(\s+)at /,"$1"):(M=M.trim(),N&&(M=M.slice(3))),M=M.replace(`${this._cwd}/`,""),M&&(N?(_&&(t.push(_),_=null),t.push(M)):(c=!0,_=M))}),t.map(M=>`${a}${M} +`).join("")}captureString(o,a=this.captureString){typeof o=="function"&&(a=o,o=Infinity);let{stackTraceLimit:c}=Error;o&&(Error.stackTraceLimit=o);let _={};Error.captureStackTrace(_,a);let{stack:t}=_;return Error.stackTraceLimit=c,this.clean(t)}capture(o,a=this.capture){typeof o=="function"&&(a=o,o=Infinity);let{prepareStackTrace:c,stackTraceLimit:_}=Error;Error.prepareStackTrace=(N,O)=>this._wrapCallSite?O.map(this._wrapCallSite):O,o&&(Error.stackTraceLimit=o);let t={};Error.captureStackTrace(t,a);let{stack:M}=t;return Object.assign(Error,{prepareStackTrace:c,stackTraceLimit:_}),M}at(o=this.at){let[a]=this.capture(1,o);if(!a)return{};let c={line:a.getLineNumber(),column:a.getColumnNumber()};Dx(c,a.getFileName(),this._cwd),a.isConstructor()&&(c.constructor=!0),a.isEval()&&(c.evalOrigin=a.getEvalOrigin()),a.isNative()&&(c.native=!0);let _;try{_=a.getTypeName()}catch(N){}_&&_!=="Object"&&_!=="[object Object]"&&(c.type=_);let t=a.getFunctionName();t&&(c.function=t);let M=a.getMethodName();return M&&t!==M&&(c.method=M),c}parseLine(o){let a=o&&o.match(kU);if(!a)return null;let c=a[1]==="new",_=a[2],t=a[3],M=a[4],N=Number(a[5]),O=Number(a[6]),T=a[7],B=a[8],H=a[9],q=a[10]==="native",ne=a[11]===")",m,pe={};if(B&&(pe.line=Number(B)),H&&(pe.column=Number(H)),ne&&T){let ge=0;for(let ve=T.length-1;ve>0;ve--)if(T.charAt(ve)===")")ge++;else if(T.charAt(ve)==="("&&T.charAt(ve-1)===" "&&(ge--,ge===-1&&T.charAt(ve-1)===" ")){let ue=T.slice(0,ve-1);T=T.slice(ve+1),_+=` (${ue}`;break}}if(_){let ge=_.match(LU);ge&&(_=ge[1],m=ge[2])}return Dx(pe,T,this._cwd),c&&(pe.constructor=!0),t&&(pe.evalOrigin=t,pe.evalLine=N,pe.evalColumn=O,pe.evalFile=M&&M.replace(/\\/g,"/")),q&&(pe.native=!0),_&&(pe.function=_),m&&_!==m&&(pe.method=m),pe}};function Dx(i,o,a){o&&(o=o.replace(/\\/g,"/"),o.startsWith(`${a}/`)&&(o=o.slice(a.length+1)),i.file=o)}function MU(i){if(i.length===0)return[];let o=i.map(a=>OU(a));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${o.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var kU=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),LU=/^(.*?) \[as (.*?)\]$/;_x.exports=E4});var Tx=Ke((tG,Sx)=>{"use strict";Sx.exports=(i,o)=>i.replace(/^\t+/gm,a=>" ".repeat(a.length*(o||2)))});var xx=Ke((nG,Cx)=>{"use strict";var NU=Tx(),FU=(i,o)=>{let a=[],c=i-o,_=i+o;for(let t=c;t<=_;t++)a.push(t);return a};Cx.exports=(i,o,a)=>{if(typeof i!="string")throw new TypeError("Source code is missing.");if(!o||o<1)throw new TypeError("Line number must start from `1`.");if(i=NU(i).split(/\r?\n/),!(o>i.length))return a=qt({around:3},a),FU(o,a.around).filter(c=>i[c-1]!==void 0).map(c=>({line:c,value:i[c-1]}))}});var D4=Ke(rc=>{"use strict";var PU=rc&&rc.__createBinding||(Object.create?function(i,o,a,c){c===void 0&&(c=a),Object.defineProperty(i,c,{enumerable:!0,get:function(){return o[a]}})}:function(i,o,a,c){c===void 0&&(c=a),i[c]=o[a]}),IU=rc&&rc.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),bU=rc&&rc.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var a in i)a!=="default"&&Object.hasOwnProperty.call(i,a)&&PU(o,i,a);return IU(o,i),o},BU=rc&&rc.__rest||function(i,o){var a={};for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&o.indexOf(c)<0&&(a[c]=i[c]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _=0,c=Object.getOwnPropertySymbols(i);_{var{children:a}=i,c=BU(i,["children"]);let _=Object.assign(Object.assign({},c),{marginLeft:c.marginLeft||c.marginX||c.margin||0,marginRight:c.marginRight||c.marginX||c.margin||0,marginTop:c.marginTop||c.marginY||c.margin||0,marginBottom:c.marginBottom||c.marginY||c.margin||0,paddingLeft:c.paddingLeft||c.paddingX||c.padding||0,paddingRight:c.paddingRight||c.paddingX||c.padding||0,paddingTop:c.paddingTop||c.paddingY||c.padding||0,paddingBottom:c.paddingBottom||c.paddingY||c.padding||0});return Rx.default.createElement("ink-box",{ref:o,style:_},a)});Yw.displayName="Box";Yw.defaultProps={flexDirection:"row",flexGrow:0,flexShrink:1};rc.default=Yw});var Qw=Ke(Dg=>{"use strict";var Kw=Dg&&Dg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Dg,"__esModule",{value:!0});var UU=Kw(Mi()),em=Kw(y4()),Ax=Kw(Mw()),Xw=({color:i,backgroundColor:o,dimColor:a,bold:c,italic:_,underline:t,strikethrough:M,inverse:N,wrap:O,children:T})=>{if(T==null)return null;let B=H=>(a&&(H=em.default.dim(H)),i&&(H=Ax.default(H,i,"foreground")),o&&(H=Ax.default(H,o,"background")),c&&(H=em.default.bold(H)),_&&(H=em.default.italic(H)),t&&(H=em.default.underline(H)),M&&(H=em.default.strikethrough(H)),N&&(H=em.default.inverse(H)),H);return UU.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row",textWrap:O},internal_transform:B},T)};Xw.displayName="Text";Xw.defaultProps={dimColor:!1,bold:!1,italic:!1,underline:!1,strikethrough:!1,wrap:"wrap"};Dg.default=Xw});var Lx=Ke(ic=>{"use strict";var jU=ic&&ic.__createBinding||(Object.create?function(i,o,a,c){c===void 0&&(c=a),Object.defineProperty(i,c,{enumerable:!0,get:function(){return o[a]}})}:function(i,o,a,c){c===void 0&&(c=a),i[c]=o[a]}),zU=ic&&ic.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),HU=ic&&ic.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var a in i)a!=="default"&&Object.hasOwnProperty.call(i,a)&&jU(o,i,a);return zU(o,i),o},wg=ic&&ic.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ic,"__esModule",{value:!0});var Ox=HU(require("fs")),Q0=wg(Mi()),Mx=wg(wx()),qU=wg(xx()),$1=wg(D4()),Hc=wg(Qw()),kx=new Mx.default({cwd:process.cwd(),internals:Mx.default.nodeInternals()}),WU=({error:i})=>{let o=i.stack?i.stack.split(` +`).slice(1):void 0,a=o?kx.parseLine(o[0]):void 0,c,_=0;if((a==null?void 0:a.file)&&(a==null?void 0:a.line)&&Ox.existsSync(a.file)){let t=Ox.readFileSync(a.file,"utf8");if(c=qU.default(t,a.line),c)for(let{line:M}of c)_=Math.max(_,String(M).length)}return Q0.default.createElement($1.default,{flexDirection:"column",padding:1},Q0.default.createElement($1.default,null,Q0.default.createElement(Hc.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),Q0.default.createElement(Hc.default,null," ",i.message)),a&&Q0.default.createElement($1.default,{marginTop:1},Q0.default.createElement(Hc.default,{dimColor:!0},a.file,":",a.line,":",a.column)),a&&c&&Q0.default.createElement($1.default,{marginTop:1,flexDirection:"column"},c.map(({line:t,value:M})=>Q0.default.createElement($1.default,{key:t},Q0.default.createElement($1.default,{width:_+1},Q0.default.createElement(Hc.default,{dimColor:t!==a.line,backgroundColor:t===a.line?"red":void 0,color:t===a.line?"white":void 0},String(t).padStart(_," "),":")),Q0.default.createElement(Hc.default,{key:t,backgroundColor:t===a.line?"red":void 0,color:t===a.line?"white":void 0}," "+M)))),i.stack&&Q0.default.createElement($1.default,{marginTop:1,flexDirection:"column"},i.stack.split(` +`).slice(1).map(t=>{let M=kx.parseLine(t);return M?Q0.default.createElement($1.default,{key:t},Q0.default.createElement(Hc.default,{dimColor:!0},"- "),Q0.default.createElement(Hc.default,{dimColor:!0,bold:!0},M.function),Q0.default.createElement(Hc.default,{dimColor:!0,color:"gray"}," ","(",M.file,":",M.line,":",M.column,")")):Q0.default.createElement($1.default,{key:t},Q0.default.createElement(Hc.default,{dimColor:!0},"- "),Q0.default.createElement(Hc.default,{dimColor:!0,bold:!0},t))})))};ic.default=WU});var Fx=Ke(uc=>{"use strict";var VU=uc&&uc.__createBinding||(Object.create?function(i,o,a,c){c===void 0&&(c=a),Object.defineProperty(i,c,{enumerable:!0,get:function(){return o[a]}})}:function(i,o,a,c){c===void 0&&(c=a),i[c]=o[a]}),GU=uc&&uc.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),YU=uc&&uc.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var a in i)a!=="default"&&Object.hasOwnProperty.call(i,a)&&VU(o,i,a);return GU(o,i),o},uh=uc&&uc.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(uc,"__esModule",{value:!0});var oh=YU(Mi()),Nx=uh(SD()),KU=uh(Uw()),XU=uh(zw()),QU=uh(qw()),JU=uh(Vw()),ZU=uh(_4()),$U=uh(Lx()),ej=" ",tj="",nj="",Jw=class extends oh.PureComponent{constructor(){super(...arguments);this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=o=>{let{stdin:a}=this.props;if(!this.isRawModeSupported())throw a===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default. +Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink. +Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(a.setEncoding("utf8"),o){this.rawModeEnabledCount===0&&(a.addListener("data",this.handleInput),a.resume(),a.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount==0&&(a.setRawMode(!1),a.removeListener("data",this.handleInput),a.pause())},this.handleInput=o=>{o===""&&this.props.exitOnCtrlC&&this.handleExit(),o===nj&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(o===ej&&this.focusNext(),o===tj&&this.focusPrevious())},this.handleExit=o=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(o)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focusNext=()=>{this.setState(o=>{let a=o.focusables[0].id;return{activeFocusId:this.findNextFocusable(o)||a}})},this.focusPrevious=()=>{this.setState(o=>{let a=o.focusables[o.focusables.length-1].id;return{activeFocusId:this.findPreviousFocusable(o)||a}})},this.addFocusable=(o,{autoFocus:a})=>{this.setState(c=>{let _=c.activeFocusId;return!_&&a&&(_=o),{activeFocusId:_,focusables:[...c.focusables,{id:o,isActive:!0}]}})},this.removeFocusable=o=>{this.setState(a=>({activeFocusId:a.activeFocusId===o?void 0:a.activeFocusId,focusables:a.focusables.filter(c=>c.id!==o)}))},this.activateFocusable=o=>{this.setState(a=>({focusables:a.focusables.map(c=>c.id!==o?c:{id:o,isActive:!0})}))},this.deactivateFocusable=o=>{this.setState(a=>({activeFocusId:a.activeFocusId===o?void 0:a.activeFocusId,focusables:a.focusables.map(c=>c.id!==o?c:{id:o,isActive:!1})}))},this.findNextFocusable=o=>{let a=o.focusables.findIndex(c=>c.id===o.activeFocusId);for(let c=a+1;c{let a=o.focusables.findIndex(c=>c.id===o.activeFocusId);for(let c=a-1;c>=0;c--)if(o.focusables[c].isActive)return o.focusables[c].id}}static getDerivedStateFromError(o){return{error:o}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return oh.default.createElement(KU.default.Provider,{value:{exit:this.handleExit}},oh.default.createElement(XU.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},oh.default.createElement(QU.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},oh.default.createElement(JU.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},oh.default.createElement(ZU.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious}},this.state.error?oh.default.createElement($U.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){Nx.default.hide(this.props.stdout)}componentWillUnmount(){Nx.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(o){this.handleExit(o)}};uc.default=Jw;Jw.displayName="InternalApp"});var Bx=Ke(oc=>{"use strict";var rj=oc&&oc.__createBinding||(Object.create?function(i,o,a,c){c===void 0&&(c=a),Object.defineProperty(i,c,{enumerable:!0,get:function(){return o[a]}})}:function(i,o,a,c){c===void 0&&(c=a),i[c]=o[a]}),ij=oc&&oc.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),uj=oc&&oc.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var a in i)a!=="default"&&Object.hasOwnProperty.call(i,a)&&rj(o,i,a);return ij(o,i),o},lc=oc&&oc.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(oc,"__esModule",{value:!0});var oj=lc(Mi()),Px=kS(),lj=lc(GS()),sj=lc(yD()),aj=lc($S()),fj=lc(tT()),w4=lc(v6()),cj=lc(lx()),dj=lc(wD()),pj=lc(cx()),hj=uj(iw()),vj=lc(bw()),mj=lc(Fx()),tm=process.env.CI==="false"?!1:aj.default,Ix=()=>{},bx=class{constructor(o){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:a,outputHeight:c,staticOutput:_}=cj.default(this.rootNode,this.options.stdout.columns||80),t=_&&_!==` +`;if(this.options.debug){t&&(this.fullStaticOutput+=_),this.options.stdout.write(this.fullStaticOutput+a);return}if(tm){t&&this.options.stdout.write(_),this.lastOutput=a;return}if(t&&(this.fullStaticOutput+=_),c>=this.options.stdout.rows){this.options.stdout.write(sj.default.clearTerminal+this.fullStaticOutput+a),this.lastOutput=a;return}t&&(this.log.clear(),this.options.stdout.write(_),this.log(a)),!t&&a!==this.lastOutput&&this.throttledLog(a),this.lastOutput=a},fj.default(this),this.options=o,this.rootNode=hj.createNode("ink-root"),this.rootNode.onRender=o.debug?this.onRender:Px.throttle(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=lj.default.create(o.stdout),this.throttledLog=o.debug?this.log:Px.throttle(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=w4.default.createContainer(this.rootNode,!1,!1),this.unsubscribeExit=dj.default(this.unmount,{alwaysLast:!1}),process.env.DEV==="true"&&w4.default.injectIntoDevTools({bundleType:0,version:"16.13.1",rendererPackageName:"ink"}),o.patchConsole&&this.patchConsole(),tm||(o.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{o.stdout.off("resize",this.onRender)})}render(o){let a=oj.default.createElement(mj.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},o);w4.default.updateContainer(a,this.container,null,Ix)}writeToStdout(o){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(o+this.fullStaticOutput+this.lastOutput);return}if(tm){this.options.stdout.write(o);return}this.log.clear(),this.options.stdout.write(o),this.log(this.lastOutput)}}writeToStderr(o){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(o),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(tm){this.options.stderr.write(o);return}this.log.clear(),this.options.stderr.write(o),this.log(this.lastOutput)}}unmount(o){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),tm?this.options.stdout.write(this.lastOutput+` +`):this.options.debug||this.log.done(),this.isUnmounted=!0,w4.default.updateContainer(null,this.container,null,Ix),vj.default.delete(this.options.stdout),o instanceof Error?this.rejectExitPromise(o):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((o,a)=>{this.resolveExitPromise=o,this.rejectExitPromise=a})),this.exitPromise}clear(){!tm&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=pj.default((o,a)=>{o==="stdout"&&this.writeToStdout(a),o==="stderr"&&(a.startsWith("The above error occurred")||this.writeToStderr(a))}))}};oc.default=bx});var jx=Ke(Sg=>{"use strict";var Ux=Sg&&Sg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Sg,"__esModule",{value:!0});var yj=Ux(Bx()),S4=Ux(bw()),gj=require("stream"),Dj=(i,o)=>{let a=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},_j(o)),c=Ej(a.stdout,()=>new yj.default(a));return c.render(i),{rerender:c.render,unmount:()=>c.unmount(),waitUntilExit:c.waitUntilExit,cleanup:()=>S4.default.delete(a.stdout),clear:c.clear}};Sg.default=Dj;var _j=(i={})=>i instanceof gj.Stream?{stdout:i,stdin:process.stdin}:i,Ej=(i,o)=>{let a;return S4.default.has(i)?a=S4.default.get(i):(a=o(),S4.default.set(i,a)),a}});var Hx=Ke(ed=>{"use strict";var wj=ed&&ed.__createBinding||(Object.create?function(i,o,a,c){c===void 0&&(c=a),Object.defineProperty(i,c,{enumerable:!0,get:function(){return o[a]}})}:function(i,o,a,c){c===void 0&&(c=a),i[c]=o[a]}),Sj=ed&&ed.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),Tj=ed&&ed.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var a in i)a!=="default"&&Object.hasOwnProperty.call(i,a)&&wj(o,i,a);return Sj(o,i),o};Object.defineProperty(ed,"__esModule",{value:!0});var Tg=Tj(Mi()),zx=i=>{let{items:o,children:a,style:c}=i,[_,t]=Tg.useState(0),M=Tg.useMemo(()=>o.slice(_),[o,_]);Tg.useLayoutEffect(()=>{t(o.length)},[o.length]);let N=M.map((T,B)=>a(T,_+B)),O=Tg.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},c),[c]);return Tg.default.createElement("ink-box",{internal_static:!0,style:O},N)};zx.displayName="Static";ed.default=zx});var Wx=Ke(Cg=>{"use strict";var Cj=Cg&&Cg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Cg,"__esModule",{value:!0});var xj=Cj(Mi()),qx=({children:i,transform:o})=>i==null?null:xj.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:o},i);qx.displayName="Transform";Cg.default=qx});var Gx=Ke(xg=>{"use strict";var Rj=xg&&xg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(xg,"__esModule",{value:!0});var Aj=Rj(Mi()),Vx=({count:i=1})=>Aj.default.createElement("ink-text",null,` +`.repeat(i));Vx.displayName="Newline";xg.default=Vx});var Xx=Ke(Rg=>{"use strict";var Yx=Rg&&Rg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Rg,"__esModule",{value:!0});var Oj=Yx(Mi()),Mj=Yx(D4()),Kx=()=>Oj.default.createElement(Mj.default,{flexGrow:1});Kx.displayName="Spacer";Rg.default=Kx});var T4=Ke(Ag=>{"use strict";var kj=Ag&&Ag.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ag,"__esModule",{value:!0});var Lj=Mi(),Nj=kj(zw()),Fj=()=>Lj.useContext(Nj.default);Ag.default=Fj});var Jx=Ke(Og=>{"use strict";var Pj=Og&&Og.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Og,"__esModule",{value:!0});var Qx=Mi(),Ij=Pj(T4()),bj=(i,o={})=>{let{stdin:a,setRawMode:c,internal_exitOnCtrlC:_}=Ij.default();Qx.useEffect(()=>{if(o.isActive!==!1)return c(!0),()=>{c(!1)}},[o.isActive,c]),Qx.useEffect(()=>{if(o.isActive===!1)return;let t=M=>{let N=String(M),O={upArrow:N==="",downArrow:N==="",leftArrow:N==="",rightArrow:N==="",pageDown:N==="[6~",pageUp:N==="[5~",return:N==="\r",escape:N==="",ctrl:!1,shift:!1,tab:N===" "||N==="",backspace:N==="\b",delete:N==="\x7F"||N==="[3~",meta:!1};N<=""&&!O.return&&(N=String.fromCharCode(N.charCodeAt(0)+"a".charCodeAt(0)-1),O.ctrl=!0),N.startsWith("")&&(N=N.slice(1),O.meta=!0);let T=N>="A"&&N<="Z",B=N>="\u0410"&&N<="\u042F";N.length===1&&(T||B)&&(O.shift=!0),O.tab&&N==="[Z"&&(O.shift=!0),(O.tab||O.backspace||O.delete)&&(N=""),(!(N==="c"&&O.ctrl)||!_)&&i(N,O)};return a==null||a.on("data",t),()=>{a==null||a.off("data",t)}},[o.isActive,a,_,i])};Og.default=bj});var Zx=Ke(Mg=>{"use strict";var Bj=Mg&&Mg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Mg,"__esModule",{value:!0});var Uj=Mi(),jj=Bj(Uw()),zj=()=>Uj.useContext(jj.default);Mg.default=zj});var $x=Ke(kg=>{"use strict";var Hj=kg&&kg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(kg,"__esModule",{value:!0});var qj=Mi(),Wj=Hj(qw()),Vj=()=>qj.useContext(Wj.default);kg.default=Vj});var e5=Ke(Lg=>{"use strict";var Gj=Lg&&Lg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Lg,"__esModule",{value:!0});var Yj=Mi(),Kj=Gj(Vw()),Xj=()=>Yj.useContext(Kj.default);Lg.default=Xj});var n5=Ke(Ng=>{"use strict";var t5=Ng&&Ng.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ng,"__esModule",{value:!0});var Fg=Mi(),Qj=t5(_4()),Jj=t5(T4()),Zj=({isActive:i=!0,autoFocus:o=!1}={})=>{let{isRawModeSupported:a,setRawMode:c}=Jj.default(),{activeId:_,add:t,remove:M,activate:N,deactivate:O}=Fg.useContext(Qj.default),T=Fg.useMemo(()=>Math.random().toString().slice(2,7),[]);return Fg.useEffect(()=>(t(T,{autoFocus:o}),()=>{M(T)}),[T,o]),Fg.useEffect(()=>{i?N(T):O(T)},[i,T]),Fg.useEffect(()=>{if(!(!a||!i))return c(!0),()=>{c(!1)}},[i]),{isFocused:Boolean(T)&&_===T}};Ng.default=Zj});var r5=Ke(Pg=>{"use strict";var $j=Pg&&Pg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Pg,"__esModule",{value:!0});var ez=Mi(),tz=$j(_4()),nz=()=>{let i=ez.useContext(tz.default);return{enableFocus:i.enableFocus,disableFocus:i.disableFocus,focusNext:i.focusNext,focusPrevious:i.focusPrevious}};Pg.default=nz});var i5=Ke(Zw=>{"use strict";Object.defineProperty(Zw,"__esModule",{value:!0});Zw.default=i=>{var o,a,c,_;return{width:(a=(o=i.yogaNode)===null||o===void 0?void 0:o.getComputedWidth())!==null&&a!==void 0?a:0,height:(_=(c=i.yogaNode)===null||c===void 0?void 0:c.getComputedHeight())!==null&&_!==void 0?_:0}}});var sc=Ke(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});var rz=jx();Object.defineProperty(Kl,"render",{enumerable:!0,get:function(){return rz.default}});var iz=D4();Object.defineProperty(Kl,"Box",{enumerable:!0,get:function(){return iz.default}});var uz=Qw();Object.defineProperty(Kl,"Text",{enumerable:!0,get:function(){return uz.default}});var oz=Hx();Object.defineProperty(Kl,"Static",{enumerable:!0,get:function(){return oz.default}});var lz=Wx();Object.defineProperty(Kl,"Transform",{enumerable:!0,get:function(){return lz.default}});var sz=Gx();Object.defineProperty(Kl,"Newline",{enumerable:!0,get:function(){return sz.default}});var az=Xx();Object.defineProperty(Kl,"Spacer",{enumerable:!0,get:function(){return az.default}});var fz=Jx();Object.defineProperty(Kl,"useInput",{enumerable:!0,get:function(){return fz.default}});var cz=Zx();Object.defineProperty(Kl,"useApp",{enumerable:!0,get:function(){return cz.default}});var dz=T4();Object.defineProperty(Kl,"useStdin",{enumerable:!0,get:function(){return dz.default}});var pz=$x();Object.defineProperty(Kl,"useStdout",{enumerable:!0,get:function(){return pz.default}});var hz=e5();Object.defineProperty(Kl,"useStderr",{enumerable:!0,get:function(){return hz.default}});var vz=n5();Object.defineProperty(Kl,"useFocus",{enumerable:!0,get:function(){return vz.default}});var mz=r5();Object.defineProperty(Kl,"useFocusManager",{enumerable:!0,get:function(){return mz.default}});var yz=i5();Object.defineProperty(Kl,"measureElement",{enumerable:!0,get:function(){return yz.default}})});var h5=Ke(Ig=>{"use strict";Object.defineProperty(Ig,"__esModule",{value:!0});Ig.UncontrolledTextInput=void 0;var c5=Mi(),t3=Mi(),d5=sc(),ah=y4(),p5=({value:i,placeholder:o="",focus:a=!0,mask:c,highlightPastedText:_=!1,showCursor:t=!0,onChange:M,onSubmit:N})=>{let[{cursorOffset:O,cursorWidth:T},B]=t3.useState({cursorOffset:(i||"").length,cursorWidth:0});t3.useEffect(()=>{B(pe=>{if(!a||!t)return pe;let ge=i||"";return pe.cursorOffset>ge.length-1?{cursorOffset:ge.length,cursorWidth:0}:pe})},[i,a,t]);let H=_?T:0,q=c?c.repeat(i.length):i,ne=q,m=o?ah.grey(o):void 0;if(t&&a){m=o.length>0?ah.inverse(o[0])+ah.grey(o.slice(1)):ah.inverse(" "),ne=q.length>0?"":ah.inverse(" ");let pe=0;for(let ge of q)pe>=O-H&&pe<=O?ne+=ah.inverse(ge):ne+=ge,pe++;q.length>0&&O===q.length&&(ne+=ah.inverse(" "))}return d5.useInput((pe,ge)=>{if(ge.upArrow||ge.downArrow||ge.ctrl&&pe==="c"||ge.tab||ge.shift&&ge.tab)return;if(ge.return){N&&N(i);return}let ve=O,ue=i,_e=0;ge.leftArrow?t&&ve--:ge.rightArrow?t&&ve++:ge.backspace||ge.delete?O>0&&(ue=i.slice(0,O-1)+i.slice(O,i.length),ve--):(ue=i.slice(0,O)+pe+i.slice(O,i.length),ve+=pe.length,pe.length>1&&(_e=pe.length)),O<0&&(ve=0),O>i.length&&(ve=i.length),B({cursorOffset:ve,cursorWidth:_e}),ue!==i&&M(ue)},{isActive:a}),c5.createElement(d5.Text,null,o?q.length>0?ne:m:ne)};Ig.default=p5;Ig.UncontrolledTextInput=i=>{let[o,a]=t3.useState("");return c5.createElement(p5,Object.assign({},i,{value:o,onChange:a}))}});var m5=Ke(N4=>{"use strict";Object.defineProperty(N4,"__esModule",{value:!0});function bg(i){let o=[...i.caches],a=o.shift();return a===void 0?v5():{get(c,_,t={miss:()=>Promise.resolve()}){return a.get(c,_,t).catch(()=>bg({caches:o}).get(c,_,t))},set(c,_){return a.set(c,_).catch(()=>bg({caches:o}).set(c,_))},delete(c){return a.delete(c).catch(()=>bg({caches:o}).delete(c))},clear(){return a.clear().catch(()=>bg({caches:o}).clear())}}}function v5(){return{get(i,o,a={miss:()=>Promise.resolve()}){return o().then(_=>Promise.all([_,a.miss(_)])).then(([_])=>_)},set(i,o){return Promise.resolve(o)},delete(i){return Promise.resolve()},clear(){return Promise.resolve()}}}N4.createFallbackableCache=bg;N4.createNullCache=v5});var g5=Ke((jG,y5)=>{y5.exports=m5()});var _5=Ke(n3=>{"use strict";Object.defineProperty(n3,"__esModule",{value:!0});function gz(i={serializable:!0}){let o={};return{get(a,c,_={miss:()=>Promise.resolve()}){let t=JSON.stringify(a);if(t in o)return Promise.resolve(i.serializable?JSON.parse(o[t]):o[t]);let M=c(),N=_&&_.miss||(()=>Promise.resolve());return M.then(O=>N(O)).then(()=>M)},set(a,c){return o[JSON.stringify(a)]=i.serializable?JSON.stringify(c):c,Promise.resolve(c)},delete(a){return delete o[JSON.stringify(a)],Promise.resolve()},clear(){return o={},Promise.resolve()}}}n3.createInMemoryCache=gz});var D5=Ke((HG,E5)=>{E5.exports=_5()});var S5=Ke(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});function _z(i,o,a){let c={"x-algolia-api-key":a,"x-algolia-application-id":o};return{headers(){return i===r3.WithinHeaders?c:{}},queryParameters(){return i===r3.WithinQueryParameters?c:{}}}}function Ez(i){let o=0,a=()=>(o++,new Promise(c=>{setTimeout(()=>{c(i(a))},Math.min(100*o,1e3))}));return i(a)}function w5(i,o=(a,c)=>Promise.resolve()){return Object.assign(i,{wait(a){return w5(i.then(c=>Promise.all([o(c,a),c])).then(c=>c[1]))}})}function Dz(i){let o=i.length-1;for(o;o>0;o--){let a=Math.floor(Math.random()*(o+1)),c=i[o];i[o]=i[a],i[a]=c}return i}function wz(i,o){return Object.keys(o!==void 0?o:{}).forEach(a=>{i[a]=o[a](i)}),i}function Sz(i,...o){let a=0;return i.replace(/%s/g,()=>encodeURIComponent(o[a++]))}var Tz="4.2.0",Cz=i=>()=>i.transporter.requester.destroy(),r3={WithinQueryParameters:0,WithinHeaders:1};ac.AuthMode=r3;ac.addMethods=wz;ac.createAuth=_z;ac.createRetryablePromise=Ez;ac.createWaitablePromise=w5;ac.destroy=Cz;ac.encode=Sz;ac.shuffle=Dz;ac.version=Tz});var Bg=Ke((WG,T5)=>{T5.exports=S5()});var C5=Ke(i3=>{"use strict";Object.defineProperty(i3,"__esModule",{value:!0});var xz={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};i3.MethodEnum=xz});var Ug=Ke((GG,x5)=>{x5.exports=C5()});var z5=Ke(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});var R5=Ug();function u3(i,o){let a=i||{},c=a.data||{};return Object.keys(a).forEach(_=>{["timeout","headers","queryParameters","data","cacheable"].indexOf(_)===-1&&(c[_]=a[_])}),{data:Object.entries(c).length>0?c:void 0,timeout:a.timeout||o,headers:a.headers||{},queryParameters:a.queryParameters||{},cacheable:a.cacheable}}var F4={Read:1,Write:2,Any:3},nm={Up:1,Down:2,Timeouted:3},A5=2*60*1e3;function o3(i,o=nm.Up){return Zr(qt({},i),{status:o,lastUpdate:Date.now()})}function O5(i){return i.status===nm.Up||Date.now()-i.lastUpdate>A5}function M5(i){return i.status===nm.Timeouted&&Date.now()-i.lastUpdate<=A5}function l3(i){return{protocol:i.protocol||"https",url:i.url,accept:i.accept||F4.Any}}function Rz(i,o){return Promise.all(o.map(a=>i.get(a,()=>Promise.resolve(o3(a))))).then(a=>{let c=a.filter(N=>O5(N)),_=a.filter(N=>M5(N)),t=[...c,..._],M=t.length>0?t.map(N=>l3(N)):o;return{getTimeout(N,O){return(_.length===0&&N===0?1:_.length+3+N)*O},statelessHosts:M}})}var Az=({isTimedOut:i,status:o})=>!i&&~~o==0,Oz=i=>{let o=i.status;return i.isTimedOut||Az(i)||~~(o/100)!=2&&~~(o/100)!=4},Mz=({status:i})=>~~(i/100)==2,kz=(i,o)=>Oz(i)?o.onRetry(i):Mz(i)?o.onSucess(i):o.onFail(i);function b5(i,o,a,c){let _=[],t=F5(a,c),M=P5(i,c),N=a.method,O=a.method!==R5.MethodEnum.Get?{}:qt(qt({},a.data),c.data),T=qt(qt(qt({"x-algolia-agent":i.userAgent.value},i.queryParameters),O),c.queryParameters),B=0,H=(q,ne)=>{let m=q.pop();if(m===void 0)throw I5(s3(_));let pe={data:t,headers:M,method:N,url:N5(m,a.path,T),connectTimeout:ne(B,i.timeouts.connect),responseTimeout:ne(B,c.timeout)},ge=ue=>{let _e={request:pe,response:ue,host:m,triesLeft:q.length};return _.push(_e),_e},ve={onSucess:ue=>k5(ue),onRetry(ue){let _e=ge(ue);return ue.isTimedOut&&B++,Promise.all([i.logger.info("Retryable failure",a3(_e)),i.hostsCache.set(m,o3(m,ue.isTimedOut?nm.Timeouted:nm.Down))]).then(()=>H(q,ne))},onFail(ue){throw ge(ue),L5(ue,s3(_))}};return i.requester.send(pe).then(ue=>kz(ue,ve))};return Rz(i.hostsCache,o).then(q=>H([...q.statelessHosts].reverse(),q.getTimeout))}function Lz(i){let{hostsCache:o,logger:a,requester:c,requestsCache:_,responsesCache:t,timeouts:M,userAgent:N,hosts:O,queryParameters:T,headers:B}=i,H={hostsCache:o,logger:a,requester:c,requestsCache:_,responsesCache:t,timeouts:M,userAgent:N,headers:B,queryParameters:T,hosts:O.map(q=>l3(q)),read(q,ne){let m=u3(ne,H.timeouts.read),pe=()=>b5(H,H.hosts.filter(ue=>(ue.accept&F4.Read)!=0),q,m);if((m.cacheable!==void 0?m.cacheable:q.cacheable)!==!0)return pe();let ve={request:q,mappedRequestOptions:m,transporter:{queryParameters:H.queryParameters,headers:H.headers}};return H.responsesCache.get(ve,()=>H.requestsCache.get(ve,()=>H.requestsCache.set(ve,pe()).then(ue=>Promise.all([H.requestsCache.delete(ve),ue]),ue=>Promise.all([H.requestsCache.delete(ve),Promise.reject(ue)])).then(([ue,_e])=>_e)),{miss:ue=>H.responsesCache.set(ve,ue)})},write(q,ne){return b5(H,H.hosts.filter(m=>(m.accept&F4.Write)!=0),q,u3(ne,H.timeouts.write))}};return H}function Nz(i){let o={value:`Algolia for JavaScript (${i})`,add(a){let c=`; ${a.segment}${a.version!==void 0?` (${a.version})`:""}`;return o.value.indexOf(c)===-1&&(o.value=`${o.value}${c}`),o}};return o}function k5(i){try{return JSON.parse(i.content)}catch(o){throw B5(o.message,i)}}function L5({content:i,status:o},a){let c=i;try{c=JSON.parse(i).message}catch(_){}return U5(c,o,a)}function Fz(i,...o){let a=0;return i.replace(/%s/g,()=>encodeURIComponent(o[a++]))}function N5(i,o,a){let c=j5(a),_=`${i.protocol}://${i.url}/${o.charAt(0)==="/"?o.substr(1):o}`;return c.length&&(_+=`?${c}`),_}function j5(i){let o=a=>Object.prototype.toString.call(a)==="[object Object]"||Object.prototype.toString.call(a)==="[object Array]";return Object.keys(i).map(a=>Fz("%s=%s",a,o(i[a])?JSON.stringify(i[a]):i[a])).join("&")}function F5(i,o){if(i.method===R5.MethodEnum.Get||i.data===void 0&&o.data===void 0)return;let a=Array.isArray(i.data)?i.data:qt(qt({},i.data),o.data);return JSON.stringify(a)}function P5(i,o){let a=qt(qt({},i.headers),o.headers),c={};return Object.keys(a).forEach(_=>{let t=a[_];c[_.toLowerCase()]=t}),c}function s3(i){return i.map(o=>a3(o))}function a3(i){let o=i.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return Zr(qt({},i),{request:Zr(qt({},i.request),{headers:qt(qt({},i.request.headers),o)})})}function U5(i,o,a){return{name:"ApiError",message:i,status:o,transporterStackTrace:a}}function B5(i,o){return{name:"DeserializationError",message:i,response:o}}function I5(i){return{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:i}}Go.CallEnum=F4;Go.HostStatusEnum=nm;Go.createApiError=U5;Go.createDeserializationError=B5;Go.createMappedRequestOptions=u3;Go.createRetryError=I5;Go.createStatefulHost=o3;Go.createStatelessHost=l3;Go.createTransporter=Lz;Go.createUserAgent=Nz;Go.deserializeFailure=L5;Go.deserializeSuccess=k5;Go.isStatefulHostTimeouted=M5;Go.isStatefulHostUp=O5;Go.serializeData=F5;Go.serializeHeaders=P5;Go.serializeQueryParameters=j5;Go.serializeUrl=N5;Go.stackFrameWithoutCredentials=a3;Go.stackTraceWithoutCredentials=s3});var jg=Ke((KG,H5)=>{H5.exports=z5()});var q5=Ke(_2=>{"use strict";Object.defineProperty(_2,"__esModule",{value:!0});var rm=Bg(),Pz=jg(),zg=Ug(),Iz=i=>{let o=i.region||"us",a=rm.createAuth(rm.AuthMode.WithinHeaders,i.appId,i.apiKey),c=Pz.createTransporter(Zr(qt({hosts:[{url:`analytics.${o}.algolia.com`}]},i),{headers:qt(Zr(qt({},a.headers()),{"content-type":"application/json"}),i.headers),queryParameters:qt(qt({},a.queryParameters()),i.queryParameters)})),_=i.appId;return rm.addMethods({appId:_,transporter:c},i.methods)},bz=i=>(o,a)=>i.transporter.write({method:zg.MethodEnum.Post,path:"2/abtests",data:o},a),Bz=i=>(o,a)=>i.transporter.write({method:zg.MethodEnum.Delete,path:rm.encode("2/abtests/%s",o)},a),Uz=i=>(o,a)=>i.transporter.read({method:zg.MethodEnum.Get,path:rm.encode("2/abtests/%s",o)},a),jz=i=>o=>i.transporter.read({method:zg.MethodEnum.Get,path:"2/abtests"},o),zz=i=>(o,a)=>i.transporter.write({method:zg.MethodEnum.Post,path:rm.encode("2/abtests/%s/stop",o)},a);_2.addABTest=bz;_2.createAnalyticsClient=Iz;_2.deleteABTest=Bz;_2.getABTest=Uz;_2.getABTests=jz;_2.stopABTest=zz});var V5=Ke((QG,W5)=>{W5.exports=q5()});var Y5=Ke(Hg=>{"use strict";Object.defineProperty(Hg,"__esModule",{value:!0});var f3=Bg(),Hz=jg(),G5=Ug(),qz=i=>{let o=i.region||"us",a=f3.createAuth(f3.AuthMode.WithinHeaders,i.appId,i.apiKey),c=Hz.createTransporter(Zr(qt({hosts:[{url:`recommendation.${o}.algolia.com`}]},i),{headers:qt(Zr(qt({},a.headers()),{"content-type":"application/json"}),i.headers),queryParameters:qt(qt({},a.queryParameters()),i.queryParameters)}));return f3.addMethods({appId:i.appId,transporter:c},i.methods)},Wz=i=>o=>i.transporter.read({method:G5.MethodEnum.Get,path:"1/strategies/personalization"},o),Vz=i=>(o,a)=>i.transporter.write({method:G5.MethodEnum.Post,path:"1/strategies/personalization",data:o},a);Hg.createRecommendationClient=qz;Hg.getPersonalizationStrategy=Wz;Hg.setPersonalizationStrategy=Vz});var X5=Ke((ZG,K5)=>{K5.exports=Y5()});var s9=Ke(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});var Nn=Bg(),ia=jg(),Ur=Ug(),Gz=require("crypto");function P4(i){let o=a=>i.request(a).then(c=>{if(i.batch!==void 0&&i.batch(c.hits),!i.shouldStop(c))return c.cursor?o({cursor:c.cursor}):o({page:(a.page||0)+1})});return o({})}var Yz=i=>{let o=i.appId,a=Nn.createAuth(i.authMode!==void 0?i.authMode:Nn.AuthMode.WithinHeaders,o,i.apiKey),c=ia.createTransporter(Zr(qt({hosts:[{url:`${o}-dsn.algolia.net`,accept:ia.CallEnum.Read},{url:`${o}.algolia.net`,accept:ia.CallEnum.Write}].concat(Nn.shuffle([{url:`${o}-1.algolianet.com`},{url:`${o}-2.algolianet.com`},{url:`${o}-3.algolianet.com`}]))},i),{headers:qt(Zr(qt({},a.headers()),{"content-type":"application/x-www-form-urlencoded"}),i.headers),queryParameters:qt(qt({},a.queryParameters()),i.queryParameters)})),_={transporter:c,appId:o,addAlgoliaAgent(t,M){c.userAgent.add({segment:t,version:M})},clearCache(){return Promise.all([c.requestsCache.clear(),c.responsesCache.clear()]).then(()=>{})}};return Nn.addMethods(_,i.methods)};function Q5(){return{name:"MissingObjectIDError",message:"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."}}function J5(){return{name:"ObjectNotFoundError",message:"Object not found."}}function Z5(){return{name:"ValidUntilNotFoundError",message:"ValidUntil not found in given secured api key."}}var Kz=i=>(o,a)=>{let N=a||{},{queryParameters:c}=N,_=wl(N,["queryParameters"]),t=qt({acl:o},c!==void 0?{queryParameters:c}:{}),M=(O,T)=>Nn.createRetryablePromise(B=>qg(i)(O.key,T).catch(H=>{if(H.status!==404)throw H;return B()}));return Nn.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:"1/keys",data:t},_),M)},Xz=i=>(o,a,c)=>{let _=ia.createMappedRequestOptions(c);return _.queryParameters["X-Algolia-User-ID"]=o,i.transporter.write({method:Ur.MethodEnum.Post,path:"1/clusters/mapping",data:{cluster:a}},_)},Qz=i=>(o,a,c)=>i.transporter.write({method:Ur.MethodEnum.Post,path:"1/clusters/mapping/batch",data:{users:o,cluster:a}},c),I4=i=>(o,a,c)=>{let _=(t,M)=>Wg(i)(o,{methods:{waitTask:x0}}).waitTask(t.taskID,M);return Nn.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Nn.encode("1/indexes/%s/operation",o),data:{operation:"copy",destination:a}},c),_)},Jz=i=>(o,a,c)=>I4(i)(o,a,Zr(qt({},c),{scope:[b4.Rules]})),Zz=i=>(o,a,c)=>I4(i)(o,a,Zr(qt({},c),{scope:[b4.Settings]})),$z=i=>(o,a,c)=>I4(i)(o,a,Zr(qt({},c),{scope:[b4.Synonyms]})),eH=i=>(o,a)=>{let c=(_,t)=>Nn.createRetryablePromise(M=>qg(i)(o,t).then(M).catch(N=>{if(N.status!==404)throw N}));return Nn.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Delete,path:Nn.encode("1/keys/%s",o)},a),c)},tH=()=>(i,o)=>{let a=ia.serializeQueryParameters(o),c=Gz.createHmac("sha256",i).update(a).digest("hex");return Buffer.from(c+a).toString("base64")},qg=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Get,path:Nn.encode("1/keys/%s",o)},a),nH=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:"1/logs"},o),rH=()=>i=>{let o=Buffer.from(i,"base64").toString("ascii"),a=/validUntil=(\d+)/,c=o.match(a);if(c===null)throw Z5();return parseInt(c[1],10)-Math.round(new Date().getTime()/1e3)},iH=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:"1/clusters/mapping/top"},o),uH=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Get,path:Nn.encode("1/clusters/mapping/%s",o)},a),oH=i=>o=>{let _=o||{},{retrieveMappings:a}=_,c=wl(_,["retrieveMappings"]);return a===!0&&(c.getClusters=!0),i.transporter.read({method:Ur.MethodEnum.Get,path:"1/clusters/mapping/pending"},c)},Wg=i=>(o,a={})=>{let c={transporter:i.transporter,appId:i.appId,indexName:o};return Nn.addMethods(c,a.methods)},lH=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:"1/keys"},o),sH=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:"1/clusters"},o),aH=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:"1/indexes"},o),fH=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:"1/clusters/mapping"},o),cH=i=>(o,a,c)=>{let _=(t,M)=>Wg(i)(o,{methods:{waitTask:x0}}).waitTask(t.taskID,M);return Nn.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Nn.encode("1/indexes/%s/operation",o),data:{operation:"move",destination:a}},c),_)},dH=i=>(o,a)=>{let c=(_,t)=>Promise.all(Object.keys(_.taskID).map(M=>Wg(i)(M,{methods:{waitTask:x0}}).waitTask(_.taskID[M],t)));return Nn.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:"1/indexes/*/batch",data:{requests:o}},a),c)},pH=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:o}},a),hH=i=>(o,a)=>{let c=o.map(_=>Zr(qt({},_),{params:ia.serializeQueryParameters(_.params||{})}));return i.transporter.read({method:Ur.MethodEnum.Post,path:"1/indexes/*/queries",data:{requests:c},cacheable:!0},a)},vH=i=>(o,a)=>Promise.all(o.map(c=>{let N=c.params,{facetName:_,facetQuery:t}=N,M=wl(N,["facetName","facetQuery"]);return Wg(i)(c.indexName,{methods:{searchForFacetValues:$5}}).searchForFacetValues(_,t,qt(qt({},a),M))})),mH=i=>(o,a)=>{let c=ia.createMappedRequestOptions(a);return c.queryParameters["X-Algolia-User-ID"]=o,i.transporter.write({method:Ur.MethodEnum.Delete,path:"1/clusters/mapping"},c)},yH=i=>(o,a)=>{let c=(_,t)=>Nn.createRetryablePromise(M=>qg(i)(o,t).catch(N=>{if(N.status!==404)throw N;return M()}));return Nn.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Nn.encode("1/keys/%s/restore",o)},a),c)},gH=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Post,path:"1/clusters/mapping/search",data:{query:o}},a),_H=i=>(o,a)=>{let c=Object.assign({},a),B=a||{},{queryParameters:_}=B,t=wl(B,["queryParameters"]),M=_?{queryParameters:_}:{},N=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"],O=H=>Object.keys(c).filter(q=>N.indexOf(q)!==-1).every(q=>H[q]===c[q]),T=(H,q)=>Nn.createRetryablePromise(ne=>qg(i)(o,q).then(m=>O(m)?Promise.resolve():ne()));return Nn.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Put,path:Nn.encode("1/keys/%s",o),data:M},t),T)},e9=i=>(o,a)=>{let c=(_,t)=>x0(i)(_.taskID,t);return Nn.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Nn.encode("1/indexes/%s/batch",i.indexName),data:{requests:o}},a),c)},EH=i=>o=>P4(Zr(qt({},o),{shouldStop:a=>a.cursor===void 0,request:a=>i.transporter.read({method:Ur.MethodEnum.Post,path:Nn.encode("1/indexes/%s/browse",i.indexName),data:a},o)})),DH=i=>o=>{let a=qt({hitsPerPage:1e3},o);return P4(Zr(qt({},a),{shouldStop:c=>c.hits.lengthZr(qt({},_),{hits:_.hits.map(t=>(delete t._highlightResult,t))}))}}))},wH=i=>o=>{let a=qt({hitsPerPage:1e3},o);return P4(Zr(qt({},a),{shouldStop:c=>c.hits.lengthZr(qt({},_),{hits:_.hits.map(t=>(delete t._highlightResult,t))}))}}))},B4=i=>(o,a,c)=>{let O=c||{},{batchSize:_}=O,t=wl(O,["batchSize"]),M={taskIDs:[],objectIDs:[]},N=(T=0)=>{let B=[],H;for(H=T;H({action:a,body:q})),t).then(q=>(M.objectIDs=M.objectIDs.concat(q.objectIDs),M.taskIDs.push(q.taskID),H++,N(H)))};return Nn.createWaitablePromise(N(),(T,B)=>Promise.all(T.taskIDs.map(H=>x0(i)(H,B))))},SH=i=>o=>Nn.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Nn.encode("1/indexes/%s/clear",i.indexName)},o),(a,c)=>x0(i)(a.taskID,c)),TH=i=>o=>{let t=o||{},{forwardToReplicas:a}=t,c=wl(t,["forwardToReplicas"]),_=ia.createMappedRequestOptions(c);return a&&(_.queryParameters.forwardToReplicas=1),Nn.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Nn.encode("1/indexes/%s/rules/clear",i.indexName)},_),(M,N)=>x0(i)(M.taskID,N))},CH=i=>o=>{let t=o||{},{forwardToReplicas:a}=t,c=wl(t,["forwardToReplicas"]),_=ia.createMappedRequestOptions(c);return a&&(_.queryParameters.forwardToReplicas=1),Nn.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Nn.encode("1/indexes/%s/synonyms/clear",i.indexName)},_),(M,N)=>x0(i)(M.taskID,N))},xH=i=>(o,a)=>Nn.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Nn.encode("1/indexes/%s/deleteByQuery",i.indexName),data:o},a),(c,_)=>x0(i)(c.taskID,_)),RH=i=>o=>Nn.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Delete,path:Nn.encode("1/indexes/%s",i.indexName)},o),(a,c)=>x0(i)(a.taskID,c)),AH=i=>(o,a)=>Nn.createWaitablePromise(r9(i)([o],a).then(c=>({taskID:c.taskIDs[0]})),(c,_)=>x0(i)(c.taskID,_)),r9=i=>(o,a)=>{let c=o.map(_=>({objectID:_}));return B4(i)(c,fh.DeleteObject,a)},OH=i=>(o,a)=>{let M=a||{},{forwardToReplicas:c}=M,_=wl(M,["forwardToReplicas"]),t=ia.createMappedRequestOptions(_);return c&&(t.queryParameters.forwardToReplicas=1),Nn.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Delete,path:Nn.encode("1/indexes/%s/rules/%s",i.indexName,o)},t),(N,O)=>x0(i)(N.taskID,O))},MH=i=>(o,a)=>{let M=a||{},{forwardToReplicas:c}=M,_=wl(M,["forwardToReplicas"]),t=ia.createMappedRequestOptions(_);return c&&(t.queryParameters.forwardToReplicas=1),Nn.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Delete,path:Nn.encode("1/indexes/%s/synonyms/%s",i.indexName,o)},t),(N,O)=>x0(i)(N.taskID,O))},kH=i=>o=>i9(i)(o).then(()=>!0).catch(a=>{if(a.status!==404)throw a;return!1}),LH=i=>(o,a)=>{let O=a||{},{query:c,paginate:_}=O,t=wl(O,["query","paginate"]),M=0,N=()=>u9(i)(c||"",Zr(qt({},t),{page:M})).then(T=>{for(let[B,H]of Object.entries(T.hits))if(o(H))return{object:H,position:parseInt(B,10),page:M};if(M++,_===!1||M>=T.nbPages)throw J5();return N()});return N()},NH=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Get,path:Nn.encode("1/indexes/%s/%s",i.indexName,o)},a),FH=()=>(i,o)=>{for(let[a,c]of Object.entries(i.hits))if(c.objectID===o)return parseInt(a,10);return-1},PH=i=>(o,a)=>{let M=a||{},{attributesToRetrieve:c}=M,_=wl(M,["attributesToRetrieve"]),t=o.map(N=>qt({indexName:i.indexName,objectID:N},c?{attributesToRetrieve:c}:{}));return i.transporter.read({method:Ur.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:t}},_)},IH=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Get,path:Nn.encode("1/indexes/%s/rules/%s",i.indexName,o)},a),i9=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:Nn.encode("1/indexes/%s/settings",i.indexName),data:{getVersion:2}},o),bH=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Get,path:Nn.encode("1/indexes/%s/synonyms/%s",i.indexName,o)},a),o9=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Get,path:Nn.encode("1/indexes/%s/task/%s",i.indexName,o.toString())},a),BH=i=>(o,a)=>Nn.createWaitablePromise(l9(i)([o],a).then(c=>({objectID:c.objectIDs[0],taskID:c.taskIDs[0]})),(c,_)=>x0(i)(c.taskID,_)),l9=i=>(o,a)=>{let M=a||{},{createIfNotExists:c}=M,_=wl(M,["createIfNotExists"]),t=c?fh.PartialUpdateObject:fh.PartialUpdateObjectNoCreate;return B4(i)(o,t,_)},UH=i=>(o,a)=>{let m=a||{},{safe:c,autoGenerateObjectIDIfNotExist:_,batchSize:t}=m,M=wl(m,["safe","autoGenerateObjectIDIfNotExist","batchSize"]),N=(pe,ge,ve,ue)=>Nn.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Nn.encode("1/indexes/%s/operation",pe),data:{operation:ve,destination:ge}},ue),(_e,ce)=>x0(i)(_e.taskID,ce)),O=Math.random().toString(36).substring(7),T=`${i.indexName}_tmp_${O}`,B=c3({appId:i.appId,transporter:i.transporter,indexName:T}),H=[],q=N(i.indexName,T,"copy",Zr(qt({},M),{scope:["settings","synonyms","rules"]}));H.push(q);let ne=(c?q.wait(M):q).then(()=>{let pe=B(o,Zr(qt({},M),{autoGenerateObjectIDIfNotExist:_,batchSize:t}));return H.push(pe),c?pe.wait(M):pe}).then(()=>{let pe=N(T,i.indexName,"move",M);return H.push(pe),c?pe.wait(M):pe}).then(()=>Promise.all(H)).then(([pe,ge,ve])=>({objectIDs:ge.objectIDs,taskIDs:[pe.taskID,...ge.taskIDs,ve.taskID]}));return Nn.createWaitablePromise(ne,(pe,ge)=>Promise.all(H.map(ve=>ve.wait(ge))))},jH=i=>(o,a)=>d3(i)(o,Zr(qt({},a),{clearExistingRules:!0})),zH=i=>(o,a)=>p3(i)(o,Zr(qt({},a),{replaceExistingSynonyms:!0})),HH=i=>(o,a)=>Nn.createWaitablePromise(c3(i)([o],a).then(c=>({objectID:c.objectIDs[0],taskID:c.taskIDs[0]})),(c,_)=>x0(i)(c.taskID,_)),c3=i=>(o,a)=>{let M=a||{},{autoGenerateObjectIDIfNotExist:c}=M,_=wl(M,["autoGenerateObjectIDIfNotExist"]),t=c?fh.AddObject:fh.UpdateObject;if(t===fh.UpdateObject){for(let N of o)if(N.objectID===void 0)return Nn.createWaitablePromise(Promise.reject(Q5()))}return B4(i)(o,t,_)},qH=i=>(o,a)=>d3(i)([o],a),d3=i=>(o,a)=>{let N=a||{},{forwardToReplicas:c,clearExistingRules:_}=N,t=wl(N,["forwardToReplicas","clearExistingRules"]),M=ia.createMappedRequestOptions(t);return c&&(M.queryParameters.forwardToReplicas=1),_&&(M.queryParameters.clearExistingRules=1),Nn.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Nn.encode("1/indexes/%s/rules/batch",i.indexName),data:o},M),(O,T)=>x0(i)(O.taskID,T))},WH=i=>(o,a)=>p3(i)([o],a),p3=i=>(o,a)=>{let N=a||{},{forwardToReplicas:c,replaceExistingSynonyms:_}=N,t=wl(N,["forwardToReplicas","replaceExistingSynonyms"]),M=ia.createMappedRequestOptions(t);return c&&(M.queryParameters.forwardToReplicas=1),_&&(M.queryParameters.replaceExistingSynonyms=1),Nn.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Nn.encode("1/indexes/%s/synonyms/batch",i.indexName),data:o},M),(O,T)=>x0(i)(O.taskID,T))},u9=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Post,path:Nn.encode("1/indexes/%s/query",i.indexName),data:{query:o},cacheable:!0},a),$5=i=>(o,a,c)=>i.transporter.read({method:Ur.MethodEnum.Post,path:Nn.encode("1/indexes/%s/facets/%s/query",i.indexName,o),data:{facetQuery:a},cacheable:!0},c),t9=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Post,path:Nn.encode("1/indexes/%s/rules/search",i.indexName),data:{query:o}},a),n9=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Post,path:Nn.encode("1/indexes/%s/synonyms/search",i.indexName),data:{query:o}},a),VH=i=>(o,a)=>{let M=a||{},{forwardToReplicas:c}=M,_=wl(M,["forwardToReplicas"]),t=ia.createMappedRequestOptions(_);return c&&(t.queryParameters.forwardToReplicas=1),Nn.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Put,path:Nn.encode("1/indexes/%s/settings",i.indexName),data:o},t),(N,O)=>x0(i)(N.taskID,O))},x0=i=>(o,a)=>Nn.createRetryablePromise(c=>o9(i)(o,a).then(_=>_.status!=="published"?c():void 0)),GH={AddObject:"addObject",Analytics:"analytics",Browser:"browse",DeleteIndex:"deleteIndex",DeleteObject:"deleteObject",EditSettings:"editSettings",ListIndexes:"listIndexes",Logs:"logs",Recommendation:"recommendation",Search:"search",SeeUnretrievableAttributes:"seeUnretrievableAttributes",Settings:"settings",Usage:"usage"},fh={AddObject:"addObject",UpdateObject:"updateObject",PartialUpdateObject:"partialUpdateObject",PartialUpdateObjectNoCreate:"partialUpdateObjectNoCreate",DeleteObject:"deleteObject"},b4={Settings:"settings",Synonyms:"synonyms",Rules:"rules"},YH={None:"none",StopIfEnoughMatches:"stopIfEnoughMatches"},KH={Synonym:"synonym",OneWaySynonym:"oneWaySynonym",AltCorrection1:"altCorrection1",AltCorrection2:"altCorrection2",Placeholder:"placeholder"};tn.ApiKeyACLEnum=GH;tn.BatchActionEnum=fh;tn.ScopeEnum=b4;tn.StrategyEnum=YH;tn.SynonymEnum=KH;tn.addApiKey=Kz;tn.assignUserID=Xz;tn.assignUserIDs=Qz;tn.batch=e9;tn.browseObjects=EH;tn.browseRules=DH;tn.browseSynonyms=wH;tn.chunkedBatch=B4;tn.clearObjects=SH;tn.clearRules=TH;tn.clearSynonyms=CH;tn.copyIndex=I4;tn.copyRules=Jz;tn.copySettings=Zz;tn.copySynonyms=$z;tn.createBrowsablePromise=P4;tn.createMissingObjectIDError=Q5;tn.createObjectNotFoundError=J5;tn.createSearchClient=Yz;tn.createValidUntilNotFoundError=Z5;tn.deleteApiKey=eH;tn.deleteBy=xH;tn.deleteIndex=RH;tn.deleteObject=AH;tn.deleteObjects=r9;tn.deleteRule=OH;tn.deleteSynonym=MH;tn.exists=kH;tn.findObject=LH;tn.generateSecuredApiKey=tH;tn.getApiKey=qg;tn.getLogs=nH;tn.getObject=NH;tn.getObjectPosition=FH;tn.getObjects=PH;tn.getRule=IH;tn.getSecuredApiKeyRemainingValidity=rH;tn.getSettings=i9;tn.getSynonym=bH;tn.getTask=o9;tn.getTopUserIDs=iH;tn.getUserID=uH;tn.hasPendingMappings=oH;tn.initIndex=Wg;tn.listApiKeys=lH;tn.listClusters=sH;tn.listIndices=aH;tn.listUserIDs=fH;tn.moveIndex=cH;tn.multipleBatch=dH;tn.multipleGetObjects=pH;tn.multipleQueries=hH;tn.multipleSearchForFacetValues=vH;tn.partialUpdateObject=BH;tn.partialUpdateObjects=l9;tn.removeUserID=mH;tn.replaceAllObjects=UH;tn.replaceAllRules=jH;tn.replaceAllSynonyms=zH;tn.restoreApiKey=yH;tn.saveObject=HH;tn.saveObjects=c3;tn.saveRule=qH;tn.saveRules=d3;tn.saveSynonym=WH;tn.saveSynonyms=p3;tn.search=u9;tn.searchForFacetValues=$5;tn.searchRules=t9;tn.searchSynonyms=n9;tn.searchUserIDs=gH;tn.setSettings=VH;tn.updateApiKey=_H;tn.waitTask=x0});var f9=Ke((eY,a9)=>{a9.exports=s9()});var c9=Ke(U4=>{"use strict";Object.defineProperty(U4,"__esModule",{value:!0});function XH(){return{debug(i,o){return Promise.resolve()},info(i,o){return Promise.resolve()},error(i,o){return Promise.resolve()}}}var QH={Debug:1,Info:2,Error:3};U4.LogLevelEnum=QH;U4.createNullLogger=XH});var p9=Ke((nY,d9)=>{d9.exports=c9()});var m9=Ke(h3=>{"use strict";Object.defineProperty(h3,"__esModule",{value:!0});var h9=require("http"),v9=require("https"),JH=require("url");function ZH(){let i={keepAlive:!0},o=new h9.Agent(i),a=new v9.Agent(i);return{send(c){return new Promise(_=>{let t=JH.parse(c.url),M=t.query===null?t.pathname:`${t.pathname}?${t.query}`,N=qt({agent:t.protocol==="https:"?a:o,hostname:t.hostname,path:M,method:c.method,headers:c.headers},t.port!==void 0?{port:t.port||""}:{}),O=(t.protocol==="https:"?v9:h9).request(N,q=>{let ne="";q.on("data",m=>ne+=m),q.on("end",()=>{clearTimeout(B),clearTimeout(H),_({status:q.statusCode||0,content:ne,isTimedOut:!1})})}),T=(q,ne)=>setTimeout(()=>{O.abort(),_({status:0,content:ne,isTimedOut:!0})},q*1e3),B=T(c.connectTimeout,"Connection timeout"),H;O.on("error",q=>{clearTimeout(B),clearTimeout(H),_({status:0,content:q.message,isTimedOut:!1})}),O.once("response",()=>{clearTimeout(B),H=T(c.responseTimeout,"Socket timeout")}),c.data!==void 0&&O.write(c.data),O.end()})},destroy(){return o.destroy(),a.destroy(),Promise.resolve()}}}h3.createNodeHttpRequester=ZH});var g9=Ke((iY,y9)=>{y9.exports=m9()});var w9=Ke((uY,_9)=>{"use strict";var E9=g5(),$H=D5(),im=V5(),v3=Bg(),m3=X5(),wn=f9(),eq=p9(),tq=g9(),nq=jg();function D9(i,o,a){let c={appId:i,apiKey:o,timeouts:{connect:2,read:5,write:30},requester:tq.createNodeHttpRequester(),logger:eq.createNullLogger(),responsesCache:E9.createNullCache(),requestsCache:E9.createNullCache(),hostsCache:$H.createInMemoryCache(),userAgent:nq.createUserAgent(v3.version).add({segment:"Node.js",version:process.versions.node})};return wn.createSearchClient(Zr(qt(qt({},c),a),{methods:{search:wn.multipleQueries,searchForFacetValues:wn.multipleSearchForFacetValues,multipleBatch:wn.multipleBatch,multipleGetObjects:wn.multipleGetObjects,multipleQueries:wn.multipleQueries,copyIndex:wn.copyIndex,copySettings:wn.copySettings,copyRules:wn.copyRules,copySynonyms:wn.copySynonyms,moveIndex:wn.moveIndex,listIndices:wn.listIndices,getLogs:wn.getLogs,listClusters:wn.listClusters,multipleSearchForFacetValues:wn.multipleSearchForFacetValues,getApiKey:wn.getApiKey,addApiKey:wn.addApiKey,listApiKeys:wn.listApiKeys,updateApiKey:wn.updateApiKey,deleteApiKey:wn.deleteApiKey,restoreApiKey:wn.restoreApiKey,assignUserID:wn.assignUserID,assignUserIDs:wn.assignUserIDs,getUserID:wn.getUserID,searchUserIDs:wn.searchUserIDs,listUserIDs:wn.listUserIDs,getTopUserIDs:wn.getTopUserIDs,removeUserID:wn.removeUserID,hasPendingMappings:wn.hasPendingMappings,generateSecuredApiKey:wn.generateSecuredApiKey,getSecuredApiKeyRemainingValidity:wn.getSecuredApiKeyRemainingValidity,destroy:v3.destroy,initIndex:_=>t=>wn.initIndex(_)(t,{methods:{batch:wn.batch,delete:wn.deleteIndex,getObject:wn.getObject,getObjects:wn.getObjects,saveObject:wn.saveObject,saveObjects:wn.saveObjects,search:wn.search,searchForFacetValues:wn.searchForFacetValues,waitTask:wn.waitTask,setSettings:wn.setSettings,getSettings:wn.getSettings,partialUpdateObject:wn.partialUpdateObject,partialUpdateObjects:wn.partialUpdateObjects,deleteObject:wn.deleteObject,deleteObjects:wn.deleteObjects,deleteBy:wn.deleteBy,clearObjects:wn.clearObjects,browseObjects:wn.browseObjects,getObjectPosition:wn.getObjectPosition,findObject:wn.findObject,exists:wn.exists,saveSynonym:wn.saveSynonym,saveSynonyms:wn.saveSynonyms,getSynonym:wn.getSynonym,searchSynonyms:wn.searchSynonyms,browseSynonyms:wn.browseSynonyms,deleteSynonym:wn.deleteSynonym,clearSynonyms:wn.clearSynonyms,replaceAllObjects:wn.replaceAllObjects,replaceAllSynonyms:wn.replaceAllSynonyms,searchRules:wn.searchRules,getRule:wn.getRule,deleteRule:wn.deleteRule,saveRule:wn.saveRule,saveRules:wn.saveRules,replaceAllRules:wn.replaceAllRules,browseRules:wn.browseRules,clearRules:wn.clearRules}}),initAnalytics:()=>_=>im.createAnalyticsClient(Zr(qt(qt({},c),_),{methods:{addABTest:im.addABTest,getABTest:im.getABTest,getABTests:im.getABTests,stopABTest:im.stopABTest,deleteABTest:im.deleteABTest}})),initRecommendation:()=>_=>m3.createRecommendationClient(Zr(qt(qt({},c),_),{methods:{getPersonalizationStrategy:m3.getPersonalizationStrategy,setPersonalizationStrategy:m3.setPersonalizationStrategy}}))}}))}D9.version=v3.version;_9.exports=D9});var T9=Ke((oY,y3)=>{var S9=w9();y3.exports=S9;y3.exports.default=S9});var nd=Ke(E3=>{"use strict";Object.defineProperty(E3,"__esModule",{value:!0});E3.default=N9;function N9(){}N9.prototype={diff:function(o,a){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},_=c.callback;typeof c=="function"&&(_=c,c={}),this.options=c;var t=this;function M(pe){return _?(setTimeout(function(){_(void 0,pe)},0),!0):pe}o=this.castInput(o),a=this.castInput(a),o=this.removeEmpty(this.tokenize(o)),a=this.removeEmpty(this.tokenize(a));var N=a.length,O=o.length,T=1,B=N+O,H=[{newPos:-1,components:[]}],q=this.extractCommon(H[0],a,o,0);if(H[0].newPos+1>=N&&q+1>=O)return M([{value:this.join(a),count:a.length}]);function ne(){for(var pe=-1*T;pe<=T;pe+=2){var ge=void 0,ve=H[pe-1],ue=H[pe+1],_e=(ue?ue.newPos:0)-pe;ve&&(H[pe-1]=void 0);var ce=ve&&ve.newPos+1=N&&_e+1>=O)return M(iq(t,ge.components,a,o,t.useLongestToken));H[pe]=ge}T++}if(_)(function pe(){setTimeout(function(){if(T>B)return _();ne()||pe()},0)})();else for(;T<=B;){var m=ne();if(m)return m}},pushComponent:function(o,a,c){var _=o[o.length-1];_&&_.added===a&&_.removed===c?o[o.length-1]={count:_.count+1,added:a,removed:c}:o.push({count:1,added:a,removed:c})},extractCommon:function(o,a,c,_){for(var t=a.length,M=c.length,N=o.newPos,O=N-_,T=0;N+1ne.length?pe:ne}),T.value=i.join(B)}else T.value=i.join(a.slice(N,N+T.count));N+=T.count,T.added||(O+=T.count)}}var q=o[M-1];return M>1&&typeof q.value=="string"&&(q.added||q.removed)&&i.equals("",q.value)&&(o[M-2].value+=q.value,o.pop()),o}function uq(i){return{newPos:i.newPos,components:i.components.slice(0)}}});var P9=Ke(Kg=>{"use strict";Object.defineProperty(Kg,"__esModule",{value:!0});Kg.diffChars=oq;Kg.characterDiff=void 0;var sq=lq(nd());function lq(i){return i&&i.__esModule?i:{default:i}}var F9=new sq.default;Kg.characterDiff=F9;function oq(i,o,a){return F9.diff(i,o,a)}});var w3=Ke(D3=>{"use strict";Object.defineProperty(D3,"__esModule",{value:!0});D3.generateOptions=aq;function aq(i,o){if(typeof i=="function")o.callback=i;else if(i)for(var a in i)i.hasOwnProperty(a)&&(o[a]=i[a]);return o}});var B9=Ke(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});um.diffWords=fq;um.diffWordsWithSpace=cq;um.wordDiff=void 0;var pq=dq(nd()),hq=w3();function dq(i){return i&&i.__esModule?i:{default:i}}var I9=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,b9=/\S/,Xg=new pq.default;um.wordDiff=Xg;Xg.equals=function(i,o){return this.options.ignoreCase&&(i=i.toLowerCase(),o=o.toLowerCase()),i===o||this.options.ignoreWhitespace&&!b9.test(i)&&!b9.test(o)};Xg.tokenize=function(i){for(var o=i.split(/(\s+|[()[\]{}'"]|\b)/),a=0;a{"use strict";Object.defineProperty(om,"__esModule",{value:!0});om.diffLines=vq;om.diffTrimmedLines=mq;om.lineDiff=void 0;var gq=yq(nd()),_q=w3();function yq(i){return i&&i.__esModule?i:{default:i}}var z4=new gq.default;om.lineDiff=z4;z4.tokenize=function(i){var o=[],a=i.split(/(\n|\r\n)/);a[a.length-1]||a.pop();for(var c=0;c{"use strict";Object.defineProperty(Qg,"__esModule",{value:!0});Qg.diffSentences=Eq;Qg.sentenceDiff=void 0;var wq=Dq(nd());function Dq(i){return i&&i.__esModule?i:{default:i}}var S3=new wq.default;Qg.sentenceDiff=S3;S3.tokenize=function(i){return i.split(/(\S.+?[.!?])(?=\s+|$)/)};function Eq(i,o,a){return S3.diff(i,o,a)}});var j9=Ke(Jg=>{"use strict";Object.defineProperty(Jg,"__esModule",{value:!0});Jg.diffCss=Sq;Jg.cssDiff=void 0;var Cq=Tq(nd());function Tq(i){return i&&i.__esModule?i:{default:i}}var T3=new Cq.default;Jg.cssDiff=T3;T3.tokenize=function(i){return i.split(/([{}:;,]|\s+)/)};function Sq(i,o,a){return T3.diff(i,o,a)}});var H9=Ke(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});lm.diffJson=xq;lm.canonicalize=q4;lm.jsonDiff=void 0;var z9=Rq(nd()),Aq=H4();function Rq(i){return i&&i.__esModule?i:{default:i}}function W4(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?W4=function(a){return typeof a}:W4=function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},W4(i)}var Oq=Object.prototype.toString,dh=new z9.default;lm.jsonDiff=dh;dh.useLongestToken=!0;dh.tokenize=Aq.lineDiff.tokenize;dh.castInput=function(i){var o=this.options,a=o.undefinedReplacement,c=o.stringifyReplacer,_=c===void 0?function(t,M){return typeof M=="undefined"?a:M}:c;return typeof i=="string"?i:JSON.stringify(q4(i,null,null,_),_," ")};dh.equals=function(i,o){return z9.default.prototype.equals.call(dh,i.replace(/,([\r\n])/g,"$1"),o.replace(/,([\r\n])/g,"$1"))};function xq(i,o,a){return dh.diff(i,o,a)}function q4(i,o,a,c,_){o=o||[],a=a||[],c&&(i=c(_,i));var t;for(t=0;t{"use strict";Object.defineProperty(Zg,"__esModule",{value:!0});Zg.diffArrays=Mq;Zg.arrayDiff=void 0;var Lq=kq(nd());function kq(i){return i&&i.__esModule?i:{default:i}}var $g=new Lq.default;Zg.arrayDiff=$g;$g.tokenize=function(i){return i.slice()};$g.join=$g.removeEmpty=function(i){return i};function Mq(i,o,a){return $g.diff(i,o,a)}});var V4=Ke(C3=>{"use strict";Object.defineProperty(C3,"__esModule",{value:!0});C3.parsePatch=Nq;function Nq(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=i.split(/\r\n|[\n\v\f\r\x85]/),c=i.match(/\r\n|[\n\v\f\r\x85]/g)||[],_=[],t=0;function M(){var T={};for(_.push(T);t{"use strict";Object.defineProperty(x3,"__esModule",{value:!0});x3.default=Fq;function Fq(i,o,a){var c=!0,_=!1,t=!1,M=1;return function N(){if(c&&!t){if(_?M++:c=!1,i+M<=a)return M;t=!0}if(!_)return t||(c=!0),o<=i-M?-M++:(_=!0,N())}}});var Y9=Ke(G4=>{"use strict";Object.defineProperty(G4,"__esModule",{value:!0});G4.applyPatch=V9;G4.applyPatches=Pq;var G9=V4(),bq=Iq(W9());function Iq(i){return i&&i.__esModule?i:{default:i}}function V9(i,o){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof o=="string"&&(o=(0,G9.parsePatch)(o)),Array.isArray(o)){if(o.length>1)throw new Error("applyPatch only works with a single input.");o=o[0]}var c=i.split(/\r\n|[\n\v\f\r\x85]/),_=i.match(/\r\n|[\n\v\f\r\x85]/g)||[],t=o.hunks,M=a.compareLine||function(kt,zt,nt,X){return zt===X},N=0,O=a.fuzzFactor||0,T=0,B=0,H,q;function ne(kt,zt){for(var nt=0;nt0?X[0]:" ",xe=X.length>0?X.substr(1):X;if(fe===" "||fe==="-"){if(!M(zt+1,c[zt],fe,xe)&&(N++,N>O))return!1;zt++}}return!0}for(var m=0;m0?je[0]:" ",pt=je.length>0?je.substr(1):je,Xe=re.linedelimiters[Ie];if(ct===" ")we++;else if(ct==="-")c.splice(we,1),_.splice(we,1);else if(ct==="+")c.splice(we,0,pt),_.splice(we,0,Xe),we++;else if(ct==="\\"){var tt=re.lines[Ie-1]?re.lines[Ie-1][0]:null;tt==="+"?H=!0:tt==="-"&&(q=!0)}}}if(H)for(;!c[c.length-1];)c.pop(),_.pop();else q&&(c.push(""),_.push(` +`));for(var He=0;He{"use strict";Object.defineProperty(e_,"__esModule",{value:!0});e_.structuredPatch=K9;e_.createTwoFilesPatch=X9;e_.createPatch=Bq;var Uq=H4();function R3(i){return Hq(i)||zq(i)||jq()}function jq(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function zq(i){if(Symbol.iterator in Object(i)||Object.prototype.toString.call(i)==="[object Arguments]")return Array.from(i)}function Hq(i){if(Array.isArray(i)){for(var o=0,a=new Array(i.length);o0?O(re.lines.slice(-M.context)):[],B-=q.length,H-=q.length)}(me=q).push.apply(me,R3(ce.map(function(He){return(_e.added?"+":"-")+He}))),_e.added?m+=ce.length:ne+=ce.length}else{if(B)if(ce.length<=M.context*2&&ue=N.length-2&&ce.length<=M.context){var pt=/\n$/.test(a),Xe=/\n$/.test(c),tt=ce.length==0&&q.length>ct.oldLines;!pt&&tt&&q.splice(ct.oldLines,0,"\\ No newline at end of file"),(!pt&&!tt||!Xe)&&q.push("\\ No newline at end of file")}T.push(ct),B=0,H=0,q=[]}ne+=ce.length,m+=ce.length}},ge=0;ge{"use strict";Object.defineProperty(Y4,"__esModule",{value:!0});Y4.arrayEqual=qq;Y4.arrayStartsWith=Q9;function qq(i,o){return i.length!==o.length?!1:Q9(i,o)}function Q9(i,o){if(o.length>i.length)return!1;for(var a=0;a{"use strict";Object.defineProperty(K4,"__esModule",{value:!0});K4.calcLineCount=Z9;K4.merge=Wq;var Vq=A3(),Gq=V4(),O3=J9();function sm(i){return Xq(i)||Kq(i)||Yq()}function Yq(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function Kq(i){if(Symbol.iterator in Object(i)||Object.prototype.toString.call(i)==="[object Arguments]")return Array.from(i)}function Xq(i){if(Array.isArray(i)){for(var o=0,a=new Array(i.length);o{"use strict";Object.defineProperty(L3,"__esModule",{value:!0});L3.convertChangesToDMP=$q;function $q(i){for(var o=[],a,c,_=0;_{"use strict";Object.defineProperty(N3,"__esModule",{value:!0});N3.convertChangesToXML=eW;function eW(i){for(var o=[],a=0;a"):c.removed&&o.push(""),o.push(tW(c.value)),c.added?o.push(""):c.removed&&o.push("")}return o.join("")}function tW(i){var o=i;return o=o.replace(/&/g,"&"),o=o.replace(//g,">"),o=o.replace(/"/g,"""),o}});var vR=Ke(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Object.defineProperty(Yo,"Diff",{enumerable:!0,get:function(){return nW.default}});Object.defineProperty(Yo,"diffChars",{enumerable:!0,get:function(){return rW.diffChars}});Object.defineProperty(Yo,"diffWords",{enumerable:!0,get:function(){return cR.diffWords}});Object.defineProperty(Yo,"diffWordsWithSpace",{enumerable:!0,get:function(){return cR.diffWordsWithSpace}});Object.defineProperty(Yo,"diffLines",{enumerable:!0,get:function(){return dR.diffLines}});Object.defineProperty(Yo,"diffTrimmedLines",{enumerable:!0,get:function(){return dR.diffTrimmedLines}});Object.defineProperty(Yo,"diffSentences",{enumerable:!0,get:function(){return iW.diffSentences}});Object.defineProperty(Yo,"diffCss",{enumerable:!0,get:function(){return uW.diffCss}});Object.defineProperty(Yo,"diffJson",{enumerable:!0,get:function(){return pR.diffJson}});Object.defineProperty(Yo,"canonicalize",{enumerable:!0,get:function(){return pR.canonicalize}});Object.defineProperty(Yo,"diffArrays",{enumerable:!0,get:function(){return oW.diffArrays}});Object.defineProperty(Yo,"applyPatch",{enumerable:!0,get:function(){return hR.applyPatch}});Object.defineProperty(Yo,"applyPatches",{enumerable:!0,get:function(){return hR.applyPatches}});Object.defineProperty(Yo,"parsePatch",{enumerable:!0,get:function(){return lW.parsePatch}});Object.defineProperty(Yo,"merge",{enumerable:!0,get:function(){return sW.merge}});Object.defineProperty(Yo,"structuredPatch",{enumerable:!0,get:function(){return F3.structuredPatch}});Object.defineProperty(Yo,"createTwoFilesPatch",{enumerable:!0,get:function(){return F3.createTwoFilesPatch}});Object.defineProperty(Yo,"createPatch",{enumerable:!0,get:function(){return F3.createPatch}});Object.defineProperty(Yo,"convertChangesToDMP",{enumerable:!0,get:function(){return aW.convertChangesToDMP}});Object.defineProperty(Yo,"convertChangesToXML",{enumerable:!0,get:function(){return fW.convertChangesToXML}});var nW=cW(nd()),rW=P9(),cR=B9(),dR=H4(),iW=U9(),uW=j9(),pR=H9(),oW=q9(),hR=Y9(),lW=V4(),sW=sR(),F3=A3(),aW=aR(),fW=fR();function cW(i){return i&&i.__esModule?i:{default:i}}});var dW={};oI(dW,{default:()=>hW});var x9=ou(require("@yarnpkg/cli")),ch=ou(require("@yarnpkg/core"));var u5=ou(sc()),lh=ou(Mi()),C4=(0,lh.memo)(({active:i})=>{let o=(0,lh.useMemo)(()=>i?"\u25C9":"\u25EF",[i]),a=(0,lh.useMemo)(()=>i?"green":"yellow",[i]);return lh.default.createElement(u5.Text,{color:a},o)});var g2=ou(sc()),ra=ou(Mi());var o5=ou(sc()),x4=ou(Mi());function y2({active:i},o,a){let{stdin:c}=(0,o5.useStdin)(),_=(0,x4.useCallback)((t,M)=>o(t,M),a);(0,x4.useEffect)(()=>{if(!(!i||!c))return c.on("keypress",_),()=>{c.off("keypress",_)}},[i,_,c])}var R4;(function(a){a.BEFORE="before",a.AFTER="after"})(R4||(R4={}));var l5=function({active:i},o,a){y2({active:i},(c,_)=>{_.name==="tab"&&(_.shift?o(R4.BEFORE):o(R4.AFTER))},a)};var A4=function(i,o,{active:a,minus:c,plus:_,set:t,loop:M=!0}){y2({active:a},(N,O)=>{let T=o.indexOf(i);switch(O.name){case c:{let B=T-1;if(M){t(o[(o.length+B)%o.length]);return}if(B<0)return;t(o[B])}break;case _:{let B=T+1;if(M){t(o[B%o.length]);return}if(B>=o.length)return;t(o[B])}break}},[o,i,_,t,M])};var O4=({active:i=!0,children:o=[],radius:a=10,size:c=1,loop:_=!0,onFocusRequest:t,willReachEnd:M})=>{let N=ge=>{if(ge.key===null)throw new Error("Expected all children to have a key");return ge.key},O=ra.default.Children.map(o,ge=>N(ge)),T=O[0],[B,H]=(0,ra.useState)(T),q=O.indexOf(B);(0,ra.useEffect)(()=>{O.includes(B)||H(T)},[o]),(0,ra.useEffect)(()=>{M&&q>=O.length-2&&M()},[q]),l5({active:i&&!!t},ge=>{t==null||t(ge)},[t]),A4(B,O,{active:i,minus:"up",plus:"down",set:H,loop:_});let ne=q-a,m=q+a;m>O.length&&(ne-=m-O.length,m=O.length),ne<0&&(m+=-ne,ne=0),m>=O.length&&(m=O.length-1);let pe=[];for(let ge=ne;ge<=m;++ge){let ve=O[ge],ue=i&&ve===B;pe.push(ra.default.createElement(g2.Box,{key:ve,height:c},ra.default.createElement(g2.Box,{marginLeft:1,marginRight:1},ra.default.createElement(g2.Text,null,ue?ra.default.createElement(g2.Text,{color:"cyan",bold:!0},">"):" ")),ra.default.createElement(g2.Box,null,ra.default.cloneElement(o[ge],{active:ue}))))}return ra.default.createElement(g2.Box,{flexDirection:"column",width:"100%"},pe)};var M4=ou(Mi());var s5=ou(sc()),td=ou(Mi()),a5=ou(require("readline")),$w=td.default.createContext(null),f5=({children:i})=>{let{stdin:o,setRawMode:a}=(0,s5.useStdin)();(0,td.useEffect)(()=>{a&&a(!0),o&&(0,a5.emitKeypressEvents)(o)},[o,a]);let[c,_]=(0,td.useState)(new Map),t=(0,td.useMemo)(()=>({getAll:()=>c,get:M=>c.get(M),set:(M,N)=>_(new Map([...c,[M,N]]))}),[c,_]);return td.default.createElement($w.Provider,{value:t,children:i})};function sh(i,o){let a=(0,M4.useContext)($w);if(a===null)throw new Error("Expected this hook to run with a ministore context attached");if(typeof i=="undefined")return a.getAll();let c=(0,M4.useCallback)(t=>{a.set(i,t)},[i,a.set]),_=a.get(i);return typeof _=="undefined"&&(_=o),[_,c]}var k4=ou(sc()),e3=ou(Mi());async function L4(i,o,{stdin:a,stdout:c,stderr:_}={}){let t,M=O=>{let{exit:T}=(0,k4.useApp)();y2({active:!0},(B,H)=>{H.name==="return"&&(t=O,T())},[T,O])},{waitUntilExit:N}=(0,k4.render)(e3.default.createElement(f5,null,e3.default.createElement(i,Zr(qt({},o),{useSubmit:M}))),{stdin:a,stdout:c,stderr:_});return await N(),t}var R9=ou(require("clipanion")),A9=ou(h5()),or=ou(sc()),En=ou(Mi());var C9=ou(T9()),g3={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},rq=(0,C9.default)(g3.appId,g3.apiKey).initIndex(g3.indexName),_3=async(i,o=0)=>await rq.search(i,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:o,hitsPerPage:10});var Vg=["regular","dev","peer"],Gg=class extends x9.BaseCommand{async execute(){let o=await ch.Configuration.find(this.context.cwd,this.context.plugins),a=()=>En.default.createElement(or.Box,{flexDirection:"row"},En.default.createElement(or.Box,{flexDirection:"column",width:48},En.default.createElement(or.Box,null,En.default.createElement(or.Text,null,"Press ",En.default.createElement(or.Text,{bold:!0,color:"cyanBright"},""),"/",En.default.createElement(or.Text,{bold:!0,color:"cyanBright"},"")," to move between packages.")),En.default.createElement(or.Box,null,En.default.createElement(or.Text,null,"Press ",En.default.createElement(or.Text,{bold:!0,color:"cyanBright"},"")," to select a package.")),En.default.createElement(or.Box,null,En.default.createElement(or.Text,null,"Press ",En.default.createElement(or.Text,{bold:!0,color:"cyanBright"},"")," again to change the target."))),En.default.createElement(or.Box,{flexDirection:"column"},En.default.createElement(or.Box,{marginLeft:1},En.default.createElement(or.Text,null,"Press ",En.default.createElement(or.Text,{bold:!0,color:"cyanBright"},"")," to install the selected packages.")),En.default.createElement(or.Box,{marginLeft:1},En.default.createElement(or.Text,null,"Press ",En.default.createElement(or.Text,{bold:!0,color:"cyanBright"},"")," to abort.")))),c=()=>En.default.createElement(En.default.Fragment,null,En.default.createElement(or.Box,{width:15},En.default.createElement(or.Text,{bold:!0,underline:!0,color:"gray"},"Owner")),En.default.createElement(or.Box,{width:11},En.default.createElement(or.Text,{bold:!0,underline:!0,color:"gray"},"Version")),En.default.createElement(or.Box,{width:10},En.default.createElement(or.Text,{bold:!0,underline:!0,color:"gray"},"Downloads"))),_=()=>En.default.createElement(or.Box,{width:17},En.default.createElement(or.Text,{bold:!0,underline:!0,color:"gray"},"Target")),t=({hit:ne,active:m})=>{let[pe,ge]=sh(ne.name,null);y2({active:m},(_e,ce)=>{if(ce.name!=="space")return;if(!pe){ge(Vg[0]);return}let me=Vg.indexOf(pe)+1;me===Vg.length?ge(null):ge(Vg[me])},[pe,ge]);let ve=ch.structUtils.parseIdent(ne.name),ue=ch.structUtils.prettyIdent(o,ve);return En.default.createElement(or.Box,null,En.default.createElement(or.Box,{width:45},En.default.createElement(or.Text,{bold:!0,wrap:"wrap"},ue)),En.default.createElement(or.Box,{width:14,marginLeft:1},En.default.createElement(or.Text,{bold:!0,wrap:"truncate"},ne.owner.name)),En.default.createElement(or.Box,{width:10,marginLeft:1},En.default.createElement(or.Text,{italic:!0,wrap:"truncate"},ne.version)),En.default.createElement(or.Box,{width:16,marginLeft:1},En.default.createElement(or.Text,null,ne.humanDownloadsLast30Days)))},M=({name:ne,active:m})=>{let[pe]=sh(ne,null),ge=ch.structUtils.parseIdent(ne);return En.default.createElement(or.Box,null,En.default.createElement(or.Box,{width:47},En.default.createElement(or.Text,{bold:!0}," - ",ch.structUtils.prettyIdent(o,ge))),Vg.map(ve=>En.default.createElement(or.Box,{key:ve,width:14,marginLeft:1},En.default.createElement(or.Text,null," ",En.default.createElement(C4,{active:pe===ve})," ",En.default.createElement(or.Text,{bold:!0},ve)))))},N=()=>En.default.createElement(or.Box,{marginTop:1},En.default.createElement(or.Text,null,"Powered by Algolia.")),T=await L4(({useSubmit:ne})=>{let m=sh();ne(m);let pe=Array.from(m.keys()).filter(je=>m.get(je)!==null),[ge,ve]=(0,En.useState)(""),[ue,_e]=(0,En.useState)(0),[ce,me]=(0,En.useState)([]),re=je=>{je.match(/\t| /)||ve(je)},we=async()=>{_e(0);let je=await _3(ge);je.query===ge&&me(je.hits)},Ie=async()=>{let je=await _3(ge,ue+1);je.query===ge&&je.page-1===ue&&(_e(je.page),me([...ce,...je.hits]))};return(0,En.useEffect)(()=>{ge?we():me([])},[ge]),En.default.createElement(or.Box,{flexDirection:"column"},En.default.createElement(a,null),En.default.createElement(or.Box,{flexDirection:"row",marginTop:1},En.default.createElement(or.Text,{bold:!0},"Search: "),En.default.createElement(or.Box,{width:41},En.default.createElement(A9.default,{value:ge,onChange:re,placeholder:"i.e. babel, webpack, react...",showCursor:!1})),En.default.createElement(c,null)),ce.length?En.default.createElement(O4,{radius:2,loop:!1,children:ce.map(je=>En.default.createElement(t,{key:je.name,hit:je,active:!1})),willReachEnd:Ie}):En.default.createElement(or.Text,{color:"gray"},"Start typing..."),En.default.createElement(or.Box,{flexDirection:"row",marginTop:1},En.default.createElement(or.Box,{width:49},En.default.createElement(or.Text,{bold:!0},"Selected:")),En.default.createElement(_,null)),pe.length?pe.map(je=>En.default.createElement(M,{key:je,name:je,active:!1})):En.default.createElement(or.Text,{color:"gray"},"No selected packages..."),En.default.createElement(N,null))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof T=="undefined")return 1;let B=Array.from(T.keys()).filter(ne=>T.get(ne)==="regular"),H=Array.from(T.keys()).filter(ne=>T.get(ne)==="dev"),q=Array.from(T.keys()).filter(ne=>T.get(ne)==="peer");return B.length&&await this.cli.run(["add",...B]),H.length&&await this.cli.run(["add","--dev",...H]),q&&await this.cli.run(["add","--peer",...q]),0}};Gg.paths=[["search"]],Gg.usage=R9.Command.Usage({category:"Interactive commands",description:"open the search interface",details:` + This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry. + `,examples:[["Open the search window","yarn search"]]});var O9=Gg;var Q4=ou(require("@yarnpkg/cli")),R0=ou(require("@yarnpkg/core"));var Yg=ou(sc()),E2=ou(Mi());var M9=ou(sc()),k9=ou(Mi()),j4=({length:i,active:o})=>{if(i===0)return null;let a=i>1?` ${"-".repeat(i-1)}`:" ";return k9.default.createElement(M9.Text,{dimColor:!o},a)};var L9=function({active:i,skewer:o,options:a,value:c,onChange:_,sizes:t=[]}){let M=a.filter(({label:O})=>!!O).map(({value:O})=>O),N=a.findIndex(O=>O.value===c&&O.label!="");return A4(c,M,{active:i,minus:"left",plus:"right",set:_}),E2.default.createElement(E2.default.Fragment,null,a.map(({label:O},T)=>{let B=T===N,H=t[T]-1||0,q=O.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,""),ne=Math.max(0,H-q.length-2);return O?E2.default.createElement(Yg.Box,{key:O,width:H,marginLeft:1},E2.default.createElement(Yg.Text,{wrap:"truncate"},E2.default.createElement(C4,{active:B})," ",O),o?E2.default.createElement(j4,{active:i,length:ne}):null):E2.default.createElement(Yg.Box,{key:`spacer-${T}`,width:H,marginLeft:1})}))};var mR=ou(require("@yarnpkg/plugin-essentials")),J4=ou(require("clipanion")),yR=ou(vR()),bi=ou(sc()),Tr=ou(Mi()),gR=ou(require("semver")),_R=/^((?:[\^~]|>=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/,ER=(i,o)=>i.length>0?[i.slice(0,o)].concat(ER(i.slice(o),o)):[],t_=class extends Q4.BaseCommand{async execute(){if(!this.context.stdout.isTTY)throw new J4.UsageError("This command can only be run in a TTY environment");let o=await R0.Configuration.find(this.context.cwd,this.context.plugins),{project:a,workspace:c}=await R0.Project.find(o,this.context.cwd),_=await R0.Cache.find(o);if(!c)throw new Q4.WorkspaceRequiredError(a.cwd,this.context.cwd);await a.restoreInstallState({restoreResolutions:!1});let t=this.context.stdout.rows-7,M=(ue,_e)=>{let ce=(0,yR.diffWords)(ue,_e),me="";for(let re of ce)re.added?me+=R0.formatUtils.pretty(o,re.value,"green"):re.removed||(me+=re.value);return me},N=(ue,_e)=>{if(ue===_e)return _e;let ce=R0.structUtils.parseRange(ue),me=R0.structUtils.parseRange(_e),re=ce.selector.match(_R),we=me.selector.match(_R);if(!re||!we)return M(ue,_e);let Ie=["gray","red","yellow","green","magenta"],je=null,ct="";for(let pt=1;pt{let me=await mR.suggestUtils.fetchDescriptorFrom(ue,ce,{project:a,cache:_,preserveModifier:_e,workspace:c});return me!==null?me.range:ue.range},T=async ue=>{let _e=gR.default.valid(ue.range)?`^${ue.range}`:ue.range,[ce,me]=await Promise.all([O(ue,ue.range,_e).catch(()=>null),O(ue,ue.range,"latest").catch(()=>null)]),re=[{value:null,label:ue.range}];return ce&&ce!==ue.range?re.push({value:ce,label:N(ue.range,ce)}):re.push({value:null,label:""}),me&&me!==ce&&me!==ue.range?re.push({value:me,label:N(ue.range,me)}):re.push({value:null,label:""}),re},B=()=>Tr.default.createElement(bi.Box,{flexDirection:"row"},Tr.default.createElement(bi.Box,{flexDirection:"column",width:49},Tr.default.createElement(bi.Box,{marginLeft:1},Tr.default.createElement(bi.Text,null,"Press ",Tr.default.createElement(bi.Text,{bold:!0,color:"cyanBright"},""),"/",Tr.default.createElement(bi.Text,{bold:!0,color:"cyanBright"},"")," to select packages.")),Tr.default.createElement(bi.Box,{marginLeft:1},Tr.default.createElement(bi.Text,null,"Press ",Tr.default.createElement(bi.Text,{bold:!0,color:"cyanBright"},""),"/",Tr.default.createElement(bi.Text,{bold:!0,color:"cyanBright"},"")," to select versions."))),Tr.default.createElement(bi.Box,{flexDirection:"column"},Tr.default.createElement(bi.Box,{marginLeft:1},Tr.default.createElement(bi.Text,null,"Press ",Tr.default.createElement(bi.Text,{bold:!0,color:"cyanBright"},"")," to install.")),Tr.default.createElement(bi.Box,{marginLeft:1},Tr.default.createElement(bi.Text,null,"Press ",Tr.default.createElement(bi.Text,{bold:!0,color:"cyanBright"},"")," to abort.")))),H=()=>Tr.default.createElement(bi.Box,{flexDirection:"row",paddingTop:1,paddingBottom:1},Tr.default.createElement(bi.Box,{width:50},Tr.default.createElement(bi.Text,{bold:!0},Tr.default.createElement(bi.Text,{color:"greenBright"},"?")," Pick the packages you want to upgrade.")),Tr.default.createElement(bi.Box,{width:17},Tr.default.createElement(bi.Text,{bold:!0,underline:!0,color:"gray"},"Current")),Tr.default.createElement(bi.Box,{width:17},Tr.default.createElement(bi.Text,{bold:!0,underline:!0,color:"gray"},"Range")),Tr.default.createElement(bi.Box,{width:17},Tr.default.createElement(bi.Text,{bold:!0,underline:!0,color:"gray"},"Latest"))),q=({active:ue,descriptor:_e,suggestions:ce})=>{let[me,re]=sh(_e.descriptorHash,null),we=R0.structUtils.stringifyIdent(_e),Ie=Math.max(0,45-we.length);return Tr.default.createElement(Tr.default.Fragment,null,Tr.default.createElement(bi.Box,null,Tr.default.createElement(bi.Box,{width:45},Tr.default.createElement(bi.Text,{bold:!0},R0.structUtils.prettyIdent(o,_e)),Tr.default.createElement(j4,{active:ue,length:Ie})),Tr.default.createElement(L9,{active:ue,options:ce,value:me,skewer:!0,onChange:re,sizes:[17,17,17]})))},ne=({dependencies:ue})=>{let[_e,ce]=(0,Tr.useState)(ue.map(()=>null)),me=(0,Tr.useRef)(!0),re=async we=>{let Ie=await T(we);return Ie.filter(je=>je.label!=="").length<=1?null:{descriptor:we,suggestions:Ie}};return(0,Tr.useEffect)(()=>()=>{me.current=!1},[]),(0,Tr.useEffect)(()=>{let we=Math.trunc(t*1.75),Ie=ue.slice(0,we),je=ue.slice(we),ct=ER(je,t),pt=Ie.map(re).reduce(async(Xe,tt)=>{await Xe;let He=await tt;He!==null&&(!me.current||ce(kt=>{let zt=kt.findIndex(X=>X===null),nt=[...kt];return nt[zt]=He,nt}))},Promise.resolve());ct.reduce((Xe,tt)=>Promise.all(tt.map(He=>Promise.resolve().then(()=>re(He)))).then(async He=>{He=He.filter(kt=>kt!==null),await Xe,me.current&&ce(kt=>{let zt=kt.findIndex(nt=>nt===null);return kt.slice(0,zt).concat(He).concat(kt.slice(zt+He.length))})}),pt).then(()=>{me.current&&ce(Xe=>Xe.filter(tt=>tt!==null))})},[]),_e.length?Tr.default.createElement(O4,{radius:t>>1,children:_e.map((we,Ie)=>we!==null?Tr.default.createElement(q,{key:Ie,active:!1,descriptor:we.descriptor,suggestions:we.suggestions}):Tr.default.createElement(bi.Text,{key:Ie},"Loading..."))}):Tr.default.createElement(bi.Text,null,"No upgrades found")},pe=await L4(({useSubmit:ue})=>{ue(sh());let _e=new Map;for(let me of a.workspaces)for(let re of["dependencies","devDependencies"])for(let we of me.manifest[re].values())a.tryWorkspaceByDescriptor(we)===null&&_e.set(we.descriptorHash,we);let ce=R0.miscUtils.sortMap(_e.values(),me=>R0.structUtils.stringifyDescriptor(me));return Tr.default.createElement(bi.Box,{flexDirection:"column"},Tr.default.createElement(B,null),Tr.default.createElement(H,null),Tr.default.createElement(ne,{dependencies:ce}))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof pe=="undefined")return 1;let ge=!1;for(let ue of a.workspaces)for(let _e of["dependencies","devDependencies"]){let ce=ue.manifest[_e];for(let me of ce.values()){let re=pe.get(me.descriptorHash);typeof re!="undefined"&&re!==null&&(ce.set(me.identHash,R0.structUtils.makeDescriptor(me,re)),ge=!0)}}return ge?(await R0.StreamReport.start({configuration:o,stdout:this.context.stdout,includeLogs:!this.context.quiet},async ue=>{await a.install({cache:_,report:ue})})).exitCode():0}};t_.paths=[["upgrade-interactive"]],t_.usage=J4.Command.Usage({category:"Interactive commands",description:"open the upgrade interface",details:` + This command opens a fullscreen terminal interface where you can see any out of date packages used by your application, their status compared to the latest versions available on the remote registry, and select packages to upgrade. + `,examples:[["Open the upgrade window","yarn upgrade-interactive"]]});var DR=t_;var pW={commands:[O9,DR]},hW=pW;return dW;})(); +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ +/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +/** @license React v0.0.0-experimental-51a3aa6af + * react-debug-tools.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/** @license React v0.0.0-experimental-51a3aa6af + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/** @license React v0.0.0-experimental-51a3aa6af + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/** @license React v0.18.0 + * scheduler-tracing.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/** @license React v0.18.0 + * scheduler-tracing.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/** @license React v0.18.0 + * scheduler.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/** @license React v0.18.0 + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/** @license React v0.24.0 + * react-reconciler.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/** @license React v0.24.0 + * react-reconciler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/** @license React v16.13.1 + * react.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/** @license React v16.13.1 + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +return plugin; +} +}; diff --git a/.yarn/plugins/@yarnpkg/plugin-typescript.cjs b/.yarn/plugins/@yarnpkg/plugin-typescript.cjs new file mode 100644 index 000000000000..5c1859e0b90d --- /dev/null +++ b/.yarn/plugins/@yarnpkg/plugin-typescript.cjs @@ -0,0 +1,9 @@ +/* eslint-disable */ +//prettier-ignore +module.exports = { +name: "@yarnpkg/plugin-typescript", +factory: function (require) { +var plugin=(()=>{var Ft=Object.create,H=Object.defineProperty,Bt=Object.defineProperties,Kt=Object.getOwnPropertyDescriptor,zt=Object.getOwnPropertyDescriptors,Gt=Object.getOwnPropertyNames,Q=Object.getOwnPropertySymbols,$t=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable;var Re=(e,t,r)=>t in e?H(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))ne.call(t,r)&&Re(e,r,t[r]);if(Q)for(var r of Q(t))De.call(t,r)&&Re(e,r,t[r]);return e},g=(e,t)=>Bt(e,zt(t)),Lt=e=>H(e,"__esModule",{value:!0});var R=(e,t)=>{var r={};for(var s in e)ne.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&Q)for(var s of Q(e))t.indexOf(s)<0&&De.call(e,s)&&(r[s]=e[s]);return r};var I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Vt=(e,t)=>{for(var r in t)H(e,r,{get:t[r],enumerable:!0})},Qt=(e,t,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Gt(t))!ne.call(e,s)&&s!=="default"&&H(e,s,{get:()=>t[s],enumerable:!(r=Kt(t,s))||r.enumerable});return e},C=e=>Qt(Lt(H(e!=null?Ft($t(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var xe=I(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});function _(e){let t=[...e.caches],r=t.shift();return r===void 0?ve():{get(s,n,a={miss:()=>Promise.resolve()}){return r.get(s,n,a).catch(()=>_({caches:t}).get(s,n,a))},set(s,n){return r.set(s,n).catch(()=>_({caches:t}).set(s,n))},delete(s){return r.delete(s).catch(()=>_({caches:t}).delete(s))},clear(){return r.clear().catch(()=>_({caches:t}).clear())}}}function ve(){return{get(e,t,r={miss:()=>Promise.resolve()}){return t().then(n=>Promise.all([n,r.miss(n)])).then(([n])=>n)},set(e,t){return Promise.resolve(t)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}}J.createFallbackableCache=_;J.createNullCache=ve});var Ee=I(($s,qe)=>{qe.exports=xe()});var Te=I(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});function Jt(e={serializable:!0}){let t={};return{get(r,s,n={miss:()=>Promise.resolve()}){let a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);let o=s(),d=n&&n.miss||(()=>Promise.resolve());return o.then(y=>d(y)).then(()=>o)},set(r,s){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)},delete(r){return delete t[JSON.stringify(r)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}ae.createInMemoryCache=Jt});var we=I((Vs,Me)=>{Me.exports=Te()});var Ce=I(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});function Xt(e,t,r){let s={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers(){return e===oe.WithinHeaders?s:{}},queryParameters(){return e===oe.WithinQueryParameters?s:{}}}}function Yt(e){let t=0,r=()=>(t++,new Promise(s=>{setTimeout(()=>{s(e(r))},Math.min(100*t,1e3))}));return e(r)}function ke(e,t=(r,s)=>Promise.resolve()){return Object.assign(e,{wait(r){return ke(e.then(s=>Promise.all([t(s,r),s])).then(s=>s[1]))}})}function Zt(e){let t=e.length-1;for(t;t>0;t--){let r=Math.floor(Math.random()*(t+1)),s=e[t];e[t]=e[r],e[r]=s}return e}function er(e,t){return Object.keys(t!==void 0?t:{}).forEach(r=>{e[r]=t[r](e)}),e}function tr(e,...t){let r=0;return e.replace(/%s/g,()=>encodeURIComponent(t[r++]))}var rr="4.2.0",sr=e=>()=>e.transporter.requester.destroy(),oe={WithinQueryParameters:0,WithinHeaders:1};M.AuthMode=oe;M.addMethods=er;M.createAuth=Xt;M.createRetryablePromise=Yt;M.createWaitablePromise=ke;M.destroy=sr;M.encode=tr;M.shuffle=Zt;M.version=rr});var F=I((Js,Ue)=>{Ue.exports=Ce()});var Ne=I(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});var nr={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};ie.MethodEnum=nr});var B=I((Ys,We)=>{We.exports=Ne()});var Ze=I(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var He=B();function ce(e,t){let r=e||{},s=r.data||{};return Object.keys(r).forEach(n=>{["timeout","headers","queryParameters","data","cacheable"].indexOf(n)===-1&&(s[n]=r[n])}),{data:Object.entries(s).length>0?s:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var X={Read:1,Write:2,Any:3},U={Up:1,Down:2,Timeouted:3},_e=2*60*1e3;function ue(e,t=U.Up){return g(u({},e),{status:t,lastUpdate:Date.now()})}function Fe(e){return e.status===U.Up||Date.now()-e.lastUpdate>_e}function Be(e){return e.status===U.Timeouted&&Date.now()-e.lastUpdate<=_e}function le(e){return{protocol:e.protocol||"https",url:e.url,accept:e.accept||X.Any}}function ar(e,t){return Promise.all(t.map(r=>e.get(r,()=>Promise.resolve(ue(r))))).then(r=>{let s=r.filter(d=>Fe(d)),n=r.filter(d=>Be(d)),a=[...s,...n],o=a.length>0?a.map(d=>le(d)):t;return{getTimeout(d,y){return(n.length===0&&d===0?1:n.length+3+d)*y},statelessHosts:o}})}var or=({isTimedOut:e,status:t})=>!e&&~~t==0,ir=e=>{let t=e.status;return e.isTimedOut||or(e)||~~(t/100)!=2&&~~(t/100)!=4},cr=({status:e})=>~~(e/100)==2,ur=(e,t)=>ir(e)?t.onRetry(e):cr(e)?t.onSucess(e):t.onFail(e);function Qe(e,t,r,s){let n=[],a=$e(r,s),o=Le(e,s),d=r.method,y=r.method!==He.MethodEnum.Get?{}:u(u({},r.data),s.data),b=u(u(u({"x-algolia-agent":e.userAgent.value},e.queryParameters),y),s.queryParameters),f=0,p=(h,S)=>{let O=h.pop();if(O===void 0)throw Ve(de(n));let P={data:a,headers:o,method:d,url:Ge(O,r.path,b),connectTimeout:S(f,e.timeouts.connect),responseTimeout:S(f,s.timeout)},x=j=>{let T={request:P,response:j,host:O,triesLeft:h.length};return n.push(T),T},v={onSucess:j=>Ke(j),onRetry(j){let T=x(j);return j.isTimedOut&&f++,Promise.all([e.logger.info("Retryable failure",pe(T)),e.hostsCache.set(O,ue(O,j.isTimedOut?U.Timeouted:U.Down))]).then(()=>p(h,S))},onFail(j){throw x(j),ze(j,de(n))}};return e.requester.send(P).then(j=>ur(j,v))};return ar(e.hostsCache,t).then(h=>p([...h.statelessHosts].reverse(),h.getTimeout))}function lr(e){let{hostsCache:t,logger:r,requester:s,requestsCache:n,responsesCache:a,timeouts:o,userAgent:d,hosts:y,queryParameters:b,headers:f}=e,p={hostsCache:t,logger:r,requester:s,requestsCache:n,responsesCache:a,timeouts:o,userAgent:d,headers:f,queryParameters:b,hosts:y.map(h=>le(h)),read(h,S){let O=ce(S,p.timeouts.read),P=()=>Qe(p,p.hosts.filter(j=>(j.accept&X.Read)!=0),h,O);if((O.cacheable!==void 0?O.cacheable:h.cacheable)!==!0)return P();let v={request:h,mappedRequestOptions:O,transporter:{queryParameters:p.queryParameters,headers:p.headers}};return p.responsesCache.get(v,()=>p.requestsCache.get(v,()=>p.requestsCache.set(v,P()).then(j=>Promise.all([p.requestsCache.delete(v),j]),j=>Promise.all([p.requestsCache.delete(v),Promise.reject(j)])).then(([j,T])=>T)),{miss:j=>p.responsesCache.set(v,j)})},write(h,S){return Qe(p,p.hosts.filter(O=>(O.accept&X.Write)!=0),h,ce(S,p.timeouts.write))}};return p}function dr(e){let t={value:`Algolia for JavaScript (${e})`,add(r){let s=`; ${r.segment}${r.version!==void 0?` (${r.version})`:""}`;return t.value.indexOf(s)===-1&&(t.value=`${t.value}${s}`),t}};return t}function Ke(e){try{return JSON.parse(e.content)}catch(t){throw Je(t.message,e)}}function ze({content:e,status:t},r){let s=e;try{s=JSON.parse(e).message}catch(n){}return Xe(s,t,r)}function pr(e,...t){let r=0;return e.replace(/%s/g,()=>encodeURIComponent(t[r++]))}function Ge(e,t,r){let s=Ye(r),n=`${e.protocol}://${e.url}/${t.charAt(0)==="/"?t.substr(1):t}`;return s.length&&(n+=`?${s}`),n}function Ye(e){let t=r=>Object.prototype.toString.call(r)==="[object Object]"||Object.prototype.toString.call(r)==="[object Array]";return Object.keys(e).map(r=>pr("%s=%s",r,t(e[r])?JSON.stringify(e[r]):e[r])).join("&")}function $e(e,t){if(e.method===He.MethodEnum.Get||e.data===void 0&&t.data===void 0)return;let r=Array.isArray(e.data)?e.data:u(u({},e.data),t.data);return JSON.stringify(r)}function Le(e,t){let r=u(u({},e.headers),t.headers),s={};return Object.keys(r).forEach(n=>{let a=r[n];s[n.toLowerCase()]=a}),s}function de(e){return e.map(t=>pe(t))}function pe(e){let t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return g(u({},e),{request:g(u({},e.request),{headers:u(u({},e.request.headers),t)})})}function Xe(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}function Je(e,t){return{name:"DeserializationError",message:e,response:t}}function Ve(e){return{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:e}}A.CallEnum=X;A.HostStatusEnum=U;A.createApiError=Xe;A.createDeserializationError=Je;A.createMappedRequestOptions=ce;A.createRetryError=Ve;A.createStatefulHost=ue;A.createStatelessHost=le;A.createTransporter=lr;A.createUserAgent=dr;A.deserializeFailure=ze;A.deserializeSuccess=Ke;A.isStatefulHostTimeouted=Be;A.isStatefulHostUp=Fe;A.serializeData=$e;A.serializeHeaders=Le;A.serializeQueryParameters=Ye;A.serializeUrl=Ge;A.stackFrameWithoutCredentials=pe;A.stackTraceWithoutCredentials=de});var K=I((en,et)=>{et.exports=Ze()});var tt=I(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});var N=F(),mr=K(),z=B(),hr=e=>{let t=e.region||"us",r=N.createAuth(N.AuthMode.WithinHeaders,e.appId,e.apiKey),s=mr.createTransporter(g(u({hosts:[{url:`analytics.${t}.algolia.com`}]},e),{headers:u(g(u({},r.headers()),{"content-type":"application/json"}),e.headers),queryParameters:u(u({},r.queryParameters()),e.queryParameters)})),n=e.appId;return N.addMethods({appId:n,transporter:s},e.methods)},yr=e=>(t,r)=>e.transporter.write({method:z.MethodEnum.Post,path:"2/abtests",data:t},r),gr=e=>(t,r)=>e.transporter.write({method:z.MethodEnum.Delete,path:N.encode("2/abtests/%s",t)},r),fr=e=>(t,r)=>e.transporter.read({method:z.MethodEnum.Get,path:N.encode("2/abtests/%s",t)},r),br=e=>t=>e.transporter.read({method:z.MethodEnum.Get,path:"2/abtests"},t),Pr=e=>(t,r)=>e.transporter.write({method:z.MethodEnum.Post,path:N.encode("2/abtests/%s/stop",t)},r);w.addABTest=yr;w.createAnalyticsClient=hr;w.deleteABTest=gr;w.getABTest=fr;w.getABTests=br;w.stopABTest=Pr});var st=I((rn,rt)=>{rt.exports=tt()});var at=I(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});var me=F(),jr=K(),nt=B(),Or=e=>{let t=e.region||"us",r=me.createAuth(me.AuthMode.WithinHeaders,e.appId,e.apiKey),s=jr.createTransporter(g(u({hosts:[{url:`recommendation.${t}.algolia.com`}]},e),{headers:u(g(u({},r.headers()),{"content-type":"application/json"}),e.headers),queryParameters:u(u({},r.queryParameters()),e.queryParameters)}));return me.addMethods({appId:e.appId,transporter:s},e.methods)},Ir=e=>t=>e.transporter.read({method:nt.MethodEnum.Get,path:"1/strategies/personalization"},t),Ar=e=>(t,r)=>e.transporter.write({method:nt.MethodEnum.Post,path:"1/strategies/personalization",data:t},r);G.createRecommendationClient=Or;G.getPersonalizationStrategy=Ir;G.setPersonalizationStrategy=Ar});var it=I((nn,ot)=>{ot.exports=at()});var jt=I(i=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});var l=F(),q=K(),m=B(),Sr=require("crypto");function Y(e){let t=r=>e.request(r).then(s=>{if(e.batch!==void 0&&e.batch(s.hits),!e.shouldStop(s))return s.cursor?t({cursor:s.cursor}):t({page:(r.page||0)+1})});return t({})}var Dr=e=>{let t=e.appId,r=l.createAuth(e.authMode!==void 0?e.authMode:l.AuthMode.WithinHeaders,t,e.apiKey),s=q.createTransporter(g(u({hosts:[{url:`${t}-dsn.algolia.net`,accept:q.CallEnum.Read},{url:`${t}.algolia.net`,accept:q.CallEnum.Write}].concat(l.shuffle([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}]))},e),{headers:u(g(u({},r.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:u(u({},r.queryParameters()),e.queryParameters)})),n={transporter:s,appId:t,addAlgoliaAgent(a,o){s.userAgent.add({segment:a,version:o})},clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})}};return l.addMethods(n,e.methods)};function ct(){return{name:"MissingObjectIDError",message:"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."}}function ut(){return{name:"ObjectNotFoundError",message:"Object not found."}}function lt(){return{name:"ValidUntilNotFoundError",message:"ValidUntil not found in given secured api key."}}var Rr=e=>(t,r)=>{let d=r||{},{queryParameters:s}=d,n=R(d,["queryParameters"]),a=u({acl:t},s!==void 0?{queryParameters:s}:{}),o=(y,b)=>l.createRetryablePromise(f=>$(e)(y.key,b).catch(p=>{if(p.status!==404)throw p;return f()}));return l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:"1/keys",data:a},n),o)},vr=e=>(t,r,s)=>{let n=q.createMappedRequestOptions(s);return n.queryParameters["X-Algolia-User-ID"]=t,e.transporter.write({method:m.MethodEnum.Post,path:"1/clusters/mapping",data:{cluster:r}},n)},xr=e=>(t,r,s)=>e.transporter.write({method:m.MethodEnum.Post,path:"1/clusters/mapping/batch",data:{users:t,cluster:r}},s),Z=e=>(t,r,s)=>{let n=(a,o)=>L(e)(t,{methods:{waitTask:D}}).waitTask(a.taskID,o);return l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/operation",t),data:{operation:"copy",destination:r}},s),n)},qr=e=>(t,r,s)=>Z(e)(t,r,g(u({},s),{scope:[ee.Rules]})),Er=e=>(t,r,s)=>Z(e)(t,r,g(u({},s),{scope:[ee.Settings]})),Tr=e=>(t,r,s)=>Z(e)(t,r,g(u({},s),{scope:[ee.Synonyms]})),Mr=e=>(t,r)=>{let s=(n,a)=>l.createRetryablePromise(o=>$(e)(t,a).then(o).catch(d=>{if(d.status!==404)throw d}));return l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Delete,path:l.encode("1/keys/%s",t)},r),s)},wr=()=>(e,t)=>{let r=q.serializeQueryParameters(t),s=Sr.createHmac("sha256",e).update(r).digest("hex");return Buffer.from(s+r).toString("base64")},$=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Get,path:l.encode("1/keys/%s",t)},r),kr=e=>t=>e.transporter.read({method:m.MethodEnum.Get,path:"1/logs"},t),Cr=()=>e=>{let t=Buffer.from(e,"base64").toString("ascii"),r=/validUntil=(\d+)/,s=t.match(r);if(s===null)throw lt();return parseInt(s[1],10)-Math.round(new Date().getTime()/1e3)},Ur=e=>t=>e.transporter.read({method:m.MethodEnum.Get,path:"1/clusters/mapping/top"},t),Nr=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Get,path:l.encode("1/clusters/mapping/%s",t)},r),Wr=e=>t=>{let n=t||{},{retrieveMappings:r}=n,s=R(n,["retrieveMappings"]);return r===!0&&(s.getClusters=!0),e.transporter.read({method:m.MethodEnum.Get,path:"1/clusters/mapping/pending"},s)},L=e=>(t,r={})=>{let s={transporter:e.transporter,appId:e.appId,indexName:t};return l.addMethods(s,r.methods)},Hr=e=>t=>e.transporter.read({method:m.MethodEnum.Get,path:"1/keys"},t),_r=e=>t=>e.transporter.read({method:m.MethodEnum.Get,path:"1/clusters"},t),Fr=e=>t=>e.transporter.read({method:m.MethodEnum.Get,path:"1/indexes"},t),Br=e=>t=>e.transporter.read({method:m.MethodEnum.Get,path:"1/clusters/mapping"},t),Kr=e=>(t,r,s)=>{let n=(a,o)=>L(e)(t,{methods:{waitTask:D}}).waitTask(a.taskID,o);return l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/operation",t),data:{operation:"move",destination:r}},s),n)},zr=e=>(t,r)=>{let s=(n,a)=>Promise.all(Object.keys(n.taskID).map(o=>L(e)(o,{methods:{waitTask:D}}).waitTask(n.taskID[o],a)));return l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:"1/indexes/*/batch",data:{requests:t}},r),s)},Gr=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:t}},r),$r=e=>(t,r)=>{let s=t.map(n=>g(u({},n),{params:q.serializeQueryParameters(n.params||{})}));return e.transporter.read({method:m.MethodEnum.Post,path:"1/indexes/*/queries",data:{requests:s},cacheable:!0},r)},Lr=e=>(t,r)=>Promise.all(t.map(s=>{let d=s.params,{facetName:n,facetQuery:a}=d,o=R(d,["facetName","facetQuery"]);return L(e)(s.indexName,{methods:{searchForFacetValues:dt}}).searchForFacetValues(n,a,u(u({},r),o))})),Vr=e=>(t,r)=>{let s=q.createMappedRequestOptions(r);return s.queryParameters["X-Algolia-User-ID"]=t,e.transporter.write({method:m.MethodEnum.Delete,path:"1/clusters/mapping"},s)},Qr=e=>(t,r)=>{let s=(n,a)=>l.createRetryablePromise(o=>$(e)(t,a).catch(d=>{if(d.status!==404)throw d;return o()}));return l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/keys/%s/restore",t)},r),s)},Jr=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Post,path:"1/clusters/mapping/search",data:{query:t}},r),Xr=e=>(t,r)=>{let s=Object.assign({},r),f=r||{},{queryParameters:n}=f,a=R(f,["queryParameters"]),o=n?{queryParameters:n}:{},d=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"],y=p=>Object.keys(s).filter(h=>d.indexOf(h)!==-1).every(h=>p[h]===s[h]),b=(p,h)=>l.createRetryablePromise(S=>$(e)(t,h).then(O=>y(O)?Promise.resolve():S()));return l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Put,path:l.encode("1/keys/%s",t),data:o},a),b)},pt=e=>(t,r)=>{let s=(n,a)=>D(e)(n.taskID,a);return l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/batch",e.indexName),data:{requests:t}},r),s)},Yr=e=>t=>Y(g(u({},t),{shouldStop:r=>r.cursor===void 0,request:r=>e.transporter.read({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/browse",e.indexName),data:r},t)})),Zr=e=>t=>{let r=u({hitsPerPage:1e3},t);return Y(g(u({},r),{shouldStop:s=>s.hits.lengthg(u({},n),{hits:n.hits.map(a=>(delete a._highlightResult,a))}))}}))},es=e=>t=>{let r=u({hitsPerPage:1e3},t);return Y(g(u({},r),{shouldStop:s=>s.hits.lengthg(u({},n),{hits:n.hits.map(a=>(delete a._highlightResult,a))}))}}))},te=e=>(t,r,s)=>{let y=s||{},{batchSize:n}=y,a=R(y,["batchSize"]),o={taskIDs:[],objectIDs:[]},d=(b=0)=>{let f=[],p;for(p=b;p({action:r,body:h})),a).then(h=>(o.objectIDs=o.objectIDs.concat(h.objectIDs),o.taskIDs.push(h.taskID),p++,d(p)))};return l.createWaitablePromise(d(),(b,f)=>Promise.all(b.taskIDs.map(p=>D(e)(p,f))))},ts=e=>t=>l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/clear",e.indexName)},t),(r,s)=>D(e)(r.taskID,s)),rs=e=>t=>{let a=t||{},{forwardToReplicas:r}=a,s=R(a,["forwardToReplicas"]),n=q.createMappedRequestOptions(s);return r&&(n.queryParameters.forwardToReplicas=1),l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/rules/clear",e.indexName)},n),(o,d)=>D(e)(o.taskID,d))},ss=e=>t=>{let a=t||{},{forwardToReplicas:r}=a,s=R(a,["forwardToReplicas"]),n=q.createMappedRequestOptions(s);return r&&(n.queryParameters.forwardToReplicas=1),l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/synonyms/clear",e.indexName)},n),(o,d)=>D(e)(o.taskID,d))},ns=e=>(t,r)=>l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/deleteByQuery",e.indexName),data:t},r),(s,n)=>D(e)(s.taskID,n)),as=e=>t=>l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Delete,path:l.encode("1/indexes/%s",e.indexName)},t),(r,s)=>D(e)(r.taskID,s)),os=e=>(t,r)=>l.createWaitablePromise(yt(e)([t],r).then(s=>({taskID:s.taskIDs[0]})),(s,n)=>D(e)(s.taskID,n)),yt=e=>(t,r)=>{let s=t.map(n=>({objectID:n}));return te(e)(s,k.DeleteObject,r)},is=e=>(t,r)=>{let o=r||{},{forwardToReplicas:s}=o,n=R(o,["forwardToReplicas"]),a=q.createMappedRequestOptions(n);return s&&(a.queryParameters.forwardToReplicas=1),l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Delete,path:l.encode("1/indexes/%s/rules/%s",e.indexName,t)},a),(d,y)=>D(e)(d.taskID,y))},cs=e=>(t,r)=>{let o=r||{},{forwardToReplicas:s}=o,n=R(o,["forwardToReplicas"]),a=q.createMappedRequestOptions(n);return s&&(a.queryParameters.forwardToReplicas=1),l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Delete,path:l.encode("1/indexes/%s/synonyms/%s",e.indexName,t)},a),(d,y)=>D(e)(d.taskID,y))},us=e=>t=>gt(e)(t).then(()=>!0).catch(r=>{if(r.status!==404)throw r;return!1}),ls=e=>(t,r)=>{let y=r||{},{query:s,paginate:n}=y,a=R(y,["query","paginate"]),o=0,d=()=>ft(e)(s||"",g(u({},a),{page:o})).then(b=>{for(let[f,p]of Object.entries(b.hits))if(t(p))return{object:p,position:parseInt(f,10),page:o};if(o++,n===!1||o>=b.nbPages)throw ut();return d()});return d()},ds=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Get,path:l.encode("1/indexes/%s/%s",e.indexName,t)},r),ps=()=>(e,t)=>{for(let[r,s]of Object.entries(e.hits))if(s.objectID===t)return parseInt(r,10);return-1},ms=e=>(t,r)=>{let o=r||{},{attributesToRetrieve:s}=o,n=R(o,["attributesToRetrieve"]),a=t.map(d=>u({indexName:e.indexName,objectID:d},s?{attributesToRetrieve:s}:{}));return e.transporter.read({method:m.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:a}},n)},hs=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Get,path:l.encode("1/indexes/%s/rules/%s",e.indexName,t)},r),gt=e=>t=>e.transporter.read({method:m.MethodEnum.Get,path:l.encode("1/indexes/%s/settings",e.indexName),data:{getVersion:2}},t),ys=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Get,path:l.encode("1/indexes/%s/synonyms/%s",e.indexName,t)},r),bt=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Get,path:l.encode("1/indexes/%s/task/%s",e.indexName,t.toString())},r),gs=e=>(t,r)=>l.createWaitablePromise(Pt(e)([t],r).then(s=>({objectID:s.objectIDs[0],taskID:s.taskIDs[0]})),(s,n)=>D(e)(s.taskID,n)),Pt=e=>(t,r)=>{let o=r||{},{createIfNotExists:s}=o,n=R(o,["createIfNotExists"]),a=s?k.PartialUpdateObject:k.PartialUpdateObjectNoCreate;return te(e)(t,a,n)},fs=e=>(t,r)=>{let O=r||{},{safe:s,autoGenerateObjectIDIfNotExist:n,batchSize:a}=O,o=R(O,["safe","autoGenerateObjectIDIfNotExist","batchSize"]),d=(P,x,v,j)=>l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/operation",P),data:{operation:v,destination:x}},j),(T,V)=>D(e)(T.taskID,V)),y=Math.random().toString(36).substring(7),b=`${e.indexName}_tmp_${y}`,f=he({appId:e.appId,transporter:e.transporter,indexName:b}),p=[],h=d(e.indexName,b,"copy",g(u({},o),{scope:["settings","synonyms","rules"]}));p.push(h);let S=(s?h.wait(o):h).then(()=>{let P=f(t,g(u({},o),{autoGenerateObjectIDIfNotExist:n,batchSize:a}));return p.push(P),s?P.wait(o):P}).then(()=>{let P=d(b,e.indexName,"move",o);return p.push(P),s?P.wait(o):P}).then(()=>Promise.all(p)).then(([P,x,v])=>({objectIDs:x.objectIDs,taskIDs:[P.taskID,...x.taskIDs,v.taskID]}));return l.createWaitablePromise(S,(P,x)=>Promise.all(p.map(v=>v.wait(x))))},bs=e=>(t,r)=>ye(e)(t,g(u({},r),{clearExistingRules:!0})),Ps=e=>(t,r)=>ge(e)(t,g(u({},r),{replaceExistingSynonyms:!0})),js=e=>(t,r)=>l.createWaitablePromise(he(e)([t],r).then(s=>({objectID:s.objectIDs[0],taskID:s.taskIDs[0]})),(s,n)=>D(e)(s.taskID,n)),he=e=>(t,r)=>{let o=r||{},{autoGenerateObjectIDIfNotExist:s}=o,n=R(o,["autoGenerateObjectIDIfNotExist"]),a=s?k.AddObject:k.UpdateObject;if(a===k.UpdateObject){for(let d of t)if(d.objectID===void 0)return l.createWaitablePromise(Promise.reject(ct()))}return te(e)(t,a,n)},Os=e=>(t,r)=>ye(e)([t],r),ye=e=>(t,r)=>{let d=r||{},{forwardToReplicas:s,clearExistingRules:n}=d,a=R(d,["forwardToReplicas","clearExistingRules"]),o=q.createMappedRequestOptions(a);return s&&(o.queryParameters.forwardToReplicas=1),n&&(o.queryParameters.clearExistingRules=1),l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/rules/batch",e.indexName),data:t},o),(y,b)=>D(e)(y.taskID,b))},Is=e=>(t,r)=>ge(e)([t],r),ge=e=>(t,r)=>{let d=r||{},{forwardToReplicas:s,replaceExistingSynonyms:n}=d,a=R(d,["forwardToReplicas","replaceExistingSynonyms"]),o=q.createMappedRequestOptions(a);return s&&(o.queryParameters.forwardToReplicas=1),n&&(o.queryParameters.replaceExistingSynonyms=1),l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/synonyms/batch",e.indexName),data:t},o),(y,b)=>D(e)(y.taskID,b))},ft=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r),dt=e=>(t,r,s)=>e.transporter.read({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},s),mt=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/rules/search",e.indexName),data:{query:t}},r),ht=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/synonyms/search",e.indexName),data:{query:t}},r),As=e=>(t,r)=>{let o=r||{},{forwardToReplicas:s}=o,n=R(o,["forwardToReplicas"]),a=q.createMappedRequestOptions(n);return s&&(a.queryParameters.forwardToReplicas=1),l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Put,path:l.encode("1/indexes/%s/settings",e.indexName),data:t},a),(d,y)=>D(e)(d.taskID,y))},D=e=>(t,r)=>l.createRetryablePromise(s=>bt(e)(t,r).then(n=>n.status!=="published"?s():void 0)),Ss={AddObject:"addObject",Analytics:"analytics",Browser:"browse",DeleteIndex:"deleteIndex",DeleteObject:"deleteObject",EditSettings:"editSettings",ListIndexes:"listIndexes",Logs:"logs",Recommendation:"recommendation",Search:"search",SeeUnretrievableAttributes:"seeUnretrievableAttributes",Settings:"settings",Usage:"usage"},k={AddObject:"addObject",UpdateObject:"updateObject",PartialUpdateObject:"partialUpdateObject",PartialUpdateObjectNoCreate:"partialUpdateObjectNoCreate",DeleteObject:"deleteObject"},ee={Settings:"settings",Synonyms:"synonyms",Rules:"rules"},Ds={None:"none",StopIfEnoughMatches:"stopIfEnoughMatches"},Rs={Synonym:"synonym",OneWaySynonym:"oneWaySynonym",AltCorrection1:"altCorrection1",AltCorrection2:"altCorrection2",Placeholder:"placeholder"};i.ApiKeyACLEnum=Ss;i.BatchActionEnum=k;i.ScopeEnum=ee;i.StrategyEnum=Ds;i.SynonymEnum=Rs;i.addApiKey=Rr;i.assignUserID=vr;i.assignUserIDs=xr;i.batch=pt;i.browseObjects=Yr;i.browseRules=Zr;i.browseSynonyms=es;i.chunkedBatch=te;i.clearObjects=ts;i.clearRules=rs;i.clearSynonyms=ss;i.copyIndex=Z;i.copyRules=qr;i.copySettings=Er;i.copySynonyms=Tr;i.createBrowsablePromise=Y;i.createMissingObjectIDError=ct;i.createObjectNotFoundError=ut;i.createSearchClient=Dr;i.createValidUntilNotFoundError=lt;i.deleteApiKey=Mr;i.deleteBy=ns;i.deleteIndex=as;i.deleteObject=os;i.deleteObjects=yt;i.deleteRule=is;i.deleteSynonym=cs;i.exists=us;i.findObject=ls;i.generateSecuredApiKey=wr;i.getApiKey=$;i.getLogs=kr;i.getObject=ds;i.getObjectPosition=ps;i.getObjects=ms;i.getRule=hs;i.getSecuredApiKeyRemainingValidity=Cr;i.getSettings=gt;i.getSynonym=ys;i.getTask=bt;i.getTopUserIDs=Ur;i.getUserID=Nr;i.hasPendingMappings=Wr;i.initIndex=L;i.listApiKeys=Hr;i.listClusters=_r;i.listIndices=Fr;i.listUserIDs=Br;i.moveIndex=Kr;i.multipleBatch=zr;i.multipleGetObjects=Gr;i.multipleQueries=$r;i.multipleSearchForFacetValues=Lr;i.partialUpdateObject=gs;i.partialUpdateObjects=Pt;i.removeUserID=Vr;i.replaceAllObjects=fs;i.replaceAllRules=bs;i.replaceAllSynonyms=Ps;i.restoreApiKey=Qr;i.saveObject=js;i.saveObjects=he;i.saveRule=Os;i.saveRules=ye;i.saveSynonym=Is;i.saveSynonyms=ge;i.search=ft;i.searchForFacetValues=dt;i.searchRules=mt;i.searchSynonyms=ht;i.searchUserIDs=Jr;i.setSettings=As;i.updateApiKey=Xr;i.waitTask=D});var It=I((on,Ot)=>{Ot.exports=jt()});var At=I(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});function vs(){return{debug(e,t){return Promise.resolve()},info(e,t){return Promise.resolve()},error(e,t){return Promise.resolve()}}}var xs={Debug:1,Info:2,Error:3};re.LogLevelEnum=xs;re.createNullLogger=vs});var Dt=I((un,St)=>{St.exports=At()});var xt=I(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});var Rt=require("http"),vt=require("https"),qs=require("url");function Es(){let e={keepAlive:!0},t=new Rt.Agent(e),r=new vt.Agent(e);return{send(s){return new Promise(n=>{let a=qs.parse(s.url),o=a.query===null?a.pathname:`${a.pathname}?${a.query}`,d=u({agent:a.protocol==="https:"?r:t,hostname:a.hostname,path:o,method:s.method,headers:s.headers},a.port!==void 0?{port:a.port||""}:{}),y=(a.protocol==="https:"?vt:Rt).request(d,h=>{let S="";h.on("data",O=>S+=O),h.on("end",()=>{clearTimeout(f),clearTimeout(p),n({status:h.statusCode||0,content:S,isTimedOut:!1})})}),b=(h,S)=>setTimeout(()=>{y.abort(),n({status:0,content:S,isTimedOut:!0})},h*1e3),f=b(s.connectTimeout,"Connection timeout"),p;y.on("error",h=>{clearTimeout(f),clearTimeout(p),n({status:0,content:h.message,isTimedOut:!1})}),y.once("response",()=>{clearTimeout(f),p=b(s.responseTimeout,"Socket timeout")}),s.data!==void 0&&y.write(s.data),y.end()})},destroy(){return t.destroy(),r.destroy(),Promise.resolve()}}}fe.createNodeHttpRequester=Es});var Et=I((dn,qt)=>{qt.exports=xt()});var kt=I((pn,Tt)=>{"use strict";var Mt=Ee(),Ts=we(),W=st(),be=F(),Pe=it(),c=It(),Ms=Dt(),ws=Et(),ks=K();function wt(e,t,r){let s={appId:e,apiKey:t,timeouts:{connect:2,read:5,write:30},requester:ws.createNodeHttpRequester(),logger:Ms.createNullLogger(),responsesCache:Mt.createNullCache(),requestsCache:Mt.createNullCache(),hostsCache:Ts.createInMemoryCache(),userAgent:ks.createUserAgent(be.version).add({segment:"Node.js",version:process.versions.node})};return c.createSearchClient(g(u(u({},s),r),{methods:{search:c.multipleQueries,searchForFacetValues:c.multipleSearchForFacetValues,multipleBatch:c.multipleBatch,multipleGetObjects:c.multipleGetObjects,multipleQueries:c.multipleQueries,copyIndex:c.copyIndex,copySettings:c.copySettings,copyRules:c.copyRules,copySynonyms:c.copySynonyms,moveIndex:c.moveIndex,listIndices:c.listIndices,getLogs:c.getLogs,listClusters:c.listClusters,multipleSearchForFacetValues:c.multipleSearchForFacetValues,getApiKey:c.getApiKey,addApiKey:c.addApiKey,listApiKeys:c.listApiKeys,updateApiKey:c.updateApiKey,deleteApiKey:c.deleteApiKey,restoreApiKey:c.restoreApiKey,assignUserID:c.assignUserID,assignUserIDs:c.assignUserIDs,getUserID:c.getUserID,searchUserIDs:c.searchUserIDs,listUserIDs:c.listUserIDs,getTopUserIDs:c.getTopUserIDs,removeUserID:c.removeUserID,hasPendingMappings:c.hasPendingMappings,generateSecuredApiKey:c.generateSecuredApiKey,getSecuredApiKeyRemainingValidity:c.getSecuredApiKeyRemainingValidity,destroy:be.destroy,initIndex:n=>a=>c.initIndex(n)(a,{methods:{batch:c.batch,delete:c.deleteIndex,getObject:c.getObject,getObjects:c.getObjects,saveObject:c.saveObject,saveObjects:c.saveObjects,search:c.search,searchForFacetValues:c.searchForFacetValues,waitTask:c.waitTask,setSettings:c.setSettings,getSettings:c.getSettings,partialUpdateObject:c.partialUpdateObject,partialUpdateObjects:c.partialUpdateObjects,deleteObject:c.deleteObject,deleteObjects:c.deleteObjects,deleteBy:c.deleteBy,clearObjects:c.clearObjects,browseObjects:c.browseObjects,getObjectPosition:c.getObjectPosition,findObject:c.findObject,exists:c.exists,saveSynonym:c.saveSynonym,saveSynonyms:c.saveSynonyms,getSynonym:c.getSynonym,searchSynonyms:c.searchSynonyms,browseSynonyms:c.browseSynonyms,deleteSynonym:c.deleteSynonym,clearSynonyms:c.clearSynonyms,replaceAllObjects:c.replaceAllObjects,replaceAllSynonyms:c.replaceAllSynonyms,searchRules:c.searchRules,getRule:c.getRule,deleteRule:c.deleteRule,saveRule:c.saveRule,saveRules:c.saveRules,replaceAllRules:c.replaceAllRules,browseRules:c.browseRules,clearRules:c.clearRules}}),initAnalytics:()=>n=>W.createAnalyticsClient(g(u(u({},s),n),{methods:{addABTest:W.addABTest,getABTest:W.getABTest,getABTests:W.getABTests,stopABTest:W.stopABTest,deleteABTest:W.deleteABTest}})),initRecommendation:()=>n=>Pe.createRecommendationClient(g(u(u({},s),n),{methods:{getPersonalizationStrategy:Pe.getPersonalizationStrategy,setPersonalizationStrategy:Pe.setPersonalizationStrategy}}))}}))}wt.version=be.version;Tt.exports=wt});var Ut=I((mn,je)=>{var Ct=kt();je.exports=Ct;je.exports.default=Ct});var Ws={};Vt(Ws,{default:()=>Ks});var Oe=C(require("@yarnpkg/core")),E=C(require("@yarnpkg/core")),Ie=C(require("@yarnpkg/plugin-essentials")),Ht=C(require("semver"));var se=C(require("@yarnpkg/core")),Nt=C(Ut()),Cs="e8e1bd300d860104bb8c58453ffa1eb4",Us="OFCNCOG2CU",Wt=async(e,t)=>{var a;let r=se.structUtils.stringifyIdent(e),n=Ns(t).initIndex("npm-search");try{return((a=(await n.getObject(r,{attributesToRetrieve:["types"]})).types)==null?void 0:a.ts)==="definitely-typed"}catch(o){return!1}},Ns=e=>(0,Nt.default)(Us,Cs,{requester:{async send(r){try{let s=await se.httpUtils.request(r.url,r.data||null,{configuration:e,headers:r.headers});return{content:s.body,isTimedOut:!1,status:s.statusCode}}catch(s){return{content:s.response.body,isTimedOut:!1,status:s.response.statusCode}}}}});var _t=e=>e.scope?`${e.scope}__${e.name}`:`${e.name}`,Hs=async(e,t,r,s)=>{if(r.scope==="types")return;let{project:n}=e,{configuration:a}=n,o=a.makeResolver(),d={project:n,resolver:o,report:new E.ThrowReport};if(!await Wt(r,a))return;let b=_t(r),f=E.structUtils.parseRange(r.range).selector;if(!E.semverUtils.validRange(f)){let P=await o.getCandidates(r,new Map,d);f=E.structUtils.parseRange(P[0].reference).selector}let p=Ht.default.coerce(f);if(p===null)return;let h=`${Ie.suggestUtils.Modifier.CARET}${p.major}`,S=E.structUtils.makeDescriptor(E.structUtils.makeIdent("types",b),h),O=E.miscUtils.mapAndFind(n.workspaces,P=>{var T,V;let x=(T=P.manifest.dependencies.get(r.identHash))==null?void 0:T.descriptorHash,v=(V=P.manifest.devDependencies.get(r.identHash))==null?void 0:V.descriptorHash;if(x!==r.descriptorHash&&v!==r.descriptorHash)return E.miscUtils.mapAndFind.skip;let j=[];for(let Ae of Oe.Manifest.allDependencies){let Se=P.manifest[Ae].get(S.identHash);typeof Se!="undefined"&&j.push([Ae,Se])}return j.length===0?E.miscUtils.mapAndFind.skip:j});if(typeof O!="undefined")for(let[P,x]of O)e.manifest[P].set(x.identHash,x);else{try{if((await o.getCandidates(S,new Map,d)).length===0)return}catch{return}e.manifest[Ie.suggestUtils.Target.DEVELOPMENT].set(S.identHash,S)}},_s=async(e,t,r)=>{if(r.scope==="types")return;let s=_t(r),n=E.structUtils.makeIdent("types",s);for(let a of Oe.Manifest.allDependencies)typeof e.manifest[a].get(n.identHash)!="undefined"&&e.manifest[a].delete(n.identHash)},Fs=(e,t)=>{t.publishConfig&&t.publishConfig.typings&&(t.typings=t.publishConfig.typings),t.publishConfig&&t.publishConfig.types&&(t.types=t.publishConfig.types)},Bs={hooks:{afterWorkspaceDependencyAddition:Hs,afterWorkspaceDependencyRemoval:_s,beforeWorkspacePacking:Fs}},Ks=Bs;return Ws;})(); +return plugin; +} +}; diff --git a/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs b/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs new file mode 100644 index 000000000000..b9044a0144c5 --- /dev/null +++ b/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs @@ -0,0 +1,28 @@ +/* eslint-disable */ +//prettier-ignore +module.exports = { +name: "@yarnpkg/plugin-workspace-tools", +factory: function (require) { +var plugin=(()=>{var wr=Object.create,me=Object.defineProperty,Sr=Object.defineProperties,vr=Object.getOwnPropertyDescriptor,Hr=Object.getOwnPropertyDescriptors,$r=Object.getOwnPropertyNames,et=Object.getOwnPropertySymbols,kr=Object.getPrototypeOf,tt=Object.prototype.hasOwnProperty,Tr=Object.prototype.propertyIsEnumerable;var rt=(e,t,r)=>t in e?me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,B=(e,t)=>{for(var r in t||(t={}))tt.call(t,r)&&rt(e,r,t[r]);if(et)for(var r of et(t))Tr.call(t,r)&&rt(e,r,t[r]);return e},Q=(e,t)=>Sr(e,Hr(t)),Lr=e=>me(e,"__esModule",{value:!0});var K=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Or=(e,t)=>{for(var r in t)me(e,r,{get:t[r],enumerable:!0})},Nr=(e,t,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of $r(t))!tt.call(e,n)&&n!=="default"&&me(e,n,{get:()=>t[n],enumerable:!(r=vr(t,n))||r.enumerable});return e},X=e=>Nr(Lr(me(e!=null?wr(kr(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var $e=K(te=>{"use strict";te.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;te.find=(e,t)=>e.nodes.find(r=>r.type===t);te.exceedsLimit=(e,t,r=1,n)=>n===!1||!te.isInteger(e)||!te.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;te.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];!n||(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};te.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0==0?(e.invalid=!0,!0):!1;te.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0==0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;te.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;te.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);te.flatten=(...e)=>{let t=[],r=n=>{for(let s=0;s{"use strict";var it=$e();at.exports=(e,t={})=>{let r=(n,s={})=>{let a=t.escapeInvalid&&it.isInvalidBrace(s),i=n.invalid===!0&&t.escapeInvalid===!0,o="";if(n.value)return(a||i)&&it.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let h of n.nodes)o+=r(h);return o};return r(e)}});var ct=K((os,ot)=>{"use strict";ot.exports=function(e){return typeof e=="number"?e-e==0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var At=K((cs,ut)=>{"use strict";var lt=ct(),pe=(e,t,r)=>{if(lt(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(lt(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n=B({relaxZeros:!0},r);typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let s=String(n.relaxZeros),a=String(n.shorthand),i=String(n.capture),o=String(n.wrap),h=e+":"+t+"="+s+a+i+o;if(pe.cache.hasOwnProperty(h))return pe.cache[h].result;let g=Math.min(e,t),f=Math.max(e,t);if(Math.abs(g-f)===1){let R=e+"|"+t;return n.capture?`(${R})`:n.wrap===!1?R:`(?:${R})`}let A=ft(e)||ft(t),p={min:e,max:t,a:g,b:f},k=[],y=[];if(A&&(p.isPadded=A,p.maxLen=String(p.max).length),g<0){let R=f<0?Math.abs(f):1;y=pt(R,Math.abs(g),p,n),g=p.a=0}return f>=0&&(k=pt(g,f,p,n)),p.negatives=y,p.positives=k,p.result=Ir(y,k,n),n.capture===!0?p.result=`(${p.result})`:n.wrap!==!1&&k.length+y.length>1&&(p.result=`(?:${p.result})`),pe.cache[h]=p,p.result};function Ir(e,t,r){let n=Pe(e,t,"-",!1,r)||[],s=Pe(t,e,"",!1,r)||[],a=Pe(e,t,"-?",!0,r)||[];return n.concat(a).concat(s).join("|")}function Mr(e,t){let r=1,n=1,s=ht(e,r),a=new Set([t]);for(;e<=s&&s<=t;)a.add(s),r+=1,s=ht(e,r);for(s=dt(t+1,n)-1;e1&&o.count.pop(),o.count.push(f.count[0]),o.string=o.pattern+gt(o.count),i=g+1;continue}r.isPadded&&(A=Gr(g,r,n)),f.string=A+f.pattern+gt(f.count),a.push(f),i=g+1,o=f}return a}function Pe(e,t,r,n,s){let a=[];for(let i of e){let{string:o}=i;!n&&!mt(t,"string",o)&&a.push(r+o),n&&mt(t,"string",o)&&a.push(r+o)}return a}function Pr(e,t){let r=[];for(let n=0;nt?1:t>e?-1:0}function mt(e,t,r){return e.some(n=>n[t]===r)}function ht(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function dt(e,t){return e-e%Math.pow(10,t)}function gt(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function Dr(e,t,r){return`[${e}${t-e==1?"":"-"}${t}]`}function ft(e){return/^-?(0+)\d/.test(e)}function Gr(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),s=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${n}}`:`0{${n}}`}}pe.cache={};pe.clearCache=()=>pe.cache={};ut.exports=pe});var Ge=K((us,Rt)=>{"use strict";var qr=require("util"),yt=At(),bt=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Kr=e=>t=>e===!0?Number(t):String(t),De=e=>typeof e=="number"||typeof e=="string"&&e!=="",Re=e=>Number.isInteger(+e),Ue=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},Wr=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,jr=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},_t=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length{e.negatives.sort((i,o)=>io?1:0),e.positives.sort((i,o)=>io?1:0);let r=t.capture?"":"?:",n="",s="",a;return e.positives.length&&(n=e.positives.join("|")),e.negatives.length&&(s=`-(${r}${e.negatives.join("|")})`),n&&s?a=`${n}|${s}`:a=n||s,t.wrap?`(${r}${a})`:a},Et=(e,t,r,n)=>{if(r)return yt(e,t,B({wrap:!1},n));let s=String.fromCharCode(e);if(e===t)return s;let a=String.fromCharCode(t);return`[${s}-${a}]`},xt=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,s=r.capture?"":"?:";return n?`(${s}${e.join("|")})`:e.join("|")}return yt(e,t,r)},Ct=(...e)=>new RangeError("Invalid range arguments: "+qr.inspect(...e)),wt=(e,t,r)=>{if(r.strictRanges===!0)throw Ct([e,t]);return[]},Qr=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},Xr=(e,t,r=1,n={})=>{let s=Number(e),a=Number(t);if(!Number.isInteger(s)||!Number.isInteger(a)){if(n.strictRanges===!0)throw Ct([e,t]);return[]}s===0&&(s=0),a===0&&(a=0);let i=s>a,o=String(e),h=String(t),g=String(r);r=Math.max(Math.abs(r),1);let f=Ue(o)||Ue(h)||Ue(g),A=f?Math.max(o.length,h.length,g.length):0,p=f===!1&&Wr(e,t,n)===!1,k=n.transform||Kr(p);if(n.toRegex&&r===1)return Et(_t(e,A),_t(t,A),!0,n);let y={negatives:[],positives:[]},R=T=>y[T<0?"negatives":"positives"].push(Math.abs(T)),_=[],x=0;for(;i?s>=a:s<=a;)n.toRegex===!0&&r>1?R(s):_.push(jr(k(s,x),A,p)),s=i?s-r:s+r,x++;return n.toRegex===!0?r>1?Fr(y,n):xt(_,null,B({wrap:!1},n)):_},Zr=(e,t,r=1,n={})=>{if(!Re(e)&&e.length>1||!Re(t)&&t.length>1)return wt(e,t,n);let s=n.transform||(p=>String.fromCharCode(p)),a=`${e}`.charCodeAt(0),i=`${t}`.charCodeAt(0),o=a>i,h=Math.min(a,i),g=Math.max(a,i);if(n.toRegex&&r===1)return Et(h,g,!1,n);let f=[],A=0;for(;o?a>=i:a<=i;)f.push(s(a,A)),a=o?a-r:a+r,A++;return n.toRegex===!0?xt(f,null,{wrap:!1,options:n}):f},Te=(e,t,r,n={})=>{if(t==null&&De(e))return[e];if(!De(e)||!De(t))return wt(e,t,n);if(typeof r=="function")return Te(e,t,1,{transform:r});if(bt(r))return Te(e,t,0,r);let s=B({},n);return s.capture===!0&&(s.wrap=!0),r=r||s.step||1,Re(r)?Re(e)&&Re(t)?Xr(e,t,r,s):Zr(e,t,Math.max(Math.abs(r),1),s):r!=null&&!bt(r)?Qr(r,s):Te(e,t,1,r)};Rt.exports=Te});var Ht=K((ls,St)=>{"use strict";var Yr=Ge(),vt=$e(),zr=(e,t={})=>{let r=(n,s={})=>{let a=vt.isInvalidBrace(s),i=n.invalid===!0&&t.escapeInvalid===!0,o=a===!0||i===!0,h=t.escapeInvalid===!0?"\\":"",g="";if(n.isOpen===!0||n.isClose===!0)return h+n.value;if(n.type==="open")return o?h+n.value:"(";if(n.type==="close")return o?h+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":o?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let f=vt.reduce(n.nodes),A=Yr(...f,Q(B({},t),{wrap:!1,toRegex:!0}));if(A.length!==0)return f.length>1&&A.length>1?`(${A})`:A}if(n.nodes)for(let f of n.nodes)g+=r(f,n);return g};return r(e)};St.exports=zr});var Tt=K((ps,$t)=>{"use strict";var Vr=Ge(),kt=ke(),he=$e(),fe=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?he.flatten(t).map(s=>`{${s}}`):t;for(let s of e)if(Array.isArray(s))for(let a of s)n.push(fe(a,t,r));else for(let a of t)r===!0&&typeof a=="string"&&(a=`{${a}}`),n.push(Array.isArray(a)?fe(s,a,r):s+a);return he.flatten(n)},Jr=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(s,a={})=>{s.queue=[];let i=a,o=a.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,o=i.queue;if(s.invalid||s.dollar){o.push(fe(o.pop(),kt(s,t)));return}if(s.type==="brace"&&s.invalid!==!0&&s.nodes.length===2){o.push(fe(o.pop(),["{}"]));return}if(s.nodes&&s.ranges>0){let A=he.reduce(s.nodes);if(he.exceedsLimit(...A,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let p=Vr(...A,t);p.length===0&&(p=kt(s,t)),o.push(fe(o.pop(),p)),s.nodes=[];return}let h=he.encloseBrace(s),g=s.queue,f=s;for(;f.type!=="brace"&&f.type!=="root"&&f.parent;)f=f.parent,g=f.queue;for(let A=0;A{"use strict";Lt.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:` +`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Pt=K((hs,Nt)=>{"use strict";var en=ke(),{MAX_LENGTH:It,CHAR_BACKSLASH:qe,CHAR_BACKTICK:tn,CHAR_COMMA:rn,CHAR_DOT:nn,CHAR_LEFT_PARENTHESES:sn,CHAR_RIGHT_PARENTHESES:an,CHAR_LEFT_CURLY_BRACE:on,CHAR_RIGHT_CURLY_BRACE:cn,CHAR_LEFT_SQUARE_BRACKET:Bt,CHAR_RIGHT_SQUARE_BRACKET:Mt,CHAR_DOUBLE_QUOTE:un,CHAR_SINGLE_QUOTE:ln,CHAR_NO_BREAK_SPACE:pn,CHAR_ZERO_WIDTH_NOBREAK_SPACE:fn}=Ot(),hn=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(It,r.maxLength):It;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let s={type:"root",input:e,nodes:[]},a=[s],i=s,o=s,h=0,g=e.length,f=0,A=0,p,k={},y=()=>e[f++],R=_=>{if(_.type==="text"&&o.type==="dot"&&(o.type="text"),o&&o.type==="text"&&_.type==="text"){o.value+=_.value;return}return i.nodes.push(_),_.parent=i,_.prev=o,o=_,_};for(R({type:"bos"});f0){if(i.ranges>0){i.ranges=0;let _=i.nodes.shift();i.nodes=[_,{type:"text",value:en(i)}]}R({type:"comma",value:p}),i.commas++;continue}if(p===nn&&A>0&&i.commas===0){let _=i.nodes;if(A===0||_.length===0){R({type:"text",value:p});continue}if(o.type==="dot"){if(i.range=[],o.value+=p,o.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,o.type="text";continue}i.ranges++,i.args=[];continue}if(o.type==="range"){_.pop();let x=_[_.length-1];x.value+=o.value+p,o=x,i.ranges--;continue}R({type:"dot",value:p});continue}R({type:"text",value:p})}do if(i=a.pop(),i.type!=="root"){i.nodes.forEach(T=>{T.nodes||(T.type==="open"&&(T.isOpen=!0),T.type==="close"&&(T.isClose=!0),T.nodes||(T.type="text"),T.invalid=!0)});let _=a[a.length-1],x=_.nodes.indexOf(i);_.nodes.splice(x,1,...i.nodes)}while(a.length>0);return R({type:"eos"}),s};Nt.exports=hn});var Gt=K((ds,Dt)=>{"use strict";var Ut=ke(),dn=Ht(),gn=Tt(),mn=Pt(),V=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let s=V.create(n,t);Array.isArray(s)?r.push(...s):r.push(s)}else r=[].concat(V.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};V.parse=(e,t={})=>mn(e,t);V.stringify=(e,t={})=>typeof e=="string"?Ut(V.parse(e,t),t):Ut(e,t);V.compile=(e,t={})=>(typeof e=="string"&&(e=V.parse(e,t)),dn(e,t));V.expand=(e,t={})=>{typeof e=="string"&&(e=V.parse(e,t));let r=gn(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};V.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?V.compile(e,t):V.expand(e,t);Dt.exports=V});var ye=K((gs,qt)=>{"use strict";var An=require("path"),ie="\\\\/",Kt=`[^${ie}]`,ce="\\.",Rn="\\+",yn="\\?",Le="\\/",bn="(?=.)",Wt="[^/]",Ke=`(?:${Le}|$)`,jt=`(?:^|${Le})`,We=`${ce}{1,2}${Ke}`,_n=`(?!${ce})`,En=`(?!${jt}${We})`,xn=`(?!${ce}{0,1}${Ke})`,Cn=`(?!${We})`,wn=`[^.${Le}]`,Sn=`${Wt}*?`,Ft={DOT_LITERAL:ce,PLUS_LITERAL:Rn,QMARK_LITERAL:yn,SLASH_LITERAL:Le,ONE_CHAR:bn,QMARK:Wt,END_ANCHOR:Ke,DOTS_SLASH:We,NO_DOT:_n,NO_DOTS:En,NO_DOT_SLASH:xn,NO_DOTS_SLASH:Cn,QMARK_NO_DOT:wn,STAR:Sn,START_ANCHOR:jt},vn=Q(B({},Ft),{SLASH_LITERAL:`[${ie}]`,QMARK:Kt,STAR:`${Kt}*?`,DOTS_SLASH:`${ce}{1,2}(?:[${ie}]|$)`,NO_DOT:`(?!${ce})`,NO_DOTS:`(?!(?:^|[${ie}])${ce}{1,2}(?:[${ie}]|$))`,NO_DOT_SLASH:`(?!${ce}{0,1}(?:[${ie}]|$))`,NO_DOTS_SLASH:`(?!${ce}{1,2}(?:[${ie}]|$))`,QMARK_NO_DOT:`[^.${ie}]`,START_ANCHOR:`(?:^|[${ie}])`,END_ANCHOR:`(?:[${ie}]|$)`}),Hn={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};qt.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Hn,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:An.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?vn:Ft}}});var be=K(Z=>{"use strict";var $n=require("path"),kn=process.platform==="win32",{REGEX_BACKSLASH:Tn,REGEX_REMOVE_BACKSLASH:Ln,REGEX_SPECIAL_CHARS:On,REGEX_SPECIAL_CHARS_GLOBAL:Nn}=ye();Z.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Z.hasRegexChars=e=>On.test(e);Z.isRegexChar=e=>e.length===1&&Z.hasRegexChars(e);Z.escapeRegex=e=>e.replace(Nn,"\\$1");Z.toPosixSlashes=e=>e.replace(Tn,"/");Z.removeBackslashes=e=>e.replace(Ln,t=>t==="\\"?"":t);Z.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Z.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:kn===!0||$n.sep==="\\";Z.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?Z.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};Z.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};Z.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",s=r.contains?"":"$",a=`${n}(?:${e})${s}`;return t.negated===!0&&(a=`(?:^(?!${a}).*$)`),a}});var er=K((As,Qt)=>{"use strict";var Xt=be(),{CHAR_ASTERISK:je,CHAR_AT:In,CHAR_BACKWARD_SLASH:_e,CHAR_COMMA:Bn,CHAR_DOT:Fe,CHAR_EXCLAMATION_MARK:Qe,CHAR_FORWARD_SLASH:Zt,CHAR_LEFT_CURLY_BRACE:Xe,CHAR_LEFT_PARENTHESES:Ze,CHAR_LEFT_SQUARE_BRACKET:Mn,CHAR_PLUS:Pn,CHAR_QUESTION_MARK:Yt,CHAR_RIGHT_CURLY_BRACE:Dn,CHAR_RIGHT_PARENTHESES:zt,CHAR_RIGHT_SQUARE_BRACKET:Un}=ye(),Vt=e=>e===Zt||e===_e,Jt=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?Infinity:1)},Gn=(e,t)=>{let r=t||{},n=e.length-1,s=r.parts===!0||r.scanToEnd===!0,a=[],i=[],o=[],h=e,g=-1,f=0,A=0,p=!1,k=!1,y=!1,R=!1,_=!1,x=!1,T=!1,O=!1,W=!1,G=!1,ne=0,E,b,C={value:"",depth:0,isGlob:!1},M=()=>g>=n,l=()=>h.charCodeAt(g+1),H=()=>(E=b,h.charCodeAt(++g));for(;g0&&(j=h.slice(0,f),h=h.slice(f),A-=f),w&&y===!0&&A>0?(w=h.slice(0,A),c=h.slice(A)):y===!0?(w="",c=h):w=h,w&&w!==""&&w!=="/"&&w!==h&&Vt(w.charCodeAt(w.length-1))&&(w=w.slice(0,-1)),r.unescape===!0&&(c&&(c=Xt.removeBackslashes(c)),w&&T===!0&&(w=Xt.removeBackslashes(w)));let u={prefix:j,input:e,start:f,base:w,glob:c,isBrace:p,isBracket:k,isGlob:y,isExtglob:R,isGlobstar:_,negated:O,negatedExtglob:W};if(r.tokens===!0&&(u.maxDepth=0,Vt(b)||i.push(C),u.tokens=i),r.parts===!0||r.tokens===!0){let I;for(let $=0;${"use strict";var Oe=ye(),J=be(),{MAX_LENGTH:Ne,POSIX_REGEX_SOURCE:qn,REGEX_NON_SPECIAL_CHARS:Kn,REGEX_SPECIAL_CHARS_BACKREF:Wn,REPLACEMENTS:rr}=Oe,jn=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch(n){return e.map(s=>J.escapeRegex(s)).join("..")}return r},de=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,nr=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=rr[e]||e;let r=B({},t),n=typeof r.maxLength=="number"?Math.min(Ne,r.maxLength):Ne,s=e.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);let a={type:"bos",value:"",output:r.prepend||""},i=[a],o=r.capture?"":"?:",h=J.isWindows(t),g=Oe.globChars(h),f=Oe.extglobChars(g),{DOT_LITERAL:A,PLUS_LITERAL:p,SLASH_LITERAL:k,ONE_CHAR:y,DOTS_SLASH:R,NO_DOT:_,NO_DOT_SLASH:x,NO_DOTS_SLASH:T,QMARK:O,QMARK_NO_DOT:W,STAR:G,START_ANCHOR:ne}=g,E=m=>`(${o}(?:(?!${ne}${m.dot?R:A}).)*?)`,b=r.dot?"":_,C=r.dot?O:W,M=r.bash===!0?E(r):G;r.capture&&(M=`(${M})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let l={input:e,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:i};e=J.removePrefix(e,l),s=e.length;let H=[],w=[],j=[],c=a,u,I=()=>l.index===s-1,$=l.peek=(m=1)=>e[l.index+m],ee=l.advance=()=>e[++l.index]||"",se=()=>e.slice(l.index+1),z=(m="",L=0)=>{l.consumed+=m,l.index+=L},Ce=m=>{l.output+=m.output!=null?m.output:m.value,z(m.value)},xr=()=>{let m=1;for(;$()==="!"&&($(2)!=="("||$(3)==="?");)ee(),l.start++,m++;return m%2==0?!1:(l.negated=!0,l.start++,!0)},we=m=>{l[m]++,j.push(m)},ue=m=>{l[m]--,j.pop()},v=m=>{if(c.type==="globstar"){let L=l.braces>0&&(m.type==="comma"||m.type==="brace"),d=m.extglob===!0||H.length&&(m.type==="pipe"||m.type==="paren");m.type!=="slash"&&m.type!=="paren"&&!L&&!d&&(l.output=l.output.slice(0,-c.output.length),c.type="star",c.value="*",c.output=M,l.output+=c.output)}if(H.length&&m.type!=="paren"&&(H[H.length-1].inner+=m.value),(m.value||m.output)&&Ce(m),c&&c.type==="text"&&m.type==="text"){c.value+=m.value,c.output=(c.output||"")+m.value;return}m.prev=c,i.push(m),c=m},Se=(m,L)=>{let d=Q(B({},f[L]),{conditions:1,inner:""});d.prev=c,d.parens=l.parens,d.output=l.output;let S=(r.capture?"(":"")+d.open;we("parens"),v({type:m,value:L,output:l.output?"":y}),v({type:"paren",extglob:!0,value:ee(),output:S}),H.push(d)},Cr=m=>{let L=m.close+(r.capture?")":""),d;if(m.type==="negate"){let S=M;m.inner&&m.inner.length>1&&m.inner.includes("/")&&(S=E(r)),(S!==M||I()||/^\)+$/.test(se()))&&(L=m.close=`)$))${S}`),m.inner.includes("*")&&(d=se())&&/^\.[^\\/.]+$/.test(d)&&(L=m.close=`)${d})${S})`),m.prev.type==="bos"&&(l.negatedExtglob=!0)}v({type:"paren",extglob:!0,value:u,output:L}),ue("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let m=!1,L=e.replace(Wn,(d,S,P,F,q,Me)=>F==="\\"?(m=!0,d):F==="?"?S?S+F+(q?O.repeat(q.length):""):Me===0?C+(q?O.repeat(q.length):""):O.repeat(P.length):F==="."?A.repeat(P.length):F==="*"?S?S+F+(q?M:""):M:S?d:`\\${d}`);return m===!0&&(r.unescape===!0?L=L.replace(/\\/g,""):L=L.replace(/\\+/g,d=>d.length%2==0?"\\\\":d?"\\":"")),L===e&&r.contains===!0?(l.output=e,l):(l.output=J.wrapOutput(L,l,t),l)}for(;!I();){if(u=ee(),u==="\0")continue;if(u==="\\"){let d=$();if(d==="/"&&r.bash!==!0||d==="."||d===";")continue;if(!d){u+="\\",v({type:"text",value:u});continue}let S=/^\\+/.exec(se()),P=0;if(S&&S[0].length>2&&(P=S[0].length,l.index+=P,P%2!=0&&(u+="\\")),r.unescape===!0?u=ee():u+=ee(),l.brackets===0){v({type:"text",value:u});continue}}if(l.brackets>0&&(u!=="]"||c.value==="["||c.value==="[^")){if(r.posix!==!1&&u===":"){let d=c.value.slice(1);if(d.includes("[")&&(c.posix=!0,d.includes(":"))){let S=c.value.lastIndexOf("["),P=c.value.slice(0,S),F=c.value.slice(S+2),q=qn[F];if(q){c.value=P+q,l.backtrack=!0,ee(),!a.output&&i.indexOf(c)===1&&(a.output=y);continue}}}(u==="["&&$()!==":"||u==="-"&&$()==="]")&&(u=`\\${u}`),u==="]"&&(c.value==="["||c.value==="[^")&&(u=`\\${u}`),r.posix===!0&&u==="!"&&c.value==="["&&(u="^"),c.value+=u,Ce({value:u});continue}if(l.quotes===1&&u!=='"'){u=J.escapeRegex(u),c.value+=u,Ce({value:u});continue}if(u==='"'){l.quotes=l.quotes===1?0:1,r.keepQuotes===!0&&v({type:"text",value:u});continue}if(u==="("){we("parens"),v({type:"paren",value:u});continue}if(u===")"){if(l.parens===0&&r.strictBrackets===!0)throw new SyntaxError(de("opening","("));let d=H[H.length-1];if(d&&l.parens===d.parens+1){Cr(H.pop());continue}v({type:"paren",value:u,output:l.parens?")":"\\)"}),ue("parens");continue}if(u==="["){if(r.nobracket===!0||!se().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(de("closing","]"));u=`\\${u}`}else we("brackets");v({type:"bracket",value:u});continue}if(u==="]"){if(r.nobracket===!0||c&&c.type==="bracket"&&c.value.length===1){v({type:"text",value:u,output:`\\${u}`});continue}if(l.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(de("opening","["));v({type:"text",value:u,output:`\\${u}`});continue}ue("brackets");let d=c.value.slice(1);if(c.posix!==!0&&d[0]==="^"&&!d.includes("/")&&(u=`/${u}`),c.value+=u,Ce({value:u}),r.literalBrackets===!1||J.hasRegexChars(d))continue;let S=J.escapeRegex(c.value);if(l.output=l.output.slice(0,-c.value.length),r.literalBrackets===!0){l.output+=S,c.value=S;continue}c.value=`(${o}${S}|${c.value})`,l.output+=c.value;continue}if(u==="{"&&r.nobrace!==!0){we("braces");let d={type:"brace",value:u,output:"(",outputIndex:l.output.length,tokensIndex:l.tokens.length};w.push(d),v(d);continue}if(u==="}"){let d=w[w.length-1];if(r.nobrace===!0||!d){v({type:"text",value:u,output:u});continue}let S=")";if(d.dots===!0){let P=i.slice(),F=[];for(let q=P.length-1;q>=0&&(i.pop(),P[q].type!=="brace");q--)P[q].type!=="dots"&&F.unshift(P[q].value);S=jn(F,r),l.backtrack=!0}if(d.comma!==!0&&d.dots!==!0){let P=l.output.slice(0,d.outputIndex),F=l.tokens.slice(d.tokensIndex);d.value=d.output="\\{",u=S="\\}",l.output=P;for(let q of F)l.output+=q.output||q.value}v({type:"brace",value:u,output:S}),ue("braces"),w.pop();continue}if(u==="|"){H.length>0&&H[H.length-1].conditions++,v({type:"text",value:u});continue}if(u===","){let d=u,S=w[w.length-1];S&&j[j.length-1]==="braces"&&(S.comma=!0,d="|"),v({type:"comma",value:u,output:d});continue}if(u==="/"){if(c.type==="dot"&&l.index===l.start+1){l.start=l.index+1,l.consumed="",l.output="",i.pop(),c=a;continue}v({type:"slash",value:u,output:k});continue}if(u==="."){if(l.braces>0&&c.type==="dot"){c.value==="."&&(c.output=A);let d=w[w.length-1];c.type="dots",c.output+=u,c.value+=u,d.dots=!0;continue}if(l.braces+l.parens===0&&c.type!=="bos"&&c.type!=="slash"){v({type:"text",value:u,output:A});continue}v({type:"dot",value:u,output:A});continue}if(u==="?"){if(!(c&&c.value==="(")&&r.noextglob!==!0&&$()==="("&&$(2)!=="?"){Se("qmark",u);continue}if(c&&c.type==="paren"){let S=$(),P=u;if(S==="<"&&!J.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(c.value==="("&&!/[!=<:]/.test(S)||S==="<"&&!/<([!=]|\w+>)/.test(se()))&&(P=`\\${u}`),v({type:"text",value:u,output:P});continue}if(r.dot!==!0&&(c.type==="slash"||c.type==="bos")){v({type:"qmark",value:u,output:W});continue}v({type:"qmark",value:u,output:O});continue}if(u==="!"){if(r.noextglob!==!0&&$()==="("&&($(2)!=="?"||!/[!=<:]/.test($(3)))){Se("negate",u);continue}if(r.nonegate!==!0&&l.index===0){xr();continue}}if(u==="+"){if(r.noextglob!==!0&&$()==="("&&$(2)!=="?"){Se("plus",u);continue}if(c&&c.value==="("||r.regex===!1){v({type:"plus",value:u,output:p});continue}if(c&&(c.type==="bracket"||c.type==="paren"||c.type==="brace")||l.parens>0){v({type:"plus",value:u});continue}v({type:"plus",value:p});continue}if(u==="@"){if(r.noextglob!==!0&&$()==="("&&$(2)!=="?"){v({type:"at",extglob:!0,value:u,output:""});continue}v({type:"text",value:u});continue}if(u!=="*"){(u==="$"||u==="^")&&(u=`\\${u}`);let d=Kn.exec(se());d&&(u+=d[0],l.index+=d[0].length),v({type:"text",value:u});continue}if(c&&(c.type==="globstar"||c.star===!0)){c.type="star",c.star=!0,c.value+=u,c.output=M,l.backtrack=!0,l.globstar=!0,z(u);continue}let m=se();if(r.noextglob!==!0&&/^\([^?]/.test(m)){Se("star",u);continue}if(c.type==="star"){if(r.noglobstar===!0){z(u);continue}let d=c.prev,S=d.prev,P=d.type==="slash"||d.type==="bos",F=S&&(S.type==="star"||S.type==="globstar");if(r.bash===!0&&(!P||m[0]&&m[0]!=="/")){v({type:"star",value:u,output:""});continue}let q=l.braces>0&&(d.type==="comma"||d.type==="brace"),Me=H.length&&(d.type==="pipe"||d.type==="paren");if(!P&&d.type!=="paren"&&!q&&!Me){v({type:"star",value:u,output:""});continue}for(;m.slice(0,3)==="/**";){let ve=e[l.index+4];if(ve&&ve!=="/")break;m=m.slice(3),z("/**",3)}if(d.type==="bos"&&I()){c.type="globstar",c.value+=u,c.output=E(r),l.output=c.output,l.globstar=!0,z(u);continue}if(d.type==="slash"&&d.prev.type!=="bos"&&!F&&I()){l.output=l.output.slice(0,-(d.output+c.output).length),d.output=`(?:${d.output}`,c.type="globstar",c.output=E(r)+(r.strictSlashes?")":"|$)"),c.value+=u,l.globstar=!0,l.output+=d.output+c.output,z(u);continue}if(d.type==="slash"&&d.prev.type!=="bos"&&m[0]==="/"){let ve=m[1]!==void 0?"|$":"";l.output=l.output.slice(0,-(d.output+c.output).length),d.output=`(?:${d.output}`,c.type="globstar",c.output=`${E(r)}${k}|${k}${ve})`,c.value+=u,l.output+=d.output+c.output,l.globstar=!0,z(u+ee()),v({type:"slash",value:"/",output:""});continue}if(d.type==="bos"&&m[0]==="/"){c.type="globstar",c.value+=u,c.output=`(?:^|${k}|${E(r)}${k})`,l.output=c.output,l.globstar=!0,z(u+ee()),v({type:"slash",value:"/",output:""});continue}l.output=l.output.slice(0,-c.output.length),c.type="globstar",c.output=E(r),c.value+=u,l.output+=c.output,l.globstar=!0,z(u);continue}let L={type:"star",value:u,output:M};if(r.bash===!0){L.output=".*?",(c.type==="bos"||c.type==="slash")&&(L.output=b+L.output),v(L);continue}if(c&&(c.type==="bracket"||c.type==="paren")&&r.regex===!0){L.output=u,v(L);continue}(l.index===l.start||c.type==="slash"||c.type==="dot")&&(c.type==="dot"?(l.output+=x,c.output+=x):r.dot===!0?(l.output+=T,c.output+=T):(l.output+=b,c.output+=b),$()!=="*"&&(l.output+=y,c.output+=y)),v(L)}for(;l.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(de("closing","]"));l.output=J.escapeLast(l.output,"["),ue("brackets")}for(;l.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(de("closing",")"));l.output=J.escapeLast(l.output,"("),ue("parens")}for(;l.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(de("closing","}"));l.output=J.escapeLast(l.output,"{"),ue("braces")}if(r.strictSlashes!==!0&&(c.type==="star"||c.type==="bracket")&&v({type:"maybe_slash",value:"",output:`${k}?`}),l.backtrack===!0){l.output="";for(let m of l.tokens)l.output+=m.output!=null?m.output:m.value,m.suffix&&(l.output+=m.suffix)}return l};nr.fastpaths=(e,t)=>{let r=B({},t),n=typeof r.maxLength=="number"?Math.min(Ne,r.maxLength):Ne,s=e.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);e=rr[e]||e;let a=J.isWindows(t),{DOT_LITERAL:i,SLASH_LITERAL:o,ONE_CHAR:h,DOTS_SLASH:g,NO_DOT:f,NO_DOTS:A,NO_DOTS_SLASH:p,STAR:k,START_ANCHOR:y}=Oe.globChars(a),R=r.dot?A:f,_=r.dot?p:f,x=r.capture?"":"?:",T={negated:!1,prefix:""},O=r.bash===!0?".*?":k;r.capture&&(O=`(${O})`);let W=b=>b.noglobstar===!0?O:`(${x}(?:(?!${y}${b.dot?g:i}).)*?)`,G=b=>{switch(b){case"*":return`${R}${h}${O}`;case".*":return`${i}${h}${O}`;case"*.*":return`${R}${O}${i}${h}${O}`;case"*/*":return`${R}${O}${o}${h}${_}${O}`;case"**":return R+W(r);case"**/*":return`(?:${R}${W(r)}${o})?${_}${h}${O}`;case"**/*.*":return`(?:${R}${W(r)}${o})?${_}${O}${i}${h}${O}`;case"**/.*":return`(?:${R}${W(r)}${o})?${i}${h}${O}`;default:{let C=/^(.*?)\.(\w+)$/.exec(b);if(!C)return;let M=G(C[1]);return M?M+i+C[2]:void 0}}},ne=J.removePrefix(e,T),E=G(ne);return E&&r.strictSlashes!==!0&&(E+=`${o}?`),E};tr.exports=nr});var ir=K((ys,ar)=>{"use strict";var Fn=require("path"),Qn=er(),Ye=sr(),ze=be(),Xn=ye(),Zn=e=>e&&typeof e=="object"&&!Array.isArray(e),D=(e,t,r=!1)=>{if(Array.isArray(e)){let f=e.map(p=>D(p,t,r));return p=>{for(let k of f){let y=k(p);if(y)return y}return!1}}let n=Zn(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let s=t||{},a=ze.isWindows(t),i=n?D.compileRe(e,t):D.makeRe(e,t,!1,!0),o=i.state;delete i.state;let h=()=>!1;if(s.ignore){let f=Q(B({},t),{ignore:null,onMatch:null,onResult:null});h=D(s.ignore,f,r)}let g=(f,A=!1)=>{let{isMatch:p,match:k,output:y}=D.test(f,i,t,{glob:e,posix:a}),R={glob:e,state:o,regex:i,posix:a,input:f,output:y,match:k,isMatch:p};return typeof s.onResult=="function"&&s.onResult(R),p===!1?(R.isMatch=!1,A?R:!1):h(f)?(typeof s.onIgnore=="function"&&s.onIgnore(R),R.isMatch=!1,A?R:!1):(typeof s.onMatch=="function"&&s.onMatch(R),A?R:!0)};return r&&(g.state=o),g};D.test=(e,t,r,{glob:n,posix:s}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let a=r||{},i=a.format||(s?ze.toPosixSlashes:null),o=e===n,h=o&&i?i(e):e;return o===!1&&(h=i?i(e):e,o=h===n),(o===!1||a.capture===!0)&&(a.matchBase===!0||a.basename===!0?o=D.matchBase(e,t,r,s):o=t.exec(h)),{isMatch:Boolean(o),match:o,output:h}};D.matchBase=(e,t,r,n=ze.isWindows(r))=>(t instanceof RegExp?t:D.makeRe(t,r)).test(Fn.basename(e));D.isMatch=(e,t,r)=>D(t,r)(e);D.parse=(e,t)=>Array.isArray(e)?e.map(r=>D.parse(r,t)):Ye(e,Q(B({},t),{fastpaths:!1}));D.scan=(e,t)=>Qn(e,t);D.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let s=t||{},a=s.contains?"":"^",i=s.contains?"":"$",o=`${a}(?:${e.output})${i}`;e&&e.negated===!0&&(o=`^(?!${o}).*$`);let h=D.toRegex(o,t);return n===!0&&(h.state=e),h};D.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(s.output=Ye.fastpaths(e,t)),s.output||(s=Ye(e,t)),D.compileRe(s,t,r,n)};D.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};D.constants=Xn;ar.exports=D});var cr=K((bs,or)=>{"use strict";or.exports=ir()});var hr=K((_s,ur)=>{"use strict";var lr=require("util"),pr=Gt(),oe=cr(),Ve=be(),fr=e=>e===""||e==="./",N=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,s=new Set,a=new Set,i=0,o=f=>{a.add(f.output),r&&r.onResult&&r.onResult(f)};for(let f=0;f!n.has(f));if(r&&g.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(f=>f.replace(/\\/g,"")):t}return g};N.match=N;N.matcher=(e,t)=>oe(e,t);N.isMatch=(e,t,r)=>oe(t,r)(e);N.any=N.isMatch;N.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,s=[],a=o=>{r.onResult&&r.onResult(o),s.push(o.output)},i=N(e,t,Q(B({},r),{onResult:a}));for(let o of s)i.includes(o)||n.add(o);return[...n]};N.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${lr.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>N.contains(e,n,r));if(typeof t=="string"){if(fr(e)||fr(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return N.isMatch(e,t,Q(B({},r),{contains:!0}))};N.matchKeys=(e,t,r)=>{if(!Ve.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=N(Object.keys(e),t,r),s={};for(let a of n)s[a]=e[a];return s};N.some=(e,t,r)=>{let n=[].concat(e);for(let s of[].concat(t)){let a=oe(String(s),r);if(n.some(i=>a(i)))return!0}return!1};N.every=(e,t,r)=>{let n=[].concat(e);for(let s of[].concat(t)){let a=oe(String(s),r);if(!n.every(i=>a(i)))return!1}return!0};N.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${lr.inspect(e)}"`);return[].concat(t).every(n=>oe(n,r)(e))};N.capture=(e,t,r)=>{let n=Ve.isWindows(r),a=oe.makeRe(String(e),Q(B({},r),{capture:!0})).exec(n?Ve.toPosixSlashes(t):t);if(a)return a.slice(1).map(i=>i===void 0?"":i)};N.makeRe=(...e)=>oe.makeRe(...e);N.scan=(...e)=>oe.scan(...e);N.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let s of pr(String(n),t))r.push(oe.parse(s,t));return r};N.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!/\{.*\}/.test(e)?[e]:pr(e,t)};N.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return N.braces(e,Q(B({},t),{expand:!0}))};ur.exports=N});var gr=K((Es,dr)=>{"use strict";dr.exports=(e,...t)=>new Promise(r=>{r(e(...t))})});var Ar=K((xs,Je)=>{"use strict";var Yn=gr(),mr=e=>{if(e<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let t=[],r=0,n=()=>{r--,t.length>0&&t.shift()()},s=(o,h,...g)=>{r++;let f=Yn(o,...g);h(f),f.then(n,n)},a=(o,h,...g)=>{rnew Promise(g=>a(o,g,...h));return Object.defineProperties(i,{activeCount:{get:()=>r},pendingCount:{get:()=>t.length}}),i};Je.exports=mr;Je.exports.default=mr});var Vn={};Or(Vn,{default:()=>es});var He=X(require("@yarnpkg/cli")),ae=X(require("@yarnpkg/core")),nt=X(require("@yarnpkg/core")),le=X(require("clipanion")),Ae=class extends He.BaseCommand{constructor(){super(...arguments);this.json=le.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.production=le.Option.Boolean("--production",!1,{description:"Only install regular dependencies by omitting dev dependencies"});this.all=le.Option.Boolean("-A,--all",!1,{description:"Install the entire project"});this.workspaces=le.Option.Rest()}async execute(){let t=await ae.Configuration.find(this.context.cwd,this.context.plugins),{project:r,workspace:n}=await ae.Project.find(t,this.context.cwd),s=await ae.Cache.find(t);await r.restoreInstallState({restoreResolutions:!1});let a;if(this.all)a=new Set(r.workspaces);else if(this.workspaces.length===0){if(!n)throw new He.WorkspaceRequiredError(r.cwd,this.context.cwd);a=new Set([n])}else a=new Set(this.workspaces.map(o=>r.getWorkspaceByIdent(nt.structUtils.parseIdent(o))));for(let o of a)for(let h of this.production?["dependencies"]:ae.Manifest.hardDependencies)for(let g of o.manifest.getForScope(h).values()){let f=r.tryWorkspaceByDescriptor(g);f!==null&&a.add(f)}for(let o of r.workspaces)a.has(o)?this.production&&o.manifest.devDependencies.clear():(o.manifest.installConfig=o.manifest.installConfig||{},o.manifest.installConfig.selfReferences=!1,o.manifest.dependencies.clear(),o.manifest.devDependencies.clear(),o.manifest.peerDependencies.clear(),o.manifest.scripts.clear());return(await ae.StreamReport.start({configuration:t,json:this.json,stdout:this.context.stdout,includeLogs:!0},async o=>{await r.install({cache:s,report:o,persistProject:!1})})).exitCode()}};Ae.paths=[["workspaces","focus"]],Ae.usage=le.Command.Usage({category:"Workspace-related commands",description:"install a single workspace and its dependencies",details:"\n This command will run an install as if the specified workspaces (and all other workspaces they depend on) were the only ones in the project. If no workspaces are explicitly listed, the active one will be assumed.\n\n Note that this command is only very moderately useful when using zero-installs, since the cache will contain all the packages anyway - meaning that the only difference between a full install and a focused install would just be a few extra lines in the `.pnp.cjs` file, at the cost of introducing an extra complexity.\n\n If the `-A,--all` flag is set, the entire project will be installed. Combine with `--production` to replicate the old `yarn install --production`.\n "});var st=Ae;var Ie=X(require("@yarnpkg/cli")),ge=X(require("@yarnpkg/core")),Ee=X(require("@yarnpkg/core")),Y=X(require("@yarnpkg/core")),Rr=X(require("@yarnpkg/plugin-git")),U=X(require("clipanion")),Be=X(hr()),yr=X(require("os")),br=X(Ar()),re=X(require("typanion")),xe=class extends Ie.BaseCommand{constructor(){super(...arguments);this.recursive=U.Option.Boolean("-R,--recursive",!1,{description:"Find packages via dependencies/devDependencies instead of using the workspaces field"});this.from=U.Option.Array("--from",[],{description:"An array of glob pattern idents from which to base any recursion"});this.all=U.Option.Boolean("-A,--all",!1,{description:"Run the command on all workspaces of a project"});this.verbose=U.Option.Boolean("-v,--verbose",!1,{description:"Prefix each output line with the name of the originating workspace"});this.parallel=U.Option.Boolean("-p,--parallel",!1,{description:"Run the commands in parallel"});this.interlaced=U.Option.Boolean("-i,--interlaced",!1,{description:"Print the output of commands in real-time instead of buffering it"});this.jobs=U.Option.String("-j,--jobs",{description:"The maximum number of parallel tasks that the execution will be limited to; or `unlimited`",validator:re.isOneOf([re.isEnum(["unlimited"]),re.applyCascade(re.isNumber(),[re.isInteger(),re.isAtLeast(1)])])});this.topological=U.Option.Boolean("-t,--topological",!1,{description:"Run the command after all workspaces it depends on (regular) have finished"});this.topologicalDev=U.Option.Boolean("--topological-dev",!1,{description:"Run the command after all workspaces it depends on (regular + dev) have finished"});this.include=U.Option.Array("--include",[],{description:"An array of glob pattern idents; only matching workspaces will be traversed"});this.exclude=U.Option.Array("--exclude",[],{description:"An array of glob pattern idents; matching workspaces won't be traversed"});this.publicOnly=U.Option.Boolean("--no-private",{description:"Avoid running the command on private workspaces"});this.since=U.Option.String("--since",{description:"Only include workspaces that have been changed since the specified ref.",tolerateBoolean:!0});this.commandName=U.Option.String();this.args=U.Option.Proxy()}async execute(){let t=await ge.Configuration.find(this.context.cwd,this.context.plugins),{project:r,workspace:n}=await ge.Project.find(t,this.context.cwd);if(!this.all&&!n)throw new Ie.WorkspaceRequiredError(r.cwd,this.context.cwd);await r.restoreInstallState();let s=this.cli.process([this.commandName,...this.args]),a=s.path.length===1&&s.path[0]==="run"&&typeof s.scriptName!="undefined"?s.scriptName:null;if(s.path.length===0)throw new U.UsageError("Invalid subcommand name for iteration - use the 'run' keyword if you wish to execute a script");let i=this.all?r.topLevelWorkspace:n,o=this.since?Array.from(await Rr.gitUtils.fetchChangedWorkspaces({ref:this.since,project:r})):[i,...this.from.length>0?i.getRecursiveWorkspaceChildren():[]],h=E=>Be.default.isMatch(Y.structUtils.stringifyIdent(E.locator),this.from),g=this.from.length>0?o.filter(h):o,f=new Set([...g,...g.map(E=>[...this.recursive?this.since?E.getRecursiveWorkspaceDependents():E.getRecursiveWorkspaceDependencies():E.getRecursiveWorkspaceChildren()]).flat()]),A=[],p=!1;if(a==null?void 0:a.includes(":")){for(let E of r.workspaces)if(E.manifest.scripts.has(a)&&(p=!p,p===!1))break}for(let E of f)a&&!E.manifest.scripts.has(a)&&!p&&!(await ge.scriptUtils.getWorkspaceAccessibleBinaries(E)).has(a)||a===process.env.npm_lifecycle_event&&E.cwd===n.cwd||this.include.length>0&&!Be.default.isMatch(Y.structUtils.stringifyIdent(E.locator),this.include)||this.exclude.length>0&&Be.default.isMatch(Y.structUtils.stringifyIdent(E.locator),this.exclude)||this.publicOnly&&E.manifest.private===!0||A.push(E);let k=this.parallel?this.jobs==="unlimited"?Infinity:this.jobs||Math.max(1,(0,yr.cpus)().length/2):1,y=k===1?!1:this.parallel,R=y?this.interlaced:!0,_=(0,br.default)(k),x=new Map,T=new Set,O=0,W=null,G=!1,ne=await Ee.StreamReport.start({configuration:t,stdout:this.context.stdout},async E=>{let b=async(C,{commandIndex:M})=>{if(G)return-1;!y&&this.verbose&&M>1&&E.reportSeparator();let l=zn(C,{configuration:t,verbose:this.verbose,commandIndex:M}),[H,w]=_r(E,{prefix:l,interlaced:R}),[j,c]=_r(E,{prefix:l,interlaced:R});try{this.verbose&&E.reportInfo(null,`${l} Process started`);let u=Date.now(),I=await this.cli.run([this.commandName,...this.args],{cwd:C.cwd,stdout:H,stderr:j})||0;H.end(),j.end(),await w,await c;let $=Date.now();if(this.verbose){let ee=t.get("enableTimers")?`, completed in ${Y.formatUtils.pretty(t,$-u,Y.formatUtils.Type.DURATION)}`:"";E.reportInfo(null,`${l} Process exited (exit code ${I})${ee}`)}return I===130&&(G=!0,W=I),I}catch(u){throw H.end(),j.end(),await w,await c,u}};for(let C of A)x.set(C.anchoredLocator.locatorHash,C);for(;x.size>0&&!E.hasErrors();){let C=[];for(let[H,w]of x){if(T.has(w.anchoredDescriptor.descriptorHash))continue;let j=!0;if(this.topological||this.topologicalDev){let c=this.topologicalDev?new Map([...w.manifest.dependencies,...w.manifest.devDependencies]):w.manifest.dependencies;for(let u of c.values()){let I=r.tryWorkspaceByDescriptor(u);if(j=I===null||!x.has(I.anchoredLocator.locatorHash),!j)break}}if(!!j&&(T.add(w.anchoredDescriptor.descriptorHash),C.push(_(async()=>{let c=await b(w,{commandIndex:++O});return x.delete(H),T.delete(w.anchoredDescriptor.descriptorHash),c})),!y))break}if(C.length===0){let H=Array.from(x.values()).map(w=>Y.structUtils.prettyLocator(t,w.anchoredLocator)).join(", ");E.reportError(Ee.MessageName.CYCLIC_DEPENDENCIES,`Dependency cycle detected (${H})`);return}let l=(await Promise.all(C)).find(H=>H!==0);W===null&&(W=typeof l!="undefined"?1:W),(this.topological||this.topologicalDev)&&typeof l!="undefined"&&E.reportError(Ee.MessageName.UNNAMED,"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph")}});return W!==null?W:ne.exitCode()}};xe.paths=[["workspaces","foreach"]],xe.usage=U.Command.Usage({category:"Workspace-related commands",description:"run a command on all workspaces",details:"\n This command will run a given sub-command on current and all its descendant workspaces. Various flags can alter the exact behavior of the command:\n\n - If `-p,--parallel` is set, the commands will be ran in parallel; they'll by default be limited to a number of parallel tasks roughly equal to half your core number, but that can be overridden via `-j,--jobs`, or disabled by setting `-j unlimited`.\n\n - If `-p,--parallel` and `-i,--interlaced` are both set, Yarn will print the lines from the output as it receives them. If `-i,--interlaced` wasn't set, it would instead buffer the output from each process and print the resulting buffers only after their source processes have exited.\n\n - If `-t,--topological` is set, Yarn will only run the command after all workspaces that it depends on through the `dependencies` field have successfully finished executing. If `--topological-dev` is set, both the `dependencies` and `devDependencies` fields will be considered when figuring out the wait points.\n\n - If `-A,--all` is set, Yarn will run the command on all the workspaces of a project. By default yarn runs the command only on current and all its descendant workspaces.\n\n - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\n\n - If `--from` is set, Yarn will use the packages matching the 'from' glob as the starting point for any recursive search.\n\n - If `--since` is set, Yarn will only run the command on workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\n\n - The command may apply to only some workspaces through the use of `--include` which acts as a whitelist. The `--exclude` flag will do the opposite and will be a list of packages that mustn't execute the script. Both flags accept glob patterns (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n Adding the `-v,--verbose` flag will cause Yarn to print more information; in particular the name of the workspace that generated the output will be printed at the front of each line.\n\n If the command is `run` and the script being run does not exist the child workspace will be skipped without error.\n ",examples:[["Publish current and all descendant packages","yarn workspaces foreach npm publish --tolerate-republish"],["Run build script on current and all descendant packages","yarn workspaces foreach run build"],["Run build script on current and all descendant packages in parallel, building package dependencies first","yarn workspaces foreach -pt run build"],["Run build script on several packages and all their dependencies, building dependencies first","yarn workspaces foreach -ptR --from '{workspace-a,workspace-b}' run build"]]});var Er=xe;function _r(e,{prefix:t,interlaced:r}){let n=e.createStreamReporter(t),s=new Y.miscUtils.DefaultStream;s.pipe(n,{end:!1}),s.on("finish",()=>{n.end()});let a=new Promise(o=>{n.on("finish",()=>{o(s.active)})});if(r)return[s,a];let i=new Y.miscUtils.BufferStream;return i.pipe(s,{end:!1}),i.on("finish",()=>{s.end()}),[i,a]}function zn(e,{configuration:t,commandIndex:r,verbose:n}){if(!n)return null;let s=Y.structUtils.convertToIdent(e.locator),i=`[${Y.structUtils.stringifyIdent(s)}]:`,o=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],h=o[r%o.length];return Y.formatUtils.pretty(t,i,h)}var Jn={commands:[st,Er]},es=Jn;return Vn;})(); +/*! + * fill-range + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Licensed under the MIT License. + */ +/*! + * is-number + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Released under the MIT License. + */ +/*! + * to-regex-range + * + * Copyright (c) 2015-present, Jon Schlinkert. + * Released under the MIT License. + */ +return plugin; +} +}; diff --git a/.yarn/releases/yarn-3.2.2.cjs b/.yarn/releases/yarn-3.2.2.cjs new file mode 100755 index 000000000000..0912bea85eae --- /dev/null +++ b/.yarn/releases/yarn-3.2.2.cjs @@ -0,0 +1,783 @@ +#!/usr/bin/env node +/* eslint-disable */ +//prettier-ignore +(()=>{var nge=Object.create,Mh=Object.defineProperty,sge=Object.defineProperties,oge=Object.getOwnPropertyDescriptor,age=Object.getOwnPropertyDescriptors,Age=Object.getOwnPropertyNames,DE=Object.getOwnPropertySymbols,lge=Object.getPrototypeOf,eQ=Object.prototype.hasOwnProperty,OO=Object.prototype.propertyIsEnumerable;var MO=(r,e,t)=>e in r?Mh(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,N=(r,e)=>{for(var t in e||(e={}))eQ.call(e,t)&&MO(r,t,e[t]);if(DE)for(var t of DE(e))OO.call(e,t)&&MO(r,t,e[t]);return r},te=(r,e)=>sge(r,age(e)),cge=r=>Mh(r,"__esModule",{value:!0});var Or=(r,e)=>{var t={};for(var i in r)eQ.call(r,i)&&e.indexOf(i)<0&&(t[i]=r[i]);if(r!=null&&DE)for(var i of DE(r))e.indexOf(i)<0&&OO.call(r,i)&&(t[i]=r[i]);return t},uge=(r,e)=>()=>(r&&(e=r(r=0)),e),w=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),ft=(r,e)=>{for(var t in e)Mh(r,t,{get:e[t],enumerable:!0})},gge=(r,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Age(e))!eQ.call(r,i)&&i!=="default"&&Mh(r,i,{get:()=>e[i],enumerable:!(t=oge(e,i))||t.enumerable});return r},ge=r=>gge(cge(Mh(r!=null?nge(lge(r)):{},"default",r&&r.__esModule&&"default"in r?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r);var cM=w((i7e,oM)=>{oM.exports=aM;aM.sync=xge;var AM=require("fs");function kge(r,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var i=0;i{uM.exports=gM;gM.sync=Pge;var fM=require("fs");function gM(r,e,t){fM.stat(r,function(i,n){t(i,i?!1:hM(n,e))})}function Pge(r,e){return hM(fM.statSync(r),e)}function hM(r,e){return r.isFile()&&Dge(r,e)}function Dge(r,e){var t=r.mode,i=r.uid,n=r.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),c=parseInt("001",8),u=a|l,g=t&c||t&l&&n===o||t&a&&i===s||t&u&&s===0;return g}});var CM=w((o7e,dM)=>{var s7e=require("fs"),zE;process.platform==="win32"||global.TESTING_WINDOWS?zE=cM():zE=pM();dM.exports=CQ;CQ.sync=Rge;function CQ(r,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){CQ(r,e||{},function(s,o){s?n(s):i(o)})})}zE(r,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),t(i,n)})}function Rge(r,e){try{return zE.sync(r,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var bM=w((a7e,mM)=>{var Xu=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",EM=require("path"),Fge=Xu?";":":",IM=CM(),yM=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"}),wM=(r,e)=>{let t=e.colon||Fge,i=r.match(/\//)||Xu&&r.match(/\\/)?[""]:[...Xu?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],n=Xu?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Xu?n.split(t):[""];return Xu&&r.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},BM=(r,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=wM(r,e),o=[],a=c=>new Promise((u,g)=>{if(c===i.length)return e.all&&o.length?u(o):g(yM(r));let f=i[c],h=/^".*"$/.test(f)?f.slice(1,-1):f,p=EM.join(h,r),m=!h&&/^\.[\\\/]/.test(r)?r.slice(0,2)+p:p;u(l(m,c,0))}),l=(c,u,g)=>new Promise((f,h)=>{if(g===n.length)return f(a(u+1));let p=n[g];IM(c+p,{pathExt:s},(m,y)=>{if(!m&&y)if(e.all)o.push(c+p);else return f(c+p);return f(l(c,u,g+1))})});return t?a(0).then(c=>t(null,c),t):a(0)},Nge=(r,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:n}=wM(r,e),s=[];for(let o=0;o{"use strict";var QM=(r={})=>{let e=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};mQ.exports=QM;mQ.exports.default=QM});var PM=w((l7e,vM)=>{"use strict";var xM=require("path"),Lge=bM(),Tge=SM();function kM(r,e){let t=r.options.env||process.env,i=process.cwd(),n=r.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(r.options.cwd)}catch(a){}let o;try{o=Lge.sync(r.command,{path:t[Tge({env:t})],pathExt:e?xM.delimiter:void 0})}catch(a){}finally{s&&process.chdir(i)}return o&&(o=xM.resolve(n?r.options.cwd:"",o)),o}function Oge(r){return kM(r)||kM(r,!0)}vM.exports=Oge});var DM=w((c7e,EQ)=>{"use strict";var IQ=/([()\][%!^"`<>&|;, *?])/g;function Mge(r){return r=r.replace(IQ,"^$1"),r}function Kge(r,e){return r=`${r}`,r=r.replace(/(\\*)"/g,'$1$1\\"'),r=r.replace(/(\\*)$/,"$1$1"),r=`"${r}"`,r=r.replace(IQ,"^$1"),e&&(r=r.replace(IQ,"^$1")),r}EQ.exports.command=Mge;EQ.exports.argument=Kge});var FM=w((u7e,RM)=>{"use strict";RM.exports=/^#!(.*)/});var LM=w((g7e,NM)=>{"use strict";var Uge=FM();NM.exports=(r="")=>{let e=r.match(Uge);if(!e)return null;let[t,i]=e[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var OM=w((f7e,TM)=>{"use strict";var yQ=require("fs"),Hge=LM();function jge(r){let e=150,t=Buffer.alloc(e),i;try{i=yQ.openSync(r,"r"),yQ.readSync(i,t,0,e,0),yQ.closeSync(i)}catch(n){}return Hge(t.toString())}TM.exports=jge});var HM=w((h7e,MM)=>{"use strict";var Gge=require("path"),KM=PM(),UM=DM(),Yge=OM(),qge=process.platform==="win32",Jge=/\.(?:com|exe)$/i,Wge=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function zge(r){r.file=KM(r);let e=r.file&&Yge(r.file);return e?(r.args.unshift(r.file),r.command=e,KM(r)):r.file}function _ge(r){if(!qge)return r;let e=zge(r),t=!Jge.test(e);if(r.options.forceShell||t){let i=Wge.test(e);r.command=Gge.normalize(r.command),r.command=UM.command(r.command),r.args=r.args.map(s=>UM.argument(s,i));let n=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${n}"`],r.command=process.env.comspec||"cmd.exe",r.options.windowsVerbatimArguments=!0}return r}function Vge(r,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let i={command:r,args:e,options:t,file:void 0,original:{command:r,args:e}};return t.shell?i:_ge(i)}MM.exports=Vge});var YM=w((p7e,jM)=>{"use strict";var wQ=process.platform==="win32";function BQ(r,e){return Object.assign(new Error(`${e} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${r.command}`,path:r.command,spawnargs:r.args})}function Xge(r,e){if(!wQ)return;let t=r.emit;r.emit=function(i,n){if(i==="exit"){let s=GM(n,e,"spawn");if(s)return t.call(r,"error",s)}return t.apply(r,arguments)}}function GM(r,e){return wQ&&r===1&&!e.file?BQ(e.original,"spawn"):null}function Zge(r,e){return wQ&&r===1&&!e.file?BQ(e.original,"spawnSync"):null}jM.exports={hookChildProcess:Xge,verifyENOENT:GM,verifyENOENTSync:Zge,notFoundError:BQ}});var SQ=w((d7e,Zu)=>{"use strict";var qM=require("child_process"),bQ=HM(),QQ=YM();function JM(r,e,t){let i=bQ(r,e,t),n=qM.spawn(i.command,i.args,i.options);return QQ.hookChildProcess(n,i),n}function $ge(r,e,t){let i=bQ(r,e,t),n=qM.spawnSync(i.command,i.args,i.options);return n.error=n.error||QQ.verifyENOENTSync(n.status,i),n}Zu.exports=JM;Zu.exports.spawn=JM;Zu.exports.sync=$ge;Zu.exports._parse=bQ;Zu.exports._enoent=QQ});var zM=w((C7e,WM)=>{"use strict";function efe(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function cc(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,cc)}efe(cc,Error);cc.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g>",le=me(">>",!1),fe=">&",gt=me(">&",!1),Ht=">",Mt=me(">",!1),Ei="<<<",jt=me("<<<",!1),Qr="<&",Oi=me("<&",!1),Xs="<",Un=me("<",!1),Hn=function(C){return{type:"argument",segments:[].concat(...C)}},Sr=function(C){return C},jn="$'",fs=me("$'",!1),ba="'",DA=me("'",!1),Nu=function(C){return[{type:"text",text:C}]},hs='""',RA=me('""',!1),Qa=function(){return{type:"text",text:""}},Lu='"',FA=me('"',!1),NA=function(C){return C},vr=function(C){return{type:"arithmetic",arithmetic:C,quoted:!0}},zl=function(C){return{type:"shell",shell:C,quoted:!0}},Tu=function(C){return te(N({type:"variable"},C),{quoted:!0})},xo=function(C){return{type:"text",text:C}},Ou=function(C){return{type:"arithmetic",arithmetic:C,quoted:!1}},Sh=function(C){return{type:"shell",shell:C,quoted:!1}},vh=function(C){return te(N({type:"variable"},C),{quoted:!1})},Dr=function(C){return{type:"glob",pattern:C}},Ae=/^[^']/,ko=_e(["'"],!0,!1),Gn=function(C){return C.join("")},Mu=/^[^$"]/,St=_e(["$",'"'],!0,!1),_l=`\\ +`,Yn=me(`\\ +`,!1),ps=function(){return""},ds="\\",pt=me("\\",!1),Po=/^[\\$"`]/,lt=_e(["\\","$",'"',"`"],!1,!1),mn=function(C){return C},S="\\a",Tt=me("\\a",!1),Ku=function(){return"a"},Vl="\\b",xh=me("\\b",!1),kh=function(){return"\b"},Ph=/^[Ee]/,Dh=_e(["E","e"],!1,!1),Rh=function(){return""},j="\\f",wt=me("\\f",!1),LA=function(){return"\f"},$i="\\n",Xl=me("\\n",!1),$e=function(){return` +`},Sa="\\r",Uu=me("\\r",!1),yE=function(){return"\r"},Fh="\\t",wE=me("\\t",!1),gr=function(){return" "},qn="\\v",Zl=me("\\v",!1),Nh=function(){return"\v"},Zs=/^[\\'"?]/,va=_e(["\\","'",'"',"?"],!1,!1),En=function(C){return String.fromCharCode(parseInt(C,16))},Oe="\\x",Hu=me("\\x",!1),$l="\\u",$s=me("\\u",!1),ec="\\U",TA=me("\\U",!1),ju=function(C){return String.fromCodePoint(parseInt(C,16))},Gu=/^[0-7]/,xa=_e([["0","7"]],!1,!1),ka=/^[0-9a-fA-f]/,nt=_e([["0","9"],["a","f"],["A","f"]],!1,!1),Do=ot(),OA="-",tc=me("-",!1),eo="+",rc=me("+",!1),BE=".",Lh=me(".",!1),Yu=function(C,Q,F){return{type:"number",value:(C==="-"?-1:1)*parseFloat(Q.join("")+"."+F.join(""))}},Th=function(C,Q){return{type:"number",value:(C==="-"?-1:1)*parseInt(Q.join(""))}},bE=function(C){return N({type:"variable"},C)},ic=function(C){return{type:"variable",name:C}},QE=function(C){return C},qu="*",MA=me("*",!1),Tr="/",SE=me("/",!1),to=function(C,Q,F){return{type:Q==="*"?"multiplication":"division",right:F}},ro=function(C,Q){return Q.reduce((F,U)=>N({left:F},U),C)},Ju=function(C,Q,F){return{type:Q==="+"?"addition":"subtraction",right:F}},KA="$((",R=me("$((",!1),G="))",Ce=me("))",!1),He=function(C){return C},Te="$(",Xe=me("$(",!1),Et=function(C){return C},Rt="${",Jn=me("${",!1),Ob=":-",lO=me(":-",!1),cO=function(C,Q){return{name:C,defaultValue:Q}},Mb=":-}",uO=me(":-}",!1),gO=function(C){return{name:C,defaultValue:[]}},Kb=":+",fO=me(":+",!1),hO=function(C,Q){return{name:C,alternativeValue:Q}},Ub=":+}",pO=me(":+}",!1),dO=function(C){return{name:C,alternativeValue:[]}},Hb=function(C){return{name:C}},CO="$",mO=me("$",!1),EO=function(C){return e.isGlobPattern(C)},IO=function(C){return C},jb=/^[a-zA-Z0-9_]/,Gb=_e([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Yb=function(){return M()},qb=/^[$@*?#a-zA-Z0-9_\-]/,Jb=_e(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),yO=/^[(){}<>$|&; \t"']/,Wu=_e(["(",")","{","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),Wb=/^[<>&; \t"']/,zb=_e(["<",">","&",";"," "," ",'"',"'"],!1,!1),vE=/^[ \t]/,xE=_e([" "," "],!1,!1),B=0,Ue=0,UA=[{line:1,column:1}],d=0,E=[],I=0,D;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function M(){return r.substring(Ue,B)}function z(){return yt(Ue,B)}function ie(C,Q){throw Q=Q!==void 0?Q:yt(Ue,B),Mi([ut(C)],r.substring(Ue,B),Q)}function we(C,Q){throw Q=Q!==void 0?Q:yt(Ue,B),Wn(C,Q)}function me(C,Q){return{type:"literal",text:C,ignoreCase:Q}}function _e(C,Q,F){return{type:"class",parts:C,inverted:Q,ignoreCase:F}}function ot(){return{type:"any"}}function Bt(){return{type:"end"}}function ut(C){return{type:"other",description:C}}function st(C){var Q=UA[C],F;if(Q)return Q;for(F=C-1;!UA[F];)F--;for(Q=UA[F],Q={line:Q.line,column:Q.column};Fd&&(d=B,E=[]),E.push(C))}function Wn(C,Q){return new cc(C,null,null,Q)}function Mi(C,Q,F){return new cc(cc.buildMessage(C,Q),C,Q,F)}function HA(){var C,Q;return C=B,Q=Yr(),Q===t&&(Q=null),Q!==t&&(Ue=C,Q=s(Q)),C=Q,C}function Yr(){var C,Q,F,U,ue;if(C=B,Q=qr(),Q!==t){for(F=[],U=Ye();U!==t;)F.push(U),U=Ye();F!==t?(U=Pa(),U!==t?(ue=Cs(),ue===t&&(ue=null),ue!==t?(Ue=C,Q=o(Q,U,ue),C=Q):(B=C,C=t)):(B=C,C=t)):(B=C,C=t)}else B=C,C=t;if(C===t)if(C=B,Q=qr(),Q!==t){for(F=[],U=Ye();U!==t;)F.push(U),U=Ye();F!==t?(U=Pa(),U===t&&(U=null),U!==t?(Ue=C,Q=a(Q,U),C=Q):(B=C,C=t)):(B=C,C=t)}else B=C,C=t;return C}function Cs(){var C,Q,F,U,ue;for(C=B,Q=[],F=Ye();F!==t;)Q.push(F),F=Ye();if(Q!==t)if(F=Yr(),F!==t){for(U=[],ue=Ye();ue!==t;)U.push(ue),ue=Ye();U!==t?(Ue=C,Q=l(F),C=Q):(B=C,C=t)}else B=C,C=t;else B=C,C=t;return C}function Pa(){var C;return r.charCodeAt(B)===59?(C=c,B++):(C=t,I===0&&xe(u)),C===t&&(r.charCodeAt(B)===38?(C=g,B++):(C=t,I===0&&xe(f))),C}function qr(){var C,Q,F;return C=B,Q=wO(),Q!==t?(F=Hue(),F===t&&(F=null),F!==t?(Ue=C,Q=h(Q,F),C=Q):(B=C,C=t)):(B=C,C=t),C}function Hue(){var C,Q,F,U,ue,De,Ct;for(C=B,Q=[],F=Ye();F!==t;)Q.push(F),F=Ye();if(Q!==t)if(F=jue(),F!==t){for(U=[],ue=Ye();ue!==t;)U.push(ue),ue=Ye();if(U!==t)if(ue=qr(),ue!==t){for(De=[],Ct=Ye();Ct!==t;)De.push(Ct),Ct=Ye();De!==t?(Ue=C,Q=p(F,ue),C=Q):(B=C,C=t)}else B=C,C=t;else B=C,C=t}else B=C,C=t;else B=C,C=t;return C}function jue(){var C;return r.substr(B,2)===m?(C=m,B+=2):(C=t,I===0&&xe(y)),C===t&&(r.substr(B,2)===b?(C=b,B+=2):(C=t,I===0&&xe(v))),C}function wO(){var C,Q,F;return C=B,Q=que(),Q!==t?(F=Gue(),F===t&&(F=null),F!==t?(Ue=C,Q=x(Q,F),C=Q):(B=C,C=t)):(B=C,C=t),C}function Gue(){var C,Q,F,U,ue,De,Ct;for(C=B,Q=[],F=Ye();F!==t;)Q.push(F),F=Ye();if(Q!==t)if(F=Yue(),F!==t){for(U=[],ue=Ye();ue!==t;)U.push(ue),ue=Ye();if(U!==t)if(ue=wO(),ue!==t){for(De=[],Ct=Ye();Ct!==t;)De.push(Ct),Ct=Ye();De!==t?(Ue=C,Q=T(F,ue),C=Q):(B=C,C=t)}else B=C,C=t;else B=C,C=t}else B=C,C=t;else B=C,C=t;return C}function Yue(){var C;return r.substr(B,2)===q?(C=q,B+=2):(C=t,I===0&&xe(Y)),C===t&&(r.charCodeAt(B)===124?(C=$,B++):(C=t,I===0&&xe(_))),C}function kE(){var C,Q,F,U,ue,De;if(C=B,Q=NO(),Q!==t)if(r.charCodeAt(B)===61?(F=ne,B++):(F=t,I===0&&xe(ee)),F!==t)if(U=QO(),U!==t){for(ue=[],De=Ye();De!==t;)ue.push(De),De=Ye();ue!==t?(Ue=C,Q=A(Q,U),C=Q):(B=C,C=t)}else B=C,C=t;else B=C,C=t;else B=C,C=t;if(C===t)if(C=B,Q=NO(),Q!==t)if(r.charCodeAt(B)===61?(F=ne,B++):(F=t,I===0&&xe(ee)),F!==t){for(U=[],ue=Ye();ue!==t;)U.push(ue),ue=Ye();U!==t?(Ue=C,Q=oe(Q),C=Q):(B=C,C=t)}else B=C,C=t;else B=C,C=t;return C}function que(){var C,Q,F,U,ue,De,Ct,bt,$r,Ii,ms;for(C=B,Q=[],F=Ye();F!==t;)Q.push(F),F=Ye();if(Q!==t)if(r.charCodeAt(B)===40?(F=ce,B++):(F=t,I===0&&xe(Z)),F!==t){for(U=[],ue=Ye();ue!==t;)U.push(ue),ue=Ye();if(U!==t)if(ue=Yr(),ue!==t){for(De=[],Ct=Ye();Ct!==t;)De.push(Ct),Ct=Ye();if(De!==t)if(r.charCodeAt(B)===41?(Ct=O,B++):(Ct=t,I===0&&xe(L)),Ct!==t){for(bt=[],$r=Ye();$r!==t;)bt.push($r),$r=Ye();if(bt!==t){for($r=[],Ii=Oh();Ii!==t;)$r.push(Ii),Ii=Oh();if($r!==t){for(Ii=[],ms=Ye();ms!==t;)Ii.push(ms),ms=Ye();Ii!==t?(Ue=C,Q=de(ue,$r),C=Q):(B=C,C=t)}else B=C,C=t}else B=C,C=t}else B=C,C=t;else B=C,C=t}else B=C,C=t;else B=C,C=t}else B=C,C=t;else B=C,C=t;if(C===t){for(C=B,Q=[],F=Ye();F!==t;)Q.push(F),F=Ye();if(Q!==t)if(r.charCodeAt(B)===123?(F=Be,B++):(F=t,I===0&&xe(je)),F!==t){for(U=[],ue=Ye();ue!==t;)U.push(ue),ue=Ye();if(U!==t)if(ue=Yr(),ue!==t){for(De=[],Ct=Ye();Ct!==t;)De.push(Ct),Ct=Ye();if(De!==t)if(r.charCodeAt(B)===125?(Ct=re,B++):(Ct=t,I===0&&xe(se)),Ct!==t){for(bt=[],$r=Ye();$r!==t;)bt.push($r),$r=Ye();if(bt!==t){for($r=[],Ii=Oh();Ii!==t;)$r.push(Ii),Ii=Oh();if($r!==t){for(Ii=[],ms=Ye();ms!==t;)Ii.push(ms),ms=Ye();Ii!==t?(Ue=C,Q=be(ue,$r),C=Q):(B=C,C=t)}else B=C,C=t}else B=C,C=t}else B=C,C=t;else B=C,C=t}else B=C,C=t;else B=C,C=t}else B=C,C=t;else B=C,C=t;if(C===t){for(C=B,Q=[],F=Ye();F!==t;)Q.push(F),F=Ye();if(Q!==t){for(F=[],U=kE();U!==t;)F.push(U),U=kE();if(F!==t){for(U=[],ue=Ye();ue!==t;)U.push(ue),ue=Ye();if(U!==t){if(ue=[],De=bO(),De!==t)for(;De!==t;)ue.push(De),De=bO();else ue=t;if(ue!==t){for(De=[],Ct=Ye();Ct!==t;)De.push(Ct),Ct=Ye();De!==t?(Ue=C,Q=he(F,ue),C=Q):(B=C,C=t)}else B=C,C=t}else B=C,C=t}else B=C,C=t}else B=C,C=t;if(C===t){for(C=B,Q=[],F=Ye();F!==t;)Q.push(F),F=Ye();if(Q!==t){if(F=[],U=kE(),U!==t)for(;U!==t;)F.push(U),U=kE();else F=t;if(F!==t){for(U=[],ue=Ye();ue!==t;)U.push(ue),ue=Ye();U!==t?(Ue=C,Q=Fe(F),C=Q):(B=C,C=t)}else B=C,C=t}else B=C,C=t}}}return C}function BO(){var C,Q,F,U,ue;for(C=B,Q=[],F=Ye();F!==t;)Q.push(F),F=Ye();if(Q!==t){if(F=[],U=PE(),U!==t)for(;U!==t;)F.push(U),U=PE();else F=t;if(F!==t){for(U=[],ue=Ye();ue!==t;)U.push(ue),ue=Ye();U!==t?(Ue=C,Q=Ke(F),C=Q):(B=C,C=t)}else B=C,C=t}else B=C,C=t;return C}function bO(){var C,Q,F;for(C=B,Q=[],F=Ye();F!==t;)Q.push(F),F=Ye();if(Q!==t?(F=Oh(),F!==t?(Ue=C,Q=ke(F),C=Q):(B=C,C=t)):(B=C,C=t),C===t){for(C=B,Q=[],F=Ye();F!==t;)Q.push(F),F=Ye();Q!==t?(F=PE(),F!==t?(Ue=C,Q=ke(F),C=Q):(B=C,C=t)):(B=C,C=t)}return C}function Oh(){var C,Q,F,U,ue;for(C=B,Q=[],F=Ye();F!==t;)Q.push(F),F=Ye();return Q!==t?(ve.test(r.charAt(B))?(F=r.charAt(B),B++):(F=t,I===0&&xe(pe)),F===t&&(F=null),F!==t?(U=Jue(),U!==t?(ue=PE(),ue!==t?(Ue=C,Q=V(F,U,ue),C=Q):(B=C,C=t)):(B=C,C=t)):(B=C,C=t)):(B=C,C=t),C}function Jue(){var C;return r.substr(B,2)===Qe?(C=Qe,B+=2):(C=t,I===0&&xe(le)),C===t&&(r.substr(B,2)===fe?(C=fe,B+=2):(C=t,I===0&&xe(gt)),C===t&&(r.charCodeAt(B)===62?(C=Ht,B++):(C=t,I===0&&xe(Mt)),C===t&&(r.substr(B,3)===Ei?(C=Ei,B+=3):(C=t,I===0&&xe(jt)),C===t&&(r.substr(B,2)===Qr?(C=Qr,B+=2):(C=t,I===0&&xe(Oi)),C===t&&(r.charCodeAt(B)===60?(C=Xs,B++):(C=t,I===0&&xe(Un))))))),C}function PE(){var C,Q,F;for(C=B,Q=[],F=Ye();F!==t;)Q.push(F),F=Ye();return Q!==t?(F=QO(),F!==t?(Ue=C,Q=ke(F),C=Q):(B=C,C=t)):(B=C,C=t),C}function QO(){var C,Q,F;if(C=B,Q=[],F=SO(),F!==t)for(;F!==t;)Q.push(F),F=SO();else Q=t;return Q!==t&&(Ue=C,Q=Hn(Q)),C=Q,C}function SO(){var C,Q;return C=B,Q=Wue(),Q!==t&&(Ue=C,Q=Sr(Q)),C=Q,C===t&&(C=B,Q=zue(),Q!==t&&(Ue=C,Q=Sr(Q)),C=Q,C===t&&(C=B,Q=_ue(),Q!==t&&(Ue=C,Q=Sr(Q)),C=Q,C===t&&(C=B,Q=Vue(),Q!==t&&(Ue=C,Q=Sr(Q)),C=Q))),C}function Wue(){var C,Q,F,U;return C=B,r.substr(B,2)===jn?(Q=jn,B+=2):(Q=t,I===0&&xe(fs)),Q!==t?(F=$ue(),F!==t?(r.charCodeAt(B)===39?(U=ba,B++):(U=t,I===0&&xe(DA)),U!==t?(Ue=C,Q=Nu(F),C=Q):(B=C,C=t)):(B=C,C=t)):(B=C,C=t),C}function zue(){var C,Q,F,U;return C=B,r.charCodeAt(B)===39?(Q=ba,B++):(Q=t,I===0&&xe(DA)),Q!==t?(F=Xue(),F!==t?(r.charCodeAt(B)===39?(U=ba,B++):(U=t,I===0&&xe(DA)),U!==t?(Ue=C,Q=Nu(F),C=Q):(B=C,C=t)):(B=C,C=t)):(B=C,C=t),C}function _ue(){var C,Q,F,U;if(C=B,r.substr(B,2)===hs?(Q=hs,B+=2):(Q=t,I===0&&xe(RA)),Q!==t&&(Ue=C,Q=Qa()),C=Q,C===t)if(C=B,r.charCodeAt(B)===34?(Q=Lu,B++):(Q=t,I===0&&xe(FA)),Q!==t){for(F=[],U=vO();U!==t;)F.push(U),U=vO();F!==t?(r.charCodeAt(B)===34?(U=Lu,B++):(U=t,I===0&&xe(FA)),U!==t?(Ue=C,Q=NA(F),C=Q):(B=C,C=t)):(B=C,C=t)}else B=C,C=t;return C}function Vue(){var C,Q,F;if(C=B,Q=[],F=xO(),F!==t)for(;F!==t;)Q.push(F),F=xO();else Q=t;return Q!==t&&(Ue=C,Q=NA(Q)),C=Q,C}function vO(){var C,Q;return C=B,Q=RO(),Q!==t&&(Ue=C,Q=vr(Q)),C=Q,C===t&&(C=B,Q=FO(),Q!==t&&(Ue=C,Q=zl(Q)),C=Q,C===t&&(C=B,Q=Zb(),Q!==t&&(Ue=C,Q=Tu(Q)),C=Q,C===t&&(C=B,Q=Zue(),Q!==t&&(Ue=C,Q=xo(Q)),C=Q))),C}function xO(){var C,Q;return C=B,Q=RO(),Q!==t&&(Ue=C,Q=Ou(Q)),C=Q,C===t&&(C=B,Q=FO(),Q!==t&&(Ue=C,Q=Sh(Q)),C=Q,C===t&&(C=B,Q=Zb(),Q!==t&&(Ue=C,Q=vh(Q)),C=Q,C===t&&(C=B,Q=rge(),Q!==t&&(Ue=C,Q=Dr(Q)),C=Q,C===t&&(C=B,Q=tge(),Q!==t&&(Ue=C,Q=xo(Q)),C=Q)))),C}function Xue(){var C,Q,F;for(C=B,Q=[],Ae.test(r.charAt(B))?(F=r.charAt(B),B++):(F=t,I===0&&xe(ko));F!==t;)Q.push(F),Ae.test(r.charAt(B))?(F=r.charAt(B),B++):(F=t,I===0&&xe(ko));return Q!==t&&(Ue=C,Q=Gn(Q)),C=Q,C}function Zue(){var C,Q,F;if(C=B,Q=[],F=kO(),F===t&&(Mu.test(r.charAt(B))?(F=r.charAt(B),B++):(F=t,I===0&&xe(St))),F!==t)for(;F!==t;)Q.push(F),F=kO(),F===t&&(Mu.test(r.charAt(B))?(F=r.charAt(B),B++):(F=t,I===0&&xe(St)));else Q=t;return Q!==t&&(Ue=C,Q=Gn(Q)),C=Q,C}function kO(){var C,Q,F;return C=B,r.substr(B,2)===_l?(Q=_l,B+=2):(Q=t,I===0&&xe(Yn)),Q!==t&&(Ue=C,Q=ps()),C=Q,C===t&&(C=B,r.charCodeAt(B)===92?(Q=ds,B++):(Q=t,I===0&&xe(pt)),Q!==t?(Po.test(r.charAt(B))?(F=r.charAt(B),B++):(F=t,I===0&&xe(lt)),F!==t?(Ue=C,Q=mn(F),C=Q):(B=C,C=t)):(B=C,C=t)),C}function $ue(){var C,Q,F;for(C=B,Q=[],F=PO(),F===t&&(Ae.test(r.charAt(B))?(F=r.charAt(B),B++):(F=t,I===0&&xe(ko)));F!==t;)Q.push(F),F=PO(),F===t&&(Ae.test(r.charAt(B))?(F=r.charAt(B),B++):(F=t,I===0&&xe(ko)));return Q!==t&&(Ue=C,Q=Gn(Q)),C=Q,C}function PO(){var C,Q,F;return C=B,r.substr(B,2)===S?(Q=S,B+=2):(Q=t,I===0&&xe(Tt)),Q!==t&&(Ue=C,Q=Ku()),C=Q,C===t&&(C=B,r.substr(B,2)===Vl?(Q=Vl,B+=2):(Q=t,I===0&&xe(xh)),Q!==t&&(Ue=C,Q=kh()),C=Q,C===t&&(C=B,r.charCodeAt(B)===92?(Q=ds,B++):(Q=t,I===0&&xe(pt)),Q!==t?(Ph.test(r.charAt(B))?(F=r.charAt(B),B++):(F=t,I===0&&xe(Dh)),F!==t?(Ue=C,Q=Rh(),C=Q):(B=C,C=t)):(B=C,C=t),C===t&&(C=B,r.substr(B,2)===j?(Q=j,B+=2):(Q=t,I===0&&xe(wt)),Q!==t&&(Ue=C,Q=LA()),C=Q,C===t&&(C=B,r.substr(B,2)===$i?(Q=$i,B+=2):(Q=t,I===0&&xe(Xl)),Q!==t&&(Ue=C,Q=$e()),C=Q,C===t&&(C=B,r.substr(B,2)===Sa?(Q=Sa,B+=2):(Q=t,I===0&&xe(Uu)),Q!==t&&(Ue=C,Q=yE()),C=Q,C===t&&(C=B,r.substr(B,2)===Fh?(Q=Fh,B+=2):(Q=t,I===0&&xe(wE)),Q!==t&&(Ue=C,Q=gr()),C=Q,C===t&&(C=B,r.substr(B,2)===qn?(Q=qn,B+=2):(Q=t,I===0&&xe(Zl)),Q!==t&&(Ue=C,Q=Nh()),C=Q,C===t&&(C=B,r.charCodeAt(B)===92?(Q=ds,B++):(Q=t,I===0&&xe(pt)),Q!==t?(Zs.test(r.charAt(B))?(F=r.charAt(B),B++):(F=t,I===0&&xe(va)),F!==t?(Ue=C,Q=mn(F),C=Q):(B=C,C=t)):(B=C,C=t),C===t&&(C=ege()))))))))),C}function ege(){var C,Q,F,U,ue,De,Ct,bt,$r,Ii,ms,$b;return C=B,r.charCodeAt(B)===92?(Q=ds,B++):(Q=t,I===0&&xe(pt)),Q!==t?(F=_b(),F!==t?(Ue=C,Q=En(F),C=Q):(B=C,C=t)):(B=C,C=t),C===t&&(C=B,r.substr(B,2)===Oe?(Q=Oe,B+=2):(Q=t,I===0&&xe(Hu)),Q!==t?(F=B,U=B,ue=_b(),ue!==t?(De=zn(),De!==t?(ue=[ue,De],U=ue):(B=U,U=t)):(B=U,U=t),U===t&&(U=_b()),U!==t?F=r.substring(F,B):F=U,F!==t?(Ue=C,Q=En(F),C=Q):(B=C,C=t)):(B=C,C=t),C===t&&(C=B,r.substr(B,2)===$l?(Q=$l,B+=2):(Q=t,I===0&&xe($s)),Q!==t?(F=B,U=B,ue=zn(),ue!==t?(De=zn(),De!==t?(Ct=zn(),Ct!==t?(bt=zn(),bt!==t?(ue=[ue,De,Ct,bt],U=ue):(B=U,U=t)):(B=U,U=t)):(B=U,U=t)):(B=U,U=t),U!==t?F=r.substring(F,B):F=U,F!==t?(Ue=C,Q=En(F),C=Q):(B=C,C=t)):(B=C,C=t),C===t&&(C=B,r.substr(B,2)===ec?(Q=ec,B+=2):(Q=t,I===0&&xe(TA)),Q!==t?(F=B,U=B,ue=zn(),ue!==t?(De=zn(),De!==t?(Ct=zn(),Ct!==t?(bt=zn(),bt!==t?($r=zn(),$r!==t?(Ii=zn(),Ii!==t?(ms=zn(),ms!==t?($b=zn(),$b!==t?(ue=[ue,De,Ct,bt,$r,Ii,ms,$b],U=ue):(B=U,U=t)):(B=U,U=t)):(B=U,U=t)):(B=U,U=t)):(B=U,U=t)):(B=U,U=t)):(B=U,U=t)):(B=U,U=t),U!==t?F=r.substring(F,B):F=U,F!==t?(Ue=C,Q=ju(F),C=Q):(B=C,C=t)):(B=C,C=t)))),C}function _b(){var C;return Gu.test(r.charAt(B))?(C=r.charAt(B),B++):(C=t,I===0&&xe(xa)),C}function zn(){var C;return ka.test(r.charAt(B))?(C=r.charAt(B),B++):(C=t,I===0&&xe(nt)),C}function tge(){var C,Q,F,U,ue;if(C=B,Q=[],F=B,r.charCodeAt(B)===92?(U=ds,B++):(U=t,I===0&&xe(pt)),U!==t?(r.length>B?(ue=r.charAt(B),B++):(ue=t,I===0&&xe(Do)),ue!==t?(Ue=F,U=mn(ue),F=U):(B=F,F=t)):(B=F,F=t),F===t&&(F=B,U=B,I++,ue=LO(),I--,ue===t?U=void 0:(B=U,U=t),U!==t?(r.length>B?(ue=r.charAt(B),B++):(ue=t,I===0&&xe(Do)),ue!==t?(Ue=F,U=mn(ue),F=U):(B=F,F=t)):(B=F,F=t)),F!==t)for(;F!==t;)Q.push(F),F=B,r.charCodeAt(B)===92?(U=ds,B++):(U=t,I===0&&xe(pt)),U!==t?(r.length>B?(ue=r.charAt(B),B++):(ue=t,I===0&&xe(Do)),ue!==t?(Ue=F,U=mn(ue),F=U):(B=F,F=t)):(B=F,F=t),F===t&&(F=B,U=B,I++,ue=LO(),I--,ue===t?U=void 0:(B=U,U=t),U!==t?(r.length>B?(ue=r.charAt(B),B++):(ue=t,I===0&&xe(Do)),ue!==t?(Ue=F,U=mn(ue),F=U):(B=F,F=t)):(B=F,F=t));else Q=t;return Q!==t&&(Ue=C,Q=Gn(Q)),C=Q,C}function Vb(){var C,Q,F,U,ue,De;if(C=B,r.charCodeAt(B)===45?(Q=OA,B++):(Q=t,I===0&&xe(tc)),Q===t&&(r.charCodeAt(B)===43?(Q=eo,B++):(Q=t,I===0&&xe(rc))),Q===t&&(Q=null),Q!==t){if(F=[],ve.test(r.charAt(B))?(U=r.charAt(B),B++):(U=t,I===0&&xe(pe)),U!==t)for(;U!==t;)F.push(U),ve.test(r.charAt(B))?(U=r.charAt(B),B++):(U=t,I===0&&xe(pe));else F=t;if(F!==t)if(r.charCodeAt(B)===46?(U=BE,B++):(U=t,I===0&&xe(Lh)),U!==t){if(ue=[],ve.test(r.charAt(B))?(De=r.charAt(B),B++):(De=t,I===0&&xe(pe)),De!==t)for(;De!==t;)ue.push(De),ve.test(r.charAt(B))?(De=r.charAt(B),B++):(De=t,I===0&&xe(pe));else ue=t;ue!==t?(Ue=C,Q=Yu(Q,F,ue),C=Q):(B=C,C=t)}else B=C,C=t;else B=C,C=t}else B=C,C=t;if(C===t){if(C=B,r.charCodeAt(B)===45?(Q=OA,B++):(Q=t,I===0&&xe(tc)),Q===t&&(r.charCodeAt(B)===43?(Q=eo,B++):(Q=t,I===0&&xe(rc))),Q===t&&(Q=null),Q!==t){if(F=[],ve.test(r.charAt(B))?(U=r.charAt(B),B++):(U=t,I===0&&xe(pe)),U!==t)for(;U!==t;)F.push(U),ve.test(r.charAt(B))?(U=r.charAt(B),B++):(U=t,I===0&&xe(pe));else F=t;F!==t?(Ue=C,Q=Th(Q,F),C=Q):(B=C,C=t)}else B=C,C=t;if(C===t&&(C=B,Q=Zb(),Q!==t&&(Ue=C,Q=bE(Q)),C=Q,C===t&&(C=B,Q=nc(),Q!==t&&(Ue=C,Q=ic(Q)),C=Q,C===t)))if(C=B,r.charCodeAt(B)===40?(Q=ce,B++):(Q=t,I===0&&xe(Z)),Q!==t){for(F=[],U=Ye();U!==t;)F.push(U),U=Ye();if(F!==t)if(U=DO(),U!==t){for(ue=[],De=Ye();De!==t;)ue.push(De),De=Ye();ue!==t?(r.charCodeAt(B)===41?(De=O,B++):(De=t,I===0&&xe(L)),De!==t?(Ue=C,Q=QE(U),C=Q):(B=C,C=t)):(B=C,C=t)}else B=C,C=t;else B=C,C=t}else B=C,C=t}return C}function Xb(){var C,Q,F,U,ue,De,Ct,bt;if(C=B,Q=Vb(),Q!==t){for(F=[],U=B,ue=[],De=Ye();De!==t;)ue.push(De),De=Ye();if(ue!==t)if(r.charCodeAt(B)===42?(De=qu,B++):(De=t,I===0&&xe(MA)),De===t&&(r.charCodeAt(B)===47?(De=Tr,B++):(De=t,I===0&&xe(SE))),De!==t){for(Ct=[],bt=Ye();bt!==t;)Ct.push(bt),bt=Ye();Ct!==t?(bt=Vb(),bt!==t?(Ue=U,ue=to(Q,De,bt),U=ue):(B=U,U=t)):(B=U,U=t)}else B=U,U=t;else B=U,U=t;for(;U!==t;){for(F.push(U),U=B,ue=[],De=Ye();De!==t;)ue.push(De),De=Ye();if(ue!==t)if(r.charCodeAt(B)===42?(De=qu,B++):(De=t,I===0&&xe(MA)),De===t&&(r.charCodeAt(B)===47?(De=Tr,B++):(De=t,I===0&&xe(SE))),De!==t){for(Ct=[],bt=Ye();bt!==t;)Ct.push(bt),bt=Ye();Ct!==t?(bt=Vb(),bt!==t?(Ue=U,ue=to(Q,De,bt),U=ue):(B=U,U=t)):(B=U,U=t)}else B=U,U=t;else B=U,U=t}F!==t?(Ue=C,Q=ro(Q,F),C=Q):(B=C,C=t)}else B=C,C=t;return C}function DO(){var C,Q,F,U,ue,De,Ct,bt;if(C=B,Q=Xb(),Q!==t){for(F=[],U=B,ue=[],De=Ye();De!==t;)ue.push(De),De=Ye();if(ue!==t)if(r.charCodeAt(B)===43?(De=eo,B++):(De=t,I===0&&xe(rc)),De===t&&(r.charCodeAt(B)===45?(De=OA,B++):(De=t,I===0&&xe(tc))),De!==t){for(Ct=[],bt=Ye();bt!==t;)Ct.push(bt),bt=Ye();Ct!==t?(bt=Xb(),bt!==t?(Ue=U,ue=Ju(Q,De,bt),U=ue):(B=U,U=t)):(B=U,U=t)}else B=U,U=t;else B=U,U=t;for(;U!==t;){for(F.push(U),U=B,ue=[],De=Ye();De!==t;)ue.push(De),De=Ye();if(ue!==t)if(r.charCodeAt(B)===43?(De=eo,B++):(De=t,I===0&&xe(rc)),De===t&&(r.charCodeAt(B)===45?(De=OA,B++):(De=t,I===0&&xe(tc))),De!==t){for(Ct=[],bt=Ye();bt!==t;)Ct.push(bt),bt=Ye();Ct!==t?(bt=Xb(),bt!==t?(Ue=U,ue=Ju(Q,De,bt),U=ue):(B=U,U=t)):(B=U,U=t)}else B=U,U=t;else B=U,U=t}F!==t?(Ue=C,Q=ro(Q,F),C=Q):(B=C,C=t)}else B=C,C=t;return C}function RO(){var C,Q,F,U,ue,De;if(C=B,r.substr(B,3)===KA?(Q=KA,B+=3):(Q=t,I===0&&xe(R)),Q!==t){for(F=[],U=Ye();U!==t;)F.push(U),U=Ye();if(F!==t)if(U=DO(),U!==t){for(ue=[],De=Ye();De!==t;)ue.push(De),De=Ye();ue!==t?(r.substr(B,2)===G?(De=G,B+=2):(De=t,I===0&&xe(Ce)),De!==t?(Ue=C,Q=He(U),C=Q):(B=C,C=t)):(B=C,C=t)}else B=C,C=t;else B=C,C=t}else B=C,C=t;return C}function FO(){var C,Q,F,U;return C=B,r.substr(B,2)===Te?(Q=Te,B+=2):(Q=t,I===0&&xe(Xe)),Q!==t?(F=Yr(),F!==t?(r.charCodeAt(B)===41?(U=O,B++):(U=t,I===0&&xe(L)),U!==t?(Ue=C,Q=Et(F),C=Q):(B=C,C=t)):(B=C,C=t)):(B=C,C=t),C}function Zb(){var C,Q,F,U,ue,De;return C=B,r.substr(B,2)===Rt?(Q=Rt,B+=2):(Q=t,I===0&&xe(Jn)),Q!==t?(F=nc(),F!==t?(r.substr(B,2)===Ob?(U=Ob,B+=2):(U=t,I===0&&xe(lO)),U!==t?(ue=BO(),ue!==t?(r.charCodeAt(B)===125?(De=re,B++):(De=t,I===0&&xe(se)),De!==t?(Ue=C,Q=cO(F,ue),C=Q):(B=C,C=t)):(B=C,C=t)):(B=C,C=t)):(B=C,C=t)):(B=C,C=t),C===t&&(C=B,r.substr(B,2)===Rt?(Q=Rt,B+=2):(Q=t,I===0&&xe(Jn)),Q!==t?(F=nc(),F!==t?(r.substr(B,3)===Mb?(U=Mb,B+=3):(U=t,I===0&&xe(uO)),U!==t?(Ue=C,Q=gO(F),C=Q):(B=C,C=t)):(B=C,C=t)):(B=C,C=t),C===t&&(C=B,r.substr(B,2)===Rt?(Q=Rt,B+=2):(Q=t,I===0&&xe(Jn)),Q!==t?(F=nc(),F!==t?(r.substr(B,2)===Kb?(U=Kb,B+=2):(U=t,I===0&&xe(fO)),U!==t?(ue=BO(),ue!==t?(r.charCodeAt(B)===125?(De=re,B++):(De=t,I===0&&xe(se)),De!==t?(Ue=C,Q=hO(F,ue),C=Q):(B=C,C=t)):(B=C,C=t)):(B=C,C=t)):(B=C,C=t)):(B=C,C=t),C===t&&(C=B,r.substr(B,2)===Rt?(Q=Rt,B+=2):(Q=t,I===0&&xe(Jn)),Q!==t?(F=nc(),F!==t?(r.substr(B,3)===Ub?(U=Ub,B+=3):(U=t,I===0&&xe(pO)),U!==t?(Ue=C,Q=dO(F),C=Q):(B=C,C=t)):(B=C,C=t)):(B=C,C=t),C===t&&(C=B,r.substr(B,2)===Rt?(Q=Rt,B+=2):(Q=t,I===0&&xe(Jn)),Q!==t?(F=nc(),F!==t?(r.charCodeAt(B)===125?(U=re,B++):(U=t,I===0&&xe(se)),U!==t?(Ue=C,Q=Hb(F),C=Q):(B=C,C=t)):(B=C,C=t)):(B=C,C=t),C===t&&(C=B,r.charCodeAt(B)===36?(Q=CO,B++):(Q=t,I===0&&xe(mO)),Q!==t?(F=nc(),F!==t?(Ue=C,Q=Hb(F),C=Q):(B=C,C=t)):(B=C,C=t)))))),C}function rge(){var C,Q,F;return C=B,Q=ige(),Q!==t?(Ue=B,F=EO(Q),F?F=void 0:F=t,F!==t?(Ue=C,Q=IO(Q),C=Q):(B=C,C=t)):(B=C,C=t),C}function ige(){var C,Q,F,U,ue;if(C=B,Q=[],F=B,U=B,I++,ue=TO(),I--,ue===t?U=void 0:(B=U,U=t),U!==t?(r.length>B?(ue=r.charAt(B),B++):(ue=t,I===0&&xe(Do)),ue!==t?(Ue=F,U=mn(ue),F=U):(B=F,F=t)):(B=F,F=t),F!==t)for(;F!==t;)Q.push(F),F=B,U=B,I++,ue=TO(),I--,ue===t?U=void 0:(B=U,U=t),U!==t?(r.length>B?(ue=r.charAt(B),B++):(ue=t,I===0&&xe(Do)),ue!==t?(Ue=F,U=mn(ue),F=U):(B=F,F=t)):(B=F,F=t);else Q=t;return Q!==t&&(Ue=C,Q=Gn(Q)),C=Q,C}function NO(){var C,Q,F;if(C=B,Q=[],jb.test(r.charAt(B))?(F=r.charAt(B),B++):(F=t,I===0&&xe(Gb)),F!==t)for(;F!==t;)Q.push(F),jb.test(r.charAt(B))?(F=r.charAt(B),B++):(F=t,I===0&&xe(Gb));else Q=t;return Q!==t&&(Ue=C,Q=Yb()),C=Q,C}function nc(){var C,Q,F;if(C=B,Q=[],qb.test(r.charAt(B))?(F=r.charAt(B),B++):(F=t,I===0&&xe(Jb)),F!==t)for(;F!==t;)Q.push(F),qb.test(r.charAt(B))?(F=r.charAt(B),B++):(F=t,I===0&&xe(Jb));else Q=t;return Q!==t&&(Ue=C,Q=Yb()),C=Q,C}function LO(){var C;return yO.test(r.charAt(B))?(C=r.charAt(B),B++):(C=t,I===0&&xe(Wu)),C}function TO(){var C;return Wb.test(r.charAt(B))?(C=r.charAt(B),B++):(C=t,I===0&&xe(zb)),C}function Ye(){var C,Q;if(C=[],vE.test(r.charAt(B))?(Q=r.charAt(B),B++):(Q=t,I===0&&xe(xE)),Q!==t)for(;Q!==t;)C.push(Q),vE.test(r.charAt(B))?(Q=r.charAt(B),B++):(Q=t,I===0&&xe(xE));else C=t;return C}if(D=n(),D!==t&&B===r.length)return D;throw D!==t&&B{"use strict";function rfe(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function gc(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,gc)}rfe(gc,Error);gc.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;gq&&(q=v,Y=[]),Y.push(pe))}function se(pe,V){return new gc(pe,null,null,V)}function be(pe,V,Qe){return new gc(gc.buildMessage(pe,V),pe,V,Qe)}function he(){var pe,V,Qe,le;return pe=v,V=Fe(),V!==t?(r.charCodeAt(v)===47?(Qe=s,v++):(Qe=t,$===0&&re(o)),Qe!==t?(le=Fe(),le!==t?(x=pe,V=a(V,le),pe=V):(v=pe,pe=t)):(v=pe,pe=t)):(v=pe,pe=t),pe===t&&(pe=v,V=Fe(),V!==t&&(x=pe,V=l(V)),pe=V),pe}function Fe(){var pe,V,Qe,le;return pe=v,V=Ke(),V!==t?(r.charCodeAt(v)===64?(Qe=c,v++):(Qe=t,$===0&&re(u)),Qe!==t?(le=ve(),le!==t?(x=pe,V=g(V,le),pe=V):(v=pe,pe=t)):(v=pe,pe=t)):(v=pe,pe=t),pe===t&&(pe=v,V=Ke(),V!==t&&(x=pe,V=f(V)),pe=V),pe}function Ke(){var pe,V,Qe,le,fe;return pe=v,r.charCodeAt(v)===64?(V=c,v++):(V=t,$===0&&re(u)),V!==t?(Qe=ke(),Qe!==t?(r.charCodeAt(v)===47?(le=s,v++):(le=t,$===0&&re(o)),le!==t?(fe=ke(),fe!==t?(x=pe,V=h(),pe=V):(v=pe,pe=t)):(v=pe,pe=t)):(v=pe,pe=t)):(v=pe,pe=t),pe===t&&(pe=v,V=ke(),V!==t&&(x=pe,V=h()),pe=V),pe}function ke(){var pe,V,Qe;if(pe=v,V=[],p.test(r.charAt(v))?(Qe=r.charAt(v),v++):(Qe=t,$===0&&re(m)),Qe!==t)for(;Qe!==t;)V.push(Qe),p.test(r.charAt(v))?(Qe=r.charAt(v),v++):(Qe=t,$===0&&re(m));else V=t;return V!==t&&(x=pe,V=h()),pe=V,pe}function ve(){var pe,V,Qe;if(pe=v,V=[],y.test(r.charAt(v))?(Qe=r.charAt(v),v++):(Qe=t,$===0&&re(b)),Qe!==t)for(;Qe!==t;)V.push(Qe),y.test(r.charAt(v))?(Qe=r.charAt(v),v++):(Qe=t,$===0&&re(b));else V=t;return V!==t&&(x=pe,V=h()),pe=V,pe}if(_=n(),_!==t&&v===r.length)return _;throw _!==t&&v{"use strict";function $M(r){return typeof r=="undefined"||r===null}function nfe(r){return typeof r=="object"&&r!==null}function sfe(r){return Array.isArray(r)?r:$M(r)?[]:[r]}function ofe(r,e){var t,i,n,s;if(e)for(s=Object.keys(e),t=0,i=s.length;t{"use strict";function ep(r,e){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ep.prototype=Object.create(Error.prototype);ep.prototype.constructor=ep;ep.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t};e1.exports=ep});var i1=w((L7e,t1)=>{"use strict";var r1=hc();function RQ(r,e,t,i,n){this.name=r,this.buffer=e,this.position=t,this.line=i,this.column=n}RQ.prototype.getSnippet=function(e,t){var i,n,s,o,a;if(!this.buffer)return null;for(e=e||4,t=t||75,i="",n=this.position;n>0&&`\0\r +\x85\u2028\u2029`.indexOf(this.buffer.charAt(n-1))===-1;)if(n-=1,this.position-n>t/2-1){i=" ... ",n+=5;break}for(s="",o=this.position;ot/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(n,o),r1.repeat(" ",e)+i+a+s+` +`+r1.repeat(" ",e+this.position-n+i.length)+"^"};RQ.prototype.toString=function(e){var t,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(i+=`: +`+t)),i};t1.exports=RQ});var ci=w((T7e,n1)=>{"use strict";var s1=tg(),lfe=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],cfe=["scalar","sequence","mapping"];function ufe(r){var e={};return r!==null&&Object.keys(r).forEach(function(t){r[t].forEach(function(i){e[String(i)]=t})}),e}function gfe(r,e){if(e=e||{},Object.keys(e).forEach(function(t){if(lfe.indexOf(t)===-1)throw new s1('Unknown option "'+t+'" is met in definition of "'+r+'" YAML type.')}),this.tag=r,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=ufe(e.styleAliases||null),cfe.indexOf(this.kind)===-1)throw new s1('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}n1.exports=gfe});var pc=w((O7e,o1)=>{"use strict";var a1=hc(),tI=tg(),ffe=ci();function FQ(r,e,t){var i=[];return r.include.forEach(function(n){t=FQ(n,e,t)}),r[e].forEach(function(n){t.forEach(function(s,o){s.tag===n.tag&&s.kind===n.kind&&i.push(o)}),t.push(n)}),t.filter(function(n,s){return i.indexOf(s)===-1})}function hfe(){var r={scalar:{},sequence:{},mapping:{},fallback:{}},e,t;function i(n){r[n.kind][n.tag]=r.fallback[n.tag]=n}for(e=0,t=arguments.length;e{"use strict";var pfe=ci();A1.exports=new pfe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})});var u1=w((K7e,c1)=>{"use strict";var dfe=ci();c1.exports=new dfe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})});var f1=w((U7e,g1)=>{"use strict";var Cfe=ci();g1.exports=new Cfe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})});var rI=w((H7e,h1)=>{"use strict";var mfe=pc();h1.exports=new mfe({explicit:[l1(),u1(),f1()]})});var d1=w((j7e,p1)=>{"use strict";var Efe=ci();function Ife(r){if(r===null)return!0;var e=r.length;return e===1&&r==="~"||e===4&&(r==="null"||r==="Null"||r==="NULL")}function yfe(){return null}function wfe(r){return r===null}p1.exports=new Efe("tag:yaml.org,2002:null",{kind:"scalar",resolve:Ife,construct:yfe,predicate:wfe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var m1=w((G7e,C1)=>{"use strict";var Bfe=ci();function bfe(r){if(r===null)return!1;var e=r.length;return e===4&&(r==="true"||r==="True"||r==="TRUE")||e===5&&(r==="false"||r==="False"||r==="FALSE")}function Qfe(r){return r==="true"||r==="True"||r==="TRUE"}function Sfe(r){return Object.prototype.toString.call(r)==="[object Boolean]"}C1.exports=new Bfe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:bfe,construct:Qfe,predicate:Sfe,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"})});var I1=w((Y7e,E1)=>{"use strict";var vfe=hc(),xfe=ci();function kfe(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}function Pfe(r){return 48<=r&&r<=55}function Dfe(r){return 48<=r&&r<=57}function Rfe(r){if(r===null)return!1;var e=r.length,t=0,i=!1,n;if(!e)return!1;if(n=r[t],(n==="-"||n==="+")&&(n=r[++t]),n==="0"){if(t+1===e)return!0;if(n=r[++t],n==="b"){for(t++;t=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},octal:function(r){return r>=0?"0"+r.toString(8):"-0"+r.toString(8).slice(1)},decimal:function(r){return r.toString(10)},hexadecimal:function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var B1=w((q7e,y1)=>{"use strict";var w1=hc(),Lfe=ci(),Tfe=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Ofe(r){return!(r===null||!Tfe.test(r)||r[r.length-1]==="_")}function Mfe(r){var e,t,i,n;return e=r.replace(/_/g,"").toLowerCase(),t=e[0]==="-"?-1:1,n=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?t===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(s){n.unshift(parseFloat(s,10))}),e=0,i=1,n.forEach(function(s){e+=s*i,i*=60}),t*e):t*parseFloat(e,10)}var Kfe=/^[-+]?[0-9]+e/;function Ufe(r,e){var t;if(isNaN(r))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===r)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===r)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(w1.isNegativeZero(r))return"-0.0";return t=r.toString(10),Kfe.test(t)?t.replace("e",".e"):t}function Hfe(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!=0||w1.isNegativeZero(r))}y1.exports=new Lfe("tag:yaml.org,2002:float",{kind:"scalar",resolve:Ofe,construct:Mfe,predicate:Hfe,represent:Ufe,defaultStyle:"lowercase"})});var NQ=w((J7e,b1)=>{"use strict";var jfe=pc();b1.exports=new jfe({include:[rI()],implicit:[d1(),m1(),I1(),B1()]})});var LQ=w((W7e,Q1)=>{"use strict";var Gfe=pc();Q1.exports=new Gfe({include:[NQ()]})});var k1=w((z7e,S1)=>{"use strict";var Yfe=ci(),v1=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),x1=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function qfe(r){return r===null?!1:v1.exec(r)!==null||x1.exec(r)!==null}function Jfe(r){var e,t,i,n,s,o,a,l=0,c=null,u,g,f;if(e=v1.exec(r),e===null&&(e=x1.exec(r)),e===null)throw new Error("Date resolve error");if(t=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(t,i,n));if(s=+e[4],o=+e[5],a=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],g=+(e[11]||0),c=(u*60+g)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(t,i,n,s,o,a,l)),c&&f.setTime(f.getTime()-c),f}function Wfe(r){return r.toISOString()}S1.exports=new Yfe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:qfe,construct:Jfe,instanceOf:Date,represent:Wfe})});var D1=w((_7e,P1)=>{"use strict";var zfe=ci();function _fe(r){return r==="<<"||r===null}P1.exports=new zfe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:_fe})});var N1=w((V7e,R1)=>{"use strict";var dc;try{F1=require,dc=F1("buffer").Buffer}catch(r){}var F1,Vfe=ci(),TQ=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function Xfe(r){if(r===null)return!1;var e,t,i=0,n=r.length,s=TQ;for(t=0;t64)){if(e<0)return!1;i+=6}return i%8==0}function Zfe(r){var e,t,i=r.replace(/[\r\n=]/g,""),n=i.length,s=TQ,o=0,a=[];for(e=0;e>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(i.charAt(e));return t=n%4*6,t===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):t===18?(a.push(o>>10&255),a.push(o>>2&255)):t===12&&a.push(o>>4&255),dc?dc.from?dc.from(a):new dc(a):a}function $fe(r){var e="",t=0,i,n,s=r.length,o=TQ;for(i=0;i>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]),t=(t<<8)+r[i];return n=s%3,n===0?(e+=o[t>>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]):n===2?(e+=o[t>>10&63],e+=o[t>>4&63],e+=o[t<<2&63],e+=o[64]):n===1&&(e+=o[t>>2&63],e+=o[t<<4&63],e+=o[64],e+=o[64]),e}function ehe(r){return dc&&dc.isBuffer(r)}R1.exports=new Vfe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Xfe,construct:Zfe,predicate:ehe,represent:$fe})});var T1=w((X7e,L1)=>{"use strict";var the=ci(),rhe=Object.prototype.hasOwnProperty,ihe=Object.prototype.toString;function nhe(r){if(r===null)return!0;var e=[],t,i,n,s,o,a=r;for(t=0,i=a.length;t{"use strict";var ohe=ci(),ahe=Object.prototype.toString;function Ahe(r){if(r===null)return!0;var e,t,i,n,s,o=r;for(s=new Array(o.length),e=0,t=o.length;e{"use strict";var che=ci(),uhe=Object.prototype.hasOwnProperty;function ghe(r){if(r===null)return!0;var e,t=r;for(e in t)if(uhe.call(t,e)&&t[e]!==null)return!1;return!0}function fhe(r){return r!==null?r:{}}K1.exports=new che("tag:yaml.org,2002:set",{kind:"mapping",resolve:ghe,construct:fhe})});var ig=w((eXe,H1)=>{"use strict";var hhe=pc();H1.exports=new hhe({include:[LQ()],implicit:[k1(),D1()],explicit:[N1(),T1(),M1(),U1()]})});var G1=w((tXe,j1)=>{"use strict";var phe=ci();function dhe(){return!0}function Che(){}function mhe(){return""}function Ehe(r){return typeof r=="undefined"}j1.exports=new phe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:dhe,construct:Che,predicate:Ehe,represent:mhe})});var q1=w((rXe,Y1)=>{"use strict";var Ihe=ci();function yhe(r){if(r===null||r.length===0)return!1;var e=r,t=/\/([gim]*)$/.exec(r),i="";return!(e[0]==="/"&&(t&&(i=t[1]),i.length>3||e[e.length-i.length-1]!=="/"))}function whe(r){var e=r,t=/\/([gim]*)$/.exec(r),i="";return e[0]==="/"&&(t&&(i=t[1]),e=e.slice(1,e.length-i.length-1)),new RegExp(e,i)}function Bhe(r){var e="/"+r.source+"/";return r.global&&(e+="g"),r.multiline&&(e+="m"),r.ignoreCase&&(e+="i"),e}function bhe(r){return Object.prototype.toString.call(r)==="[object RegExp]"}Y1.exports=new Ihe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:yhe,construct:whe,predicate:bhe,represent:Bhe})});var z1=w((iXe,J1)=>{"use strict";var iI;try{W1=require,iI=W1("esprima")}catch(r){typeof window!="undefined"&&(iI=window.esprima)}var W1,Qhe=ci();function She(r){if(r===null)return!1;try{var e="("+r+")",t=iI.parse(e,{range:!0});return!(t.type!=="Program"||t.body.length!==1||t.body[0].type!=="ExpressionStatement"||t.body[0].expression.type!=="ArrowFunctionExpression"&&t.body[0].expression.type!=="FunctionExpression")}catch(i){return!1}}function vhe(r){var e="("+r+")",t=iI.parse(e,{range:!0}),i=[],n;if(t.type!=="Program"||t.body.length!==1||t.body[0].type!=="ExpressionStatement"||t.body[0].expression.type!=="ArrowFunctionExpression"&&t.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return t.body[0].expression.params.forEach(function(s){i.push(s.name)}),n=t.body[0].expression.body.range,t.body[0].expression.body.type==="BlockStatement"?new Function(i,e.slice(n[0]+1,n[1]-1)):new Function(i,"return "+e.slice(n[0],n[1]))}function xhe(r){return r.toString()}function khe(r){return Object.prototype.toString.call(r)==="[object Function]"}J1.exports=new Qhe("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:She,construct:vhe,predicate:khe,represent:xhe})});var tp=w((nXe,_1)=>{"use strict";var V1=pc();_1.exports=V1.DEFAULT=new V1({include:[ig()],explicit:[G1(),q1(),z1()]})});var pK=w((sXe,rp)=>{"use strict";var Oa=hc(),X1=tg(),Phe=i1(),Z1=ig(),Dhe=tp(),JA=Object.prototype.hasOwnProperty,nI=1,$1=2,eK=3,sI=4,OQ=1,Rhe=2,tK=3,Fhe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Nhe=/[\x85\u2028\u2029]/,Lhe=/[,\[\]\{\}]/,rK=/^(?:!|!!|![a-z\-]+!)$/i,iK=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function nK(r){return Object.prototype.toString.call(r)}function Lo(r){return r===10||r===13}function Cc(r){return r===9||r===32}function yn(r){return r===9||r===32||r===10||r===13}function ng(r){return r===44||r===91||r===93||r===123||r===125}function The(r){var e;return 48<=r&&r<=57?r-48:(e=r|32,97<=e&&e<=102?e-97+10:-1)}function Ohe(r){return r===120?2:r===117?4:r===85?8:0}function Mhe(r){return 48<=r&&r<=57?r-48:-1}function sK(r){return r===48?"\0":r===97?"\x07":r===98?"\b":r===116||r===9?" ":r===110?` +`:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"\x85":r===95?"\xA0":r===76?"\u2028":r===80?"\u2029":""}function Khe(r){return r<=65535?String.fromCharCode(r):String.fromCharCode((r-65536>>10)+55296,(r-65536&1023)+56320)}var oK=new Array(256),aK=new Array(256);for(var sg=0;sg<256;sg++)oK[sg]=sK(sg)?1:0,aK[sg]=sK(sg);function Uhe(r,e){this.input=r,this.filename=e.filename||null,this.schema=e.schema||Dhe,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=r.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function AK(r,e){return new X1(e,new Phe(r.filename,r.input,r.position,r.line,r.position-r.lineStart))}function dt(r,e){throw AK(r,e)}function oI(r,e){r.onWarning&&r.onWarning.call(null,AK(r,e))}var lK={YAML:function(e,t,i){var n,s,o;e.version!==null&&dt(e,"duplication of %YAML directive"),i.length!==1&&dt(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&dt(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),o=parseInt(n[2],10),s!==1&&dt(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&oI(e,"unsupported YAML version of the document")},TAG:function(e,t,i){var n,s;i.length!==2&&dt(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],rK.test(n)||dt(e,"ill-formed tag handle (first argument) of the TAG directive"),JA.call(e.tagMap,n)&&dt(e,'there is a previously declared suffix for "'+n+'" tag handle'),iK.test(s)||dt(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=s}};function WA(r,e,t,i){var n,s,o,a;if(e1&&(r.result+=Oa.repeat(` +`,e-1))}function Hhe(r,e,t){var i,n,s,o,a,l,c,u,g=r.kind,f=r.result,h;if(h=r.input.charCodeAt(r.position),yn(h)||ng(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(n=r.input.charCodeAt(r.position+1),yn(n)||t&&ng(n)))return!1;for(r.kind="scalar",r.result="",s=o=r.position,a=!1;h!==0;){if(h===58){if(n=r.input.charCodeAt(r.position+1),yn(n)||t&&ng(n))break}else if(h===35){if(i=r.input.charCodeAt(r.position-1),yn(i))break}else{if(r.position===r.lineStart&&aI(r)||t&&ng(h))break;if(Lo(h))if(l=r.line,c=r.lineStart,u=r.lineIndent,ei(r,!1,-1),r.lineIndent>=e){a=!0,h=r.input.charCodeAt(r.position);continue}else{r.position=o,r.line=l,r.lineStart=c,r.lineIndent=u;break}}a&&(WA(r,s,o,!1),KQ(r,r.line-l),s=o=r.position,a=!1),Cc(h)||(o=r.position+1),h=r.input.charCodeAt(++r.position)}return WA(r,s,o,!1),r.result?!0:(r.kind=g,r.result=f,!1)}function jhe(r,e){var t,i,n;if(t=r.input.charCodeAt(r.position),t!==39)return!1;for(r.kind="scalar",r.result="",r.position++,i=n=r.position;(t=r.input.charCodeAt(r.position))!==0;)if(t===39)if(WA(r,i,r.position,!0),t=r.input.charCodeAt(++r.position),t===39)i=r.position,r.position++,n=r.position;else return!0;else Lo(t)?(WA(r,i,n,!0),KQ(r,ei(r,!1,e)),i=n=r.position):r.position===r.lineStart&&aI(r)?dt(r,"unexpected end of the document within a single quoted scalar"):(r.position++,n=r.position);dt(r,"unexpected end of the stream within a single quoted scalar")}function Ghe(r,e){var t,i,n,s,o,a;if(a=r.input.charCodeAt(r.position),a!==34)return!1;for(r.kind="scalar",r.result="",r.position++,t=i=r.position;(a=r.input.charCodeAt(r.position))!==0;){if(a===34)return WA(r,t,r.position,!0),r.position++,!0;if(a===92){if(WA(r,t,r.position,!0),a=r.input.charCodeAt(++r.position),Lo(a))ei(r,!1,e);else if(a<256&&oK[a])r.result+=aK[a],r.position++;else if((o=Ohe(a))>0){for(n=o,s=0;n>0;n--)a=r.input.charCodeAt(++r.position),(o=The(a))>=0?s=(s<<4)+o:dt(r,"expected hexadecimal character");r.result+=Khe(s),r.position++}else dt(r,"unknown escape sequence");t=i=r.position}else Lo(a)?(WA(r,t,i,!0),KQ(r,ei(r,!1,e)),t=i=r.position):r.position===r.lineStart&&aI(r)?dt(r,"unexpected end of the document within a double quoted scalar"):(r.position++,i=r.position)}dt(r,"unexpected end of the stream within a double quoted scalar")}function Yhe(r,e){var t=!0,i,n=r.tag,s,o=r.anchor,a,l,c,u,g,f={},h,p,m,y;if(y=r.input.charCodeAt(r.position),y===91)l=93,g=!1,s=[];else if(y===123)l=125,g=!0,s={};else return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=s),y=r.input.charCodeAt(++r.position);y!==0;){if(ei(r,!0,e),y=r.input.charCodeAt(r.position),y===l)return r.position++,r.tag=n,r.anchor=o,r.kind=g?"mapping":"sequence",r.result=s,!0;t||dt(r,"missed comma between flow collection entries"),p=h=m=null,c=u=!1,y===63&&(a=r.input.charCodeAt(r.position+1),yn(a)&&(c=u=!0,r.position++,ei(r,!0,e))),i=r.line,ag(r,e,nI,!1,!0),p=r.tag,h=r.result,ei(r,!0,e),y=r.input.charCodeAt(r.position),(u||r.line===i)&&y===58&&(c=!0,y=r.input.charCodeAt(++r.position),ei(r,!0,e),ag(r,e,nI,!1,!0),m=r.result),g?og(r,s,f,p,h,m):c?s.push(og(r,null,f,p,h,m)):s.push(h),ei(r,!0,e),y=r.input.charCodeAt(r.position),y===44?(t=!0,y=r.input.charCodeAt(++r.position)):t=!1}dt(r,"unexpected end of the stream within a flow collection")}function qhe(r,e){var t,i,n=OQ,s=!1,o=!1,a=e,l=0,c=!1,u,g;if(g=r.input.charCodeAt(r.position),g===124)i=!1;else if(g===62)i=!0;else return!1;for(r.kind="scalar",r.result="";g!==0;)if(g=r.input.charCodeAt(++r.position),g===43||g===45)OQ===n?n=g===43?tK:Rhe:dt(r,"repeat of a chomping mode identifier");else if((u=Mhe(g))>=0)u===0?dt(r,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?dt(r,"repeat of an indentation width identifier"):(a=e+u-1,o=!0);else break;if(Cc(g)){do g=r.input.charCodeAt(++r.position);while(Cc(g));if(g===35)do g=r.input.charCodeAt(++r.position);while(!Lo(g)&&g!==0)}for(;g!==0;){for(MQ(r),r.lineIndent=0,g=r.input.charCodeAt(r.position);(!o||r.lineIndenta&&(a=r.lineIndent),Lo(g)){l++;continue}if(r.lineIndente)&&l!==0)dt(r,"bad indentation of a sequence entry");else if(r.lineIndente)&&(ag(r,e,sI,!0,n)&&(p?f=r.result:h=r.result),p||(og(r,c,u,g,f,h,s,o),g=f=h=null),ei(r,!0,-1),y=r.input.charCodeAt(r.position)),r.lineIndent>e&&y!==0)dt(r,"bad indentation of a mapping entry");else if(r.lineIndente?l=1:r.lineIndent===e?l=0:r.lineIndente?l=1:r.lineIndent===e?l=0:r.lineIndent tag; it should be "scalar", not "'+r.kind+'"'),g=0,f=r.implicitTypes.length;g tag; it should be "'+h.kind+'", not "'+r.kind+'"'),h.resolve(r.result)?(r.result=h.construct(r.result),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):dt(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")):dt(r,"unknown tag !<"+r.tag+">");return r.listener!==null&&r.listener("close",r),r.tag!==null||r.anchor!==null||u}function Vhe(r){var e=r.position,t,i,n,s=!1,o;for(r.version=null,r.checkLineBreaks=r.legacy,r.tagMap={},r.anchorMap={};(o=r.input.charCodeAt(r.position))!==0&&(ei(r,!0,-1),o=r.input.charCodeAt(r.position),!(r.lineIndent>0||o!==37));){for(s=!0,o=r.input.charCodeAt(++r.position),t=r.position;o!==0&&!yn(o);)o=r.input.charCodeAt(++r.position);for(i=r.input.slice(t,r.position),n=[],i.length<1&&dt(r,"directive name must not be less than one character in length");o!==0;){for(;Cc(o);)o=r.input.charCodeAt(++r.position);if(o===35){do o=r.input.charCodeAt(++r.position);while(o!==0&&!Lo(o));break}if(Lo(o))break;for(t=r.position;o!==0&&!yn(o);)o=r.input.charCodeAt(++r.position);n.push(r.input.slice(t,r.position))}o!==0&&MQ(r),JA.call(lK,i)?lK[i](r,i,n):oI(r,'unknown document directive "'+i+'"')}if(ei(r,!0,-1),r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45?(r.position+=3,ei(r,!0,-1)):s&&dt(r,"directives end mark is expected"),ag(r,r.lineIndent-1,sI,!1,!0),ei(r,!0,-1),r.checkLineBreaks&&Nhe.test(r.input.slice(e,r.position))&&oI(r,"non-ASCII line breaks are interpreted as content"),r.documents.push(r.result),r.position===r.lineStart&&aI(r)){r.input.charCodeAt(r.position)===46&&(r.position+=3,ei(r,!0,-1));return}if(r.position{"use strict";var ip=hc(),np=tg(),$he=tp(),epe=ig(),dK=Object.prototype.toString,CK=Object.prototype.hasOwnProperty,tpe=9,sp=10,rpe=13,ipe=32,npe=33,spe=34,mK=35,ope=37,ape=38,Ape=39,lpe=42,EK=44,cpe=45,IK=58,upe=61,gpe=62,fpe=63,hpe=64,yK=91,wK=93,ppe=96,BK=123,dpe=124,bK=125,Ki={};Ki[0]="\\0";Ki[7]="\\a";Ki[8]="\\b";Ki[9]="\\t";Ki[10]="\\n";Ki[11]="\\v";Ki[12]="\\f";Ki[13]="\\r";Ki[27]="\\e";Ki[34]='\\"';Ki[92]="\\\\";Ki[133]="\\N";Ki[160]="\\_";Ki[8232]="\\L";Ki[8233]="\\P";var Cpe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function mpe(r,e){var t,i,n,s,o,a,l;if(e===null)return{};for(t={},i=Object.keys(e),n=0,s=i.length;n0?r.charCodeAt(s-1):null,f=f&&vK(o,a)}else{for(s=0;si&&r[g+1]!==" ",g=s);else if(!Ag(o))return AI;a=s>0?r.charCodeAt(s-1):null,f=f&&vK(o,a)}c=c||u&&s-g-1>i&&r[g+1]!==" "}return!l&&!c?f&&!n(r)?kK:PK:t>9&&xK(r)?AI:c?RK:DK}function Spe(r,e,t,i){r.dump=function(){if(e.length===0)return"''";if(!r.noCompatMode&&Cpe.indexOf(e)!==-1)return"'"+e+"'";var n=r.indent*Math.max(1,t),s=r.lineWidth===-1?-1:Math.max(Math.min(r.lineWidth,40),r.lineWidth-n),o=i||r.flowLevel>-1&&t>=r.flowLevel;function a(l){return Ipe(r,l)}switch(Bpe(e,o,r.indent,s,a)){case kK:return e;case PK:return"'"+e.replace(/'/g,"''")+"'";case DK:return"|"+FK(e,r.indent)+NK(SK(e,n));case RK:return">"+FK(e,r.indent)+NK(SK(bpe(e,s),n));case AI:return'"'+Qpe(e,s)+'"';default:throw new np("impossible error: invalid scalar style")}}()}function FK(r,e){var t=xK(r)?String(e):"",i=r[r.length-1]===` +`,n=i&&(r[r.length-2]===` +`||r===` +`),s=n?"+":i?"":"-";return t+s+` +`}function NK(r){return r[r.length-1]===` +`?r.slice(0,-1):r}function bpe(r,e){for(var t=/(\n+)([^\n]*)/g,i=function(){var c=r.indexOf(` +`);return c=c!==-1?c:r.length,t.lastIndex=c,LK(r.slice(0,c),e)}(),n=r[0]===` +`||r[0]===" ",s,o;o=t.exec(r);){var a=o[1],l=o[2];s=l[0]===" ",i+=a+(!n&&!s&&l!==""?` +`:"")+LK(l,e),n=s}return i}function LK(r,e){if(r===""||r[0]===" ")return r;for(var t=/ [^ ]/g,i,n=0,s,o=0,a=0,l="";i=t.exec(r);)a=i.index,a-n>e&&(s=o>n?o:a,l+=` +`+r.slice(n,s),n=s+1),o=a;return l+=` +`,r.length-n>e&&o>n?l+=r.slice(n,o)+` +`+r.slice(o+1):l+=r.slice(n),l.slice(1)}function Qpe(r){for(var e="",t,i,n,s=0;s=55296&&t<=56319&&(i=r.charCodeAt(s+1),i>=56320&&i<=57343)){e+=QK((t-55296)*1024+i-56320+65536),s++;continue}n=Ki[t],e+=!n&&Ag(t)?r[s]:n||QK(t)}return e}function vpe(r,e,t){var i="",n=r.tag,s,o;for(s=0,o=t.length;s1024&&(u+="? "),u+=r.dump+(r.condenseFlow?'"':"")+":"+(r.condenseFlow?"":" "),!!mc(r,e,c,!1,!1)&&(u+=r.dump,i+=u));r.tag=n,r.dump="{"+i+"}"}function Ppe(r,e,t,i){var n="",s=r.tag,o=Object.keys(t),a,l,c,u,g,f;if(r.sortKeys===!0)o.sort();else if(typeof r.sortKeys=="function")o.sort(r.sortKeys);else if(r.sortKeys)throw new np("sortKeys must be a boolean or a function");for(a=0,l=o.length;a1024,g&&(r.dump&&sp===r.dump.charCodeAt(0)?f+="?":f+="? "),f+=r.dump,g&&(f+=HQ(r,e)),!!mc(r,e+1,u,!0,g)&&(r.dump&&sp===r.dump.charCodeAt(0)?f+=":":f+=": ",f+=r.dump,n+=f));r.tag=s,r.dump=n||"{}"}function TK(r,e,t){var i,n,s,o,a,l;for(n=t?r.explicitTypes:r.implicitTypes,s=0,o=n.length;s tag resolver accepts not "'+l+'" style');r.dump=i}return!0}return!1}function mc(r,e,t,i,n,s){r.tag=null,r.dump=t,TK(r,t,!1)||TK(r,t,!0);var o=dK.call(r.dump);i&&(i=r.flowLevel<0||r.flowLevel>e);var a=o==="[object Object]"||o==="[object Array]",l,c;if(a&&(l=r.duplicates.indexOf(t),c=l!==-1),(r.tag!==null&&r.tag!=="?"||c||r.indent!==2&&e>0)&&(n=!1),c&&r.usedDuplicates[l])r.dump="*ref_"+l;else{if(a&&c&&!r.usedDuplicates[l]&&(r.usedDuplicates[l]=!0),o==="[object Object]")i&&Object.keys(r.dump).length!==0?(Ppe(r,e,r.dump,n),c&&(r.dump="&ref_"+l+r.dump)):(kpe(r,e,r.dump),c&&(r.dump="&ref_"+l+" "+r.dump));else if(o==="[object Array]"){var u=r.noArrayIndent&&e>0?e-1:e;i&&r.dump.length!==0?(xpe(r,u,r.dump,n),c&&(r.dump="&ref_"+l+r.dump)):(vpe(r,u,r.dump),c&&(r.dump="&ref_"+l+" "+r.dump))}else if(o==="[object String]")r.tag!=="?"&&Spe(r,r.dump,e,s);else{if(r.skipInvalid)return!1;throw new np("unacceptable kind of an object to dump "+o)}r.tag!==null&&r.tag!=="?"&&(r.dump="!<"+r.tag+"> "+r.dump)}return!0}function Dpe(r,e){var t=[],i=[],n,s;for(GQ(r,t,i),n=0,s=i.length;n{"use strict";var lI=pK(),KK=MK();function cI(r){return function(){throw new Error("Function "+r+" is deprecated and cannot be used.")}}Mr.exports.Type=ci();Mr.exports.Schema=pc();Mr.exports.FAILSAFE_SCHEMA=rI();Mr.exports.JSON_SCHEMA=NQ();Mr.exports.CORE_SCHEMA=LQ();Mr.exports.DEFAULT_SAFE_SCHEMA=ig();Mr.exports.DEFAULT_FULL_SCHEMA=tp();Mr.exports.load=lI.load;Mr.exports.loadAll=lI.loadAll;Mr.exports.safeLoad=lI.safeLoad;Mr.exports.safeLoadAll=lI.safeLoadAll;Mr.exports.dump=KK.dump;Mr.exports.safeDump=KK.safeDump;Mr.exports.YAMLException=tg();Mr.exports.MINIMAL_SCHEMA=rI();Mr.exports.SAFE_SCHEMA=ig();Mr.exports.DEFAULT_SCHEMA=tp();Mr.exports.scan=cI("scan");Mr.exports.parse=cI("parse");Mr.exports.compose=cI("compose");Mr.exports.addConstructor=cI("addConstructor")});var jK=w((AXe,HK)=>{"use strict";var Fpe=UK();HK.exports=Fpe});var YK=w((lXe,GK)=>{"use strict";function Npe(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function Ec(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ec)}Npe(Ec,Error);Ec.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g({[He]:Ce})))},q=function(R){return R},Y=function(R){return R},$=Zs("correct indentation"),_=" ",ne=gr(" ",!1),ee=function(R){return R.length===KA*Ju},A=function(R){return R.length===(KA+1)*Ju},oe=function(){return KA++,!0},ce=function(){return KA--,!0},Z=function(){return Uu()},O=Zs("pseudostring"),L=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,de=qn(["\r",` +`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),Be=/^[^\r\n\t ,\][{}:#"']/,je=qn(["\r",` +`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),re=function(){return Uu().replace(/^ *| *$/g,"")},se="--",be=gr("--",!1),he=/^[a-zA-Z\/0-9]/,Fe=qn([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),Ke=/^[^\r\n\t :,]/,ke=qn(["\r",` +`," "," ",":",","],!0,!1),ve="null",pe=gr("null",!1),V=function(){return null},Qe="true",le=gr("true",!1),fe=function(){return!0},gt="false",Ht=gr("false",!1),Mt=function(){return!1},Ei=Zs("string"),jt='"',Qr=gr('"',!1),Oi=function(){return""},Xs=function(R){return R},Un=function(R){return R.join("")},Hn=/^[^"\\\0-\x1F\x7F]/,Sr=qn(['"',"\\",["\0",""],"\x7F"],!0,!1),jn='\\"',fs=gr('\\"',!1),ba=function(){return'"'},DA="\\\\",Nu=gr("\\\\",!1),hs=function(){return"\\"},RA="\\/",Qa=gr("\\/",!1),Lu=function(){return"/"},FA="\\b",NA=gr("\\b",!1),vr=function(){return"\b"},zl="\\f",Tu=gr("\\f",!1),xo=function(){return"\f"},Ou="\\n",Sh=gr("\\n",!1),vh=function(){return` +`},Dr="\\r",Ae=gr("\\r",!1),ko=function(){return"\r"},Gn="\\t",Mu=gr("\\t",!1),St=function(){return" "},_l="\\u",Yn=gr("\\u",!1),ps=function(R,G,Ce,He){return String.fromCharCode(parseInt(`0x${R}${G}${Ce}${He}`))},ds=/^[0-9a-fA-F]/,pt=qn([["0","9"],["a","f"],["A","F"]],!1,!1),Po=Zs("blank space"),lt=/^[ \t]/,mn=qn([" "," "],!1,!1),S=Zs("white space"),Tt=/^[ \t\n\r]/,Ku=qn([" "," ",` +`,"\r"],!1,!1),Vl=`\r +`,xh=gr(`\r +`,!1),kh=` +`,Ph=gr(` +`,!1),Dh="\r",Rh=gr("\r",!1),j=0,wt=0,LA=[{line:1,column:1}],$i=0,Xl=[],$e=0,Sa;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function Uu(){return r.substring(wt,j)}function yE(){return En(wt,j)}function Fh(R,G){throw G=G!==void 0?G:En(wt,j),$l([Zs(R)],r.substring(wt,j),G)}function wE(R,G){throw G=G!==void 0?G:En(wt,j),Hu(R,G)}function gr(R,G){return{type:"literal",text:R,ignoreCase:G}}function qn(R,G,Ce){return{type:"class",parts:R,inverted:G,ignoreCase:Ce}}function Zl(){return{type:"any"}}function Nh(){return{type:"end"}}function Zs(R){return{type:"other",description:R}}function va(R){var G=LA[R],Ce;if(G)return G;for(Ce=R-1;!LA[Ce];)Ce--;for(G=LA[Ce],G={line:G.line,column:G.column};Ce$i&&($i=j,Xl=[]),Xl.push(R))}function Hu(R,G){return new Ec(R,null,null,G)}function $l(R,G,Ce){return new Ec(Ec.buildMessage(R,G),R,G,Ce)}function $s(){var R;return R=ju(),R}function ec(){var R,G,Ce;for(R=j,G=[],Ce=TA();Ce!==t;)G.push(Ce),Ce=TA();return G!==t&&(wt=R,G=s(G)),R=G,R}function TA(){var R,G,Ce,He,Te;return R=j,G=ka(),G!==t?(r.charCodeAt(j)===45?(Ce=o,j++):(Ce=t,$e===0&&Oe(a)),Ce!==t?(He=Tr(),He!==t?(Te=xa(),Te!==t?(wt=R,G=l(Te),R=G):(j=R,R=t)):(j=R,R=t)):(j=R,R=t)):(j=R,R=t),R}function ju(){var R,G,Ce;for(R=j,G=[],Ce=Gu();Ce!==t;)G.push(Ce),Ce=Gu();return G!==t&&(wt=R,G=c(G)),R=G,R}function Gu(){var R,G,Ce,He,Te,Xe,Et,Rt,Jn;if(R=j,G=Tr(),G===t&&(G=null),G!==t){if(Ce=j,r.charCodeAt(j)===35?(He=u,j++):(He=t,$e===0&&Oe(g)),He!==t){if(Te=[],Xe=j,Et=j,$e++,Rt=ro(),$e--,Rt===t?Et=void 0:(j=Et,Et=t),Et!==t?(r.length>j?(Rt=r.charAt(j),j++):(Rt=t,$e===0&&Oe(f)),Rt!==t?(Et=[Et,Rt],Xe=Et):(j=Xe,Xe=t)):(j=Xe,Xe=t),Xe!==t)for(;Xe!==t;)Te.push(Xe),Xe=j,Et=j,$e++,Rt=ro(),$e--,Rt===t?Et=void 0:(j=Et,Et=t),Et!==t?(r.length>j?(Rt=r.charAt(j),j++):(Rt=t,$e===0&&Oe(f)),Rt!==t?(Et=[Et,Rt],Xe=Et):(j=Xe,Xe=t)):(j=Xe,Xe=t);else Te=t;Te!==t?(He=[He,Te],Ce=He):(j=Ce,Ce=t)}else j=Ce,Ce=t;if(Ce===t&&(Ce=null),Ce!==t){if(He=[],Te=to(),Te!==t)for(;Te!==t;)He.push(Te),Te=to();else He=t;He!==t?(wt=R,G=h(),R=G):(j=R,R=t)}else j=R,R=t}else j=R,R=t;if(R===t&&(R=j,G=ka(),G!==t?(Ce=tc(),Ce!==t?(He=Tr(),He===t&&(He=null),He!==t?(r.charCodeAt(j)===58?(Te=p,j++):(Te=t,$e===0&&Oe(m)),Te!==t?(Xe=Tr(),Xe===t&&(Xe=null),Xe!==t?(Et=xa(),Et!==t?(wt=R,G=y(Ce,Et),R=G):(j=R,R=t)):(j=R,R=t)):(j=R,R=t)):(j=R,R=t)):(j=R,R=t)):(j=R,R=t),R===t&&(R=j,G=ka(),G!==t?(Ce=eo(),Ce!==t?(He=Tr(),He===t&&(He=null),He!==t?(r.charCodeAt(j)===58?(Te=p,j++):(Te=t,$e===0&&Oe(m)),Te!==t?(Xe=Tr(),Xe===t&&(Xe=null),Xe!==t?(Et=xa(),Et!==t?(wt=R,G=y(Ce,Et),R=G):(j=R,R=t)):(j=R,R=t)):(j=R,R=t)):(j=R,R=t)):(j=R,R=t)):(j=R,R=t),R===t))){if(R=j,G=ka(),G!==t)if(Ce=eo(),Ce!==t)if(He=Tr(),He!==t)if(Te=BE(),Te!==t){if(Xe=[],Et=to(),Et!==t)for(;Et!==t;)Xe.push(Et),Et=to();else Xe=t;Xe!==t?(wt=R,G=y(Ce,Te),R=G):(j=R,R=t)}else j=R,R=t;else j=R,R=t;else j=R,R=t;else j=R,R=t;if(R===t)if(R=j,G=ka(),G!==t)if(Ce=eo(),Ce!==t){if(He=[],Te=j,Xe=Tr(),Xe===t&&(Xe=null),Xe!==t?(r.charCodeAt(j)===44?(Et=b,j++):(Et=t,$e===0&&Oe(v)),Et!==t?(Rt=Tr(),Rt===t&&(Rt=null),Rt!==t?(Jn=eo(),Jn!==t?(wt=Te,Xe=x(Ce,Jn),Te=Xe):(j=Te,Te=t)):(j=Te,Te=t)):(j=Te,Te=t)):(j=Te,Te=t),Te!==t)for(;Te!==t;)He.push(Te),Te=j,Xe=Tr(),Xe===t&&(Xe=null),Xe!==t?(r.charCodeAt(j)===44?(Et=b,j++):(Et=t,$e===0&&Oe(v)),Et!==t?(Rt=Tr(),Rt===t&&(Rt=null),Rt!==t?(Jn=eo(),Jn!==t?(wt=Te,Xe=x(Ce,Jn),Te=Xe):(j=Te,Te=t)):(j=Te,Te=t)):(j=Te,Te=t)):(j=Te,Te=t);else He=t;He!==t?(Te=Tr(),Te===t&&(Te=null),Te!==t?(r.charCodeAt(j)===58?(Xe=p,j++):(Xe=t,$e===0&&Oe(m)),Xe!==t?(Et=Tr(),Et===t&&(Et=null),Et!==t?(Rt=xa(),Rt!==t?(wt=R,G=T(Ce,He,Rt),R=G):(j=R,R=t)):(j=R,R=t)):(j=R,R=t)):(j=R,R=t)):(j=R,R=t)}else j=R,R=t;else j=R,R=t}return R}function xa(){var R,G,Ce,He,Te,Xe,Et;if(R=j,G=j,$e++,Ce=j,He=ro(),He!==t?(Te=nt(),Te!==t?(r.charCodeAt(j)===45?(Xe=o,j++):(Xe=t,$e===0&&Oe(a)),Xe!==t?(Et=Tr(),Et!==t?(He=[He,Te,Xe,Et],Ce=He):(j=Ce,Ce=t)):(j=Ce,Ce=t)):(j=Ce,Ce=t)):(j=Ce,Ce=t),$e--,Ce!==t?(j=G,G=void 0):G=t,G!==t?(Ce=to(),Ce!==t?(He=Do(),He!==t?(Te=ec(),Te!==t?(Xe=OA(),Xe!==t?(wt=R,G=q(Te),R=G):(j=R,R=t)):(j=R,R=t)):(j=R,R=t)):(j=R,R=t)):(j=R,R=t),R===t&&(R=j,G=ro(),G!==t?(Ce=Do(),Ce!==t?(He=ju(),He!==t?(Te=OA(),Te!==t?(wt=R,G=q(He),R=G):(j=R,R=t)):(j=R,R=t)):(j=R,R=t)):(j=R,R=t),R===t))if(R=j,G=rc(),G!==t){if(Ce=[],He=to(),He!==t)for(;He!==t;)Ce.push(He),He=to();else Ce=t;Ce!==t?(wt=R,G=Y(G),R=G):(j=R,R=t)}else j=R,R=t;return R}function ka(){var R,G,Ce;for($e++,R=j,G=[],r.charCodeAt(j)===32?(Ce=_,j++):(Ce=t,$e===0&&Oe(ne));Ce!==t;)G.push(Ce),r.charCodeAt(j)===32?(Ce=_,j++):(Ce=t,$e===0&&Oe(ne));return G!==t?(wt=j,Ce=ee(G),Ce?Ce=void 0:Ce=t,Ce!==t?(G=[G,Ce],R=G):(j=R,R=t)):(j=R,R=t),$e--,R===t&&(G=t,$e===0&&Oe($)),R}function nt(){var R,G,Ce;for(R=j,G=[],r.charCodeAt(j)===32?(Ce=_,j++):(Ce=t,$e===0&&Oe(ne));Ce!==t;)G.push(Ce),r.charCodeAt(j)===32?(Ce=_,j++):(Ce=t,$e===0&&Oe(ne));return G!==t?(wt=j,Ce=A(G),Ce?Ce=void 0:Ce=t,Ce!==t?(G=[G,Ce],R=G):(j=R,R=t)):(j=R,R=t),R}function Do(){var R;return wt=j,R=oe(),R?R=void 0:R=t,R}function OA(){var R;return wt=j,R=ce(),R?R=void 0:R=t,R}function tc(){var R;return R=ic(),R===t&&(R=Lh()),R}function eo(){var R,G,Ce;if(R=ic(),R===t){if(R=j,G=[],Ce=Yu(),Ce!==t)for(;Ce!==t;)G.push(Ce),Ce=Yu();else G=t;G!==t&&(wt=R,G=Z()),R=G}return R}function rc(){var R;return R=Th(),R===t&&(R=bE(),R===t&&(R=ic(),R===t&&(R=Lh()))),R}function BE(){var R;return R=Th(),R===t&&(R=ic(),R===t&&(R=Yu())),R}function Lh(){var R,G,Ce,He,Te,Xe;if($e++,R=j,L.test(r.charAt(j))?(G=r.charAt(j),j++):(G=t,$e===0&&Oe(de)),G!==t){for(Ce=[],He=j,Te=Tr(),Te===t&&(Te=null),Te!==t?(Be.test(r.charAt(j))?(Xe=r.charAt(j),j++):(Xe=t,$e===0&&Oe(je)),Xe!==t?(Te=[Te,Xe],He=Te):(j=He,He=t)):(j=He,He=t);He!==t;)Ce.push(He),He=j,Te=Tr(),Te===t&&(Te=null),Te!==t?(Be.test(r.charAt(j))?(Xe=r.charAt(j),j++):(Xe=t,$e===0&&Oe(je)),Xe!==t?(Te=[Te,Xe],He=Te):(j=He,He=t)):(j=He,He=t);Ce!==t?(wt=R,G=re(),R=G):(j=R,R=t)}else j=R,R=t;return $e--,R===t&&(G=t,$e===0&&Oe(O)),R}function Yu(){var R,G,Ce,He,Te;if(R=j,r.substr(j,2)===se?(G=se,j+=2):(G=t,$e===0&&Oe(be)),G===t&&(G=null),G!==t)if(he.test(r.charAt(j))?(Ce=r.charAt(j),j++):(Ce=t,$e===0&&Oe(Fe)),Ce!==t){for(He=[],Ke.test(r.charAt(j))?(Te=r.charAt(j),j++):(Te=t,$e===0&&Oe(ke));Te!==t;)He.push(Te),Ke.test(r.charAt(j))?(Te=r.charAt(j),j++):(Te=t,$e===0&&Oe(ke));He!==t?(wt=R,G=re(),R=G):(j=R,R=t)}else j=R,R=t;else j=R,R=t;return R}function Th(){var R,G;return R=j,r.substr(j,4)===ve?(G=ve,j+=4):(G=t,$e===0&&Oe(pe)),G!==t&&(wt=R,G=V()),R=G,R}function bE(){var R,G;return R=j,r.substr(j,4)===Qe?(G=Qe,j+=4):(G=t,$e===0&&Oe(le)),G!==t&&(wt=R,G=fe()),R=G,R===t&&(R=j,r.substr(j,5)===gt?(G=gt,j+=5):(G=t,$e===0&&Oe(Ht)),G!==t&&(wt=R,G=Mt()),R=G),R}function ic(){var R,G,Ce,He;return $e++,R=j,r.charCodeAt(j)===34?(G=jt,j++):(G=t,$e===0&&Oe(Qr)),G!==t?(r.charCodeAt(j)===34?(Ce=jt,j++):(Ce=t,$e===0&&Oe(Qr)),Ce!==t?(wt=R,G=Oi(),R=G):(j=R,R=t)):(j=R,R=t),R===t&&(R=j,r.charCodeAt(j)===34?(G=jt,j++):(G=t,$e===0&&Oe(Qr)),G!==t?(Ce=QE(),Ce!==t?(r.charCodeAt(j)===34?(He=jt,j++):(He=t,$e===0&&Oe(Qr)),He!==t?(wt=R,G=Xs(Ce),R=G):(j=R,R=t)):(j=R,R=t)):(j=R,R=t)),$e--,R===t&&(G=t,$e===0&&Oe(Ei)),R}function QE(){var R,G,Ce;if(R=j,G=[],Ce=qu(),Ce!==t)for(;Ce!==t;)G.push(Ce),Ce=qu();else G=t;return G!==t&&(wt=R,G=Un(G)),R=G,R}function qu(){var R,G,Ce,He,Te,Xe;return Hn.test(r.charAt(j))?(R=r.charAt(j),j++):(R=t,$e===0&&Oe(Sr)),R===t&&(R=j,r.substr(j,2)===jn?(G=jn,j+=2):(G=t,$e===0&&Oe(fs)),G!==t&&(wt=R,G=ba()),R=G,R===t&&(R=j,r.substr(j,2)===DA?(G=DA,j+=2):(G=t,$e===0&&Oe(Nu)),G!==t&&(wt=R,G=hs()),R=G,R===t&&(R=j,r.substr(j,2)===RA?(G=RA,j+=2):(G=t,$e===0&&Oe(Qa)),G!==t&&(wt=R,G=Lu()),R=G,R===t&&(R=j,r.substr(j,2)===FA?(G=FA,j+=2):(G=t,$e===0&&Oe(NA)),G!==t&&(wt=R,G=vr()),R=G,R===t&&(R=j,r.substr(j,2)===zl?(G=zl,j+=2):(G=t,$e===0&&Oe(Tu)),G!==t&&(wt=R,G=xo()),R=G,R===t&&(R=j,r.substr(j,2)===Ou?(G=Ou,j+=2):(G=t,$e===0&&Oe(Sh)),G!==t&&(wt=R,G=vh()),R=G,R===t&&(R=j,r.substr(j,2)===Dr?(G=Dr,j+=2):(G=t,$e===0&&Oe(Ae)),G!==t&&(wt=R,G=ko()),R=G,R===t&&(R=j,r.substr(j,2)===Gn?(G=Gn,j+=2):(G=t,$e===0&&Oe(Mu)),G!==t&&(wt=R,G=St()),R=G,R===t&&(R=j,r.substr(j,2)===_l?(G=_l,j+=2):(G=t,$e===0&&Oe(Yn)),G!==t?(Ce=MA(),Ce!==t?(He=MA(),He!==t?(Te=MA(),Te!==t?(Xe=MA(),Xe!==t?(wt=R,G=ps(Ce,He,Te,Xe),R=G):(j=R,R=t)):(j=R,R=t)):(j=R,R=t)):(j=R,R=t)):(j=R,R=t)))))))))),R}function MA(){var R;return ds.test(r.charAt(j))?(R=r.charAt(j),j++):(R=t,$e===0&&Oe(pt)),R}function Tr(){var R,G;if($e++,R=[],lt.test(r.charAt(j))?(G=r.charAt(j),j++):(G=t,$e===0&&Oe(mn)),G!==t)for(;G!==t;)R.push(G),lt.test(r.charAt(j))?(G=r.charAt(j),j++):(G=t,$e===0&&Oe(mn));else R=t;return $e--,R===t&&(G=t,$e===0&&Oe(Po)),R}function SE(){var R,G;if($e++,R=[],Tt.test(r.charAt(j))?(G=r.charAt(j),j++):(G=t,$e===0&&Oe(Ku)),G!==t)for(;G!==t;)R.push(G),Tt.test(r.charAt(j))?(G=r.charAt(j),j++):(G=t,$e===0&&Oe(Ku));else R=t;return $e--,R===t&&(G=t,$e===0&&Oe(S)),R}function to(){var R,G,Ce,He,Te,Xe;if(R=j,G=ro(),G!==t){for(Ce=[],He=j,Te=Tr(),Te===t&&(Te=null),Te!==t?(Xe=ro(),Xe!==t?(Te=[Te,Xe],He=Te):(j=He,He=t)):(j=He,He=t);He!==t;)Ce.push(He),He=j,Te=Tr(),Te===t&&(Te=null),Te!==t?(Xe=ro(),Xe!==t?(Te=[Te,Xe],He=Te):(j=He,He=t)):(j=He,He=t);Ce!==t?(G=[G,Ce],R=G):(j=R,R=t)}else j=R,R=t;return R}function ro(){var R;return r.substr(j,2)===Vl?(R=Vl,j+=2):(R=t,$e===0&&Oe(xh)),R===t&&(r.charCodeAt(j)===10?(R=kh,j++):(R=t,$e===0&&Oe(Ph)),R===t&&(r.charCodeAt(j)===13?(R=Dh,j++):(R=t,$e===0&&Oe(Rh)))),R}let Ju=2,KA=0;if(Sa=n(),Sa!==t&&j===r.length)return Sa;throw Sa!==t&&j{"use strict";var Upe=r=>{let e=!1,t=!1,i=!1;for(let n=0;n{if(!(typeof r=="string"||Array.isArray(r)))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);let t=n=>e.pascalCase?n.charAt(0).toUpperCase()+n.slice(1):n;return Array.isArray(r)?r=r.map(n=>n.trim()).filter(n=>n.length).join("-"):r=r.trim(),r.length===0?"":r.length===1?e.pascalCase?r.toUpperCase():r.toLowerCase():(r!==r.toLowerCase()&&(r=Upe(r)),r=r.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(n,s)=>s.toUpperCase()).replace(/\d+(\w|$)/g,n=>n.toUpperCase()),t(r))};JQ.exports=_K;JQ.exports.default=_K});var ZK=w((pXe,XK)=>{XK.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vercel",constant:"VERCEL",env:"NOW_BUILDER"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"}]});var Ic=w(Xn=>{"use strict";var $K=ZK(),To=process.env;Object.defineProperty(Xn,"_vendors",{value:$K.map(function(r){return r.constant})});Xn.name=null;Xn.isPR=null;$K.forEach(function(r){let t=(Array.isArray(r.env)?r.env:[r.env]).every(function(i){return eU(i)});if(Xn[r.constant]=t,t)switch(Xn.name=r.name,typeof r.pr){case"string":Xn.isPR=!!To[r.pr];break;case"object":"env"in r.pr?Xn.isPR=r.pr.env in To&&To[r.pr.env]!==r.pr.ne:"any"in r.pr?Xn.isPR=r.pr.any.some(function(i){return!!To[i]}):Xn.isPR=eU(r.pr);break;default:Xn.isPR=null}});Xn.isCI=!!(To.CI||To.CONTINUOUS_INTEGRATION||To.BUILD_NUMBER||To.RUN_ID||Xn.name);function eU(r){return typeof r=="string"?!!To[r]:Object.keys(r).every(function(e){return To[e]===r[e]})}});var cg={};ft(cg,{KeyRelationship:()=>Bc,applyCascade:()=>fp,base64RegExp:()=>sU,colorStringAlphaRegExp:()=>nU,colorStringRegExp:()=>iU,computeKey:()=>zA,getPrintable:()=>ti,hasExactLength:()=>cU,hasForbiddenKeys:()=>mde,hasKeyRelationship:()=>eS,hasMaxLength:()=>tde,hasMinLength:()=>ede,hasMutuallyExclusiveKeys:()=>Ede,hasRequiredKeys:()=>Cde,hasUniqueItems:()=>rde,isArray:()=>Jpe,isAtLeast:()=>sde,isAtMost:()=>ode,isBase64:()=>pde,isBoolean:()=>Gpe,isDate:()=>qpe,isDict:()=>zpe,isEnum:()=>nn,isHexColor:()=>hde,isISO8601:()=>fde,isInExclusiveRange:()=>Ade,isInInclusiveRange:()=>ade,isInstanceOf:()=>Vpe,isInteger:()=>lde,isJSON:()=>dde,isLiteral:()=>Hpe,isLowerCase:()=>cde,isNegative:()=>ide,isNullable:()=>$pe,isNumber:()=>Ype,isObject:()=>_pe,isOneOf:()=>Xpe,isOptional:()=>Zpe,isPositive:()=>nde,isString:()=>gp,isTuple:()=>Wpe,isUUID4:()=>gde,isUnknown:()=>lU,isUpperCase:()=>ude,iso8601RegExp:()=>$Q,makeCoercionFn:()=>wc,makeSetter:()=>AU,makeTrait:()=>aU,makeValidator:()=>vt,matchesRegExp:()=>hp,plural:()=>hI,pushError:()=>mt,simpleKeyRegExp:()=>rU,uuid4RegExp:()=>oU});function vt({test:r}){return aU(r)()}function ti(r){return r===null?"null":r===void 0?"undefined":r===""?"an empty string":JSON.stringify(r)}function zA(r,e){var t,i,n;return typeof e=="number"?`${(t=r==null?void 0:r.p)!==null&&t!==void 0?t:"."}[${e}]`:rU.test(e)?`${(i=r==null?void 0:r.p)!==null&&i!==void 0?i:""}.${e}`:`${(n=r==null?void 0:r.p)!==null&&n!==void 0?n:"."}[${JSON.stringify(e)}]`}function wc(r,e){return t=>{let i=r[e];return r[e]=t,wc(r,e).bind(null,i)}}function AU(r,e){return t=>{r[e]=t}}function hI(r,e,t){return r===1?e:t}function mt({errors:r,p:e}={},t){return r==null||r.push(`${e!=null?e:"."}: ${t}`),!1}function Hpe(r){return vt({test:(e,t)=>e!==r?mt(t,`Expected a literal (got ${ti(r)})`):!0})}function nn(r){let e=Array.isArray(r)?r:Object.values(r),t=new Set(e);return vt({test:(i,n)=>t.has(i)?!0:mt(n,`Expected a valid enumeration value (got ${ti(i)})`)})}var rU,iU,nU,sU,oU,$Q,aU,lU,gp,jpe,Gpe,Ype,qpe,Jpe,Wpe,zpe,_pe,Vpe,Xpe,fp,Zpe,$pe,ede,tde,cU,rde,ide,nde,sde,ode,ade,Ade,lde,hp,cde,ude,gde,fde,hde,pde,dde,Cde,mde,Ede,Bc,Ide,eS,ys=uge(()=>{rU=/^[a-zA-Z_][a-zA-Z0-9_]*$/,iU=/^#[0-9a-f]{6}$/i,nU=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,sU=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,oU=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,$Q=/^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/,aU=r=>()=>r;lU=()=>vt({test:(r,e)=>!0});gp=()=>vt({test:(r,e)=>typeof r!="string"?mt(e,`Expected a string (got ${ti(r)})`):!0});jpe=new Map([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]),Gpe=()=>vt({test:(r,e)=>{var t;if(typeof r!="boolean"){if(typeof(e==null?void 0:e.coercions)!="undefined"){if(typeof(e==null?void 0:e.coercion)=="undefined")return mt(e,"Unbound coercion result");let i=jpe.get(r);if(typeof i!="undefined")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return mt(e,`Expected a boolean (got ${ti(r)})`)}return!0}}),Ype=()=>vt({test:(r,e)=>{var t;if(typeof r!="number"){if(typeof(e==null?void 0:e.coercions)!="undefined"){if(typeof(e==null?void 0:e.coercion)=="undefined")return mt(e,"Unbound coercion result");let i;if(typeof r=="string"){let n;try{n=JSON.parse(r)}catch(s){}if(typeof n=="number")if(JSON.stringify(n)===r)i=n;else return mt(e,`Received a number that can't be safely represented by the runtime (${r})`)}if(typeof i!="undefined")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return mt(e,`Expected a number (got ${ti(r)})`)}return!0}}),qpe=()=>vt({test:(r,e)=>{var t;if(!(r instanceof Date)){if(typeof(e==null?void 0:e.coercions)!="undefined"){if(typeof(e==null?void 0:e.coercion)=="undefined")return mt(e,"Unbound coercion result");let i;if(typeof r=="string"&&$Q.test(r))i=new Date(r);else{let n;if(typeof r=="string"){let s;try{s=JSON.parse(r)}catch(o){}typeof s=="number"&&(n=s)}else typeof r=="number"&&(n=r);if(typeof n!="undefined")if(Number.isSafeInteger(n)||!Number.isSafeInteger(n*1e3))i=new Date(n*1e3);else return mt(e,`Received a timestamp that can't be safely represented by the runtime (${r})`)}if(typeof i!="undefined")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return mt(e,`Expected a date (got ${ti(r)})`)}return!0}}),Jpe=(r,{delimiter:e}={})=>vt({test:(t,i)=>{var n;if(typeof t=="string"&&typeof e!="undefined"&&typeof(i==null?void 0:i.coercions)!="undefined"){if(typeof(i==null?void 0:i.coercion)=="undefined")return mt(i,"Unbound coercion result");t=t.split(e),i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,t)])}if(!Array.isArray(t))return mt(i,`Expected an array (got ${ti(t)})`);let s=!0;for(let o=0,a=t.length;o{let t=cU(r.length);return vt({test:(i,n)=>{var s;if(typeof i=="string"&&typeof e!="undefined"&&typeof(n==null?void 0:n.coercions)!="undefined"){if(typeof(n==null?void 0:n.coercion)=="undefined")return mt(n,"Unbound coercion result");i=i.split(e),n.coercions.push([(s=n.p)!==null&&s!==void 0?s:".",n.coercion.bind(null,i)])}if(!Array.isArray(i))return mt(n,`Expected a tuple (got ${ti(i)})`);let o=t(i,Object.assign({},n));for(let a=0,l=i.length;avt({test:(t,i)=>{if(typeof t!="object"||t===null)return mt(i,`Expected an object (got ${ti(t)})`);let n=Object.keys(t),s=!0;for(let o=0,a=n.length;o{let t=Object.keys(r);return vt({test:(i,n)=>{if(typeof i!="object"||i===null)return mt(n,`Expected an object (got ${ti(i)})`);let s=new Set([...t,...Object.keys(i)]),o={},a=!0;for(let l of s){if(l==="constructor"||l==="__proto__")a=mt(Object.assign(Object.assign({},n),{p:zA(n,l)}),"Unsafe property name");else{let c=Object.prototype.hasOwnProperty.call(r,l)?r[l]:void 0,u=Object.prototype.hasOwnProperty.call(i,l)?i[l]:void 0;typeof c!="undefined"?a=c(u,Object.assign(Object.assign({},n),{p:zA(n,l),coercion:wc(i,l)}))&&a:e===null?a=mt(Object.assign(Object.assign({},n),{p:zA(n,l)}),`Extraneous property (got ${ti(u)})`):Object.defineProperty(o,l,{enumerable:!0,get:()=>u,set:AU(i,l)})}if(!a&&(n==null?void 0:n.errors)==null)break}return e!==null&&(a||(n==null?void 0:n.errors)!=null)&&(a=e(o,n)&&a),a}})},Vpe=r=>vt({test:(e,t)=>e instanceof r?!0:mt(t,`Expected an instance of ${r.name} (got ${ti(e)})`)}),Xpe=(r,{exclusive:e=!1}={})=>vt({test:(t,i)=>{var n,s,o;let a=[],l=typeof(i==null?void 0:i.errors)!="undefined"?[]:void 0;for(let c=0,u=r.length;c1?mt(i,`Expected to match exactly a single predicate (matched ${a.join(", ")})`):(o=i==null?void 0:i.errors)===null||o===void 0||o.push(...l),!1}}),fp=(r,e)=>vt({test:(t,i)=>{var n,s;let o={value:t},a=typeof(i==null?void 0:i.coercions)!="undefined"?wc(o,"value"):void 0,l=typeof(i==null?void 0:i.coercions)!="undefined"?[]:void 0;if(!r(t,Object.assign(Object.assign({},i),{coercion:a,coercions:l})))return!1;let c=[];if(typeof l!="undefined")for(let[,u]of l)c.push(u());try{if(typeof(i==null?void 0:i.coercions)!="undefined"){if(o.value!==t){if(typeof(i==null?void 0:i.coercion)=="undefined")return mt(i,"Unbound coercion result");i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,o.value)])}(s=i==null?void 0:i.coercions)===null||s===void 0||s.push(...l)}return e.every(u=>u(o.value,i))}finally{for(let u of c)u()}}}),Zpe=r=>vt({test:(e,t)=>typeof e=="undefined"?!0:r(e,t)}),$pe=r=>vt({test:(e,t)=>e===null?!0:r(e,t)}),ede=r=>vt({test:(e,t)=>e.length>=r?!0:mt(t,`Expected to have a length of at least ${r} elements (got ${e.length})`)}),tde=r=>vt({test:(e,t)=>e.length<=r?!0:mt(t,`Expected to have a length of at most ${r} elements (got ${e.length})`)}),cU=r=>vt({test:(e,t)=>e.length!==r?mt(t,`Expected to have a length of exactly ${r} elements (got ${e.length})`):!0}),rde=({map:r}={})=>vt({test:(e,t)=>{let i=new Set,n=new Set;for(let s=0,o=e.length;svt({test:(r,e)=>r<=0?!0:mt(e,`Expected to be negative (got ${r})`)}),nde=()=>vt({test:(r,e)=>r>=0?!0:mt(e,`Expected to be positive (got ${r})`)}),sde=r=>vt({test:(e,t)=>e>=r?!0:mt(t,`Expected to be at least ${r} (got ${e})`)}),ode=r=>vt({test:(e,t)=>e<=r?!0:mt(t,`Expected to be at most ${r} (got ${e})`)}),ade=(r,e)=>vt({test:(t,i)=>t>=r&&t<=e?!0:mt(i,`Expected to be in the [${r}; ${e}] range (got ${t})`)}),Ade=(r,e)=>vt({test:(t,i)=>t>=r&&tvt({test:(e,t)=>e!==Math.round(e)?mt(t,`Expected to be an integer (got ${e})`):Number.isSafeInteger(e)?!0:mt(t,`Expected to be a safe integer (got ${e})`)}),hp=r=>vt({test:(e,t)=>r.test(e)?!0:mt(t,`Expected to match the pattern ${r.toString()} (got ${ti(e)})`)}),cde=()=>vt({test:(r,e)=>r!==r.toLowerCase()?mt(e,`Expected to be all-lowercase (got ${r})`):!0}),ude=()=>vt({test:(r,e)=>r!==r.toUpperCase()?mt(e,`Expected to be all-uppercase (got ${r})`):!0}),gde=()=>vt({test:(r,e)=>oU.test(r)?!0:mt(e,`Expected to be a valid UUID v4 (got ${ti(r)})`)}),fde=()=>vt({test:(r,e)=>$Q.test(r)?!1:mt(e,`Expected to be a valid ISO 8601 date string (got ${ti(r)})`)}),hde=({alpha:r=!1})=>vt({test:(e,t)=>(r?iU.test(e):nU.test(e))?!0:mt(t,`Expected to be a valid hexadecimal color string (got ${ti(e)})`)}),pde=()=>vt({test:(r,e)=>sU.test(r)?!0:mt(e,`Expected to be a valid base 64 string (got ${ti(r)})`)}),dde=(r=lU())=>vt({test:(e,t)=>{let i;try{i=JSON.parse(e)}catch(n){return mt(t,`Expected to be a valid JSON string (got ${ti(e)})`)}return r(i,t)}}),Cde=r=>{let e=new Set(r);return vt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)||s.push(o);return s.length>0?mt(i,`Missing required ${hI(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},mde=r=>{let e=new Set(r);return vt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>0?mt(i,`Forbidden ${hI(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},Ede=r=>{let e=new Set(r);return vt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>1?mt(i,`Mutually exclusive properties ${s.map(o=>`"${o}"`).join(", ")}`):!0}})};(function(r){r.Forbids="Forbids",r.Requires="Requires"})(Bc||(Bc={}));Ide={[Bc.Forbids]:{expect:!1,message:"forbids using"},[Bc.Requires]:{expect:!0,message:"requires using"}},eS=(r,e,t,{ignore:i=[]}={})=>{let n=new Set(i),s=new Set(t),o=Ide[e];return vt({test:(a,l)=>{let c=new Set(Object.keys(a));if(!c.has(r)||n.has(a[r]))return!0;let u=[];for(let g of s)(c.has(g)&&!n.has(a[g]))!==o.expect&&u.push(g);return u.length>=1?mt(l,`Property "${r}" ${o.message} ${hI(u.length,"property","properties")} ${u.map(g=>`"${g}"`).join(", ")}`):!0}})}});var kU=w((dZe,xU)=>{"use strict";xU.exports=(r,...e)=>new Promise(t=>{t(r(...e))})});var gg=w((CZe,aS)=>{"use strict";var Ode=kU(),PU=r=>{if(r<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],t=0,i=()=>{t--,e.length>0&&e.shift()()},n=(a,l,...c)=>{t++;let u=Ode(a,...c);l(u),u.then(i,i)},s=(a,l,...c)=>{tnew Promise(c=>s(a,c,...l));return Object.defineProperties(o,{activeCount:{get:()=>t},pendingCount:{get:()=>e.length}}),o};aS.exports=PU;aS.exports.default=PU});var mp=w((EZe,DU)=>{var Mde="2.0.0",Kde=256,Ude=Number.MAX_SAFE_INTEGER||9007199254740991,Hde=16;DU.exports={SEMVER_SPEC_VERSION:Mde,MAX_LENGTH:Kde,MAX_SAFE_INTEGER:Ude,MAX_SAFE_COMPONENT_LENGTH:Hde}});var Ep=w((IZe,RU)=>{var jde=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};RU.exports=jde});var bc=w((VA,FU)=>{var{MAX_SAFE_COMPONENT_LENGTH:AS}=mp(),Gde=Ep();VA=FU.exports={};var Yde=VA.re=[],rt=VA.src=[],it=VA.t={},qde=0,xt=(r,e,t)=>{let i=qde++;Gde(i,e),it[r]=i,rt[i]=e,Yde[i]=new RegExp(e,t?"g":void 0)};xt("NUMERICIDENTIFIER","0|[1-9]\\d*");xt("NUMERICIDENTIFIERLOOSE","[0-9]+");xt("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");xt("MAINVERSION",`(${rt[it.NUMERICIDENTIFIER]})\\.(${rt[it.NUMERICIDENTIFIER]})\\.(${rt[it.NUMERICIDENTIFIER]})`);xt("MAINVERSIONLOOSE",`(${rt[it.NUMERICIDENTIFIERLOOSE]})\\.(${rt[it.NUMERICIDENTIFIERLOOSE]})\\.(${rt[it.NUMERICIDENTIFIERLOOSE]})`);xt("PRERELEASEIDENTIFIER",`(?:${rt[it.NUMERICIDENTIFIER]}|${rt[it.NONNUMERICIDENTIFIER]})`);xt("PRERELEASEIDENTIFIERLOOSE",`(?:${rt[it.NUMERICIDENTIFIERLOOSE]}|${rt[it.NONNUMERICIDENTIFIER]})`);xt("PRERELEASE",`(?:-(${rt[it.PRERELEASEIDENTIFIER]}(?:\\.${rt[it.PRERELEASEIDENTIFIER]})*))`);xt("PRERELEASELOOSE",`(?:-?(${rt[it.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${rt[it.PRERELEASEIDENTIFIERLOOSE]})*))`);xt("BUILDIDENTIFIER","[0-9A-Za-z-]+");xt("BUILD",`(?:\\+(${rt[it.BUILDIDENTIFIER]}(?:\\.${rt[it.BUILDIDENTIFIER]})*))`);xt("FULLPLAIN",`v?${rt[it.MAINVERSION]}${rt[it.PRERELEASE]}?${rt[it.BUILD]}?`);xt("FULL",`^${rt[it.FULLPLAIN]}$`);xt("LOOSEPLAIN",`[v=\\s]*${rt[it.MAINVERSIONLOOSE]}${rt[it.PRERELEASELOOSE]}?${rt[it.BUILD]}?`);xt("LOOSE",`^${rt[it.LOOSEPLAIN]}$`);xt("GTLT","((?:<|>)?=?)");xt("XRANGEIDENTIFIERLOOSE",`${rt[it.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);xt("XRANGEIDENTIFIER",`${rt[it.NUMERICIDENTIFIER]}|x|X|\\*`);xt("XRANGEPLAIN",`[v=\\s]*(${rt[it.XRANGEIDENTIFIER]})(?:\\.(${rt[it.XRANGEIDENTIFIER]})(?:\\.(${rt[it.XRANGEIDENTIFIER]})(?:${rt[it.PRERELEASE]})?${rt[it.BUILD]}?)?)?`);xt("XRANGEPLAINLOOSE",`[v=\\s]*(${rt[it.XRANGEIDENTIFIERLOOSE]})(?:\\.(${rt[it.XRANGEIDENTIFIERLOOSE]})(?:\\.(${rt[it.XRANGEIDENTIFIERLOOSE]})(?:${rt[it.PRERELEASELOOSE]})?${rt[it.BUILD]}?)?)?`);xt("XRANGE",`^${rt[it.GTLT]}\\s*${rt[it.XRANGEPLAIN]}$`);xt("XRANGELOOSE",`^${rt[it.GTLT]}\\s*${rt[it.XRANGEPLAINLOOSE]}$`);xt("COERCE",`(^|[^\\d])(\\d{1,${AS}})(?:\\.(\\d{1,${AS}}))?(?:\\.(\\d{1,${AS}}))?(?:$|[^\\d])`);xt("COERCERTL",rt[it.COERCE],!0);xt("LONETILDE","(?:~>?)");xt("TILDETRIM",`(\\s*)${rt[it.LONETILDE]}\\s+`,!0);VA.tildeTrimReplace="$1~";xt("TILDE",`^${rt[it.LONETILDE]}${rt[it.XRANGEPLAIN]}$`);xt("TILDELOOSE",`^${rt[it.LONETILDE]}${rt[it.XRANGEPLAINLOOSE]}$`);xt("LONECARET","(?:\\^)");xt("CARETTRIM",`(\\s*)${rt[it.LONECARET]}\\s+`,!0);VA.caretTrimReplace="$1^";xt("CARET",`^${rt[it.LONECARET]}${rt[it.XRANGEPLAIN]}$`);xt("CARETLOOSE",`^${rt[it.LONECARET]}${rt[it.XRANGEPLAINLOOSE]}$`);xt("COMPARATORLOOSE",`^${rt[it.GTLT]}\\s*(${rt[it.LOOSEPLAIN]})$|^$`);xt("COMPARATOR",`^${rt[it.GTLT]}\\s*(${rt[it.FULLPLAIN]})$|^$`);xt("COMPARATORTRIM",`(\\s*)${rt[it.GTLT]}\\s*(${rt[it.LOOSEPLAIN]}|${rt[it.XRANGEPLAIN]})`,!0);VA.comparatorTrimReplace="$1$2$3";xt("HYPHENRANGE",`^\\s*(${rt[it.XRANGEPLAIN]})\\s+-\\s+(${rt[it.XRANGEPLAIN]})\\s*$`);xt("HYPHENRANGELOOSE",`^\\s*(${rt[it.XRANGEPLAINLOOSE]})\\s+-\\s+(${rt[it.XRANGEPLAINLOOSE]})\\s*$`);xt("STAR","(<|>)?=?\\s*\\*");xt("GTE0","^\\s*>=\\s*0.0.0\\s*$");xt("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")});var Ip=w((yZe,NU)=>{var Jde=["includePrerelease","loose","rtl"],Wde=r=>r?typeof r!="object"?{loose:!0}:Jde.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};NU.exports=Wde});var yI=w((wZe,LU)=>{var TU=/^[0-9]+$/,OU=(r,e)=>{let t=TU.test(r),i=TU.test(e);return t&&i&&(r=+r,e=+e),r===e?0:t&&!i?-1:i&&!t?1:rOU(e,r);LU.exports={compareIdentifiers:OU,rcompareIdentifiers:zde}});var Hi=w((BZe,MU)=>{var wI=Ep(),{MAX_LENGTH:KU,MAX_SAFE_INTEGER:BI}=mp(),{re:UU,t:HU}=bc(),_de=Ip(),{compareIdentifiers:yp}=yI(),Bs=class{constructor(e,t){if(t=_de(t),e instanceof Bs){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>KU)throw new TypeError(`version is longer than ${KU} characters`);wI("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?UU[HU.LOOSE]:UU[HU.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>BI||this.major<0)throw new TypeError("Invalid major version");if(this.minor>BI||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>BI||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let s=+n;if(s>=0&&s=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);i===-1&&this.prerelease.push(0)}t&&(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}};MU.exports=Bs});var Qc=w((bZe,jU)=>{var{MAX_LENGTH:Vde}=mp(),{re:GU,t:YU}=bc(),qU=Hi(),Xde=Ip(),Zde=(r,e)=>{if(e=Xde(e),r instanceof qU)return r;if(typeof r!="string"||r.length>Vde||!(e.loose?GU[YU.LOOSE]:GU[YU.FULL]).test(r))return null;try{return new qU(r,e)}catch(i){return null}};jU.exports=Zde});var WU=w((QZe,JU)=>{var $de=Qc(),eCe=(r,e)=>{let t=$de(r,e);return t?t.version:null};JU.exports=eCe});var _U=w((SZe,zU)=>{var tCe=Qc(),rCe=(r,e)=>{let t=tCe(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};zU.exports=rCe});var XU=w((vZe,VU)=>{var iCe=Hi(),nCe=(r,e,t,i)=>{typeof t=="string"&&(i=t,t=void 0);try{return new iCe(r,t).inc(e,i).version}catch(n){return null}};VU.exports=nCe});var bs=w((xZe,ZU)=>{var $U=Hi(),sCe=(r,e,t)=>new $U(r,t).compare(new $U(e,t));ZU.exports=sCe});var bI=w((kZe,e2)=>{var oCe=bs(),aCe=(r,e,t)=>oCe(r,e,t)===0;e2.exports=aCe});var i2=w((PZe,t2)=>{var r2=Qc(),ACe=bI(),lCe=(r,e)=>{if(ACe(r,e))return null;{let t=r2(r),i=r2(e),n=t.prerelease.length||i.prerelease.length,s=n?"pre":"",o=n?"prerelease":"";for(let a in t)if((a==="major"||a==="minor"||a==="patch")&&t[a]!==i[a])return s+a;return o}};t2.exports=lCe});var s2=w((DZe,n2)=>{var cCe=Hi(),uCe=(r,e)=>new cCe(r,e).major;n2.exports=uCe});var a2=w((RZe,o2)=>{var gCe=Hi(),fCe=(r,e)=>new gCe(r,e).minor;o2.exports=fCe});var l2=w((FZe,A2)=>{var hCe=Hi(),pCe=(r,e)=>new hCe(r,e).patch;A2.exports=pCe});var u2=w((NZe,c2)=>{var dCe=Qc(),CCe=(r,e)=>{let t=dCe(r,e);return t&&t.prerelease.length?t.prerelease:null};c2.exports=CCe});var f2=w((LZe,g2)=>{var mCe=bs(),ECe=(r,e,t)=>mCe(e,r,t);g2.exports=ECe});var p2=w((TZe,h2)=>{var ICe=bs(),yCe=(r,e)=>ICe(r,e,!0);h2.exports=yCe});var QI=w((OZe,d2)=>{var C2=Hi(),wCe=(r,e,t)=>{let i=new C2(r,t),n=new C2(e,t);return i.compare(n)||i.compareBuild(n)};d2.exports=wCe});var E2=w((MZe,m2)=>{var BCe=QI(),bCe=(r,e)=>r.sort((t,i)=>BCe(t,i,e));m2.exports=bCe});var y2=w((KZe,I2)=>{var QCe=QI(),SCe=(r,e)=>r.sort((t,i)=>QCe(i,t,e));I2.exports=SCe});var wp=w((UZe,w2)=>{var vCe=bs(),xCe=(r,e,t)=>vCe(r,e,t)>0;w2.exports=xCe});var SI=w((HZe,B2)=>{var kCe=bs(),PCe=(r,e,t)=>kCe(r,e,t)<0;B2.exports=PCe});var lS=w((jZe,b2)=>{var DCe=bs(),RCe=(r,e,t)=>DCe(r,e,t)!==0;b2.exports=RCe});var vI=w((GZe,Q2)=>{var FCe=bs(),NCe=(r,e,t)=>FCe(r,e,t)>=0;Q2.exports=NCe});var xI=w((YZe,S2)=>{var LCe=bs(),TCe=(r,e,t)=>LCe(r,e,t)<=0;S2.exports=TCe});var cS=w((qZe,v2)=>{var OCe=bI(),MCe=lS(),KCe=wp(),UCe=vI(),HCe=SI(),jCe=xI(),GCe=(r,e,t,i)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return OCe(r,t,i);case"!=":return MCe(r,t,i);case">":return KCe(r,t,i);case">=":return UCe(r,t,i);case"<":return HCe(r,t,i);case"<=":return jCe(r,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};v2.exports=GCe});var k2=w((JZe,x2)=>{var YCe=Hi(),qCe=Qc(),{re:kI,t:PI}=bc(),JCe=(r,e)=>{if(r instanceof YCe)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(kI[PI.COERCE]);else{let i;for(;(i=kI[PI.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||i.index+i[0].length!==t.index+t[0].length)&&(t=i),kI[PI.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;kI[PI.COERCERTL].lastIndex=-1}return t===null?null:qCe(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};x2.exports=JCe});var D2=w((WZe,P2)=>{"use strict";P2.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Bp=w((zZe,R2)=>{"use strict";R2.exports=Gt;Gt.Node=Sc;Gt.create=Gt;function Gt(r){var e=this;if(e instanceof Gt||(e=new Gt),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(n){e.push(n)});else if(arguments.length>0)for(var t=0,i=arguments.length;t1)t=e;else if(this.head)i=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;i!==null;n++)t=r(t,i.value,n),i=i.next;return t};Gt.prototype.reduceReverse=function(r,e){var t,i=this.tail;if(arguments.length>1)t=e;else if(this.tail)i=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=this.length-1;i!==null;n--)t=r(t,i.value,n),i=i.prev;return t};Gt.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};Gt.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};Gt.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new Gt;if(ethis.length&&(e=this.length);for(var i=0,n=this.head;n!==null&&ithis.length&&(e=this.length);for(var i=this.length,n=this.tail;n!==null&&i>e;i--)n=n.prev;for(;n!==null&&i>r;i--,n=n.prev)t.push(n.value);return t};Gt.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var i=0,n=this.head;n!==null&&i{"use strict";var VCe=Bp(),vc=Symbol("max"),Ua=Symbol("length"),fg=Symbol("lengthCalculator"),bp=Symbol("allowStale"),xc=Symbol("maxAge"),Ha=Symbol("dispose"),N2=Symbol("noDisposeOnSet"),yi=Symbol("lruList"),oo=Symbol("cache"),L2=Symbol("updateAgeOnGet"),uS=()=>1,T2=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[vc]=e.max||Infinity,i=e.length||uS;if(this[fg]=typeof i!="function"?uS:i,this[bp]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[xc]=e.maxAge||0,this[Ha]=e.dispose,this[N2]=e.noDisposeOnSet||!1,this[L2]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[vc]=e||Infinity,Qp(this)}get max(){return this[vc]}set allowStale(e){this[bp]=!!e}get allowStale(){return this[bp]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[xc]=e,Qp(this)}get maxAge(){return this[xc]}set lengthCalculator(e){typeof e!="function"&&(e=uS),e!==this[fg]&&(this[fg]=e,this[Ua]=0,this[yi].forEach(t=>{t.length=this[fg](t.value,t.key),this[Ua]+=t.length})),Qp(this)}get lengthCalculator(){return this[fg]}get length(){return this[Ua]}get itemCount(){return this[yi].length}rforEach(e,t){t=t||this;for(let i=this[yi].tail;i!==null;){let n=i.prev;M2(this,e,i,t),i=n}}forEach(e,t){t=t||this;for(let i=this[yi].head;i!==null;){let n=i.next;M2(this,e,i,t),i=n}}keys(){return this[yi].toArray().map(e=>e.key)}values(){return this[yi].toArray().map(e=>e.value)}reset(){this[Ha]&&this[yi]&&this[yi].length&&this[yi].forEach(e=>this[Ha](e.key,e.value)),this[oo]=new Map,this[yi]=new VCe,this[Ua]=0}dump(){return this[yi].map(e=>DI(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[yi]}set(e,t,i){if(i=i||this[xc],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let n=i?Date.now():0,s=this[fg](t,e);if(this[oo].has(e)){if(s>this[vc])return hg(this,this[oo].get(e)),!1;let l=this[oo].get(e).value;return this[Ha]&&(this[N2]||this[Ha](e,l.value)),l.now=n,l.maxAge=i,l.value=t,this[Ua]+=s-l.length,l.length=s,this.get(e),Qp(this),!0}let o=new O2(e,t,s,n,i);return o.length>this[vc]?(this[Ha]&&this[Ha](e,t),!1):(this[Ua]+=o.length,this[yi].unshift(o),this[oo].set(e,this[yi].head),Qp(this),!0)}has(e){if(!this[oo].has(e))return!1;let t=this[oo].get(e).value;return!DI(this,t)}get(e){return gS(this,e,!0)}peek(e){return gS(this,e,!1)}pop(){let e=this[yi].tail;return e?(hg(this,e),e.value):null}del(e){hg(this,this[oo].get(e))}load(e){this.reset();let t=Date.now();for(let i=e.length-1;i>=0;i--){let n=e[i],s=n.e||0;if(s===0)this.set(n.k,n.v);else{let o=s-t;o>0&&this.set(n.k,n.v,o)}}}prune(){this[oo].forEach((e,t)=>gS(this,t,!1))}},gS=(r,e,t)=>{let i=r[oo].get(e);if(i){let n=i.value;if(DI(r,n)){if(hg(r,i),!r[bp])return}else t&&(r[L2]&&(i.value.now=Date.now()),r[yi].unshiftNode(i));return n.value}},DI=(r,e)=>{if(!e||!e.maxAge&&!r[xc])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[xc]&&t>r[xc]},Qp=r=>{if(r[Ua]>r[vc])for(let e=r[yi].tail;r[Ua]>r[vc]&&e!==null;){let t=e.prev;hg(r,e),e=t}},hg=(r,e)=>{if(e){let t=e.value;r[Ha]&&r[Ha](t.key,t.value),r[Ua]-=t.length,r[oo].delete(t.key),r[yi].removeNode(e)}},O2=class{constructor(e,t,i,n,s){this.key=e,this.value=t,this.length=i,this.now=n,this.maxAge=s||0}},M2=(r,e,t,i)=>{let n=t.value;DI(r,n)&&(hg(r,t),r[bp]||(n=void 0)),n&&e.call(i,n.value,n.key,r)};F2.exports=T2});var Qs=w((VZe,U2)=>{var pg=class{constructor(e,t){if(t=XCe(t),e instanceof pg)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new pg(e.raw,t);if(e instanceof fS)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(n=>!j2(n[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&rme(n[0])){this.set=[n];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();let i=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=H2.get(i);if(n)return n;let s=this.options.loose,o=s?ji[ki.HYPHENRANGELOOSE]:ji[ki.HYPHENRANGE];e=e.replace(o,sme(this.options.includePrerelease)),zr("hyphen replace",e),e=e.replace(ji[ki.COMPARATORTRIM],$Ce),zr("comparator trim",e,ji[ki.COMPARATORTRIM]),e=e.replace(ji[ki.TILDETRIM],eme),e=e.replace(ji[ki.CARETTRIM],tme),e=e.split(/\s+/).join(" ");let a=s?ji[ki.COMPARATORLOOSE]:ji[ki.COMPARATOR],l=e.split(" ").map(f=>ime(f,this.options)).join(" ").split(/\s+/).map(f=>nme(f,this.options)).filter(this.options.loose?f=>!!f.match(a):()=>!0).map(f=>new fS(f,this.options)),c=l.length,u=new Map;for(let f of l){if(j2(f))return[f];u.set(f.value,f)}u.size>1&&u.has("")&&u.delete("");let g=[...u.values()];return H2.set(i,g),g}intersects(e,t){if(!(e instanceof pg))throw new TypeError("a Range is required");return this.set.some(i=>G2(i,t)&&e.set.some(n=>G2(n,t)&&i.every(s=>n.every(o=>s.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new ZCe(e,this.options)}catch(t){return!1}for(let t=0;tr.value==="<0.0.0-0",rme=r=>r.value==="",G2=(r,e)=>{let t=!0,i=r.slice(),n=i.pop();for(;t&&i.length;)t=i.every(s=>n.intersects(s,e)),n=i.pop();return t},ime=(r,e)=>(zr("comp",r,e),r=lme(r,e),zr("caret",r),r=Ame(r,e),zr("tildes",r),r=cme(r,e),zr("xrange",r),r=ume(r,e),zr("stars",r),r),on=r=>!r||r.toLowerCase()==="x"||r==="*",Ame=(r,e)=>r.trim().split(/\s+/).map(t=>gme(t,e)).join(" "),gme=(r,e)=>{let t=e.loose?ji[ki.TILDELOOSE]:ji[ki.TILDE];return r.replace(t,(i,n,s,o,a)=>{zr("tilde",r,i,n,s,o,a);let l;return on(n)?l="":on(s)?l=`>=${n}.0.0 <${+n+1}.0.0-0`:on(o)?l=`>=${n}.${s}.0 <${n}.${+s+1}.0-0`:a?(zr("replaceTilde pr",a),l=`>=${n}.${s}.${o}-${a} <${n}.${+s+1}.0-0`):l=`>=${n}.${s}.${o} <${n}.${+s+1}.0-0`,zr("tilde return",l),l})},lme=(r,e)=>r.trim().split(/\s+/).map(t=>fme(t,e)).join(" "),fme=(r,e)=>{zr("caret",r,e);let t=e.loose?ji[ki.CARETLOOSE]:ji[ki.CARET],i=e.includePrerelease?"-0":"";return r.replace(t,(n,s,o,a,l)=>{zr("caret",r,n,s,o,a,l);let c;return on(s)?c="":on(o)?c=`>=${s}.0.0${i} <${+s+1}.0.0-0`:on(a)?s==="0"?c=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.0${i} <${+s+1}.0.0-0`:l?(zr("replaceCaret pr",l),s==="0"?o==="0"?c=`>=${s}.${o}.${a}-${l} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}-${l} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a}-${l} <${+s+1}.0.0-0`):(zr("no pr"),s==="0"?o==="0"?c=`>=${s}.${o}.${a}${i} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),zr("caret return",c),c})},cme=(r,e)=>(zr("replaceXRanges",r,e),r.split(/\s+/).map(t=>hme(t,e)).join(" ")),hme=(r,e)=>{r=r.trim();let t=e.loose?ji[ki.XRANGELOOSE]:ji[ki.XRANGE];return r.replace(t,(i,n,s,o,a,l)=>{zr("xRange",r,i,n,s,o,a,l);let c=on(s),u=c||on(o),g=u||on(a),f=g;return n==="="&&f&&(n=""),l=e.includePrerelease?"-0":"",c?n===">"||n==="<"?i="<0.0.0-0":i="*":n&&f?(u&&(o=0),a=0,n===">"?(n=">=",u?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):n==="<="&&(n="<",u?s=+s+1:o=+o+1),n==="<"&&(l="-0"),i=`${n+s}.${o}.${a}${l}`):u?i=`>=${s}.0.0${l} <${+s+1}.0.0-0`:g&&(i=`>=${s}.${o}.0${l} <${s}.${+o+1}.0-0`),zr("xRange return",i),i})},ume=(r,e)=>(zr("replaceStars",r,e),r.trim().replace(ji[ki.STAR],"")),nme=(r,e)=>(zr("replaceGTE0",r,e),r.trim().replace(ji[e.includePrerelease?ki.GTE0PRE:ki.GTE0],"")),sme=r=>(e,t,i,n,s,o,a,l,c,u,g,f,h)=>(on(i)?t="":on(n)?t=`>=${i}.0.0${r?"-0":""}`:on(s)?t=`>=${i}.${n}.0${r?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,on(c)?l="":on(u)?l=`<${+c+1}.0.0-0`:on(g)?l=`<${c}.${+u+1}.0-0`:f?l=`<=${c}.${u}.${g}-${f}`:r?l=`<${c}.${u}.${+g+1}-0`:l=`<=${l}`,`${t} ${l}`.trim()),ome=(r,e,t)=>{for(let i=0;i0){let n=r[i].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var Sp=w((XZe,Y2)=>{var vp=Symbol("SemVer ANY"),xp=class{static get ANY(){return vp}constructor(e,t){if(t=pme(t),e instanceof xp){if(e.loose===!!t.loose)return e;e=e.value}pS("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===vp?this.value="":this.value=this.operator+this.semver.version,pS("comp",this)}parse(e){let t=this.options.loose?q2[J2.COMPARATORLOOSE]:q2[J2.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new W2(i[2],this.options.loose):this.semver=vp}toString(){return this.value}test(e){if(pS("Comparator.test",e,this.options.loose),this.semver===vp||e===vp)return!0;if(typeof e=="string")try{e=new W2(e,this.options)}catch(t){return!1}return hS(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof xp))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new z2(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new z2(this.value,t).test(e.semver);let i=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),n=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),s=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),a=hS(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),l=hS(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return i||n||s&&o||a||l}};Y2.exports=xp;var pme=Ip(),{re:q2,t:J2}=bc(),hS=cS(),pS=Ep(),W2=Hi(),z2=Qs()});var kp=w((ZZe,_2)=>{var dme=Qs(),Cme=(r,e,t)=>{try{e=new dme(e,t)}catch(i){return!1}return e.test(r)};_2.exports=Cme});var X2=w(($Ze,V2)=>{var mme=Qs(),Eme=(r,e)=>new mme(r,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));V2.exports=Eme});var $2=w((e$e,Z2)=>{var Ime=Hi(),yme=Qs(),wme=(r,e,t)=>{let i=null,n=null,s=null;try{s=new yme(e,t)}catch(o){return null}return r.forEach(o=>{s.test(o)&&(!i||n.compare(o)===-1)&&(i=o,n=new Ime(i,t))}),i};Z2.exports=wme});var tH=w((t$e,eH)=>{var Bme=Hi(),bme=Qs(),Qme=(r,e,t)=>{let i=null,n=null,s=null;try{s=new bme(e,t)}catch(o){return null}return r.forEach(o=>{s.test(o)&&(!i||n.compare(o)===1)&&(i=o,n=new Bme(i,t))}),i};eH.exports=Qme});var nH=w((r$e,rH)=>{var dS=Hi(),Sme=Qs(),iH=wp(),vme=(r,e)=>{r=new Sme(r,e);let t=new dS("0.0.0");if(r.test(t)||(t=new dS("0.0.0-0"),r.test(t)))return t;t=null;for(let i=0;i{let a=new dS(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||iH(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!t||iH(t,s))&&(t=s)}return t&&r.test(t)?t:null};rH.exports=vme});var oH=w((i$e,sH)=>{var xme=Qs(),kme=(r,e)=>{try{return new xme(r,e).range||"*"}catch(t){return null}};sH.exports=kme});var RI=w((n$e,aH)=>{var Pme=Hi(),AH=Sp(),{ANY:Dme}=AH,Rme=Qs(),Fme=kp(),lH=wp(),cH=SI(),Nme=xI(),Lme=vI(),Tme=(r,e,t,i)=>{r=new Pme(r,i),e=new Rme(e,i);let n,s,o,a,l;switch(t){case">":n=lH,s=Nme,o=cH,a=">",l=">=";break;case"<":n=cH,s=Lme,o=lH,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Fme(r,e,i))return!1;for(let c=0;c{h.semver===Dme&&(h=new AH(">=0.0.0")),g=g||h,f=f||h,n(h.semver,g.semver,i)?g=h:o(h.semver,f.semver,i)&&(f=h)}),g.operator===a||g.operator===l||(!f.operator||f.operator===a)&&s(r,f.semver))return!1;if(f.operator===l&&o(r,f.semver))return!1}return!0};aH.exports=Tme});var gH=w((s$e,uH)=>{var Ome=RI(),Mme=(r,e,t)=>Ome(r,e,">",t);uH.exports=Mme});var hH=w((o$e,fH)=>{var Kme=RI(),Ume=(r,e,t)=>Kme(r,e,"<",t);fH.exports=Ume});var CH=w((a$e,pH)=>{var dH=Qs(),Hme=(r,e,t)=>(r=new dH(r,t),e=new dH(e,t),r.intersects(e));pH.exports=Hme});var EH=w((A$e,mH)=>{var jme=kp(),Gme=bs();mH.exports=(r,e,t)=>{let i=[],n=null,s=null,o=r.sort((u,g)=>Gme(u,g,t));for(let u of o)jme(u,e,t)?(s=u,n||(n=u)):(s&&i.push([n,s]),s=null,n=null);n&&i.push([n,null]);let a=[];for(let[u,g]of i)u===g?a.push(u):!g&&u===o[0]?a.push("*"):g?u===o[0]?a.push(`<=${g}`):a.push(`${u} - ${g}`):a.push(`>=${u}`);let l=a.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return l.length{var yH=Qs(),FI=Sp(),{ANY:CS}=FI,Pp=kp(),mS=bs(),qme=(r,e,t={})=>{if(r===e)return!0;r=new yH(r,t),e=new yH(e,t);let i=!1;e:for(let n of r.set){for(let s of e.set){let o=Yme(n,s,t);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},Yme=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===CS){if(e.length===1&&e[0].semver===CS)return!0;t.includePrerelease?r=[new FI(">=0.0.0-0")]:r=[new FI(">=0.0.0")]}if(e.length===1&&e[0].semver===CS){if(t.includePrerelease)return!0;e=[new FI(">=0.0.0")]}let i=new Set,n,s;for(let h of r)h.operator===">"||h.operator===">="?n=wH(n,h,t):h.operator==="<"||h.operator==="<="?s=BH(s,h,t):i.add(h.semver);if(i.size>1)return null;let o;if(n&&s){if(o=mS(n.semver,s.semver,t),o>0)return null;if(o===0&&(n.operator!==">="||s.operator!=="<="))return null}for(let h of i){if(n&&!Pp(h,String(n),t)||s&&!Pp(h,String(s),t))return null;for(let p of e)if(!Pp(h,String(p),t))return!1;return!0}let a,l,c,u,g=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,f=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1;g&&g.prerelease.length===1&&s.operator==="<"&&g.prerelease[0]===0&&(g=!1);for(let h of e){if(u=u||h.operator===">"||h.operator===">=",c=c||h.operator==="<"||h.operator==="<=",n){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator===">"||h.operator===">="){if(a=wH(n,h,t),a===h&&a!==n)return!1}else if(n.operator===">="&&!Pp(n.semver,String(h),t))return!1}if(s){if(g&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===g.major&&h.semver.minor===g.minor&&h.semver.patch===g.patch&&(g=!1),h.operator==="<"||h.operator==="<="){if(l=BH(s,h,t),l===h&&l!==s)return!1}else if(s.operator==="<="&&!Pp(s.semver,String(h),t))return!1}if(!h.operator&&(s||n)&&o!==0)return!1}return!(n&&c&&!s&&o!==0||s&&u&&!n&&o!==0||f||g)},wH=(r,e,t)=>{if(!r)return e;let i=mS(r.semver,e.semver,t);return i>0?r:i<0||e.operator===">"&&r.operator===">="?e:r},BH=(r,e,t)=>{if(!r)return e;let i=mS(r.semver,e.semver,t);return i<0?r:i>0||e.operator==="<"&&r.operator==="<="?e:r};IH.exports=qme});var ri=w((c$e,QH)=>{var ES=bc();QH.exports={re:ES.re,src:ES.src,tokens:ES.t,SEMVER_SPEC_VERSION:mp().SEMVER_SPEC_VERSION,SemVer:Hi(),compareIdentifiers:yI().compareIdentifiers,rcompareIdentifiers:yI().rcompareIdentifiers,parse:Qc(),valid:WU(),clean:_U(),inc:XU(),diff:i2(),major:s2(),minor:a2(),patch:l2(),prerelease:u2(),compare:bs(),rcompare:f2(),compareLoose:p2(),compareBuild:QI(),sort:E2(),rsort:y2(),gt:wp(),lt:SI(),eq:bI(),neq:lS(),gte:vI(),lte:xI(),cmp:cS(),coerce:k2(),Comparator:Sp(),Range:Qs(),satisfies:kp(),toComparators:X2(),maxSatisfying:$2(),minSatisfying:tH(),minVersion:nH(),validRange:oH(),outside:RI(),gtr:gH(),ltr:hH(),intersects:CH(),simplifyRange:EH(),subset:bH()}});var IS=w(NI=>{"use strict";Object.defineProperty(NI,"__esModule",{value:!0});NI.VERSION=void 0;NI.VERSION="9.1.0"});var Yt=w((exports,module)=>{"use strict";var __spreadArray=exports&&exports.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var i=0,n=e.length,s;i{(function(r,e){typeof define=="function"&&define.amd?define([],e):typeof LI=="object"&&LI.exports?LI.exports=e():r.regexpToAst=e()})(typeof self!="undefined"?self:SH,function(){function r(){}r.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},r.prototype.restoreState=function(p){this.idx=p.idx,this.input=p.input,this.groupIdx=p.groupIdx},r.prototype.pattern=function(p){this.idx=0,this.input=p,this.groupIdx=0,this.consumeChar("/");var m=this.disjunction();this.consumeChar("/");for(var y={type:"Flags",loc:{begin:this.idx,end:p.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":o(y,"global");break;case"i":o(y,"ignoreCase");break;case"m":o(y,"multiLine");break;case"u":o(y,"unicode");break;case"y":o(y,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:y,value:m,loc:this.loc(0)}},r.prototype.disjunction=function(){var p=[],m=this.idx;for(p.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),p.push(this.alternative());return{type:"Disjunction",value:p,loc:this.loc(m)}},r.prototype.alternative=function(){for(var p=[],m=this.idx;this.isTerm();)p.push(this.term());return{type:"Alternative",value:p,loc:this.loc(m)}},r.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},r.prototype.assertion=function(){var p=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(p)};case"$":return{type:"EndAnchor",loc:this.loc(p)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(p)};case"B":return{type:"NonWordBoundary",loc:this.loc(p)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");var m;switch(this.popChar()){case"=":m="Lookahead";break;case"!":m="NegativeLookahead";break}a(m);var y=this.disjunction();return this.consumeChar(")"),{type:m,value:y,loc:this.loc(p)}}l()},r.prototype.quantifier=function(p){var m,y=this.idx;switch(this.popChar()){case"*":m={atLeast:0,atMost:Infinity};break;case"+":m={atLeast:1,atMost:Infinity};break;case"?":m={atLeast:0,atMost:1};break;case"{":var b=this.integerIncludingZero();switch(this.popChar()){case"}":m={atLeast:b,atMost:b};break;case",":var v;this.isDigit()?(v=this.integerIncludingZero(),m={atLeast:b,atMost:v}):m={atLeast:b,atMost:Infinity},this.consumeChar("}");break}if(p===!0&&m===void 0)return;a(m);break}if(!(p===!0&&m===void 0))return a(m),this.peekChar(0)==="?"?(this.consumeChar("?"),m.greedy=!1):m.greedy=!0,m.type="Quantifier",m.loc=this.loc(y),m},r.prototype.atom=function(){var p,m=this.idx;switch(this.peekChar()){case".":p=this.dotAll();break;case"\\":p=this.atomEscape();break;case"[":p=this.characterClass();break;case"(":p=this.group();break}return p===void 0&&this.isPatternCharacter()&&(p=this.patternCharacter()),a(p),p.loc=this.loc(m),this.isQuantifier()&&(p.quantifier=this.quantifier()),p},r.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[n(` +`),n("\r"),n("\u2028"),n("\u2029")]}},r.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},r.prototype.decimalEscapeAtom=function(){var p=this.positiveInteger();return{type:"GroupBackReference",value:p}},r.prototype.characterClassEscape=function(){var p,m=!1;switch(this.popChar()){case"d":p=u;break;case"D":p=u,m=!0;break;case"s":p=f;break;case"S":p=f,m=!0;break;case"w":p=g;break;case"W":p=g,m=!0;break}return a(p),{type:"Set",value:p,complement:m}},r.prototype.controlEscapeAtom=function(){var p;switch(this.popChar()){case"f":p=n("\f");break;case"n":p=n(` +`);break;case"r":p=n("\r");break;case"t":p=n(" ");break;case"v":p=n("\v");break}return a(p),{type:"Character",value:p}},r.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var p=this.popChar();if(/[a-zA-Z]/.test(p)===!1)throw Error("Invalid ");var m=p.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:m}},r.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:n("\0")}},r.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},r.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},r.prototype.identityEscapeAtom=function(){var p=this.popChar();return{type:"Character",value:n(p)}},r.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:var p=this.popChar();return{type:"Character",value:n(p)}}},r.prototype.characterClass=function(){var p=[],m=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),m=!0);this.isClassAtom();){var y=this.classAtom(),b=y.type==="Character";if(b&&this.isRangeDash()){this.consumeChar("-");var v=this.classAtom(),x=v.type==="Character";if(x){if(v.value=this.input.length)throw Error("Unexpected end of input");this.idx++},r.prototype.loc=function(p){return{begin:p,end:this.idx}};var e=/[0-9a-fA-F]/,t=/[0-9]/,i=/[1-9]/;function n(p){return p.charCodeAt(0)}function s(p,m){p.length!==void 0?p.forEach(function(y){m.push(y)}):m.push(p)}function o(p,m){if(p[m]===!0)throw"duplicate flag "+m;p[m]=!0}function a(p){if(p===void 0)throw Error("Internal Error - Should never get here!")}function l(){throw Error("Internal Error - Should never get here!")}var c,u=[];for(c=n("0");c<=n("9");c++)u.push(c);var g=[n("_")].concat(u);for(c=n("a");c<=n("z");c++)g.push(c);for(c=n("A");c<=n("Z");c++)g.push(c);var f=[n(" "),n("\f"),n(` +`),n("\r"),n(" "),n("\v"),n(" "),n("\xA0"),n("\u1680"),n("\u2000"),n("\u2001"),n("\u2002"),n("\u2003"),n("\u2004"),n("\u2005"),n("\u2006"),n("\u2007"),n("\u2008"),n("\u2009"),n("\u200A"),n("\u2028"),n("\u2029"),n("\u202F"),n("\u205F"),n("\u3000"),n("\uFEFF")];function h(){}return h.prototype.visitChildren=function(p){for(var m in p){var y=p[m];p.hasOwnProperty(m)&&(y.type!==void 0?this.visit(y):Array.isArray(y)&&y.forEach(function(b){this.visit(b)},this))}},h.prototype.visit=function(p){switch(p.type){case"Pattern":this.visitPattern(p);break;case"Flags":this.visitFlags(p);break;case"Disjunction":this.visitDisjunction(p);break;case"Alternative":this.visitAlternative(p);break;case"StartAnchor":this.visitStartAnchor(p);break;case"EndAnchor":this.visitEndAnchor(p);break;case"WordBoundary":this.visitWordBoundary(p);break;case"NonWordBoundary":this.visitNonWordBoundary(p);break;case"Lookahead":this.visitLookahead(p);break;case"NegativeLookahead":this.visitNegativeLookahead(p);break;case"Character":this.visitCharacter(p);break;case"Set":this.visitSet(p);break;case"Group":this.visitGroup(p);break;case"GroupBackReference":this.visitGroupBackReference(p);break;case"Quantifier":this.visitQuantifier(p);break}this.visitChildren(p)},h.prototype.visitPattern=function(p){},h.prototype.visitFlags=function(p){},h.prototype.visitDisjunction=function(p){},h.prototype.visitAlternative=function(p){},h.prototype.visitStartAnchor=function(p){},h.prototype.visitEndAnchor=function(p){},h.prototype.visitWordBoundary=function(p){},h.prototype.visitNonWordBoundary=function(p){},h.prototype.visitLookahead=function(p){},h.prototype.visitNegativeLookahead=function(p){},h.prototype.visitCharacter=function(p){},h.prototype.visitSet=function(p){},h.prototype.visitGroup=function(p){},h.prototype.visitGroupBackReference=function(p){},h.prototype.visitQuantifier=function(p){},{RegExpParser:r,BaseRegExpVisitor:h,VERSION:"0.5.0"}})});var MI=w(dg=>{"use strict";Object.defineProperty(dg,"__esModule",{value:!0});dg.clearRegExpParserCache=dg.getRegExpAst=void 0;var Jme=TI(),OI={},Wme=new Jme.RegExpParser;function zme(r){var e=r.toString();if(OI.hasOwnProperty(e))return OI[e];var t=Wme.pattern(e);return OI[e]=t,t}dg.getRegExpAst=zme;function _me(){OI={}}dg.clearRegExpParserCache=_me});var DH=w(Bn=>{"use strict";var Vme=Bn&&Bn.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Bn,"__esModule",{value:!0});Bn.canMatchCharCode=Bn.firstCharOptimizedIndices=Bn.getOptimizedStartCodesIndices=Bn.failedOptimizationPrefixMsg=void 0;var vH=TI(),Ss=Yt(),xH=MI(),ja=yS(),kH="Complement Sets are not supported for first char optimization";Bn.failedOptimizationPrefixMsg=`Unable to use "first char" lexer optimizations: +`;function Xme(r,e){e===void 0&&(e=!1);try{var t=(0,xH.getRegExpAst)(r),i=KI(t.value,{},t.flags.ignoreCase);return i}catch(s){if(s.message===kH)e&&(0,Ss.PRINT_WARNING)(""+Bn.failedOptimizationPrefixMsg+(" Unable to optimize: < "+r.toString()+` > +`)+` Complement Sets cannot be automatically optimized. + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{var n="";e&&(n=` + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),(0,Ss.PRINT_ERROR)(Bn.failedOptimizationPrefixMsg+` +`+(" Failed parsing: < "+r.toString()+` > +`)+(" Using the regexp-to-ast library version: "+vH.VERSION+` +`)+" Please open an issue at: https://github.com/bd82/regexp-to-ast/issues"+n)}}return[]}Bn.getOptimizedStartCodesIndices=Xme;function KI(r,e,t){switch(r.type){case"Disjunction":for(var i=0;i=ja.minOptimizationVal)for(var f=u.from>=ja.minOptimizationVal?u.from:ja.minOptimizationVal,h=u.to,p=(0,ja.charCodeToOptimizedIndex)(f),m=(0,ja.charCodeToOptimizedIndex)(h),y=p;y<=m;y++)e[y]=y}}});break;case"Group":KI(o.value,e,t);break;default:throw Error("Non Exhaustive Match")}var a=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&wS(o)===!1||o.type!=="Group"&&a===!1)break}break;default:throw Error("non exhaustive match!")}return(0,Ss.values)(e)}Bn.firstCharOptimizedIndices=KI;function UI(r,e,t){var i=(0,ja.charCodeToOptimizedIndex)(r);e[i]=i,t===!0&&Zme(r,e)}function Zme(r,e){var t=String.fromCharCode(r),i=t.toUpperCase();if(i!==t){var n=(0,ja.charCodeToOptimizedIndex)(i.charCodeAt(0));e[n]=n}else{var s=t.toLowerCase();if(s!==t){var n=(0,ja.charCodeToOptimizedIndex)(s.charCodeAt(0));e[n]=n}}}function PH(r,e){return(0,Ss.find)(r.value,function(t){if(typeof t=="number")return(0,Ss.contains)(e,t);var i=t;return(0,Ss.find)(e,function(n){return i.from<=n&&n<=i.to})!==void 0})}function wS(r){return r.quantifier&&r.quantifier.atLeast===0?!0:r.value?(0,Ss.isArray)(r.value)?(0,Ss.every)(r.value,wS):wS(r.value):!1}var $me=function(r){Vme(e,r);function e(t){var i=r.call(this)||this;return i.targetCharCodes=t,i.found=!1,i}return e.prototype.visitChildren=function(t){if(this.found!==!0){switch(t.type){case"Lookahead":this.visitLookahead(t);return;case"NegativeLookahead":this.visitNegativeLookahead(t);return}r.prototype.visitChildren.call(this,t)}},e.prototype.visitCharacter=function(t){(0,Ss.contains)(this.targetCharCodes,t.value)&&(this.found=!0)},e.prototype.visitSet=function(t){t.complement?PH(t,this.targetCharCodes)===void 0&&(this.found=!0):PH(t,this.targetCharCodes)!==void 0&&(this.found=!0)},e}(vH.BaseRegExpVisitor);function eEe(r,e){if(e instanceof RegExp){var t=(0,xH.getRegExpAst)(e),i=new $me(r);return i.visit(t),i.found}else return(0,Ss.find)(e,function(n){return(0,Ss.contains)(r,n.charCodeAt(0))})!==void 0}Bn.canMatchCharCode=eEe});var yS=w(Ze=>{"use strict";var RH=Ze&&Ze.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Ze,"__esModule",{value:!0});Ze.charCodeToOptimizedIndex=Ze.minOptimizationVal=Ze.buildLineBreakIssueMessage=Ze.LineTerminatorOptimizedTester=Ze.isShortPattern=Ze.isCustomPattern=Ze.cloneEmptyGroups=Ze.performWarningRuntimeChecks=Ze.performRuntimeChecks=Ze.addStickyFlag=Ze.addStartOfInput=Ze.findUnreachablePatterns=Ze.findModesThatDoNotExist=Ze.findInvalidGroupType=Ze.findDuplicatePatterns=Ze.findUnsupportedFlags=Ze.findStartOfInputAnchor=Ze.findEmptyMatchRegExps=Ze.findEndOfInputAnchor=Ze.findInvalidPatterns=Ze.findMissingPatterns=Ze.validatePatterns=Ze.analyzeTokenTypes=Ze.enableSticky=Ze.disableSticky=Ze.SUPPORT_STICKY=Ze.MODES=Ze.DEFAULT_MODE=void 0;var FH=TI(),Ar=Dp(),Ne=Yt(),Cg=DH(),NH=MI(),Mo="PATTERN";Ze.DEFAULT_MODE="defaultMode";Ze.MODES="modes";Ze.SUPPORT_STICKY=typeof new RegExp("(?:)").sticky=="boolean";function tEe(){Ze.SUPPORT_STICKY=!1}Ze.disableSticky=tEe;function rEe(){Ze.SUPPORT_STICKY=!0}Ze.enableSticky=rEe;function nEe(r,e){e=(0,Ne.defaults)(e,{useSticky:Ze.SUPPORT_STICKY,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:function(v,x){return x()}});var t=e.tracer;t("initCharCodeToOptimizedIndexMap",function(){iEe()});var i;t("Reject Lexer.NA",function(){i=(0,Ne.reject)(r,function(v){return v[Mo]===Ar.Lexer.NA})});var n=!1,s;t("Transform Patterns",function(){n=!1,s=(0,Ne.map)(i,function(v){var x=v[Mo];if((0,Ne.isRegExp)(x)){var T=x.source;return T.length===1&&T!=="^"&&T!=="$"&&T!=="."&&!x.ignoreCase?T:T.length===2&&T[0]==="\\"&&!(0,Ne.contains)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],T[1])?T[1]:e.useSticky?bS(x):BS(x)}else{if((0,Ne.isFunction)(x))return n=!0,{exec:x};if((0,Ne.has)(x,"exec"))return n=!0,x;if(typeof x=="string"){if(x.length===1)return x;var q=x.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),Y=new RegExp(q);return e.useSticky?bS(Y):BS(Y)}else throw Error("non exhaustive match")}})});var o,a,l,c,u;t("misc mapping",function(){o=(0,Ne.map)(i,function(v){return v.tokenTypeIdx}),a=(0,Ne.map)(i,function(v){var x=v.GROUP;if(x!==Ar.Lexer.SKIPPED){if((0,Ne.isString)(x))return x;if((0,Ne.isUndefined)(x))return!1;throw Error("non exhaustive match")}}),l=(0,Ne.map)(i,function(v){var x=v.LONGER_ALT;if(x){var T=(0,Ne.isArray)(x)?(0,Ne.map)(x,function(q){return(0,Ne.indexOf)(i,q)}):[(0,Ne.indexOf)(i,x)];return T}}),c=(0,Ne.map)(i,function(v){return v.PUSH_MODE}),u=(0,Ne.map)(i,function(v){return(0,Ne.has)(v,"POP_MODE")})});var g;t("Line Terminator Handling",function(){var v=OH(e.lineTerminatorCharacters);g=(0,Ne.map)(i,function(x){return!1}),e.positionTracking!=="onlyOffset"&&(g=(0,Ne.map)(i,function(x){if((0,Ne.has)(x,"LINE_BREAKS"))return x.LINE_BREAKS;if(TH(x,v)===!1)return(0,Cg.canMatchCharCode)(v,x.PATTERN)}))});var f,h,p,m;t("Misc Mapping #2",function(){f=(0,Ne.map)(i,QS),h=(0,Ne.map)(s,LH),p=(0,Ne.reduce)(i,function(v,x){var T=x.GROUP;return(0,Ne.isString)(T)&&T!==Ar.Lexer.SKIPPED&&(v[T]=[]),v},{}),m=(0,Ne.map)(s,function(v,x){return{pattern:s[x],longerAlt:l[x],canLineTerminator:g[x],isCustom:f[x],short:h[x],group:a[x],push:c[x],pop:u[x],tokenTypeIdx:o[x],tokenType:i[x]}})});var y=!0,b=[];return e.safeMode||t("First Char Optimization",function(){b=(0,Ne.reduce)(i,function(v,x,T){if(typeof x.PATTERN=="string"){var q=x.PATTERN.charCodeAt(0),Y=vS(q);SS(v,Y,m[T])}else if((0,Ne.isArray)(x.START_CHARS_HINT)){var $;(0,Ne.forEach)(x.START_CHARS_HINT,function(ne){var ee=typeof ne=="string"?ne.charCodeAt(0):ne,A=vS(ee);$!==A&&($=A,SS(v,A,m[T]))})}else if((0,Ne.isRegExp)(x.PATTERN))if(x.PATTERN.unicode)y=!1,e.ensureOptimizations&&(0,Ne.PRINT_ERROR)(""+Cg.failedOptimizationPrefixMsg+(" Unable to analyze < "+x.PATTERN.toString()+` > pattern. +`)+` The regexp unicode flag is not currently supported by the regexp-to-ast library. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{var _=(0,Cg.getOptimizedStartCodesIndices)(x.PATTERN,e.ensureOptimizations);(0,Ne.isEmpty)(_)&&(y=!1),(0,Ne.forEach)(_,function(ne){SS(v,ne,m[T])})}else e.ensureOptimizations&&(0,Ne.PRINT_ERROR)(""+Cg.failedOptimizationPrefixMsg+(" TokenType: <"+x.name+`> is using a custom token pattern without providing parameter. +`)+` This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),y=!1;return v},[])}),t("ArrayPacking",function(){b=(0,Ne.packArray)(b)}),{emptyGroups:p,patternIdxToConfig:m,charCodeToPatternIdxToConfig:b,hasCustom:n,canBeOptimized:y}}Ze.analyzeTokenTypes=nEe;function oEe(r,e){var t=[],i=MH(r);t=t.concat(i.errors);var n=KH(i.valid),s=n.valid;return t=t.concat(n.errors),t=t.concat(sEe(s)),t=t.concat(UH(s)),t=t.concat(HH(s,e)),t=t.concat(jH(s)),t}Ze.validatePatterns=oEe;function sEe(r){var e=[],t=(0,Ne.filter)(r,function(i){return(0,Ne.isRegExp)(i[Mo])});return e=e.concat(GH(t)),e=e.concat(qH(t)),e=e.concat(JH(t)),e=e.concat(WH(t)),e=e.concat(YH(t)),e}function MH(r){var e=(0,Ne.filter)(r,function(n){return!(0,Ne.has)(n,Mo)}),t=(0,Ne.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- missing static 'PATTERN' property",type:Ar.LexerDefinitionErrorType.MISSING_PATTERN,tokenTypes:[n]}}),i=(0,Ne.difference)(r,e);return{errors:t,valid:i}}Ze.findMissingPatterns=MH;function KH(r){var e=(0,Ne.filter)(r,function(n){var s=n[Mo];return!(0,Ne.isRegExp)(s)&&!(0,Ne.isFunction)(s)&&!(0,Ne.has)(s,"exec")&&!(0,Ne.isString)(s)}),t=(0,Ne.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Ar.LexerDefinitionErrorType.INVALID_PATTERN,tokenTypes:[n]}}),i=(0,Ne.difference)(r,e);return{errors:t,valid:i}}Ze.findInvalidPatterns=KH;var aEe=/[^\\][\$]/;function GH(r){var e=function(n){RH(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitEndAnchor=function(o){this.found=!0},s}(FH.BaseRegExpVisitor),t=(0,Ne.filter)(r,function(n){var s=n[Mo];try{var o=(0,NH.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch(l){return aEe.test(s.source)}}),i=(0,Ne.map)(t,function(n){return{message:`Unexpected RegExp Anchor Error: + Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Ar.LexerDefinitionErrorType.EOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}Ze.findEndOfInputAnchor=GH;function YH(r){var e=(0,Ne.filter)(r,function(i){var n=i[Mo];return n.test("")}),t=(0,Ne.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' must not match an empty string",type:Ar.LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,tokenTypes:[i]}});return t}Ze.findEmptyMatchRegExps=YH;var AEe=/[^\\[][\^]|^\^/;function qH(r){var e=function(n){RH(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitStartAnchor=function(o){this.found=!0},s}(FH.BaseRegExpVisitor),t=(0,Ne.filter)(r,function(n){var s=n[Mo];try{var o=(0,NH.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch(l){return AEe.test(s.source)}}),i=(0,Ne.map)(t,function(n){return{message:`Unexpected RegExp Anchor Error: + Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Ar.LexerDefinitionErrorType.SOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}Ze.findStartOfInputAnchor=qH;function JH(r){var e=(0,Ne.filter)(r,function(i){var n=i[Mo];return n instanceof RegExp&&(n.multiline||n.global)}),t=(0,Ne.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Ar.LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[i]}});return t}Ze.findUnsupportedFlags=JH;function WH(r){var e=[],t=(0,Ne.map)(r,function(s){return(0,Ne.reduce)(r,function(o,a){return s.PATTERN.source===a.PATTERN.source&&!(0,Ne.contains)(e,a)&&a.PATTERN!==Ar.Lexer.NA&&(e.push(a),o.push(a)),o},[])});t=(0,Ne.compact)(t);var i=(0,Ne.filter)(t,function(s){return s.length>1}),n=(0,Ne.map)(i,function(s){var o=(0,Ne.map)(s,function(l){return l.name}),a=(0,Ne.first)(s).PATTERN;return{message:"The same RegExp pattern ->"+a+"<-"+("has been used in all of the following Token Types: "+o.join(", ")+" <-"),type:Ar.LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}});return n}Ze.findDuplicatePatterns=WH;function UH(r){var e=(0,Ne.filter)(r,function(i){if(!(0,Ne.has)(i,"GROUP"))return!1;var n=i.GROUP;return n!==Ar.Lexer.SKIPPED&&n!==Ar.Lexer.NA&&!(0,Ne.isString)(n)}),t=(0,Ne.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Ar.LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,tokenTypes:[i]}});return t}Ze.findInvalidGroupType=UH;function HH(r,e){var t=(0,Ne.filter)(r,function(n){return n.PUSH_MODE!==void 0&&!(0,Ne.contains)(e,n.PUSH_MODE)}),i=(0,Ne.map)(t,function(n){var s="Token Type: ->"+n.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+n.PUSH_MODE+"<-which does not exist";return{message:s,type:Ar.LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[n]}});return i}Ze.findModesThatDoNotExist=HH;function jH(r){var e=[],t=(0,Ne.reduce)(r,function(i,n,s){var o=n.PATTERN;return o===Ar.Lexer.NA||((0,Ne.isString)(o)?i.push({str:o,idx:s,tokenType:n}):(0,Ne.isRegExp)(o)&&cEe(o)&&i.push({str:o.source,idx:s,tokenType:n})),i},[]);return(0,Ne.forEach)(r,function(i,n){(0,Ne.forEach)(t,function(s){var o=s.str,a=s.idx,l=s.tokenType;if(n"+i.name+"<-")+`in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:c,type:Ar.LexerDefinitionErrorType.UNREACHABLE_PATTERN,tokenTypes:[i,l]})}})}),e}Ze.findUnreachablePatterns=jH;function lEe(r,e){if((0,Ne.isRegExp)(e)){var t=e.exec(r);return t!==null&&t.index===0}else{if((0,Ne.isFunction)(e))return e(r,0,[],{});if((0,Ne.has)(e,"exec"))return e.exec(r,0,[],{});if(typeof e=="string")return e===r;throw Error("non exhaustive match")}}function cEe(r){var e=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return(0,Ne.find)(e,function(t){return r.source.indexOf(t)!==-1})===void 0}function BS(r){var e=r.ignoreCase?"i":"";return new RegExp("^(?:"+r.source+")",e)}Ze.addStartOfInput=BS;function bS(r){var e=r.ignoreCase?"iy":"y";return new RegExp(""+r.source,e)}Ze.addStickyFlag=bS;function uEe(r,e,t){var i=[];return(0,Ne.has)(r,Ze.DEFAULT_MODE)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Ze.DEFAULT_MODE+`> property in its definition +`,type:Ar.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,Ne.has)(r,Ze.MODES)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Ze.MODES+`> property in its definition +`,type:Ar.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,Ne.has)(r,Ze.MODES)&&(0,Ne.has)(r,Ze.DEFAULT_MODE)&&!(0,Ne.has)(r.modes,r.defaultMode)&&i.push({message:"A MultiMode Lexer cannot be initialized with a "+Ze.DEFAULT_MODE+": <"+r.defaultMode+`>which does not exist +`,type:Ar.LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,Ne.has)(r,Ze.MODES)&&(0,Ne.forEach)(r.modes,function(n,s){(0,Ne.forEach)(n,function(o,a){(0,Ne.isUndefined)(o)&&i.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:"+("<"+s+"> at index: <"+a+`> +`),type:Ar.LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})})}),i}Ze.performRuntimeChecks=uEe;function gEe(r,e,t){var i=[],n=!1,s=(0,Ne.compact)((0,Ne.flatten)((0,Ne.mapValues)(r.modes,function(l){return l}))),o=(0,Ne.reject)(s,function(l){return l[Mo]===Ar.Lexer.NA}),a=OH(t);return e&&(0,Ne.forEach)(o,function(l){var c=TH(l,a);if(c!==!1){var u=zH(l,c),g={message:u,type:c.issue,tokenType:l};i.push(g)}else(0,Ne.has)(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(n=!0):(0,Cg.canMatchCharCode)(a,l.PATTERN)&&(n=!0)}),e&&!n&&i.push({message:`Warning: No LINE_BREAKS Found. + This Lexer has been defined to track line and column information, + But none of the Token Types can be identified as matching a line terminator. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS + for details.`,type:Ar.LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS}),i}Ze.performWarningRuntimeChecks=gEe;function fEe(r){var e={},t=(0,Ne.keys)(r);return(0,Ne.forEach)(t,function(i){var n=r[i];if((0,Ne.isArray)(n))e[i]=[];else throw Error("non exhaustive match")}),e}Ze.cloneEmptyGroups=fEe;function QS(r){var e=r.PATTERN;if((0,Ne.isRegExp)(e))return!1;if((0,Ne.isFunction)(e))return!0;if((0,Ne.has)(e,"exec"))return!0;if((0,Ne.isString)(e))return!1;throw Error("non exhaustive match")}Ze.isCustomPattern=QS;function LH(r){return(0,Ne.isString)(r)&&r.length===1?r.charCodeAt(0):!1}Ze.isShortPattern=LH;Ze.LineTerminatorOptimizedTester={test:function(r){for(var e=r.length,t=this.lastIndex;t Token Type +`)+(" Root cause: "+e.errMsg+`. +`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(e.issue===Ar.LexerDefinitionErrorType.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. +`+(" The problem is in the <"+r.name+`> Token Type +`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}Ze.buildLineBreakIssueMessage=zH;function OH(r){var e=(0,Ne.map)(r,function(t){return(0,Ne.isString)(t)&&t.length>0?t.charCodeAt(0):t});return e}function SS(r,e,t){r[e]===void 0?r[e]=[t]:r[e].push(t)}Ze.minOptimizationVal=256;var HI=[];function vS(r){return r255?255+~~(r/255):r}}});var mg=w(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.isTokenType=Ft.hasExtendingTokensTypesMapProperty=Ft.hasExtendingTokensTypesProperty=Ft.hasCategoriesProperty=Ft.hasShortKeyProperty=Ft.singleAssignCategoriesToksMap=Ft.assignCategoriesMapProp=Ft.assignCategoriesTokensProp=Ft.assignTokenDefaultProps=Ft.expandCategories=Ft.augmentTokenTypes=Ft.tokenIdxToClass=Ft.tokenShortNameIdx=Ft.tokenStructuredMatcherNoCategories=Ft.tokenStructuredMatcher=void 0;var ii=Yt();function hEe(r,e){var t=r.tokenTypeIdx;return t===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[t]===!0}Ft.tokenStructuredMatcher=hEe;function pEe(r,e){return r.tokenTypeIdx===e.tokenTypeIdx}Ft.tokenStructuredMatcherNoCategories=pEe;Ft.tokenShortNameIdx=1;Ft.tokenIdxToClass={};function dEe(r){var e=_H(r);VH(e),ZH(e),XH(e),(0,ii.forEach)(e,function(t){t.isParent=t.categoryMatches.length>0})}Ft.augmentTokenTypes=dEe;function _H(r){for(var e=(0,ii.cloneArr)(r),t=r,i=!0;i;){t=(0,ii.compact)((0,ii.flatten)((0,ii.map)(t,function(s){return s.CATEGORIES})));var n=(0,ii.difference)(t,e);e=e.concat(n),(0,ii.isEmpty)(n)?i=!1:t=n}return e}Ft.expandCategories=_H;function VH(r){(0,ii.forEach)(r,function(e){$H(e)||(Ft.tokenIdxToClass[Ft.tokenShortNameIdx]=e,e.tokenTypeIdx=Ft.tokenShortNameIdx++),xS(e)&&!(0,ii.isArray)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),xS(e)||(e.CATEGORIES=[]),ej(e)||(e.categoryMatches=[]),tj(e)||(e.categoryMatchesMap={})})}Ft.assignTokenDefaultProps=VH;function XH(r){(0,ii.forEach)(r,function(e){e.categoryMatches=[],(0,ii.forEach)(e.categoryMatchesMap,function(t,i){e.categoryMatches.push(Ft.tokenIdxToClass[i].tokenTypeIdx)})})}Ft.assignCategoriesTokensProp=XH;function ZH(r){(0,ii.forEach)(r,function(e){kS([],e)})}Ft.assignCategoriesMapProp=ZH;function kS(r,e){(0,ii.forEach)(r,function(t){e.categoryMatchesMap[t.tokenTypeIdx]=!0}),(0,ii.forEach)(e.CATEGORIES,function(t){var i=r.concat(e);(0,ii.contains)(i,t)||kS(i,t)})}Ft.singleAssignCategoriesToksMap=kS;function $H(r){return(0,ii.has)(r,"tokenTypeIdx")}Ft.hasShortKeyProperty=$H;function xS(r){return(0,ii.has)(r,"CATEGORIES")}Ft.hasCategoriesProperty=xS;function ej(r){return(0,ii.has)(r,"categoryMatches")}Ft.hasExtendingTokensTypesProperty=ej;function tj(r){return(0,ii.has)(r,"categoryMatchesMap")}Ft.hasExtendingTokensTypesMapProperty=tj;function CEe(r){return(0,ii.has)(r,"tokenTypeIdx")}Ft.isTokenType=CEe});var PS=w(jI=>{"use strict";Object.defineProperty(jI,"__esModule",{value:!0});jI.defaultLexerErrorProvider=void 0;jI.defaultLexerErrorProvider={buildUnableToPopLexerModeMessage:function(r){return"Unable to pop Lexer Mode after encountering Token ->"+r.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(r,e,t,i,n){return"unexpected character: ->"+r.charAt(e)+"<- at offset: "+e+","+(" skipped "+t+" characters.")}}});var Dp=w(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});kc.Lexer=kc.LexerDefinitionErrorType=void 0;var ao=yS(),lr=Yt(),mEe=mg(),EEe=PS(),IEe=MI(),yEe;(function(r){r[r.MISSING_PATTERN=0]="MISSING_PATTERN",r[r.INVALID_PATTERN=1]="INVALID_PATTERN",r[r.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",r[r.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",r[r.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",r[r.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",r[r.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",r[r.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",r[r.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",r[r.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",r[r.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",r[r.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",r[r.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",r[r.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",r[r.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",r[r.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",r[r.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"})(yEe=kc.LexerDefinitionErrorType||(kc.LexerDefinitionErrorType={}));var Rp={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:EEe.defaultLexerErrorProvider,traceInitPerf:!1,skipValidations:!1};Object.freeze(Rp);var wEe=function(){function r(e,t){var i=this;if(t===void 0&&(t=Rp),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},typeof t=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=(0,lr.merge)(Rp,t);var n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=Infinity,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",function(){var s,o=!0;i.TRACE_INIT("Lexer Config handling",function(){if(i.config.lineTerminatorsPattern===Rp.lineTerminatorsPattern)i.config.lineTerminatorsPattern=ao.LineTerminatorOptimizedTester;else if(i.config.lineTerminatorCharacters===Rp.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');i.trackStartLines=/full|onlyStart/i.test(i.config.positionTracking),i.trackEndLines=/full/i.test(i.config.positionTracking),(0,lr.isArray)(e)?(s={modes:{}},s.modes[ao.DEFAULT_MODE]=(0,lr.cloneArr)(e),s[ao.DEFAULT_MODE]=ao.DEFAULT_MODE):(o=!1,s=(0,lr.cloneObj)(e))}),i.config.skipValidations===!1&&(i.TRACE_INIT("performRuntimeChecks",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,ao.performRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))}),i.TRACE_INIT("performWarningRuntimeChecks",function(){i.lexerDefinitionWarning=i.lexerDefinitionWarning.concat((0,ao.performWarningRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))})),s.modes=s.modes?s.modes:{},(0,lr.forEach)(s.modes,function(u,g){s.modes[g]=(0,lr.reject)(u,function(f){return(0,lr.isUndefined)(f)})});var a=(0,lr.keys)(s.modes);if((0,lr.forEach)(s.modes,function(u,g){i.TRACE_INIT("Mode: <"+g+"> processing",function(){if(i.modes.push(g),i.config.skipValidations===!1&&i.TRACE_INIT("validatePatterns",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,ao.validatePatterns)(u,a))}),(0,lr.isEmpty)(i.lexerDefinitionErrors)){(0,mEe.augmentTokenTypes)(u);var f;i.TRACE_INIT("analyzeTokenTypes",function(){f=(0,ao.analyzeTokenTypes)(u,{lineTerminatorCharacters:i.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:i.TRACE_INIT.bind(i)})}),i.patternIdxToConfig[g]=f.patternIdxToConfig,i.charCodeToPatternIdxToConfig[g]=f.charCodeToPatternIdxToConfig,i.emptyGroups=(0,lr.merge)(i.emptyGroups,f.emptyGroups),i.hasCustom=f.hasCustom||i.hasCustom,i.canModeBeOptimized[g]=f.canBeOptimized}})}),i.defaultMode=s.defaultMode,!(0,lr.isEmpty)(i.lexerDefinitionErrors)&&!i.config.deferDefinitionErrorsHandling){var l=(0,lr.map)(i.lexerDefinitionErrors,function(u){return u.message}),c=l.join(`----------------------- +`);throw new Error(`Errors detected in definition of Lexer: +`+c)}(0,lr.forEach)(i.lexerDefinitionWarning,function(u){(0,lr.PRINT_WARNING)(u.message)}),i.TRACE_INIT("Choosing sub-methods implementations",function(){if(ao.SUPPORT_STICKY?(i.chopInput=lr.IDENTITY,i.match=i.matchWithTest):(i.updateLastIndex=lr.NOOP,i.match=i.matchWithExec),o&&(i.handleModes=lr.NOOP),i.trackStartLines===!1&&(i.computeNewColumn=lr.IDENTITY),i.trackEndLines===!1&&(i.updateTokenEndLineColumnLocation=lr.NOOP),/full/i.test(i.config.positionTracking))i.createTokenInstance=i.createFullToken;else if(/onlyStart/i.test(i.config.positionTracking))i.createTokenInstance=i.createStartOnlyToken;else if(/onlyOffset/i.test(i.config.positionTracking))i.createTokenInstance=i.createOffsetOnlyToken;else throw Error('Invalid config option: "'+i.config.positionTracking+'"');i.hasCustom?(i.addToken=i.addTokenUsingPush,i.handlePayload=i.handlePayloadWithCustom):(i.addToken=i.addTokenUsingMemberAccess,i.handlePayload=i.handlePayloadNoCustom)}),i.TRACE_INIT("Failed Optimization Warnings",function(){var u=(0,lr.reduce)(i.canModeBeOptimized,function(g,f,h){return f===!1&&g.push(h),g},[]);if(t.ensureOptimizations&&!(0,lr.isEmpty)(u))throw Error("Lexer Modes: < "+u.join(", ")+` > cannot be optimized. + Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. + Or inspect the console log for details on how to resolve these issues.`)}),i.TRACE_INIT("clearRegExpParserCache",function(){(0,IEe.clearRegExpParserCache)()}),i.TRACE_INIT("toFastProperties",function(){(0,lr.toFastProperties)(i)})})}return r.prototype.tokenize=function(e,t){if(t===void 0&&(t=this.defaultMode),!(0,lr.isEmpty)(this.lexerDefinitionErrors)){var i=(0,lr.map)(this.lexerDefinitionErrors,function(o){return o.message}),n=i.join(`----------------------- +`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+n)}var s=this.tokenizeInternal(e,t);return s},r.prototype.tokenizeInternal=function(e,t){var i=this,n,s,o,a,l,c,u,g,f,h,p,m,y,b,v,x,T=e,q=T.length,Y=0,$=0,_=this.hasCustom?0:Math.floor(e.length/10),ne=new Array(_),ee=[],A=this.trackStartLines?1:void 0,oe=this.trackStartLines?1:void 0,ce=(0,ao.cloneEmptyGroups)(this.emptyGroups),Z=this.trackStartLines,O=this.config.lineTerminatorsPattern,L=0,de=[],Be=[],je=[],re=[];Object.freeze(re);var se=void 0;function be(){return de}function he(Sr){var jn=(0,ao.charCodeToOptimizedIndex)(Sr),fs=Be[jn];return fs===void 0?re:fs}var Fe=function(Sr){if(je.length===1&&Sr.tokenType.PUSH_MODE===void 0){var jn=i.config.errorMessageProvider.buildUnableToPopLexerModeMessage(Sr);ee.push({offset:Sr.startOffset,line:Sr.startLine!==void 0?Sr.startLine:void 0,column:Sr.startColumn!==void 0?Sr.startColumn:void 0,length:Sr.image.length,message:jn})}else{je.pop();var fs=(0,lr.last)(je);de=i.patternIdxToConfig[fs],Be=i.charCodeToPatternIdxToConfig[fs],L=de.length;var ba=i.canModeBeOptimized[fs]&&i.config.safeMode===!1;Be&&ba?se=he:se=be}};function Ke(Sr){je.push(Sr),Be=this.charCodeToPatternIdxToConfig[Sr],de=this.patternIdxToConfig[Sr],L=de.length,L=de.length;var jn=this.canModeBeOptimized[Sr]&&this.config.safeMode===!1;Be&&jn?se=he:se=be}Ke.call(this,t);for(var ke;Yc.length){c=a,u=g,ke=gt;break}}}break}}if(c!==null){if(f=c.length,h=ke.group,h!==void 0&&(p=ke.tokenTypeIdx,m=this.createTokenInstance(c,Y,p,ke.tokenType,A,oe,f),this.handlePayload(m,u),h===!1?$=this.addToken(ne,$,m):ce[h].push(m)),e=this.chopInput(e,f),Y=Y+f,oe=this.computeNewColumn(oe,f),Z===!0&&ke.canLineTerminator===!0){var Mt=0,Ei=void 0,jt=void 0;O.lastIndex=0;do Ei=O.test(c),Ei===!0&&(jt=O.lastIndex-1,Mt++);while(Ei===!0);Mt!==0&&(A=A+Mt,oe=f-jt,this.updateTokenEndLineColumnLocation(m,h,jt,Mt,A,oe,f))}this.handleModes(ke,Fe,Ke,m)}else{for(var Qr=Y,Oi=A,Xs=oe,Un=!1;!Un&&Y <"+e+">");var n=(0,lr.timer)(t),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return t()},r.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",r.NA=/NOT_APPLICABLE/,r}();kc.Lexer=wEe});var XA=w(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.tokenMatcher=Pi.createTokenInstance=Pi.EOF=Pi.createToken=Pi.hasTokenLabel=Pi.tokenName=Pi.tokenLabel=void 0;var Ao=Yt(),BEe=Dp(),DS=mg();function bEe(r){return rj(r)?r.LABEL:r.name}Pi.tokenLabel=bEe;function QEe(r){return r.name}Pi.tokenName=QEe;function rj(r){return(0,Ao.isString)(r.LABEL)&&r.LABEL!==""}Pi.hasTokenLabel=rj;var SEe="parent",ij="categories",nj="label",sj="group",oj="push_mode",aj="pop_mode",Aj="longer_alt",lj="line_breaks",cj="start_chars_hint";function uj(r){return vEe(r)}Pi.createToken=uj;function vEe(r){var e=r.pattern,t={};if(t.name=r.name,(0,Ao.isUndefined)(e)||(t.PATTERN=e),(0,Ao.has)(r,SEe))throw`The parent property is no longer supported. +See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return(0,Ao.has)(r,ij)&&(t.CATEGORIES=r[ij]),(0,DS.augmentTokenTypes)([t]),(0,Ao.has)(r,nj)&&(t.LABEL=r[nj]),(0,Ao.has)(r,sj)&&(t.GROUP=r[sj]),(0,Ao.has)(r,aj)&&(t.POP_MODE=r[aj]),(0,Ao.has)(r,oj)&&(t.PUSH_MODE=r[oj]),(0,Ao.has)(r,Aj)&&(t.LONGER_ALT=r[Aj]),(0,Ao.has)(r,lj)&&(t.LINE_BREAKS=r[lj]),(0,Ao.has)(r,cj)&&(t.START_CHARS_HINT=r[cj]),t}Pi.EOF=uj({name:"EOF",pattern:BEe.Lexer.NA});(0,DS.augmentTokenTypes)([Pi.EOF]);function xEe(r,e,t,i,n,s,o,a){return{image:e,startOffset:t,endOffset:i,startLine:n,endLine:s,startColumn:o,endColumn:a,tokenTypeIdx:r.tokenTypeIdx,tokenType:r}}Pi.createTokenInstance=xEe;function kEe(r,e){return(0,DS.tokenStructuredMatcher)(r,e)}Pi.tokenMatcher=kEe});var bn=w(Vt=>{"use strict";var Ga=Vt&&Vt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Vt,"__esModule",{value:!0});Vt.serializeProduction=Vt.serializeGrammar=Vt.Terminal=Vt.Alternation=Vt.RepetitionWithSeparator=Vt.Repetition=Vt.RepetitionMandatoryWithSeparator=Vt.RepetitionMandatory=Vt.Option=Vt.Alternative=Vt.Rule=Vt.NonTerminal=Vt.AbstractProduction=void 0;var fr=Yt(),PEe=XA(),Ko=function(){function r(e){this._definition=e}return Object.defineProperty(r.prototype,"definition",{get:function(){return this._definition},set:function(e){this._definition=e},enumerable:!1,configurable:!0}),r.prototype.accept=function(e){e.visit(this),(0,fr.forEach)(this.definition,function(t){t.accept(e)})},r}();Vt.AbstractProduction=Ko;var gj=function(r){Ga(e,r);function e(t){var i=r.call(this,[])||this;return i.idx=1,(0,fr.assign)(i,(0,fr.pick)(t,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this.referencedRule!==void 0?this.referencedRule.definition:[]},set:function(t){},enumerable:!1,configurable:!0}),e.prototype.accept=function(t){t.visit(this)},e}(Ko);Vt.NonTerminal=gj;var fj=function(r){Ga(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.orgText="",(0,fr.assign)(i,(0,fr.pick)(t,function(n){return n!==void 0})),i}return e}(Ko);Vt.Rule=fj;var hj=function(r){Ga(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.ignoreAmbiguities=!1,(0,fr.assign)(i,(0,fr.pick)(t,function(n){return n!==void 0})),i}return e}(Ko);Vt.Alternative=hj;var pj=function(r){Ga(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,fr.assign)(i,(0,fr.pick)(t,function(n){return n!==void 0})),i}return e}(Ko);Vt.Option=pj;var dj=function(r){Ga(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,fr.assign)(i,(0,fr.pick)(t,function(n){return n!==void 0})),i}return e}(Ko);Vt.RepetitionMandatory=dj;var Cj=function(r){Ga(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,fr.assign)(i,(0,fr.pick)(t,function(n){return n!==void 0})),i}return e}(Ko);Vt.RepetitionMandatoryWithSeparator=Cj;var mj=function(r){Ga(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,fr.assign)(i,(0,fr.pick)(t,function(n){return n!==void 0})),i}return e}(Ko);Vt.Repetition=mj;var Ej=function(r){Ga(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,fr.assign)(i,(0,fr.pick)(t,function(n){return n!==void 0})),i}return e}(Ko);Vt.RepetitionWithSeparator=Ej;var Ij=function(r){Ga(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,i.ignoreAmbiguities=!1,i.hasPredicates=!1,(0,fr.assign)(i,(0,fr.pick)(t,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),e}(Ko);Vt.Alternation=Ij;var GI=function(){function r(e){this.idx=1,(0,fr.assign)(this,(0,fr.pick)(e,function(t){return t!==void 0}))}return r.prototype.accept=function(e){e.visit(this)},r}();Vt.Terminal=GI;function DEe(r){return(0,fr.map)(r,Fp)}Vt.serializeGrammar=DEe;function Fp(r){function e(s){return(0,fr.map)(s,Fp)}if(r instanceof gj){var t={type:"NonTerminal",name:r.nonTerminalName,idx:r.idx};return(0,fr.isString)(r.label)&&(t.label=r.label),t}else{if(r instanceof hj)return{type:"Alternative",definition:e(r.definition)};if(r instanceof pj)return{type:"Option",idx:r.idx,definition:e(r.definition)};if(r instanceof dj)return{type:"RepetitionMandatory",idx:r.idx,definition:e(r.definition)};if(r instanceof Cj)return{type:"RepetitionMandatoryWithSeparator",idx:r.idx,separator:Fp(new GI({terminalType:r.separator})),definition:e(r.definition)};if(r instanceof Ej)return{type:"RepetitionWithSeparator",idx:r.idx,separator:Fp(new GI({terminalType:r.separator})),definition:e(r.definition)};if(r instanceof mj)return{type:"Repetition",idx:r.idx,definition:e(r.definition)};if(r instanceof Ij)return{type:"Alternation",idx:r.idx,definition:e(r.definition)};if(r instanceof GI){var i={type:"Terminal",name:r.terminalType.name,label:(0,PEe.tokenLabel)(r.terminalType),idx:r.idx};(0,fr.isString)(r.label)&&(i.terminalLabel=r.label);var n=r.terminalType.PATTERN;return r.terminalType.PATTERN&&(i.pattern=(0,fr.isRegExp)(n)?n.source:n),i}else{if(r instanceof fj)return{type:"Rule",name:r.name,orgText:r.orgText,definition:e(r.definition)};throw Error("non exhaustive match")}}}Vt.serializeProduction=Fp});var qI=w(YI=>{"use strict";Object.defineProperty(YI,"__esModule",{value:!0});YI.RestWalker=void 0;var RS=Yt(),Qn=bn(),REe=function(){function r(){}return r.prototype.walk=function(e,t){var i=this;t===void 0&&(t=[]),(0,RS.forEach)(e.definition,function(n,s){var o=(0,RS.drop)(e.definition,s+1);if(n instanceof Qn.NonTerminal)i.walkProdRef(n,o,t);else if(n instanceof Qn.Terminal)i.walkTerminal(n,o,t);else if(n instanceof Qn.Alternative)i.walkFlat(n,o,t);else if(n instanceof Qn.Option)i.walkOption(n,o,t);else if(n instanceof Qn.RepetitionMandatory)i.walkAtLeastOne(n,o,t);else if(n instanceof Qn.RepetitionMandatoryWithSeparator)i.walkAtLeastOneSep(n,o,t);else if(n instanceof Qn.RepetitionWithSeparator)i.walkManySep(n,o,t);else if(n instanceof Qn.Repetition)i.walkMany(n,o,t);else if(n instanceof Qn.Alternation)i.walkOr(n,o,t);else throw Error("non exhaustive match")})},r.prototype.walkTerminal=function(e,t,i){},r.prototype.walkProdRef=function(e,t,i){},r.prototype.walkFlat=function(e,t,i){var n=t.concat(i);this.walk(e,n)},r.prototype.walkOption=function(e,t,i){var n=t.concat(i);this.walk(e,n)},r.prototype.walkAtLeastOne=function(e,t,i){var n=[new Qn.Option({definition:e.definition})].concat(t,i);this.walk(e,n)},r.prototype.walkAtLeastOneSep=function(e,t,i){var n=yj(e,t,i);this.walk(e,n)},r.prototype.walkMany=function(e,t,i){var n=[new Qn.Option({definition:e.definition})].concat(t,i);this.walk(e,n)},r.prototype.walkManySep=function(e,t,i){var n=yj(e,t,i);this.walk(e,n)},r.prototype.walkOr=function(e,t,i){var n=this,s=t.concat(i);(0,RS.forEach)(e.definition,function(o){var a=new Qn.Alternative({definition:[o]});n.walk(a,s)})},r}();YI.RestWalker=REe;function yj(r,e,t){var i=[new Qn.Option({definition:[new Qn.Terminal({terminalType:r.separator})].concat(r.definition)})],n=i.concat(e,t);return n}});var Eg=w(JI=>{"use strict";Object.defineProperty(JI,"__esModule",{value:!0});JI.GAstVisitor=void 0;var Uo=bn(),FEe=function(){function r(){}return r.prototype.visit=function(e){var t=e;switch(t.constructor){case Uo.NonTerminal:return this.visitNonTerminal(t);case Uo.Alternative:return this.visitAlternative(t);case Uo.Option:return this.visitOption(t);case Uo.RepetitionMandatory:return this.visitRepetitionMandatory(t);case Uo.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(t);case Uo.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(t);case Uo.Repetition:return this.visitRepetition(t);case Uo.Alternation:return this.visitAlternation(t);case Uo.Terminal:return this.visitTerminal(t);case Uo.Rule:return this.visitRule(t);default:throw Error("non exhaustive match")}},r.prototype.visitNonTerminal=function(e){},r.prototype.visitAlternative=function(e){},r.prototype.visitOption=function(e){},r.prototype.visitRepetition=function(e){},r.prototype.visitRepetitionMandatory=function(e){},r.prototype.visitRepetitionMandatoryWithSeparator=function(e){},r.prototype.visitRepetitionWithSeparator=function(e){},r.prototype.visitAlternation=function(e){},r.prototype.visitTerminal=function(e){},r.prototype.visitRule=function(e){},r}();JI.GAstVisitor=FEe});var Lp=w(Gi=>{"use strict";var NEe=Gi&&Gi.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Gi,"__esModule",{value:!0});Gi.collectMethods=Gi.DslMethodsCollectorVisitor=Gi.getProductionDslName=Gi.isBranchingProd=Gi.isOptionalProd=Gi.isSequenceProd=void 0;var Np=Yt(),xr=bn(),LEe=Eg();function TEe(r){return r instanceof xr.Alternative||r instanceof xr.Option||r instanceof xr.Repetition||r instanceof xr.RepetitionMandatory||r instanceof xr.RepetitionMandatoryWithSeparator||r instanceof xr.RepetitionWithSeparator||r instanceof xr.Terminal||r instanceof xr.Rule}Gi.isSequenceProd=TEe;function FS(r,e){e===void 0&&(e=[]);var t=r instanceof xr.Option||r instanceof xr.Repetition||r instanceof xr.RepetitionWithSeparator;return t?!0:r instanceof xr.Alternation?(0,Np.some)(r.definition,function(i){return FS(i,e)}):r instanceof xr.NonTerminal&&(0,Np.contains)(e,r)?!1:r instanceof xr.AbstractProduction?(r instanceof xr.NonTerminal&&e.push(r),(0,Np.every)(r.definition,function(i){return FS(i,e)})):!1}Gi.isOptionalProd=FS;function OEe(r){return r instanceof xr.Alternation}Gi.isBranchingProd=OEe;function MEe(r){if(r instanceof xr.NonTerminal)return"SUBRULE";if(r instanceof xr.Option)return"OPTION";if(r instanceof xr.Alternation)return"OR";if(r instanceof xr.RepetitionMandatory)return"AT_LEAST_ONE";if(r instanceof xr.RepetitionMandatoryWithSeparator)return"AT_LEAST_ONE_SEP";if(r instanceof xr.RepetitionWithSeparator)return"MANY_SEP";if(r instanceof xr.Repetition)return"MANY";if(r instanceof xr.Terminal)return"CONSUME";throw Error("non exhaustive match")}Gi.getProductionDslName=MEe;var wj=function(r){NEe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.separator="-",t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return e.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},e.prototype.visitTerminal=function(t){var i=t.terminalType.name+this.separator+"Terminal";(0,Np.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(t)},e.prototype.visitNonTerminal=function(t){var i=t.nonTerminalName+this.separator+"Terminal";(0,Np.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(t)},e.prototype.visitOption=function(t){this.dslMethods.option.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.dslMethods.repetitionWithSeparator.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.dslMethods.repetitionMandatory.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)},e.prototype.visitRepetition=function(t){this.dslMethods.repetition.push(t)},e.prototype.visitAlternation=function(t){this.dslMethods.alternation.push(t)},e}(LEe.GAstVisitor);Gi.DslMethodsCollectorVisitor=wj;var WI=new wj;function KEe(r){WI.reset(),r.accept(WI);var e=WI.dslMethods;return WI.reset(),e}Gi.collectMethods=KEe});var LS=w(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.firstForTerminal=Ho.firstForBranching=Ho.firstForSequence=Ho.first=void 0;var zI=Yt(),Bj=bn(),NS=Lp();function _I(r){if(r instanceof Bj.NonTerminal)return _I(r.referencedRule);if(r instanceof Bj.Terminal)return Sj(r);if((0,NS.isSequenceProd)(r))return bj(r);if((0,NS.isBranchingProd)(r))return Qj(r);throw Error("non exhaustive match")}Ho.first=_I;function bj(r){for(var e=[],t=r.definition,i=0,n=t.length>i,s,o=!0;n&&o;)s=t[i],o=(0,NS.isOptionalProd)(s),e=e.concat(_I(s)),i=i+1,n=t.length>i;return(0,zI.uniq)(e)}Ho.firstForSequence=bj;function Qj(r){var e=(0,zI.map)(r.definition,function(t){return _I(t)});return(0,zI.uniq)((0,zI.flatten)(e))}Ho.firstForBranching=Qj;function Sj(r){return[r.terminalType]}Ho.firstForTerminal=Sj});var TS=w(VI=>{"use strict";Object.defineProperty(VI,"__esModule",{value:!0});VI.IN=void 0;VI.IN="_~IN~_"});var Dj=w(vs=>{"use strict";var UEe=vs&&vs.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(vs,"__esModule",{value:!0});vs.buildInProdFollowPrefix=vs.buildBetweenProdsFollowPrefix=vs.computeAllProdsFollows=vs.ResyncFollowsWalker=void 0;var HEe=qI(),jEe=LS(),vj=Yt(),xj=TS(),GEe=bn(),Pj=function(r){UEe(e,r);function e(t){var i=r.call(this)||this;return i.topProd=t,i.follows={},i}return e.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},e.prototype.walkTerminal=function(t,i,n){},e.prototype.walkProdRef=function(t,i,n){var s=kj(t.referencedRule,t.idx)+this.topProd.name,o=i.concat(n),a=new GEe.Alternative({definition:o}),l=(0,jEe.first)(a);this.follows[s]=l},e}(HEe.RestWalker);vs.ResyncFollowsWalker=Pj;function YEe(r){var e={};return(0,vj.forEach)(r,function(t){var i=new Pj(t).startWalking();(0,vj.assign)(e,i)}),e}vs.computeAllProdsFollows=YEe;function kj(r,e){return r.name+e+xj.IN}vs.buildBetweenProdsFollowPrefix=kj;function qEe(r){var e=r.terminalType.name;return e+r.idx+xj.IN}vs.buildInProdFollowPrefix=qEe});var Tp=w(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.defaultGrammarValidatorErrorProvider=Ya.defaultGrammarResolverErrorProvider=Ya.defaultParserErrorProvider=void 0;var Ig=XA(),JEe=Yt(),lo=Yt(),OS=bn(),Rj=Lp();Ya.defaultParserErrorProvider={buildMismatchTokenMessage:function(r){var e=r.expected,t=r.actual,i=r.previous,n=r.ruleName,s=(0,Ig.hasTokenLabel)(e),o=s?"--> "+(0,Ig.tokenLabel)(e)+" <--":"token of type --> "+e.name+" <--",a="Expecting "+o+" but found --> '"+t.image+"' <--";return a},buildNotAllInputParsedMessage:function(r){var e=r.firstRedundant,t=r.ruleName;return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage:function(r){var e=r.expectedPathsPerAlt,t=r.actual,i=r.previous,n=r.customUserDescription,s=r.ruleName,o="Expecting: ",a=(0,lo.first)(t).image,l=` +but found: '`+a+"'";if(n)return o+n+l;var c=(0,lo.reduce)(e,function(h,p){return h.concat(p)},[]),u=(0,lo.map)(c,function(h){return"["+(0,lo.map)(h,function(p){return(0,Ig.tokenLabel)(p)}).join(", ")+"]"}),g=(0,lo.map)(u,function(h,p){return" "+(p+1)+". "+h}),f=`one of these possible Token sequences: +`+g.join(` +`);return o+f+l},buildEarlyExitMessage:function(r){var e=r.expectedIterationPaths,t=r.actual,i=r.customUserDescription,n=r.ruleName,s="Expecting: ",o=(0,lo.first)(t).image,a=` +but found: '`+o+"'";if(i)return s+i+a;var l=(0,lo.map)(e,function(u){return"["+(0,lo.map)(u,function(g){return(0,Ig.tokenLabel)(g)}).join(",")+"]"}),c=`expecting at least one iteration which starts with one of these possible Token sequences:: + `+("<"+l.join(" ,")+">");return s+c+a}};Object.freeze(Ya.defaultParserErrorProvider);Ya.defaultGrammarResolverErrorProvider={buildRuleNotFoundError:function(r,e){var t="Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- +inside top level rule: ->`+r.name+"<-";return t}};Ya.defaultGrammarValidatorErrorProvider={buildDuplicateFoundError:function(r,e){function t(u){return u instanceof OS.Terminal?u.terminalType.name:u instanceof OS.NonTerminal?u.nonTerminalName:""}var i=r.name,n=(0,lo.first)(e),s=n.idx,o=(0,Rj.getProductionDslName)(n),a=t(n),l=s>0,c="->"+o+(l?s:"")+"<- "+(a?"with argument: ->"+a+"<-":"")+` + appears more than once (`+e.length+" times) in the top level rule: ->"+i+`<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,` +`),c},buildNamespaceConflictError:function(r){var e=`Namespace conflict found in grammar. +`+("The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+r.name+`>. +`)+`To resolve this make sure each Terminal and Non-Terminal names are unique +This is easy to accomplish by using the convention that Terminal names start with an uppercase letter +and Non-Terminal names start with a lower case letter.`;return e},buildAlternationPrefixAmbiguityError:function(r){var e=(0,lo.map)(r.prefixPath,function(n){return(0,Ig.tokenLabel)(n)}).join(", "),t=r.alternation.idx===0?"":r.alternation.idx,i="Ambiguous alternatives: <"+r.ambiguityIndices.join(" ,")+`> due to common lookahead prefix +`+("in inside <"+r.topLevelRule.name+`> Rule, +`)+("<"+e+`> may appears as a prefix path in all these alternatives. +`)+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX +For Further details.`;return i},buildAlternationAmbiguityError:function(r){var e=(0,lo.map)(r.prefixPath,function(n){return(0,Ig.tokenLabel)(n)}).join(", "),t=r.alternation.idx===0?"":r.alternation.idx,i="Ambiguous Alternatives Detected: <"+r.ambiguityIndices.join(" ,")+"> in "+(" inside <"+r.topLevelRule.name+`> Rule, +`)+("<"+e+`> may appears as a prefix path in all these alternatives. +`);return i=i+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,i},buildEmptyRepetitionError:function(r){var e=(0,Rj.getProductionDslName)(r.repetition);r.repetition.idx!==0&&(e+=r.repetition.idx);var t="The repetition <"+e+"> within Rule <"+r.topLevelRule.name+`> can never consume any tokens. +This could lead to an infinite loop.`;return t},buildTokenNameError:function(r){return"deprecated"},buildEmptyAlternationError:function(r){var e="Ambiguous empty alternative: <"+(r.emptyChoiceIdx+1)+">"+(" in inside <"+r.topLevelRule.name+`> Rule. +`)+"Only the last alternative may be an empty alternative.";return e},buildTooManyAlternativesError:function(r){var e=`An Alternation cannot have more than 256 alternatives: +`+(" inside <"+r.topLevelRule.name+`> Rule. + has `+(r.alternation.definition.length+1)+" alternatives.");return e},buildLeftRecursionError:function(r){var e=r.topLevelRule.name,t=JEe.map(r.leftRecursionPath,function(s){return s.name}),i=e+" --> "+t.concat([e]).join(" --> "),n=`Left Recursion found in grammar. +`+("rule: <"+e+`> can be invoked from itself (directly or indirectly) +`)+(`without consuming any Tokens. The grammar path that causes this is: + `+i+` +`)+` To fix this refactor your grammar to remove the left recursion. +see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;return n},buildInvalidRuleNameError:function(r){return"deprecated"},buildDuplicateRuleNameError:function(r){var e;r.topLevelRule instanceof OS.Rule?e=r.topLevelRule.name:e=r.topLevelRule;var t="Duplicate definition, rule: ->"+e+"<- is already defined in the grammar: ->"+r.grammarName+"<-";return t}}});var Lj=w(ZA=>{"use strict";var WEe=ZA&&ZA.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(ZA,"__esModule",{value:!0});ZA.GastRefResolverVisitor=ZA.resolveGrammar=void 0;var zEe=$n(),Fj=Yt(),_Ee=Eg();function VEe(r,e){var t=new Nj(r,e);return t.resolveRefs(),t.errors}ZA.resolveGrammar=VEe;var Nj=function(r){WEe(e,r);function e(t,i){var n=r.call(this)||this;return n.nameToTopRule=t,n.errMsgProvider=i,n.errors=[],n}return e.prototype.resolveRefs=function(){var t=this;(0,Fj.forEach)((0,Fj.values)(this.nameToTopRule),function(i){t.currTopLevel=i,i.accept(t)})},e.prototype.visitNonTerminal=function(t){var i=this.nameToTopRule[t.nonTerminalName];if(i)t.referencedRule=i;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:zEe.ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}},e}(_Ee.GAstVisitor);ZA.GastRefResolverVisitor=Nj});var Mp=w(Kr=>{"use strict";var Pc=Kr&&Kr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Kr,"__esModule",{value:!0});Kr.nextPossibleTokensAfter=Kr.possiblePathsFrom=Kr.NextTerminalAfterAtLeastOneSepWalker=Kr.NextTerminalAfterAtLeastOneWalker=Kr.NextTerminalAfterManySepWalker=Kr.NextTerminalAfterManyWalker=Kr.AbstractNextTerminalAfterProductionWalker=Kr.NextAfterTokenWalker=Kr.AbstractNextPossibleTokensWalker=void 0;var Tj=qI(),Kt=Yt(),XEe=LS(),Dt=bn(),Oj=function(r){Pc(e,r);function e(t,i){var n=r.call(this)||this;return n.topProd=t,n.path=i,n.possibleTokTypes=[],n.nextProductionName="",n.nextProductionOccurrence=0,n.found=!1,n.isAtEndOfPath=!1,n}return e.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,Kt.cloneArr)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,Kt.cloneArr)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},e.prototype.walk=function(t,i){i===void 0&&(i=[]),this.found||r.prototype.walk.call(this,t,i)},e.prototype.walkProdRef=function(t,i,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){var s=i.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,s)}},e.prototype.updateExpectedNext=function(){(0,Kt.isEmpty)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},e}(Tj.RestWalker);Kr.AbstractNextPossibleTokensWalker=Oj;var ZEe=function(r){Pc(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.path=i,n.nextTerminalName="",n.nextTerminalOccurrence=0,n.nextTerminalName=n.path.lastTok.name,n.nextTerminalOccurrence=n.path.lastTokOccurrence,n}return e.prototype.walkTerminal=function(t,i,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){var s=i.concat(n),o=new Dt.Alternative({definition:s});this.possibleTokTypes=(0,XEe.first)(o),this.found=!0}},e}(Oj);Kr.NextAfterTokenWalker=ZEe;var Op=function(r){Pc(e,r);function e(t,i){var n=r.call(this)||this;return n.topRule=t,n.occurrence=i,n.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},n}return e.prototype.startWalking=function(){return this.walk(this.topRule),this.result},e}(Tj.RestWalker);Kr.AbstractNextTerminalAfterProductionWalker=Op;var $Ee=function(r){Pc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkMany=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkMany.call(this,t,i,n)},e}(Op);Kr.NextTerminalAfterManyWalker=$Ee;var eIe=function(r){Pc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkManySep=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkManySep.call(this,t,i,n)},e}(Op);Kr.NextTerminalAfterManySepWalker=eIe;var tIe=function(r){Pc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkAtLeastOne=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkAtLeastOne.call(this,t,i,n)},e}(Op);Kr.NextTerminalAfterAtLeastOneWalker=tIe;var rIe=function(r){Pc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkAtLeastOneSep=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkAtLeastOneSep.call(this,t,i,n)},e}(Op);Kr.NextTerminalAfterAtLeastOneSepWalker=rIe;function Mj(r,e,t){t===void 0&&(t=[]),t=(0,Kt.cloneArr)(t);var i=[],n=0;function s(c){return c.concat((0,Kt.drop)(r,n+1))}function o(c){var u=Mj(s(c),e,t);return i.concat(u)}for(;t.length=0;ce--){var Z=b.definition[ce],O={idx:p,def:Z.definition.concat((0,Kt.drop)(h)),ruleStack:m,occurrenceStack:y};g.push(O),g.push(o)}else if(b instanceof Dt.Alternative)g.push({idx:p,def:b.definition.concat((0,Kt.drop)(h)),ruleStack:m,occurrenceStack:y});else if(b instanceof Dt.Rule)g.push(iIe(b,p,m,y));else throw Error("non exhaustive match")}}return u}Kr.nextPossibleTokensAfter=nIe;function iIe(r,e,t,i){var n=(0,Kt.cloneArr)(t);n.push(r.name);var s=(0,Kt.cloneArr)(i);return s.push(1),{idx:e,def:r.definition,ruleStack:n,occurrenceStack:s}}});var Kp=w(tr=>{"use strict";var Kj=tr&&tr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(tr,"__esModule",{value:!0});tr.areTokenCategoriesNotUsed=tr.isStrictPrefixOfPath=tr.containsPath=tr.getLookaheadPathsForOptionalProd=tr.getLookaheadPathsForOr=tr.lookAheadSequenceFromAlternatives=tr.buildSingleAlternativeLookaheadFunction=tr.buildAlternativesLookAheadFunc=tr.buildLookaheadFuncForOptionalProd=tr.buildLookaheadFuncForOr=tr.getProdType=tr.PROD_TYPE=void 0;var cr=Yt(),Uj=Mp(),sIe=qI(),XI=mg(),$A=bn(),oIe=Eg(),ui;(function(r){r[r.OPTION=0]="OPTION",r[r.REPETITION=1]="REPETITION",r[r.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",r[r.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",r[r.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",r[r.ALTERNATION=5]="ALTERNATION"})(ui=tr.PROD_TYPE||(tr.PROD_TYPE={}));function aIe(r){if(r instanceof $A.Option)return ui.OPTION;if(r instanceof $A.Repetition)return ui.REPETITION;if(r instanceof $A.RepetitionMandatory)return ui.REPETITION_MANDATORY;if(r instanceof $A.RepetitionMandatoryWithSeparator)return ui.REPETITION_MANDATORY_WITH_SEPARATOR;if(r instanceof $A.RepetitionWithSeparator)return ui.REPETITION_WITH_SEPARATOR;if(r instanceof $A.Alternation)return ui.ALTERNATION;throw Error("non exhaustive match")}tr.getProdType=aIe;function AIe(r,e,t,i,n,s){var o=Hj(r,e,t),a=MS(o)?XI.tokenStructuredMatcherNoCategories:XI.tokenStructuredMatcher;return s(o,i,a,n)}tr.buildLookaheadFuncForOr=AIe;function lIe(r,e,t,i,n,s){var o=jj(r,e,n,t),a=MS(o)?XI.tokenStructuredMatcherNoCategories:XI.tokenStructuredMatcher;return s(o[0],a,i)}tr.buildLookaheadFuncForOptionalProd=lIe;function cIe(r,e,t,i){var n=r.length,s=(0,cr.every)(r,function(l){return(0,cr.every)(l,function(c){return c.length===1})});if(e)return function(l){for(var c=(0,cr.map)(l,function(x){return x.GATE}),u=0;u{"use strict";var HS=Xt&&Xt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Xt,"__esModule",{value:!0});Xt.checkPrefixAlternativesAmbiguities=Xt.validateSomeNonEmptyLookaheadPath=Xt.validateTooManyAlts=Xt.RepetionCollector=Xt.validateAmbiguousAlternationAlternatives=Xt.validateEmptyOrAlternative=Xt.getFirstNoneTerminal=Xt.validateNoLeftRecursion=Xt.validateRuleIsOverridden=Xt.validateRuleDoesNotAlreadyExist=Xt.OccurrenceValidationCollector=Xt.identifyProductionForDuplicates=Xt.validateGrammar=void 0;var nr=Yt(),kr=Yt(),jo=$n(),jS=Lp(),yg=Kp(),pIe=Mp(),co=bn(),GS=Eg();function mIe(r,e,t,i,n){var s=nr.map(r,function(h){return dIe(h,i)}),o=nr.map(r,function(h){return YS(h,h,i)}),a=[],l=[],c=[];(0,kr.every)(o,kr.isEmpty)&&(a=(0,kr.map)(r,function(h){return Wj(h,i)}),l=(0,kr.map)(r,function(h){return zj(h,e,i)}),c=Vj(r,e,i));var u=CIe(r,t,i),g=(0,kr.map)(r,function(h){return _j(h,i)}),f=(0,kr.map)(r,function(h){return Jj(h,r,n,i)});return nr.flatten(s.concat(c,o,a,l,u,g,f))}Xt.validateGrammar=mIe;function dIe(r,e){var t=new $j;r.accept(t);var i=t.allProductions,n=nr.groupBy(i,Xj),s=nr.pick(n,function(a){return a.length>1}),o=nr.map(nr.values(s),function(a){var l=nr.first(a),c=e.buildDuplicateFoundError(r,a),u=(0,jS.getProductionDslName)(l),g={message:c,type:jo.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,ruleName:r.name,dslName:u,occurrence:l.idx},f=Zj(l);return f&&(g.parameter=f),g});return o}function Xj(r){return(0,jS.getProductionDslName)(r)+"_#_"+r.idx+"_#_"+Zj(r)}Xt.identifyProductionForDuplicates=Xj;function Zj(r){return r instanceof co.Terminal?r.terminalType.name:r instanceof co.NonTerminal?r.nonTerminalName:""}var $j=function(r){HS(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.allProductions=[],t}return e.prototype.visitNonTerminal=function(t){this.allProductions.push(t)},e.prototype.visitOption=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e.prototype.visitAlternation=function(t){this.allProductions.push(t)},e.prototype.visitTerminal=function(t){this.allProductions.push(t)},e}(GS.GAstVisitor);Xt.OccurrenceValidationCollector=$j;function Jj(r,e,t,i){var n=[],s=(0,kr.reduce)(e,function(a,l){return l.name===r.name?a+1:a},0);if(s>1){var o=i.buildDuplicateRuleNameError({topLevelRule:r,grammarName:t});n.push({message:o,type:jo.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:r.name})}return n}Xt.validateRuleDoesNotAlreadyExist=Jj;function EIe(r,e,t){var i=[],n;return nr.contains(e,r)||(n="Invalid rule override, rule: ->"+r+"<- cannot be overridden in the grammar: ->"+t+"<-as it is not defined in any of the super grammars ",i.push({message:n,type:jo.ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,ruleName:r})),i}Xt.validateRuleIsOverridden=EIe;function YS(r,e,t,i){i===void 0&&(i=[]);var n=[],s=Up(e.definition);if(nr.isEmpty(s))return[];var o=r.name,a=nr.contains(s,r);a&&n.push({message:t.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:i}),type:jo.ParserDefinitionErrorType.LEFT_RECURSION,ruleName:o});var l=nr.difference(s,i.concat([r])),c=nr.map(l,function(u){var g=nr.cloneArr(i);return g.push(u),YS(r,u,t,g)});return n.concat(nr.flatten(c))}Xt.validateNoLeftRecursion=YS;function Up(r){var e=[];if(nr.isEmpty(r))return e;var t=nr.first(r);if(t instanceof co.NonTerminal)e.push(t.referencedRule);else if(t instanceof co.Alternative||t instanceof co.Option||t instanceof co.RepetitionMandatory||t instanceof co.RepetitionMandatoryWithSeparator||t instanceof co.RepetitionWithSeparator||t instanceof co.Repetition)e=e.concat(Up(t.definition));else if(t instanceof co.Alternation)e=nr.flatten(nr.map(t.definition,function(o){return Up(o.definition)}));else if(!(t instanceof co.Terminal))throw Error("non exhaustive match");var i=(0,jS.isOptionalProd)(t),n=r.length>1;if(i&&n){var s=nr.drop(r);return e.concat(Up(s))}else return e}Xt.getFirstNoneTerminal=Up;var qS=function(r){HS(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.alternations=[],t}return e.prototype.visitAlternation=function(t){this.alternations.push(t)},e}(GS.GAstVisitor);function Wj(r,e){var t=new qS;r.accept(t);var i=t.alternations,n=nr.reduce(i,function(s,o){var a=nr.dropRight(o.definition),l=nr.map(a,function(c,u){var g=(0,pIe.nextPossibleTokensAfter)([c],[],null,1);return nr.isEmpty(g)?{message:e.buildEmptyAlternationError({topLevelRule:r,alternation:o,emptyChoiceIdx:u}),type:jo.ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,ruleName:r.name,occurrence:o.idx,alternative:u+1}:null});return s.concat(nr.compact(l))},[]);return n}Xt.validateEmptyOrAlternative=Wj;function zj(r,e,t){var i=new qS;r.accept(i);var n=i.alternations;n=(0,kr.reject)(n,function(o){return o.ignoreAmbiguities===!0});var s=nr.reduce(n,function(o,a){var l=a.idx,c=a.maxLookahead||e,u=(0,yg.getLookaheadPathsForOr)(l,r,c,a),g=IIe(u,a,r,t),f=eG(u,a,r,t);return o.concat(g,f)},[]);return s}Xt.validateAmbiguousAlternationAlternatives=zj;var tG=function(r){HS(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.allProductions=[],t}return e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e}(GS.GAstVisitor);Xt.RepetionCollector=tG;function _j(r,e){var t=new qS;r.accept(t);var i=t.alternations,n=nr.reduce(i,function(s,o){return o.definition.length>255&&s.push({message:e.buildTooManyAlternativesError({topLevelRule:r,alternation:o}),type:jo.ParserDefinitionErrorType.TOO_MANY_ALTS,ruleName:r.name,occurrence:o.idx}),s},[]);return n}Xt.validateTooManyAlts=_j;function Vj(r,e,t){var i=[];return(0,kr.forEach)(r,function(n){var s=new tG;n.accept(s);var o=s.allProductions;(0,kr.forEach)(o,function(a){var l=(0,yg.getProdType)(a),c=a.maxLookahead||e,u=a.idx,g=(0,yg.getLookaheadPathsForOptionalProd)(u,n,l,c),f=g[0];if((0,kr.isEmpty)((0,kr.flatten)(f))){var h=t.buildEmptyRepetitionError({topLevelRule:n,repetition:a});i.push({message:h,type:jo.ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name})}})}),i}Xt.validateSomeNonEmptyLookaheadPath=Vj;function IIe(r,e,t,i){var n=[],s=(0,kr.reduce)(r,function(a,l,c){return e.definition[c].ignoreAmbiguities===!0||(0,kr.forEach)(l,function(u){var g=[c];(0,kr.forEach)(r,function(f,h){c!==h&&(0,yg.containsPath)(f,u)&&e.definition[h].ignoreAmbiguities!==!0&&g.push(h)}),g.length>1&&!(0,yg.containsPath)(n,u)&&(n.push(u),a.push({alts:g,path:u}))}),a},[]),o=nr.map(s,function(a){var l=(0,kr.map)(a.alts,function(u){return u+1}),c=i.buildAlternationAmbiguityError({topLevelRule:t,alternation:e,ambiguityIndices:l,prefixPath:a.path});return{message:c,type:jo.ParserDefinitionErrorType.AMBIGUOUS_ALTS,ruleName:t.name,occurrence:e.idx,alternatives:[a.alts]}});return o}function eG(r,e,t,i){var n=[],s=(0,kr.reduce)(r,function(o,a,l){var c=(0,kr.map)(a,function(u){return{idx:l,path:u}});return o.concat(c)},[]);return(0,kr.forEach)(s,function(o){var a=e.definition[o.idx];if(a.ignoreAmbiguities!==!0){var l=o.idx,c=o.path,u=(0,kr.findAll)(s,function(f){return e.definition[f.idx].ignoreAmbiguities!==!0&&f.idx{"use strict";Object.defineProperty(wg,"__esModule",{value:!0});wg.validateGrammar=wg.resolveGrammar=void 0;var WS=Yt(),yIe=Lj(),wIe=JS(),rG=Tp();function BIe(r){r=(0,WS.defaults)(r,{errMsgProvider:rG.defaultGrammarResolverErrorProvider});var e={};return(0,WS.forEach)(r.rules,function(t){e[t.name]=t}),(0,yIe.resolveGrammar)(e,r.errMsgProvider)}wg.resolveGrammar=BIe;function bIe(r){return r=(0,WS.defaults)(r,{errMsgProvider:rG.defaultGrammarValidatorErrorProvider}),(0,wIe.validateGrammar)(r.rules,r.maxLookahead,r.tokenTypes,r.errMsgProvider,r.grammarName)}wg.validateGrammar=bIe});var Bg=w(Sn=>{"use strict";var Hp=Sn&&Sn.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Sn,"__esModule",{value:!0});Sn.EarlyExitException=Sn.NotAllInputParsedException=Sn.NoViableAltException=Sn.MismatchedTokenException=Sn.isRecognitionException=void 0;var QIe=Yt(),nG="MismatchedTokenException",sG="NoViableAltException",oG="EarlyExitException",aG="NotAllInputParsedException",AG=[nG,sG,oG,aG];Object.freeze(AG);function SIe(r){return(0,QIe.contains)(AG,r.name)}Sn.isRecognitionException=SIe;var ZI=function(r){Hp(e,r);function e(t,i){var n=this.constructor,s=r.call(this,t)||this;return s.token=i,s.resyncedTokens=[],Object.setPrototypeOf(s,n.prototype),Error.captureStackTrace&&Error.captureStackTrace(s,s.constructor),s}return e}(Error),vIe=function(r){Hp(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=nG,s}return e}(ZI);Sn.MismatchedTokenException=vIe;var xIe=function(r){Hp(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=sG,s}return e}(ZI);Sn.NoViableAltException=xIe;var kIe=function(r){Hp(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.name=aG,n}return e}(ZI);Sn.NotAllInputParsedException=kIe;var PIe=function(r){Hp(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=oG,s}return e}(ZI);Sn.EarlyExitException=PIe});var _S=w(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.attemptInRepetitionRecovery=Yi.Recoverable=Yi.InRuleRecoveryException=Yi.IN_RULE_RECOVERY_EXCEPTION=Yi.EOF_FOLLOW_KEY=void 0;var $I=XA(),xs=Yt(),DIe=Bg(),RIe=TS(),FIe=$n();Yi.EOF_FOLLOW_KEY={};Yi.IN_RULE_RECOVERY_EXCEPTION="InRuleRecoveryException";function zS(r){this.name=Yi.IN_RULE_RECOVERY_EXCEPTION,this.message=r}Yi.InRuleRecoveryException=zS;zS.prototype=Error.prototype;var NIe=function(){function r(){}return r.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,xs.has)(e,"recoveryEnabled")?e.recoveryEnabled:FIe.DEFAULT_PARSER_CONFIG.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=lG)},r.prototype.getTokenToInsert=function(e){var t=(0,$I.createTokenInstance)(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t},r.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},r.prototype.tryInRepetitionRecovery=function(e,t,i,n){for(var s=this,o=this.findReSyncTokenType(),a=this.exportLexerState(),l=[],c=!1,u=this.LA(1),g=this.LA(1),f=function(){var h=s.LA(0),p=s.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:u,previous:h,ruleName:s.getCurrRuleFullName()}),m=new DIe.MismatchedTokenException(p,u,s.LA(0));m.resyncedTokens=(0,xs.dropRight)(l),s.SAVE_ERROR(m)};!c;)if(this.tokenMatcher(g,n)){f();return}else if(i.call(this)){f(),e.apply(this,t);return}else this.tokenMatcher(g,o)?c=!0:(g=this.SKIP_TOKEN(),this.addToResyncTokens(g,l));this.importLexerState(a)},r.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,i){return!(i===!1||e===void 0||t===void 0||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))},r.prototype.getFollowsForInRuleRecovery=function(e,t){var i=this.getCurrentGrammarPath(e,t),n=this.getNextPossibleTokenTypes(i);return n},r.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t)){var i=this.getTokenToInsert(e);return i}if(this.canRecoverWithSingleTokenDeletion(e)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new zS("sad sad panda")},r.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},r.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var i=this;if(!this.canTokenTypeBeInsertedInRecovery(e)||(0,xs.isEmpty)(t))return!1;var n=this.LA(1),s=(0,xs.find)(t,function(o){return i.tokenMatcher(n,o)})!==void 0;return s},r.prototype.canRecoverWithSingleTokenDeletion=function(e){var t=this.tokenMatcher(this.LA(2),e);return t},r.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),i=this.getFollowSetFromFollowKey(t);return(0,xs.contains)(i,e)},r.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),i=2;;){var n=t.tokenType;if((0,xs.contains)(e,n))return n;t=this.LA(i),i++}},r.prototype.getCurrFollowKey=function(){if(this.RULE_STACK.length===1)return Yi.EOF_FOLLOW_KEY;var e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),i=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(i)}},r.prototype.buildFullFollowKeyStack=function(){var e=this,t=this.RULE_STACK,i=this.RULE_OCCURRENCE_STACK;return(0,xs.map)(t,function(n,s){return s===0?Yi.EOF_FOLLOW_KEY:{ruleName:e.shortRuleNameToFullName(n),idxInCallingRule:i[s],inRule:e.shortRuleNameToFullName(t[s-1])}})},r.prototype.flattenFollowSet=function(){var e=this,t=(0,xs.map)(this.buildFullFollowKeyStack(),function(i){return e.getFollowSetFromFollowKey(i)});return(0,xs.flatten)(t)},r.prototype.getFollowSetFromFollowKey=function(e){if(e===Yi.EOF_FOLLOW_KEY)return[$I.EOF];var t=e.ruleName+e.idxInCallingRule+RIe.IN+e.inRule;return this.resyncFollows[t]},r.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,$I.EOF)||t.push(e),t},r.prototype.reSyncTo=function(e){for(var t=[],i=this.LA(1);this.tokenMatcher(i,e)===!1;)i=this.SKIP_TOKEN(),this.addToResyncTokens(i,t);return(0,xs.dropRight)(t)},r.prototype.attemptInRepetitionRecovery=function(e,t,i,n,s,o,a){},r.prototype.getCurrentGrammarPath=function(e,t){var i=this.getHumanReadableRuleStack(),n=(0,xs.cloneArr)(this.RULE_OCCURRENCE_STACK),s={ruleStack:i,occurrenceStack:n,lastTok:e,lastTokOccurrence:t};return s},r.prototype.getHumanReadableRuleStack=function(){var e=this;return(0,xs.map)(this.RULE_STACK,function(t){return e.shortRuleNameToFullName(t)})},r}();Yi.Recoverable=NIe;function lG(r,e,t,i,n,s,o){var a=this.getKeyForAutomaticLookahead(i,n),l=this.firstAfterRepMap[a];if(l===void 0){var c=this.getCurrRuleFullName(),u=this.getGAstProductions()[c],g=new s(u,n);l=g.startWalking(),this.firstAfterRepMap[a]=l}var f=l.token,h=l.occurrence,p=l.isEndOfRule;this.RULE_STACK.length===1&&p&&f===void 0&&(f=$I.EOF,h=1),this.shouldInRepetitionRecoveryBeTried(f,h,o)&&this.tryInRepetitionRecovery(r,e,t,f)}Yi.attemptInRepetitionRecovery=lG});var ey=w(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.getKeyForAutomaticLookahead=Jt.AT_LEAST_ONE_SEP_IDX=Jt.MANY_SEP_IDX=Jt.AT_LEAST_ONE_IDX=Jt.MANY_IDX=Jt.OPTION_IDX=Jt.OR_IDX=Jt.BITS_FOR_ALT_IDX=Jt.BITS_FOR_RULE_IDX=Jt.BITS_FOR_OCCURRENCE_IDX=Jt.BITS_FOR_METHOD_TYPE=void 0;Jt.BITS_FOR_METHOD_TYPE=4;Jt.BITS_FOR_OCCURRENCE_IDX=8;Jt.BITS_FOR_RULE_IDX=12;Jt.BITS_FOR_ALT_IDX=8;Jt.OR_IDX=1<{"use strict";Object.defineProperty(ty,"__esModule",{value:!0});ty.LooksAhead=void 0;var qa=Kp(),uo=Yt(),cG=$n(),Ja=ey(),Dc=Lp(),TIe=function(){function r(){}return r.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=(0,uo.has)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:cG.DEFAULT_PARSER_CONFIG.dynamicTokensEnabled,this.maxLookahead=(0,uo.has)(e,"maxLookahead")?e.maxLookahead:cG.DEFAULT_PARSER_CONFIG.maxLookahead,this.lookAheadFuncsCache=(0,uo.isES2015MapSupported)()?new Map:[],(0,uo.isES2015MapSupported)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},r.prototype.preComputeLookaheadFunctions=function(e){var t=this;(0,uo.forEach)(e,function(i){t.TRACE_INIT(i.name+" Rule Lookahead",function(){var n=(0,Dc.collectMethods)(i),s=n.alternation,o=n.repetition,a=n.option,l=n.repetitionMandatory,c=n.repetitionMandatoryWithSeparator,u=n.repetitionWithSeparator;(0,uo.forEach)(s,function(g){var f=g.idx===0?"":g.idx;t.TRACE_INIT(""+(0,Dc.getProductionDslName)(g)+f,function(){var h=(0,qa.buildLookaheadFuncForOr)(g.idx,i,g.maxLookahead||t.maxLookahead,g.hasPredicates,t.dynamicTokensEnabled,t.lookAheadBuilderForAlternatives),p=(0,Ja.getKeyForAutomaticLookahead)(t.fullRuleNameToShort[i.name],Ja.OR_IDX,g.idx);t.setLaFuncCache(p,h)})}),(0,uo.forEach)(o,function(g){t.computeLookaheadFunc(i,g.idx,Ja.MANY_IDX,qa.PROD_TYPE.REPETITION,g.maxLookahead,(0,Dc.getProductionDslName)(g))}),(0,uo.forEach)(a,function(g){t.computeLookaheadFunc(i,g.idx,Ja.OPTION_IDX,qa.PROD_TYPE.OPTION,g.maxLookahead,(0,Dc.getProductionDslName)(g))}),(0,uo.forEach)(l,function(g){t.computeLookaheadFunc(i,g.idx,Ja.AT_LEAST_ONE_IDX,qa.PROD_TYPE.REPETITION_MANDATORY,g.maxLookahead,(0,Dc.getProductionDslName)(g))}),(0,uo.forEach)(c,function(g){t.computeLookaheadFunc(i,g.idx,Ja.AT_LEAST_ONE_SEP_IDX,qa.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,g.maxLookahead,(0,Dc.getProductionDslName)(g))}),(0,uo.forEach)(u,function(g){t.computeLookaheadFunc(i,g.idx,Ja.MANY_SEP_IDX,qa.PROD_TYPE.REPETITION_WITH_SEPARATOR,g.maxLookahead,(0,Dc.getProductionDslName)(g))})})})},r.prototype.computeLookaheadFunc=function(e,t,i,n,s,o){var a=this;this.TRACE_INIT(""+o+(t===0?"":t),function(){var l=(0,qa.buildLookaheadFuncForOptionalProd)(t,e,s||a.maxLookahead,a.dynamicTokensEnabled,n,a.lookAheadBuilderForOptional),c=(0,Ja.getKeyForAutomaticLookahead)(a.fullRuleNameToShort[e.name],i,t);a.setLaFuncCache(c,l)})},r.prototype.lookAheadBuilderForOptional=function(e,t,i){return(0,qa.buildSingleAlternativeLookaheadFunction)(e,t,i)},r.prototype.lookAheadBuilderForAlternatives=function(e,t,i,n){return(0,qa.buildAlternativesLookAheadFunc)(e,t,i,n)},r.prototype.getKeyForAutomaticLookahead=function(e,t){var i=this.getLastExplicitRuleShortName();return(0,Ja.getKeyForAutomaticLookahead)(i,e,t)},r.prototype.getLaFuncFromCache=function(e){},r.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},r.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},r.prototype.setLaFuncCache=function(e,t){},r.prototype.setLaFuncCacheUsingMap=function(e,t){this.lookAheadFuncsCache.set(e,t)},r.prototype.setLaFuncUsingObj=function(e,t){this.lookAheadFuncsCache[e]=t},r}();ty.LooksAhead=TIe});var gG=w(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.addNoneTerminalToCst=Go.addTerminalToCst=Go.setNodeLocationFull=Go.setNodeLocationOnlyOffset=void 0;function OIe(r,e){isNaN(r.startOffset)===!0?(r.startOffset=e.startOffset,r.endOffset=e.endOffset):r.endOffset{"use strict";Object.defineProperty(el,"__esModule",{value:!0});el.defineNameProp=el.functionName=el.classNameFromInstance=void 0;var HIe=Yt();function jIe(r){return fG(r.constructor)}el.classNameFromInstance=jIe;var hG="name";function fG(r){var e=r.name;return e||"anonymous"}el.functionName=fG;function GIe(r,e){var t=Object.getOwnPropertyDescriptor(r,hG);return(0,HIe.isUndefined)(t)||t.configurable?(Object.defineProperty(r,hG,{enumerable:!1,configurable:!0,writable:!1,value:e}),!0):!1}el.defineNameProp=GIe});var EG=w(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.validateRedundantMethods=Di.validateMissingCstMethods=Di.validateVisitor=Di.CstVisitorDefinitionError=Di.createBaseVisitorConstructorWithDefaults=Di.createBaseSemanticVisitorConstructor=Di.defaultVisit=void 0;var ks=Yt(),jp=VS();function pG(r,e){for(var t=(0,ks.keys)(r),i=t.length,n=0;n: + `+(""+s.join(` + +`).replace(/\n/g,` + `)))}}};return t.prototype=i,t.prototype.constructor=t,t._RULE_NAMES=e,t}Di.createBaseSemanticVisitorConstructor=YIe;function qIe(r,e,t){var i=function(){};(0,jp.defineNameProp)(i,r+"BaseSemanticsWithDefaults");var n=Object.create(t.prototype);return(0,ks.forEach)(e,function(s){n[s]=pG}),i.prototype=n,i.prototype.constructor=i,i}Di.createBaseVisitorConstructorWithDefaults=qIe;var XS;(function(r){r[r.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",r[r.MISSING_METHOD=1]="MISSING_METHOD"})(XS=Di.CstVisitorDefinitionError||(Di.CstVisitorDefinitionError={}));function dG(r,e){var t=CG(r,e),i=mG(r,e);return t.concat(i)}Di.validateVisitor=dG;function CG(r,e){var t=(0,ks.map)(e,function(i){if(!(0,ks.isFunction)(r[i]))return{msg:"Missing visitor method: <"+i+"> on "+(0,jp.functionName)(r.constructor)+" CST Visitor.",type:XS.MISSING_METHOD,methodName:i}});return(0,ks.compact)(t)}Di.validateMissingCstMethods=CG;var JIe=["constructor","visit","validateVisitor"];function mG(r,e){var t=[];for(var i in r)(0,ks.isFunction)(r[i])&&!(0,ks.contains)(JIe,i)&&!(0,ks.contains)(e,i)&&t.push({msg:"Redundant visitor method: <"+i+"> on "+(0,jp.functionName)(r.constructor)+` CST Visitor +There is no Grammar Rule corresponding to this method's name. +`,type:XS.REDUNDANT_METHOD,methodName:i});return t}Di.validateRedundantMethods=mG});var yG=w(ry=>{"use strict";Object.defineProperty(ry,"__esModule",{value:!0});ry.TreeBuilder=void 0;var bg=gG(),ni=Yt(),IG=EG(),WIe=$n(),zIe=function(){function r(){}return r.prototype.initTreeBuilder=function(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(0,ni.has)(e,"nodeLocationTracking")?e.nodeLocationTracking:WIe.DEFAULT_PARSER_CONFIG.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=ni.NOOP,this.cstFinallyStateUpdate=ni.NOOP,this.cstPostTerminal=ni.NOOP,this.cstPostNonTerminal=ni.NOOP,this.cstPostRule=ni.NOOP;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=bg.setNodeLocationFull,this.setNodeLocationFromNode=bg.setNodeLocationFull,this.cstPostRule=ni.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=ni.NOOP,this.setNodeLocationFromNode=ni.NOOP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=bg.setNodeLocationOnlyOffset,this.setNodeLocationFromNode=bg.setNodeLocationOnlyOffset,this.cstPostRule=ni.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=ni.NOOP,this.setNodeLocationFromNode=ni.NOOP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=ni.NOOP,this.setNodeLocationFromNode=ni.NOOP,this.cstPostRule=ni.NOOP,this.setInitialNodeLocation=ni.NOOP;else throw Error('Invalid config option: "'+e.nodeLocationTracking+'"')},r.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},r.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},r.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},r.prototype.setInitialNodeLocationFullRegular=function(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},r.prototype.cstInvocationStateUpdate=function(e,t){var i={name:e,children:{}};this.setInitialNodeLocation(i),this.CST_STACK.push(i)},r.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},r.prototype.cstPostRuleFull=function(e){var t=this.LA(0),i=e.location;i.startOffset<=t.startOffset?(i.endOffset=t.endOffset,i.endLine=t.endLine,i.endColumn=t.endColumn):(i.startOffset=NaN,i.startLine=NaN,i.startColumn=NaN)},r.prototype.cstPostRuleOnlyOffset=function(e){var t=this.LA(0),i=e.location;i.startOffset<=t.startOffset?i.endOffset=t.endOffset:i.startOffset=NaN},r.prototype.cstPostTerminal=function(e,t){var i=this.CST_STACK[this.CST_STACK.length-1];(0,bg.addTerminalToCst)(i,t,e),this.setNodeLocationFromToken(i.location,t)},r.prototype.cstPostNonTerminal=function(e,t){var i=this.CST_STACK[this.CST_STACK.length-1];(0,bg.addNoneTerminalToCst)(i,t,e),this.setNodeLocationFromNode(i.location,e.location)},r.prototype.getBaseCstVisitorConstructor=function(){if((0,ni.isUndefined)(this.baseCstVisitorConstructor)){var e=(0,IG.createBaseSemanticVisitorConstructor)(this.className,(0,ni.keys)(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},r.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if((0,ni.isUndefined)(this.baseCstVisitorWithDefaultsConstructor)){var e=(0,IG.createBaseVisitorConstructorWithDefaults)(this.className,(0,ni.keys)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor},r.prototype.getLastExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-1]},r.prototype.getPreviousExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-2]},r.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},r}();ry.TreeBuilder=zIe});var BG=w(iy=>{"use strict";Object.defineProperty(iy,"__esModule",{value:!0});iy.LexerAdapter=void 0;var wG=$n(),_Ie=function(){function r(){}return r.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(r.prototype,"input",{get:function(){return this.tokVector},set:function(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length},enumerable:!1,configurable:!0}),r.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):wG.END_OF_FILE},r.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?wG.END_OF_FILE:this.tokVector[t]},r.prototype.consumeToken=function(){this.currIdx++},r.prototype.exportLexerState=function(){return this.currIdx},r.prototype.importLexerState=function(e){this.currIdx=e},r.prototype.resetLexerState=function(){this.currIdx=-1},r.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},r.prototype.getLexerPosition=function(){return this.exportLexerState()},r}();iy.LexerAdapter=_Ie});var QG=w(ny=>{"use strict";Object.defineProperty(ny,"__esModule",{value:!0});ny.RecognizerApi=void 0;var bG=Yt(),VIe=Bg(),ZS=$n(),XIe=Tp(),ZIe=JS(),$Ie=bn(),eye=function(){function r(){}return r.prototype.ACTION=function(e){return e.call(this)},r.prototype.consume=function(e,t,i){return this.consumeInternal(t,e,i)},r.prototype.subrule=function(e,t,i){return this.subruleInternal(t,e,i)},r.prototype.option=function(e,t){return this.optionInternal(t,e)},r.prototype.or=function(e,t){return this.orInternal(t,e)},r.prototype.many=function(e,t){return this.manyInternal(e,t)},r.prototype.atLeastOne=function(e,t){return this.atLeastOneInternal(e,t)},r.prototype.CONSUME=function(e,t){return this.consumeInternal(e,0,t)},r.prototype.CONSUME1=function(e,t){return this.consumeInternal(e,1,t)},r.prototype.CONSUME2=function(e,t){return this.consumeInternal(e,2,t)},r.prototype.CONSUME3=function(e,t){return this.consumeInternal(e,3,t)},r.prototype.CONSUME4=function(e,t){return this.consumeInternal(e,4,t)},r.prototype.CONSUME5=function(e,t){return this.consumeInternal(e,5,t)},r.prototype.CONSUME6=function(e,t){return this.consumeInternal(e,6,t)},r.prototype.CONSUME7=function(e,t){return this.consumeInternal(e,7,t)},r.prototype.CONSUME8=function(e,t){return this.consumeInternal(e,8,t)},r.prototype.CONSUME9=function(e,t){return this.consumeInternal(e,9,t)},r.prototype.SUBRULE=function(e,t){return this.subruleInternal(e,0,t)},r.prototype.SUBRULE1=function(e,t){return this.subruleInternal(e,1,t)},r.prototype.SUBRULE2=function(e,t){return this.subruleInternal(e,2,t)},r.prototype.SUBRULE3=function(e,t){return this.subruleInternal(e,3,t)},r.prototype.SUBRULE4=function(e,t){return this.subruleInternal(e,4,t)},r.prototype.SUBRULE5=function(e,t){return this.subruleInternal(e,5,t)},r.prototype.SUBRULE6=function(e,t){return this.subruleInternal(e,6,t)},r.prototype.SUBRULE7=function(e,t){return this.subruleInternal(e,7,t)},r.prototype.SUBRULE8=function(e,t){return this.subruleInternal(e,8,t)},r.prototype.SUBRULE9=function(e,t){return this.subruleInternal(e,9,t)},r.prototype.OPTION=function(e){return this.optionInternal(e,0)},r.prototype.OPTION1=function(e){return this.optionInternal(e,1)},r.prototype.OPTION2=function(e){return this.optionInternal(e,2)},r.prototype.OPTION3=function(e){return this.optionInternal(e,3)},r.prototype.OPTION4=function(e){return this.optionInternal(e,4)},r.prototype.OPTION5=function(e){return this.optionInternal(e,5)},r.prototype.OPTION6=function(e){return this.optionInternal(e,6)},r.prototype.OPTION7=function(e){return this.optionInternal(e,7)},r.prototype.OPTION8=function(e){return this.optionInternal(e,8)},r.prototype.OPTION9=function(e){return this.optionInternal(e,9)},r.prototype.OR=function(e){return this.orInternal(e,0)},r.prototype.OR1=function(e){return this.orInternal(e,1)},r.prototype.OR2=function(e){return this.orInternal(e,2)},r.prototype.OR3=function(e){return this.orInternal(e,3)},r.prototype.OR4=function(e){return this.orInternal(e,4)},r.prototype.OR5=function(e){return this.orInternal(e,5)},r.prototype.OR6=function(e){return this.orInternal(e,6)},r.prototype.OR7=function(e){return this.orInternal(e,7)},r.prototype.OR8=function(e){return this.orInternal(e,8)},r.prototype.OR9=function(e){return this.orInternal(e,9)},r.prototype.MANY=function(e){this.manyInternal(0,e)},r.prototype.MANY1=function(e){this.manyInternal(1,e)},r.prototype.MANY2=function(e){this.manyInternal(2,e)},r.prototype.MANY3=function(e){this.manyInternal(3,e)},r.prototype.MANY4=function(e){this.manyInternal(4,e)},r.prototype.MANY5=function(e){this.manyInternal(5,e)},r.prototype.MANY6=function(e){this.manyInternal(6,e)},r.prototype.MANY7=function(e){this.manyInternal(7,e)},r.prototype.MANY8=function(e){this.manyInternal(8,e)},r.prototype.MANY9=function(e){this.manyInternal(9,e)},r.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},r.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},r.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},r.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},r.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},r.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},r.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},r.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},r.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},r.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},r.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},r.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},r.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},r.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},r.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},r.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},r.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},r.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},r.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},r.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},r.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},r.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},r.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},r.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},r.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},r.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},r.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},r.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},r.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},r.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},r.prototype.RULE=function(e,t,i){if(i===void 0&&(i=ZS.DEFAULT_RULE_CONFIG),(0,bG.contains)(this.definedRulesNames,e)){var n=XIe.defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),s={message:n,type:ZS.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);var o=this.defineRule(e,t,i);return this[e]=o,o},r.prototype.OVERRIDE_RULE=function(e,t,i){i===void 0&&(i=ZS.DEFAULT_RULE_CONFIG);var n=[];n=n.concat((0,ZIe.validateRuleIsOverridden)(e,this.definedRulesNames,this.className)),this.definitionErrors=this.definitionErrors.concat(n);var s=this.defineRule(e,t,i);return this[e]=s,s},r.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var i=this.saveRecogState();try{return e.apply(this,t),!0}catch(n){if((0,VIe.isRecognitionException)(n))return!1;throw n}finally{this.reloadRecogState(i),this.isBackTrackingStack.pop()}}},r.prototype.getGAstProductions=function(){return this.gastProductionsCache},r.prototype.getSerializedGastProductions=function(){return(0,$Ie.serializeGrammar)((0,bG.values)(this.gastProductionsCache))},r}();ny.RecognizerApi=eye});var kG=w(sy=>{"use strict";Object.defineProperty(sy,"__esModule",{value:!0});sy.RecognizerEngine=void 0;var Fr=Yt(),es=ey(),oy=Bg(),SG=Kp(),Qg=Mp(),vG=$n(),tye=_S(),xG=XA(),Gp=mg(),rye=VS(),iye=function(){function r(){}return r.prototype.initRecognizerEngine=function(e,t){if(this.className=(0,rye.classNameFromInstance)(this),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Gp.tokenStructuredMatcherNoCategories,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,Fr.has)(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 + For Further details.`);if((0,Fr.isArray)(e)){if((0,Fr.isEmpty)(e))throw Error(`A Token Vocabulary cannot be empty. + Note that the first argument for the parser constructor + is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 + For Further details.`)}if((0,Fr.isArray)(e))this.tokensMap=(0,Fr.reduce)(e,function(o,a){return o[a.name]=a,o},{});else if((0,Fr.has)(e,"modes")&&(0,Fr.every)((0,Fr.flatten)((0,Fr.values)(e.modes)),Gp.isTokenType)){var i=(0,Fr.flatten)((0,Fr.values)(e.modes)),n=(0,Fr.uniq)(i);this.tokensMap=(0,Fr.reduce)(n,function(o,a){return o[a.name]=a,o},{})}else if((0,Fr.isObject)(e))this.tokensMap=(0,Fr.cloneObj)(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=xG.EOF;var s=(0,Fr.every)((0,Fr.values)(e),function(o){return(0,Fr.isEmpty)(o.categoryMatches)});this.tokenMatcher=s?Gp.tokenStructuredMatcherNoCategories:Gp.tokenStructuredMatcher,(0,Gp.augmentTokenTypes)((0,Fr.values)(this.tokensMap))},r.prototype.defineRule=function(e,t,i){if(this.selfAnalysisDone)throw Error("Grammar rule <"+e+`> may not be defined after the 'performSelfAnalysis' method has been called' +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);var n=(0,Fr.has)(i,"resyncEnabled")?i.resyncEnabled:vG.DEFAULT_RULE_CONFIG.resyncEnabled,s=(0,Fr.has)(i,"recoveryValueFunc")?i.recoveryValueFunc:vG.DEFAULT_RULE_CONFIG.recoveryValueFunc,o=this.ruleShortNameIdx<t},r.prototype.orInternal=function(e,t){var i=this.getKeyForAutomaticLookahead(es.OR_IDX,t),n=(0,Fr.isArray)(e)?e:e.DEF,s=this.getLaFuncFromCache(i),o=s.call(this,n);if(o!==void 0){var a=n[o];return a.ALT.call(this)}this.raiseNoAltException(t,e.ERR_MSG)},r.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){var e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new oy.NotAllInputParsedException(t,e))}},r.prototype.subruleInternal=function(e,t,i){var n;try{var s=i!==void 0?i.ARGS:void 0;return n=e.call(this,t,s),this.cstPostNonTerminal(n,i!==void 0&&i.LABEL!==void 0?i.LABEL:e.ruleName),n}catch(o){this.subruleInternalError(o,i,e.ruleName)}},r.prototype.subruleInternalError=function(e,t,i){throw(0,oy.isRecognitionException)(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:i),delete e.partialCstResult),e},r.prototype.consumeInternal=function(e,t,i){var n;try{var s=this.LA(1);this.tokenMatcher(s,e)===!0?(this.consumeToken(),n=s):this.consumeInternalError(e,s,i)}catch(o){n=this.consumeInternalRecovery(e,t,o)}return this.cstPostTerminal(i!==void 0&&i.LABEL!==void 0?i.LABEL:e.name,n),n},r.prototype.consumeInternalError=function(e,t,i){var n,s=this.LA(0);throw i!==void 0&&i.ERR_MSG?n=i.ERR_MSG:n=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new oy.MismatchedTokenException(n,t,s))},r.prototype.consumeInternalRecovery=function(e,t,i){if(this.recoveryEnabled&&i.name==="MismatchedTokenException"&&!this.isBackTracking()){var n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(s){throw s.name===tye.IN_RULE_RECOVERY_EXCEPTION?i:s}}else throw i},r.prototype.saveRecogState=function(){var e=this.errors,t=(0,Fr.cloneArr)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}},r.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},r.prototype.ruleInvocationStateUpdate=function(e,t,i){this.RULE_OCCURRENCE_STACK.push(i),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t,e)},r.prototype.isBackTracking=function(){return this.isBackTrackingStack.length!==0},r.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},r.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},r.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),xG.EOF)},r.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},r}();sy.RecognizerEngine=iye});var DG=w(ay=>{"use strict";Object.defineProperty(ay,"__esModule",{value:!0});ay.ErrorHandler=void 0;var $S=Bg(),ev=Yt(),PG=Kp(),nye=$n(),sye=function(){function r(){}return r.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=(0,ev.has)(e,"errorMessageProvider")?e.errorMessageProvider:nye.DEFAULT_PARSER_CONFIG.errorMessageProvider},r.prototype.SAVE_ERROR=function(e){if((0,$S.isRecognitionException)(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,ev.cloneArr)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(r.prototype,"errors",{get:function(){return(0,ev.cloneArr)(this._errors)},set:function(e){this._errors=e},enumerable:!1,configurable:!0}),r.prototype.raiseEarlyExitException=function(e,t,i){for(var n=this.getCurrRuleFullName(),s=this.getGAstProductions()[n],o=(0,PG.getLookaheadPathsForOptionalProd)(e,s,t,this.maxLookahead),a=o[0],l=[],c=1;c<=this.maxLookahead;c++)l.push(this.LA(c));var u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:l,previous:this.LA(0),customUserDescription:i,ruleName:n});throw this.SAVE_ERROR(new $S.EarlyExitException(u,this.LA(1),this.LA(0)))},r.prototype.raiseNoAltException=function(e,t){for(var i=this.getCurrRuleFullName(),n=this.getGAstProductions()[i],s=(0,PG.getLookaheadPathsForOr)(e,n,this.maxLookahead),o=[],a=1;a<=this.maxLookahead;a++)o.push(this.LA(a));var l=this.LA(0),c=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:o,previous:l,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new $S.NoViableAltException(c,this.LA(1),l))},r}();ay.ErrorHandler=sye});var NG=w(Ay=>{"use strict";Object.defineProperty(Ay,"__esModule",{value:!0});Ay.ContentAssist=void 0;var RG=Mp(),FG=Yt(),oye=function(){function r(){}return r.prototype.initContentAssist=function(){},r.prototype.computeContentAssist=function(e,t){var i=this.gastProductionsCache[e];if((0,FG.isUndefined)(i))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return(0,RG.nextPossibleTokensAfter)([i],t,this.tokenMatcher,this.maxLookahead)},r.prototype.getNextPossibleTokenTypes=function(e){var t=(0,FG.first)(e.ruleStack),i=this.getGAstProductions(),n=i[t],s=new RG.NextAfterTokenWalker(n,e).startWalking();return s},r}();Ay.ContentAssist=oye});var jG=w(ly=>{"use strict";Object.defineProperty(ly,"__esModule",{value:!0});ly.GastRecorder=void 0;var vn=Yt(),Yo=bn(),aye=Dp(),LG=mg(),TG=XA(),Aye=$n(),lye=ey(),cy={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(cy);var OG=!0,MG=Math.pow(2,lye.BITS_FOR_OCCURRENCE_IDX)-1,KG=(0,TG.createToken)({name:"RECORDING_PHASE_TOKEN",pattern:aye.Lexer.NA});(0,LG.augmentTokenTypes)([KG]);var UG=(0,TG.createTokenInstance)(KG,`This IToken indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(UG);var cye={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},gye=function(){function r(){}return r.prototype.initGastRecorder=function(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1},r.prototype.enableRecording=function(){var e=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",function(){for(var t=function(n){var s=n>0?n:"";e["CONSUME"+s]=function(o,a){return this.consumeInternalRecord(o,n,a)},e["SUBRULE"+s]=function(o,a){return this.subruleInternalRecord(o,n,a)},e["OPTION"+s]=function(o){return this.optionInternalRecord(o,n)},e["OR"+s]=function(o){return this.orInternalRecord(o,n)},e["MANY"+s]=function(o){this.manyInternalRecord(n,o)},e["MANY_SEP"+s]=function(o){this.manySepFirstInternalRecord(n,o)},e["AT_LEAST_ONE"+s]=function(o){this.atLeastOneInternalRecord(n,o)},e["AT_LEAST_ONE_SEP"+s]=function(o){this.atLeastOneSepFirstInternalRecord(n,o)}},i=0;i<10;i++)t(i);e.consume=function(n,s,o){return this.consumeInternalRecord(s,n,o)},e.subrule=function(n,s,o){return this.subruleInternalRecord(s,n,o)},e.option=function(n,s){return this.optionInternalRecord(s,n)},e.or=function(n,s){return this.orInternalRecord(s,n)},e.many=function(n,s){this.manyInternalRecord(n,s)},e.atLeastOne=function(n,s){this.atLeastOneInternalRecord(n,s)},e.ACTION=e.ACTION_RECORD,e.BACKTRACK=e.BACKTRACK_RECORD,e.LA=e.LA_RECORD})},r.prototype.disableRecording=function(){var e=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",function(){for(var t=0;t<10;t++){var i=t>0?t:"";delete e["CONSUME"+i],delete e["SUBRULE"+i],delete e["OPTION"+i],delete e["OR"+i],delete e["MANY"+i],delete e["MANY_SEP"+i],delete e["AT_LEAST_ONE"+i],delete e["AT_LEAST_ONE_SEP"+i]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})},r.prototype.ACTION_RECORD=function(e){},r.prototype.BACKTRACK_RECORD=function(e,t){return function(){return!0}},r.prototype.LA_RECORD=function(e){return Aye.END_OF_FILE},r.prototype.topLevelRuleRecord=function(e,t){try{var i=new Yo.Rule({definition:[],name:e});return i.name=e,this.recordingProdStack.push(i),t.call(this),this.recordingProdStack.pop(),i}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+` + This error was thrown during the "grammar recording phase" For more info see: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch(s){throw n}throw n}},r.prototype.optionInternalRecord=function(e,t){return Yp.call(this,Yo.Option,e,t)},r.prototype.atLeastOneInternalRecord=function(e,t){Yp.call(this,Yo.RepetitionMandatory,t,e)},r.prototype.atLeastOneSepFirstInternalRecord=function(e,t){Yp.call(this,Yo.RepetitionMandatoryWithSeparator,t,e,OG)},r.prototype.manyInternalRecord=function(e,t){Yp.call(this,Yo.Repetition,t,e)},r.prototype.manySepFirstInternalRecord=function(e,t){Yp.call(this,Yo.RepetitionWithSeparator,t,e,OG)},r.prototype.orInternalRecord=function(e,t){return uye.call(this,e,t)},r.prototype.subruleInternalRecord=function(e,t,i){if(uy(t),!e||(0,vn.has)(e,"ruleName")===!1){var n=new Error(" argument is invalid"+(" expecting a Parser method reference but got: <"+JSON.stringify(e)+">")+(` + inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,vn.peek)(this.recordingProdStack),o=e.ruleName,a=new Yo.NonTerminal({idx:t,nonTerminalName:o,label:i==null?void 0:i.LABEL,referencedRule:void 0});return s.definition.push(a),this.outputCst?cye:cy},r.prototype.consumeInternalRecord=function(e,t,i){if(uy(t),!(0,LG.hasShortKeyProperty)(e)){var n=new Error(" argument is invalid"+(" expecting a TokenType reference but got: <"+JSON.stringify(e)+">")+(` + inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,vn.peek)(this.recordingProdStack),o=new Yo.Terminal({idx:t,terminalType:e,label:i==null?void 0:i.LABEL});return s.definition.push(o),UG},r}();ly.GastRecorder=gye;function Yp(r,e,t,i){i===void 0&&(i=!1),uy(t);var n=(0,vn.peek)(this.recordingProdStack),s=(0,vn.isFunction)(e)?e:e.DEF,o=new r({definition:[],idx:t});return i&&(o.separator=e.SEP),(0,vn.has)(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(o),s.call(this),n.definition.push(o),this.recordingProdStack.pop(),cy}function uye(r,e){var t=this;uy(e);var i=(0,vn.peek)(this.recordingProdStack),n=(0,vn.isArray)(r)===!1,s=n===!1?r:r.DEF,o=new Yo.Alternation({definition:[],idx:e,ignoreAmbiguities:n&&r.IGNORE_AMBIGUITIES===!0});(0,vn.has)(r,"MAX_LOOKAHEAD")&&(o.maxLookahead=r.MAX_LOOKAHEAD);var a=(0,vn.some)(s,function(l){return(0,vn.isFunction)(l.GATE)});return o.hasPredicates=a,i.definition.push(o),(0,vn.forEach)(s,function(l){var c=new Yo.Alternative({definition:[]});o.definition.push(c),(0,vn.has)(l,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:(0,vn.has)(l,"GATE")&&(c.ignoreAmbiguities=!0),t.recordingProdStack.push(c),l.ALT.call(t),t.recordingProdStack.pop()}),cy}function HG(r){return r===0?"":""+r}function uy(r){if(r<0||r>MG){var e=new Error("Invalid DSL Method idx value: <"+r+`> + `+("Idx value must be a none negative value smaller than "+(MG+1)));throw e.KNOWN_RECORDER_ERROR=!0,e}}});var YG=w(gy=>{"use strict";Object.defineProperty(gy,"__esModule",{value:!0});gy.PerformanceTracer=void 0;var GG=Yt(),fye=$n(),hye=function(){function r(){}return r.prototype.initPerformanceTracer=function(e){if((0,GG.has)(e,"traceInitPerf")){var t=e.traceInitPerf,i=typeof t=="number";this.traceInitMaxIdent=i?t:Infinity,this.traceInitPerf=i?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=fye.DEFAULT_PARSER_CONFIG.traceInitPerf;this.traceInitIndent=-1},r.prototype.TRACE_INIT=function(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;var i=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <"+e+">");var n=(0,GG.timer)(t),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return t()},r}();gy.PerformanceTracer=hye});var qG=w(fy=>{"use strict";Object.defineProperty(fy,"__esModule",{value:!0});fy.applyMixins=void 0;function pye(r,e){e.forEach(function(t){var i=t.prototype;Object.getOwnPropertyNames(i).forEach(function(n){if(n!=="constructor"){var s=Object.getOwnPropertyDescriptor(i,n);s&&(s.get||s.set)?Object.defineProperty(r.prototype,n,s):r.prototype[n]=t.prototype[n]}})})}fy.applyMixins=pye});var $n=w(Er=>{"use strict";var JG=Er&&Er.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Er,"__esModule",{value:!0});Er.EmbeddedActionsParser=Er.CstParser=Er.Parser=Er.EMPTY_ALT=Er.ParserDefinitionErrorType=Er.DEFAULT_RULE_CONFIG=Er.DEFAULT_PARSER_CONFIG=Er.END_OF_FILE=void 0;var an=Yt(),dye=Dj(),WG=XA(),zG=Tp(),_G=iG(),Cye=_S(),mye=uG(),Eye=yG(),Iye=BG(),yye=QG(),wye=kG(),Bye=DG(),bye=NG(),Qye=jG(),Sye=YG(),vye=qG();Er.END_OF_FILE=(0,WG.createTokenInstance)(WG.EOF,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Er.END_OF_FILE);Er.DEFAULT_PARSER_CONFIG=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:zG.defaultParserErrorProvider,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1});Er.DEFAULT_RULE_CONFIG=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});var xye;(function(r){r[r.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",r[r.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",r[r.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",r[r.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",r[r.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",r[r.LEFT_RECURSION=5]="LEFT_RECURSION",r[r.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",r[r.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",r[r.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",r[r.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",r[r.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",r[r.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",r[r.TOO_MANY_ALTS=12]="TOO_MANY_ALTS"})(xye=Er.ParserDefinitionErrorType||(Er.ParserDefinitionErrorType={}));function kye(r){return r===void 0&&(r=void 0),function(){return r}}Er.EMPTY_ALT=kye;var hy=function(){function r(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;var i=this;if(i.initErrorHandler(t),i.initLexerAdapter(),i.initLooksAhead(t),i.initRecognizerEngine(e,t),i.initRecoverable(t),i.initTreeBuilder(t),i.initContentAssist(),i.initGastRecorder(t),i.initPerformanceTracer(t),(0,an.has)(t,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. + Please use the flag on the relevant DSL method instead. + See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES + For further details.`);this.skipValidations=(0,an.has)(t,"skipValidations")?t.skipValidations:Er.DEFAULT_PARSER_CONFIG.skipValidations}return r.performSelfAnalysis=function(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")},r.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT("performSelfAnalysis",function(){var t;e.selfAnalysisDone=!0;var i=e.className;e.TRACE_INIT("toFastProps",function(){(0,an.toFastProperties)(e)}),e.TRACE_INIT("Grammar Recording",function(){try{e.enableRecording(),(0,an.forEach)(e.definedRulesNames,function(s){var o=e[s],a=o.originalGrammarAction,l=void 0;e.TRACE_INIT(s+" Rule",function(){l=e.topLevelRuleRecord(s,a)}),e.gastProductionsCache[s]=l})}finally{e.disableRecording()}});var n=[];if(e.TRACE_INIT("Grammar Resolving",function(){n=(0,_G.resolveGrammar)({rules:(0,an.values)(e.gastProductionsCache)}),e.definitionErrors=e.definitionErrors.concat(n)}),e.TRACE_INIT("Grammar Validations",function(){if((0,an.isEmpty)(n)&&e.skipValidations===!1){var s=(0,_G.validateGrammar)({rules:(0,an.values)(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:(0,an.values)(e.tokensMap),errMsgProvider:zG.defaultGrammarValidatorErrorProvider,grammarName:i});e.definitionErrors=e.definitionErrors.concat(s)}}),(0,an.isEmpty)(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT("computeAllProdsFollows",function(){var s=(0,dye.computeAllProdsFollows)((0,an.values)(e.gastProductionsCache));e.resyncFollows=s}),e.TRACE_INIT("ComputeLookaheadFunctions",function(){e.preComputeLookaheadFunctions((0,an.values)(e.gastProductionsCache))})),!r.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,an.isEmpty)(e.definitionErrors))throw t=(0,an.map)(e.definitionErrors,function(s){return s.message}),new Error(`Parser Definition Errors detected: + `+t.join(` +------------------------------- +`))})},r.DEFER_DEFINITION_ERRORS_HANDLING=!1,r}();Er.Parser=hy;(0,vye.applyMixins)(hy,[Cye.Recoverable,mye.LooksAhead,Eye.TreeBuilder,Iye.LexerAdapter,wye.RecognizerEngine,yye.RecognizerApi,Bye.ErrorHandler,bye.ContentAssist,Qye.GastRecorder,Sye.PerformanceTracer]);var Pye=function(r){JG(e,r);function e(t,i){i===void 0&&(i=Er.DEFAULT_PARSER_CONFIG);var n=this,s=(0,an.cloneObj)(i);return s.outputCst=!0,n=r.call(this,t,s)||this,n}return e}(hy);Er.CstParser=Pye;var Dye=function(r){JG(e,r);function e(t,i){i===void 0&&(i=Er.DEFAULT_PARSER_CONFIG);var n=this,s=(0,an.cloneObj)(i);return s.outputCst=!1,n=r.call(this,t,s)||this,n}return e}(hy);Er.EmbeddedActionsParser=Dye});var XG=w(py=>{"use strict";Object.defineProperty(py,"__esModule",{value:!0});py.createSyntaxDiagramsCode=void 0;var VG=IS();function Rye(r,e){var t=e===void 0?{}:e,i=t.resourceBase,n=i===void 0?"https://unpkg.com/chevrotain@"+VG.VERSION+"/diagrams/":i,s=t.css,o=s===void 0?"https://unpkg.com/chevrotain@"+VG.VERSION+"/diagrams/diagrams.css":s,a=` + + + + + +`,l=` + +`,c=` + + + + +`,u=` +
+`,g=` + +`,f=` + +`;return a+l+c+u+g+f}py.createSyntaxDiagramsCode=Rye});var eY=w(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.Parser=Ve.createSyntaxDiagramsCode=Ve.clearCache=Ve.GAstVisitor=Ve.serializeProduction=Ve.serializeGrammar=Ve.Terminal=Ve.Rule=Ve.RepetitionWithSeparator=Ve.RepetitionMandatoryWithSeparator=Ve.RepetitionMandatory=Ve.Repetition=Ve.Option=Ve.NonTerminal=Ve.Alternative=Ve.Alternation=Ve.defaultLexerErrorProvider=Ve.NoViableAltException=Ve.NotAllInputParsedException=Ve.MismatchedTokenException=Ve.isRecognitionException=Ve.EarlyExitException=Ve.defaultParserErrorProvider=Ve.tokenName=Ve.tokenMatcher=Ve.tokenLabel=Ve.EOF=Ve.createTokenInstance=Ve.createToken=Ve.LexerDefinitionErrorType=Ve.Lexer=Ve.EMPTY_ALT=Ve.ParserDefinitionErrorType=Ve.EmbeddedActionsParser=Ve.CstParser=Ve.VERSION=void 0;var Fye=IS();Object.defineProperty(Ve,"VERSION",{enumerable:!0,get:function(){return Fye.VERSION}});var dy=$n();Object.defineProperty(Ve,"CstParser",{enumerable:!0,get:function(){return dy.CstParser}});Object.defineProperty(Ve,"EmbeddedActionsParser",{enumerable:!0,get:function(){return dy.EmbeddedActionsParser}});Object.defineProperty(Ve,"ParserDefinitionErrorType",{enumerable:!0,get:function(){return dy.ParserDefinitionErrorType}});Object.defineProperty(Ve,"EMPTY_ALT",{enumerable:!0,get:function(){return dy.EMPTY_ALT}});var ZG=Dp();Object.defineProperty(Ve,"Lexer",{enumerable:!0,get:function(){return ZG.Lexer}});Object.defineProperty(Ve,"LexerDefinitionErrorType",{enumerable:!0,get:function(){return ZG.LexerDefinitionErrorType}});var Sg=XA();Object.defineProperty(Ve,"createToken",{enumerable:!0,get:function(){return Sg.createToken}});Object.defineProperty(Ve,"createTokenInstance",{enumerable:!0,get:function(){return Sg.createTokenInstance}});Object.defineProperty(Ve,"EOF",{enumerable:!0,get:function(){return Sg.EOF}});Object.defineProperty(Ve,"tokenLabel",{enumerable:!0,get:function(){return Sg.tokenLabel}});Object.defineProperty(Ve,"tokenMatcher",{enumerable:!0,get:function(){return Sg.tokenMatcher}});Object.defineProperty(Ve,"tokenName",{enumerable:!0,get:function(){return Sg.tokenName}});var Nye=Tp();Object.defineProperty(Ve,"defaultParserErrorProvider",{enumerable:!0,get:function(){return Nye.defaultParserErrorProvider}});var qp=Bg();Object.defineProperty(Ve,"EarlyExitException",{enumerable:!0,get:function(){return qp.EarlyExitException}});Object.defineProperty(Ve,"isRecognitionException",{enumerable:!0,get:function(){return qp.isRecognitionException}});Object.defineProperty(Ve,"MismatchedTokenException",{enumerable:!0,get:function(){return qp.MismatchedTokenException}});Object.defineProperty(Ve,"NotAllInputParsedException",{enumerable:!0,get:function(){return qp.NotAllInputParsedException}});Object.defineProperty(Ve,"NoViableAltException",{enumerable:!0,get:function(){return qp.NoViableAltException}});var Lye=PS();Object.defineProperty(Ve,"defaultLexerErrorProvider",{enumerable:!0,get:function(){return Lye.defaultLexerErrorProvider}});var qo=bn();Object.defineProperty(Ve,"Alternation",{enumerable:!0,get:function(){return qo.Alternation}});Object.defineProperty(Ve,"Alternative",{enumerable:!0,get:function(){return qo.Alternative}});Object.defineProperty(Ve,"NonTerminal",{enumerable:!0,get:function(){return qo.NonTerminal}});Object.defineProperty(Ve,"Option",{enumerable:!0,get:function(){return qo.Option}});Object.defineProperty(Ve,"Repetition",{enumerable:!0,get:function(){return qo.Repetition}});Object.defineProperty(Ve,"RepetitionMandatory",{enumerable:!0,get:function(){return qo.RepetitionMandatory}});Object.defineProperty(Ve,"RepetitionMandatoryWithSeparator",{enumerable:!0,get:function(){return qo.RepetitionMandatoryWithSeparator}});Object.defineProperty(Ve,"RepetitionWithSeparator",{enumerable:!0,get:function(){return qo.RepetitionWithSeparator}});Object.defineProperty(Ve,"Rule",{enumerable:!0,get:function(){return qo.Rule}});Object.defineProperty(Ve,"Terminal",{enumerable:!0,get:function(){return qo.Terminal}});var $G=bn();Object.defineProperty(Ve,"serializeGrammar",{enumerable:!0,get:function(){return $G.serializeGrammar}});Object.defineProperty(Ve,"serializeProduction",{enumerable:!0,get:function(){return $G.serializeProduction}});var Tye=Eg();Object.defineProperty(Ve,"GAstVisitor",{enumerable:!0,get:function(){return Tye.GAstVisitor}});function Oye(){console.warn(`The clearCache function was 'soft' removed from the Chevrotain API. + It performs no action other than printing this message. + Please avoid using it as it will be completely removed in the future`)}Ve.clearCache=Oye;var Mye=XG();Object.defineProperty(Ve,"createSyntaxDiagramsCode",{enumerable:!0,get:function(){return Mye.createSyntaxDiagramsCode}});var Kye=function(){function r(){throw new Error(`The Parser class has been deprecated, use CstParser or EmbeddedActionsParser instead. +See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_7-0-0`)}return r}();Ve.Parser=Kye});var iY=w((Z$e,tY)=>{var Cy=eY(),Wa=Cy.createToken,rY=Cy.tokenMatcher,tv=Cy.Lexer,Uye=Cy.EmbeddedActionsParser;tY.exports=r=>{let e=Wa({name:"LogicalOperator",pattern:tv.NA}),t=Wa({name:"Or",pattern:/\|/,categories:e}),i=Wa({name:"Xor",pattern:/\^/,categories:e}),n=Wa({name:"And",pattern:/&/,categories:e}),s=Wa({name:"Not",pattern:/!/}),o=Wa({name:"LParen",pattern:/\(/}),a=Wa({name:"RParen",pattern:/\)/}),l=Wa({name:"Query",pattern:r}),u=[Wa({name:"WhiteSpace",pattern:/\s+/,group:tv.SKIPPED}),t,i,n,o,a,s,e,l],g=new tv(u);class f extends Uye{constructor(p){super(u);this.RULE("expression",()=>this.SUBRULE(this.logicalExpression)),this.RULE("logicalExpression",()=>{let y=this.SUBRULE(this.atomicExpression);return this.MANY(()=>{let b=y,v=this.CONSUME(e),x=this.SUBRULE2(this.atomicExpression);rY(v,t)?y=T=>b(T)||x(T):rY(v,i)?y=T=>!!(b(T)^x(T)):y=T=>b(T)&&x(T)}),y}),this.RULE("atomicExpression",()=>this.OR([{ALT:()=>this.SUBRULE(this.parenthesisExpression)},{ALT:()=>{let{image:m}=this.CONSUME(l);return y=>y(m)}},{ALT:()=>{this.CONSUME(s);let m=this.SUBRULE(this.atomicExpression);return y=>!m(y)}}])),this.RULE("parenthesisExpression",()=>{let m;return this.CONSUME(o),m=this.SUBRULE(this.expression),this.CONSUME(a),m}),this.performSelfAnalysis()}}return{TinylogicLexer:g,TinylogicParser:f}}});var nY=w(my=>{var Hye=iY();my.makeParser=(r=/[a-z]+/)=>{let{TinylogicLexer:e,TinylogicParser:t}=Hye(r),i=new t;return(n,s)=>{let o=e.tokenize(n);return i.input=o.tokens,i.expression()(s)}};my.parse=my.makeParser()});var oY=w((eet,sY)=>{"use strict";sY.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var rv=w((tet,aY)=>{var Jp=oY(),AY={};for(let r of Object.keys(Jp))AY[Jp[r]]=r;var at={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};aY.exports=at;for(let r of Object.keys(at)){if(!("channels"in at[r]))throw new Error("missing channels property: "+r);if(!("labels"in at[r]))throw new Error("missing channel labels property: "+r);if(at[r].labels.length!==at[r].channels)throw new Error("channel and label counts mismatch: "+r);let{channels:e,labels:t}=at[r];delete at[r].channels,delete at[r].labels,Object.defineProperty(at[r],"channels",{value:e}),Object.defineProperty(at[r],"labels",{value:t})}at.rgb.hsl=function(r){let e=r[0]/255,t=r[1]/255,i=r[2]/255,n=Math.min(e,t,i),s=Math.max(e,t,i),o=s-n,a,l;s===n?a=0:e===s?a=(t-i)/o:t===s?a=2+(i-e)/o:i===s&&(a=4+(e-t)/o),a=Math.min(a*60,360),a<0&&(a+=360);let c=(n+s)/2;return s===n?l=0:c<=.5?l=o/(s+n):l=o/(2-s-n),[a,l*100,c*100]};at.rgb.hsv=function(r){let e,t,i,n,s,o=r[0]/255,a=r[1]/255,l=r[2]/255,c=Math.max(o,a,l),u=c-Math.min(o,a,l),g=function(f){return(c-f)/6/u+1/2};return u===0?(n=0,s=0):(s=u/c,e=g(o),t=g(a),i=g(l),o===c?n=i-t:a===c?n=1/3+e-i:l===c&&(n=2/3+t-e),n<0?n+=1:n>1&&(n-=1)),[n*360,s*100,c*100]};at.rgb.hwb=function(r){let e=r[0],t=r[1],i=r[2],n=at.rgb.hsl(r)[0],s=1/255*Math.min(e,Math.min(t,i));return i=1-1/255*Math.max(e,Math.max(t,i)),[n,s*100,i*100]};at.rgb.cmyk=function(r){let e=r[0]/255,t=r[1]/255,i=r[2]/255,n=Math.min(1-e,1-t,1-i),s=(1-e-n)/(1-n)||0,o=(1-t-n)/(1-n)||0,a=(1-i-n)/(1-n)||0;return[s*100,o*100,a*100,n*100]};function jye(r,e){return(r[0]-e[0])**2+(r[1]-e[1])**2+(r[2]-e[2])**2}at.rgb.keyword=function(r){let e=AY[r];if(e)return e;let t=Infinity,i;for(let n of Object.keys(Jp)){let s=Jp[n],o=jye(r,s);o.04045?((e+.055)/1.055)**2.4:e/12.92,t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92;let n=e*.4124+t*.3576+i*.1805,s=e*.2126+t*.7152+i*.0722,o=e*.0193+t*.1192+i*.9505;return[n*100,s*100,o*100]};at.rgb.lab=function(r){let e=at.rgb.xyz(r),t=e[0],i=e[1],n=e[2];t/=95.047,i/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let s=116*i-16,o=500*(t-i),a=200*(i-n);return[s,o,a]};at.hsl.rgb=function(r){let e=r[0]/360,t=r[1]/100,i=r[2]/100,n,s,o;if(t===0)return o=i*255,[o,o,o];i<.5?n=i*(1+t):n=i+t-i*t;let a=2*i-n,l=[0,0,0];for(let c=0;c<3;c++)s=e+1/3*-(c-1),s<0&&s++,s>1&&s--,6*s<1?o=a+(n-a)*6*s:2*s<1?o=n:3*s<2?o=a+(n-a)*(2/3-s)*6:o=a,l[c]=o*255;return l};at.hsl.hsv=function(r){let e=r[0],t=r[1]/100,i=r[2]/100,n=t,s=Math.max(i,.01);i*=2,t*=i<=1?i:2-i,n*=s<=1?s:2-s;let o=(i+t)/2,a=i===0?2*n/(s+n):2*t/(i+t);return[e,a*100,o*100]};at.hsv.rgb=function(r){let e=r[0]/60,t=r[1]/100,i=r[2]/100,n=Math.floor(e)%6,s=e-Math.floor(e),o=255*i*(1-t),a=255*i*(1-t*s),l=255*i*(1-t*(1-s));switch(i*=255,n){case 0:return[i,l,o];case 1:return[a,i,o];case 2:return[o,i,l];case 3:return[o,a,i];case 4:return[l,o,i];case 5:return[i,o,a]}};at.hsv.hsl=function(r){let e=r[0],t=r[1]/100,i=r[2]/100,n=Math.max(i,.01),s,o;o=(2-t)*i;let a=(2-t)*n;return s=t*n,s/=a<=1?a:2-a,s=s||0,o/=2,[e,s*100,o*100]};at.hwb.rgb=function(r){let e=r[0]/360,t=r[1]/100,i=r[2]/100,n=t+i,s;n>1&&(t/=n,i/=n);let o=Math.floor(6*e),a=1-i;s=6*e-o,(o&1)!=0&&(s=1-s);let l=t+s*(a-t),c,u,g;switch(o){default:case 6:case 0:c=a,u=l,g=t;break;case 1:c=l,u=a,g=t;break;case 2:c=t,u=a,g=l;break;case 3:c=t,u=l,g=a;break;case 4:c=l,u=t,g=a;break;case 5:c=a,u=t,g=l;break}return[c*255,u*255,g*255]};at.cmyk.rgb=function(r){let e=r[0]/100,t=r[1]/100,i=r[2]/100,n=r[3]/100,s=1-Math.min(1,e*(1-n)+n),o=1-Math.min(1,t*(1-n)+n),a=1-Math.min(1,i*(1-n)+n);return[s*255,o*255,a*255]};at.xyz.rgb=function(r){let e=r[0]/100,t=r[1]/100,i=r[2]/100,n,s,o;return n=e*3.2406+t*-1.5372+i*-.4986,s=e*-.9689+t*1.8758+i*.0415,o=e*.0557+t*-.204+i*1.057,n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,n=Math.min(Math.max(0,n),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[n*255,s*255,o*255]};at.xyz.lab=function(r){let e=r[0],t=r[1],i=r[2];e/=95.047,t/=100,i/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,t=t>.008856?t**(1/3):7.787*t+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let n=116*t-16,s=500*(e-t),o=200*(t-i);return[n,s,o]};at.lab.xyz=function(r){let e=r[0],t=r[1],i=r[2],n,s,o;s=(e+16)/116,n=t/500+s,o=s-i/200;let a=s**3,l=n**3,c=o**3;return s=a>.008856?a:(s-16/116)/7.787,n=l>.008856?l:(n-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,n*=95.047,s*=100,o*=108.883,[n,s,o]};at.lab.lch=function(r){let e=r[0],t=r[1],i=r[2],n;n=Math.atan2(i,t)*360/2/Math.PI,n<0&&(n+=360);let o=Math.sqrt(t*t+i*i);return[e,o,n]};at.lch.lab=function(r){let e=r[0],t=r[1],n=r[2]/360*2*Math.PI,s=t*Math.cos(n),o=t*Math.sin(n);return[e,s,o]};at.rgb.ansi16=function(r,e=null){let[t,i,n]=r,s=e===null?at.rgb.hsv(r)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(n/255)<<2|Math.round(i/255)<<1|Math.round(t/255));return s===2&&(o+=60),o};at.hsv.ansi16=function(r){return at.rgb.ansi16(at.hsv.rgb(r),r[2])};at.rgb.ansi256=function(r){let e=r[0],t=r[1],i=r[2];return e===t&&t===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(i/255*5)};at.ansi16.rgb=function(r){let e=r%10;if(e===0||e===7)return r>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let t=(~~(r>50)+1)*.5,i=(e&1)*t*255,n=(e>>1&1)*t*255,s=(e>>2&1)*t*255;return[i,n,s]};at.ansi256.rgb=function(r){if(r>=232){let s=(r-232)*10+8;return[s,s,s]}r-=16;let e,t=Math.floor(r/36)/5*255,i=Math.floor((e=r%36)/6)/5*255,n=e%6/5*255;return[t,i,n]};at.rgb.hex=function(r){let t=(((Math.round(r[0])&255)<<16)+((Math.round(r[1])&255)<<8)+(Math.round(r[2])&255)).toString(16).toUpperCase();return"000000".substring(t.length)+t};at.hex.rgb=function(r){let e=r.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let t=e[0];e[0].length===3&&(t=t.split("").map(a=>a+a).join(""));let i=parseInt(t,16),n=i>>16&255,s=i>>8&255,o=i&255;return[n,s,o]};at.rgb.hcg=function(r){let e=r[0]/255,t=r[1]/255,i=r[2]/255,n=Math.max(Math.max(e,t),i),s=Math.min(Math.min(e,t),i),o=n-s,a,l;return o<1?a=s/(1-o):a=0,o<=0?l=0:n===e?l=(t-i)/o%6:n===t?l=2+(i-e)/o:l=4+(e-t)/o,l/=6,l%=1,[l*360,o*100,a*100]};at.hsl.hcg=function(r){let e=r[1]/100,t=r[2]/100,i=t<.5?2*e*t:2*e*(1-t),n=0;return i<1&&(n=(t-.5*i)/(1-i)),[r[0],i*100,n*100]};at.hsv.hcg=function(r){let e=r[1]/100,t=r[2]/100,i=e*t,n=0;return i<1&&(n=(t-i)/(1-i)),[r[0],i*100,n*100]};at.hcg.rgb=function(r){let e=r[0]/360,t=r[1]/100,i=r[2]/100;if(t===0)return[i*255,i*255,i*255];let n=[0,0,0],s=e%1*6,o=s%1,a=1-o,l=0;switch(Math.floor(s)){case 0:n[0]=1,n[1]=o,n[2]=0;break;case 1:n[0]=a,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=o;break;case 3:n[0]=0,n[1]=a,n[2]=1;break;case 4:n[0]=o,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=a}return l=(1-t)*i,[(t*n[0]+l)*255,(t*n[1]+l)*255,(t*n[2]+l)*255]};at.hcg.hsv=function(r){let e=r[1]/100,t=r[2]/100,i=e+t*(1-e),n=0;return i>0&&(n=e/i),[r[0],n*100,i*100]};at.hcg.hsl=function(r){let e=r[1]/100,i=r[2]/100*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[r[0],n*100,i*100]};at.hcg.hwb=function(r){let e=r[1]/100,t=r[2]/100,i=e+t*(1-e);return[r[0],(i-e)*100,(1-i)*100]};at.hwb.hcg=function(r){let e=r[1]/100,t=r[2]/100,i=1-t,n=i-e,s=0;return n<1&&(s=(i-n)/(1-n)),[r[0],n*100,s*100]};at.apple.rgb=function(r){return[r[0]/65535*255,r[1]/65535*255,r[2]/65535*255]};at.rgb.apple=function(r){return[r[0]/255*65535,r[1]/255*65535,r[2]/255*65535]};at.gray.rgb=function(r){return[r[0]/100*255,r[0]/100*255,r[0]/100*255]};at.gray.hsl=function(r){return[0,0,r[0]]};at.gray.hsv=at.gray.hsl;at.gray.hwb=function(r){return[0,100,r[0]]};at.gray.cmyk=function(r){return[0,0,0,r[0]]};at.gray.lab=function(r){return[r[0],0,0]};at.gray.hex=function(r){let e=Math.round(r[0]/100*255)&255,i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(i.length)+i};at.rgb.gray=function(r){return[(r[0]+r[1]+r[2])/3/255*100]}});var cY=w((ret,lY)=>{var Ey=rv();function Gye(){let r={},e=Object.keys(Ey);for(let t=e.length,i=0;i{var iv=rv(),Wye=cY(),vg={},zye=Object.keys(iv);function _ye(r){let e=function(...t){let i=t[0];return i==null?i:(i.length>1&&(t=i),r(t))};return"conversion"in r&&(e.conversion=r.conversion),e}function Vye(r){let e=function(...t){let i=t[0];if(i==null)return i;i.length>1&&(t=i);let n=r(t);if(typeof n=="object")for(let s=n.length,o=0;o{vg[r]={},Object.defineProperty(vg[r],"channels",{value:iv[r].channels}),Object.defineProperty(vg[r],"labels",{value:iv[r].labels});let e=Wye(r);Object.keys(e).forEach(i=>{let n=e[i];vg[r][i]=Vye(n),vg[r][i].raw=_ye(n)})});uY.exports=vg});var mY=w((net,fY)=>{"use strict";var hY=(r,e)=>(...t)=>`[${r(...t)+e}m`,pY=(r,e)=>(...t)=>{let i=r(...t);return`[${38+e};5;${i}m`},dY=(r,e)=>(...t)=>{let i=r(...t);return`[${38+e};2;${i[0]};${i[1]};${i[2]}m`},Iy=r=>r,CY=(r,e,t)=>[r,e,t],xg=(r,e,t)=>{Object.defineProperty(r,e,{get:()=>{let i=t();return Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0}),i},enumerable:!0,configurable:!0})},nv,kg=(r,e,t,i)=>{nv===void 0&&(nv=gY());let n=i?10:0,s={};for(let[o,a]of Object.entries(nv)){let l=o==="ansi16"?"ansi":o;o===e?s[l]=r(t,n):typeof a=="object"&&(s[l]=r(a[e],n))}return s};function Xye(){let r=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[t,i]of Object.entries(e)){for(let[n,s]of Object.entries(i))e[n]={open:`[${s[0]}m`,close:`[${s[1]}m`},i[n]=e[n],r.set(s[0],s[1]);Object.defineProperty(e,t,{value:i,enumerable:!1})}return Object.defineProperty(e,"codes",{value:r,enumerable:!1}),e.color.close="",e.bgColor.close="",xg(e.color,"ansi",()=>kg(hY,"ansi16",Iy,!1)),xg(e.color,"ansi256",()=>kg(pY,"ansi256",Iy,!1)),xg(e.color,"ansi16m",()=>kg(dY,"rgb",CY,!1)),xg(e.bgColor,"ansi",()=>kg(hY,"ansi16",Iy,!0)),xg(e.bgColor,"ansi256",()=>kg(pY,"ansi256",Iy,!0)),xg(e.bgColor,"ansi16m",()=>kg(dY,"rgb",CY,!0)),e}Object.defineProperty(fY,"exports",{enumerable:!0,get:Xye})});var IY=w((set,EY)=>{"use strict";EY.exports=(r,e=process.argv)=>{let t=r.startsWith("-")?"":r.length===1?"-":"--",i=e.indexOf(t+r),n=e.indexOf("--");return i!==-1&&(n===-1||i{"use strict";var Zye=require("os"),wY=require("tty"),Ps=IY(),{env:gi}=process,tl;Ps("no-color")||Ps("no-colors")||Ps("color=false")||Ps("color=never")?tl=0:(Ps("color")||Ps("colors")||Ps("color=true")||Ps("color=always"))&&(tl=1);"FORCE_COLOR"in gi&&(gi.FORCE_COLOR==="true"?tl=1:gi.FORCE_COLOR==="false"?tl=0:tl=gi.FORCE_COLOR.length===0?1:Math.min(parseInt(gi.FORCE_COLOR,10),3));function sv(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function ov(r,e){if(tl===0)return 0;if(Ps("color=16m")||Ps("color=full")||Ps("color=truecolor"))return 3;if(Ps("color=256"))return 2;if(r&&!e&&tl===void 0)return 0;let t=tl||0;if(gi.TERM==="dumb")return t;if(process.platform==="win32"){let i=Zye.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in gi)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(i=>i in gi)||gi.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in gi)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(gi.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in gi)return 1;if(gi.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in gi){let i=parseInt((gi.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(gi.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(gi.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(gi.TERM)||"COLORTERM"in gi?1:t}function $ye(r){let e=ov(r,r&&r.isTTY);return sv(e)}yY.exports={supportsColor:$ye,stdout:sv(ov(!0,wY.isatty(1))),stderr:sv(ov(!0,wY.isatty(2)))}});var QY=w((aet,bY)=>{"use strict";var ewe=(r,e,t)=>{let i=r.indexOf(e);if(i===-1)return r;let n=e.length,s=0,o="";do o+=r.substr(s,i-s)+e+t,s=i+n,i=r.indexOf(e,s);while(i!==-1);return o+=r.substr(s),o},twe=(r,e,t,i)=>{let n=0,s="";do{let o=r[i-1]==="\r";s+=r.substr(n,(o?i-1:i)-n)+e+(o?`\r +`:` +`)+t,n=i+1,i=r.indexOf(` +`,n)}while(i!==-1);return s+=r.substr(n),s};bY.exports={stringReplaceAll:ewe,stringEncaseCRLFWithFirstIndex:twe}});var PY=w((Aet,SY)=>{"use strict";var rwe=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,vY=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,iwe=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,nwe=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,swe=new Map([["n",` +`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a","\x07"]]);function xY(r){let e=r[0]==="u",t=r[1]==="{";return e&&!t&&r.length===5||r[0]==="x"&&r.length===3?String.fromCharCode(parseInt(r.slice(1),16)):e&&t?String.fromCodePoint(parseInt(r.slice(2,-1),16)):swe.get(r)||r}function owe(r,e){let t=[],i=e.trim().split(/\s*,\s*/g),n;for(let s of i){let o=Number(s);if(!Number.isNaN(o))t.push(o);else if(n=s.match(iwe))t.push(n[2].replace(nwe,(a,l,c)=>l?xY(l):c));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${r}')`)}return t}function awe(r){vY.lastIndex=0;let e=[],t;for(;(t=vY.exec(r))!==null;){let i=t[1];if(t[2]){let n=owe(i,t[2]);e.push([i].concat(n))}else e.push([i])}return e}function kY(r,e){let t={};for(let n of e)for(let s of n.styles)t[s[0]]=n.inverse?null:s.slice(1);let i=r;for(let[n,s]of Object.entries(t))if(!!Array.isArray(s)){if(!(n in i))throw new Error(`Unknown Chalk style: ${n}`);i=s.length>0?i[n](...s):i[n]}return i}SY.exports=(r,e)=>{let t=[],i=[],n=[];if(e.replace(rwe,(s,o,a,l,c,u)=>{if(o)n.push(xY(o));else if(l){let g=n.join("");n=[],i.push(t.length===0?g:kY(r,t)(g)),t.push({inverse:a,styles:awe(l)})}else if(c){if(t.length===0)throw new Error("Found extraneous } in Chalk template literal");i.push(kY(r,t)(n.join(""))),n=[],t.pop()}else n.push(u)}),i.push(n.join("")),t.length>0){let s=`Chalk template literal is missing ${t.length} closing bracket${t.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return i.join("")}});var uv=w((cet,DY)=>{"use strict";var Wp=mY(),{stdout:av,stderr:Av}=BY(),{stringReplaceAll:Awe,stringEncaseCRLFWithFirstIndex:lwe}=QY(),RY=["ansi","ansi","ansi256","ansi16m"],Pg=Object.create(null),cwe=(r,e={})=>{if(e.level>3||e.level<0)throw new Error("The `level` option should be an integer from 0 to 3");let t=av?av.level:0;r.level=e.level===void 0?t:e.level},FY=class{constructor(e){return NY(e)}},NY=r=>{let e={};return cwe(e,r),e.template=(...t)=>uwe(e.template,...t),Object.setPrototypeOf(e,yy.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=FY,e.template};function yy(r){return NY(r)}for(let[r,e]of Object.entries(Wp))Pg[r]={get(){let t=wy(this,lv(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,r,{value:t}),t}};Pg.visible={get(){let r=wy(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:r}),r}};var LY=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let r of LY)Pg[r]={get(){let{level:e}=this;return function(...t){let i=lv(Wp.color[RY[e]][r](...t),Wp.color.close,this._styler);return wy(this,i,this._isEmpty)}}};for(let r of LY){let e="bg"+r[0].toUpperCase()+r.slice(1);Pg[e]={get(){let{level:t}=this;return function(...i){let n=lv(Wp.bgColor[RY[t]][r](...i),Wp.bgColor.close,this._styler);return wy(this,n,this._isEmpty)}}}}var gwe=Object.defineProperties(()=>{},te(N({},Pg),{level:{enumerable:!0,get(){return this._generator.level},set(r){this._generator.level=r}}})),lv=(r,e,t)=>{let i,n;return t===void 0?(i=r,n=e):(i=t.openAll+r,n=e+t.closeAll),{open:r,close:e,openAll:i,closeAll:n,parent:t}},wy=(r,e,t)=>{let i=(...n)=>fwe(i,n.length===1?""+n[0]:n.join(" "));return i.__proto__=gwe,i._generator=r,i._styler=e,i._isEmpty=t,i},fwe=(r,e)=>{if(r.level<=0||!e)return r._isEmpty?"":e;let t=r._styler;if(t===void 0)return e;let{openAll:i,closeAll:n}=t;if(e.indexOf("")!==-1)for(;t!==void 0;)e=Awe(e,t.close,t.open),t=t.parent;let s=e.indexOf(` +`);return s!==-1&&(e=lwe(e,n,i,s)),i+e+n},cv,uwe=(r,...e)=>{let[t]=e;if(!Array.isArray(t))return e.join(" ");let i=e.slice(1),n=[t.raw[0]];for(let s=1;s{"use strict";Ds.isInteger=r=>typeof r=="number"?Number.isInteger(r):typeof r=="string"&&r.trim()!==""?Number.isInteger(Number(r)):!1;Ds.find=(r,e)=>r.nodes.find(t=>t.type===e);Ds.exceedsLimit=(r,e,t=1,i)=>i===!1||!Ds.isInteger(r)||!Ds.isInteger(e)?!1:(Number(e)-Number(r))/Number(t)>=i;Ds.escapeNode=(r,e=0,t)=>{let i=r.nodes[e];!i||(t&&i.type===t||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)};Ds.encloseBrace=r=>r.type!=="brace"?!1:r.commas>>0+r.ranges>>0==0?(r.invalid=!0,!0):!1;Ds.isInvalidBrace=r=>r.type!=="brace"?!1:r.invalid===!0||r.dollar?!0:r.commas>>0+r.ranges>>0==0||r.open!==!0||r.close!==!0?(r.invalid=!0,!0):!1;Ds.isOpenOrClose=r=>r.type==="open"||r.type==="close"?!0:r.open===!0||r.close===!0;Ds.reduce=r=>r.reduce((e,t)=>(t.type==="text"&&e.push(t.value),t.type==="range"&&(t.type="text"),e),[]);Ds.flatten=(...r)=>{let e=[],t=i=>{for(let n=0;n{"use strict";var OY=By();TY.exports=(r,e={})=>{let t=(i,n={})=>{let s=e.escapeInvalid&&OY.isInvalidBrace(n),o=i.invalid===!0&&e.escapeInvalid===!0,a="";if(i.value)return(s||o)&&OY.isOpenOrClose(i)?"\\"+i.value:i.value;if(i.value)return i.value;if(i.nodes)for(let l of i.nodes)a+=t(l);return a};return t(r)}});var KY=w((fet,MY)=>{"use strict";MY.exports=function(r){return typeof r=="number"?r-r==0:typeof r=="string"&&r.trim()!==""?Number.isFinite?Number.isFinite(+r):isFinite(+r):!1}});var zY=w((het,UY)=>{"use strict";var HY=KY(),Rc=(r,e,t)=>{if(HY(r)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||r===e)return String(r);if(HY(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let i=N({relaxZeros:!0},t);typeof i.strictZeros=="boolean"&&(i.relaxZeros=i.strictZeros===!1);let n=String(i.relaxZeros),s=String(i.shorthand),o=String(i.capture),a=String(i.wrap),l=r+":"+e+"="+n+s+o+a;if(Rc.cache.hasOwnProperty(l))return Rc.cache[l].result;let c=Math.min(r,e),u=Math.max(r,e);if(Math.abs(c-u)===1){let m=r+"|"+e;return i.capture?`(${m})`:i.wrap===!1?m:`(?:${m})`}let g=GY(r)||GY(e),f={min:r,max:e,a:c,b:u},h=[],p=[];if(g&&(f.isPadded=g,f.maxLen=String(f.max).length),c<0){let m=u<0?Math.abs(u):1;p=jY(m,Math.abs(c),f,i),c=f.a=0}return u>=0&&(h=jY(c,u,f,i)),f.negatives=p,f.positives=h,f.result=hwe(p,h,i),i.capture===!0?f.result=`(${f.result})`:i.wrap!==!1&&h.length+p.length>1&&(f.result=`(?:${f.result})`),Rc.cache[l]=f,f.result};function hwe(r,e,t){let i=gv(r,e,"-",!1,t)||[],n=gv(e,r,"",!1,t)||[],s=gv(r,e,"-?",!0,t)||[];return i.concat(s).concat(n).join("|")}function dwe(r,e){let t=1,i=1,n=YY(r,t),s=new Set([e]);for(;r<=n&&n<=e;)s.add(n),t+=1,n=YY(r,t);for(n=qY(e+1,i)-1;r1&&a.count.pop(),a.count.push(u.count[0]),a.string=a.pattern+JY(a.count),o=c+1;continue}t.isPadded&&(g=Iwe(c,t,i)),u.string=g+u.pattern+JY(u.count),s.push(u),o=c+1,a=u}return s}function gv(r,e,t,i,n){let s=[];for(let o of r){let{string:a}=o;!i&&!WY(e,"string",a)&&s.push(t+a),i&&WY(e,"string",a)&&s.push(t+a)}return s}function Cwe(r,e){let t=[];for(let i=0;ie?1:e>r?-1:0}function WY(r,e,t){return r.some(i=>i[e]===t)}function YY(r,e){return Number(String(r).slice(0,-e)+"9".repeat(e))}function qY(r,e){return r-r%Math.pow(10,e)}function JY(r){let[e=0,t=""]=r;return t||e>1?`{${e+(t?","+t:"")}}`:""}function mwe(r,e,t){return`[${r}${e-r==1?"":"-"}${e}]`}function GY(r){return/^-?(0+)\d/.test(r)}function Iwe(r,e,t){if(!e.isPadded)return r;let i=Math.abs(e.maxLen-String(r).length),n=t.relaxZeros!==!1;switch(i){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${i}}`:`0{${i}}`}}Rc.cache={};Rc.clearCache=()=>Rc.cache={};UY.exports=Rc});var pv=w((pet,_Y)=>{"use strict";var ywe=require("util"),VY=zY(),XY=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),wwe=r=>e=>r===!0?Number(e):String(e),fv=r=>typeof r=="number"||typeof r=="string"&&r!=="",_p=r=>Number.isInteger(+r),hv=r=>{let e=`${r}`,t=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++t]==="0";);return t>0},Bwe=(r,e,t)=>typeof r=="string"||typeof e=="string"?!0:t.stringify===!0,bwe=(r,e,t)=>{if(e>0){let i=r[0]==="-"?"-":"";i&&(r=r.slice(1)),r=i+r.padStart(i?e-1:e,"0")}return t===!1?String(r):r},ZY=(r,e)=>{let t=r[0]==="-"?"-":"";for(t&&(r=r.slice(1),e--);r.length{r.negatives.sort((o,a)=>oa?1:0),r.positives.sort((o,a)=>oa?1:0);let t=e.capture?"":"?:",i="",n="",s;return r.positives.length&&(i=r.positives.join("|")),r.negatives.length&&(n=`-(${t}${r.negatives.join("|")})`),i&&n?s=`${i}|${n}`:s=i||n,e.wrap?`(${t}${s})`:s},$Y=(r,e,t,i)=>{if(t)return VY(r,e,N({wrap:!1},i));let n=String.fromCharCode(r);if(r===e)return n;let s=String.fromCharCode(e);return`[${n}-${s}]`},eq=(r,e,t)=>{if(Array.isArray(r)){let i=t.wrap===!0,n=t.capture?"":"?:";return i?`(${n}${r.join("|")})`:r.join("|")}return VY(r,e,t)},tq=(...r)=>new RangeError("Invalid range arguments: "+ywe.inspect(...r)),rq=(r,e,t)=>{if(t.strictRanges===!0)throw tq([r,e]);return[]},Swe=(r,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${r}" to be a number`);return[]},vwe=(r,e,t=1,i={})=>{let n=Number(r),s=Number(e);if(!Number.isInteger(n)||!Number.isInteger(s)){if(i.strictRanges===!0)throw tq([r,e]);return[]}n===0&&(n=0),s===0&&(s=0);let o=n>s,a=String(r),l=String(e),c=String(t);t=Math.max(Math.abs(t),1);let u=hv(a)||hv(l)||hv(c),g=u?Math.max(a.length,l.length,c.length):0,f=u===!1&&Bwe(r,e,i)===!1,h=i.transform||wwe(f);if(i.toRegex&&t===1)return $Y(ZY(r,g),ZY(e,g),!0,i);let p={negatives:[],positives:[]},m=v=>p[v<0?"negatives":"positives"].push(Math.abs(v)),y=[],b=0;for(;o?n>=s:n<=s;)i.toRegex===!0&&t>1?m(n):y.push(bwe(h(n,b),g,f)),n=o?n-t:n+t,b++;return i.toRegex===!0?t>1?Qwe(p,i):eq(y,null,N({wrap:!1},i)):y},xwe=(r,e,t=1,i={})=>{if(!_p(r)&&r.length>1||!_p(e)&&e.length>1)return rq(r,e,i);let n=i.transform||(f=>String.fromCharCode(f)),s=`${r}`.charCodeAt(0),o=`${e}`.charCodeAt(0),a=s>o,l=Math.min(s,o),c=Math.max(s,o);if(i.toRegex&&t===1)return $Y(l,c,!1,i);let u=[],g=0;for(;a?s>=o:s<=o;)u.push(n(s,g)),s=a?s-t:s+t,g++;return i.toRegex===!0?eq(u,null,{wrap:!1,options:i}):u},Qy=(r,e,t,i={})=>{if(e==null&&fv(r))return[r];if(!fv(r)||!fv(e))return rq(r,e,i);if(typeof t=="function")return Qy(r,e,1,{transform:t});if(XY(t))return Qy(r,e,0,t);let n=N({},i);return n.capture===!0&&(n.wrap=!0),t=t||n.step||1,_p(t)?_p(r)&&_p(e)?vwe(r,e,t,n):xwe(r,e,Math.max(Math.abs(t),1),n):t!=null&&!XY(t)?Swe(t,n):Qy(r,e,1,t)};_Y.exports=Qy});var sq=w((det,iq)=>{"use strict";var kwe=pv(),nq=By(),Pwe=(r,e={})=>{let t=(i,n={})=>{let s=nq.isInvalidBrace(n),o=i.invalid===!0&&e.escapeInvalid===!0,a=s===!0||o===!0,l=e.escapeInvalid===!0?"\\":"",c="";if(i.isOpen===!0||i.isClose===!0)return l+i.value;if(i.type==="open")return a?l+i.value:"(";if(i.type==="close")return a?l+i.value:")";if(i.type==="comma")return i.prev.type==="comma"?"":a?i.value:"|";if(i.value)return i.value;if(i.nodes&&i.ranges>0){let u=nq.reduce(i.nodes),g=kwe(...u,te(N({},e),{wrap:!1,toRegex:!0}));if(g.length!==0)return u.length>1&&g.length>1?`(${g})`:g}if(i.nodes)for(let u of i.nodes)c+=t(u,i);return c};return t(r)};iq.exports=Pwe});var Aq=w((Cet,oq)=>{"use strict";var Dwe=pv(),aq=by(),Dg=By(),Fc=(r="",e="",t=!1)=>{let i=[];if(r=[].concat(r),e=[].concat(e),!e.length)return r;if(!r.length)return t?Dg.flatten(e).map(n=>`{${n}}`):e;for(let n of r)if(Array.isArray(n))for(let s of n)i.push(Fc(s,e,t));else for(let s of e)t===!0&&typeof s=="string"&&(s=`{${s}}`),i.push(Array.isArray(s)?Fc(n,s,t):n+s);return Dg.flatten(i)},Rwe=(r,e={})=>{let t=e.rangeLimit===void 0?1e3:e.rangeLimit,i=(n,s={})=>{n.queue=[];let o=s,a=s.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(n.invalid||n.dollar){a.push(Fc(a.pop(),aq(n,e)));return}if(n.type==="brace"&&n.invalid!==!0&&n.nodes.length===2){a.push(Fc(a.pop(),["{}"]));return}if(n.nodes&&n.ranges>0){let g=Dg.reduce(n.nodes);if(Dg.exceedsLimit(...g,e.step,t))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let f=Dwe(...g,e);f.length===0&&(f=aq(n,e)),a.push(Fc(a.pop(),f)),n.nodes=[];return}let l=Dg.encloseBrace(n),c=n.queue,u=n;for(;u.type!=="brace"&&u.type!=="root"&&u.parent;)u=u.parent,c=u.queue;for(let g=0;g{"use strict";lq.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:` +`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var pq=w((Eet,uq)=>{"use strict";var Fwe=by(),{MAX_LENGTH:gq,CHAR_BACKSLASH:dv,CHAR_BACKTICK:Nwe,CHAR_COMMA:Lwe,CHAR_DOT:Twe,CHAR_LEFT_PARENTHESES:Owe,CHAR_RIGHT_PARENTHESES:Mwe,CHAR_LEFT_CURLY_BRACE:Kwe,CHAR_RIGHT_CURLY_BRACE:Uwe,CHAR_LEFT_SQUARE_BRACKET:fq,CHAR_RIGHT_SQUARE_BRACKET:hq,CHAR_DOUBLE_QUOTE:Hwe,CHAR_SINGLE_QUOTE:jwe,CHAR_NO_BREAK_SPACE:Gwe,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Ywe}=cq(),qwe=(r,e={})=>{if(typeof r!="string")throw new TypeError("Expected a string");let t=e||{},i=typeof t.maxLength=="number"?Math.min(gq,t.maxLength):gq;if(r.length>i)throw new SyntaxError(`Input length (${r.length}), exceeds max characters (${i})`);let n={type:"root",input:r,nodes:[]},s=[n],o=n,a=n,l=0,c=r.length,u=0,g=0,f,h={},p=()=>r[u++],m=y=>{if(y.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&y.type==="text"){a.value+=y.value;return}return o.nodes.push(y),y.parent=o,y.prev=a,a=y,y};for(m({type:"bos"});u0){if(o.ranges>0){o.ranges=0;let y=o.nodes.shift();o.nodes=[y,{type:"text",value:Fwe(o)}]}m({type:"comma",value:f}),o.commas++;continue}if(f===Twe&&g>0&&o.commas===0){let y=o.nodes;if(g===0||y.length===0){m({type:"text",value:f});continue}if(a.type==="dot"){if(o.range=[],a.value+=f,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){y.pop();let b=y[y.length-1];b.value+=a.value+f,a=b,o.ranges--;continue}m({type:"dot",value:f});continue}m({type:"text",value:f})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(v=>{v.nodes||(v.type==="open"&&(v.isOpen=!0),v.type==="close"&&(v.isClose=!0),v.nodes||(v.type="text"),v.invalid=!0)});let y=s[s.length-1],b=y.nodes.indexOf(o);y.nodes.splice(b,1,...o.nodes)}while(s.length>0);return m({type:"eos"}),n};uq.exports=qwe});var mq=w((Iet,dq)=>{"use strict";var Cq=by(),Jwe=sq(),Wwe=Aq(),zwe=pq(),ts=(r,e={})=>{let t=[];if(Array.isArray(r))for(let i of r){let n=ts.create(i,e);Array.isArray(n)?t.push(...n):t.push(n)}else t=[].concat(ts.create(r,e));return e&&e.expand===!0&&e.nodupes===!0&&(t=[...new Set(t)]),t};ts.parse=(r,e={})=>zwe(r,e);ts.stringify=(r,e={})=>typeof r=="string"?Cq(ts.parse(r,e),e):Cq(r,e);ts.compile=(r,e={})=>(typeof r=="string"&&(r=ts.parse(r,e)),Jwe(r,e));ts.expand=(r,e={})=>{typeof r=="string"&&(r=ts.parse(r,e));let t=Wwe(r,e);return e.noempty===!0&&(t=t.filter(Boolean)),e.nodupes===!0&&(t=[...new Set(t)]),t};ts.create=(r,e={})=>r===""||r.length<3?[r]:e.expand!==!0?ts.compile(r,e):ts.expand(r,e);dq.exports=ts});var Vp=w((yet,Eq)=>{"use strict";var _we=require("path"),Jo="\\\\/",Iq=`[^${Jo}]`,za="\\.",Vwe="\\+",Xwe="\\?",Sy="\\/",Zwe="(?=.)",yq="[^/]",Cv=`(?:${Sy}|$)`,wq=`(?:^|${Sy})`,mv=`${za}{1,2}${Cv}`,$we=`(?!${za})`,eBe=`(?!${wq}${mv})`,tBe=`(?!${za}{0,1}${Cv})`,rBe=`(?!${mv})`,iBe=`[^.${Sy}]`,nBe=`${yq}*?`,Bq={DOT_LITERAL:za,PLUS_LITERAL:Vwe,QMARK_LITERAL:Xwe,SLASH_LITERAL:Sy,ONE_CHAR:Zwe,QMARK:yq,END_ANCHOR:Cv,DOTS_SLASH:mv,NO_DOT:$we,NO_DOTS:eBe,NO_DOT_SLASH:tBe,NO_DOTS_SLASH:rBe,QMARK_NO_DOT:iBe,STAR:nBe,START_ANCHOR:wq},sBe=te(N({},Bq),{SLASH_LITERAL:`[${Jo}]`,QMARK:Iq,STAR:`${Iq}*?`,DOTS_SLASH:`${za}{1,2}(?:[${Jo}]|$)`,NO_DOT:`(?!${za})`,NO_DOTS:`(?!(?:^|[${Jo}])${za}{1,2}(?:[${Jo}]|$))`,NO_DOT_SLASH:`(?!${za}{0,1}(?:[${Jo}]|$))`,NO_DOTS_SLASH:`(?!${za}{1,2}(?:[${Jo}]|$))`,QMARK_NO_DOT:`[^.${Jo}]`,START_ANCHOR:`(?:^|[${Jo}])`,END_ANCHOR:`(?:[${Jo}]|$)`}),oBe={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Eq.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:oBe,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:_we.sep,extglobChars(r){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${r.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(r){return r===!0?sBe:Bq}}});var Xp=w(xn=>{"use strict";var aBe=require("path"),ABe=process.platform==="win32",{REGEX_BACKSLASH:lBe,REGEX_REMOVE_BACKSLASH:cBe,REGEX_SPECIAL_CHARS:uBe,REGEX_SPECIAL_CHARS_GLOBAL:gBe}=Vp();xn.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r);xn.hasRegexChars=r=>uBe.test(r);xn.isRegexChar=r=>r.length===1&&xn.hasRegexChars(r);xn.escapeRegex=r=>r.replace(gBe,"\\$1");xn.toPosixSlashes=r=>r.replace(lBe,"/");xn.removeBackslashes=r=>r.replace(cBe,e=>e==="\\"?"":e);xn.supportsLookbehinds=()=>{let r=process.version.slice(1).split(".").map(Number);return r.length===3&&r[0]>=9||r[0]===8&&r[1]>=10};xn.isWindows=r=>r&&typeof r.windows=="boolean"?r.windows:ABe===!0||aBe.sep==="\\";xn.escapeLast=(r,e,t)=>{let i=r.lastIndexOf(e,t);return i===-1?r:r[i-1]==="\\"?xn.escapeLast(r,e,i-1):`${r.slice(0,i)}\\${r.slice(i)}`};xn.removePrefix=(r,e={})=>{let t=r;return t.startsWith("./")&&(t=t.slice(2),e.prefix="./"),t};xn.wrapOutput=(r,e={},t={})=>{let i=t.contains?"":"^",n=t.contains?"":"$",s=`${i}(?:${r})${n}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var Dq=w((Bet,bq)=>{"use strict";var Qq=Xp(),{CHAR_ASTERISK:Ev,CHAR_AT:fBe,CHAR_BACKWARD_SLASH:Zp,CHAR_COMMA:hBe,CHAR_DOT:Iv,CHAR_EXCLAMATION_MARK:yv,CHAR_FORWARD_SLASH:Sq,CHAR_LEFT_CURLY_BRACE:wv,CHAR_LEFT_PARENTHESES:Bv,CHAR_LEFT_SQUARE_BRACKET:pBe,CHAR_PLUS:dBe,CHAR_QUESTION_MARK:vq,CHAR_RIGHT_CURLY_BRACE:CBe,CHAR_RIGHT_PARENTHESES:xq,CHAR_RIGHT_SQUARE_BRACKET:mBe}=Vp(),kq=r=>r===Sq||r===Zp,Pq=r=>{r.isPrefix!==!0&&(r.depth=r.isGlobstar?Infinity:1)},EBe=(r,e)=>{let t=e||{},i=r.length-1,n=t.parts===!0||t.scanToEnd===!0,s=[],o=[],a=[],l=r,c=-1,u=0,g=0,f=!1,h=!1,p=!1,m=!1,y=!1,b=!1,v=!1,x=!1,T=!1,q=!1,Y=0,$,_,ne={value:"",depth:0,isGlob:!1},ee=()=>c>=i,A=()=>l.charCodeAt(c+1),oe=()=>($=_,l.charCodeAt(++c));for(;c0&&(Z=l.slice(0,u),l=l.slice(u),g-=u),ce&&p===!0&&g>0?(ce=l.slice(0,g),O=l.slice(g)):p===!0?(ce="",O=l):ce=l,ce&&ce!==""&&ce!=="/"&&ce!==l&&kq(ce.charCodeAt(ce.length-1))&&(ce=ce.slice(0,-1)),t.unescape===!0&&(O&&(O=Qq.removeBackslashes(O)),ce&&v===!0&&(ce=Qq.removeBackslashes(ce)));let L={prefix:Z,input:r,start:u,base:ce,glob:O,isBrace:f,isBracket:h,isGlob:p,isExtglob:m,isGlobstar:y,negated:x,negatedExtglob:T};if(t.tokens===!0&&(L.maxDepth=0,kq(_)||o.push(ne),L.tokens=o),t.parts===!0||t.tokens===!0){let de;for(let Be=0;Be{"use strict";var vy=Vp(),rs=Xp(),{MAX_LENGTH:xy,POSIX_REGEX_SOURCE:IBe,REGEX_NON_SPECIAL_CHARS:yBe,REGEX_SPECIAL_CHARS_BACKREF:wBe,REPLACEMENTS:Fq}=vy,BBe=(r,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...r,e);r.sort();let t=`[${r.join("-")}]`;try{new RegExp(t)}catch(i){return r.map(n=>rs.escapeRegex(n)).join("..")}return t},Rg=(r,e)=>`Missing ${r}: "${e}" - use "\\\\${e}" to match literal characters`,Nq=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a string");r=Fq[r]||r;let t=N({},e),i=typeof t.maxLength=="number"?Math.min(xy,t.maxLength):xy,n=r.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);let s={type:"bos",value:"",output:t.prepend||""},o=[s],a=t.capture?"":"?:",l=rs.isWindows(e),c=vy.globChars(l),u=vy.extglobChars(c),{DOT_LITERAL:g,PLUS_LITERAL:f,SLASH_LITERAL:h,ONE_CHAR:p,DOTS_SLASH:m,NO_DOT:y,NO_DOT_SLASH:b,NO_DOTS_SLASH:v,QMARK:x,QMARK_NO_DOT:T,STAR:q,START_ANCHOR:Y}=c,$=V=>`(${a}(?:(?!${Y}${V.dot?m:g}).)*?)`,_=t.dot?"":y,ne=t.dot?x:T,ee=t.bash===!0?$(t):q;t.capture&&(ee=`(${ee})`),typeof t.noext=="boolean"&&(t.noextglob=t.noext);let A={input:r,index:-1,start:0,dot:t.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};r=rs.removePrefix(r,A),n=r.length;let oe=[],ce=[],Z=[],O=s,L,de=()=>A.index===n-1,Be=A.peek=(V=1)=>r[A.index+V],je=A.advance=()=>r[++A.index]||"",re=()=>r.slice(A.index+1),se=(V="",Qe=0)=>{A.consumed+=V,A.index+=Qe},be=V=>{A.output+=V.output!=null?V.output:V.value,se(V.value)},he=()=>{let V=1;for(;Be()==="!"&&(Be(2)!=="("||Be(3)==="?");)je(),A.start++,V++;return V%2==0?!1:(A.negated=!0,A.start++,!0)},Fe=V=>{A[V]++,Z.push(V)},Ke=V=>{A[V]--,Z.pop()},ke=V=>{if(O.type==="globstar"){let Qe=A.braces>0&&(V.type==="comma"||V.type==="brace"),le=V.extglob===!0||oe.length&&(V.type==="pipe"||V.type==="paren");V.type!=="slash"&&V.type!=="paren"&&!Qe&&!le&&(A.output=A.output.slice(0,-O.output.length),O.type="star",O.value="*",O.output=ee,A.output+=O.output)}if(oe.length&&V.type!=="paren"&&(oe[oe.length-1].inner+=V.value),(V.value||V.output)&&be(V),O&&O.type==="text"&&V.type==="text"){O.value+=V.value,O.output=(O.output||"")+V.value;return}V.prev=O,o.push(V),O=V},ve=(V,Qe)=>{let le=te(N({},u[Qe]),{conditions:1,inner:""});le.prev=O,le.parens=A.parens,le.output=A.output;let fe=(t.capture?"(":"")+le.open;Fe("parens"),ke({type:V,value:Qe,output:A.output?"":p}),ke({type:"paren",extglob:!0,value:je(),output:fe}),oe.push(le)},pe=V=>{let Qe=V.close+(t.capture?")":""),le;if(V.type==="negate"){let fe=ee;V.inner&&V.inner.length>1&&V.inner.includes("/")&&(fe=$(t)),(fe!==ee||de()||/^\)+$/.test(re()))&&(Qe=V.close=`)$))${fe}`),V.inner.includes("*")&&(le=re())&&/^\.[^\\/.]+$/.test(le)&&(Qe=V.close=`)${le})${fe})`),V.prev.type==="bos"&&(A.negatedExtglob=!0)}ke({type:"paren",extglob:!0,value:L,output:Qe}),Ke("parens")};if(t.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(r)){let V=!1,Qe=r.replace(wBe,(le,fe,gt,Ht,Mt,Ei)=>Ht==="\\"?(V=!0,le):Ht==="?"?fe?fe+Ht+(Mt?x.repeat(Mt.length):""):Ei===0?ne+(Mt?x.repeat(Mt.length):""):x.repeat(gt.length):Ht==="."?g.repeat(gt.length):Ht==="*"?fe?fe+Ht+(Mt?ee:""):ee:fe?le:`\\${le}`);return V===!0&&(t.unescape===!0?Qe=Qe.replace(/\\/g,""):Qe=Qe.replace(/\\+/g,le=>le.length%2==0?"\\\\":le?"\\":"")),Qe===r&&t.contains===!0?(A.output=r,A):(A.output=rs.wrapOutput(Qe,A,e),A)}for(;!de();){if(L=je(),L==="\0")continue;if(L==="\\"){let le=Be();if(le==="/"&&t.bash!==!0||le==="."||le===";")continue;if(!le){L+="\\",ke({type:"text",value:L});continue}let fe=/^\\+/.exec(re()),gt=0;if(fe&&fe[0].length>2&&(gt=fe[0].length,A.index+=gt,gt%2!=0&&(L+="\\")),t.unescape===!0?L=je():L+=je(),A.brackets===0){ke({type:"text",value:L});continue}}if(A.brackets>0&&(L!=="]"||O.value==="["||O.value==="[^")){if(t.posix!==!1&&L===":"){let le=O.value.slice(1);if(le.includes("[")&&(O.posix=!0,le.includes(":"))){let fe=O.value.lastIndexOf("["),gt=O.value.slice(0,fe),Ht=O.value.slice(fe+2),Mt=IBe[Ht];if(Mt){O.value=gt+Mt,A.backtrack=!0,je(),!s.output&&o.indexOf(O)===1&&(s.output=p);continue}}}(L==="["&&Be()!==":"||L==="-"&&Be()==="]")&&(L=`\\${L}`),L==="]"&&(O.value==="["||O.value==="[^")&&(L=`\\${L}`),t.posix===!0&&L==="!"&&O.value==="["&&(L="^"),O.value+=L,be({value:L});continue}if(A.quotes===1&&L!=='"'){L=rs.escapeRegex(L),O.value+=L,be({value:L});continue}if(L==='"'){A.quotes=A.quotes===1?0:1,t.keepQuotes===!0&&ke({type:"text",value:L});continue}if(L==="("){Fe("parens"),ke({type:"paren",value:L});continue}if(L===")"){if(A.parens===0&&t.strictBrackets===!0)throw new SyntaxError(Rg("opening","("));let le=oe[oe.length-1];if(le&&A.parens===le.parens+1){pe(oe.pop());continue}ke({type:"paren",value:L,output:A.parens?")":"\\)"}),Ke("parens");continue}if(L==="["){if(t.nobracket===!0||!re().includes("]")){if(t.nobracket!==!0&&t.strictBrackets===!0)throw new SyntaxError(Rg("closing","]"));L=`\\${L}`}else Fe("brackets");ke({type:"bracket",value:L});continue}if(L==="]"){if(t.nobracket===!0||O&&O.type==="bracket"&&O.value.length===1){ke({type:"text",value:L,output:`\\${L}`});continue}if(A.brackets===0){if(t.strictBrackets===!0)throw new SyntaxError(Rg("opening","["));ke({type:"text",value:L,output:`\\${L}`});continue}Ke("brackets");let le=O.value.slice(1);if(O.posix!==!0&&le[0]==="^"&&!le.includes("/")&&(L=`/${L}`),O.value+=L,be({value:L}),t.literalBrackets===!1||rs.hasRegexChars(le))continue;let fe=rs.escapeRegex(O.value);if(A.output=A.output.slice(0,-O.value.length),t.literalBrackets===!0){A.output+=fe,O.value=fe;continue}O.value=`(${a}${fe}|${O.value})`,A.output+=O.value;continue}if(L==="{"&&t.nobrace!==!0){Fe("braces");let le={type:"brace",value:L,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};ce.push(le),ke(le);continue}if(L==="}"){let le=ce[ce.length-1];if(t.nobrace===!0||!le){ke({type:"text",value:L,output:L});continue}let fe=")";if(le.dots===!0){let gt=o.slice(),Ht=[];for(let Mt=gt.length-1;Mt>=0&&(o.pop(),gt[Mt].type!=="brace");Mt--)gt[Mt].type!=="dots"&&Ht.unshift(gt[Mt].value);fe=BBe(Ht,t),A.backtrack=!0}if(le.comma!==!0&&le.dots!==!0){let gt=A.output.slice(0,le.outputIndex),Ht=A.tokens.slice(le.tokensIndex);le.value=le.output="\\{",L=fe="\\}",A.output=gt;for(let Mt of Ht)A.output+=Mt.output||Mt.value}ke({type:"brace",value:L,output:fe}),Ke("braces"),ce.pop();continue}if(L==="|"){oe.length>0&&oe[oe.length-1].conditions++,ke({type:"text",value:L});continue}if(L===","){let le=L,fe=ce[ce.length-1];fe&&Z[Z.length-1]==="braces"&&(fe.comma=!0,le="|"),ke({type:"comma",value:L,output:le});continue}if(L==="/"){if(O.type==="dot"&&A.index===A.start+1){A.start=A.index+1,A.consumed="",A.output="",o.pop(),O=s;continue}ke({type:"slash",value:L,output:h});continue}if(L==="."){if(A.braces>0&&O.type==="dot"){O.value==="."&&(O.output=g);let le=ce[ce.length-1];O.type="dots",O.output+=L,O.value+=L,le.dots=!0;continue}if(A.braces+A.parens===0&&O.type!=="bos"&&O.type!=="slash"){ke({type:"text",value:L,output:g});continue}ke({type:"dot",value:L,output:g});continue}if(L==="?"){if(!(O&&O.value==="(")&&t.noextglob!==!0&&Be()==="("&&Be(2)!=="?"){ve("qmark",L);continue}if(O&&O.type==="paren"){let fe=Be(),gt=L;if(fe==="<"&&!rs.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(O.value==="("&&!/[!=<:]/.test(fe)||fe==="<"&&!/<([!=]|\w+>)/.test(re()))&&(gt=`\\${L}`),ke({type:"text",value:L,output:gt});continue}if(t.dot!==!0&&(O.type==="slash"||O.type==="bos")){ke({type:"qmark",value:L,output:T});continue}ke({type:"qmark",value:L,output:x});continue}if(L==="!"){if(t.noextglob!==!0&&Be()==="("&&(Be(2)!=="?"||!/[!=<:]/.test(Be(3)))){ve("negate",L);continue}if(t.nonegate!==!0&&A.index===0){he();continue}}if(L==="+"){if(t.noextglob!==!0&&Be()==="("&&Be(2)!=="?"){ve("plus",L);continue}if(O&&O.value==="("||t.regex===!1){ke({type:"plus",value:L,output:f});continue}if(O&&(O.type==="bracket"||O.type==="paren"||O.type==="brace")||A.parens>0){ke({type:"plus",value:L});continue}ke({type:"plus",value:f});continue}if(L==="@"){if(t.noextglob!==!0&&Be()==="("&&Be(2)!=="?"){ke({type:"at",extglob:!0,value:L,output:""});continue}ke({type:"text",value:L});continue}if(L!=="*"){(L==="$"||L==="^")&&(L=`\\${L}`);let le=yBe.exec(re());le&&(L+=le[0],A.index+=le[0].length),ke({type:"text",value:L});continue}if(O&&(O.type==="globstar"||O.star===!0)){O.type="star",O.star=!0,O.value+=L,O.output=ee,A.backtrack=!0,A.globstar=!0,se(L);continue}let V=re();if(t.noextglob!==!0&&/^\([^?]/.test(V)){ve("star",L);continue}if(O.type==="star"){if(t.noglobstar===!0){se(L);continue}let le=O.prev,fe=le.prev,gt=le.type==="slash"||le.type==="bos",Ht=fe&&(fe.type==="star"||fe.type==="globstar");if(t.bash===!0&&(!gt||V[0]&&V[0]!=="/")){ke({type:"star",value:L,output:""});continue}let Mt=A.braces>0&&(le.type==="comma"||le.type==="brace"),Ei=oe.length&&(le.type==="pipe"||le.type==="paren");if(!gt&&le.type!=="paren"&&!Mt&&!Ei){ke({type:"star",value:L,output:""});continue}for(;V.slice(0,3)==="/**";){let jt=r[A.index+4];if(jt&&jt!=="/")break;V=V.slice(3),se("/**",3)}if(le.type==="bos"&&de()){O.type="globstar",O.value+=L,O.output=$(t),A.output=O.output,A.globstar=!0,se(L);continue}if(le.type==="slash"&&le.prev.type!=="bos"&&!Ht&&de()){A.output=A.output.slice(0,-(le.output+O.output).length),le.output=`(?:${le.output}`,O.type="globstar",O.output=$(t)+(t.strictSlashes?")":"|$)"),O.value+=L,A.globstar=!0,A.output+=le.output+O.output,se(L);continue}if(le.type==="slash"&&le.prev.type!=="bos"&&V[0]==="/"){let jt=V[1]!==void 0?"|$":"";A.output=A.output.slice(0,-(le.output+O.output).length),le.output=`(?:${le.output}`,O.type="globstar",O.output=`${$(t)}${h}|${h}${jt})`,O.value+=L,A.output+=le.output+O.output,A.globstar=!0,se(L+je()),ke({type:"slash",value:"/",output:""});continue}if(le.type==="bos"&&V[0]==="/"){O.type="globstar",O.value+=L,O.output=`(?:^|${h}|${$(t)}${h})`,A.output=O.output,A.globstar=!0,se(L+je()),ke({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-O.output.length),O.type="globstar",O.output=$(t),O.value+=L,A.output+=O.output,A.globstar=!0,se(L);continue}let Qe={type:"star",value:L,output:ee};if(t.bash===!0){Qe.output=".*?",(O.type==="bos"||O.type==="slash")&&(Qe.output=_+Qe.output),ke(Qe);continue}if(O&&(O.type==="bracket"||O.type==="paren")&&t.regex===!0){Qe.output=L,ke(Qe);continue}(A.index===A.start||O.type==="slash"||O.type==="dot")&&(O.type==="dot"?(A.output+=b,O.output+=b):t.dot===!0?(A.output+=v,O.output+=v):(A.output+=_,O.output+=_),Be()!=="*"&&(A.output+=p,O.output+=p)),ke(Qe)}for(;A.brackets>0;){if(t.strictBrackets===!0)throw new SyntaxError(Rg("closing","]"));A.output=rs.escapeLast(A.output,"["),Ke("brackets")}for(;A.parens>0;){if(t.strictBrackets===!0)throw new SyntaxError(Rg("closing",")"));A.output=rs.escapeLast(A.output,"("),Ke("parens")}for(;A.braces>0;){if(t.strictBrackets===!0)throw new SyntaxError(Rg("closing","}"));A.output=rs.escapeLast(A.output,"{"),Ke("braces")}if(t.strictSlashes!==!0&&(O.type==="star"||O.type==="bracket")&&ke({type:"maybe_slash",value:"",output:`${h}?`}),A.backtrack===!0){A.output="";for(let V of A.tokens)A.output+=V.output!=null?V.output:V.value,V.suffix&&(A.output+=V.suffix)}return A};Nq.fastpaths=(r,e)=>{let t=N({},e),i=typeof t.maxLength=="number"?Math.min(xy,t.maxLength):xy,n=r.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);r=Fq[r]||r;let s=rs.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:l,DOTS_SLASH:c,NO_DOT:u,NO_DOTS:g,NO_DOTS_SLASH:f,STAR:h,START_ANCHOR:p}=vy.globChars(s),m=t.dot?g:u,y=t.dot?f:u,b=t.capture?"":"?:",v={negated:!1,prefix:""},x=t.bash===!0?".*?":h;t.capture&&(x=`(${x})`);let T=_=>_.noglobstar===!0?x:`(${b}(?:(?!${p}${_.dot?c:o}).)*?)`,q=_=>{switch(_){case"*":return`${m}${l}${x}`;case".*":return`${o}${l}${x}`;case"*.*":return`${m}${x}${o}${l}${x}`;case"*/*":return`${m}${x}${a}${l}${y}${x}`;case"**":return m+T(t);case"**/*":return`(?:${m}${T(t)}${a})?${y}${l}${x}`;case"**/*.*":return`(?:${m}${T(t)}${a})?${y}${x}${o}${l}${x}`;case"**/.*":return`(?:${m}${T(t)}${a})?${o}${l}${x}`;default:{let ne=/^(.*?)\.(\w+)$/.exec(_);if(!ne)return;let ee=q(ne[1]);return ee?ee+o+ne[2]:void 0}}},Y=rs.removePrefix(r,v),$=q(Y);return $&&t.strictSlashes!==!0&&($+=`${a}?`),$};Rq.exports=Nq});var Oq=w((Qet,Tq)=>{"use strict";var bBe=require("path"),QBe=Dq(),bv=Lq(),Qv=Xp(),SBe=Vp(),vBe=r=>r&&typeof r=="object"&&!Array.isArray(r),_r=(r,e,t=!1)=>{if(Array.isArray(r)){let u=r.map(f=>_r(f,e,t));return f=>{for(let h of u){let p=h(f);if(p)return p}return!1}}let i=vBe(r)&&r.tokens&&r.input;if(r===""||typeof r!="string"&&!i)throw new TypeError("Expected pattern to be a non-empty string");let n=e||{},s=Qv.isWindows(e),o=i?_r.compileRe(r,e):_r.makeRe(r,e,!1,!0),a=o.state;delete o.state;let l=()=>!1;if(n.ignore){let u=te(N({},e),{ignore:null,onMatch:null,onResult:null});l=_r(n.ignore,u,t)}let c=(u,g=!1)=>{let{isMatch:f,match:h,output:p}=_r.test(u,o,e,{glob:r,posix:s}),m={glob:r,state:a,regex:o,posix:s,input:u,output:p,match:h,isMatch:f};return typeof n.onResult=="function"&&n.onResult(m),f===!1?(m.isMatch=!1,g?m:!1):l(u)?(typeof n.onIgnore=="function"&&n.onIgnore(m),m.isMatch=!1,g?m:!1):(typeof n.onMatch=="function"&&n.onMatch(m),g?m:!0)};return t&&(c.state=a),c};_r.test=(r,e,t,{glob:i,posix:n}={})=>{if(typeof r!="string")throw new TypeError("Expected input to be a string");if(r==="")return{isMatch:!1,output:""};let s=t||{},o=s.format||(n?Qv.toPosixSlashes:null),a=r===i,l=a&&o?o(r):r;return a===!1&&(l=o?o(r):r,a=l===i),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=_r.matchBase(r,e,t,n):a=e.exec(l)),{isMatch:Boolean(a),match:a,output:l}};_r.matchBase=(r,e,t,i=Qv.isWindows(t))=>(e instanceof RegExp?e:_r.makeRe(e,t)).test(bBe.basename(r));_r.isMatch=(r,e,t)=>_r(e,t)(r);_r.parse=(r,e)=>Array.isArray(r)?r.map(t=>_r.parse(t,e)):bv(r,te(N({},e),{fastpaths:!1}));_r.scan=(r,e)=>QBe(r,e);_r.compileRe=(r,e,t=!1,i=!1)=>{if(t===!0)return r.output;let n=e||{},s=n.contains?"":"^",o=n.contains?"":"$",a=`${s}(?:${r.output})${o}`;r&&r.negated===!0&&(a=`^(?!${a}).*$`);let l=_r.toRegex(a,e);return i===!0&&(l.state=r),l};_r.makeRe=(r,e={},t=!1,i=!1)=>{if(!r||typeof r!="string")throw new TypeError("Expected a non-empty string");let n={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(r[0]==="."||r[0]==="*")&&(n.output=bv.fastpaths(r,e)),n.output||(n=bv(r,e)),_r.compileRe(n,e,t,i)};_r.toRegex=(r,e)=>{try{let t=e||{};return new RegExp(r,t.flags||(t.nocase?"i":""))}catch(t){if(e&&e.debug===!0)throw t;return/$^/}};_r.constants=SBe;Tq.exports=_r});var Sv=w((vet,Mq)=>{"use strict";Mq.exports=Oq()});var is=w((xet,Kq)=>{"use strict";var Uq=require("util"),Hq=mq(),Wo=Sv(),vv=Xp(),jq=r=>r===""||r==="./",Pr=(r,e,t)=>{e=[].concat(e),r=[].concat(r);let i=new Set,n=new Set,s=new Set,o=0,a=u=>{s.add(u.output),t&&t.onResult&&t.onResult(u)};for(let u=0;u!i.has(u));if(t&&c.length===0){if(t.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(t.nonull===!0||t.nullglob===!0)return t.unescape?e.map(u=>u.replace(/\\/g,"")):e}return c};Pr.match=Pr;Pr.matcher=(r,e)=>Wo(r,e);Pr.isMatch=(r,e,t)=>Wo(e,t)(r);Pr.any=Pr.isMatch;Pr.not=(r,e,t={})=>{e=[].concat(e).map(String);let i=new Set,n=[],s=a=>{t.onResult&&t.onResult(a),n.push(a.output)},o=Pr(r,e,te(N({},t),{onResult:s}));for(let a of n)o.includes(a)||i.add(a);return[...i]};Pr.contains=(r,e,t)=>{if(typeof r!="string")throw new TypeError(`Expected a string: "${Uq.inspect(r)}"`);if(Array.isArray(e))return e.some(i=>Pr.contains(r,i,t));if(typeof e=="string"){if(jq(r)||jq(e))return!1;if(r.includes(e)||r.startsWith("./")&&r.slice(2).includes(e))return!0}return Pr.isMatch(r,e,te(N({},t),{contains:!0}))};Pr.matchKeys=(r,e,t)=>{if(!vv.isObject(r))throw new TypeError("Expected the first argument to be an object");let i=Pr(Object.keys(r),e,t),n={};for(let s of i)n[s]=r[s];return n};Pr.some=(r,e,t)=>{let i=[].concat(r);for(let n of[].concat(e)){let s=Wo(String(n),t);if(i.some(o=>s(o)))return!0}return!1};Pr.every=(r,e,t)=>{let i=[].concat(r);for(let n of[].concat(e)){let s=Wo(String(n),t);if(!i.every(o=>s(o)))return!1}return!0};Pr.all=(r,e,t)=>{if(typeof r!="string")throw new TypeError(`Expected a string: "${Uq.inspect(r)}"`);return[].concat(e).every(i=>Wo(i,t)(r))};Pr.capture=(r,e,t)=>{let i=vv.isWindows(t),s=Wo.makeRe(String(r),te(N({},t),{capture:!0})).exec(i?vv.toPosixSlashes(e):e);if(s)return s.slice(1).map(o=>o===void 0?"":o)};Pr.makeRe=(...r)=>Wo.makeRe(...r);Pr.scan=(...r)=>Wo.scan(...r);Pr.parse=(r,e)=>{let t=[];for(let i of[].concat(r||[]))for(let n of Hq(String(i),e))t.push(Wo.parse(n,e));return t};Pr.braces=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(r)?[r]:Hq(r,e)};Pr.braceExpand=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a string");return Pr.braces(r,te(N({},e),{expand:!0}))};Kq.exports=Pr});var Yq=w((ket,Gq)=>{"use strict";Gq.exports=({onlyFirst:r=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,r?void 0:"g")}});var Jq=w((Pet,qq)=>{"use strict";var xBe=Yq();qq.exports=r=>typeof r=="string"?r.replace(xBe(),""):r});var AJ=w((zet,aJ)=>{"use strict";aJ.exports=(...r)=>[...new Set([].concat(...r))]});var jv=w((_et,lJ)=>{"use strict";var UBe=require("stream"),cJ=UBe.PassThrough,HBe=Array.prototype.slice;lJ.exports=jBe;function jBe(){let r=[],e=!1,t=HBe.call(arguments),i=t[t.length-1];i&&!Array.isArray(i)&&i.pipe==null?t.pop():i={};let n=i.end!==!1;i.objectMode==null&&(i.objectMode=!0),i.highWaterMark==null&&(i.highWaterMark=64*1024);let s=cJ(i);function o(){for(let c=0,u=arguments.length;c0||(e=!1,a())}function f(h){function p(){h.removeListener("merge2UnpipeEnd",p),h.removeListener("end",p),g()}if(h._readableState.endEmitted)return g();h.on("merge2UnpipeEnd",p),h.on("end",p),h.pipe(s,{end:!1}),h.resume()}for(let h=0;h{"use strict";Object.defineProperty(Fy,"__esModule",{value:!0});function GBe(r){return r.reduce((e,t)=>[].concat(e,t),[])}Fy.flatten=GBe;function YBe(r,e){let t=[[]],i=0;for(let n of r)e(n)?(i++,t[i]=[]):t[i].push(n);return t}Fy.splitWhen=YBe});var fJ=w(Gv=>{"use strict";Object.defineProperty(Gv,"__esModule",{value:!0});function qBe(r){return r.code==="ENOENT"}Gv.isEnoentCodeError=qBe});var pJ=w(Yv=>{"use strict";Object.defineProperty(Yv,"__esModule",{value:!0});var hJ=class{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}};function JBe(r,e){return new hJ(r,e)}Yv.createDirentFromStats=JBe});var dJ=w(Kg=>{"use strict";Object.defineProperty(Kg,"__esModule",{value:!0});var WBe=require("path"),zBe=2,_Be=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function VBe(r){return r.replace(/\\/g,"/")}Kg.unixify=VBe;function XBe(r,e){return WBe.resolve(r,e)}Kg.makeAbsolute=XBe;function ZBe(r){return r.replace(_Be,"\\$2")}Kg.escape=ZBe;function $Be(r){if(r.charAt(0)==="."){let e=r.charAt(1);if(e==="/"||e==="\\")return r.slice(zBe)}return r}Kg.removeLeadingDotSegment=$Be});var mJ=w((ett,CJ)=>{CJ.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1}});var yJ=w((ttt,EJ)=>{var e0e=mJ(),IJ={"{":"}","(":")","[":"]"},t0e=function(r){if(r[0]==="!")return!0;for(var e=0,t=-2,i=-2,n=-2,s=-2,o=-2;ee&&(o===-1||o>i||(o=r.indexOf("\\",e),o===-1||o>i)))||n!==-1&&r[e]==="{"&&r[e+1]!=="}"&&(n=r.indexOf("}",e),n>e&&(o=r.indexOf("\\",e),o===-1||o>n))||s!==-1&&r[e]==="("&&r[e+1]==="?"&&/[:!=]/.test(r[e+2])&&r[e+3]!==")"&&(s=r.indexOf(")",e),s>e&&(o=r.indexOf("\\",e),o===-1||o>s))||t!==-1&&r[e]==="("&&r[e+1]!=="|"&&(tt&&(o=r.indexOf("\\",t),o===-1||o>s))))return!0;if(r[e]==="\\"){var a=r[e+1];e+=2;var l=IJ[a];if(l){var c=r.indexOf(l,e);c!==-1&&(e=c+1)}if(r[e]==="!")return!0}else e++}return!1},r0e=function(r){if(r[0]==="!")return!0;for(var e=0;e{"use strict";var i0e=yJ(),n0e=require("path").posix.dirname,s0e=require("os").platform()==="win32",qv="/",o0e=/\\/g,a0e=/[\{\[].*[\}\]]$/,A0e=/(^|[^\\])([\{\[]|\([^\)]+$)/,l0e=/\\([\!\*\?\|\[\]\(\)\{\}])/g;wJ.exports=function(e,t){var i=Object.assign({flipBackslashes:!0},t);i.flipBackslashes&&s0e&&e.indexOf(qv)<0&&(e=e.replace(o0e,qv)),a0e.test(e)&&(e+=qv),e+="a";do e=n0e(e);while(i0e(e)||A0e.test(e));return e.replace(l0e,"$1")}});var RJ=w(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});var c0e=require("path"),u0e=BJ(),bJ=is(),g0e=Sv(),QJ="**",f0e="\\",h0e=/[*?]|^!/,p0e=/\[.*]/,d0e=/(?:^|[^!*+?@])\(.*\|.*\)/,C0e=/[!*+?@]\(.*\)/,m0e=/{.*(?:,|\.\.).*}/;function vJ(r,e={}){return!SJ(r,e)}si.isStaticPattern=vJ;function SJ(r,e={}){return!!(e.caseSensitiveMatch===!1||r.includes(f0e)||h0e.test(r)||p0e.test(r)||d0e.test(r)||e.extglob!==!1&&C0e.test(r)||e.braceExpansion!==!1&&m0e.test(r))}si.isDynamicPattern=SJ;function E0e(r){return Ny(r)?r.slice(1):r}si.convertToPositivePattern=E0e;function I0e(r){return"!"+r}si.convertToNegativePattern=I0e;function Ny(r){return r.startsWith("!")&&r[1]!=="("}si.isNegativePattern=Ny;function xJ(r){return!Ny(r)}si.isPositivePattern=xJ;function y0e(r){return r.filter(Ny)}si.getNegativePatterns=y0e;function w0e(r){return r.filter(xJ)}si.getPositivePatterns=w0e;function B0e(r){return u0e(r,{flipBackslashes:!1})}si.getBaseDirectory=B0e;function b0e(r){return r.includes(QJ)}si.hasGlobStar=b0e;function kJ(r){return r.endsWith("/"+QJ)}si.endsWithSlashGlobStar=kJ;function Q0e(r){let e=c0e.basename(r);return kJ(r)||vJ(e)}si.isAffectDepthOfReadingPattern=Q0e;function S0e(r){return r.reduce((e,t)=>e.concat(PJ(t)),[])}si.expandPatternsWithBraceExpansion=S0e;function PJ(r){return bJ.braces(r,{expand:!0,nodupes:!0})}si.expandBraceExpansion=PJ;function v0e(r,e){let t=g0e.scan(r,Object.assign(Object.assign({},e),{parts:!0}));return t.parts.length===0?[r]:t.parts}si.getPatternParts=v0e;function DJ(r,e){return bJ.makeRe(r,e)}si.makeRe=DJ;function x0e(r,e){return r.map(t=>DJ(t,e))}si.convertPatternsToRe=x0e;function k0e(r,e){return e.some(t=>t.test(r))}si.matchAny=k0e});var NJ=w(Jv=>{"use strict";Object.defineProperty(Jv,"__esModule",{value:!0});var P0e=jv();function D0e(r){let e=P0e(r);return r.forEach(t=>{t.once("error",i=>e.emit("error",i))}),e.once("close",()=>FJ(r)),e.once("end",()=>FJ(r)),e}Jv.merge=D0e;function FJ(r){r.forEach(e=>e.emit("close"))}});var LJ=w(Ly=>{"use strict";Object.defineProperty(Ly,"__esModule",{value:!0});function R0e(r){return typeof r=="string"}Ly.isString=R0e;function F0e(r){return r===""}Ly.isEmpty=F0e});var Xa=w(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});var N0e=gJ();Va.array=N0e;var L0e=fJ();Va.errno=L0e;var T0e=pJ();Va.fs=T0e;var O0e=dJ();Va.path=O0e;var M0e=RJ();Va.pattern=M0e;var K0e=NJ();Va.stream=K0e;var U0e=LJ();Va.string=U0e});var UJ=w(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});var Mc=Xa();function H0e(r,e){let t=TJ(r),i=OJ(r,e.ignore),n=t.filter(l=>Mc.pattern.isStaticPattern(l,e)),s=t.filter(l=>Mc.pattern.isDynamicPattern(l,e)),o=Wv(n,i,!1),a=Wv(s,i,!0);return o.concat(a)}Za.generate=H0e;function Wv(r,e,t){let i=MJ(r);return"."in i?[zv(".",r,e,t)]:KJ(i,e,t)}Za.convertPatternsToTasks=Wv;function TJ(r){return Mc.pattern.getPositivePatterns(r)}Za.getPositivePatterns=TJ;function OJ(r,e){return Mc.pattern.getNegativePatterns(r).concat(e).map(Mc.pattern.convertToPositivePattern)}Za.getNegativePatternsAsPositive=OJ;function MJ(r){let e={};return r.reduce((t,i)=>{let n=Mc.pattern.getBaseDirectory(i);return n in t?t[n].push(i):t[n]=[i],t},e)}Za.groupPatternsByBaseDirectory=MJ;function KJ(r,e,t){return Object.keys(r).map(i=>zv(i,r[i],e,t))}Za.convertPatternGroupsToTasks=KJ;function zv(r,e,t,i){return{dynamic:i,positive:e,negative:t,base:r,patterns:[].concat(e,t.map(Mc.pattern.convertToNegativePattern))}}Za.convertPatternGroupToTask=zv});var jJ=w(Ty=>{"use strict";Object.defineProperty(Ty,"__esModule",{value:!0});Ty.read=void 0;function j0e(r,e,t){e.fs.lstat(r,(i,n)=>{if(i!==null){HJ(t,i);return}if(!n.isSymbolicLink()||!e.followSymbolicLink){_v(t,n);return}e.fs.stat(r,(s,o)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){HJ(t,s);return}_v(t,n);return}e.markSymbolicLink&&(o.isSymbolicLink=()=>!0),_v(t,o)})})}Ty.read=j0e;function HJ(r,e){r(e)}function _v(r,e){r(null,e)}});var GJ=w(Oy=>{"use strict";Object.defineProperty(Oy,"__esModule",{value:!0});Oy.read=void 0;function G0e(r,e){let t=e.fs.lstatSync(r);if(!t.isSymbolicLink()||!e.followSymbolicLink)return t;try{let i=e.fs.statSync(r);return e.markSymbolicLink&&(i.isSymbolicLink=()=>!0),i}catch(i){if(!e.throwErrorOnBrokenSymbolicLink)return t;throw i}}Oy.read=G0e});var YJ=w(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.createFileSystemAdapter=rl.FILE_SYSTEM_ADAPTER=void 0;var My=require("fs");rl.FILE_SYSTEM_ADAPTER={lstat:My.lstat,stat:My.stat,lstatSync:My.lstatSync,statSync:My.statSync};function Y0e(r){return r===void 0?rl.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},rl.FILE_SYSTEM_ADAPTER),r)}rl.createFileSystemAdapter=Y0e});var JJ=w(Vv=>{"use strict";Object.defineProperty(Vv,"__esModule",{value:!0});var q0e=YJ(),qJ=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=q0e.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return e!=null?e:t}};Vv.default=qJ});var Kc=w(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});il.statSync=il.stat=il.Settings=void 0;var WJ=jJ(),J0e=GJ(),Xv=JJ();il.Settings=Xv.default;function W0e(r,e,t){if(typeof e=="function"){WJ.read(r,Zv(),e);return}WJ.read(r,Zv(e),t)}il.stat=W0e;function z0e(r,e){let t=Zv(e);return J0e.read(r,t)}il.statSync=z0e;function Zv(r={}){return r instanceof Xv.default?r:new Xv.default(r)}});var _J=w((ftt,zJ)=>{zJ.exports=_0e;function _0e(r,e){var t,i,n,s=!0;Array.isArray(r)?(t=[],i=r.length):(n=Object.keys(r),t={},i=n.length);function o(l){function c(){e&&e(l,t),e=null}s?process.nextTick(c):c()}function a(l,c,u){t[l]=u,(--i==0||c)&&o(c)}i?n?n.forEach(function(l){r[l](function(c,u){a(l,c,u)})}):r.forEach(function(l,c){l(function(u,g){a(c,u,g)})}):o(null),s=!1}});var $v=w(Ky=>{"use strict";Object.defineProperty(Ky,"__esModule",{value:!0});Ky.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var Uy=process.versions.node.split(".");if(Uy[0]===void 0||Uy[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var VJ=Number.parseInt(Uy[0],10),V0e=Number.parseInt(Uy[1],10),XJ=10,X0e=10,Z0e=VJ>XJ,$0e=VJ===XJ&&V0e>=X0e;Ky.IS_SUPPORT_READDIR_WITH_FILE_TYPES=Z0e||$0e});var $J=w(Hy=>{"use strict";Object.defineProperty(Hy,"__esModule",{value:!0});Hy.createDirentFromStats=void 0;var ZJ=class{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}};function ebe(r,e){return new ZJ(r,e)}Hy.createDirentFromStats=ebe});var ex=w(jy=>{"use strict";Object.defineProperty(jy,"__esModule",{value:!0});jy.fs=void 0;var tbe=$J();jy.fs=tbe});var tx=w(Gy=>{"use strict";Object.defineProperty(Gy,"__esModule",{value:!0});Gy.joinPathSegments=void 0;function rbe(r,e,t){return r.endsWith(t)?r+e:r+t+e}Gy.joinPathSegments=rbe});var s3=w(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.readdir=nl.readdirWithFileTypes=nl.read=void 0;var ibe=Kc(),e3=_J(),nbe=$v(),t3=ex(),r3=tx();function sbe(r,e,t){if(!e.stats&&nbe.IS_SUPPORT_READDIR_WITH_FILE_TYPES){i3(r,e,t);return}n3(r,e,t)}nl.read=sbe;function i3(r,e,t){e.fs.readdir(r,{withFileTypes:!0},(i,n)=>{if(i!==null){Yy(t,i);return}let s=n.map(a=>({dirent:a,name:a.name,path:r3.joinPathSegments(r,a.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){rx(t,s);return}let o=s.map(a=>obe(a,e));e3(o,(a,l)=>{if(a!==null){Yy(t,a);return}rx(t,l)})})}nl.readdirWithFileTypes=i3;function obe(r,e){return t=>{if(!r.dirent.isSymbolicLink()){t(null,r);return}e.fs.stat(r.path,(i,n)=>{if(i!==null){if(e.throwErrorOnBrokenSymbolicLink){t(i);return}t(null,r);return}r.dirent=t3.fs.createDirentFromStats(r.name,n),t(null,r)})}}function n3(r,e,t){e.fs.readdir(r,(i,n)=>{if(i!==null){Yy(t,i);return}let s=n.map(o=>{let a=r3.joinPathSegments(r,o,e.pathSegmentSeparator);return l=>{ibe.stat(a,e.fsStatSettings,(c,u)=>{if(c!==null){l(c);return}let g={name:o,path:a,dirent:t3.fs.createDirentFromStats(o,u)};e.stats&&(g.stats=u),l(null,g)})}});e3(s,(o,a)=>{if(o!==null){Yy(t,o);return}rx(t,a)})})}nl.readdir=n3;function Yy(r,e){r(e)}function rx(r,e){r(null,e)}});var c3=w(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});sl.readdir=sl.readdirWithFileTypes=sl.read=void 0;var abe=Kc(),Abe=$v(),o3=ex(),a3=tx();function lbe(r,e){return!e.stats&&Abe.IS_SUPPORT_READDIR_WITH_FILE_TYPES?A3(r,e):l3(r,e)}sl.read=lbe;function A3(r,e){return e.fs.readdirSync(r,{withFileTypes:!0}).map(i=>{let n={dirent:i,name:i.name,path:a3.joinPathSegments(r,i.name,e.pathSegmentSeparator)};if(n.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let s=e.fs.statSync(n.path);n.dirent=o3.fs.createDirentFromStats(n.name,s)}catch(s){if(e.throwErrorOnBrokenSymbolicLink)throw s}return n})}sl.readdirWithFileTypes=A3;function l3(r,e){return e.fs.readdirSync(r).map(i=>{let n=a3.joinPathSegments(r,i,e.pathSegmentSeparator),s=abe.statSync(n,e.fsStatSettings),o={name:i,path:n,dirent:o3.fs.createDirentFromStats(i,s)};return e.stats&&(o.stats=s),o})}sl.readdir=l3});var u3=w(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});ol.createFileSystemAdapter=ol.FILE_SYSTEM_ADAPTER=void 0;var Ug=require("fs");ol.FILE_SYSTEM_ADAPTER={lstat:Ug.lstat,stat:Ug.stat,lstatSync:Ug.lstatSync,statSync:Ug.statSync,readdir:Ug.readdir,readdirSync:Ug.readdirSync};function cbe(r){return r===void 0?ol.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},ol.FILE_SYSTEM_ADAPTER),r)}ol.createFileSystemAdapter=cbe});var f3=w(ix=>{"use strict";Object.defineProperty(ix,"__esModule",{value:!0});var ube=require("path"),gbe=Kc(),fbe=u3(),g3=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=fbe.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,ube.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new gbe.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return e!=null?e:t}};ix.default=g3});var qy=w(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.Settings=al.scandirSync=al.scandir=void 0;var h3=s3(),hbe=c3(),nx=f3();al.Settings=nx.default;function pbe(r,e,t){if(typeof e=="function"){h3.read(r,sx(),e);return}h3.read(r,sx(e),t)}al.scandir=pbe;function dbe(r,e){let t=sx(e);return hbe.read(r,t)}al.scandirSync=dbe;function sx(r={}){return r instanceof nx.default?r:new nx.default(r)}});var d3=w((Btt,p3)=>{"use strict";function Cbe(r){var e=new r,t=e;function i(){var s=e;return s.next?e=s.next:(e=new r,t=e),s.next=null,s}function n(s){t.next=s,t=s}return{get:i,release:n}}p3.exports=Cbe});var m3=w((btt,ox)=>{"use strict";var mbe=d3();function C3(r,e,t){if(typeof r=="function"&&(t=e,e=r,r=null),t<1)throw new Error("fastqueue concurrency must be greater than 1");var i=mbe(Ebe),n=null,s=null,o=0,a=null,l={push:m,drain:Vo,saturated:Vo,pause:u,paused:!1,concurrency:t,running:c,resume:h,idle:p,length:g,getQueue:f,unshift:y,empty:Vo,kill:v,killAndDrain:x,error:T};return l;function c(){return o}function u(){l.paused=!0}function g(){for(var q=n,Y=0;q;)q=q.next,Y++;return Y}function f(){for(var q=n,Y=[];q;)Y.push(q.value),q=q.next;return Y}function h(){if(!!l.paused){l.paused=!1;for(var q=0;q{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.joinPathSegments=Xo.replacePathSegmentSeparator=Xo.isAppliedFilter=Xo.isFatalError=void 0;function ybe(r,e){return r.errorFilter===null?!0:!r.errorFilter(e)}Xo.isFatalError=ybe;function wbe(r,e){return r===null||r(e)}Xo.isAppliedFilter=wbe;function Bbe(r,e){return r.split(/[/\\]/).join(e)}Xo.replacePathSegmentSeparator=Bbe;function bbe(r,e,t){return r===""?e:r.endsWith(t)?r+e:r+t+e}Xo.joinPathSegments=bbe});var Ax=w(ax=>{"use strict";Object.defineProperty(ax,"__esModule",{value:!0});var Qbe=Jy(),E3=class{constructor(e,t){this._root=e,this._settings=t,this._root=Qbe.replacePathSegmentSeparator(e,t.pathSegmentSeparator)}};ax.default=E3});var cx=w(lx=>{"use strict";Object.defineProperty(lx,"__esModule",{value:!0});var Sbe=require("events"),vbe=qy(),xbe=m3(),Wy=Jy(),kbe=Ax(),I3=class extends kbe.default{constructor(e,t){super(e,t);this._settings=t,this._scandir=vbe.scandir,this._emitter=new Sbe.EventEmitter,this._queue=xbe(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){let i={directory:e,base:t};this._queue.push(i,n=>{n!==null&&this._handleError(n)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(i,n)=>{if(i!==null){t(i,void 0);return}for(let s of n)this._handleEntry(s,e.base);t(null,void 0)})}_handleError(e){this._isDestroyed||!Wy.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;let i=e.path;t!==void 0&&(e.path=Wy.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),Wy.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&Wy.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(i,e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};lx.default=I3});var w3=w(ux=>{"use strict";Object.defineProperty(ux,"__esModule",{value:!0});var Pbe=cx(),y3=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new Pbe.default(this._root,this._settings),this._storage=new Set}read(e){this._reader.onError(t=>{Dbe(e,t)}),this._reader.onEntry(t=>{this._storage.add(t)}),this._reader.onEnd(()=>{Rbe(e,[...this._storage])}),this._reader.read()}};ux.default=y3;function Dbe(r,e){r(e)}function Rbe(r,e){r(null,e)}});var b3=w(gx=>{"use strict";Object.defineProperty(gx,"__esModule",{value:!0});var Fbe=require("stream"),Nbe=cx(),B3=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new Nbe.default(this._root,this._settings),this._stream=new Fbe.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};gx.default=B3});var S3=w(fx=>{"use strict";Object.defineProperty(fx,"__esModule",{value:!0});var Lbe=qy(),zy=Jy(),Tbe=Ax(),Q3=class extends Tbe.default{constructor(){super(...arguments);this._scandir=Lbe.scandirSync,this._storage=new Set,this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),[...this._storage]}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{let i=this._scandir(e,this._settings.fsScandirSettings);for(let n of i)this._handleEntry(n,t)}catch(i){this._handleError(i)}}_handleError(e){if(!!zy.isFatalError(this._settings,e))throw e}_handleEntry(e,t){let i=e.path;t!==void 0&&(e.path=zy.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),zy.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&zy.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(i,e.path)}_pushToStorage(e){this._storage.add(e)}};fx.default=Q3});var x3=w(hx=>{"use strict";Object.defineProperty(hx,"__esModule",{value:!0});var Obe=S3(),v3=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new Obe.default(this._root,this._settings)}read(){return this._reader.read()}};hx.default=v3});var P3=w(px=>{"use strict";Object.defineProperty(px,"__esModule",{value:!0});var Mbe=require("path"),Kbe=qy(),k3=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Mbe.sep),this.fsScandirSettings=new Kbe.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return e!=null?e:t}};px.default=k3});var Cx=w(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.Settings=Zo.walkStream=Zo.walkSync=Zo.walk=void 0;var D3=w3(),Ube=b3(),Hbe=x3(),dx=P3();Zo.Settings=dx.default;function jbe(r,e,t){if(typeof e=="function"){new D3.default(r,_y()).read(e);return}new D3.default(r,_y(e)).read(t)}Zo.walk=jbe;function Gbe(r,e){let t=_y(e);return new Hbe.default(r,t).read()}Zo.walkSync=Gbe;function Ybe(r,e){let t=_y(e);return new Ube.default(r,t).read()}Zo.walkStream=Ybe;function _y(r={}){return r instanceof dx.default?r:new dx.default(r)}});var Ex=w(mx=>{"use strict";Object.defineProperty(mx,"__esModule",{value:!0});var qbe=require("path"),Jbe=Kc(),R3=Xa(),F3=class{constructor(e){this._settings=e,this._fsStatSettings=new Jbe.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return qbe.resolve(this._settings.cwd,e)}_makeEntry(e,t){let i={name:t,path:t,dirent:R3.fs.createDirentFromStats(t,e)};return this._settings.stats&&(i.stats=e),i}_isFatalError(e){return!R3.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};mx.default=F3});var yx=w(Ix=>{"use strict";Object.defineProperty(Ix,"__esModule",{value:!0});var Wbe=require("stream"),zbe=Kc(),_be=Cx(),Vbe=Ex(),N3=class extends Vbe.default{constructor(){super(...arguments);this._walkStream=_be.walkStream,this._stat=zbe.stat}dynamic(e,t){return this._walkStream(e,t)}static(e,t){let i=e.map(this._getFullEntryPath,this),n=new Wbe.PassThrough({objectMode:!0});n._write=(s,o,a)=>this._getEntry(i[s],e[s],t).then(l=>{l!==null&&t.entryFilter(l)&&n.push(l),s===i.length-1&&n.end(),a()}).catch(a);for(let s=0;sthis._makeEntry(n,t)).catch(n=>{if(i.errorFilter(n))return null;throw n})}_getStat(e){return new Promise((t,i)=>{this._stat(e,this._fsStatSettings,(n,s)=>n===null?t(s):i(n))})}};Ix.default=N3});var T3=w(wx=>{"use strict";Object.defineProperty(wx,"__esModule",{value:!0});var Hg=Xa(),L3=class{constructor(e,t,i){this._patterns=e,this._settings=t,this._micromatchOptions=i,this._storage=[],this._fillStorage()}_fillStorage(){let e=Hg.pattern.expandPatternsWithBraceExpansion(this._patterns);for(let t of e){let i=this._getPatternSegments(t),n=this._splitSegmentsIntoSections(i);this._storage.push({complete:n.length<=1,pattern:t,segments:i,sections:n})}}_getPatternSegments(e){return Hg.pattern.getPatternParts(e,this._micromatchOptions).map(i=>Hg.pattern.isDynamicPattern(i,this._settings)?{dynamic:!0,pattern:i,patternRe:Hg.pattern.makeRe(i,this._micromatchOptions)}:{dynamic:!1,pattern:i})}_splitSegmentsIntoSections(e){return Hg.array.splitWhen(e,t=>t.dynamic&&Hg.pattern.hasGlobStar(t.pattern))}};wx.default=L3});var M3=w(Bx=>{"use strict";Object.defineProperty(Bx,"__esModule",{value:!0});var Xbe=T3(),O3=class extends Xbe.default{match(e){let t=e.split("/"),i=t.length,n=this._storage.filter(s=>!s.complete||s.segments.length>i);for(let s of n){let o=s.sections[0];if(!s.complete&&i>o.length||t.every((l,c)=>{let u=s.segments[c];return!!(u.dynamic&&u.patternRe.test(l)||!u.dynamic&&u.pattern===l)}))return!0}return!1}};Bx.default=O3});var U3=w(bx=>{"use strict";Object.defineProperty(bx,"__esModule",{value:!0});var Vy=Xa(),Zbe=M3(),K3=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,i){let n=this._getMatcher(t),s=this._getNegativePatternsRe(i);return o=>this._filter(e,o,n,s)}_getMatcher(e){return new Zbe.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let t=e.filter(Vy.pattern.isAffectDepthOfReadingPattern);return Vy.pattern.convertPatternsToRe(t,this._micromatchOptions)}_filter(e,t,i,n){let s=this._getEntryLevel(e,t.path);if(this._isSkippedByDeep(s)||this._isSkippedSymbolicLink(t))return!1;let o=Vy.path.removeLeadingDotSegment(t.path);return this._isSkippedByPositivePatterns(o,i)?!1:this._isSkippedByNegativePatterns(o,n)}_isSkippedByDeep(e){return e>=this._settings.deep}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_getEntryLevel(e,t){let i=e.split("/").length;return t.split("/").length-(e===""?0:i)}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(e,t){return!Vy.pattern.matchAny(e,t)}};bx.default=K3});var j3=w(Qx=>{"use strict";Object.defineProperty(Qx,"__esModule",{value:!0});var sd=Xa(),H3=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(e,t){let i=sd.pattern.convertPatternsToRe(e,this._micromatchOptions),n=sd.pattern.convertPatternsToRe(t,this._micromatchOptions);return s=>this._filter(s,i,n)}_filter(e,t,i){if(this._settings.unique){if(this._isDuplicateEntry(e))return!1;this._createIndexRecord(e)}if(this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(e,i))return!1;let n=this._settings.baseNameMatch?e.name:e.path;return this._isMatchToPatterns(n,t)&&!this._isMatchToPatterns(e.path,i)}_isDuplicateEntry(e){return this.index.has(e.path)}_createIndexRecord(e){this.index.set(e.path,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,t){if(!this._settings.absolute)return!1;let i=sd.path.makeAbsolute(this._settings.cwd,e.path);return this._isMatchToPatterns(i,t)}_isMatchToPatterns(e,t){let i=sd.path.removeLeadingDotSegment(e);return sd.pattern.matchAny(i,t)}};Qx.default=H3});var Y3=w(Sx=>{"use strict";Object.defineProperty(Sx,"__esModule",{value:!0});var $be=Xa(),G3=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return $be.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};Sx.default=G3});var W3=w(vx=>{"use strict";Object.defineProperty(vx,"__esModule",{value:!0});var q3=Xa(),J3=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let t=e.path;return this._settings.absolute&&(t=q3.path.makeAbsolute(this._settings.cwd,t),t=q3.path.unixify(t)),this._settings.markDirectories&&e.dirent.isDirectory()&&(t+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:t}):t}};vx.default=J3});var Xy=w(xx=>{"use strict";Object.defineProperty(xx,"__esModule",{value:!0});var eQe=require("path"),tQe=U3(),rQe=j3(),iQe=Y3(),nQe=W3(),z3=class{constructor(e){this._settings=e,this.errorFilter=new iQe.default(this._settings),this.entryFilter=new rQe.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new tQe.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new nQe.default(this._settings)}_getRootDirectory(e){return eQe.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let t=e.base==="."?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};xx.default=z3});var V3=w(kx=>{"use strict";Object.defineProperty(kx,"__esModule",{value:!0});var sQe=yx(),oQe=Xy(),_3=class extends oQe.default{constructor(){super(...arguments);this._reader=new sQe.default(this._settings)}read(e){let t=this._getRootDirectory(e),i=this._getReaderOptions(e),n=[];return new Promise((s,o)=>{let a=this.api(t,e,i);a.once("error",o),a.on("data",l=>n.push(i.transform(l))),a.once("end",()=>s(n))})}api(e,t,i){return t.dynamic?this._reader.dynamic(e,i):this._reader.static(t.patterns,i)}};kx.default=_3});var Z3=w(Px=>{"use strict";Object.defineProperty(Px,"__esModule",{value:!0});var aQe=require("stream"),AQe=yx(),lQe=Xy(),X3=class extends lQe.default{constructor(){super(...arguments);this._reader=new AQe.default(this._settings)}read(e){let t=this._getRootDirectory(e),i=this._getReaderOptions(e),n=this.api(t,e,i),s=new aQe.Readable({objectMode:!0,read:()=>{}});return n.once("error",o=>s.emit("error",o)).on("data",o=>s.emit("data",i.transform(o))).once("end",()=>s.emit("end")),s.once("close",()=>n.destroy()),s}api(e,t,i){return t.dynamic?this._reader.dynamic(e,i):this._reader.static(t.patterns,i)}};Px.default=X3});var eW=w(Dx=>{"use strict";Object.defineProperty(Dx,"__esModule",{value:!0});var cQe=Kc(),uQe=Cx(),gQe=Ex(),$3=class extends gQe.default{constructor(){super(...arguments);this._walkSync=uQe.walkSync,this._statSync=cQe.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){let i=[];for(let n of e){let s=this._getFullEntryPath(n),o=this._getEntry(s,n,t);o===null||!t.entryFilter(o)||i.push(o)}return i}_getEntry(e,t,i){try{let n=this._getStat(e);return this._makeEntry(n,t)}catch(n){if(i.errorFilter(n))return null;throw n}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};Dx.default=$3});var rW=w(Rx=>{"use strict";Object.defineProperty(Rx,"__esModule",{value:!0});var fQe=eW(),hQe=Xy(),tW=class extends hQe.default{constructor(){super(...arguments);this._reader=new fQe.default(this._settings)}read(e){let t=this._getRootDirectory(e),i=this._getReaderOptions(e);return this.api(t,e,i).map(i.transform)}api(e,t,i){return t.dynamic?this._reader.dynamic(e,i):this._reader.static(t.patterns,i)}};Rx.default=tW});var nW=w(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});var jg=require("fs"),pQe=require("os"),dQe=pQe.cpus().length;od.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:jg.lstat,lstatSync:jg.lstatSync,stat:jg.stat,statSync:jg.statSync,readdir:jg.readdir,readdirSync:jg.readdirSync};var iW=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,dQe),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,Infinity),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0)}_getValue(e,t){return e===void 0?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},od.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};od.default=iW});var Zy=w((ztt,sW)=>{"use strict";var oW=UJ(),CQe=V3(),mQe=Z3(),EQe=rW(),Fx=nW(),Uc=Xa();async function Lx(r,e){Gg(r);let t=Nx(r,CQe.default,e),i=await Promise.all(t);return Uc.array.flatten(i)}(function(r){function e(o,a){Gg(o);let l=Nx(o,EQe.default,a);return Uc.array.flatten(l)}r.sync=e;function t(o,a){Gg(o);let l=Nx(o,mQe.default,a);return Uc.stream.merge(l)}r.stream=t;function i(o,a){Gg(o);let l=[].concat(o),c=new Fx.default(a);return oW.generate(l,c)}r.generateTasks=i;function n(o,a){Gg(o);let l=new Fx.default(a);return Uc.pattern.isDynamicPattern(o,l)}r.isDynamicPattern=n;function s(o){return Gg(o),Uc.path.escape(o)}r.escapePath=s})(Lx||(Lx={}));function Nx(r,e,t){let i=[].concat(r),n=new Fx.default(t),s=oW.generate(i,n),o=new e(n);return s.map(o.read,o)}function Gg(r){if(![].concat(r).every(i=>Uc.string.isString(i)&&!Uc.string.isEmpty(i)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}sW.exports=Lx});var AW=w(Hc=>{"use strict";var{promisify:IQe}=require("util"),aW=require("fs");async function Tx(r,e,t){if(typeof t!="string")throw new TypeError(`Expected a string, got ${typeof t}`);try{return(await IQe(aW[r])(t))[e]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}function Ox(r,e,t){if(typeof t!="string")throw new TypeError(`Expected a string, got ${typeof t}`);try{return aW[r](t)[e]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}Hc.isFile=Tx.bind(null,"stat","isFile");Hc.isDirectory=Tx.bind(null,"stat","isDirectory");Hc.isSymlink=Tx.bind(null,"lstat","isSymbolicLink");Hc.isFileSync=Ox.bind(null,"statSync","isFile");Hc.isDirectorySync=Ox.bind(null,"statSync","isDirectory");Hc.isSymlinkSync=Ox.bind(null,"lstatSync","isSymbolicLink")});var fW=w((Vtt,Mx)=>{"use strict";var jc=require("path"),lW=AW(),cW=r=>r.length>1?`{${r.join(",")}}`:r[0],uW=(r,e)=>{let t=r[0]==="!"?r.slice(1):r;return jc.isAbsolute(t)?t:jc.join(e,t)},yQe=(r,e)=>jc.extname(r)?`**/${r}`:`**/${r}.${cW(e)}`,gW=(r,e)=>{if(e.files&&!Array.isArray(e.files))throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof e.files}\``);if(e.extensions&&!Array.isArray(e.extensions))throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof e.extensions}\``);return e.files&&e.extensions?e.files.map(t=>jc.posix.join(r,yQe(t,e.extensions))):e.files?e.files.map(t=>jc.posix.join(r,`**/${t}`)):e.extensions?[jc.posix.join(r,`**/*.${cW(e.extensions)}`)]:[jc.posix.join(r,"**")]};Mx.exports=async(r,e)=>{if(e=N({cwd:process.cwd()},e),typeof e.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof e.cwd}\``);let t=await Promise.all([].concat(r).map(async i=>await lW.isDirectory(uW(i,e.cwd))?gW(i,e):i));return[].concat.apply([],t)};Mx.exports.sync=(r,e)=>{if(e=N({cwd:process.cwd()},e),typeof e.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof e.cwd}\``);let t=[].concat(r).map(i=>lW.isDirectorySync(uW(i,e.cwd))?gW(i,e):i);return[].concat.apply([],t)}});var BW=w((Xtt,hW)=>{function pW(r){return Array.isArray(r)?r:[r]}var dW="",CW=" ",Kx="\\",wQe=/^\s+$/,BQe=/^\\!/,bQe=/^\\#/,QQe=/\r?\n/g,SQe=/^\.*\/|^\.+$/,Ux="/",mW=typeof Symbol!="undefined"?Symbol.for("node-ignore"):"node-ignore",vQe=(r,e,t)=>Object.defineProperty(r,e,{value:t}),xQe=/([0-z])-([0-z])/g,kQe=r=>r.replace(xQe,(e,t,i)=>t.charCodeAt(0)<=i.charCodeAt(0)?e:dW),PQe=r=>{let{length:e}=r;return r.slice(0,e-e%2)},DQe=[[/\\?\s+$/,r=>r.indexOf("\\")===0?CW:dW],[/\\\s/g,()=>CW],[/[\\$.|*+(){^]/g,r=>`\\${r}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(r,e,t)=>e+6`${e}[^\\/]*`],[/\\\\\\(?=[$.|*+(){^])/g,()=>Kx],[/\\\\/g,()=>Kx],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(r,e,t,i,n)=>e===Kx?`\\[${t}${PQe(i)}${n}`:n==="]"&&i.length%2==0?`[${kQe(t)}${i}]`:"[]"],[/(?:[^*])$/,r=>/\/$/.test(r)?`${r}$`:`${r}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(r,e)=>`${e?`${e}[^/]+`:"[^/]*"}(?=$|\\/$)`]],EW=Object.create(null),RQe=(r,e)=>{let t=EW[r];return t||(t=DQe.reduce((i,n)=>i.replace(n[0],n[1].bind(r)),r),EW[r]=t),e?new RegExp(t,"i"):new RegExp(t)},Hx=r=>typeof r=="string",FQe=r=>r&&Hx(r)&&!wQe.test(r)&&r.indexOf("#")!==0,NQe=r=>r.split(QQe),IW=class{constructor(e,t,i,n){this.origin=e,this.pattern=t,this.negative=i,this.regex=n}},LQe=(r,e)=>{let t=r,i=!1;r.indexOf("!")===0&&(i=!0,r=r.substr(1)),r=r.replace(BQe,"!").replace(bQe,"#");let n=RQe(r,e);return new IW(t,r,i,n)},TQe=(r,e)=>{throw new e(r)},$a=(r,e,t)=>Hx(r)?r?$a.isNotRelative(r)?t(`path should be a \`path.relative()\`d string, but got "${e}"`,RangeError):!0:t("path must not be empty",TypeError):t(`path must be a string, but got \`${e}\``,TypeError),yW=r=>SQe.test(r);$a.isNotRelative=yW;$a.convert=r=>r;var wW=class{constructor({ignorecase:e=!0}={}){vQe(this,mW,!0),this._rules=[],this._ignorecase=e,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[mW]){this._rules=this._rules.concat(e._rules),this._added=!0;return}if(FQe(e)){let t=LQe(e,this._ignorecase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,pW(Hx(e)?NQe(e):e).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,t){let i=!1,n=!1;return this._rules.forEach(s=>{let{negative:o}=s;if(n===o&&i!==n||o&&!i&&!n&&!t)return;s.regex.test(e)&&(i=!o,n=o)}),{ignored:i,unignored:n}}_test(e,t,i,n){let s=e&&$a.convert(e);return $a(s,e,TQe),this._t(s,t,i,n)}_t(e,t,i,n){if(e in t)return t[e];if(n||(n=e.split(Ux)),n.pop(),!n.length)return t[e]=this._testOne(e,i);let s=this._t(n.join(Ux)+Ux,t,i,n);return t[e]=s.ignored?s:this._testOne(e,i)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return pW(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}},$y=r=>new wW(r),OQe=()=>!1,MQe=r=>$a(r&&$a.convert(r),r,OQe);$y.isPathValid=MQe;$y.default=$y;hW.exports=$y;if(typeof process!="undefined"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let r=t=>/^\\\\\?\\/.test(t)||/["<>|\u0000-\u001F]+/u.test(t)?t:t.replace(/\\/g,"/");$a.convert=r;let e=/^[a-z]:\//i;$a.isNotRelative=t=>e.test(t)||yW(t)}});var QW=w((Ztt,bW)=>{"use strict";bW.exports=r=>{let e=/^\\\\\?\\/.test(r),t=/[^\u0000-\u0080]+/.test(r);return e||t?r:r.replace(/\\/g,"/")}});var RW=w(($tt,jx)=>{"use strict";var{promisify:KQe}=require("util"),SW=require("fs"),eA=require("path"),vW=Zy(),UQe=BW(),ad=QW(),xW=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"],HQe=KQe(SW.readFile),jQe=r=>e=>e.startsWith("!")?"!"+eA.posix.join(r,e.slice(1)):eA.posix.join(r,e),GQe=(r,e)=>{let t=ad(eA.relative(e.cwd,eA.dirname(e.fileName)));return r.split(/\r?\n/).filter(Boolean).filter(i=>!i.startsWith("#")).map(jQe(t))},kW=r=>{let e=UQe();for(let t of r)e.add(GQe(t.content,{cwd:t.cwd,fileName:t.filePath}));return e},YQe=(r,e)=>{if(r=ad(r),eA.isAbsolute(e)){if(ad(e).startsWith(r))return e;throw new Error(`Path ${e} is not in cwd ${r}`)}return eA.join(r,e)},PW=(r,e)=>t=>r.ignores(ad(eA.relative(e,YQe(e,t.path||t)))),qQe=async(r,e)=>{let t=eA.join(e,r),i=await HQe(t,"utf8");return{cwd:e,filePath:t,content:i}},JQe=(r,e)=>{let t=eA.join(e,r),i=SW.readFileSync(t,"utf8");return{cwd:e,filePath:t,content:i}},DW=({ignore:r=[],cwd:e=ad(process.cwd())}={})=>({ignore:r,cwd:e});jx.exports=async r=>{r=DW(r);let e=await vW("**/.gitignore",{ignore:xW.concat(r.ignore),cwd:r.cwd}),t=await Promise.all(e.map(n=>qQe(n,r.cwd))),i=kW(t);return PW(i,r.cwd)};jx.exports.sync=r=>{r=DW(r);let t=vW.sync("**/.gitignore",{ignore:xW.concat(r.ignore),cwd:r.cwd}).map(n=>JQe(n,r.cwd)),i=kW(t);return PW(i,r.cwd)}});var TW=w((ert,FW)=>{"use strict";var{Transform:WQe}=require("stream"),Gx=class extends WQe{constructor(){super({objectMode:!0})}},NW=class extends Gx{constructor(e){super();this._filter=e}_transform(e,t,i){this._filter(e)&&this.push(e),i()}},LW=class extends Gx{constructor(){super();this._pushed=new Set}_transform(e,t,i){this._pushed.has(e)||(this.push(e),this._pushed.add(e)),i()}};FW.exports={FilterStream:NW,UniqueStream:LW}});var Wx=w((trt,Gc)=>{"use strict";var OW=require("fs"),ew=AJ(),zQe=jv(),tw=Zy(),rw=fW(),Yx=RW(),{FilterStream:_Qe,UniqueStream:VQe}=TW(),MW=()=>!1,KW=r=>r[0]==="!",XQe=r=>{if(!r.every(e=>typeof e=="string"))throw new TypeError("Patterns must be a string or an array of strings")},ZQe=(r={})=>{if(!r.cwd)return;let e;try{e=OW.statSync(r.cwd)}catch{return}if(!e.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},$Qe=r=>r.stats instanceof OW.Stats?r.path:r,iw=(r,e)=>{r=ew([].concat(r)),XQe(r),ZQe(e);let t=[];e=N({ignore:[],expandDirectories:!0},e);for(let[i,n]of r.entries()){if(KW(n))continue;let s=r.slice(i).filter(a=>KW(a)).map(a=>a.slice(1)),o=te(N({},e),{ignore:e.ignore.concat(s)});t.push({pattern:n,options:o})}return t},eSe=(r,e)=>{let t={};return r.options.cwd&&(t.cwd=r.options.cwd),Array.isArray(r.options.expandDirectories)?t=te(N({},t),{files:r.options.expandDirectories}):typeof r.options.expandDirectories=="object"&&(t=N(N({},t),r.options.expandDirectories)),e(r.pattern,t)},qx=(r,e)=>r.options.expandDirectories?eSe(r,e):[r.pattern],UW=r=>r&&r.gitignore?Yx.sync({cwd:r.cwd,ignore:r.ignore}):MW,Jx=r=>e=>{let{options:t}=r;return t.ignore&&Array.isArray(t.ignore)&&t.expandDirectories&&(t.ignore=rw.sync(t.ignore)),{pattern:e,options:t}};Gc.exports=async(r,e)=>{let t=iw(r,e),i=async()=>e&&e.gitignore?Yx({cwd:e.cwd,ignore:e.ignore}):MW,n=async()=>{let l=await Promise.all(t.map(async c=>{let u=await qx(c,rw);return Promise.all(u.map(Jx(c)))}));return ew(...l)},[s,o]=await Promise.all([i(),n()]),a=await Promise.all(o.map(l=>tw(l.pattern,l.options)));return ew(...a).filter(l=>!s($Qe(l)))};Gc.exports.sync=(r,e)=>{let t=iw(r,e),i=[];for(let o of t){let a=qx(o,rw.sync).map(Jx(o));i.push(...a)}let n=UW(e),s=[];for(let o of i)s=ew(s,tw.sync(o.pattern,o.options));return s.filter(o=>!n(o))};Gc.exports.stream=(r,e)=>{let t=iw(r,e),i=[];for(let a of t){let l=qx(a,rw.sync).map(Jx(a));i.push(...l)}let n=UW(e),s=new _Qe(a=>!n(a)),o=new VQe;return zQe(i.map(a=>tw.stream(a.pattern,a.options))).pipe(s).pipe(o)};Gc.exports.generateGlobTasks=iw;Gc.exports.hasMagic=(r,e)=>[].concat(r).some(t=>tw.isDynamicPattern(t,e));Gc.exports.gitignore=Yx});var Rn=w((xrt,t4)=>{function fSe(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}t4.exports=fSe});var rk=w((krt,r4)=>{var hSe=typeof global=="object"&&global&&global.Object===Object&&global;r4.exports=hSe});var Ns=w((Prt,i4)=>{var pSe=rk(),dSe=typeof self=="object"&&self&&self.Object===Object&&self,CSe=pSe||dSe||Function("return this")();i4.exports=CSe});var s4=w((Drt,n4)=>{var mSe=Ns(),ESe=function(){return mSe.Date.now()};n4.exports=ESe});var a4=w((Rrt,o4)=>{var ISe=/\s/;function ySe(r){for(var e=r.length;e--&&ISe.test(r.charAt(e)););return e}o4.exports=ySe});var l4=w((Frt,A4)=>{var wSe=a4(),BSe=/^\s+/;function bSe(r){return r&&r.slice(0,wSe(r)+1).replace(BSe,"")}A4.exports=bSe});var Jc=w((Nrt,c4)=>{var QSe=Ns(),SSe=QSe.Symbol;c4.exports=SSe});var h4=w((Lrt,u4)=>{var g4=Jc(),f4=Object.prototype,vSe=f4.hasOwnProperty,xSe=f4.toString,Ed=g4?g4.toStringTag:void 0;function kSe(r){var e=vSe.call(r,Ed),t=r[Ed];try{r[Ed]=void 0;var i=!0}catch(s){}var n=xSe.call(r);return i&&(e?r[Ed]=t:delete r[Ed]),n}u4.exports=kSe});var d4=w((Trt,p4)=>{var PSe=Object.prototype,DSe=PSe.toString;function RSe(r){return DSe.call(r)}p4.exports=RSe});var Wc=w((Ort,C4)=>{var m4=Jc(),FSe=h4(),NSe=d4(),LSe="[object Null]",TSe="[object Undefined]",E4=m4?m4.toStringTag:void 0;function OSe(r){return r==null?r===void 0?TSe:LSe:E4&&E4 in Object(r)?FSe(r):NSe(r)}C4.exports=OSe});var ta=w((Mrt,I4)=>{function MSe(r){return r!=null&&typeof r=="object"}I4.exports=MSe});var Id=w((Krt,y4)=>{var KSe=Wc(),USe=ta(),HSe="[object Symbol]";function jSe(r){return typeof r=="symbol"||USe(r)&&KSe(r)==HSe}y4.exports=jSe});var Q4=w((Urt,w4)=>{var GSe=l4(),B4=Rn(),YSe=Id(),b4=0/0,qSe=/^[-+]0x[0-9a-f]+$/i,JSe=/^0b[01]+$/i,WSe=/^0o[0-7]+$/i,zSe=parseInt;function _Se(r){if(typeof r=="number")return r;if(YSe(r))return b4;if(B4(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=B4(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=GSe(r);var t=JSe.test(r);return t||WSe.test(r)?zSe(r.slice(2),t?2:8):qSe.test(r)?b4:+r}w4.exports=_Se});var x4=w((Hrt,S4)=>{var VSe=Rn(),ik=s4(),v4=Q4(),XSe="Expected a function",ZSe=Math.max,$Se=Math.min;function eve(r,e,t){var i,n,s,o,a,l,c=0,u=!1,g=!1,f=!0;if(typeof r!="function")throw new TypeError(XSe);e=v4(e)||0,VSe(t)&&(u=!!t.leading,g="maxWait"in t,s=g?ZSe(v4(t.maxWait)||0,e):s,f="trailing"in t?!!t.trailing:f);function h(Y){var $=i,_=n;return i=n=void 0,c=Y,o=r.apply(_,$),o}function p(Y){return c=Y,a=setTimeout(b,e),u?h(Y):o}function m(Y){var $=Y-l,_=Y-c,ne=e-$;return g?$Se(ne,s-_):ne}function y(Y){var $=Y-l,_=Y-c;return l===void 0||$>=e||$<0||g&&_>=s}function b(){var Y=ik();if(y(Y))return v(Y);a=setTimeout(b,m(Y))}function v(Y){return a=void 0,f&&i?h(Y):(i=n=void 0,o)}function x(){a!==void 0&&clearTimeout(a),c=0,i=l=n=a=void 0}function T(){return a===void 0?o:v(ik())}function q(){var Y=ik(),$=y(Y);if(i=arguments,n=this,l=Y,$){if(a===void 0)return p(l);if(g)return clearTimeout(a),a=setTimeout(b,e),h(l)}return a===void 0&&(a=setTimeout(b,e)),o}return q.cancel=x,q.flush=T,q}S4.exports=eve});var P4=w((jrt,k4)=>{var tve=x4(),rve=Rn(),ive="Expected a function";function nve(r,e,t){var i=!0,n=!0;if(typeof r!="function")throw new TypeError(ive);return rve(t)&&(i="leading"in t?!!t.leading:i,n="trailing"in t?!!t.trailing:n),tve(r,e,{leading:i,maxWait:e,trailing:n})}k4.exports=nve});var iA=w((rA,Bw)=>{"use strict";Object.defineProperty(rA,"__esModule",{value:!0});var M4=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function Cve(r){return M4.includes(r)}var mve=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...M4];function Eve(r){return mve.includes(r)}var Ive=["null","undefined","string","number","bigint","boolean","symbol"];function yve(r){return Ive.includes(r)}function Xg(r){return e=>typeof e===r}var{toString:K4}=Object.prototype,vd=r=>{let e=K4.call(r).slice(8,-1);if(/HTML\w+Element/.test(e)&&W.domElement(r))return"HTMLElement";if(Eve(e))return e},hr=r=>e=>vd(e)===r;function W(r){if(r===null)return"null";switch(typeof r){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(W.observable(r))return"Observable";if(W.array(r))return"Array";if(W.buffer(r))return"Buffer";let e=vd(r);if(e)return e;if(r instanceof String||r instanceof Boolean||r instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}W.undefined=Xg("undefined");W.string=Xg("string");var wve=Xg("number");W.number=r=>wve(r)&&!W.nan(r);W.bigint=Xg("bigint");W.function_=Xg("function");W.null_=r=>r===null;W.class_=r=>W.function_(r)&&r.toString().startsWith("class ");W.boolean=r=>r===!0||r===!1;W.symbol=Xg("symbol");W.numericString=r=>W.string(r)&&!W.emptyStringOrWhitespace(r)&&!Number.isNaN(Number(r));W.array=(r,e)=>Array.isArray(r)?W.function_(e)?r.every(e):!0:!1;W.buffer=r=>{var e,t,i,n;return(n=(i=(t=(e=r)===null||e===void 0?void 0:e.constructor)===null||t===void 0?void 0:t.isBuffer)===null||i===void 0?void 0:i.call(t,r))!==null&&n!==void 0?n:!1};W.nullOrUndefined=r=>W.null_(r)||W.undefined(r);W.object=r=>!W.null_(r)&&(typeof r=="object"||W.function_(r));W.iterable=r=>{var e;return W.function_((e=r)===null||e===void 0?void 0:e[Symbol.iterator])};W.asyncIterable=r=>{var e;return W.function_((e=r)===null||e===void 0?void 0:e[Symbol.asyncIterator])};W.generator=r=>W.iterable(r)&&W.function_(r.next)&&W.function_(r.throw);W.asyncGenerator=r=>W.asyncIterable(r)&&W.function_(r.next)&&W.function_(r.throw);W.nativePromise=r=>hr("Promise")(r);var Bve=r=>{var e,t;return W.function_((e=r)===null||e===void 0?void 0:e.then)&&W.function_((t=r)===null||t===void 0?void 0:t.catch)};W.promise=r=>W.nativePromise(r)||Bve(r);W.generatorFunction=hr("GeneratorFunction");W.asyncGeneratorFunction=r=>vd(r)==="AsyncGeneratorFunction";W.asyncFunction=r=>vd(r)==="AsyncFunction";W.boundFunction=r=>W.function_(r)&&!r.hasOwnProperty("prototype");W.regExp=hr("RegExp");W.date=hr("Date");W.error=hr("Error");W.map=r=>hr("Map")(r);W.set=r=>hr("Set")(r);W.weakMap=r=>hr("WeakMap")(r);W.weakSet=r=>hr("WeakSet")(r);W.int8Array=hr("Int8Array");W.uint8Array=hr("Uint8Array");W.uint8ClampedArray=hr("Uint8ClampedArray");W.int16Array=hr("Int16Array");W.uint16Array=hr("Uint16Array");W.int32Array=hr("Int32Array");W.uint32Array=hr("Uint32Array");W.float32Array=hr("Float32Array");W.float64Array=hr("Float64Array");W.bigInt64Array=hr("BigInt64Array");W.bigUint64Array=hr("BigUint64Array");W.arrayBuffer=hr("ArrayBuffer");W.sharedArrayBuffer=hr("SharedArrayBuffer");W.dataView=hr("DataView");W.directInstanceOf=(r,e)=>Object.getPrototypeOf(r)===e.prototype;W.urlInstance=r=>hr("URL")(r);W.urlString=r=>{if(!W.string(r))return!1;try{return new URL(r),!0}catch(e){return!1}};W.truthy=r=>Boolean(r);W.falsy=r=>!r;W.nan=r=>Number.isNaN(r);W.primitive=r=>W.null_(r)||yve(typeof r);W.integer=r=>Number.isInteger(r);W.safeInteger=r=>Number.isSafeInteger(r);W.plainObject=r=>{if(K4.call(r)!=="[object Object]")return!1;let e=Object.getPrototypeOf(r);return e===null||e===Object.getPrototypeOf({})};W.typedArray=r=>Cve(vd(r));var bve=r=>W.safeInteger(r)&&r>=0;W.arrayLike=r=>!W.nullOrUndefined(r)&&!W.function_(r)&&bve(r.length);W.inRange=(r,e)=>{if(W.number(e))return r>=Math.min(0,e)&&r<=Math.max(e,0);if(W.array(e)&&e.length===2)return r>=Math.min(...e)&&r<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var Qve=1,Sve=["innerHTML","ownerDocument","style","attributes","nodeValue"];W.domElement=r=>W.object(r)&&r.nodeType===Qve&&W.string(r.nodeName)&&!W.plainObject(r)&&Sve.every(e=>e in r);W.observable=r=>{var e,t,i,n;return r?r===((t=(e=r)[Symbol.observable])===null||t===void 0?void 0:t.call(e))||r===((n=(i=r)["@@observable"])===null||n===void 0?void 0:n.call(i)):!1};W.nodeStream=r=>W.object(r)&&W.function_(r.pipe)&&!W.observable(r);W.infinite=r=>r===Infinity||r===-Infinity;var U4=r=>e=>W.integer(e)&&Math.abs(e%2)===r;W.evenInteger=U4(0);W.oddInteger=U4(1);W.emptyArray=r=>W.array(r)&&r.length===0;W.nonEmptyArray=r=>W.array(r)&&r.length>0;W.emptyString=r=>W.string(r)&&r.length===0;W.nonEmptyString=r=>W.string(r)&&r.length>0;var vve=r=>W.string(r)&&!/\S/.test(r);W.emptyStringOrWhitespace=r=>W.emptyString(r)||vve(r);W.emptyObject=r=>W.object(r)&&!W.map(r)&&!W.set(r)&&Object.keys(r).length===0;W.nonEmptyObject=r=>W.object(r)&&!W.map(r)&&!W.set(r)&&Object.keys(r).length>0;W.emptySet=r=>W.set(r)&&r.size===0;W.nonEmptySet=r=>W.set(r)&&r.size>0;W.emptyMap=r=>W.map(r)&&r.size===0;W.nonEmptyMap=r=>W.map(r)&&r.size>0;W.propertyKey=r=>W.any([W.string,W.number,W.symbol],r);W.formData=r=>hr("FormData")(r);W.urlSearchParams=r=>hr("URLSearchParams")(r);var H4=(r,e,t)=>{if(!W.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(t.length===0)throw new TypeError("Invalid number of values");return r.call(t,e)};W.any=(r,...e)=>(W.array(r)?r:[r]).some(i=>H4(Array.prototype.some,i,e));W.all=(r,...e)=>H4(Array.prototype.every,r,e);var We=(r,e,t,i={})=>{if(!r){let{multipleValues:n}=i,s=n?`received values of types ${[...new Set(t.map(o=>`\`${W(o)}\``))].join(", ")}`:`received value of type \`${W(t)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${s}.`)}};rA.assert={undefined:r=>We(W.undefined(r),"undefined",r),string:r=>We(W.string(r),"string",r),number:r=>We(W.number(r),"number",r),bigint:r=>We(W.bigint(r),"bigint",r),function_:r=>We(W.function_(r),"Function",r),null_:r=>We(W.null_(r),"null",r),class_:r=>We(W.class_(r),"Class",r),boolean:r=>We(W.boolean(r),"boolean",r),symbol:r=>We(W.symbol(r),"symbol",r),numericString:r=>We(W.numericString(r),"string with a number",r),array:(r,e)=>{We(W.array(r),"Array",r),e&&r.forEach(e)},buffer:r=>We(W.buffer(r),"Buffer",r),nullOrUndefined:r=>We(W.nullOrUndefined(r),"null or undefined",r),object:r=>We(W.object(r),"Object",r),iterable:r=>We(W.iterable(r),"Iterable",r),asyncIterable:r=>We(W.asyncIterable(r),"AsyncIterable",r),generator:r=>We(W.generator(r),"Generator",r),asyncGenerator:r=>We(W.asyncGenerator(r),"AsyncGenerator",r),nativePromise:r=>We(W.nativePromise(r),"native Promise",r),promise:r=>We(W.promise(r),"Promise",r),generatorFunction:r=>We(W.generatorFunction(r),"GeneratorFunction",r),asyncGeneratorFunction:r=>We(W.asyncGeneratorFunction(r),"AsyncGeneratorFunction",r),asyncFunction:r=>We(W.asyncFunction(r),"AsyncFunction",r),boundFunction:r=>We(W.boundFunction(r),"Function",r),regExp:r=>We(W.regExp(r),"RegExp",r),date:r=>We(W.date(r),"Date",r),error:r=>We(W.error(r),"Error",r),map:r=>We(W.map(r),"Map",r),set:r=>We(W.set(r),"Set",r),weakMap:r=>We(W.weakMap(r),"WeakMap",r),weakSet:r=>We(W.weakSet(r),"WeakSet",r),int8Array:r=>We(W.int8Array(r),"Int8Array",r),uint8Array:r=>We(W.uint8Array(r),"Uint8Array",r),uint8ClampedArray:r=>We(W.uint8ClampedArray(r),"Uint8ClampedArray",r),int16Array:r=>We(W.int16Array(r),"Int16Array",r),uint16Array:r=>We(W.uint16Array(r),"Uint16Array",r),int32Array:r=>We(W.int32Array(r),"Int32Array",r),uint32Array:r=>We(W.uint32Array(r),"Uint32Array",r),float32Array:r=>We(W.float32Array(r),"Float32Array",r),float64Array:r=>We(W.float64Array(r),"Float64Array",r),bigInt64Array:r=>We(W.bigInt64Array(r),"BigInt64Array",r),bigUint64Array:r=>We(W.bigUint64Array(r),"BigUint64Array",r),arrayBuffer:r=>We(W.arrayBuffer(r),"ArrayBuffer",r),sharedArrayBuffer:r=>We(W.sharedArrayBuffer(r),"SharedArrayBuffer",r),dataView:r=>We(W.dataView(r),"DataView",r),urlInstance:r=>We(W.urlInstance(r),"URL",r),urlString:r=>We(W.urlString(r),"string with a URL",r),truthy:r=>We(W.truthy(r),"truthy",r),falsy:r=>We(W.falsy(r),"falsy",r),nan:r=>We(W.nan(r),"NaN",r),primitive:r=>We(W.primitive(r),"primitive",r),integer:r=>We(W.integer(r),"integer",r),safeInteger:r=>We(W.safeInteger(r),"integer",r),plainObject:r=>We(W.plainObject(r),"plain object",r),typedArray:r=>We(W.typedArray(r),"TypedArray",r),arrayLike:r=>We(W.arrayLike(r),"array-like",r),domElement:r=>We(W.domElement(r),"HTMLElement",r),observable:r=>We(W.observable(r),"Observable",r),nodeStream:r=>We(W.nodeStream(r),"Node.js Stream",r),infinite:r=>We(W.infinite(r),"infinite number",r),emptyArray:r=>We(W.emptyArray(r),"empty array",r),nonEmptyArray:r=>We(W.nonEmptyArray(r),"non-empty array",r),emptyString:r=>We(W.emptyString(r),"empty string",r),nonEmptyString:r=>We(W.nonEmptyString(r),"non-empty string",r),emptyStringOrWhitespace:r=>We(W.emptyStringOrWhitespace(r),"empty string or whitespace",r),emptyObject:r=>We(W.emptyObject(r),"empty object",r),nonEmptyObject:r=>We(W.nonEmptyObject(r),"non-empty object",r),emptySet:r=>We(W.emptySet(r),"empty set",r),nonEmptySet:r=>We(W.nonEmptySet(r),"non-empty set",r),emptyMap:r=>We(W.emptyMap(r),"empty map",r),nonEmptyMap:r=>We(W.nonEmptyMap(r),"non-empty map",r),propertyKey:r=>We(W.propertyKey(r),"PropertyKey",r),formData:r=>We(W.formData(r),"FormData",r),urlSearchParams:r=>We(W.urlSearchParams(r),"URLSearchParams",r),evenInteger:r=>We(W.evenInteger(r),"even integer",r),oddInteger:r=>We(W.oddInteger(r),"odd integer",r),directInstanceOf:(r,e)=>We(W.directInstanceOf(r,e),"T",r),inRange:(r,e)=>We(W.inRange(r,e),"in range",r),any:(r,...e)=>We(W.any(r,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),all:(r,...e)=>We(W.all(r,...e),"predicate returns truthy for all values",e,{multipleValues:!0})};Object.defineProperties(W,{class:{value:W.class_},function:{value:W.function_},null:{value:W.null_}});Object.defineProperties(rA.assert,{class:{value:rA.assert.class_},function:{value:rA.assert.function_},null:{value:rA.assert.null_}});rA.default=W;Bw.exports=W;Bw.exports.default=W;Bw.exports.assert=rA.assert});var j4=w((Wit,Bk)=>{"use strict";var bk=class extends Error{constructor(e){super(e||"Promise was canceled");this.name="CancelError"}get isCanceled(){return!0}},xd=class{static fn(e){return(...t)=>new xd((i,n,s)=>{t.push(s),e(...t).then(i,n)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((t,i)=>{this._reject=i;let n=a=>{this._isPending=!1,t(a)},s=a=>{this._isPending=!1,i(a)},o=a=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(a)};return Object.defineProperties(o,{shouldReject:{get:()=>this._rejectOnCancel,set:a=>{this._rejectOnCancel=a}}}),e(n,s,o)})}then(e,t){return this._promise.then(e,t)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._cancelHandlers.length>0)try{for(let t of this._cancelHandlers)t()}catch(t){this._reject(t)}this._isCanceled=!0,this._rejectOnCancel&&this._reject(new bk(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(xd.prototype,Promise.prototype);Bk.exports=xd;Bk.exports.CancelError=bk});var G4=w((Qk,Sk)=>{"use strict";Object.defineProperty(Qk,"__esModule",{value:!0});var xve=require("tls"),vk=(r,e)=>{let t;typeof e=="function"?t={connect:e}:t=e;let i=typeof t.connect=="function",n=typeof t.secureConnect=="function",s=typeof t.close=="function",o=()=>{i&&t.connect(),r instanceof xve.TLSSocket&&n&&(r.authorized?t.secureConnect():r.authorizationError||r.once("secureConnect",t.secureConnect)),s&&r.once("close",t.close)};r.writable&&!r.connecting?o():r.connecting?r.once("connect",o):r.destroyed&&s&&t.close(r._hadError)};Qk.default=vk;Sk.exports=vk;Sk.exports.default=vk});var Y4=w((xk,kk)=>{"use strict";Object.defineProperty(xk,"__esModule",{value:!0});var kve=G4(),Pve=Number(process.versions.node.split(".")[0]),Pk=r=>{let e={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};r.timings=e;let t=o=>{let a=o.emit.bind(o);o.emit=(l,...c)=>(l==="error"&&(e.error=Date.now(),e.phases.total=e.error-e.start,o.emit=a),a(l,...c))};t(r),r.prependOnceListener("abort",()=>{e.abort=Date.now(),(!e.response||Pve>=13)&&(e.phases.total=Date.now()-e.start)});let i=o=>{e.socket=Date.now(),e.phases.wait=e.socket-e.start;let a=()=>{e.lookup=Date.now(),e.phases.dns=e.lookup-e.socket};o.prependOnceListener("lookup",a),kve.default(o,{connect:()=>{e.connect=Date.now(),e.lookup===void 0&&(o.removeListener("lookup",a),e.lookup=e.connect,e.phases.dns=e.lookup-e.socket),e.phases.tcp=e.connect-e.lookup},secureConnect:()=>{e.secureConnect=Date.now(),e.phases.tls=e.secureConnect-e.connect}})};r.socket?i(r.socket):r.prependOnceListener("socket",i);let n=()=>{var o;e.upload=Date.now(),e.phases.request=e.upload-(o=e.secureConnect,o!=null?o:e.connect)};return(()=>typeof r.writableFinished=="boolean"?r.writableFinished:r.finished&&r.outputSize===0&&(!r.socket||r.socket.writableLength===0))()?n():r.prependOnceListener("finish",n),r.prependOnceListener("response",o=>{e.response=Date.now(),e.phases.firstByte=e.response-e.upload,o.timings=e,t(o),o.prependOnceListener("end",()=>{e.end=Date.now(),e.phases.download=e.end-e.response,e.phases.total=e.end-e.start})}),e};xk.default=Pk;kk.exports=Pk;kk.exports.default=Pk});var X4=w((zit,Dk)=>{"use strict";var{V4MAPPED:Dve,ADDRCONFIG:Rve,ALL:q4,promises:{Resolver:J4},lookup:Fve}=require("dns"),{promisify:Rk}=require("util"),Nve=require("os"),Zg=Symbol("cacheableLookupCreateConnection"),Fk=Symbol("cacheableLookupInstance"),W4=Symbol("expires"),Lve=typeof q4=="number",z4=r=>{if(!(r&&typeof r.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},Tve=r=>{for(let e of r)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},_4=()=>{let r=!1,e=!1;for(let t of Object.values(Nve.networkInterfaces()))for(let i of t)if(!i.internal&&(i.family==="IPv6"?e=!0:r=!0,r&&e))return{has4:r,has6:e};return{has4:r,has6:e}},Ove=r=>Symbol.iterator in r,V4={ttl:!0},Mve={all:!0},Nk=class{constructor({cache:e=new Map,maxTtl:t=Infinity,fallbackDuration:i=3600,errorTtl:n=.15,resolver:s=new J4,lookup:o=Fve}={}){if(this.maxTtl=t,this.errorTtl=n,this._cache=e,this._resolver=s,this._dnsLookup=Rk(o),this._resolver instanceof J4?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=Rk(this._resolver.resolve4.bind(this._resolver)),this._resolve6=Rk(this._resolver.resolve6.bind(this._resolver))),this._iface=_4(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,i<1)this._fallback=!1;else{this._fallback=!0;let a=setInterval(()=>{this._hostnamesToFallback.clear()},i*1e3);a.unref&&a.unref()}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,t,i){if(typeof t=="function"?(i=t,t={}):typeof t=="number"&&(t={family:t}),!i)throw new Error("Callback must be a function.");this.lookupAsync(e,t).then(n=>{t.all?i(null,n):i(null,n.address,n.family,n.expires,n.ttl)},i)}async lookupAsync(e,t={}){typeof t=="number"&&(t={family:t});let i=await this.query(e);if(t.family===6){let n=i.filter(s=>s.family===6);t.hints&Dve&&(Lve&&t.hints&q4||n.length===0)?Tve(i):i=n}else t.family===4&&(i=i.filter(n=>n.family===4));if(t.hints&Rve){let{_iface:n}=this;i=i.filter(s=>s.family===6?n.has6:n.has4)}if(i.length===0){let n=new Error(`cacheableLookup ENOTFOUND ${e}`);throw n.code="ENOTFOUND",n.hostname=e,n}return t.all?i:i[0]}async query(e){let t=await this._cache.get(e);if(!t){let i=this._pending[e];if(i)t=await i;else{let n=this.queryAndCache(e);this._pending[e]=n,t=await n}}return t=t.map(i=>N({},i)),t}async _resolve(e){let t=async c=>{try{return await c}catch(u){if(u.code==="ENODATA"||u.code==="ENOTFOUND")return[];throw u}},[i,n]=await Promise.all([this._resolve4(e,V4),this._resolve6(e,V4)].map(c=>t(c))),s=0,o=0,a=0,l=Date.now();for(let c of i)c.family=4,c.expires=l+c.ttl*1e3,s=Math.max(s,c.ttl);for(let c of n)c.family=6,c.expires=l+c.ttl*1e3,o=Math.max(o,c.ttl);return i.length>0?n.length>0?a=Math.min(s,o):a=s:a=o,{entries:[...i,...n],cacheTtl:a}}async _lookup(e){try{return{entries:await this._dnsLookup(e,{all:!0}),cacheTtl:0}}catch(t){return{entries:[],cacheTtl:0}}}async _set(e,t,i){if(this.maxTtl>0&&i>0){i=Math.min(i,this.maxTtl)*1e3,t[W4]=Date.now()+i;try{await this._cache.set(e,t,i)}catch(n){this.lookupAsync=async()=>{let s=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw s.cause=n,s}}Ove(this._cache)&&this._tick(i)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,Mve);try{let t=await this._resolve(e);t.entries.length===0&&this._fallback&&(t=await this._lookup(e),t.entries.length!==0&&this._hostnamesToFallback.add(e));let i=t.entries.length===0?this.errorTtl:t.cacheTtl;return await this._set(e,t.entries,i),delete this._pending[e],t.entries}catch(t){throw delete this._pending[e],t}}_tick(e){let t=this._nextRemovalTime;(!t||e{this._nextRemovalTime=!1;let i=Infinity,n=Date.now();for(let[s,o]of this._cache){let a=o[W4];n>=a?this._cache.delete(s):a("lookup"in t||(t.lookup=this.lookup),e[Zg](t,i))}uninstall(e){if(z4(e),e[Zg]){if(e[Fk]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[Zg],delete e[Zg],delete e[Fk]}}updateInterfaceInfo(){let{_iface:e}=this;this._iface=_4(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}};Dk.exports=Nk;Dk.exports.default=Nk});var e8=w((_it,Lk)=>{"use strict";var Kve=typeof URL=="undefined"?require("url").URL:URL,Uve="text/plain",Hve="us-ascii",Z4=(r,e)=>e.some(t=>t instanceof RegExp?t.test(r):t===r),jve=(r,{stripHash:e})=>{let t=r.match(/^data:([^,]*?),([^#]*?)(?:#(.*))?$/);if(!t)throw new Error(`Invalid URL: ${r}`);let i=t[1].split(";"),n=t[2],s=e?"":t[3],o=!1;i[i.length-1]==="base64"&&(i.pop(),o=!0);let a=(i.shift()||"").toLowerCase(),c=[...i.map(u=>{let[g,f=""]=u.split("=").map(h=>h.trim());return g==="charset"&&(f=f.toLowerCase(),f===Hve)?"":`${g}${f?`=${f}`:""}`}).filter(Boolean)];return o&&c.push("base64"),(c.length!==0||a&&a!==Uve)&&c.unshift(a),`data:${c.join(";")},${o?n.trim():n}${s?`#${s}`:""}`},$4=(r,e)=>{if(e=N({defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0},e),Reflect.has(e,"normalizeHttps"))throw new Error("options.normalizeHttps is renamed to options.forceHttp");if(Reflect.has(e,"normalizeHttp"))throw new Error("options.normalizeHttp is renamed to options.forceHttps");if(Reflect.has(e,"stripFragment"))throw new Error("options.stripFragment is renamed to options.stripHash");if(r=r.trim(),/^data:/i.test(r))return jve(r,e);let t=r.startsWith("//");!t&&/^\.*\//.test(r)||(r=r.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let n=new Kve(r);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&n.protocol==="https:"&&(n.protocol="http:"),e.forceHttps&&n.protocol==="http:"&&(n.protocol="https:"),e.stripAuthentication&&(n.username="",n.password=""),e.stripHash&&(n.hash=""),n.pathname&&(n.pathname=n.pathname.replace(/((?!:).|^)\/{2,}/g,(s,o)=>/^(?!\/)/g.test(o)?`${o}/`:"/")),n.pathname&&(n.pathname=decodeURI(n.pathname)),e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let s=n.pathname.split("/"),o=s[s.length-1];Z4(o,e.removeDirectoryIndex)&&(s=s.slice(0,s.length-1),n.pathname=s.slice(1).join("/")+"/")}if(n.hostname&&(n.hostname=n.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.([a-z\-\d]{2,63})\.([a-z.]{2,5})$/.test(n.hostname)&&(n.hostname=n.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let s of[...n.searchParams.keys()])Z4(s,e.removeQueryParameters)&&n.searchParams.delete(s);return e.sortQueryParameters&&n.searchParams.sort(),e.removeTrailingSlash&&(n.pathname=n.pathname.replace(/\/$/,"")),r=n.toString(),(e.removeTrailingSlash||n.pathname==="/")&&n.hash===""&&(r=r.replace(/\/$/,"")),t&&!e.normalizeProtocol&&(r=r.replace(/^http:\/\//,"//")),e.stripProtocol&&(r=r.replace(/^(?:https?:)?\/\//,"")),r};Lk.exports=$4;Lk.exports.default=$4});var i8=w((Vit,t8)=>{t8.exports=r8;function r8(r,e){if(r&&e)return r8(r)(e);if(typeof r!="function")throw new TypeError("need wrapper function");return Object.keys(r).forEach(function(i){t[i]=r[i]}),t;function t(){for(var i=new Array(arguments.length),n=0;n{var n8=i8();Tk.exports=n8(bw);Tk.exports.strict=n8(s8);bw.proto=bw(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return bw(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return s8(this)},configurable:!0})});function bw(r){var e=function(){return e.called?e.value:(e.called=!0,e.value=r.apply(this,arguments))};return e.called=!1,e}function s8(r){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=r.apply(this,arguments)},t=r.name||"Function wrapped with `once`";return e.onceError=t+" shouldn't be called more than once",e.called=!1,e}});var Mk=w((Zit,o8)=>{var Gve=Ok(),Yve=function(){},qve=function(r){return r.setHeader&&typeof r.abort=="function"},Jve=function(r){return r.stdio&&Array.isArray(r.stdio)&&r.stdio.length===3},a8=function(r,e,t){if(typeof e=="function")return a8(r,null,e);e||(e={}),t=Gve(t||Yve);var i=r._writableState,n=r._readableState,s=e.readable||e.readable!==!1&&r.readable,o=e.writable||e.writable!==!1&&r.writable,a=function(){r.writable||l()},l=function(){o=!1,s||t.call(r)},c=function(){s=!1,o||t.call(r)},u=function(p){t.call(r,p?new Error("exited with error code: "+p):null)},g=function(p){t.call(r,p)},f=function(){if(s&&!(n&&n.ended))return t.call(r,new Error("premature close"));if(o&&!(i&&i.ended))return t.call(r,new Error("premature close"))},h=function(){r.req.on("finish",l)};return qve(r)?(r.on("complete",l),r.on("abort",f),r.req?h():r.on("request",h)):o&&!i&&(r.on("end",a),r.on("close",a)),Jve(r)&&r.on("exit",u),r.on("end",c),r.on("finish",l),e.error!==!1&&r.on("error",g),r.on("close",f),function(){r.removeListener("complete",l),r.removeListener("abort",f),r.removeListener("request",h),r.req&&r.req.removeListener("finish",l),r.removeListener("end",a),r.removeListener("close",a),r.removeListener("finish",l),r.removeListener("exit",u),r.removeListener("end",c),r.removeListener("error",g),r.removeListener("close",f)}};o8.exports=a8});var c8=w(($it,A8)=>{var Wve=Ok(),zve=Mk(),Kk=require("fs"),kd=function(){},_ve=/^v?\.0/.test(process.version),Qw=function(r){return typeof r=="function"},Vve=function(r){return!_ve||!Kk?!1:(r instanceof(Kk.ReadStream||kd)||r instanceof(Kk.WriteStream||kd))&&Qw(r.close)},Xve=function(r){return r.setHeader&&Qw(r.abort)},Zve=function(r,e,t,i){i=Wve(i);var n=!1;r.on("close",function(){n=!0}),zve(r,{readable:e,writable:t},function(o){if(o)return i(o);n=!0,i()});var s=!1;return function(o){if(!n&&!s){if(s=!0,Vve(r))return r.close(kd);if(Xve(r))return r.abort();if(Qw(r.destroy))return r.destroy();i(o||new Error("stream was destroyed"))}}},l8=function(r){r()},$ve=function(r,e){return r.pipe(e)},exe=function(){var r=Array.prototype.slice.call(arguments),e=Qw(r[r.length-1]||kd)&&r.pop()||kd;if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new Error("pump requires two streams per minimum");var t,i=r.map(function(n,s){var o=s0;return Zve(n,o,a,function(l){t||(t=l),l&&i.forEach(l8),!o&&(i.forEach(l8),e(t))})});return r.reduce($ve)};A8.exports=exe});var g8=w((ent,u8)=>{"use strict";var{PassThrough:txe}=require("stream");u8.exports=r=>{r=N({},r);let{array:e}=r,{encoding:t}=r,i=t==="buffer",n=!1;e?n=!(t||i):t=t||"utf8",i&&(t=null);let s=new txe({objectMode:n});t&&s.setEncoding(t);let o=0,a=[];return s.on("data",l=>{a.push(l),n?o=a.length:o+=l.length}),s.getBufferedValue=()=>e?a:i?Buffer.concat(a,o):a.join(""),s.getBufferedLength=()=>o,s}});var f8=w((tnt,$g)=>{"use strict";var rxe=c8(),ixe=g8(),Uk=class extends Error{constructor(){super("maxBuffer exceeded");this.name="MaxBufferError"}};async function Sw(r,e){if(!r)return Promise.reject(new Error("Expected a stream"));e=N({maxBuffer:Infinity},e);let{maxBuffer:t}=e,i;return await new Promise((n,s)=>{let o=a=>{a&&(a.bufferedData=i.getBufferedValue()),s(a)};i=rxe(r,ixe(e),a=>{if(a){o(a);return}n()}),i.on("data",()=>{i.getBufferedLength()>t&&o(new Uk)})}),i.getBufferedValue()}$g.exports=Sw;$g.exports.default=Sw;$g.exports.buffer=(r,e)=>Sw(r,te(N({},e),{encoding:"buffer"}));$g.exports.array=(r,e)=>Sw(r,te(N({},e),{array:!0}));$g.exports.MaxBufferError=Uk});var p8=w((int,h8)=>{"use strict";var nxe=[200,203,204,206,300,301,404,405,410,414,501],sxe=[200,203,204,300,301,302,303,307,308,404,405,410,414,501],oxe={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},axe={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function Hk(r){let e={};if(!r)return e;let t=r.trim().split(/\s*,\s*/);for(let i of t){let[n,s]=i.split(/\s*=\s*/,2);e[n]=s===void 0?!0:s.replace(/^"|"$/g,"")}return e}function Axe(r){let e=[];for(let t in r){let i=r[t];e.push(i===!0?t:t+"="+i)}if(!!e.length)return e.join(", ")}h8.exports=class{constructor(e,t,{shared:i,cacheHeuristic:n,immutableMinTimeToLive:s,ignoreCargoCult:o,trustServerDate:a,_fromObject:l}={}){if(l){this._fromObject(l);return}if(!t||!t.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=i!==!1,this._trustServerDate=a!==void 0?a:!0,this._cacheHeuristic=n!==void 0?n:.1,this._immutableMinTtl=s!==void 0?s:24*3600*1e3,this._status="status"in t?t.status:200,this._resHeaders=t.headers,this._rescc=Hk(t.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=t.headers.vary?e.headers:null,this._reqcc=Hk(e.headers["cache-control"]),o&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":Axe(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),!t.headers["cache-control"]&&/no-cache/.test(t.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&sxe.indexOf(this._status)!==-1&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc.public||this._rescc["max-age"]||this._rescc["s-maxage"]||nxe.indexOf(this._status)!==-1))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);let t=Hk(e.headers["cache-control"]);return t["no-cache"]||/no-cache/.test(e.headers.pragma)||t["max-age"]&&this.age()>t["max-age"]||t["min-fresh"]&&this.timeToLive()<1e3*t["min-fresh"]||this.stale()&&!(t["max-stale"]&&!this._rescc["must-revalidate"]&&(t["max-stale"]===!0||t["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,t){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||t&&e.method==="HEAD")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let t=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let i of t)if(e.headers[i]!==this._reqHeaders[i])return!1;return!0}_copyWithoutHopByHopHeaders(e){let t={};for(let i in e)oxe[i]||(t[i]=e[i]);if(e.connection){let i=e.connection.trim().split(/\s*,\s*/);for(let n of i)delete t[n]}if(t.warning){let i=t.warning.split(/,/).filter(n=>!/^\s*1[0-9][0-9]/.test(n));i.length?t.warning=i.join(",").trim():delete t.warning}return t}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),t=this.age();return t>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(t)}`,e.date=new Date(this.now()).toUTCString(),e}date(){return this._trustServerDate?this._serverDate():this._responseTime}_serverDate(){let e=Date.parse(this._resHeaders.date);if(isFinite(e)){let t=8*3600*1e3;if(Math.abs(this._responseTime-e)e&&(e=i)}let t=(this.now()-this._responseTime)/1e3;return e+t}_ageValue(){let e=parseInt(this._resHeaders.age);return isFinite(e)?e:0}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return parseInt(this._rescc["s-maxage"],10)}if(this._rescc["max-age"])return parseInt(this._rescc["max-age"],10);let e=this._rescc.immutable?this._immutableMinTtl:0,t=this._serverDate();if(this._resHeaders.expires){let i=Date.parse(this._resHeaders.expires);return Number.isNaN(i)||ii)return Math.max(e,(t-i)/1e3*this._cacheHeuristic)}return e}timeToLive(){return Math.max(0,this.maxAge()-this.age())*1e3}stale(){return this.maxAge()<=this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);let t=this._copyWithoutHopByHopHeaders(e.headers);if(delete t["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete t["if-none-match"],delete t["if-modified-since"],t;if(this._resHeaders.etag&&(t["if-none-match"]=t["if-none-match"]?`${t["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),t["accept-ranges"]||t["if-match"]||t["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete t["if-modified-since"],t["if-none-match"]){let n=t["if-none-match"].split(/,/).filter(s=>!/^\s*W\//.test(s));n.length?t["if-none-match"]=n.join(",").trim():delete t["if-none-match"]}}else this._resHeaders["last-modified"]&&!t["if-modified-since"]&&(t["if-modified-since"]=this._resHeaders["last-modified"]);return t}revalidatedPolicy(e,t){if(this._assertRequestHasHeaders(e),!t||!t.headers)throw Error("Response headers missing");let i=!1;if(t.status!==void 0&&t.status!=304?i=!1:t.headers.etag&&!/^\s*W\//.test(t.headers.etag)?i=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag:this._resHeaders.etag&&t.headers.etag?i=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?i=this._resHeaders["last-modified"]===t.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!t.headers.etag&&!t.headers["last-modified"]&&(i=!0),!i)return{policy:new this.constructor(e,t),modified:t.status!=304,matches:!1};let n={};for(let o in this._resHeaders)n[o]=o in t.headers&&!axe[o]?t.headers[o]:this._resHeaders[o];let s=Object.assign({},t,{status:this._status,method:this._method,headers:n});return{policy:new this.constructor(e,s,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl,trustServerDate:this._trustServerDate}),modified:!1,matches:!0}}}});var vw=w((nnt,d8)=>{"use strict";d8.exports=r=>{let e={};for(let[t,i]of Object.entries(r))e[t.toLowerCase()]=i;return e}});var E8=w((snt,C8)=>{"use strict";var lxe=require("stream").Readable,cxe=vw(),m8=class extends lxe{constructor(e,t,i,n){if(typeof e!="number")throw new TypeError("Argument `statusCode` should be a number");if(typeof t!="object")throw new TypeError("Argument `headers` should be an object");if(!(i instanceof Buffer))throw new TypeError("Argument `body` should be a buffer");if(typeof n!="string")throw new TypeError("Argument `url` should be a string");super();this.statusCode=e,this.headers=cxe(t),this.body=i,this.url=n}_read(){this.push(this.body),this.push(null)}};C8.exports=m8});var y8=w((ont,I8)=>{"use strict";var uxe=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];I8.exports=(r,e)=>{let t=new Set(Object.keys(r).concat(uxe));for(let i of t)i in e||(e[i]=typeof r[i]=="function"?r[i].bind(r):r[i])}});var B8=w((ant,w8)=>{"use strict";var gxe=require("stream").PassThrough,fxe=y8(),hxe=r=>{if(!(r&&r.pipe))throw new TypeError("Parameter `response` must be a response stream.");let e=new gxe;return fxe(r,e),r.pipe(e)};w8.exports=hxe});var b8=w(jk=>{jk.stringify=function r(e){if(typeof e=="undefined")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e=="object"){var t="",i=Array.isArray(e);t=i?"[":"{";var n=!0;for(var s in e){var o=typeof e[s]=="function"||!i&&typeof e[s]=="undefined";Object.hasOwnProperty.call(e,s)&&!o&&(n||(t+=","),n=!1,i?e[s]==null?t+="null":t+=r(e[s]):e[s]!==void 0&&(t+=r(s)+":"+r(e[s])))}return t+=i?"]":"}",t}else return typeof e=="string"?JSON.stringify(/^:/.test(e)?":"+e:e):typeof e=="undefined"?"null":JSON.stringify(e)};jk.parse=function(r){return JSON.parse(r,function(e,t){return typeof t=="string"?/^:base64:/.test(t)?Buffer.from(t.substring(8),"base64"):/^:/.test(t)?t.substring(1):t:t})}});var x8=w((lnt,Q8)=>{"use strict";var pxe=require("events"),S8=b8(),dxe=r=>{let e={redis:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql"};if(r.adapter||r.uri){let t=r.adapter||/^[^:]*/.exec(r.uri)[0];return new(require(e[t]))(r)}return new Map},v8=class extends pxe{constructor(e,t){super();if(this.opts=Object.assign({namespace:"keyv",serialize:S8.stringify,deserialize:S8.parse},typeof e=="string"?{uri:e}:e,t),!this.opts.store){let i=Object.assign({},this.opts);this.opts.store=dxe(i)}typeof this.opts.store.on=="function"&&this.opts.store.on("error",i=>this.emit("error",i)),this.opts.store.namespace=this.opts.namespace}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}get(e,t){e=this._getKeyPrefix(e);let{store:i}=this.opts;return Promise.resolve().then(()=>i.get(e)).then(n=>typeof n=="string"?this.opts.deserialize(n):n).then(n=>{if(n!==void 0){if(typeof n.expires=="number"&&Date.now()>n.expires){this.delete(e);return}return t&&t.raw?n:n.value}})}set(e,t,i){e=this._getKeyPrefix(e),typeof i=="undefined"&&(i=this.opts.ttl),i===0&&(i=void 0);let{store:n}=this.opts;return Promise.resolve().then(()=>{let s=typeof i=="number"?Date.now()+i:null;return t={value:t,expires:s},this.opts.serialize(t)}).then(s=>n.set(e,s,i)).then(()=>!0)}delete(e){e=this._getKeyPrefix(e);let{store:t}=this.opts;return Promise.resolve().then(()=>t.delete(e))}clear(){let{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}};Q8.exports=v8});var D8=w((cnt,k8)=>{"use strict";var Cxe=require("events"),xw=require("url"),mxe=e8(),Exe=f8(),Gk=p8(),P8=E8(),Ixe=vw(),yxe=B8(),wxe=x8(),ia=class{constructor(e,t){if(typeof e!="function")throw new TypeError("Parameter `request` must be a function");return this.cache=new wxe({uri:typeof t=="string"&&t,store:typeof t!="string"&&t,namespace:"cacheable-request"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(t,i)=>{let n;if(typeof t=="string")n=Yk(xw.parse(t)),t={};else if(t instanceof xw.URL)n=Yk(xw.parse(t.toString())),t={};else{let[g,...f]=(t.path||"").split("?"),h=f.length>0?`?${f.join("?")}`:"";n=Yk(te(N({},t),{pathname:g,search:h}))}t=N(N({headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1},t),Bxe(n)),t.headers=Ixe(t.headers);let s=new Cxe,o=mxe(xw.format(n),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),a=`${t.method}:${o}`,l=!1,c=!1,u=g=>{c=!0;let f=!1,h,p=new Promise(y=>{h=()=>{f||(f=!0,y())}}),m=y=>{if(l&&!g.forceRefresh){y.status=y.statusCode;let v=Gk.fromObject(l.cachePolicy).revalidatedPolicy(g,y);if(!v.modified){let x=v.policy.responseHeaders();y=new P8(l.statusCode,x,l.body,l.url),y.cachePolicy=v.policy,y.fromCache=!0}}y.fromCache||(y.cachePolicy=new Gk(g,y,g),y.fromCache=!1);let b;g.cache&&y.cachePolicy.storable()?(b=yxe(y),(async()=>{try{let v=Exe.buffer(y);if(await Promise.race([p,new Promise(Y=>y.once("end",Y))]),f)return;let x=await v,T={cachePolicy:y.cachePolicy.toObject(),url:y.url,statusCode:y.fromCache?l.statusCode:y.statusCode,body:x},q=g.strictTtl?y.cachePolicy.timeToLive():void 0;g.maxTtl&&(q=q?Math.min(q,g.maxTtl):g.maxTtl),await this.cache.set(a,T,q)}catch(v){s.emit("error",new ia.CacheError(v))}})()):g.cache&&l&&(async()=>{try{await this.cache.delete(a)}catch(v){s.emit("error",new ia.CacheError(v))}})(),s.emit("response",b||y),typeof i=="function"&&i(b||y)};try{let y=e(g,m);y.once("error",h),y.once("abort",h),s.emit("request",y)}catch(y){s.emit("error",new ia.RequestError(y))}};return(async()=>{let g=async h=>{await Promise.resolve();let p=h.cache?await this.cache.get(a):void 0;if(typeof p=="undefined")return u(h);let m=Gk.fromObject(p.cachePolicy);if(m.satisfiesWithoutRevalidation(h)&&!h.forceRefresh){let y=m.responseHeaders(),b=new P8(p.statusCode,y,p.body,p.url);b.cachePolicy=m,b.fromCache=!0,s.emit("response",b),typeof i=="function"&&i(b)}else l=p,h.headers=m.revalidationHeaders(h),u(h)},f=h=>s.emit("error",new ia.CacheError(h));this.cache.once("error",f),s.on("response",()=>this.cache.removeListener("error",f));try{await g(t)}catch(h){t.automaticFailover&&!c&&u(t),s.emit("error",new ia.CacheError(h))}})(),s}}};function Bxe(r){let e=N({},r);return e.path=`${r.pathname||"/"}${r.search||""}`,delete e.pathname,delete e.search,e}function Yk(r){return{protocol:r.protocol,auth:r.auth,hostname:r.hostname||r.host||"localhost",port:r.port,pathname:r.pathname,search:r.search}}ia.RequestError=class extends Error{constructor(r){super(r.message);this.name="RequestError",Object.assign(this,r)}};ia.CacheError=class extends Error{constructor(r){super(r.message);this.name="CacheError",Object.assign(this,r)}};k8.exports=ia});var F8=w((unt,R8)=>{"use strict";var bxe=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];R8.exports=(r,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let t=new Set(Object.keys(r).concat(bxe)),i={};for(let n of t)n in e||(i[n]={get(){let s=r[n];return typeof s=="function"?s.bind(r):s},set(s){r[n]=s},enumerable:!0,configurable:!1});return Object.defineProperties(e,i),r.once("aborted",()=>{e.destroy(),e.emit("aborted")}),r.once("close",()=>{r.complete&&e.readable?e.once("end",()=>{e.emit("close")}):e.emit("close")}),e}});var L8=w((gnt,N8)=>{"use strict";var{Transform:Qxe,PassThrough:Sxe}=require("stream"),qk=require("zlib"),vxe=F8();N8.exports=r=>{let e=(r.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return r;let t=e==="br";if(t&&typeof qk.createBrotliDecompress!="function")return r.destroy(new Error("Brotli is not supported on Node.js < 12")),r;let i=!0,n=new Qxe({transform(a,l,c){i=!1,c(null,a)},flush(a){a()}}),s=new Sxe({autoDestroy:!1,destroy(a,l){r.destroy(),l(a)}}),o=t?qk.createBrotliDecompress():qk.createUnzip();return o.once("error",a=>{if(i&&!r.readable){s.end();return}s.destroy(a)}),vxe(r,s),r.pipe(n).pipe(o).pipe(s),s}});var Jk=w((fnt,T8)=>{"use strict";var O8=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,t){if(this.cache.set(e,t),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction=="function")for(let[i,n]of this.oldCache.entries())this.onEviction(i,n);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){let t=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,t),t}}set(e,t){return this.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){let t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache)yield e;for(let e of this.oldCache){let[t]=e;this.cache.has(t)||(yield e)}}get size(){let e=0;for(let t of this.oldCache.keys())this.cache.has(t)||e++;return Math.min(this._size+e,this.maxSize)}};T8.exports=O8});var zk=w((hnt,M8)=>{"use strict";var xxe=require("events"),kxe=require("tls"),Pxe=require("http2"),Dxe=Jk(),gn=Symbol("currentStreamsCount"),K8=Symbol("request"),Ls=Symbol("cachedOriginSet"),ef=Symbol("gracefullyClosing"),Rxe=["maxDeflateDynamicTableSize","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","localAddress","path","rejectUnauthorized","minDHSize","ca","cert","clientCertEngine","ciphers","key","pfx","servername","minVersion","maxVersion","secureProtocol","crl","honorCipherOrder","ecdhCurve","dhparam","secureOptions","sessionIdContext"],Fxe=(r,e,t)=>{let i=0,n=r.length;for(;i>>1;t(r[s],e)?i=s+1:n=s}return i},Nxe=(r,e)=>r.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,Wk=(r,e)=>{for(let t of r)t[Ls].lengthe[Ls].includes(i))&&t[gn]+e[gn]<=e.remoteSettings.maxConcurrentStreams&&U8(t)},Lxe=(r,e)=>{for(let t of r)e[Ls].lengtht[Ls].includes(i))&&e[gn]+t[gn]<=t.remoteSettings.maxConcurrentStreams&&U8(e)},H8=({agent:r,isFree:e})=>{let t={};for(let i in r.sessions){let s=r.sessions[i].filter(o=>{let a=o[nA.kCurrentStreamsCount]{r[ef]=!0,r[gn]===0&&r.close()},nA=class extends xxe{constructor({timeout:e=6e4,maxSessions:t=Infinity,maxFreeSessions:i=10,maxCachedTlsSessions:n=100}={}){super();this.sessions={},this.queue={},this.timeout=e,this.maxSessions=t,this.maxFreeSessions=i,this._freeSessionsCount=0,this._sessionsCount=0,this.settings={enablePush:!1},this.tlsSessionCache=new Dxe({maxSize:n})}static normalizeOrigin(e,t){return typeof e=="string"&&(e=new URL(e)),t&&e.hostname!==t&&(e.hostname=t),e.origin}normalizeOptions(e){let t="";if(e)for(let i of Rxe)e[i]&&(t+=`:${e[i]}`);return t}_tryToCreateNewSession(e,t){if(!(e in this.queue)||!(t in this.queue[e]))return;let i=this.queue[e][t];this._sessionsCount{Array.isArray(i)?(i=[...i],n()):i=[{resolve:n,reject:s}];let o=this.normalizeOptions(t),a=nA.normalizeOrigin(e,t&&t.servername);if(a===void 0){for(let{reject:u}of i)u(new TypeError("The `origin` argument needs to be a string or an URL object"));return}if(o in this.sessions){let u=this.sessions[o],g=-1,f=-1,h;for(let p of u){let m=p.remoteSettings.maxConcurrentStreams;if(m=m||p[ef]||p.destroyed)continue;h||(g=m),y>f&&(h=p,f=y)}}if(h){if(i.length!==1){for(let{reject:p}of i){let m=new Error(`Expected the length of listeners to be 1, got ${i.length}. +Please report this to https://github.com/szmarczak/http2-wrapper/`);p(m)}return}i[0].resolve(h);return}}if(o in this.queue){if(a in this.queue[o]){this.queue[o][a].listeners.push(...i),this._tryToCreateNewSession(o,a);return}}else this.queue[o]={};let l=()=>{o in this.queue&&this.queue[o][a]===c&&(delete this.queue[o][a],Object.keys(this.queue[o]).length===0&&delete this.queue[o])},c=()=>{let u=`${a}:${o}`,g=!1;try{let f=Pxe.connect(e,N({createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(u)},t));f[gn]=0,f[ef]=!1;let h=()=>f[gn]{this.tlsSessionCache.set(u,y)}),f.once("error",y=>{for(let{reject:b}of i)b(y);this.tlsSessionCache.delete(u)}),f.setTimeout(this.timeout,()=>{f.destroy()}),f.once("close",()=>{if(g){p&&this._freeSessionsCount--,this._sessionsCount--;let y=this.sessions[o];y.splice(y.indexOf(f),1),y.length===0&&delete this.sessions[o]}else{let y=new Error("Session closed without receiving a SETTINGS frame");y.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:b}of i)b(y);l()}this._tryToCreateNewSession(o,a)});let m=()=>{if(!(!(o in this.queue)||!h())){for(let y of f[Ls])if(y in this.queue[o]){let{listeners:b}=this.queue[o][y];for(;b.length!==0&&h();)b.shift().resolve(f);let v=this.queue[o];if(v[y].listeners.length===0&&(delete v[y],Object.keys(v).length===0)){delete this.queue[o];break}if(!h())break}}};f.on("origin",()=>{f[Ls]=f.originSet,!!h()&&(m(),Wk(this.sessions[o],f))}),f.once("remoteSettings",()=>{if(f.ref(),f.unref(),this._sessionsCount++,c.destroyed){let y=new Error("Agent has been destroyed");for(let b of i)b.reject(y);f.destroy();return}f[Ls]=f.originSet;{let y=this.sessions;if(o in y){let b=y[o];b.splice(Fxe(b,f,Nxe),0,f)}else y[o]=[f]}this._freeSessionsCount+=1,g=!0,this.emit("session",f),m(),l(),f[gn]===0&&this._freeSessionsCount>this.maxFreeSessions&&f.close(),i.length!==0&&(this.getSession(a,t,i),i.length=0),f.on("remoteSettings",()=>{m(),Wk(this.sessions[o],f)})}),f[K8]=f.request,f.request=(y,b)=>{if(f[ef])throw new Error("The session is gracefully closing. No new streams are allowed.");let v=f[K8](y,b);return f.ref(),++f[gn],f[gn]===f.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,v.once("close",()=>{if(p=h(),--f[gn],!f.destroyed&&!f.closed&&(Lxe(this.sessions[o],f),h()&&!f.closed)){p||(this._freeSessionsCount++,p=!0);let x=f[gn]===0;x&&f.unref(),x&&(this._freeSessionsCount>this.maxFreeSessions||f[ef])?f.close():(Wk(this.sessions[o],f),m())}}),v}}catch(f){for(let h of i)h.reject(f);l()}};c.listeners=i,c.completed=!1,c.destroyed=!1,this.queue[o][a]=c,this._tryToCreateNewSession(o,a)})}request(e,t,i,n){return new Promise((s,o)=>{this.getSession(e,t,[{reject:o,resolve:a=>{try{s(a.request(i,n))}catch(l){o(l)}}}])})}createConnection(e,t){return nA.connect(e,t)}static connect(e,t){t.ALPNProtocols=["h2"];let i=e.port||443,n=e.hostname||e.host;return typeof t.servername=="undefined"&&(t.servername=n),kxe.connect(i,n,t)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let t of e)t[gn]===0&&t.close()}destroy(e){for(let t of Object.values(this.sessions))for(let i of t)i.destroy(e);for(let t of Object.values(this.queue))for(let i of Object.values(t))i.destroyed=!0;this.queue={}}get freeSessions(){return H8({agent:this,isFree:!0})}get busySessions(){return H8({agent:this,isFree:!1})}};nA.kCurrentStreamsCount=gn;nA.kGracefullyClosing=ef;M8.exports={Agent:nA,globalAgent:new nA}});var _k=w((pnt,j8)=>{"use strict";var{Readable:Txe}=require("stream"),G8=class extends Txe{constructor(e,t){super({highWaterMark:t,autoDestroy:!1});this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,t){return this.req.setTimeout(e,t),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};j8.exports=G8});var Vk=w((dnt,Y8)=>{"use strict";Y8.exports=r=>{let e={protocol:r.protocol,hostname:typeof r.hostname=="string"&&r.hostname.startsWith("[")?r.hostname.slice(1,-1):r.hostname,host:r.host,hash:r.hash,search:r.search,pathname:r.pathname,href:r.href,path:`${r.pathname||""}${r.search||""}`};return typeof r.port=="string"&&r.port.length!==0&&(e.port=Number(r.port)),(r.username||r.password)&&(e.auth=`${r.username||""}:${r.password||""}`),e}});var J8=w((Cnt,q8)=>{"use strict";q8.exports=(r,e,t)=>{for(let i of t)r.on(i,(...n)=>e.emit(i,...n))}});var z8=w((mnt,W8)=>{"use strict";W8.exports=r=>{switch(r){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var V8=w((Int,_8)=>{"use strict";var tf=(r,e,t)=>{_8.exports[e]=class extends r{constructor(...n){super(typeof t=="string"?t:t(n));this.name=`${super.name} [${e}]`,this.code=e}}};tf(TypeError,"ERR_INVALID_ARG_TYPE",r=>{let e=r[0].includes(".")?"property":"argument",t=r[1],i=Array.isArray(t);return i&&(t=`${t.slice(0,-1).join(", ")} or ${t.slice(-1)}`),`The "${r[0]}" ${e} must be ${i?"one of":"of"} type ${t}. Received ${typeof r[2]}`});tf(TypeError,"ERR_INVALID_PROTOCOL",r=>`Protocol "${r[0]}" not supported. Expected "${r[1]}"`);tf(Error,"ERR_HTTP_HEADERS_SENT",r=>`Cannot ${r[0]} headers after they are sent to the client`);tf(TypeError,"ERR_INVALID_HTTP_TOKEN",r=>`${r[0]} must be a valid HTTP token [${r[1]}]`);tf(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",r=>`Invalid value "${r[0]} for header "${r[1]}"`);tf(TypeError,"ERR_INVALID_CHAR",r=>`Invalid character in ${r[0]} [${r[1]}]`)});var eP=w((ynt,X8)=>{"use strict";var Oxe=require("http2"),{Writable:Mxe}=require("stream"),{Agent:Z8,globalAgent:Kxe}=zk(),Uxe=_k(),Hxe=Vk(),jxe=J8(),Gxe=z8(),{ERR_INVALID_ARG_TYPE:Xk,ERR_INVALID_PROTOCOL:Yxe,ERR_HTTP_HEADERS_SENT:$8,ERR_INVALID_HTTP_TOKEN:qxe,ERR_HTTP_INVALID_HEADER_VALUE:Jxe,ERR_INVALID_CHAR:Wxe}=V8(),{HTTP2_HEADER_STATUS:ez,HTTP2_HEADER_METHOD:tz,HTTP2_HEADER_PATH:rz,HTTP2_METHOD_CONNECT:zxe}=Oxe.constants,Wi=Symbol("headers"),Zk=Symbol("origin"),$k=Symbol("session"),iz=Symbol("options"),kw=Symbol("flushedHeaders"),Pd=Symbol("jobs"),_xe=/^[\^`\-\w!#$%&*+.|~]+$/,Vxe=/[^\t\u0020-\u007E\u0080-\u00FF]/,nz=class extends Mxe{constructor(e,t,i){super({autoDestroy:!1});let n=typeof e=="string"||e instanceof URL;if(n&&(e=Hxe(e instanceof URL?e:new URL(e))),typeof t=="function"||t===void 0?(i=t,t=n?e:N({},e)):t=N(N({},e),t),t.h2session)this[$k]=t.h2session;else if(t.agent===!1)this.agent=new Z8({maxFreeSessions:0});else if(typeof t.agent=="undefined"||t.agent===null)typeof t.createConnection=="function"?(this.agent=new Z8({maxFreeSessions:0}),this.agent.createConnection=t.createConnection):this.agent=Kxe;else if(typeof t.agent.request=="function")this.agent=t.agent;else throw new Xk("options.agent",["Agent-like Object","undefined","false"],t.agent);if(t.protocol&&t.protocol!=="https:")throw new Yxe(t.protocol,"https:");let s=t.port||t.defaultPort||this.agent&&this.agent.defaultPort||443,o=t.hostname||t.host||"localhost";delete t.hostname,delete t.host,delete t.port;let{timeout:a}=t;if(t.timeout=void 0,this[Wi]=Object.create(null),this[Pd]=[],this.socket=null,this.connection=null,this.method=t.method||"GET",this.path=t.path,this.res=null,this.aborted=!1,this.reusedSocket=!1,t.headers)for(let[l,c]of Object.entries(t.headers))this.setHeader(l,c);t.auth&&!("authorization"in this[Wi])&&(this[Wi].authorization="Basic "+Buffer.from(t.auth).toString("base64")),t.session=t.tlsSession,t.path=t.socketPath,this[iz]=t,s===443?(this[Zk]=`https://${o}`,":authority"in this[Wi]||(this[Wi][":authority"]=o)):(this[Zk]=`https://${o}:${s}`,":authority"in this[Wi]||(this[Wi][":authority"]=`${o}:${s}`)),a&&this.setTimeout(a),i&&this.once("response",i),this[kw]=!1}get method(){return this[Wi][tz]}set method(e){e&&(this[Wi][tz]=e.toUpperCase())}get path(){return this[Wi][rz]}set path(e){e&&(this[Wi][rz]=e)}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,t,i){if(this._mustNotHaveABody){i(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();let n=()=>this._request.write(e,t,i);this._request?n():this[Pd].push(n)}_final(e){if(this.destroyed)return;this.flushHeaders();let t=()=>{if(this._mustNotHaveABody){e();return}this._request.end(e)};this._request?t():this[Pd].push(t)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}_destroy(e,t){this.res&&this.res._dump(),this._request&&this._request.destroy(),t(e)}async flushHeaders(){if(this[kw]||this.destroyed)return;this[kw]=!0;let e=this.method===zxe,t=i=>{if(this._request=i,this.destroyed){i.destroy();return}e||jxe(i,this,["timeout","continue","close","error"]);let n=o=>(...a)=>{!this.writable&&!this.destroyed?o(...a):this.once("finish",()=>{o(...a)})};i.once("response",n((o,a,l)=>{let c=new Uxe(this.socket,i.readableHighWaterMark);this.res=c,c.req=this,c.statusCode=o[ez],c.headers=o,c.rawHeaders=l,c.once("end",()=>{this.aborted?(c.aborted=!0,c.emit("aborted")):(c.complete=!0,c.socket=null,c.connection=null)}),e?(c.upgrade=!0,this.emit("connect",c,i,Buffer.alloc(0))?this.emit("close"):i.destroy()):(i.on("data",u=>{!c._dumped&&!c.push(u)&&i.pause()}),i.once("end",()=>{c.push(null)}),this.emit("response",c)||c._dump())})),i.once("headers",n(o=>this.emit("information",{statusCode:o[ez]}))),i.once("trailers",n((o,a,l)=>{let{res:c}=this;c.trailers=o,c.rawTrailers=l}));let{socket:s}=i.session;this.socket=s,this.connection=s;for(let o of this[Pd])o();this.emit("socket",this.socket)};if(this[$k])try{t(this[$k].request(this[Wi]))}catch(i){this.emit("error",i)}else{this.reusedSocket=!0;try{t(await this.agent.request(this[Zk],this[iz],this[Wi]))}catch(i){this.emit("error",i)}}}getHeader(e){if(typeof e!="string")throw new Xk("name","string",e);return this[Wi][e.toLowerCase()]}get headersSent(){return this[kw]}removeHeader(e){if(typeof e!="string")throw new Xk("name","string",e);if(this.headersSent)throw new $8("remove");delete this[Wi][e.toLowerCase()]}setHeader(e,t){if(this.headersSent)throw new $8("set");if(typeof e!="string"||!_xe.test(e)&&!Gxe(e))throw new qxe("Header name",e);if(typeof t=="undefined")throw new Jxe(t,e);if(Vxe.test(t))throw new Wxe("header content",e);this[Wi][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){let i=()=>this._request.setTimeout(e,t);return this._request?i():this[Pd].push(i),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};X8.exports=nz});var oz=w((wnt,sz)=>{"use strict";var Xxe=require("tls");sz.exports=(r={})=>new Promise((e,t)=>{let i=Xxe.connect(r,()=>{r.resolveSocket?(i.off("error",t),e({alpnProtocol:i.alpnProtocol,socket:i})):(i.destroy(),e({alpnProtocol:i.alpnProtocol}))});i.on("error",t)})});var Az=w((Bnt,az)=>{"use strict";var Zxe=require("net");az.exports=r=>{let e=r.host,t=r.headers&&r.headers.host;return t&&(t.startsWith("[")?t.indexOf("]")===-1?e=t:e=t.slice(1,-1):e=t.split(":",1)[0]),Zxe.isIP(e)?"":e}});var uz=w((bnt,tP)=>{"use strict";var lz=require("http"),rP=require("https"),$xe=oz(),eke=Jk(),tke=eP(),rke=Az(),ike=Vk(),Pw=new eke({maxSize:100}),Dd=new Map,cz=(r,e,t)=>{e._httpMessage={shouldKeepAlive:!0};let i=()=>{r.emit("free",e,t)};e.on("free",i);let n=()=>{r.removeSocket(e,t)};e.on("close",n);let s=()=>{r.removeSocket(e,t),e.off("close",n),e.off("free",i),e.off("agentRemove",s)};e.on("agentRemove",s),r.emit("free",e,t)},nke=async r=>{let e=`${r.host}:${r.port}:${r.ALPNProtocols.sort()}`;if(!Pw.has(e)){if(Dd.has(e))return(await Dd.get(e)).alpnProtocol;let{path:t,agent:i}=r;r.path=r.socketPath;let n=$xe(r);Dd.set(e,n);try{let{socket:s,alpnProtocol:o}=await n;if(Pw.set(e,o),r.path=t,o==="h2")s.destroy();else{let{globalAgent:a}=rP,l=rP.Agent.prototype.createConnection;i?i.createConnection===l?cz(i,s,r):s.destroy():a.createConnection===l?cz(a,s,r):s.destroy()}return Dd.delete(e),o}catch(s){throw Dd.delete(e),s}}return Pw.get(e)};tP.exports=async(r,e,t)=>{if((typeof r=="string"||r instanceof URL)&&(r=ike(new URL(r))),typeof e=="function"&&(t=e,e=void 0),e=te(N(N({ALPNProtocols:["h2","http/1.1"]},r),e),{resolveSocket:!0}),!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");e.protocol=e.protocol||"https:";let i=e.protocol==="https:";e.host=e.hostname||e.host||"localhost",e.session=e.tlsSession,e.servername=e.servername||rke(e),e.port=e.port||(i?443:80),e._defaultAgent=i?rP.globalAgent:lz.globalAgent;let n=e.agent;if(n){if(n.addRequest)throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties");e.agent=n[i?"https":"http"]}return i&&await nke(e)==="h2"?(n&&(e.agent=n.http2),new tke(e,t)):lz.request(e,t)};tP.exports.protocolCache=Pw});var fz=w((Qnt,gz)=>{"use strict";var ske=require("http2"),oke=zk(),iP=eP(),ake=_k(),Ake=uz(),lke=(r,e,t)=>new iP(r,e,t),cke=(r,e,t)=>{let i=new iP(r,e,t);return i.end(),i};gz.exports=te(N(te(N({},ske),{ClientRequest:iP,IncomingMessage:ake}),oke),{request:lke,get:cke,auto:Ake})});var sP=w(nP=>{"use strict";Object.defineProperty(nP,"__esModule",{value:!0});var hz=iA();nP.default=r=>hz.default.nodeStream(r)&&hz.default.function_(r.getBoundary)});var mz=w(oP=>{"use strict";Object.defineProperty(oP,"__esModule",{value:!0});var pz=require("fs"),dz=require("util"),Cz=iA(),uke=sP(),gke=dz.promisify(pz.stat);oP.default=async(r,e)=>{if(e&&"content-length"in e)return Number(e["content-length"]);if(!r)return 0;if(Cz.default.string(r))return Buffer.byteLength(r);if(Cz.default.buffer(r))return r.length;if(uke.default(r))return dz.promisify(r.getLength.bind(r))();if(r instanceof pz.ReadStream){let{size:t}=await gke(r.path);return t===0?void 0:t}}});var AP=w(aP=>{"use strict";Object.defineProperty(aP,"__esModule",{value:!0});function fke(r,e,t){let i={};for(let n of t)i[n]=(...s)=>{e.emit(n,...s)},r.on(n,i[n]);return()=>{for(let n of t)r.off(n,i[n])}}aP.default=fke});var Ez=w(lP=>{"use strict";Object.defineProperty(lP,"__esModule",{value:!0});lP.default=()=>{let r=[];return{once(e,t,i){e.once(t,i),r.push({origin:e,event:t,fn:i})},unhandleAll(){for(let e of r){let{origin:t,event:i,fn:n}=e;t.removeListener(i,n)}r.length=0}}}});var yz=w(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});Rd.TimeoutError=void 0;var hke=require("net"),pke=Ez(),Iz=Symbol("reentry"),dke=()=>{},cP=class extends Error{constructor(e,t){super(`Timeout awaiting '${t}' for ${e}ms`);this.event=t,this.name="TimeoutError",this.code="ETIMEDOUT"}};Rd.TimeoutError=cP;Rd.default=(r,e,t)=>{if(Iz in r)return dke;r[Iz]=!0;let i=[],{once:n,unhandleAll:s}=pke.default(),o=(g,f,h)=>{var p;let m=setTimeout(f,g,g,h);(p=m.unref)===null||p===void 0||p.call(m);let y=()=>{clearTimeout(m)};return i.push(y),y},{host:a,hostname:l}=t,c=(g,f)=>{r.destroy(new cP(g,f))},u=()=>{for(let g of i)g();s()};if(r.once("error",g=>{if(u(),r.listenerCount("error")===0)throw g}),r.once("close",u),n(r,"response",g=>{n(g,"end",u)}),typeof e.request!="undefined"&&o(e.request,c,"request"),typeof e.socket!="undefined"){let g=()=>{c(e.socket,"socket")};r.setTimeout(e.socket,g),i.push(()=>{r.removeListener("timeout",g)})}return n(r,"socket",g=>{var f;let{socketPath:h}=r;if(g.connecting){let p=Boolean(h!=null?h:hke.isIP((f=l!=null?l:a)!==null&&f!==void 0?f:"")!==0);if(typeof e.lookup!="undefined"&&!p&&typeof g.address().address=="undefined"){let m=o(e.lookup,c,"lookup");n(g,"lookup",m)}if(typeof e.connect!="undefined"){let m=()=>o(e.connect,c,"connect");p?n(g,"connect",m()):n(g,"lookup",y=>{y===null&&n(g,"connect",m())})}typeof e.secureConnect!="undefined"&&t.protocol==="https:"&&n(g,"connect",()=>{let m=o(e.secureConnect,c,"secureConnect");n(g,"secureConnect",m)})}if(typeof e.send!="undefined"){let p=()=>o(e.send,c,"send");g.connecting?n(g,"connect",()=>{n(r,"upload-complete",p())}):n(r,"upload-complete",p())}}),typeof e.response!="undefined"&&n(r,"upload-complete",()=>{let g=o(e.response,c,"response");n(r,"response",g)}),u}});var Bz=w(uP=>{"use strict";Object.defineProperty(uP,"__esModule",{value:!0});var wz=iA();uP.default=r=>{r=r;let e={protocol:r.protocol,hostname:wz.default.string(r.hostname)&&r.hostname.startsWith("[")?r.hostname.slice(1,-1):r.hostname,host:r.host,hash:r.hash,search:r.search,pathname:r.pathname,href:r.href,path:`${r.pathname||""}${r.search||""}`};return wz.default.string(r.port)&&r.port.length>0&&(e.port=Number(r.port)),(r.username||r.password)&&(e.auth=`${r.username||""}:${r.password||""}`),e}});var bz=w(gP=>{"use strict";Object.defineProperty(gP,"__esModule",{value:!0});var Cke=require("url"),mke=["protocol","host","hostname","port","pathname","search"];gP.default=(r,e)=>{var t,i;if(e.path){if(e.pathname)throw new TypeError("Parameters `path` and `pathname` are mutually exclusive.");if(e.search)throw new TypeError("Parameters `path` and `search` are mutually exclusive.");if(e.searchParams)throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive.")}if(e.search&&e.searchParams)throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive.");if(!r){if(!e.protocol)throw new TypeError("No URL protocol specified");r=`${e.protocol}//${(i=(t=e.hostname)!==null&&t!==void 0?t:e.host)!==null&&i!==void 0?i:""}`}let n=new Cke.URL(r);if(e.path){let s=e.path.indexOf("?");s===-1?e.pathname=e.path:(e.pathname=e.path.slice(0,s),e.search=e.path.slice(s+1)),delete e.path}for(let s of mke)e[s]&&(n[s]=e[s].toString());return n}});var Sz=w(fP=>{"use strict";Object.defineProperty(fP,"__esModule",{value:!0});var Qz=class{constructor(){this.weakMap=new WeakMap,this.map=new Map}set(e,t){typeof e=="object"?this.weakMap.set(e,t):this.map.set(e,t)}get(e){return typeof e=="object"?this.weakMap.get(e):this.map.get(e)}has(e){return typeof e=="object"?this.weakMap.has(e):this.map.has(e)}};fP.default=Qz});var pP=w(hP=>{"use strict";Object.defineProperty(hP,"__esModule",{value:!0});var Eke=async r=>{let e=[],t=0;for await(let i of r)e.push(i),t+=Buffer.byteLength(i);return Buffer.isBuffer(e[0])?Buffer.concat(e,t):Buffer.from(e.join(""))};hP.default=Eke});var xz=w(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});Vc.dnsLookupIpVersionToFamily=Vc.isDnsLookupIpVersion=void 0;var vz={auto:0,ipv4:4,ipv6:6};Vc.isDnsLookupIpVersion=r=>r in vz;Vc.dnsLookupIpVersionToFamily=r=>{if(Vc.isDnsLookupIpVersion(r))return vz[r];throw new Error("Invalid DNS lookup IP version")}});var dP=w(Dw=>{"use strict";Object.defineProperty(Dw,"__esModule",{value:!0});Dw.isResponseOk=void 0;Dw.isResponseOk=r=>{let{statusCode:e}=r,t=r.request.options.followRedirect?299:399;return e>=200&&e<=t||e===304}});var Pz=w(CP=>{"use strict";Object.defineProperty(CP,"__esModule",{value:!0});var kz=new Set;CP.default=r=>{kz.has(r)||(kz.add(r),process.emitWarning(`Got: ${r}`,{type:"DeprecationWarning"}))}});var Dz=w(mP=>{"use strict";Object.defineProperty(mP,"__esModule",{value:!0});var Ir=iA(),Ike=(r,e)=>{if(Ir.default.null_(r.encoding))throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");Ir.assert.any([Ir.default.string,Ir.default.undefined],r.encoding),Ir.assert.any([Ir.default.boolean,Ir.default.undefined],r.resolveBodyOnly),Ir.assert.any([Ir.default.boolean,Ir.default.undefined],r.methodRewriting),Ir.assert.any([Ir.default.boolean,Ir.default.undefined],r.isStream),Ir.assert.any([Ir.default.string,Ir.default.undefined],r.responseType),r.responseType===void 0&&(r.responseType="text");let{retry:t}=r;if(e?r.retry=N({},e.retry):r.retry={calculateDelay:i=>i.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:void 0},Ir.default.object(t)?(r.retry=N(N({},r.retry),t),r.retry.methods=[...new Set(r.retry.methods.map(i=>i.toUpperCase()))],r.retry.statusCodes=[...new Set(r.retry.statusCodes)],r.retry.errorCodes=[...new Set(r.retry.errorCodes)]):Ir.default.number(t)&&(r.retry.limit=t),Ir.default.undefined(r.retry.maxRetryAfter)&&(r.retry.maxRetryAfter=Math.min(...[r.timeout.request,r.timeout.connect].filter(Ir.default.number))),Ir.default.object(r.pagination)){e&&(r.pagination=N(N({},e.pagination),r.pagination));let{pagination:i}=r;if(!Ir.default.function_(i.transform))throw new Error("`options.pagination.transform` must be implemented");if(!Ir.default.function_(i.shouldContinue))throw new Error("`options.pagination.shouldContinue` must be implemented");if(!Ir.default.function_(i.filter))throw new TypeError("`options.pagination.filter` must be implemented");if(!Ir.default.function_(i.paginate))throw new Error("`options.pagination.paginate` must be implemented")}return r.responseType==="json"&&r.headers.accept===void 0&&(r.headers.accept="application/json"),r};mP.default=Ike});var Rz=w(Fd=>{"use strict";Object.defineProperty(Fd,"__esModule",{value:!0});Fd.retryAfterStatusCodes=void 0;Fd.retryAfterStatusCodes=new Set([413,429,503]);var yke=({attemptCount:r,retryOptions:e,error:t,retryAfter:i})=>{if(r>e.limit)return 0;let n=e.methods.includes(t.options.method),s=e.errorCodes.includes(t.code),o=t.response&&e.statusCodes.includes(t.response.statusCode);if(!n||!s&&!o)return 0;if(t.response){if(i)return e.maxRetryAfter===void 0||i>e.maxRetryAfter?0:i;if(t.response.statusCode===413)return 0}let a=Math.random()*100;return 2**(r-1)*1e3+a};Fd.default=yke});var Ld=w(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.UnsupportedProtocolError=qt.ReadError=qt.TimeoutError=qt.UploadError=qt.CacheError=qt.HTTPError=qt.MaxRedirectsError=qt.RequestError=qt.setNonEnumerableProperties=qt.knownHookEvents=qt.withoutBody=qt.kIsNormalizedAlready=void 0;var Fz=require("util"),Nz=require("stream"),wke=require("fs"),gl=require("url"),Lz=require("http"),EP=require("http"),Bke=require("https"),bke=Y4(),Qke=X4(),Tz=D8(),Ske=L8(),vke=fz(),xke=vw(),Ee=iA(),kke=mz(),Oz=sP(),Pke=AP(),Mz=yz(),Dke=Bz(),Kz=bz(),Rke=Sz(),Fke=pP(),Uz=xz(),Nke=dP(),fl=Pz(),Lke=Dz(),Tke=Rz(),IP,Fi=Symbol("request"),Rw=Symbol("response"),rf=Symbol("responseSize"),nf=Symbol("downloadedSize"),sf=Symbol("bodySize"),of=Symbol("uploadedSize"),Fw=Symbol("serverResponsesPiped"),Hz=Symbol("unproxyEvents"),jz=Symbol("isFromCache"),yP=Symbol("cancelTimeouts"),Gz=Symbol("startedReading"),af=Symbol("stopReading"),Nw=Symbol("triggerRead"),hl=Symbol("body"),Nd=Symbol("jobs"),Yz=Symbol("originalResponse"),qz=Symbol("retryTimeout");qt.kIsNormalizedAlready=Symbol("isNormalizedAlready");var Oke=Ee.default.string(process.versions.brotli);qt.withoutBody=new Set(["GET","HEAD"]);qt.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];function Mke(r){for(let e in r){let t=r[e];if(!Ee.default.string(t)&&!Ee.default.number(t)&&!Ee.default.boolean(t)&&!Ee.default.null_(t)&&!Ee.default.undefined(t))throw new TypeError(`The \`searchParams\` value '${String(t)}' must be a string, number, boolean or null`)}}function Kke(r){return Ee.default.object(r)&&!("statusCode"in r)}var wP=new Rke.default,Uke=async r=>new Promise((e,t)=>{let i=n=>{t(n)};r.pending||e(),r.once("error",i),r.once("ready",()=>{r.off("error",i),e()})}),Hke=new Set([300,301,302,303,304,307,308]),jke=["context","body","json","form"];qt.setNonEnumerableProperties=(r,e)=>{let t={};for(let i of r)if(!!i)for(let n of jke)n in i&&(t[n]={writable:!0,configurable:!0,enumerable:!1,value:i[n]});Object.defineProperties(e,t)};var hi=class extends Error{constructor(e,t,i){var n;super(e);if(Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=t.code,i instanceof BP?(Object.defineProperty(this,"request",{enumerable:!1,value:i}),Object.defineProperty(this,"response",{enumerable:!1,value:i[Rw]}),Object.defineProperty(this,"options",{enumerable:!1,value:i.options})):Object.defineProperty(this,"options",{enumerable:!1,value:i}),this.timings=(n=this.request)===null||n===void 0?void 0:n.timings,Ee.default.string(t.stack)&&Ee.default.string(this.stack)){let s=this.stack.indexOf(this.message)+this.message.length,o=this.stack.slice(s).split(` +`).reverse(),a=t.stack.slice(t.stack.indexOf(t.message)+t.message.length).split(` +`).reverse();for(;a.length!==0&&a[0]===o[0];)o.shift();this.stack=`${this.stack.slice(0,s)}${o.reverse().join(` +`)}${a.reverse().join(` +`)}`}}};qt.RequestError=hi;var bP=class extends hi{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e);this.name="MaxRedirectsError"}};qt.MaxRedirectsError=bP;var QP=class extends hi{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request);this.name="HTTPError"}};qt.HTTPError=QP;var SP=class extends hi{constructor(e,t){super(e.message,e,t);this.name="CacheError"}};qt.CacheError=SP;var vP=class extends hi{constructor(e,t){super(e.message,e,t);this.name="UploadError"}};qt.UploadError=vP;var xP=class extends hi{constructor(e,t,i){super(e.message,e,i);this.name="TimeoutError",this.event=e.event,this.timings=t}};qt.TimeoutError=xP;var Lw=class extends hi{constructor(e,t){super(e.message,e,t);this.name="ReadError"}};qt.ReadError=Lw;var kP=class extends hi{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e);this.name="UnsupportedProtocolError"}};qt.UnsupportedProtocolError=kP;var Gke=["socket","connect","continue","information","upgrade","timeout"],BP=class extends Nz.Duplex{constructor(e,t={},i){super({autoDestroy:!1,highWaterMark:0});this[nf]=0,this[of]=0,this.requestInitialized=!1,this[Fw]=new Set,this.redirects=[],this[af]=!1,this[Nw]=!1,this[Nd]=[],this.retryCount=0,this._progressCallbacks=[];let n=()=>this._unlockWrite(),s=()=>this._lockWrite();this.on("pipe",c=>{c.prependListener("data",n),c.on("data",s),c.prependListener("end",n),c.on("end",s)}),this.on("unpipe",c=>{c.off("data",n),c.off("data",s),c.off("end",n),c.off("end",s)}),this.on("pipe",c=>{c instanceof EP.IncomingMessage&&(this.options.headers=N(N({},c.headers),this.options.headers))});let{json:o,body:a,form:l}=t;if((o||a||l)&&this._lockWrite(),qt.kIsNormalizedAlready in t)this.options=t;else try{this.options=this.constructor.normalizeArguments(e,t,i)}catch(c){Ee.default.nodeStream(t.body)&&t.body.destroy(),this.destroy(c);return}(async()=>{var c;try{this.options.body instanceof wke.ReadStream&&await Uke(this.options.body);let{url:u}=this.options;if(!u)throw new TypeError("Missing `url` property");if(this.requestUrl=u.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(c=this[Fi])===null||c===void 0||c.destroy();return}for(let g of this[Nd])g();this[Nd].length=0,this.requestInitialized=!0}catch(u){if(u instanceof hi){this._beforeError(u);return}this.destroyed||this.destroy(u)}})()}static normalizeArguments(e,t,i){var n,s,o,a,l;let c=t;if(Ee.default.object(e)&&!Ee.default.urlInstance(e))t=N(N(N({},i),e),t);else{if(e&&t&&t.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");t=N(N({},i),t),e!==void 0&&(t.url=e),Ee.default.urlInstance(t.url)&&(t.url=new gl.URL(t.url.toString()))}if(t.cache===!1&&(t.cache=void 0),t.dnsCache===!1&&(t.dnsCache=void 0),Ee.assert.any([Ee.default.string,Ee.default.undefined],t.method),Ee.assert.any([Ee.default.object,Ee.default.undefined],t.headers),Ee.assert.any([Ee.default.string,Ee.default.urlInstance,Ee.default.undefined],t.prefixUrl),Ee.assert.any([Ee.default.object,Ee.default.undefined],t.cookieJar),Ee.assert.any([Ee.default.object,Ee.default.string,Ee.default.undefined],t.searchParams),Ee.assert.any([Ee.default.object,Ee.default.string,Ee.default.undefined],t.cache),Ee.assert.any([Ee.default.object,Ee.default.number,Ee.default.undefined],t.timeout),Ee.assert.any([Ee.default.object,Ee.default.undefined],t.context),Ee.assert.any([Ee.default.object,Ee.default.undefined],t.hooks),Ee.assert.any([Ee.default.boolean,Ee.default.undefined],t.decompress),Ee.assert.any([Ee.default.boolean,Ee.default.undefined],t.ignoreInvalidCookies),Ee.assert.any([Ee.default.boolean,Ee.default.undefined],t.followRedirect),Ee.assert.any([Ee.default.number,Ee.default.undefined],t.maxRedirects),Ee.assert.any([Ee.default.boolean,Ee.default.undefined],t.throwHttpErrors),Ee.assert.any([Ee.default.boolean,Ee.default.undefined],t.http2),Ee.assert.any([Ee.default.boolean,Ee.default.undefined],t.allowGetBody),Ee.assert.any([Ee.default.string,Ee.default.undefined],t.localAddress),Ee.assert.any([Uz.isDnsLookupIpVersion,Ee.default.undefined],t.dnsLookupIpVersion),Ee.assert.any([Ee.default.object,Ee.default.undefined],t.https),Ee.assert.any([Ee.default.boolean,Ee.default.undefined],t.rejectUnauthorized),t.https&&(Ee.assert.any([Ee.default.boolean,Ee.default.undefined],t.https.rejectUnauthorized),Ee.assert.any([Ee.default.function_,Ee.default.undefined],t.https.checkServerIdentity),Ee.assert.any([Ee.default.string,Ee.default.object,Ee.default.array,Ee.default.undefined],t.https.certificateAuthority),Ee.assert.any([Ee.default.string,Ee.default.object,Ee.default.array,Ee.default.undefined],t.https.key),Ee.assert.any([Ee.default.string,Ee.default.object,Ee.default.array,Ee.default.undefined],t.https.certificate),Ee.assert.any([Ee.default.string,Ee.default.undefined],t.https.passphrase),Ee.assert.any([Ee.default.string,Ee.default.buffer,Ee.default.array,Ee.default.undefined],t.https.pfx)),Ee.assert.any([Ee.default.object,Ee.default.undefined],t.cacheOptions),Ee.default.string(t.method)?t.method=t.method.toUpperCase():t.method="GET",t.headers===(i==null?void 0:i.headers)?t.headers=N({},t.headers):t.headers=xke(N(N({},i==null?void 0:i.headers),t.headers)),"slashes"in t)throw new TypeError("The legacy `url.Url` has been deprecated. Use `URL` instead.");if("auth"in t)throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead.");if("searchParams"in t&&t.searchParams&&t.searchParams!==(i==null?void 0:i.searchParams)){let h;if(Ee.default.string(t.searchParams)||t.searchParams instanceof gl.URLSearchParams)h=new gl.URLSearchParams(t.searchParams);else{Mke(t.searchParams),h=new gl.URLSearchParams;for(let p in t.searchParams){let m=t.searchParams[p];m===null?h.append(p,""):m!==void 0&&h.append(p,m)}}(n=i==null?void 0:i.searchParams)===null||n===void 0||n.forEach((p,m)=>{h.has(m)||h.append(m,p)}),t.searchParams=h}if(t.username=(s=t.username)!==null&&s!==void 0?s:"",t.password=(o=t.password)!==null&&o!==void 0?o:"",Ee.default.undefined(t.prefixUrl)?t.prefixUrl=(a=i==null?void 0:i.prefixUrl)!==null&&a!==void 0?a:"":(t.prefixUrl=t.prefixUrl.toString(),t.prefixUrl!==""&&!t.prefixUrl.endsWith("/")&&(t.prefixUrl+="/")),Ee.default.string(t.url)){if(t.url.startsWith("/"))throw new Error("`input` must not start with a slash when using `prefixUrl`");t.url=Kz.default(t.prefixUrl+t.url,t)}else(Ee.default.undefined(t.url)&&t.prefixUrl!==""||t.protocol)&&(t.url=Kz.default(t.prefixUrl,t));if(t.url){"port"in t&&delete t.port;let{prefixUrl:h}=t;Object.defineProperty(t,"prefixUrl",{set:m=>{let y=t.url;if(!y.href.startsWith(m))throw new Error(`Cannot change \`prefixUrl\` from ${h} to ${m}: ${y.href}`);t.url=new gl.URL(m+y.href.slice(h.length)),h=m},get:()=>h});let{protocol:p}=t.url;if(p==="unix:"&&(p="http:",t.url=new gl.URL(`http://unix${t.url.pathname}${t.url.search}`)),t.searchParams&&(t.url.search=t.searchParams.toString()),p!=="http:"&&p!=="https:")throw new kP(t);t.username===""?t.username=t.url.username:t.url.username=t.username,t.password===""?t.password=t.url.password:t.url.password=t.password}let{cookieJar:u}=t;if(u){let{setCookie:h,getCookieString:p}=u;Ee.assert.function_(h),Ee.assert.function_(p),h.length===4&&p.length===0&&(h=Fz.promisify(h.bind(t.cookieJar)),p=Fz.promisify(p.bind(t.cookieJar)),t.cookieJar={setCookie:h,getCookieString:p})}let{cache:g}=t;if(g&&(wP.has(g)||wP.set(g,new Tz((h,p)=>{let m=h[Fi](h,p);return Ee.default.promise(m)&&(m.once=(y,b)=>{if(y==="error")m.catch(b);else if(y==="abort")(async()=>{try{(await m).once("abort",b)}catch(v){}})();else throw new Error(`Unknown HTTP2 promise event: ${y}`);return m}),m},g))),t.cacheOptions=N({},t.cacheOptions),t.dnsCache===!0)IP||(IP=new Qke.default),t.dnsCache=IP;else if(!Ee.default.undefined(t.dnsCache)&&!t.dnsCache.lookup)throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${Ee.default(t.dnsCache)}`);Ee.default.number(t.timeout)?t.timeout={request:t.timeout}:i&&t.timeout!==i.timeout?t.timeout=N(N({},i.timeout),t.timeout):t.timeout=N({},t.timeout),t.context||(t.context={});let f=t.hooks===(i==null?void 0:i.hooks);t.hooks=N({},t.hooks);for(let h of qt.knownHookEvents)if(h in t.hooks)if(Ee.default.array(t.hooks[h]))t.hooks[h]=[...t.hooks[h]];else throw new TypeError(`Parameter \`${h}\` must be an Array, got ${Ee.default(t.hooks[h])}`);else t.hooks[h]=[];if(i&&!f)for(let h of qt.knownHookEvents)i.hooks[h].length>0&&(t.hooks[h]=[...i.hooks[h],...t.hooks[h]]);if("family"in t&&fl.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'),(i==null?void 0:i.https)&&(t.https=N(N({},i.https),t.https)),"rejectUnauthorized"in t&&fl.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'),"checkServerIdentity"in t&&fl.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'),"ca"in t&&fl.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'),"key"in t&&fl.default('"options.key" was never documented, please use "options.https.key"'),"cert"in t&&fl.default('"options.cert" was never documented, please use "options.https.certificate"'),"passphrase"in t&&fl.default('"options.passphrase" was never documented, please use "options.https.passphrase"'),"pfx"in t&&fl.default('"options.pfx" was never documented, please use "options.https.pfx"'),"followRedirects"in t)throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.");if(t.agent){for(let h in t.agent)if(h!=="http"&&h!=="https"&&h!=="http2")throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${h}\``)}return t.maxRedirects=(l=t.maxRedirects)!==null&&l!==void 0?l:0,qt.setNonEnumerableProperties([i,c],t),Lke.default(t,i)}_lockWrite(){let e=()=>{throw new TypeError("The payload has been already provided")};this.write=e,this.end=e}_unlockWrite(){this.write=super.write,this.end=super.end}async _finalizeBody(){let{options:e}=this,{headers:t}=e,i=!Ee.default.undefined(e.form),n=!Ee.default.undefined(e.json),s=!Ee.default.undefined(e.body),o=i||n||s,a=qt.withoutBody.has(e.method)&&!(e.method==="GET"&&e.allowGetBody);if(this._cannotHaveBody=a,o){if(a)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);if([s,i,n].filter(l=>l).length>1)throw new TypeError("The `body`, `json` and `form` options are mutually exclusive");if(s&&!(e.body instanceof Nz.Readable)&&!Ee.default.string(e.body)&&!Ee.default.buffer(e.body)&&!Oz.default(e.body))throw new TypeError("The `body` option must be a stream.Readable, string or Buffer");if(i&&!Ee.default.object(e.form))throw new TypeError("The `form` option must be an Object");{let l=!Ee.default.string(t["content-type"]);s?(Oz.default(e.body)&&l&&(t["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`),this[hl]=e.body):i?(l&&(t["content-type"]="application/x-www-form-urlencoded"),this[hl]=new gl.URLSearchParams(e.form).toString()):(l&&(t["content-type"]="application/json"),this[hl]=e.stringifyJson(e.json));let c=await kke.default(this[hl],e.headers);Ee.default.undefined(t["content-length"])&&Ee.default.undefined(t["transfer-encoding"])&&!a&&!Ee.default.undefined(c)&&(t["content-length"]=String(c))}}else a?this._lockWrite():this._unlockWrite();this[sf]=Number(t["content-length"])||void 0}async _onResponseBase(e){let{options:t}=this,{url:i}=t;this[Yz]=e,t.decompress&&(e=Ske(e));let n=e.statusCode,s=e;s.statusMessage=s.statusMessage?s.statusMessage:Lz.STATUS_CODES[n],s.url=t.url.toString(),s.requestUrl=this.requestUrl,s.redirectUrls=this.redirects,s.request=this,s.isFromCache=e.fromCache||!1,s.ip=this.ip,s.retryCount=this.retryCount,this[jz]=s.isFromCache,this[rf]=Number(e.headers["content-length"])||void 0,this[Rw]=e,e.once("end",()=>{this[rf]=this[nf],this.emit("downloadProgress",this.downloadProgress)}),e.once("error",a=>{e.destroy(),this._beforeError(new Lw(a,this))}),e.once("aborted",()=>{this._beforeError(new Lw({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);let o=e.headers["set-cookie"];if(Ee.default.object(t.cookieJar)&&o){let a=o.map(async l=>t.cookieJar.setCookie(l,i.toString()));t.ignoreInvalidCookies&&(a=a.map(async l=>l.catch(()=>{})));try{await Promise.all(a)}catch(l){this._beforeError(l);return}}if(t.followRedirect&&e.headers.location&&Hke.has(n)){if(e.resume(),this[Fi]&&(this[yP](),delete this[Fi],this[Hz]()),(n===303&&t.method!=="GET"&&t.method!=="HEAD"||!t.methodRewriting)&&(t.method="GET","body"in t&&delete t.body,"json"in t&&delete t.json,"form"in t&&delete t.form,this[hl]=void 0,delete t.headers["content-length"]),this.redirects.length>=t.maxRedirects){this._beforeError(new bP(this));return}try{let l=Buffer.from(e.headers.location,"binary").toString(),c=new gl.URL(l,i),u=c.toString();decodeURI(u),c.hostname!==i.hostname||c.port!==i.port?("host"in t.headers&&delete t.headers.host,"cookie"in t.headers&&delete t.headers.cookie,"authorization"in t.headers&&delete t.headers.authorization,(t.username||t.password)&&(t.username="",t.password="")):(c.username=t.username,c.password=t.password),this.redirects.push(u),t.url=c;for(let g of t.hooks.beforeRedirect)await g(t,s);this.emit("redirect",s,t),await this._makeRequest()}catch(l){this._beforeError(l);return}return}if(t.isStream&&t.throwHttpErrors&&!Nke.isResponseOk(s)){this._beforeError(new QP(s));return}e.on("readable",()=>{this[Nw]&&this._read()}),this.on("resume",()=>{e.resume()}),this.on("pause",()=>{e.pause()}),e.once("end",()=>{this.push(null)}),this.emit("response",e);for(let a of this[Fw])if(!a.headersSent){for(let l in e.headers){let c=t.decompress?l!=="content-encoding":!0,u=e.headers[l];c&&a.setHeader(l,u)}a.statusCode=n}}async _onResponse(e){try{await this._onResponseBase(e)}catch(t){this._beforeError(t)}}_onRequest(e){let{options:t}=this,{timeout:i,url:n}=t;bke.default(e),this[yP]=Mz.default(e,i,n);let s=t.cache?"cacheableResponse":"response";e.once(s,l=>{this._onResponse(l)}),e.once("error",l=>{var c;e.destroy(),(c=e.res)===null||c===void 0||c.removeAllListeners("end"),l=l instanceof Mz.TimeoutError?new xP(l,this.timings,this):new hi(l.message,l,this),this._beforeError(l)}),this[Hz]=Pke.default(e,this,Gke),this[Fi]=e,this.emit("uploadProgress",this.uploadProgress);let o=this[hl],a=this.redirects.length===0?this:e;Ee.default.nodeStream(o)?(o.pipe(a),o.once("error",l=>{this._beforeError(new vP(l,this))})):(this._unlockWrite(),Ee.default.undefined(o)?(this._cannotHaveBody||this._noPipe)&&(a.end(),this._lockWrite()):(this._writeRequest(o,void 0,()=>{}),a.end(),this._lockWrite())),this.emit("request",e)}async _createCacheableRequest(e,t){return new Promise((i,n)=>{Object.assign(t,Dke.default(e)),delete t.url;let s,o=wP.get(t.cache)(t,async a=>{a._readableState.autoDestroy=!1,s&&(await s).emit("cacheableResponse",a),i(a)});t.url=e,o.once("error",n),o.once("request",async a=>{s=a,i(s)})})}async _makeRequest(){var e,t,i,n,s;let{options:o}=this,{headers:a}=o;for(let b in a)if(Ee.default.undefined(a[b]))delete a[b];else if(Ee.default.null_(a[b]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${b}\` header`);if(o.decompress&&Ee.default.undefined(a["accept-encoding"])&&(a["accept-encoding"]=Oke?"gzip, deflate, br":"gzip, deflate"),o.cookieJar){let b=await o.cookieJar.getCookieString(o.url.toString());Ee.default.nonEmptyString(b)&&(o.headers.cookie=b)}for(let b of o.hooks.beforeRequest){let v=await b(o);if(!Ee.default.undefined(v)){o.request=()=>v;break}}o.body&&this[hl]!==o.body&&(this[hl]=o.body);let{agent:l,request:c,timeout:u,url:g}=o;if(o.dnsCache&&!("lookup"in o)&&(o.lookup=o.dnsCache.lookup),g.hostname==="unix"){let b=/(?.+?):(?.+)/.exec(`${g.pathname}${g.search}`);if(b==null?void 0:b.groups){let{socketPath:v,path:x}=b.groups;Object.assign(o,{socketPath:v,path:x,host:""})}}let f=g.protocol==="https:",h;o.http2?h=vke.auto:h=f?Bke.request:Lz.request;let p=(e=o.request)!==null&&e!==void 0?e:h,m=o.cache?this._createCacheableRequest:p;l&&!o.http2&&(o.agent=l[f?"https":"http"]),o[Fi]=p,delete o.request,delete o.timeout;let y=o;if(y.shared=(t=o.cacheOptions)===null||t===void 0?void 0:t.shared,y.cacheHeuristic=(i=o.cacheOptions)===null||i===void 0?void 0:i.cacheHeuristic,y.immutableMinTimeToLive=(n=o.cacheOptions)===null||n===void 0?void 0:n.immutableMinTimeToLive,y.ignoreCargoCult=(s=o.cacheOptions)===null||s===void 0?void 0:s.ignoreCargoCult,o.dnsLookupIpVersion!==void 0)try{y.family=Uz.dnsLookupIpVersionToFamily(o.dnsLookupIpVersion)}catch(b){throw new Error("Invalid `dnsLookupIpVersion` option value")}o.https&&("rejectUnauthorized"in o.https&&(y.rejectUnauthorized=o.https.rejectUnauthorized),o.https.checkServerIdentity&&(y.checkServerIdentity=o.https.checkServerIdentity),o.https.certificateAuthority&&(y.ca=o.https.certificateAuthority),o.https.certificate&&(y.cert=o.https.certificate),o.https.key&&(y.key=o.https.key),o.https.passphrase&&(y.passphrase=o.https.passphrase),o.https.pfx&&(y.pfx=o.https.pfx));try{let b=await m(g,y);Ee.default.undefined(b)&&(b=h(g,y)),o.request=c,o.timeout=u,o.agent=l,o.https&&("rejectUnauthorized"in o.https&&delete y.rejectUnauthorized,o.https.checkServerIdentity&&delete y.checkServerIdentity,o.https.certificateAuthority&&delete y.ca,o.https.certificate&&delete y.cert,o.https.key&&delete y.key,o.https.passphrase&&delete y.passphrase,o.https.pfx&&delete y.pfx),Kke(b)?this._onRequest(b):this.writable?(this.once("finish",()=>{this._onResponse(b)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(b)}catch(b){throw b instanceof Tz.CacheError?new SP(b,this):new hi(b.message,b,this)}}async _error(e){try{for(let t of this.options.hooks.beforeError)e=await t(e)}catch(t){e=new hi(t.message,t,this)}this.destroy(e)}_beforeError(e){if(this[af])return;let{options:t}=this,i=this.retryCount+1;this[af]=!0,e instanceof hi||(e=new hi(e.message,e,this));let n=e,{response:s}=n;(async()=>{if(s&&!s.body){s.setEncoding(this._readableState.encoding);try{s.rawBody=await Fke.default(s),s.body=s.rawBody.toString()}catch(o){}}if(this.listenerCount("retry")!==0){let o;try{let a;s&&"retry-after"in s.headers&&(a=Number(s.headers["retry-after"]),Number.isNaN(a)?(a=Date.parse(s.headers["retry-after"])-Date.now(),a<=0&&(a=1)):a*=1e3),o=await t.retry.calculateDelay({attemptCount:i,retryOptions:t.retry,error:n,retryAfter:a,computedValue:Tke.default({attemptCount:i,retryOptions:t.retry,error:n,retryAfter:a,computedValue:0})})}catch(a){this._error(new hi(a.message,a,this));return}if(o){let a=async()=>{try{for(let l of this.options.hooks.beforeRetry)await l(this.options,n,i)}catch(l){this._error(new hi(l.message,e,this));return}this.destroyed||(this.destroy(),this.emit("retry",i,e))};this[qz]=setTimeout(a,o);return}}this._error(n)})()}_read(){this[Nw]=!0;let e=this[Rw];if(e&&!this[af]){e.readableLength&&(this[Nw]=!1);let t;for(;(t=e.read())!==null;){this[nf]+=t.length,this[Gz]=!0;let i=this.downloadProgress;i.percent<1&&this.emit("downloadProgress",i),this.push(t)}}}_write(e,t,i){let n=()=>{this._writeRequest(e,t,i)};this.requestInitialized?n():this[Nd].push(n)}_writeRequest(e,t,i){this[Fi].destroyed||(this._progressCallbacks.push(()=>{this[of]+=Buffer.byteLength(e,t);let n=this.uploadProgress;n.percent<1&&this.emit("uploadProgress",n)}),this[Fi].write(e,t,n=>{!n&&this._progressCallbacks.length>0&&this._progressCallbacks.shift()(),i(n)}))}_final(e){let t=()=>{for(;this._progressCallbacks.length!==0;)this._progressCallbacks.shift()();if(!(Fi in this)){e();return}if(this[Fi].destroyed){e();return}this[Fi].end(i=>{i||(this[sf]=this[of],this.emit("uploadProgress",this.uploadProgress),this[Fi].emit("upload-complete")),e(i)})};this.requestInitialized?t():this[Nd].push(t)}_destroy(e,t){var i;this[af]=!0,clearTimeout(this[qz]),Fi in this&&(this[yP](),((i=this[Rw])===null||i===void 0?void 0:i.complete)||this[Fi].destroy()),e!==null&&!Ee.default.undefined(e)&&!(e instanceof hi)&&(e=new hi(e.message,e,this)),t(e)}get _isAboutToError(){return this[af]}get ip(){var e;return(e=this.socket)===null||e===void 0?void 0:e.remoteAddress}get aborted(){var e,t,i;return((t=(e=this[Fi])===null||e===void 0?void 0:e.destroyed)!==null&&t!==void 0?t:this.destroyed)&&!((i=this[Yz])===null||i===void 0?void 0:i.complete)}get socket(){var e,t;return(t=(e=this[Fi])===null||e===void 0?void 0:e.socket)!==null&&t!==void 0?t:void 0}get downloadProgress(){let e;return this[rf]?e=this[nf]/this[rf]:this[rf]===this[nf]?e=1:e=0,{percent:e,transferred:this[nf],total:this[rf]}}get uploadProgress(){let e;return this[sf]?e=this[of]/this[sf]:this[sf]===this[of]?e=1:e=0,{percent:e,transferred:this[of],total:this[sf]}}get timings(){var e;return(e=this[Fi])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[jz]}pipe(e,t){if(this[Gz])throw new Error("Failed to pipe. The response has been emitted already.");return e instanceof EP.ServerResponse&&this[Fw].add(e),super.pipe(e,t)}unpipe(e){return e instanceof EP.ServerResponse&&this[Fw].delete(e),super.unpipe(e),this}};qt.default=BP});var Td=w(Co=>{"use strict";var Yke=Co&&Co.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=t),Object.defineProperty(r,i,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),qke=Co&&Co.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Yke(e,r,t)};Object.defineProperty(Co,"__esModule",{value:!0});Co.CancelError=Co.ParseError=void 0;var Jz=Ld(),Wz=class extends Jz.RequestError{constructor(e,t){let{options:i}=t.request;super(`${e.message} in "${i.url.toString()}"`,e,t.request);this.name="ParseError"}};Co.ParseError=Wz;var zz=class extends Jz.RequestError{constructor(e){super("Promise was canceled",{},e);this.name="CancelError"}get isCanceled(){return!0}};Co.CancelError=zz;qke(Ld(),Co)});var Vz=w(PP=>{"use strict";Object.defineProperty(PP,"__esModule",{value:!0});var _z=Td(),Jke=(r,e,t,i)=>{let{rawBody:n}=r;try{if(e==="text")return n.toString(i);if(e==="json")return n.length===0?"":t(n.toString());if(e==="buffer")return n;throw new _z.ParseError({message:`Unknown body type '${e}'`,name:"Error"},r)}catch(s){throw new _z.ParseError(s,r)}};PP.default=Jke});var DP=w(pl=>{"use strict";var Wke=pl&&pl.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=t),Object.defineProperty(r,i,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),zke=pl&&pl.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Wke(e,r,t)};Object.defineProperty(pl,"__esModule",{value:!0});var _ke=require("events"),Vke=iA(),Xke=j4(),Tw=Td(),Xz=Vz(),Zz=Ld(),Zke=AP(),$ke=pP(),$z=dP(),ePe=["request","response","redirect","uploadProgress","downloadProgress"];function e5(r){let e,t,i=new _ke.EventEmitter,n=new Xke((o,a,l)=>{let c=u=>{let g=new Zz.default(void 0,r);g.retryCount=u,g._noPipe=!0,l(()=>g.destroy()),l.shouldReject=!1,l(()=>a(new Tw.CancelError(g))),e=g,g.once("response",async p=>{var m;if(p.retryCount=u,p.request.aborted)return;let y;try{y=await $ke.default(g),p.rawBody=y}catch(T){return}if(g._isAboutToError)return;let b=((m=p.headers["content-encoding"])!==null&&m!==void 0?m:"").toLowerCase(),v=["gzip","deflate","br"].includes(b),{options:x}=g;if(v&&!x.decompress)p.body=y;else try{p.body=Xz.default(p,x.responseType,x.parseJson,x.encoding)}catch(T){if(p.body=y.toString(),$z.isResponseOk(p)){g._beforeError(T);return}}try{for(let[T,q]of x.hooks.afterResponse.entries())p=await q(p,async Y=>{let $=Zz.default.normalizeArguments(void 0,te(N({},Y),{retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1}),x);$.hooks.afterResponse=$.hooks.afterResponse.slice(0,T);for(let ne of $.hooks.beforeRetry)await ne($);let _=e5($);return l(()=>{_.catch(()=>{}),_.cancel()}),_})}catch(T){g._beforeError(new Tw.RequestError(T.message,T,g));return}if(!$z.isResponseOk(p)){g._beforeError(new Tw.HTTPError(p));return}t=p,o(g.options.resolveBodyOnly?p.body:p)});let f=p=>{if(n.isCanceled)return;let{options:m}=g;if(p instanceof Tw.HTTPError&&!m.throwHttpErrors){let{response:y}=p;o(g.options.resolveBodyOnly?y.body:y);return}a(p)};g.once("error",f);let h=g.options.body;g.once("retry",(p,m)=>{var y,b;if(h===((y=m.request)===null||y===void 0?void 0:y.options.body)&&Vke.default.nodeStream((b=m.request)===null||b===void 0?void 0:b.options.body)){f(m);return}c(p)}),Zke.default(g,i,ePe)};c(0)});n.on=(o,a)=>(i.on(o,a),n);let s=o=>{let a=(async()=>{await n;let{options:l}=t.request;return Xz.default(t,o,l.parseJson,l.encoding)})();return Object.defineProperties(a,Object.getOwnPropertyDescriptors(n)),a};return n.json=()=>{let{headers:o}=e.options;return!e.writableFinished&&o.accept===void 0&&(o.accept="application/json"),s("json")},n.buffer=()=>s("buffer"),n.text=()=>s("text"),n}pl.default=e5;zke(Td(),pl)});var t5=w(RP=>{"use strict";Object.defineProperty(RP,"__esModule",{value:!0});var tPe=Td();function rPe(r,...e){let t=(async()=>{if(r instanceof tPe.RequestError)try{for(let n of e)if(n)for(let s of n)r=await s(r)}catch(n){r=n}throw r})(),i=()=>t;return t.json=i,t.text=i,t.buffer=i,t.on=i,t}RP.default=rPe});var n5=w(FP=>{"use strict";Object.defineProperty(FP,"__esModule",{value:!0});var r5=iA();function i5(r){for(let e of Object.values(r))(r5.default.plainObject(e)||r5.default.array(e))&&i5(e);return Object.freeze(r)}FP.default=i5});var o5=w(s5=>{"use strict";Object.defineProperty(s5,"__esModule",{value:!0})});var NP=w(Ts=>{"use strict";var iPe=Ts&&Ts.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=t),Object.defineProperty(r,i,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),nPe=Ts&&Ts.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&iPe(e,r,t)};Object.defineProperty(Ts,"__esModule",{value:!0});Ts.defaultHandler=void 0;var a5=iA(),Os=DP(),sPe=t5(),Ow=Ld(),oPe=n5(),aPe={RequestError:Os.RequestError,CacheError:Os.CacheError,ReadError:Os.ReadError,HTTPError:Os.HTTPError,MaxRedirectsError:Os.MaxRedirectsError,TimeoutError:Os.TimeoutError,ParseError:Os.ParseError,CancelError:Os.CancelError,UnsupportedProtocolError:Os.UnsupportedProtocolError,UploadError:Os.UploadError},APe=async r=>new Promise(e=>{setTimeout(e,r)}),{normalizeArguments:Mw}=Ow.default,A5=(...r)=>{let e;for(let t of r)e=Mw(void 0,t,e);return e},lPe=r=>r.isStream?new Ow.default(void 0,r):Os.default(r),cPe=r=>"defaults"in r&&"options"in r.defaults,uPe=["get","post","put","patch","head","delete"];Ts.defaultHandler=(r,e)=>e(r);var l5=(r,e)=>{if(r)for(let t of r)t(e)},c5=r=>{r._rawHandlers=r.handlers,r.handlers=r.handlers.map(i=>(n,s)=>{let o,a=i(n,l=>(o=s(l),o));if(a!==o&&!n.isStream&&o){let l=a,{then:c,catch:u,finally:g}=l;Object.setPrototypeOf(l,Object.getPrototypeOf(o)),Object.defineProperties(l,Object.getOwnPropertyDescriptors(o)),l.then=c,l.catch=u,l.finally=g}return a});let e=(i,n={},s)=>{var o,a;let l=0,c=u=>r.handlers[l++](u,l===r.handlers.length?lPe:c);if(a5.default.plainObject(i)){let u=N(N({},i),n);Ow.setNonEnumerableProperties([i,n],u),n=u,i=void 0}try{let u;try{l5(r.options.hooks.init,n),l5((o=n.hooks)===null||o===void 0?void 0:o.init,n)}catch(f){u=f}let g=Mw(i,n,s!=null?s:r.options);if(g[Ow.kIsNormalizedAlready]=!0,u)throw new Os.RequestError(u.message,u,g);return c(g)}catch(u){if(n.isStream)throw u;return sPe.default(u,r.options.hooks.beforeError,(a=n.hooks)===null||a===void 0?void 0:a.beforeError)}};e.extend=(...i)=>{let n=[r.options],s=[...r._rawHandlers],o;for(let a of i)cPe(a)?(n.push(a.defaults.options),s.push(...a.defaults._rawHandlers),o=a.defaults.mutableDefaults):(n.push(a),"handlers"in a&&s.push(...a.handlers),o=a.mutableDefaults);return s=s.filter(a=>a!==Ts.defaultHandler),s.length===0&&s.push(Ts.defaultHandler),c5({options:A5(...n),handlers:s,mutableDefaults:Boolean(o)})};let t=async function*(i,n){let s=Mw(i,n,r.options);s.resolveBodyOnly=!1;let o=s.pagination;if(!a5.default.object(o))throw new TypeError("`options.pagination` must be implemented");let a=[],{countLimit:l}=o,c=0;for(;c{let s=[];for await(let o of t(i,n))s.push(o);return s},e.paginate.each=t,e.stream=(i,n)=>e(i,te(N({},n),{isStream:!0}));for(let i of uPe)e[i]=(n,s)=>e(n,te(N({},s),{method:i})),e.stream[i]=(n,s)=>e(n,te(N({},s),{method:i,isStream:!0}));return Object.assign(e,aPe),Object.defineProperty(e,"defaults",{value:r.mutableDefaults?r:oPe.default(r),writable:r.mutableDefaults,configurable:r.mutableDefaults,enumerable:!0}),e.mergeOptions=A5,e};Ts.default=c5;nPe(o5(),Ts)});var Uw=w((sA,Kw)=>{"use strict";var gPe=sA&&sA.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=t),Object.defineProperty(r,i,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),u5=sA&&sA.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&gPe(e,r,t)};Object.defineProperty(sA,"__esModule",{value:!0});var fPe=require("url"),g5=NP(),hPe={options:{method:"GET",retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:r})=>r},timeout:{},headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:void 0,dnsCache:void 0,decompress:!0,throwHttpErrors:!0,followRedirect:!0,isStream:!1,responseType:"text",resolveBodyOnly:!1,maxRedirects:10,prefixUrl:"",methodRewriting:!0,ignoreInvalidCookies:!1,context:{},http2:!1,allowGetBody:!1,https:void 0,pagination:{transform:r=>r.request.options.responseType==="json"?r.body:JSON.parse(r.body),paginate:r=>{if(!Reflect.has(r.headers,"link"))return!1;let e=r.headers.link.split(","),t;for(let i of e){let n=i.split(";");if(n[1].includes("next")){t=n[0].trimStart().trim(),t=t.slice(1,-1);break}}return t?{url:new fPe.URL(t)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:Infinity,backoff:0,requestLimit:1e4,stackAllItems:!0},parseJson:r=>JSON.parse(r),stringifyJson:r=>JSON.stringify(r),cacheOptions:{}},handlers:[g5.defaultHandler],mutableDefaults:!1},LP=g5.default(hPe);sA.default=LP;Kw.exports=LP;Kw.exports.default=LP;Kw.exports.__esModule=!0;u5(NP(),sA);u5(DP(),sA)});var d5=w(Af=>{"use strict";var znt=require("net"),pPe=require("tls"),TP=require("http"),f5=require("https"),dPe=require("events"),_nt=require("assert"),CPe=require("util");Af.httpOverHttp=mPe;Af.httpsOverHttp=EPe;Af.httpOverHttps=IPe;Af.httpsOverHttps=yPe;function mPe(r){var e=new oA(r);return e.request=TP.request,e}function EPe(r){var e=new oA(r);return e.request=TP.request,e.createSocket=h5,e.defaultPort=443,e}function IPe(r){var e=new oA(r);return e.request=f5.request,e}function yPe(r){var e=new oA(r);return e.request=f5.request,e.createSocket=h5,e.defaultPort=443,e}function oA(r){var e=this;e.options=r||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||TP.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(i,n,s,o){for(var a=p5(n,s,o),l=0,c=e.requests.length;l=this.maxSockets){s.requests.push(o);return}s.createSocket(o,function(a){a.on("free",l),a.on("close",c),a.on("agentRemove",c),e.onSocket(a);function l(){s.emit("free",a,o)}function c(u){s.removeSocket(a),a.removeListener("free",l),a.removeListener("close",c),a.removeListener("agentRemove",c)}})};oA.prototype.createSocket=function(e,t){var i=this,n={};i.sockets.push(n);var s=OP({},i.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(s.localAddress=e.localAddress),s.proxyAuth&&(s.headers=s.headers||{},s.headers["Proxy-Authorization"]="Basic "+new Buffer(s.proxyAuth).toString("base64")),dl("making CONNECT request");var o=i.request(s);o.useChunkedEncodingByDefault=!1,o.once("response",a),o.once("upgrade",l),o.once("connect",c),o.once("error",u),o.end();function a(g){g.upgrade=!0}function l(g,f,h){process.nextTick(function(){c(g,f,h)})}function c(g,f,h){if(o.removeAllListeners(),f.removeAllListeners(),g.statusCode!==200){dl("tunneling socket could not be established, statusCode=%d",g.statusCode),f.destroy();var p=new Error("tunneling socket could not be established, statusCode="+g.statusCode);p.code="ECONNRESET",e.request.emit("error",p),i.removeSocket(n);return}if(h.length>0){dl("got illegal response body from proxy"),f.destroy();var p=new Error("got illegal response body from proxy");p.code="ECONNRESET",e.request.emit("error",p),i.removeSocket(n);return}return dl("tunneling connection has established"),i.sockets[i.sockets.indexOf(n)]=f,t(f)}function u(g){o.removeAllListeners(),dl(`tunneling socket could not be established, cause=%s +`,g.message,g.stack);var f=new Error("tunneling socket could not be established, cause="+g.message);f.code="ECONNRESET",e.request.emit("error",f),i.removeSocket(n)}};oA.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(t!==-1){this.sockets.splice(t,1);var i=this.requests.shift();i&&this.createSocket(i,function(n){i.request.onSocket(n)})}};function h5(r,e){var t=this;oA.prototype.createSocket.call(t,r,function(i){var n=r.request.getHeader("host"),s=OP({},t.options,{socket:i,servername:n?n.replace(/:.*$/,""):r.host}),o=pPe.connect(0,s);t.sockets[t.sockets.indexOf(i)]=o,e(o)})}function p5(r,e,t){return typeof r=="string"?{host:r,port:e,localAddress:t}:r}function OP(r){for(var e=1,t=arguments.length;e{C5.exports=d5()});var x5=w((Gw,jP)=>{var v5=Object.assign({},require("fs")),GP=function(){var r=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename!="undefined"&&(r=r||__filename),function(e){e=e||{};var t=typeof e!="undefined"?e:{},i,n;t.ready=new Promise(function(d,E){i=d,n=E});var s={},o;for(o in t)t.hasOwnProperty(o)&&(s[o]=t[o]);var a=[],l="./this.program",c=function(d,E){throw E},u=!1,g=!0,f="";function h(d){return t.locateFile?t.locateFile(d,f):f+d}var p,m,y,b;g&&(u?f=require("path").dirname(f)+"/":f=__dirname+"/",p=function(E,I){var D=xa(E);return D?I?D:D.toString():(y||(y=v5),b||(b=require("path")),E=b.normalize(E),y.readFileSync(E,I?null:"utf8"))},m=function(E){var I=p(E,!0);return I.buffer||(I=new Uint8Array(I)),Z(I.buffer),I},process.argv.length>1&&(l=process.argv[1].replace(/\\/g,"/")),a=process.argv.slice(2),c=function(d){process.exit(d)},t.inspect=function(){return"[Emscripten Module object]"});var v=t.print||console.log.bind(console),x=t.printErr||console.warn.bind(console);for(o in s)s.hasOwnProperty(o)&&(t[o]=s[o]);s=null,t.arguments&&(a=t.arguments),t.thisProgram&&(l=t.thisProgram),t.quit&&(c=t.quit);var T=16;function q(d,E){return E||(E=T),Math.ceil(d/E)*E}var Y=0,$=function(d){Y=d},_;t.wasmBinary&&(_=t.wasmBinary);var ne=t.noExitRuntime||!0;typeof WebAssembly!="object"&&vr("no native wasm support detected");function ee(d,E,I){switch(E=E||"i8",E.charAt(E.length-1)==="*"&&(E="i32"),E){case"i1":return pe[d>>0];case"i8":return pe[d>>0];case"i16":return Qe[d>>1];case"i32":return fe[d>>2];case"i64":return fe[d>>2];case"float":return Ht[d>>2];case"double":return Mt[d>>3];default:vr("invalid type for getValue: "+E)}return null}var A,oe=!1,ce;function Z(d,E){d||vr("Assertion failed: "+E)}function O(d){var E=t["_"+d];return Z(E,"Cannot call unknown function "+d+", make sure it is exported"),E}function L(d,E,I,D,M){var z={string:function(st){var yt=0;if(st!=null&&st!==0){var xe=(st.length<<2)+1;yt=B(xe),be(st,yt,xe)}return yt},array:function(st){var yt=B(st.length);return Ke(st,yt),yt}};function ie(st){return E==="string"?re(st):E==="boolean"?Boolean(st):st}var we=O(d),me=[],_e=0;if(D)for(var ot=0;ot=D);)++M;if(M-E>16&&d.subarray&&Be)return Be.decode(d.subarray(E,M));for(var z="";E>10,56320|_e&1023)}}return z}function re(d,E){return d?je(V,d,E):""}function se(d,E,I,D){if(!(D>0))return 0;for(var M=I,z=I+D-1,ie=0;ie=55296&&we<=57343){var me=d.charCodeAt(++ie);we=65536+((we&1023)<<10)|me&1023}if(we<=127){if(I>=z)break;E[I++]=we}else if(we<=2047){if(I+1>=z)break;E[I++]=192|we>>6,E[I++]=128|we&63}else if(we<=65535){if(I+2>=z)break;E[I++]=224|we>>12,E[I++]=128|we>>6&63,E[I++]=128|we&63}else{if(I+3>=z)break;E[I++]=240|we>>18,E[I++]=128|we>>12&63,E[I++]=128|we>>6&63,E[I++]=128|we&63}}return E[I]=0,I-M}function be(d,E,I){return se(d,V,E,I)}function he(d){for(var E=0,I=0;I=55296&&D<=57343&&(D=65536+((D&1023)<<10)|d.charCodeAt(++I)&1023),D<=127?++E:D<=2047?E+=2:D<=65535?E+=3:E+=4}return E}function Fe(d){var E=he(d)+1,I=Et(E);return I&&se(d,pe,I,E),I}function Ke(d,E){pe.set(d,E)}function ke(d,E){return d%E>0&&(d+=E-d%E),d}var ve,pe,V,Qe,le,fe,gt,Ht,Mt;function Ei(d){ve=d,t.HEAP8=pe=new Int8Array(d),t.HEAP16=Qe=new Int16Array(d),t.HEAP32=fe=new Int32Array(d),t.HEAPU8=V=new Uint8Array(d),t.HEAPU16=le=new Uint16Array(d),t.HEAPU32=gt=new Uint32Array(d),t.HEAPF32=Ht=new Float32Array(d),t.HEAPF64=Mt=new Float64Array(d)}var jt=t.INITIAL_MEMORY||16777216,Qr,Oi=[],Xs=[],Un=[],Hn=!1;function Sr(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)ba(t.preRun.shift());ko(Oi)}function jn(){Hn=!0,!t.noFSInit&&!S.init.initialized&&S.init(),ps.init(),ko(Xs)}function fs(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)Nu(t.postRun.shift());ko(Un)}function ba(d){Oi.unshift(d)}function DA(d){Xs.unshift(d)}function Nu(d){Un.unshift(d)}var hs=0,RA=null,Qa=null;function Lu(d){return d}function FA(d){hs++,t.monitorRunDependencies&&t.monitorRunDependencies(hs)}function NA(d){if(hs--,t.monitorRunDependencies&&t.monitorRunDependencies(hs),hs==0&&(RA!==null&&(clearInterval(RA),RA=null),Qa)){var E=Qa;Qa=null,E()}}t.preloadedImages={},t.preloadedAudios={};function vr(d){t.onAbort&&t.onAbort(d),d+="",x(d),oe=!0,ce=1,d="abort("+d+"). Build with -s ASSERTIONS=1 for more info.";var E=new WebAssembly.RuntimeError(d);throw n(E),E}var zl="data:application/octet-stream;base64,";function Tu(d){return d.startsWith(zl)}var xo="data:application/octet-stream;base64,AGFzbQEAAAABlAInYAF/AX9gA39/fwF/YAF/AGACf38Bf2ACf38AYAV/f39/fwF/YAR/f39/AX9gA39/fwBgBH9+f38Bf2AAAX9gBX9/f35/AX5gA39+fwF/YAF/AX5gAn9+AX9gBH9/fn8BfmADf35/AX5gA39/fgF/YAR/f35/AX9gBn9/f39/fwF/YAR/f39/AGADf39+AX5gAn5/AX9gA398fwBgBH9/f38BfmADf39/AX5gBn98f39/fwF/YAV/f35/fwF/YAV/fn9/fwF/YAV/f39/fwBgAn9+AGACf38BfmACf3wAYAh/fn5/f39+fwF/YAV/f39+fwBgAABgBX5+f35/AX5gBX9/f39/AX5gAnx/AXxgAn9+AX4CeRQBYQFhAAIBYQFiAAABYQFjAAMBYQFkAAYBYQFlAAEBYQFmAAABYQFnAAYBYQFoAAABYQFpAAMBYQFqAAMBYQFrAAMBYQFsAAEBYQFtAAABYQFuAAUBYQFvAAEBYQFwAAMBYQFxAAEBYQFyAAABYQFzAAMBYQF0AAADggKAAgcCAgQAAQECAgANBA4EBwICAhwLEw0AFA0dAAAMDAIHHgwQAgIDAwICAQAIAAcIFBUEBgAADAAECAgDAQYAAgIBBgAfFwEBAwITAiAPBgIFEQMFAxgBCAIBAAAHBQEYABoSAQIABwQDIREIAyIGAAEBAwMAIwUbASQHAQsVAQMABQMEAA0bFw0BBAALCwMDDAwAAwAHJQMBAAgaAQECBQMBAgMDAAcHBwICAgImEQsICAsECQoJAgAAAAAAAA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EHkmwEgACABcjYCACACDAELIAIoAggLIQAgAiAGNgIIIAAgBjYCDCAGIAI2AgwgBiAANgIIDAELQR8hACADQf///wdNBEAgA0EIdiIAIABBgP4/akEQdkEIcSICdCIAIABBgOAfakEQdkEEcSIBdCIAIABBgIAPakEQdkECcSIAdEEPdiABIAJyIAByayIAQQF0IAMgAEEVanZBAXFyQRxqIQALIAYgADYCHCAGQgA3AhAgAEECdEGUngFqIQICQAJAIAlBASAAdCIBcUUEQEHomwEgASAJcjYCACACIAY2AgAgBiACNgIYDAELIANBAEEZIABBAXZrIABBH0YbdCEAIAIoAgAhCANAIAgiASgCBEF4cSADRg0CIABBHXYhAiAAQQF0IQAgASACQQRxaiICKAIQIggNAAsgAiAGNgIQIAYgATYCGAsgBiAGNgIMIAYgBjYCCAwBCyABKAIIIgAgBjYCDCABIAY2AgggBkEANgIYIAYgATYCDCAGIAA2AggLIARBCGohAAwBCwJAIAtFDQACQCABKAIcIgJBAnRBlJ4BaiIAKAIAIAFGBEAgACAENgIAIAQNAUHomwEgBkF+IAJ3cTYCAAwCCyALQRBBFCALKAIQIAFGG2ogBDYCACAERQ0BCyAEIAs2AhggASgCECIABEAgBCAANgIQIAAgBDYCGAsgASgCFCIARQ0AIAQgADYCFCAAIAQ2AhgLAkAgA0EPTQRAIAEgAyAIaiIAQQNyNgIEIAAgAWoiACAAKAIEQQFyNgIEDAELIAEgCEEDcjYCBCAJIANBAXI2AgQgAyAJaiADNgIAIAoEQCAKQQN2IgBBA3RBjJwBaiEEQfibASgCACECAn9BASAAdCIAIAVxRQRAQeSbASAAIAVyNgIAIAQMAQsgBCgCCAshACAEIAI2AgggACACNgIMIAIgBDYCDCACIAA2AggLQfibASAJNgIAQeybASADNgIACyABQQhqIQALIAxBEGokACAAC4MEAQN/IAJBgARPBEAgACABIAIQCxogAA8LIAAgAmohAwJAIAAgAXNBA3FFBEACQCAAQQNxRQRAIAAhAgwBCyACQQFIBEAgACECDAELIAAhAgNAIAIgAS0AADoAACABQ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hAyACQQFqIgEhAiADDQALCyABIABrC6YBAQF/IwBBEGsiASQAIAEgADYCCAJAIAEoAggoAiBFBEAgASgCCEEMakESQQAQFCABQX82AgwMAQsgASgCCCIAIAAoAiBBAWs2AiAgASgCCCgCIEUEQCABKAIIQQBCAEECECAaIAEoAggoAgAEQCABKAIIKAIAEC9BAEgEQCABKAIIQQxqQRRBABAUCwsLIAFBADYCDAsgASgCDCEAIAFBEGokACAACzYBAX8jAEEQayIBIAA2AgwCfiABKAIMLQAAQQFxBEAgASgCDCkDCCABKAIMKQMQfQwBC0IACwuyAQIBfwF+IwBBEGsiASQAIAEgADYCBCABIAEoAgRCCBAeNgIAAkAgASgCAEUEQCABQgA3AwgMAQsgASABKAIALQAArSABKAIALQAHrUI4hiABKAIALQAGrUIwhnwgASgCAC0ABa1CKIZ8IAEoAgAtAAStQiCGfCABKAIALQADrUIYhnwgASgCAC0AAq1CEIZ8IAEoAgAtAAGtQgiGfHw3AwgLIAEpAwghAiABQRBqJAAgAgvcAQEBfyMAQRBrIgEkACABIAA2AgwgASgCDARAIAEoAgwoAigEQCABKAIMKAIoQQA2AiggASgCDCgCKEIANwMgIAEoAgwCfiABKAIMKQMYIAEoAgwpAyBWBEAgASgCDCkDGAwBCyABKAIMKQMgCzcDGAsgASABKAIMKQMYNwMAA0AgASkDACABKAIMKQMIWkUEQCABKAIMKAIAIAEpAwCnQQR0aigCABAVIAEgASkDAEIBfDcDAAwBCwsgASgCDCgCABAVIAEoAgwoAgQQFSABKAIMEBULIAFBEGokAAvwAgICfwF+AkAgAkUNACAAIAJqIgNBAWsgAToAACAAIAE6AAAgAkEDSQ0AIANBAmsgAToAACAAIAE6AAEgA0EDayABOgAAIAAgAToAAiACQQdJDQAgA0EEayABOgAAIAAgAToAAyACQQlJDQAgAEEAIABrQQNxIgRqIgMgAUH/AXFBgYKECGwiADYCACADIAIgBGtBfHEiAmoiAUEEayAANgIAIAJBCUkNACADIAA2AgggAyAANgIEIAFBCGsgADYCACABQQxr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ACQX82AgwMAQsgAigCBBA7IAIoAggoAgAEQCACKAIIKAIAIAIoAgQQOUEASARAIAIoAghBDGogAigCCCgCABAXIAJBfzYCDAwCCwsgAigCCCACKAIEQjhBAxAgQgBTBEAgAkF/NgIMDAELIAJBADYCDAsgAigCDCEAIAJBEGokACAAC98EAQF/IwBBIGsiAiAANgIYIAIgATYCFAJAIAIoAhhFBEAgAkEBNgIcDAELIAIgAigCGCgCADYCDAJAIAIoAhgoAggEQCACIAIoAhgoAgg2AhAMAQsgAkEBNgIQIAJBADYCCANAAkAgAigCCCACKAIYLwEETw0AAkAgAigCDCACKAIIai0AAEEfSwRAIAIoAgwgAigCCGotAABBgAFJDQELIAIoAgwgAigCCGotAABBDUYNACACKAIMIAIoAghqLQAAQQpGDQAgAigCDCACKAIIai0AAEEJRgRADAELIAJBAzYCEAJAIAIoAgwgAigCCGotAABB4AFxQcABRgRAIAJBATYCAAwBCwJAIAIoAgwgAigCCGotAABB8AFxQeABRgRAIAJBAjYCAAwBCwJAIAIoAgwgAigCCGotAABB+AFxQfABRgRAIAJBAzYCAAwBCyACQQQ2AhAMBAsLCyACKAIYLwEEIAIoAgggAigCAGpNBEAgAkEENgIQDAILIAJBATYCBANAIAIoAgQgAigCAE0EQCACKAIMIAIoAgggAigCBGpqLQAAQcABcUGAAUcEQCACQQQ2AhAMBgUgAiACKAIEQQFqNgIEDAILAAsLIAIgAigCACACKAIIajYCCAsgAiACKAIIQQFqNgIIDAELCwsgAigCGCACKAIQNgIIIAIoAhQEQAJAIAIoAhRBAkcNACACKAIQQQNHDQAgAkECNgIQIAIoAhhBAjYCCAsCQCACKAIUIAIoAhBGDQAgAigCEEEBRg0AIAJBBTYCHAwCCwsgAiACKAIQNgIcCyACKAIcC2oBAX8jAEEQayIBIAA2AgwgASgCDEIANwMAIAEoAgxBADYCCCABKAIMQn83AxAgASgCDEEANgIsIAEoAgxBfzYCKCABKAIMQgA3AxggASgCDEIANwMgIAEoAgxBADsBMCABKAIMQQA7ATIL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MAQRBrIgEgADYCDCABKAIMQQA2AgAgASgCDEEAOgAEIAEoAgxBADoABSABKAIMQQE6AAYgASgCDEG/BjsBCCABKAIMQQo7AQogASgCDEEAOwEMIAEoAgxBfzYCECABKAIMQQA2AhQgASgCDEEANgIYIAEoAgxCADcDICABKAIMQgA3AyggASgCDEEANgIwIAEoAgxBADYCNCABKAIMQQA2AjggASgCDEEANgI8IAEoAgxBADsBQCABKAIMQYCA2I14NgJEIAEoAgxCADcDSCABKAIMQQA7AVAgASgCDEEAOwFSIAEoAgxBADYCVAvSEwEBfyMAQbABayIDJAAgAyAANgKoASADIAE2AqQBIAMgAjYCoAEgA0EANgKQASADIAMoAqQBKAIwQQAQOjYClAEgAyADKAKkASgCOEEAEDo2ApgBAkACQAJAAkAgAygClAFBAkYEQCADKAKYAUEBRg0BCyADKAKUAUEBRgRAIAMoApgBQQJGDQELIAMoApQBQQJHDQEgAygCmAFBAkcNAQsgAygCpAEiACAALwEMQYAQcjsBDAwBCyADKAKkASIAIAAvAQxB/+8DcTsBDCADKAKUAUECRgRAIANB9eABIAMoAqQBKAIwIAMoAqgBQQhqEI4BNgKQASADKAKQAUUEQCADQX82AqwBDAMLCwJAIAMoAqABQYACcQ0AIAMoApgBQQJHDQAgA0H1xgEgAygCpAEoAjggAygCqAFBCGoQjgE2AkggAygCSEUEQCADKAKQARAjIANBfzYCrAEMAwsgAygCSCADKAKQATYCACADIAMoAkg2ApABCwsCQCADKAKkAS8BUkUEQCADKAKkASIAIAAvAQxB/v8DcTsBDAwBCyADKAKkASIAIAAvAQxBAXI7AQwLIAMgAygCpAEgAygCoAEQZUEBcToAhgEgAyADKAKgAUGACnFBgApHBH8gAy0AhgEFQQELQQFxOgCHASADAn9BASADKAKkAS8BUkGBAkYNABpBASADKAKkAS8BUkGCAkYNABogAygCpAEvAVJBgwJGC0EBcToAhQEgAy0AhwFBAXEEQCADIANBIGpCHBApNgIcIAMoAhxFBEAgAygCqAFBCGpBDkEAEBQgAygCkAEQIyADQX82AqwBDAILAkAgAygCoAFBgAJxBEACQCADKAKgAUGACHENACADKAKkASkDIEL/////D1YNACADKAKkASkDKEL/////D1gNAgsgAygCHCADKAKkASkDKBAtIAMoAhwgAygCpAEpAyAQLQwBCwJAAkAgAygCoAFBgAhxDQAgAygCpAEpAyBC/////w9WDQAgAygCpAEpAyhC/////w9WDQAgAygCpAEpA0hC/////w9YDQELIAMoAqQBKQMoQv////8PWgRAIAMoAhwgAygCpAEpAygQLQsgAygCpAEpAyBC/////w9aBEAgAygCHCADKAKkASkDIBAtCyADKAKkASkDSEL/////D1oEQCADKAIcIAMoAqQBKQNIEC0LCwsCfyMAQRBrIgAgAygCHDYCDCAAKAIMLQAAQQFxRQsEQCADKAKoAUEIakEUQQAQFCADKAIcEBYgAygCkAEQIyADQX82AqwBDAILIANBAQJ/IwBBEGsiACADKAIcNgIMAn4gACgCDC0AAEEBcQRAIAAoAgwpAxAMAQtCAAunQf//A3ELIANBIGpBgAYQVTYCjAEgAygCHBAWIAMoAowBIAMoApABNgIAIAMgAygCjAE2ApABCyADLQCFAUEBcQRAIAMgA0EVakIHECk2AhAgAygCEEUEQCADKAKoAUEIakEOQQAQFCADKAKQARAjIANBfzYCrAEMAgsgAygCEEECEB8gAygCEEG9EkECEEEgAygCECADKAKkAS8BUkH/AXEQlgEgAygCECADKAKkASgCEEH//wNxEB8CfyMAQRBrIgAgAygCEDYCDCAAKAIMLQAAQQFxRQsEQCADKAKoAUEIakEUQQAQFCADKAIQEBYgAygCkAEQIyADQX82AqwBDAILIANBgbICQQcgA0EVakGABhBVNgIMIAMoAhAQFiADKAIMIAMoApABNgIAIAMgAygCDDYCkAELIAMgA0HQAGpCLhApIgA2AkwgAEUEQCADKAKoAUEIakEOQQAQFCADKAKQARAjIANBfzYCrAEMAQsgAygCTEHxEkH2EiADKAKgAUGAAnEbQQQQQSADKAKgAUGAAnFFBEAgAygCTCADLQCGAUEBcQR/QS0FIAMoAqQBLwEIC0H//wNxEB8LIAMoAkwgAy0AhgFBAXEEf0EtBSADKAKkAS8BCgtB//8DcRAfIAMoAkwgAygCpAEvAQwQHwJAIAMtAIUBQQFxBEAgAygCTEHjABAfDAELIAMoAkwgAygCpAEoAhBB//8DcRAfCyADKAKkASgCFCADQZ4BaiADQZwBahCNASADKAJMIAMvAZ4BEB8gAygCTCADLwGcARAfAkACQCADLQCFAUEBcUUNACADKAKkASkDKEIUWg0AIAMoAkxBABAhDAELIAMoAkwgAygCpAEoAhgQIQsCQAJAIAMoAqABQYACcUGAAkcNACADKAKkASkDIEL/////D1QEQCADKAKkASkDKEL/////D1QNAQsgAygCTEF/ECEgAygCTEF/ECEMAQsCQCADKAKkASkDIEL/////D1QEQCADKAJMIAMoAqQBKQMgpxAhDAELIAMoAkxBfxAhCwJAIAMoAqQBKQMoQv////8PVARAIAMoAkwgAygCpAEpAyinECEMAQsgAygCTEF/ECELCyADKAJMIAMoAqQBKAIwEFFB//8DcRAfIAMgAygCpAEoAjQgAygCoAEQkgFB//8DcSADKAKQAUGABhCSAUH//wNxajYCiAEgAygCTCADKAKIAUH//wNxEB8gAygCoAFBgAJxRQRAIAMoAkwgAygCpAEoAjgQUUH//wNxEB8gAygCTCADKAKkASgCPEH//wNxEB8gAygCTCADKAKkAS8BQBAfIAMoAkwgAygCpAEoAkQQIQJAIAMoAqQBKQNIQv////8PVARAIAMoAkwgAygCpAEpA0inECEMAQsgAygCTEF/ECELCwJ/IwBBEGsiACADKAJMNgIMIAAoAgwtAABBAXFFCwRAIAMoAqgBQQhqQRRBABAUIAMoAkwQFiADKAKQARAjIANBfzYCrAEMAQsgAygCqAEgA0HQAGoCfiMAQRBrIgAgAygCTDYCDAJ+IAAoAgwtAABBAXEEQCAAKAIMKQMQDAELQgALCxA2QQBIBEAgAygCTBAWIAMoApABECMgA0F/NgKsAQwBCyADKAJMEBYgAygCpAEoAjAEQCADKAKoASADKAKkASgCMBCFAUEASARAIAMoApABECMgA0F/NgKsAQwCCwsgAygCkAEEQCADKAKoASADKAKQ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hRBAnRqIAMoAhA2AgAL1xMBA38jAEEwayICJAAgAiAANgIsIAIgATYCKCACIAIoAigoAgA2AiQgAiACKAIoKAIIKAIANgIgIAIgAigCKCgCCCgCDDYCHCACQX82AhAgAigCLEEANgLQKCACKAIsQb0ENgLUKCACQQA2AhgDQCACKAIYIAIoAhxIBEACQCACKAIkIAIoAhhBAnRqLwEABEAgAiACKAIYIgE2AhAgAigCLEHcFmohAyACKAIsIgQoAtAoQQFqIQAgBCAANgLQKCAAQQJ0IANqIAE2AgAgAigCGCACKAIsQdgoampBADoAAAwBCyACKAIkIAIoAhhBAnRqQQA7AQILIAIgAigCGEEBajYCGAwBCwsDQCACKAIsKALQKEECSARAAkAgAigCEEECSARAIAIgAigCEEEBaiIANgIQDAELQQAhAAsgAigCLEHcFmohAyACKAIsIgQoAtAoQQFqIQEgBCABNgLQKCABQQJ0IANqIAA2AgAgAiAANgIMIAIoAiQgAigCDEECdGpBATsBACACKAIMIAIoAixB2ChqakEAOgAAIAIoAiwiACAAKAKoLUEBazYCqC0gAigCIARAIAIoAiwiACAAKAKsLSACKAIgIAIoAgxBAnRqLwECazYCrC0LDAELCyACKAIoIAIoAhA2AgQgAiACKAIsKALQKEECbTYCGANAIAIoAhhBAU4EQCACKAIsIAIoAiQgAigCGBB5IAIgAigCGEEBazYCGAwBCwsgAiACKAIcNgIMA0AgAiACKAIsKALgFjYCGCACKAIsQdwWaiEBIAIoAiwiAygC0CghACADIABBAWs2AtAoIAIoAiwgAEECdCABaigCADYC4BYgAigCLCACKAIkQQEQeSACIAIoAiwoAuAWNgIUIAIoAhghASACKAIsQdwWaiEDIAIoAiwiBCgC1ChBAWshACAEIAA2AtQoIABBAnQgA2ogATYCACACKAIUIQEgAigCLEHcFmohAyACKAIsIgQoAtQoQQFrIQAgBCAANgLUKCAAQQJ0IANqIAE2AgAgAigCJCACKAIMQQJ0aiACKAIkIAIoAhhBAnRqLwEAIAIoAiQgAigCFEECdGovAQBqOwEAIAIoAgwgAigCLEH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NgIQIAMgAygCFCADQQhqQcAAQQAQRiIANgIMAkAgAEUEQCADQQA2AhwMAQsgAygCCEEFakH//wNLBEAgAygCEEESQQAQFCADQQA2AhwMAQsgA0EAIAMoAghBBWqtECkiADYCBCAARQRAIAMoAhBBDkEAEBQgA0EANgIcDAELIAMoAgRBARCWASADKAIEIAMoAhQQhwEQISADKAIEIAMoAgwgAygCCBBBAn8jAEEQayIAIAMoAgQ2AgwgACgCDC0AAEEBcUULBEAgAygCEEEUQQAQFCADKAIEEBYgA0EANgIcDAELIAMgAy8BGgJ/IwBBEGsiACADKAIENgIMAn4gACgCDC0AAEEBcQRAIAAoAgwpAxAMAQtCAAunQf//A3ELAn8jAEEQayIAIAMoAgQ2AgwgACgCDCgCBAtBgAYQVTYCACADKAIEEBYgAyADKAIANgIcCyADKAIcIQAgA0EgaiQAIAALtAIBAX8jAEEwayIDJAAgAyAANgIoIAMgATcDICADIAI2AhwCQCADKQMgUARAIANBAToALwwBCyADIAMoAigpAxAgAykDIHw3AwgCQCADKQMIIAMpAyBaBEAgAykDCEL/////AFgNAQsgAygCHEEOQQAQFCADQQA6AC8MAQsgAyADKAIoKAIAIAMpAwinQQR0EE4iADYCBCAARQRAIAMoAhxBDkEAEBQgA0EAOgAvDAELIAMoAiggAygCBDYCACADIAMoAigpAwg3AxADQCADKQMQIAMpAwhaRQRAIAMoAigoAgAgAykDEKdBBHRqELUBIAMgAykDEEIBfDcDEAwBCwsgAygCKCADKQMIIgE3AxAgAygCKCABNwMIIANBAToALwsgAy0AL0EBcSEAIANBMGokACAAC8wBAQF/IwBBIGsiAiQAIAIgADcDECACIAE2AgwgAkEwEBgiATYCCAJAIAFFBEAgAigCDEEOQQAQFCACQQA2AhwMAQsgAigCCEEANgIAIAIoAghCADcDECACKAIIQgA3AwggAigCCEIANwMgIAIoAghCADcDGCACKAIIQQA2AiggAigCCEEAOgAsIAIoAgggAikDECACKAIMEI8BQQFxRQRAIAIoAggQJSACQQA2AhwMAQsgAiACKAIINg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KQASMAQRBrIgUgASgCpAE2AgwgAQJ+IAUoAgwtAABBAXEEQCAFKAIMKQMQDAELQgALNwMYIAEoAqQBQgQQHhogASABKAKkARAdQf//A3E2AhAgASABKAKkARAdQf//A3E2AgggASABKAKkARAxNwM4AkAgASkDOEL///////////8AVgRAIAEoApABQQRBFhAUIAFBADYCrAEMAQsgASkDOEI4fCABKQMYIAEpA5gBfFYEQCABKAKQAUEVQQAQFCABQQA2AqwBDAELAkACQCABKQM4IAEpA5gBVA0AIAEpAzhCOHwgASkDmAECfiMAQRBrIgUgASgCpAE2AgwgBSgCDCkDCAt8Vg0AIAEoAqQBIAEpAzggASkDmAF9ECwaIAFBADoAFwwBCyABKAKoASABKQM4QQAQJ0EASARAIAEoApABIAEoAqgBEBcgAUEANgKsAQwCCyABIAEoAqgBQjggAUFAayABKAKQARBCIgU2AqQBIAVFBEAgAUEANgKsAQwCCyABQQE6ABcLIAEoAqQBQgQQHigAAEHQlpkwRwRAIAEoApABQRVBABAUIAEtABdBAXEEQCABKAKkARAWCyABQQA2AqwBDAELIAEgASgCpAEQMTcDMAJAIAEoApQBQQRxRQ0AIAEpAzAgASkDOHxCDHwgASkDmAEgASkDGHxRDQAgASgCkAFBFUEAEBQgAS0AF0EBcQRAIAEoAqQBEBYLIAFBADYCrAEMAQsgASgCpAFCBBAeGiABIAEoAqQBECo2AgwgASABKAKkARAqNgIEIAEoAhBB//8DRgRAIAEgASgCDDYCEAsgASgCCEH//wNGBEAgASABKAIENgIICwJAIAEoApQBQQRxRQ0AIAEoAgggASgCBEYEQCABKAIQIAEoAgxGDQELIAEoApABQRVBABAUIAEtABdBAXEEQCABKAKkARAWCyABQQA2AqwBDAELAkAgASgCEEUEQCABKAIIRQ0BCyABKAKQAUEBQQAQFCABLQAXQQFxBEAgASgCpAEQFgsgAUEANgKsAQwBCyABIAEoAqQBEDE3AyggASABKAKkARAxNwMgIAEpAyggASkDIFIEQCABKAKQAUEBQQAQFCABLQAXQQFxBEAgASgCpAEQFgsgAUEANgKsAQwBCyABIAEoAqQBEDE3AzAgASABKAKkARAxNwOAAQJ/IwBBEGsiBSABKAKkATYCDCAFKAIMLQAAQQFxRQsEQCABKAKQAUEUQQAQFCABLQAXQQFxBEAgASgCpAEQFgsgAUEANgKsAQwBCyABLQAXQQFxBEAgASgCpAEQFgsCQCABKQOAAUL///////////8AWARAIAEpA4ABIAEpA4ABIAEpAzB8WA0BCyABKAKQAUEEQRYQFCABQQA2AqwBDAELIAEpA4ABIAEpAzB8IAEpA5gBIAEpAzh8VgRAIAEoApABQRVBABAUIAFBADYCrAEMAQsCQCABKAKUAUEEcUUNACABKQOAASABKQMwfCABKQOYASABKQM4fFENACABKAKQAUEVQQAQFCABQQA2AqwBDAELIAEpAyggASkDMEIugFYEQCABKAKQAUEVQQAQFCABQQA2AqwBDAELIAEgASkDKCABKAKQARCQASIFNgKMASAFRQRAIAFBADYCrAEMAQsgASgCjAFBAToALCABKAKMASABKQMwNwMYIAEoAowBIAEpA4ABNwMgIAEgASgCjAE2AqwBCyABKAKsASEFIAFBsAFqJAAgACAFNgJQDAELIAAoAmQgACkDMBAsGiAAKAJkIQUgACkDWCEJIAAoAmgoAhQhBiAAKAJUIQcjAEHQAGsiASQAIAEgBTYCSCABIAk3A0AgASAGNgI8IAEgBzYCOAJAIAEoAkgQMEIWVARAIAEoAjhBFUEAEBQgAUEANgJMDAELIwBBEGsiBSABKAJINgIMIAECfiAFKAIMLQAAQQFxBEAgBSgCDCkDEAwBC0IACzcDCCABKAJIQgQQHhogASgCSBAqBEAgASgCOEEBQQAQFCABQQA2AkwMAQsgASABKAJIEB1B//8Dca03AyggASABKAJIEB1B//8Dca03AyAgASkDICABKQMoUgRAIAEoAjhBE0EAEBQgAUEANgJMDAELIAEgASgCSBAqrTcDGCABIAEoAkgQKq03AxAgASkDECABKQMQIAEpAxh8VgRAIAEoAjhBBEEWEBQgAUEANgJMDAELIAEpAxAgASkDGHwgASkDQCABKQMIfFYEQCABKAI4QRVBABAUIAF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IAIoAjgoAmxqNgIsIAIgAigCOCgCeDYCICACIAIoAjgoApABNgIcIAICfyACKAI4KAJsIAIoAjgoAixBhgJrSwRAIAIoAjgoAmwgAigCOCgCLEGGAmtrDAELQQALNgIYIAIgAigCOCgCQDYCFCACIAIoAjgoAjQ2AhAgAiACKAI4KAI4IAIoAjgoAmxqQYICajYCDCACIAIoAiwgAigCIEEBa2otAAA6AAsgAiACKAIsIAIoAiBqLQAAOgAKIAIoAjgoAnggAigCOCgCjAFPBEAgAiACKAIwQQJ2NgIwCyACKAIcIAIoAjgoAnRLBEAgAiACKAI4KAJ0NgIcCwNAAkAgAiACKAI4KAI4IAIoAjRqNgIoAkAgAigCKCACKAIgai0AACACLQAKRw0AIAIoAiggAigCIEEBa2otAAAgAi0AC0cNACACKAIoLQAAIAIoAiwtAABHDQAgAiACKAIoIgBBAWo2AiggAC0AASACKAIsLQABRwRADAELIAIgAigCLEECajYCLCACIAIoAihBAWo2AigDQCACIAIoAiwiAEEBajYCLCAALQABIQEgAiACKAIoIgBBAWo2AigCf0EAIAAtAAEgAUcNABogAiACKAIsIgBBAWo2AiwgAC0AASEBIAIgAigCKCIAQQFqNgIoQQAgAC0AASABRw0AGiACIAIoAiwiAEEBajYCLCAALQABIQEgAiACKAIoIgBBAWo2AihBACAALQABIAFHDQAaIAIgAigCLCIAQQFqNgIsIAAtAAEhASACIAIoAigiAEEBajYCKEEAIAAtAAEgAUcNABogAiACKAIsIgBBAWo2AiwgAC0AASEBIAIgAigCKCIAQQFqNgIoQQAgAC0AASABRw0AGiACIAIoAiwiAEEBajYCLCAALQABIQEgAiACKAIoIgBBAWo2AihBACAALQABIAFHDQAaIAIgAigCLCIAQQFqNgIsIAAtAAEhASACIAIoAigiAEEBajYCKEEAIAAtAAEgAUcNABogAiACKAIsIgBBAWo2AiwgAC0AASEBIAIgAigCKCIAQQFqNgIoQQAgAC0AASABRw0AGiACKAIsIAIoAgxJC0EBcQ0ACyACQYICIAIoAgwgAigCLGtrNgIkIAIgAigCDEGCAms2AiwgAigCJCACKAIgSgRAIAIoAjggAigCNDYCcCACIAIoAiQ2AiAgAigCJCACKAIcTg0CIAIgAigCLCACKAIgQQFrai0AADoACyACIAIoAiwgAigCIGotAAA6AAoLCyACIAIoAhQgAigCNCACKAIQcUEBdGovAQAiATYCNEEAIQAgASACKAIYSwR/IAIgAigCMEEBayIANgIwIABBAEcFQQALQQFxDQELCwJAIAIoAiAgAigCOCgCdE0EQCACIAIoAiA2AjwMAQsgAiACKAI4KAJ0NgI8CyACKAI8C5IQAQF/IwBBMGsiAiQAIAIgADYCKCACIAE2AiQgAgJ/IAIoAigoAiwgAigCKCgCDEEFa0kEQCACKAIoKAIsDAELIAIoAigoAgxBBWsLNgIgIAJBADYCECACIAIoAigoAgAoAgQ2AgwDQAJAIAJB//8DNgIcIAIgAigCKCgCvC1BKmpBA3U2AhQgAigCKCgCACgCECACKAIUSQ0AIAIgAigCKCgCACgCECACKAIUazYCFCACIAIoAigoAmwgAigCKCgCXGs2AhggAigCHCACKAIYIAIoAigoAgAoAgRqSwRAIAIgAigCGCACKAIoKAIAKAIEajYCHAsgAigCHCACKAIUSwRAIAIgAigCFDYCHAsCQCACKAIcIAIoAiBPDQACQCACKAIcRQRAIAIoAiRBBEcNAQsgAigCJEUNACACKAIcIAIoAhggAigCKCgCACgCBGpGDQELDAELQQAhACACIAIoAiRBBEYEfyACKAIcIAIoAhggAigCKCgCACgCBGpGBUEAC0EBcTYCECACKAIoQQBBACACKAIQEF0gAigCKCgCCCACKAIoKAIUQQRraiACKAIcOgAAIAIoAigoAgggAigCKCgCFEEDa2ogAigCHEEIdjoAACACKAIoKAIIIAIoAigoAhRBAmtqIAIoAhxBf3M6AAAgAigCKCgCCCACKAIoKAIUQQFraiACKAIcQX9zQQh2OgAAIAIoAigoAgAQHCACKAIYBEAgAigCGCACKAIcSwRAIAIgAigCHDYCGAsgAigCKCgCACgCDCACKAIoKAI4IAIoAigoAlxqIAIoAhgQGRogAigCKCgCACIAIAIoAhggACgCDGo2AgwgAigCKCgCACIAIAAoAhAgAigCGGs2AhAgAigCKCgCACIAIAIoAhggACgCFGo2AhQgAigCKCIAIAIoAhggACgCXGo2AlwgAiACKAIcIAIoAhhrNgIcCyACKAIcBEAgAigCKCgCACACKAIoKAIAKAIMIAIoAhwQdhogAigCKCgCACIAIAIoAhwgACgCDGo2AgwgAigCKCgCACIAIAAoAhAgAigCHGs2AhAgAigCKCgCACIAIAIoAhwgACgCFGo2AhQLIAIoAhBFDQELCyACIAIoAgwgAigCKCgCACgCBGs2AgwgAigCDARAAkAgAigCDCACKAIoKAIsTwRAIAIoAihBAjYCsC0gAigCKCgCOCACKAIoKAIAKAIAIAIoAigoAixrIAIoAigoAiwQGRogAigCKCACKAIoKAIsNgJsDAELIAIoAgwgAigCKCgCPCACKAIoKAJsa08EQCACKAIoIgAgACgCbCACKAIoKAIsazYCbCACKAIoKAI4IAIoAigoAjggAigCKCgCLGogAigCKCgCbBAZGiACKAIoKAKwLUECSQRAIAIoAigiACAAKAKwLUEBajYCsC0LCyACKAIoKAI4IAIoAigoAmxqIAIoAigoAgAoAgAgAigCDGsgAigCDBAZGiACKAIoIgAgAigCDCAAKAJsajYCbAsgAigCKCACKAIoKAJsNgJcIAIoAigiAQJ/IAIoAgwgAigCKCgCLCACKAIoKAK0LWtLBEAgAigCKCgCLCACKAIoKAK0LWsMAQsgAigCDAsgASgCtC1qNgK0LQsgAigCKCgCwC0gAigCKCgCbEkEQCACKAIoIAIoAigoAmw2AsAtCwJAIAIoAhAEQCACQQM2AiwMAQsCQCACKAIkRQ0AIAIoAiRBBEYNACACKAIoKAIAKAIEDQAgAigCKCgCbCACKAIoKAJcRw0AIAJBATYCLAwBCyACIAIoAigoAjwgAigCKCgCbGtBAWs2AhQCQCACKAIoKAIAKAIEIAIoAhRNDQAgAigCKCgCXCACKAIoKAIsSA0AIAIoAigiACAAKAJcIAIoAigoAixrNgJcIAIoAigiACAAKAJsIAIoAigoAixrNgJsIAIoAigoAjggAigCKCgCOCACKAIoKAIsaiACKAIoKAJsEBkaIAIoAigoArAtQQJJBEAgAigCKCIAIAAoArAtQQFqNgKwLQsgAiACKAIoKAIsIAIoAhRqNgIUCyACKAIUIAIoAigoAgAoAgRLBEAgAiACKAIoKAIAKAIENgIUCyACKAIUBEAgAigCKCgCACACKAIoKAI4IAIoAigoAmxqIAIoAhQQdhogAigCKCIAIAIoAhQgACgCbGo2AmwLIAIoAigoAsAtIAIoAigoAmxJBEAgAigCKCACKAIoKAJsNgLALQsgAiACKAIoKAK8LUEqakEDdTYCFCACIAIoAigoAgwgAigCFGtB//8DSwR/Qf//AwUgAigCKCgCDCACKAIUaws2AhQgAgJ/IAIoAhQgAigCKCgCLEsEQCACKAIoKAIsDAELIAIoAhQLNgIgIAIgAigCKCgCbCACKAIoKAJcazYCGAJAIAIoAhggAigCIEkEQCACKAIYRQRAIAIoAiRBBEcNAgsgAigCJEUNASACKAIoKAIAKAIEDQEgAigCGCACKAIUSw0BCyACAn8gAigCGCACKAIUSwRAIAIoAhQMAQsgAigCGAs2AhwgAgJ/QQAgAigCJEEERw0AGkEAIAIoAigoAgAoAgQNABogAigCHCACKAIYRgtBAXE2AhAgAigCKCACKAIoKAI4IAIoAigoAlxqIAIoAhwgAigCEBBdIAIoAigiACACKAIcIAAoAlxqNgJcIAIoAigoAgAQHAsgAkECQQAgAigCEBs2AiwLIAIoAiwhACACQTBqJAAgAAuyAgEBfyMAQRBrIgEkACABIAA2AggCQCABKAIIEHgEQCABQX42AgwMAQsgASABKAIIKAIcKAIENgIEIAEoAggoAhwoAggEQCABKAIIKAIoIAEoAggoAhwoAgggASgCCCgCJBEEAAsgASgCCCgCHCgCRARAIAEoAggoAiggASgCCCgCHCgCRCABKAIIKAIkEQQACyABKAIIKAIcKAJABEAgASgCCCgCKCABKAIIKAIcKAJAIAEoAggoAiQRBAALIAEoAggoAhwoAjgEQCABKAIIKAIoIAEoAggoAhwoAjggASgCCCgCJBEEAAsgASgCCCgCKCABKA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3AzgLIAEoAlgoAkAgASkDUKdBBHRqLQAMQQFxRQRAIAEpA0ggASkDQFoEQCABKAIoEBUgASgCWEEIakEUQQAQFCABQX82AlwMBAsgASgCKCABKQNIp0EDdGogASkDUDcDACABIAEpA0hCAXw3A0gLIAEgASkDUEIBfDcDUAwBCwsgASkDSCABKQNAVARAIAEoAigQFSABKAJYQQhqQRRBABAUIAFBfzYCXAwBCwJAAn8jAEEQayIAIAEoAlgoAgA2AgwgACgCDCkDGEKAgAiDUAsEQCABQgA3AzgMAQsgASkDOEJ/UQRAIAFCfzcDGCABQgA3AzggAUIANwNQA0AgASkDUCABKAJYKQMwVARAIAEoAlgoAkAgASkDUKdBBHRqKAIABEAgASgCWCgCQCABKQNQp0EEdGooAgApA0ggASkDOFoEQCABIAEoAlgoAkAgASkDUKdBBHRqKAIAKQNINwM4IAEgASkDUDcDGAsLIAEgASkDUEIBfDcDUAwBCwsgASkDGEJ/UgRAIAEoAlghAiABKQMYIQcgASgCWEEIaiEDIwBBMGsiACQAIAAgAjYCJCAAIAc3AxggACADNgIUIAAgACgCJCAAKQMYIAAoAhQQYCIHNwMIAkAgB1AEQCAAQgA3AygMAQsgACAAKAIkKAJAIAApAxinQQR0aigCADYCBAJAIAApAwggACkDCCAAKAIEKQMgfFgEQCAAKQMIIAAoAgQpAyB8Qv///////////wBYDQELIAAoAhRBBEEWEBQgAEIANwMoDAELIAAgACgCBCkDICAAKQMIfDcDCCAAKAIELwEMQQhxBEAgACgCJCgCACAAKQMIQQAQJ0EASARAIAAoAhQgACgCJCgCABAXIABCADcDKAwCCyAAKAIkKAIAIABCBBArQgRSBEAgACgCFCAAKAIkKAIAEBcgAEIANwMoDAILIAAoAABB0JadwABGBEAgACAAKQMIQgR8NwMICyAAIAApAwhCDHw3AwggACgCBEEAEGVBAXEEQCAAIAApAwhCCHw3AwgLIAApAwhC////////////AFYEQCAAKAIUQQRBFhAUIABCADcDKAwCCwsgACAAKQMINwMoCyAAKQMoIQcgAEEwaiQAI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AEoAqABNgIIIAEgAjYCBCABIAM2AgAgAEG+CiABEG8gASgCqAEgASgCHDYCCCABIAEoAhw2AqwBCyABKAKsASEAIAFBsAFqJAAgAAsIAEEBQTgQfwszAQF/IAAoAhQiAyABIAIgACgCECADayIBIAEgAksbIgEQGRogACAAKAIUIAFqNgIUIAILjwUCBn4BfyABIAEoAgBBD2pBcHEiAUEQajYCACAAAnwgASkDACEDIAEpAwghBiMAQSBrIggkAAJAIAZC////////////AIMiBEKAgICAgIDAgDx9IARCgICAgICAwP/DAH1UBEAgBkIEhiADQjyIhCEEIANC//////////8PgyIDQoGAgICAgICACFoEQCAEQoGAgICAgICAwAB8IQIMAgsgBEKAgICAgICAgEB9IQIgA0KAgICAgICAgAiFQgBSDQEgAiAEQgGDfCECDAELIANQIARCgICAgICAwP//AFQgBEKAgICAgIDA//8AURtFBEAgBkIEhiADQjyIhEL/////////A4NCgICAgICAgPz/AIQhAgwBC0KAgICAgICA+P8AIQIgBEL///////+//8MAVg0AQgAhAiAEQjCIpyIAQZH3AEkNACADIQIgBkL///////8/g0KAgICAgIDAAIQiBSEHAkAgAEGB9wBrIgFBwABxBEAgAiABQUBqrYYhB0IAIQIMAQsgAUUNACAHIAGtIgSGIAJBwAAgAWutiIQhByACIASGIQILIAggAjcDECAIIAc3AxgCQEGB+AAgAGsiAEHAAHEEQCAFIABBQGqtiCEDQgAhBQwBCyAARQ0AIAVBwAAgAGuthiADIACtIgKIhCEDIAUgAoghBQsgCCADNwMAIAggBTcDCCAIKQMIQgSGIAgpAwAiA0I8iIQhAiAIKQMQIAgpAxiEQgBSrSADQv//////////D4OEIgNCgYCAgICAgIAIWgRAIAJCAXwhAgwBCyADQoCAgICAgICACIVCAFINACACQgGDIAJ8IQILIAhBIGokACACIAZCgICAgICAgICAf4OEvws5AwALrRcDEn8CfgF8IwBBsARrIgkkACAJQQA2AiwCQCABvSIYQn9XBEBBASESQa4IIRMgAZoiAb0hGAwBCyAEQYAQcQRAQQEhEkGxCCETDAEL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AIYIAEoAhgoAmw2AlwgASgCGCgCABAcIAEoAhgoAgAoAhBFBEAgAUECNgIcDAILIAFBAzYCHAwBCyABKAIYKAKgLQRAIAEoAhgCfyABKAIYKAJcQQBOBEAgASgCGCgCOCABKAIYKAJcagwBC0EACyABKAIYKAJsIAEoAhgoAlxrQQAQKCABKAIYIAEoAhgoAmw2AlwgASgCGCgCABAcIAEoAhgoAgAoAhBFBEAgAUEANgIcDAILCyABQQE2AhwLIAEoAhwhAiABQSBqJAAgAgwBCwJ/IAAoAiwoAogBQQNGBEAgACgCLCECIAAoAjQhAyMAQTBrIgEkACABIAI2AiggASADNgIkAkADQAJAIAEoAigoAnRBggJNBEAgASgCKBBcAkAgASgCKCgCdEGCAksNACABKAIkDQAgAUEANgIsDAQLIAEoAigoAnRFDQELIAEoAihBADYCYAJAIAEoAigoAnRBA0kNACABKAIoKAJsRQ0AIAEgASgCKCgCOCABKAIoKAJsakEBazYCGCABIAEoAhgtAAA2AhwgASgCHCECIAEgASgCGCIDQQFqNgIYAkAgAy0AASACRw0AIAEoAhwhAiABIAEoAhgiA0EBajYCGCADLQABIAJHDQAgASgCHCECIAEgASgCGCIDQQFqNgIYIAMtAAEgAkcNACABIAEoAigoAjggASgCKCgCbGpBggJqNgIUA0AgASgCHCECIAEgASgCGCIDQQFqNgIYAn9BACADLQABIAJHDQAaIAEoAhwhAiABIAEoAhgiA0EBajYCGEEAIAMtAAEgAkcNABogASgCHCECIAEgASgCGCIDQQFqNgIYQQAgAy0AASACRw0AGiABKAIcIQIgASABKAIYIgNBAWo2AhhBACADLQABIAJHDQAaIAEoAhwhAiABIAEoAhgiA0EBajYCGEEAIAMtAAEgAkcNABogASgCHCECIAEgASgCGCIDQQFqNgIYQQAgAy0AASACRw0AGiABKAIcIQIgASABKAIYIgNBAWo2AhhBACADLQABIAJHDQAaIAEoAhwhAiABIAEoAhgiA0EBajYCGEEAIAMtAAEgAkcNABogASgCGCABKAIUSQtBAXENAAsgASgCKEGCAiABKAIUIAEoAhhrazYCYCABKAIoKAJgIAEoAigoAnRLBEAgASgCKCABKAIoKAJ0NgJgCwsLAkAgASgCKCgCYEEDTwRAIAEgASgCKCgCYEEDazoAEyABQQE7ARAgASgCKCICKAKkLSACKAKgLUEBdGogAS8BEDsBACABLQATIQMgASgCKCICKAKYLSEEIAIgAigCoC0iAkEBajYCoC0gAiAEaiADOgAAIAEgAS8BEEEBazsBECABKAIoIAEtABNB0N0Aai0AAEECdGpBmAlqIgIgAi8BAEEBajsBACABKAIoQYgTagJ/IAEvARBBgAJJBEAgAS8BEC0A0FkMAQsgAS8BEEEHdkGAAmotANBZC0ECdGoiAiACLwEAQQFqOwEAIAEgASgCKCgCoC0gASgCKCgCnC1BAWtGNgIgIAEoAigiAiACKAJ0IAEoAigoAmBrNgJ0IAEoAigiAiABKAIoKAJgIAIoAmxqNgJsIAEoAihBADYCYAwBCyABIAEoAigiAigCOCACKAJsai0AADoADyABKAIoIgIoAqQtIAIoAqAtQQF0akEAOwEAIAEtAA8hAyABKAIoIgIoApgtIQQgAiACKAKgLSICQQFqNgKgLSACIARqIAM6AAAgASgCKCABLQAPQQJ0aiICIAIvAZQBQQFqOwGUASABIAEoAigoAqAtIAEoAigoApwtQQFrRjYCICABKAIoIgIgAigCdEEBazYCdCABKAIoIgIgAigCbEEBajYCbAsgASgCIARAIAEoAigCfyABKAIoKAJcQQBOBEAgASgCKCgCOCABKAIoKAJcagwBC0EACyABKAIoKAJsIAEoAigoAlxrQQAQKCABKAIoIAEoAigoAmw2AlwgASgCKCgCABAcIAEoAigoAgAoAhBFBEAgAUEANgIsDAQLCwwBCwsgASgCKEEANgK0LSABKAIkQQRGBEAgASgCKAJ/IAEoAigoAlxBAE4EQCABKAIoKAI4IAEoAigoAlxqDAELQQALIAEoAigoAmwgASgCKCgCXGtBARAoIAEoAiggASgCKCgCbDYCXCABKAIoKAIAEBwgASgCKCgCACgCEEUEQCABQQI2AiwMAgsgAUEDNgIsDAELIAEoAigoAqAtBEAgASgCK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CLCABKAIMdjYCLCABIAEoAiggASgCDGs2AiggASABLQAQNgIMIAEoAgxFBEAgAS8BEiECIAEgASgCSCIDQQFqNgJIIAMgAjoAAAwCCyABKAIMQRBxBEAgASABLwESNgIIIAEgASgCDEEPcTYCDCABKAIMBEAgASgCKCABKAIMSQRAIAEgASgCUCICQQFqNgJQIAEgASgCLCACLQAAIAEoAih0ajYCLCABIAEoAihBCGo2AigLIAEgASgCCCABKAIsQQEgASgCDHRBAWtxajYCCCABIAEoAiwgASgCDHY2AiwgASABKAIoIAEoAgxrNgIoCyABKAIoQQ9JBEAgASABKAJQIgJBAWo2AlAgASABKAIsIAItAAAgASgCKHRqNgIsIAEgASgCKEEIajYCKCABIAEoAlAiAkEBajYCUCABIAEoAiwgAi0AACABKAIodGo2AiwgASABKAIoQQhqNgIoCyABIAEoAiAgASgCLCABKAIYcUECdGooAQA2ARACQANAIAEgAS0AETYCDCABIAEoAiwgASgCDHY2AiwgASABKAIoIAEoAgxrNgIoIAEgAS0AEDYCDCABKAIMQRBxBEAgASABLwESNgIEIAEgASgCDEEPcTYCDCABKAIoIAEoAgxJBEAgASABKAJQIgJBAWo2AlAgASABKAIsIAItAAAgASgCKHRqNgIsIAEgASgCKEEIajYCKCABKAIoIAEoAgxJBEAgASABKAJQIgJBAWo2AlAgASABKAIsIAItAAAgASgCKHRqNgIsIAEgASgCKEEIajYCKAsLIAEgASgCBCABKAIsQQEgASgCDHRBAWtxajYCBCABIAEoAiwgASgCDHY2AiwgASABKAIoIAEoAgxrNgIoIAEgASgCSCABKAJEazYCDAJAIAEoAgQgASgCDEsEQCABIAEoAgQgASgCDGs2AgwgASgCDCABKAI4SwRAIAEoAlQoAsQ3BEAgASgCXEHdDDYCGCABKAJUQdH+ADYCBAwKCwsgASABKAIwNgIAAkAgASgCNEUEQCABIAEoAgAgASgCPCABKAIMa2o2AgAgASgCDCABKAIISQRAIAEgASgCCCABKAIMazYCCANAIAEgASgCACICQQFqNgIAIAItAAAhAiABIAEoAkgiA0EBajYCSCADIAI6AAAgASABKAIMQQFrIgI2AgwgAg0ACyABIAEoAkggASgCBGs2AgALDAELAkAgASgCNCABKAIMSQRAIAEgASgCACABKAI8IAEoAjRqIAEoAgxrajYCACABIAEoAgwgASgCNGs2AgwgASgCDCABKAIISQRAIAEgASgCCCABKAIMazYCCANAIAEgASgCACICQQFqNgIAIAItAAAhAiABIAEoAkgiA0EBajYCSCADIAI6AAAgASABKAIMQQFrIgI2AgwgAg0ACyABIAEoAjA2AgAgASgCNCABKAIISQRAIAEgASgCNDYCDCABIAEoAgggASgCDGs2AggDQCABIAEoAgAiAkEBajYCACACLQAAIQIgASABKAJIIgNBAWo2AkggAyACOgAAIAEgASgCDEEBayICNgIMIAINAAsgASABKAJIIAEoAgRrNgIACwsMAQsgASABKAIAIAEoAjQgASgCDGtqNgIAIAEoAgwgASgCCEkEQCABIAEoAgggASgCDGs2AggDQCABIAEoAgAiAkEBajYCACACLQAAIQIgASABKAJIIgNBAWo2AkggAyACOgAAIAEgASgCDEEBayICNgIMIAINAAsgASABKAJIIAEoAgRrNgIACwsLA0AgASgCCEECSwRAIAEgASgCACICQQFqNgIAIAItAAAhAiABIAEoAkgiA0EBajYCSCADIAI6AAAgASABKAIAIgJBAWo2AgAgAi0AACECIAEgASgCSCIDQQFqNgJIIAMgAjoAACABIAEoAgAiAkEBajYCACACLQAAIQIgASABKAJIIgNBAWo2AkggAyACOgAAIAEgASgCCEEDazYCCAwBCwsMAQsgASABKAJIIAEoAgRrNgIAA0AgASABKAIAIgJBAWo2AgAgAi0AACECIAEgASgCSCIDQQFqNgJIIAMgAjoAACABIAEoAgAiAkEBajYCACACLQAAIQIgASABKAJIIgNBAWo2AkggAyACOgAAIAEgASgCACICQQFqNgIAIAItAAAhAiABIAEoAkgiA0EBajYCSCADIAI6AAAgASABKAIIQQNrNgIIIAEoAghBAksNAAsLIAEoAggEQCABIAEoAgAiAkEBajYCACACLQAAIQIgASABKAJIIgNBAWo2AkggAyACOgAAIAEo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AADwAAAJA0AACQNQAAAAAAAB4AAAAPAAAAAAAAABA2AAAAAAAAEwAAAAcAAAAAAAAADAAIAIwACABMAAgAzAAIACwACACsAAgAbAAIAOwACAAcAAgAnAAIAFwACADcAAgAPAAIALwACAB8AAgA/AAIAAIACACCAAgAQgAIAMIACAAiAAgAogAIAGIACADiAAgAEgAIAJIACABSAAgA0gAIADIACACyAAgAcgAIAPIACAAKAAgAigAIAEoACADKAAgAKgAIAKoACABqAAgA6gAIABoACACaAAgAWgAIANoACAA6AAgAugAIAHoACAD6AAgABgAIAIYACABGAAgAxgAIACYACACmAAgAZgAIAOYACAAWAAgAlgAIAFYACADWAAgANgAIALYACAB2AAgA9gAIAA4ACACOAAgATgAIAM4ACAAuAAgArgAIAG4ACADuAAgAHgAIAJ4ACABeAAgA3gAIAD4ACAC+AAgAfgAIAP4ACAABAAgAgQAIAEEACADBAAgAIQAIAKEACABhAAgA4QAIABEACACRAAgAUQAIANEACAAxAAgAsQAIAHEACADxAAgACQAIAIkACABJAAgAyQAIACkACACpAAgAaQAIAOkACAAZAAgAmQAIAFkACADZAAgAOQAIALkACAB5AAgA+QAIAAUACACFAAgARQAIAMUACAAlAAgApQAIAGUACADlAAgAFQAIAJUACABVAAgA1QAIADUACAC1AAgAdQAIAPUACAANAAgAjQAIAE0ACADNAAgALQAIAK0ACABtAAgA7QAIAB0ACACdAAgAXQAIAN0ACAA9AAgAvQAIAH0ACAD9AAgAEwAJABMBCQCTAAkAkwEJAFMACQBTAQkA0wAJANMBCQAzAAkAMwEJALMACQCzAQkAcwAJAHMBCQDzAAkA8wEJAAsACQALAQkAiwAJAIsBCQBLAAkASwEJAMsACQDLAQkAKwAJACsBCQCrAAkAqwEJAGsACQBrAQkA6wAJAOsBCQAbAAkAGwEJAJsACQCbAQkAWwAJAFsBCQDbAAkA2wEJADsACQA7AQkAuwAJALsBCQB7AAkAewEJAPsACQD7AQkABwAJAAcBCQCHAAkAhwEJAEcACQBHAQkAxwAJAMcBCQAnAAk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AwAAAAQAAAAGAAAACAAAAAwAAAAQAAAAGAAAACAAAAAwAAAAQAAAAGAAAACAAAAAwAAAAAABAACAAQAAAAIAAAADAAAABAAAAAYAAAAIAAAADAAAABAAAAAYAAAAIAAAADAAAABAAAAAYAAAMS4yLjExAEGI7wALbQcAAAAEAAQACAAEAAgAAAAEAAUAEAAIAAgAAAAEAAYAIAAgAAgAAAAEAAQAEAAQAAkAAAAIABAAIAAgAAkAAAAIABAAgACAAAkAAAAIACAAgAAAAQkAAAAgAIAAAgEABAkAAAAgAAIBAgEAEAkAQYDwAAulAgMABAAFAAYABwAIAAkACgALAA0ADwARABMAFwAbAB8AIwArADMAOwBDAFMAYwBzAIMAowDDAOMAAgEAAAAAAAAQABAAEAAQABAAEAAQABAAEQARABEAEQASABIAEgASABMAEwATABMAFAAUABQAFAAVABUAFQAVABAATQDKAAAAAQACAAMABAAFAAcACQANABEAGQAhADEAQQBhAIEAwQABAYEBAQIBAwEEAQYBCAEMARABGAEgATABQAFgAAAAABAAEAAQABAAEQARABIAEgATABMAFAAUABUAFQAWABYAFwAXABgAGAAZABkAGgAaABsAGwAcABwAHQAdAEAAQAAQABEAEgAAAAgABwAJAAYACgAFAAsABAAMAAMADQACAA4AAQAPAEGw8gALwRFgBwAAAAhQAAAIEAAUCHMAEgcfAAAIcAAACDAAAAnAABAHCgAACGAAAAggAAAJoAAACAAAAAiAAAAIQAAACeAAEAcGAAAIWAAACBgAAAmQABMHOwAACHgAAAg4AAAJ0AARBxEAAAhoAAAIKAAACbAAAAgIAAAIiAAACEgAAAnwABAHBAAACFQAAAgUABUI4wATBysAAAh0AAAINAAACcgAEQcNAAAIZAAACCQAAAmoAAAIBAAACIQAAAhEAAAJ6AAQBwgAAAhcAAAIHAAACZgAFAdTAAAIfAAACDwAAAnYABIHFwAACGwAAAgsAAAJuAAACAwAAAiMAAAITAAACfgAEAcDAAAIUgAACBIAFQijABMHIwAACHIAAAgyAAAJxAARBwsAAAhiAAAIIgAACaQAAAgCAA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lZGl1bSBmb3VuZABXcm9uZyBtZWRpdW0gdHlwZQBObyBlcnJvciBpbmZvcm1hdGlvbgBBkJcBC1JQUFAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABEAAAASAAAACwAAAAwAAAANAAAADgAAAA8AAAAQAAAAEQAAAAEAAAAIAAAAlEsAALRLAEGQmQELAgxQAEHImQELCR8AAADkTAAAAwBB5JkBC4wBLfRRWM+MscBG9rXLKTEDxwRbcDC0Xf0geH+LmthZKVBoSImrp1YDbP+3zYg/1He0K6WjcPG65Kj8QYP92W/hinovLXSWBx8NCV4Ddixw90ClLKdvV0GoqnTfoFhkA0rHxDxTrq9fGAQVseNtKIarDKS/Q/DpUIE5VxZSN/////////////////////8=";Tu(xo)||(xo=h(xo));function Ou(d){try{if(d==xo&&_)return new Uint8Array(_);var E=xa(d);if(E)return E;if(m)return m(d);throw"sync fetching of the wasm failed: you can preload it to Module['wasmBinary'] manually, or emcc.py will do that for you when generating HTML (but not JS)"}catch(I){vr(I)}}function Sh(d,E){var I,D,M;try{M=Ou(d),D=new WebAssembly.Module(M),I=new WebAssembly.Instance(D,E)}catch(ie){var z=ie.toString();throw x("failed to compile wasm module: "+z),(z.includes("imported Memory")||z.includes("memory import"))&&x("Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time)."),ie}return[I,D]}function vh(){var d={a:ka};function E(M,z){var ie=M.exports;t.asm=ie,A=t.asm.u,Ei(A.buffer),Qr=t.asm.pa,DA(t.asm.v),NA("wasm-instantiate")}if(FA("wasm-instantiate"),t.instantiateWasm)try{var I=t.instantiateWasm(d,E);return I}catch(M){return x("Module.instantiateWasm callback failed with error: "+M),!1}var D=Sh(xo,d);return E(D[0]),t.asm}var Dr,Ae;function ko(d){for(;d.length>0;){var E=d.shift();if(typeof E=="function"){E(t);continue}var I=E.func;typeof I=="number"?E.arg===void 0?Qr.get(I)():Qr.get(I)(E.arg):I(E.arg===void 0?null:E.arg)}}function Gn(d,E){var I=new Date(fe[d>>2]*1e3);fe[E>>2]=I.getUTCSeconds(),fe[E+4>>2]=I.getUTCMinutes(),fe[E+8>>2]=I.getUTCHours(),fe[E+12>>2]=I.getUTCDate(),fe[E+16>>2]=I.getUTCMonth(),fe[E+20>>2]=I.getUTCFullYear()-1900,fe[E+24>>2]=I.getUTCDay(),fe[E+36>>2]=0,fe[E+32>>2]=0;var D=Date.UTC(I.getUTCFullYear(),0,1,0,0,0,0),M=(I.getTime()-D)/(1e3*60*60*24)|0;return fe[E+28>>2]=M,Gn.GMTString||(Gn.GMTString=Fe("GMT")),fe[E+40>>2]=Gn.GMTString,E}function Mu(d,E){return Gn(d,E)}var St={splitPath:function(d){var E=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return E.exec(d).slice(1)},normalizeArray:function(d,E){for(var I=0,D=d.length-1;D>=0;D--){var M=d[D];M==="."?d.splice(D,1):M===".."?(d.splice(D,1),I++):I&&(d.splice(D,1),I--)}if(E)for(;I;I--)d.unshift("..");return d},normalize:function(d){var E=d.charAt(0)==="/",I=d.substr(-1)==="/";return d=St.normalizeArray(d.split("/").filter(function(D){return!!D}),!E).join("/"),!d&&!E&&(d="."),d&&I&&(d+="/"),(E?"/":"")+d},dirname:function(d){var E=St.splitPath(d),I=E[0],D=E[1];return!I&&!D?".":(D&&(D=D.substr(0,D.length-1)),I+D)},basename:function(d){if(d==="/")return"/";d=St.normalize(d),d=d.replace(/\/$/,"");var E=d.lastIndexOf("/");return E===-1?d:d.substr(E+1)},extname:function(d){return St.splitPath(d)[3]},join:function(){var d=Array.prototype.slice.call(arguments,0);return St.normalize(d.join("/"))},join2:function(d,E){return St.normalize(d+"/"+E)}};function _l(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var d=new Uint8Array(1);return function(){return crypto.getRandomValues(d),d[0]}}else if(g)try{var E=require("crypto");return function(){return E.randomBytes(1)[0]}}catch(I){}return function(){vr("randomDevice")}}var Yn={resolve:function(){for(var d="",E=!1,I=arguments.length-1;I>=-1&&!E;I--){var D=I>=0?arguments[I]:S.cwd();if(typeof D!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!D)return"";d=D+"/"+d,E=D.charAt(0)==="/"}return d=St.normalizeArray(d.split("/").filter(function(M){return!!M}),!E).join("/"),(E?"/":"")+d||"."},relative:function(d,E){d=Yn.resolve(d).substr(1),E=Yn.resolve(E).substr(1);function I(_e){for(var ot=0;ot<_e.length&&_e[ot]==="";ot++);for(var Bt=_e.length-1;Bt>=0&&_e[Bt]==="";Bt--);return ot>Bt?[]:_e.slice(ot,Bt-ot+1)}for(var D=I(d.split("/")),M=I(E.split("/")),z=Math.min(D.length,M.length),ie=z,we=0;we0?E=D.slice(0,M).toString("utf-8"):E=null}else typeof window!="undefined"&&typeof window.prompt=="function"?(E=window.prompt("Input: "),E!==null&&(E+=` +`)):typeof readline=="function"&&(E=readline(),E!==null&&(E+=` +`));if(!E)return null;d.input=TA(E,!0)}return d.input.shift()},put_char:function(d,E){E===null||E===10?(v(je(d.output,0)),d.output=[]):E!=0&&d.output.push(E)},flush:function(d){d.output&&d.output.length>0&&(v(je(d.output,0)),d.output=[])}},default_tty1_ops:{put_char:function(d,E){E===null||E===10?(x(je(d.output,0)),d.output=[]):E!=0&&d.output.push(E)},flush:function(d){d.output&&d.output.length>0&&(x(je(d.output,0)),d.output=[])}}};function ds(d){for(var E=q(d,65536),I=Et(E);d=E)){var D=1024*1024;E=Math.max(E,I*(I>>0),I!=0&&(E=Math.max(E,256));var M=d.contents;d.contents=new Uint8Array(E),d.usedBytes>0&&d.contents.set(M.subarray(0,d.usedBytes),0)}},resizeFileStorage:function(d,E){if(d.usedBytes!=E)if(E==0)d.contents=null,d.usedBytes=0;else{var I=d.contents;d.contents=new Uint8Array(E),I&&d.contents.set(I.subarray(0,Math.min(E,d.usedBytes))),d.usedBytes=E}},node_ops:{getattr:function(d){var E={};return E.dev=S.isChrdev(d.mode)?d.id:1,E.ino=d.id,E.mode=d.mode,E.nlink=1,E.uid=0,E.gid=0,E.rdev=d.rdev,S.isDir(d.mode)?E.size=4096:S.isFile(d.mode)?E.size=d.usedBytes:S.isLink(d.mode)?E.size=d.link.length:E.size=0,E.atime=new Date(d.timestamp),E.mtime=new Date(d.timestamp),E.ctime=new Date(d.timestamp),E.blksize=4096,E.blocks=Math.ceil(E.size/E.blksize),E},setattr:function(d,E){E.mode!==void 0&&(d.mode=E.mode),E.timestamp!==void 0&&(d.timestamp=E.timestamp),E.size!==void 0&&pt.resizeFileStorage(d,E.size)},lookup:function(d,E){throw S.genericErrors[44]},mknod:function(d,E,I,D){return pt.createNode(d,E,I,D)},rename:function(d,E,I){if(S.isDir(d.mode)){var D;try{D=S.lookupNode(E,I)}catch(z){}if(D)for(var M in D.contents)throw new S.ErrnoError(55)}delete d.parent.contents[d.name],d.parent.timestamp=Date.now(),d.name=I,E.contents[I]=d,E.timestamp=d.parent.timestamp,d.parent=E},unlink:function(d,E){delete d.contents[E],d.timestamp=Date.now()},rmdir:function(d,E){var I=S.lookupNode(d,E);for(var D in I.contents)throw new S.ErrnoError(55);delete d.contents[E],d.timestamp=Date.now()},readdir:function(d){var E=[".",".."];for(var I in d.contents)!d.contents.hasOwnProperty(I)||E.push(I);return E},symlink:function(d,E,I){var D=pt.createNode(d,E,511|40960,0);return D.link=I,D},readlink:function(d){if(!S.isLink(d.mode))throw new S.ErrnoError(28);return d.link}},stream_ops:{read:function(d,E,I,D,M){var z=d.node.contents;if(M>=d.node.usedBytes)return 0;var ie=Math.min(d.node.usedBytes-M,D);if(ie>8&&z.subarray)E.set(z.subarray(M,M+ie),I);else for(var we=0;we0||D+I>2)}catch(I){throw I.code?new S.ErrnoError(lt.convertNodeCode(I)):I}return E.mode},realPath:function(d){for(var E=[];d.parent!==d;)E.push(d.name),d=d.parent;return E.push(d.mount.opts.root),E.reverse(),St.join.apply(null,E)},flagsForNode:function(d){d&=~2097152,d&=~2048,d&=~32768,d&=~524288;var E=0;for(var I in lt.flagsForNodeMap)d&I&&(E|=lt.flagsForNodeMap[I],d^=I);if(d)throw new S.ErrnoError(28);return E},node_ops:{getattr:function(d){var E=lt.realPath(d),I;try{I=Oe.lstatSync(E)}catch(D){throw D.code?new S.ErrnoError(lt.convertNodeCode(D)):D}return lt.isWindows&&!I.blksize&&(I.blksize=4096),lt.isWindows&&!I.blocks&&(I.blocks=(I.size+I.blksize-1)/I.blksize|0),{dev:I.dev,ino:I.ino,mode:I.mode,nlink:I.nlink,uid:I.uid,gid:I.gid,rdev:I.rdev,size:I.size,atime:I.atime,mtime:I.mtime,ctime:I.ctime,blksize:I.blksize,blocks:I.blocks}},setattr:function(d,E){var I=lt.realPath(d);try{if(E.mode!==void 0&&(Oe.chmodSync(I,E.mode),d.mode=E.mode),E.timestamp!==void 0){var D=new Date(E.timestamp);Oe.utimesSync(I,D,D)}E.size!==void 0&&Oe.truncateSync(I,E.size)}catch(M){throw M.code?new S.ErrnoError(lt.convertNodeCode(M)):M}},lookup:function(d,E){var I=St.join2(lt.realPath(d),E),D=lt.getMode(I);return lt.createNode(d,E,D)},mknod:function(d,E,I,D){var M=lt.createNode(d,E,I,D),z=lt.realPath(M);try{S.isDir(M.mode)?Oe.mkdirSync(z,M.mode):Oe.writeFileSync(z,"",{mode:M.mode})}catch(ie){throw ie.code?new S.ErrnoError(lt.convertNodeCode(ie)):ie}return M},rename:function(d,E,I){var D=lt.realPath(d),M=St.join2(lt.realPath(E),I);try{Oe.renameSync(D,M)}catch(z){throw z.code?new S.ErrnoError(lt.convertNodeCode(z)):z}d.name=I},unlink:function(d,E){var I=St.join2(lt.realPath(d),E);try{Oe.unlinkSync(I)}catch(D){throw D.code?new S.ErrnoError(lt.convertNodeCode(D)):D}},rmdir:function(d,E){var I=St.join2(lt.realPath(d),E);try{Oe.rmdirSync(I)}catch(D){throw D.code?new S.ErrnoError(lt.convertNodeCode(D)):D}},readdir:function(d){var E=lt.realPath(d);try{return Oe.readdirSync(E)}catch(I){throw I.code?new S.ErrnoError(lt.convertNodeCode(I)):I}},symlink:function(d,E,I){var D=St.join2(lt.realPath(d),E);try{Oe.symlinkSync(I,D)}catch(M){throw M.code?new S.ErrnoError(lt.convertNodeCode(M)):M}},readlink:function(d){var E=lt.realPath(d);try{return E=Oe.readlinkSync(E),E=Hu.relative(Hu.resolve(d.mount.opts.root),E),E}catch(I){throw I.code?new S.ErrnoError(lt.convertNodeCode(I)):I}}},stream_ops:{open:function(d){var E=lt.realPath(d.node);try{S.isFile(d.node.mode)&&(d.nfd=Oe.openSync(E,lt.flagsForNode(d.flags)))}catch(I){throw I.code?new S.ErrnoError(lt.convertNodeCode(I)):I}},close:function(d){try{S.isFile(d.node.mode)&&d.nfd&&Oe.closeSync(d.nfd)}catch(E){throw E.code?new S.ErrnoError(lt.convertNodeCode(E)):E}},read:function(d,E,I,D,M){if(D===0)return 0;try{return Oe.readSync(d.nfd,lt.bufferFrom(E.buffer),I,D,M)}catch(z){throw new S.ErrnoError(lt.convertNodeCode(z))}},write:function(d,E,I,D,M){try{return Oe.writeSync(d.nfd,lt.bufferFrom(E.buffer),I,D,M)}catch(z){throw new S.ErrnoError(lt.convertNodeCode(z))}},llseek:function(d,E,I){var D=E;if(I===1)D+=d.position;else if(I===2&&S.isFile(d.node.mode))try{var M=Oe.fstatSync(d.nfd);D+=M.size}catch(z){throw new S.ErrnoError(lt.convertNodeCode(z))}if(D<0)throw new S.ErrnoError(28);return D},mmap:function(d,E,I,D,M,z){if(E!==0)throw new S.ErrnoError(28);if(!S.isFile(d.node.mode))throw new S.ErrnoError(43);var ie=ds(I);return lt.stream_ops.read(d,pe,ie,I,D),{ptr:ie,allocated:!0}},msync:function(d,E,I,D,M){if(!S.isFile(d.node.mode))throw new S.ErrnoError(43);if(M&2)return 0;var z=lt.stream_ops.write(d,E,0,D,I,!1);return 0}}},mn={lookupPath:function(d){return{path:d,node:{mode:lt.getMode(d)}}},createStandardStreams:function(){S.streams[0]={fd:0,nfd:0,position:0,path:"",flags:0,tty:!0,seekable:!1};for(var d=1;d<3;d++)S.streams[d]={fd:d,nfd:d,position:0,path:"",flags:577,tty:!0,seekable:!1}},cwd:function(){return process.cwd()},chdir:function(){process.chdir.apply(void 0,arguments)},mknod:function(d,E){S.isDir(d)?Oe.mkdirSync(d,E):Oe.writeFileSync(d,"",{mode:E})},mkdir:function(){Oe.mkdirSync.apply(void 0,arguments)},symlink:function(){Oe.symlinkSync.apply(void 0,arguments)},rename:function(){Oe.renameSync.apply(void 0,arguments)},rmdir:function(){Oe.rmdirSync.apply(void 0,arguments)},readdir:function(){Oe.readdirSync.apply(void 0,arguments)},unlink:function(){Oe.unlinkSync.apply(void 0,arguments)},readlink:function(){return Oe.readlinkSync.apply(void 0,arguments)},stat:function(){return Oe.statSync.apply(void 0,arguments)},lstat:function(){return Oe.lstatSync.apply(void 0,arguments)},chmod:function(){Oe.chmodSync.apply(void 0,arguments)},fchmod:function(){Oe.fchmodSync.apply(void 0,arguments)},chown:function(){Oe.chownSync.apply(void 0,arguments)},fchown:function(){Oe.fchownSync.apply(void 0,arguments)},truncate:function(){Oe.truncateSync.apply(void 0,arguments)},ftruncate:function(d,E){if(E<0)throw new S.ErrnoError(28);Oe.ftruncateSync.apply(void 0,arguments)},utime:function(){Oe.utimesSync.apply(void 0,arguments)},open:function(d,E,I,D){typeof E=="string"&&(E=$s.modeStringToFlags(E));var M=Oe.openSync(d,lt.flagsForNode(E),I),z=D!=null?D:S.nextfd(M),ie={fd:z,nfd:M,position:0,path:d,flags:E,seekable:!0};return S.streams[z]=ie,ie},close:function(d){d.stream_ops||Oe.closeSync(d.nfd),S.closeStream(d.fd)},llseek:function(d,E,I){if(d.stream_ops)return $s.llseek(d,E,I);var D=E;if(I===1)D+=d.position;else if(I===2)D+=Oe.fstatSync(d.nfd).size;else if(I!==0)throw new S.ErrnoError(Po.EINVAL);if(D<0)throw new S.ErrnoError(Po.EINVAL);return d.position=D,D},read:function(d,E,I,D,M){if(d.stream_ops)return $s.read(d,E,I,D,M);var z=typeof M!="undefined";!z&&d.seekable&&(M=d.position);var ie=Oe.readSync(d.nfd,lt.bufferFrom(E.buffer),I,D,M);return z||(d.position+=ie),ie},write:function(d,E,I,D,M){if(d.stream_ops)return $s.write(d,E,I,D,M);d.flags&+"1024"&&S.llseek(d,0,+"2");var z=typeof M!="undefined";!z&&d.seekable&&(M=d.position);var ie=Oe.writeSync(d.nfd,lt.bufferFrom(E.buffer),I,D,M);return z||(d.position+=ie),ie},allocate:function(){throw new S.ErrnoError(Po.EOPNOTSUPP)},mmap:function(d,E,I,D,M,z){if(d.stream_ops)return $s.mmap(d,E,I,D,M,z);if(E!==0)throw new S.ErrnoError(28);var ie=ds(I);return S.read(d,pe,ie,I,D),{ptr:ie,allocated:!0}},msync:function(d,E,I,D,M){return d.stream_ops?$s.msync(d,E,I,D,M):(M&2||S.write(d,E,0,D,I),0)},munmap:function(){return 0},ioctl:function(){throw new S.ErrnoError(Po.ENOTTY)}},S={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(d,E){if(d=Yn.resolve(S.cwd(),d),E=E||{},!d)return{path:"",node:null};var I={follow_mount:!0,recurse_count:0};for(var D in I)E[D]===void 0&&(E[D]=I[D]);if(E.recurse_count>8)throw new S.ErrnoError(32);for(var M=St.normalizeArray(d.split("/").filter(function(ut){return!!ut}),!1),z=S.root,ie="/",we=0;we40)throw new S.ErrnoError(32)}}return{path:ie,node:z}},getPath:function(d){for(var E;;){if(S.isRoot(d)){var I=d.mount.mountpoint;return E?I[I.length-1]!=="/"?I+"/"+E:I+E:I}E=E?d.name+"/"+E:d.name,d=d.parent}},hashName:function(d,E){for(var I=0,D=0;D>>0)%S.nameTable.length},hashAddNode:function(d){var E=S.hashName(d.parent.id,d.name);d.name_next=S.nameTable[E],S.nameTable[E]=d},hashRemoveNode:function(d){var E=S.hashName(d.parent.id,d.name);if(S.nameTable[E]===d)S.nameTable[E]=d.name_next;else for(var I=S.nameTable[E];I;){if(I.name_next===d){I.name_next=d.name_next;break}I=I.name_next}},lookupNode:function(d,E){var I=S.mayLookup(d);if(I)throw new S.ErrnoError(I,d);for(var D=S.hashName(d.id,E),M=S.nameTable[D];M;M=M.name_next){var z=M.name;if(M.parent.id===d.id&&z===E)return M}return S.lookup(d,E)},createNode:function(d,E,I,D){var M=new S.FSNode(d,E,I,D);return S.hashAddNode(M),M},destroyNode:function(d){S.hashRemoveNode(d)},isRoot:function(d){return d===d.parent},isMountpoint:function(d){return!!d.mounted},isFile:function(d){return(d&61440)==32768},isDir:function(d){return(d&61440)==16384},isLink:function(d){return(d&61440)==40960},isChrdev:function(d){return(d&61440)==8192},isBlkdev:function(d){return(d&61440)==24576},isFIFO:function(d){return(d&61440)==4096},isSocket:function(d){return(d&49152)==49152},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(d){var E=S.flagModes[d];if(typeof E=="undefined")throw new Error("Unknown file open mode: "+d);return E},flagsToPermissionString:function(d){var E=["r","w","rw"][d&3];return d&512&&(E+="w"),E},nodePermissions:function(d,E){return S.ignorePermissions?0:E.includes("r")&&!(d.mode&292)||E.includes("w")&&!(d.mode&146)||E.includes("x")&&!(d.mode&73)?2:0},mayLookup:function(d){var E=S.nodePermissions(d,"x");return E||(d.node_ops.lookup?0:2)},mayCreate:function(d,E){try{var I=S.lookupNode(d,E);return 20}catch(D){}return S.nodePermissions(d,"wx")},mayDelete:function(d,E,I){var D;try{D=S.lookupNode(d,E)}catch(z){return z.errno}var M=S.nodePermissions(d,"wx");if(M)return M;if(I){if(!S.isDir(D.mode))return 54;if(S.isRoot(D)||S.getPath(D)===S.cwd())return 10}else if(S.isDir(D.mode))return 31;return 0},mayOpen:function(d,E){return d?S.isLink(d.mode)?32:S.isDir(d.mode)&&(S.flagsToPermissionString(E)!=="r"||E&512)?31:S.nodePermissions(d,S.flagsToPermissionString(E)):44},MAX_OPEN_FDS:4096,nextfd:function(d,E){d=d||0,E=E||S.MAX_OPEN_FDS;for(var I=d;I<=E;I++)if(!S.streams[I])return I;throw new S.ErrnoError(33)},getStream:function(d){return S.streams[d]},createStream:function(d,E,I){S.FSStream||(S.FSStream=function(){},S.FSStream.prototype={object:{get:function(){return this.node},set:function(ie){this.node=ie}},isRead:{get:function(){return(this.flags&2097155)!=1}},isWrite:{get:function(){return(this.flags&2097155)!=0}},isAppend:{get:function(){return this.flags&1024}}});var D=new S.FSStream;for(var M in d)D[M]=d[M];d=D;var z=S.nextfd(E,I);return d.fd=z,S.streams[z]=d,d},closeStream:function(d){S.streams[d]=null},chrdev_stream_ops:{open:function(d){var E=S.getDevice(d.node.rdev);d.stream_ops=E.stream_ops,d.stream_ops.open&&d.stream_ops.open(d)},llseek:function(){throw new S.ErrnoError(70)}},major:function(d){return d>>8},minor:function(d){return d&255},makedev:function(d,E){return d<<8|E},registerDevice:function(d,E){S.devices[d]={stream_ops:E}},getDevice:function(d){return S.devices[d]},getMounts:function(d){for(var E=[],I=[d];I.length;){var D=I.pop();E.push(D),I.push.apply(I,D.mounts)}return E},syncfs:function(d,E){typeof d=="function"&&(E=d,d=!1),S.syncFSRequests++,S.syncFSRequests>1&&x("warning: "+S.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var I=S.getMounts(S.root.mount),D=0;function M(ie){return S.syncFSRequests--,E(ie)}function z(ie){if(ie)return z.errored?void 0:(z.errored=!0,M(ie));++D>=I.length&&M(null)}I.forEach(function(ie){if(!ie.type.syncfs)return z(null);ie.type.syncfs(ie,d,z)})},mount:function(d,E,I){var D=I==="/",M=!I,z;if(D&&S.root)throw new S.ErrnoError(10);if(!D&&!M){var ie=S.lookupPath(I,{follow_mount:!1});if(I=ie.path,z=ie.node,S.isMountpoint(z))throw new S.ErrnoError(10);if(!S.isDir(z.mode))throw new S.ErrnoError(54)}var we={type:d,opts:E,mountpoint:I,mounts:[]},me=d.mount(we);return me.mount=we,we.root=me,D?S.root=me:z&&(z.mounted=we,z.mount&&z.mount.mounts.push(we)),me},unmount:function(d){var E=S.lookupPath(d,{follow_mount:!1});if(!S.isMountpoint(E.node))throw new S.ErrnoError(28);var I=E.node,D=I.mounted,M=S.getMounts(D);Object.keys(S.nameTable).forEach(function(ie){for(var we=S.nameTable[ie];we;){var me=we.name_next;M.includes(we.mount)&&S.destroyNode(we),we=me}}),I.mounted=null;var z=I.mount.mounts.indexOf(D);I.mount.mounts.splice(z,1)},lookup:function(d,E){return d.node_ops.lookup(d,E)},mknod:function(d,E,I){var D=S.lookupPath(d,{parent:!0}),M=D.node,z=St.basename(d);if(!z||z==="."||z==="..")throw new S.ErrnoError(28);var ie=S.mayCreate(M,z);if(ie)throw new S.ErrnoError(ie);if(!M.node_ops.mknod)throw new S.ErrnoError(63);return M.node_ops.mknod(M,z,E,I)},create:function(d,E){return E=E!==void 0?E:438,E&=4095,E|=32768,S.mknod(d,E,0)},mkdir:function(d,E){return E=E!==void 0?E:511,E&=511|512,E|=16384,S.mknod(d,E,0)},mkdirTree:function(d,E){for(var I=d.split("/"),D="",M=0;Mthis.length-1||ut<0)){var st=ut%this.chunkSize,yt=ut/this.chunkSize|0;return this.getter(yt)[st]}},z.prototype.setDataGetter=function(ut){this.getter=ut},z.prototype.cacheLength=function(){var ut=new XMLHttpRequest;if(ut.open("HEAD",I,!1),ut.send(null),!(ut.status>=200&&ut.status<300||ut.status===304))throw new Error("Couldn't load "+I+". Status: "+ut.status);var st=Number(ut.getResponseHeader("Content-length")),yt,xe=(yt=ut.getResponseHeader("Accept-Ranges"))&&yt==="bytes",Wn=(yt=ut.getResponseHeader("Content-Encoding"))&&yt==="gzip",Mi=1024*1024;xe||(Mi=st);var HA=function(Cs,Pa){if(Cs>Pa)throw new Error("invalid range ("+Cs+", "+Pa+") or no bytes requested!");if(Pa>st-1)throw new Error("only "+st+" bytes available! programmer error!");var qr=new XMLHttpRequest;if(qr.open("GET",I,!1),st!==Mi&&qr.setRequestHeader("Range","bytes="+Cs+"-"+Pa),typeof Uint8Array!="undefined"&&(qr.responseType="arraybuffer"),qr.overrideMimeType&&qr.overrideMimeType("text/plain; charset=x-user-defined"),qr.send(null),!(qr.status>=200&&qr.status<300||qr.status===304))throw new Error("Couldn't load "+I+". Status: "+qr.status);return qr.response!==void 0?new Uint8Array(qr.response||[]):TA(qr.responseText||"",!0)},Yr=this;Yr.setDataGetter(function(Cs){var Pa=Cs*Mi,qr=(Cs+1)*Mi-1;if(qr=Math.min(qr,st-1),typeof Yr.chunks[Cs]=="undefined"&&(Yr.chunks[Cs]=HA(Pa,qr)),typeof Yr.chunks[Cs]=="undefined")throw new Error("doXHR failed!");return Yr.chunks[Cs]}),(Wn||!st)&&(Mi=st=1,st=this.getter(0).length,Mi=st,v("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=st,this._chunkSize=Mi,this.lengthKnown=!0},typeof XMLHttpRequest!="undefined"){if(!u)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var ie=new z;Object.defineProperties(ie,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var we={isDevice:!1,contents:ie}}else var we={isDevice:!1,url:I};var me=S.createFile(d,E,we,D,M);we.contents?me.contents=we.contents:we.url&&(me.contents=null,me.url=we.url),Object.defineProperties(me,{usedBytes:{get:function(){return this.contents.length}}});var _e={},ot=Object.keys(me.stream_ops);return ot.forEach(function(Bt){var ut=me.stream_ops[Bt];_e[Bt]=function(){return S.forceLoadFile(me),ut.apply(null,arguments)}}),_e.read=function(ut,st,yt,xe,Wn){S.forceLoadFile(me);var Mi=ut.node.contents;if(Wn>=Mi.length)return 0;var HA=Math.min(Mi.length-Wn,xe);if(Mi.slice)for(var Yr=0;Yr>2]=D.dev,fe[I+4>>2]=0,fe[I+8>>2]=D.ino,fe[I+12>>2]=D.mode,fe[I+16>>2]=D.nlink,fe[I+20>>2]=D.uid,fe[I+24>>2]=D.gid,fe[I+28>>2]=D.rdev,fe[I+32>>2]=0,Ae=[D.size>>>0,(Dr=D.size,+Math.abs(Dr)>=1?Dr>0?(Math.min(+Math.floor(Dr/4294967296),4294967295)|0)>>>0:~~+Math.ceil((Dr-+(~~Dr>>>0))/4294967296)>>>0:0)],fe[I+40>>2]=Ae[0],fe[I+44>>2]=Ae[1],fe[I+48>>2]=4096,fe[I+52>>2]=D.blocks,fe[I+56>>2]=D.atime.getTime()/1e3|0,fe[I+60>>2]=0,fe[I+64>>2]=D.mtime.getTime()/1e3|0,fe[I+68>>2]=0,fe[I+72>>2]=D.ctime.getTime()/1e3|0,fe[I+76>>2]=0,Ae=[D.ino>>>0,(Dr=D.ino,+Math.abs(Dr)>=1?Dr>0?(Math.min(+Math.floor(Dr/4294967296),4294967295)|0)>>>0:~~+Math.ceil((Dr-+(~~Dr>>>0))/4294967296)>>>0:0)],fe[I+80>>2]=Ae[0],fe[I+84>>2]=Ae[1],0},doMsync:function(d,E,I,D,M){var z=V.slice(d,d+I);S.msync(E,z,M,I,D)},doMkdir:function(d,E){return d=St.normalize(d),d[d.length-1]==="/"&&(d=d.substr(0,d.length-1)),S.mkdir(d,E,0),0},doMknod:function(d,E,I){switch(E&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return S.mknod(d,E,I),0},doReadlink:function(d,E,I){if(I<=0)return-28;var D=S.readlink(d),M=Math.min(I,he(D)),z=pe[E+M];return be(D,E,I+1),pe[E+M]=z,M},doAccess:function(d,E){if(E&~7)return-28;var I,D=S.lookupPath(d,{follow:!0});if(I=D.node,!I)return-44;var M="";return E&4&&(M+="r"),E&2&&(M+="w"),E&1&&(M+="x"),M&&S.nodePermissions(I,M)?-2:0},doDup:function(d,E,I){var D=S.getStream(I);return D&&S.close(D),S.open(d,E,0,I,I).fd},doReadv:function(d,E,I,D){for(var M=0,z=0;z>2],we=fe[E+(z*8+4)>>2],me=S.read(d,pe,ie,we,D);if(me<0)return-1;if(M+=me,me>2],we=fe[E+(z*8+4)>>2],me=S.write(d,pe,ie,we,D);if(me<0)return-1;M+=me}return M},varargs:void 0,get:function(){Tt.varargs+=4;var d=fe[Tt.varargs-4>>2];return d},getStr:function(d){var E=re(d);return E},getStreamFromFD:function(d){var E=S.getStream(d);if(!E)throw new S.ErrnoError(8);return E},get64:function(d,E){return d}};function Ku(d,E){try{return d=Tt.getStr(d),S.chmod(d,E),0}catch(I){return(typeof S=="undefined"||!(I instanceof S.ErrnoError))&&vr(I),-I.errno}}function Vl(d){return fe[Rt()>>2]=d,d}function xh(d,E,I){Tt.varargs=I;try{var D=Tt.getStreamFromFD(d);switch(E){case 0:{var M=Tt.get();if(M<0)return-28;var z;return z=S.open(D.path,D.flags,0,M),z.fd}case 1:case 2:return 0;case 3:return D.flags;case 4:{var M=Tt.get();return D.flags|=M,0}case 12:{var M=Tt.get(),ie=0;return Qe[M+ie>>1]=2,0}case 13:case 14:return 0;case 16:case 8:return-28;case 9:return Vl(28),-1;default:return-28}}catch(we){return(typeof S=="undefined"||!(we instanceof S.ErrnoError))&&vr(we),-we.errno}}function kh(d,E){try{var I=Tt.getStreamFromFD(d);return Tt.doStat(S.stat,I.path,E)}catch(D){return(typeof S=="undefined"||!(D instanceof S.ErrnoError))&&vr(D),-D.errno}}function Ph(d,E,I){Tt.varargs=I;try{var D=Tt.getStreamFromFD(d);switch(E){case 21509:case 21505:return D.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return D.tty?0:-59;case 21519:{if(!D.tty)return-59;var M=Tt.get();return fe[M>>2]=0,0}case 21520:return D.tty?-28:-59;case 21531:{var M=Tt.get();return S.ioctl(D,E,M)}case 21523:return D.tty?0:-59;case 21524:return D.tty?0:-59;default:vr("bad ioctl syscall "+E)}}catch(z){return(typeof S=="undefined"||!(z instanceof S.ErrnoError))&&vr(z),-z.errno}}function Dh(d,E,I){Tt.varargs=I;try{var D=Tt.getStr(d),M=I?Tt.get():0,z=S.open(D,E,M);return z.fd}catch(ie){return(typeof S=="undefined"||!(ie instanceof S.ErrnoError))&&vr(ie),-ie.errno}}function Rh(d,E){try{return d=Tt.getStr(d),E=Tt.getStr(E),S.rename(d,E),0}catch(I){return(typeof S=="undefined"||!(I instanceof S.ErrnoError))&&vr(I),-I.errno}}function j(d){try{return d=Tt.getStr(d),S.rmdir(d),0}catch(E){return(typeof S=="undefined"||!(E instanceof S.ErrnoError))&&vr(E),-E.errno}}function wt(d,E){try{return d=Tt.getStr(d),Tt.doStat(S.stat,d,E)}catch(I){return(typeof S=="undefined"||!(I instanceof S.ErrnoError))&&vr(I),-I.errno}}function LA(d){try{return d=Tt.getStr(d),S.unlink(d),0}catch(E){return(typeof S=="undefined"||!(E instanceof S.ErrnoError))&&vr(E),-E.errno}}function $i(d,E,I){V.copyWithin(d,E,E+I)}function Xl(d){try{return A.grow(d-ve.byteLength+65535>>>16),Ei(A.buffer),1}catch(E){}}function $e(d){var E=V.length;d=d>>>0;var I=2147483648;if(d>I)return!1;for(var D=1;D<=4;D*=2){var M=E*(1+.2/D);M=Math.min(M,d+100663296);var z=Math.min(I,ke(Math.max(d,M),65536)),ie=Xl(z);if(ie)return!0}return!1}function Sa(d){try{var E=Tt.getStreamFromFD(d);return S.close(E),0}catch(I){return(typeof S=="undefined"||!(I instanceof S.ErrnoError))&&vr(I),I.errno}}function Uu(d,E){try{var I=Tt.getStreamFromFD(d),D=I.tty?2:S.isDir(I.mode)?3:S.isLink(I.mode)?7:4;return pe[E>>0]=D,0}catch(M){return(typeof S=="undefined"||!(M instanceof S.ErrnoError))&&vr(M),M.errno}}function yE(d,E,I,D){try{var M=Tt.getStreamFromFD(d),z=Tt.doReadv(M,E,I);return fe[D>>2]=z,0}catch(ie){return(typeof S=="undefined"||!(ie instanceof S.ErrnoError))&&vr(ie),ie.errno}}function Fh(d,E,I,D,M){try{var z=Tt.getStreamFromFD(d),ie=4294967296,we=I*ie+(E>>>0),me=9007199254740992;return we<=-me||we>=me?-61:(S.llseek(z,we,D),Ae=[z.position>>>0,(Dr=z.position,+Math.abs(Dr)>=1?Dr>0?(Math.min(+Math.floor(Dr/4294967296),4294967295)|0)>>>0:~~+Math.ceil((Dr-+(~~Dr>>>0))/4294967296)>>>0:0)],fe[M>>2]=Ae[0],fe[M+4>>2]=Ae[1],z.getdents&&we===0&&D===0&&(z.getdents=null),0)}catch(_e){return(typeof S=="undefined"||!(_e instanceof S.ErrnoError))&&vr(_e),_e.errno}}function wE(d,E,I,D){try{var M=Tt.getStreamFromFD(d),z=Tt.doWritev(M,E,I);return fe[D>>2]=z,0}catch(ie){return(typeof S=="undefined"||!(ie instanceof S.ErrnoError))&&vr(ie),ie.errno}}function gr(d){$(d)}function qn(d){var E=Date.now()/1e3|0;return d&&(fe[d>>2]=E),E}function Zl(){if(Zl.called)return;Zl.called=!0;var d=new Date().getFullYear(),E=new Date(d,0,1),I=new Date(d,6,1),D=E.getTimezoneOffset(),M=I.getTimezoneOffset(),z=Math.max(D,M);fe[zb()>>2]=z*60,fe[Wb()>>2]=Number(D!=M);function ie(Bt){var ut=Bt.toTimeString().match(/\(([A-Za-z ]+)\)$/);return ut?ut[1]:"GMT"}var we=ie(E),me=ie(I),_e=Fe(we),ot=Fe(me);M>2]=_e,fe[Wu()+4>>2]=ot):(fe[Wu()>>2]=ot,fe[Wu()+4>>2]=_e)}function Nh(d){Zl();var E=Date.UTC(fe[d+20>>2]+1900,fe[d+16>>2],fe[d+12>>2],fe[d+8>>2],fe[d+4>>2],fe[d>>2],0),I=new Date(E);fe[d+24>>2]=I.getUTCDay();var D=Date.UTC(I.getUTCFullYear(),0,1,0,0,0,0),M=(I.getTime()-D)/(1e3*60*60*24)|0;return fe[d+28>>2]=M,I.getTime()/1e3|0}var Zs=function(d,E,I,D){d||(d=this),this.parent=d,this.mount=d.mount,this.mounted=null,this.id=S.nextInode++,this.name=E,this.mode=I,this.node_ops={},this.stream_ops={},this.rdev=D},va=292|73,En=146;if(Object.defineProperties(Zs.prototype,{read:{get:function(){return(this.mode&va)===va},set:function(d){d?this.mode|=va:this.mode&=~va}},write:{get:function(){return(this.mode&En)===En},set:function(d){d?this.mode|=En:this.mode&=~En}},isFolder:{get:function(){return S.isDir(this.mode)}},isDevice:{get:function(){return S.isChrdev(this.mode)}}}),S.FSNode=Zs,S.staticInit(),g){var Oe=v5,Hu=require("path");lt.staticInit()}if(g){var $l=function(d){return function(){try{return d.apply(this,arguments)}catch(E){throw E.code?new S.ErrnoError(Po[E.code]):E}}},$s=Object.assign({},S);for(var ec in mn)S[ec]=$l(mn[ec])}else throw new Error("NODERAWFS is currently only supported on Node.js environment.");function TA(d,E,I){var D=I>0?I:he(d)+1,M=new Array(D),z=se(d,M,0,M.length);return E&&(M.length=z),M}var ju=typeof atob=="function"?atob:function(d){var E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",I="",D,M,z,ie,we,me,_e,ot=0;d=d.replace(/[^A-Za-z0-9\+\/\=]/g,"");do ie=E.indexOf(d.charAt(ot++)),we=E.indexOf(d.charAt(ot++)),me=E.indexOf(d.charAt(ot++)),_e=E.indexOf(d.charAt(ot++)),D=ie<<2|we>>4,M=(we&15)<<4|me>>2,z=(me&3)<<6|_e,I=I+String.fromCharCode(D),me!==64&&(I=I+String.fromCharCode(M)),_e!==64&&(I=I+String.fromCharCode(z));while(ot0||(Sr(),hs>0))return;function E(){Ue||(Ue=!0,t.calledRun=!0,!oe&&(jn(),i(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),fs()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),E()},1)):E()}if(t.run=UA,t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();return UA(),e}}();typeof Gw=="object"&&typeof jP=="object"?jP.exports=GP:typeof define=="function"&&define.amd?define([],function(){return GP}):typeof Gw=="object"&&(Gw.createModule=GP)});var $5=w((Nst,Z5)=>{function KPe(r,e){for(var t=-1,i=r==null?0:r.length,n=Array(i);++t{var UPe=Array.isArray;e9.exports=UPe});var o9=w((Tst,t9)=>{var r9=Jc(),HPe=$5(),jPe=Ks(),GPe=Id(),YPe=1/0,i9=r9?r9.prototype:void 0,n9=i9?i9.toString:void 0;function s9(r){if(typeof r=="string")return r;if(jPe(r))return HPe(r,s9)+"";if(GPe(r))return n9?n9.call(r):"";var e=r+"";return e=="0"&&1/r==-YPe?"-0":e}t9.exports=s9});var lf=w((Ost,a9)=>{var qPe=o9();function JPe(r){return r==null?"":qPe(r)}a9.exports=JPe});var VP=w((Mst,A9)=>{function WPe(r,e,t){var i=-1,n=r.length;e<0&&(e=-e>n?0:n+e),t=t>n?n:t,t<0&&(t+=n),n=e>t?0:t-e>>>0,e>>>=0;for(var s=Array(n);++i{var zPe=VP();function _Pe(r,e,t){var i=r.length;return t=t===void 0?i:t,!e&&t>=i?r:zPe(r,e,t)}l9.exports=_Pe});var XP=w((Ust,u9)=>{var VPe="\\ud800-\\udfff",XPe="\\u0300-\\u036f",ZPe="\\ufe20-\\ufe2f",$Pe="\\u20d0-\\u20ff",eDe=XPe+ZPe+$Pe,tDe="\\ufe0e\\ufe0f",rDe="\\u200d",iDe=RegExp("["+rDe+VPe+eDe+tDe+"]");function nDe(r){return iDe.test(r)}u9.exports=nDe});var f9=w((Hst,g9)=>{function sDe(r){return r.split("")}g9.exports=sDe});var y9=w((jst,h9)=>{var p9="\\ud800-\\udfff",oDe="\\u0300-\\u036f",aDe="\\ufe20-\\ufe2f",ADe="\\u20d0-\\u20ff",lDe=oDe+aDe+ADe,cDe="\\ufe0e\\ufe0f",uDe="["+p9+"]",ZP="["+lDe+"]",$P="\\ud83c[\\udffb-\\udfff]",gDe="(?:"+ZP+"|"+$P+")",d9="[^"+p9+"]",C9="(?:\\ud83c[\\udde6-\\uddff]){2}",m9="[\\ud800-\\udbff][\\udc00-\\udfff]",fDe="\\u200d",E9=gDe+"?",I9="["+cDe+"]?",hDe="(?:"+fDe+"(?:"+[d9,C9,m9].join("|")+")"+I9+E9+")*",pDe=I9+E9+hDe,dDe="(?:"+[d9+ZP+"?",ZP,C9,m9,uDe].join("|")+")",CDe=RegExp($P+"(?="+$P+")|"+dDe+pDe,"g");function mDe(r){return r.match(CDe)||[]}h9.exports=mDe});var B9=w((Gst,w9)=>{var EDe=f9(),IDe=XP(),yDe=y9();function wDe(r){return IDe(r)?yDe(r):EDe(r)}w9.exports=wDe});var Q9=w((Yst,b9)=>{var BDe=c9(),bDe=XP(),QDe=B9(),SDe=lf();function vDe(r){return function(e){e=SDe(e);var t=bDe(e)?QDe(e):void 0,i=t?t[0]:e.charAt(0),n=t?BDe(t,1).join(""):e.slice(1);return i[r]()+n}}b9.exports=vDe});var v9=w((qst,S9)=>{var xDe=Q9(),kDe=xDe("toUpperCase");S9.exports=kDe});var Zw=w((Jst,x9)=>{var PDe=lf(),DDe=v9();function RDe(r){return DDe(PDe(r).toLowerCase())}x9.exports=RDe});var k9=w((Wst,$w)=>{function FDe(){var r=0,e=1,t=2,i=3,n=4,s=5,o=6,a=7,l=8,c=9,u=10,g=11,f=12,h=13,p=14,m=15,y=16,b=17,v=0,x=1,T=2,q=3,Y=4;function $(A,oe){return 55296<=A.charCodeAt(oe)&&A.charCodeAt(oe)<=56319&&56320<=A.charCodeAt(oe+1)&&A.charCodeAt(oe+1)<=57343}function _(A,oe){oe===void 0&&(oe=0);var ce=A.charCodeAt(oe);if(55296<=ce&&ce<=56319&&oe=1){var Z=A.charCodeAt(oe-1),O=ce;return 55296<=Z&&Z<=56319?(Z-55296)*1024+(O-56320)+65536:O}return ce}function ne(A,oe,ce){var Z=[A].concat(oe).concat([ce]),O=Z[Z.length-2],L=ce,de=Z.lastIndexOf(p);if(de>1&&Z.slice(1,de).every(function(re){return re==i})&&[i,h,b].indexOf(A)==-1)return T;var Be=Z.lastIndexOf(n);if(Be>0&&Z.slice(1,Be).every(function(re){return re==n})&&[f,n].indexOf(O)==-1)return Z.filter(function(re){return re==n}).length%2==1?q:Y;if(O==r&&L==e)return v;if(O==t||O==r||O==e)return L==p&&oe.every(function(re){return re==i})?T:x;if(L==t||L==r||L==e)return x;if(O==o&&(L==o||L==a||L==c||L==u))return v;if((O==c||O==a)&&(L==a||L==l))return v;if((O==u||O==l)&&L==l)return v;if(L==i||L==m)return v;if(L==s)return v;if(O==f)return v;var je=Z.indexOf(i)!=-1?Z.lastIndexOf(i)-1:Z.length-2;return[h,b].indexOf(Z[je])!=-1&&Z.slice(je+1,-1).every(function(re){return re==i})&&L==p||O==m&&[y,b].indexOf(L)!=-1?v:oe.indexOf(n)!=-1?T:O==n&&L==n?v:x}this.nextBreak=function(A,oe){if(oe===void 0&&(oe=0),oe<0)return 0;if(oe>=A.length-1)return A.length;for(var ce=ee(_(A,oe)),Z=[],O=oe+1;O{var NDe=/^(.*?)(\x1b\[[^m]+m|\x1b\]8;;.*?(\x1b\\|\u0007))/,eB;function LDe(){if(eB)return eB;if(typeof Intl.Segmenter!="undefined"){let r=new Intl.Segmenter("en",{granularity:"grapheme"});return eB=e=>Array.from(r.segment(e),({segment:t})=>t)}else{let r=k9(),e=new r;return eB=t=>e.splitGraphemes(t)}}P9.exports=(r,e=0,t=r.length)=>{if(e<0||t<0)throw new RangeError("Negative indices aren't supported by this implementation");let i=t-e,n="",s=0,o=0;for(;r.length>0;){let a=r.match(NDe)||[r,r,void 0],l=LDe()(a[1]),c=Math.min(e-s,l.length);l=l.slice(c);let u=Math.min(i-o,l.length);n+=l.slice(0,u).join(""),s+=c,o+=u,typeof a[2]!="undefined"&&(n+=a[2]),r=r.slice(a[0].length)}return n}});var cf=w((Bot,q9)=>{"use strict";var J9=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]),wot=q9.exports=r=>r?Object.keys(r).map(e=>[J9.has(e)?J9.get(e):e,r[e]]).reduce((e,t)=>(e[t[0]]=t[1],e),Object.create(null)):{}});var uf=w((bot,W9)=>{"use strict";var zDe=require("events"),z9=require("stream"),qd=Bp(),_9=require("string_decoder").StringDecoder,lA=Symbol("EOF"),Jd=Symbol("maybeEmitEnd"),Il=Symbol("emittedEnd"),oB=Symbol("emittingEnd"),aB=Symbol("closed"),V9=Symbol("read"),iD=Symbol("flush"),X9=Symbol("flushChunk"),Nn=Symbol("encoding"),cA=Symbol("decoder"),AB=Symbol("flowing"),Wd=Symbol("paused"),zd=Symbol("resume"),pn=Symbol("bufferLength"),Z9=Symbol("bufferPush"),nD=Symbol("bufferShift"),_i=Symbol("objectMode"),Vi=Symbol("destroyed"),$9=global._MP_NO_ITERATOR_SYMBOLS_!=="1",_De=$9&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),VDe=$9&&Symbol.iterator||Symbol("iterator not implemented"),e_=r=>r==="end"||r==="finish"||r==="prefinish",XDe=r=>r instanceof ArrayBuffer||typeof r=="object"&&r.constructor&&r.constructor.name==="ArrayBuffer"&&r.byteLength>=0,ZDe=r=>!Buffer.isBuffer(r)&&ArrayBuffer.isView(r);W9.exports=class t_ extends z9{constructor(e){super();this[AB]=!1,this[Wd]=!1,this.pipes=new qd,this.buffer=new qd,this[_i]=e&&e.objectMode||!1,this[_i]?this[Nn]=null:this[Nn]=e&&e.encoding||null,this[Nn]==="buffer"&&(this[Nn]=null),this[cA]=this[Nn]?new _9(this[Nn]):null,this[lA]=!1,this[Il]=!1,this[oB]=!1,this[aB]=!1,this.writable=!0,this.readable=!0,this[pn]=0,this[Vi]=!1}get bufferLength(){return this[pn]}get encoding(){return this[Nn]}set encoding(e){if(this[_i])throw new Error("cannot set encoding in objectMode");if(this[Nn]&&e!==this[Nn]&&(this[cA]&&this[cA].lastNeed||this[pn]))throw new Error("cannot change encoding");this[Nn]!==e&&(this[cA]=e?new _9(e):null,this.buffer.length&&(this.buffer=this.buffer.map(t=>this[cA].write(t)))),this[Nn]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[_i]}set objectMode(e){this[_i]=this[_i]||!!e}write(e,t,i){if(this[lA])throw new Error("write after end");return this[Vi]?(this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0):(typeof t=="function"&&(i=t,t="utf8"),t||(t="utf8"),!this[_i]&&!Buffer.isBuffer(e)&&(ZDe(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):XDe(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),!this.objectMode&&!e.length?(this[pn]!==0&&this.emit("readable"),i&&i(),this.flowing):(typeof e=="string"&&!this[_i]&&!(t===this[Nn]&&!this[cA].lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[Nn]&&(e=this[cA].write(e)),this.flowing?(this[pn]!==0&&this[iD](!0),this.emit("data",e)):this[Z9](e),this[pn]!==0&&this.emit("readable"),i&&i(),this.flowing))}read(e){if(this[Vi])return null;try{return this[pn]===0||e===0||e>this[pn]?null:(this[_i]&&(e=null),this.buffer.length>1&&!this[_i]&&(this.encoding?this.buffer=new qd([Array.from(this.buffer).join("")]):this.buffer=new qd([Buffer.concat(Array.from(this.buffer),this[pn])])),this[V9](e||null,this.buffer.head.value))}finally{this[Jd]()}}[V9](e,t){return e===t.length||e===null?this[nD]():(this.buffer.head.value=t.slice(e),t=t.slice(0,e),this[pn]-=e),this.emit("data",t),!this.buffer.length&&!this[lA]&&this.emit("drain"),t}end(e,t,i){return typeof e=="function"&&(i=e,e=null),typeof t=="function"&&(i=t,t="utf8"),e&&this.write(e,t),i&&this.once("end",i),this[lA]=!0,this.writable=!1,(this.flowing||!this[Wd])&&this[Jd](),this}[zd](){this[Vi]||(this[Wd]=!1,this[AB]=!0,this.emit("resume"),this.buffer.length?this[iD]():this[lA]?this[Jd]():this.emit("drain"))}resume(){return this[zd]()}pause(){this[AB]=!1,this[Wd]=!0}get destroyed(){return this[Vi]}get flowing(){return this[AB]}get paused(){return this[Wd]}[Z9](e){return this[_i]?this[pn]+=1:this[pn]+=e.length,this.buffer.push(e)}[nD](){return this.buffer.length&&(this[_i]?this[pn]-=1:this[pn]-=this.buffer.head.value.length),this.buffer.shift()}[iD](e){do;while(this[X9](this[nD]()));!e&&!this.buffer.length&&!this[lA]&&this.emit("drain")}[X9](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,t){if(this[Vi])return;let i=this[Il];t=t||{},e===process.stdout||e===process.stderr?t.end=!1:t.end=t.end!==!1;let n={dest:e,opts:t,ondrain:s=>this[zd]()};return this.pipes.push(n),e.on("drain",n.ondrain),this[zd](),i&&n.opts.end&&n.dest.end(),e}addListener(e,t){return this.on(e,t)}on(e,t){try{return super.on(e,t)}finally{e==="data"&&!this.pipes.length&&!this.flowing?this[zd]():e_(e)&&this[Il]&&(super.emit(e),this.removeAllListeners(e))}}get emittedEnd(){return this[Il]}[Jd](){!this[oB]&&!this[Il]&&!this[Vi]&&this.buffer.length===0&&this[lA]&&(this[oB]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[aB]&&this.emit("close"),this[oB]=!1)}emit(e,t){if(e!=="error"&&e!=="close"&&e!==Vi&&this[Vi])return;if(e==="data"){if(!t)return;this.pipes.length&&this.pipes.forEach(n=>n.dest.write(t)===!1&&this.pause())}else if(e==="end"){if(this[Il]===!0)return;this[Il]=!0,this.readable=!1,this[cA]&&(t=this[cA].end(),t&&(this.pipes.forEach(n=>n.dest.write(t)),super.emit("data",t))),this.pipes.forEach(n=>{n.dest.removeListener("drain",n.ondrain),n.opts.end&&n.dest.end()})}else if(e==="close"&&(this[aB]=!0,!this[Il]&&!this[Vi]))return;let i=new Array(arguments.length);if(i[0]=e,i[1]=t,arguments.length>2)for(let n=2;n{e.push(i),this[_i]||(e.dataLength+=i.length)}),t.then(()=>e)}concat(){return this[_i]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[_i]?Promise.reject(new Error("cannot concat in objectMode")):this[Nn]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,t)=>{this.on(Vi,()=>t(new Error("stream destroyed"))),this.on("end",()=>e()),this.on("error",i=>t(i))})}[_De](){return{next:()=>{let t=this.read();if(t!==null)return Promise.resolve({done:!1,value:t});if(this[lA])return Promise.resolve({done:!0});let i=null,n=null,s=c=>{this.removeListener("data",o),this.removeListener("end",a),n(c)},o=c=>{this.removeListener("error",s),this.removeListener("end",a),this.pause(),i({value:c,done:!!this[lA]})},a=()=>{this.removeListener("error",s),this.removeListener("data",o),i({done:!0})},l=()=>s(new Error("stream destroyed"));return new Promise((c,u)=>{n=u,i=c,this.once(Vi,l),this.once("error",s),this.once("end",a),this.once("data",o)})}}}[VDe](){return{next:()=>{let t=this.read();return{value:t,done:t===null}}}}destroy(e){return this[Vi]?(e?this.emit("error",e):this.emit(Vi),this):(this[Vi]=!0,this.buffer=new qd,this[pn]=0,typeof this.close=="function"&&!this[aB]&&this.close(),e?this.emit("error",e):this.emit(Vi),this)}static isStream(e){return!!e&&(e instanceof t_||e instanceof z9||e instanceof zDe&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}}});var i_=w((Qot,r_)=>{var $De=require("zlib").constants||{ZLIB_VERNUM:4736};r_.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:Infinity,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},$De))});var fD=w(as=>{"use strict";var sD=require("assert"),yl=require("buffer").Buffer,n_=require("zlib"),Zc=as.constants=i_(),eRe=uf(),s_=yl.concat,$c=Symbol("_superWrite"),_d=class extends Error{constructor(e){super("zlib: "+e.message);this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},tRe=Symbol("opts"),Vd=Symbol("flushFlag"),o_=Symbol("finishFlushFlag"),oD=Symbol("fullFlushFlag"),pr=Symbol("handle"),lB=Symbol("onError"),gf=Symbol("sawError"),aD=Symbol("level"),AD=Symbol("strategy"),lD=Symbol("ended"),Sot=Symbol("_defaultFullFlush"),cD=class extends eRe{constructor(e,t){if(!e||typeof e!="object")throw new TypeError("invalid options for ZlibBase constructor");super(e);this[gf]=!1,this[lD]=!1,this[tRe]=e,this[Vd]=e.flush,this[o_]=e.finishFlush;try{this[pr]=new n_[t](e)}catch(i){throw new _d(i)}this[lB]=i=>{this[gf]||(this[gf]=!0,this.close(),this.emit("error",i))},this[pr].on("error",i=>this[lB](new _d(i))),this.once("end",()=>this.close)}close(){this[pr]&&(this[pr].close(),this[pr]=null,this.emit("close"))}reset(){if(!this[gf])return sD(this[pr],"zlib binding closed"),this[pr].reset()}flush(e){this.ended||(typeof e!="number"&&(e=this[oD]),this.write(Object.assign(yl.alloc(0),{[Vd]:e})))}end(e,t,i){return e&&this.write(e,t),this.flush(this[o_]),this[lD]=!0,super.end(null,null,i)}get ended(){return this[lD]}write(e,t,i){if(typeof t=="function"&&(i=t,t="utf8"),typeof e=="string"&&(e=yl.from(e,t)),this[gf])return;sD(this[pr],"zlib binding closed");let n=this[pr]._handle,s=n.close;n.close=()=>{};let o=this[pr].close;this[pr].close=()=>{},yl.concat=c=>c;let a;try{let c=typeof e[Vd]=="number"?e[Vd]:this[Vd];a=this[pr]._processChunk(e,c),yl.concat=s_}catch(c){yl.concat=s_,this[lB](new _d(c))}finally{this[pr]&&(this[pr]._handle=n,n.close=s,this[pr].close=o,this[pr].removeAllListeners("error"))}this[pr]&&this[pr].on("error",c=>this[lB](new _d(c)));let l;if(a)if(Array.isArray(a)&&a.length>0){l=this[$c](yl.from(a[0]));for(let c=1;c{this.flush(n),s()};try{this[pr].params(e,t)}finally{this[pr].flush=i}this[pr]&&(this[aD]=e,this[AD]=t)}}}},a_=class extends wl{constructor(e){super(e,"Deflate")}},A_=class extends wl{constructor(e){super(e,"Inflate")}},uD=Symbol("_portable"),l_=class extends wl{constructor(e){super(e,"Gzip");this[uD]=e&&!!e.portable}[$c](e){return this[uD]?(this[uD]=!1,e[9]=255,super[$c](e)):super[$c](e)}},c_=class extends wl{constructor(e){super(e,"Gunzip")}},u_=class extends wl{constructor(e){super(e,"DeflateRaw")}},g_=class extends wl{constructor(e){super(e,"InflateRaw")}},f_=class extends wl{constructor(e){super(e,"Unzip")}},gD=class extends cD{constructor(e,t){e=e||{},e.flush=e.flush||Zc.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||Zc.BROTLI_OPERATION_FINISH,super(e,t),this[oD]=Zc.BROTLI_OPERATION_FLUSH}},h_=class extends gD{constructor(e){super(e,"BrotliCompress")}},p_=class extends gD{constructor(e){super(e,"BrotliDecompress")}};as.Deflate=a_;as.Inflate=A_;as.Gzip=l_;as.Gunzip=c_;as.DeflateRaw=u_;as.InflateRaw=g_;as.Unzip=f_;typeof n_.BrotliCompress=="function"?(as.BrotliCompress=h_,as.BrotliDecompress=p_):as.BrotliCompress=as.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}});var Xd=w(cB=>{"use strict";cB.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);cB.code=new Map(Array.from(cB.name).map(r=>[r[1],r[0]]))});var Zd=w((Dot,d_)=>{"use strict";var kot=Xd(),rRe=uf(),hD=Symbol("slurp");d_.exports=class extends rRe{constructor(e,t,i){super();switch(this.pause(),this.extended=t,this.globalExtended=i,this.header=e,this.startBlockSize=512*Math.ceil(e.size/512),this.blockRemain=this.startBlockSize,this.remain=e.size,this.type=e.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=e.path,this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=e.size,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=e.linkpath,this.uname=e.uname,this.gname=e.gname,t&&this[hD](t),i&&this[hD](i,!0)}write(e){let t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");let i=this.remain,n=this.blockRemain;return this.remain=Math.max(0,i-t),this.blockRemain=Math.max(0,n-t),this.ignore?!0:i>=t?super.write(e):super.write(e.slice(0,i))}[hD](e,t){for(let i in e)e[i]!==null&&e[i]!==void 0&&!(t&&i==="path")&&(this[i]=e[i])}}});var E_=w(pD=>{"use strict";var Rot=pD.encode=(r,e)=>{if(Number.isSafeInteger(r))r<0?nRe(r,e):iRe(r,e);else throw Error("cannot encode number outside of javascript safe integer range");return e},iRe=(r,e)=>{e[0]=128;for(var t=e.length;t>1;t--)e[t-1]=r&255,r=Math.floor(r/256)},nRe=(r,e)=>{e[0]=255;var t=!1;r=r*-1;for(var i=e.length;i>1;i--){var n=r&255;r=Math.floor(r/256),t?e[i-1]=C_(n):n===0?e[i-1]=0:(t=!0,e[i-1]=m_(n))}},Fot=pD.parse=r=>{var e=r[r.length-1],t=r[0],i;if(t===128)i=oRe(r.slice(1,r.length));else if(t===255)i=sRe(r);else throw Error("invalid base256 encoding");if(!Number.isSafeInteger(i))throw Error("parsed number outside of javascript safe integer range");return i},sRe=r=>{for(var e=r.length,t=0,i=!1,n=e-1;n>-1;n--){var s=r[n],o;i?o=C_(s):s===0?o=s:(i=!0,o=m_(s)),o!==0&&(t-=o*Math.pow(256,e-n-1))}return t},oRe=r=>{for(var e=r.length,t=0,i=e-1;i>-1;i--){var n=r[i];n!==0&&(t+=n*Math.pow(256,e-i-1))}return t},C_=r=>(255^r)&255,m_=r=>(255^r)+1&255});var hf=w((Lot,I_)=>{"use strict";var dD=Xd(),ff=require("path").posix,y_=E_(),CD=Symbol("slurp"),As=Symbol("type"),w_=class{constructor(e,t,i,n){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[As]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(e)?this.decode(e,t||0,i,n):e&&this.set(e)}decode(e,t,i,n){if(t||(t=0),!e||!(e.length>=t+512))throw new Error("need 512 bytes for header");if(this.path=eu(e,t,100),this.mode=Bl(e,t+100,8),this.uid=Bl(e,t+108,8),this.gid=Bl(e,t+116,8),this.size=Bl(e,t+124,12),this.mtime=mD(e,t+136,12),this.cksum=Bl(e,t+148,12),this[CD](i),this[CD](n,!0),this[As]=eu(e,t+156,1),this[As]===""&&(this[As]="0"),this[As]==="0"&&this.path.substr(-1)==="/"&&(this[As]="5"),this[As]==="5"&&(this.size=0),this.linkpath=eu(e,t+157,100),e.slice(t+257,t+265).toString()==="ustar\x0000")if(this.uname=eu(e,t+265,32),this.gname=eu(e,t+297,32),this.devmaj=Bl(e,t+329,8),this.devmin=Bl(e,t+337,8),e[t+475]!==0){let o=eu(e,t+345,155);this.path=o+"/"+this.path}else{let o=eu(e,t+345,130);o&&(this.path=o+"/"+this.path),this.atime=mD(e,t+476,12),this.ctime=mD(e,t+488,12)}let s=8*32;for(let o=t;o=t+512))throw new Error("need 512 bytes for header");let i=this.ctime||this.atime?130:155,n=aRe(this.path||"",i),s=n[0],o=n[1];this.needPax=n[2],this.needPax=tu(e,t,100,s)||this.needPax,this.needPax=bl(e,t+100,8,this.mode)||this.needPax,this.needPax=bl(e,t+108,8,this.uid)||this.needPax,this.needPax=bl(e,t+116,8,this.gid)||this.needPax,this.needPax=bl(e,t+124,12,this.size)||this.needPax,this.needPax=ED(e,t+136,12,this.mtime)||this.needPax,e[t+156]=this[As].charCodeAt(0),this.needPax=tu(e,t+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",t+257,8),this.needPax=tu(e,t+265,32,this.uname)||this.needPax,this.needPax=tu(e,t+297,32,this.gname)||this.needPax,this.needPax=bl(e,t+329,8,this.devmaj)||this.needPax,this.needPax=bl(e,t+337,8,this.devmin)||this.needPax,this.needPax=tu(e,t+345,i,o)||this.needPax,e[t+475]!==0?this.needPax=tu(e,t+345,155,o)||this.needPax:(this.needPax=tu(e,t+345,130,o)||this.needPax,this.needPax=ED(e,t+476,12,this.atime)||this.needPax,this.needPax=ED(e,t+488,12,this.ctime)||this.needPax);let a=8*32;for(let l=t;l{let t=100,i=r,n="",s,o=ff.parse(r).root||".";if(Buffer.byteLength(i)t&&Buffer.byteLength(n)<=e?s=[i.substr(0,t-1),n,!0]:(i=ff.join(ff.basename(n),i),n=ff.dirname(n));while(n!==o&&!s);s||(s=[r.substr(0,t-1),"",!0])}return s},eu=(r,e,t)=>r.slice(e,e+t).toString("utf8").replace(/\0.*/,""),mD=(r,e,t)=>ARe(Bl(r,e,t)),ARe=r=>r===null?null:new Date(r*1e3),Bl=(r,e,t)=>r[e]&128?y_.parse(r.slice(e,e+t)):lRe(r,e,t),cRe=r=>isNaN(r)?null:r,lRe=(r,e,t)=>cRe(parseInt(r.slice(e,e+t).toString("utf8").replace(/\0.*$/,"").trim(),8)),uRe={12:8589934591,8:2097151},bl=(r,e,t,i)=>i===null?!1:i>uRe[t]||i<0?(y_.encode(i,r.slice(e,e+t)),!0):(gRe(r,e,t,i),!1),gRe=(r,e,t,i)=>r.write(fRe(i,t),e,t,"ascii"),fRe=(r,e)=>hRe(Math.floor(r).toString(8),e),hRe=(r,e)=>(r.length===e-1?r:new Array(e-r.length-1).join("0")+r+" ")+"\0",ED=(r,e,t,i)=>i===null?!1:bl(r,e,t,i.getTime()/1e3),pRe=new Array(156).join("\0"),tu=(r,e,t,i)=>i===null?!1:(r.write(i+pRe,e,t,"utf8"),i.length!==Buffer.byteLength(i)||i.length>t);I_.exports=w_});var gB=w((Tot,B_)=>{"use strict";var dRe=hf(),CRe=require("path"),uB=class{constructor(e,t){this.atime=e.atime||null,this.charset=e.charset||null,this.comment=e.comment||null,this.ctime=e.ctime||null,this.gid=e.gid||null,this.gname=e.gname||null,this.linkpath=e.linkpath||null,this.mtime=e.mtime||null,this.path=e.path||null,this.size=e.size||null,this.uid=e.uid||null,this.uname=e.uname||null,this.dev=e.dev||null,this.ino=e.ino||null,this.nlink=e.nlink||null,this.global=t||!1}encode(){let e=this.encodeBody();if(e==="")return null;let t=Buffer.byteLength(e),i=512*Math.ceil(1+t/512),n=Buffer.allocUnsafe(i);for(let s=0;s<512;s++)n[s]=0;new dRe({path:("PaxHeader/"+CRe.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:t,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(n),n.write(e,512,t,"utf8");for(let s=t+512;s=Math.pow(10,s)&&(s+=1),s+n+i}};uB.parse=(r,e,t)=>new uB(mRe(ERe(r),e),t);var mRe=(r,e)=>e?Object.keys(r).reduce((t,i)=>(t[i]=r[i],t),e):r,ERe=r=>r.replace(/\n$/,"").split(` +`).reduce(IRe,Object.create(null)),IRe=(r,e)=>{let t=parseInt(e,10);if(t!==Buffer.byteLength(e)+1)return r;e=e.substr((t+" ").length);let i=e.split("="),n=i.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!n)return r;let s=i.join("=");return r[n]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n)?new Date(s*1e3):/^[0-9]+$/.test(s)?+s:s,r};B_.exports=uB});var fB=w((Oot,b_)=>{"use strict";b_.exports=r=>class extends r{warn(e,t,i={}){this.file&&(i.file=this.file),this.cwd&&(i.cwd=this.cwd),i.code=t instanceof Error&&t.code||e,i.tarCode=e,!this.strict&&i.recoverable!==!1?(t instanceof Error&&(i=Object.assign(t,i),t=t.message),this.emit("warn",i.tarCode,t,i)):t instanceof Error?this.emit("error",Object.assign(t,i)):this.emit("error",Object.assign(new Error(`${e}: ${t}`),i))}}});var yD=w((Mot,Q_)=>{"use strict";var hB=["|","<",">","?",":"],ID=hB.map(r=>String.fromCharCode(61440+r.charCodeAt(0))),yRe=new Map(hB.map((r,e)=>[r,ID[e]])),wRe=new Map(ID.map((r,e)=>[r,hB[e]]));Q_.exports={encode:r=>hB.reduce((e,t)=>e.split(t).join(yRe.get(t)),r),decode:r=>ID.reduce((e,t)=>e.split(t).join(wRe.get(t)),r)}});var v_=w((Kot,S_)=>{"use strict";S_.exports=(r,e,t)=>(r&=4095,t&&(r=(r|384)&~18),e&&(r&256&&(r|=64),r&32&&(r|=8),r&4&&(r|=1)),r)});var xD=w((Yot,x_)=>{"use strict";var k_=uf(),P_=gB(),D_=hf(),Uot=Zd(),sa=require("fs"),pf=require("path"),Hot=Xd(),BRe=16*1024*1024,R_=Symbol("process"),F_=Symbol("file"),N_=Symbol("directory"),wD=Symbol("symlink"),L_=Symbol("hardlink"),$d=Symbol("header"),pB=Symbol("read"),BD=Symbol("lstat"),dB=Symbol("onlstat"),bD=Symbol("onread"),QD=Symbol("onreadlink"),SD=Symbol("openfile"),vD=Symbol("onopenfile"),ru=Symbol("close"),CB=Symbol("mode"),T_=fB(),bRe=yD(),O_=v_(),mB=T_(class extends k_{constructor(e,t){if(t=t||{},super(t),typeof e!="string")throw new TypeError("path is required");this.path=e,this.portable=!!t.portable,this.myuid=process.getuid&&process.getuid(),this.myuser=process.env.USER||"",this.maxReadSize=t.maxReadSize||BRe,this.linkCache=t.linkCache||new Map,this.statCache=t.statCache||new Map,this.preservePaths=!!t.preservePaths,this.cwd=t.cwd||process.cwd(),this.strict=!!t.strict,this.noPax=!!t.noPax,this.noMtime=!!t.noMtime,this.mtime=t.mtime||null,typeof t.onwarn=="function"&&this.on("warn",t.onwarn);let i=!1;if(!this.preservePaths&&pf.win32.isAbsolute(e)){let n=pf.win32.parse(e);this.path=e.substr(n.root.length),i=n.root}this.win32=!!t.win32||process.platform==="win32",this.win32&&(this.path=bRe.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=t.absolute||pf.resolve(this.cwd,e),this.path===""&&(this.path="./"),i&&this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path}),this.statCache.has(this.absolute)?this[dB](this.statCache.get(this.absolute)):this[BD]()}[BD](){sa.lstat(this.absolute,(e,t)=>{if(e)return this.emit("error",e);this[dB](t)})}[dB](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=QRe(e),this.emit("stat",e),this[R_]()}[R_](){switch(this.type){case"File":return this[F_]();case"Directory":return this[N_]();case"SymbolicLink":return this[wD]();default:return this.end()}}[CB](e){return O_(e,this.type==="Directory",this.portable)}[$d](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new D_({path:this.path,linkpath:this.linkpath,mode:this[CB](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&this.write(new P_({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this.path,linkpath:this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),this.write(this.header.block)}[N_](){this.path.substr(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[$d](),this.end()}[wD](){sa.readlink(this.absolute,(e,t)=>{if(e)return this.emit("error",e);this[QD](t)})}[QD](e){this.linkpath=e.replace(/\\/g,"/"),this[$d](),this.end()}[L_](e){this.type="Link",this.linkpath=pf.relative(this.cwd,e).replace(/\\/g,"/"),this.stat.size=0,this[$d](),this.end()}[F_](){if(this.stat.nlink>1){let e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){let t=this.linkCache.get(e);if(t.indexOf(this.cwd)===0)return this[L_](t)}this.linkCache.set(e,this.absolute)}if(this[$d](),this.stat.size===0)return this.end();this[SD]()}[SD](){sa.open(this.absolute,"r",(e,t)=>{if(e)return this.emit("error",e);this[vD](t)})}[vD](e){let t=512*Math.ceil(this.stat.size/512),i=Math.min(t,this.maxReadSize),n=Buffer.allocUnsafe(i);this[pB](e,n,0,n.length,0,this.stat.size,t)}[pB](e,t,i,n,s,o,a){sa.read(e,t,i,n,s,(l,c)=>{if(l)return this[ru](e,()=>this.emit("error",l));this[bD](e,t,i,n,s,o,a,c)})}[ru](e,t){sa.close(e,t)}[bD](e,t,i,n,s,o,a,l){if(l<=0&&o>0){let u=new Error("encountered unexpected EOF");return u.path=this.absolute,u.syscall="read",u.code="EOF",this[ru](e,()=>this.emit("error",u))}if(l>o){let u=new Error("did not encounter expected EOF");return u.path=this.absolute,u.syscall="read",u.code="EOF",this[ru](e,()=>this.emit("error",u))}if(l===o)for(let u=l;uu?this.emit("error",u):this.end());i>=n&&(t=Buffer.allocUnsafe(n),i=0),n=t.length-i,this[pB](e,t,i,n,s,o,a)}}),M_=class extends mB{constructor(e,t){super(e,t)}[BD](){this[dB](sa.lstatSync(this.absolute))}[wD](){this[QD](sa.readlinkSync(this.absolute))}[SD](){this[vD](sa.openSync(this.absolute,"r"))}[pB](e,t,i,n,s,o,a){let l=!0;try{let c=sa.readSync(e,t,i,n,s);this[bD](e,t,i,n,s,o,a,c),l=!1}finally{if(l)try{this[ru](e,()=>{})}catch(c){}}}[ru](e,t){sa.closeSync(e),t()}},SRe=T_(class extends k_{constructor(e,t){t=t||{},super(t),this.preservePaths=!!t.preservePaths,this.portable=!!t.portable,this.strict=!!t.strict,this.noPax=!!t.noPax,this.noMtime=!!t.noMtime,this.readEntry=e,this.type=e.type,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.path=e.path,this.mode=this[CB](e.mode),this.uid=this.portable?null:e.uid,this.gid=this.portable?null:e.gid,this.uname=this.portable?null:e.uname,this.gname=this.portable?null:e.gname,this.size=e.size,this.mtime=this.noMtime?null:t.mtime||e.mtime,this.atime=this.portable?null:e.atime,this.ctime=this.portable?null:e.ctime,this.linkpath=e.linkpath,typeof t.onwarn=="function"&&this.on("warn",t.onwarn);let i=!1;if(pf.isAbsolute(this.path)&&!this.preservePaths){let n=pf.parse(this.path);i=n.root,this.path=this.path.substr(n.root.length)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.header=new D_({path:this.path,linkpath:this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),i&&this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path}),this.header.encode()&&!this.noPax&&super.write(new P_({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this.path,linkpath:this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),e.pipe(this)}[CB](e){return O_(e,this.type==="Directory",this.portable)}write(e){let t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=t,super.write(e)}end(){return this.blockRemain&&this.write(Buffer.alloc(this.blockRemain)),super.end()}});mB.Sync=M_;mB.Tar=SRe;var QRe=r=>r.isFile()?"File":r.isDirectory()?"Directory":r.isSymbolicLink()?"SymbolicLink":"Unsupported";x_.exports=mB});var SB=w((Jot,K_)=>{"use strict";var kD=class{constructor(e,t){this.path=e||"./",this.absolute=t,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},vRe=uf(),xRe=fD(),kRe=Zd(),PD=xD(),PRe=PD.Sync,DRe=PD.Tar,RRe=Bp(),U_=Buffer.alloc(1024),EB=Symbol("onStat"),IB=Symbol("ended"),oa=Symbol("queue"),df=Symbol("current"),iu=Symbol("process"),yB=Symbol("processing"),H_=Symbol("processJob"),aa=Symbol("jobs"),DD=Symbol("jobDone"),wB=Symbol("addFSEntry"),j_=Symbol("addTarEntry"),RD=Symbol("stat"),FD=Symbol("readdir"),BB=Symbol("onreaddir"),bB=Symbol("pipe"),G_=Symbol("entry"),ND=Symbol("entryOpt"),LD=Symbol("writeEntryClass"),Y_=Symbol("write"),TD=Symbol("ondrain"),QB=require("fs"),q_=require("path"),FRe=fB(),OD=FRe(class extends vRe{constructor(e){super(e);e=e||Object.create(null),this.opt=e,this.file=e.file||"",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=(e.prefix||"").replace(/(\\|\/)+$/,""),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this[LD]=PD,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),this.portable=!!e.portable,this.zip=null,e.gzip?(typeof e.gzip!="object"&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new xRe.Gzip(e.gzip),this.zip.on("data",t=>super.write(t)),this.zip.on("end",t=>super.end()),this.zip.on("drain",t=>this[TD]()),this.on("resume",t=>this.zip.resume())):this.on("drain",this[TD]),this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,this.mtime=e.mtime||null,this.filter=typeof e.filter=="function"?e.filter:t=>!0,this[oa]=new RRe,this[aa]=0,this.jobs=+e.jobs||4,this[yB]=!1,this[IB]=!1}[Y_](e){return super.write(e)}add(e){return this.write(e),this}end(e){return e&&this.write(e),this[IB]=!0,this[iu](),this}write(e){if(this[IB])throw new Error("write after end");return e instanceof kRe?this[j_](e):this[wB](e),this.flowing}[j_](e){let t=q_.resolve(this.cwd,e.path);if(this.prefix&&(e.path=this.prefix+"/"+e.path.replace(/^\.(\/+|$)/,"")),!this.filter(e.path,e))e.resume();else{let i=new kD(e.path,t,!1);i.entry=new DRe(e,this[ND](i)),i.entry.on("end",n=>this[DD](i)),this[aa]+=1,this[oa].push(i)}this[iu]()}[wB](e){let t=q_.resolve(this.cwd,e);this.prefix&&(e=this.prefix+"/"+e.replace(/^\.(\/+|$)/,"")),this[oa].push(new kD(e,t)),this[iu]()}[RD](e){e.pending=!0,this[aa]+=1;let t=this.follow?"stat":"lstat";QB[t](e.absolute,(i,n)=>{e.pending=!1,this[aa]-=1,i?this.emit("error",i):this[EB](e,n)})}[EB](e,t){this.statCache.set(e.absolute,t),e.stat=t,this.filter(e.path,t)||(e.ignore=!0),this[iu]()}[FD](e){e.pending=!0,this[aa]+=1,QB.readdir(e.absolute,(t,i)=>{if(e.pending=!1,this[aa]-=1,t)return this.emit("error",t);this[BB](e,i)})}[BB](e,t){this.readdirCache.set(e.absolute,t),e.readdir=t,this[iu]()}[iu](){if(!this[yB]){this[yB]=!0;for(let e=this[oa].head;e!==null&&this[aa]this.warn(t,i,n),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime}}[G_](e){this[aa]+=1;try{return new this[LD](e.path,this[ND](e)).on("end",()=>this[DD](e)).on("error",t=>this.emit("error",t))}catch(t){this.emit("error",t)}}[TD](){this[df]&&this[df].entry&&this[df].entry.resume()}[bB](e){e.piped=!0,e.readdir&&e.readdir.forEach(n=>{let s=this.prefix?e.path.slice(this.prefix.length+1)||"./":e.path,o=s==="./"?"":s.replace(/\/*$/,"/");this[wB](o+n)});let t=e.entry,i=this.zip;i?t.on("data",n=>{i.write(n)||t.pause()}):t.on("data",n=>{super.write(n)||t.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),J_=class extends OD{constructor(e){super(e);this[LD]=PRe}pause(){}resume(){}[RD](e){let t=this.follow?"statSync":"lstatSync";this[EB](e,QB[t](e.absolute))}[FD](e,t){this[BB](e,QB.readdirSync(e.absolute))}[bB](e){let t=e.entry,i=this.zip;e.readdir&&e.readdir.forEach(n=>{let s=this.prefix?e.path.slice(this.prefix.length+1)||"./":e.path,o=s==="./"?"":s.replace(/\/*$/,"/");this[wB](o+n)}),i?t.on("data",n=>{i.write(n)}):t.on("data",n=>{super[Y_](n)})}};OD.Sync=J_;K_.exports=OD});var wf=w(eC=>{"use strict";var NRe=uf(),LRe=require("events").EventEmitter,Us=require("fs"),vB=process.binding("fs"),Wot=vB.writeBuffers,TRe=vB.FSReqWrap||vB.FSReqCallback,Cf=Symbol("_autoClose"),Aa=Symbol("_close"),tC=Symbol("_ended"),or=Symbol("_fd"),W_=Symbol("_finished"),nu=Symbol("_flags"),MD=Symbol("_flush"),KD=Symbol("_handleChunk"),UD=Symbol("_makeBuf"),HD=Symbol("_mode"),xB=Symbol("_needDrain"),mf=Symbol("_onerror"),Ef=Symbol("_onopen"),jD=Symbol("_onread"),su=Symbol("_onwrite"),Ql=Symbol("_open"),Sl=Symbol("_path"),ou=Symbol("_pos"),la=Symbol("_queue"),If=Symbol("_read"),z_=Symbol("_readSize"),vl=Symbol("_reading"),kB=Symbol("_remain"),__=Symbol("_size"),PB=Symbol("_write"),yf=Symbol("_writing"),DB=Symbol("_defaultFlag"),GD=class extends NRe{constructor(e,t){if(t=t||{},super(t),this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[or]=typeof t.fd=="number"?t.fd:null,this[Sl]=e,this[z_]=t.readSize||16*1024*1024,this[vl]=!1,this[__]=typeof t.size=="number"?t.size:Infinity,this[kB]=this[__],this[Cf]=typeof t.autoClose=="boolean"?t.autoClose:!0,typeof this[or]=="number"?this[If]():this[Ql]()}get fd(){return this[or]}get path(){return this[Sl]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[Ql](){Us.open(this[Sl],"r",(e,t)=>this[Ef](e,t))}[Ef](e,t){e?this[mf](e):(this[or]=t,this.emit("open",t),this[If]())}[UD](){return Buffer.allocUnsafe(Math.min(this[z_],this[kB]))}[If](){if(!this[vl]){this[vl]=!0;let e=this[UD]();if(e.length===0)return process.nextTick(()=>this[jD](null,0,e));Us.read(this[or],e,0,e.length,null,(t,i,n)=>this[jD](t,i,n))}}[jD](e,t,i){this[vl]=!1,e?this[mf](e):this[KD](t,i)&&this[If]()}[Aa](){this[Cf]&&typeof this[or]=="number"&&(Us.close(this[or],e=>this.emit("close")),this[or]=null)}[mf](e){this[vl]=!0,this[Aa](),this.emit("error",e)}[KD](e,t){let i=!1;return this[kB]-=e,e>0&&(i=super.write(ethis[Ef](e,t))}[Ef](e,t){this[DB]&&this[nu]==="r+"&&e&&e.code==="ENOENT"?(this[nu]="w",this[Ql]()):e?this[mf](e):(this[or]=t,this.emit("open",t),this[MD]())}end(e,t){e&&this.write(e,t),this[tC]=!0,!this[yf]&&!this[la].length&&typeof this[or]=="number"&&this[su](null,0)}write(e,t){return typeof e=="string"&&(e=new Buffer(e,t)),this[tC]?(this.emit("error",new Error("write() after end()")),!1):this[or]===null||this[yf]||this[la].length?(this[la].push(e),this[xB]=!0,!1):(this[yf]=!0,this[PB](e),!0)}[PB](e){Us.write(this[or],e,0,e.length,this[ou],(t,i)=>this[su](t,i))}[su](e,t){e?this[mf](e):(this[ou]!==null&&(this[ou]+=t),this[la].length?this[MD]():(this[yf]=!1,this[tC]&&!this[W_]?(this[W_]=!0,this[Aa](),this.emit("finish")):this[xB]&&(this[xB]=!1,this.emit("drain"))))}[MD](){if(this[la].length===0)this[tC]&&this[su](null,0);else if(this[la].length===1)this[PB](this[la].pop());else{let e=this[la];this[la]=[],ORe(this[or],e,this[ou],(t,i)=>this[su](t,i))}}[Aa](){this[Cf]&&typeof this[or]=="number"&&(Us.close(this[or],e=>this.emit("close")),this[or]=null)}},X_=class extends YD{[Ql](){let e;try{e=Us.openSync(this[Sl],this[nu],this[HD])}catch(t){if(this[DB]&&this[nu]==="r+"&&t&&t.code==="ENOENT")return this[nu]="w",this[Ql]();throw t}this[Ef](null,e)}[Aa](){if(this[Cf]&&typeof this[or]=="number"){try{Us.closeSync(this[or])}catch(e){}this[or]=null,this.emit("close")}}[PB](e){try{this[su](null,Us.writeSync(this[or],e,0,e.length,this[ou]))}catch(t){this[su](t,0)}}},ORe=(r,e,t,i)=>{let n=(o,a)=>i(o,a,e),s=new TRe;s.oncomplete=n,vB.writeBuffers(r,e,t,s)};eC.ReadStream=GD;eC.ReadStreamSync=V_;eC.WriteStream=YD;eC.WriteStreamSync=X_});var nC=w((Xot,Z_)=>{"use strict";var MRe=fB(),_ot=require("path"),KRe=hf(),URe=require("events"),HRe=Bp(),jRe=1024*1024,GRe=Zd(),$_=gB(),YRe=fD(),qD=Buffer.from([31,139]),Hs=Symbol("state"),au=Symbol("writeEntry"),uA=Symbol("readEntry"),JD=Symbol("nextEntry"),eV=Symbol("processEntry"),js=Symbol("extendedHeader"),rC=Symbol("globalExtendedHeader"),xl=Symbol("meta"),tV=Symbol("emitMeta"),yr=Symbol("buffer"),gA=Symbol("queue"),Au=Symbol("ended"),rV=Symbol("emittedEnd"),lu=Symbol("emit"),Ln=Symbol("unzip"),RB=Symbol("consumeChunk"),FB=Symbol("consumeChunkSub"),WD=Symbol("consumeBody"),iV=Symbol("consumeMeta"),nV=Symbol("consumeHeader"),NB=Symbol("consuming"),zD=Symbol("bufferConcat"),_D=Symbol("maybeEnd"),iC=Symbol("writing"),kl=Symbol("aborted"),LB=Symbol("onDone"),cu=Symbol("sawValidEntry"),TB=Symbol("sawNullBlock"),OB=Symbol("sawEOF"),qRe=r=>!0;Z_.exports=MRe(class extends URe{constructor(e){e=e||{},super(e),this.file=e.file||"",this[cu]=null,this.on(LB,t=>{(this[Hs]==="begin"||this[cu]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),e.ondone?this.on(LB,e.ondone):this.on(LB,t=>{this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||jRe,this.filter=typeof e.filter=="function"?e.filter:qRe,this.writable=!0,this.readable=!1,this[gA]=new HRe,this[yr]=null,this[uA]=null,this[au]=null,this[Hs]="begin",this[xl]="",this[js]=null,this[rC]=null,this[Au]=!1,this[Ln]=null,this[kl]=!1,this[TB]=!1,this[OB]=!1,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),typeof e.onentry=="function"&&this.on("entry",e.onentry)}[nV](e,t){this[cu]===null&&(this[cu]=!1);let i;try{i=new KRe(e,t,this[js],this[rC])}catch(n){return this.warn("TAR_ENTRY_INVALID",n)}if(i.nullBlock)this[TB]?(this[OB]=!0,this[Hs]==="begin"&&(this[Hs]="header"),this[lu]("eof")):(this[TB]=!0,this[lu]("nullBlock"));else if(this[TB]=!1,!i.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:i});else if(!i.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:i});else{let n=i.type;if(/^(Symbolic)?Link$/.test(n)&&!i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:i});else if(!/^(Symbolic)?Link$/.test(n)&&i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:i});else{let s=this[au]=new GRe(i,this[js],this[rC]);if(!this[cu])if(s.remain){let o=()=>{s.invalid||(this[cu]=!0)};s.on("end",o)}else this[cu]=!0;s.meta?s.size>this.maxMetaEntrySize?(s.ignore=!0,this[lu]("ignoredEntry",s),this[Hs]="ignore",s.resume()):s.size>0&&(this[xl]="",s.on("data",o=>this[xl]+=o),this[Hs]="meta"):(this[js]=null,s.ignore=s.ignore||!this.filter(s.path,s),s.ignore?(this[lu]("ignoredEntry",s),this[Hs]=s.remain?"ignore":"header",s.resume()):(s.remain?this[Hs]="body":(this[Hs]="header",s.end()),this[uA]?this[gA].push(s):(this[gA].push(s),this[JD]())))}}}[eV](e){let t=!0;return e?Array.isArray(e)?this.emit.apply(this,e):(this[uA]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",i=>this[JD]()),t=!1)):(this[uA]=null,t=!1),t}[JD](){do;while(this[eV](this[gA].shift()));if(!this[gA].length){let e=this[uA];!e||e.flowing||e.size===e.remain?this[iC]||this.emit("drain"):e.once("drain",i=>this.emit("drain"))}}[WD](e,t){let i=this[au],n=i.blockRemain,s=n>=e.length&&t===0?e:e.slice(t,t+n);return i.write(s),i.blockRemain||(this[Hs]="header",this[au]=null,i.end()),s.length}[iV](e,t){let i=this[au],n=this[WD](e,t);return this[au]||this[tV](i),n}[lu](e,t,i){!this[gA].length&&!this[uA]?this.emit(e,t,i):this[gA].push([e,t,i])}[tV](e){switch(this[lu]("meta",this[xl]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[js]=$_.parse(this[xl],this[js],!1);break;case"GlobalExtendedHeader":this[rC]=$_.parse(this[xl],this[rC],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[js]=this[js]||Object.create(null),this[js].path=this[xl].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[js]=this[js]||Object.create(null),this[js].linkpath=this[xl].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[kl]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e){if(this[kl])return;if(this[Ln]===null&&e){if(this[yr]&&(e=Buffer.concat([this[yr],e]),this[yr]=null),e.lengththis[RB](s)),this[Ln].on("error",s=>this.abort(s)),this[Ln].on("end",s=>{this[Au]=!0,this[RB]()}),this[iC]=!0;let n=this[Ln][i?"end":"write"](e);return this[iC]=!1,n}}this[iC]=!0,this[Ln]?this[Ln].write(e):this[RB](e),this[iC]=!1;let t=this[gA].length?!1:this[uA]?this[uA].flowing:!0;return!t&&!this[gA].length&&this[uA].once("drain",i=>this.emit("drain")),t}[zD](e){e&&!this[kl]&&(this[yr]=this[yr]?Buffer.concat([this[yr],e]):e)}[_D](){if(this[Au]&&!this[rV]&&!this[kl]&&!this[NB]){this[rV]=!0;let e=this[au];if(e&&e.blockRemain){let t=this[yr]?this[yr].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e}),this[yr]&&e.write(this[yr]),e.end()}this[lu](LB)}}[RB](e){if(this[NB])this[zD](e);else if(!e&&!this[yr])this[_D]();else{if(this[NB]=!0,this[yr]){this[zD](e);let t=this[yr];this[yr]=null,this[FB](t)}else this[FB](e);for(;this[yr]&&this[yr].length>=512&&!this[kl]&&!this[OB];){let t=this[yr];this[yr]=null,this[FB](t)}this[NB]=!1}(!this[yr]||this[Au])&&this[_D]()}[FB](e){let t=0,i=e.length;for(;t+512<=i&&!this[kl]&&!this[OB];)switch(this[Hs]){case"begin":case"header":this[nV](e,t),t+=512;break;case"ignore":case"body":t+=this[WD](e,t);break;case"meta":t+=this[iV](e,t);break;default:throw new Error("invalid state: "+this[Hs])}t{"use strict";var JRe=cf(),oV=nC(),Bf=require("fs"),WRe=wf(),aV=require("path"),Zot=sV.exports=(r,e,t)=>{typeof r=="function"?(t=r,e=null,r={}):Array.isArray(r)&&(e=r,r={}),typeof e=="function"&&(t=e,e=null),e?e=Array.from(e):e=[];let i=JRe(r);if(i.sync&&typeof t=="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof t=="function")throw new TypeError("callback only supported with file option");return e.length&&_Re(i,e),i.noResume||zRe(i),i.file&&i.sync?VRe(i):i.file?XRe(i,t):AV(i)},zRe=r=>{let e=r.onentry;r.onentry=e?t=>{e(t),t.resume()}:t=>t.resume()},_Re=(r,e)=>{let t=new Map(e.map(s=>[s.replace(/\/+$/,""),!0])),i=r.filter,n=(s,o)=>{let a=o||aV.parse(s).root||".",l=s===a?!1:t.has(s)?t.get(s):n(aV.dirname(s),a);return t.set(s,l),l};r.filter=i?(s,o)=>i(s,o)&&n(s.replace(/\/+$/,"")):s=>n(s.replace(/\/+$/,""))},VRe=r=>{let e=AV(r),t=r.file,i=!0,n;try{let s=Bf.statSync(t),o=r.maxReadSize||16*1024*1024;if(s.size{let t=new oV(r),i=r.maxReadSize||16*1024*1024,n=r.file,s=new Promise((o,a)=>{t.on("error",a),t.on("end",o),Bf.stat(n,(l,c)=>{if(l)a(l);else{let u=new WRe.ReadStream(n,{readSize:i,size:c.size});u.on("error",a),u.pipe(t)}})});return e?s.then(e,e):s},AV=r=>new oV(r)});var hV=w((rat,lV)=>{"use strict";var ZRe=cf(),KB=SB(),eat=require("fs"),cV=wf(),uV=MB(),gV=require("path"),tat=lV.exports=(r,e,t)=>{if(typeof e=="function"&&(t=e),Array.isArray(r)&&(e=r,r={}),!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");e=Array.from(e);let i=ZRe(r);if(i.sync&&typeof t=="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof t=="function")throw new TypeError("callback only supported with file option");return i.file&&i.sync?$Re(i,e):i.file?eFe(i,e,t):i.sync?tFe(i,e):rFe(i,e)},$Re=(r,e)=>{let t=new KB.Sync(r),i=new cV.WriteStreamSync(r.file,{mode:r.mode||438});t.pipe(i),fV(t,e)},eFe=(r,e,t)=>{let i=new KB(r),n=new cV.WriteStream(r.file,{mode:r.mode||438});i.pipe(n);let s=new Promise((o,a)=>{n.on("error",a),n.on("close",o),i.on("error",a)});return VD(i,e),t?s.then(t,t):s},fV=(r,e)=>{e.forEach(t=>{t.charAt(0)==="@"?uV({file:gV.resolve(r.cwd,t.substr(1)),sync:!0,noResume:!0,onentry:i=>r.add(i)}):r.add(t)}),r.end()},VD=(r,e)=>{for(;e.length;){let t=e.shift();if(t.charAt(0)==="@")return uV({file:gV.resolve(r.cwd,t.substr(1)),noResume:!0,onentry:i=>r.add(i)}).then(i=>VD(r,e));r.add(t)}r.end()},tFe=(r,e)=>{let t=new KB.Sync(r);return fV(t,e),t},rFe=(r,e)=>{let t=new KB(r);return VD(t,e),t}});var XD=w((sat,pV)=>{"use strict";var iFe=cf(),dV=SB(),iat=nC(),Gs=require("fs"),CV=wf(),mV=MB(),EV=require("path"),IV=hf(),nat=pV.exports=(r,e,t)=>{let i=iFe(r);if(!i.file)throw new TypeError("file is required");if(i.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),i.sync?nFe(i,e):sFe(i,e,t)},nFe=(r,e)=>{let t=new dV.Sync(r),i=!0,n,s;try{try{n=Gs.openSync(r.file,"r+")}catch(l){if(l.code==="ENOENT")n=Gs.openSync(r.file,"w+");else throw l}let o=Gs.fstatSync(n),a=Buffer.alloc(512);e:for(s=0;so.size)break;s+=c,r.mtimeCache&&r.mtimeCache.set(l.path,l.mtime)}i=!1,oFe(r,t,s,n,e)}finally{if(i)try{Gs.closeSync(n)}catch(o){}}},oFe=(r,e,t,i,n)=>{let s=new CV.WriteStreamSync(r.file,{fd:i,start:t});e.pipe(s),aFe(e,n)},sFe=(r,e,t)=>{e=Array.from(e);let i=new dV(r),n=(o,a,l)=>{let c=(p,m)=>{p?Gs.close(o,y=>l(p)):l(null,m)},u=0;if(a===0)return c(null,0);let g=0,f=Buffer.alloc(512),h=(p,m)=>{if(p)return c(p);if(g+=m,g<512&&m)return Gs.read(o,f,g,f.length-g,u+g,h);if(u===0&&f[0]===31&&f[1]===139)return c(new Error("cannot append to compressed archives"));if(g<512)return c(null,u);let y=new IV(f);if(!y.cksumValid)return c(null,u);let b=512*Math.ceil(y.size/512);if(u+b+512>a||(u+=b+512,u>=a))return c(null,u);r.mtimeCache&&r.mtimeCache.set(y.path,y.mtime),g=0,Gs.read(o,f,0,512,u,h)};Gs.read(o,f,0,512,u,h)},s=new Promise((o,a)=>{i.on("error",a);let l="r+",c=(u,g)=>{if(u&&u.code==="ENOENT"&&l==="r+")return l="w+",Gs.open(r.file,l,c);if(u)return a(u);Gs.fstat(g,(f,h)=>{if(f)return a(f);n(g,h.size,(p,m)=>{if(p)return a(p);let y=new CV.WriteStream(r.file,{fd:g,start:m});i.pipe(y),y.on("error",a),y.on("close",o),yV(i,e)})})};Gs.open(r.file,l,c)});return t?s.then(t,t):s},aFe=(r,e)=>{e.forEach(t=>{t.charAt(0)==="@"?mV({file:EV.resolve(r.cwd,t.substr(1)),sync:!0,noResume:!0,onentry:i=>r.add(i)}):r.add(t)}),r.end()},yV=(r,e)=>{for(;e.length;){let t=e.shift();if(t.charAt(0)==="@")return mV({file:EV.resolve(r.cwd,t.substr(1)),noResume:!0,onentry:i=>r.add(i)}).then(i=>yV(r,e));r.add(t)}r.end()}});var BV=w((aat,wV)=>{"use strict";var AFe=cf(),lFe=XD(),oat=wV.exports=(r,e,t)=>{let i=AFe(r);if(!i.file)throw new TypeError("file is required");if(i.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),cFe(i),lFe(i,e,t)},cFe=r=>{let e=r.filter;r.mtimeCache||(r.mtimeCache=new Map),r.filter=e?(t,i)=>e(t,i)&&!(r.mtimeCache.get(t)>i.mtime):(t,i)=>!(r.mtimeCache.get(t)>i.mtime)}});var SV=w((Aat,bV)=>{var{promisify:QV}=require("util"),Pl=require("fs"),uFe=r=>{if(!r)r={mode:511,fs:Pl};else if(typeof r=="object")r=N({mode:511,fs:Pl},r);else if(typeof r=="number")r={mode:r,fs:Pl};else if(typeof r=="string")r={mode:parseInt(r,8),fs:Pl};else throw new TypeError("invalid options argument");return r.mkdir=r.mkdir||r.fs.mkdir||Pl.mkdir,r.mkdirAsync=QV(r.mkdir),r.stat=r.stat||r.fs.stat||Pl.stat,r.statAsync=QV(r.stat),r.statSync=r.statSync||r.fs.statSync||Pl.statSync,r.mkdirSync=r.mkdirSync||r.fs.mkdirSync||Pl.mkdirSync,r};bV.exports=uFe});var xV=w((lat,vV)=>{var gFe=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:fFe,parse:hFe}=require("path"),pFe=r=>{if(/\0/.test(r))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:r,code:"ERR_INVALID_ARG_VALUE"});if(r=fFe(r),gFe==="win32"){let e=/[*|"<>?:]/,{root:t}=hFe(r);if(e.test(r.substr(t.length)))throw Object.assign(new Error("Illegal characters in path."),{path:r,code:"EINVAL"})}return r};vV.exports=pFe});var FV=w((cat,kV)=>{var{dirname:PV}=require("path"),DV=(r,e,t=void 0)=>t===e?Promise.resolve():r.statAsync(e).then(i=>i.isDirectory()?t:void 0,i=>i.code==="ENOENT"?DV(r,PV(e),e):void 0),RV=(r,e,t=void 0)=>{if(t!==e)try{return r.statSync(e).isDirectory()?t:void 0}catch(i){return i.code==="ENOENT"?RV(r,PV(e),e):void 0}};kV.exports={findMade:DV,findMadeSync:RV}});var eR=w((uat,NV)=>{var{dirname:LV}=require("path"),ZD=(r,e,t)=>{e.recursive=!1;let i=LV(r);return i===r?e.mkdirAsync(r,e).catch(n=>{if(n.code!=="EISDIR")throw n}):e.mkdirAsync(r,e).then(()=>t||r,n=>{if(n.code==="ENOENT")return ZD(i,e).then(s=>ZD(r,e,s));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;return e.statAsync(r).then(s=>{if(s.isDirectory())return t;throw n},()=>{throw n})})},$D=(r,e,t)=>{let i=LV(r);if(e.recursive=!1,i===r)try{return e.mkdirSync(r,e)}catch(n){if(n.code!=="EISDIR")throw n;return}try{return e.mkdirSync(r,e),t||r}catch(n){if(n.code==="ENOENT")return $D(r,e,$D(i,e,t));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;try{if(!e.statSync(r).isDirectory())throw n}catch(s){throw n}}};NV.exports={mkdirpManual:ZD,mkdirpManualSync:$D}});var MV=w((gat,TV)=>{var{dirname:OV}=require("path"),{findMade:dFe,findMadeSync:CFe}=FV(),{mkdirpManual:mFe,mkdirpManualSync:EFe}=eR(),IFe=(r,e)=>(e.recursive=!0,OV(r)===r?e.mkdirAsync(r,e):dFe(e,r).then(i=>e.mkdirAsync(r,e).then(()=>i).catch(n=>{if(n.code==="ENOENT")return mFe(r,e);throw n}))),yFe=(r,e)=>{if(e.recursive=!0,OV(r)===r)return e.mkdirSync(r,e);let i=CFe(e,r);try{return e.mkdirSync(r,e),i}catch(n){if(n.code==="ENOENT")return EFe(r,e);throw n}};TV.exports={mkdirpNative:IFe,mkdirpNativeSync:yFe}});var jV=w((fat,KV)=>{var UV=require("fs"),wFe=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version,tR=wFe.replace(/^v/,"").split("."),HV=+tR[0]>10||+tR[0]==10&&+tR[1]>=12,BFe=HV?r=>r.mkdir===UV.mkdir:()=>!1,bFe=HV?r=>r.mkdirSync===UV.mkdirSync:()=>!1;KV.exports={useNative:BFe,useNativeSync:bFe}});var zV=w((hat,GV)=>{var bf=SV(),Qf=xV(),{mkdirpNative:YV,mkdirpNativeSync:qV}=MV(),{mkdirpManual:JV,mkdirpManualSync:WV}=eR(),{useNative:QFe,useNativeSync:SFe}=jV(),Sf=(r,e)=>(r=Qf(r),e=bf(e),QFe(e)?YV(r,e):JV(r,e)),vFe=(r,e)=>(r=Qf(r),e=bf(e),SFe(e)?qV(r,e):WV(r,e));Sf.sync=vFe;Sf.native=(r,e)=>YV(Qf(r),bf(e));Sf.manual=(r,e)=>JV(Qf(r),bf(e));Sf.nativeSync=(r,e)=>qV(Qf(r),bf(e));Sf.manualSync=(r,e)=>WV(Qf(r),bf(e));GV.exports=Sf});var t6=w((pat,_V)=>{"use strict";var Ys=require("fs"),uu=require("path"),xFe=Ys.lchown?"lchown":"chown",kFe=Ys.lchownSync?"lchownSync":"chownSync",VV=Ys.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),XV=(r,e,t)=>{try{return Ys[kFe](r,e,t)}catch(i){if(i.code!=="ENOENT")throw i}},PFe=(r,e,t)=>{try{return Ys.chownSync(r,e,t)}catch(i){if(i.code!=="ENOENT")throw i}},DFe=VV?(r,e,t,i)=>n=>{!n||n.code!=="EISDIR"?i(n):Ys.chown(r,e,t,i)}:(r,e,t,i)=>i,rR=VV?(r,e,t)=>{try{return XV(r,e,t)}catch(i){if(i.code!=="EISDIR")throw i;PFe(r,e,t)}}:(r,e,t)=>XV(r,e,t),RFe=process.version,ZV=(r,e,t)=>Ys.readdir(r,e,t),FFe=(r,e)=>Ys.readdirSync(r,e);/^v4\./.test(RFe)&&(ZV=(r,e,t)=>Ys.readdir(r,t));var UB=(r,e,t,i)=>{Ys[xFe](r,e,t,DFe(r,e,t,n=>{i(n&&n.code!=="ENOENT"?n:null)}))},$V=(r,e,t,i,n)=>{if(typeof e=="string")return Ys.lstat(uu.resolve(r,e),(s,o)=>{if(s)return n(s.code!=="ENOENT"?s:null);o.name=e,$V(r,o,t,i,n)});if(e.isDirectory())iR(uu.resolve(r,e.name),t,i,s=>{if(s)return n(s);let o=uu.resolve(r,e.name);UB(o,t,i,n)});else{let s=uu.resolve(r,e.name);UB(s,t,i,n)}},iR=(r,e,t,i)=>{ZV(r,{withFileTypes:!0},(n,s)=>{if(n){if(n.code==="ENOENT")return i();if(n.code!=="ENOTDIR"&&n.code!=="ENOTSUP")return i(n)}if(n||!s.length)return UB(r,e,t,i);let o=s.length,a=null,l=c=>{if(!a){if(c)return i(a=c);if(--o==0)return UB(r,e,t,i)}};s.forEach(c=>$V(r,c,e,t,l))})},NFe=(r,e,t,i)=>{if(typeof e=="string")try{let n=Ys.lstatSync(uu.resolve(r,e));n.name=e,e=n}catch(n){if(n.code==="ENOENT")return;throw n}e.isDirectory()&&e6(uu.resolve(r,e.name),t,i),rR(uu.resolve(r,e.name),t,i)},e6=(r,e,t)=>{let i;try{i=FFe(r,{withFileTypes:!0})}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR"||n.code==="ENOTSUP")return rR(r,e,t);throw n}return i&&i.length&&i.forEach(n=>NFe(r,n,e,t)),rR(r,e,t)};_V.exports=iR;iR.sync=e6});var s6=w((mat,nR)=>{"use strict";var r6=zV(),qs=require("fs"),HB=require("path"),i6=t6(),sR=class extends Error{constructor(e,t){super("Cannot extract through symbolic link");this.path=t,this.symlink=e}get name(){return"SylinkError"}},sC=class extends Error{constructor(e,t){super(t+": Cannot cd into '"+e+"'");this.path=e,this.code=t}get name(){return"CwdError"}},dat=nR.exports=(r,e,t)=>{let i=e.umask,n=e.mode|448,s=(n&i)!=0,o=e.uid,a=e.gid,l=typeof o=="number"&&typeof a=="number"&&(o!==e.processUid||a!==e.processGid),c=e.preserve,u=e.unlink,g=e.cache,f=e.cwd,h=(y,b)=>{y?t(y):(g.set(r,!0),b&&l?i6(b,o,a,v=>h(v)):s?qs.chmod(r,n,t):t())};if(g&&g.get(r)===!0)return h();if(r===f)return qs.stat(r,(y,b)=>{(y||!b.isDirectory())&&(y=new sC(r,y&&y.code||"ENOTDIR")),h(y)});if(c)return r6(r,{mode:n}).then(y=>h(null,y),h);let m=HB.relative(f,r).split(/\/|\\/);jB(f,m,n,g,u,f,null,h)},jB=(r,e,t,i,n,s,o,a)=>{if(!e.length)return a(null,o);let l=e.shift(),c=r+"/"+l;if(i.get(c))return jB(c,e,t,i,n,s,o,a);qs.mkdir(c,t,n6(c,e,t,i,n,s,o,a))},n6=(r,e,t,i,n,s,o,a)=>l=>{if(l){if(l.path&&HB.dirname(l.path)===s&&(l.code==="ENOTDIR"||l.code==="ENOENT"))return a(new sC(s,l.code));qs.lstat(r,(c,u)=>{if(c)a(c);else if(u.isDirectory())jB(r,e,t,i,n,s,o,a);else if(n)qs.unlink(r,g=>{if(g)return a(g);qs.mkdir(r,t,n6(r,e,t,i,n,s,o,a))});else{if(u.isSymbolicLink())return a(new sR(r,r+"/"+e.join("/")));a(l)}})}else o=o||r,jB(r,e,t,i,n,s,o,a)},Cat=nR.exports.sync=(r,e)=>{let t=e.umask,i=e.mode|448,n=(i&t)!=0,s=e.uid,o=e.gid,a=typeof s=="number"&&typeof o=="number"&&(s!==e.processUid||o!==e.processGid),l=e.preserve,c=e.unlink,u=e.cache,g=e.cwd,f=y=>{u.set(r,!0),y&&a&&i6.sync(y,s,o),n&&qs.chmodSync(r,i)};if(u&&u.get(r)===!0)return f();if(r===g){let y=!1,b="ENOTDIR";try{y=qs.statSync(r).isDirectory()}catch(v){b=v.code}finally{if(!y)throw new sC(r,b)}f();return}if(l)return f(r6.sync(r,i));let p=HB.relative(g,r).split(/\/|\\/),m=null;for(let y=p.shift(),b=g;y&&(b+="/"+y);y=p.shift())if(!u.get(b))try{qs.mkdirSync(b,i),m=m||b,u.set(b,!0)}catch(v){if(v.path&&HB.dirname(v.path)===g&&(v.code==="ENOTDIR"||v.code==="ENOENT"))return new sC(g,v.code);let x=qs.lstatSync(b);if(x.isDirectory()){u.set(b,!0);continue}else if(c){qs.unlinkSync(b),qs.mkdirSync(b,i),m=m||b,u.set(b,!0);continue}else if(x.isSymbolicLink())return new sR(b,b+"/"+p.join("/"))}return f(m)}});var A6=w((Eat,o6)=>{var a6=require("assert");o6.exports=()=>{let r=new Map,e=new Map,{join:t}=require("path"),i=u=>t(u).split(/[\\\/]/).slice(0,-1).reduce((g,f)=>g.length?g.concat(t(g[g.length-1],f)):[f],[]),n=new Set,s=u=>{let g=e.get(u);if(!g)throw new Error("function does not have any path reservations");return{paths:g.paths.map(f=>r.get(f)),dirs:[...g.dirs].map(f=>r.get(f))}},o=u=>{let{paths:g,dirs:f}=s(u);return g.every(h=>h[0]===u)&&f.every(h=>h[0]instanceof Set&&h[0].has(u))},a=u=>n.has(u)||!o(u)?!1:(n.add(u),u(()=>l(u)),!0),l=u=>{if(!n.has(u))return!1;let{paths:g,dirs:f}=e.get(u),h=new Set;return g.forEach(p=>{let m=r.get(p);a6.equal(m[0],u),m.length===1?r.delete(p):(m.shift(),typeof m[0]=="function"?h.add(m[0]):m[0].forEach(y=>h.add(y)))}),f.forEach(p=>{let m=r.get(p);a6(m[0]instanceof Set),m[0].size===1&&m.length===1?r.delete(p):m[0].size===1?(m.shift(),h.add(m[0])):m[0].delete(u)}),n.delete(u),h.forEach(p=>a(p)),!0};return{check:o,reserve:(u,g)=>{let f=new Set(u.map(h=>i(h)).reduce((h,p)=>h.concat(p)));return e.set(g,{dirs:f,paths:u}),u.forEach(h=>{let p=r.get(h);p?p.push(g):r.set(h,[g])}),f.forEach(h=>{let p=r.get(h);p?p[p.length-1]instanceof Set?p[p.length-1].add(g):p.push(new Set([g])):r.set(h,[new Set([g])])}),a(g)}}}});var u6=w((Iat,l6)=>{var LFe=process.env.__FAKE_PLATFORM__||process.platform,TFe=LFe==="win32",OFe=global.__FAKE_TESTING_FS__||require("fs"),{O_CREAT:MFe,O_TRUNC:KFe,O_WRONLY:UFe,UV_FS_O_FILEMAP:c6=0}=OFe.constants,HFe=TFe&&!!c6,jFe=512*1024,GFe=c6|KFe|MFe|UFe;l6.exports=HFe?r=>r"w"});var hR=w((bat,g6)=>{"use strict";var YFe=require("assert"),yat=require("events").EventEmitter,qFe=nC(),$t=require("fs"),JFe=wf(),fA=require("path"),oR=s6(),wat=oR.sync,f6=yD(),WFe=A6(),h6=Symbol("onEntry"),aR=Symbol("checkFs"),p6=Symbol("checkFs2"),AR=Symbol("isReusable"),hA=Symbol("makeFs"),lR=Symbol("file"),cR=Symbol("directory"),GB=Symbol("link"),d6=Symbol("symlink"),C6=Symbol("hardlink"),m6=Symbol("unsupported"),Bat=Symbol("unknown"),E6=Symbol("checkPath"),vf=Symbol("mkdir"),dn=Symbol("onError"),YB=Symbol("pending"),I6=Symbol("pend"),xf=Symbol("unpend"),uR=Symbol("ended"),gR=Symbol("maybeClose"),fR=Symbol("skip"),oC=Symbol("doChown"),aC=Symbol("uid"),AC=Symbol("gid"),y6=require("crypto"),w6=u6(),qB=()=>{throw new Error("sync function called cb somehow?!?")},zFe=(r,e)=>{if(process.platform!=="win32")return $t.unlink(r,e);let t=r+".DELETE."+y6.randomBytes(16).toString("hex");$t.rename(r,t,i=>{if(i)return e(i);$t.unlink(t,e)})},_Fe=r=>{if(process.platform!=="win32")return $t.unlinkSync(r);let e=r+".DELETE."+y6.randomBytes(16).toString("hex");$t.renameSync(r,e),$t.unlinkSync(e)},B6=(r,e,t)=>r===r>>>0?r:e===e>>>0?e:t,JB=class extends qFe{constructor(e){if(e||(e={}),e.ondone=t=>{this[uR]=!0,this[gR]()},super(e),this.reservations=WFe(),this.transform=typeof e.transform=="function"?e.transform:null,this.writable=!0,this.readable=!1,this[YB]=0,this[uR]=!1,this.dirCache=e.dirCache||new Map,typeof e.uid=="number"||typeof e.gid=="number"){if(typeof e.uid!="number"||typeof e.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;e.preserveOwner===void 0&&typeof e.uid!="number"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=e.forceChown===!0,this.win32=!!e.win32||process.platform==="win32",this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=fA.resolve(e.cwd||process.cwd()),this.strip=+e.strip||0,this.processUmask=process.umask(),this.umask=typeof e.umask=="number"?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on("entry",t=>this[h6](t))}warn(e,t,i={}){return(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")&&(i.recoverable=!1),super.warn(e,t,i)}[gR](){this[uR]&&this[YB]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close"))}[E6](e){if(this.strip){let t=e.path.split(/\/|\\/);if(t.length=this.strip&&(e.linkpath=i.slice(this.strip).join("/"))}}if(!this.preservePaths){let t=e.path;if(t.match(/(^|\/|\\)\.\.(\\|\/|$)/))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:e,path:t}),!1;if(fA.win32.isAbsolute(t)){let i=fA.win32.parse(t);e.path=t.substr(i.root.length);let n=i.root;this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:e,path:t})}}if(this.win32){let t=fA.win32.parse(e.path);e.path=t.root===""?f6.encode(e.path):t.root+f6.encode(e.path.substr(t.root.length))}return fA.isAbsolute(e.path)?e.absolute=e.path:e.absolute=fA.resolve(this.cwd,e.path),!0}[h6](e){if(!this[E6](e))return e.resume();switch(YFe.equal(typeof e.absolute,"string"),e.type){case"Directory":case"GNUDumpDir":e.mode&&(e.mode=e.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[aR](e);case"CharacterDevice":case"BlockDevice":case"FIFO":return this[m6](e)}}[dn](e,t){e.name==="CwdError"?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:t}),this[xf](),t.resume())}[vf](e,t,i){oR(e,{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t},i)}[oC](e){return this.forceChown||this.preserveOwner&&(typeof e.uid=="number"&&e.uid!==this.processUid||typeof e.gid=="number"&&e.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[aC](e){return B6(this.uid,e.uid,this.processUid)}[AC](e){return B6(this.gid,e.gid,this.processGid)}[lR](e,t){let i=e.mode&4095||this.fmode,n=new JFe.WriteStream(e.absolute,{flags:w6(e.size),mode:i,autoClose:!1});n.on("error",l=>this[dn](l,e));let s=1,o=l=>{if(l)return this[dn](l,e);--s==0&&$t.close(n.fd,c=>{t(),c?this[dn](c,e):this[xf]()})};n.on("finish",l=>{let c=e.absolute,u=n.fd;if(e.mtime&&!this.noMtime){s++;let g=e.atime||new Date,f=e.mtime;$t.futimes(u,g,f,h=>h?$t.utimes(c,g,f,p=>o(p&&h)):o())}if(this[oC](e)){s++;let g=this[aC](e),f=this[AC](e);$t.fchown(u,g,f,h=>h?$t.chown(c,g,f,p=>o(p&&h)):o())}o()});let a=this.transform&&this.transform(e)||e;a!==e&&(a.on("error",l=>this[dn](l,e)),e.pipe(a)),a.pipe(n)}[cR](e,t){let i=e.mode&4095||this.dmode;this[vf](e.absolute,i,n=>{if(n)return t(),this[dn](n,e);let s=1,o=a=>{--s==0&&(t(),this[xf](),e.resume())};e.mtime&&!this.noMtime&&(s++,$t.utimes(e.absolute,e.atime||new Date,e.mtime,o)),this[oC](e)&&(s++,$t.chown(e.absolute,this[aC](e),this[AC](e),o)),o()})}[m6](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[d6](e,t){this[GB](e,e.linkpath,"symlink",t)}[C6](e,t){this[GB](e,fA.resolve(this.cwd,e.linkpath),"link",t)}[I6](){this[YB]++}[xf](){this[YB]--,this[gR]()}[fR](e){this[xf](),e.resume()}[AR](e,t){return e.type==="File"&&!this.unlink&&t.isFile()&&t.nlink<=1&&process.platform!=="win32"}[aR](e){this[I6]();let t=[e.path];e.linkpath&&t.push(e.linkpath),this.reservations.reserve(t,i=>this[p6](e,i))}[p6](e,t){this[vf](fA.dirname(e.absolute),this.dmode,i=>{if(i)return t(),this[dn](i,e);$t.lstat(e.absolute,(n,s)=>{s&&(this.keep||this.newer&&s.mtime>e.mtime)?(this[fR](e),t()):n||this[AR](e,s)?this[hA](null,e,t):s.isDirectory()?e.type==="Directory"?!e.mode||(s.mode&4095)===e.mode?this[hA](null,e,t):$t.chmod(e.absolute,e.mode,o=>this[hA](o,e,t)):$t.rmdir(e.absolute,o=>this[hA](o,e,t)):zFe(e.absolute,o=>this[hA](o,e,t))})})}[hA](e,t,i){if(e)return this[dn](e,t);switch(t.type){case"File":case"OldFile":case"ContiguousFile":return this[lR](t,i);case"Link":return this[C6](t,i);case"SymbolicLink":return this[d6](t,i);case"Directory":case"GNUDumpDir":return this[cR](t,i)}}[GB](e,t,i,n){$t[i](t,e.absolute,s=>{if(s)return this[dn](s,e);n(),this[xf](),e.resume()})}},b6=class extends JB{constructor(e){super(e)}[aR](e){let t=this[vf](fA.dirname(e.absolute),this.dmode,qB);if(t)return this[dn](t,e);try{let i=$t.lstatSync(e.absolute);if(this.keep||this.newer&&i.mtime>e.mtime)return this[fR](e);if(this[AR](e,i))return this[hA](null,e,qB);try{return i.isDirectory()?e.type==="Directory"?e.mode&&(i.mode&4095)!==e.mode&&$t.chmodSync(e.absolute,e.mode):$t.rmdirSync(e.absolute):_Fe(e.absolute),this[hA](null,e,qB)}catch(n){return this[dn](n,e)}}catch(i){return this[hA](null,e,qB)}}[lR](e,t){let i=e.mode&4095||this.fmode,n=l=>{let c;try{$t.closeSync(o)}catch(u){c=u}(l||c)&&this[dn](l||c,e)},s,o;try{o=$t.openSync(e.absolute,w6(e.size),i)}catch(l){return n(l)}let a=this.transform&&this.transform(e)||e;a!==e&&(a.on("error",l=>this[dn](l,e)),e.pipe(a)),a.on("data",l=>{try{$t.writeSync(o,l,0,l.length)}catch(c){n(c)}}),a.on("end",l=>{let c=null;if(e.mtime&&!this.noMtime){let u=e.atime||new Date,g=e.mtime;try{$t.futimesSync(o,u,g)}catch(f){try{$t.utimesSync(e.absolute,u,g)}catch(h){c=f}}}if(this[oC](e)){let u=this[aC](e),g=this[AC](e);try{$t.fchownSync(o,u,g)}catch(f){try{$t.chownSync(e.absolute,u,g)}catch(h){c=c||f}}}n(c)})}[cR](e,t){let i=e.mode&4095||this.dmode,n=this[vf](e.absolute,i);if(n)return this[dn](n,e);if(e.mtime&&!this.noMtime)try{$t.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch(s){}if(this[oC](e))try{$t.chownSync(e.absolute,this[aC](e),this[AC](e))}catch(s){}e.resume()}[vf](e,t){try{return oR.sync(e,{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t})}catch(i){return i}}[GB](e,t,i,n){try{$t[i+"Sync"](t,e.absolute),e.resume()}catch(s){return this[dn](s,e)}}};JB.Sync=b6;g6.exports=JB});var k6=w((Sat,Q6)=>{"use strict";var VFe=cf(),WB=hR(),S6=require("fs"),v6=wf(),x6=require("path"),Qat=Q6.exports=(r,e,t)=>{typeof r=="function"?(t=r,e=null,r={}):Array.isArray(r)&&(e=r,r={}),typeof e=="function"&&(t=e,e=null),e?e=Array.from(e):e=[];let i=VFe(r);if(i.sync&&typeof t=="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof t=="function")throw new TypeError("callback only supported with file option");return e.length&&XFe(i,e),i.file&&i.sync?ZFe(i):i.file?$Fe(i,t):i.sync?eNe(i):tNe(i)},XFe=(r,e)=>{let t=new Map(e.map(s=>[s.replace(/\/+$/,""),!0])),i=r.filter,n=(s,o)=>{let a=o||x6.parse(s).root||".",l=s===a?!1:t.has(s)?t.get(s):n(x6.dirname(s),a);return t.set(s,l),l};r.filter=i?(s,o)=>i(s,o)&&n(s.replace(/\/+$/,"")):s=>n(s.replace(/\/+$/,""))},ZFe=r=>{let e=new WB.Sync(r),t=r.file,i=!0,n,s=S6.statSync(t),o=r.maxReadSize||16*1024*1024;new v6.ReadStreamSync(t,{readSize:o,size:s.size}).pipe(e)},$Fe=(r,e)=>{let t=new WB(r),i=r.maxReadSize||16*1024*1024,n=r.file,s=new Promise((o,a)=>{t.on("error",a),t.on("close",o),S6.stat(n,(l,c)=>{if(l)a(l);else{let u=new v6.ReadStream(n,{readSize:i,size:c.size});u.on("error",a),u.pipe(t)}})});return e?s.then(e,e):s},eNe=r=>new WB.Sync(r),tNe=r=>new WB(r)});var P6=w(pi=>{"use strict";pi.c=pi.create=hV();pi.r=pi.replace=XD();pi.t=pi.list=MB();pi.u=pi.update=BV();pi.x=pi.extract=k6();pi.Pack=SB();pi.Unpack=hR();pi.Parse=nC();pi.ReadEntry=Zd();pi.WriteEntry=xD();pi.Header=hf();pi.Pax=gB();pi.types=Xd()});var L6=w((kat,N6)=>{var dR;N6.exports.getContent=()=>(typeof dR=="undefined"&&(dR=require("zlib").brotliDecompressSync(Buffer.from("W1YWV8M2Bm73erNK/X8Ao59vhTJuj9A5ts0kuKSIx2QXjDzs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lebm48xSmRFpMhhPmGkVF8cuVUuIjJnxJXa1ounFi40T7RMOczN1pX+SMc7Oc+2tJHYTxi4s0QhbDMug7Rk9COX9OadF89oQP5xO1zejgM9nru6oZYKMQn5TSbh3y8I8KVEpMBBaQRotTk+gnRJ/6oPqojCeFs+Pe5LzBCeNxrT4re7R9UsVaI9etNh3pcVjNMnn5peAD3/k0TdF7zpDG8SKIV1YHpgVh2JP9dA83MntXqDzwzI+v13PKZ5STaY/jLEBqfzhTENzkj4bgDFMJAYbGNb8b9683Pp7LvAurNcZnYwZPf90a+nU7JdWUyE4+ys+7oUhaIMbZvPU1o94CaHDgZ8B3K4+NKfM1r/ePUhP7HrHcC0o2gWI4CVW+RWgv7CqIZ/9X1lmAPXI+Y+XtanZQ9/YnC7qAGxqi+QazGaH3BKVB7iCi6P2sGBfHBtyKI7m4fmOCOJ1bPebG250slOEaXVYUmmkS8qL4qz18G78fW/38Iqdd92DSWNioJz4vLl8hmIrR+itRWzmQP+5rk3ASeI9XfTEC22qejk7EQU8SJGPk4+blgvtg7WB6x1yh4CNF0+XEXL+NlLFLqcHJinFlqmjd0OzrSnFjdb5nm2+tDjuQwTKBQ9l8=","base64")).toString()),dR)});var H6=w((CR,U6)=>{(function(r,e){typeof CR=="object"?U6.exports=e():typeof define=="function"&&define.amd?define(e):r.treeify=e()})(CR,function(){function r(n,s){var o=s?"\u2514":"\u251C";return n?o+="\u2500 ":o+="\u2500\u2500\u2510",o}function e(n,s){var o=[];for(var a in n)!n.hasOwnProperty(a)||s&&typeof n[a]=="function"||o.push(a);return o}function t(n,s,o,a,l,c,u){var g="",f=0,h,p,m=a.slice(0);if(m.push([s,o])&&a.length>0&&(a.forEach(function(b,v){v>0&&(g+=(b[1]?" ":"\u2502")+" "),!p&&b[0]===s&&(p=!0)}),g+=r(n,o)+n,l&&(typeof s!="object"||s instanceof Date)&&(g+=": "+s),p&&(g+=" (circular ref.)"),u(g)),!p&&typeof s=="object"){var y=e(s,c);y.forEach(function(b){h=++f===y.length,t(b,s[b],h,m,l,c,u)})}}var i={};return i.asLines=function(n,s,o,a){var l=typeof o!="function"?o:!1;t(".",n,!1,[],s,l,a||o)},i.asTree=function(n,s,o){var a="";return t(".",n,!1,[],s,o,function(l){a+=l+` +`}),a},i})});var _B=w((sAt,X6)=>{var ENe=Ks(),INe=Id(),yNe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wNe=/^\w*$/;function BNe(r,e){if(ENe(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||INe(r)?!0:wNe.test(r)||!yNe.test(r)||e!=null&&r in Object(e)}X6.exports=BNe});var VB=w((oAt,Z6)=>{var bNe=Wc(),QNe=Rn(),SNe="[object AsyncFunction]",vNe="[object Function]",xNe="[object GeneratorFunction]",kNe="[object Proxy]";function PNe(r){if(!QNe(r))return!1;var e=bNe(r);return e==vNe||e==xNe||e==SNe||e==kNe}Z6.exports=PNe});var e7=w((aAt,$6)=>{var DNe=Ns(),RNe=DNe["__core-js_shared__"];$6.exports=RNe});var i7=w((AAt,t7)=>{var QR=e7(),r7=function(){var r=/[^.]+$/.exec(QR&&QR.keys&&QR.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function FNe(r){return!!r7&&r7 in r}t7.exports=FNe});var SR=w((lAt,n7)=>{var NNe=Function.prototype,LNe=NNe.toString;function TNe(r){if(r!=null){try{return LNe.call(r)}catch(e){}try{return r+""}catch(e){}}return""}n7.exports=TNe});var o7=w((cAt,s7)=>{var ONe=VB(),MNe=i7(),KNe=Rn(),UNe=SR(),HNe=/[\\^$.*+?()[\]{}|]/g,jNe=/^\[object .+?Constructor\]$/,GNe=Function.prototype,YNe=Object.prototype,qNe=GNe.toString,JNe=YNe.hasOwnProperty,WNe=RegExp("^"+qNe.call(JNe).replace(HNe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zNe(r){if(!KNe(r)||MNe(r))return!1;var e=ONe(r)?WNe:jNe;return e.test(UNe(r))}s7.exports=zNe});var A7=w((uAt,a7)=>{function _Ne(r,e){return r==null?void 0:r[e]}a7.exports=_Ne});var Rl=w((gAt,l7)=>{var VNe=o7(),XNe=A7();function ZNe(r,e){var t=XNe(r,e);return VNe(t)?t:void 0}l7.exports=ZNe});var cC=w((fAt,c7)=>{var $Ne=Rl(),eLe=$Ne(Object,"create");c7.exports=eLe});var f7=w((hAt,u7)=>{var g7=cC();function tLe(){this.__data__=g7?g7(null):{},this.size=0}u7.exports=tLe});var p7=w((pAt,h7)=>{function rLe(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}h7.exports=rLe});var C7=w((dAt,d7)=>{var iLe=cC(),nLe="__lodash_hash_undefined__",sLe=Object.prototype,oLe=sLe.hasOwnProperty;function aLe(r){var e=this.__data__;if(iLe){var t=e[r];return t===nLe?void 0:t}return oLe.call(e,r)?e[r]:void 0}d7.exports=aLe});var E7=w((CAt,m7)=>{var ALe=cC(),lLe=Object.prototype,cLe=lLe.hasOwnProperty;function uLe(r){var e=this.__data__;return ALe?e[r]!==void 0:cLe.call(e,r)}m7.exports=uLe});var y7=w((mAt,I7)=>{var gLe=cC(),fLe="__lodash_hash_undefined__";function hLe(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=gLe&&e===void 0?fLe:e,this}I7.exports=hLe});var B7=w((EAt,w7)=>{var pLe=f7(),dLe=p7(),CLe=C7(),mLe=E7(),ELe=y7();function kf(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e{function ILe(){this.__data__=[],this.size=0}b7.exports=ILe});var Pf=w((yAt,S7)=>{function yLe(r,e){return r===e||r!==r&&e!==e}S7.exports=yLe});var uC=w((wAt,v7)=>{var wLe=Pf();function BLe(r,e){for(var t=r.length;t--;)if(wLe(r[t][0],e))return t;return-1}v7.exports=BLe});var k7=w((BAt,x7)=>{var bLe=uC(),QLe=Array.prototype,SLe=QLe.splice;function vLe(r){var e=this.__data__,t=bLe(e,r);if(t<0)return!1;var i=e.length-1;return t==i?e.pop():SLe.call(e,t,1),--this.size,!0}x7.exports=vLe});var D7=w((bAt,P7)=>{var xLe=uC();function kLe(r){var e=this.__data__,t=xLe(e,r);return t<0?void 0:e[t][1]}P7.exports=kLe});var F7=w((QAt,R7)=>{var PLe=uC();function DLe(r){return PLe(this.__data__,r)>-1}R7.exports=DLe});var L7=w((SAt,N7)=>{var RLe=uC();function FLe(r,e){var t=this.__data__,i=RLe(t,r);return i<0?(++this.size,t.push([r,e])):t[i][1]=e,this}N7.exports=FLe});var gC=w((vAt,T7)=>{var NLe=Q7(),LLe=k7(),TLe=D7(),OLe=F7(),MLe=L7();function Df(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e{var KLe=Rl(),ULe=Ns(),HLe=KLe(ULe,"Map");O7.exports=HLe});var U7=w((kAt,M7)=>{var K7=B7(),jLe=gC(),GLe=XB();function YLe(){this.size=0,this.__data__={hash:new K7,map:new(GLe||jLe),string:new K7}}M7.exports=YLe});var j7=w((PAt,H7)=>{function qLe(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}H7.exports=qLe});var fC=w((DAt,G7)=>{var JLe=j7();function WLe(r,e){var t=r.__data__;return JLe(e)?t[typeof e=="string"?"string":"hash"]:t.map}G7.exports=WLe});var q7=w((RAt,Y7)=>{var zLe=fC();function _Le(r){var e=zLe(this,r).delete(r);return this.size-=e?1:0,e}Y7.exports=_Le});var W7=w((FAt,J7)=>{var VLe=fC();function XLe(r){return VLe(this,r).get(r)}J7.exports=XLe});var _7=w((NAt,z7)=>{var ZLe=fC();function $Le(r){return ZLe(this,r).has(r)}z7.exports=$Le});var X7=w((LAt,V7)=>{var eTe=fC();function tTe(r,e){var t=eTe(this,r),i=t.size;return t.set(r,e),this.size+=t.size==i?0:1,this}V7.exports=tTe});var ZB=w((TAt,Z7)=>{var rTe=U7(),iTe=q7(),nTe=W7(),sTe=_7(),oTe=X7();function Rf(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e{var eX=ZB(),aTe="Expected a function";function vR(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(aTe);var t=function(){var i=arguments,n=e?e.apply(this,i):i[0],s=t.cache;if(s.has(n))return s.get(n);var o=r.apply(this,i);return t.cache=s.set(n,o)||s,o};return t.cache=new(vR.Cache||eX),t}vR.Cache=eX;$7.exports=vR});var iX=w((MAt,rX)=>{var ATe=tX(),lTe=500;function cTe(r){var e=ATe(r,function(i){return t.size===lTe&&t.clear(),i}),t=e.cache;return e}rX.exports=cTe});var sX=w((KAt,nX)=>{var uTe=iX(),gTe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fTe=/\\(\\)?/g,hTe=uTe(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(gTe,function(t,i,n,s){e.push(n?s.replace(fTe,"$1"):i||t)}),e});nX.exports=hTe});var Ff=w((UAt,oX)=>{var pTe=Ks(),dTe=_B(),CTe=sX(),mTe=lf();function ETe(r,e){return pTe(r)?r:dTe(r,e)?[r]:CTe(mTe(r))}oX.exports=ETe});var gu=w((HAt,aX)=>{var ITe=Id(),yTe=1/0;function wTe(r){if(typeof r=="string"||ITe(r))return r;var e=r+"";return e=="0"&&1/r==-yTe?"-0":e}aX.exports=wTe});var hC=w((jAt,AX)=>{var BTe=Ff(),bTe=gu();function QTe(r,e){e=BTe(e,r);for(var t=0,i=e.length;r!=null&&t{var STe=Rl(),vTe=function(){try{var r=STe(Object,"defineProperty");return r({},"",{}),r}catch(e){}}();lX.exports=vTe});var Nf=w((YAt,cX)=>{var uX=xR();function xTe(r,e,t){e=="__proto__"&&uX?uX(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}cX.exports=xTe});var $B=w((qAt,gX)=>{var kTe=Nf(),PTe=Pf(),DTe=Object.prototype,RTe=DTe.hasOwnProperty;function FTe(r,e,t){var i=r[e];(!(RTe.call(r,e)&&PTe(i,t))||t===void 0&&!(e in r))&&kTe(r,e,t)}gX.exports=FTe});var pC=w((JAt,fX)=>{var NTe=9007199254740991,LTe=/^(?:0|[1-9]\d*)$/;function TTe(r,e){var t=typeof r;return e=e==null?NTe:e,!!e&&(t=="number"||t!="symbol"&<e.test(r))&&r>-1&&r%1==0&&r{var OTe=$B(),MTe=Ff(),KTe=pC(),pX=Rn(),UTe=gu();function HTe(r,e,t,i){if(!pX(r))return r;e=MTe(e,r);for(var n=-1,s=e.length,o=s-1,a=r;a!=null&&++n{var jTe=hC(),GTe=kR(),YTe=Ff();function qTe(r,e,t){for(var i=-1,n=e.length,s={};++i{function JTe(r,e){return r!=null&&e in Object(r)}mX.exports=JTe});var yX=w((VAt,IX)=>{var WTe=Wc(),zTe=ta(),_Te="[object Arguments]";function VTe(r){return zTe(r)&&WTe(r)==_Te}IX.exports=VTe});var dC=w((XAt,wX)=>{var BX=yX(),XTe=ta(),bX=Object.prototype,ZTe=bX.hasOwnProperty,$Te=bX.propertyIsEnumerable,eOe=BX(function(){return arguments}())?BX:function(r){return XTe(r)&&ZTe.call(r,"callee")&&!$Te.call(r,"callee")};wX.exports=eOe});var e0=w((ZAt,QX)=>{var tOe=9007199254740991;function rOe(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=tOe}QX.exports=rOe});var PR=w(($At,SX)=>{var iOe=Ff(),nOe=dC(),sOe=Ks(),oOe=pC(),aOe=e0(),AOe=gu();function lOe(r,e,t){e=iOe(e,r);for(var i=-1,n=e.length,s=!1;++i{var cOe=EX(),uOe=PR();function gOe(r,e){return r!=null&&uOe(r,e,cOe)}vX.exports=gOe});var kX=w((tlt,xX)=>{var fOe=CX(),hOe=DR();function pOe(r,e){return fOe(r,e,function(t,i){return hOe(r,i)})}xX.exports=pOe});var t0=w((rlt,PX)=>{function dOe(r,e){for(var t=-1,i=e.length,n=r.length;++t{var RX=Jc(),COe=dC(),mOe=Ks(),FX=RX?RX.isConcatSpreadable:void 0;function EOe(r){return mOe(r)||COe(r)||!!(FX&&r&&r[FX])}DX.exports=EOe});var OX=w((nlt,LX)=>{var IOe=t0(),yOe=NX();function TX(r,e,t,i,n){var s=-1,o=r.length;for(t||(t=yOe),n||(n=[]);++s0&&t(a)?e>1?TX(a,e-1,t,i,n):IOe(n,a):i||(n[n.length]=a)}return n}LX.exports=TX});var KX=w((slt,MX)=>{var wOe=OX();function BOe(r){var e=r==null?0:r.length;return e?wOe(r,1):[]}MX.exports=BOe});var HX=w((olt,UX)=>{function bOe(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}UX.exports=bOe});var RR=w((alt,jX)=>{var QOe=HX(),GX=Math.max;function SOe(r,e,t){return e=GX(e===void 0?r.length-1:e,0),function(){for(var i=arguments,n=-1,s=GX(i.length-e,0),o=Array(s);++n{function vOe(r){return function(){return r}}YX.exports=vOe});var r0=w((llt,JX)=>{function xOe(r){return r}JX.exports=xOe});var _X=w((clt,WX)=>{var kOe=qX(),zX=xR(),POe=r0(),DOe=zX?function(r,e){return zX(r,"toString",{configurable:!0,enumerable:!1,value:kOe(e),writable:!0})}:POe;WX.exports=DOe});var XX=w((ult,VX)=>{var ROe=800,FOe=16,NOe=Date.now;function LOe(r){var e=0,t=0;return function(){var i=NOe(),n=FOe-(i-t);if(t=i,n>0){if(++e>=ROe)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}VX.exports=LOe});var FR=w((glt,ZX)=>{var TOe=_X(),OOe=XX(),MOe=OOe(TOe);ZX.exports=MOe});var eZ=w((flt,$X)=>{var KOe=KX(),UOe=RR(),HOe=FR();function jOe(r){return HOe(UOe(r,void 0,KOe),r+"")}$X.exports=jOe});var rZ=w((hlt,tZ)=>{var GOe=kX(),YOe=eZ(),qOe=YOe(function(r,e){return r==null?{}:GOe(r,e)});tZ.exports=qOe});var hZ=w((uut,uZ)=>{"use strict";var GR;try{GR=Map}catch(r){}var YR;try{YR=Set}catch(r){}function gZ(r,e,t){if(!r||typeof r!="object"||typeof r=="function")return r;if(r.nodeType&&"cloneNode"in r)return r.cloneNode(!0);if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp)return new RegExp(r);if(Array.isArray(r))return r.map(fZ);if(GR&&r instanceof GR)return new Map(Array.from(r.entries()));if(YR&&r instanceof YR)return new Set(Array.from(r.values()));if(r instanceof Object){e.push(r);var i=Object.create(r);t.push(i);for(var n in r){var s=e.findIndex(function(o){return o===r[n]});i[n]=s>-1?t[s]:gZ(r[n],e,t)}return i}return r}function fZ(r){return gZ(r,[],[])}uZ.exports=fZ});var IC=w(qR=>{"use strict";Object.defineProperty(qR,"__esModule",{value:!0});qR.default=eMe;var tMe=Object.prototype.toString,rMe=Error.prototype.toString,iMe=RegExp.prototype.toString,nMe=typeof Symbol!="undefined"?Symbol.prototype.toString:()=>"",sMe=/^Symbol\((.*)\)(.*)$/;function oMe(r){return r!=+r?"NaN":r===0&&1/r<0?"-0":""+r}function pZ(r,e=!1){if(r==null||r===!0||r===!1)return""+r;let t=typeof r;if(t==="number")return oMe(r);if(t==="string")return e?`"${r}"`:r;if(t==="function")return"[Function "+(r.name||"anonymous")+"]";if(t==="symbol")return nMe.call(r).replace(sMe,"Symbol($1)");let i=tMe.call(r).slice(8,-1);return i==="Date"?isNaN(r.getTime())?""+r:r.toISOString(r):i==="Error"||r instanceof Error?"["+rMe.call(r)+"]":i==="RegExp"?iMe.call(r):null}function eMe(r,e){let t=pZ(r,e);return t!==null?t:JSON.stringify(r,function(i,n){let s=pZ(this[i],e);return s!==null?s:n},2)}});var CA=w(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.default=bi.array=bi.object=bi.boolean=bi.date=bi.number=bi.string=bi.mixed=void 0;var dZ=aMe(IC());function aMe(r){return r&&r.__esModule?r:{default:r}}var CZ={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:r,type:e,value:t,originalValue:i})=>{let n=i!=null&&i!==t,s=`${r} must be a \`${e}\` type, but the final value was: \`${(0,dZ.default)(t,!0)}\``+(n?` (cast from the value \`${(0,dZ.default)(i,!0)}\`).`:".");return t===null&&(s+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),s},defined:"${path} must be defined"};bi.mixed=CZ;var mZ={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"};bi.string=mZ;var EZ={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"};bi.number=EZ;var IZ={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"};bi.date=IZ;var yZ={isValue:"${path} field must be ${value}"};bi.boolean=yZ;var wZ={noUnknown:"${path} field has unspecified keys: ${unknown}"};bi.object=wZ;var BZ={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must be have ${length} items"};bi.array=BZ;var AMe=Object.assign(Object.create(null),{mixed:CZ,string:mZ,number:EZ,date:IZ,object:wZ,array:BZ,boolean:yZ});bi.default=AMe});var QZ=w((hut,bZ)=>{var lMe=Object.prototype,cMe=lMe.hasOwnProperty;function uMe(r,e){return r!=null&&cMe.call(r,e)}bZ.exports=uMe});var yC=w((put,SZ)=>{var gMe=QZ(),fMe=PR();function hMe(r,e){return r!=null&&fMe(r,e,gMe)}SZ.exports=hMe});var Tf=w(o0=>{"use strict";Object.defineProperty(o0,"__esModule",{value:!0});o0.default=void 0;var pMe=r=>r&&r.__isYupSchema__;o0.default=pMe});var kZ=w(a0=>{"use strict";Object.defineProperty(a0,"__esModule",{value:!0});a0.default=void 0;var dMe=vZ(yC()),CMe=vZ(Tf());function vZ(r){return r&&r.__esModule?r:{default:r}}var xZ=class{constructor(e,t){if(this.refs=e,this.refs=e,typeof t=="function"){this.fn=t;return}if(!(0,dMe.default)(t,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:i,then:n,otherwise:s}=t,o=typeof i=="function"?i:(...a)=>a.every(l=>l===i);this.fn=function(...a){let l=a.pop(),c=a.pop(),u=o(...a)?n:s;if(!!u)return typeof u=="function"?u(c):c.concat(u.resolve(l))}}resolve(e,t){let i=this.refs.map(s=>s.getValue(t==null?void 0:t.value,t==null?void 0:t.parent,t==null?void 0:t.context)),n=this.fn.apply(e,i.concat(e,t));if(n===void 0||n===e)return e;if(!(0,CMe.default)(n))throw new TypeError("conditions must return a schema object");return n.resolve(t)}},mMe=xZ;a0.default=mMe});var WR=w(JR=>{"use strict";Object.defineProperty(JR,"__esModule",{value:!0});JR.default=EMe;function EMe(r){return r==null?[]:[].concat(r)}});var fu=w(A0=>{"use strict";Object.defineProperty(A0,"__esModule",{value:!0});A0.default=void 0;var IMe=PZ(IC()),yMe=PZ(WR());function PZ(r){return r&&r.__esModule?r:{default:r}}function zR(){return zR=Object.assign||function(r){for(var e=1;e(0,IMe.default)(t[s])):typeof e=="function"?e(t):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,t,i,n){super();this.name="ValidationError",this.value=t,this.path=i,this.type=n,this.errors=[],this.inner=[],(0,yMe.default)(e).forEach(s=>{wC.isError(s)?(this.errors.push(...s.errors),this.inner=this.inner.concat(s.inner.length?s.inner:s)):this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,wC)}};A0.default=wC});var l0=w(_R=>{"use strict";Object.defineProperty(_R,"__esModule",{value:!0});_R.default=BMe;var VR=bMe(fu());function bMe(r){return r&&r.__esModule?r:{default:r}}var QMe=r=>{let e=!1;return(...t)=>{e||(e=!0,r(...t))}};function BMe(r,e){let{endEarly:t,tests:i,args:n,value:s,errors:o,sort:a,path:l}=r,c=QMe(e),u=i.length,g=[];if(o=o||[],!u)return o.length?c(new VR.default(o,s,l)):c(null,s);for(let f=0;f{function SMe(r){return function(e,t,i){for(var n=-1,s=Object(e),o=i(e),a=o.length;a--;){var l=o[r?a:++n];if(t(s[l],l,s)===!1)break}return e}}DZ.exports=SMe});var XR=w((wut,FZ)=>{var vMe=RZ(),xMe=vMe();FZ.exports=xMe});var LZ=w((But,NZ)=>{function kMe(r,e){for(var t=-1,i=Array(r);++t{function PMe(){return!1}TZ.exports=PMe});var bC=w((BC,Of)=>{var DMe=Ns(),RMe=OZ(),MZ=typeof BC=="object"&&BC&&!BC.nodeType&&BC,KZ=MZ&&typeof Of=="object"&&Of&&!Of.nodeType&&Of,FMe=KZ&&KZ.exports===MZ,UZ=FMe?DMe.Buffer:void 0,NMe=UZ?UZ.isBuffer:void 0,LMe=NMe||RMe;Of.exports=LMe});var jZ=w((Qut,HZ)=>{var TMe=Wc(),OMe=e0(),MMe=ta(),KMe="[object Arguments]",UMe="[object Array]",HMe="[object Boolean]",jMe="[object Date]",GMe="[object Error]",YMe="[object Function]",qMe="[object Map]",JMe="[object Number]",WMe="[object Object]",zMe="[object RegExp]",_Me="[object Set]",VMe="[object String]",XMe="[object WeakMap]",ZMe="[object ArrayBuffer]",$Me="[object DataView]",e1e="[object Float32Array]",t1e="[object Float64Array]",r1e="[object Int8Array]",i1e="[object Int16Array]",n1e="[object Int32Array]",s1e="[object Uint8Array]",o1e="[object Uint8ClampedArray]",a1e="[object Uint16Array]",A1e="[object Uint32Array]",wr={};wr[e1e]=wr[t1e]=wr[r1e]=wr[i1e]=wr[n1e]=wr[s1e]=wr[o1e]=wr[a1e]=wr[A1e]=!0;wr[KMe]=wr[UMe]=wr[ZMe]=wr[HMe]=wr[$Me]=wr[jMe]=wr[GMe]=wr[YMe]=wr[qMe]=wr[JMe]=wr[WMe]=wr[zMe]=wr[_Me]=wr[VMe]=wr[XMe]=!1;function l1e(r){return MMe(r)&&OMe(r.length)&&!!wr[TMe(r)]}HZ.exports=l1e});var c0=w((Sut,GZ)=>{function c1e(r){return function(e){return r(e)}}GZ.exports=c1e});var u0=w((QC,Mf)=>{var u1e=rk(),YZ=typeof QC=="object"&&QC&&!QC.nodeType&&QC,SC=YZ&&typeof Mf=="object"&&Mf&&!Mf.nodeType&&Mf,g1e=SC&&SC.exports===YZ,ZR=g1e&&u1e.process,f1e=function(){try{var r=SC&&SC.require&&SC.require("util").types;return r||ZR&&ZR.binding&&ZR.binding("util")}catch(e){}}();Mf.exports=f1e});var g0=w((vut,qZ)=>{var h1e=jZ(),p1e=c0(),JZ=u0(),WZ=JZ&&JZ.isTypedArray,d1e=WZ?p1e(WZ):h1e;qZ.exports=d1e});var $R=w((xut,zZ)=>{var C1e=LZ(),m1e=dC(),E1e=Ks(),I1e=bC(),y1e=pC(),w1e=g0(),B1e=Object.prototype,b1e=B1e.hasOwnProperty;function Q1e(r,e){var t=E1e(r),i=!t&&m1e(r),n=!t&&!i&&I1e(r),s=!t&&!i&&!n&&w1e(r),o=t||i||n||s,a=o?C1e(r.length,String):[],l=a.length;for(var c in r)(e||b1e.call(r,c))&&!(o&&(c=="length"||n&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||y1e(c,l)))&&a.push(c);return a}zZ.exports=Q1e});var f0=w((kut,_Z)=>{var S1e=Object.prototype;function v1e(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||S1e;return r===t}_Z.exports=v1e});var eF=w((Put,VZ)=>{function x1e(r,e){return function(t){return r(e(t))}}VZ.exports=x1e});var ZZ=w((Dut,XZ)=>{var k1e=eF(),P1e=k1e(Object.keys,Object);XZ.exports=P1e});var e$=w((Rut,$Z)=>{var D1e=f0(),R1e=ZZ(),F1e=Object.prototype,N1e=F1e.hasOwnProperty;function L1e(r){if(!D1e(r))return R1e(r);var e=[];for(var t in Object(r))N1e.call(r,t)&&t!="constructor"&&e.push(t);return e}$Z.exports=L1e});var vC=w((Fut,t$)=>{var T1e=VB(),O1e=e0();function M1e(r){return r!=null&&O1e(r.length)&&!T1e(r)}t$.exports=M1e});var Kf=w((Nut,r$)=>{var K1e=$R(),U1e=e$(),H1e=vC();function j1e(r){return H1e(r)?K1e(r):U1e(r)}r$.exports=j1e});var tF=w((Lut,i$)=>{var G1e=XR(),Y1e=Kf();function q1e(r,e){return r&&G1e(r,e,Y1e)}i$.exports=q1e});var s$=w((Tut,n$)=>{var J1e=gC();function W1e(){this.__data__=new J1e,this.size=0}n$.exports=W1e});var a$=w((Out,o$)=>{function z1e(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}o$.exports=z1e});var l$=w((Mut,A$)=>{function _1e(r){return this.__data__.get(r)}A$.exports=_1e});var u$=w((Kut,c$)=>{function V1e(r){return this.__data__.has(r)}c$.exports=V1e});var f$=w((Uut,g$)=>{var X1e=gC(),Z1e=XB(),$1e=ZB(),eKe=200;function tKe(r,e){var t=this.__data__;if(t instanceof X1e){var i=t.__data__;if(!Z1e||i.length{var rKe=gC(),iKe=s$(),nKe=a$(),sKe=l$(),oKe=u$(),aKe=f$();function Uf(r){var e=this.__data__=new rKe(r);this.size=e.size}Uf.prototype.clear=iKe;Uf.prototype.delete=nKe;Uf.prototype.get=sKe;Uf.prototype.has=oKe;Uf.prototype.set=aKe;h$.exports=Uf});var d$=w((jut,p$)=>{var AKe="__lodash_hash_undefined__";function lKe(r){return this.__data__.set(r,AKe),this}p$.exports=lKe});var m$=w((Gut,C$)=>{function cKe(r){return this.__data__.has(r)}C$.exports=cKe});var I$=w((Yut,E$)=>{var uKe=ZB(),gKe=d$(),fKe=m$();function h0(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new uKe;++e{function hKe(r,e){for(var t=-1,i=r==null?0:r.length;++t{function pKe(r,e){return r.has(e)}B$.exports=pKe});var rF=w((Wut,Q$)=>{var dKe=I$(),CKe=w$(),mKe=b$(),EKe=1,IKe=2;function yKe(r,e,t,i,n,s){var o=t&EKe,a=r.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var c=s.get(r),u=s.get(e);if(c&&u)return c==e&&u==r;var g=-1,f=!0,h=t&IKe?new dKe:void 0;for(s.set(r,e),s.set(e,r);++g{var wKe=Ns(),BKe=wKe.Uint8Array;S$.exports=BKe});var x$=w((_ut,v$)=>{function bKe(r){var e=-1,t=Array(r.size);return r.forEach(function(i,n){t[++e]=[n,i]}),t}v$.exports=bKe});var P$=w((Vut,k$)=>{function QKe(r){var e=-1,t=Array(r.size);return r.forEach(function(i){t[++e]=i}),t}k$.exports=QKe});var L$=w((Xut,D$)=>{var R$=Jc(),F$=iF(),SKe=Pf(),vKe=rF(),xKe=x$(),kKe=P$(),PKe=1,DKe=2,RKe="[object Boolean]",FKe="[object Date]",NKe="[object Error]",LKe="[object Map]",TKe="[object Number]",OKe="[object RegExp]",MKe="[object Set]",KKe="[object String]",UKe="[object Symbol]",HKe="[object ArrayBuffer]",jKe="[object DataView]",N$=R$?R$.prototype:void 0,nF=N$?N$.valueOf:void 0;function GKe(r,e,t,i,n,s,o){switch(t){case jKe:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case HKe:return!(r.byteLength!=e.byteLength||!s(new F$(r),new F$(e)));case RKe:case FKe:case TKe:return SKe(+r,+e);case NKe:return r.name==e.name&&r.message==e.message;case OKe:case KKe:return r==e+"";case LKe:var a=xKe;case MKe:var l=i&PKe;if(a||(a=kKe),r.size!=e.size&&!l)return!1;var c=o.get(r);if(c)return c==e;i|=DKe,o.set(r,e);var u=vKe(a(r),a(e),i,n,s,o);return o.delete(r),u;case UKe:if(nF)return nF.call(r)==nF.call(e)}return!1}D$.exports=GKe});var sF=w((Zut,T$)=>{var YKe=t0(),qKe=Ks();function JKe(r,e,t){var i=e(r);return qKe(r)?i:YKe(i,t(r))}T$.exports=JKe});var M$=w(($ut,O$)=>{function WKe(r,e){for(var t=-1,i=r==null?0:r.length,n=0,s=[];++t{function zKe(){return[]}K$.exports=zKe});var p0=w((tgt,U$)=>{var _Ke=M$(),VKe=oF(),XKe=Object.prototype,ZKe=XKe.propertyIsEnumerable,H$=Object.getOwnPropertySymbols,$Ke=H$?function(r){return r==null?[]:(r=Object(r),_Ke(H$(r),function(e){return ZKe.call(r,e)}))}:VKe;U$.exports=$Ke});var aF=w((rgt,j$)=>{var eUe=sF(),tUe=p0(),rUe=Kf();function iUe(r){return eUe(r,rUe,tUe)}j$.exports=iUe});var q$=w((igt,G$)=>{var Y$=aF(),nUe=1,sUe=Object.prototype,oUe=sUe.hasOwnProperty;function aUe(r,e,t,i,n,s){var o=t&nUe,a=Y$(r),l=a.length,c=Y$(e),u=c.length;if(l!=u&&!o)return!1;for(var g=l;g--;){var f=a[g];if(!(o?f in e:oUe.call(e,f)))return!1}var h=s.get(r),p=s.get(e);if(h&&p)return h==e&&p==r;var m=!0;s.set(r,e),s.set(e,r);for(var y=o;++g{var AUe=Rl(),lUe=Ns(),cUe=AUe(lUe,"DataView");J$.exports=cUe});var _$=w((sgt,z$)=>{var uUe=Rl(),gUe=Ns(),fUe=uUe(gUe,"Promise");z$.exports=fUe});var X$=w((ogt,V$)=>{var hUe=Rl(),pUe=Ns(),dUe=hUe(pUe,"Set");V$.exports=dUe});var $$=w((agt,Z$)=>{var CUe=Rl(),mUe=Ns(),EUe=CUe(mUe,"WeakMap");Z$.exports=EUe});var kC=w((Agt,eee)=>{var AF=W$(),lF=XB(),cF=_$(),uF=X$(),gF=$$(),tee=Wc(),Hf=SR(),ree="[object Map]",IUe="[object Object]",iee="[object Promise]",nee="[object Set]",see="[object WeakMap]",oee="[object DataView]",yUe=Hf(AF),wUe=Hf(lF),BUe=Hf(cF),bUe=Hf(uF),QUe=Hf(gF),hu=tee;(AF&&hu(new AF(new ArrayBuffer(1)))!=oee||lF&&hu(new lF)!=ree||cF&&hu(cF.resolve())!=iee||uF&&hu(new uF)!=nee||gF&&hu(new gF)!=see)&&(hu=function(r){var e=tee(r),t=e==IUe?r.constructor:void 0,i=t?Hf(t):"";if(i)switch(i){case yUe:return oee;case wUe:return ree;case BUe:return iee;case bUe:return nee;case QUe:return see}return e});eee.exports=hu});var hee=w((lgt,aee)=>{var fF=xC(),SUe=rF(),vUe=L$(),xUe=q$(),Aee=kC(),lee=Ks(),cee=bC(),kUe=g0(),PUe=1,uee="[object Arguments]",gee="[object Array]",d0="[object Object]",DUe=Object.prototype,fee=DUe.hasOwnProperty;function RUe(r,e,t,i,n,s){var o=lee(r),a=lee(e),l=o?gee:Aee(r),c=a?gee:Aee(e);l=l==uee?d0:l,c=c==uee?d0:c;var u=l==d0,g=c==d0,f=l==c;if(f&&cee(r)){if(!cee(e))return!1;o=!0,u=!1}if(f&&!u)return s||(s=new fF),o||kUe(r)?SUe(r,e,t,i,n,s):vUe(r,e,l,t,i,n,s);if(!(t&PUe)){var h=u&&fee.call(r,"__wrapped__"),p=g&&fee.call(e,"__wrapped__");if(h||p){var m=h?r.value():r,y=p?e.value():e;return s||(s=new fF),n(m,y,t,i,s)}}return f?(s||(s=new fF),xUe(r,e,t,i,n,s)):!1}aee.exports=RUe});var hF=w((cgt,pee)=>{var FUe=hee(),dee=ta();function Cee(r,e,t,i,n){return r===e?!0:r==null||e==null||!dee(r)&&!dee(e)?r!==r&&e!==e:FUe(r,e,t,i,Cee,n)}pee.exports=Cee});var Eee=w((ugt,mee)=>{var NUe=xC(),LUe=hF(),TUe=1,OUe=2;function MUe(r,e,t,i){var n=t.length,s=n,o=!i;if(r==null)return!s;for(r=Object(r);n--;){var a=t[n];if(o&&a[2]?a[1]!==r[a[0]]:!(a[0]in r))return!1}for(;++n{var KUe=Rn();function UUe(r){return r===r&&!KUe(r)}Iee.exports=UUe});var wee=w((fgt,yee)=>{var HUe=pF(),jUe=Kf();function GUe(r){for(var e=jUe(r),t=e.length;t--;){var i=e[t],n=r[i];e[t]=[i,n,HUe(n)]}return e}yee.exports=GUe});var dF=w((hgt,Bee)=>{function YUe(r,e){return function(t){return t==null?!1:t[r]===e&&(e!==void 0||r in Object(t))}}Bee.exports=YUe});var Qee=w((pgt,bee)=>{var qUe=Eee(),JUe=wee(),WUe=dF();function zUe(r){var e=JUe(r);return e.length==1&&e[0][2]?WUe(e[0][0],e[0][1]):function(t){return t===r||qUe(t,r,e)}}bee.exports=zUe});var C0=w((dgt,See)=>{var _Ue=hC();function VUe(r,e,t){var i=r==null?void 0:_Ue(r,e);return i===void 0?t:i}See.exports=VUe});var xee=w((Cgt,vee)=>{var XUe=hF(),ZUe=C0(),$Ue=DR(),e2e=_B(),t2e=pF(),r2e=dF(),i2e=gu(),n2e=1,s2e=2;function o2e(r,e){return e2e(r)&&t2e(e)?r2e(i2e(r),e):function(t){var i=ZUe(t,r);return i===void 0&&i===e?$Ue(t,r):XUe(e,i,n2e|s2e)}}vee.exports=o2e});var Pee=w((mgt,kee)=>{function a2e(r){return function(e){return e==null?void 0:e[r]}}kee.exports=a2e});var Ree=w((Egt,Dee)=>{var A2e=hC();function l2e(r){return function(e){return A2e(e,r)}}Dee.exports=l2e});var Nee=w((Igt,Fee)=>{var c2e=Pee(),u2e=Ree(),g2e=_B(),f2e=gu();function h2e(r){return g2e(r)?c2e(f2e(r)):u2e(r)}Fee.exports=h2e});var CF=w((ygt,Lee)=>{var p2e=Qee(),d2e=xee(),C2e=r0(),m2e=Ks(),E2e=Nee();function I2e(r){return typeof r=="function"?r:r==null?C2e:typeof r=="object"?m2e(r)?d2e(r[0],r[1]):p2e(r):E2e(r)}Lee.exports=I2e});var mF=w((wgt,Tee)=>{var y2e=Nf(),w2e=tF(),B2e=CF();function b2e(r,e){var t={};return e=B2e(e,3),w2e(r,function(i,n,s){y2e(t,n,e(i,n,s))}),t}Tee.exports=b2e});var PC=w((Bgt,Oee)=>{"use strict";function pu(r){this._maxSize=r,this.clear()}pu.prototype.clear=function(){this._size=0,this._values=Object.create(null)};pu.prototype.get=function(r){return this._values[r]};pu.prototype.set=function(r,e){return this._size>=this._maxSize&&this.clear(),r in this._values||this._size++,this._values[r]=e};var Q2e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Mee=/^\d+$/,S2e=/^\d/,v2e=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,x2e=/^\s*(['"]?)(.*?)(\1)\s*$/,EF=512,Kee=new pu(EF),Uee=new pu(EF),Hee=new pu(EF);Oee.exports={Cache:pu,split:yF,normalizePath:IF,setter:function(r){var e=IF(r);return Uee.get(r)||Uee.set(r,function(i,n){for(var s=0,o=e.length,a=i;s{"use strict";Object.defineProperty(DC,"__esModule",{value:!0});DC.create=F2e;DC.default=void 0;var N2e=PC(),m0={context:"$",value:"."};function F2e(r,e){return new E0(r,e)}var E0=class{constructor(e,t={}){if(typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===m0.context,this.isValue=this.key[0]===m0.value,this.isSibling=!this.isContext&&!this.isValue;let i=this.isContext?m0.context:this.isValue?m0.value:"";this.path=this.key.slice(i.length),this.getter=this.path&&(0,N2e.getter)(this.path,!0),this.map=t.map}getValue(e,t,i){let n=this.isContext?i:this.isValue?e:t;return this.getter&&(n=this.getter(n||{})),this.map&&(n=this.map(n)),n}cast(e,t){return this.getValue(e,t==null?void 0:t.parent,t==null?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}};DC.default=E0;E0.prototype.__isYupRef=!0});var jee=w(BF=>{"use strict";Object.defineProperty(BF,"__esModule",{value:!0});BF.default=L2e;var T2e=bF(mF()),I0=bF(fu()),O2e=bF(du());function bF(r){return r&&r.__esModule?r:{default:r}}function y0(){return y0=Object.assign||function(r){for(var e=1;e=0)&&(t[n]=r[n]);return t}function L2e(r){function e(t,i){let{value:n,path:s="",label:o,options:a,originalValue:l,sync:c}=t,u=M2e(t,["value","path","label","options","originalValue","sync"]),{name:g,test:f,params:h,message:p}=r,{parent:m,context:y}=a;function b(Y){return O2e.default.isRef(Y)?Y.getValue(n,m,y):Y}function v(Y={}){let $=(0,T2e.default)(y0({value:n,originalValue:l,label:o,path:Y.path||s},h,Y.params),b),_=new I0.default(I0.default.formatError(Y.message||p,$),n,$.path,Y.type||g);return _.params=$,_}let x=y0({path:s,parent:m,type:g,createError:v,resolve:b,options:a,originalValue:l},u);if(!c){try{Promise.resolve(f.call(x,n,x)).then(Y=>{I0.default.isError(Y)?i(Y):Y?i(null,Y):i(v())})}catch(Y){i(Y)}return}let T;try{var q;if(T=f.call(x,n,x),typeof((q=T)==null?void 0:q.then)=="function")throw new Error(`Validation test of type: "${x.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(Y){i(Y);return}I0.default.isError(T)?i(T):T?i(null,T):i(v())}return e.OPTIONS=r,e}});var QF=w(RC=>{"use strict";Object.defineProperty(RC,"__esModule",{value:!0});RC.getIn=Gee;RC.default=void 0;var K2e=PC(),U2e=r=>r.substr(0,r.length-1).substr(1);function Gee(r,e,t,i=t){let n,s,o;return e?((0,K2e.forEach)(e,(a,l,c)=>{let u=l?U2e(a):a;if(r=r.resolve({context:i,parent:n,value:t}),r.innerType){let g=c?parseInt(u,10):0;if(t&&g>=t.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${e}. because there is no value at that index. `);n=t,t=t&&t[g],r=r.innerType}if(!c){if(!r.fields||!r.fields[u])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${o} which is a type: "${r._type}")`);n=t,t=t&&t[u],r=r.fields[u]}s=u,o=l?"["+a+"]":"."+a}),{schema:r,parent:n,parentPath:s}):{parent:n,parentPath:e,schema:r}}var H2e=(r,e,t,i)=>Gee(r,e,t,i).schema,j2e=H2e;RC.default=j2e});var qee=w(w0=>{"use strict";Object.defineProperty(w0,"__esModule",{value:!0});w0.default=void 0;var Yee=G2e(du());function G2e(r){return r&&r.__esModule?r:{default:r}}var B0=class{constructor(){this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){let e=[];for(let t of this.list)e.push(t);for(let[,t]of this.refs)e.push(t.describe());return e}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}add(e){Yee.default.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){Yee.default.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}has(e,t){if(this.list.has(e))return!0;let i,n=this.refs.values();for(;i=n.next(),!i.done;)if(t(i.value)===e)return!0;return!1}clone(){let e=new B0;return e.list=new Set(this.list),e.refs=new Map(this.refs),e}merge(e,t){let i=this.clone();return e.list.forEach(n=>i.add(n)),e.refs.forEach(n=>i.add(n)),t.list.forEach(n=>i.delete(n)),t.refs.forEach(n=>i.delete(n)),i}};w0.default=B0});var EA=w(b0=>{"use strict";Object.defineProperty(b0,"__esModule",{value:!0});b0.default=void 0;var Jee=mA(hZ()),jf=CA(),Y2e=mA(kZ()),Wee=mA(l0()),Q0=mA(jee()),zee=mA(IC()),q2e=mA(du()),J2e=QF(),W2e=mA(WR()),_ee=mA(fu()),Vee=mA(qee());function mA(r){return r&&r.__esModule?r:{default:r}}function Js(){return Js=Object.assign||function(r){for(var e=1;e{this.typeError(jf.mixed.notType)}),this.type=(e==null?void 0:e.type)||"mixed",this.spec=Js({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},e==null?void 0:e.spec)}get _type(){return this.type}_typeCheck(e){return!0}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;let t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeError=this._typeError,t._whitelistError=this._whitelistError,t._blacklistError=this._blacklistError,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.exclusiveTests=Js({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=(0,Jee.default)(Js({},this.spec,e)),t}label(e){var t=this.clone();return t.spec.label=e,t}meta(...e){if(e.length===0)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let i=e(this);return this._mutate=t,i}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,i=e.clone(),n=Js({},t.spec,i.spec);return i.spec=n,i._typeError||(i._typeError=t._typeError),i._whitelistError||(i._whitelistError=t._whitelistError),i._blacklistError||(i._blacklistError=t._blacklistError),i._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),i._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),i.tests=t.tests,i.exclusiveTests=t.exclusiveTests,i.withMutation(s=>{e.tests.forEach(o=>{s.test(o.OPTIONS)})}),i}isType(e){return this.spec.nullable&&e===null?!0:this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let i=t.conditions;t=t.clone(),t.conditions=[],t=i.reduce((n,s)=>s.resolve(n,e),t),t=t.resolve(e)}return t}cast(e,t={}){let i=this.resolve(Js({value:e},t)),n=i._cast(e,t);if(e!==void 0&&t.assert!==!1&&i.isType(n)!==!0){let s=(0,zee.default)(e),o=(0,zee.default)(n);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${i._type}". + +attempted value: ${s} +`+(o!==s?`result of cast: ${o}`:""))}return n}_cast(e,t){let i=e===void 0?e:this.transforms.reduce((n,s)=>s.call(this,n,e,this),e);return i===void 0&&(i=this.getDefault()),i}_validate(e,t={},i){let{sync:n,path:s,from:o=[],originalValue:a=e,strict:l=this.spec.strict,abortEarly:c=this.spec.abortEarly}=t,u=e;l||(u=this._cast(u,Js({assert:!1},t)));let g={value:u,path:s,options:t,originalValue:a,schema:this,label:this.spec.label,sync:n,from:o},f=[];this._typeError&&f.push(this._typeError),this._whitelistError&&f.push(this._whitelistError),this._blacklistError&&f.push(this._blacklistError),(0,Wee.default)({args:g,value:u,path:s,sync:n,tests:f,endEarly:c},h=>{if(h)return void i(h,u);(0,Wee.default)({tests:this.tests,args:g,path:s,sync:n,value:u,endEarly:c},i)})}validate(e,t,i){let n=this.resolve(Js({},t,{value:e}));return typeof i=="function"?n._validate(e,t,i):new Promise((s,o)=>n._validate(e,t,(a,l)=>{a?o(a):s(l)}))}validateSync(e,t){let i=this.resolve(Js({},t,{value:e})),n;return i._validate(e,Js({},t,{sync:!0}),(s,o)=>{if(s)throw s;n=o}),n}isValid(e,t){return this.validate(e,t).then(()=>!0,i=>{if(_ee.default.isError(i))return!1;throw i})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(i){if(_ee.default.isError(i))return!1;throw i}}_getDefault(){let e=this.spec.default;return e==null?e:typeof e=="function"?e.call(this):(0,Jee.default)(e)}getDefault(e){return this.resolve(e||{})._getDefault()}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){var t=this.clone();return t.spec.strict=e,t}_isPresent(e){return e!=null}defined(e=jf.mixed.defined){return this.test({message:e,name:"defined",exclusive:!0,test(t){return t!==void 0}})}required(e=jf.mixed.required){return this.clone({presence:"required"}).withMutation(t=>t.test({message:e,name:"required",exclusive:!0,test(i){return this.schema._isPresent(i)}}))}notRequired(){var e=this.clone({presence:"optional"});return e.tests=e.tests.filter(t=>t.OPTIONS.name!=="required"),e}nullable(e=!0){var t=this.clone({nullable:e!==!1});return t}transform(e){var t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(e.length===1?typeof e[0]=="function"?t={test:e[0]}:t=e[0]:e.length===2?t={name:e[0],test:e[1]}:t={name:e[0],message:e[1],test:e[2]},t.message===void 0&&(t.message=jf.mixed.default),typeof t.test!="function")throw new TypeError("`test` is a required parameters");let i=this.clone(),n=(0,Q0.default)(t),s=t.exclusive||t.name&&i.exclusiveTests[t.name]===!0;if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(i.exclusiveTests[t.name]=!!t.exclusive),i.tests=i.tests.filter(o=>!(o.OPTIONS.name===t.name&&(s||o.OPTIONS.test===n.OPTIONS.test))),i.tests.push(n),i}when(e,t){!Array.isArray(e)&&typeof e!="string"&&(t=e,e=".");let i=this.clone(),n=(0,W2e.default)(e).map(s=>new q2e.default(s));return n.forEach(s=>{s.isSibling&&i.deps.push(s.key)}),i.conditions.push(new Y2e.default(n,t)),i}typeError(e){var t=this.clone();return t._typeError=(0,Q0.default)({message:e,name:"typeError",test(i){return i!==void 0&&!this.schema.isType(i)?this.createError({params:{type:this.schema._type}}):!0}}),t}oneOf(e,t=jf.mixed.oneOf){var i=this.clone();return e.forEach(n=>{i._whitelist.add(n),i._blacklist.delete(n)}),i._whitelistError=(0,Q0.default)({message:t,name:"oneOf",test(n){if(n===void 0)return!0;let s=this.schema._whitelist;return s.has(n,this.resolve)?!0:this.createError({params:{values:s.toArray().join(", ")}})}}),i}notOneOf(e,t=jf.mixed.notOneOf){var i=this.clone();return e.forEach(n=>{i._blacklist.add(n),i._whitelist.delete(n)}),i._blacklistError=(0,Q0.default)({message:t,name:"notOneOf",test(n){let s=this.schema._blacklist;return s.has(n,this.resolve)?this.createError({params:{values:s.toArray().join(", ")}}):!0}}),i}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(){let e=this.clone(),{label:t,meta:i}=e.spec;return{meta:i,label:t,type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(s=>({name:s.OPTIONS.name,params:s.OPTIONS.params})).filter((s,o,a)=>a.findIndex(l=>l.name===s.name)===o)}}};b0.default=ua;ua.prototype.__isYupSchema__=!0;for(let r of["validate","validateSync"])ua.prototype[`${r}At`]=function(e,t,i={}){let{parent:n,parentPath:s,schema:o}=(0,J2e.getIn)(this,e,t,i.context);return o[r](n&&n[s],Js({},i,{parent:n,path:e}))};for(let r of["equals","is"])ua.prototype[r]=ua.prototype.oneOf;for(let r of["not","nope"])ua.prototype[r]=ua.prototype.notOneOf;ua.prototype.optional=ua.prototype.notRequired});var Zee=w(FC=>{"use strict";Object.defineProperty(FC,"__esModule",{value:!0});FC.create=Xee;FC.default=void 0;var _2e=z2e(EA());function z2e(r){return r&&r.__esModule?r:{default:r}}var SF=_2e.default,V2e=SF;FC.default=V2e;function Xee(){return new SF}Xee.prototype=SF.prototype});var Gf=w(S0=>{"use strict";Object.defineProperty(S0,"__esModule",{value:!0});S0.default=void 0;var X2e=r=>r==null;S0.default=X2e});var ite=w(NC=>{"use strict";Object.defineProperty(NC,"__esModule",{value:!0});NC.create=$ee;NC.default=void 0;var Z2e=ete(EA()),tte=CA(),rte=ete(Gf());function ete(r){return r&&r.__esModule?r:{default:r}}function $ee(){return new v0}var v0=class extends Z2e.default{constructor(){super({type:"boolean"});this.withMutation(()=>{this.transform(function(e){if(!this.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}_typeCheck(e){return e instanceof Boolean&&(e=e.valueOf()),typeof e=="boolean"}isTrue(e=tte.boolean.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test(t){return(0,rte.default)(t)||t===!0}})}isFalse(e=tte.boolean.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test(t){return(0,rte.default)(t)||t===!1}})}};NC.default=v0;$ee.prototype=v0.prototype});var ote=w(LC=>{"use strict";Object.defineProperty(LC,"__esModule",{value:!0});LC.create=nte;LC.default=void 0;var ga=CA(),IA=ste(Gf()),$2e=ste(EA());function ste(r){return r&&r.__esModule?r:{default:r}}var eHe=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,tHe=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,rHe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,iHe=r=>(0,IA.default)(r)||r===r.trim(),nHe={}.toString();function nte(){return new x0}var x0=class extends $2e.default{constructor(){super({type:"string"});this.withMutation(()=>{this.transform(function(e){if(this.isType(e)||Array.isArray(e))return e;let t=e!=null&&e.toString?e.toString():e;return t===nHe?e:t})})}_typeCheck(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}_isPresent(e){return super._isPresent(e)&&!!e.length}length(e,t=ga.string.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(i){return(0,IA.default)(i)||i.length===this.resolve(e)}})}min(e,t=ga.string.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(i){return(0,IA.default)(i)||i.length>=this.resolve(e)}})}max(e,t=ga.string.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},test(i){return(0,IA.default)(i)||i.length<=this.resolve(e)}})}matches(e,t){let i=!1,n,s;return t&&(typeof t=="object"?{excludeEmptyString:i=!1,message:n,name:s}=t:n=t),this.test({name:s||"matches",message:n||ga.string.matches,params:{regex:e},test:o=>(0,IA.default)(o)||o===""&&i||o.search(e)!==-1})}email(e=ga.string.email){return this.matches(eHe,{name:"email",message:e,excludeEmptyString:!0})}url(e=ga.string.url){return this.matches(tHe,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=ga.string.uuid){return this.matches(rHe,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=ga.string.trim){return this.transform(t=>t!=null?t.trim():t).test({message:e,name:"trim",test:iHe})}lowercase(e=ga.string.lowercase){return this.transform(t=>(0,IA.default)(t)?t:t.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,test:t=>(0,IA.default)(t)||t===t.toLowerCase()})}uppercase(e=ga.string.uppercase){return this.transform(t=>(0,IA.default)(t)?t:t.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,test:t=>(0,IA.default)(t)||t===t.toUpperCase()})}};LC.default=x0;nte.prototype=x0.prototype});var lte=w(TC=>{"use strict";Object.defineProperty(TC,"__esModule",{value:!0});TC.create=ate;TC.default=void 0;var Cu=CA(),mu=Ate(Gf()),sHe=Ate(EA());function Ate(r){return r&&r.__esModule?r:{default:r}}var oHe=r=>r!=+r;function ate(){return new k0}var k0=class extends sHe.default{constructor(){super({type:"number"});this.withMutation(()=>{this.transform(function(e){let t=e;if(typeof t=="string"){if(t=t.replace(/\s/g,""),t==="")return NaN;t=+t}return this.isType(t)?t:parseFloat(t)})})}_typeCheck(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!oHe(e)}min(e,t=Cu.number.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(i){return(0,mu.default)(i)||i>=this.resolve(e)}})}max(e,t=Cu.number.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(i){return(0,mu.default)(i)||i<=this.resolve(e)}})}lessThan(e,t=Cu.number.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},test(i){return(0,mu.default)(i)||ithis.resolve(e)}})}positive(e=Cu.number.positive){return this.moreThan(0,e)}negative(e=Cu.number.negative){return this.lessThan(0,e)}integer(e=Cu.number.integer){return this.test({name:"integer",message:e,test:t=>(0,mu.default)(t)||Number.isInteger(t)})}truncate(){return this.transform(e=>(0,mu.default)(e)?e:e|0)}round(e){var t,i=["ceil","floor","round","trunc"];if(e=((t=e)==null?void 0:t.toLowerCase())||"round",e==="trunc")return this.truncate();if(i.indexOf(e.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+i.join(", "));return this.transform(n=>(0,mu.default)(n)?n:Math[e](n))}};TC.default=k0;ate.prototype=k0.prototype});var cte=w(vF=>{"use strict";Object.defineProperty(vF,"__esModule",{value:!0});vF.default=aHe;var AHe=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;function aHe(r){var e=[1,4,5,6,7,10,11],t=0,i,n;if(n=AHe.exec(r)){for(var s=0,o;o=e[s];++s)n[o]=+n[o]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,(n[8]===void 0||n[8]==="")&&(n[9]===void 0||n[9]==="")?i=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7]):(n[8]!=="Z"&&n[9]!==void 0&&(t=n[10]*60+n[11],n[9]==="+"&&(t=0-t)),i=Date.UTC(n[1],n[2],n[3],n[4],n[5]+t,n[6],n[7]))}else i=Date.parse?Date.parse(r):NaN;return i}});var fte=w(OC=>{"use strict";Object.defineProperty(OC,"__esModule",{value:!0});OC.create=xF;OC.default=void 0;var lHe=P0(cte()),ute=CA(),gte=P0(Gf()),cHe=P0(du()),uHe=P0(EA());function P0(r){return r&&r.__esModule?r:{default:r}}var kF=new Date(""),gHe=r=>Object.prototype.toString.call(r)==="[object Date]";function xF(){return new MC}var MC=class extends uHe.default{constructor(){super({type:"date"});this.withMutation(()=>{this.transform(function(e){return this.isType(e)?e:(e=(0,lHe.default)(e),isNaN(e)?kF:new Date(e))})})}_typeCheck(e){return gHe(e)&&!isNaN(e.getTime())}prepareParam(e,t){let i;if(cHe.default.isRef(e))i=e;else{let n=this.cast(e);if(!this._typeCheck(n))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);i=n}return i}min(e,t=ute.date.min){let i=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(n){return(0,gte.default)(n)||n>=this.resolve(i)}})}max(e,t=ute.date.max){var i=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(n){return(0,gte.default)(n)||n<=this.resolve(i)}})}};OC.default=MC;MC.INVALID_DATE=kF;xF.prototype=MC.prototype;xF.INVALID_DATE=kF});var pte=w((Tgt,hte)=>{function fHe(r,e,t,i){var n=-1,s=r==null?0:r.length;for(i&&s&&(t=r[++n]);++n{function hHe(r){return function(e){return r==null?void 0:r[e]}}dte.exports=hHe});var Ete=w((Mgt,mte)=>{var pHe=Cte(),dHe={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},CHe=pHe(dHe);mte.exports=CHe});var yte=w((Kgt,Ite)=>{var mHe=Ete(),EHe=lf(),IHe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,yHe="\\u0300-\\u036f",wHe="\\ufe20-\\ufe2f",BHe="\\u20d0-\\u20ff",bHe=yHe+wHe+BHe,QHe="["+bHe+"]",SHe=RegExp(QHe,"g");function vHe(r){return r=EHe(r),r&&r.replace(IHe,mHe).replace(SHe,"")}Ite.exports=vHe});var Bte=w((Ugt,wte)=>{var xHe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function kHe(r){return r.match(xHe)||[]}wte.exports=kHe});var Qte=w((Hgt,bte)=>{var PHe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function DHe(r){return PHe.test(r)}bte.exports=DHe});var Yte=w((jgt,Ste)=>{var vte="\\ud800-\\udfff",RHe="\\u0300-\\u036f",FHe="\\ufe20-\\ufe2f",NHe="\\u20d0-\\u20ff",LHe=RHe+FHe+NHe,xte="\\u2700-\\u27bf",kte="a-z\\xdf-\\xf6\\xf8-\\xff",THe="\\xac\\xb1\\xd7\\xf7",OHe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",MHe="\\u2000-\\u206f",KHe=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pte="A-Z\\xc0-\\xd6\\xd8-\\xde",UHe="\\ufe0e\\ufe0f",Dte=THe+OHe+MHe+KHe,Rte="['\u2019]",Fte="["+Dte+"]",HHe="["+LHe+"]",Nte="\\d+",jHe="["+xte+"]",Lte="["+kte+"]",Tte="[^"+vte+Dte+Nte+xte+kte+Pte+"]",GHe="\\ud83c[\\udffb-\\udfff]",YHe="(?:"+HHe+"|"+GHe+")",qHe="[^"+vte+"]",Ote="(?:\\ud83c[\\udde6-\\uddff]){2}",Mte="[\\ud800-\\udbff][\\udc00-\\udfff]",Yf="["+Pte+"]",JHe="\\u200d",Kte="(?:"+Lte+"|"+Tte+")",WHe="(?:"+Yf+"|"+Tte+")",Ute="(?:"+Rte+"(?:d|ll|m|re|s|t|ve))?",Hte="(?:"+Rte+"(?:D|LL|M|RE|S|T|VE))?",jte=YHe+"?",Gte="["+UHe+"]?",zHe="(?:"+JHe+"(?:"+[qHe,Ote,Mte].join("|")+")"+Gte+jte+")*",_He="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",VHe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",XHe=Gte+jte+zHe,ZHe="(?:"+[jHe,Ote,Mte].join("|")+")"+XHe,$He=RegExp([Yf+"?"+Lte+"+"+Ute+"(?="+[Fte,Yf,"$"].join("|")+")",WHe+"+"+Hte+"(?="+[Fte,Yf+Kte,"$"].join("|")+")",Yf+"?"+Kte+"+"+Ute,Yf+"+"+Hte,VHe,_He,Nte,ZHe].join("|"),"g");function eje(r){return r.match($He)||[]}Ste.exports=eje});var Jte=w((Ggt,qte)=>{var tje=Bte(),rje=Qte(),ije=lf(),nje=Yte();function sje(r,e,t){return r=ije(r),e=t?void 0:e,e===void 0?rje(r)?nje(r):tje(r):r.match(e)||[]}qte.exports=sje});var PF=w((Ygt,Wte)=>{var oje=pte(),aje=yte(),Aje=Jte(),lje="['\u2019]",cje=RegExp(lje,"g");function uje(r){return function(e){return oje(Aje(aje(e).replace(cje,"")),r,"")}}Wte.exports=uje});var _te=w((qgt,zte)=>{var gje=PF(),fje=gje(function(r,e,t){return r+(t?"_":"")+e.toLowerCase()});zte.exports=fje});var Xte=w((Jgt,Vte)=>{var hje=Zw(),pje=PF(),dje=pje(function(r,e,t){return e=e.toLowerCase(),r+(t?hje(e):e)});Vte.exports=dje});var $te=w((Wgt,Zte)=>{var Cje=Nf(),mje=tF(),Eje=CF();function Ije(r,e){var t={};return e=Eje(e,3),mje(r,function(i,n,s){Cje(t,e(i,n,s),i)}),t}Zte.exports=Ije});var tre=w((zgt,DF)=>{DF.exports=function(r){return ere(yje(r),r)};DF.exports.array=ere;function ere(r,e){var t=r.length,i=new Array(t),n={},s=t,o=wje(e),a=Bje(r);for(e.forEach(function(c){if(!a.has(c[0])||!a.has(c[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)n[s]||l(r[s],s,new Set);return i;function l(c,u,g){if(g.has(c)){var f;try{f=", node was:"+JSON.stringify(c)}catch(m){f=""}throw new Error("Cyclic dependency"+f)}if(!a.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!n[u]){n[u]=!0;var h=o.get(c)||new Set;if(h=Array.from(h),u=h.length){g.add(c);do{var p=h[--u];l(p,a.get(p),g)}while(u);g.delete(c)}i[--t]=c}}}function yje(r){for(var e=new Set,t=0,i=r.length;t{"use strict";Object.defineProperty(RF,"__esModule",{value:!0});RF.default=bje;var Qje=D0(yC()),Sje=D0(tre()),vje=PC(),xje=D0(du()),kje=D0(Tf());function D0(r){return r&&r.__esModule?r:{default:r}}function bje(r,e=[]){let t=[],i=[];function n(s,o){var a=(0,vje.split)(s)[0];~i.indexOf(a)||i.push(a),~e.indexOf(`${o}-${a}`)||t.push([o,a])}for(let s in r)if((0,Qje.default)(r,s)){let o=r[s];~i.indexOf(s)||i.push(s),xje.default.isRef(o)&&o.isSibling?n(o.path,s):(0,kje.default)(o)&&"deps"in o&&o.deps.forEach(a=>n(a,s))}return Sje.default.array(i,t).reverse()}});var nre=w(FF=>{"use strict";Object.defineProperty(FF,"__esModule",{value:!0});FF.default=Pje;function ire(r,e){let t=Infinity;return r.some((i,n)=>{var s;if(((s=e.path)==null?void 0:s.indexOf(i))!==-1)return t=n,!0}),t}function Pje(r){return(e,t)=>ire(r,e)-ire(r,t)}});var ure=w(KC=>{"use strict";Object.defineProperty(KC,"__esModule",{value:!0});KC.create=sre;KC.default=void 0;var ore=fa(yC()),are=fa(_te()),Dje=fa(Xte()),Rje=fa($te()),Fje=fa(mF()),Nje=PC(),Are=CA(),Lje=fa(rre()),lre=fa(nre()),Tje=fa(l0()),Oje=fa(fu()),NF=fa(EA());function fa(r){return r&&r.__esModule?r:{default:r}}function qf(){return qf=Object.assign||function(r){for(var e=1;eObject.prototype.toString.call(r)==="[object Object]";function Mje(r,e){let t=Object.keys(r.fields);return Object.keys(e).filter(i=>t.indexOf(i)===-1)}var Kje=(0,lre.default)([]),R0=class extends NF.default{constructor(e){super({type:"object"});this.fields=Object.create(null),this._sortErrors=Kje,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(i){if(typeof i=="string")try{i=JSON.parse(i)}catch(n){i=null}return this.isType(i)?i:null}),e&&this.shape(e)})}_typeCheck(e){return cre(e)||typeof e=="function"}_cast(e,t={}){var i;let n=super._cast(e,t);if(n===void 0)return this.getDefault();if(!this._typeCheck(n))return n;let s=this.fields,o=(i=t.stripUnknown)!=null?i:this.spec.noUnknown,a=this._nodes.concat(Object.keys(n).filter(g=>this._nodes.indexOf(g)===-1)),l={},c=qf({},t,{parent:l,__validating:t.__validating||!1}),u=!1;for(let g of a){let f=s[g],h=(0,ore.default)(n,g);if(f){let p,m=n[g];c.path=(t.path?`${t.path}.`:"")+g,f=f.resolve({value:m,context:t.context,parent:l});let y="spec"in f?f.spec:void 0,b=y==null?void 0:y.strict;if(y==null?void 0:y.strip){u=u||g in n;continue}p=!t.__validating||!b?f.cast(n[g],c):n[g],p!==void 0&&(l[g]=p)}else h&&!o&&(l[g]=n[g]);l[g]!==n[g]&&(u=!0)}return u?l:n}_validate(e,t={},i){let n=[],{sync:s,from:o=[],originalValue:a=e,abortEarly:l=this.spec.abortEarly,recursive:c=this.spec.recursive}=t;o=[{schema:this,value:a},...o],t.__validating=!0,t.originalValue=a,t.from=o,super._validate(e,t,(u,g)=>{if(u){if(!Oje.default.isError(u)||l)return void i(u,g);n.push(u)}if(!c||!cre(g)){i(n[0]||null,g);return}a=a||g;let f=this._nodes.map(h=>(p,m)=>{let y=h.indexOf(".")===-1?(t.path?`${t.path}.`:"")+h:`${t.path||""}["${h}"]`,b=this.fields[h];if(b&&"validate"in b){b.validate(g[h],qf({},t,{path:y,from:o,strict:!0,parent:g,originalValue:a[h]}),m);return}m(null)});(0,Tje.default)({sync:s,tests:f,value:g,errors:n,endEarly:l,sort:this._sortErrors,path:t.path},i)})}clone(e){let t=super.clone(e);return t.fields=qf({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),i=t.fields;for(let[n,s]of Object.entries(this.fields)){let o=i[n];o===void 0?i[n]=s:o instanceof NF.default&&s instanceof NF.default&&(i[n]=s.concat(o))}return t.withMutation(()=>t.shape(i))}getDefaultFromShape(){let e={};return this._nodes.forEach(t=>{let i=this.fields[t];e[t]="default"in i?i.getDefault():void 0}),e}_getDefault(){if("default"in this.spec)return super._getDefault();if(!!this._nodes.length)return this.getDefaultFromShape()}shape(e,t=[]){let i=this.clone(),n=Object.assign(i.fields,e);if(i.fields=n,i._sortErrors=(0,lre.default)(Object.keys(n)),t.length){Array.isArray(t[0])||(t=[t]);let s=t.map(([o,a])=>`${o}-${a}`);i._excludedEdges=i._excludedEdges.concat(s)}return i._nodes=(0,Lje.default)(n,i._excludedEdges),i}pick(e){let t={};for(let i of e)this.fields[i]&&(t[i]=this.fields[i]);return this.clone().withMutation(i=>(i.fields={},i.shape(t)))}omit(e){let t=this.clone(),i=t.fields;t.fields={};for(let n of e)delete i[n];return t.withMutation(()=>t.shape(i))}from(e,t,i){let n=(0,Nje.getter)(e,!0);return this.transform(s=>{if(s==null)return s;let o=s;return(0,ore.default)(s,e)&&(o=qf({},s),i||delete o[e],o[t]=n(s)),o})}noUnknown(e=!0,t=Are.object.noUnknown){typeof e=="string"&&(t=e,e=!0);let i=this.test({name:"noUnknown",exclusive:!0,message:t,test(n){if(n==null)return!0;let s=Mje(this.schema,n);return!e||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return i.spec.noUnknown=e,i}unknown(e=!0,t=Are.object.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>t&&(0,Rje.default)(t,(i,n)=>e(n)))}camelCase(){return this.transformKeys(Dje.default)}snakeCase(){return this.transformKeys(are.default)}constantCase(){return this.transformKeys(e=>(0,are.default)(e).toUpperCase())}describe(){let e=super.describe();return e.fields=(0,Fje.default)(this.fields,t=>t.describe()),e}};KC.default=R0;function sre(r){return new R0(r)}sre.prototype=R0.prototype});var fre=w(UC=>{"use strict";Object.defineProperty(UC,"__esModule",{value:!0});UC.create=gre;UC.default=void 0;var LF=Jf(Gf()),Uje=Jf(Tf()),Hje=Jf(IC()),TF=CA(),jje=Jf(l0()),Gje=Jf(fu()),Yje=Jf(EA());function Jf(r){return r&&r.__esModule?r:{default:r}}function F0(){return F0=Object.assign||function(r){for(var e=1;e{this.transform(function(t){if(typeof t=="string")try{t=JSON.parse(t)}catch(i){t=null}return this.isType(t)?t:null})})}_typeCheck(e){return Array.isArray(e)}get _subType(){return this.innerType}_cast(e,t){let i=super._cast(e,t);if(!this._typeCheck(i)||!this.innerType)return i;let n=!1,s=i.map((o,a)=>{let l=this.innerType.cast(o,F0({},t,{path:`${t.path||""}[${a}]`}));return l!==o&&(n=!0),l});return n?s:i}_validate(e,t={},i){var n,s;let o=[],a=t.sync,l=t.path,c=this.innerType,u=(n=t.abortEarly)!=null?n:this.spec.abortEarly,g=(s=t.recursive)!=null?s:this.spec.recursive,f=t.originalValue!=null?t.originalValue:e;super._validate(e,t,(h,p)=>{if(h){if(!Gje.default.isError(h)||u)return void i(h,p);o.push(h)}if(!g||!c||!this._typeCheck(p)){i(o[0]||null,p);return}f=f||p;let m=new Array(p.length);for(let y=0;yc.validate(b,x,q)}(0,jje.default)({sync:a,path:l,value:p,errors:o,endEarly:u,tests:m},i)})}clone(e){let t=super.clone(e);return t.innerType=this.innerType,t}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!(0,Uje.default)(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+(0,Hje.default)(e));return t.innerType=e,t}length(e,t=TF.array.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(i){return(0,LF.default)(i)||i.length===this.resolve(e)}})}min(e,t){return t=t||TF.array.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(i){return(0,LF.default)(i)||i.length>=this.resolve(e)}})}max(e,t){return t=t||TF.array.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(i){return(0,LF.default)(i)||i.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:t==null?[]:[].concat(t))}compact(e){let t=e?(i,n,s)=>!e(i,n,s):i=>!!i;return this.transform(i=>i!=null?i.filter(t):i)}describe(){let e=super.describe();return this.innerType&&(e.innerType=this.innerType.describe()),e}nullable(e=!0){return super.nullable(e)}defined(){return super.defined()}required(e){return super.required(e)}};UC.default=N0;gre.prototype=N0.prototype});var hre=w(HC=>{"use strict";Object.defineProperty(HC,"__esModule",{value:!0});HC.create=qje;HC.default=void 0;var Wje=Jje(Tf());function Jje(r){return r&&r.__esModule?r:{default:r}}function qje(r){return new OF(r)}var OF=class{constructor(e){this.type="lazy",this.__isYupSchema__=!0,this._resolve=(t,i={})=>{let n=this.builder(t,i);if(!(0,Wje.default)(n))throw new TypeError("lazy() functions must return a valid schema");return n.resolve(i)},this.builder=e}resolve(e){return this._resolve(e.value,e)}cast(e,t){return this._resolve(e,t).cast(e,t)}validate(e,t,i){return this._resolve(e,t).validate(e,t,i)}validateSync(e,t){return this._resolve(e,t).validateSync(e,t)}validateAt(e,t,i){return this._resolve(t,i).validateAt(e,t,i)}validateSyncAt(e,t,i){return this._resolve(t,i).validateSyncAt(e,t,i)}describe(){return null}isValid(e,t){return this._resolve(e,t).isValid(e,t)}isValidSync(e,t){return this._resolve(e,t).isValidSync(e,t)}},zje=OF;HC.default=zje});var pre=w(MF=>{"use strict";Object.defineProperty(MF,"__esModule",{value:!0});MF.default=_je;var Xje=Vje(CA());function Vje(r){return r&&r.__esModule?r:{default:r}}function _je(r){Object.keys(r).forEach(e=>{Object.keys(r[e]).forEach(t=>{Xje.default[e][t]=r[e][t]})})}});var UF=w(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.addMethod=Zje;Object.defineProperty(Br,"MixedSchema",{enumerable:!0,get:function(){return dre.default}});Object.defineProperty(Br,"mixed",{enumerable:!0,get:function(){return dre.create}});Object.defineProperty(Br,"BooleanSchema",{enumerable:!0,get:function(){return KF.default}});Object.defineProperty(Br,"bool",{enumerable:!0,get:function(){return KF.create}});Object.defineProperty(Br,"boolean",{enumerable:!0,get:function(){return KF.create}});Object.defineProperty(Br,"StringSchema",{enumerable:!0,get:function(){return Cre.default}});Object.defineProperty(Br,"string",{enumerable:!0,get:function(){return Cre.create}});Object.defineProperty(Br,"NumberSchema",{enumerable:!0,get:function(){return mre.default}});Object.defineProperty(Br,"number",{enumerable:!0,get:function(){return mre.create}});Object.defineProperty(Br,"DateSchema",{enumerable:!0,get:function(){return Ere.default}});Object.defineProperty(Br,"date",{enumerable:!0,get:function(){return Ere.create}});Object.defineProperty(Br,"ObjectSchema",{enumerable:!0,get:function(){return Ire.default}});Object.defineProperty(Br,"object",{enumerable:!0,get:function(){return Ire.create}});Object.defineProperty(Br,"ArraySchema",{enumerable:!0,get:function(){return yre.default}});Object.defineProperty(Br,"array",{enumerable:!0,get:function(){return yre.create}});Object.defineProperty(Br,"ref",{enumerable:!0,get:function(){return $je.create}});Object.defineProperty(Br,"lazy",{enumerable:!0,get:function(){return eGe.create}});Object.defineProperty(Br,"ValidationError",{enumerable:!0,get:function(){return tGe.default}});Object.defineProperty(Br,"reach",{enumerable:!0,get:function(){return rGe.default}});Object.defineProperty(Br,"isSchema",{enumerable:!0,get:function(){return wre.default}});Object.defineProperty(Br,"setLocale",{enumerable:!0,get:function(){return iGe.default}});Object.defineProperty(Br,"BaseSchema",{enumerable:!0,get:function(){return nGe.default}});var dre=Eu(Zee()),KF=Eu(ite()),Cre=Eu(ote()),mre=Eu(lte()),Ere=Eu(fte()),Ire=Eu(ure()),yre=Eu(fre()),$je=du(),eGe=hre(),tGe=jC(fu()),rGe=jC(QF()),wre=jC(Tf()),iGe=jC(pre()),nGe=jC(EA());function jC(r){return r&&r.__esModule?r:{default:r}}function Bre(){if(typeof WeakMap!="function")return null;var r=new WeakMap;return Bre=function(){return r},r}function Eu(r){if(r&&r.__esModule)return r;if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var e=Bre();if(e&&e.has(r))return e.get(r);var t={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){var s=i?Object.getOwnPropertyDescriptor(r,n):null;s&&(s.get||s.set)?Object.defineProperty(t,n,s):t[n]=r[n]}return t.default=r,e&&e.set(r,t),t}function Zje(r,e,t){if(!r||!(0,wre.default)(r.prototype))throw new TypeError("You must provide a yup schema constructor function");if(typeof e!="string")throw new TypeError("A Method name must be provided");if(typeof t!="function")throw new TypeError("Method function must be provided");r.prototype[e]=t}});var xre=w((hft,YC)=>{"use strict";var aGe=process.env.TERM_PROGRAM==="Hyper",AGe=process.platform==="win32",Qre=process.platform==="linux",HF={ballotDisabled:"\u2612",ballotOff:"\u2610",ballotOn:"\u2611",bullet:"\u2022",bulletWhite:"\u25E6",fullBlock:"\u2588",heart:"\u2764",identicalTo:"\u2261",line:"\u2500",mark:"\u203B",middot:"\xB7",minus:"\uFF0D",multiplication:"\xD7",obelus:"\xF7",pencilDownRight:"\u270E",pencilRight:"\u270F",pencilUpRight:"\u2710",percent:"%",pilcrow2:"\u2761",pilcrow:"\xB6",plusMinus:"\xB1",section:"\xA7",starsOff:"\u2606",starsOn:"\u2605",upDownArrow:"\u2195"},Sre=Object.assign({},HF,{check:"\u221A",cross:"\xD7",ellipsisLarge:"...",ellipsis:"...",info:"i",question:"?",questionSmall:"?",pointer:">",pointerSmall:"\xBB",radioOff:"( )",radioOn:"(*)",warning:"\u203C"}),vre=Object.assign({},HF,{ballotCross:"\u2718",check:"\u2714",cross:"\u2716",ellipsisLarge:"\u22EF",ellipsis:"\u2026",info:"\u2139",question:"?",questionFull:"\uFF1F",questionSmall:"\uFE56",pointer:Qre?"\u25B8":"\u276F",pointerSmall:Qre?"\u2023":"\u203A",radioOff:"\u25EF",radioOn:"\u25C9",warning:"\u26A0"});YC.exports=AGe&&!aGe?Sre:vre;Reflect.defineProperty(YC.exports,"common",{enumerable:!1,value:HF});Reflect.defineProperty(YC.exports,"windows",{enumerable:!1,value:Sre});Reflect.defineProperty(YC.exports,"other",{enumerable:!1,value:vre})});var Eo=w((pft,jF)=>{"use strict";var lGe=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),cGe=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,kre=()=>{let r={enabled:!0,visible:!0,styles:{},keys:{}};"FORCE_COLOR"in process.env&&(r.enabled=process.env.FORCE_COLOR!=="0");let e=s=>{let o=s.open=`[${s.codes[0]}m`,a=s.close=`[${s.codes[1]}m`,l=s.regex=new RegExp(`\\u001b\\[${s.codes[1]}m`,"g");return s.wrap=(c,u)=>{c.includes(a)&&(c=c.replace(l,a+o));let g=o+c+a;return u?g.replace(/\r*\n/g,`${a}$&${o}`):g},s},t=(s,o,a)=>typeof s=="function"?s(o):s.wrap(o,a),i=(s,o)=>{if(s===""||s==null)return"";if(r.enabled===!1)return s;if(r.visible===!1)return"";let a=""+s,l=a.includes(` +`),c=o.length;for(c>0&&o.includes("unstyle")&&(o=[...new Set(["unstyle",...o])].reverse());c-- >0;)a=t(r.styles[o[c]],a,l);return a},n=(s,o,a)=>{r.styles[s]=e({name:s,codes:o}),(r.keys[a]||(r.keys[a]=[])).push(s),Reflect.defineProperty(r,s,{configurable:!0,enumerable:!0,set(c){r.alias(s,c)},get(){let c=u=>i(u,c.stack);return Reflect.setPrototypeOf(c,r),c.stack=this.stack?this.stack.concat(s):[s],c}})};return n("reset",[0,0],"modifier"),n("bold",[1,22],"modifier"),n("dim",[2,22],"modifier"),n("italic",[3,23],"modifier"),n("underline",[4,24],"modifier"),n("inverse",[7,27],"modifier"),n("hidden",[8,28],"modifier"),n("strikethrough",[9,29],"modifier"),n("black",[30,39],"color"),n("red",[31,39],"color"),n("green",[32,39],"color"),n("yellow",[33,39],"color"),n("blue",[34,39],"color"),n("magenta",[35,39],"color"),n("cyan",[36,39],"color"),n("white",[37,39],"color"),n("gray",[90,39],"color"),n("grey",[90,39],"color"),n("bgBlack",[40,49],"bg"),n("bgRed",[41,49],"bg"),n("bgGreen",[42,49],"bg"),n("bgYellow",[43,49],"bg"),n("bgBlue",[44,49],"bg"),n("bgMagenta",[45,49],"bg"),n("bgCyan",[46,49],"bg"),n("bgWhite",[47,49],"bg"),n("blackBright",[90,39],"bright"),n("redBright",[91,39],"bright"),n("greenBright",[92,39],"bright"),n("yellowBright",[93,39],"bright"),n("blueBright",[94,39],"bright"),n("magentaBright",[95,39],"bright"),n("cyanBright",[96,39],"bright"),n("whiteBright",[97,39],"bright"),n("bgBlackBright",[100,49],"bgBright"),n("bgRedBright",[101,49],"bgBright"),n("bgGreenBright",[102,49],"bgBright"),n("bgYellowBright",[103,49],"bgBright"),n("bgBlueBright",[104,49],"bgBright"),n("bgMagentaBright",[105,49],"bgBright"),n("bgCyanBright",[106,49],"bgBright"),n("bgWhiteBright",[107,49],"bgBright"),r.ansiRegex=cGe,r.hasColor=r.hasAnsi=s=>(r.ansiRegex.lastIndex=0,typeof s=="string"&&s!==""&&r.ansiRegex.test(s)),r.alias=(s,o)=>{let a=typeof o=="string"?r[o]:o;if(typeof a!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");a.stack||(Reflect.defineProperty(a,"name",{value:s}),r.styles[s]=a,a.stack=[s]),Reflect.defineProperty(r,s,{configurable:!0,enumerable:!0,set(l){r.alias(s,l)},get(){let l=c=>i(c,l.stack);return Reflect.setPrototypeOf(l,r),l.stack=this.stack?this.stack.concat(a.stack):a.stack,l}})},r.theme=s=>{if(!lGe(s))throw new TypeError("Expected theme to be an object");for(let o of Object.keys(s))r.alias(o,s[o]);return r},r.alias("unstyle",s=>typeof s=="string"&&s!==""?(r.ansiRegex.lastIndex=0,s.replace(r.ansiRegex,"")):""),r.alias("noop",s=>s),r.none=r.clear=r.noop,r.stripColor=r.unstyle,r.symbols=xre(),r.define=n,r};jF.exports=kre();jF.exports.create=kre});var Xi=w(Lt=>{"use strict";var uGe=Object.prototype.toString,Ws=Eo(),Pre=!1,GF=[],Dre={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};Lt.longest=(r,e)=>r.reduce((t,i)=>Math.max(t,e?i[e].length:i.length),0);Lt.hasColor=r=>!!r&&Ws.hasColor(r);var T0=Lt.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r);Lt.nativeType=r=>uGe.call(r).slice(8,-1).toLowerCase().replace(/\s/g,"");Lt.isAsyncFn=r=>Lt.nativeType(r)==="asyncfunction";Lt.isPrimitive=r=>r!=null&&typeof r!="object"&&typeof r!="function";Lt.resolve=(r,e,...t)=>typeof e=="function"?e.call(r,...t):e;Lt.scrollDown=(r=[])=>[...r.slice(1),r[0]];Lt.scrollUp=(r=[])=>[r.pop(),...r];Lt.reorder=(r=[])=>{let e=r.slice();return e.sort((t,i)=>t.index>i.index?1:t.index{let i=r.length,n=t===i?0:t<0?i-1:t,s=r[e];r[e]=r[n],r[n]=s};Lt.width=(r,e=80)=>{let t=r&&r.columns?r.columns:e;return r&&typeof r.getWindowSize=="function"&&(t=r.getWindowSize()[0]),process.platform==="win32"?t-1:t};Lt.height=(r,e=20)=>{let t=r&&r.rows?r.rows:e;return r&&typeof r.getWindowSize=="function"&&(t=r.getWindowSize()[1]),t};Lt.wordWrap=(r,e={})=>{if(!r)return r;typeof e=="number"&&(e={width:e});let{indent:t="",newline:i=` +`+t,width:n=80}=e;n-=((i+t).match(/[^\S\n]/g)||[]).length;let o=`.{1,${n}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,a=r.trim(),l=new RegExp(o,"g"),c=a.match(l)||[];return c=c.map(u=>u.replace(/\n$/,"")),e.padEnd&&(c=c.map(u=>u.padEnd(n," "))),e.padStart&&(c=c.map(u=>u.padStart(n," "))),t+c.join(i)};Lt.unmute=r=>{let e=r.stack.find(i=>Ws.keys.color.includes(i));return e?Ws[e]:r.stack.find(i=>i.slice(2)==="bg")?Ws[e.slice(2)]:i=>i};Lt.pascal=r=>r?r[0].toUpperCase()+r.slice(1):"";Lt.inverse=r=>{if(!r||!r.stack)return r;let e=r.stack.find(i=>Ws.keys.color.includes(i));if(e){let i=Ws["bg"+Lt.pascal(e)];return i?i.black:r}let t=r.stack.find(i=>i.slice(0,2)==="bg");return t?Ws[t.slice(2).toLowerCase()]||r:Ws.none};Lt.complement=r=>{if(!r||!r.stack)return r;let e=r.stack.find(i=>Ws.keys.color.includes(i)),t=r.stack.find(i=>i.slice(0,2)==="bg");if(e&&!t)return Ws[Dre[e]||e];if(t){let i=t.slice(2).toLowerCase(),n=Dre[i];return n&&Ws["bg"+Lt.pascal(n)]||r}return Ws.none};Lt.meridiem=r=>{let e=r.getHours(),t=r.getMinutes(),i=e>=12?"pm":"am";e=e%12;let n=e===0?12:e,s=t<10?"0"+t:t;return n+":"+s+" "+i};Lt.set=(r={},e="",t)=>e.split(".").reduce((i,n,s,o)=>{let a=o.length-1>s?i[n]||{}:t;return!Lt.isObject(a)&&s{let i=r[e]==null?e.split(".").reduce((n,s)=>n&&n[s],r):r[e];return i==null?t:i};Lt.mixin=(r,e)=>{if(!T0(r))return e;if(!T0(e))return r;for(let t of Object.keys(e)){let i=Object.getOwnPropertyDescriptor(e,t);if(i.hasOwnProperty("value"))if(r.hasOwnProperty(t)&&T0(i.value)){let n=Object.getOwnPropertyDescriptor(r,t);T0(n.value)?r[t]=Lt.merge({},r[t],e[t]):Reflect.defineProperty(r,t,i)}else Reflect.defineProperty(r,t,i);else Reflect.defineProperty(r,t,i)}return r};Lt.merge=(...r)=>{let e={};for(let t of r)Lt.mixin(e,t);return e};Lt.mixinEmitter=(r,e)=>{let t=e.constructor.prototype;for(let i of Object.keys(t)){let n=t[i];typeof n=="function"?Lt.define(r,i,n.bind(e)):Lt.define(r,i,n)}};Lt.onExit=r=>{let e=(t,i)=>{Pre||(Pre=!0,GF.forEach(n=>n()),t===!0&&process.exit(128+i))};GF.length===0&&(process.once("SIGTERM",e.bind(null,!0,15)),process.once("SIGINT",e.bind(null,!0,2)),process.once("exit",e)),GF.push(r)};Lt.define=(r,e,t)=>{Reflect.defineProperty(r,e,{value:t})};Lt.defineExport=(r,e,t)=>{let i;Reflect.defineProperty(r,e,{enumerable:!0,configurable:!0,set(n){i=n},get(){return i?i():t()}})}});var Rre=w(zf=>{"use strict";zf.ctrl={a:"first",b:"backward",c:"cancel",d:"deleteForward",e:"last",f:"forward",g:"reset",i:"tab",k:"cutForward",l:"reset",n:"newItem",m:"cancel",j:"submit",p:"search",r:"remove",s:"save",u:"undo",w:"cutLeft",x:"toggleCursor",v:"paste"};zf.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};zf.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};zf.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};zf.keys={pageup:"pageUp",pagedown:"pageDown",home:"home",end:"end",cancel:"cancel",delete:"deleteForward",backspace:"delete",down:"down",enter:"submit",escape:"cancel",left:"left",space:"space",number:"number",return:"submit",right:"right",tab:"next",up:"up"}});var Lre=w((mft,Fre)=>{"use strict";var Nre=require("readline"),gGe=Rre(),fGe=/^(?:\x1b)([a-zA-Z0-9])$/,hGe=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,pGe={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"};function dGe(r){return["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(r)}function CGe(r){return["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(r)}var O0=(r="",e={})=>{let t,i=N({name:e.name,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:r,raw:r},e);if(Buffer.isBuffer(r)?r[0]>127&&r[1]===void 0?(r[0]-=128,r=""+String(r)):r=String(r):r!==void 0&&typeof r!="string"?r=String(r):r||(r=i.sequence||""),i.sequence=i.sequence||r||i.name,r==="\r")i.raw=void 0,i.name="return";else if(r===` +`)i.name="enter";else if(r===" ")i.name="tab";else if(r==="\b"||r==="\x7F"||r==="\x7F"||r==="\b")i.name="backspace",i.meta=r.charAt(0)==="";else if(r===""||r==="")i.name="escape",i.meta=r.length===2;else if(r===" "||r===" ")i.name="space",i.meta=r.length===2;else if(r<="")i.name=String.fromCharCode(r.charCodeAt(0)+"a".charCodeAt(0)-1),i.ctrl=!0;else if(r.length===1&&r>="0"&&r<="9")i.name="number";else if(r.length===1&&r>="a"&&r<="z")i.name=r;else if(r.length===1&&r>="A"&&r<="Z")i.name=r.toLowerCase(),i.shift=!0;else if(t=fGe.exec(r))i.meta=!0,i.shift=/^[A-Z]$/.test(t[1]);else if(t=hGe.exec(r)){let n=[...r];n[0]===""&&n[1]===""&&(i.option=!0);let s=[t[1],t[2],t[4],t[6]].filter(Boolean).join(""),o=(t[3]||t[5]||1)-1;i.ctrl=!!(o&4),i.meta=!!(o&10),i.shift=!!(o&1),i.code=s,i.name=pGe[s],i.shift=dGe(s)||i.shift,i.ctrl=CGe(s)||i.ctrl}return i};O0.listen=(r={},e)=>{let{stdin:t}=r;if(!t||t!==process.stdin&&!t.isTTY)throw new Error("Invalid stream passed");let i=Nre.createInterface({terminal:!0,input:t});Nre.emitKeypressEvents(t,i);let n=(a,l)=>e(a,O0(a,l),i),s=t.isRaw;return t.isTTY&&t.setRawMode(!0),t.on("keypress",n),i.resume(),()=>{t.isTTY&&t.setRawMode(s),t.removeListener("keypress",n),i.pause(),i.close()}};O0.action=(r,e,t)=>{let i=N(N({},gGe),t);return e.ctrl?(e.action=i.ctrl[e.name],e):e.option&&i.option?(e.action=i.option[e.name],e):e.shift?(e.action=i.shift[e.name],e):(e.action=i.keys[e.name],e)};Fre.exports=O0});var Ore=w((Eft,Tre)=>{"use strict";Tre.exports=r=>{r.timers=r.timers||{};let e=r.options.timers;if(!!e)for(let t of Object.keys(e)){let i=e[t];typeof i=="number"&&(i={interval:i}),mGe(r,t,i)}};function mGe(r,e,t={}){let i=r.timers[e]={name:e,start:Date.now(),ms:0,tick:0},n=t.interval||120;i.frames=t.frames||[],i.loading=!0;let s=setInterval(()=>{i.ms=Date.now()-i.start,i.tick++,r.render()},n);return i.stop=()=>{i.loading=!1,clearInterval(s)},Reflect.defineProperty(i,"interval",{value:s}),r.once("close",()=>i.stop()),i.stop}});var Ure=w((Ift,Mre)=>{"use strict";var{define:EGe,width:IGe}=Xi(),Kre=class{constructor(e){let t=e.options;EGe(this,"_prompt",e),this.type=e.type,this.name=e.name,this.message="",this.header="",this.footer="",this.error="",this.hint="",this.input="",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt="",this.buffer="",this.width=IGe(t.stdout||process.stdout),Object.assign(this,t),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=e.symbols,this.styles=e.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let e=N({},this);return e.status=this.status,e.buffer=Buffer.from(e.buffer),delete e.clone,e}set color(e){this._color=e}get color(){let e=this.prompt.styles;if(this.cancelled)return e.cancelled;if(this.submitted)return e.submitted;let t=this._color||e[this.status];return typeof t=="function"?t:e.pending}set loading(e){this._loading=e}get loading(){return typeof this._loading=="boolean"?this._loading:this.loadingChoices?"choices":!1}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}};Mre.exports=Kre});var jre=w((yft,Hre)=>{"use strict";var YF=Xi(),Ni=Eo(),qF={default:Ni.noop,noop:Ni.noop,set inverse(r){this._inverse=r},get inverse(){return this._inverse||YF.inverse(this.primary)},set complement(r){this._complement=r},get complement(){return this._complement||YF.complement(this.primary)},primary:Ni.cyan,success:Ni.green,danger:Ni.magenta,strong:Ni.bold,warning:Ni.yellow,muted:Ni.dim,disabled:Ni.gray,dark:Ni.dim.gray,underline:Ni.underline,set info(r){this._info=r},get info(){return this._info||this.primary},set em(r){this._em=r},get em(){return this._em||this.primary.underline},set heading(r){this._heading=r},get heading(){return this._heading||this.muted.underline},set pending(r){this._pending=r},get pending(){return this._pending||this.primary},set submitted(r){this._submitted=r},get submitted(){return this._submitted||this.success},set cancelled(r){this._cancelled=r},get cancelled(){return this._cancelled||this.danger},set typing(r){this._typing=r},get typing(){return this._typing||this.dim},set placeholder(r){this._placeholder=r},get placeholder(){return this._placeholder||this.primary.dim},set highlight(r){this._highlight=r},get highlight(){return this._highlight||this.inverse}};qF.merge=(r={})=>{r.styles&&typeof r.styles.enabled=="boolean"&&(Ni.enabled=r.styles.enabled),r.styles&&typeof r.styles.visible=="boolean"&&(Ni.visible=r.styles.visible);let e=YF.merge({},qF,r.styles);delete e.merge;for(let t of Object.keys(Ni))e.hasOwnProperty(t)||Reflect.defineProperty(e,t,{get:()=>Ni[t]});for(let t of Object.keys(Ni.styles))e.hasOwnProperty(t)||Reflect.defineProperty(e,t,{get:()=>Ni[t]});return e};Hre.exports=qF});var Yre=w((wft,Gre)=>{"use strict";var JF=process.platform==="win32",yA=Eo(),yGe=Xi(),WF=te(N({},yA.symbols),{upDownDoubleArrow:"\u21D5",upDownDoubleArrow2:"\u2B0D",upDownArrow:"\u2195",asterisk:"*",asterism:"\u2042",bulletWhite:"\u25E6",electricArrow:"\u2301",ellipsisLarge:"\u22EF",ellipsisSmall:"\u2026",fullBlock:"\u2588",identicalTo:"\u2261",indicator:yA.symbols.check,leftAngle:"\u2039",mark:"\u203B",minus:"\u2212",multiplication:"\xD7",obelus:"\xF7",percent:"%",pilcrow:"\xB6",pilcrow2:"\u2761",pencilUpRight:"\u2710",pencilDownRight:"\u270E",pencilRight:"\u270F",plus:"+",plusMinus:"\xB1",pointRight:"\u261E",rightAngle:"\u203A",section:"\xA7",hexagon:{off:"\u2B21",on:"\u2B22",disabled:"\u2B22"},ballot:{on:"\u2611",off:"\u2610",disabled:"\u2612"},stars:{on:"\u2605",off:"\u2606",disabled:"\u2606"},folder:{on:"\u25BC",off:"\u25B6",disabled:"\u25B6"},prefix:{pending:yA.symbols.question,submitted:yA.symbols.check,cancelled:yA.symbols.cross},separator:{pending:yA.symbols.pointerSmall,submitted:yA.symbols.middot,cancelled:yA.symbols.middot},radio:{off:JF?"( )":"\u25EF",on:JF?"(*)":"\u25C9",disabled:JF?"(|)":"\u24BE"},numbers:["\u24EA","\u2460","\u2461","\u2462","\u2463","\u2464","\u2465","\u2466","\u2467","\u2468","\u2469","\u246A","\u246B","\u246C","\u246D","\u246E","\u246F","\u2470","\u2471","\u2472","\u2473","\u3251","\u3252","\u3253","\u3254","\u3255","\u3256","\u3257","\u3258","\u3259","\u325A","\u325B","\u325C","\u325D","\u325E","\u325F","\u32B1","\u32B2","\u32B3","\u32B4","\u32B5","\u32B6","\u32B7","\u32B8","\u32B9","\u32BA","\u32BB","\u32BC","\u32BD","\u32BE","\u32BF"]});WF.merge=r=>{let e=yGe.merge({},yA.symbols,WF,r.symbols);return delete e.merge,e};Gre.exports=WF});var Jre=w((Bft,qre)=>{"use strict";var wGe=jre(),BGe=Yre(),bGe=Xi();qre.exports=r=>{r.options=bGe.merge({},r.options.theme,r.options),r.symbols=BGe.merge(r.options),r.styles=wGe.merge(r.options)}});var Xre=w((Wre,zre)=>{"use strict";var _re=process.env.TERM_PROGRAM==="Apple_Terminal",QGe=Eo(),zF=Xi(),Io=zre.exports=Wre,Lr="[",Vre="\x07",_F=!1,Fl=Io.code={bell:Vre,beep:Vre,beginning:`${Lr}G`,down:`${Lr}J`,esc:Lr,getPosition:`${Lr}6n`,hide:`${Lr}?25l`,line:`${Lr}2K`,lineEnd:`${Lr}K`,lineStart:`${Lr}1K`,restorePosition:Lr+(_re?"8":"u"),savePosition:Lr+(_re?"7":"s"),screen:`${Lr}2J`,show:`${Lr}?25h`,up:`${Lr}1J`},Iu=Io.cursor={get hidden(){return _F},hide(){return _F=!0,Fl.hide},show(){return _F=!1,Fl.show},forward:(r=1)=>`${Lr}${r}C`,backward:(r=1)=>`${Lr}${r}D`,nextLine:(r=1)=>`${Lr}E`.repeat(r),prevLine:(r=1)=>`${Lr}F`.repeat(r),up:(r=1)=>r?`${Lr}${r}A`:"",down:(r=1)=>r?`${Lr}${r}B`:"",right:(r=1)=>r?`${Lr}${r}C`:"",left:(r=1)=>r?`${Lr}${r}D`:"",to(r,e){return e?`${Lr}${e+1};${r+1}H`:`${Lr}${r+1}G`},move(r=0,e=0){let t="";return t+=r<0?Iu.left(-r):r>0?Iu.right(r):"",t+=e<0?Iu.up(-e):e>0?Iu.down(e):"",t},restore(r={}){let{after:e,cursor:t,initial:i,input:n,prompt:s,size:o,value:a}=r;if(i=zF.isPrimitive(i)?String(i):"",n=zF.isPrimitive(n)?String(n):"",a=zF.isPrimitive(a)?String(a):"",o){let l=Io.cursor.up(o)+Io.cursor.to(s.length),c=n.length-t;return c>0&&(l+=Io.cursor.left(c)),l}if(a||e){let l=!n&&!!i?-i.length:-n.length+t;return e&&(l-=e.length),n===""&&i&&!s.includes(i)&&(l+=i.length),Io.cursor.move(l)}}},VF=Io.erase={screen:Fl.screen,up:Fl.up,down:Fl.down,line:Fl.line,lineEnd:Fl.lineEnd,lineStart:Fl.lineStart,lines(r){let e="";for(let t=0;t{if(!e)return VF.line+Iu.to(0);let t=s=>[...QGe.unstyle(s)].length,i=r.split(/\r?\n/),n=0;for(let s of i)n+=1+Math.floor(Math.max(t(s)-1,0)/e);return(VF.line+Iu.prevLine()).repeat(n-1)+VF.line+Iu.to(0)}});var _f=w((bft,Zre)=>{"use strict";var SGe=require("events"),$re=Eo(),XF=Lre(),vGe=Ore(),xGe=Ure(),kGe=Jre(),Tn=Xi(),yu=Xre(),M0=class extends SGe{constructor(e={}){super();this.name=e.name,this.type=e.type,this.options=e,kGe(this),vGe(this),this.state=new xGe(this),this.initial=[e.initial,e.default].find(t=>t!=null),this.stdout=e.stdout||process.stdout,this.stdin=e.stdin||process.stdin,this.scale=e.scale||1,this.term=this.options.term||process.env.TERM_PROGRAM,this.margin=DGe(this.options.margin),this.setMaxListeners(0),PGe(this)}async keypress(e,t={}){this.keypressed=!0;let i=XF.action(e,XF(e,t),this.options.actions);this.state.keypress=i,this.emit("keypress",e,i),this.emit("state",this.state.clone());let n=this.options[i.action]||this[i.action]||this.dispatch;if(typeof n=="function")return await n.call(this,e,i);this.alert()}alert(){delete this.state.alert,this.options.show===!1?this.emit("alert"):this.stdout.write(yu.code.beep)}cursorHide(){this.stdout.write(yu.cursor.hide()),Tn.onExit(()=>this.cursorShow())}cursorShow(){this.stdout.write(yu.cursor.show())}write(e){!e||(this.stdout&&this.state.show!==!1&&this.stdout.write(e),this.state.buffer+=e)}clear(e=0){let t=this.state.buffer;this.state.buffer="",!(!t&&!e||this.options.show===!1)&&this.stdout.write(yu.cursor.down(e)+yu.clear(t,this.width))}restore(){if(this.state.closed||this.options.show===!1)return;let{prompt:e,after:t,rest:i}=this.sections(),{cursor:n,initial:s="",input:o="",value:a=""}=this,l=this.state.size=i.length,c={after:t,cursor:n,initial:s,input:o,prompt:e,size:l,value:a},u=yu.cursor.restore(c);u&&this.stdout.write(u)}sections(){let{buffer:e,input:t,prompt:i}=this.state;i=$re.unstyle(i);let n=$re.unstyle(e),s=n.indexOf(i),o=n.slice(0,s),l=n.slice(s).split(` +`),c=l[0],u=l[l.length-1],f=(i+(t?" "+t:"")).length,h=fe.call(this,this.value),this.result=()=>i.call(this,this.value),typeof t.initial=="function"&&(this.initial=await t.initial.call(this,this)),typeof t.onRun=="function"&&await t.onRun.call(this,this),typeof t.onSubmit=="function"){let n=t.onSubmit.bind(this),s=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await n(this.name,this.value,this),s())}await this.start(),await this.render()}render(){throw new Error("expected prompt to have a custom render method")}run(){return new Promise(async(e,t)=>{if(this.once("submit",e),this.once("cancel",t),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(e,t,i){let{options:n,state:s,symbols:o,timers:a}=this,l=a&&a[e];s.timer=l;let c=n[e]||s[e]||o[e],u=t&&t[e]!=null?t[e]:await c;if(u==="")return u;let g=await this.resolve(u,s,t,i);return!g&&t&&t[e]?this.resolve(c,s,t,i):g}async prefix(){let e=await this.element("prefix")||this.symbols,t=this.timers&&this.timers.prefix,i=this.state;return i.timer=t,Tn.isObject(e)&&(e=e[i.status]||e.pending),Tn.hasColor(e)?e:(this.styles[i.status]||this.styles.pending)(e)}async message(){let e=await this.element("message");return Tn.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,t=this.timers&&this.timers.separator,i=this.state;i.timer=t;let n=e[i.status]||e.pending||i.separator,s=await this.resolve(n,i);return Tn.isObject(s)&&(s=s[i.status]||s.pending),Tn.hasColor(s)?s:this.styles.muted(s)}async pointer(e,t){let i=await this.element("pointer",e,t);if(typeof i=="string"&&Tn.hasColor(i))return i;if(i){let n=this.styles,s=this.index===t,o=s?n.primary:c=>c,a=await this.resolve(i[s?"on":"off"]||i,this.state),l=Tn.hasColor(a)?a:o(a);return s?l:" ".repeat(a.length)}}async indicator(e,t){let i=await this.element("indicator",e,t);if(typeof i=="string"&&Tn.hasColor(i))return i;if(i){let n=this.styles,s=e.enabled===!0,o=s?n.success:n.dark,a=i[s?"on":"off"]||i;return Tn.hasColor(a)?a:o(a)}return""}body(){return null}footer(){if(this.state.status==="pending")return this.element("footer")}header(){if(this.state.status==="pending")return this.element("header")}async hint(){if(this.state.status==="pending"&&!this.isValue(this.state.input)){let e=await this.element("hint");return Tn.hasColor(e)?e:this.styles.muted(e)}}error(e){return this.state.submitted?"":e||this.state.error}format(e){return e}result(e){return e}validate(e){return this.options.required===!0?this.isValue(e):!0}isValue(e){return e!=null&&e!==""}resolve(e,...t){return Tn.resolve(this,e,...t)}get base(){return M0.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||Tn.height(this.stdout,25)}get width(){return this.options.columns||Tn.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(e){this.state.cursor=e}get cursor(){return this.state.cursor}set input(e){this.state.input=e}get input(){return this.state.input}set value(e){this.state.value=e}get value(){let{input:e,value:t}=this.state,i=[t,e].find(this.isValue.bind(this));return this.isValue(i)?i:this.initial}static get prompt(){return e=>new this(e).run()}};function PGe(r){let e=n=>r[n]===void 0||typeof r[n]=="function",t=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],i=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let n of Object.keys(r.options)){if(t.includes(n)||/^on[A-Z]/.test(n))continue;let s=r.options[n];typeof s=="function"&&e(n)?i.includes(n)||(r[n]=s.bind(r)):typeof r[n]!="function"&&(r[n]=s)}}function DGe(r){typeof r=="number"&&(r=[r,r,r,r]);let e=[].concat(r||[]),t=n=>n%2==0?` +`:" ",i=[];for(let n=0;n<4;n++){let s=t(n);e[n]?i.push(s.repeat(e[n])):i.push("")}return i}Zre.exports=M0});var rie=w((Qft,eie)=>{"use strict";var RGe=Xi(),tie={default(r,e){return e},checkbox(r,e){throw new Error("checkbox role is not implemented yet")},editable(r,e){throw new Error("editable role is not implemented yet")},expandable(r,e){throw new Error("expandable role is not implemented yet")},heading(r,e){return e.disabled="",e.indicator=[e.indicator," "].find(t=>t!=null),e.message=e.message||"",e},input(r,e){throw new Error("input role is not implemented yet")},option(r,e){return tie.default(r,e)},radio(r,e){throw new Error("radio role is not implemented yet")},separator(r,e){return e.disabled="",e.indicator=[e.indicator," "].find(t=>t!=null),e.message=e.message||r.symbols.line.repeat(5),e},spacer(r,e){return e}};eie.exports=(r,e={})=>{let t=RGe.merge({},tie,e.roles);return t[r]||t.default}});var qC=w((Sft,iie)=>{"use strict";var FGe=Eo(),NGe=_f(),LGe=rie(),K0=Xi(),{reorder:ZF,scrollUp:TGe,scrollDown:OGe,isObject:nie,swap:MGe}=K0,sie=class extends NGe{constructor(e){super(e);this.cursorHide(),this.maxSelected=e.maxSelected||Infinity,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.delay||0,this.longest=0,this.num=""}async initialize(){typeof this.options.initial=="function"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:e,initial:t,autofocus:i,suggest:n}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(s=>s.enabled=!1),typeof n!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");nie(t)&&(t=Object.keys(t)),Array.isArray(t)?(i!=null&&(this.index=this.findIndex(i)),t.forEach(s=>this.enable(this.find(s))),await this.render()):(i!=null&&(t=i),typeof t=="string"&&(t=this.findIndex(t)),typeof t=="number"&&t>-1&&(this.index=Math.max(0,Math.min(t,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,t){this.state.loadingChoices=!0;let i=[],n=0,s=async(o,a)=>{typeof o=="function"&&(o=await o.call(this)),o instanceof Promise&&(o=await o);for(let l=0;l(this.state.loadingChoices=!1,o))}async toChoice(e,t,i){if(typeof e=="function"&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),typeof e=="string"&&(e={name:e}),e.normalized)return e;e.normalized=!0;let n=e.value;if(e=LGe(e.role,this.options)(this,e),typeof e.disabled=="string"&&!e.hint&&(e.hint=e.disabled,e.disabled=!0),e.disabled===!0&&e.hint==null&&(e.hint="(disabled)"),e.index!=null)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||"",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input="",e.index=t,e.cursor=0,K0.define(e,"parent",i),e.level=i?i.level+1:1,e.indent==null&&(e.indent=i?i.indent+" ":e.indent||""),e.path=i?i.path+"."+e.name:e.name,e.enabled=!!(this.multiple&&!this.isDisabled(e)&&(e.enabled||this.isSelected(e))),this.isDisabled(e)||(this.longest=Math.max(this.longest,FGe.unstyle(e.message).length));let o=N({},e);return e.reset=(a=o.input,l=o.value)=>{for(let c of Object.keys(o))e[c]=o[c];e.input=a,e.value=l},n==null&&typeof e.initial=="function"&&(e.input=await e.initial.call(this,this.state,e,t)),e}async onChoice(e,t){this.emit("choice",e,t,this),typeof e.onChoice=="function"&&await e.onChoice.call(this,this.state,e,t)}async addChoice(e,t,i){let n=await this.toChoice(e,t,i);return this.choices.push(n),this.index=this.choices.length-1,this.limit=this.choices.length,n}async newItem(e,t,i){let n=N({name:"New choice name?",editable:!0,newChoice:!0},e),s=await this.addChoice(n,t,i);return s.updateChoice=()=>{delete s.newChoice,s.name=s.message=s.input,s.input="",s.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?" ".repeat(e.level-1):"":e.indent}dispatch(e,t){if(this.multiple&&this[t.name])return this[t.name]();this.alert()}focus(e,t){return typeof t!="boolean"&&(t=e.enabled),t&&!e.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=e.index,e.enabled=t&&!this.isDisabled(e),e)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelectedt.enabled);return this.choices.forEach(t=>t.enabled=!e),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(e=>e.enabled=!e.enabled),this.render())}g(e=this.focused){return this.choices.some(t=>!!t.parent)?(this.toggle(e.parent&&!e.choices?e.parent:e),this.render()):this.a()}toggle(e,t){if(!e.enabled&&this.selected.length>=this.maxSelected)return this.alert();typeof t!="boolean"&&(t=!e.enabled),e.enabled=t,e.choices&&e.choices.forEach(n=>this.toggle(n,t));let i=e.parent;for(;i;){let n=i.choices.filter(s=>this.isDisabled(s));i.enabled=n.every(s=>s.enabled===!0),i=i.parent}return oie(this,this.choices),this.emit("toggle",e,this),e}enable(e){return this.selected.length>=this.maxSelected?this.alert():(e.enabled=!this.isDisabled(e),e.choices&&e.choices.forEach(this.enable.bind(this)),e)}disable(e){return e.enabled=!1,e.choices&&e.choices.forEach(this.disable.bind(this)),e}number(e){this.num+=e;let t=i=>{let n=Number(i);if(n>this.choices.length-1)return this.alert();let s=this.focused,o=this.choices.find(a=>n===a.index);if(!o.enabled&&this.selected.length>=this.maxSelected)return this.alert();if(this.visible.indexOf(o)===-1){let a=ZF(this.choices),l=a.indexOf(o);if(s.index>l){let c=a.slice(l,l+this.limit),u=a.filter(g=>!c.includes(g));this.choices=c.concat(u)}else{let c=l-this.limit+1;this.choices=a.slice(c).concat(a.slice(0,c))}}return this.index=this.choices.indexOf(o),this.toggle(this.focused),this.render()};return clearTimeout(this.numberTimeout),new Promise(i=>{let n=this.choices.length,s=this.num,o=(a=!1,l)=>{clearTimeout(this.numberTimeout),a&&(l=t(s)),this.num="",i(l)};if(s==="0"||s.length===1&&Number(s+"0")>n)return o(!0);if(Number(s)>n)return o(!1,this.alert());this.numberTimeout=setTimeout(()=>o(!0),this.delay)})}home(){return this.choices=ZF(this.choices),this.index=0,this.render()}end(){let e=this.choices.length-this.limit,t=ZF(this.choices);return this.choices=t.slice(e).concat(t.slice(0,e)),this.index=this.limit-1,this.render()}first(){return this.index=0,this.render()}last(){return this.index=this.visible.length-1,this.render()}prev(){return this.visible.length<=1?this.alert():this.up()}next(){return this.visible.length<=1?this.alert():this.down()}right(){return this.cursor>=this.input.length?this.alert():(this.cursor++,this.render())}left(){return this.cursor<=0?this.alert():(this.cursor--,this.render())}up(){let e=this.choices.length,t=this.visible.length,i=this.index;return this.options.scroll===!1&&i===0?this.alert():e>t&&i===0?this.scrollUp():(this.index=(i-1%e+e)%e,this.isDisabled()?this.up():this.render())}down(){let e=this.choices.length,t=this.visible.length,i=this.index;return this.options.scroll===!1&&i===t-1?this.alert():e>t&&i===t-1?this.scrollDown():(this.index=(i+1)%e,this.isDisabled()?this.down():this.render())}scrollUp(e=0){return this.choices=TGe(this.choices),this.index=e,this.isDisabled()?this.up():this.render()}scrollDown(e=this.visible.length-1){return this.choices=OGe(this.choices),this.index=e,this.isDisabled()?this.down():this.render()}async shiftUp(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index-1),await this.up(),this.sorting=!1;return}return this.scrollUp(this.index)}async shiftDown(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index+1),await this.down(),this.sorting=!1;return}return this.scrollDown(this.index)}pageUp(){return this.visible.length<=1?this.alert():(this.limit=Math.max(this.limit-1,0),this.index=Math.min(this.limit-1,this.index),this._limit=this.limit,this.isDisabled()?this.up():this.render())}pageDown(){return this.visible.length>=this.choices.length?this.alert():(this.index=Math.max(0,this.index),this.limit=Math.min(this.limit+1,this.choices.length),this._limit=this.limit,this.isDisabled()?this.down():this.render())}swap(e){MGe(this.choices,this.index,e)}isDisabled(e=this.focused){return e&&["disabled","collapsed","hidden","completing","readonly"].some(i=>e[i]===!0)?!0:e&&e.role==="heading"}isEnabled(e=this.focused){if(Array.isArray(e))return e.every(t=>this.isEnabled(t));if(e.choices){let t=e.choices.filter(i=>!this.isDisabled(i));return e.enabled&&t.every(i=>this.isEnabled(i))}return e.enabled&&!this.isDisabled(e)}isChoice(e,t){return e.name===t||e.index===Number(t)}isSelected(e){return Array.isArray(this.initial)?this.initial.some(t=>this.isChoice(e,t)):this.isChoice(e,this.initial)}map(e=[],t="value"){return[].concat(e||[]).reduce((i,n)=>(i[n]=this.find(n,t),i),{})}filter(e,t){let i=(a,l)=>[a.name,l].includes(e),n=typeof e=="function"?e:i,o=(this.options.multiple?this.state._choices:this.choices).filter(n);return t?o.map(a=>a[t]):o}find(e,t){if(nie(e))return t?e[t]:e;let i=(o,a)=>[o.name,a].includes(e),n=typeof e=="function"?e:i,s=this.choices.find(n);if(s)return t?s[t]:s}findIndex(e){return this.choices.indexOf(this.find(e))}async submit(){let e=this.focused;if(!e)return this.alert();if(e.newChoice)return e.input?(e.updateChoice(),this.render()):this.alert();if(this.choices.some(o=>o.newChoice))return this.alert();let{reorder:t,sort:i}=this.options,n=this.multiple===!0,s=this.selected;return s===void 0?this.alert():(Array.isArray(s)&&t!==!1&&i!==!0&&(s=K0.reorder(s)),this.value=n?s.map(o=>o.name):s.name,super.submit())}set choices(e=[]){this.state._choices=this.state._choices||[],this.state.choices=e;for(let t of e)this.state._choices.some(i=>i.name===t.name)||this.state._choices.push(t);if(!this._initial&&this.options.initial){this._initial=!0;let t=this.initial;if(typeof t=="string"||typeof t=="number"){let i=this.find(t);i&&(this.initial=i.index,this.focus(i,!0))}}}get choices(){return oie(this,this.state.choices||[])}set visible(e){this.state.visible=e}get visible(){return(this.state.visible||this.choices).slice(0,this.limit)}set limit(e){this.state.limit=e}get limit(){let{state:e,options:t,choices:i}=this,n=e.limit||this._limit||t.limit||i.length;return Math.min(n,this.height)}set value(e){super.value=e}get value(){return typeof super.value!="string"&&super.value===this.initial?this.input:super.value}set index(e){this.state.index=e}get index(){return Math.max(0,this.state?this.state.index:0)}get enabled(){return this.filter(this.isEnabled.bind(this))}get focused(){let e=this.choices[this.index];return e&&this.state.submitted&&this.multiple!==!0&&(e.enabled=!0),e}get selectable(){return this.choices.filter(e=>!this.isDisabled(e))}get selected(){return this.multiple?this.enabled:this.focused}};function oie(r,e){if(e instanceof Promise)return e;if(typeof e=="function"){if(K0.isAsyncFn(e))return e;e=e.call(r,r)}for(let t of e){if(Array.isArray(t.choices)){let i=t.choices.filter(n=>!r.isDisabled(n));t.enabled=i.every(n=>n.enabled===!0)}r.isDisabled(t)===!0&&delete t.enabled}return e}iie.exports=sie});var Nl=w((vft,aie)=>{"use strict";var KGe=qC(),$F=Xi(),Aie=class extends KGe{constructor(e){super(e);this.emptyError=this.options.emptyError||"No items were selected"}async dispatch(e,t){if(this.multiple)return this[t.name]?await this[t.name](e,t):await super.dispatch(e,t);this.alert()}separator(){if(this.options.separator)return super.separator();let e=this.styles.muted(this.symbols.ellipsis);return this.state.submitted?super.separator():e}pointer(e,t){return!this.multiple||this.options.pointer?super.pointer(e,t):""}indicator(e,t){return this.multiple?super.indicator(e,t):""}choiceMessage(e,t){let i=this.resolve(e.message,this.state,e,t);return e.role==="heading"&&!$F.hasColor(i)&&(i=this.styles.strong(i)),this.resolve(i,this.state,e,t)}choiceSeparator(){return":"}async renderChoice(e,t){await this.onChoice(e,t);let i=this.index===t,n=await this.pointer(e,t),s=await this.indicator(e,t)+(e.pad||""),o=await this.resolve(e.hint,this.state,e,t);o&&!$F.hasColor(o)&&(o=this.styles.muted(o));let a=this.indent(e),l=await this.choiceMessage(e,t),c=()=>[this.margin[3],a+n+s,l,this.margin[1],o].filter(Boolean).join(" ");return e.role==="heading"?c():e.disabled?($F.hasColor(l)||(l=this.styles.disabled(l)),c()):(i&&(l=this.styles.em(l)),c())}async renderChoices(){if(this.state.loading==="choices")return this.styles.warning("Loading choices");if(this.state.submitted)return"";let e=this.visible.map(async(s,o)=>await this.renderChoice(s,o)),t=await Promise.all(e);t.length||t.push(this.styles.danger("No matching choices"));let i=this.margin[0]+t.join(` +`),n;return this.options.choicesHeader&&(n=await this.resolve(this.options.choicesHeader,this.state)),[n,i].filter(Boolean).join(` +`)}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(e=>this.styles.primary(e.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:e,size:t}=this.state,i="",n=await this.header(),s=await this.prefix(),o=await this.separator(),a=await this.message();this.options.promptLine!==!1&&(i=[s,a,o,""].join(" "),this.state.prompt=i);let l=await this.format(),c=await this.error()||await this.hint(),u=await this.renderChoices(),g=await this.footer();l&&(i+=l),c&&!i.includes(c)&&(i+=" "+c),e&&!l&&!u.trim()&&this.multiple&&this.emptyError!=null&&(i+=this.styles.danger(this.emptyError)),this.clear(t),this.write([n,i,u,g].filter(Boolean).join(` +`)),this.write(this.margin[2]),this.restore()}};aie.exports=Aie});var uie=w((xft,lie)=>{"use strict";var UGe=Nl(),HGe=(r,e)=>{let t=r.toLowerCase();return i=>{let s=i.toLowerCase().indexOf(t),o=e(i.slice(s,s+t.length));return s>=0?i.slice(0,s)+o+i.slice(s+t.length):i}},cie=class extends UGe{constructor(e){super(e);this.cursorShow()}moveCursor(e){this.state.cursor+=e}dispatch(e){return this.append(e)}space(e){return this.options.multiple?super.space(e):this.append(e)}append(e){let{cursor:t,input:i}=this.state;return this.input=i.slice(0,t)+e+i.slice(t),this.moveCursor(1),this.complete()}delete(){let{cursor:e,input:t}=this.state;return t?(this.input=t.slice(0,e-1)+t.slice(e),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:e,input:t}=this.state;return t[e]===void 0?this.alert():(this.input=`${t}`.slice(0,e)+`${t}`.slice(e+1),this.complete())}number(e){return this.append(e)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(e=this.input,t=this.state._choices){if(typeof this.options.suggest=="function")return this.options.suggest.call(this,e,t);let i=e.toLowerCase();return t.filter(n=>n.message.toLowerCase().includes(i))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(e=>this.styles.primary(e.message)).join(", ");if(this.state.submitted){let e=this.value=this.input=this.focused.value;return this.styles.primary(e)}return this.input}async render(){if(this.state.status!=="pending")return super.render();let e=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,t=HGe(this.input,e),i=this.choices;this.choices=i.map(n=>te(N({},n),{message:t(n.message)})),await super.render(),this.choices=i}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}};lie.exports=cie});var tN=w((kft,gie)=>{"use strict";var eN=Xi();gie.exports=(r,e={})=>{r.cursorHide();let{input:t="",initial:i="",pos:n,showCursor:s=!0,color:o}=e,a=o||r.styles.placeholder,l=eN.inverse(r.styles.primary),c=m=>l(r.styles.black(m)),u=t,g=" ",f=c(g);if(r.blink&&r.blink.off===!0&&(c=m=>m,f=""),s&&n===0&&i===""&&t==="")return c(g);if(s&&n===0&&(t===i||t===""))return c(i[0])+a(i.slice(1));i=eN.isPrimitive(i)?`${i}`:"",t=eN.isPrimitive(t)?`${t}`:"";let h=i&&i.startsWith(t)&&i!==t,p=h?c(i[t.length]):f;if(n!==t.length&&s===!0&&(u=t.slice(0,n)+c(t[n])+t.slice(n+1),p=""),s===!1&&(p=""),h){let m=r.styles.unstyle(u+p);return u+p+a(i.slice(m.length))}return u+p}});var U0=w((Pft,fie)=>{"use strict";var jGe=Eo(),GGe=Nl(),YGe=tN(),hie=class extends GGe{constructor(e){super(te(N({},e),{multiple:!0}));this.type="form",this.initial=this.options.initial,this.align=[this.options.align,"right"].find(t=>t!=null),this.emptyError="",this.values={}}async reset(e){return await super.reset(),e===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(t=>t.reset&&t.reset()),this.render()}dispatch(e){return!!e&&this.append(e)}append(e){let t=this.focused;if(!t)return this.alert();let{cursor:i,input:n}=t;return t.value=t.input=n.slice(0,i)+e+n.slice(i),t.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:t,input:i}=e;return e.value=e.input=i.slice(0,t-1)+i.slice(t),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:t,input:i}=e;if(i[t]===void 0)return this.alert();let n=`${i}`.slice(0,t)+`${i}`.slice(t+1);return e.value=e.input=n,this.render()}right(){let e=this.focused;return e?e.cursor>=e.input.length?this.alert():(e.cursor++,this.render()):this.alert()}left(){let e=this.focused;return e?e.cursor<=0?this.alert():(e.cursor--,this.render()):this.alert()}space(e,t){return this.dispatch(e,t)}number(e,t){return this.dispatch(e,t)}next(){let e=this.focused;if(!e)return this.alert();let{initial:t,input:i}=e;return t&&t.startsWith(i)&&i!==t?(e.value=e.input=t,e.cursor=e.value.length,this.render()):super.next()}prev(){let e=this.focused;return e?e.cursor===0?super.prev():(e.value=e.input="",e.cursor=0,this.render()):this.alert()}separator(){return""}format(e){return this.state.submitted?"":super.format(e)}pointer(){return""}indicator(e){return e.input?"\u29BF":"\u2299"}async choiceSeparator(e,t){let i=await this.resolve(e.separator,this.state,e,t)||":";return i?" "+this.styles.disabled(i):""}async renderChoice(e,t){await this.onChoice(e,t);let{state:i,styles:n}=this,{cursor:s,initial:o="",name:a,hint:l,input:c=""}=e,{muted:u,submitted:g,primary:f,danger:h}=n,p=l,m=this.index===t,y=e.validate||(()=>!0),b=await this.choiceSeparator(e,t),v=e.message;this.align==="right"&&(v=v.padStart(this.longest+1," ")),this.align==="left"&&(v=v.padEnd(this.longest+1," "));let x=this.values[a]=c||o,T=c?"success":"dark";await y.call(e,x,this.state)!==!0&&(T="danger");let Y=n[T](await this.indicator(e,t))+(e.pad||""),$=this.indent(e),_=()=>[$,Y,v+b,c,p].filter(Boolean).join(" ");if(i.submitted)return v=jGe.unstyle(v),c=g(c),p="",_();if(e.format)c=await e.format.call(this,c,e,t);else{let ne=this.styles.muted;c=YGe(this,{input:c,initial:o,pos:s,showCursor:m,color:ne})}return this.isValue(c)||(c=this.styles.muted(this.symbols.ellipsis)),e.result&&(this.values[a]=await e.result.call(this,x,e,t)),m&&(v=f(v)),e.error?c+=(c?" ":"")+h(e.error.trim()):e.hint&&(c+=(c?" ":"")+u(e.hint.trim())),_()}async submit(){return this.value=this.values,super.base.submit.call(this)}};fie.exports=hie});var rN=w((Dft,pie)=>{"use strict";var qGe=U0(),JGe=()=>{throw new Error("expected prompt to have a custom authenticate method")},die=(r=JGe)=>{class e extends qGe{constructor(i){super(i)}async submit(){this.value=await r.call(this,this.values,this.state),super.base.submit.call(this)}static create(i){return die(i)}}return e};pie.exports=die()});var Eie=w((Rft,Cie)=>{"use strict";var WGe=rN();function zGe(r,e){return r.username===this.options.username&&r.password===this.options.password}var mie=(r=zGe)=>{let e=[{name:"username",message:"username"},{name:"password",message:"password",format(i){return this.options.showPassword?i:(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(i.length))}}];class t extends WGe.create(r){constructor(n){super(te(N({},n),{choices:e}))}static create(n){return mie(n)}}return t};Cie.exports=mie()});var H0=w((Fft,Iie)=>{"use strict";var _Ge=_f(),{isPrimitive:VGe,hasColor:XGe}=Xi(),yie=class extends _Ge{constructor(e){super(e);this.cursorHide()}async initialize(){let e=await this.resolve(this.initial,this.state);this.input=await this.cast(e),await super.initialize()}dispatch(e){return this.isValue(e)?(this.input=e,this.submit()):this.alert()}format(e){let{styles:t,state:i}=this;return i.submitted?t.success(e):t.primary(e)}cast(e){return this.isTrue(e)}isTrue(e){return/^[ty1]/i.test(e)}isFalse(e){return/^[fn0]/i.test(e)}isValue(e){return VGe(e)&&(this.isTrue(e)||this.isFalse(e))}async hint(){if(this.state.status==="pending"){let e=await this.element("hint");return XGe(e)?e:this.styles.muted(e)}}async render(){let{input:e,size:t}=this.state,i=await this.prefix(),n=await this.separator(),s=await this.message(),o=this.styles.muted(this.default),a=[i,s,o,n].filter(Boolean).join(" ");this.state.prompt=a;let l=await this.header(),c=this.value=this.cast(e),u=await this.format(c),g=await this.error()||await this.hint(),f=await this.footer();g&&!a.includes(g)&&(u+=" "+g),a+=" "+u,this.clear(t),this.write([l,a,f].filter(Boolean).join(` +`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}};Iie.exports=yie});var bie=w((Nft,wie)=>{"use strict";var ZGe=H0(),Bie=class extends ZGe{constructor(e){super(e);this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};wie.exports=Bie});var vie=w((Lft,Qie)=>{"use strict";var $Ge=Nl(),eYe=U0(),Vf=eYe.prototype,Sie=class extends $Ge{constructor(e){super(te(N({},e),{multiple:!0}));this.align=[this.options.align,"left"].find(t=>t!=null),this.emptyError="",this.values={}}dispatch(e,t){let i=this.focused,n=i.parent||{};return!i.editable&&!n.editable&&(e==="a"||e==="i")?super[e]():Vf.dispatch.call(this,e,t)}append(e,t){return Vf.append.call(this,e,t)}delete(e,t){return Vf.delete.call(this,e,t)}space(e){return this.focused.editable?this.append(e):super.space()}number(e){return this.focused.editable?this.append(e):super.number(e)}next(){return this.focused.editable?Vf.next.call(this):super.next()}prev(){return this.focused.editable?Vf.prev.call(this):super.prev()}async indicator(e,t){let i=e.indicator||"",n=e.editable?i:super.indicator(e,t);return await this.resolve(n,this.state,e,t)||""}indent(e){return e.role==="heading"?"":e.editable?" ":" "}async renderChoice(e,t){return e.indent="",e.editable?Vf.renderChoice.call(this,e,t):super.renderChoice(e,t)}error(){return""}footer(){return this.state.error}async validate(){let e=!0;for(let t of this.choices){if(typeof t.validate!="function"||t.role==="heading")continue;let i=t.parent?this.value[t.parent.name]:this.value;if(t.editable?i=t.value===t.name?t.initial||"":t.value:this.isDisabled(t)||(i=t.enabled===!0),e=await t.validate(i,this.state),e!==!0)break}return e!==!0&&(this.state.error=typeof e=="string"?e:"Invalid Input"),e}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(e=>e.newChoice))return this.alert();this.value={};for(let e of this.choices){let t=e.parent?this.value[e.parent.name]:this.value;if(e.role==="heading"){this.value[e.name]={};continue}e.editable?t[e.name]=e.value===e.name?e.initial||"":e.value:this.isDisabled(e)||(t[e.name]=e.enabled===!0)}return this.base.submit.call(this)}};Qie.exports=Sie});var wu=w((Tft,xie)=>{"use strict";var tYe=_f(),rYe=tN(),{isPrimitive:iYe}=Xi(),kie=class extends tYe{constructor(e){super(e);this.initial=iYe(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,t={}){let i=this.state.prevKeypress;return this.state.prevKeypress=t,this.options.multiline===!0&&t.name==="return"&&(!i||i.name!=="return")?this.append(` +`,t):super.keypress(e,t)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(e,t){if(!e||t.ctrl||t.code)return this.alert();this.append(e)}append(e){let{cursor:t,input:i}=this.state;this.input=`${i}`.slice(0,t)+e+`${i}`.slice(t),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:t}=this.state;if(e<=0)return this.alert();this.input=`${t}`.slice(0,e-1)+`${t}`.slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:t}=this.state;if(t[e]===void 0)return this.alert();this.input=`${t}`.slice(0,e)+`${t}`.slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(e===0)return this.alert();let t=this.input.slice(0,e),i=this.input.slice(e),n=t.split(" ");this.state.clipboard.push(n.pop()),this.input=n.join(" "),this.cursor=this.input.length,this.input+=i,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=this.initial!=null?String(this.initial):"";if(!e||!e.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(e){return!!e}async format(e=this.value){let t=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||t):rYe(this,{input:e,initial:t,pos:this.cursor})}async render(){let e=this.state.size,t=await this.prefix(),i=await this.separator(),n=await this.message(),s=[t,n,i].filter(Boolean).join(" ");this.state.prompt=s;let o=await this.header(),a=await this.format(),l=await this.error()||await this.hint(),c=await this.footer();l&&!a.includes(l)&&(a+=" "+l),s+=" "+a,this.clear(e),this.write([o,s,c].filter(Boolean).join(` +`)),this.restore()}};xie.exports=kie});var Die=w((Oft,Pie)=>{"use strict";var nYe=r=>r.filter((e,t)=>r.lastIndexOf(e)===t),j0=r=>nYe(r).filter(Boolean);Pie.exports=(r,e={},t="")=>{let{past:i=[],present:n=""}=e,s,o;switch(r){case"prev":case"undo":return s=i.slice(0,i.length-1),o=i[i.length-1]||"",{past:j0([t,...s]),present:o};case"next":case"redo":return s=i.slice(1),o=i[0]||"",{past:j0([...s,t]),present:o};case"save":return{past:j0([...i,t]),present:""};case"remove":return o=j0(i.filter(a=>a!==t)),n="",o.length&&(n=o.pop()),{past:o,present:n};default:throw new Error(`Invalid action: "${r}"`)}}});var iN=w((Mft,Rie)=>{"use strict";var sYe=wu(),Fie=Die(),Nie=class extends sYe{constructor(e){super(e);let t=this.options.history;if(t&&t.store){let i=t.values||this.initial;this.autosave=!!t.autosave,this.store=t.store,this.data=this.store.get("values")||{past:[],present:i},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=Fie(e,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion("prev")}altDown(){return this.completion("next")}prev(){return this.save(),super.prev()}save(){!this.store||(this.data=Fie("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};Rie.exports=Nie});var Oie=w((Kft,Lie)=>{"use strict";var oYe=wu(),Tie=class extends oYe{format(){return""}};Lie.exports=Tie});var Uie=w((Uft,Mie)=>{"use strict";var aYe=wu(),Kie=class extends aYe{constructor(e={}){super(e);this.sep=this.options.separator||/, */,this.initial=e.initial||""}split(e=this.value){return e?String(e).split(this.sep):[]}format(){let e=this.state.submitted?this.styles.primary:t=>t;return this.list.map(e).join(", ")}async submit(e){let t=this.state.error||await this.validate(this.list,this.state);return t!==!0?(this.state.error=t,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}};Mie.exports=Kie});var Gie=w((Hft,Hie)=>{"use strict";var AYe=Nl(),jie=class extends AYe{constructor(e){super(te(N({},e),{multiple:!0}))}};Hie.exports=jie});var nN=w((jft,Yie)=>{"use strict";var lYe=wu(),qie=class extends lYe{constructor(e={}){super(N({style:"number"},e));this.min=this.isValue(e.min)?this.toNumber(e.min):-Infinity,this.max=this.isValue(e.max)?this.toNumber(e.max):Infinity,this.delay=e.delay!=null?e.delay:1e3,this.float=e.float!==!1,this.round=e.round===!0||e.float===!1,this.major=e.major||10,this.minor=e.minor||1,this.initial=e.initial!=null?e.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(e){return!/[-+.]/.test(e)||e==="."&&this.input.includes(".")?this.alert("invalid number"):super.append(e)}number(e){return super.append(e)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(e){let t=e||this.minor,i=this.toNumber(this.input);return i>this.max+t?this.alert():(this.input=`${i+t}`,this.render())}down(e){let t=e||this.minor,i=this.toNumber(this.input);return ithis.isValue(t));return this.value=this.toNumber(e||0),super.submit()}};Yie.exports=qie});var Wie=w((Gft,Jie)=>{Jie.exports=nN()});var Vie=w((Yft,zie)=>{"use strict";var cYe=wu(),_ie=class extends cYe{constructor(e){super(e);this.cursorShow()}format(e=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length)):""}};zie.exports=_ie});var ene=w((qft,Xie)=>{"use strict";var uYe=Eo(),gYe=qC(),Zie=Xi(),$ie=class extends gYe{constructor(e={}){super(e);this.widths=[].concat(e.messageWidth||50),this.align=[].concat(e.align||"left"),this.linebreak=e.linebreak||!1,this.edgeLength=e.edgeLength||3,this.newline=e.newline||` + `;let t=e.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((i,n)=>({name:n+t})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let e=0;for(let t of this.choices){e=Math.max(e,t.message.length),t.scaleIndex=t.initial||2,t.scale=[];for(let i=0;i=this.scale.length-1?this.alert():(e.scaleIndex++,this.render())}left(){let e=this.focused;return e.scaleIndex<=0?this.alert():(e.scaleIndex--,this.render())}indent(){return""}format(){return this.state.submitted?this.choices.map(t=>this.styles.info(t.index)).join(", "):""}pointer(){return""}renderScaleKey(){if(this.scaleKey===!1||this.state.submitted)return"";let e=this.scale.map(i=>` ${i.name} - ${i.message}`);return["",...e].map(i=>this.styles.muted(i)).join(` +`)}renderScaleHeading(e){let t=this.scale.map(l=>l.name);typeof this.options.renderScaleHeading=="function"&&(t=this.options.renderScaleHeading.call(this,e));let i=this.scaleLength-t.join("").length,n=Math.round(i/(t.length-1)),o=t.map(l=>this.styles.strong(l)).join(" ".repeat(n)),a=" ".repeat(this.widths[0]);return this.margin[3]+a+this.margin[1]+o}scaleIndicator(e,t,i){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,e,t,i);let n=e.scaleIndex===t.index;return t.disabled?this.styles.hint(this.symbols.radio.disabled):n?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,t){let i=e.scale.map(s=>this.scaleIndicator(e,s,t)),n=this.term==="Hyper"?"":" ";return i.join(n+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,t){await this.onChoice(e,t);let i=this.index===t,n=await this.pointer(e,t),s=await e.hint;s&&!Zie.hasColor(s)&&(s=this.styles.muted(s));let o=p=>this.margin[3]+p.replace(/\s+$/,"").padEnd(this.widths[0]," "),a=this.newline,l=this.indent(e),c=await this.resolve(e.message,this.state,e,t),u=await this.renderScale(e,t),g=this.margin[1]+this.margin[3];this.scaleLength=uYe.unstyle(u).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-g.length);let h=Zie.wordWrap(c,{width:this.widths[0],newline:a}).split(` +`).map(p=>o(p)+this.margin[1]);return i&&(u=this.styles.info(u),h=h.map(p=>this.styles.info(p))),h[0]+=u,this.linebreak&&h.push(""),[l+n,h.join(` +`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let e=this.visible.map(async(n,s)=>await this.renderChoice(n,s)),t=await Promise.all(e),i=await this.renderScaleHeading();return this.margin[0]+[i,...t.map(n=>n.join(" "))].join(` +`)}async render(){let{submitted:e,size:t}=this.state,i=await this.prefix(),n=await this.separator(),s=await this.message(),o="";this.options.promptLine!==!1&&(o=[i,s,n,""].join(" "),this.state.prompt=o);let a=await this.header(),l=await this.format(),c=await this.renderScaleKey(),u=await this.error()||await this.hint(),g=await this.renderChoices(),f=await this.footer(),h=this.emptyError;l&&(o+=l),u&&!o.includes(u)&&(o+=" "+u),e&&!l&&!g.trim()&&this.multiple&&h!=null&&(o+=this.styles.danger(h)),this.clear(t),this.write([a,o,c,g,f].filter(Boolean).join(` +`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}};Xie.exports=$ie});var nne=w((Jft,tne)=>{"use strict";var rne=Eo(),fYe=(r="")=>typeof r=="string"?r.replace(/^['"]|['"]$/g,""):"",ine=class{constructor(e){this.name=e.key,this.field=e.field||{},this.value=fYe(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}},hYe=async(r={},e={},t=i=>i)=>{let i=new Set,n=r.fields||[],s=r.template,o=[],a=[],l=[],c=1;typeof s=="function"&&(s=await s());let u=-1,g=()=>s[++u],f=()=>s[u+1],h=p=>{p.line=c,o.push(p)};for(h({type:"bos",value:""});uT.name===b.key);b.field=n.find(T=>T.name===b.key),x||(x=new ine(b),a.push(x)),x.lines.push(b.line-1);continue}let m=o[o.length-1];m.type==="text"&&m.line===c?m.value+=p:h({type:"text",value:p})}return h({type:"eos",value:""}),{input:s,tabstops:o,unique:i,keys:l,items:a}};tne.exports=async r=>{let e=r.options,t=new Set(e.required===!0?[]:e.required||[]),i=N(N({},e.values),e.initial),{tabstops:n,items:s,keys:o}=await hYe(e,i),a=sN("result",r,e),l=sN("format",r,e),c=sN("validate",r,e,!0),u=r.isValue.bind(r);return async(g={},f=!1)=>{let h=0;g.required=t,g.items=s,g.keys=o,g.output="";let p=async(v,x,T,q)=>{let Y=await c(v,x,T,q);return Y===!1?"Invalid field "+T.name:Y};for(let v of n){let x=v.value,T=v.key;if(v.type!=="template"){x&&(g.output+=x);continue}if(v.type==="template"){let q=s.find(ee=>ee.name===T);e.required===!0&&g.required.add(q.name);let Y=[q.input,g.values[q.value],q.value,x].find(u),_=(q.field||{}).message||v.inner;if(f){let ee=await p(g.values[T],g,q,h);if(ee&&typeof ee=="string"||ee===!1){g.invalid.set(T,ee);continue}g.invalid.delete(T);let A=await a(g.values[T],g,q,h);g.output+=rne.unstyle(A);continue}q.placeholder=!1;let ne=x;x=await l(x,g,q,h),Y!==x?(g.values[T]=Y,x=r.styles.typing(Y),g.missing.delete(_)):(g.values[T]=void 0,Y=`<${_}>`,x=r.styles.primary(Y),q.placeholder=!0,g.required.has(T)&&g.missing.add(_)),g.missing.has(_)&&g.validating&&(x=r.styles.warning(Y)),g.invalid.has(T)&&g.validating&&(x=r.styles.danger(Y)),h===g.index&&(ne!==x?x=r.styles.underline(x):x=r.styles.heading(rne.unstyle(x))),h++}x&&(g.output+=x)}let m=g.output.split(` +`).map(v=>" "+v),y=s.length,b=0;for(let v of s)g.invalid.has(v.name)&&v.lines.forEach(x=>{m[x][0]===" "&&(m[x]=g.styles.danger(g.symbols.bullet)+m[x].slice(1))}),r.isValue(g.values[v.name])&&b++;return g.completed=(b/y*100).toFixed(0),g.output=m.join(` +`),g.output}};function sN(r,e,t,i){return(n,s,o,a)=>typeof o.field[r]=="function"?o.field[r].call(e,n,s,o,a):[i,n].find(l=>e.isValue(l))}});var ane=w((Wft,sne)=>{"use strict";var pYe=Eo(),dYe=nne(),CYe=_f(),one=class extends CYe{constructor(e){super(e);this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await dYe(this),await super.initialize()}async reset(e){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},e!==!0&&(await this.initialize(),await this.render())}moveCursor(e){let t=this.getItem();this.cursor+=e,t.cursor+=e}dispatch(e,t){if(!t.code&&!t.ctrl&&e!=null&&this.getItem()){this.append(e,t);return}this.alert()}append(e,t){let i=this.getItem(),n=i.input.slice(0,this.cursor),s=i.input.slice(this.cursor);this.input=i.input=`${n}${e}${s}`,this.moveCursor(1),this.render()}delete(){let e=this.getItem();if(this.cursor<=0||!e.input)return this.alert();let t=e.input.slice(this.cursor),i=e.input.slice(0,this.cursor-1);this.input=e.input=`${i}${t}`,this.moveCursor(-1),this.render()}increment(e){return e>=this.state.keys.length-1?0:e+1}decrement(e){return e<=0?this.state.keys.length-1:e-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(e){let t=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(t=this.styles.danger),t(`${this.state.completed}% completed`)}async render(){let{index:e,keys:t=[],submitted:i,size:n}=this.state,s=[this.options.newline,` +`].find(v=>v!=null),o=await this.prefix(),a=await this.separator(),l=await this.message(),c=[o,l,a].filter(Boolean).join(" ");this.state.prompt=c;let u=await this.header(),g=await this.error()||"",f=await this.hint()||"",h=i?"":await this.interpolate(this.state),p=this.state.key=t[e]||"",m=await this.format(p),y=await this.footer();m&&(c+=" "+m),f&&!m&&this.state.completed===0&&(c+=" "+f),this.clear(n);let b=[u,c,h,y,g.trim()];this.write(b.filter(Boolean).join(s)),this.restore()}getItem(e){let{items:t,keys:i,index:n}=this.state,s=t.find(o=>o.name===i[n]);return s&&s.input!=null&&(this.input=s.input,this.cursor=s.cursor),s}async submit(){typeof this.interpolate!="function"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:t,output:i,values:n}=this.state;if(e.size){let a="";for(let[l,c]of e)a+=`Invalid ${l}: ${c} +`;return this.state.error=a,super.submit()}if(t.size)return this.state.error="Required: "+[...t.keys()].join(", "),super.submit();let o=pYe.unstyle(i).split(` +`).map(a=>a.slice(1)).join(` +`);return this.value={values:n,result:o},super.submit()}};sne.exports=one});var cne=w((zft,Ane)=>{"use strict";var mYe="(Use + to sort)",EYe=Nl(),lne=class extends EYe{constructor(e){super(te(N({},e),{reorder:!1,sort:!0,multiple:!0}));this.state.hint=[this.options.hint,mYe].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,t){let i=await super.renderChoice(e,t),n=this.symbols.identicalTo+" ",s=this.index===t&&this.sorting?this.styles.muted(n):" ";return this.options.drag===!1&&(s=""),this.options.numbered===!0?s+`${t+1} - `+i:s+i}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}};Ane.exports=lne});var fne=w((_ft,une)=>{"use strict";var IYe=qC(),gne=class extends IYe{constructor(e={}){super(e);if(this.emptyError=e.emptyError||"No items were selected",this.term=process.env.TERM_PROGRAM,!this.options.header){let t=["","4 - Strongly Agree","3 - Agree","2 - Neutral","1 - Disagree","0 - Strongly Disagree",""];t=t.map(i=>this.styles.muted(i)),this.state.header=t.join(` + `)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let t=await super.toChoices(...e);for(let i of t)i.scale=yYe(5,this.options),i.scaleIdx=2;return t}dispatch(){this.alert()}space(){let e=this.focused,t=e.scale[e.scaleIdx],i=t.selected;return e.scale.forEach(n=>n.selected=!1),t.selected=!i,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIdx>=e.scale.length-1?this.alert():(e.scaleIdx++,this.render())}left(){let e=this.focused;return e.scaleIdx<=0?this.alert():(e.scaleIdx--,this.render())}indent(){return" "}async renderChoice(e,t){await this.onChoice(e,t);let i=this.index===t,n=this.term==="Hyper",s=n?9:8,o=n?"":" ",a=this.symbols.line.repeat(s),l=" ".repeat(s+(n?0:1)),c=x=>(x?this.styles.success("\u25C9"):"\u25EF")+o,u=t+1+".",g=i?this.styles.heading:this.styles.noop,f=await this.resolve(e.message,this.state,e,t),h=this.indent(e),p=h+e.scale.map((x,T)=>c(T===e.scaleIdx)).join(a),m=x=>x===e.scaleIdx?g(x):x,y=h+e.scale.map((x,T)=>m(T)).join(l),b=()=>[u,f].filter(Boolean).join(" "),v=()=>[b(),p,y," "].filter(Boolean).join(` +`);return i&&(p=this.styles.cyan(p),y=this.styles.cyan(y)),v()}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(i,n)=>await this.renderChoice(i,n)),t=await Promise.all(e);return t.length||t.push(this.styles.danger("No matching choices")),t.join(` +`)}format(){return this.state.submitted?this.choices.map(t=>this.styles.info(t.scaleIdx)).join(", "):""}async render(){let{submitted:e,size:t}=this.state,i=await this.prefix(),n=await this.separator(),s=await this.message(),o=[i,s,n].filter(Boolean).join(" ");this.state.prompt=o;let a=await this.header(),l=await this.format(),c=await this.error()||await this.hint(),u=await this.renderChoices(),g=await this.footer();(l||!c)&&(o+=" "+l),c&&!o.includes(c)&&(o+=" "+c),e&&!l&&!u&&this.multiple&&this.type!=="form"&&(o+=this.styles.danger(this.emptyError)),this.clear(t),this.write([o,a,u,g].filter(Boolean).join(` +`)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}};function yYe(r,e={}){if(Array.isArray(e.scale))return e.scale.map(i=>N({},i));let t=[];for(let i=1;i{hne.exports=iN()});var mne=w((Xft,dne)=>{"use strict";var wYe=H0(),Cne=class extends wYe{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||"no",this.enabled=this.options.enabled||"yes",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(e="",t){switch(e.toLowerCase()){case" ":return this.toggle();case"1":case"y":case"t":return this.enable();case"0":case"n":case"f":return this.disable();default:return this.alert()}}format(){let e=i=>this.styles.primary.underline(i);return[this.value?this.disabled:e(this.disabled),this.value?e(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:e}=this.state,t=await this.header(),i=await this.prefix(),n=await this.separator(),s=await this.message(),o=await this.format(),a=await this.error()||await this.hint(),l=await this.footer(),c=[i,s,n,o].join(" ");this.state.prompt=c,a&&!c.includes(a)&&(c+=" "+a),this.clear(e),this.write([t,c,l].filter(Boolean).join(` +`)),this.write(this.margin[2]),this.restore()}};dne.exports=Cne});var yne=w((Zft,Ene)=>{"use strict";var BYe=Nl(),Ine=class extends BYe{constructor(e){super(e);if(typeof this.options.correctChoice!="number"||this.options.correctChoice<0)throw new Error("Please specify the index of the correct answer from the list of choices")}async toChoices(e,t){let i=await super.toChoices(e,t);if(i.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>i.length)throw new Error("Please specify the index of the correct answer from the list of choices");return i}check(e){return e.index===this.options.correctChoice}async result(e){return{selectedAnswer:e,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}};Ene.exports=Ine});var Bne=w(oN=>{"use strict";var wne=Xi(),mi=(r,e)=>{wne.defineExport(oN,r,e),wne.defineExport(oN,r.toLowerCase(),e)};mi("AutoComplete",()=>uie());mi("BasicAuth",()=>Eie());mi("Confirm",()=>bie());mi("Editable",()=>vie());mi("Form",()=>U0());mi("Input",()=>iN());mi("Invisible",()=>Oie());mi("List",()=>Uie());mi("MultiSelect",()=>Gie());mi("Numeral",()=>Wie());mi("Password",()=>Vie());mi("Scale",()=>ene());mi("Select",()=>Nl());mi("Snippet",()=>ane());mi("Sort",()=>cne());mi("Survey",()=>fne());mi("Text",()=>pne());mi("Toggle",()=>mne());mi("Quiz",()=>yne())});var Qne=w((eht,bne)=>{bne.exports={ArrayPrompt:qC(),AuthPrompt:rN(),BooleanPrompt:H0(),NumberPrompt:nN(),StringPrompt:wu()}});var WC=w((tht,Sne)=>{"use strict";var vne=require("assert"),aN=require("events"),Ll=Xi(),ha=class extends aN{constructor(e,t){super();this.options=Ll.merge({},e),this.answers=N({},t)}register(e,t){if(Ll.isObject(e)){for(let n of Object.keys(e))this.register(n,e[n]);return this}vne.equal(typeof t,"function","expected a function");let i=e.toLowerCase();return t.prototype instanceof this.Prompt?this.prompts[i]=t:this.prompts[i]=t(this.Prompt,this),this}async prompt(e=[]){for(let t of[].concat(e))try{typeof t=="function"&&(t=await t.call(this)),await this.ask(Ll.merge({},this.options,t))}catch(i){return Promise.reject(i)}return this.answers}async ask(e){typeof e=="function"&&(e=await e.call(this));let t=Ll.merge({},this.options,e),{type:i,name:n}=e,{set:s,get:o}=Ll;if(typeof i=="function"&&(i=await i.call(this,e,this.answers)),!i)return this.answers[n];vne(this.prompts[i],`Prompt "${i}" is not registered`);let a=new this.prompts[i](t),l=o(this.answers,n);a.state.answers=this.answers,a.enquirer=this,n&&a.on("submit",u=>{this.emit("answer",n,u,a),s(this.answers,n,u)});let c=a.emit.bind(a);return a.emit=(...u)=>(this.emit.call(this,...u),c(...u)),this.emit("prompt",a,this),t.autofill&&l!=null?(a.value=a.input=l,t.autofill==="show"&&await a.submit()):l=a.value=await a.run(),l}use(e){return e.call(this,this),this}set Prompt(e){this._Prompt=e}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(e){this._Prompt=e}static get Prompt(){return this._Prompt||_f()}static get prompts(){return Bne()}static get types(){return Qne()}static get prompt(){let e=(t,...i)=>{let n=new this(...i),s=n.emit.bind(n);return n.emit=(...o)=>(e.emit(...o),s(...o)),n.prompt(t)};return Ll.mixinEmitter(e,new aN),e}};Ll.mixinEmitter(ha,new aN);var AN=ha.prompts;for(let r of Object.keys(AN)){let e=r.toLowerCase(),t=i=>new AN[r](i).run();ha.prompt[e]=t,ha[e]=t,ha[r]||Reflect.defineProperty(ha,r,{get:()=>AN[r]})}var JC=r=>{Ll.defineExport(ha,r,()=>ha.types[r])};JC("ArrayPrompt");JC("AuthPrompt");JC("BooleanPrompt");JC("NumberPrompt");JC("StringPrompt");Sne.exports=ha});var Une=w((Yht,Kne)=>{function xYe(r,e){for(var t=-1,i=r==null?0:r.length;++t{var kYe=$B(),PYe=Nf();function DYe(r,e,t,i){var n=!t;t||(t={});for(var s=-1,o=e.length;++s{var RYe=Zf(),FYe=Kf();function NYe(r,e){return r&&RYe(e,FYe(e),r)}jne.exports=NYe});var qne=w((Wht,Yne)=>{function LYe(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}Yne.exports=LYe});var Wne=w((zht,Jne)=>{var TYe=Rn(),OYe=f0(),MYe=qne(),KYe=Object.prototype,UYe=KYe.hasOwnProperty;function HYe(r){if(!TYe(r))return MYe(r);var e=OYe(r),t=[];for(var i in r)i=="constructor"&&(e||!UYe.call(r,i))||t.push(i);return t}Jne.exports=HYe});var $f=w((_ht,zne)=>{var jYe=$R(),GYe=Wne(),YYe=vC();function qYe(r){return YYe(r)?jYe(r,!0):GYe(r)}zne.exports=qYe});var Vne=w((Vht,_ne)=>{var JYe=Zf(),WYe=$f();function zYe(r,e){return r&&JYe(e,WYe(e),r)}_ne.exports=zYe});var hN=w((em,eh)=>{var _Ye=Ns(),Xne=typeof em=="object"&&em&&!em.nodeType&&em,Zne=Xne&&typeof eh=="object"&&eh&&!eh.nodeType&&eh,VYe=Zne&&Zne.exports===Xne,$ne=VYe?_Ye.Buffer:void 0,ese=$ne?$ne.allocUnsafe:void 0;function XYe(r,e){if(e)return r.slice();var t=r.length,i=ese?ese(t):new r.constructor(t);return r.copy(i),i}eh.exports=XYe});var pN=w((Xht,tse)=>{function ZYe(r,e){var t=-1,i=r.length;for(e||(e=Array(i));++t{var $Ye=Zf(),eqe=p0();function tqe(r,e){return $Ye(r,eqe(r),e)}rse.exports=tqe});var G0=w(($ht,nse)=>{var rqe=eF(),iqe=rqe(Object.getPrototypeOf,Object);nse.exports=iqe});var dN=w((ept,sse)=>{var nqe=t0(),sqe=G0(),oqe=p0(),aqe=oF(),Aqe=Object.getOwnPropertySymbols,lqe=Aqe?function(r){for(var e=[];r;)nqe(e,oqe(r)),r=sqe(r);return e}:aqe;sse.exports=lqe});var ase=w((tpt,ose)=>{var cqe=Zf(),uqe=dN();function gqe(r,e){return cqe(r,uqe(r),e)}ose.exports=gqe});var lse=w((rpt,Ase)=>{var fqe=sF(),hqe=dN(),pqe=$f();function dqe(r){return fqe(r,pqe,hqe)}Ase.exports=dqe});var use=w((ipt,cse)=>{var Cqe=Object.prototype,mqe=Cqe.hasOwnProperty;function Eqe(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&mqe.call(r,"index")&&(t.index=r.index,t.input=r.input),t}cse.exports=Eqe});var Y0=w((npt,gse)=>{var fse=iF();function Iqe(r){var e=new r.constructor(r.byteLength);return new fse(e).set(new fse(r)),e}gse.exports=Iqe});var pse=w((spt,hse)=>{var yqe=Y0();function wqe(r,e){var t=e?yqe(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}hse.exports=wqe});var Cse=w((opt,dse)=>{var Bqe=/\w*$/;function bqe(r){var e=new r.constructor(r.source,Bqe.exec(r));return e.lastIndex=r.lastIndex,e}dse.exports=bqe});var wse=w((apt,mse)=>{var Ese=Jc(),Ise=Ese?Ese.prototype:void 0,yse=Ise?Ise.valueOf:void 0;function Qqe(r){return yse?Object(yse.call(r)):{}}mse.exports=Qqe});var CN=w((Apt,Bse)=>{var Sqe=Y0();function vqe(r,e){var t=e?Sqe(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}Bse.exports=vqe});var Qse=w((lpt,bse)=>{var xqe=Y0(),kqe=pse(),Pqe=Cse(),Dqe=wse(),Rqe=CN(),Fqe="[object Boolean]",Nqe="[object Date]",Lqe="[object Map]",Tqe="[object Number]",Oqe="[object RegExp]",Mqe="[object Set]",Kqe="[object String]",Uqe="[object Symbol]",Hqe="[object ArrayBuffer]",jqe="[object DataView]",Gqe="[object Float32Array]",Yqe="[object Float64Array]",qqe="[object Int8Array]",Jqe="[object Int16Array]",Wqe="[object Int32Array]",zqe="[object Uint8Array]",_qe="[object Uint8ClampedArray]",Vqe="[object Uint16Array]",Xqe="[object Uint32Array]";function Zqe(r,e,t){var i=r.constructor;switch(e){case Hqe:return xqe(r);case Fqe:case Nqe:return new i(+r);case jqe:return kqe(r,t);case Gqe:case Yqe:case qqe:case Jqe:case Wqe:case zqe:case _qe:case Vqe:case Xqe:return Rqe(r,t);case Lqe:return new i;case Tqe:case Kqe:return new i(r);case Oqe:return Pqe(r);case Mqe:return new i;case Uqe:return Dqe(r)}}bse.exports=Zqe});var xse=w((cpt,Sse)=>{var $qe=Rn(),vse=Object.create,eJe=function(){function r(){}return function(e){if(!$qe(e))return{};if(vse)return vse(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}();Sse.exports=eJe});var mN=w((upt,kse)=>{var tJe=xse(),rJe=G0(),iJe=f0();function nJe(r){return typeof r.constructor=="function"&&!iJe(r)?tJe(rJe(r)):{}}kse.exports=nJe});var Dse=w((gpt,Pse)=>{var sJe=kC(),oJe=ta(),aJe="[object Map]";function AJe(r){return oJe(r)&&sJe(r)==aJe}Pse.exports=AJe});var Lse=w((fpt,Rse)=>{var lJe=Dse(),cJe=c0(),Fse=u0(),Nse=Fse&&Fse.isMap,uJe=Nse?cJe(Nse):lJe;Rse.exports=uJe});var Ose=w((hpt,Tse)=>{var gJe=kC(),fJe=ta(),hJe="[object Set]";function pJe(r){return fJe(r)&&gJe(r)==hJe}Tse.exports=pJe});var Hse=w((ppt,Mse)=>{var dJe=Ose(),CJe=c0(),Kse=u0(),Use=Kse&&Kse.isSet,mJe=Use?CJe(Use):dJe;Mse.exports=mJe});var Jse=w((dpt,jse)=>{var EJe=xC(),IJe=Une(),yJe=$B(),wJe=Gne(),BJe=Vne(),bJe=hN(),QJe=pN(),SJe=ise(),vJe=ase(),xJe=aF(),kJe=lse(),PJe=kC(),DJe=use(),RJe=Qse(),FJe=mN(),NJe=Ks(),LJe=bC(),TJe=Lse(),OJe=Rn(),MJe=Hse(),KJe=Kf(),UJe=$f(),HJe=1,jJe=2,GJe=4,Gse="[object Arguments]",YJe="[object Array]",qJe="[object Boolean]",JJe="[object Date]",WJe="[object Error]",Yse="[object Function]",zJe="[object GeneratorFunction]",_Je="[object Map]",VJe="[object Number]",qse="[object Object]",XJe="[object RegExp]",ZJe="[object Set]",$Je="[object String]",e3e="[object Symbol]",t3e="[object WeakMap]",r3e="[object ArrayBuffer]",i3e="[object DataView]",n3e="[object Float32Array]",s3e="[object Float64Array]",o3e="[object Int8Array]",a3e="[object Int16Array]",A3e="[object Int32Array]",l3e="[object Uint8Array]",c3e="[object Uint8ClampedArray]",u3e="[object Uint16Array]",g3e="[object Uint32Array]",dr={};dr[Gse]=dr[YJe]=dr[r3e]=dr[i3e]=dr[qJe]=dr[JJe]=dr[n3e]=dr[s3e]=dr[o3e]=dr[a3e]=dr[A3e]=dr[_Je]=dr[VJe]=dr[qse]=dr[XJe]=dr[ZJe]=dr[$Je]=dr[e3e]=dr[l3e]=dr[c3e]=dr[u3e]=dr[g3e]=!0;dr[WJe]=dr[Yse]=dr[t3e]=!1;function q0(r,e,t,i,n,s){var o,a=e&HJe,l=e&jJe,c=e&GJe;if(t&&(o=n?t(r,i,n,s):t(r)),o!==void 0)return o;if(!OJe(r))return r;var u=NJe(r);if(u){if(o=DJe(r),!a)return QJe(r,o)}else{var g=PJe(r),f=g==Yse||g==zJe;if(LJe(r))return bJe(r,a);if(g==qse||g==Gse||f&&!n){if(o=l||f?{}:FJe(r),!a)return l?vJe(r,BJe(o,r)):SJe(r,wJe(o,r))}else{if(!dr[g])return n?r:{};o=RJe(r,g,a)}}s||(s=new EJe);var h=s.get(r);if(h)return h;s.set(r,o),MJe(r)?r.forEach(function(y){o.add(q0(y,e,t,y,r,s))}):TJe(r)&&r.forEach(function(y,b){o.set(b,q0(y,e,t,b,r,s))});var p=c?l?kJe:xJe:l?UJe:KJe,m=u?void 0:p(r);return IJe(m||r,function(y,b){m&&(b=y,y=r[b]),yJe(o,b,q0(y,e,t,b,r,s))}),o}jse.exports=q0});var EN=w((Cpt,Wse)=>{var f3e=Jse(),h3e=1,p3e=4;function d3e(r){return f3e(r,h3e|p3e)}Wse.exports=d3e});var _se=w((mpt,zse)=>{var C3e=kR();function m3e(r,e,t){return r==null?r:C3e(r,e,t)}zse.exports=m3e});var toe=w((bpt,eoe)=>{function E3e(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}eoe.exports=E3e});var ioe=w((Qpt,roe)=>{var I3e=hC(),y3e=VP();function w3e(r,e){return e.length<2?r:I3e(r,y3e(e,0,-1))}roe.exports=w3e});var soe=w((Spt,noe)=>{var B3e=Ff(),b3e=toe(),Q3e=ioe(),S3e=gu();function v3e(r,e){return e=B3e(e,r),r=Q3e(r,e),r==null||delete r[S3e(b3e(e))]}noe.exports=v3e});var aoe=w((vpt,ooe)=>{var x3e=soe();function k3e(r,e){return r==null?!0:x3e(r,e)}ooe.exports=k3e});var doe=w((idt,poe)=>{poe.exports={name:"@yarnpkg/cli",version:"3.2.2",license:"BSD-2-Clause",main:"./sources/index.ts",dependencies:{"@yarnpkg/core":"workspace:^","@yarnpkg/fslib":"workspace:^","@yarnpkg/libzip":"workspace:^","@yarnpkg/parsers":"workspace:^","@yarnpkg/plugin-compat":"workspace:^","@yarnpkg/plugin-dlx":"workspace:^","@yarnpkg/plugin-essentials":"workspace:^","@yarnpkg/plugin-file":"workspace:^","@yarnpkg/plugin-git":"workspace:^","@yarnpkg/plugin-github":"workspace:^","@yarnpkg/plugin-http":"workspace:^","@yarnpkg/plugin-init":"workspace:^","@yarnpkg/plugin-link":"workspace:^","@yarnpkg/plugin-nm":"workspace:^","@yarnpkg/plugin-npm":"workspace:^","@yarnpkg/plugin-npm-cli":"workspace:^","@yarnpkg/plugin-pack":"workspace:^","@yarnpkg/plugin-patch":"workspace:^","@yarnpkg/plugin-pnp":"workspace:^","@yarnpkg/plugin-pnpm":"workspace:^","@yarnpkg/shell":"workspace:^",chalk:"^3.0.0","ci-info":"^3.2.0",clipanion:"^3.2.0-rc.4",semver:"^7.1.2",tslib:"^1.13.0",typanion:"^3.3.0",yup:"^0.32.9"},devDependencies:{"@types/semver":"^7.1.0","@types/yup":"^0","@yarnpkg/builder":"workspace:^","@yarnpkg/monorepo":"workspace:^","@yarnpkg/pnpify":"workspace:^",micromatch:"^4.0.2"},peerDependencies:{"@yarnpkg/core":"workspace:^"},scripts:{postpack:"rm -rf lib",prepack:'run build:compile "$(pwd)"',"build:cli+hook":"run build:pnp:hook && builder build bundle","build:cli":"builder build bundle","run:cli":"builder run","update-local":"run build:cli --no-git-hash && rsync -a --delete bundles/ bin/"},publishConfig:{main:"./lib/index.js",types:"./lib/index.d.ts",bin:null},files:["/lib/**/*","!/lib/pluginConfiguration.*","!/lib/cli.*"],"@yarnpkg/builder":{bundles:{standard:["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-dlx","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@yarnpkg/plugin-link","@yarnpkg/plugin-nm","@yarnpkg/plugin-npm","@yarnpkg/plugin-npm-cli","@yarnpkg/plugin-pack","@yarnpkg/plugin-patch","@yarnpkg/plugin-pnp","@yarnpkg/plugin-pnpm"]}},repository:{type:"git",url:"ssh://git@github.com/yarnpkg/berry.git",directory:"packages/yarnpkg-cli"},engines:{node:">=12 <14 || 14.2 - 14.9 || >14.10.0"}}});var DN=w((LEt,rae)=>{"use strict";rae.exports=function(e,t){t===!0&&(t=0);var i=e.indexOf("://"),n=e.substring(0,i).split("+").filter(Boolean);return typeof t=="number"?n[t]:n}});var RN=w((TEt,iae)=>{"use strict";var V3e=DN();function nae(r){if(Array.isArray(r))return r.indexOf("ssh")!==-1||r.indexOf("rsync")!==-1;if(typeof r!="string")return!1;var e=V3e(r);return r=r.substring(r.indexOf("://")+3),nae(e)?!0:r.indexOf("@"){"use strict";var X3e=DN(),Z3e=RN(),$3e=require("querystring");function eWe(r){r=(r||"").trim();var e={protocols:X3e(r),protocol:null,port:null,resource:"",user:"",pathname:"",hash:"",search:"",href:r,query:Object.create(null)},t=r.indexOf("://"),i=-1,n=null,s=null;r.startsWith(".")&&(r.startsWith("./")&&(r=r.substring(2)),e.pathname=r,e.protocol="file");var o=r.charAt(1);return e.protocol||(e.protocol=e.protocols[0],e.protocol||(Z3e(r)?e.protocol="ssh":((o==="/"||o==="~")&&(r=r.substring(2)),e.protocol="file"))),t!==-1&&(r=r.substring(t+3)),s=r.split("/"),e.protocol!=="file"?e.resource=s.shift():e.resource="",n=e.resource.split("@"),n.length===2&&(e.user=n[0],e.resource=n[1]),n=e.resource.split(":"),n.length===2&&(e.resource=n[0],n[1]?(e.port=Number(n[1]),isNaN(e.port)&&(e.port=null,s.unshift(n[1]))):e.port=null),s=s.filter(Boolean),e.protocol==="file"?e.pathname=e.href:e.pathname=e.pathname||(e.protocol!=="file"||e.href[0]==="/"?"/":"")+s.join("/"),n=e.pathname.split("#"),n.length===2&&(e.pathname=n[0],e.hash=n[1]),n=e.pathname.split("?"),n.length===2&&(e.pathname=n[0],e.search=n[1]),e.query=$3e.parse(e.search),e.href=e.href.replace(/\/$/,""),e.pathname=e.pathname.replace(/\/$/,""),e}sae.exports=eWe});var lae=w((MEt,aae)=>{"use strict";var tWe="text/plain",rWe="us-ascii",Aae=(r,e)=>e.some(t=>t instanceof RegExp?t.test(r):t===r),iWe=(r,{stripHash:e})=>{let t=/^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(r);if(!t)throw new Error(`Invalid URL: ${r}`);let{type:i,data:n,hash:s}=t.groups,o=i.split(";");s=e?"":s;let a=!1;o[o.length-1]==="base64"&&(o.pop(),a=!0);let l=(o.shift()||"").toLowerCase(),u=[...o.map(g=>{let[f,h=""]=g.split("=").map(p=>p.trim());return f==="charset"&&(h=h.toLowerCase(),h===rWe)?"":`${f}${h?`=${h}`:""}`}).filter(Boolean)];return a&&u.push("base64"),(u.length!==0||l&&l!==tWe)&&u.unshift(l),`data:${u.join(";")},${a?n.trim():n}${s?`#${s}`:""}`},nWe=(r,e)=>{if(e=N({defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0},e),r=r.trim(),/^data:/i.test(r))return iWe(r,e);if(/^view-source:/i.test(r))throw new Error("`view-source:` is not supported as it is a non-standard protocol");let t=r.startsWith("//");!t&&/^\.*\//.test(r)||(r=r.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let n=new URL(r);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&n.protocol==="https:"&&(n.protocol="http:"),e.forceHttps&&n.protocol==="http:"&&(n.protocol="https:"),e.stripAuthentication&&(n.username="",n.password=""),e.stripHash?n.hash="":e.stripTextFragment&&(n.hash=n.hash.replace(/#?:~:text.*?$/i,"")),n.pathname&&(n.pathname=n.pathname.replace(/(?0){let o=n.pathname.split("/"),a=o[o.length-1];Aae(a,e.removeDirectoryIndex)&&(o=o.slice(0,o.length-1),n.pathname=o.slice(1).join("/")+"/")}if(n.hostname&&(n.hostname=n.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.(?!www\.)(?:[a-z\-\d]{1,63})\.(?:[a-z.\-\d]{2,63})$/.test(n.hostname)&&(n.hostname=n.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let o of[...n.searchParams.keys()])Aae(o,e.removeQueryParameters)&&n.searchParams.delete(o);e.removeQueryParameters===!0&&(n.search=""),e.sortQueryParameters&&n.searchParams.sort(),e.removeTrailingSlash&&(n.pathname=n.pathname.replace(/\/$/,""));let s=r;return r=n.toString(),!e.removeSingleSlash&&n.pathname==="/"&&!s.endsWith("/")&&n.hash===""&&(r=r.replace(/\/$/,"")),(e.removeTrailingSlash||n.pathname==="/")&&n.hash===""&&e.removeSingleSlash&&(r=r.replace(/\/$/,"")),t&&!e.normalizeProtocol&&(r=r.replace(/^http:\/\//,"//")),e.stripProtocol&&(r=r.replace(/^(?:https?:)?\/\//,"")),r};aae.exports=nWe});var uae=w((KEt,cae)=>{"use strict";var sWe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},oWe=oae(),aWe=lae();function AWe(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(typeof r!="string"||!r.trim())throw new Error("Invalid url.");e&&((typeof e=="undefined"?"undefined":sWe(e))!=="object"&&(e={stripHash:!1}),r=aWe(r,e));var t=oWe(r);return t}cae.exports=AWe});var hae=w((UEt,gae)=>{"use strict";var lWe=uae(),fae=RN();function cWe(r){var e=lWe(r);e.token="";var t=e.user.split(":");return t.length===2&&(t[1]==="x-oauth-basic"?e.token=t[0]:t[0]==="x-token-auth"&&(e.token=t[1])),fae(e.protocols)||fae(r)?e.protocol="ssh":e.protocols.length?e.protocol=e.protocols[0]:e.protocol="file",e.href=e.href.replace(/\/$/,""),e}gae.exports=cWe});var dae=w((HEt,pae)=>{"use strict";var uWe=hae();function FN(r){if(typeof r!="string")throw new Error("The url must be a string.");var e=uWe(r),t=e.resource.split("."),i=null;switch(e.toString=function(l){return FN.stringify(this,l)},e.source=t.length>2?t.slice(1-t.length).join("."):e.source=e.resource,e.git_suffix=/\.git$/.test(e.pathname),e.name=decodeURIComponent(e.pathname.replace(/^\//,"").replace(/\.git$/,"")),e.owner=decodeURIComponent(e.user),e.source){case"git.cloudforge.com":e.owner=e.user,e.organization=t[0],e.source="cloudforge.com";break;case"visualstudio.com":if(e.resource==="vs-ssh.visualstudio.com"){i=e.name.split("/"),i.length===4&&(e.organization=i[1],e.owner=i[2],e.name=i[3],e.full_name=i[2]+"/"+i[3]);break}else{i=e.name.split("/"),i.length===2?(e.owner=i[1],e.name=i[1],e.full_name="_git/"+e.name):i.length===3?(e.name=i[2],i[0]==="DefaultCollection"?(e.owner=i[2],e.organization=i[0],e.full_name=e.organization+"/_git/"+e.name):(e.owner=i[0],e.full_name=e.owner+"/_git/"+e.name)):i.length===4&&(e.organization=i[0],e.owner=i[1],e.name=i[3],e.full_name=e.organization+"/"+e.owner+"/_git/"+e.name);break}case"dev.azure.com":case"azure.com":if(e.resource==="ssh.dev.azure.com"){i=e.name.split("/"),i.length===4&&(e.organization=i[1],e.owner=i[2],e.name=i[3]);break}else{i=e.name.split("/"),i.length===5?(e.organization=i[0],e.owner=i[1],e.name=i[4],e.full_name="_git/"+e.name):i.length===3?(e.name=i[2],i[0]==="DefaultCollection"?(e.owner=i[2],e.organization=i[0],e.full_name=e.organization+"/_git/"+e.name):(e.owner=i[0],e.full_name=e.owner+"/_git/"+e.name)):i.length===4&&(e.organization=i[0],e.owner=i[1],e.name=i[3],e.full_name=e.organization+"/"+e.owner+"/_git/"+e.name);break}default:i=e.name.split("/");var n=i.length-1;if(i.length>=2){var s=i.indexOf("blob",2),o=i.indexOf("tree",2),a=i.indexOf("commit",2);n=s>0?s-1:o>0?o-1:a>0?a-1:n,e.owner=i.slice(0,n).join("/"),e.name=i[n],a&&(e.commit=i[n+2])}e.ref="",e.filepathtype="",e.filepath="",i.length>n+2&&["blob","tree"].indexOf(i[n+1])>=0&&(e.filepathtype=i[n+1],e.ref=i[n+2],i.length>n+3&&(e.filepath=i.slice(n+3).join("/"))),e.organization=e.owner;break}return e.full_name||(e.full_name=e.owner,e.name&&(e.full_name&&(e.full_name+="/"),e.full_name+=e.name)),e}FN.stringify=function(r,e){e=e||(r.protocols&&r.protocols.length?r.protocols.join("+"):r.protocol);var t=r.port?":"+r.port:"",i=r.user||"git",n=r.git_suffix?".git":"";switch(e){case"ssh":return t?"ssh://"+i+"@"+r.resource+t+"/"+r.full_name+n:i+"@"+r.resource+":"+r.full_name+n;case"git+ssh":case"ssh+git":case"ftp":case"ftps":return e+"://"+i+"@"+r.resource+t+"/"+r.full_name+n;case"http":case"https":var s=r.token?gWe(r):r.user&&(r.protocols.includes("http")||r.protocols.includes("https"))?r.user+"@":"";return e+"://"+s+r.resource+t+"/"+r.full_name+n;default:return r.href}};function gWe(r){switch(r.source){case"bitbucket.org":return"x-token-auth:"+r.token+"@";default:return r.token+"@"}}pae.exports=FN});var cL=w((Vwt,Mae)=>{var DWe=Nf(),RWe=Pf();function FWe(r,e,t){(t!==void 0&&!RWe(r[e],t)||t===void 0&&!(e in r))&&DWe(r,e,t)}Mae.exports=FWe});var Uae=w((Xwt,Kae)=>{var NWe=vC(),LWe=ta();function TWe(r){return LWe(r)&&NWe(r)}Kae.exports=TWe});var Gae=w((Zwt,Hae)=>{var OWe=Wc(),MWe=G0(),KWe=ta(),UWe="[object Object]",HWe=Function.prototype,jWe=Object.prototype,jae=HWe.toString,GWe=jWe.hasOwnProperty,YWe=jae.call(Object);function qWe(r){if(!KWe(r)||OWe(r)!=UWe)return!1;var e=MWe(r);if(e===null)return!0;var t=GWe.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&jae.call(t)==YWe}Hae.exports=qWe});var uL=w(($wt,Yae)=>{function JWe(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}Yae.exports=JWe});var Jae=w((eBt,qae)=>{var WWe=Zf(),zWe=$f();function _We(r){return WWe(r,zWe(r))}qae.exports=_We});var Zae=w((tBt,Wae)=>{var zae=cL(),VWe=hN(),XWe=CN(),ZWe=pN(),$We=mN(),_ae=dC(),Vae=Ks(),e4e=Uae(),t4e=bC(),r4e=VB(),i4e=Rn(),n4e=Gae(),s4e=g0(),Xae=uL(),o4e=Jae();function a4e(r,e,t,i,n,s,o){var a=Xae(r,t),l=Xae(e,t),c=o.get(l);if(c){zae(r,t,c);return}var u=s?s(a,l,t+"",r,e,o):void 0,g=u===void 0;if(g){var f=Vae(l),h=!f&&t4e(l),p=!f&&!h&&s4e(l);u=l,f||h||p?Vae(a)?u=a:e4e(a)?u=ZWe(a):h?(g=!1,u=VWe(l,!0)):p?(g=!1,u=XWe(l,!0)):u=[]:n4e(l)||_ae(l)?(u=a,_ae(a)?u=o4e(a):(!i4e(a)||r4e(a))&&(u=$We(l))):g=!1}g&&(o.set(l,u),n(u,l,i,s,o),o.delete(l)),zae(r,t,u)}Wae.exports=a4e});var tAe=w((rBt,$ae)=>{var A4e=xC(),l4e=cL(),c4e=XR(),u4e=Zae(),g4e=Rn(),f4e=$f(),h4e=uL();function eAe(r,e,t,i,n){r!==e&&c4e(e,function(s,o){if(n||(n=new A4e),g4e(s))u4e(r,e,o,t,eAe,i,n);else{var a=i?i(h4e(r,o),s,o+"",r,e,n):void 0;a===void 0&&(a=s),l4e(r,o,a)}},f4e)}$ae.exports=eAe});var iAe=w((iBt,rAe)=>{var p4e=r0(),d4e=RR(),C4e=FR();function m4e(r,e){return C4e(d4e(r,e,p4e),r+"")}rAe.exports=m4e});var sAe=w((nBt,nAe)=>{var E4e=Pf(),I4e=vC(),y4e=pC(),w4e=Rn();function B4e(r,e,t){if(!w4e(t))return!1;var i=typeof e;return(i=="number"?I4e(t)&&y4e(e,t.length):i=="string"&&e in t)?E4e(t[e],r):!1}nAe.exports=B4e});var aAe=w((sBt,oAe)=>{var b4e=iAe(),Q4e=sAe();function S4e(r){return b4e(function(e,t){var i=-1,n=t.length,s=n>1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(s=r.length>3&&typeof s=="function"?(n--,s):void 0,o&&Q4e(t[0],t[1],o)&&(s=n<3?void 0:s,n=1),e=Object(e);++i{var v4e=tAe(),x4e=aAe(),k4e=x4e(function(r,e,t){v4e(r,e,t)});AAe.exports=k4e});var QAe=w((u0t,bAe)=>{var QL;bAe.exports=()=>(typeof QL=="undefined"&&(QL=require("zlib").brotliDecompressSync(Buffer.from("W8aBWMM86xigdkIKKln3s6WtEQ8xBfvtGm6l6HpWsM0HlG2fJUSg2yACwxuWsoJiQVU1b2mMsbbD2jhAVbLq6wOxXSGkuAai1rhjCNmwktEatn0bh2yzFJ6DjhWTRsWjxW4OZpG5hevFO0Y4KH1xt2tGfiQqb0Ge/cqOg+eObuOoLKh8LvMs05MkvGyS8LZL9Vncf7R/hUSi/6j223sFG6nRVySV/u7AOBf/F0lYp0ki6SkgjpsHYYgoMdd2RLrULU/74nrZNP88vmnLRRMkjFXwVcaklPKSzqyo1wKuaYujlenq36aS8wnL94QsyE1pdubo4/Ts/77N/P/5+bqHblKjKBPS1e7mQOgwZfED0s3HxxhLNhpkSdUVi3OefH6/9Pv6BU7Gohy1y8p45S3L7nQsYkg5VcNJdGwbOu/V6q1av63G/zycE0vIQyyBFtCM/S82r09R5n+b6j2Xm38HUJmXvwRknzrWaSwyBLKVylNeXeSFQnb+Qgc0CCjxBZmmotNKePIDb4M8HpuV1qb0TVDSl9EN0uPj1aL8Lf54eB/QZV08Vvf0TCZfOpMQ4g1QhsgiIq4xDmw3R0OYgB9gS02zaomvEv9tX6nOIbUfKse52zG40pFjMO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yjeVHMkxLFvDmZNYe+EF/fw9oMFTDbPH6+H4T/GVHAA==","base64")).toString()),QL)});var TAe=w((Y0t,LAe)=>{var kL;LAe.exports=()=>(typeof kL=="undefined"&&(kL=require("zlib").brotliDecompressSync(Buffer.from("G98hACwL4rGroa5xFloZvem1VcYrNr4K3e9n9r8/X5MOCYHdva5v4pXS1QjWc4tyDqmKnix1U4T8ajah2kQmaKYVQGR2JkiPD9HmUr1q9nHCWrGdiqCk8rzbStVePjiEPXFcOP9pv14jAZX9QobAiuy5lEef34ZwEy7i3Jm3yyHaX2JHqrpVVex8hKx0EbLCdhlOrXITGgMCBEptPxtRLx3hx9+LfNF6W/zeX24omB7/7uWCRfCmxauPftgcYYZc1/N6qOmBcOUdvwbvLI38OUjL8ejESp5hWp+kQBAEATki7M6u7q9fchhnAE4D8W85Cf2S3QQ0/4EfJwKCdm8jpLULdW6KyLvQomntUh3lYuX05RMwTeDwW2j0nIezQkcOumBaRlHL/7cZWGBg+2dfJG1P7TVw0bn8anFVAmIccIhluGcMaO+27fgQ0g0zHBslkwLiCSllgiuIBgIeiU8XaPZw9Kx5lsAP7Za6whksslaONmn5DbyjTP0TIsAUugtU8+pnMy6ATpsPVs1B/LovTC/54WpD4sw5lhxZyeUUIJhSJqKz7W3FFhP9+3GgOq7nYWgxrcUi7vxyUksNlu+MuUzXuHHvAqLnqbIckSnxj3eeAJQ+HHe9zP9oAHQ01FtQVDQRgMRes7BGUSBhqNoGVKdCUwE5K/jdXD/d05nCWJljUQBd04UFgw3iR/W0W+y9WdUEuTma8+yUqsvs3+zknyB1zmJzevvkNDKQx3xfoXyhH55laE+dqESxRCaKR2zWk+ZOPTVl1RTz2EVXsHui7N2zqnI8Lk4xy9OrJnQ1BZ92B6Ov2u7O8tQyt9M3N3FgqdF17H7mRVd8XqLaF0dByhD7J+kv0esV7EJuOCJDCToJ+o536lODrimbBZ18udv+SEwZzkMEtFr+NBoCWnvQC8vUa8nigaa/B6X6lUSpRvAutKlnEfUfcCb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8NyNLlXAbvSXAX0x3Ve7unalIzbKlEmVV2PDTL92+DUZwBIUYhkGaFP5ETAA==","base64")).toString()),kL)});var YAe=w((TL,OL)=>{(function(r){TL&&typeof TL=="object"&&typeof OL!="undefined"?OL.exports=r():typeof define=="function"&&define.amd?define([],r):typeof window!="undefined"?window.isWindows=r():typeof global!="undefined"?global.isWindows=r():typeof self!="undefined"?self.isWindows=r():this.isWindows=r()})(function(){"use strict";return function(){return process&&(process.platform==="win32"||/^(msys|cygwin)$/.test(process.env.OSTYPE))}})});var zAe=w((Vbt,qAe)=>{"use strict";ML.ifExists=C8e;var ah=require("util"),zs=require("path"),JAe=YAe(),m8e=/^#!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/,E8e={createPwshFile:!0,createCmdFile:JAe(),fs:require("fs")},I8e=new Map([[".js","node"],[".cjs","node"],[".mjs","node"],[".cmd","cmd"],[".bat","cmd"],[".ps1","pwsh"],[".sh","sh"]]);function WAe(r){let e=N(N({},E8e),r),t=e.fs;return e.fs_={chmod:t.chmod?ah.promisify(t.chmod):async()=>{},mkdir:ah.promisify(t.mkdir),readFile:ah.promisify(t.readFile),stat:ah.promisify(t.stat),unlink:ah.promisify(t.unlink),writeFile:ah.promisify(t.writeFile)},e}async function ML(r,e,t){let i=WAe(t);await i.fs_.stat(r),await y8e(r,e,i)}function C8e(r,e,t){return ML(r,e,t).catch(()=>{})}function w8e(r,e){return e.fs_.unlink(r).catch(()=>{})}async function y8e(r,e,t){let i=await Q8e(r,t);return await B8e(e,t),b8e(r,e,i,t)}function B8e(r,e){return e.fs_.mkdir(zs.dirname(r),{recursive:!0})}function b8e(r,e,t,i){let n=WAe(i),s=[{generator:x8e,extension:""}];return n.createCmdFile&&s.push({generator:v8e,extension:".cmd"}),n.createPwshFile&&s.push({generator:k8e,extension:".ps1"}),Promise.all(s.map(o=>S8e(r,e+o.extension,t,o.generator,n)))}function P8e(r,e){return w8e(r,e)}function R8e(r,e){return D8e(r,e)}async function Q8e(r,e){let n=(await e.fs_.readFile(r,"utf8")).trim().split(/\r*\n/)[0].match(m8e);if(!n){let s=zs.extname(r).toLowerCase();return{program:I8e.get(s)||null,additionalArgs:""}}return{program:n[1],additionalArgs:n[2]}}async function S8e(r,e,t,i,n){let s=n.preserveSymlinks?"--preserve-symlinks":"",o=[t.additionalArgs,s].filter(a=>a).join(" ");return n=Object.assign({},n,{prog:t.program,args:o}),await P8e(e,n),await n.fs_.writeFile(e,i(r,e,n),"utf8"),R8e(e,n)}function v8e(r,e,t){let n=zs.relative(zs.dirname(e),r).split("/").join("\\"),s=zs.isAbsolute(n)?`"${n}"`:`"%~dp0\\${n}"`,o,a=t.prog,l=t.args||"",c=KL(t.nodePath).win32;a?(o=`"%~dp0\\${a}.exe"`,n=s):(a=s,l="",n="");let u=t.progArgs?`${t.progArgs.join(" ")} `:"",g=c?`@SET NODE_PATH=${c}\r +`:"";return o?g+=`@IF EXIST ${o} (\r + ${o} ${l} ${n} ${u}%*\r +) ELSE (\r + @SETLOCAL\r + @SET PATHEXT=%PATHEXT:;.JS;=;%\r + ${a} ${l} ${n} ${u}%*\r +)\r +`:g+=`@${a} ${l} ${n} ${u}%*\r +`,g}function x8e(r,e,t){let i=zs.relative(zs.dirname(e),r),n=t.prog&&t.prog.split("\\").join("/"),s;i=i.split("\\").join("/");let o=zs.isAbsolute(i)?`"${i}"`:`"$basedir/${i}"`,a=t.args||"",l=KL(t.nodePath).posix;n?(s=`"$basedir/${t.prog}"`,i=o):(n=o,a="",i="");let c=t.progArgs?`${t.progArgs.join(" ")} `:"",u=`#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')") + +case \`uname\` in + *CYGWIN*) basedir=\`cygpath -w "$basedir"\`;; +esac + +`,g=t.nodePath?`export NODE_PATH="${l}" +`:"";return s?u+=`${g}if [ -x ${s} ]; then + exec ${s} ${a} ${i} ${c}"$@" +else + exec ${n} ${a} ${i} ${c}"$@" +fi +`:u+=`${g}${n} ${a} ${i} ${c}"$@" +exit $? +`,u}function k8e(r,e,t){let i=zs.relative(zs.dirname(e),r),n=t.prog&&t.prog.split("\\").join("/"),s=n&&`"${n}$exe"`,o;i=i.split("\\").join("/");let a=zs.isAbsolute(i)?`"${i}"`:`"$basedir/${i}"`,l=t.args||"",c=KL(t.nodePath),u=c.win32,g=c.posix;s?(o=`"$basedir/${t.prog}$exe"`,i=a):(s=a,l="",i="");let f=t.progArgs?`${t.progArgs.join(" ")} `:"",h=`#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +${t.nodePath?`$env_node_path=$env:NODE_PATH +$env:NODE_PATH="${u}" +`:""}if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +}`;return t.nodePath&&(h+=` else { + $env:NODE_PATH="${g}" +}`),o?h+=` +$ret=0 +if (Test-Path ${o}) { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & ${o} ${l} ${i} ${f}$args + } else { + & ${o} ${l} ${i} ${f}$args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & ${s} ${l} ${i} ${f}$args + } else { + & ${s} ${l} ${i} ${f}$args + } + $ret=$LASTEXITCODE +} +${t.nodePath?`$env:NODE_PATH=$env_node_path +`:""}exit $ret +`:h+=` +# Support pipeline input +if ($MyInvocation.ExpectingInput) { + $input | & ${s} ${l} ${i} ${f}$args +} else { + & ${s} ${l} ${i} ${f}$args +} +${t.nodePath?`$env:NODE_PATH=$env_node_path +`:""}exit $LASTEXITCODE +`,h}function D8e(r,e){return e.fs_.chmod(r,493)}function KL(r){if(!r)return{win32:"",posix:""};let e=typeof r=="string"?r.split(zs.delimiter):Array.from(r),t={};for(let i=0;i`/mnt/${a.toLowerCase()}`):e[i];t.win32=t.win32?`${t.win32};${n}`:n,t.posix=t.posix?`${t.posix}:${s}`:s,t[i]={win32:n,posix:s}}return t}qAe.exports=ML});var eT=w((RSt,hle)=>{hle.exports=require("stream")});var mle=w((FSt,ple)=>{"use strict";function dle(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function Z8e(r){for(var e=1;e0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(t){var i={data:t,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=t+i.data;return n}},{key:"concat",value:function(t){if(this.length===0)return lb.alloc(0);for(var i=lb.allocUnsafe(t>>>0),n=this.head,s=0;n;)nze(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(t,i){var n;return to.length?o.length:t;if(a===o.length?s+=o:s+=o.slice(0,t),t-=a,t===0){a===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(t){var i=lb.allocUnsafe(t),n=this.head,s=1;for(n.data.copy(i),t-=n.data.length;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(o.copy(i,i.length-t,0,a),t-=a,t===0){a===o.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++s}return this.length-=s,i}},{key:ize,value:function(t,i){return tT(this,Z8e({},i,{depth:0,customInspect:!1}))}}]),r}()});var iT=w((NSt,Ele)=>{"use strict";function sze(r,e){var t=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(rT,this,r)):process.nextTick(rT,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(s){!e&&s?t._writableState?t._writableState.errorEmitted?process.nextTick(cb,t):(t._writableState.errorEmitted=!0,process.nextTick(Ile,t,s)):process.nextTick(Ile,t,s):e?(process.nextTick(cb,t),e(s)):process.nextTick(cb,t)}),this)}function Ile(r,e){rT(r,e),cb(r)}function cb(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function oze(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function rT(r,e){r.emit("error",e)}function aze(r,e){var t=r._readableState,i=r._writableState;t&&t.autoDestroy||i&&i.autoDestroy?r.destroy(e):r.emit("error",e)}Ele.exports={destroy:sze,undestroy:oze,errorOrDestroy:aze}});var Ul=w((LSt,yle)=>{"use strict";var wle={};function _s(r,e,t){t||(t=Error);function i(s,o,a){return typeof e=="string"?e:e(s,o,a)}class n extends t{constructor(o,a,l){super(i(o,a,l))}}n.prototype.name=t.name,n.prototype.code=r,wle[r]=n}function Ble(r,e){if(Array.isArray(r)){let t=r.length;return r=r.map(i=>String(i)),t>2?`one of ${e} ${r.slice(0,t-1).join(", ")}, or `+r[t-1]:t===2?`one of ${e} ${r[0]} or ${r[1]}`:`of ${e} ${r[0]}`}else return`of ${e} ${String(r)}`}function Aze(r,e,t){return r.substr(!t||t<0?0:+t,e.length)===e}function lze(r,e,t){return(t===void 0||t>r.length)&&(t=r.length),r.substring(t-e.length,t)===e}function cze(r,e,t){return typeof t!="number"&&(t=0),t+e.length>r.length?!1:r.indexOf(e,t)!==-1}_s("ERR_INVALID_OPT_VALUE",function(r,e){return'The value "'+e+'" is invalid for option "'+r+'"'},TypeError);_s("ERR_INVALID_ARG_TYPE",function(r,e,t){let i;typeof e=="string"&&Aze(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(lze(r," argument"))n=`The ${r} ${i} ${Ble(e,"type")}`;else{let s=cze(r,".")?"property":"argument";n=`The "${r}" ${s} ${i} ${Ble(e,"type")}`}return n+=`. Received type ${typeof t}`,n},TypeError);_s("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");_s("ERR_METHOD_NOT_IMPLEMENTED",function(r){return"The "+r+" method is not implemented"});_s("ERR_STREAM_PREMATURE_CLOSE","Premature close");_s("ERR_STREAM_DESTROYED",function(r){return"Cannot call "+r+" after a stream was destroyed"});_s("ERR_MULTIPLE_CALLBACK","Callback called multiple times");_s("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");_s("ERR_STREAM_WRITE_AFTER_END","write after end");_s("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);_s("ERR_UNKNOWN_ENCODING",function(r){return"Unknown encoding: "+r},TypeError);_s("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");yle.exports.codes=wle});var nT=w((TSt,ble)=>{"use strict";var uze=Ul().codes.ERR_INVALID_OPT_VALUE;function gze(r,e,t){return r.highWaterMark!=null?r.highWaterMark:e?r[t]:null}function fze(r,e,t,i){var n=gze(e,i,t);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?t:"highWaterMark";throw new uze(s,n)}return Math.floor(n)}return r.objectMode?16:16*1024}ble.exports={getHighWaterMark:fze}});var Qle=w((OSt,sT)=>{typeof Object.create=="function"?sT.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:sT.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}}});var Hl=w((MSt,oT)=>{try{if(aT=require("util"),typeof aT.inherits!="function")throw"";oT.exports=aT.inherits}catch(r){oT.exports=Qle()}var aT});var vle=w((KSt,Sle)=>{Sle.exports=require("util").deprecate});var cT=w((USt,xle)=>{"use strict";xle.exports=Gr;function kle(r){var e=this;this.next=null,this.entry=null,this.finish=function(){hze(e,r)}}var ch;Gr.WritableState=Gm;var pze={deprecate:vle()},Ple=eT(),ub=require("buffer").Buffer,dze=global.Uint8Array||function(){};function Cze(r){return ub.from(r)}function mze(r){return ub.isBuffer(r)||r instanceof dze}var AT=iT(),Eze=nT(),Ize=Eze.getHighWaterMark,jl=Ul().codes,yze=jl.ERR_INVALID_ARG_TYPE,wze=jl.ERR_METHOD_NOT_IMPLEMENTED,Bze=jl.ERR_MULTIPLE_CALLBACK,bze=jl.ERR_STREAM_CANNOT_PIPE,Qze=jl.ERR_STREAM_DESTROYED,Sze=jl.ERR_STREAM_NULL_VALUES,vze=jl.ERR_STREAM_WRITE_AFTER_END,xze=jl.ERR_UNKNOWN_ENCODING,uh=AT.errorOrDestroy;Hl()(Gr,Ple);function kze(){}function Gm(r,e,t){ch=ch||ku(),r=r||{},typeof t!="boolean"&&(t=e instanceof ch),this.objectMode=!!r.objectMode,t&&(this.objectMode=this.objectMode||!!r.writableObjectMode),this.highWaterMark=Ize(this,r,"writableHighWaterMark",t),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=r.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=r.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){Pze(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=r.emitClose!==!1,this.autoDestroy=!!r.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new kle(this)}Gm.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t};(function(){try{Object.defineProperty(Gm.prototype,"buffer",{get:pze.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(r){}})();var gb;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(gb=Function.prototype[Symbol.hasInstance],Object.defineProperty(Gr,Symbol.hasInstance,{value:function(e){return gb.call(this,e)?!0:this!==Gr?!1:e&&e._writableState instanceof Gm}})):gb=function(e){return e instanceof this};function Gr(r){ch=ch||ku();var e=this instanceof ch;if(!e&&!gb.call(Gr,this))return new Gr(r);this._writableState=new Gm(r,this,e),this.writable=!0,r&&(typeof r.write=="function"&&(this._write=r.write),typeof r.writev=="function"&&(this._writev=r.writev),typeof r.destroy=="function"&&(this._destroy=r.destroy),typeof r.final=="function"&&(this._final=r.final)),Ple.call(this)}Gr.prototype.pipe=function(){uh(this,new bze)};function Dze(r,e){var t=new vze;uh(r,t),process.nextTick(e,t)}function Rze(r,e,t,i){var n;return t===null?n=new Sze:typeof t!="string"&&!e.objectMode&&(n=new yze("chunk",["string","Buffer"],t)),n?(uh(r,n),process.nextTick(i,n),!1):!0}Gr.prototype.write=function(r,e,t){var i=this._writableState,n=!1,s=!i.objectMode&&mze(r);return s&&!ub.isBuffer(r)&&(r=Cze(r)),typeof e=="function"&&(t=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof t!="function"&&(t=kze),i.ending?Dze(this,t):(s||Rze(this,i,r,t))&&(i.pendingcb++,n=Fze(this,i,s,r,e,t)),n};Gr.prototype.cork=function(){this._writableState.corked++};Gr.prototype.uncork=function(){var r=this._writableState;r.corked&&(r.corked--,!r.writing&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Dle(this,r))};Gr.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new xze(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Gr.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Nze(r,e,t){return!r.objectMode&&r.decodeStrings!==!1&&typeof e=="string"&&(e=ub.from(e,t)),e}Object.defineProperty(Gr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Fze(r,e,t,i,n,s){if(!t){var o=Nze(e,i,n);i!==o&&(t=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;var l=e.length{"use strict";var Hze=Object.keys||function(r){var e=[];for(var t in r)e.push(t);return e};Nle.exports=Ea;var Lle=uT(),gT=cT();Hl()(Ea,Lle);for(fT=Hze(gT.prototype),fb=0;fb{var pb=require("buffer"),vA=pb.Buffer;function Ole(r,e){for(var t in r)e[t]=r[t]}vA.from&&vA.alloc&&vA.allocUnsafe&&vA.allocUnsafeSlow?Tle.exports=pb:(Ole(pb,hT),hT.Buffer=gh);function gh(r,e,t){return vA(r,e,t)}Ole(vA,gh);gh.from=function(r,e,t){if(typeof r=="number")throw new TypeError("Argument must not be a number");return vA(r,e,t)};gh.alloc=function(r,e,t){if(typeof r!="number")throw new TypeError("Argument must be a number");var i=vA(r);return e!==void 0?typeof t=="string"?i.fill(e,t):i.fill(e):i.fill(0),i};gh.allocUnsafe=function(r){if(typeof r!="number")throw new TypeError("Argument must be a number");return vA(r)};gh.allocUnsafeSlow=function(r){if(typeof r!="number")throw new TypeError("Argument must be a number");return pb.SlowBuffer(r)}});var CT=w(Kle=>{"use strict";var pT=Mle().Buffer,Ule=pT.isEncoding||function(r){switch(r=""+r,r&&r.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Yze(r){if(!r)return"utf8";for(var e;;)switch(r){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return r;default:if(e)return;r=(""+r).toLowerCase(),e=!0}}function qze(r){var e=Yze(r);if(typeof e!="string"&&(pT.isEncoding===Ule||!Ule(r)))throw new Error("Unknown encoding: "+r);return e||r}Kle.StringDecoder=qm;function qm(r){this.encoding=qze(r);var e;switch(this.encoding){case"utf16le":this.text=Wze,this.end=zze,e=4;break;case"utf8":this.fillLast=Jze,e=4;break;case"base64":this.text=_ze,this.end=Vze,e=3;break;default:this.write=Xze,this.end=Zze;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=pT.allocUnsafe(e)}qm.prototype.write=function(r){if(r.length===0)return"";var e,t;if(this.lastNeed){if(e=this.fillLast(r),e===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t>5==6?2:r>>4==14?3:r>>3==30?4:r>>6==2?-1:-2}function t5e(r,e,t){var i=e.length-1;if(i=0?(n>0&&(r.lastNeed=n-1),n):--i=0?(n>0&&(r.lastNeed=n-2),n):--i=0?(n>0&&(n===2?n=0:r.lastNeed=n-3),n):0))}function r5e(r,e,t){if((e[0]&192)!=128)return r.lastNeed=0,"\uFFFD";if(r.lastNeed>1&&e.length>1){if((e[1]&192)!=128)return r.lastNeed=1,"\uFFFD";if(r.lastNeed>2&&e.length>2&&(e[2]&192)!=128)return r.lastNeed=2,"\uFFFD"}}function Jze(r){var e=this.lastTotal-this.lastNeed,t=r5e(this,r,e);if(t!==void 0)return t;if(this.lastNeed<=r.length)return r.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);r.copy(this.lastChar,e,0,r.length),this.lastNeed-=r.length}function e5e(r,e){var t=t5e(this,r,e);if(!this.lastNeed)return r.toString("utf8",e);this.lastTotal=t;var i=r.length-(t-this.lastNeed);return r.copy(this.lastChar,0,i),r.toString("utf8",e,i)}function $ze(r){var e=r&&r.length?this.write(r):"";return this.lastNeed?e+"\uFFFD":e}function Wze(r,e){if((r.length-e)%2==0){var t=r.toString("utf16le",e);if(t){var i=t.charCodeAt(t.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=r[r.length-2],this.lastChar[1]=r[r.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=r[r.length-1],r.toString("utf16le",e,r.length-1)}function zze(r){var e=r&&r.length?this.write(r):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,t)}return e}function _ze(r,e){var t=(r.length-e)%3;return t===0?r.toString("base64",e):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=r[r.length-1]:(this.lastChar[0]=r[r.length-2],this.lastChar[1]=r[r.length-1]),r.toString("base64",e,r.length-t))}function Vze(r){var e=r&&r.length?this.write(r):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Xze(r){return r.toString(this.encoding)}function Zze(r){return r&&r.length?this.write(r):""}});var db=w((GSt,Hle)=>{"use strict";var jle=Ul().codes.ERR_STREAM_PREMATURE_CLOSE;function i5e(r){var e=!1;return function(){if(!e){e=!0;for(var t=arguments.length,i=new Array(t),n=0;n{"use strict";var Cb;function Gl(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var o5e=db(),Yl=Symbol("lastResolve"),Pu=Symbol("lastReject"),Jm=Symbol("error"),mb=Symbol("ended"),Du=Symbol("lastPromise"),mT=Symbol("handlePromise"),Ru=Symbol("stream");function ql(r,e){return{value:r,done:e}}function a5e(r){var e=r[Yl];if(e!==null){var t=r[Ru].read();t!==null&&(r[Du]=null,r[Yl]=null,r[Pu]=null,e(ql(t,!1)))}}function A5e(r){process.nextTick(a5e,r)}function l5e(r,e){return function(t,i){r.then(function(){if(e[mb]){t(ql(void 0,!0));return}e[mT](t,i)},i)}}var c5e=Object.getPrototypeOf(function(){}),u5e=Object.setPrototypeOf((Cb={get stream(){return this[Ru]},next:function(){var e=this,t=this[Jm];if(t!==null)return Promise.reject(t);if(this[mb])return Promise.resolve(ql(void 0,!0));if(this[Ru].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[Jm]?a(e[Jm]):o(ql(void 0,!0))})});var i=this[Du],n;if(i)n=new Promise(l5e(i,this));else{var s=this[Ru].read();if(s!==null)return Promise.resolve(ql(s,!1));n=new Promise(this[mT])}return this[Du]=n,n}},Gl(Cb,Symbol.asyncIterator,function(){return this}),Gl(Cb,"return",function(){var e=this;return new Promise(function(t,i){e[Ru].destroy(null,function(n){if(n){i(n);return}t(ql(void 0,!0))})})}),Cb),c5e),g5e=function(e){var t,i=Object.create(u5e,(t={},Gl(t,Ru,{value:e,writable:!0}),Gl(t,Yl,{value:null,writable:!0}),Gl(t,Pu,{value:null,writable:!0}),Gl(t,Jm,{value:null,writable:!0}),Gl(t,mb,{value:e._readableState.endEmitted,writable:!0}),Gl(t,mT,{value:function(s,o){var a=i[Ru].read();a?(i[Du]=null,i[Yl]=null,i[Pu]=null,s(ql(a,!1))):(i[Yl]=s,i[Pu]=o)},writable:!0}),t));return i[Du]=null,o5e(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Pu];s!==null&&(i[Du]=null,i[Yl]=null,i[Pu]=null,s(n)),i[Jm]=n;return}var o=i[Yl];o!==null&&(i[Du]=null,i[Yl]=null,i[Pu]=null,o(ql(void 0,!0))),i[mb]=!0}),e.on("readable",A5e.bind(null,i)),i};Yle.exports=g5e});var _le=w((qSt,Jle)=>{"use strict";function Wle(r,e,t,i,n,s,o){try{var a=r[s](o),l=a.value}catch(c){t(c);return}a.done?e(l):Promise.resolve(l).then(i,n)}function f5e(r){return function(){var e=this,t=arguments;return new Promise(function(i,n){var s=r.apply(e,t);function o(l){Wle(s,i,n,o,a,"next",l)}function a(l){Wle(s,i,n,o,a,"throw",l)}o(void 0)})}}function zle(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function p5e(r){for(var e=1;e{"use strict";Vle.exports=Ut;var fh;Ut.ReadableState=Xle;var JSt=require("events").EventEmitter,Zle=function(e,t){return e.listeners(t).length},Wm=eT(),Eb=require("buffer").Buffer,m5e=global.Uint8Array||function(){};function E5e(r){return Eb.from(r)}function I5e(r){return Eb.isBuffer(r)||r instanceof m5e}var ET=require("util"),Pt;ET&&ET.debuglog?Pt=ET.debuglog("stream"):Pt=function(){};var y5e=mle(),IT=iT(),w5e=nT(),B5e=w5e.getHighWaterMark,Ib=Ul().codes,b5e=Ib.ERR_INVALID_ARG_TYPE,Q5e=Ib.ERR_STREAM_PUSH_AFTER_EOF,S5e=Ib.ERR_METHOD_NOT_IMPLEMENTED,v5e=Ib.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,hh,yT,wT;Hl()(Ut,Wm);var zm=IT.errorOrDestroy,BT=["error","close","destroy","pause","resume"];function x5e(r,e,t){if(typeof r.prependListener=="function")return r.prependListener(e,t);!r._events||!r._events[e]?r.on(e,t):Array.isArray(r._events[e])?r._events[e].unshift(t):r._events[e]=[t,r._events[e]]}function Xle(r,e,t){fh=fh||ku(),r=r||{},typeof t!="boolean"&&(t=e instanceof fh),this.objectMode=!!r.objectMode,t&&(this.objectMode=this.objectMode||!!r.readableObjectMode),this.highWaterMark=B5e(this,r,"readableHighWaterMark",t),this.buffer=new y5e,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=r.emitClose!==!1,this.autoDestroy=!!r.autoDestroy,this.destroyed=!1,this.defaultEncoding=r.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,r.encoding&&(hh||(hh=CT().StringDecoder),this.decoder=new hh(r.encoding),this.encoding=r.encoding)}function Ut(r){if(fh=fh||ku(),!(this instanceof Ut))return new Ut(r);var e=this instanceof fh;this._readableState=new Xle(r,this,e),this.readable=!0,r&&(typeof r.read=="function"&&(this._read=r.read),typeof r.destroy=="function"&&(this._destroy=r.destroy)),Wm.call(this)}Object.defineProperty(Ut.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){!this._readableState||(this._readableState.destroyed=e)}});Ut.prototype.destroy=IT.destroy;Ut.prototype._undestroy=IT.undestroy;Ut.prototype._destroy=function(r,e){e(r)};Ut.prototype.push=function(r,e){var t=this._readableState,i;return t.objectMode?i=!0:typeof r=="string"&&(e=e||t.defaultEncoding,e!==t.encoding&&(r=Eb.from(r,e),e=""),i=!0),$le(this,r,e,!1,i)};Ut.prototype.unshift=function(r){return $le(this,r,null,!0,!1)};function $le(r,e,t,i,n){Pt("readableAddChunk",e);var s=r._readableState;if(e===null)s.reading=!1,P5e(r,s);else{var o;if(n||(o=k5e(s,e)),o)zm(r,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Eb.prototype&&(e=E5e(e)),i)s.endEmitted?zm(r,new v5e):bT(r,s,e,!0);else if(s.ended)zm(r,new Q5e);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!t?(e=s.decoder.write(e),s.objectMode||e.length!==0?bT(r,s,e,!1):QT(r,s)):bT(r,s,e,!1)}else i||(s.reading=!1,QT(r,s))}return!s.ended&&(s.length=ece?r=ece:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r}function tce(r,e){return r<=0||e.length===0&&e.ended?0:e.objectMode?1:r!==r?e.flowing&&e.length?e.buffer.head.data.length:e.length:(r>e.highWaterMark&&(e.highWaterMark=D5e(r)),r<=e.length?r:e.ended?e.length:(e.needReadable=!0,0))}Ut.prototype.read=function(r){Pt("read",r),r=parseInt(r,10);var e=this._readableState,t=r;if(r!==0&&(e.emittedReadable=!1),r===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return Pt("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?ST(this):yb(this),null;if(r=tce(r,e),r===0&&e.ended)return e.length===0&&ST(this),null;var i=e.needReadable;Pt("need readable",i),(e.length===0||e.length-r0?n=rce(r,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,r=0):(e.length-=r,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),t!==r&&e.ended&&ST(this)),n!==null&&this.emit("data",n),n};function P5e(r,e){if(Pt("onEofChunk"),!e.ended){if(e.decoder){var t=e.decoder.end();t&&t.length&&(e.buffer.push(t),e.length+=e.objectMode?1:t.length)}e.ended=!0,e.sync?yb(r):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,ice(r)))}}function yb(r){var e=r._readableState;Pt("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(Pt("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(ice,r))}function ice(r){var e=r._readableState;Pt("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(r.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,vT(r)}function QT(r,e){e.readingMore||(e.readingMore=!0,process.nextTick(R5e,r,e))}function R5e(r,e){for(;!e.reading&&!e.ended&&(e.length1&&nce(i.pipes,r)!==-1)&&!c&&(Pt("false write response, pause",i.awaitDrain),i.awaitDrain++),t.pause())}function f(y){Pt("onerror",y),m(),r.removeListener("error",f),Zle(r,"error")===0&&zm(r,y)}x5e(r,"error",f);function h(){r.removeListener("finish",p),m()}r.once("close",h);function p(){Pt("onfinish"),r.removeListener("close",h),m()}r.once("finish",p);function m(){Pt("unpipe"),t.unpipe(r)}return r.emit("pipe",t),i.flowing||(Pt("pipe resume"),t.resume()),r};function F5e(r){return function(){var t=r._readableState;Pt("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&Zle(r,"data")&&(t.flowing=!0,vT(r))}}Ut.prototype.unpipe=function(r){var e=this._readableState,t={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return r&&r!==e.pipes?this:(r||(r=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,r&&r.emit("unpipe",this,t),this);if(!r){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s0,i.flowing!==!1&&this.resume()):r==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,Pt("on readable",i.length,i.reading),i.length?yb(this):i.reading||process.nextTick(N5e,this)),t};Ut.prototype.addListener=Ut.prototype.on;Ut.prototype.removeListener=function(r,e){var t=Wm.prototype.removeListener.call(this,r,e);return r==="readable"&&process.nextTick(sce,this),t};Ut.prototype.removeAllListeners=function(r){var e=Wm.prototype.removeAllListeners.apply(this,arguments);return(r==="readable"||r===void 0)&&process.nextTick(sce,this),e};function sce(r){var e=r._readableState;e.readableListening=r.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:r.listenerCount("data")>0&&r.resume()}function N5e(r){Pt("readable nexttick read 0"),r.read(0)}Ut.prototype.resume=function(){var r=this._readableState;return r.flowing||(Pt("resume"),r.flowing=!r.readableListening,L5e(this,r)),r.paused=!1,this};function L5e(r,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(T5e,r,e))}function T5e(r,e){Pt("resume",e.reading),e.reading||r.read(0),e.resumeScheduled=!1,r.emit("resume"),vT(r),e.flowing&&!e.reading&&r.read(0)}Ut.prototype.pause=function(){return Pt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Pt("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function vT(r){var e=r._readableState;for(Pt("flow",e.flowing);e.flowing&&r.read()!==null;);}Ut.prototype.wrap=function(r){var e=this,t=this._readableState,i=!1;r.on("end",function(){if(Pt("wrapped end"),t.decoder&&!t.ended){var o=t.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),r.on("data",function(o){if(Pt("wrapped data"),t.decoder&&(o=t.decoder.write(o)),!(t.objectMode&&o==null)&&!(!t.objectMode&&(!o||!o.length))){var a=e.push(o);a||(i=!0,r.pause())}});for(var n in r)this[n]===void 0&&typeof r[n]=="function"&&(this[n]=function(a){return function(){return r[a].apply(r,arguments)}}(n));for(var s=0;s=e.length?(e.decoder?t=e.buffer.join(""):e.buffer.length===1?t=e.buffer.first():t=e.buffer.concat(e.length),e.buffer.clear()):t=e.buffer.consume(r,e.decoder),t}function ST(r){var e=r._readableState;Pt("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(O5e,e,r))}function O5e(r,e){if(Pt("endReadableNT",r.endEmitted,r.length),!r.endEmitted&&r.length===0&&(r.endEmitted=!0,e.readable=!1,e.emit("end"),r.autoDestroy)){var t=e._writableState;(!t||t.autoDestroy&&t.finished)&&e.destroy()}}typeof Symbol=="function"&&(Ut.from=function(r,e){return wT===void 0&&(wT=_le()),wT(Ut,r,e)});function nce(r,e){for(var t=0,i=r.length;t{"use strict";oce.exports=xA;var wb=Ul().codes,M5e=wb.ERR_METHOD_NOT_IMPLEMENTED,K5e=wb.ERR_MULTIPLE_CALLBACK,U5e=wb.ERR_TRANSFORM_ALREADY_TRANSFORMING,H5e=wb.ERR_TRANSFORM_WITH_LENGTH_0,Bb=ku();Hl()(xA,Bb);function j5e(r,e){var t=this._transformState;t.transforming=!1;var i=t.writecb;if(i===null)return this.emit("error",new K5e);t.writechunk=null,t.writecb=null,e!=null&&this.push(e),i(r);var n=this._readableState;n.reading=!1,(n.needReadable||n.length{"use strict";Ace.exports=_m;var lce=xT();Hl()(_m,lce);function _m(r){if(!(this instanceof _m))return new _m(r);lce.call(this,r)}_m.prototype._transform=function(r,e,t){t(null,r)}});var pce=w((VSt,uce)=>{"use strict";var kT;function Y5e(r){var e=!1;return function(){e||(e=!0,r.apply(void 0,arguments))}}var gce=Ul().codes,q5e=gce.ERR_MISSING_ARGS,J5e=gce.ERR_STREAM_DESTROYED;function fce(r){if(r)throw r}function W5e(r){return r.setHeader&&typeof r.abort=="function"}function z5e(r,e,t,i){i=Y5e(i);var n=!1;r.on("close",function(){n=!0}),kT===void 0&&(kT=db()),kT(r,{readable:e,writable:t},function(o){if(o)return i(o);n=!0,i()});var s=!1;return function(o){if(!n&&!s){if(s=!0,W5e(r))return r.abort();if(typeof r.destroy=="function")return r.destroy();i(o||new J5e("pipe"))}}}function hce(r){r()}function _5e(r,e){return r.pipe(e)}function V5e(r){return!r.length||typeof r[r.length-1]!="function"?fce:r.pop()}function X5e(){for(var r=arguments.length,e=new Array(r),t=0;t0;return z5e(o,l,c,function(u){n||(n=u),u&&s.forEach(hce),!l&&(s.forEach(hce),i(n))})});return e.reduce(_5e)}uce.exports=X5e});var ph=w((Vs,Vm)=>{var Xm=require("stream");process.env.READABLE_STREAM==="disable"&&Xm?(Vm.exports=Xm.Readable,Object.assign(Vm.exports,Xm),Vm.exports.Stream=Xm):(Vs=Vm.exports=uT(),Vs.Stream=Xm||Vs,Vs.Readable=Vs,Vs.Writable=cT(),Vs.Duplex=ku(),Vs.Transform=xT(),Vs.PassThrough=cce(),Vs.finished=db(),Vs.pipeline=pce())});var mce=w((XSt,dce)=>{"use strict";var{Buffer:So}=require("buffer"),Cce=Symbol.for("BufferList");function mr(r){if(!(this instanceof mr))return new mr(r);mr._init.call(this,r)}mr._init=function(e){Object.defineProperty(this,Cce,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)};mr.prototype._new=function(e){return new mr(e)};mr.prototype._offset=function(e){if(e===0)return[0,0];let t=0;for(let i=0;ithis.length||e<0)return;let t=this._offset(e);return this._bufs[t[0]][t[1]]};mr.prototype.slice=function(e,t){return typeof e=="number"&&e<0&&(e+=this.length),typeof t=="number"&&t<0&&(t+=this.length),this.copy(null,0,e,t)};mr.prototype.copy=function(e,t,i,n){if((typeof i!="number"||i<0)&&(i=0),(typeof n!="number"||n>this.length)&&(n=this.length),i>=this.length||n<=0)return e||So.alloc(0);let s=!!e,o=this._offset(i),a=n-i,l=a,c=s&&t||0,u=o[1];if(i===0&&n===this.length){if(!s)return this._bufs.length===1?this._bufs[0]:So.concat(this._bufs,this.length);for(let g=0;gf)this._bufs[g].copy(e,c,u),c+=f;else{this._bufs[g].copy(e,c,u,u+l),c+=f;break}l-=f,u&&(u=0)}return e.length>c?e.slice(0,c):e};mr.prototype.shallowSlice=function(e,t){if(e=e||0,t=typeof t!="number"?this.length:t,e<0&&(e+=this.length),t<0&&(t+=this.length),e===t)return this._new();let i=this._offset(e),n=this._offset(t),s=this._bufs.slice(i[0],n[0]+1);return n[1]===0?s.pop():s[s.length-1]=s[s.length-1].slice(0,n[1]),i[1]!==0&&(s[0]=s[0].slice(i[1])),this._new(s)};mr.prototype.toString=function(e,t,i){return this.slice(t,i).toString(e)};mr.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;)if(e>=this._bufs[0].length)e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}return this};mr.prototype.duplicate=function(){let e=this._new();for(let t=0;tthis.length?this.length:e;let i=this._offset(e),n=i[0],s=i[1];for(;n=r.length){let l=o.indexOf(r,s);if(l!==-1)return this._reverseOffset([n,l]);s=o.length-r.length+1}else{let l=this._reverseOffset([n,s]);if(this._match(l,r))return l;s++}s=0}return-1};mr.prototype._match=function(r,e){if(this.length-r{"use strict";var PT=ph().Duplex,Z5e=Hl(),Zm=mce();function Zi(r){if(!(this instanceof Zi))return new Zi(r);if(typeof r=="function"){this._callback=r;let e=function(i){this._callback&&(this._callback(i),this._callback=null)}.bind(this);this.on("pipe",function(i){i.on("error",e)}),this.on("unpipe",function(i){i.removeListener("error",e)}),r=null}Zm._init.call(this,r),PT.call(this)}Z5e(Zi,PT);Object.assign(Zi.prototype,Zm.prototype);Zi.prototype._new=function(e){return new Zi(e)};Zi.prototype._write=function(e,t,i){this._appendBuffer(e),typeof i=="function"&&i()};Zi.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)};Zi.prototype.end=function(e){PT.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)};Zi.prototype._destroy=function(e,t){this._bufs.length=0,this.length=0,t(e)};Zi.prototype._isBufferList=function(e){return e instanceof Zi||e instanceof Zm||Zi.isBufferList(e)};Zi.isBufferList=Zm.isBufferList;bb.exports=Zi;bb.exports.BufferListStream=Zi;bb.exports.BufferList=Zm});var FT=w(dh=>{var $5e=Buffer.alloc,e9e="0000000000000000000",t9e="7777777777777777777",Ice="0".charCodeAt(0),yce=Buffer.from("ustar\0","binary"),r9e=Buffer.from("00","binary"),i9e=Buffer.from("ustar ","binary"),n9e=Buffer.from(" \0","binary"),s9e=parseInt("7777",8),$m=257,DT=263,o9e=function(r,e,t){return typeof r!="number"?t:(r=~~r,r>=e?e:r>=0||(r+=e,r>=0)?r:0)},a9e=function(r){switch(r){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},A9e=function(r){switch(r){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},wce=function(r,e,t,i){for(;te?t9e.slice(0,e)+" ":e9e.slice(0,e-r.length)+r+" "};function l9e(r){var e;if(r[0]===128)e=!0;else if(r[0]===255)e=!1;else return null;for(var t=[],i=r.length-1;i>0;i--){var n=r[i];e?t.push(n):t.push(255-n)}var s=0,o=t.length;for(i=0;i=Math.pow(10,t)&&t++,e+t+r};dh.decodeLongPath=function(r,e){return Ch(r,0,r.length,e)};dh.encodePax=function(r){var e="";r.name&&(e+=RT(" path="+r.name+` +`)),r.linkname&&(e+=RT(" linkpath="+r.linkname+` +`));var t=r.pax;if(t)for(var i in t)e+=RT(" "+i+"="+t[i]+` +`);return Buffer.from(e)};dh.decodePax=function(r){for(var e={};r.length;){for(var t=0;t100;){var n=t.indexOf("/");if(n===-1)return null;i+=i?"/"+t.slice(0,n):t.slice(0,n),t=t.slice(n+1)}return Buffer.byteLength(t)>100||Buffer.byteLength(i)>155||r.linkname&&Buffer.byteLength(r.linkname)>100?null:(e.write(t),e.write(Jl(r.mode&s9e,6),100),e.write(Jl(r.uid,6),108),e.write(Jl(r.gid,6),116),e.write(Jl(r.size,11),124),e.write(Jl(r.mtime.getTime()/1e3|0,11),136),e[156]=Ice+A9e(r.type),r.linkname&&e.write(r.linkname,157),yce.copy(e,$m),r9e.copy(e,DT),r.uname&&e.write(r.uname,265),r.gname&&e.write(r.gname,297),e.write(Jl(r.devmajor||0,6),329),e.write(Jl(r.devminor||0,6),337),i&&e.write(i,345),e.write(Jl(Bce(e),6),148),e)};dh.decode=function(r,e,t){var i=r[156]===0?0:r[156]-Ice,n=Ch(r,0,100,e),s=Wl(r,100,8),o=Wl(r,108,8),a=Wl(r,116,8),l=Wl(r,124,12),c=Wl(r,136,12),u=a9e(i),g=r[157]===0?null:Ch(r,157,100,e),f=Ch(r,265,32),h=Ch(r,297,32),p=Wl(r,329,8),m=Wl(r,337,8),y=Bce(r);if(y===8*32)return null;if(y!==Wl(r,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(yce.compare(r,$m,$m+6)===0)r[345]&&(n=Ch(r,345,155,e)+"/"+n);else if(!(i9e.compare(r,$m,$m+6)===0&&n9e.compare(r,DT,DT+2)===0)){if(!t)throw new Error("Invalid tar header: unknown format.")}return i===0&&n&&n[n.length-1]==="/"&&(i=5),{name:n,mode:s,uid:o,gid:a,size:l,mtime:new Date(1e3*c),type:u,linkname:g,uname:f,gname:h,devmajor:p,devminor:m}}});var Pce=w((evt,bce)=>{var Qce=require("util"),c9e=Ece(),eE=FT(),Sce=ph().Writable,vce=ph().PassThrough,xce=function(){},kce=function(r){return r&=511,r&&512-r},u9e=function(r,e){var t=new Qb(r,e);return t.end(),t},g9e=function(r,e){return e.path&&(r.name=e.path),e.linkpath&&(r.linkname=e.linkpath),e.size&&(r.size=parseInt(e.size,10)),r.pax=e,r},Qb=function(r,e){this._parent=r,this.offset=e,vce.call(this,{autoDestroy:!1})};Qce.inherits(Qb,vce);Qb.prototype.destroy=function(r){this._parent.destroy(r)};var kA=function(r){if(!(this instanceof kA))return new kA(r);Sce.call(this,r),r=r||{},this._offset=0,this._buffer=c9e(),this._missing=0,this._partial=!1,this._onparse=xce,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var e=this,t=e._buffer,i=function(){e._continue()},n=function(f){if(e._locked=!1,f)return e.destroy(f);e._stream||i()},s=function(){e._stream=null;var f=kce(e._header.size);f?e._parse(f,o):e._parse(512,g),e._locked||i()},o=function(){e._buffer.consume(kce(e._header.size)),e._parse(512,g),i()},a=function(){var f=e._header.size;e._paxGlobal=eE.decodePax(t.slice(0,f)),t.consume(f),s()},l=function(){var f=e._header.size;e._pax=eE.decodePax(t.slice(0,f)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),t.consume(f),s()},c=function(){var f=e._header.size;this._gnuLongPath=eE.decodeLongPath(t.slice(0,f),r.filenameEncoding),t.consume(f),s()},u=function(){var f=e._header.size;this._gnuLongLinkPath=eE.decodeLongPath(t.slice(0,f),r.filenameEncoding),t.consume(f),s()},g=function(){var f=e._offset,h;try{h=e._header=eE.decode(t.slice(0,512),r.filenameEncoding,r.allowUnknownFormat)}catch(p){e.emit("error",p)}if(t.consume(512),!h){e._parse(512,g),i();return}if(h.type==="gnu-long-path"){e._parse(h.size,c),i();return}if(h.type==="gnu-long-link-path"){e._parse(h.size,u),i();return}if(h.type==="pax-global-header"){e._parse(h.size,a),i();return}if(h.type==="pax-header"){e._parse(h.size,l),i();return}if(e._gnuLongPath&&(h.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(h.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=h=g9e(h,e._pax),e._pax=null),e._locked=!0,!h.size||h.type==="directory"){e._parse(512,g),e.emit("entry",h,u9e(e,f),n);return}e._stream=new Qb(e,f),e.emit("entry",h,e._stream,n),e._parse(h.size,s),i()};this._onheader=g,this._parse(512,g)};Qce.inherits(kA,Sce);kA.prototype.destroy=function(r){this._destroyed||(this._destroyed=!0,r&&this.emit("error",r),this.emit("close"),this._stream&&this._stream.emit("close"))};kA.prototype._parse=function(r,e){this._destroyed||(this._offset+=r,this._missing=r,e===this._onheader&&(this._partial=!1),this._onparse=e)};kA.prototype._continue=function(){if(!this._destroyed){var r=this._cb;this._cb=xce,this._overflow?this._write(this._overflow,void 0,r):r()}};kA.prototype._write=function(r,e,t){if(!this._destroyed){var i=this._stream,n=this._buffer,s=this._missing;if(r.length&&(this._partial=!0),r.lengths&&(o=r.slice(s),r=r.slice(0,s)),i?i.end(r):n.append(r),this._overflow=o,this._onparse()}};kA.prototype._final=function(r){if(this._partial)return this.destroy(new Error("Unexpected end of data"));r()};bce.exports=kA});var Rce=w((tvt,Dce)=>{Dce.exports=require("fs").constants||require("constants")});var Oce=w((rvt,Fce)=>{var mh=Rce(),Nce=Mk(),Sb=Hl(),f9e=Buffer.alloc,Lce=ph().Readable,Eh=ph().Writable,h9e=require("string_decoder").StringDecoder,vb=FT(),p9e=parseInt("755",8),d9e=parseInt("644",8),Tce=f9e(1024),NT=function(){},LT=function(r,e){e&=511,e&&r.push(Tce.slice(0,512-e))};function C9e(r){switch(r&mh.S_IFMT){case mh.S_IFBLK:return"block-device";case mh.S_IFCHR:return"character-device";case mh.S_IFDIR:return"directory";case mh.S_IFIFO:return"fifo";case mh.S_IFLNK:return"symlink"}return"file"}var xb=function(r){Eh.call(this),this.written=0,this._to=r,this._destroyed=!1};Sb(xb,Eh);xb.prototype._write=function(r,e,t){if(this.written+=r.length,this._to.push(r))return t();this._to._drain=t};xb.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var kb=function(){Eh.call(this),this.linkname="",this._decoder=new h9e("utf-8"),this._destroyed=!1};Sb(kb,Eh);kb.prototype._write=function(r,e,t){this.linkname+=this._decoder.write(r),t()};kb.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var tE=function(){Eh.call(this),this._destroyed=!1};Sb(tE,Eh);tE.prototype._write=function(r,e,t){t(new Error("No body allowed for this entry"))};tE.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var Ia=function(r){if(!(this instanceof Ia))return new Ia(r);Lce.call(this,r),this._drain=NT,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};Sb(Ia,Lce);Ia.prototype.entry=function(r,e,t){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof e=="function"&&(t=e,e=null),t||(t=NT);var i=this;if((!r.size||r.type==="symlink")&&(r.size=0),r.type||(r.type=C9e(r.mode)),r.mode||(r.mode=r.type==="directory"?p9e:d9e),r.uid||(r.uid=0),r.gid||(r.gid=0),r.mtime||(r.mtime=new Date),typeof e=="string"&&(e=Buffer.from(e)),Buffer.isBuffer(e)){r.size=e.length,this._encode(r);var n=this.push(e);return LT(i,r.size),n?process.nextTick(t):this._drain=t,new tE}if(r.type==="symlink"&&!r.linkname){var s=new kb;return Nce(s,function(a){if(a)return i.destroy(),t(a);r.linkname=s.linkname,i._encode(r),t()}),s}if(this._encode(r),r.type!=="file"&&r.type!=="contiguous-file")return process.nextTick(t),new tE;var o=new xb(this);return this._stream=o,Nce(o,function(a){if(i._stream=null,a)return i.destroy(),t(a);if(o.written!==r.size)return i.destroy(),t(new Error("size mismatch"));LT(i,r.size),i._finalizing&&i.finalize(),t()}),o}};Ia.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(Tce),this.push(null))};Ia.prototype.destroy=function(r){this._destroyed||(this._destroyed=!0,r&&this.emit("error",r),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};Ia.prototype._encode=function(r){if(!r.pax){var e=vb.encode(r);if(e){this.push(e);return}}this._encodePax(r)};Ia.prototype._encodePax=function(r){var e=vb.encodePax({name:r.name,linkname:r.linkname,pax:r.pax}),t={name:"PaxHeader",mode:r.mode,uid:r.uid,gid:r.gid,size:e.length,mtime:r.mtime,type:"pax-header",linkname:r.linkname&&"PaxHeader",uname:r.uname,gname:r.gname,devmajor:r.devmajor,devminor:r.devminor};this.push(vb.encode(t)),this.push(e),LT(this,e.length),t.size=r.size,t.type=r.type,this.push(vb.encode(t))};Ia.prototype._read=function(r){var e=this._drain;this._drain=NT,e()};Fce.exports=Ia});var Mce=w(TT=>{TT.extract=Pce();TT.pack=Oce()});var Xce=w((Qvt,Wce)=>{"use strict";var Ih=class{constructor(e,t,i){this.__specs=e||{},Object.keys(this.__specs).forEach(n=>{if(typeof this.__specs[n]=="string"){let s=this.__specs[n],o=this.__specs[s];if(o){let a=o.aliases||[];a.push(n,s),o.aliases=[...new Set(a)],this.__specs[n]=o}else throw new Error(`Alias refers to invalid key: ${s} -> ${n}`)}}),this.__opts=t||{},this.__providers=_ce(i.filter(n=>n!=null&&typeof n=="object")),this.__isFiggyPudding=!0}get(e){return jT(this,e,!0)}get[Symbol.toStringTag](){return"FiggyPudding"}forEach(e,t=this){for(let[i,n]of this.entries())e.call(t,n,i,this)}toJSON(){let e={};return this.forEach((t,i)=>{e[i]=t}),e}*entries(e){for(let i of Object.keys(this.__specs))yield[i,this.get(i)];let t=e||this.__opts.other;if(t){let i=new Set;for(let n of this.__providers){let s=n.entries?n.entries(t):P9e(n);for(let[o,a]of s)t(o)&&!i.has(o)&&(i.add(o),yield[o,a])}}}*[Symbol.iterator](){for(let[e,t]of this.entries())yield[e,t]}*keys(){for(let[e]of this.entries())yield e}*values(){for(let[,e]of this.entries())yield e}concat(...e){return new Proxy(new Ih(this.__specs,this.__opts,_ce(this.__providers).concat(e)),zce)}};try{let r=require("util");Ih.prototype[r.inspect.custom]=function(e,t){return this[Symbol.toStringTag]+" "+r.inspect(this.toJSON(),t)}}catch(r){}function D9e(r){throw Object.assign(new Error(`invalid config key requested: ${r}`),{code:"EBADKEY"})}function jT(r,e,t){let i=r.__specs[e];if(t&&!i&&(!r.__opts.other||!r.__opts.other(e)))D9e(e);else{i||(i={});let n;for(let s of r.__providers){if(n=Vce(e,s),n===void 0&&i.aliases&&i.aliases.length){for(let o of i.aliases)if(o!==e&&(n=Vce(o,s),n!==void 0))break}if(n!==void 0)break}return n===void 0&&i.default!==void 0?typeof i.default=="function"?i.default(r):i.default:n}}function Vce(r,e){let t;return e.__isFiggyPudding?t=jT(e,r,!1):typeof e.get=="function"?t=e.get(r):t=e[r],t}var zce={has(r,e){return e in r.__specs&&jT(r,e,!1)!==void 0},ownKeys(r){return Object.keys(r.__specs)},get(r,e){return typeof e=="symbol"||e.slice(0,2)==="__"||e in Ih.prototype?r[e]:r.get(e)},set(r,e,t){if(typeof e=="symbol"||e.slice(0,2)==="__")return r[e]=t,!0;throw new Error("figgyPudding options cannot be modified. Use .concat() instead.")},deleteProperty(){throw new Error("figgyPudding options cannot be deleted. Use .concat() and shadow them instead.")}};Wce.exports=R9e;function R9e(r,e){function t(...i){return new Proxy(new Ih(r,e,i),zce)}return t}function _ce(r){let e=[];return r.forEach(t=>e.unshift(t)),e}function P9e(r){return Object.keys(r).map(e=>[e,r[e]])}});var eue=w((Svt,ya)=>{"use strict";var iE=require("crypto"),F9e=Xce(),N9e=require("stream").Transform,Zce=["sha256","sha384","sha512"],L9e=/^[a-z0-9+/]+(?:=?=?)$/i,T9e=/^([^-]+)-([^?]+)([?\S*]*)$/,O9e=/^([^-]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/,M9e=/^[\x21-\x7E]+$/,Cn=F9e({algorithms:{default:["sha512"]},error:{default:!1},integrity:{},options:{default:[]},pickAlgorithm:{default:()=>K9e},Promise:{default:()=>Promise},sep:{default:" "},single:{default:!1},size:{},strict:{default:!1}}),Fu=class{get isHash(){return!0}constructor(e,t){t=Cn(t);let i=!!t.strict;this.source=e.trim();let n=this.source.match(i?O9e:T9e);if(!n||i&&!Zce.some(o=>o===n[1]))return;this.algorithm=n[1],this.digest=n[2];let s=n[3];this.options=s?s.slice(1).split("?"):[]}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}toString(e){if(e=Cn(e),e.strict&&!(Zce.some(i=>i===this.algorithm)&&this.digest.match(L9e)&&(this.options||[]).every(i=>i.match(M9e))))return"";let t=this.options&&this.options.length?`?${this.options.join("?")}`:"";return`${this.algorithm}-${this.digest}${t}`}},yh=class{get isIntegrity(){return!0}toJSON(){return this.toString()}toString(e){e=Cn(e);let t=e.sep||" ";return e.strict&&(t=t.replace(/\S+/g," ")),Object.keys(this).map(i=>this[i].map(n=>Fu.prototype.toString.call(n,e)).filter(n=>n.length).join(t)).filter(i=>i.length).join(t)}concat(e,t){t=Cn(t);let i=typeof e=="string"?e:nE(e,t);return wa(`${this.toString(t)} ${i}`,t)}hexDigest(){return wa(this,{single:!0}).hexDigest()}match(e,t){t=Cn(t);let i=wa(e,t),n=i.pickAlgorithm(t);return this[n]&&i[n]&&this[n].find(s=>i[n].find(o=>s.digest===o.digest))||!1}pickAlgorithm(e){e=Cn(e);let t=e.pickAlgorithm,i=Object.keys(this);if(!i.length)throw new Error(`No algorithms available for ${JSON.stringify(this.toString())}`);return i.reduce((n,s)=>t(n,s)||n)}};ya.exports.parse=wa;function wa(r,e){if(e=Cn(e),typeof r=="string")return GT(r,e);if(r.algorithm&&r.digest){let t=new yh;return t[r.algorithm]=[r],GT(nE(t,e),e)}else return GT(nE(r,e),e)}function GT(r,e){return e.single?new Fu(r,e):r.trim().split(/\s+/).reduce((t,i)=>{let n=new Fu(i,e);if(n.algorithm&&n.digest){let s=n.algorithm;t[s]||(t[s]=[]),t[s].push(n)}return t},new yh)}ya.exports.stringify=nE;function nE(r,e){return e=Cn(e),r.algorithm&&r.digest?Fu.prototype.toString.call(r,e):typeof r=="string"?nE(wa(r,e),e):yh.prototype.toString.call(r,e)}ya.exports.fromHex=U9e;function U9e(r,e,t){t=Cn(t);let i=t.options&&t.options.length?`?${t.options.join("?")}`:"";return wa(`${e}-${Buffer.from(r,"hex").toString("base64")}${i}`,t)}ya.exports.fromData=H9e;function H9e(r,e){e=Cn(e);let t=e.algorithms,i=e.options&&e.options.length?`?${e.options.join("?")}`:"";return t.reduce((n,s)=>{let o=iE.createHash(s).update(r).digest("base64"),a=new Fu(`${s}-${o}${i}`,e);if(a.algorithm&&a.digest){let l=a.algorithm;n[l]||(n[l]=[]),n[l].push(a)}return n},new yh)}ya.exports.fromStream=j9e;function j9e(r,e){e=Cn(e);let t=e.Promise||Promise,i=YT(e);return new t((n,s)=>{r.pipe(i),r.on("error",s),i.on("error",s);let o;i.on("integrity",a=>{o=a}),i.on("end",()=>n(o)),i.on("data",()=>{})})}ya.exports.checkData=G9e;function G9e(r,e,t){if(t=Cn(t),e=wa(e,t),!Object.keys(e).length){if(t.error)throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"});return!1}let i=e.pickAlgorithm(t),n=iE.createHash(i).update(r).digest("base64"),s=wa({algorithm:i,digest:n}),o=s.match(e,t);if(o||!t.error)return o;if(typeof t.size=="number"&&r.length!==t.size){let a=new Error(`data size mismatch when checking ${e}. + Wanted: ${t.size} + Found: ${r.length}`);throw a.code="EBADSIZE",a.found=r.length,a.expected=t.size,a.sri=e,a}else{let a=new Error(`Integrity checksum failed when using ${i}: Wanted ${e}, but got ${s}. (${r.length} bytes)`);throw a.code="EINTEGRITY",a.found=s,a.expected=e,a.algorithm=i,a.sri=e,a}}ya.exports.checkStream=Y9e;function Y9e(r,e,t){t=Cn(t);let i=t.Promise||Promise,n=YT(t.concat({integrity:e}));return new i((s,o)=>{r.pipe(n),r.on("error",o),n.on("error",o);let a;n.on("verified",l=>{a=l}),n.on("end",()=>s(a)),n.on("data",()=>{})})}ya.exports.integrityStream=YT;function YT(r){r=Cn(r);let e=r.integrity&&wa(r.integrity,r),t=e&&Object.keys(e).length,i=t&&e.pickAlgorithm(r),n=t&&e[i],s=Array.from(new Set(r.algorithms.concat(i?[i]:[]))),o=s.map(iE.createHash),a=0,l=new N9e({transform(c,u,g){a+=c.length,o.forEach(f=>f.update(c,u)),g(null,c,u)}}).on("end",()=>{let c=r.options&&r.options.length?`?${r.options.join("?")}`:"",u=wa(o.map((f,h)=>`${s[h]}-${f.digest("base64")}${c}`).join(" "),r),g=t&&u.match(e,r);if(typeof r.size=="number"&&a!==r.size){let f=new Error(`stream size mismatch when checking ${e}. + Wanted: ${r.size} + Found: ${a}`);f.code="EBADSIZE",f.found=a,f.expected=r.size,f.sri=e,l.emit("error",f)}else if(r.integrity&&!g){let f=new Error(`${e} integrity checksum failed when using ${i}: wanted ${n} but got ${u}. (${a} bytes)`);f.code="EINTEGRITY",f.found=u,f.expected=n,f.algorithm=i,f.sri=e,l.emit("error",f)}else l.emit("size",a),l.emit("integrity",u),g&&l.emit("verified",g)});return l}ya.exports.create=q9e;function q9e(r){r=Cn(r);let e=r.algorithms,t=r.options.length?`?${r.options.join("?")}`:"",i=e.map(iE.createHash);return{update:function(n,s){return i.forEach(o=>o.update(n,s)),this},digest:function(n){return e.reduce((o,a)=>{let l=i.shift().digest("base64"),c=new Fu(`${a}-${l}${t}`,r);if(c.algorithm&&c.digest){let u=c.algorithm;o[u]||(o[u]=[]),o[u].push(c)}return o},new yh)}}}var J9e=new Set(iE.getHashes()),$ce=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(r=>J9e.has(r));function K9e(r,e){return $ce.indexOf(r.toLowerCase())>=$ce.indexOf(e.toLowerCase())?r:e}});var EC={};ft(EC,{BuildType:()=>cs,Cache:()=>Nt,Configuration:()=>ye,DEFAULT_LOCK_FILENAME:()=>fk,DEFAULT_RC_FILENAME:()=>gk,FormatType:()=>Ri,InstallMode:()=>Ci,LightReport:()=>pA,LinkType:()=>Qt,Manifest:()=>At,MessageName:()=>X,MultiFetcher:()=>yd,PackageExtensionStatus:()=>qi,PackageExtensionType:()=>wi,Project:()=>ze,ProjectLookup:()=>ul,Report:()=>Ji,ReportError:()=>ct,SettingsType:()=>Ie,StreamReport:()=>Je,TAG_REGEXP:()=>zg,TelemetryManager:()=>mC,ThrowReport:()=>di,VirtualFetcher:()=>Bd,Workspace:()=>CC,WorkspaceFetcher:()=>bd,WorkspaceResolver:()=>oi,YarnVersion:()=>Ur,execUtils:()=>Nr,folderUtils:()=>sk,formatUtils:()=>ae,hashUtils:()=>Dn,httpUtils:()=>ir,miscUtils:()=>Se,nodeUtils:()=>Vg,parseMessageName:()=>II,scriptUtils:()=>Zt,semverUtils:()=>Wt,stringifyMessageName:()=>_A,structUtils:()=>P,tgzUtils:()=>Bi,treeUtils:()=>ls});var Nr={};ft(Nr,{EndStrategy:()=>ss,ExecError:()=>Ik,PipeError:()=>ww,execvp:()=>pve,pipevp:()=>ra});var Zh={};ft(Zh,{AliasFS:()=>Na,CwdFS:()=>_t,DEFAULT_COMPRESSION_LEVEL:()=>lc,FakeFS:()=>YA,Filename:()=>kt,JailFS:()=>La,LazyFS:()=>_h,LinkStrategy:()=>Gh,NoFS:()=>jE,NodeFS:()=>ar,PortablePath:()=>Me,PosixFS:()=>Vh,ProxiedFS:()=>Qi,VirtualFS:()=>Wr,ZipFS:()=>li,ZipOpenFS:()=>Is,constants:()=>Rr,extendFs:()=>WE,normalizeLineEndings:()=>sc,npath:()=>H,opendir:()=>KE,patchFs:()=>pQ,ppath:()=>k,statUtils:()=>rQ,toFilename:()=>Jr,xfs:()=>K});var Rr={};ft(Rr,{SAFE_TIME:()=>tQ,S_IFDIR:()=>Da,S_IFLNK:()=>Fa,S_IFMT:()=>_n,S_IFREG:()=>Ra});var _n=61440,Da=16384,Ra=32768,Fa=40960,tQ=456789e3;var rQ={};ft(rQ,{BigIntStatsEntry:()=>Uh,DEFAULT_MODE:()=>Kh,DirEntry:()=>KO,StatEntry:()=>jA,areStatsEqual:()=>nQ,clearStats:()=>RE,convertToBigIntStats:()=>FE,makeDefaultStats:()=>Hh,makeEmptyStats:()=>fge});var iQ=ge(require("util"));var Kh=Ra|420,KO=class{constructor(){this.name="";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&_n)===Da}isFIFO(){return!1}isFile(){return(this.mode&_n)===Ra}isSocket(){return!1}isSymbolicLink(){return(this.mode&_n)===Fa}},jA=class{constructor(){this.uid=0;this.gid=0;this.size=0;this.blksize=0;this.atimeMs=0;this.mtimeMs=0;this.ctimeMs=0;this.birthtimeMs=0;this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=0;this.ino=0;this.mode=Kh;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&_n)===Da}isFIFO(){return!1}isFile(){return(this.mode&_n)===Ra}isSocket(){return!1}isSymbolicLink(){return(this.mode&_n)===Fa}},Uh=class{constructor(){this.uid=BigInt(0);this.gid=BigInt(0);this.size=BigInt(0);this.blksize=BigInt(0);this.atimeMs=BigInt(0);this.mtimeMs=BigInt(0);this.ctimeMs=BigInt(0);this.birthtimeMs=BigInt(0);this.atimeNs=BigInt(0);this.mtimeNs=BigInt(0);this.ctimeNs=BigInt(0);this.birthtimeNs=BigInt(0);this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=BigInt(0);this.ino=BigInt(0);this.mode=BigInt(Kh);this.nlink=BigInt(1);this.rdev=BigInt(0);this.blocks=BigInt(1)}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&BigInt(_n))===BigInt(Da)}isFIFO(){return!1}isFile(){return(this.mode&BigInt(_n))===BigInt(Ra)}isSocket(){return!1}isSymbolicLink(){return(this.mode&BigInt(_n))===BigInt(Fa)}};function Hh(){return new jA}function fge(){return RE(Hh())}function RE(r){for(let e in r)if(Object.prototype.hasOwnProperty.call(r,e)){let t=r[e];typeof t=="number"?r[e]=0:typeof t=="bigint"?r[e]=BigInt(0):iQ.types.isDate(t)&&(r[e]=new Date(0))}return r}function FE(r){let e=new Uh;for(let t in r)if(Object.prototype.hasOwnProperty.call(r,t)){let i=r[t];typeof i=="number"?e[t]=BigInt(i):iQ.types.isDate(i)&&(e[t]=new Date(i))}return e.atimeNs=e.atimeMs*BigInt(1e6),e.mtimeNs=e.mtimeMs*BigInt(1e6),e.ctimeNs=e.ctimeMs*BigInt(1e6),e.birthtimeNs=e.birthtimeMs*BigInt(1e6),e}function nQ(r,e){if(r.atimeMs!==e.atimeMs||r.birthtimeMs!==e.birthtimeMs||r.blksize!==e.blksize||r.blocks!==e.blocks||r.ctimeMs!==e.ctimeMs||r.dev!==e.dev||r.gid!==e.gid||r.ino!==e.ino||r.isBlockDevice()!==e.isBlockDevice()||r.isCharacterDevice()!==e.isCharacterDevice()||r.isDirectory()!==e.isDirectory()||r.isFIFO()!==e.isFIFO()||r.isFile()!==e.isFile()||r.isSocket()!==e.isSocket()||r.isSymbolicLink()!==e.isSymbolicLink()||r.mode!==e.mode||r.mtimeMs!==e.mtimeMs||r.nlink!==e.nlink||r.rdev!==e.rdev||r.size!==e.size||r.uid!==e.uid)return!1;let t=r,i=e;return!(t.atimeNs!==i.atimeNs||t.mtimeNs!==i.mtimeNs||t.ctimeNs!==i.ctimeNs||t.birthtimeNs!==i.birthtimeNs)}var LE=ge(require("fs"));var jh=ge(require("path")),UO;(function(i){i[i.File=0]="File",i[i.Portable=1]="Portable",i[i.Native=2]="Native"})(UO||(UO={}));var Me={root:"/",dot:"."},kt={nodeModules:"node_modules",manifest:"package.json",lockfile:"yarn.lock",virtual:"__virtual__",pnpJs:".pnp.js",pnpCjs:".pnp.cjs",rc:".yarnrc.yml"},H=Object.create(jh.default),k=Object.create(jh.default.posix);H.cwd=()=>process.cwd();k.cwd=()=>sQ(process.cwd());k.resolve=(...r)=>r.length>0&&k.isAbsolute(r[0])?jh.default.posix.resolve(...r):jh.default.posix.resolve(k.cwd(),...r);var HO=function(r,e,t){return e=r.normalize(e),t=r.normalize(t),e===t?".":(e.endsWith(r.sep)||(e=e+r.sep),t.startsWith(e)?t.slice(e.length):null)};H.fromPortablePath=jO;H.toPortablePath=sQ;H.contains=(r,e)=>HO(H,r,e);k.contains=(r,e)=>HO(k,r,e);var hge=/^([a-zA-Z]:.*)$/,pge=/^\/\/(\.\/)?(.*)$/,dge=/^\/([a-zA-Z]:.*)$/,Cge=/^\/unc\/(\.dot\/)?(.*)$/;function jO(r){if(process.platform!=="win32")return r;let e,t;if(e=r.match(dge))r=e[1];else if(t=r.match(Cge))r=`\\\\${t[1]?".\\":""}${t[2]}`;else return r;return r.replace(/\//g,"\\")}function sQ(r){if(process.platform!=="win32")return r;r=r.replace(/\\/g,"/");let e,t;return(e=r.match(hge))?r=`/${e[1]}`:(t=r.match(pge))&&(r=`/unc/${t[1]?".dot/":""}${t[2]}`),r}function NE(r,e){return r===H?jO(e):sQ(e)}function Jr(r){if(H.parse(r).dir!==""||k.parse(r).dir!=="")throw new Error(`Invalid filename: "${r}"`);return r}var TE=new Date(tQ*1e3),Gh;(function(t){t.Allow="allow",t.ReadOnly="readOnly"})(Gh||(Gh={}));async function GO(r,e,t,i,n){let s=r.pathUtils.normalize(e),o=t.pathUtils.normalize(i),a=[],l=[],{atime:c,mtime:u}=n.stableTime?{atime:TE,mtime:TE}:await t.lstatPromise(o);await r.mkdirpPromise(r.pathUtils.dirname(e),{utimes:[c,u]});let g=typeof r.lutimesPromise=="function"?r.lutimesPromise.bind(r):r.utimesPromise.bind(r);await oQ(a,l,g,r,s,t,o,te(N({},n),{didParentExist:!0}));for(let f of a)await f();await Promise.all(l.map(f=>f()))}async function oQ(r,e,t,i,n,s,o,a){var h,p;let l=a.didParentExist?await mge(i,n):null,c=await s.lstatPromise(o),{atime:u,mtime:g}=a.stableTime?{atime:TE,mtime:TE}:c,f;switch(!0){case c.isDirectory():f=await Ege(r,e,t,i,n,l,s,o,c,a);break;case c.isFile():f=await Ige(r,e,t,i,n,l,s,o,c,a);break;case c.isSymbolicLink():f=await yge(r,e,t,i,n,l,s,o,c,a);break;default:throw new Error(`Unsupported file type (${c.mode})`)}return(f||((h=l==null?void 0:l.mtime)==null?void 0:h.getTime())!==g.getTime()||((p=l==null?void 0:l.atime)==null?void 0:p.getTime())!==u.getTime())&&(e.push(()=>t(n,u,g)),f=!0),(l===null||(l.mode&511)!=(c.mode&511))&&(e.push(()=>i.chmodPromise(n,c.mode&511)),f=!0),f}async function mge(r,e){try{return await r.lstatPromise(e)}catch(t){return null}}async function Ege(r,e,t,i,n,s,o,a,l,c){if(s!==null&&!s.isDirectory())if(c.overwrite)r.push(async()=>i.removePromise(n)),s=null;else return!1;let u=!1;s===null&&(r.push(async()=>{try{await i.mkdirPromise(n,{mode:l.mode})}catch(h){if(h.code!=="EEXIST")throw h}}),u=!0);let g=await o.readdirPromise(a),f=c.didParentExist&&!s?te(N({},c),{didParentExist:!1}):c;if(c.stableSort)for(let h of g.sort())await oQ(r,e,t,i,i.pathUtils.join(n,h),o,o.pathUtils.join(a,h),f)&&(u=!0);else(await Promise.all(g.map(async p=>{await oQ(r,e,t,i,i.pathUtils.join(n,p),o,o.pathUtils.join(a,p),f)}))).some(p=>p)&&(u=!0);return u}var aQ=new WeakMap;function AQ(r,e,t,i,n){return async()=>{await r.linkPromise(t,e),n===Gh.ReadOnly&&(i.mode&=~146,await r.chmodPromise(e,i.mode))}}function wge(r,e,t,i,n){let s=aQ.get(r);return typeof s=="undefined"?async()=>{try{await r.copyFilePromise(t,e,LE.default.constants.COPYFILE_FICLONE_FORCE),aQ.set(r,!0)}catch(o){if(o.code==="ENOSYS"||o.code==="ENOTSUP")aQ.set(r,!1),await AQ(r,e,t,i,n)();else throw o}}:s?async()=>r.copyFilePromise(t,e,LE.default.constants.COPYFILE_FICLONE_FORCE):AQ(r,e,t,i,n)}async function Ige(r,e,t,i,n,s,o,a,l,c){var f;if(s!==null)if(c.overwrite)r.push(async()=>i.removePromise(n)),s=null;else return!1;let u=(f=c.linkStrategy)!=null?f:null,g=i===o?u!==null?wge(i,n,a,l,u):async()=>i.copyFilePromise(a,n,LE.default.constants.COPYFILE_FICLONE):u!==null?AQ(i,n,a,l,u):async()=>i.writeFilePromise(n,await o.readFilePromise(a));return r.push(async()=>g()),!0}async function yge(r,e,t,i,n,s,o,a,l,c){if(s!==null)if(c.overwrite)r.push(async()=>i.removePromise(n)),s=null;else return!1;return r.push(async()=>{await i.symlinkPromise(NE(i.pathUtils,await o.readlinkPromise(a)),n)}),!0}function Es(r,e){return Object.assign(new Error(`${r}: ${e}`),{code:r})}function OE(r){return Es("EBUSY",r)}function Yh(r,e){return Es("ENOSYS",`${r}, ${e}`)}function GA(r){return Es("EINVAL",`invalid argument, ${r}`)}function Ai(r){return Es("EBADF",`bad file descriptor, ${r}`)}function io(r){return Es("ENOENT",`no such file or directory, ${r}`)}function Ro(r){return Es("ENOTDIR",`not a directory, ${r}`)}function qh(r){return Es("EISDIR",`illegal operation on a directory, ${r}`)}function ME(r){return Es("EEXIST",`file already exists, ${r}`)}function In(r){return Es("EROFS",`read-only filesystem, ${r}`)}function YO(r){return Es("ENOTEMPTY",`directory not empty, ${r}`)}function qO(r){return Es("EOPNOTSUPP",`operation not supported, ${r}`)}function JO(){return Es("ERR_DIR_CLOSED","Directory handle was closed")}var lQ=class extends Error{constructor(e,t){super(e);this.name="Libzip Error",this.code=t}};var WO=class{constructor(e,t,i={}){this.path=e;this.nextDirent=t;this.opts=i;this.closed=!1}throwIfClosed(){if(this.closed)throw JO()}async*[Symbol.asyncIterator](){try{let e;for(;(e=await this.read())!==null;)yield e}finally{await this.close()}}read(e){let t=this.readSync();return typeof e!="undefined"?e(null,t):Promise.resolve(t)}readSync(){return this.throwIfClosed(),this.nextDirent()}close(e){return this.closeSync(),typeof e!="undefined"?e(null):Promise.resolve()}closeSync(){var e,t;this.throwIfClosed(),(t=(e=this.opts).onClose)==null||t.call(e),this.closed=!0}};function KE(r,e,t,i){let n=()=>{let s=t.shift();return typeof s=="undefined"?null:Object.assign(r.statSync(r.pathUtils.join(e,s)),{name:s})};return new WO(e,n,i)}var zO=ge(require("os"));var YA=class{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:t=!1}={}){let i=[e];for(;i.length>0;){let n=i.shift();if((await this.lstatPromise(n)).isDirectory()){let o=await this.readdirPromise(n);if(t)for(let a of o.sort())i.push(this.pathUtils.join(n,a));else throw new Error("Not supported")}else yield n}}async removePromise(e,{recursive:t=!0,maxRetries:i=5}={}){let n;try{n=await this.lstatPromise(e)}catch(s){if(s.code==="ENOENT")return;throw s}if(n.isDirectory()){if(t){let s=await this.readdirPromise(e);await Promise.all(s.map(o=>this.removePromise(this.pathUtils.resolve(e,o))))}for(let s=0;s<=i;s++)try{await this.rmdirPromise(e);break}catch(o){if(o.code!=="EBUSY"&&o.code!=="ENOTEMPTY")throw o;ssetTimeout(a,s*100))}}else await this.unlinkPromise(e)}removeSync(e,{recursive:t=!0}={}){let i;try{i=this.lstatSync(e)}catch(n){if(n.code==="ENOENT")return;throw n}if(i.isDirectory()){if(t)for(let n of this.readdirSync(e))this.removeSync(this.pathUtils.resolve(e,n));this.rmdirSync(e)}else this.unlinkSync(e)}async mkdirpPromise(e,{chmod:t,utimes:i}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let n=e.split(this.pathUtils.sep),s;for(let o=2;o<=n.length;++o){let a=n.slice(0,o).join(this.pathUtils.sep);if(!this.existsSync(a)){try{await this.mkdirPromise(a)}catch(l){if(l.code==="EEXIST")continue;throw l}if(s!=null||(s=a),t!=null&&await this.chmodPromise(a,t),i!=null)await this.utimesPromise(a,i[0],i[1]);else{let l=await this.statPromise(this.pathUtils.dirname(a));await this.utimesPromise(a,l.atime,l.mtime)}}}return s}mkdirpSync(e,{chmod:t,utimes:i}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let n=e.split(this.pathUtils.sep),s;for(let o=2;o<=n.length;++o){let a=n.slice(0,o).join(this.pathUtils.sep);if(!this.existsSync(a)){try{this.mkdirSync(a)}catch(l){if(l.code==="EEXIST")continue;throw l}if(s!=null||(s=a),t!=null&&this.chmodSync(a,t),i!=null)this.utimesSync(a,i[0],i[1]);else{let l=this.statSync(this.pathUtils.dirname(a));this.utimesSync(a,l.atime,l.mtime)}}}return s}async copyPromise(e,t,{baseFs:i=this,overwrite:n=!0,stableSort:s=!1,stableTime:o=!1,linkStrategy:a=null}={}){return await GO(this,e,i,t,{overwrite:n,stableSort:s,stableTime:o,linkStrategy:a})}copySync(e,t,{baseFs:i=this,overwrite:n=!0}={}){let s=i.lstatSync(t),o=this.existsSync(e);if(s.isDirectory()){this.mkdirpSync(e);let l=i.readdirSync(t);for(let c of l)this.copySync(this.pathUtils.join(e,c),i.pathUtils.join(t,c),{baseFs:i,overwrite:n})}else if(s.isFile()){if(!o||n){o&&this.removeSync(e);let l=i.readFileSync(t);this.writeFileSync(e,l)}}else if(s.isSymbolicLink()){if(!o||n){o&&this.removeSync(e);let l=i.readlinkSync(t);this.symlinkSync(NE(this.pathUtils,l),e)}}else throw new Error(`Unsupported file type (file: ${t}, mode: 0o${s.mode.toString(8).padStart(6,"0")})`);let a=s.mode&511;this.chmodSync(e,a)}async changeFilePromise(e,t,i={}){return Buffer.isBuffer(t)?this.changeFileBufferPromise(e,t,i):this.changeFileTextPromise(e,t,i)}async changeFileBufferPromise(e,t,{mode:i}={}){let n=Buffer.alloc(0);try{n=await this.readFilePromise(e)}catch(s){}Buffer.compare(n,t)!==0&&await this.writeFilePromise(e,t,{mode:i})}async changeFileTextPromise(e,t,{automaticNewlines:i,mode:n}={}){let s="";try{s=await this.readFilePromise(e,"utf8")}catch(a){}let o=i?sc(s,t):t;s!==o&&await this.writeFilePromise(e,o,{mode:n})}changeFileSync(e,t,i={}){return Buffer.isBuffer(t)?this.changeFileBufferSync(e,t,i):this.changeFileTextSync(e,t,i)}changeFileBufferSync(e,t,{mode:i}={}){let n=Buffer.alloc(0);try{n=this.readFileSync(e)}catch(s){}Buffer.compare(n,t)!==0&&this.writeFileSync(e,t,{mode:i})}changeFileTextSync(e,t,{automaticNewlines:i=!1,mode:n}={}){let s="";try{s=this.readFileSync(e,"utf8")}catch(a){}let o=i?sc(s,t):t;s!==o&&this.writeFileSync(e,o,{mode:n})}async movePromise(e,t){try{await this.renamePromise(e,t)}catch(i){if(i.code==="EXDEV")await this.copyPromise(t,e),await this.removePromise(e);else throw i}}moveSync(e,t){try{this.renameSync(e,t)}catch(i){if(i.code==="EXDEV")this.copySync(t,e),this.removeSync(e);else throw i}}async lockPromise(e,t){let i=`${e}.flock`,n=1e3/60,s=Date.now(),o=null,a=async()=>{let l;try{[l]=await this.readJsonPromise(i)}catch(c){return Date.now()-s<500}try{return process.kill(l,0),!0}catch(c){return!1}};for(;o===null;)try{o=await this.openPromise(i,"wx")}catch(l){if(l.code==="EEXIST"){if(!await a())try{await this.unlinkPromise(i);continue}catch(c){}if(Date.now()-s<60*1e3)await new Promise(c=>setTimeout(c,n));else throw new Error(`Couldn't acquire a lock in a reasonable time (via ${i})`)}else throw l}await this.writePromise(o,JSON.stringify([process.pid]));try{return await t()}finally{try{await this.closePromise(o),await this.unlinkPromise(i)}catch(l){}}}async readJsonPromise(e){let t=await this.readFilePromise(e,"utf8");try{return JSON.parse(t)}catch(i){throw i.message+=` (in ${e})`,i}}readJsonSync(e){let t=this.readFileSync(e,"utf8");try{return JSON.parse(t)}catch(i){throw i.message+=` (in ${e})`,i}}async writeJsonPromise(e,t){return await this.writeFilePromise(e,`${JSON.stringify(t,null,2)} +`)}writeJsonSync(e,t){return this.writeFileSync(e,`${JSON.stringify(t,null,2)} +`)}async preserveTimePromise(e,t){let i=await this.lstatPromise(e),n=await t();typeof n!="undefined"&&(e=n),this.lutimesPromise?await this.lutimesPromise(e,i.atime,i.mtime):i.isSymbolicLink()||await this.utimesPromise(e,i.atime,i.mtime)}async preserveTimeSync(e,t){let i=this.lstatSync(e),n=t();typeof n!="undefined"&&(e=n),this.lutimesSync?this.lutimesSync(e,i.atime,i.mtime):i.isSymbolicLink()||this.utimesSync(e,i.atime,i.mtime)}},oc=class extends YA{constructor(){super(k)}};function Bge(r){let e=r.match(/\r?\n/g);if(e===null)return zO.EOL;let t=e.filter(n=>n===`\r +`).length,i=e.length-t;return t>i?`\r +`:` +`}function sc(r,e){return e.replace(/\r?\n/g,Bge(r))}var zu=ge(require("fs")),cQ=ge(require("stream")),ZO=ge(require("util")),uQ=ge(require("zlib"));var _O=ge(require("fs"));var ar=class extends oc{constructor(e=_O.default){super();this.realFs=e,typeof this.realFs.lutimes!="undefined"&&(this.lutimesPromise=this.lutimesPromiseImpl,this.lutimesSync=this.lutimesSyncImpl)}getExtractHint(){return!1}getRealPath(){return Me.root}resolve(e){return k.resolve(e)}async openPromise(e,t,i){return await new Promise((n,s)=>{this.realFs.open(H.fromPortablePath(e),t,i,this.makeCallback(n,s))})}openSync(e,t,i){return this.realFs.openSync(H.fromPortablePath(e),t,i)}async opendirPromise(e,t){return await new Promise((i,n)=>{typeof t!="undefined"?this.realFs.opendir(H.fromPortablePath(e),t,this.makeCallback(i,n)):this.realFs.opendir(H.fromPortablePath(e),this.makeCallback(i,n))}).then(i=>Object.defineProperty(i,"path",{value:e,configurable:!0,writable:!0}))}opendirSync(e,t){let i=typeof t!="undefined"?this.realFs.opendirSync(H.fromPortablePath(e),t):this.realFs.opendirSync(H.fromPortablePath(e));return Object.defineProperty(i,"path",{value:e,configurable:!0,writable:!0})}async readPromise(e,t,i=0,n=0,s=-1){return await new Promise((o,a)=>{this.realFs.read(e,t,i,n,s,(l,c)=>{l?a(l):o(c)})})}readSync(e,t,i,n,s){return this.realFs.readSync(e,t,i,n,s)}async writePromise(e,t,i,n,s){return await new Promise((o,a)=>typeof t=="string"?this.realFs.write(e,t,i,this.makeCallback(o,a)):this.realFs.write(e,t,i,n,s,this.makeCallback(o,a)))}writeSync(e,t,i,n,s){return typeof t=="string"?this.realFs.writeSync(e,t,i):this.realFs.writeSync(e,t,i,n,s)}async closePromise(e){await new Promise((t,i)=>{this.realFs.close(e,this.makeCallback(t,i))})}closeSync(e){this.realFs.closeSync(e)}createReadStream(e,t){let i=e!==null?H.fromPortablePath(e):e;return this.realFs.createReadStream(i,t)}createWriteStream(e,t){let i=e!==null?H.fromPortablePath(e):e;return this.realFs.createWriteStream(i,t)}async realpathPromise(e){return await new Promise((t,i)=>{this.realFs.realpath(H.fromPortablePath(e),{},this.makeCallback(t,i))}).then(t=>H.toPortablePath(t))}realpathSync(e){return H.toPortablePath(this.realFs.realpathSync(H.fromPortablePath(e),{}))}async existsPromise(e){return await new Promise(t=>{this.realFs.exists(H.fromPortablePath(e),t)})}accessSync(e,t){return this.realFs.accessSync(H.fromPortablePath(e),t)}async accessPromise(e,t){return await new Promise((i,n)=>{this.realFs.access(H.fromPortablePath(e),t,this.makeCallback(i,n))})}existsSync(e){return this.realFs.existsSync(H.fromPortablePath(e))}async statPromise(e,t){return await new Promise((i,n)=>{t?this.realFs.stat(H.fromPortablePath(e),t,this.makeCallback(i,n)):this.realFs.stat(H.fromPortablePath(e),this.makeCallback(i,n))})}statSync(e,t){return t?this.realFs.statSync(H.fromPortablePath(e),t):this.realFs.statSync(H.fromPortablePath(e))}async fstatPromise(e,t){return await new Promise((i,n)=>{t?this.realFs.fstat(e,t,this.makeCallback(i,n)):this.realFs.fstat(e,this.makeCallback(i,n))})}fstatSync(e,t){return t?this.realFs.fstatSync(e,t):this.realFs.fstatSync(e)}async lstatPromise(e,t){return await new Promise((i,n)=>{t?this.realFs.lstat(H.fromPortablePath(e),t,this.makeCallback(i,n)):this.realFs.lstat(H.fromPortablePath(e),this.makeCallback(i,n))})}lstatSync(e,t){return t?this.realFs.lstatSync(H.fromPortablePath(e),t):this.realFs.lstatSync(H.fromPortablePath(e))}async fchmodPromise(e,t){return await new Promise((i,n)=>{this.realFs.fchmod(e,t,this.makeCallback(i,n))})}fchmodSync(e,t){return this.realFs.fchmodSync(e,t)}async chmodPromise(e,t){return await new Promise((i,n)=>{this.realFs.chmod(H.fromPortablePath(e),t,this.makeCallback(i,n))})}chmodSync(e,t){return this.realFs.chmodSync(H.fromPortablePath(e),t)}async chownPromise(e,t,i){return await new Promise((n,s)=>{this.realFs.chown(H.fromPortablePath(e),t,i,this.makeCallback(n,s))})}chownSync(e,t,i){return this.realFs.chownSync(H.fromPortablePath(e),t,i)}async renamePromise(e,t){return await new Promise((i,n)=>{this.realFs.rename(H.fromPortablePath(e),H.fromPortablePath(t),this.makeCallback(i,n))})}renameSync(e,t){return this.realFs.renameSync(H.fromPortablePath(e),H.fromPortablePath(t))}async copyFilePromise(e,t,i=0){return await new Promise((n,s)=>{this.realFs.copyFile(H.fromPortablePath(e),H.fromPortablePath(t),i,this.makeCallback(n,s))})}copyFileSync(e,t,i=0){return this.realFs.copyFileSync(H.fromPortablePath(e),H.fromPortablePath(t),i)}async appendFilePromise(e,t,i){return await new Promise((n,s)=>{let o=typeof e=="string"?H.fromPortablePath(e):e;i?this.realFs.appendFile(o,t,i,this.makeCallback(n,s)):this.realFs.appendFile(o,t,this.makeCallback(n,s))})}appendFileSync(e,t,i){let n=typeof e=="string"?H.fromPortablePath(e):e;i?this.realFs.appendFileSync(n,t,i):this.realFs.appendFileSync(n,t)}async writeFilePromise(e,t,i){return await new Promise((n,s)=>{let o=typeof e=="string"?H.fromPortablePath(e):e;i?this.realFs.writeFile(o,t,i,this.makeCallback(n,s)):this.realFs.writeFile(o,t,this.makeCallback(n,s))})}writeFileSync(e,t,i){let n=typeof e=="string"?H.fromPortablePath(e):e;i?this.realFs.writeFileSync(n,t,i):this.realFs.writeFileSync(n,t)}async unlinkPromise(e){return await new Promise((t,i)=>{this.realFs.unlink(H.fromPortablePath(e),this.makeCallback(t,i))})}unlinkSync(e){return this.realFs.unlinkSync(H.fromPortablePath(e))}async utimesPromise(e,t,i){return await new Promise((n,s)=>{this.realFs.utimes(H.fromPortablePath(e),t,i,this.makeCallback(n,s))})}utimesSync(e,t,i){this.realFs.utimesSync(H.fromPortablePath(e),t,i)}async lutimesPromiseImpl(e,t,i){let n=this.realFs.lutimes;if(typeof n=="undefined")throw Yh("unavailable Node binding",`lutimes '${e}'`);return await new Promise((s,o)=>{n.call(this.realFs,H.fromPortablePath(e),t,i,this.makeCallback(s,o))})}lutimesSyncImpl(e,t,i){let n=this.realFs.lutimesSync;if(typeof n=="undefined")throw Yh("unavailable Node binding",`lutimes '${e}'`);n.call(this.realFs,H.fromPortablePath(e),t,i)}async mkdirPromise(e,t){return await new Promise((i,n)=>{this.realFs.mkdir(H.fromPortablePath(e),t,this.makeCallback(i,n))})}mkdirSync(e,t){return this.realFs.mkdirSync(H.fromPortablePath(e),t)}async rmdirPromise(e,t){return await new Promise((i,n)=>{t?this.realFs.rmdir(H.fromPortablePath(e),t,this.makeCallback(i,n)):this.realFs.rmdir(H.fromPortablePath(e),this.makeCallback(i,n))})}rmdirSync(e,t){return this.realFs.rmdirSync(H.fromPortablePath(e),t)}async linkPromise(e,t){return await new Promise((i,n)=>{this.realFs.link(H.fromPortablePath(e),H.fromPortablePath(t),this.makeCallback(i,n))})}linkSync(e,t){return this.realFs.linkSync(H.fromPortablePath(e),H.fromPortablePath(t))}async symlinkPromise(e,t,i){return await new Promise((n,s)=>{this.realFs.symlink(H.fromPortablePath(e.replace(/\/+$/,"")),H.fromPortablePath(t),i,this.makeCallback(n,s))})}symlinkSync(e,t,i){return this.realFs.symlinkSync(H.fromPortablePath(e.replace(/\/+$/,"")),H.fromPortablePath(t),i)}async readFilePromise(e,t){return await new Promise((i,n)=>{let s=typeof e=="string"?H.fromPortablePath(e):e;this.realFs.readFile(s,t,this.makeCallback(i,n))})}readFileSync(e,t){let i=typeof e=="string"?H.fromPortablePath(e):e;return this.realFs.readFileSync(i,t)}async readdirPromise(e,t){return await new Promise((i,n)=>{(t==null?void 0:t.withFileTypes)?this.realFs.readdir(H.fromPortablePath(e),{withFileTypes:!0},this.makeCallback(i,n)):this.realFs.readdir(H.fromPortablePath(e),this.makeCallback(s=>i(s),n))})}readdirSync(e,t){return(t==null?void 0:t.withFileTypes)?this.realFs.readdirSync(H.fromPortablePath(e),{withFileTypes:!0}):this.realFs.readdirSync(H.fromPortablePath(e))}async readlinkPromise(e){return await new Promise((t,i)=>{this.realFs.readlink(H.fromPortablePath(e),this.makeCallback(t,i))}).then(t=>H.toPortablePath(t))}readlinkSync(e){return H.toPortablePath(this.realFs.readlinkSync(H.fromPortablePath(e)))}async truncatePromise(e,t){return await new Promise((i,n)=>{this.realFs.truncate(H.fromPortablePath(e),t,this.makeCallback(i,n))})}truncateSync(e,t){return this.realFs.truncateSync(H.fromPortablePath(e),t)}async ftruncatePromise(e,t){return await new Promise((i,n)=>{this.realFs.ftruncate(e,t,this.makeCallback(i,n))})}ftruncateSync(e,t){return this.realFs.ftruncateSync(e,t)}watch(e,t,i){return this.realFs.watch(H.fromPortablePath(e),t,i)}watchFile(e,t,i){return this.realFs.watchFile(H.fromPortablePath(e),t,i)}unwatchFile(e,t){return this.realFs.unwatchFile(H.fromPortablePath(e),t)}makeCallback(e,t){return(i,n)=>{i?t(i):e(n)}}};var VO=ge(require("events"));var ac;(function(t){t.Change="change",t.Stop="stop"})(ac||(ac={}));var Ac;(function(i){i.Ready="ready",i.Running="running",i.Stopped="stopped"})(Ac||(Ac={}));function XO(r,e){if(r!==e)throw new Error(`Invalid StatWatcher status: expected '${e}', got '${r}'`)}var Jh=class extends VO.EventEmitter{constructor(e,t,{bigint:i=!1}={}){super();this.status=Ac.Ready;this.changeListeners=new Map;this.startTimeout=null;this.fakeFs=e,this.path=t,this.bigint=i,this.lastStats=this.stat()}static create(e,t,i){let n=new Jh(e,t,i);return n.start(),n}start(){XO(this.status,Ac.Ready),this.status=Ac.Running,this.startTimeout=setTimeout(()=>{this.startTimeout=null,this.fakeFs.existsSync(this.path)||this.emit(ac.Change,this.lastStats,this.lastStats)},3)}stop(){XO(this.status,Ac.Running),this.status=Ac.Stopped,this.startTimeout!==null&&(clearTimeout(this.startTimeout),this.startTimeout=null),this.emit(ac.Stop)}stat(){try{return this.fakeFs.statSync(this.path,{bigint:this.bigint})}catch(e){let t=this.bigint?new Uh:new jA;return RE(t)}}makeInterval(e){let t=setInterval(()=>{let i=this.stat(),n=this.lastStats;nQ(i,n)||(this.lastStats=i,this.emit(ac.Change,i,n))},e.interval);return e.persistent?t:t.unref()}registerChangeListener(e,t){this.addListener(ac.Change,e),this.changeListeners.set(e,this.makeInterval(t))}unregisterChangeListener(e){this.removeListener(ac.Change,e);let t=this.changeListeners.get(e);typeof t!="undefined"&&clearInterval(t),this.changeListeners.delete(e)}unregisterAllChangeListeners(){for(let e of this.changeListeners.keys())this.unregisterChangeListener(e)}hasChangeListeners(){return this.changeListeners.size>0}ref(){for(let e of this.changeListeners.values())e.ref();return this}unref(){for(let e of this.changeListeners.values())e.unref();return this}};var UE=new WeakMap;function HE(r,e,t,i){let n,s,o,a;switch(typeof t){case"function":n=!1,s=!0,o=5007,a=t;break;default:({bigint:n=!1,persistent:s=!0,interval:o=5007}=t),a=i;break}let l=UE.get(r);typeof l=="undefined"&&UE.set(r,l=new Map);let c=l.get(e);return typeof c=="undefined"&&(c=Jh.create(r,e,{bigint:n}),l.set(e,c)),c.registerChangeListener(a,{persistent:s,interval:o}),c}function Wh(r,e,t){let i=UE.get(r);if(typeof i=="undefined")return;let n=i.get(e);typeof n!="undefined"&&(typeof t=="undefined"?n.unregisterAllChangeListeners():n.unregisterChangeListener(t),n.hasChangeListeners()||(n.stop(),i.delete(e)))}function zh(r){let e=UE.get(r);if(typeof e!="undefined")for(let t of e.keys())Wh(r,t)}var lc="mixed";function bge(r){if(typeof r=="string"&&String(+r)===r)return+r;if(Number.isFinite(r))return r<0?Date.now()/1e3:r;if(ZO.types.isDate(r))return r.getTime()/1e3;throw new Error("Invalid time")}function $O(){return Buffer.from([80,75,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}var li=class extends oc{constructor(e,t){super();this.lzSource=null;this.listings=new Map;this.entries=new Map;this.fileSources=new Map;this.fds=new Map;this.nextFd=0;this.ready=!1;this.readOnly=!1;this.libzip=t.libzip;let i=t;if(this.level=typeof i.level!="undefined"?i.level:lc,e!=null||(e=$O()),typeof e=="string"){let{baseFs:o=new ar}=i;this.baseFs=o,this.path=e}else this.path=null,this.baseFs=null;if(t.stats)this.stats=t.stats;else if(typeof e=="string")try{this.stats=this.baseFs.statSync(e)}catch(o){if(o.code==="ENOENT"&&i.create)this.stats=Hh();else throw o}else this.stats=Hh();let n=this.libzip.malloc(4);try{let o=0;if(typeof e=="string"&&i.create&&(o|=this.libzip.ZIP_CREATE|this.libzip.ZIP_TRUNCATE),t.readOnly&&(o|=this.libzip.ZIP_RDONLY,this.readOnly=!0),typeof e=="string")this.zip=this.libzip.open(H.fromPortablePath(e),o,n);else{let a=this.allocateUnattachedSource(e);try{this.zip=this.libzip.openFromSource(a,o,n),this.lzSource=a}catch(l){throw this.libzip.source.free(a),l}}if(this.zip===0){let a=this.libzip.struct.errorS();throw this.libzip.error.initWithCode(a,this.libzip.getValue(n,"i32")),this.makeLibzipError(a)}}finally{this.libzip.free(n)}this.listings.set(Me.root,new Set);let s=this.libzip.getNumEntries(this.zip,0);for(let o=0;oe)throw new Error("Overread");let n=this.libzip.HEAPU8.subarray(t,t+e);return Buffer.from(n)}finally{this.libzip.free(t)}}finally{this.libzip.source.close(this.lzSource),this.libzip.source.free(this.lzSource),this.ready=!1}}prepareClose(){if(!this.ready)throw OE("archive closed, close");zh(this)}saveAndClose(){if(!this.path||!this.baseFs)throw new Error("ZipFS cannot be saved and must be discarded when loaded from a buffer");if(this.prepareClose(),this.readOnly){this.discardAndClose();return}let e=this.baseFs.existsSync(this.path)||this.stats.mode===Kh?void 0:this.stats.mode;if(this.entries.size===0)this.discardAndClose(),this.baseFs.writeFileSync(this.path,$O(),{mode:e});else{if(this.libzip.close(this.zip)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));typeof e!="undefined"&&this.baseFs.chmodSync(this.path,e)}this.ready=!1}discardAndClose(){this.prepareClose(),this.libzip.discard(this.zip),this.ready=!1}resolve(e){return k.resolve(Me.root,e)}async openPromise(e,t,i){return this.openSync(e,t,i)}openSync(e,t,i){let n=this.nextFd++;return this.fds.set(n,{cursor:0,p:e}),n}hasOpenFileHandles(){return!!this.fds.size}async opendirPromise(e,t){return this.opendirSync(e,t)}opendirSync(e,t={}){let i=this.resolveFilename(`opendir '${e}'`,e);if(!this.entries.has(i)&&!this.listings.has(i))throw io(`opendir '${e}'`);let n=this.listings.get(i);if(!n)throw Ro(`opendir '${e}'`);let s=[...n],o=this.openSync(i,"r");return KE(this,i,s,{onClose:()=>{this.closeSync(o)}})}async readPromise(e,t,i,n,s){return this.readSync(e,t,i,n,s)}readSync(e,t,i=0,n=t.byteLength,s=-1){let o=this.fds.get(e);if(typeof o=="undefined")throw Ai("read");let a=s===-1||s===null?o.cursor:s,l=this.readFileSync(o.p);l.copy(t,i,a,a+n);let c=Math.max(0,Math.min(l.length-a,n));return(s===-1||s===null)&&(o.cursor+=c),c}async writePromise(e,t,i,n,s){return typeof t=="string"?this.writeSync(e,t,s):this.writeSync(e,t,i,n,s)}writeSync(e,t,i,n,s){throw typeof this.fds.get(e)=="undefined"?Ai("read"):new Error("Unimplemented")}async closePromise(e){return this.closeSync(e)}closeSync(e){if(typeof this.fds.get(e)=="undefined")throw Ai("read");this.fds.delete(e)}createReadStream(e,{encoding:t}={}){if(e===null)throw new Error("Unimplemented");let i=this.openSync(e,"r"),n=Object.assign(new cQ.PassThrough({emitClose:!0,autoDestroy:!0,destroy:(o,a)=>{clearImmediate(s),this.closeSync(i),a(o)}}),{close(){n.destroy()},bytesRead:0,path:e}),s=setImmediate(async()=>{try{let o=await this.readFilePromise(e,t);n.bytesRead=o.length,n.end(o)}catch(o){n.destroy(o)}});return n}createWriteStream(e,{encoding:t}={}){if(this.readOnly)throw In(`open '${e}'`);if(e===null)throw new Error("Unimplemented");let i=[],n=this.openSync(e,"w"),s=Object.assign(new cQ.PassThrough({autoDestroy:!0,emitClose:!0,destroy:(o,a)=>{try{o?a(o):(this.writeFileSync(e,Buffer.concat(i),t),a(null))}catch(l){a(l)}finally{this.closeSync(n)}}}),{bytesWritten:0,path:e,close(){s.destroy()}});return s.on("data",o=>{let a=Buffer.from(o);s.bytesWritten+=a.length,i.push(a)}),s}async realpathPromise(e){return this.realpathSync(e)}realpathSync(e){let t=this.resolveFilename(`lstat '${e}'`,e);if(!this.entries.has(t)&&!this.listings.has(t))throw io(`lstat '${e}'`);return t}async existsPromise(e){return this.existsSync(e)}existsSync(e){if(!this.ready)throw OE(`archive closed, existsSync '${e}'`);if(this.symlinkCount===0){let i=k.resolve(Me.root,e);return this.entries.has(i)||this.listings.has(i)}let t;try{t=this.resolveFilename(`stat '${e}'`,e,void 0,!1)}catch(i){return!1}return t===void 0?!1:this.entries.has(t)||this.listings.has(t)}async accessPromise(e,t){return this.accessSync(e,t)}accessSync(e,t=zu.constants.F_OK){let i=this.resolveFilename(`access '${e}'`,e);if(!this.entries.has(i)&&!this.listings.has(i))throw io(`access '${e}'`);if(this.readOnly&&t&zu.constants.W_OK)throw In(`access '${e}'`)}async statPromise(e,t={bigint:!1}){return t.bigint?this.statSync(e,{bigint:!0}):this.statSync(e)}statSync(e,t={bigint:!1,throwIfNoEntry:!0}){let i=this.resolveFilename(`stat '${e}'`,e,void 0,t.throwIfNoEntry);if(i!==void 0){if(!this.entries.has(i)&&!this.listings.has(i)){if(t.throwIfNoEntry===!1)return;throw io(`stat '${e}'`)}if(e[e.length-1]==="/"&&!this.listings.has(i))throw Ro(`stat '${e}'`);return this.statImpl(`stat '${e}'`,i,t)}}async fstatPromise(e,t){return this.fstatSync(e,t)}fstatSync(e,t){let i=this.fds.get(e);if(typeof i=="undefined")throw Ai("fstatSync");let{p:n}=i,s=this.resolveFilename(`stat '${n}'`,n);if(!this.entries.has(s)&&!this.listings.has(s))throw io(`stat '${n}'`);if(n[n.length-1]==="/"&&!this.listings.has(s))throw Ro(`stat '${n}'`);return this.statImpl(`fstat '${n}'`,s,t)}async lstatPromise(e,t={bigint:!1}){return t.bigint?this.lstatSync(e,{bigint:!0}):this.lstatSync(e)}lstatSync(e,t={bigint:!1,throwIfNoEntry:!0}){let i=this.resolveFilename(`lstat '${e}'`,e,!1,t.throwIfNoEntry);if(i!==void 0){if(!this.entries.has(i)&&!this.listings.has(i)){if(t.throwIfNoEntry===!1)return;throw io(`lstat '${e}'`)}if(e[e.length-1]==="/"&&!this.listings.has(i))throw Ro(`lstat '${e}'`);return this.statImpl(`lstat '${e}'`,i,t)}}statImpl(e,t,i={}){let n=this.entries.get(t);if(typeof n!="undefined"){let s=this.libzip.struct.statS();if(this.libzip.statIndex(this.zip,n,0,0,s)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let a=this.stats.uid,l=this.stats.gid,c=this.libzip.struct.statSize(s)>>>0,u=512,g=Math.ceil(c/u),f=(this.libzip.struct.statMtime(s)>>>0)*1e3,h=f,p=f,m=f,y=new Date(h),b=new Date(p),v=new Date(m),x=new Date(f),T=this.listings.has(t)?Da:this.isSymbolicLink(n)?Fa:Ra,q=T===Da?493:420,Y=T|this.getUnixMode(n,q)&511,$=this.libzip.struct.statCrc(s),_=Object.assign(new jA,{uid:a,gid:l,size:c,blksize:u,blocks:g,atime:y,birthtime:b,ctime:v,mtime:x,atimeMs:h,birthtimeMs:p,ctimeMs:m,mtimeMs:f,mode:Y,crc:$});return i.bigint===!0?FE(_):_}if(this.listings.has(t)){let s=this.stats.uid,o=this.stats.gid,a=0,l=512,c=0,u=this.stats.mtimeMs,g=this.stats.mtimeMs,f=this.stats.mtimeMs,h=this.stats.mtimeMs,p=new Date(u),m=new Date(g),y=new Date(f),b=new Date(h),v=Da|493,x=0,T=Object.assign(new jA,{uid:s,gid:o,size:a,blksize:l,blocks:c,atime:p,birthtime:m,ctime:y,mtime:b,atimeMs:u,birthtimeMs:g,ctimeMs:f,mtimeMs:h,mode:v,crc:x});return i.bigint===!0?FE(T):T}throw new Error("Unreachable")}getUnixMode(e,t){if(this.libzip.file.getExternalAttributes(this.zip,e,0,0,this.libzip.uint08S,this.libzip.uint32S)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX?t:this.libzip.getValue(this.libzip.uint32S,"i32")>>>16}registerListing(e){let t=this.listings.get(e);if(t)return t;this.registerListing(k.dirname(e)).add(k.basename(e));let n=new Set;return this.listings.set(e,n),n}registerEntry(e,t){this.registerListing(k.dirname(e)).add(k.basename(e)),this.entries.set(e,t)}unregisterListing(e){this.listings.delete(e);let t=this.listings.get(k.dirname(e));t==null||t.delete(k.basename(e))}unregisterEntry(e){this.unregisterListing(e);let t=this.entries.get(e);this.entries.delete(e),typeof t!="undefined"&&(this.fileSources.delete(t),this.isSymbolicLink(t)&&this.symlinkCount--)}deleteEntry(e,t){if(this.unregisterEntry(e),this.libzip.delete(this.zip,t)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}resolveFilename(e,t,i=!0,n=!0){if(!this.ready)throw OE(`archive closed, ${e}`);let s=k.resolve(Me.root,t);if(s==="/")return Me.root;let o=this.entries.get(s);if(i&&o!==void 0)if(this.symlinkCount!==0&&this.isSymbolicLink(o)){let a=this.getFileSource(o).toString();return this.resolveFilename(e,k.resolve(k.dirname(s),a),!0,n)}else return s;for(;;){let a=this.resolveFilename(e,k.dirname(s),!0,n);if(a===void 0)return a;let l=this.listings.has(a),c=this.entries.has(a);if(!l&&!c){if(n===!1)return;throw io(e)}if(!l)throw Ro(e);if(s=k.resolve(a,k.basename(s)),!i||this.symlinkCount===0)break;let u=this.libzip.name.locate(this.zip,s.slice(1));if(u===-1)break;if(this.isSymbolicLink(u)){let g=this.getFileSource(u).toString();s=k.resolve(k.dirname(s),g)}else break}return s}allocateBuffer(e){Buffer.isBuffer(e)||(e=Buffer.from(e));let t=this.libzip.malloc(e.byteLength);if(!t)throw new Error("Couldn't allocate enough memory");return new Uint8Array(this.libzip.HEAPU8.buffer,t,e.byteLength).set(e),{buffer:t,byteLength:e.byteLength}}allocateUnattachedSource(e){let t=this.libzip.struct.errorS(),{buffer:i,byteLength:n}=this.allocateBuffer(e),s=this.libzip.source.fromUnattachedBuffer(i,n,0,!0,t);if(s===0)throw this.libzip.free(t),this.makeLibzipError(t);return s}allocateSource(e){let{buffer:t,byteLength:i}=this.allocateBuffer(e),n=this.libzip.source.fromBuffer(this.zip,t,i,0,!0);if(n===0)throw this.libzip.free(t),this.makeLibzipError(this.libzip.getError(this.zip));return n}setFileSource(e,t){let i=Buffer.isBuffer(t)?t:Buffer.from(t),n=k.relative(Me.root,e),s=this.allocateSource(t);try{let o=this.libzip.file.add(this.zip,n,s,this.libzip.ZIP_FL_OVERWRITE);if(o===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(this.level!=="mixed"){let a=this.level===0?this.libzip.ZIP_CM_STORE:this.libzip.ZIP_CM_DEFLATE;if(this.libzip.file.setCompression(this.zip,o,0,a,this.level)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}return this.fileSources.set(o,i),o}catch(o){throw this.libzip.source.free(s),o}}isSymbolicLink(e){if(this.symlinkCount===0)return!1;if(this.libzip.file.getExternalAttributes(this.zip,e,0,0,this.libzip.uint08S,this.libzip.uint32S)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX?!1:(this.libzip.getValue(this.libzip.uint32S,"i32")>>>16&_n)===Fa}getFileSource(e,t={asyncDecompress:!1}){let i=this.fileSources.get(e);if(typeof i!="undefined")return i;let n=this.libzip.struct.statS();if(this.libzip.statIndex(this.zip,e,0,0,n)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let o=this.libzip.struct.statCompSize(n),a=this.libzip.struct.statCompMethod(n),l=this.libzip.malloc(o);try{let c=this.libzip.fopenIndex(this.zip,e,0,this.libzip.ZIP_FL_COMPRESSED);if(c===0)throw this.makeLibzipError(this.libzip.getError(this.zip));try{let u=this.libzip.fread(c,l,o,0);if(u===-1)throw this.makeLibzipError(this.libzip.file.getError(c));if(uo)throw new Error("Overread");let g=this.libzip.HEAPU8.subarray(l,l+o),f=Buffer.from(g);if(a===0)return this.fileSources.set(e,f),f;if(t.asyncDecompress)return new Promise((h,p)=>{uQ.default.inflateRaw(f,(m,y)=>{m?p(m):(this.fileSources.set(e,y),h(y))})});{let h=uQ.default.inflateRawSync(f);return this.fileSources.set(e,h),h}}finally{this.libzip.fclose(c)}}finally{this.libzip.free(l)}}async fchmodPromise(e,t){return this.chmodPromise(this.fdToPath(e,"fchmod"),t)}fchmodSync(e,t){return this.chmodSync(this.fdToPath(e,"fchmodSync"),t)}async chmodPromise(e,t){return this.chmodSync(e,t)}chmodSync(e,t){if(this.readOnly)throw In(`chmod '${e}'`);t&=493;let i=this.resolveFilename(`chmod '${e}'`,e,!1),n=this.entries.get(i);if(typeof n=="undefined")throw new Error(`Assertion failed: The entry should have been registered (${i})`);let o=this.getUnixMode(n,Ra|0)&~511|t;if(this.libzip.file.setExternalAttributes(this.zip,n,0,0,this.libzip.ZIP_OPSYS_UNIX,o<<16)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}async chownPromise(e,t,i){return this.chownSync(e,t,i)}chownSync(e,t,i){throw new Error("Unimplemented")}async renamePromise(e,t){return this.renameSync(e,t)}renameSync(e,t){throw new Error("Unimplemented")}async copyFilePromise(e,t,i){let{indexSource:n,indexDest:s,resolvedDestP:o}=this.prepareCopyFile(e,t,i),a=await this.getFileSource(n,{asyncDecompress:!0}),l=this.setFileSource(o,a);l!==s&&this.registerEntry(o,l)}copyFileSync(e,t,i=0){let{indexSource:n,indexDest:s,resolvedDestP:o}=this.prepareCopyFile(e,t,i),a=this.getFileSource(n),l=this.setFileSource(o,a);l!==s&&this.registerEntry(o,l)}prepareCopyFile(e,t,i=0){if(this.readOnly)throw In(`copyfile '${e} -> '${t}'`);if((i&zu.constants.COPYFILE_FICLONE_FORCE)!=0)throw Yh("unsupported clone operation",`copyfile '${e}' -> ${t}'`);let n=this.resolveFilename(`copyfile '${e} -> ${t}'`,e),s=this.entries.get(n);if(typeof s=="undefined")throw GA(`copyfile '${e}' -> '${t}'`);let o=this.resolveFilename(`copyfile '${e}' -> ${t}'`,t),a=this.entries.get(o);if((i&(zu.constants.COPYFILE_EXCL|zu.constants.COPYFILE_FICLONE_FORCE))!=0&&typeof a!="undefined")throw ME(`copyfile '${e}' -> '${t}'`);return{indexSource:s,resolvedDestP:o,indexDest:a}}async appendFilePromise(e,t,i){if(this.readOnly)throw In(`open '${e}'`);return typeof i=="undefined"?i={flag:"a"}:typeof i=="string"?i={flag:"a",encoding:i}:typeof i.flag=="undefined"&&(i=N({flag:"a"},i)),this.writeFilePromise(e,t,i)}appendFileSync(e,t,i={}){if(this.readOnly)throw In(`open '${e}'`);return typeof i=="undefined"?i={flag:"a"}:typeof i=="string"?i={flag:"a",encoding:i}:typeof i.flag=="undefined"&&(i=N({flag:"a"},i)),this.writeFileSync(e,t,i)}fdToPath(e,t){var n;let i=(n=this.fds.get(e))==null?void 0:n.p;if(typeof i=="undefined")throw Ai(t);return i}async writeFilePromise(e,t,i){let{encoding:n,mode:s,index:o,resolvedP:a}=this.prepareWriteFile(e,i);o!==void 0&&typeof i=="object"&&i.flag&&i.flag.includes("a")&&(t=Buffer.concat([await this.getFileSource(o,{asyncDecompress:!0}),Buffer.from(t)])),n!==null&&(t=t.toString(n));let l=this.setFileSource(a,t);l!==o&&this.registerEntry(a,l),s!==null&&await this.chmodPromise(a,s)}writeFileSync(e,t,i){let{encoding:n,mode:s,index:o,resolvedP:a}=this.prepareWriteFile(e,i);o!==void 0&&typeof i=="object"&&i.flag&&i.flag.includes("a")&&(t=Buffer.concat([this.getFileSource(o),Buffer.from(t)])),n!==null&&(t=t.toString(n));let l=this.setFileSource(a,t);l!==o&&this.registerEntry(a,l),s!==null&&this.chmodSync(a,s)}prepareWriteFile(e,t){if(typeof e=="number"&&(e=this.fdToPath(e,"read")),this.readOnly)throw In(`open '${e}'`);let i=this.resolveFilename(`open '${e}'`,e);if(this.listings.has(i))throw qh(`open '${e}'`);let n=null,s=null;typeof t=="string"?n=t:typeof t=="object"&&({encoding:n=null,mode:s=null}=t);let o=this.entries.get(i);return{encoding:n,mode:s,resolvedP:i,index:o}}async unlinkPromise(e){return this.unlinkSync(e)}unlinkSync(e){if(this.readOnly)throw In(`unlink '${e}'`);let t=this.resolveFilename(`unlink '${e}'`,e);if(this.listings.has(t))throw qh(`unlink '${e}'`);let i=this.entries.get(t);if(typeof i=="undefined")throw GA(`unlink '${e}'`);this.deleteEntry(t,i)}async utimesPromise(e,t,i){return this.utimesSync(e,t,i)}utimesSync(e,t,i){if(this.readOnly)throw In(`utimes '${e}'`);let n=this.resolveFilename(`utimes '${e}'`,e);this.utimesImpl(n,i)}async lutimesPromise(e,t,i){return this.lutimesSync(e,t,i)}lutimesSync(e,t,i){if(this.readOnly)throw In(`lutimes '${e}'`);let n=this.resolveFilename(`utimes '${e}'`,e,!1);this.utimesImpl(n,i)}utimesImpl(e,t){this.listings.has(e)&&(this.entries.has(e)||this.hydrateDirectory(e));let i=this.entries.get(e);if(i===void 0)throw new Error("Unreachable");if(this.libzip.file.setMtime(this.zip,i,0,bge(t),0)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}async mkdirPromise(e,t){return this.mkdirSync(e,t)}mkdirSync(e,{mode:t=493,recursive:i=!1}={}){if(i)return this.mkdirpSync(e,{chmod:t});if(this.readOnly)throw In(`mkdir '${e}'`);let n=this.resolveFilename(`mkdir '${e}'`,e);if(this.entries.has(n)||this.listings.has(n))throw ME(`mkdir '${e}'`);this.hydrateDirectory(n),this.chmodSync(n,t)}async rmdirPromise(e,t){return this.rmdirSync(e,t)}rmdirSync(e,{recursive:t=!1}={}){if(this.readOnly)throw In(`rmdir '${e}'`);if(t){this.removeSync(e);return}let i=this.resolveFilename(`rmdir '${e}'`,e),n=this.listings.get(i);if(!n)throw Ro(`rmdir '${e}'`);if(n.size>0)throw YO(`rmdir '${e}'`);let s=this.entries.get(i);if(typeof s=="undefined")throw GA(`rmdir '${e}'`);this.deleteEntry(e,s)}hydrateDirectory(e){let t=this.libzip.dir.add(this.zip,k.relative(Me.root,e));if(t===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return this.registerListing(e),this.registerEntry(e,t),t}async linkPromise(e,t){return this.linkSync(e,t)}linkSync(e,t){throw qO(`link '${e}' -> '${t}'`)}async symlinkPromise(e,t){return this.symlinkSync(e,t)}symlinkSync(e,t){if(this.readOnly)throw In(`symlink '${e}' -> '${t}'`);let i=this.resolveFilename(`symlink '${e}' -> '${t}'`,t);if(this.listings.has(i))throw qh(`symlink '${e}' -> '${t}'`);if(this.entries.has(i))throw ME(`symlink '${e}' -> '${t}'`);let n=this.setFileSource(i,e);if(this.registerEntry(i,n),this.libzip.file.setExternalAttributes(this.zip,n,0,0,this.libzip.ZIP_OPSYS_UNIX,(Fa|511)<<16)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));this.symlinkCount+=1}async readFilePromise(e,t){typeof t=="object"&&(t=t?t.encoding:void 0);let i=await this.readFileBuffer(e,{asyncDecompress:!0});return t?i.toString(t):i}readFileSync(e,t){typeof t=="object"&&(t=t?t.encoding:void 0);let i=this.readFileBuffer(e);return t?i.toString(t):i}readFileBuffer(e,t={asyncDecompress:!1}){typeof e=="number"&&(e=this.fdToPath(e,"read"));let i=this.resolveFilename(`open '${e}'`,e);if(!this.entries.has(i)&&!this.listings.has(i))throw io(`open '${e}'`);if(e[e.length-1]==="/"&&!this.listings.has(i))throw Ro(`open '${e}'`);if(this.listings.has(i))throw qh("read");let n=this.entries.get(i);if(n===void 0)throw new Error("Unreachable");return this.getFileSource(n,t)}async readdirPromise(e,t){return this.readdirSync(e,t)}readdirSync(e,t){let i=this.resolveFilename(`scandir '${e}'`,e);if(!this.entries.has(i)&&!this.listings.has(i))throw io(`scandir '${e}'`);let n=this.listings.get(i);if(!n)throw Ro(`scandir '${e}'`);let s=[...n];return(t==null?void 0:t.withFileTypes)?s.map(o=>Object.assign(this.statImpl("lstat",k.join(e,o)),{name:o})):s}async readlinkPromise(e){let t=this.prepareReadlink(e);return(await this.getFileSource(t,{asyncDecompress:!0})).toString()}readlinkSync(e){let t=this.prepareReadlink(e);return this.getFileSource(t).toString()}prepareReadlink(e){let t=this.resolveFilename(`readlink '${e}'`,e,!1);if(!this.entries.has(t)&&!this.listings.has(t))throw io(`readlink '${e}'`);if(e[e.length-1]==="/"&&!this.listings.has(t))throw Ro(`open '${e}'`);if(this.listings.has(t))throw GA(`readlink '${e}'`);let i=this.entries.get(t);if(i===void 0)throw new Error("Unreachable");if(!this.isSymbolicLink(i))throw GA(`readlink '${e}'`);return i}async truncatePromise(e,t=0){let i=this.resolveFilename(`open '${e}'`,e),n=this.entries.get(i);if(typeof n=="undefined")throw GA(`open '${e}'`);let s=await this.getFileSource(n,{asyncDecompress:!0}),o=Buffer.alloc(t,0);return s.copy(o),await this.writeFilePromise(e,o)}truncateSync(e,t=0){let i=this.resolveFilename(`open '${e}'`,e),n=this.entries.get(i);if(typeof n=="undefined")throw GA(`open '${e}'`);let s=this.getFileSource(n),o=Buffer.alloc(t,0);return s.copy(o),this.writeFileSync(e,o)}async ftruncatePromise(e,t){return this.truncatePromise(this.fdToPath(e,"ftruncate"),t)}ftruncateSync(e,t){return this.truncateSync(this.fdToPath(e,"ftruncateSync"),t)}watch(e,t,i){let n;switch(typeof t){case"function":case"string":case"undefined":n=!0;break;default:({persistent:n=!0}=t);break}if(!n)return{on:()=>{},close:()=>{}};let s=setInterval(()=>{},24*60*60*1e3);return{on:()=>{},close:()=>{clearInterval(s)}}}watchFile(e,t,i){let n=k.resolve(Me.root,e);return HE(this,n,t,i)}unwatchFile(e,t){let i=k.resolve(Me.root,e);return Wh(this,i,t)}};var Qi=class extends YA{getExtractHint(e){return this.baseFs.getExtractHint(e)}resolve(e){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(e)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(e,t,i){return this.baseFs.openPromise(this.mapToBase(e),t,i)}openSync(e,t,i){return this.baseFs.openSync(this.mapToBase(e),t,i)}async opendirPromise(e,t){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(e),t),{path:e})}opendirSync(e,t){return Object.assign(this.baseFs.opendirSync(this.mapToBase(e),t),{path:e})}async readPromise(e,t,i,n,s){return await this.baseFs.readPromise(e,t,i,n,s)}readSync(e,t,i,n,s){return this.baseFs.readSync(e,t,i,n,s)}async writePromise(e,t,i,n,s){return typeof t=="string"?await this.baseFs.writePromise(e,t,i):await this.baseFs.writePromise(e,t,i,n,s)}writeSync(e,t,i,n,s){return typeof t=="string"?this.baseFs.writeSync(e,t,i):this.baseFs.writeSync(e,t,i,n,s)}async closePromise(e){return this.baseFs.closePromise(e)}closeSync(e){this.baseFs.closeSync(e)}createReadStream(e,t){return this.baseFs.createReadStream(e!==null?this.mapToBase(e):e,t)}createWriteStream(e,t){return this.baseFs.createWriteStream(e!==null?this.mapToBase(e):e,t)}async realpathPromise(e){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(e)))}realpathSync(e){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(e)))}async existsPromise(e){return this.baseFs.existsPromise(this.mapToBase(e))}existsSync(e){return this.baseFs.existsSync(this.mapToBase(e))}accessSync(e,t){return this.baseFs.accessSync(this.mapToBase(e),t)}async accessPromise(e,t){return this.baseFs.accessPromise(this.mapToBase(e),t)}async statPromise(e,t){return this.baseFs.statPromise(this.mapToBase(e),t)}statSync(e,t){return this.baseFs.statSync(this.mapToBase(e),t)}async fstatPromise(e,t){return this.baseFs.fstatPromise(e,t)}fstatSync(e,t){return this.baseFs.fstatSync(e,t)}lstatPromise(e,t){return this.baseFs.lstatPromise(this.mapToBase(e),t)}lstatSync(e,t){return this.baseFs.lstatSync(this.mapToBase(e),t)}async fchmodPromise(e,t){return this.baseFs.fchmodPromise(e,t)}fchmodSync(e,t){return this.baseFs.fchmodSync(e,t)}async chmodPromise(e,t){return this.baseFs.chmodPromise(this.mapToBase(e),t)}chmodSync(e,t){return this.baseFs.chmodSync(this.mapToBase(e),t)}async chownPromise(e,t,i){return this.baseFs.chownPromise(this.mapToBase(e),t,i)}chownSync(e,t,i){return this.baseFs.chownSync(this.mapToBase(e),t,i)}async renamePromise(e,t){return this.baseFs.renamePromise(this.mapToBase(e),this.mapToBase(t))}renameSync(e,t){return this.baseFs.renameSync(this.mapToBase(e),this.mapToBase(t))}async copyFilePromise(e,t,i=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(t),i)}copyFileSync(e,t,i=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(t),i)}async appendFilePromise(e,t,i){return this.baseFs.appendFilePromise(this.fsMapToBase(e),t,i)}appendFileSync(e,t,i){return this.baseFs.appendFileSync(this.fsMapToBase(e),t,i)}async writeFilePromise(e,t,i){return this.baseFs.writeFilePromise(this.fsMapToBase(e),t,i)}writeFileSync(e,t,i){return this.baseFs.writeFileSync(this.fsMapToBase(e),t,i)}async unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}async utimesPromise(e,t,i){return this.baseFs.utimesPromise(this.mapToBase(e),t,i)}utimesSync(e,t,i){return this.baseFs.utimesSync(this.mapToBase(e),t,i)}async mkdirPromise(e,t){return this.baseFs.mkdirPromise(this.mapToBase(e),t)}mkdirSync(e,t){return this.baseFs.mkdirSync(this.mapToBase(e),t)}async rmdirPromise(e,t){return this.baseFs.rmdirPromise(this.mapToBase(e),t)}rmdirSync(e,t){return this.baseFs.rmdirSync(this.mapToBase(e),t)}async linkPromise(e,t){return this.baseFs.linkPromise(this.mapToBase(e),this.mapToBase(t))}linkSync(e,t){return this.baseFs.linkSync(this.mapToBase(e),this.mapToBase(t))}async symlinkPromise(e,t,i){let n=this.mapToBase(t);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkPromise(this.mapToBase(e),n,i);let s=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(t),e)),o=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(n),s);return this.baseFs.symlinkPromise(o,n,i)}symlinkSync(e,t,i){let n=this.mapToBase(t);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkSync(this.mapToBase(e),n,i);let s=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(t),e)),o=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(n),s);return this.baseFs.symlinkSync(o,n,i)}async readFilePromise(e,t){return t==="utf8"?this.baseFs.readFilePromise(this.fsMapToBase(e),t):this.baseFs.readFilePromise(this.fsMapToBase(e),t)}readFileSync(e,t){return t==="utf8"?this.baseFs.readFileSync(this.fsMapToBase(e),t):this.baseFs.readFileSync(this.fsMapToBase(e),t)}async readdirPromise(e,t){return this.baseFs.readdirPromise(this.mapToBase(e),t)}readdirSync(e,t){return this.baseFs.readdirSync(this.mapToBase(e),t)}async readlinkPromise(e){return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(e)))}readlinkSync(e){return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(e)))}async truncatePromise(e,t){return this.baseFs.truncatePromise(this.mapToBase(e),t)}truncateSync(e,t){return this.baseFs.truncateSync(this.mapToBase(e),t)}async ftruncatePromise(e,t){return this.baseFs.ftruncatePromise(e,t)}ftruncateSync(e,t){return this.baseFs.ftruncateSync(e,t)}watch(e,t,i){return this.baseFs.watch(this.mapToBase(e),t,i)}watchFile(e,t,i){return this.baseFs.watchFile(this.mapToBase(e),t,i)}unwatchFile(e,t){return this.baseFs.unwatchFile(this.mapToBase(e),t)}fsMapToBase(e){return typeof e=="number"?e:this.mapToBase(e)}};var Na=class extends Qi{constructor(e,{baseFs:t,pathUtils:i}){super(i);this.target=e,this.baseFs=t}getRealPath(){return this.target}getBaseFs(){return this.baseFs}mapFromBase(e){return e}mapToBase(e){return e}};var _t=class extends Qi{constructor(e,{baseFs:t=new ar}={}){super(k);this.target=this.pathUtils.normalize(e),this.baseFs=t}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.target)}resolve(e){return this.pathUtils.isAbsolute(e)?k.normalize(e):this.baseFs.resolve(k.join(this.target,e))}mapFromBase(e){return e}mapToBase(e){return this.pathUtils.isAbsolute(e)?e:this.pathUtils.join(this.target,e)}};var eM=Me.root,La=class extends Qi{constructor(e,{baseFs:t=new ar}={}){super(k);this.target=this.pathUtils.resolve(Me.root,e),this.baseFs=t}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.pathUtils.relative(Me.root,this.target))}getTarget(){return this.target}getBaseFs(){return this.baseFs}mapToBase(e){let t=this.pathUtils.normalize(e);if(this.pathUtils.isAbsolute(e))return this.pathUtils.resolve(this.target,this.pathUtils.relative(eM,e));if(t.match(/^\.\.\/?/))throw new Error(`Resolving this path (${e}) would escape the jail`);return this.pathUtils.resolve(this.target,e)}mapFromBase(e){return this.pathUtils.resolve(eM,this.pathUtils.relative(this.target,e))}};var _h=class extends Qi{constructor(e,t){super(t);this.instance=null;this.factory=e}get baseFs(){return this.instance||(this.instance=this.factory()),this.instance}set baseFs(e){this.instance=e}mapFromBase(e){return e}mapToBase(e){return e}};var et=()=>Object.assign(new Error("ENOSYS: unsupported filesystem access"),{code:"ENOSYS"}),gQ=class extends YA{constructor(){super(k)}getExtractHint(){throw et()}getRealPath(){throw et()}resolve(){throw et()}async openPromise(){throw et()}openSync(){throw et()}async opendirPromise(){throw et()}opendirSync(){throw et()}async readPromise(){throw et()}readSync(){throw et()}async writePromise(){throw et()}writeSync(){throw et()}async closePromise(){throw et()}closeSync(){throw et()}createWriteStream(){throw et()}createReadStream(){throw et()}async realpathPromise(){throw et()}realpathSync(){throw et()}async readdirPromise(){throw et()}readdirSync(){throw et()}async existsPromise(e){throw et()}existsSync(e){throw et()}async accessPromise(){throw et()}accessSync(){throw et()}async statPromise(){throw et()}statSync(){throw et()}async fstatPromise(e){throw et()}fstatSync(e){throw et()}async lstatPromise(e){throw et()}lstatSync(e){throw et()}async fchmodPromise(){throw et()}fchmodSync(){throw et()}async chmodPromise(){throw et()}chmodSync(){throw et()}async chownPromise(){throw et()}chownSync(){throw et()}async mkdirPromise(){throw et()}mkdirSync(){throw et()}async rmdirPromise(){throw et()}rmdirSync(){throw et()}async linkPromise(){throw et()}linkSync(){throw et()}async symlinkPromise(){throw et()}symlinkSync(){throw et()}async renamePromise(){throw et()}renameSync(){throw et()}async copyFilePromise(){throw et()}copyFileSync(){throw et()}async appendFilePromise(){throw et()}appendFileSync(){throw et()}async writeFilePromise(){throw et()}writeFileSync(){throw et()}async unlinkPromise(){throw et()}unlinkSync(){throw et()}async utimesPromise(){throw et()}utimesSync(){throw et()}async readFilePromise(){throw et()}readFileSync(){throw et()}async readlinkPromise(){throw et()}readlinkSync(){throw et()}async truncatePromise(){throw et()}truncateSync(){throw et()}async ftruncatePromise(e,t){throw et()}ftruncateSync(e,t){throw et()}watch(){throw et()}watchFile(){throw et()}unwatchFile(){throw et()}},jE=gQ;jE.instance=new gQ;var Vh=class extends Qi{constructor(e){super(H);this.baseFs=e}mapFromBase(e){return H.fromPortablePath(e)}mapToBase(e){return H.toPortablePath(e)}};var Qge=/^[0-9]+$/,fQ=/^(\/(?:[^/]+\/)*?(?:\$\$virtual|__virtual__))((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/,Sge=/^([^/]+-)?[a-f0-9]+$/,Wr=class extends Qi{static makeVirtualPath(e,t,i){if(k.basename(e)!=="__virtual__")throw new Error('Assertion failed: Virtual folders must be named "__virtual__"');if(!k.basename(t).match(Sge))throw new Error("Assertion failed: Virtual components must be ended by an hexadecimal hash");let s=k.relative(k.dirname(e),i).split("/"),o=0;for(;o{let t=r.indexOf(e);if(t<=0)return null;let i=t;for(;t>=0&&(i=t+e.length,r[i]!==k.sep);){if(r[t-1]===k.sep)return null;t=r.indexOf(e,i)}return r.length>i&&r[i]!==k.sep?null:r.slice(0,i)},Is=class extends oc{constructor({libzip:e,baseFs:t=new ar,filter:i=null,maxOpenFiles:n=Infinity,readOnlyArchives:s=!1,useCache:o=!0,maxAge:a=5e3,fileExtensions:l=null}){super();this.fdMap=new Map;this.nextFd=3;this.isZip=new Set;this.notZip=new Set;this.realPaths=new Map;this.limitOpenFilesTimeout=null;this.libzipFactory=typeof e!="function"?()=>e:e,this.baseFs=t,this.zipInstances=o?new Map:null,this.filter=i,this.maxOpenFiles=n,this.readOnlyArchives=s,this.maxAge=a,this.fileExtensions=l}static async openPromise(e,t){let i=new Is(t);try{return await e(i)}finally{i.saveAndClose()}}get libzip(){return typeof this.libzipInstance=="undefined"&&(this.libzipInstance=this.libzipFactory()),this.libzipInstance}getExtractHint(e){return this.baseFs.getExtractHint(e)}getRealPath(){return this.baseFs.getRealPath()}saveAndClose(){if(zh(this),this.zipInstances)for(let[e,{zipFs:t}]of this.zipInstances.entries())t.saveAndClose(),this.zipInstances.delete(e)}discardAndClose(){if(zh(this),this.zipInstances)for(let[e,{zipFs:t}]of this.zipInstances.entries())t.discardAndClose(),this.zipInstances.delete(e)}resolve(e){return this.baseFs.resolve(e)}remapFd(e,t){let i=this.nextFd++|Vn;return this.fdMap.set(i,[e,t]),i}async openPromise(e,t,i){return await this.makeCallPromise(e,async()=>await this.baseFs.openPromise(e,t,i),async(n,{subPath:s})=>this.remapFd(n,await n.openPromise(s,t,i)))}openSync(e,t,i){return this.makeCallSync(e,()=>this.baseFs.openSync(e,t,i),(n,{subPath:s})=>this.remapFd(n,n.openSync(s,t,i)))}async opendirPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.opendirPromise(e,t),async(i,{subPath:n})=>await i.opendirPromise(n,t),{requireSubpath:!1})}opendirSync(e,t){return this.makeCallSync(e,()=>this.baseFs.opendirSync(e,t),(i,{subPath:n})=>i.opendirSync(n,t),{requireSubpath:!1})}async readPromise(e,t,i,n,s){if((e&Vn)==0)return await this.baseFs.readPromise(e,t,i,n,s);let o=this.fdMap.get(e);if(typeof o=="undefined")throw Ai("read");let[a,l]=o;return await a.readPromise(l,t,i,n,s)}readSync(e,t,i,n,s){if((e&Vn)==0)return this.baseFs.readSync(e,t,i,n,s);let o=this.fdMap.get(e);if(typeof o=="undefined")throw Ai("readSync");let[a,l]=o;return a.readSync(l,t,i,n,s)}async writePromise(e,t,i,n,s){if((e&Vn)==0)return typeof t=="string"?await this.baseFs.writePromise(e,t,i):await this.baseFs.writePromise(e,t,i,n,s);let o=this.fdMap.get(e);if(typeof o=="undefined")throw Ai("write");let[a,l]=o;return typeof t=="string"?await a.writePromise(l,t,i):await a.writePromise(l,t,i,n,s)}writeSync(e,t,i,n,s){if((e&Vn)==0)return typeof t=="string"?this.baseFs.writeSync(e,t,i):this.baseFs.writeSync(e,t,i,n,s);let o=this.fdMap.get(e);if(typeof o=="undefined")throw Ai("writeSync");let[a,l]=o;return typeof t=="string"?a.writeSync(l,t,i):a.writeSync(l,t,i,n,s)}async closePromise(e){if((e&Vn)==0)return await this.baseFs.closePromise(e);let t=this.fdMap.get(e);if(typeof t=="undefined")throw Ai("close");this.fdMap.delete(e);let[i,n]=t;return await i.closePromise(n)}closeSync(e){if((e&Vn)==0)return this.baseFs.closeSync(e);let t=this.fdMap.get(e);if(typeof t=="undefined")throw Ai("closeSync");this.fdMap.delete(e);let[i,n]=t;return i.closeSync(n)}createReadStream(e,t){return e===null?this.baseFs.createReadStream(e,t):this.makeCallSync(e,()=>this.baseFs.createReadStream(e,t),(i,{archivePath:n,subPath:s})=>{let o=i.createReadStream(s,t);return o.path=H.fromPortablePath(this.pathUtils.join(n,s)),o})}createWriteStream(e,t){return e===null?this.baseFs.createWriteStream(e,t):this.makeCallSync(e,()=>this.baseFs.createWriteStream(e,t),(i,{subPath:n})=>i.createWriteStream(n,t))}async realpathPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.realpathPromise(e),async(t,{archivePath:i,subPath:n})=>{let s=this.realPaths.get(i);return typeof s=="undefined"&&(s=await this.baseFs.realpathPromise(i),this.realPaths.set(i,s)),this.pathUtils.join(s,this.pathUtils.relative(Me.root,await t.realpathPromise(n)))})}realpathSync(e){return this.makeCallSync(e,()=>this.baseFs.realpathSync(e),(t,{archivePath:i,subPath:n})=>{let s=this.realPaths.get(i);return typeof s=="undefined"&&(s=this.baseFs.realpathSync(i),this.realPaths.set(i,s)),this.pathUtils.join(s,this.pathUtils.relative(Me.root,t.realpathSync(n)))})}async existsPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.existsPromise(e),async(t,{subPath:i})=>await t.existsPromise(i))}existsSync(e){return this.makeCallSync(e,()=>this.baseFs.existsSync(e),(t,{subPath:i})=>t.existsSync(i))}async accessPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.accessPromise(e,t),async(i,{subPath:n})=>await i.accessPromise(n,t))}accessSync(e,t){return this.makeCallSync(e,()=>this.baseFs.accessSync(e,t),(i,{subPath:n})=>i.accessSync(n,t))}async statPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.statPromise(e,t),async(i,{subPath:n})=>await i.statPromise(n,t))}statSync(e,t){return this.makeCallSync(e,()=>this.baseFs.statSync(e,t),(i,{subPath:n})=>i.statSync(n,t))}async fstatPromise(e,t){if((e&Vn)==0)return this.baseFs.fstatPromise(e,t);let i=this.fdMap.get(e);if(typeof i=="undefined")throw Ai("fstat");let[n,s]=i;return n.fstatPromise(s,t)}fstatSync(e,t){if((e&Vn)==0)return this.baseFs.fstatSync(e,t);let i=this.fdMap.get(e);if(typeof i=="undefined")throw Ai("fstatSync");let[n,s]=i;return n.fstatSync(s,t)}async lstatPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.lstatPromise(e,t),async(i,{subPath:n})=>await i.lstatPromise(n,t))}lstatSync(e,t){return this.makeCallSync(e,()=>this.baseFs.lstatSync(e,t),(i,{subPath:n})=>i.lstatSync(n,t))}async fchmodPromise(e,t){if((e&Vn)==0)return this.baseFs.fchmodPromise(e,t);let i=this.fdMap.get(e);if(typeof i=="undefined")throw Ai("fchmod");let[n,s]=i;return n.fchmodPromise(s,t)}fchmodSync(e,t){if((e&Vn)==0)return this.baseFs.fchmodSync(e,t);let i=this.fdMap.get(e);if(typeof i=="undefined")throw Ai("fchmodSync");let[n,s]=i;return n.fchmodSync(s,t)}async chmodPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.chmodPromise(e,t),async(i,{subPath:n})=>await i.chmodPromise(n,t))}chmodSync(e,t){return this.makeCallSync(e,()=>this.baseFs.chmodSync(e,t),(i,{subPath:n})=>i.chmodSync(n,t))}async chownPromise(e,t,i){return await this.makeCallPromise(e,async()=>await this.baseFs.chownPromise(e,t,i),async(n,{subPath:s})=>await n.chownPromise(s,t,i))}chownSync(e,t,i){return this.makeCallSync(e,()=>this.baseFs.chownSync(e,t,i),(n,{subPath:s})=>n.chownSync(s,t,i))}async renamePromise(e,t){return await this.makeCallPromise(e,async()=>await this.makeCallPromise(t,async()=>await this.baseFs.renamePromise(e,t),async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),async(i,{subPath:n})=>await this.makeCallPromise(t,async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},async(s,{subPath:o})=>{if(i!==s)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return await i.renamePromise(n,o)}))}renameSync(e,t){return this.makeCallSync(e,()=>this.makeCallSync(t,()=>this.baseFs.renameSync(e,t),()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),(i,{subPath:n})=>this.makeCallSync(t,()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},(s,{subPath:o})=>{if(i!==s)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return i.renameSync(n,o)}))}async copyFilePromise(e,t,i=0){let n=async(s,o,a,l)=>{if((i&Xh.constants.COPYFILE_FICLONE_FORCE)!=0)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${o}' -> ${l}'`),{code:"EXDEV"});if(i&Xh.constants.COPYFILE_EXCL&&await this.existsPromise(o))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${o}' -> '${l}'`),{code:"EEXIST"});let c;try{c=await s.readFilePromise(o)}catch(u){throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${o}' -> '${l}'`),{code:"EINVAL"})}await a.writeFilePromise(l,c)};return await this.makeCallPromise(e,async()=>await this.makeCallPromise(t,async()=>await this.baseFs.copyFilePromise(e,t,i),async(s,{subPath:o})=>await n(this.baseFs,e,s,o)),async(s,{subPath:o})=>await this.makeCallPromise(t,async()=>await n(s,o,this.baseFs,t),async(a,{subPath:l})=>s!==a?await n(s,o,a,l):await s.copyFilePromise(o,l,i)))}copyFileSync(e,t,i=0){let n=(s,o,a,l)=>{if((i&Xh.constants.COPYFILE_FICLONE_FORCE)!=0)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${o}' -> ${l}'`),{code:"EXDEV"});if(i&Xh.constants.COPYFILE_EXCL&&this.existsSync(o))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${o}' -> '${l}'`),{code:"EEXIST"});let c;try{c=s.readFileSync(o)}catch(u){throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${o}' -> '${l}'`),{code:"EINVAL"})}a.writeFileSync(l,c)};return this.makeCallSync(e,()=>this.makeCallSync(t,()=>this.baseFs.copyFileSync(e,t,i),(s,{subPath:o})=>n(this.baseFs,e,s,o)),(s,{subPath:o})=>this.makeCallSync(t,()=>n(s,o,this.baseFs,t),(a,{subPath:l})=>s!==a?n(s,o,a,l):s.copyFileSync(o,l,i)))}async appendFilePromise(e,t,i){return await this.makeCallPromise(e,async()=>await this.baseFs.appendFilePromise(e,t,i),async(n,{subPath:s})=>await n.appendFilePromise(s,t,i))}appendFileSync(e,t,i){return this.makeCallSync(e,()=>this.baseFs.appendFileSync(e,t,i),(n,{subPath:s})=>n.appendFileSync(s,t,i))}async writeFilePromise(e,t,i){return await this.makeCallPromise(e,async()=>await this.baseFs.writeFilePromise(e,t,i),async(n,{subPath:s})=>await n.writeFilePromise(s,t,i))}writeFileSync(e,t,i){return this.makeCallSync(e,()=>this.baseFs.writeFileSync(e,t,i),(n,{subPath:s})=>n.writeFileSync(s,t,i))}async unlinkPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.unlinkPromise(e),async(t,{subPath:i})=>await t.unlinkPromise(i))}unlinkSync(e){return this.makeCallSync(e,()=>this.baseFs.unlinkSync(e),(t,{subPath:i})=>t.unlinkSync(i))}async utimesPromise(e,t,i){return await this.makeCallPromise(e,async()=>await this.baseFs.utimesPromise(e,t,i),async(n,{subPath:s})=>await n.utimesPromise(s,t,i))}utimesSync(e,t,i){return this.makeCallSync(e,()=>this.baseFs.utimesSync(e,t,i),(n,{subPath:s})=>n.utimesSync(s,t,i))}async mkdirPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.mkdirPromise(e,t),async(i,{subPath:n})=>await i.mkdirPromise(n,t))}mkdirSync(e,t){return this.makeCallSync(e,()=>this.baseFs.mkdirSync(e,t),(i,{subPath:n})=>i.mkdirSync(n,t))}async rmdirPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.rmdirPromise(e,t),async(i,{subPath:n})=>await i.rmdirPromise(n,t))}rmdirSync(e,t){return this.makeCallSync(e,()=>this.baseFs.rmdirSync(e,t),(i,{subPath:n})=>i.rmdirSync(n,t))}async linkPromise(e,t){return await this.makeCallPromise(t,async()=>await this.baseFs.linkPromise(e,t),async(i,{subPath:n})=>await i.linkPromise(e,n))}linkSync(e,t){return this.makeCallSync(t,()=>this.baseFs.linkSync(e,t),(i,{subPath:n})=>i.linkSync(e,n))}async symlinkPromise(e,t,i){return await this.makeCallPromise(t,async()=>await this.baseFs.symlinkPromise(e,t,i),async(n,{subPath:s})=>await n.symlinkPromise(e,s))}symlinkSync(e,t,i){return this.makeCallSync(t,()=>this.baseFs.symlinkSync(e,t,i),(n,{subPath:s})=>n.symlinkSync(e,s))}async readFilePromise(e,t){return this.makeCallPromise(e,async()=>{switch(t){case"utf8":return await this.baseFs.readFilePromise(e,t);default:return await this.baseFs.readFilePromise(e,t)}},async(i,{subPath:n})=>await i.readFilePromise(n,t))}readFileSync(e,t){return this.makeCallSync(e,()=>{switch(t){case"utf8":return this.baseFs.readFileSync(e,t);default:return this.baseFs.readFileSync(e,t)}},(i,{subPath:n})=>i.readFileSync(n,t))}async readdirPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.readdirPromise(e,t),async(i,{subPath:n})=>await i.readdirPromise(n,t),{requireSubpath:!1})}readdirSync(e,t){return this.makeCallSync(e,()=>this.baseFs.readdirSync(e,t),(i,{subPath:n})=>i.readdirSync(n,t),{requireSubpath:!1})}async readlinkPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.readlinkPromise(e),async(t,{subPath:i})=>await t.readlinkPromise(i))}readlinkSync(e){return this.makeCallSync(e,()=>this.baseFs.readlinkSync(e),(t,{subPath:i})=>t.readlinkSync(i))}async truncatePromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.truncatePromise(e,t),async(i,{subPath:n})=>await i.truncatePromise(n,t))}truncateSync(e,t){return this.makeCallSync(e,()=>this.baseFs.truncateSync(e,t),(i,{subPath:n})=>i.truncateSync(n,t))}async ftruncatePromise(e,t){if((e&Vn)==0)return this.baseFs.ftruncatePromise(e,t);let i=this.fdMap.get(e);if(typeof i=="undefined")throw Ai("ftruncate");let[n,s]=i;return n.ftruncatePromise(s,t)}ftruncateSync(e,t){if((e&Vn)==0)return this.baseFs.ftruncateSync(e,t);let i=this.fdMap.get(e);if(typeof i=="undefined")throw Ai("ftruncateSync");let[n,s]=i;return n.ftruncateSync(s,t)}watch(e,t,i){return this.makeCallSync(e,()=>this.baseFs.watch(e,t,i),(n,{subPath:s})=>n.watch(s,t,i))}watchFile(e,t,i){return this.makeCallSync(e,()=>this.baseFs.watchFile(e,t,i),()=>HE(this,e,t,i))}unwatchFile(e,t){return this.makeCallSync(e,()=>this.baseFs.unwatchFile(e,t),()=>Wh(this,e,t))}async makeCallPromise(e,t,i,{requireSubpath:n=!0}={}){if(typeof e!="string")return await t();let s=this.resolve(e),o=this.findZip(s);return o?n&&o.subPath==="/"?await t():await this.getZipPromise(o.archivePath,async a=>await i(a,o)):await t()}makeCallSync(e,t,i,{requireSubpath:n=!0}={}){if(typeof e!="string")return t();let s=this.resolve(e),o=this.findZip(s);return!o||n&&o.subPath==="/"?t():this.getZipSync(o.archivePath,a=>i(a,o))}findZip(e){if(this.filter&&!this.filter.test(e))return null;let t="";for(;;){let i=e.substring(t.length),n;if(!this.fileExtensions)n=tM(i,".zip");else for(let s of this.fileExtensions)if(n=tM(i,s),n)break;if(!n)return null;if(t=this.pathUtils.join(t,n),this.isZip.has(t)===!1){if(this.notZip.has(t))continue;try{if(!this.baseFs.lstatSync(t).isFile()){this.notZip.add(t);continue}}catch{return null}this.isZip.add(t)}return{archivePath:t,subPath:this.pathUtils.join(Me.root,e.substring(t.length))}}}limitOpenFiles(e){if(this.zipInstances===null)return;let t=Date.now(),i=t+this.maxAge,n=e===null?0:this.zipInstances.size-e;for(let[s,{zipFs:o,expiresAt:a,refCount:l}]of this.zipInstances.entries())if(!(l!==0||o.hasOpenFileHandles())){if(t>=a){o.saveAndClose(),this.zipInstances.delete(s),n-=1;continue}else if(e===null||n<=0){i=a;break}o.saveAndClose(),this.zipInstances.delete(s),n-=1}this.limitOpenFilesTimeout===null&&(e===null&&this.zipInstances.size>0||e!==null)&&(this.limitOpenFilesTimeout=setTimeout(()=>{this.limitOpenFilesTimeout=null,this.limitOpenFiles(null)},i-t).unref())}async getZipPromise(e,t){let i=async()=>({baseFs:this.baseFs,libzip:this.libzip,readOnly:this.readOnlyArchives,stats:await this.baseFs.statPromise(e)});if(this.zipInstances){let n=this.zipInstances.get(e);if(!n){let s=await i();n=this.zipInstances.get(e),n||(n={zipFs:new li(e,s),expiresAt:0,refCount:0})}this.zipInstances.delete(e),this.limitOpenFiles(this.maxOpenFiles-1),this.zipInstances.set(e,n),n.expiresAt=Date.now()+this.maxAge,n.refCount+=1;try{return await t(n.zipFs)}finally{n.refCount-=1}}else{let n=new li(e,await i());try{return await t(n)}finally{n.saveAndClose()}}}getZipSync(e,t){let i=()=>({baseFs:this.baseFs,libzip:this.libzip,readOnly:this.readOnlyArchives,stats:this.baseFs.statSync(e)});if(this.zipInstances){let n=this.zipInstances.get(e);return n||(n={zipFs:new li(e,i()),expiresAt:0,refCount:0}),this.zipInstances.delete(e),this.limitOpenFiles(this.maxOpenFiles-1),this.zipInstances.set(e,n),n.expiresAt=Date.now()+this.maxAge,t(n.zipFs)}else{let n=new li(e,i());try{return t(n)}finally{n.saveAndClose()}}}};var Vu=ge(require("util"));var GE=ge(require("url"));var hQ=class extends Qi{constructor(e){super(H);this.baseFs=e}mapFromBase(e){return e}mapToBase(e){return e instanceof GE.URL?(0,GE.fileURLToPath)(e):e}};var en=Symbol("kBaseFs"),Ta=Symbol("kFd"),qA=Symbol("kClosePromise"),YE=Symbol("kCloseResolve"),qE=Symbol("kCloseReject"),_u=Symbol("kRefs"),Fo=Symbol("kRef"),No=Symbol("kUnref"),Q6e,S6e,v6e,x6e,JE=class{constructor(e,t){this[Q6e]=1;this[S6e]=void 0;this[v6e]=void 0;this[x6e]=void 0;this[en]=t,this[Ta]=e}get fd(){return this[Ta]}async appendFile(e,t){var i;try{this[Fo](this.appendFile);let n=(i=typeof t=="string"?t:t==null?void 0:t.encoding)!=null?i:void 0;return await this[en].appendFilePromise(this.fd,e,n?{encoding:n}:void 0)}finally{this[No]()}}chown(e,t){throw new Error("Method not implemented.")}async chmod(e){try{return this[Fo](this.chmod),await this[en].fchmodPromise(this.fd,e)}finally{this[No]()}}createReadStream(e){return this[en].createReadStream(null,te(N({},e),{fd:this.fd}))}createWriteStream(e){return this[en].createWriteStream(null,te(N({},e),{fd:this.fd}))}datasync(){throw new Error("Method not implemented.")}sync(){throw new Error("Method not implemented.")}async read(e,t,i,n){var s,o,a;try{this[Fo](this.read);let l;return Buffer.isBuffer(e)?l=e:(e!=null||(e={}),l=(s=e.buffer)!=null?s:Buffer.alloc(16384),t=e.offset||0,i=(o=e.length)!=null?o:l.byteLength,n=(a=e.position)!=null?a:null),t!=null||(t=0),i!=null||(i=0),i===0?{bytesRead:i,buffer:l}:{bytesRead:await this[en].readPromise(this.fd,l,t,i,n),buffer:l}}finally{this[No]()}}async readFile(e){var t;try{this[Fo](this.readFile);let i=(t=typeof e=="string"?e:e==null?void 0:e.encoding)!=null?t:void 0;return await this[en].readFilePromise(this.fd,i)}finally{this[No]()}}async stat(e){try{return this[Fo](this.stat),await this[en].fstatPromise(this.fd,e)}finally{this[No]()}}async truncate(e){try{return this[Fo](this.truncate),await this[en].ftruncatePromise(this.fd,e)}finally{this[No]()}}utimes(e,t){throw new Error("Method not implemented.")}async writeFile(e,t){var i;try{this[Fo](this.writeFile);let n=(i=typeof t=="string"?t:t==null?void 0:t.encoding)!=null?i:void 0;await this[en].writeFilePromise(this.fd,e,n)}finally{this[No]()}}async write(...e){try{if(this[Fo](this.write),ArrayBuffer.isView(e[0])){let[t,i,n,s]=e;return{bytesWritten:await this[en].writePromise(this.fd,t,i!=null?i:void 0,n!=null?n:void 0,s!=null?s:void 0),buffer:t}}else{let[t,i,n]=e;return{bytesWritten:await this[en].writePromise(this.fd,t,i,n),buffer:t}}}finally{this[No]()}}async writev(e,t){try{this[Fo](this.writev);let i=0;if(typeof t!="undefined")for(let n of e){let s=await this.write(n,void 0,void 0,t);i+=s.bytesWritten,t+=s.bytesWritten}else for(let n of e)i+=(await this.write(n)).bytesWritten;return{buffers:e,bytesWritten:i}}finally{this[No]()}}readv(e,t){throw new Error("Method not implemented.")}close(){if(this[Ta]===-1)return Promise.resolve();if(this[qA])return this[qA];if(this[_u]--,this[_u]===0){let e=this[Ta];this[Ta]=-1,this[qA]=this[en].closePromise(e).finally(()=>{this[qA]=void 0})}else this[qA]=new Promise((e,t)=>{this[YE]=e,this[qE]=t}).finally(()=>{this[qA]=void 0,this[qE]=void 0,this[YE]=void 0});return this[qA]}[(en,Ta,Q6e=_u,S6e=qA,v6e=YE,x6e=qE,Fo)](e){if(this[Ta]===-1){let t=new Error("file closed");throw t.code="EBADF",t.syscall=e.name,t}this[_u]++}[No](){if(this[_u]--,this[_u]===0){let e=this[Ta];this[Ta]=-1,this[en].closePromise(e).then(this[YE],this[qE])}}};var vge=new Set(["accessSync","appendFileSync","createReadStream","createWriteStream","chmodSync","fchmodSync","chownSync","closeSync","copyFileSync","linkSync","lstatSync","fstatSync","lutimesSync","mkdirSync","openSync","opendirSync","readlinkSync","readFileSync","readdirSync","readlinkSync","realpathSync","renameSync","rmdirSync","statSync","symlinkSync","truncateSync","ftruncateSync","unlinkSync","unwatchFile","utimesSync","watch","watchFile","writeFileSync","writeSync"]),rM=new Set(["accessPromise","appendFilePromise","fchmodPromise","chmodPromise","chownPromise","closePromise","copyFilePromise","linkPromise","fstatPromise","lstatPromise","lutimesPromise","mkdirPromise","openPromise","opendirPromise","readdirPromise","realpathPromise","readFilePromise","readdirPromise","readlinkPromise","renamePromise","rmdirPromise","statPromise","symlinkPromise","truncatePromise","ftruncatePromise","unlinkPromise","utimesPromise","writeFilePromise","writeSync"]);function pQ(r,e){e=new hQ(e);let t=(i,n,s)=>{let o=i[n];i[n]=s,typeof(o==null?void 0:o[Vu.promisify.custom])!="undefined"&&(s[Vu.promisify.custom]=o[Vu.promisify.custom])};{t(r,"exists",(i,...n)=>{let o=typeof n[n.length-1]=="function"?n.pop():()=>{};process.nextTick(()=>{e.existsPromise(i).then(a=>{o(a)},()=>{o(!1)})})}),t(r,"read",(...i)=>{let[n,s,o,a,l,c]=i;if(i.length<=3){let u={};i.length<3?c=i[1]:(u=i[1],c=i[2]),{buffer:s=Buffer.alloc(16384),offset:o=0,length:a=s.byteLength,position:l}=u}if(o==null&&(o=0),a|=0,a===0){process.nextTick(()=>{c(null,0,s)});return}l==null&&(l=-1),process.nextTick(()=>{e.readPromise(n,s,o,a,l).then(u=>{c(null,u,s)},u=>{c(u,0,s)})})});for(let i of rM){let n=i.replace(/Promise$/,"");if(typeof r[n]=="undefined")continue;let s=e[i];if(typeof s=="undefined")continue;t(r,n,(...a)=>{let c=typeof a[a.length-1]=="function"?a.pop():()=>{};process.nextTick(()=>{s.apply(e,a).then(u=>{c(null,u)},u=>{c(u)})})})}r.realpath.native=r.realpath}{t(r,"existsSync",i=>{try{return e.existsSync(i)}catch(n){return!1}}),t(r,"readSync",(...i)=>{let[n,s,o,a,l]=i;return i.length<=3&&({offset:o=0,length:a=s.byteLength,position:l}=i[2]||{}),o==null&&(o=0),a|=0,a===0?0:(l==null&&(l=-1),e.readSync(n,s,o,a,l))});for(let i of vge){let n=i;if(typeof r[n]=="undefined")continue;let s=e[i];typeof s!="undefined"&&t(r,n,s.bind(e))}r.realpathSync.native=r.realpathSync}{let i=process.emitWarning;process.emitWarning=()=>{};let n;try{n=r.promises}finally{process.emitWarning=i}if(typeof n!="undefined"){for(let s of rM){let o=s.replace(/Promise$/,"");if(typeof n[o]=="undefined")continue;let a=e[s];typeof a!="undefined"&&s!=="open"&&t(n,o,(l,...c)=>l instanceof JE?l[o].apply(l,c):a.call(e,l,...c))}t(n,"open",async(...s)=>{let o=await e.openPromise(...s);return new JE(o,e)})}}r.read[Vu.promisify.custom]=async(i,n,...s)=>({bytesRead:await e.readPromise(i,n,...s),buffer:n}),r.write[Vu.promisify.custom]=async(i,n,...s)=>({bytesWritten:await e.writePromise(i,n,...s),buffer:n})}function WE(r,e){let t=Object.create(r);return pQ(t,e),t}var iM=ge(require("os"));function nM(r){let e=Math.ceil(Math.random()*4294967296).toString(16).padStart(8,"0");return`${r}${e}`}var no=new Set,dQ=null;function sM(){if(dQ)return dQ;let r=H.toPortablePath(iM.default.tmpdir()),e=K.realpathSync(r);return process.once("exit",()=>{K.rmtempSync()}),dQ={tmpdir:r,realTmpdir:e}}var K=Object.assign(new ar,{detachTemp(r){no.delete(r)},mktempSync(r){let{tmpdir:e,realTmpdir:t}=sM();for(;;){let i=nM("xfs-");try{this.mkdirSync(k.join(e,i))}catch(s){if(s.code==="EEXIST")continue;throw s}let n=k.join(t,i);if(no.add(n),typeof r=="undefined")return n;try{return r(n)}finally{if(no.has(n)){no.delete(n);try{this.removeSync(n)}catch{}}}}},async mktempPromise(r){let{tmpdir:e,realTmpdir:t}=sM();for(;;){let i=nM("xfs-");try{await this.mkdirPromise(k.join(e,i))}catch(s){if(s.code==="EEXIST")continue;throw s}let n=k.join(t,i);if(no.add(n),typeof r=="undefined")return n;try{return await r(n)}finally{if(no.has(n)){no.delete(n);try{await this.removePromise(n)}catch{}}}}},async rmtempPromise(){await Promise.all(Array.from(no.values()).map(async r=>{try{await K.removePromise(r,{maxRetries:0}),no.delete(r)}catch{}}))},rmtempSync(){for(let r of no)try{K.removeSync(r),no.delete(r)}catch{}}});var mk=ge(SQ());var op={};ft(op,{parseResolution:()=>$E,parseShell:()=>_E,parseSyml:()=>Si,stringifyArgument:()=>PQ,stringifyArgumentSegment:()=>DQ,stringifyArithmeticExpression:()=>ZE,stringifyCommand:()=>kQ,stringifyCommandChain:()=>eg,stringifyCommandChainThen:()=>xQ,stringifyCommandLine:()=>VE,stringifyCommandLineThen:()=>vQ,stringifyEnvSegment:()=>XE,stringifyRedirectArgument:()=>$h,stringifyResolution:()=>eI,stringifyShell:()=>$u,stringifyShellLine:()=>$u,stringifySyml:()=>Ma,stringifyValueArgument:()=>uc});var _M=ge(zM());function _E(r,e={isGlobPattern:()=>!1}){try{return(0,_M.parse)(r,e)}catch(t){throw t.location&&(t.message=t.message.replace(/(\.)?$/,` (line ${t.location.start.line}, column ${t.location.start.column})$1`)),t}}function $u(r,{endSemicolon:e=!1}={}){return r.map(({command:t,type:i},n)=>`${VE(t)}${i===";"?n!==r.length-1||e?";":"":" &"}`).join(" ")}function VE(r){return`${eg(r.chain)}${r.then?` ${vQ(r.then)}`:""}`}function vQ(r){return`${r.type} ${VE(r.line)}`}function eg(r){return`${kQ(r)}${r.then?` ${xQ(r.then)}`:""}`}function xQ(r){return`${r.type} ${eg(r.chain)}`}function kQ(r){switch(r.type){case"command":return`${r.envs.length>0?`${r.envs.map(e=>XE(e)).join(" ")} `:""}${r.args.map(e=>PQ(e)).join(" ")}`;case"subshell":return`(${$u(r.subshell)})${r.args.length>0?` ${r.args.map(e=>$h(e)).join(" ")}`:""}`;case"group":return`{ ${$u(r.group,{endSemicolon:!0})} }${r.args.length>0?` ${r.args.map(e=>$h(e)).join(" ")}`:""}`;case"envs":return r.envs.map(e=>XE(e)).join(" ");default:throw new Error(`Unsupported command type: "${r.type}"`)}}function XE(r){return`${r.name}=${r.args[0]?uc(r.args[0]):""}`}function PQ(r){switch(r.type){case"redirection":return $h(r);case"argument":return uc(r);default:throw new Error(`Unsupported argument type: "${r.type}"`)}}function $h(r){return`${r.subtype} ${r.args.map(e=>uc(e)).join(" ")}`}function uc(r){return r.segments.map(e=>DQ(e)).join("")}function DQ(r){let e=(i,n)=>n?`"${i}"`:i,t=i=>i===""?'""':i.match(/[(){}<>$|&; \t"']/)?`$'${i.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0")}'`:i;switch(r.type){case"text":return t(r.text);case"glob":return r.pattern;case"shell":return e(`\${${$u(r.shell)}}`,r.quoted);case"variable":return e(typeof r.defaultValue=="undefined"?typeof r.alternativeValue=="undefined"?`\${${r.name}}`:r.alternativeValue.length===0?`\${${r.name}:+}`:`\${${r.name}:+${r.alternativeValue.map(i=>uc(i)).join(" ")}}`:r.defaultValue.length===0?`\${${r.name}:-}`:`\${${r.name}:-${r.defaultValue.map(i=>uc(i)).join(" ")}}`,r.quoted);case"arithmetic":return`$(( ${ZE(r.arithmetic)} ))`;default:throw new Error(`Unsupported argument segment type: "${r.type}"`)}}function ZE(r){let e=n=>{switch(n){case"addition":return"+";case"subtraction":return"-";case"multiplication":return"*";case"division":return"/";default:throw new Error(`Can't extract operator from arithmetic expression of type "${n}"`)}},t=(n,s)=>s?`( ${n} )`:n,i=n=>t(ZE(n),!["number","variable"].includes(n.type));switch(r.type){case"number":return String(r.value);case"variable":return r.name;default:return`${i(r.left)} ${e(r.type)} ${i(r.right)}`}}var ZM=ge(XM());function $E(r){let e=r.match(/^\*{1,2}\/(.*)/);if(e)throw new Error(`The override for '${r}' includes a glob pattern. Glob patterns have been removed since their behaviours don't match what you'd expect. Set the override to '${e[1]}' instead.`);try{return(0,ZM.parse)(r)}catch(t){throw t.location&&(t.message=t.message.replace(/(\.)?$/,` (line ${t.location.start.line}, column ${t.location.start.column})$1`)),t}}function eI(r){let e="";return r.from&&(e+=r.from.fullName,r.from.description&&(e+=`@${r.from.description}`),e+="/"),e+=r.descriptor.fullName,r.descriptor.description&&(e+=`@${r.descriptor.description}`),e}var uI=ge(jK()),qK=ge(YK()),Tpe=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,JK=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"],YQ=class{constructor(e){this.data=e}};function WK(r){return r.match(Tpe)?r:JSON.stringify(r)}function zK(r){return typeof r=="undefined"?!0:typeof r=="object"&&r!==null?Object.keys(r).every(e=>zK(r[e])):!1}function qQ(r,e,t){if(r===null)return`null +`;if(typeof r=="number"||typeof r=="boolean")return`${r.toString()} +`;if(typeof r=="string")return`${WK(r)} +`;if(Array.isArray(r)){if(r.length===0)return`[] +`;let i=" ".repeat(e);return` +${r.map(s=>`${i}- ${qQ(s,e+1,!1)}`).join("")}`}if(typeof r=="object"&&r){let i,n;r instanceof YQ?(i=r.data,n=!1):(i=r,n=!0);let s=" ".repeat(e),o=Object.keys(i);n&&o.sort((l,c)=>{let u=JK.indexOf(l),g=JK.indexOf(c);return u===-1&&g===-1?lc?1:0:u!==-1&&g===-1?-1:u===-1&&g!==-1?1:u-g});let a=o.filter(l=>!zK(i[l])).map((l,c)=>{let u=i[l],g=WK(l),f=qQ(u,e+1,!0),h=c>0||t?s:"",p=g.length>1024?`? ${g} +${h}:`:`${g}:`,m=f.startsWith(` +`)?f:` ${f}`;return`${h}${p}${m}`}).join(e===0?` +`:"")||` +`;return t?` +${a}`:`${a}`}throw new Error(`Unsupported value type (${r})`)}function Ma(r){try{let e=qQ(r,0,!1);return e!==` +`?e:""}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}Ma.PreserveOrdering=YQ;function Ope(r){return r.endsWith(` +`)||(r+=` +`),(0,qK.parse)(r)}var Mpe=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i;function Kpe(r){if(Mpe.test(r))return Ope(r);let e=(0,uI.safeLoad)(r,{schema:uI.FAILSAFE_SCHEMA,json:!0});if(e==null)return{};if(typeof e!="object")throw new Error(`Expected an indexed object, got a ${typeof e} instead. Does your file follow Yaml's rules?`);if(Array.isArray(e))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return e}function Si(r){return Kpe(r)}var T4=ge(VK()),mw=ge(Ic());var Cp={};ft(Cp,{Builtins:()=>oS,Cli:()=>ws,Command:()=>Re,Option:()=>J,UsageError:()=>Pe,formatMarkdownish:()=>Ui});var yc=0,ap=1,tn=2,WQ="",vi="\0",lg=-1,zQ=/^(-h|--help)(?:=([0-9]+))?$/,gI=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,tU=/^-[a-zA-Z]{2,}$/,_Q=/^([^=]+)=([\s\S]*)$/,VQ=process.env.DEBUG_CLI==="1";var Pe=class extends Error{constructor(e){super(e);this.clipanion={type:"usage"},this.name="UsageError"}},Ap=class extends Error{constructor(e,t){super();if(this.input=e,this.candidates=t,this.clipanion={type:"none"},this.name="UnknownSyntaxError",this.candidates.length===0)this.message="Command not found, but we're not sure what's the alternative.";else if(this.candidates.every(i=>i.reason!==null&&i.reason===t[0].reason)){let[{reason:i}]=this.candidates;this.message=`${i} + +${this.candidates.map(({usage:n})=>`$ ${n}`).join(` +`)}`}else if(this.candidates.length===1){let[{usage:i}]=this.candidates;this.message=`Command not found; did you mean: + +$ ${i} +${XQ(e)}`}else this.message=`Command not found; did you mean one of: + +${this.candidates.map(({usage:i},n)=>`${`${n}.`.padStart(4)} ${i}`).join(` +`)} + +${XQ(e)}`}},ZQ=class extends Error{constructor(e,t){super();this.input=e,this.usages=t,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find which to pick amongst the following alternatives: + +${this.usages.map((i,n)=>`${`${n}.`.padStart(4)} ${i}`).join(` +`)} + +${XQ(e)}`}},XQ=r=>`While running ${r.filter(e=>e!==vi).map(e=>{let t=JSON.stringify(e);return e.match(/\s/)||e.length===0||t!==`"${e}"`?t:e}).join(" ")}`;var lp=Symbol("clipanion/isOption");function rn(r){return te(N({},r),{[lp]:!0})}function Oo(r,e){return typeof r=="undefined"?[r,e]:typeof r=="object"&&r!==null&&!Array.isArray(r)?[void 0,r]:[r,e]}function fI(r,e=!1){let t=r.replace(/^\.: /,"");return e&&(t=t[0].toLowerCase()+t.slice(1)),t}function cp(r,e){return e.length===1?new Pe(`${r}: ${fI(e[0],!0)}`):new Pe(`${r}: +${e.map(t=>` +- ${fI(t)}`).join("")}`)}function up(r,e,t){if(typeof t=="undefined")return e;let i=[],n=[],s=a=>{let l=e;return e=a,s.bind(null,l)};if(!t(e,{errors:i,coercions:n,coercion:s}))throw cp(`Invalid value for ${r}`,i);for(let[,a]of n)a();return e}var Re=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let t=this.constructor.schema;if(Array.isArray(t)){let{isDict:n,isUnknown:s,applyCascade:o}=await Promise.resolve().then(()=>(ys(),cg)),a=o(n(s()),t),l=[],c=[];if(!a(this,{errors:l,coercions:c}))throw cp("Invalid option schema",l);for(let[,g]of c)g()}else if(t!=null)throw new Error("Invalid command schema");let i=await this.execute();return typeof i!="undefined"?i:0}};Re.isOption=lp;Re.Default=[];var uU=80,tS=Array(uU).fill("\u2501");for(let r=0;r<=24;++r)tS[tS.length-r]=`[38;5;${232+r}m\u2501`;var rS={header:r=>`\u2501\u2501\u2501 ${r}${r.length`${r}`,error:r=>`${r}`,code:r=>`${r}`},gU={header:r=>r,bold:r=>r,error:r=>r,code:r=>r};function yde(r){let e=r.split(` +`),t=e.filter(n=>n.match(/\S/)),i=t.length>0?t.reduce((n,s)=>Math.min(n,s.length-s.trimStart().length),Number.MAX_VALUE):0;return e.map(n=>n.slice(i).trimRight()).join(` +`)}function Ui(r,{format:e,paragraphs:t}){return r=r.replace(/\r\n?/g,` +`),r=yde(r),r=r.replace(/^\n+|\n+$/g,""),r=r.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2 + +`),r=r.replace(/\n(\n)?\n*/g,"$1"),t&&(r=r.split(/\n/).map(i=>{let n=i.match(/^\s*[*-][\t ]+(.*)/);if(!n)return i.match(/(.{1,80})(?: |$)/g).join(` +`);let s=i.length-i.trimStart().length;return n[1].match(new RegExp(`(.{1,${78-s}})(?: |$)`,"g")).map((o,a)=>" ".repeat(s)+(a===0?"- ":" ")+o).join(` +`)}).join(` + +`)),r=r.replace(/(`+)((?:.|[\n])*?)\1/g,(i,n,s)=>e.code(n+s+n)),r=r.replace(/(\*\*)((?:.|[\n])*?)\1/g,(i,n,s)=>e.bold(n+s+n)),r?`${r} +`:""}var sS=ge(require("tty"));function wn(r){VQ&&console.log(r)}var fU={candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:lg};function hU(){return{nodes:[sn(),sn(),sn()]}}function Bde(r){let e=hU(),t=[],i=e.nodes.length;for(let n of r){t.push(i);for(let s=0;s{if(e.has(i))return;e.add(i);let n=r.nodes[i];for(let o of Object.values(n.statics))for(let{to:a}of o)t(a);for(let[,{to:o}]of n.dynamics)t(o);for(let{to:o}of n.shortcuts)t(o);let s=new Set(n.shortcuts.map(({to:o})=>o));for(;n.shortcuts.length>0;){let{to:o}=n.shortcuts.shift(),a=r.nodes[o];for(let[l,c]of Object.entries(a.statics)){let u=Object.prototype.hasOwnProperty.call(n.statics,l)?n.statics[l]:n.statics[l]=[];for(let g of c)u.some(({to:f})=>g.to===f)||u.push(g)}for(let[l,c]of a.dynamics)n.dynamics.some(([u,{to:g}])=>l===u&&c.to===g)||n.dynamics.push([l,c]);for(let l of a.shortcuts)s.has(l.to)||(n.shortcuts.push(l),s.add(l.to))}};t(yc)}function Qde(r,{prefix:e=""}={}){if(VQ){wn(`${e}Nodes are:`);for(let t=0;tl!==tn).map(({state:l})=>({usage:l.candidateUsage,reason:null})));if(a.every(({node:l})=>l===tn))throw new Ap(e,a.map(({state:l})=>({usage:l.candidateUsage,reason:l.errorMessage})));i=Sde(a)}if(i.length>0){wn(" Results:");for(let s of i)wn(` - ${s.node} -> ${JSON.stringify(s.state)}`)}else wn(" No results");return i}function vde(r,e){if(e.selectedIndex!==null)return!0;if(Object.prototype.hasOwnProperty.call(r.statics,vi)){for(let{to:t}of r.statics[vi])if(t===ap)return!0}return!1}function kde(r,e,t){let i=t&&e.length>0?[""]:[],n=dU(r,e,t),s=[],o=new Set,a=(l,c,u=!0)=>{let g=[c];for(;g.length>0;){let h=g;g=[];for(let p of h){let m=r.nodes[p],y=Object.keys(m.statics);for(let b of Object.keys(m.statics)){let v=y[0];for(let{to:x,reducer:T}of m.statics[v])T==="pushPath"&&(u||l.push(v),g.push(x))}}u=!1}let f=JSON.stringify(l);o.has(f)||(s.push(l),o.add(f))};for(let{node:l,state:c}of n){if(c.remainder!==null){a([c.remainder],l);continue}let u=r.nodes[l],g=vde(u,c);for(let[f,h]of Object.entries(u.statics))(g&&f!==vi||!f.startsWith("-")&&h.some(({reducer:p})=>p==="pushPath"))&&a([...i,f],l);if(!!g)for(let[f,{to:h}]of u.dynamics){if(h===tn)continue;let p=xde(f,c);if(p!==null)for(let m of p)a([...i,m],l)}}return[...s].sort()}function Dde(r,e){let t=dU(r,[...e,vi]);return Pde(e,t.map(({state:i})=>i))}function Sde(r){let e=0;for(let{state:t}of r)t.path.length>e&&(e=t.path.length);return r.filter(({state:t})=>t.path.length===e)}function Pde(r,e){let t=e.filter(g=>g.selectedIndex!==null);if(t.length===0)throw new Error;let i=t.filter(g=>g.requiredOptions.every(f=>f.some(h=>g.options.find(p=>p.name===h))));if(i.length===0)throw new Ap(r,t.map(g=>({usage:g.candidateUsage,reason:null})));let n=0;for(let g of i)g.path.length>n&&(n=g.path.length);let s=i.filter(g=>g.path.length===n),o=g=>g.positionals.filter(({extra:f})=>!f).length+g.options.length,a=s.map(g=>({state:g,positionalCount:o(g)})),l=0;for(let{positionalCount:g}of a)g>l&&(l=g);let c=a.filter(({positionalCount:g})=>g===l).map(({state:g})=>g),u=Rde(c);if(u.length>1)throw new ZQ(r,u.map(g=>g.candidateUsage));return u[0]}function Rde(r){let e=[],t=[];for(let i of r)i.selectedIndex===lg?t.push(i):e.push(i);return t.length>0&&e.push(te(N({},fU),{path:CU(...t.map(i=>i.path)),options:t.reduce((i,n)=>i.concat(n.options),[])})),e}function CU(r,e,...t){return e===void 0?Array.from(r):CU(r.filter((i,n)=>i===e[n]),...t)}function sn(){return{dynamics:[],shortcuts:[],statics:{}}}function pU(r){return r===ap||r===tn}function nS(r,e=0){return{to:pU(r.to)?r.to:r.to>2?r.to+e-2:r.to+e,reducer:r.reducer}}function wde(r,e=0){let t=sn();for(let[i,n]of r.dynamics)t.dynamics.push([i,nS(n,e)]);for(let i of r.shortcuts)t.shortcuts.push(nS(i,e));for(let[i,n]of Object.entries(r.statics))t.statics[i]=n.map(s=>nS(s,e));return t}function xi(r,e,t,i,n){r.nodes[e].dynamics.push([t,{to:i,reducer:n}])}function ug(r,e,t,i){r.nodes[e].shortcuts.push({to:t,reducer:i})}function Ka(r,e,t,i,n){(Object.prototype.hasOwnProperty.call(r.nodes[e].statics,t)?r.nodes[e].statics[t]:r.nodes[e].statics[t]=[]).push({to:i,reducer:n})}function pI(r,e,t,i){if(Array.isArray(e)){let[n,...s]=e;return r[n](t,i,...s)}else return r[e](t,i)}function xde(r,e){let t=Array.isArray(r)?dI[r[0]]:dI[r];if(typeof t.suggest=="undefined")return null;let i=Array.isArray(r)?r.slice(1):[];return t.suggest(e,...i)}var dI={always:()=>!0,isOptionLike:(r,e)=>!r.ignoreOptions&&e!=="-"&&e.startsWith("-"),isNotOptionLike:(r,e)=>r.ignoreOptions||e==="-"||!e.startsWith("-"),isOption:(r,e,t,i)=>!r.ignoreOptions&&e===t,isBatchOption:(r,e,t)=>!r.ignoreOptions&&tU.test(e)&&[...e.slice(1)].every(i=>t.includes(`-${i}`)),isBoundOption:(r,e,t,i)=>{let n=e.match(_Q);return!r.ignoreOptions&&!!n&&gI.test(n[1])&&t.includes(n[1])&&i.filter(s=>s.names.includes(n[1])).every(s=>s.allowBinding)},isNegatedOption:(r,e,t)=>!r.ignoreOptions&&e===`--no-${t.slice(2)}`,isHelp:(r,e)=>!r.ignoreOptions&&zQ.test(e),isUnsupportedOption:(r,e,t)=>!r.ignoreOptions&&e.startsWith("-")&&gI.test(e)&&!t.includes(e),isInvalidOption:(r,e)=>!r.ignoreOptions&&e.startsWith("-")&&!gI.test(e)};dI.isOption.suggest=(r,e,t=!0)=>t?null:[e];var iS={setCandidateState:(r,e,t)=>N(N({},r),t),setSelectedIndex:(r,e,t)=>te(N({},r),{selectedIndex:t}),pushBatch:(r,e)=>te(N({},r),{options:r.options.concat([...e.slice(1)].map(t=>({name:`-${t}`,value:!0})))}),pushBound:(r,e)=>{let[,t,i]=e.match(_Q);return te(N({},r),{options:r.options.concat({name:t,value:i})})},pushPath:(r,e)=>te(N({},r),{path:r.path.concat(e)}),pushPositional:(r,e)=>te(N({},r),{positionals:r.positionals.concat({value:e,extra:!1})}),pushExtra:(r,e)=>te(N({},r),{positionals:r.positionals.concat({value:e,extra:!0})}),pushExtraNoLimits:(r,e)=>te(N({},r),{positionals:r.positionals.concat({value:e,extra:Zn})}),pushTrue:(r,e,t=e)=>te(N({},r),{options:r.options.concat({name:e,value:!0})}),pushFalse:(r,e,t=e)=>te(N({},r),{options:r.options.concat({name:t,value:!1})}),pushUndefined:(r,e)=>te(N({},r),{options:r.options.concat({name:e,value:void 0})}),pushStringValue:(r,e)=>{var t;let i=te(N({},r),{options:[...r.options]}),n=r.options[r.options.length-1];return n.value=((t=n.value)!==null&&t!==void 0?t:[]).concat([e]),i},setStringValue:(r,e)=>{let t=te(N({},r),{options:[...r.options]}),i=r.options[r.options.length-1];return i.value=e,t},inhibateOptions:r=>te(N({},r),{ignoreOptions:!0}),useHelp:(r,e,t)=>{let[,,i]=e.match(zQ);return typeof i!="undefined"?te(N({},r),{options:[{name:"-c",value:String(t)},{name:"-i",value:i}]}):te(N({},r),{options:[{name:"-c",value:String(t)}]})},setError:(r,e,t)=>e===vi?te(N({},r),{errorMessage:`${t}.`}):te(N({},r),{errorMessage:`${t} ("${e}").`}),setOptionArityError:(r,e)=>{let t=r.options[r.options.length-1];return te(N({},r),{errorMessage:`Not enough arguments to option ${t.name}.`})}},Zn=Symbol(),mU=class{constructor(e,t){this.allOptionNames=[],this.arity={leading:[],trailing:[],extra:[],proxy:!1},this.options=[],this.paths=[],this.cliIndex=e,this.cliOpts=t}addPath(e){this.paths.push(e)}setArity({leading:e=this.arity.leading,trailing:t=this.arity.trailing,extra:i=this.arity.extra,proxy:n=this.arity.proxy}){Object.assign(this.arity,{leading:e,trailing:t,extra:i,proxy:n})}addPositional({name:e="arg",required:t=!0}={}){if(!t&&this.arity.extra===Zn)throw new Error("Optional parameters cannot be declared when using .rest() or .proxy()");if(!t&&this.arity.trailing.length>0)throw new Error("Optional parameters cannot be declared after the required trailing positional arguments");!t&&this.arity.extra!==Zn?this.arity.extra.push(e):this.arity.extra!==Zn&&this.arity.extra.length===0?this.arity.leading.push(e):this.arity.trailing.push(e)}addRest({name:e="arg",required:t=0}={}){if(this.arity.extra===Zn)throw new Error("Infinite lists cannot be declared multiple times in the same command");if(this.arity.trailing.length>0)throw new Error("Infinite lists cannot be declared after the required trailing positional arguments");for(let i=0;i1)throw new Error("The arity cannot be higher than 1 when the option only supports the --arg=value syntax");if(!Number.isInteger(i))throw new Error(`The arity must be an integer, got ${i}`);if(i<0)throw new Error(`The arity must be positive, got ${i}`);this.allOptionNames.push(...e),this.options.push({names:e,description:t,arity:i,hidden:n,required:s,allowBinding:o})}setContext(e){this.context=e}usage({detailed:e=!0,inlineOptions:t=!0}={}){let i=[this.cliOpts.binaryName],n=[];if(this.paths.length>0&&i.push(...this.paths[0]),e){for(let{names:o,arity:a,hidden:l,description:c,required:u}of this.options){if(l)continue;let g=[];for(let h=0;h`:`[${f}]`)}i.push(...this.arity.leading.map(o=>`<${o}>`)),this.arity.extra===Zn?i.push("..."):i.push(...this.arity.extra.map(o=>`[${o}]`)),i.push(...this.arity.trailing.map(o=>`<${o}>`))}return{usage:i.join(" "),options:n}}compile(){if(typeof this.context=="undefined")throw new Error("Assertion failed: No context attached");let e=hU(),t=yc,i=this.usage().usage,n=this.options.filter(a=>a.required).map(a=>a.names);t=so(e,sn()),Ka(e,yc,WQ,t,["setCandidateState",{candidateUsage:i,requiredOptions:n}]);let s=this.arity.proxy?"always":"isNotOptionLike",o=this.paths.length>0?this.paths:[[]];for(let a of o){let l=t;if(a.length>0){let f=so(e,sn());ug(e,l,f),this.registerOptions(e,f),l=f}for(let f=0;f0||!this.arity.proxy){let f=so(e,sn());xi(e,l,"isHelp",f,["useHelp",this.cliIndex]),Ka(e,f,vi,ap,["setSelectedIndex",lg]),this.registerOptions(e,l)}this.arity.leading.length>0&&Ka(e,l,vi,tn,["setError","Not enough positional arguments"]);let c=l;for(let f=0;f0||f+1!==this.arity.leading.length)&&Ka(e,h,vi,tn,["setError","Not enough positional arguments"]),xi(e,c,"isNotOptionLike",h,"pushPositional"),c=h}let u=c;if(this.arity.extra===Zn||this.arity.extra.length>0){let f=so(e,sn());if(ug(e,c,f),this.arity.extra===Zn){let h=so(e,sn());this.arity.proxy||this.registerOptions(e,h),xi(e,c,s,h,"pushExtraNoLimits"),xi(e,h,s,h,"pushExtraNoLimits"),ug(e,h,f)}else for(let h=0;h0&&Ka(e,u,vi,tn,["setError","Not enough positional arguments"]);let g=u;for(let f=0;fo.length>s.length?o:s,"");if(i.arity===0)for(let s of i.names)xi(e,t,["isOption",s,i.hidden||s!==n],t,"pushTrue"),s.startsWith("--")&&!s.startsWith("--no-")&&xi(e,t,["isNegatedOption",s],t,["pushFalse",s]);else{let s=so(e,sn());for(let o of i.names)xi(e,t,["isOption",o,i.hidden||o!==n],s,"pushUndefined");for(let o=0;o=0&&eDde(i,n),suggest:(n,s)=>kde(i,n,s)}}};var dp=class extends Re{constructor(e){super();this.contexts=e,this.commands=[]}static from(e,t){let i=new dp(t);i.path=e.path;for(let n of e.options)switch(n.name){case"-c":i.commands.push(Number(n.value));break;case"-i":i.index=Number(n.value);break}return i}async execute(){let e=this.commands;if(typeof this.index!="undefined"&&this.index>=0&&this.index1){this.context.stdout.write(`Multiple commands match your selection: +`),this.context.stdout.write(` +`);let t=0;for(let i of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[i].commandClass,{prefix:`${t++}. `.padStart(5)}));this.context.stdout.write(` +`),this.context.stdout.write(`Run again with -h= to see the longer details of any of those commands. +`)}}};var EU=Symbol("clipanion/errorCommand");function Fde(){return process.env.FORCE_COLOR==="0"?1:process.env.FORCE_COLOR==="1"||typeof process.stdout!="undefined"&&process.stdout.isTTY?8:1}var ws=class{constructor({binaryLabel:e,binaryName:t="...",binaryVersion:i,enableCapture:n=!1,enableColors:s}={}){this.registrations=new Map,this.builder=new pp({binaryName:t}),this.binaryLabel=e,this.binaryName=t,this.binaryVersion=i,this.enableCapture=n,this.enableColors=s}static from(e,t={}){let i=new ws(t);for(let n of e)i.register(n);return i}register(e){var t;let i=new Map,n=new e;for(let l in n){let c=n[l];typeof c=="object"&&c!==null&&c[Re.isOption]&&i.set(l,c)}let s=this.builder.command(),o=s.cliIndex,a=(t=e.paths)!==null&&t!==void 0?t:n.paths;if(typeof a!="undefined")for(let l of a)s.addPath(l);this.registrations.set(e,{specs:i,builder:s,index:o});for(let[l,{definition:c}]of i.entries())c(s,l);s.setContext({commandClass:e})}process(e){let{contexts:t,process:i}=this.builder.compile(),n=i(e);switch(n.selectedIndex){case lg:return dp.from(n,t);default:{let{commandClass:s}=t[n.selectedIndex],o=this.registrations.get(s);if(typeof o=="undefined")throw new Error("Assertion failed: Expected the command class to have been registered.");let a=new s;a.path=n.path;try{for(let[l,{transformer:c}]of o.specs.entries())a[l]=c(o.builder,l,n);return a}catch(l){throw l[EU]=a,l}}break}}async run(e,t){var i;let n,s=N(N({},ws.defaultContext),t),o=(i=this.enableColors)!==null&&i!==void 0?i:s.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e)}catch(c){return s.stdout.write(this.error(c,{colored:o})),1}if(n.help)return s.stdout.write(this.usage(n,{colored:o,detailed:!0})),0;n.context=s,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),error:(c,u)=>this.error(c,u),format:c=>this.format(c),process:c=>this.process(c),run:(c,u)=>this.run(c,N(N({},s),u)),usage:(c,u)=>this.usage(c,u)};let a=this.enableCapture?Nde(s):IU,l;try{l=await a(()=>n.validateAndExecute().catch(c=>n.catch(c).then(()=>0)))}catch(c){return s.stdout.write(this.error(c,{colored:o,command:n})),1}return l}async runExit(e,t){process.exitCode=await this.run(e,t)}suggest(e,t){let{suggest:i}=this.builder.compile();return i(e,t)}definitions({colored:e=!1}={}){let t=[];for(let[i,{index:n}]of this.registrations){if(typeof i.usage=="undefined")continue;let{usage:s}=this.getUsageByIndex(n,{detailed:!1}),{usage:o,options:a}=this.getUsageByIndex(n,{detailed:!0,inlineOptions:!1}),l=typeof i.usage.category!="undefined"?Ui(i.usage.category,{format:this.format(e),paragraphs:!1}):void 0,c=typeof i.usage.description!="undefined"?Ui(i.usage.description,{format:this.format(e),paragraphs:!1}):void 0,u=typeof i.usage.details!="undefined"?Ui(i.usage.details,{format:this.format(e),paragraphs:!0}):void 0,g=typeof i.usage.examples!="undefined"?i.usage.examples.map(([f,h])=>[Ui(f,{format:this.format(e),paragraphs:!1}),h.replace(/\$0/g,this.binaryName)]):void 0;t.push({path:s,usage:o,category:l,description:c,details:u,examples:g,options:a})}return t}usage(e=null,{colored:t,detailed:i=!1,prefix:n="$ "}={}){var s;if(e===null){for(let l of this.registrations.keys()){let c=l.paths,u=typeof l.usage!="undefined";if(!c||c.length===0||c.length===1&&c[0].length===0||((s=c==null?void 0:c.some(h=>h.length===0))!==null&&s!==void 0?s:!1))if(e){e=null;break}else e=l;else if(u){e=null;continue}}e&&(i=!0)}let o=e!==null&&e instanceof Re?e.constructor:e,a="";if(o)if(i){let{description:l="",details:c="",examples:u=[]}=o.usage||{};l!==""&&(a+=Ui(l,{format:this.format(t),paragraphs:!1}).replace(/^./,h=>h.toUpperCase()),a+=` +`),(c!==""||u.length>0)&&(a+=`${this.format(t).header("Usage")} +`,a+=` +`);let{usage:g,options:f}=this.getUsageByRegistration(o,{inlineOptions:!1});if(a+=`${this.format(t).bold(n)}${g} +`,f.length>0){a+=` +`,a+=`${rS.header("Options")} +`;let h=f.reduce((p,m)=>Math.max(p,m.definition.length),0);a+=` +`;for(let{definition:p,description:m}of f)a+=` ${this.format(t).bold(p.padEnd(h))} ${Ui(m,{format:this.format(t),paragraphs:!1})}`}if(c!==""&&(a+=` +`,a+=`${this.format(t).header("Details")} +`,a+=` +`,a+=Ui(c,{format:this.format(t),paragraphs:!0})),u.length>0){a+=` +`,a+=`${this.format(t).header("Examples")} +`;for(let[h,p]of u)a+=` +`,a+=Ui(h,{format:this.format(t),paragraphs:!1}),a+=`${p.replace(/^/m,` ${this.format(t).bold(n)}`).replace(/\$0/g,this.binaryName)} +`}}else{let{usage:l}=this.getUsageByRegistration(o);a+=`${this.format(t).bold(n)}${l} +`}else{let l=new Map;for(let[f,{index:h}]of this.registrations.entries()){if(typeof f.usage=="undefined")continue;let p=typeof f.usage.category!="undefined"?Ui(f.usage.category,{format:this.format(t),paragraphs:!1}):null,m=l.get(p);typeof m=="undefined"&&l.set(p,m=[]);let{usage:y}=this.getUsageByIndex(h);m.push({commandClass:f,usage:y})}let c=Array.from(l.keys()).sort((f,h)=>f===null?-1:h===null?1:f.localeCompare(h,"en",{usage:"sort",caseFirst:"upper"})),u=typeof this.binaryLabel!="undefined",g=typeof this.binaryVersion!="undefined";u||g?(u&&g?a+=`${this.format(t).header(`${this.binaryLabel} - ${this.binaryVersion}`)} + +`:u?a+=`${this.format(t).header(`${this.binaryLabel}`)} +`:a+=`${this.format(t).header(`${this.binaryVersion}`)} +`,a+=` ${this.format(t).bold(n)}${this.binaryName} +`):a+=`${this.format(t).bold(n)}${this.binaryName} +`;for(let f of c){let h=l.get(f).slice().sort((m,y)=>m.usage.localeCompare(y.usage,"en",{usage:"sort",caseFirst:"upper"})),p=f!==null?f.trim():"General commands";a+=` +`,a+=`${this.format(t).header(`${p}`)} +`;for(let{commandClass:m,usage:y}of h){let b=m.usage.description||"undocumented";a+=` +`,a+=` ${this.format(t).bold(y)} +`,a+=` ${Ui(b,{format:this.format(t),paragraphs:!1})}`}}a+=` +`,a+=Ui("You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.",{format:this.format(t),paragraphs:!0})}return a}error(e,t){var i,{colored:n,command:s=(i=e[EU])!==null&&i!==void 0?i:null}=t===void 0?{}:t;e instanceof Error||(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let o="",a=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");a==="Error"&&(a="Internal Error"),o+=`${this.format(n).error(a)}: ${e.message} +`;let l=e.clipanion;return typeof l!="undefined"?l.type==="usage"&&(o+=` +`,o+=this.usage(s)):e.stack&&(o+=`${e.stack.replace(/^.*\n/,"")} +`),o}format(e){var t;return((t=e!=null?e:this.enableColors)!==null&&t!==void 0?t:ws.defaultContext.colorDepth>1)?rS:gU}getUsageByRegistration(e,t){let i=this.registrations.get(e);if(typeof i=="undefined")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(i.index,t)}getUsageByIndex(e,t){return this.builder.getBuilderByIndex(e).usage(t)}};ws.defaultContext={stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:"getColorDepth"in sS.default.WriteStream.prototype?sS.default.WriteStream.prototype.getColorDepth():Fde()};var yU;function Nde(r){let e=yU;if(typeof e=="undefined"){if(r.stdout===process.stdout&&r.stderr===process.stderr)return IU;let{AsyncLocalStorage:t}=require("async_hooks");e=yU=new t;let i=process.stdout._write;process.stdout._write=function(s,o,a){let l=e.getStore();return typeof l=="undefined"?i.call(this,s,o,a):l.stdout.write(s,o,a)};let n=process.stderr._write;process.stderr._write=function(s,o,a){let l=e.getStore();return typeof l=="undefined"?n.call(this,s,o,a):l.stderr.write(s,o,a)}}return t=>e.run(r,t)}function IU(r){return r()}var oS={};ft(oS,{DefinitionsCommand:()=>CI,HelpCommand:()=>mI,VersionCommand:()=>EI});var CI=class extends Re{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)} +`)}};CI.paths=[["--clipanion=definitions"]];var mI=class extends Re{async execute(){this.context.stdout.write(this.cli.usage())}};mI.paths=[["-h"],["--help"]];var EI=class extends Re{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:""} +`)}};EI.paths=[["-v"],["--version"]];var J={};ft(J,{Array:()=>wU,Boolean:()=>BU,Counter:()=>bU,Proxy:()=>QU,Rest:()=>SU,String:()=>vU,applyValidator:()=>up,cleanValidationError:()=>fI,formatError:()=>cp,isOptionSymbol:()=>lp,makeCommandOption:()=>rn,rerouteArguments:()=>Oo});function wU(r,e,t){let[i,n]=Oo(e,t!=null?t:{}),{arity:s=1}=n,o=r.split(","),a=new Set(o);return rn({definition(l){l.addOption({names:o,arity:s,hidden:n==null?void 0:n.hidden,description:n==null?void 0:n.description,required:n.required})},transformer(l,c,u){let g=typeof i!="undefined"?[...i]:void 0;for(let{name:f,value:h}of u.options)!a.has(f)||(g=g!=null?g:[],g.push(h));return g}})}function BU(r,e,t){let[i,n]=Oo(e,t!=null?t:{}),s=r.split(","),o=new Set(s);return rn({definition(a){a.addOption({names:s,allowBinding:!1,arity:0,hidden:n.hidden,description:n.description,required:n.required})},transformer(a,l,c){let u=i;for(let{name:g,value:f}of c.options)!o.has(g)||(u=f);return u}})}function bU(r,e,t){let[i,n]=Oo(e,t!=null?t:{}),s=r.split(","),o=new Set(s);return rn({definition(a){a.addOption({names:s,allowBinding:!1,arity:0,hidden:n.hidden,description:n.description,required:n.required})},transformer(a,l,c){let u=i;for(let{name:g,value:f}of c.options)!o.has(g)||(u!=null||(u=0),f?u+=1:u=0);return u}})}function QU(r={}){return rn({definition(e,t){var i;e.addProxy({name:(i=r.name)!==null&&i!==void 0?i:t,required:r.required})},transformer(e,t,i){return i.positionals.map(({value:n})=>n)}})}function SU(r={}){return rn({definition(e,t){var i;e.addRest({name:(i=r.name)!==null&&i!==void 0?i:t,required:r.required})},transformer(e,t,i){let n=o=>{let a=i.positionals[o];return a.extra===Zn||a.extra===!1&&oo)}})}function Lde(r,e,t){let[i,n]=Oo(e,t!=null?t:{}),{arity:s=1}=n,o=r.split(","),a=new Set(o);return rn({definition(l){l.addOption({names:o,arity:n.tolerateBoolean?0:s,hidden:n.hidden,description:n.description,required:n.required})},transformer(l,c,u){let g,f=i;for(let{name:h,value:p}of u.options)!a.has(h)||(g=h,f=p);return typeof f=="string"?up(g!=null?g:c,f,n.validator):f}})}function Tde(r={}){let{required:e=!0}=r;return rn({definition(t,i){var n;t.addPositional({name:(n=r.name)!==null&&n!==void 0?n:i,required:r.required})},transformer(t,i,n){var s;for(let o=0;oYW,areIdentsEqual:()=>fd,areLocatorsEqual:()=>hd,areVirtualPackagesEquivalent:()=>aSe,bindDescriptor:()=>sSe,bindLocator:()=>oSe,convertDescriptorToLocator:()=>Aw,convertLocatorToDescriptor:()=>_x,convertPackageToLocator:()=>nSe,convertToIdent:()=>iSe,convertToManifestRange:()=>cSe,copyPackage:()=>cd,devirtualizeDescriptor:()=>ud,devirtualizeLocator:()=>gd,getIdentVendorPath:()=>ek,isPackageCompatible:()=>gw,isVirtualDescriptor:()=>Al,isVirtualLocator:()=>ea,makeDescriptor:()=>rr,makeIdent:()=>$o,makeLocator:()=>cn,makeRange:()=>cw,parseDescriptor:()=>ll,parseFileStyleRange:()=>ASe,parseIdent:()=>An,parseLocator:()=>Yc,parseRange:()=>qg,prettyDependent:()=>Lv,prettyDescriptor:()=>sr,prettyIdent:()=>fi,prettyLocator:()=>It,prettyLocatorNoColors:()=>$x,prettyRange:()=>aw,prettyReference:()=>dd,prettyResolution:()=>Tv,prettyWorkspace:()=>Cd,renamePackage:()=>ld,slugifyIdent:()=>Zx,slugifyLocator:()=>Jg,sortDescriptors:()=>Wg,stringifyDescriptor:()=>Pn,stringifyIdent:()=>Ot,stringifyLocator:()=>Rs,tryParseDescriptor:()=>pd,tryParseIdent:()=>qW,tryParseLocator:()=>lw,virtualizeDescriptor:()=>Vx,virtualizePackage:()=>Xx});var Yg=ge(require("querystring")),HW=ge(ri()),jW=ge(nY());var ae={};ft(ae,{LogLevel:()=>ho,Style:()=>Tc,Type:()=>qe,addLogFilterSupport:()=>nd,applyColor:()=>ns,applyHyperlink:()=>Mg,applyStyle:()=>Ry,json:()=>Oc,jsonOrPretty:()=>KBe,mark:()=>Hv,pretty:()=>tt,prettyField:()=>_o,prettyList:()=>Uv,supportsColor:()=>Py,supportsHyperlinks:()=>Mv,tuple:()=>fo});var rd=ge(uv()),id=ge(Ic());var sJ=ge(is()),oJ=ge(Jq());var Se={};ft(Se,{AsyncActions:()=>$q,BufferStream:()=>Zq,CachingStrategy:()=>Lc,DefaultStream:()=>eJ,allSettledSafe:()=>go,assertNever:()=>Pv,bufferStream:()=>Tg,buildIgnorePattern:()=>LBe,convertMapsToIndexableObjects:()=>ky,dynamicRequire:()=>Og,escapeRegExp:()=>PBe,getArrayWithDefault:()=>Fg,getFactoryWithDefault:()=>_a,getMapWithDefault:()=>Ng,getSetWithDefault:()=>Nc,isIndexableObject:()=>Dv,isPathLike:()=>TBe,isTaggedYarnVersion:()=>kBe,mapAndFilter:()=>zo,mapAndFind:()=>$p,overrideType:()=>kv,parseBoolean:()=>td,parseOptionalBoolean:()=>nJ,prettifyAsyncErrors:()=>Lg,prettifySyncErrors:()=>Rv,releaseAfterUseAsync:()=>RBe,replaceEnvVariables:()=>Fv,sortMap:()=>kn,tryParseOptionalBoolean:()=>Nv,validateEnum:()=>DBe});var Wq=ge(is()),zq=ge(gg()),_q=ge(ri()),xv=ge(require("stream"));function kBe(r){return!!(_q.default.valid(r)&&r.match(/^[^-]+(-rc\.[0-9]+)?$/))}function PBe(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function kv(r){}function Pv(r){throw new Error(`Assertion failed: Unexpected object '${r}'`)}function DBe(r,e){let t=Object.values(r);if(!t.includes(e))throw new Pe(`Invalid value for enumeration: ${JSON.stringify(e)} (expected one of ${t.map(i=>JSON.stringify(i)).join(", ")})`);return e}function zo(r,e){let t=[];for(let i of r){let n=e(i);n!==Vq&&t.push(n)}return t}var Vq=Symbol();zo.skip=Vq;function $p(r,e){for(let t of r){let i=e(t);if(i!==Xq)return i}}var Xq=Symbol();$p.skip=Xq;function Dv(r){return typeof r=="object"&&r!==null}async function go(r){let e=await Promise.allSettled(r),t=[];for(let i of e){if(i.status==="rejected")throw i.reason;t.push(i.value)}return t}function ky(r){if(r instanceof Map&&(r=Object.fromEntries(r)),Dv(r))for(let e of Object.keys(r)){let t=r[e];Dv(t)&&(r[e]=ky(t))}return r}function _a(r,e,t){let i=r.get(e);return typeof i=="undefined"&&r.set(e,i=t()),i}function Fg(r,e){let t=r.get(e);return typeof t=="undefined"&&r.set(e,t=[]),t}function Nc(r,e){let t=r.get(e);return typeof t=="undefined"&&r.set(e,t=new Set),t}function Ng(r,e){let t=r.get(e);return typeof t=="undefined"&&r.set(e,t=new Map),t}async function RBe(r,e){if(e==null)return await r();try{return await r()}finally{await e()}}async function Lg(r,e){try{return await r()}catch(t){throw t.message=e(t.message),t}}function Rv(r,e){try{return r()}catch(t){throw t.message=e(t.message),t}}async function Tg(r){return await new Promise((e,t)=>{let i=[];r.on("error",n=>{t(n)}),r.on("data",n=>{i.push(n)}),r.on("end",()=>{e(Buffer.concat(i))})})}var Zq=class extends xv.Transform{constructor(){super(...arguments);this.chunks=[]}_transform(e,t,i){if(t!=="buffer"||!Buffer.isBuffer(e))throw new Error("Assertion failed: BufferStream only accept buffers");this.chunks.push(e),i(null,null)}_flush(e){e(null,Buffer.concat(this.chunks))}};function FBe(){let r,e;return{promise:new Promise((i,n)=>{r=i,e=n}),resolve:r,reject:e}}var $q=class{constructor(e){this.deferred=new Map;this.promises=new Map;this.limit=(0,zq.default)(e)}set(e,t){let i=this.deferred.get(e);typeof i=="undefined"&&this.deferred.set(e,i=FBe());let n=this.limit(()=>t());return this.promises.set(e,n),n.then(()=>{this.promises.get(e)===n&&i.resolve()},s=>{this.promises.get(e)===n&&i.reject(s)}),i.promise}reduce(e,t){var n;let i=(n=this.promises.get(e))!=null?n:Promise.resolve();this.set(e,()=>t(i))}async wait(){await Promise.all(this.promises.values())}},eJ=class extends xv.Transform{constructor(e=Buffer.alloc(0)){super();this.active=!0;this.ifEmpty=e}_transform(e,t,i){if(t!=="buffer"||!Buffer.isBuffer(e))throw new Error("Assertion failed: DefaultStream only accept buffers");this.active=!1,i(null,e)}_flush(e){this.active&&this.ifEmpty.length>0?e(null,this.ifEmpty):e(null)}},ed=eval("require");function tJ(r){return ed(H.fromPortablePath(r))}function rJ(path){let physicalPath=H.fromPortablePath(path),currentCacheEntry=ed.cache[physicalPath];delete ed.cache[physicalPath];let result;try{result=tJ(physicalPath);let freshCacheEntry=ed.cache[physicalPath],dynamicModule=eval("module"),freshCacheIndex=dynamicModule.children.indexOf(freshCacheEntry);freshCacheIndex!==-1&&dynamicModule.children.splice(freshCacheIndex,1)}finally{ed.cache[physicalPath]=currentCacheEntry}return result}var iJ=new Map;function NBe(r){let e=iJ.get(r),t=K.statSync(r);if((e==null?void 0:e.mtime)===t.mtimeMs)return e.instance;let i=rJ(r);return iJ.set(r,{mtime:t.mtimeMs,instance:i}),i}var Lc;(function(i){i[i.NoCache=0]="NoCache",i[i.FsTime=1]="FsTime",i[i.Node=2]="Node"})(Lc||(Lc={}));function Og(r,{cachingStrategy:e=2}={}){switch(e){case 0:return rJ(r);case 1:return NBe(r);case 2:return tJ(r);default:throw new Error("Unsupported caching strategy")}}function kn(r,e){let t=Array.from(r);Array.isArray(e)||(e=[e]);let i=[];for(let s of e)i.push(t.map(o=>s(o)));let n=t.map((s,o)=>o);return n.sort((s,o)=>{for(let a of i){let l=a[s]a[o]?1:0;if(l!==0)return l}return 0}),n.map(s=>t[s])}function LBe(r){return r.length===0?null:r.map(e=>`(${Wq.default.makeRe(e,{windows:!1,dot:!0}).source})`).join("|")}function Fv(r,{env:e}){let t=/\${(?[\d\w_]+)(?:)?(?:-(?[^}]*))?}/g;return r.replace(t,(...i)=>{let{variableName:n,colon:s,fallback:o}=i[i.length-1],a=Object.prototype.hasOwnProperty.call(e,n),l=e[n];if(l||a&&!s)return l;if(o!=null)return o;throw new Pe(`Environment variable not found (${n})`)})}function td(r){switch(r){case"true":case"1":case 1:case!0:return!0;case"false":case"0":case 0:case!1:return!1;default:throw new Error(`Couldn't parse "${r}" as a boolean`)}}function nJ(r){return typeof r=="undefined"?r:td(r)}function Nv(r){try{return nJ(r)}catch{return null}}function TBe(r){return!!(H.isAbsolute(r)||r.match(/^(\.{1,2}|~)\//))}var Qt;(function(t){t.HARD="HARD",t.SOFT="SOFT"})(Qt||(Qt={}));var wi;(function(i){i.Dependency="Dependency",i.PeerDependency="PeerDependency",i.PeerDependencyMeta="PeerDependencyMeta"})(wi||(wi={}));var qi;(function(i){i.Inactive="inactive",i.Redundant="redundant",i.Active="active"})(qi||(qi={}));var qe={NO_HINT:"NO_HINT",NULL:"NULL",SCOPE:"SCOPE",NAME:"NAME",RANGE:"RANGE",REFERENCE:"REFERENCE",NUMBER:"NUMBER",PATH:"PATH",URL:"URL",ADDED:"ADDED",REMOVED:"REMOVED",CODE:"CODE",DURATION:"DURATION",SIZE:"SIZE",IDENT:"IDENT",DESCRIPTOR:"DESCRIPTOR",LOCATOR:"LOCATOR",RESOLUTION:"RESOLUTION",DEPENDENT:"DEPENDENT",PACKAGE_EXTENSION:"PACKAGE_EXTENSION",SETTING:"SETTING",MARKDOWN:"MARKDOWN"},Tc;(function(e){e[e.BOLD=2]="BOLD"})(Tc||(Tc={}));var Ov=id.default.GITHUB_ACTIONS?{level:2}:rd.default.supportsColor?{level:rd.default.supportsColor.level}:{level:0},Py=Ov.level!==0,Mv=Py&&!id.default.GITHUB_ACTIONS&&!id.default.CIRCLE&&!id.default.GITLAB,Kv=new rd.default.Instance(Ov),OBe=new Map([[qe.NO_HINT,null],[qe.NULL,["#a853b5",129]],[qe.SCOPE,["#d75f00",166]],[qe.NAME,["#d7875f",173]],[qe.RANGE,["#00afaf",37]],[qe.REFERENCE,["#87afff",111]],[qe.NUMBER,["#ffd700",220]],[qe.PATH,["#d75fd7",170]],[qe.URL,["#d75fd7",170]],[qe.ADDED,["#5faf00",70]],[qe.REMOVED,["#d70000",160]],[qe.CODE,["#87afff",111]],[qe.SIZE,["#ffd700",220]]]),Fs=r=>r,Dy={[qe.NUMBER]:Fs({pretty:(r,e)=>`${e}`,json:r=>r}),[qe.IDENT]:Fs({pretty:(r,e)=>fi(r,e),json:r=>Ot(r)}),[qe.LOCATOR]:Fs({pretty:(r,e)=>It(r,e),json:r=>Rs(r)}),[qe.DESCRIPTOR]:Fs({pretty:(r,e)=>sr(r,e),json:r=>Pn(r)}),[qe.RESOLUTION]:Fs({pretty:(r,{descriptor:e,locator:t})=>Tv(r,e,t),json:({descriptor:r,locator:e})=>({descriptor:Pn(r),locator:e!==null?Rs(e):null})}),[qe.DEPENDENT]:Fs({pretty:(r,{locator:e,descriptor:t})=>Lv(r,e,t),json:({locator:r,descriptor:e})=>({locator:Rs(r),descriptor:Pn(e)})}),[qe.PACKAGE_EXTENSION]:Fs({pretty:(r,e)=>{switch(e.type){case wi.Dependency:return`${fi(r,e.parentDescriptor)} \u27A4 ${ns(r,"dependencies",qe.CODE)} \u27A4 ${fi(r,e.descriptor)}`;case wi.PeerDependency:return`${fi(r,e.parentDescriptor)} \u27A4 ${ns(r,"peerDependencies",qe.CODE)} \u27A4 ${fi(r,e.descriptor)}`;case wi.PeerDependencyMeta:return`${fi(r,e.parentDescriptor)} \u27A4 ${ns(r,"peerDependenciesMeta",qe.CODE)} \u27A4 ${fi(r,An(e.selector))} \u27A4 ${ns(r,e.key,qe.CODE)}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${e.type}`)}},json:r=>{switch(r.type){case wi.Dependency:return`${Ot(r.parentDescriptor)} > ${Ot(r.descriptor)}`;case wi.PeerDependency:return`${Ot(r.parentDescriptor)} >> ${Ot(r.descriptor)}`;case wi.PeerDependencyMeta:return`${Ot(r.parentDescriptor)} >> ${r.selector} / ${r.key}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${r.type}`)}}}),[qe.SETTING]:Fs({pretty:(r,e)=>(r.get(e),Mg(r,ns(r,e,qe.CODE),`https://yarnpkg.com/configuration/yarnrc#${e}`)),json:r=>r}),[qe.DURATION]:Fs({pretty:(r,e)=>{if(e>1e3*60){let t=Math.floor(e/1e3/60),i=Math.ceil((e-t*60*1e3)/1e3);return i===0?`${t}m`:`${t}m ${i}s`}else{let t=Math.floor(e/1e3),i=e-t*1e3;return i===0?`${t}s`:`${t}s ${i}ms`}},json:r=>r}),[qe.SIZE]:Fs({pretty:(r,e)=>{let t=["KB","MB","GB","TB"],i=t.length;for(;i>1&&e<1024**i;)i-=1;let n=1024**i,s=Math.floor(e*100/n)/100;return ns(r,`${s} ${t[i-1]}`,qe.NUMBER)},json:r=>r}),[qe.PATH]:Fs({pretty:(r,e)=>ns(r,H.fromPortablePath(e),qe.PATH),json:r=>H.fromPortablePath(r)}),[qe.MARKDOWN]:Fs({pretty:(r,{text:e,format:t,paragraphs:i})=>Ui(e,{format:t,paragraphs:i}),json:({text:r})=>r})};function fo(r,e){return[e,r]}function Ry(r,e,t){return r.get("enableColors")&&t&2&&(e=rd.default.bold(e)),e}function ns(r,e,t){if(!r.get("enableColors"))return e;let i=OBe.get(t);if(i===null)return e;let n=typeof i=="undefined"?t:Ov.level>=3?i[0]:i[1],s=typeof n=="number"?Kv.ansi256(n):n.startsWith("#")?Kv.hex(n):Kv[n];if(typeof s!="function")throw new Error(`Invalid format type ${n}`);return s(e)}var MBe=!!process.env.KONSOLE_VERSION;function Mg(r,e,t){return r.get("enableHyperlinks")?MBe?`]8;;${t}\\${e}]8;;\\`:`]8;;${t}\x07${e}]8;;\x07`:e}function tt(r,e,t){if(e===null)return ns(r,"null",qe.NULL);if(Object.prototype.hasOwnProperty.call(Dy,t))return Dy[t].pretty(r,e);if(typeof e!="string")throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof e}`);return ns(r,e,t)}function Uv(r,e,t,{separator:i=", "}={}){return[...e].map(n=>tt(r,n,t)).join(i)}function Oc(r,e){if(r===null)return null;if(Object.prototype.hasOwnProperty.call(Dy,e))return kv(e),Dy[e].json(r);if(typeof r!="string")throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof r}`);return r}function KBe(r,e,[t,i]){return r?Oc(t,i):tt(e,t,i)}function Hv(r){return{Check:ns(r,"\u2713","green"),Cross:ns(r,"\u2718","red"),Question:ns(r,"?","cyan")}}function _o(r,{label:e,value:[t,i]}){return`${tt(r,e,qe.CODE)}: ${tt(r,t,i)}`}var ho;(function(n){n.Error="error",n.Warning="warning",n.Info="info",n.Discard="discard"})(ho||(ho={}));function nd(r,{configuration:e}){let t=e.get("logFilters"),i=new Map,n=new Map,s=[];for(let g of t){let f=g.get("level");if(typeof f=="undefined")continue;let h=g.get("code");typeof h!="undefined"&&i.set(h,f);let p=g.get("text");typeof p!="undefined"&&n.set(p,f);let m=g.get("pattern");typeof m!="undefined"&&s.push([sJ.default.matcher(m,{contains:!0}),f])}s.reverse();let o=(g,f,h)=>{if(g===null||g===X.UNNAMED)return h;let p=n.size>0||s.length>0?(0,oJ.default)(f):f;if(n.size>0){let m=n.get(p);if(typeof m!="undefined")return m!=null?m:h}if(s.length>0){for(let[m,y]of s)if(m(p))return y!=null?y:h}if(i.size>0){let m=i.get(_A(g));if(typeof m!="undefined")return m!=null?m:h}return h},a=r.reportInfo,l=r.reportWarning,c=r.reportError,u=function(g,f,h,p){switch(o(f,h,p)){case ho.Info:a.call(g,f,h);break;case ho.Warning:l.call(g,f!=null?f:X.UNNAMED,h);break;case ho.Error:c.call(g,f!=null?f:X.UNNAMED,h);break}};r.reportInfo=function(...g){return u(this,...g,ho.Info)},r.reportWarning=function(...g){return u(this,...g,ho.Warning)},r.reportError=function(...g){return u(this,...g,ho.Error)}}var Dn={};ft(Dn,{checksumFile:()=>sw,checksumPattern:()=>ow,makeHash:()=>ln});var nw=ge(require("crypto")),zx=ge(Wx());function ln(...r){let e=(0,nw.createHash)("sha512"),t="";for(let i of r)typeof i=="string"?t+=i:i&&(t&&(e.update(t),t=""),e.update(i));return t&&e.update(t),e.digest("hex")}async function sw(r,{baseFs:e,algorithm:t}={baseFs:K,algorithm:"sha512"}){let i=await e.openPromise(r,"r");try{let n=65536,s=Buffer.allocUnsafeSlow(n),o=(0,nw.createHash)(t),a=0;for(;(a=await e.readPromise(i,s,0,n))!==0;)o.update(a===n?s:s.slice(0,a));return o.digest("hex")}finally{await e.closePromise(i)}}async function ow(r,{cwd:e}){let i=(await(0,zx.default)(r,{cwd:H.fromPortablePath(e),expandDirectories:!1,onlyDirectories:!0,unique:!0})).map(a=>`${a}/**/*`),n=await(0,zx.default)([r,...i],{cwd:H.fromPortablePath(e),expandDirectories:!1,onlyFiles:!1,unique:!0});n.sort();let s=await Promise.all(n.map(async a=>{let l=[Buffer.from(a)],c=H.toPortablePath(a),u=await K.lstatPromise(c);return u.isSymbolicLink()?l.push(Buffer.from(await K.readlinkPromise(c))):u.isFile()&&l.push(await K.readFilePromise(c)),l.join("\0")})),o=(0,nw.createHash)("sha512");for(let a of s)o.update(a);return o.digest("hex")}var Ad="virtual:",tSe=5,GW=/(os|cpu|libc)=([a-z0-9_-]+)/,rSe=(0,jW.makeParser)(GW);function $o(r,e){if(r==null?void 0:r.startsWith("@"))throw new Error("Invalid scope: don't prefix it with '@'");return{identHash:ln(r,e),scope:r,name:e}}function rr(r,e){return{identHash:r.identHash,scope:r.scope,name:r.name,descriptorHash:ln(r.identHash,e),range:e}}function cn(r,e){return{identHash:r.identHash,scope:r.scope,name:r.name,locatorHash:ln(r.identHash,e),reference:e}}function iSe(r){return{identHash:r.identHash,scope:r.scope,name:r.name}}function Aw(r){return{identHash:r.identHash,scope:r.scope,name:r.name,locatorHash:r.descriptorHash,reference:r.range}}function _x(r){return{identHash:r.identHash,scope:r.scope,name:r.name,descriptorHash:r.locatorHash,range:r.reference}}function nSe(r){return{identHash:r.identHash,scope:r.scope,name:r.name,locatorHash:r.locatorHash,reference:r.reference}}function ld(r,e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.locatorHash,reference:e.reference,version:r.version,languageName:r.languageName,linkType:r.linkType,conditions:r.conditions,dependencies:new Map(r.dependencies),peerDependencies:new Map(r.peerDependencies),dependenciesMeta:new Map(r.dependenciesMeta),peerDependenciesMeta:new Map(r.peerDependenciesMeta),bin:new Map(r.bin)}}function cd(r){return ld(r,r)}function Vx(r,e){if(e.includes("#"))throw new Error("Invalid entropy");return rr(r,`virtual:${e}#${r.range}`)}function Xx(r,e){if(e.includes("#"))throw new Error("Invalid entropy");return ld(r,cn(r,`virtual:${e}#${r.reference}`))}function Al(r){return r.range.startsWith(Ad)}function ea(r){return r.reference.startsWith(Ad)}function ud(r){if(!Al(r))throw new Error("Not a virtual descriptor");return rr(r,r.range.replace(/^[^#]*#/,""))}function gd(r){if(!ea(r))throw new Error("Not a virtual descriptor");return cn(r,r.reference.replace(/^[^#]*#/,""))}function sSe(r,e){return r.range.includes("::")?r:rr(r,`${r.range}::${Yg.default.stringify(e)}`)}function oSe(r,e){return r.reference.includes("::")?r:cn(r,`${r.reference}::${Yg.default.stringify(e)}`)}function fd(r,e){return r.identHash===e.identHash}function YW(r,e){return r.descriptorHash===e.descriptorHash}function hd(r,e){return r.locatorHash===e.locatorHash}function aSe(r,e){if(!ea(r))throw new Error("Invalid package type");if(!ea(e))throw new Error("Invalid package type");if(!fd(r,e)||r.dependencies.size!==e.dependencies.size)return!1;for(let t of r.dependencies.values()){let i=e.dependencies.get(t.identHash);if(!i||!YW(t,i))return!1}return!0}function An(r){let e=qW(r);if(!e)throw new Error(`Invalid ident (${r})`);return e}function qW(r){let e=r.match(/^(?:@([^/]+?)\/)?([^/]+)$/);if(!e)return null;let[,t,i]=e,n=typeof t!="undefined"?t:null;return $o(n,i)}function ll(r,e=!1){let t=pd(r,e);if(!t)throw new Error(`Invalid descriptor (${r})`);return t}function pd(r,e=!1){let t=e?r.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))$/):r.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))?$/);if(!t)return null;let[,i,n,s]=t;if(s==="unknown")throw new Error(`Invalid range (${r})`);let o=typeof i!="undefined"?i:null,a=typeof s!="undefined"?s:"unknown";return rr($o(o,n),a)}function Yc(r,e=!1){let t=lw(r,e);if(!t)throw new Error(`Invalid locator (${r})`);return t}function lw(r,e=!1){let t=e?r.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))$/):r.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))?$/);if(!t)return null;let[,i,n,s]=t;if(s==="unknown")throw new Error(`Invalid reference (${r})`);let o=typeof i!="undefined"?i:null,a=typeof s!="undefined"?s:"unknown";return cn($o(o,n),a)}function qg(r,e){let t=r.match(/^([^#:]*:)?((?:(?!::)[^#])*)(?:#((?:(?!::).)*))?(?:::(.*))?$/);if(t===null)throw new Error(`Invalid range (${r})`);let i=typeof t[1]!="undefined"?t[1]:null;if(typeof(e==null?void 0:e.requireProtocol)=="string"&&i!==e.requireProtocol)throw new Error(`Invalid protocol (${i})`);if((e==null?void 0:e.requireProtocol)&&i===null)throw new Error(`Missing protocol (${i})`);let n=typeof t[3]!="undefined"?decodeURIComponent(t[2]):null;if((e==null?void 0:e.requireSource)&&n===null)throw new Error(`Missing source (${r})`);let s=typeof t[3]!="undefined"?decodeURIComponent(t[3]):decodeURIComponent(t[2]),o=(e==null?void 0:e.parseSelector)?Yg.default.parse(s):s,a=typeof t[4]!="undefined"?Yg.default.parse(t[4]):null;return{protocol:i,source:n,selector:o,params:a}}function ASe(r,{protocol:e}){let{selector:t,params:i}=qg(r,{requireProtocol:e,requireBindings:!0});if(typeof i.locator!="string")throw new Error(`Assertion failed: Invalid bindings for ${r}`);return{parentLocator:Yc(i.locator,!0),path:t}}function JW(r){return r=r.replace(/%/g,"%25"),r=r.replace(/:/g,"%3A"),r=r.replace(/#/g,"%23"),r}function lSe(r){return r===null?!1:Object.entries(r).length>0}function cw({protocol:r,source:e,selector:t,params:i}){let n="";return r!==null&&(n+=`${r}`),e!==null&&(n+=`${JW(e)}#`),n+=JW(t),lSe(i)&&(n+=`::${Yg.default.stringify(i)}`),n}function cSe(r){let{params:e,protocol:t,source:i,selector:n}=qg(r);for(let s in e)s.startsWith("__")&&delete e[s];return cw({protocol:t,source:i,params:e,selector:n})}function Ot(r){return r.scope?`@${r.scope}/${r.name}`:`${r.name}`}function Pn(r){return r.scope?`@${r.scope}/${r.name}@${r.range}`:`${r.name}@${r.range}`}function Rs(r){return r.scope?`@${r.scope}/${r.name}@${r.reference}`:`${r.name}@${r.reference}`}function Zx(r){return r.scope!==null?`@${r.scope}-${r.name}`:r.name}function Jg(r){let{protocol:e,selector:t}=qg(r.reference),i=e!==null?e.replace(/:$/,""):"exotic",n=HW.default.valid(t),s=n!==null?`${i}-${n}`:`${i}`,o=10,a=r.scope?`${Zx(r)}-${s}-${r.locatorHash.slice(0,o)}`:`${Zx(r)}-${s}-${r.locatorHash.slice(0,o)}`;return Jr(a)}function fi(r,e){return e.scope?`${tt(r,`@${e.scope}/`,qe.SCOPE)}${tt(r,e.name,qe.NAME)}`:`${tt(r,e.name,qe.NAME)}`}function uw(r){if(r.startsWith(Ad)){let e=uw(r.substring(r.indexOf("#")+1)),t=r.substring(Ad.length,Ad.length+tSe);return`${e} [${t}]`}else return r.replace(/\?.*/,"?[...]")}function aw(r,e){return`${tt(r,uw(e),qe.RANGE)}`}function sr(r,e){return`${fi(r,e)}${tt(r,"@",qe.RANGE)}${aw(r,e.range)}`}function dd(r,e){return`${tt(r,uw(e),qe.REFERENCE)}`}function It(r,e){return`${fi(r,e)}${tt(r,"@",qe.REFERENCE)}${dd(r,e.reference)}`}function $x(r){return`${Ot(r)}@${uw(r.reference)}`}function Wg(r){return kn(r,[e=>Ot(e),e=>e.range])}function Cd(r,e){return fi(r,e.locator)}function Tv(r,e,t){let i=Al(e)?ud(e):e;return t===null?`${sr(r,i)} \u2192 ${Hv(r).Cross}`:i.identHash===t.identHash?`${sr(r,i)} \u2192 ${dd(r,t.reference)}`:`${sr(r,i)} \u2192 ${It(r,t)}`}function Lv(r,e,t){return t===null?`${It(r,e)}`:`${It(r,e)} (via ${aw(r,t.range)})`}function ek(r){return`node_modules/${Ot(r)}`}function gw(r,e){return r.conditions?rSe(r.conditions,t=>{let[,i,n]=t.match(GW),s=e[i];return s?s.includes(n):!0}):!0}var WW={hooks:{reduceDependency:(r,e,t,i,{resolver:n,resolveOptions:s})=>{for(let{pattern:o,reference:a}of e.topLevelWorkspace.manifest.resolutions){if(o.from&&o.from.fullName!==Ot(t)||o.from&&o.from.description&&o.from.description!==t.reference||o.descriptor.fullName!==Ot(r)||o.descriptor.description&&o.descriptor.description!==r.range)continue;return n.bindDescriptor(rr(r,a),e.topLevelWorkspace.anchoredLocator,s)}return r},validateProject:async(r,e)=>{for(let t of r.workspaces){let i=Cd(r.configuration,t);await r.configuration.triggerHook(n=>n.validateWorkspace,t,{reportWarning:(n,s)=>e.reportWarning(n,`${i}: ${s}`),reportError:(n,s)=>e.reportError(n,`${i}: ${s}`)})}},validateWorkspace:async(r,e)=>{let{manifest:t}=r;t.resolutions.length&&r.cwd!==r.project.cwd&&t.errors.push(new Error("Resolutions field will be ignored"));for(let i of t.errors)e.reportWarning(X.INVALID_MANIFEST,i.message)}}};var XW=ge(ri());var md=class{supportsDescriptor(e,t){return!!(e.range.startsWith(md.protocol)||t.project.tryWorkspaceByDescriptor(e)!==null)}supportsLocator(e,t){return!!e.reference.startsWith(md.protocol)}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,i){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,i){return[i.project.getWorkspaceByDescriptor(e).anchoredLocator]}async getSatisfying(e,t,i){return null}async resolve(e,t){let i=t.project.getWorkspaceByCwd(e.reference.slice(md.protocol.length));return te(N({},e),{version:i.manifest.version||"0.0.0",languageName:"unknown",linkType:Qt.SOFT,conditions:null,dependencies:new Map([...i.manifest.dependencies,...i.manifest.devDependencies]),peerDependencies:new Map([...i.manifest.peerDependencies]),dependenciesMeta:i.manifest.dependenciesMeta,peerDependenciesMeta:i.manifest.peerDependenciesMeta,bin:i.manifest.bin})}},oi=md;oi.protocol="workspace:";var Wt={};ft(Wt,{SemVer:()=>zW.SemVer,clean:()=>gSe,satisfiesWithPrereleases:()=>qc,validRange:()=>po});var fw=ge(ri()),zW=ge(ri()),_W=new Map;function qc(r,e,t=!1){if(!r)return!1;let i=`${e}${t}`,n=_W.get(i);if(typeof n=="undefined")try{n=new fw.default.Range(e,{includePrerelease:!0,loose:t})}catch{return!1}finally{_W.set(i,n||null)}else if(n===null)return!1;let s;try{s=new fw.default.SemVer(r,n)}catch(o){return!1}return n.test(s)?!0:(s.prerelease&&(s.prerelease=[]),n.set.some(o=>{for(let a of o)a.semver.prerelease&&(a.semver.prerelease=[]);return o.every(a=>a.test(s))}))}var VW=new Map;function po(r){if(r.indexOf(":")!==-1)return null;let e=VW.get(r);if(typeof e!="undefined")return e;try{e=new fw.default.Range(r)}catch{e=null}return VW.set(r,e),e}var uSe=/^(?:[\sv=]*?)((0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\s*)$/;function gSe(r){let e=uSe.exec(r);return e?e[1]:null}var cl=class{constructor(){this.indent=" ";this.name=null;this.version=null;this.os=null;this.cpu=null;this.libc=null;this.type=null;this.packageManager=null;this.private=!1;this.license=null;this.main=null;this.module=null;this.browser=null;this.languageName=null;this.bin=new Map;this.scripts=new Map;this.dependencies=new Map;this.devDependencies=new Map;this.peerDependencies=new Map;this.workspaceDefinitions=[];this.dependenciesMeta=new Map;this.peerDependenciesMeta=new Map;this.resolutions=[];this.files=null;this.publishConfig=null;this.installConfig=null;this.preferUnplugged=null;this.raw={};this.errors=[]}static async tryFind(e,{baseFs:t=new ar}={}){let i=k.join(e,"package.json");try{return await cl.fromFile(i,{baseFs:t})}catch(n){if(n.code==="ENOENT")return null;throw n}}static async find(e,{baseFs:t}={}){let i=await cl.tryFind(e,{baseFs:t});if(i===null)throw new Error("Manifest not found");return i}static async fromFile(e,{baseFs:t=new ar}={}){let i=new cl;return await i.loadFile(e,{baseFs:t}),i}static fromText(e){let t=new cl;return t.loadFromText(e),t}static isManifestFieldCompatible(e,t){if(e===null)return!0;let i=!0,n=!1;for(let s of e)if(s[0]==="!"){if(n=!0,t===s.slice(1))return!1}else if(i=!1,s===t)return!0;return n&&i}loadFromText(e){let t;try{t=JSON.parse($W(e)||"{}")}catch(i){throw i.message+=` (when parsing ${e})`,i}this.load(t),this.indent=ZW(e)}async loadFile(e,{baseFs:t=new ar}){let i=await t.readFilePromise(e,"utf8"),n;try{n=JSON.parse($W(i)||"{}")}catch(s){throw s.message+=` (when parsing ${e})`,s}this.load(n),this.indent=ZW(i)}load(e,{yamlCompatibilityMode:t=!1}={}){if(typeof e!="object"||e===null)throw new Error(`Utterly invalid manifest data (${e})`);this.raw=e;let i=[];if(this.name=null,typeof e.name=="string")try{this.name=An(e.name)}catch(s){i.push(new Error("Parsing failed for the 'name' field"))}if(typeof e.version=="string"?this.version=e.version:this.version=null,Array.isArray(e.os)){let s=[];this.os=s;for(let o of e.os)typeof o!="string"?i.push(new Error("Parsing failed for the 'os' field")):s.push(o)}else this.os=null;if(Array.isArray(e.cpu)){let s=[];this.cpu=s;for(let o of e.cpu)typeof o!="string"?i.push(new Error("Parsing failed for the 'cpu' field")):s.push(o)}else this.cpu=null;if(Array.isArray(e.libc)){let s=[];this.libc=s;for(let o of e.libc)typeof o!="string"?i.push(new Error("Parsing failed for the 'libc' field")):s.push(o)}else this.libc=null;if(typeof e.type=="string"?this.type=e.type:this.type=null,typeof e.packageManager=="string"?this.packageManager=e.packageManager:this.packageManager=null,typeof e.private=="boolean"?this.private=e.private:this.private=!1,typeof e.license=="string"?this.license=e.license:this.license=null,typeof e.languageName=="string"?this.languageName=e.languageName:this.languageName=null,typeof e.main=="string"?this.main=un(e.main):this.main=null,typeof e.module=="string"?this.module=un(e.module):this.module=null,e.browser!=null)if(typeof e.browser=="string")this.browser=un(e.browser);else{this.browser=new Map;for(let[s,o]of Object.entries(e.browser))this.browser.set(un(s),typeof o=="string"?un(o):o)}else this.browser=null;if(this.bin=new Map,typeof e.bin=="string")this.name!==null?this.bin.set(this.name.name,un(e.bin)):i.push(new Error("String bin field, but no attached package name"));else if(typeof e.bin=="object"&&e.bin!==null)for(let[s,o]of Object.entries(e.bin)){if(typeof o!="string"){i.push(new Error(`Invalid bin definition for '${s}'`));continue}let a=An(s);this.bin.set(a.name,un(o))}if(this.scripts=new Map,typeof e.scripts=="object"&&e.scripts!==null)for(let[s,o]of Object.entries(e.scripts)){if(typeof o!="string"){i.push(new Error(`Invalid script definition for '${s}'`));continue}this.scripts.set(s,o)}if(this.dependencies=new Map,typeof e.dependencies=="object"&&e.dependencies!==null)for(let[s,o]of Object.entries(e.dependencies)){if(typeof o!="string"){i.push(new Error(`Invalid dependency range for '${s}'`));continue}let a;try{a=An(s)}catch(c){i.push(new Error(`Parsing failed for the dependency name '${s}'`));continue}let l=rr(a,o);this.dependencies.set(l.identHash,l)}if(this.devDependencies=new Map,typeof e.devDependencies=="object"&&e.devDependencies!==null)for(let[s,o]of Object.entries(e.devDependencies)){if(typeof o!="string"){i.push(new Error(`Invalid dependency range for '${s}'`));continue}let a;try{a=An(s)}catch(c){i.push(new Error(`Parsing failed for the dependency name '${s}'`));continue}let l=rr(a,o);this.devDependencies.set(l.identHash,l)}if(this.peerDependencies=new Map,typeof e.peerDependencies=="object"&&e.peerDependencies!==null)for(let[s,o]of Object.entries(e.peerDependencies)){let a;try{a=An(s)}catch(c){i.push(new Error(`Parsing failed for the dependency name '${s}'`));continue}(typeof o!="string"||!o.startsWith(oi.protocol)&&!po(o))&&(i.push(new Error(`Invalid dependency range for '${s}'`)),o="*");let l=rr(a,o);this.peerDependencies.set(l.identHash,l)}typeof e.workspaces=="object"&&e.workspaces!==null&&e.workspaces.nohoist&&i.push(new Error("'nohoist' is deprecated, please use 'installConfig.hoistingLimits' instead"));let n=Array.isArray(e.workspaces)?e.workspaces:typeof e.workspaces=="object"&&e.workspaces!==null&&Array.isArray(e.workspaces.packages)?e.workspaces.packages:[];this.workspaceDefinitions=[];for(let s of n){if(typeof s!="string"){i.push(new Error(`Invalid workspace definition for '${s}'`));continue}this.workspaceDefinitions.push({pattern:s})}if(this.dependenciesMeta=new Map,typeof e.dependenciesMeta=="object"&&e.dependenciesMeta!==null)for(let[s,o]of Object.entries(e.dependenciesMeta)){if(typeof o!="object"||o===null){i.push(new Error(`Invalid meta field for '${s}`));continue}let a=ll(s),l=this.ensureDependencyMeta(a),c=hw(o.built,{yamlCompatibilityMode:t});if(c===null){i.push(new Error(`Invalid built meta field for '${s}'`));continue}let u=hw(o.optional,{yamlCompatibilityMode:t});if(u===null){i.push(new Error(`Invalid optional meta field for '${s}'`));continue}let g=hw(o.unplugged,{yamlCompatibilityMode:t});if(g===null){i.push(new Error(`Invalid unplugged meta field for '${s}'`));continue}Object.assign(l,{built:c,optional:u,unplugged:g})}if(this.peerDependenciesMeta=new Map,typeof e.peerDependenciesMeta=="object"&&e.peerDependenciesMeta!==null)for(let[s,o]of Object.entries(e.peerDependenciesMeta)){if(typeof o!="object"||o===null){i.push(new Error(`Invalid meta field for '${s}'`));continue}let a=ll(s),l=this.ensurePeerDependencyMeta(a),c=hw(o.optional,{yamlCompatibilityMode:t});if(c===null){i.push(new Error(`Invalid optional meta field for '${s}'`));continue}Object.assign(l,{optional:c})}if(this.resolutions=[],typeof e.resolutions=="object"&&e.resolutions!==null)for(let[s,o]of Object.entries(e.resolutions)){if(typeof o!="string"){i.push(new Error(`Invalid resolution entry for '${s}'`));continue}try{this.resolutions.push({pattern:$E(s),reference:o})}catch(a){i.push(a);continue}}if(Array.isArray(e.files)){this.files=new Set;for(let s of e.files){if(typeof s!="string"){i.push(new Error(`Invalid files entry for '${s}'`));continue}this.files.add(s)}}else this.files=null;if(typeof e.publishConfig=="object"&&e.publishConfig!==null){if(this.publishConfig={},typeof e.publishConfig.access=="string"&&(this.publishConfig.access=e.publishConfig.access),typeof e.publishConfig.main=="string"&&(this.publishConfig.main=un(e.publishConfig.main)),typeof e.publishConfig.module=="string"&&(this.publishConfig.module=un(e.publishConfig.module)),e.publishConfig.browser!=null)if(typeof e.publishConfig.browser=="string")this.publishConfig.browser=un(e.publishConfig.browser);else{this.publishConfig.browser=new Map;for(let[s,o]of Object.entries(e.publishConfig.browser))this.publishConfig.browser.set(un(s),typeof o=="string"?un(o):o)}if(typeof e.publishConfig.registry=="string"&&(this.publishConfig.registry=e.publishConfig.registry),typeof e.publishConfig.bin=="string")this.name!==null?this.publishConfig.bin=new Map([[this.name.name,un(e.publishConfig.bin)]]):i.push(new Error("String bin field, but no attached package name"));else if(typeof e.publishConfig.bin=="object"&&e.publishConfig.bin!==null){this.publishConfig.bin=new Map;for(let[s,o]of Object.entries(e.publishConfig.bin)){if(typeof o!="string"){i.push(new Error(`Invalid bin definition for '${s}'`));continue}this.publishConfig.bin.set(s,un(o))}}if(Array.isArray(e.publishConfig.executableFiles)){this.publishConfig.executableFiles=new Set;for(let s of e.publishConfig.executableFiles){if(typeof s!="string"){i.push(new Error("Invalid executable file definition"));continue}this.publishConfig.executableFiles.add(un(s))}}}else this.publishConfig=null;if(typeof e.installConfig=="object"&&e.installConfig!==null){this.installConfig={};for(let s of Object.keys(e.installConfig))s==="hoistingLimits"?typeof e.installConfig.hoistingLimits=="string"?this.installConfig.hoistingLimits=e.installConfig.hoistingLimits:i.push(new Error("Invalid hoisting limits definition")):s=="selfReferences"?typeof e.installConfig.selfReferences=="boolean"?this.installConfig.selfReferences=e.installConfig.selfReferences:i.push(new Error("Invalid selfReferences definition, must be a boolean value")):i.push(new Error(`Unrecognized installConfig key: ${s}`))}else this.installConfig=null;if(typeof e.optionalDependencies=="object"&&e.optionalDependencies!==null)for(let[s,o]of Object.entries(e.optionalDependencies)){if(typeof o!="string"){i.push(new Error(`Invalid dependency range for '${s}'`));continue}let a;try{a=An(s)}catch(g){i.push(new Error(`Parsing failed for the dependency name '${s}'`));continue}let l=rr(a,o);this.dependencies.set(l.identHash,l);let c=rr(a,"unknown"),u=this.ensureDependencyMeta(c);Object.assign(u,{optional:!0})}typeof e.preferUnplugged=="boolean"?this.preferUnplugged=e.preferUnplugged:this.preferUnplugged=null,this.errors=i}getForScope(e){switch(e){case"dependencies":return this.dependencies;case"devDependencies":return this.devDependencies;case"peerDependencies":return this.peerDependencies;default:throw new Error(`Unsupported value ("${e}")`)}}hasConsumerDependency(e){return!!(this.dependencies.has(e.identHash)||this.peerDependencies.has(e.identHash))}hasHardDependency(e){return!!(this.dependencies.has(e.identHash)||this.devDependencies.has(e.identHash))}hasSoftDependency(e){return!!this.peerDependencies.has(e.identHash)}hasDependency(e){return!!(this.hasHardDependency(e)||this.hasSoftDependency(e))}getConditions(){let e=[];return this.os&&this.os.length>0&&e.push(tk("os",this.os)),this.cpu&&this.cpu.length>0&&e.push(tk("cpu",this.cpu)),this.libc&&this.libc.length>0&&e.push(tk("libc",this.libc)),e.length>0?e.join(" & "):null}isCompatibleWithOS(e){return cl.isManifestFieldCompatible(this.os,e)}isCompatibleWithCPU(e){return cl.isManifestFieldCompatible(this.cpu,e)}ensureDependencyMeta(e){if(e.range!=="unknown"&&!XW.default.valid(e.range))throw new Error(`Invalid meta field range for '${Pn(e)}'`);let t=Ot(e),i=e.range!=="unknown"?e.range:null,n=this.dependenciesMeta.get(t);n||this.dependenciesMeta.set(t,n=new Map);let s=n.get(i);return s||n.set(i,s={}),s}ensurePeerDependencyMeta(e){if(e.range!=="unknown")throw new Error(`Invalid meta field range for '${Pn(e)}'`);let t=Ot(e),i=this.peerDependenciesMeta.get(t);return i||this.peerDependenciesMeta.set(t,i={}),i}setRawField(e,t,{after:i=[]}={}){let n=new Set(i.filter(s=>Object.prototype.hasOwnProperty.call(this.raw,s)));if(n.size===0||Object.prototype.hasOwnProperty.call(this.raw,e))this.raw[e]=t;else{let s=this.raw,o=this.raw={},a=!1;for(let l of Object.keys(s))o[l]=s[l],a||(n.delete(l),n.size===0&&(o[e]=t,a=!0))}}exportTo(e,{compatibilityMode:t=!0}={}){var s;if(Object.assign(e,this.raw),this.name!==null?e.name=Ot(this.name):delete e.name,this.version!==null?e.version=this.version:delete e.version,this.os!==null?e.os=this.os:delete e.os,this.cpu!==null?e.cpu=this.cpu:delete e.cpu,this.type!==null?e.type=this.type:delete e.type,this.packageManager!==null?e.packageManager=this.packageManager:delete e.packageManager,this.private?e.private=!0:delete e.private,this.license!==null?e.license=this.license:delete e.license,this.languageName!==null?e.languageName=this.languageName:delete e.languageName,this.main!==null?e.main=this.main:delete e.main,this.module!==null?e.module=this.module:delete e.module,this.browser!==null){let o=this.browser;typeof o=="string"?e.browser=o:o instanceof Map&&(e.browser=Object.assign({},...Array.from(o.keys()).sort().map(a=>({[a]:o.get(a)}))))}else delete e.browser;this.bin.size===1&&this.name!==null&&this.bin.has(this.name.name)?e.bin=this.bin.get(this.name.name):this.bin.size>0?e.bin=Object.assign({},...Array.from(this.bin.keys()).sort().map(o=>({[o]:this.bin.get(o)}))):delete e.bin,this.workspaceDefinitions.length>0?this.raw.workspaces&&!Array.isArray(this.raw.workspaces)?e.workspaces=te(N({},this.raw.workspaces),{packages:this.workspaceDefinitions.map(({pattern:o})=>o)}):e.workspaces=this.workspaceDefinitions.map(({pattern:o})=>o):this.raw.workspaces&&!Array.isArray(this.raw.workspaces)&&Object.keys(this.raw.workspaces).length>0?e.workspaces=this.raw.workspaces:delete e.workspaces;let i=[],n=[];for(let o of this.dependencies.values()){let a=this.dependenciesMeta.get(Ot(o)),l=!1;if(t&&a){let c=a.get(null);c&&c.optional&&(l=!0)}l?n.push(o):i.push(o)}i.length>0?e.dependencies=Object.assign({},...Wg(i).map(o=>({[Ot(o)]:o.range}))):delete e.dependencies,n.length>0?e.optionalDependencies=Object.assign({},...Wg(n).map(o=>({[Ot(o)]:o.range}))):delete e.optionalDependencies,this.devDependencies.size>0?e.devDependencies=Object.assign({},...Wg(this.devDependencies.values()).map(o=>({[Ot(o)]:o.range}))):delete e.devDependencies,this.peerDependencies.size>0?e.peerDependencies=Object.assign({},...Wg(this.peerDependencies.values()).map(o=>({[Ot(o)]:o.range}))):delete e.peerDependencies,e.dependenciesMeta={};for(let[o,a]of kn(this.dependenciesMeta.entries(),([l,c])=>l))for(let[l,c]of kn(a.entries(),([u,g])=>u!==null?`0${u}`:"1")){let u=l!==null?Pn(rr(An(o),l)):o,g=N({},c);t&&l===null&&delete g.optional,Object.keys(g).length!==0&&(e.dependenciesMeta[u]=g)}if(Object.keys(e.dependenciesMeta).length===0&&delete e.dependenciesMeta,this.peerDependenciesMeta.size>0?e.peerDependenciesMeta=Object.assign({},...kn(this.peerDependenciesMeta.entries(),([o,a])=>o).map(([o,a])=>({[o]:a}))):delete e.peerDependenciesMeta,this.resolutions.length>0?e.resolutions=Object.assign({},...this.resolutions.map(({pattern:o,reference:a})=>({[eI(o)]:a}))):delete e.resolutions,this.files!==null?e.files=Array.from(this.files):delete e.files,this.preferUnplugged!==null?e.preferUnplugged=this.preferUnplugged:delete e.preferUnplugged,this.scripts!==null&&this.scripts.size>0){(s=e.scripts)!=null||(e.scripts={});for(let o of Object.keys(e.scripts))this.scripts.has(o)||delete e.scripts[o];for(let[o,a]of this.scripts.entries())e.scripts[o]=a}else delete e.scripts;return e}},At=cl;At.fileName="package.json",At.allDependencies=["dependencies","devDependencies","peerDependencies"],At.hardDependencies=["dependencies","devDependencies"];function ZW(r){let e=r.match(/^[ \t]+/m);return e?e[0]:" "}function $W(r){return r.charCodeAt(0)===65279?r.slice(1):r}function un(r){return r.replace(/\\/g,"/")}function hw(r,{yamlCompatibilityMode:e}){return e?Nv(r):typeof r=="undefined"||typeof r=="boolean"?r:null}function e4(r,e){let t=e.search(/[^!]/);if(t===-1)return"invalid";let i=t%2==0?"":"!",n=e.slice(t);return`${i}${r}=${n}`}function tk(r,e){return e.length===1?e4(r,e[0]):`(${e.map(t=>e4(r,t)).join(" | ")})`}var D4=ge(P4()),R4=ge(require("stream")),F4=ge(require("string_decoder"));var sve=15,ct=class extends Error{constructor(e,t,i){super(t);this.reportExtra=i;this.reportCode=e}};function ove(r){return typeof r.reportCode!="undefined"}var Ji=class{constructor(){this.reportedInfos=new Set;this.reportedWarnings=new Set;this.reportedErrors=new Set}static progressViaCounter(e){let t=0,i,n=new Promise(l=>{i=l}),s=l=>{let c=i;n=new Promise(u=>{i=u}),t=l,c()},o=(l=0)=>{s(t+1)},a=async function*(){for(;t{t=o}),n=(0,D4.default)(o=>{let a=t;i=new Promise(l=>{t=l}),e=o,a()},1e3/sve),s=async function*(){for(;;)await i,yield{title:e}}();return{[Symbol.asyncIterator](){return s},hasProgress:!1,hasTitle:!0,setTitle:n}}async startProgressPromise(e,t){let i=this.reportProgress(e);try{return await t(e)}finally{i.stop()}}startProgressSync(e,t){let i=this.reportProgress(e);try{return t(e)}finally{i.stop()}}reportInfoOnce(e,t,i){var s;let n=i&&i.key?i.key:t;this.reportedInfos.has(n)||(this.reportedInfos.add(n),this.reportInfo(e,t),(s=i==null?void 0:i.reportExtra)==null||s.call(i,this))}reportWarningOnce(e,t,i){var s;let n=i&&i.key?i.key:t;this.reportedWarnings.has(n)||(this.reportedWarnings.add(n),this.reportWarning(e,t),(s=i==null?void 0:i.reportExtra)==null||s.call(i,this))}reportErrorOnce(e,t,i){var s;let n=i&&i.key?i.key:t;this.reportedErrors.has(n)||(this.reportedErrors.add(n),this.reportError(e,t),(s=i==null?void 0:i.reportExtra)==null||s.call(i,this))}reportExceptionOnce(e){ove(e)?this.reportErrorOnce(e.reportCode,e.message,{key:e,reportExtra:e.reportExtra}):this.reportErrorOnce(X.EXCEPTION,e.stack||e.message,{key:e})}createStreamReporter(e=null){let t=new R4.PassThrough,i=new F4.StringDecoder,n="";return t.on("data",s=>{let o=i.write(s),a;do if(a=o.indexOf(` +`),a!==-1){let l=n+o.substring(0,a);o=o.substring(a+1),n="",e!==null?this.reportInfo(null,`${e} ${l}`):this.reportInfo(null,l)}while(a!==-1);n+=o}),t.on("end",()=>{let s=i.end();s!==""&&(e!==null?this.reportInfo(null,`${e} ${s}`):this.reportInfo(null,s))}),t}};var yd=class{constructor(e){this.fetchers=e}supports(e,t){return!!this.tryFetcher(e,t)}getLocalPath(e,t){return this.getFetcher(e,t).getLocalPath(e,t)}async fetch(e,t){return await this.getFetcher(e,t).fetch(e,t)}tryFetcher(e,t){let i=this.fetchers.find(n=>n.supports(e,t));return i||null}getFetcher(e,t){let i=this.fetchers.find(n=>n.supports(e,t));if(!i)throw new ct(X.FETCHER_NOT_FOUND,`${It(t.project.configuration,e)} isn't supported by any available fetcher`);return i}};var wd=class{constructor(e){this.resolvers=e.filter(t=>t)}supportsDescriptor(e,t){return!!this.tryResolverByDescriptor(e,t)}supportsLocator(e,t){return!!this.tryResolverByLocator(e,t)}shouldPersistResolution(e,t){return this.getResolverByLocator(e,t).shouldPersistResolution(e,t)}bindDescriptor(e,t,i){return this.getResolverByDescriptor(e,i).bindDescriptor(e,t,i)}getResolutionDependencies(e,t){return this.getResolverByDescriptor(e,t).getResolutionDependencies(e,t)}async getCandidates(e,t,i){return await this.getResolverByDescriptor(e,i).getCandidates(e,t,i)}async getSatisfying(e,t,i){return this.getResolverByDescriptor(e,i).getSatisfying(e,t,i)}async resolve(e,t){return await this.getResolverByLocator(e,t).resolve(e,t)}tryResolverByDescriptor(e,t){let i=this.resolvers.find(n=>n.supportsDescriptor(e,t));return i||null}getResolverByDescriptor(e,t){let i=this.resolvers.find(n=>n.supportsDescriptor(e,t));if(!i)throw new Error(`${sr(t.project.configuration,e)} isn't supported by any available resolver`);return i}tryResolverByLocator(e,t){let i=this.resolvers.find(n=>n.supportsLocator(e,t));return i||null}getResolverByLocator(e,t){let i=this.resolvers.find(n=>n.supportsLocator(e,t));if(!i)throw new Error(`${It(t.project.configuration,e)} isn't supported by any available resolver`);return i}};var N4=ge(ri());var zg=/^(?!v)[a-z0-9._-]+$/i,nk=class{supportsDescriptor(e,t){return!!(po(e.range)||zg.test(e.range))}supportsLocator(e,t){return!!(N4.default.valid(e.reference)||zg.test(e.reference))}shouldPersistResolution(e,t){return t.resolver.shouldPersistResolution(this.forwardLocator(e,t),t)}bindDescriptor(e,t,i){return i.resolver.bindDescriptor(this.forwardDescriptor(e,i),t,i)}getResolutionDependencies(e,t){return t.resolver.getResolutionDependencies(this.forwardDescriptor(e,t),t)}async getCandidates(e,t,i){return await i.resolver.getCandidates(this.forwardDescriptor(e,i),t,i)}async getSatisfying(e,t,i){return await i.resolver.getSatisfying(this.forwardDescriptor(e,i),t,i)}async resolve(e,t){let i=await t.resolver.resolve(this.forwardLocator(e,t),t);return ld(i,e)}forwardDescriptor(e,t){return rr(e,`${t.project.configuration.get("defaultProtocol")}${e.range}`)}forwardLocator(e,t){return cn(e,`${t.project.configuration.get("defaultProtocol")}${e.reference}`)}};var Bd=class{supports(e){return!!e.reference.startsWith("virtual:")}getLocalPath(e,t){let i=e.reference.indexOf("#");if(i===-1)throw new Error("Invalid virtual package reference");let n=e.reference.slice(i+1),s=cn(e,n);return t.fetcher.getLocalPath(s,t)}async fetch(e,t){let i=e.reference.indexOf("#");if(i===-1)throw new Error("Invalid virtual package reference");let n=e.reference.slice(i+1),s=cn(e,n),o=await t.fetcher.fetch(s,t);return await this.ensureVirtualLink(e,o,t)}getLocatorFilename(e){return Jg(e)}async ensureVirtualLink(e,t,i){let n=t.packageFs.getRealPath(),s=i.project.configuration.get("virtualFolder"),o=this.getLocatorFilename(e),a=Wr.makeVirtualPath(s,o,n),l=new Na(a,{baseFs:t.packageFs,pathUtils:k});return te(N({},t),{packageFs:l})}};var _g=class{static isVirtualDescriptor(e){return!!e.range.startsWith(_g.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(_g.protocol)}supportsDescriptor(e,t){return _g.isVirtualDescriptor(e)}supportsLocator(e,t){return _g.isVirtualLocator(e)}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,i){throw new Error('Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported')}getResolutionDependencies(e,t){throw new Error('Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported')}async getCandidates(e,t,i){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(e,t,i){throw new Error('Assertion failed: calling "getSatisfying" on a virtual descriptor is unsupported')}async resolve(e,t){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}},pw=_g;pw.protocol="virtual:";var bd=class{supports(e){return!!e.reference.startsWith(oi.protocol)}getLocalPath(e,t){return this.getWorkspace(e,t).cwd}async fetch(e,t){let i=this.getWorkspace(e,t).cwd;return{packageFs:new _t(i),prefixPath:Me.dot,localPath:i}}getWorkspace(e,t){return t.project.getWorkspaceByCwd(e.reference.slice(oi.protocol.length))}};var sk={};ft(sk,{getDefaultGlobalFolder:()=>ak,getHomeFolder:()=>Qd,isFolderInside:()=>Ak});var ok=ge(require("os"));function ak(){if(process.platform==="win32"){let r=H.toPortablePath(process.env.LOCALAPPDATA||H.join((0,ok.homedir)(),"AppData","Local"));return k.resolve(r,"Yarn/Berry")}if(process.env.XDG_DATA_HOME){let r=H.toPortablePath(process.env.XDG_DATA_HOME);return k.resolve(r,"yarn/berry")}return k.resolve(Qd(),".yarn/berry")}function Qd(){return H.toPortablePath((0,ok.homedir)()||"/usr/local/share")}function Ak(r,e){let t=k.relative(e,r);return t&&!t.startsWith("..")&&!k.isAbsolute(t)}var Vg={};ft(Vg,{builtinModules:()=>lk,getArchitecture:()=>Sd,getArchitectureName:()=>Ave,getArchitectureSet:()=>ck});var L4=ge(require("module"));function lk(){return new Set(L4.default.builtinModules||Object.keys(process.binding("natives")))}function ave(){var i,n,s,o;if(process.platform==="win32")return null;let e=(s=((n=(i=process.report)==null?void 0:i.getReport())!=null?n:{}).sharedObjects)!=null?s:[],t=/\/(?:(ld-linux-|[^/]+-linux-gnu\/)|(libc.musl-|ld-musl-))/;return(o=$p(e,a=>{let l=a.match(t);if(!l)return $p.skip;if(l[1])return"glibc";if(l[2])return"musl";throw new Error("Assertion failed: Expected the libc variant to have been detected")}))!=null?o:null}var dw,Cw;function Sd(){return dw=dw!=null?dw:{os:process.platform,cpu:process.arch,libc:ave()}}function Ave(r=Sd()){return r.libc?`${r.os}-${r.cpu}-${r.libc}`:`${r.os}-${r.cpu}`}function ck(){let r=Sd();return Cw=Cw!=null?Cw:{os:[r.os],cpu:[r.cpu],libc:r.libc?[r.libc]:[]}}var lve=new Set(["binFolder","version","flags","profile","gpg","ignoreNode","wrapOutput","home","confDir"]),Ew="yarn_",gk=".yarnrc.yml",fk="yarn.lock",cve="********",Ie;(function(u){u.ANY="ANY",u.BOOLEAN="BOOLEAN",u.ABSOLUTE_PATH="ABSOLUTE_PATH",u.LOCATOR="LOCATOR",u.LOCATOR_LOOSE="LOCATOR_LOOSE",u.NUMBER="NUMBER",u.STRING="STRING",u.SECRET="SECRET",u.SHAPE="SHAPE",u.MAP="MAP"})(Ie||(Ie={}));var Ri=qe,hk={lastUpdateCheck:{description:"Last timestamp we checked whether new Yarn versions were available",type:Ie.STRING,default:null},yarnPath:{description:"Path to the local executable that must be used over the global one",type:Ie.ABSOLUTE_PATH,default:null},ignorePath:{description:"If true, the local executable will be ignored when using the global one",type:Ie.BOOLEAN,default:!1},ignoreCwd:{description:"If true, the `--cwd` flag will be ignored",type:Ie.BOOLEAN,default:!1},cacheKeyOverride:{description:"A global cache key override; used only for test purposes",type:Ie.STRING,default:null},globalFolder:{description:"Folder where all system-global files are stored",type:Ie.ABSOLUTE_PATH,default:ak()},cacheFolder:{description:"Folder where the cache files must be written",type:Ie.ABSOLUTE_PATH,default:"./.yarn/cache"},compressionLevel:{description:"Zip files compression level, from 0 to 9 or mixed (a variant of 9, which stores some files uncompressed, when compression doesn't yield good results)",type:Ie.NUMBER,values:["mixed",0,1,2,3,4,5,6,7,8,9],default:lc},virtualFolder:{description:"Folder where the virtual packages (cf doc) will be mapped on the disk (must be named __virtual__)",type:Ie.ABSOLUTE_PATH,default:"./.yarn/__virtual__"},lockfileFilename:{description:"Name of the files where the Yarn dependency tree entries must be stored",type:Ie.STRING,default:fk},installStatePath:{description:"Path of the file where the install state will be persisted",type:Ie.ABSOLUTE_PATH,default:"./.yarn/install-state.gz"},immutablePatterns:{description:"Array of glob patterns; files matching them won't be allowed to change during immutable installs",type:Ie.STRING,default:[],isArray:!0},rcFilename:{description:"Name of the files where the configuration can be found",type:Ie.STRING,default:Iw()},enableGlobalCache:{description:"If true, the system-wide cache folder will be used regardless of `cache-folder`",type:Ie.BOOLEAN,default:!1},enableColors:{description:"If true, the CLI is allowed to use colors in its output",type:Ie.BOOLEAN,default:Py,defaultText:""},enableHyperlinks:{description:"If true, the CLI is allowed to use hyperlinks in its output",type:Ie.BOOLEAN,default:Mv,defaultText:""},enableInlineBuilds:{description:"If true, the CLI will print the build output on the command line",type:Ie.BOOLEAN,default:mw.isCI,defaultText:""},enableMessageNames:{description:"If true, the CLI will prefix most messages with codes suitable for search engines",type:Ie.BOOLEAN,default:!0},enableProgressBars:{description:"If true, the CLI is allowed to show a progress bar for long-running events",type:Ie.BOOLEAN,default:!mw.isCI,defaultText:""},enableTimers:{description:"If true, the CLI is allowed to print the time spent executing commands",type:Ie.BOOLEAN,default:!0},preferAggregateCacheInfo:{description:"If true, the CLI will only print a one-line report of any cache changes",type:Ie.BOOLEAN,default:mw.isCI},preferInteractive:{description:"If true, the CLI will automatically use the interactive mode when called from a TTY",type:Ie.BOOLEAN,default:!1},preferTruncatedLines:{description:"If true, the CLI will truncate lines that would go beyond the size of the terminal",type:Ie.BOOLEAN,default:!1},progressBarStyle:{description:"Which style of progress bar should be used (only when progress bars are enabled)",type:Ie.STRING,default:void 0,defaultText:""},defaultLanguageName:{description:"Default language mode that should be used when a package doesn't offer any insight",type:Ie.STRING,default:"node"},defaultProtocol:{description:"Default resolution protocol used when resolving pure semver and tag ranges",type:Ie.STRING,default:"npm:"},enableTransparentWorkspaces:{description:"If false, Yarn won't automatically resolve workspace dependencies unless they use the `workspace:` protocol",type:Ie.BOOLEAN,default:!0},supportedArchitectures:{description:"Architectures that Yarn will fetch and inject into the resolver",type:Ie.SHAPE,properties:{os:{description:"Array of supported process.platform strings, or null to target them all",type:Ie.STRING,isArray:!0,isNullable:!0,default:["current"]},cpu:{description:"Array of supported process.arch strings, or null to target them all",type:Ie.STRING,isArray:!0,isNullable:!0,default:["current"]},libc:{description:"Array of supported libc libraries, or null to target them all",type:Ie.STRING,isArray:!0,isNullable:!0,default:["current"]}}},enableMirror:{description:"If true, the downloaded packages will be retrieved and stored in both the local and global folders",type:Ie.BOOLEAN,default:!0},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:Ie.BOOLEAN,default:!0},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:Ie.STRING,default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:Ie.STRING,default:null},unsafeHttpWhitelist:{description:"List of the hostnames for which http queries are allowed (glob patterns are supported)",type:Ie.STRING,default:[],isArray:!0},httpTimeout:{description:"Timeout of each http request in milliseconds",type:Ie.NUMBER,default:6e4},httpRetry:{description:"Retry times on http failure",type:Ie.NUMBER,default:3},networkConcurrency:{description:"Maximal number of concurrent requests",type:Ie.NUMBER,default:50},networkSettings:{description:"Network settings per hostname (glob patterns are supported)",type:Ie.MAP,valueDefinition:{description:"",type:Ie.SHAPE,properties:{caFilePath:{description:"Path to file containing one or multiple Certificate Authority signing certificates",type:Ie.ABSOLUTE_PATH,default:null},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:Ie.BOOLEAN,default:null},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:Ie.STRING,default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:Ie.STRING,default:null},httpsKeyFilePath:{description:"Path to file containing private key in PEM format",type:Ie.ABSOLUTE_PATH,default:null},httpsCertFilePath:{description:"Path to file containing certificate chain in PEM format",type:Ie.ABSOLUTE_PATH,default:null}}}},caFilePath:{description:"A path to a file containing one or multiple Certificate Authority signing certificates",type:Ie.ABSOLUTE_PATH,default:null},httpsKeyFilePath:{description:"Path to file containing private key in PEM format",type:Ie.ABSOLUTE_PATH,default:null},httpsCertFilePath:{description:"Path to file containing certificate chain in PEM format",type:Ie.ABSOLUTE_PATH,default:null},enableStrictSsl:{description:"If false, SSL certificate errors will be ignored",type:Ie.BOOLEAN,default:!0},logFilters:{description:"Overrides for log levels",type:Ie.SHAPE,isArray:!0,concatenateValues:!0,properties:{code:{description:"Code of the messages covered by this override",type:Ie.STRING,default:void 0},text:{description:"Code of the texts covered by this override",type:Ie.STRING,default:void 0},pattern:{description:"Code of the patterns covered by this override",type:Ie.STRING,default:void 0},level:{description:"Log level override, set to null to remove override",type:Ie.STRING,values:Object.values(ho),isNullable:!0,default:void 0}}},enableTelemetry:{description:"If true, telemetry will be periodically sent, following the rules in https://yarnpkg.com/advanced/telemetry",type:Ie.BOOLEAN,default:!0},telemetryInterval:{description:"Minimal amount of time between two telemetry uploads, in days",type:Ie.NUMBER,default:7},telemetryUserId:{description:"If you desire to tell us which project you are, you can set this field. Completely optional and opt-in.",type:Ie.STRING,default:null},enableScripts:{description:"If true, packages are allowed to have install scripts by default",type:Ie.BOOLEAN,default:!0},enableStrictSettings:{description:"If true, unknown settings will cause Yarn to abort",type:Ie.BOOLEAN,default:!0},enableImmutableCache:{description:"If true, the cache is reputed immutable and actions that would modify it will throw",type:Ie.BOOLEAN,default:!1},checksumBehavior:{description:"Enumeration defining what to do when a checksum doesn't match expectations",type:Ie.STRING,default:"throw"},packageExtensions:{description:"Map of package corrections to apply on the dependency tree",type:Ie.MAP,valueDefinition:{description:"The extension that will be applied to any package whose version matches the specified range",type:Ie.SHAPE,properties:{dependencies:{description:"The set of dependencies that must be made available to the current package in order for it to work properly",type:Ie.MAP,valueDefinition:{description:"A range",type:Ie.STRING}},peerDependencies:{description:"Inherited dependencies - the consumer of the package will be tasked to provide them",type:Ie.MAP,valueDefinition:{description:"A semver range",type:Ie.STRING}},peerDependenciesMeta:{description:"Extra information related to the dependencies listed in the peerDependencies field",type:Ie.MAP,valueDefinition:{description:"The peerDependency meta",type:Ie.SHAPE,properties:{optional:{description:"If true, the selected peer dependency will be marked as optional by the package manager and the consumer omitting it won't be reported as an error",type:Ie.BOOLEAN,default:!1}}}}}}}};function dk(r,e,t,i,n){if(i.isArray||i.type===Ie.ANY&&Array.isArray(t))return Array.isArray(t)?t.map((s,o)=>pk(r,`${e}[${o}]`,s,i,n)):String(t).split(/,/).map(s=>pk(r,e,s,i,n));if(Array.isArray(t))throw new Error(`Non-array configuration settings "${e}" cannot be an array`);return pk(r,e,t,i,n)}function pk(r,e,t,i,n){var a;switch(i.type){case Ie.ANY:return t;case Ie.SHAPE:return uve(r,e,t,i,n);case Ie.MAP:return gve(r,e,t,i,n)}if(t===null&&!i.isNullable&&i.default!==null)throw new Error(`Non-nullable configuration settings "${e}" cannot be set to null`);if((a=i.values)==null?void 0:a.includes(t))return t;let o=(()=>{if(i.type===Ie.BOOLEAN&&typeof t!="string")return td(t);if(typeof t!="string")throw new Error(`Expected value (${t}) to be a string`);let l=Fv(t,{env:process.env});switch(i.type){case Ie.ABSOLUTE_PATH:return k.resolve(n,H.toPortablePath(l));case Ie.LOCATOR_LOOSE:return Yc(l,!1);case Ie.NUMBER:return parseInt(l);case Ie.LOCATOR:return Yc(l);case Ie.BOOLEAN:return td(l);default:return l}})();if(i.values&&!i.values.includes(o))throw new Error(`Invalid value, expected one of ${i.values.join(", ")}`);return o}function uve(r,e,t,i,n){if(typeof t!="object"||Array.isArray(t))throw new Pe(`Object configuration settings "${e}" must be an object`);let s=Ck(r,i,{ignoreArrays:!0});if(t===null)return s;for(let[o,a]of Object.entries(t)){let l=`${e}.${o}`;if(!i.properties[o])throw new Pe(`Unrecognized configuration settings found: ${e}.${o} - run "yarn config -v" to see the list of settings supported in Yarn`);s.set(o,dk(r,l,a,i.properties[o],n))}return s}function gve(r,e,t,i,n){let s=new Map;if(typeof t!="object"||Array.isArray(t))throw new Pe(`Map configuration settings "${e}" must be an object`);if(t===null)return s;for(let[o,a]of Object.entries(t)){let l=i.normalizeKeys?i.normalizeKeys(o):o,c=`${e}['${l}']`,u=i.valueDefinition;s.set(l,dk(r,c,a,u,n))}return s}function Ck(r,e,{ignoreArrays:t=!1}={}){switch(e.type){case Ie.SHAPE:{if(e.isArray&&!t)return[];let i=new Map;for(let[n,s]of Object.entries(e.properties))i.set(n,Ck(r,s));return i}break;case Ie.MAP:return e.isArray&&!t?[]:new Map;case Ie.ABSOLUTE_PATH:return e.default===null?null:r.projectCwd===null?k.isAbsolute(e.default)?k.normalize(e.default):e.isNullable?null:void 0:Array.isArray(e.default)?e.default.map(i=>k.resolve(r.projectCwd,i)):k.resolve(r.projectCwd,e.default);default:return e.default}}function yw(r,e,t){if(e.type===Ie.SECRET&&typeof r=="string"&&t.hideSecrets)return cve;if(e.type===Ie.ABSOLUTE_PATH&&typeof r=="string"&&t.getNativePaths)return H.fromPortablePath(r);if(e.isArray&&Array.isArray(r)){let i=[];for(let n of r)i.push(yw(n,e,t));return i}if(e.type===Ie.MAP&&r instanceof Map){let i=new Map;for(let[n,s]of r.entries())i.set(n,yw(s,e.valueDefinition,t));return i}if(e.type===Ie.SHAPE&&r instanceof Map){let i=new Map;for(let[n,s]of r.entries()){let o=e.properties[n];i.set(n,yw(s,o,t))}return i}return r}function fve(){let r={};for(let[e,t]of Object.entries(process.env))e=e.toLowerCase(),!!e.startsWith(Ew)&&(e=(0,T4.default)(e.slice(Ew.length)),r[e]=t);return r}function Iw(){let r=`${Ew}rc_filename`;for(let[e,t]of Object.entries(process.env))if(e.toLowerCase()===r&&typeof t=="string")return t;return gk}var ul;(function(i){i[i.LOCKFILE=0]="LOCKFILE",i[i.MANIFEST=1]="MANIFEST",i[i.NONE=2]="NONE"})(ul||(ul={}));var tA=class{constructor(e){this.projectCwd=null;this.plugins=new Map;this.settings=new Map;this.values=new Map;this.sources=new Map;this.invalid=new Map;this.packageExtensions=new Map;this.limits=new Map;this.startingCwd=e}static create(e,t,i){let n=new tA(e);typeof t!="undefined"&&!(t instanceof Map)&&(n.projectCwd=t),n.importSettings(hk);let s=typeof i!="undefined"?i:t instanceof Map?t:new Map;for(let[o,a]of s)n.activatePlugin(o,a);return n}static async find(e,t,{lookup:i=0,strict:n=!0,usePath:s=!1,useRc:o=!0}={}){let a=fve();delete a.rcFilename;let l=await tA.findRcFiles(e),c=await tA.findHomeRcFile();if(c){let b=l.find(v=>v.path===c.path);b?b.strict=!1:l.push(te(N({},c),{strict:!1}))}let u=({ignoreCwd:b,yarnPath:v,ignorePath:x,lockfileFilename:T})=>({ignoreCwd:b,yarnPath:v,ignorePath:x,lockfileFilename:T}),g=Y=>{var $=Y,{ignoreCwd:b,yarnPath:v,ignorePath:x,lockfileFilename:T}=$,q=Or($,["ignoreCwd","yarnPath","ignorePath","lockfileFilename"]);return q},f=new tA(e);f.importSettings(u(hk)),f.useWithSource("",u(a),e,{strict:!1});for(let{path:b,cwd:v,data:x}of l)f.useWithSource(b,u(x),v,{strict:!1});if(s){let b=f.get("yarnPath"),v=f.get("ignorePath");if(b!==null&&!v)return f}let h=f.get("lockfileFilename"),p;switch(i){case 0:p=await tA.findProjectCwd(e,h);break;case 1:p=await tA.findProjectCwd(e,null);break;case 2:K.existsSync(k.join(e,"package.json"))?p=k.resolve(e):p=null;break}f.startingCwd=e,f.projectCwd=p,f.importSettings(g(hk));let m=new Map([["@@core",WW]]),y=b=>"default"in b?b.default:b;if(t!==null){for(let T of t.plugins.keys())m.set(T,y(t.modules.get(T)));let b=new Map;for(let T of lk())b.set(T,()=>Og(T));for(let[T,q]of t.modules)b.set(T,()=>q);let v=new Set,x=async(T,q)=>{let{factory:Y,name:$}=Og(T);if(v.has($))return;let _=new Map(b),ne=A=>{if(_.has(A))return _.get(A)();throw new Pe(`This plugin cannot access the package referenced via ${A} which is neither a builtin, nor an exposed entry`)},ee=await Lg(async()=>y(await Y(ne)),A=>`${A} (when initializing ${$}, defined in ${q})`);b.set($,()=>ee),v.add($),m.set($,ee)};if(a.plugins)for(let T of a.plugins.split(";")){let q=k.resolve(e,H.toPortablePath(T));await x(q,"")}for(let{path:T,cwd:q,data:Y}of l)if(!!o&&!!Array.isArray(Y.plugins))for(let $ of Y.plugins){let _=typeof $!="string"?$.path:$,ne=k.resolve(q,H.toPortablePath(_));await x(ne,T)}}for(let[b,v]of m)f.activatePlugin(b,v);f.useWithSource("",g(a),e,{strict:n});for(let{path:b,cwd:v,data:x,strict:T}of l)f.useWithSource(b,g(x),v,{strict:T!=null?T:n});return f.get("enableGlobalCache")&&(f.values.set("cacheFolder",`${f.get("globalFolder")}/cache`),f.sources.set("cacheFolder","")),await f.refreshPackageExtensions(),f}static async findRcFiles(e){let t=Iw(),i=[],n=e,s=null;for(;n!==s;){s=n;let o=k.join(s,t);if(K.existsSync(o)){let a=await K.readFilePromise(o,"utf8"),l;try{l=Si(a)}catch(c){let u="";throw a.match(/^\s+(?!-)[^:]+\s+\S+/m)&&(u=" (in particular, make sure you list the colons after each key name)"),new Pe(`Parse error when loading ${o}; please check it's proper Yaml${u}`)}i.push({path:o,cwd:s,data:l})}n=k.dirname(s)}return i}static async findHomeRcFile(){let e=Iw(),t=Qd(),i=k.join(t,e);if(K.existsSync(i)){let n=await K.readFilePromise(i,"utf8"),s=Si(n);return{path:i,cwd:t,data:s}}return null}static async findProjectCwd(e,t){let i=null,n=e,s=null;for(;n!==s;){if(s=n,K.existsSync(k.join(s,"package.json"))&&(i=s),t!==null){if(K.existsSync(k.join(s,t))){i=s;break}}else if(i!==null)break;n=k.dirname(s)}return i}static async updateConfiguration(e,t){let i=Iw(),n=k.join(e,i),s=K.existsSync(n)?Si(await K.readFilePromise(n,"utf8")):{},o=!1,a;if(typeof t=="function"){try{a=t(s)}catch{a=t({})}if(a===s)return}else{a=s;for(let l of Object.keys(t)){let c=s[l],u=t[l],g;if(typeof u=="function")try{g=u(c)}catch{g=u(void 0)}else g=u;c!==g&&(a[l]=g,o=!0)}if(!o)return}await K.changeFilePromise(n,Ma(a),{automaticNewlines:!0})}static async updateHomeConfiguration(e){let t=Qd();return await tA.updateConfiguration(t,e)}activatePlugin(e,t){this.plugins.set(e,t),typeof t.configuration!="undefined"&&this.importSettings(t.configuration)}importSettings(e){for(let[t,i]of Object.entries(e))if(i!=null){if(this.settings.has(t))throw new Error(`Cannot redefine settings "${t}"`);this.settings.set(t,i),this.values.set(t,Ck(this,i))}}useWithSource(e,t,i,n){try{this.use(e,t,i,n)}catch(s){throw s.message+=` (in ${tt(this,e,qe.PATH)})`,s}}use(e,t,i,{strict:n=!0,overwrite:s=!1}={}){n=n&&this.get("enableStrictSettings");for(let o of["enableStrictSettings",...Object.keys(t)]){if(typeof t[o]=="undefined"||o==="plugins"||e===""&&lve.has(o))continue;if(o==="rcFilename")throw new Pe(`The rcFilename settings can only be set via ${`${Ew}RC_FILENAME`.toUpperCase()}, not via a rc file`);let l=this.settings.get(o);if(!l){if(n)throw new Pe(`Unrecognized or legacy configuration settings found: ${o} - run "yarn config -v" to see the list of settings supported in Yarn`);this.invalid.set(o,e);continue}if(this.sources.has(o)&&!(s||l.type===Ie.MAP||l.isArray&&l.concatenateValues))continue;let c;try{c=dk(this,o,t[o],l,i)}catch(u){throw u.message+=` in ${tt(this,e,qe.PATH)}`,u}if(o==="enableStrictSettings"&&e!==""){n=c;continue}if(l.type===Ie.MAP){let u=this.values.get(o);this.values.set(o,new Map(s?[...u,...c]:[...c,...u])),this.sources.set(o,`${this.sources.get(o)}, ${e}`)}else if(l.isArray&&l.concatenateValues){let u=this.values.get(o);this.values.set(o,s?[...u,...c]:[...c,...u]),this.sources.set(o,`${this.sources.get(o)}, ${e}`)}else this.values.set(o,c),this.sources.set(o,e)}}get(e){if(!this.values.has(e))throw new Error(`Invalid configuration key "${e}"`);return this.values.get(e)}getSpecial(e,{hideSecrets:t=!1,getNativePaths:i=!1}){let n=this.get(e),s=this.settings.get(e);if(typeof s=="undefined")throw new Pe(`Couldn't find a configuration settings named "${e}"`);return yw(n,s,{hideSecrets:t,getNativePaths:i})}getSubprocessStreams(e,{header:t,prefix:i,report:n}){let s,o,a=K.createWriteStream(e);if(this.get("enableInlineBuilds")){let l=n.createStreamReporter(`${i} ${tt(this,"STDOUT","green")}`),c=n.createStreamReporter(`${i} ${tt(this,"STDERR","red")}`);s=new uk.PassThrough,s.pipe(l),s.pipe(a),o=new uk.PassThrough,o.pipe(c),o.pipe(a)}else s=a,o=a,typeof t!="undefined"&&s.write(`${t} +`);return{stdout:s,stderr:o}}makeResolver(){let e=[];for(let t of this.plugins.values())for(let i of t.resolvers||[])e.push(new i);return new wd([new pw,new oi,new nk,...e])}makeFetcher(){let e=[];for(let t of this.plugins.values())for(let i of t.fetchers||[])e.push(new i);return new yd([new Bd,new bd,...e])}getLinkers(){let e=[];for(let t of this.plugins.values())for(let i of t.linkers||[])e.push(new i);return e}getSupportedArchitectures(){let e=Sd(),t=this.get("supportedArchitectures"),i=t.get("os");i!==null&&(i=i.map(o=>o==="current"?e.os:o));let n=t.get("cpu");n!==null&&(n=n.map(o=>o==="current"?e.cpu:o));let s=t.get("libc");return s!==null&&(s=zo(s,o=>{var a;return o==="current"?(a=e.libc)!=null?a:zo.skip:o})),{os:i,cpu:n,libc:s}}async refreshPackageExtensions(){this.packageExtensions=new Map;let e=this.packageExtensions,t=(i,n,{userProvided:s=!1}={})=>{if(!po(i.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let o=new At;o.load(n,{yamlCompatibilityMode:!0});let a=Fg(e,i.identHash),l=[];a.push([i.range,l]);let c={status:qi.Inactive,userProvided:s,parentDescriptor:i};for(let u of o.dependencies.values())l.push(te(N({},c),{type:wi.Dependency,descriptor:u}));for(let u of o.peerDependencies.values())l.push(te(N({},c),{type:wi.PeerDependency,descriptor:u}));for(let[u,g]of o.peerDependenciesMeta)for(let[f,h]of Object.entries(g))l.push(te(N({},c),{type:wi.PeerDependencyMeta,selector:u,key:f,value:h}))};await this.triggerHook(i=>i.registerPackageExtensions,this,t);for(let[i,n]of this.get("packageExtensions"))t(ll(i,!0),ky(n),{userProvided:!0})}normalizePackage(e){let t=cd(e);if(this.packageExtensions==null)throw new Error("refreshPackageExtensions has to be called before normalizing packages");let i=this.packageExtensions.get(e.identHash);if(typeof i!="undefined"){let s=e.version;if(s!==null){for(let[o,a]of i)if(!!qc(s,o))for(let l of a)switch(l.status===qi.Inactive&&(l.status=qi.Redundant),l.type){case wi.Dependency:typeof t.dependencies.get(l.descriptor.identHash)=="undefined"&&(l.status=qi.Active,t.dependencies.set(l.descriptor.identHash,l.descriptor));break;case wi.PeerDependency:typeof t.peerDependencies.get(l.descriptor.identHash)=="undefined"&&(l.status=qi.Active,t.peerDependencies.set(l.descriptor.identHash,l.descriptor));break;case wi.PeerDependencyMeta:{let c=t.peerDependenciesMeta.get(l.selector);(typeof c=="undefined"||!Object.prototype.hasOwnProperty.call(c,l.key)||c[l.key]!==l.value)&&(l.status=qi.Active,_a(t.peerDependenciesMeta,l.selector,()=>({}))[l.key]=l.value)}break;default:Pv(l);break}}}let n=s=>s.scope?`${s.scope}__${s.name}`:`${s.name}`;for(let s of t.peerDependenciesMeta.keys()){let o=An(s);t.peerDependencies.has(o.identHash)||t.peerDependencies.set(o.identHash,rr(o,"*"))}for(let s of t.peerDependencies.values()){if(s.scope==="types")continue;let o=n(s),a=$o("types",o),l=Ot(a);t.peerDependencies.has(a.identHash)||t.peerDependenciesMeta.has(l)||(t.peerDependencies.set(a.identHash,rr(a,"*")),t.peerDependenciesMeta.set(l,{optional:!0}))}return t.dependencies=new Map(kn(t.dependencies,([,s])=>Pn(s))),t.peerDependencies=new Map(kn(t.peerDependencies,([,s])=>Pn(s))),t}getLimit(e){return _a(this.limits,e,()=>(0,O4.default)(this.get(e)))}async triggerHook(e,...t){for(let i of this.plugins.values()){let n=i.hooks;if(!n)continue;let s=e(n);!s||await s(...t)}}async triggerMultipleHooks(e,t){for(let i of t)await this.triggerHook(e,...i)}async reduceHook(e,t,...i){let n=t;for(let s of this.plugins.values()){let o=s.hooks;if(!o)continue;let a=e(o);!a||(n=await a(n,...i))}return n}async firstHook(e,...t){for(let i of this.plugins.values()){let n=i.hooks;if(!n)continue;let s=e(n);if(!s)continue;let o=await s(...t);if(typeof o!="undefined")return o}return null}},ye=tA;ye.telemetry=null;var ss;(function(i){i[i.Never=0]="Never",i[i.ErrorCode=1]="ErrorCode",i[i.Always=2]="Always"})(ss||(ss={}));var ww=class extends ct{constructor({fileName:e,code:t,signal:i}){let n=ye.create(k.cwd()),s=tt(n,e,qe.PATH);super(X.EXCEPTION,`Child ${s} reported an error`,o=>{hve(t,i,{configuration:n,report:o})});this.code=Ek(t,i)}},Ik=class extends ww{constructor({fileName:e,code:t,signal:i,stdout:n,stderr:s}){super({fileName:e,code:t,signal:i});this.stdout=n,this.stderr=s}};function zc(r){return r!==null&&typeof r.fd=="number"}var _c=new Set;function yk(){}function wk(){for(let r of _c)r.kill()}async function ra(r,e,{cwd:t,env:i=process.env,strict:n=!1,stdin:s=null,stdout:o,stderr:a,end:l=2}){let c=["pipe","pipe","pipe"];s===null?c[0]="ignore":zc(s)&&(c[0]=s),zc(o)&&(c[1]=o),zc(a)&&(c[2]=a);let u=(0,mk.default)(r,e,{cwd:H.fromPortablePath(t),env:te(N({},i),{PWD:H.fromPortablePath(t)}),stdio:c});_c.add(u),_c.size===1&&(process.on("SIGINT",yk),process.on("SIGTERM",wk)),!zc(s)&&s!==null&&s.pipe(u.stdin),zc(o)||u.stdout.pipe(o,{end:!1}),zc(a)||u.stderr.pipe(a,{end:!1});let g=()=>{for(let f of new Set([o,a]))zc(f)||f.end()};return new Promise((f,h)=>{u.on("error",p=>{_c.delete(u),_c.size===0&&(process.off("SIGINT",yk),process.off("SIGTERM",wk)),(l===2||l===1)&&g(),h(p)}),u.on("close",(p,m)=>{_c.delete(u),_c.size===0&&(process.off("SIGINT",yk),process.off("SIGTERM",wk)),(l===2||l===1&&p>0)&&g(),p===0||!n?f({code:Ek(p,m)}):h(new ww({fileName:r,code:p,signal:m}))})})}async function pve(r,e,{cwd:t,env:i=process.env,encoding:n="utf8",strict:s=!1}){let o=["ignore","pipe","pipe"],a=[],l=[],c=H.fromPortablePath(t);typeof i.PWD!="undefined"&&(i=te(N({},i),{PWD:c}));let u=(0,mk.default)(r,e,{cwd:c,env:i,stdio:o});return u.stdout.on("data",g=>{a.push(g)}),u.stderr.on("data",g=>{l.push(g)}),await new Promise((g,f)=>{u.on("error",h=>{let p=ye.create(t),m=tt(p,r,qe.PATH);f(new ct(X.EXCEPTION,`Process ${m} failed to spawn`,y=>{y.reportError(X.EXCEPTION,` ${_o(p,{label:"Thrown Error",value:fo(qe.NO_HINT,h.message)})}`)}))}),u.on("close",(h,p)=>{let m=n==="buffer"?Buffer.concat(a):Buffer.concat(a).toString(n),y=n==="buffer"?Buffer.concat(l):Buffer.concat(l).toString(n);h===0||!s?g({code:Ek(h,p),stdout:m,stderr:y}):f(new Ik({fileName:r,code:h,signal:p,stdout:m,stderr:y}))})})}var dve=new Map([["SIGINT",2],["SIGQUIT",3],["SIGKILL",9],["SIGTERM",15]]);function Ek(r,e){let t=dve.get(e);return typeof t!="undefined"?128+t:r!=null?r:1}function hve(r,e,{configuration:t,report:i}){i.reportError(X.EXCEPTION,` ${_o(t,r!==null?{label:"Exit Code",value:fo(qe.NUMBER,r)}:{label:"Exit Signal",value:fo(qe.CODE,e)})}`)}var ir={};ft(ir,{Method:()=>Cl,RequestError:()=>w5.RequestError,del:()=>xPe,get:()=>SPe,getNetworkSettings:()=>S5,post:()=>HP,put:()=>vPe,request:()=>Od});var E5=ge(Uw()),I5=ge(require("https")),y5=ge(require("http")),MP=ge(is()),KP=ge(m5()),Hw=ge(require("url"));var w5=ge(Uw()),B5=new Map,b5=new Map,wPe=new y5.Agent({keepAlive:!0}),BPe=new I5.Agent({keepAlive:!0});function Q5(r){let e=new Hw.URL(r),t={host:e.hostname,headers:{}};return e.port&&(t.port=Number(e.port)),{proxy:t}}async function UP(r){return _a(b5,r,()=>K.readFilePromise(r).then(e=>(b5.set(r,e),e)))}function bPe({statusCode:r,statusMessage:e},t){let i=tt(t,r,qe.NUMBER),n=`https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/${r}`;return Mg(t,`${i}${e?` (${e})`:""}`,n)}async function jw(r,{configuration:e,customErrorMessage:t}){var i,n;try{return await r}catch(s){if(s.name!=="HTTPError")throw s;let o=(n=t==null?void 0:t(s))!=null?n:(i=s.response.body)==null?void 0:i.error;o==null&&(s.message.startsWith("Response code")?o="The remote server failed to provide the requested resource":o=s.message),s instanceof E5.TimeoutError&&s.event==="socket"&&(o+=`(can be increased via ${tt(e,"httpTimeout",qe.SETTING)})`);let a=new ct(X.NETWORK_ERROR,o,l=>{s.response&&l.reportError(X.NETWORK_ERROR,` ${_o(e,{label:"Response Code",value:fo(qe.NO_HINT,bPe(s.response,e))})}`),s.request&&(l.reportError(X.NETWORK_ERROR,` ${_o(e,{label:"Request Method",value:fo(qe.NO_HINT,s.request.options.method)})}`),l.reportError(X.NETWORK_ERROR,` ${_o(e,{label:"Request URL",value:fo(qe.URL,s.request.requestUrl)})}`)),s.request.redirects.length>0&&l.reportError(X.NETWORK_ERROR,` ${_o(e,{label:"Request Redirects",value:fo(qe.NO_HINT,Uv(e,s.request.redirects,qe.URL))})}`),s.request.retryCount===s.request.options.retry.limit&&l.reportError(X.NETWORK_ERROR,` ${_o(e,{label:"Request Retry Count",value:fo(qe.NO_HINT,`${tt(e,s.request.retryCount,qe.NUMBER)} (can be increased via ${tt(e,"httpRetry",qe.SETTING)})`)})}`)});throw a.originalError=s,a}}function S5(r,e){let t=[...e.configuration.get("networkSettings")].sort(([o],[a])=>a.length-o.length),i={enableNetwork:void 0,caFilePath:void 0,httpProxy:void 0,httpsProxy:void 0,httpsKeyFilePath:void 0,httpsCertFilePath:void 0},n=Object.keys(i),s=typeof r=="string"?new Hw.URL(r):r;for(let[o,a]of t)if(MP.default.isMatch(s.hostname,o))for(let l of n){let c=a.get(l);c!==null&&typeof i[l]=="undefined"&&(i[l]=c)}for(let o of n)typeof i[o]=="undefined"&&(i[o]=e.configuration.get(o));return i}var Cl;(function(n){n.GET="GET",n.PUT="PUT",n.POST="POST",n.DELETE="DELETE"})(Cl||(Cl={}));async function Od(r,e,{configuration:t,headers:i,jsonRequest:n,jsonResponse:s,method:o=Cl.GET}){let a=async()=>await QPe(r,e,{configuration:t,headers:i,jsonRequest:n,jsonResponse:s,method:o});return await(await t.reduceHook(c=>c.wrapNetworkRequest,a,{target:r,body:e,configuration:t,headers:i,jsonRequest:n,jsonResponse:s,method:o}))()}async function SPe(r,n){var s=n,{configuration:e,jsonResponse:t}=s,i=Or(s,["configuration","jsonResponse"]);let o=_a(B5,r,()=>jw(Od(r,null,N({configuration:e},i)),{configuration:e}).then(a=>(B5.set(r,a.body),a.body)));return Buffer.isBuffer(o)===!1&&(o=await o),t?JSON.parse(o.toString()):o}async function vPe(r,e,n){var s=n,{customErrorMessage:t}=s,i=Or(s,["customErrorMessage"]);return(await jw(Od(r,e,te(N({},i),{method:Cl.PUT})),i)).body}async function HP(r,e,n){var s=n,{customErrorMessage:t}=s,i=Or(s,["customErrorMessage"]);return(await jw(Od(r,e,te(N({},i),{method:Cl.POST})),i)).body}async function xPe(r,i){var n=i,{customErrorMessage:e}=n,t=Or(n,["customErrorMessage"]);return(await jw(Od(r,null,te(N({},t),{method:Cl.DELETE})),t)).body}async function QPe(r,e,{configuration:t,headers:i,jsonRequest:n,jsonResponse:s,method:o=Cl.GET}){let a=typeof r=="string"?new Hw.URL(r):r,l=S5(a,{configuration:t});if(l.enableNetwork===!1)throw new Error(`Request to '${a.href}' has been blocked because of your configuration settings`);if(a.protocol==="http:"&&!MP.default.isMatch(a.hostname,t.get("unsafeHttpWhitelist")))throw new Error(`Unsafe http requests must be explicitly whitelisted in your configuration (${a.hostname})`);let u={agent:{http:l.httpProxy?KP.default.httpOverHttp(Q5(l.httpProxy)):wPe,https:l.httpsProxy?KP.default.httpsOverHttp(Q5(l.httpsProxy)):BPe},headers:i,method:o};u.responseType=s?"json":"buffer",e!==null&&(Buffer.isBuffer(e)||!n&&typeof e=="string"?u.body=e:u.json=e);let g=t.get("httpTimeout"),f=t.get("httpRetry"),h=t.get("enableStrictSsl"),p=l.caFilePath,m=l.httpsCertFilePath,y=l.httpsKeyFilePath,{default:b}=await Promise.resolve().then(()=>ge(Uw())),v=p?await UP(p):void 0,x=m?await UP(m):void 0,T=y?await UP(y):void 0,q=b.extend(N({timeout:{socket:g},retry:f,https:{rejectUnauthorized:h,certificateAuthority:v,certificate:x,key:T}},u));return t.getLimit("networkConcurrency")(()=>q(a))}var Zt={};ft(Zt,{PackageManager:()=>hn,detectPackageManager:()=>K9,executePackageAccessibleBinary:()=>Y9,executePackageScript:()=>nB,executePackageShellcode:()=>rD,executeWorkspaceAccessibleBinary:()=>WDe,executeWorkspaceLifecycleScript:()=>G9,executeWorkspaceScript:()=>j9,getPackageAccessibleBinaries:()=>sB,getWorkspaceAccessibleBinaries:()=>H9,hasPackageScript:()=>YDe,hasWorkspaceScript:()=>tD,makeScriptEnv:()=>Yd,maybeExecuteWorkspaceLifecycleScript:()=>JDe,prepareExternalProject:()=>GDe});var Md={};ft(Md,{getLibzipPromise:()=>fn,getLibzipSync:()=>D5});var P5=ge(x5());var ml=["number","number"],YP;(function(L){L[L.ZIP_ER_OK=0]="ZIP_ER_OK",L[L.ZIP_ER_MULTIDISK=1]="ZIP_ER_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TELL=30]="ZIP_ER_TELL",L[L.ZIP_ER_COMPRESSED_DATA=31]="ZIP_ER_COMPRESSED_DATA"})(YP||(YP={}));var k5=r=>({get HEAP8(){return r.HEAP8},get HEAPU8(){return r.HEAPU8},errors:YP,SEEK_SET:0,SEEK_CUR:1,SEEK_END:2,ZIP_CHECKCONS:4,ZIP_CREATE:1,ZIP_EXCL:2,ZIP_TRUNCATE:8,ZIP_RDONLY:16,ZIP_FL_OVERWRITE:8192,ZIP_FL_COMPRESSED:4,ZIP_OPSYS_DOS:0,ZIP_OPSYS_AMIGA:1,ZIP_OPSYS_OPENVMS:2,ZIP_OPSYS_UNIX:3,ZIP_OPSYS_VM_CMS:4,ZIP_OPSYS_ATARI_ST:5,ZIP_OPSYS_OS_2:6,ZIP_OPSYS_MACINTOSH:7,ZIP_OPSYS_Z_SYSTEM:8,ZIP_OPSYS_CPM:9,ZIP_OPSYS_WINDOWS_NTFS:10,ZIP_OPSYS_MVS:11,ZIP_OPSYS_VSE:12,ZIP_OPSYS_ACORN_RISC:13,ZIP_OPSYS_VFAT:14,ZIP_OPSYS_ALTERNATE_MVS:15,ZIP_OPSYS_BEOS:16,ZIP_OPSYS_TANDEM:17,ZIP_OPSYS_OS_400:18,ZIP_OPSYS_OS_X:19,ZIP_CM_DEFAULT:-1,ZIP_CM_STORE:0,ZIP_CM_DEFLATE:8,uint08S:r._malloc(1),uint16S:r._malloc(2),uint32S:r._malloc(4),uint64S:r._malloc(8),malloc:r._malloc,free:r._free,getValue:r.getValue,open:r.cwrap("zip_open","number",["string","number","number"]),openFromSource:r.cwrap("zip_open_from_source","number",["number","number","number"]),close:r.cwrap("zip_close","number",["number"]),discard:r.cwrap("zip_discard",null,["number"]),getError:r.cwrap("zip_get_error","number",["number"]),getName:r.cwrap("zip_get_name","string",["number","number","number"]),getNumEntries:r.cwrap("zip_get_num_entries","number",["number","number"]),delete:r.cwrap("zip_delete","number",["number","number"]),stat:r.cwrap("zip_stat","number",["number","string","number","number"]),statIndex:r.cwrap("zip_stat_index","number",["number",...ml,"number","number"]),fopen:r.cwrap("zip_fopen","number",["number","string","number"]),fopenIndex:r.cwrap("zip_fopen_index","number",["number",...ml,"number"]),fread:r.cwrap("zip_fread","number",["number","number","number","number"]),fclose:r.cwrap("zip_fclose","number",["number"]),dir:{add:r.cwrap("zip_dir_add","number",["number","string"])},file:{add:r.cwrap("zip_file_add","number",["number","string","number","number"]),getError:r.cwrap("zip_file_get_error","number",["number"]),getExternalAttributes:r.cwrap("zip_file_get_external_attributes","number",["number",...ml,"number","number","number"]),setExternalAttributes:r.cwrap("zip_file_set_external_attributes","number",["number",...ml,"number","number","number"]),setMtime:r.cwrap("zip_file_set_mtime","number",["number",...ml,"number","number"]),setCompression:r.cwrap("zip_set_file_compression","number",["number",...ml,"number","number"])},ext:{countSymlinks:r.cwrap("zip_ext_count_symlinks","number",["number"])},error:{initWithCode:r.cwrap("zip_error_init_with_code",null,["number","number"]),strerror:r.cwrap("zip_error_strerror","string",["number"])},name:{locate:r.cwrap("zip_name_locate","number",["number","string","number"])},source:{fromUnattachedBuffer:r.cwrap("zip_source_buffer_create","number",["number","number","number","number"]),fromBuffer:r.cwrap("zip_source_buffer","number",["number","number",...ml,"number"]),free:r.cwrap("zip_source_free",null,["number"]),keep:r.cwrap("zip_source_keep",null,["number"]),open:r.cwrap("zip_source_open","number",["number"]),close:r.cwrap("zip_source_close","number",["number"]),seek:r.cwrap("zip_source_seek","number",["number",...ml,"number"]),tell:r.cwrap("zip_source_tell","number",["number"]),read:r.cwrap("zip_source_read","number",["number","number","number"]),error:r.cwrap("zip_source_error","number",["number"]),setMtime:r.cwrap("zip_source_set_mtime","number",["number","number"])},struct:{stat:r.cwrap("zipstruct_stat","number",[]),statS:r.cwrap("zipstruct_statS","number",[]),statName:r.cwrap("zipstruct_stat_name","string",["number"]),statIndex:r.cwrap("zipstruct_stat_index","number",["number"]),statSize:r.cwrap("zipstruct_stat_size","number",["number"]),statCompSize:r.cwrap("zipstruct_stat_comp_size","number",["number"]),statCompMethod:r.cwrap("zipstruct_stat_comp_method","number",["number"]),statMtime:r.cwrap("zipstruct_stat_mtime","number",["number"]),statCrc:r.cwrap("zipstruct_stat_crc","number",["number"]),error:r.cwrap("zipstruct_error","number",[]),errorS:r.cwrap("zipstruct_errorS","number",[]),errorCodeZip:r.cwrap("zipstruct_error_code_zip","number",["number"])}});var qP=null;function D5(){return qP===null&&(qP=k5((0,P5.default)())),qP}async function fn(){return D5()}var Ud={};ft(Ud,{ShellError:()=>Ms,execute:()=>Xw,globUtils:()=>Yw});var G5=ge(uv()),Y5=ge(require("os")),os=ge(require("stream")),q5=ge(require("util"));var Ms=class extends Error{constructor(e){super(e);this.name="ShellError"}};var Yw={};ft(Yw,{fastGlobOptions:()=>N5,isBraceExpansion:()=>L5,isGlobPattern:()=>kPe,match:()=>PPe,micromatchOptions:()=>Jw});var R5=ge(Zy()),F5=ge(require("fs")),qw=ge(is()),Jw={strictBrackets:!0},N5={onlyDirectories:!1,onlyFiles:!1};function kPe(r){if(!qw.default.scan(r,Jw).isGlob)return!1;try{qw.default.parse(r,Jw)}catch{return!1}return!0}function PPe(r,{cwd:e,baseFs:t}){return(0,R5.default)(r,te(N({},N5),{cwd:H.fromPortablePath(e),fs:WE(F5.default,new Vh(t))}))}function L5(r){return qw.default.scan(r,Jw).isBrace}var T5=ge(SQ()),na=ge(require("stream")),O5=ge(require("string_decoder")),Fn;(function(i){i[i.STDIN=0]="STDIN",i[i.STDOUT=1]="STDOUT",i[i.STDERR=2]="STDERR"})(Fn||(Fn={}));var Xc=new Set;function JP(){}function WP(){for(let r of Xc)r.kill()}function M5(r,e,t,i){return n=>{let s=n[0]instanceof na.Transform?"pipe":n[0],o=n[1]instanceof na.Transform?"pipe":n[1],a=n[2]instanceof na.Transform?"pipe":n[2],l=(0,T5.default)(r,e,te(N({},i),{stdio:[s,o,a]}));return Xc.add(l),Xc.size===1&&(process.on("SIGINT",JP),process.on("SIGTERM",WP)),n[0]instanceof na.Transform&&n[0].pipe(l.stdin),n[1]instanceof na.Transform&&l.stdout.pipe(n[1],{end:!1}),n[2]instanceof na.Transform&&l.stderr.pipe(n[2],{end:!1}),{stdin:l.stdin,promise:new Promise(c=>{l.on("error",u=>{switch(Xc.delete(l),Xc.size===0&&(process.off("SIGINT",JP),process.off("SIGTERM",WP)),u.code){case"ENOENT":n[2].write(`command not found: ${r} +`),c(127);break;case"EACCES":n[2].write(`permission denied: ${r} +`),c(128);break;default:n[2].write(`uncaught error: ${u.message} +`),c(1);break}}),l.on("close",u=>{Xc.delete(l),Xc.size===0&&(process.off("SIGINT",JP),process.off("SIGTERM",WP)),c(u!==null?u:129)})})}}}function K5(r){return e=>{let t=e[0]==="pipe"?new na.PassThrough:e[0];return{stdin:t,promise:Promise.resolve().then(()=>r({stdin:t,stdout:e[1],stderr:e[2]}))}}}var mo=class{constructor(e){this.stream=e}close(){}get(){return this.stream}},U5=class{constructor(){this.stream=null}close(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");this.stream.end()}attach(e){this.stream=e}get(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");return this.stream}},Kd=class{constructor(e,t){this.stdin=null;this.stdout=null;this.stderr=null;this.pipe=null;this.ancestor=e,this.implementation=t}static start(e,{stdin:t,stdout:i,stderr:n}){let s=new Kd(null,e);return s.stdin=t,s.stdout=i,s.stderr=n,s}pipeTo(e,t=1){let i=new Kd(this,e),n=new U5;return i.pipe=n,i.stdout=this.stdout,i.stderr=this.stderr,(t&1)==1?this.stdout=n:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(t&2)==2?this.stderr=n:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),i}async exec(){let e=["ignore","ignore","ignore"];if(this.pipe)e[0]="pipe";else{if(this.stdin===null)throw new Error("Assertion failed: No input stream registered");e[0]=this.stdin.get()}let t;if(this.stdout===null)throw new Error("Assertion failed: No output stream registered");t=this.stdout,e[1]=t.get();let i;if(this.stderr===null)throw new Error("Assertion failed: No error stream registered");i=this.stderr,e[2]=i.get();let n=this.implementation(e);return this.pipe&&this.pipe.attach(n.stdin),await n.promise.then(s=>(t.close(),i.close(),s))}async run(){let e=[];for(let i=this;i;i=i.ancestor)e.push(i.exec());return(await Promise.all(e))[0]}};function Ww(r,e){return Kd.start(r,e)}function H5(r,e=null){let t=new na.PassThrough,i=new O5.StringDecoder,n="";return t.on("data",s=>{let o=i.write(s),a;do if(a=o.indexOf(` +`),a!==-1){let l=n+o.substring(0,a);o=o.substring(a+1),n="",r(e!==null?`${e} ${l}`:l)}while(a!==-1);n+=o}),t.on("end",()=>{let s=i.end();s!==""&&r(e!==null?`${e} ${s}`:s)}),t}function j5(r,{prefix:e}){return{stdout:H5(t=>r.stdout.write(`${t} +`),r.stdout.isTTY?e:null),stderr:H5(t=>r.stderr.write(`${t} +`),r.stderr.isTTY?e:null)}}var DPe=(0,q5.promisify)(setTimeout);var zi;(function(t){t[t.Readable=1]="Readable",t[t.Writable=2]="Writable"})(zi||(zi={}));function J5(r,e,t){let i=new os.PassThrough({autoDestroy:!0});switch(r){case Fn.STDIN:(e&1)==1&&t.stdin.pipe(i,{end:!1}),(e&2)==2&&t.stdin instanceof os.Writable&&i.pipe(t.stdin,{end:!1});break;case Fn.STDOUT:(e&1)==1&&t.stdout.pipe(i,{end:!1}),(e&2)==2&&i.pipe(t.stdout,{end:!1});break;case Fn.STDERR:(e&1)==1&&t.stderr.pipe(i,{end:!1}),(e&2)==2&&i.pipe(t.stderr,{end:!1});break;default:throw new Ms(`Bad file descriptor: "${r}"`)}return i}function zw(r,e={}){let t=N(N({},r),e);return t.environment=N(N({},r.environment),e.environment),t.variables=N(N({},r.variables),e.variables),t}var RPe=new Map([["cd",async([r=(0,Y5.homedir)(),...e],t,i)=>{let n=k.resolve(i.cwd,H.toPortablePath(r));if(!(await t.baseFs.statPromise(n).catch(o=>{throw o.code==="ENOENT"?new Ms(`cd: no such file or directory: ${r}`):o})).isDirectory())throw new Ms(`cd: not a directory: ${r}`);return i.cwd=n,0}],["pwd",async(r,e,t)=>(t.stdout.write(`${H.fromPortablePath(t.cwd)} +`),0)],[":",async(r,e,t)=>0],["true",async(r,e,t)=>0],["false",async(r,e,t)=>1],["exit",async([r,...e],t,i)=>i.exitCode=parseInt(r!=null?r:i.variables["?"],10)],["echo",async(r,e,t)=>(t.stdout.write(`${r.join(" ")} +`),0)],["sleep",async([r],e,t)=>{if(typeof r=="undefined")throw new Ms("sleep: missing operand");let i=Number(r);if(Number.isNaN(i))throw new Ms(`sleep: invalid time interval '${r}'`);return await DPe(1e3*i,0)}],["__ysh_run_procedure",async(r,e,t)=>{let i=t.procedures[r[0]];return await Ww(i,{stdin:new mo(t.stdin),stdout:new mo(t.stdout),stderr:new mo(t.stderr)}).run()}],["__ysh_set_redirects",async(r,e,t)=>{let i=t.stdin,n=t.stdout,s=t.stderr,o=[],a=[],l=[],c=0;for(;r[c]!=="--";){let g=r[c++],{type:f,fd:h}=JSON.parse(g),p=v=>{switch(h){case null:case 0:o.push(v);break;default:throw new Error(`Unsupported file descriptor: "${h}"`)}},m=v=>{switch(h){case null:case 1:a.push(v);break;case 2:l.push(v);break;default:throw new Error(`Unsupported file descriptor: "${h}"`)}},y=Number(r[c++]),b=c+y;for(let v=c;ve.baseFs.createReadStream(k.resolve(t.cwd,H.toPortablePath(r[v]))));break;case"<<<":p(()=>{let x=new os.PassThrough;return process.nextTick(()=>{x.write(`${r[v]} +`),x.end()}),x});break;case"<&":p(()=>J5(Number(r[v]),1,t));break;case">":case">>":{let x=k.resolve(t.cwd,H.toPortablePath(r[v]));m(x==="/dev/null"?new os.Writable({autoDestroy:!0,emitClose:!0,write(T,q,Y){setImmediate(Y)}}):e.baseFs.createWriteStream(x,f===">>"?{flags:"a"}:void 0))}break;case">&":m(J5(Number(r[v]),2,t));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${f}"`)}}if(o.length>0){let g=new os.PassThrough;i=g;let f=h=>{if(h===o.length)g.end();else{let p=o[h]();p.pipe(g,{end:!1}),p.on("end",()=>{f(h+1)})}};f(0)}if(a.length>0){let g=new os.PassThrough;n=g;for(let f of a)g.pipe(f)}if(l.length>0){let g=new os.PassThrough;s=g;for(let f of l)g.pipe(f)}let u=await Ww(Hd(r.slice(c+1),e,t),{stdin:new mo(i),stdout:new mo(n),stderr:new mo(s)}).run();return await Promise.all(a.map(g=>new Promise((f,h)=>{g.on("error",p=>{h(p)}),g.on("close",()=>{f()}),g.end()}))),await Promise.all(l.map(g=>new Promise((f,h)=>{g.on("error",p=>{h(p)}),g.on("close",()=>{f()}),g.end()}))),u}]]);async function FPe(r,e,t){let i=[],n=new os.PassThrough;return n.on("data",s=>i.push(s)),await _w(r,e,zw(t,{stdout:n})),Buffer.concat(i).toString().replace(/[\r\n]+$/,"")}async function W5(r,e,t){let i=r.map(async s=>{let o=await aA(s.args,e,t);return{name:s.name,value:o.join(" ")}});return(await Promise.all(i)).reduce((s,o)=>(s[o.name]=o.value,s),{})}function Vw(r){return r.match(/[^ \r\n\t]+/g)||[]}async function z5(r,e,t,i,n=i){switch(r.name){case"$":i(String(process.pid));break;case"#":i(String(e.args.length));break;case"@":if(r.quoted)for(let s of e.args)n(s);else for(let s of e.args){let o=Vw(s);for(let a=0;a=0&&sr+e,subtraction:(r,e)=>r-e,multiplication:(r,e)=>r*e,division:(r,e)=>Math.trunc(r/e)};async function jd(r,e,t){if(r.type==="number"){if(Number.isInteger(r.value))return r.value;throw new Error(`Invalid number: "${r.value}", only integers are allowed`)}else if(r.type==="variable"){let i=[];await z5(te(N({},r),{quoted:!0}),e,t,s=>i.push(s));let n=Number(i.join(" "));return Number.isNaN(n)?jd({type:"variable",name:i.join(" ")},e,t):jd({type:"number",value:n},e,t)}else return NPe[r.type](await jd(r.left,e,t),await jd(r.right,e,t))}async function aA(r,e,t){let i=new Map,n=[],s=[],o=u=>{s.push(u)},a=()=>{s.length>0&&n.push(s.join("")),s=[]},l=u=>{o(u),a()},c=(u,g,f)=>{let h=JSON.stringify({type:u,fd:g}),p=i.get(h);typeof p=="undefined"&&i.set(h,p=[]),p.push(f)};for(let u of r){let g=!1;switch(u.type){case"redirection":{let f=await aA(u.args,e,t);for(let h of f)c(u.subtype,u.fd,h)}break;case"argument":for(let f of u.segments)switch(f.type){case"text":o(f.text);break;case"glob":o(f.pattern),g=!0;break;case"shell":{let h=await FPe(f.shell,e,t);if(f.quoted)o(h);else{let p=Vw(h);for(let m=0;m0){let u=[];for(let[g,f]of i.entries())u.splice(u.length,0,g,String(f.length),...f);n.splice(0,0,"__ysh_set_redirects",...u,"--")}return n}function Hd(r,e,t){e.builtins.has(r[0])||(r=["command",...r]);let i=H.fromPortablePath(t.cwd),n=t.environment;typeof n.PWD!="undefined"&&(n=te(N({},n),{PWD:i}));let[s,...o]=r;if(s==="command")return M5(o[0],o.slice(1),e,{cwd:i,env:n});let a=e.builtins.get(s);if(typeof a=="undefined")throw new Error(`Assertion failed: A builtin should exist for "${s}"`);return K5(async({stdin:l,stdout:c,stderr:u})=>{let{stdin:g,stdout:f,stderr:h}=t;t.stdin=l,t.stdout=c,t.stderr=u;try{return await a(o,e,t)}finally{t.stdin=g,t.stdout=f,t.stderr=h}})}function LPe(r,e,t){return i=>{let n=new os.PassThrough,s=_w(r,e,zw(t,{stdin:n}));return{stdin:n,promise:s}}}function TPe(r,e,t){return i=>{let n=new os.PassThrough,s=_w(r,e,t);return{stdin:n,promise:s}}}function _5(r,e,t,i){if(e.length===0)return r;{let n;do n=String(Math.random());while(Object.prototype.hasOwnProperty.call(i.procedures,n));return i.procedures=N({},i.procedures),i.procedures[n]=r,Hd([...e,"__ysh_run_procedure",n],t,i)}}async function V5(r,e,t){let i=r,n=null,s=null;for(;i;){let o=i.then?N({},t):t,a;switch(i.type){case"command":{let l=await aA(i.args,e,t),c=await W5(i.envs,e,t);a=i.envs.length?Hd(l,e,zw(o,{environment:c})):Hd(l,e,o)}break;case"subshell":{let l=await aA(i.args,e,t),c=LPe(i.subshell,e,o);a=_5(c,l,e,o)}break;case"group":{let l=await aA(i.args,e,t),c=TPe(i.group,e,o);a=_5(c,l,e,o)}break;case"envs":{let l=await W5(i.envs,e,t);o.environment=N(N({},o.environment),l),a=Hd(["true"],e,o)}break}if(typeof a=="undefined")throw new Error("Assertion failed: An action should have been generated");if(n===null)s=Ww(a,{stdin:new mo(o.stdin),stdout:new mo(o.stdout),stderr:new mo(o.stderr)});else{if(s===null)throw new Error("Assertion failed: The execution pipeline should have been setup");switch(n){case"|":s=s.pipeTo(a,Fn.STDOUT);break;case"|&":s=s.pipeTo(a,Fn.STDOUT|Fn.STDERR);break}}i.then?(n=i.then.type,i=i.then.chain):i=null}if(s===null)throw new Error("Assertion failed: The execution pipeline should have been setup");return await s.run()}async function OPe(r,e,t,{background:i=!1}={}){function n(s){let o=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],a=o[s%o.length];return G5.default.hex(a)}if(i){let s=t.nextBackgroundJobIndex++,o=n(s),a=`[${s}]`,l=o(a),{stdout:c,stderr:u}=j5(t,{prefix:l});return t.backgroundJobs.push(V5(r,e,zw(t,{stdout:c,stderr:u})).catch(g=>u.write(`${g.message} +`)).finally(()=>{t.stdout.isTTY&&t.stdout.write(`Job ${l}, '${o(eg(r))}' has ended +`)})),0}return await V5(r,e,t)}async function MPe(r,e,t,{background:i=!1}={}){let n,s=a=>{n=a,t.variables["?"]=String(a)},o=async a=>{try{return await OPe(a.chain,e,t,{background:i&&typeof a.then=="undefined"})}catch(l){if(!(l instanceof Ms))throw l;return t.stderr.write(`${l.message} +`),1}};for(s(await o(r));r.then;){if(t.exitCode!==null)return t.exitCode;switch(r.then.type){case"&&":n===0&&s(await o(r.then.line));break;case"||":n!==0&&s(await o(r.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: "${r.then.type}"`)}r=r.then.line}return n}async function _w(r,e,t){let i=t.backgroundJobs;t.backgroundJobs=[];let n=0;for(let{command:s,type:o}of r){if(n=await MPe(s,e,t,{background:o==="&"}),t.exitCode!==null)return t.exitCode;t.variables["?"]=String(n)}return await Promise.all(t.backgroundJobs),t.backgroundJobs=i,n}function X5(r){switch(r.type){case"variable":return r.name==="@"||r.name==="#"||r.name==="*"||Number.isFinite(parseInt(r.name,10))||"defaultValue"in r&&!!r.defaultValue&&r.defaultValue.some(e=>Gd(e))||"alternativeValue"in r&&!!r.alternativeValue&&r.alternativeValue.some(e=>Gd(e));case"arithmetic":return zP(r.arithmetic);case"shell":return _P(r.shell);default:return!1}}function Gd(r){switch(r.type){case"redirection":return r.args.some(e=>Gd(e));case"argument":return r.segments.some(e=>X5(e));default:throw new Error(`Assertion failed: Unsupported argument type: "${r.type}"`)}}function zP(r){switch(r.type){case"variable":return X5(r);case"number":return!1;default:return zP(r.left)||zP(r.right)}}function _P(r){return r.some(({command:e})=>{for(;e;){let t=e.chain;for(;t;){let i;switch(t.type){case"subshell":i=_P(t.subshell);break;case"command":i=t.envs.some(n=>n.args.some(s=>Gd(s)))||t.args.some(n=>Gd(n));break}if(i)return!0;if(!t.then)break;t=t.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function Xw(r,e=[],{baseFs:t=new ar,builtins:i={},cwd:n=H.toPortablePath(process.cwd()),env:s=process.env,stdin:o=process.stdin,stdout:a=process.stdout,stderr:l=process.stderr,variables:c={},glob:u=Yw}={}){let g={};for(let[p,m]of Object.entries(s))typeof m!="undefined"&&(g[p]=m);let f=new Map(RPe);for(let[p,m]of Object.entries(i))f.set(p,m);o===null&&(o=new os.PassThrough,o.end());let h=_E(r,u);if(!_P(h)&&h.length>0&&e.length>0){let{command:p}=h[h.length-1];for(;p.then;)p=p.then.line;let m=p.chain;for(;m.then;)m=m.then.chain;m.type==="command"&&(m.args=m.args.concat(e.map(y=>({type:"argument",segments:[{type:"text",text:y}]}))))}return await _w(h,{args:e,baseFs:t,builtins:f,initialStdin:o,initialStdout:a,initialStderr:l,glob:u},{cwd:n,environment:g,exitCode:null,procedures:{},stdin:o,stdout:a,stderr:l,variables:Object.assign({},c,{["?"]:0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var O9=ge(Zw()),M9=ge(gg()),El=ge(require("stream"));var R9=ge(D9()),tB=ge(Ic());var F9=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],N9=80,TDe=new Set([X.FETCH_NOT_CACHED,X.UNUSED_CACHE_ENTRY]),ODe=5,rB=tB.default.GITHUB_ACTIONS?{start:r=>`::group::${r} +`,end:r=>`::endgroup:: +`}:tB.default.TRAVIS?{start:r=>`travis_fold:start:${r} +`,end:r=>`travis_fold:end:${r} +`}:tB.default.GITLAB?{start:r=>`section_start:${Math.floor(Date.now()/1e3)}:${r.toLowerCase().replace(/\W+/g,"_")}[collapsed=true]\r${r} +`,end:r=>`section_end:${Math.floor(Date.now()/1e3)}:${r.toLowerCase().replace(/\W+/g,"_")}\r`}:null,L9=new Date,MDe=["iTerm.app","Apple_Terminal"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,KDe=r=>r,iB=KDe({patrick:{date:[17,3],chars:["\u{1F340}","\u{1F331}"],size:40},simba:{date:[19,7],chars:["\u{1F981}","\u{1F334}"],size:40},jack:{date:[31,10],chars:["\u{1F383}","\u{1F987}"],size:40},hogsfather:{date:[31,12],chars:["\u{1F389}","\u{1F384}"],size:40},default:{chars:["=","-"],size:80}}),UDe=MDe&&Object.keys(iB).find(r=>{let e=iB[r];return!(e.date&&(e.date[0]!==L9.getDate()||e.date[1]!==L9.getMonth()+1))})||"default";function T9(r,{configuration:e,json:t}){if(!e.get("enableMessageNames"))return"";let n=_A(r===null?0:r);return!t&&r===null?tt(e,n,"grey"):n}function eD(r,{configuration:e,json:t}){let i=T9(r,{configuration:e,json:t});if(!i||r===null||r===X.UNNAMED)return i;let n=X[r],s=`https://yarnpkg.com/advanced/error-codes#${i}---${n}`.toLowerCase();return Mg(e,i,s)}var Je=class extends Ji{constructor({configuration:e,stdout:t,json:i=!1,includeFooter:n=!0,includeLogs:s=!i,includeInfos:o=s,includeWarnings:a=s,forgettableBufferSize:l=ODe,forgettableNames:c=new Set}){super();this.uncommitted=new Set;this.cacheHitCount=0;this.cacheMissCount=0;this.lastCacheMiss=null;this.warningCount=0;this.errorCount=0;this.startTime=Date.now();this.indent=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.progressStyle=null;this.progressMaxScaledSize=null;this.forgettableLines=[];if(nd(this,{configuration:e}),this.configuration=e,this.forgettableBufferSize=l,this.forgettableNames=new Set([...c,...TDe]),this.includeFooter=n,this.includeInfos=o,this.includeWarnings=a,this.json=i,this.stdout=t,e.get("enableProgressBars")&&!i&&t.isTTY&&t.columns>22){let u=e.get("progressBarStyle")||UDe;if(!Object.prototype.hasOwnProperty.call(iB,u))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=iB[u];let g="\u27A4 YN0000: \u250C ".length,f=Math.max(0,Math.min(t.columns-g,80));this.progressMaxScaledSize=Math.floor(this.progressStyle.size*f/80)}}static async start(e,t){let i=new this(e),n=process.emitWarning;process.emitWarning=(s,o)=>{if(typeof s!="string"){let l=s;s=l.message,o=o!=null?o:l.name}let a=typeof o!="undefined"?`${o}: ${s}`:s;i.reportWarning(X.UNNAMED,a)};try{await t(i)}catch(s){i.reportExceptionOnce(s)}finally{await i.finalize(),process.emitWarning=n}return i}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){this.cacheHitCount+=1}reportCacheMiss(e,t){this.lastCacheMiss=e,this.cacheMissCount+=1,typeof t!="undefined"&&!this.configuration.get("preferAggregateCacheInfo")&&this.reportInfo(X.FETCH_NOT_CACHED,t)}startSectionSync({reportHeader:e,reportFooter:t,skipIfEmpty:i},n){let s={committed:!1,action:()=>{e==null||e()}};i?this.uncommitted.add(s):(s.action(),s.committed=!0);let o=Date.now();try{return n()}catch(a){throw this.reportExceptionOnce(a),a}finally{let a=Date.now();this.uncommitted.delete(s),s.committed&&(t==null||t(a-o))}}async startSectionPromise({reportHeader:e,reportFooter:t,skipIfEmpty:i},n){let s={committed:!1,action:()=>{e==null||e()}};i?this.uncommitted.add(s):(s.action(),s.committed=!0);let o=Date.now();try{return await n()}catch(a){throw this.reportExceptionOnce(a),a}finally{let a=Date.now();this.uncommitted.delete(s),s.committed&&(t==null||t(a-o))}}startTimerImpl(e,t,i){let n=typeof t=="function"?{}:t;return{cb:typeof t=="function"?t:i,reportHeader:()=>{this.reportInfo(null,`\u250C ${e}`),this.indent+=1,rB!==null&&!this.json&&this.includeInfos&&this.stdout.write(rB.start(e))},reportFooter:o=>{this.indent-=1,rB!==null&&!this.json&&this.includeInfos&&this.stdout.write(rB.end(e)),this.configuration.get("enableTimers")&&o>200?this.reportInfo(null,`\u2514 Completed in ${tt(this.configuration,o,qe.DURATION)}`):this.reportInfo(null,"\u2514 Completed")},skipIfEmpty:n.skipIfEmpty}}startTimerSync(e,t,i){let o=this.startTimerImpl(e,t,i),{cb:n}=o,s=Or(o,["cb"]);return this.startSectionSync(s,n)}async startTimerPromise(e,t,i){let o=this.startTimerImpl(e,t,i),{cb:n}=o,s=Or(o,["cb"]);return this.startSectionPromise(s,n)}async startCacheReport(e){let t=this.configuration.get("preferAggregateCacheInfo")?{cacheHitCount:this.cacheHitCount,cacheMissCount:this.cacheMissCount}:null;try{return await e()}catch(i){throw this.reportExceptionOnce(i),i}finally{t!==null&&this.reportCacheChanges(t)}}reportSeparator(){this.indent===0?this.writeLineWithForgettableReset(""):this.reportInfo(null,"")}reportInfo(e,t){if(!this.includeInfos)return;this.commit();let i=this.formatNameWithHyperlink(e),n=i?`${i}: `:"",s=`${tt(this.configuration,"\u27A4","blueBright")} ${n}${this.formatIndent()}${t}`;if(this.json)this.reportJson({type:"info",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t});else if(this.forgettableNames.has(e))if(this.forgettableLines.push(s),this.forgettableLines.length>this.forgettableBufferSize){for(;this.forgettableLines.length>this.forgettableBufferSize;)this.forgettableLines.shift();this.writeLines(this.forgettableLines,{truncate:!0})}else this.writeLine(s,{truncate:!0});else this.writeLineWithForgettableReset(s)}reportWarning(e,t){if(this.warningCount+=1,!this.includeWarnings)return;this.commit();let i=this.formatNameWithHyperlink(e),n=i?`${i}: `:"";this.json?this.reportJson({type:"warning",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t}):this.writeLineWithForgettableReset(`${tt(this.configuration,"\u27A4","yellowBright")} ${n}${this.formatIndent()}${t}`)}reportError(e,t){this.errorCount+=1,this.commit();let i=this.formatNameWithHyperlink(e),n=i?`${i}: `:"";this.json?this.reportJson({type:"error",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t}):this.writeLineWithForgettableReset(`${tt(this.configuration,"\u27A4","redBright")} ${n}${this.formatIndent()}${t}`,{truncate:!1})}reportProgress(e){if(this.progressStyle===null)return te(N({},Promise.resolve()),{stop:()=>{}});if(e.hasProgress&&e.hasTitle)throw new Error("Unimplemented: Progress bars can't have both progress and titles.");let t=!1,i=Promise.resolve().then(async()=>{let s={progress:e.hasProgress?0:void 0,title:e.hasTitle?"":void 0};this.progress.set(e,{definition:s,lastScaledSize:e.hasProgress?-1:void 0,lastTitle:void 0}),this.refreshProgress({delta:-1});for await(let{progress:o,title:a}of e)t||s.progress===o&&s.title===a||(s.progress=o,s.title=a,this.refreshProgress());n()}),n=()=>{t||(t=!0,this.progress.delete(e),this.refreshProgress({delta:1}))};return te(N({},i),{stop:n})}reportJson(e){this.json&&this.writeLineWithForgettableReset(`${JSON.stringify(e)}`)}async finalize(){if(!this.includeFooter)return;let e="";this.errorCount>0?e="Failed with errors":this.warningCount>0?e="Done with warnings":e="Done";let t=tt(this.configuration,Date.now()-this.startTime,qe.DURATION),i=this.configuration.get("enableTimers")?`${e} in ${t}`:e;this.errorCount>0?this.reportError(X.UNNAMED,i):this.warningCount>0?this.reportWarning(X.UNNAMED,i):this.reportInfo(X.UNNAMED,i)}writeLine(e,{truncate:t}={}){this.clearProgress({clear:!0}),this.stdout.write(`${this.truncate(e,{truncate:t})} +`),this.writeProgress()}writeLineWithForgettableReset(e,{truncate:t}={}){this.forgettableLines=[],this.writeLine(e,{truncate:t})}writeLines(e,{truncate:t}={}){this.clearProgress({delta:e.length});for(let i of e)this.stdout.write(`${this.truncate(i,{truncate:t})} +`);this.writeProgress()}reportCacheChanges({cacheHitCount:e,cacheMissCount:t}){let i=this.cacheHitCount-e,n=this.cacheMissCount-t;if(i===0&&n===0)return;let s="";this.cacheHitCount>1?s+=`${this.cacheHitCount} packages were already cached`:this.cacheHitCount===1?s+=" - one package was already cached":s+="No packages were cached",this.cacheHitCount>0?this.cacheMissCount>1?s+=`, ${this.cacheMissCount} had to be fetched`:this.cacheMissCount===1&&(s+=`, one had to be fetched (${It(this.configuration,this.lastCacheMiss)})`):this.cacheMissCount>1?s+=` - ${this.cacheMissCount} packages had to be fetched`:this.cacheMissCount===1&&(s+=` - one package had to be fetched (${It(this.configuration,this.lastCacheMiss)})`),this.reportInfo(X.FETCH_NOT_CACHED,s)}commit(){let e=this.uncommitted;this.uncommitted=new Set;for(let t of e)t.committed=!0,t.action()}clearProgress({delta:e=0,clear:t=!1}){this.progressStyle!==null&&this.progress.size+e>0&&(this.stdout.write(`[${this.progress.size+e}A`),(e>0||t)&&this.stdout.write(""))}writeProgress(){if(this.progressStyle===null||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let e=Date.now();e-this.progressTime>N9&&(this.progressFrame=(this.progressFrame+1)%F9.length,this.progressTime=e);let t=F9[this.progressFrame];for(let i of this.progress.values()){let n="";if(typeof i.lastScaledSize!="undefined"){let l=this.progressStyle.chars[0].repeat(i.lastScaledSize),c=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-i.lastScaledSize);n=` ${l}${c}`}let s=this.formatName(null),o=s?`${s}: `:"",a=i.definition.title?` ${i.definition.title}`:"";this.stdout.write(`${tt(this.configuration,"\u27A4","blueBright")} ${o}${t}${n}${a} +`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},N9)}refreshProgress({delta:e=0,force:t=!1}={}){let i=!1,n=!1;if(t||this.progress.size===0)i=!0;else for(let s of this.progress.values()){let o=typeof s.definition.progress!="undefined"?Math.trunc(this.progressMaxScaledSize*s.definition.progress):void 0,a=s.lastScaledSize;s.lastScaledSize=o;let l=s.lastTitle;if(s.lastTitle=s.definition.title,o!==a||(n=l!==s.definition.title)){i=!0;break}}i&&(this.clearProgress({delta:e,clear:n}),this.writeProgress())}truncate(e,{truncate:t}={}){return this.progressStyle===null&&(t=!1),typeof t=="undefined"&&(t=this.configuration.get("preferTruncatedLines")),t&&(e=(0,R9.default)(e,0,this.stdout.columns-1)),e}formatName(e){return T9(e,{configuration:this.configuration,json:this.json})}formatNameWithHyperlink(e){return eD(e,{configuration:this.configuration,json:this.json})}formatIndent(){return"\u2502 ".repeat(this.indent)}};var Ur="3.2.2";var hn;(function(n){n.Yarn1="Yarn Classic",n.Yarn2="Yarn",n.Npm="npm",n.Pnpm="pnpm"})(hn||(hn={}));async function AA(r,e,t,i=[]){if(process.platform==="win32"){let n=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${t}" ${i.map(s=>`"${s.replace('"','""')}"`).join(" ")} %*`;await K.writeFilePromise(k.format({dir:r,name:e,ext:".cmd"}),n)}await K.writeFilePromise(k.join(r,e),`#!/bin/sh +exec "${t}" ${i.map(n=>`'${n.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@" +`,{mode:493})}async function K9(r){let e=await At.tryFind(r);if(e==null?void 0:e.packageManager){let i=lw(e.packageManager);if(i==null?void 0:i.name){let n=`found ${JSON.stringify({packageManager:e.packageManager})} in manifest`,[s]=i.reference.split(".");switch(i.name){case"yarn":return{packageManager:Number(s)===1?hn.Yarn1:hn.Yarn2,reason:n};case"npm":return{packageManager:hn.Npm,reason:n};case"pnpm":return{packageManager:hn.Pnpm,reason:n}}}}let t;try{t=await K.readFilePromise(k.join(r,kt.lockfile),"utf8")}catch{}return t!==void 0?t.match(/^__metadata:$/m)?{packageManager:hn.Yarn2,reason:'"__metadata" key found in yarn.lock'}:{packageManager:hn.Yarn1,reason:'"__metadata" key not found in yarn.lock, must be a Yarn classic lockfile'}:K.existsSync(k.join(r,"package-lock.json"))?{packageManager:hn.Npm,reason:`found npm's "package-lock.json" lockfile`}:K.existsSync(k.join(r,"pnpm-lock.yaml"))?{packageManager:hn.Pnpm,reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function Yd({project:r,locator:e,binFolder:t,lifecycleScript:i}){var l,c;let n={};for(let[u,g]of Object.entries(process.env))typeof g!="undefined"&&(n[u.toLowerCase()!=="path"?u:"PATH"]=g);let s=H.fromPortablePath(t);n.BERRY_BIN_FOLDER=H.fromPortablePath(s);let o=process.env.COREPACK_ROOT?H.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([AA(t,"node",process.execPath),...Ur!==null?[AA(t,"run",process.execPath,[o,"run"]),AA(t,"yarn",process.execPath,[o]),AA(t,"yarnpkg",process.execPath,[o]),AA(t,"node-gyp",process.execPath,[o,"run","--top-level","node-gyp"])]:[]]),r&&(n.INIT_CWD=H.fromPortablePath(r.configuration.startingCwd),n.PROJECT_CWD=H.fromPortablePath(r.cwd)),n.PATH=n.PATH?`${s}${H.delimiter}${n.PATH}`:`${s}`,n.npm_execpath=`${s}${H.sep}yarn`,n.npm_node_execpath=`${s}${H.sep}node`,e){if(!r)throw new Error("Assertion failed: Missing project");let u=r.tryWorkspaceByLocator(e),g=u?(l=u.manifest.version)!=null?l:"":(c=r.storedPackages.get(e.locatorHash).version)!=null?c:"";n.npm_package_name=Ot(e),n.npm_package_version=g;let f;if(u)f=u.cwd;else{let h=r.storedPackages.get(e.locatorHash);if(!h)throw new Error(`Package for ${It(r.configuration,e)} not found in the project`);let p=r.configuration.getLinkers(),m={project:r,report:new Je({stdout:new El.PassThrough,configuration:r.configuration})},y=p.find(b=>b.supportsPackage(h,m));if(!y)throw new Error(`The package ${It(r.configuration,h)} isn't supported by any of the available linkers`);f=await y.findPackageLocation(h,m)}n.npm_package_json=H.fromPortablePath(k.join(f,kt.manifest))}let a=Ur!==null?`yarn/${Ur}`:`yarn/${Og("@yarnpkg/core").version}-core`;return n.npm_config_user_agent=`${a} npm/? node/${process.version} ${process.platform} ${process.arch}`,i&&(n.npm_lifecycle_event=i),r&&await r.configuration.triggerHook(u=>u.setupScriptEnvironment,r,n,async(u,g,f)=>await AA(t,Jr(u),g,f)),n}var HDe=2,jDe=(0,M9.default)(HDe);async function GDe(r,e,{configuration:t,report:i,workspace:n=null,locator:s=null}){await jDe(async()=>{await K.mktempPromise(async o=>{let a=k.join(o,"pack.log"),l=null,{stdout:c,stderr:u}=t.getSubprocessStreams(a,{prefix:H.fromPortablePath(r),report:i}),g=s&&ea(s)?gd(s):s,f=g?Rs(g):"an external project";c.write(`Packing ${f} from sources +`);let h=await K9(r),p;h!==null?(c.write(`Using ${h.packageManager} for bootstrap. Reason: ${h.reason} + +`),p=h.packageManager):(c.write(`No package manager configuration detected; defaulting to Yarn + +`),p=hn.Yarn2),await K.mktempPromise(async m=>{let y=await Yd({binFolder:m}),v=new Map([[hn.Yarn1,async()=>{let T=n!==null?["workspace",n]:[],q=await ra("yarn",["set","version","classic","--only-if-needed"],{cwd:r,env:y,stdin:l,stdout:c,stderr:u,end:ss.ErrorCode});if(q.code!==0)return q.code;await K.appendFilePromise(k.join(r,".npmignore"),`/.yarn +`),c.write(` +`),delete y.NODE_ENV;let Y=await ra("yarn",["install"],{cwd:r,env:y,stdin:l,stdout:c,stderr:u,end:ss.ErrorCode});if(Y.code!==0)return Y.code;c.write(` +`);let $=await ra("yarn",[...T,"pack","--filename",H.fromPortablePath(e)],{cwd:r,env:y,stdin:l,stdout:c,stderr:u});return $.code!==0?$.code:0}],[hn.Yarn2,async()=>{let T=n!==null?["workspace",n]:[];y.YARN_ENABLE_INLINE_BUILDS="1";let q=k.join(r,kt.lockfile);await K.existsPromise(q)||await K.writeFilePromise(q,"");let Y=await ra("yarn",[...T,"pack","--install-if-needed","--filename",H.fromPortablePath(e)],{cwd:r,env:y,stdin:l,stdout:c,stderr:u});return Y.code!==0?Y.code:0}],[hn.Npm,async()=>{if(n!==null){let A=new El.PassThrough,oe=Tg(A);A.pipe(c,{end:!1});let ce=await ra("npm",["--version"],{cwd:r,env:y,stdin:l,stdout:A,stderr:u,end:ss.Never});if(A.end(),ce.code!==0)return c.end(),u.end(),ce.code;let Z=(await oe).toString().trim();if(!qc(Z,">=7.x")){let O=$o(null,"npm"),L=rr(O,Z),de=rr(O,">=7.x");throw new Error(`Workspaces aren't supported by ${sr(t,L)}; please upgrade to ${sr(t,de)} (npm has been detected as the primary package manager for ${tt(t,r,qe.PATH)})`)}}let T=n!==null?["--workspace",n]:[];delete y.npm_config_user_agent,delete y.npm_config_production,delete y.NPM_CONFIG_PRODUCTION,delete y.NODE_ENV;let q=await ra("npm",["install"],{cwd:r,env:y,stdin:l,stdout:c,stderr:u,end:ss.ErrorCode});if(q.code!==0)return q.code;let Y=new El.PassThrough,$=Tg(Y);Y.pipe(c);let _=await ra("npm",["pack","--silent",...T],{cwd:r,env:y,stdin:l,stdout:Y,stderr:u});if(_.code!==0)return _.code;let ne=(await $).toString().trim().replace(/^.*\n/s,""),ee=k.resolve(r,H.toPortablePath(ne));return await K.renamePromise(ee,e),0}]]).get(p);if(typeof v=="undefined")throw new Error("Assertion failed: Unsupported workflow");let x=await v();if(!(x===0||typeof x=="undefined"))throw K.detachTemp(o),new ct(X.PACKAGE_PREPARATION_FAILED,`Packing the package failed (exit code ${x}, logs can be found here: ${tt(t,a,qe.PATH)})`)})})})}async function YDe(r,e,{project:t}){let i=t.tryWorkspaceByLocator(r);if(i!==null)return tD(i,e);let n=t.storedPackages.get(r.locatorHash);if(!n)throw new Error(`Package for ${It(t.configuration,r)} not found in the project`);return await Is.openPromise(async s=>{let o=t.configuration,a=t.configuration.getLinkers(),l={project:t,report:new Je({stdout:new El.PassThrough,configuration:o})},c=a.find(h=>h.supportsPackage(n,l));if(!c)throw new Error(`The package ${It(t.configuration,n)} isn't supported by any of the available linkers`);let u=await c.findPackageLocation(n,l),g=new _t(u,{baseFs:s});return(await At.find(Me.dot,{baseFs:g})).scripts.has(e)},{libzip:await fn()})}async function nB(r,e,t,{cwd:i,project:n,stdin:s,stdout:o,stderr:a}){return await K.mktempPromise(async l=>{let{manifest:c,env:u,cwd:g}=await U9(r,{project:n,binFolder:l,cwd:i,lifecycleScript:e}),f=c.scripts.get(e);if(typeof f=="undefined")return 1;let h=async()=>await Xw(f,t,{cwd:g,env:u,stdin:s,stdout:o,stderr:a});return await(await n.configuration.reduceHook(m=>m.wrapScriptExecution,h,n,r,e,{script:f,args:t,cwd:g,env:u,stdin:s,stdout:o,stderr:a}))()})}async function rD(r,e,t,{cwd:i,project:n,stdin:s,stdout:o,stderr:a}){return await K.mktempPromise(async l=>{let{env:c,cwd:u}=await U9(r,{project:n,binFolder:l,cwd:i});return await Xw(e,t,{cwd:u,env:c,stdin:s,stdout:o,stderr:a})})}async function qDe(r,{binFolder:e,cwd:t,lifecycleScript:i}){let n=await Yd({project:r.project,locator:r.anchoredLocator,binFolder:e,lifecycleScript:i});return await Promise.all(Array.from(await H9(r),([s,[,o]])=>AA(e,Jr(s),process.execPath,[o]))),typeof t=="undefined"&&(t=k.dirname(await K.realpathPromise(k.join(r.cwd,"package.json")))),{manifest:r.manifest,binFolder:e,env:n,cwd:t}}async function U9(r,{project:e,binFolder:t,cwd:i,lifecycleScript:n}){let s=e.tryWorkspaceByLocator(r);if(s!==null)return qDe(s,{binFolder:t,cwd:i,lifecycleScript:n});let o=e.storedPackages.get(r.locatorHash);if(!o)throw new Error(`Package for ${It(e.configuration,r)} not found in the project`);return await Is.openPromise(async a=>{let l=e.configuration,c=e.configuration.getLinkers(),u={project:e,report:new Je({stdout:new El.PassThrough,configuration:l})},g=c.find(y=>y.supportsPackage(o,u));if(!g)throw new Error(`The package ${It(e.configuration,o)} isn't supported by any of the available linkers`);let f=await Yd({project:e,locator:r,binFolder:t,lifecycleScript:n});await Promise.all(Array.from(await sB(r,{project:e}),([y,[,b]])=>AA(t,Jr(y),process.execPath,[b])));let h=await g.findPackageLocation(o,u),p=new _t(h,{baseFs:a}),m=await At.find(Me.dot,{baseFs:p});return typeof i=="undefined"&&(i=h),{manifest:m,binFolder:t,env:f,cwd:i}},{libzip:await fn()})}async function j9(r,e,t,{cwd:i,stdin:n,stdout:s,stderr:o}){return await nB(r.anchoredLocator,e,t,{cwd:i,project:r.project,stdin:n,stdout:s,stderr:o})}function tD(r,e){return r.manifest.scripts.has(e)}async function G9(r,e,{cwd:t,report:i}){let{configuration:n}=r.project,s=null;await K.mktempPromise(async o=>{let a=k.join(o,`${e}.log`),l=`# This file contains the result of Yarn calling the "${e}" lifecycle script inside a workspace ("${H.fromPortablePath(r.cwd)}") +`,{stdout:c,stderr:u}=n.getSubprocessStreams(a,{report:i,prefix:It(n,r.anchoredLocator),header:l});i.reportInfo(X.LIFECYCLE_SCRIPT,`Calling the "${e}" lifecycle script`);let g=await j9(r,e,[],{cwd:t,stdin:s,stdout:c,stderr:u});if(c.end(),u.end(),g!==0)throw K.detachTemp(o),new ct(X.LIFECYCLE_SCRIPT,`${(0,O9.default)(e)} script failed (exit code ${tt(n,g,qe.NUMBER)}, logs can be found here: ${tt(n,a,qe.PATH)}); run ${tt(n,`yarn ${e}`,qe.CODE)} to investigate`)})}async function JDe(r,e,t){tD(r,e)&&await G9(r,e,t)}async function sB(r,{project:e}){let t=e.configuration,i=new Map,n=e.storedPackages.get(r.locatorHash);if(!n)throw new Error(`Package for ${It(t,r)} not found in the project`);let s=new El.Writable,o=t.getLinkers(),a={project:e,report:new Je({configuration:t,stdout:s})},l=new Set([r.locatorHash]);for(let u of n.dependencies.values()){let g=e.storedResolutions.get(u.descriptorHash);if(!g)throw new Error(`Assertion failed: The resolution (${sr(t,u)}) should have been registered`);l.add(g)}let c=await Promise.all(Array.from(l,async u=>{let g=e.storedPackages.get(u);if(!g)throw new Error(`Assertion failed: The package (${u}) should have been registered`);if(g.bin.size===0)return zo.skip;let f=o.find(p=>p.supportsPackage(g,a));if(!f)return zo.skip;let h=null;try{h=await f.findPackageLocation(g,a)}catch(p){if(p.code==="LOCATOR_NOT_INSTALLED")return zo.skip;throw p}return{dependency:g,packageLocation:h}}));for(let u of c){if(u===zo.skip)continue;let{dependency:g,packageLocation:f}=u;for(let[h,p]of g.bin)i.set(h,[g,H.fromPortablePath(k.resolve(f,p))])}return i}async function H9(r){return await sB(r.anchoredLocator,{project:r.project})}async function Y9(r,e,t,{cwd:i,project:n,stdin:s,stdout:o,stderr:a,nodeArgs:l=[],packageAccessibleBinaries:c}){c!=null||(c=await sB(r,{project:n}));let u=c.get(e);if(!u)throw new Error(`Binary not found (${e}) for ${It(n.configuration,r)}`);return await K.mktempPromise(async g=>{let[,f]=u,h=await Yd({project:n,locator:r,binFolder:g});await Promise.all(Array.from(c,([m,[,y]])=>AA(h.BERRY_BIN_FOLDER,Jr(m),process.execPath,[y])));let p;try{p=await ra(process.execPath,[...l,f,...t],{cwd:i,env:h,stdin:s,stdout:o,stderr:a})}finally{await K.removePromise(h.BERRY_BIN_FOLDER)}return p.code})}async function WDe(r,e,t,{cwd:i,stdin:n,stdout:s,stderr:o,packageAccessibleBinaries:a}){return await Y9(r.anchoredLocator,e,t,{project:r.project,cwd:i,stdin:n,stdout:s,stderr:o,packageAccessibleBinaries:a})}var Bi={};ft(Bi,{convertToZip:()=>iNe,extractArchiveTo:()=>sNe,makeArchiveFromDirectory:()=>rNe});var T6=ge(require("stream")),O6=ge(P6());var D6=ge(require("os")),R6=ge(gg()),F6=ge(require("worker_threads")),Dl=Symbol("kTaskInfo"),pR=class{constructor(e){this.source=e;this.workers=[];this.limit=(0,R6.default)(Math.max(1,(0,D6.cpus)().length));this.cleanupInterval=setInterval(()=>{if(this.limit.pendingCount===0&&this.limit.activeCount===0){let t=this.workers.pop();t?t.terminate():clearInterval(this.cleanupInterval)}},5e3).unref()}createWorker(){this.cleanupInterval.refresh();let e=new F6.Worker(this.source,{eval:!0,execArgv:[...process.execArgv,"--unhandled-rejections=strict"]});return e.on("message",t=>{if(!e[Dl])throw new Error("Assertion failed: Worker sent a result without having a task assigned");e[Dl].resolve(t),e[Dl]=null,e.unref(),this.workers.push(e)}),e.on("error",t=>{var i;(i=e[Dl])==null||i.reject(t),e[Dl]=null}),e.on("exit",t=>{var i;t!==0&&((i=e[Dl])==null||i.reject(new Error(`Worker exited with code ${t}`))),e[Dl]=null}),e}run(e){return this.limit(()=>{var i;let t=(i=this.workers.pop())!=null?i:this.createWorker();return t.ref(),new Promise((n,s)=>{t[Dl]={resolve:n,reject:s},t.postMessage(e)})})}};var M6=ge(L6());async function rNe(r,{baseFs:e=new ar,prefixPath:t=Me.root,compressionLevel:i,inMemory:n=!1}={}){let s=await fn(),o;if(n)o=new li(null,{libzip:s,level:i});else{let l=await K.mktempPromise(),c=k.join(l,"archive.zip");o=new li(c,{create:!0,libzip:s,level:i})}let a=k.resolve(Me.root,t);return await o.copyPromise(a,r,{baseFs:e,stableTime:!0,stableSort:!0}),o}var K6;async function iNe(r,e){let t=await K.mktempPromise(),i=k.join(t,"archive.zip");return K6||(K6=new pR((0,M6.getContent)())),await K6.run({tmpFile:i,tgz:r,opts:e}),new li(i,{libzip:await fn(),level:e.compressionLevel})}async function*nNe(r){let e=new O6.default.Parse,t=new T6.PassThrough({objectMode:!0,autoDestroy:!0,emitClose:!0});e.on("entry",i=>{t.write(i)}),e.on("error",i=>{t.destroy(i)}),e.on("close",()=>{t.destroyed||t.end()}),e.end(r);for await(let i of t){let n=i;yield n,n.resume()}}async function sNe(r,e,{stripComponents:t=0,prefixPath:i=Me.dot}={}){var s,o;function n(a){if(a.path[0]==="/")return!0;let l=a.path.split(/\//g);return!!(l.some(c=>c==="..")||l.length<=t)}for await(let a of nNe(r)){if(n(a))continue;let l=k.normalize(H.toPortablePath(a.path)).replace(/\/$/,"").split(/\//g);if(l.length<=t)continue;let c=l.slice(t).join("/"),u=k.join(i,c),g=420;switch((a.type==="Directory"||(((s=a.mode)!=null?s:0)&73)!=0)&&(g|=73),a.type){case"Directory":e.mkdirpSync(k.dirname(u),{chmod:493,utimes:[Rr.SAFE_TIME,Rr.SAFE_TIME]}),e.mkdirSync(u,{mode:g}),e.utimesSync(u,Rr.SAFE_TIME,Rr.SAFE_TIME);break;case"OldFile":case"File":e.mkdirpSync(k.dirname(u),{chmod:493,utimes:[Rr.SAFE_TIME,Rr.SAFE_TIME]}),e.writeFileSync(u,await Tg(a),{mode:g}),e.utimesSync(u,Rr.SAFE_TIME,Rr.SAFE_TIME);break;case"SymbolicLink":e.mkdirpSync(k.dirname(u),{chmod:493,utimes:[Rr.SAFE_TIME,Rr.SAFE_TIME]}),e.symlinkSync(a.linkpath,u),(o=e.lutimesSync)==null||o.call(e,u,Rr.SAFE_TIME,Rr.SAFE_TIME);break}}return e}var ls={};ft(ls,{emitList:()=>oNe,emitTree:()=>q6,treeNodeToJson:()=>Y6,treeNodeToTreeify:()=>G6});var j6=ge(H6());function G6(r,{configuration:e}){let t={},i=(n,s)=>{let o=Array.isArray(n)?n.entries():Object.entries(n);for(let[a,{label:l,value:c,children:u}]of o){let g=[];typeof l!="undefined"&&g.push(Ry(e,l,Tc.BOLD)),typeof c!="undefined"&&g.push(tt(e,c[0],c[1])),g.length===0&&g.push(Ry(e,`${a}`,Tc.BOLD));let f=g.join(": "),h=s[f]={};typeof u!="undefined"&&i(u,h)}};if(typeof r.children=="undefined")throw new Error("The root node must only contain children");return i(r.children,t),t}function Y6(r){let e=t=>{var s;if(typeof t.children=="undefined"){if(typeof t.value=="undefined")throw new Error("Assertion failed: Expected a value to be set if the children are missing");return Oc(t.value[0],t.value[1])}let i=Array.isArray(t.children)?t.children.entries():Object.entries((s=t.children)!=null?s:{}),n=Array.isArray(t.children)?[]:{};for(let[o,a]of i)n[o]=e(a);return typeof t.value=="undefined"?n:{value:Oc(t.value[0],t.value[1]),children:n}};return e(r)}function oNe(r,{configuration:e,stdout:t,json:i}){let n=r.map(s=>({value:s}));q6({children:n},{configuration:e,stdout:t,json:i})}function q6(r,{configuration:e,stdout:t,json:i,separators:n=0}){var o;if(i){let a=Array.isArray(r.children)?r.children.values():Object.values((o=r.children)!=null?o:{});for(let l of a)t.write(`${JSON.stringify(Y6(l))} +`);return}let s=(0,j6.asTree)(G6(r,{configuration:e}),!1,!1);if(n>=1&&(s=s.replace(/^([├└]─)/gm,`\u2502 +$1`).replace(/^│\n/,"")),n>=2)for(let a=0;a<2;++a)s=s.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm,`$1$3 \u2502 +$2`).replace(/^│\n/,"");if(n>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");t.write(s)}var J6=ge(require("crypto")),mR=ge(require("fs"));var aNe=8,Nt=class{constructor(e,{configuration:t,immutable:i=t.get("enableImmutableCache"),check:n=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.cacheId=`-${(0,J6.randomBytes)(8).toString("hex")}.tmp`;this.configuration=t,this.cwd=e,this.immutable=i,this.check=n;let s=t.get("cacheKeyOverride");if(s!==null)this.cacheKey=`${s}`;else{let o=t.get("compressionLevel"),a=o!==lc?`c${o}`:"";this.cacheKey=[aNe,a].join("")}}static async find(e,{immutable:t,check:i}={}){let n=new Nt(e.get("cacheFolder"),{configuration:e,immutable:t,check:i});return await n.setup(),n}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;let e=`${this.configuration.get("globalFolder")}/cache`;return e!==this.cwd?e:null}getVersionFilename(e){return`${Jg(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,t){let n=ANe(t).slice(0,10);return`${Jg(e)}-${n}.zip`}getLocatorPath(e,t,i={}){var s;return this.mirrorCwd===null||((s=i.unstablePackages)==null?void 0:s.has(e.locatorHash))?k.resolve(this.cwd,this.getVersionFilename(e)):t===null||ER(t)!==this.cacheKey?null:k.resolve(this.cwd,this.getChecksumFilename(e,t))}getLocatorMirrorPath(e){let t=this.mirrorCwd;return t!==null?k.resolve(t,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get("enableGlobalCache"))if(this.immutable){if(!await K.existsPromise(this.cwd))throw new ct(X.IMMUTABLE_CACHE,"Cache path does not exist.")}else{await K.mkdirPromise(this.cwd,{recursive:!0});let e=k.resolve(this.cwd,".gitignore");await K.changeFilePromise(e,`/.gitignore +*.flock +*.tmp +`)}(this.mirrorCwd||!this.immutable)&&await K.mkdirPromise(this.mirrorCwd||this.cwd,{recursive:!0})}async fetchPackageFromCache(e,t,a){var l=a,{onHit:i,onMiss:n,loader:s}=l,o=Or(l,["onHit","onMiss","loader"]);var A;let c=this.getLocatorMirrorPath(e),u=new ar,g=()=>{let oe=new li(null,{libzip:q}),ce=k.join(Me.root,ek(e));return oe.mkdirSync(ce,{recursive:!0}),oe.writeJsonSync(k.join(ce,kt.manifest),{name:Ot(e),mocked:!0}),oe},f=async(oe,ce=null)=>{var O;if(ce===null&&((O=o.unstablePackages)==null?void 0:O.has(e.locatorHash)))return null;let Z=!o.skipIntegrityCheck||!t?`${this.cacheKey}/${await sw(oe)}`:t;if(ce!==null){let L=!o.skipIntegrityCheck||!t?`${this.cacheKey}/${await sw(ce)}`:t;if(Z!==L)throw new ct(X.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}if(t!==null&&Z!==t){let L;switch(this.check?L="throw":ER(t)!==ER(Z)?L="update":L=this.configuration.get("checksumBehavior"),L){case"ignore":return t;case"update":return Z;default:case"throw":throw new ct(X.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the expected checksum")}}return Z},h=async oe=>{if(!s)throw new Error(`Cache check required but no loader configured for ${It(this.configuration,e)}`);let ce=await s(),Z=ce.getRealPath();return ce.saveAndClose(),await K.chmodPromise(Z,420),await f(oe,Z)},p=async()=>{if(c===null||!await K.existsPromise(c)){let oe=await s(),ce=oe.getRealPath();return oe.saveAndClose(),{source:"loader",path:ce}}return{source:"mirror",path:c}},m=async()=>{if(!s)throw new Error(`Cache entry required but missing for ${It(this.configuration,e)}`);if(this.immutable)throw new ct(X.IMMUTABLE_CACHE,`Cache entry required but missing for ${It(this.configuration,e)}`);let{path:oe,source:ce}=await p(),Z=await f(oe),O=this.getLocatorPath(e,Z,o);if(!O)throw new Error("Assertion failed: Expected the cache path to be available");let L=[];ce!=="mirror"&&c!==null&&L.push(async()=>{let Be=`${c}${this.cacheId}`;await K.copyFilePromise(oe,Be,mR.default.constants.COPYFILE_FICLONE),await K.chmodPromise(Be,420),await K.renamePromise(Be,c)}),(!o.mirrorWriteOnly||c===null)&&L.push(async()=>{let Be=`${O}${this.cacheId}`;await K.copyFilePromise(oe,Be,mR.default.constants.COPYFILE_FICLONE),await K.chmodPromise(Be,420),await K.renamePromise(Be,O)});let de=o.mirrorWriteOnly&&c!=null?c:O;return await Promise.all(L.map(Be=>Be())),[!1,de,Z]},y=async()=>{let ce=(async()=>{var je;let Z=this.getLocatorPath(e,t,o),O=Z!==null?await u.existsPromise(Z):!1,L=!!((je=o.mockedPackages)==null?void 0:je.has(e.locatorHash))&&(!this.check||!O),de=L||O,Be=de?i:n;if(Be&&Be(),de){let re=null,se=Z;return L||(re=this.check?await h(se):await f(se)),[L,se,re]}else return m()})();this.mutexes.set(e.locatorHash,ce);try{return await ce}finally{this.mutexes.delete(e.locatorHash)}};for(let oe;oe=this.mutexes.get(e.locatorHash);)await oe;let[b,v,x]=await y();this.markedFiles.add(v);let T,q=await fn(),Y=b?()=>g():()=>new li(v,{baseFs:u,libzip:q,readOnly:!0}),$=new _h(()=>Rv(()=>T=Y(),oe=>`Failed to open the cache entry for ${It(this.configuration,e)}: ${oe}`),k),_=new Na(v,{baseFs:$,pathUtils:k}),ne=()=>{T==null||T.discardAndClose()},ee=((A=o.unstablePackages)==null?void 0:A.has(e.locatorHash))?null:x;return[_,ne,ee]}};function ER(r){let e=r.indexOf("/");return e!==-1?r.slice(0,e):null}function ANe(r){let e=r.indexOf("/");return e!==-1?r.slice(e+1):r}var cs;(function(t){t[t.SCRIPT=0]="SCRIPT",t[t.SHELLCODE=1]="SHELLCODE"})(cs||(cs={}));var pA=class extends Ji{constructor({configuration:e,stdout:t,suggestInstall:i=!0}){super();this.errorCount=0;nd(this,{configuration:e}),this.configuration=e,this.stdout=t,this.suggestInstall=i}static async start(e,t){let i=new this(e);try{await t(i)}catch(n){i.reportExceptionOnce(n)}finally{await i.finalize()}return i}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){}reportCacheMiss(e){}startSectionSync(e,t){return t()}async startSectionPromise(e,t){return await t()}startTimerSync(e,t,i){return(typeof t=="function"?t:i)()}async startTimerPromise(e,t,i){return await(typeof t=="function"?t:i)()}async startCacheReport(e){return await e()}reportSeparator(){}reportInfo(e,t){}reportWarning(e,t){}reportError(e,t){this.errorCount+=1,this.stdout.write(`${tt(this.configuration,"\u27A4","redBright")} ${this.formatNameWithHyperlink(e)}: ${t} +`)}reportProgress(e){let t=Promise.resolve().then(async()=>{for await(let{}of e);}),i=()=>{};return te(N({},t),{stop:i})}reportJson(e){}async finalize(){this.errorCount>0&&(this.stdout.write(` +`),this.stdout.write(`${tt(this.configuration,"\u27A4","redBright")} Errors happened when preparing the environment required to run this command. +`),this.suggestInstall&&this.stdout.write(`${tt(this.configuration,"\u27A4","redBright")} This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help. +`))}formatNameWithHyperlink(e){return eD(e,{configuration:this.configuration,json:!1})}};var i0=ge(require("crypto"));function dA(){}dA.prototype={diff:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=i.callback;typeof i=="function"&&(n=i,i={}),this.options=i;var s=this;function o(m){return n?(setTimeout(function(){n(void 0,m)},0),!0):m}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var a=t.length,l=e.length,c=1,u=a+l;i.maxEditLength&&(u=Math.min(u,i.maxEditLength));var g=[{newPos:-1,components:[]}],f=this.extractCommon(g[0],t,e,0);if(g[0].newPos+1>=a&&f+1>=l)return o([{value:this.join(t),count:t.length}]);function h(){for(var m=-1*c;m<=c;m+=2){var y=void 0,b=g[m-1],v=g[m+1],x=(v?v.newPos:0)-m;b&&(g[m-1]=void 0);var T=b&&b.newPos+1=a&&x+1>=l)return o(lNe(s,y.components,t,e,s.useLongestToken));g[m]=y}c++}if(n)(function m(){setTimeout(function(){if(c>u)return n();h()||m()},0)})();else for(;c<=u;){var p=h();if(p)return p}},pushComponent:function(e,t,i){var n=e[e.length-1];n&&n.added===t&&n.removed===i?e[e.length-1]={count:n.count+1,added:t,removed:i}:e.push({count:1,added:t,removed:i})},extractCommon:function(e,t,i,n){for(var s=t.length,o=i.length,a=e.newPos,l=a-n,c=0;a+1h.length?m:h}),c.value=r.join(u)}else c.value=r.join(t.slice(a,a+c.count));a+=c.count,c.added||(l+=c.count)}}var f=e[o-1];return o>1&&typeof f.value=="string"&&(f.added||f.removed)&&r.equals("",f.value)&&(e[o-2].value+=f.value,e.pop()),e}function cNe(r){return{newPos:r.newPos,components:r.components.slice(0)}}var nAt=new dA;var W6=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,z6=/\S/,_6=new dA;_6.equals=function(r,e){return this.options.ignoreCase&&(r=r.toLowerCase(),e=e.toLowerCase()),r===e||this.options.ignoreWhitespace&&!z6.test(r)&&!z6.test(e)};_6.tokenize=function(r){for(var e=r.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),t=0;tr.length)&&(e=r.length);for(var t=0,i=new Array(e);t0?l(Y.lines.slice(-o.context)):[],u-=f.length,g-=f.length)}(q=f).push.apply(q,yR(T.map(function(Z){return(x.added?"+":"-")+Z}))),x.added?p+=T.length:h+=T.length}else{if(u)if(T.length<=o.context*2&&v=a.length-2&&T.length<=o.context){var A=/\n$/.test(t),oe=/\n$/.test(i),ce=T.length==0&&f.length>ee.oldLines;!A&&ce&&t.length>0&&f.splice(ee.oldLines,0,"\\ No newline at end of file"),(!A&&!ce||!oe)&&f.push("\\ No newline at end of file")}c.push(ee),u=0,g=0,f=[]}h+=T.length,p+=T.length}},y=0;y`${t}#commit=${i}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(r,e,t="",i,n)=>`https://${t}github.com/${i}.git#commit=${n}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(r,e,t="",i,n)=>`https://${t}github.com/${i}.git#commit=${n}`],[/^https?:\/\/[^/]+\/(?:[^/]+\/)*(?:@.+(?:\/|(?:%2f)))?([^/]+)\/(?:-|download)\/\1-[^/]+\.tgz(?:#|$)/,r=>`npm:${r}`],[/^https:\/\/npm\.pkg\.github\.com\/download\/(?:@[^/]+)\/(?:[^/]+)\/(?:[^/]+)\/(?:[0-9a-f]+)(?:#|$)/,r=>`npm:${r}`],[/^https:\/\/npm\.fontawesome\.com\/(?:@[^/]+)\/([^/]+)\/-\/([^/]+)\/\1-\2.tgz(?:#|$)/,r=>`npm:${r}`],[/^https?:\/\/(?:[^\\.]+)\.jfrog\.io\/.*\/(@[^/]+)\/([^/]+)\/-\/\1\/\2-(?:[.\d\w-]+)\.tgz(?:#|$)/,(r,e)=>cw({protocol:"npm:",source:null,selector:r,params:{__archiveUrl:e}})],[/^[^/]+\.tgz#[0-9a-f]+$/,r=>`npm:${r}`]],NR=class{constructor(e){this.resolver=e;this.resolutions=null}async setup(e,{report:t}){let i=k.join(e.cwd,e.configuration.get("lockfileFilename"));if(!K.existsSync(i))return;let n=await K.readFilePromise(i,"utf8"),s=Si(n);if(Object.prototype.hasOwnProperty.call(s,"__metadata"))return;let o=this.resolutions=new Map;for(let a of Object.keys(s)){let l=pd(a);if(!l){t.reportWarning(X.YARN_IMPORT_FAILED,`Failed to parse the string "${a}" into a proper descriptor`);continue}po(l.range)&&(l=rr(l,`npm:${l.range}`));let{version:c,resolved:u}=s[a];if(!u)continue;let g;for(let[h,p]of JOe){let m=u.match(h);if(m){g=p(c,...m);break}}if(!g){t.reportWarning(X.YARN_IMPORT_FAILED,`${sr(e.configuration,l)}: Only some patterns can be imported from legacy lockfiles (not "${u}")`);continue}let f=l;try{let h=qg(l.range),p=pd(h.selector,!0);p&&(f=p)}catch{}o.set(l.descriptorHash,cn(f,g))}}supportsDescriptor(e,t){return this.resolutions?this.resolutions.has(e.descriptorHash):!1}supportsLocator(e,t){return!1}shouldPersistResolution(e,t){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}bindDescriptor(e,t,i){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,i){if(!this.resolutions)throw new Error("Assertion failed: The resolution store should have been setup");let n=this.resolutions.get(e.descriptorHash);if(!n)throw new Error("Assertion failed: The resolution should have been registered");return await this.resolver.getCandidates(_x(n),t,i)}async getSatisfying(e,t,i){return null}async resolve(e,t){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}};var LR=class{constructor(e){this.resolver=e}supportsDescriptor(e,t){return!!(t.project.storedResolutions.get(e.descriptorHash)||t.project.originalPackages.has(Aw(e).locatorHash))}supportsLocator(e,t){return!!(t.project.originalPackages.has(e.locatorHash)&&!t.project.lockfileNeedsRefresh)}shouldPersistResolution(e,t){throw new Error("The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes")}bindDescriptor(e,t,i){return e}getResolutionDependencies(e,t){return this.resolver.getResolutionDependencies(e,t)}async getCandidates(e,t,i){let n=i.project.originalPackages.get(Aw(e).locatorHash);if(n)return[n];let s=i.project.storedResolutions.get(e.descriptorHash);if(!s)throw new Error("Expected the resolution to have been successful - resolution not found");if(n=i.project.originalPackages.get(s),!n)throw new Error("Expected the resolution to have been successful - package not found");return[n]}async getSatisfying(e,t,i){return null}async resolve(e,t){let i=t.project.originalPackages.get(e.locatorHash);if(!i)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return i}};var TR=class{constructor(e){this.resolver=e}supportsDescriptor(e,t){return this.resolver.supportsDescriptor(e,t)}supportsLocator(e,t){return this.resolver.supportsLocator(e,t)}shouldPersistResolution(e,t){return this.resolver.shouldPersistResolution(e,t)}bindDescriptor(e,t,i){return this.resolver.bindDescriptor(e,t,i)}getResolutionDependencies(e,t){return this.resolver.getResolutionDependencies(e,t)}async getCandidates(e,t,i){throw new ct(X.MISSING_LOCKFILE_ENTRY,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async getSatisfying(e,t,i){throw new ct(X.MISSING_LOCKFILE_ENTRY,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async resolve(e,t){throw new ct(X.MISSING_LOCKFILE_ENTRY,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}};var di=class extends Ji{reportCacheHit(e){}reportCacheMiss(e){}startSectionSync(e,t){return t()}async startSectionPromise(e,t){return await t()}startTimerSync(e,t,i){return(typeof t=="function"?t:i)()}async startTimerPromise(e,t,i){return await(typeof t=="function"?t:i)()}async startCacheReport(e){return await e()}reportSeparator(){}reportInfo(e,t){}reportWarning(e,t){}reportError(e,t){}reportProgress(e){let t=Promise.resolve().then(async()=>{for await(let{}of e);}),i=()=>{};return te(N({},t),{stop:i})}reportJson(e){}async finalize(){}};var iZ=ge(Wx());var CC=class{constructor(e,{project:t}){this.workspacesCwds=new Set;this.dependencies=new Map;this.project=t,this.cwd=e}async setup(){var s;this.manifest=(s=await At.tryFind(this.cwd))!=null?s:new At,this.relativeCwd=k.relative(this.project.cwd,this.cwd)||Me.dot;let e=this.manifest.name?this.manifest.name:$o(null,`${this.computeCandidateName()}-${ln(this.relativeCwd).substring(0,6)}`),t=this.manifest.version?this.manifest.version:"0.0.0";this.locator=cn(e,t),this.anchoredDescriptor=rr(this.locator,`${oi.protocol}${this.relativeCwd}`),this.anchoredLocator=cn(this.locator,`${oi.protocol}${this.relativeCwd}`);let i=this.manifest.workspaceDefinitions.map(({pattern:o})=>o),n=await(0,iZ.default)(i,{cwd:H.fromPortablePath(this.cwd),expandDirectories:!1,onlyDirectories:!0,onlyFiles:!1,ignore:["**/node_modules","**/.git","**/.yarn"]});n.sort();for(let o of n){let a=k.resolve(this.cwd,H.toPortablePath(o));K.existsSync(k.join(a,"package.json"))&&this.workspacesCwds.add(a)}}accepts(e){var o;let t=e.indexOf(":"),i=t!==-1?e.slice(0,t+1):null,n=t!==-1?e.slice(t+1):e;if(i===oi.protocol&&k.normalize(n)===this.relativeCwd||i===oi.protocol&&(n==="*"||n==="^"||n==="~"))return!0;let s=po(n);return s?i===oi.protocol?s.test((o=this.manifest.version)!=null?o:"0.0.0"):this.project.configuration.get("enableTransparentWorkspaces")&&this.manifest.version!==null?s.test(this.manifest.version):!1:!1}computeCandidateName(){return this.cwd===this.project.cwd?"root-workspace":`${k.basename(this.cwd)}`||"unnamed-workspace"}getRecursiveWorkspaceDependencies({dependencies:e=At.hardDependencies}={}){let t=new Set,i=n=>{for(let s of e)for(let o of n.manifest[s].values()){let a=this.project.tryWorkspaceByDescriptor(o);a===null||t.has(a)||(t.add(a),i(a))}};return i(this),t}getRecursiveWorkspaceDependents({dependencies:e=At.hardDependencies}={}){let t=new Set,i=n=>{for(let s of this.project.workspaces)e.some(a=>[...s.manifest[a].values()].some(l=>{let c=this.project.tryWorkspaceByDescriptor(l);return c!==null&&hd(c.anchoredLocator,n.anchoredLocator)}))&&!t.has(s)&&(t.add(s),i(s))};return i(this),t}getRecursiveWorkspaceChildren(){let e=[];for(let t of this.workspacesCwds){let i=this.project.workspacesByCwd.get(t);i&&e.push(i,...i.getRecursiveWorkspaceChildren())}return e}async persistManifest(){let e={};this.manifest.exportTo(e);let t=k.join(this.cwd,At.fileName),i=`${JSON.stringify(e,null,this.manifest.indent)} +`;await K.changeFilePromise(t,i,{automaticNewlines:!0}),this.manifest.raw=e}};var oZ=6,WOe=1,zOe=/ *, */g,aZ=/\/$/,_Oe=32,VOe=(0,OR.promisify)(KR.default.gzip),XOe=(0,OR.promisify)(KR.default.gunzip),Ci;(function(t){t.UpdateLockfile="update-lockfile",t.SkipBuild="skip-build"})(Ci||(Ci={}));var UR={restoreInstallersCustomData:["installersCustomData"],restoreResolutions:["accessibleLocators","conditionalLocators","disabledLocators","optionalBuilds","storedDescriptors","storedResolutions","storedPackages","lockFileChecksum"],restoreBuildState:["storedBuildState"]},AZ=r=>ln(`${WOe}`,r),ze=class{constructor(e,{configuration:t}){this.resolutionAliases=new Map;this.workspaces=[];this.workspacesByCwd=new Map;this.workspacesByIdent=new Map;this.storedResolutions=new Map;this.storedDescriptors=new Map;this.storedPackages=new Map;this.storedChecksums=new Map;this.storedBuildState=new Map;this.accessibleLocators=new Set;this.conditionalLocators=new Set;this.disabledLocators=new Set;this.originalPackages=new Map;this.optionalBuilds=new Set;this.lockfileNeedsRefresh=!1;this.peerRequirements=new Map;this.installersCustomData=new Map;this.lockFileChecksum=null;this.installStateChecksum=null;this.configuration=t,this.cwd=e}static async find(e,t){var p,m,y;if(!e.projectCwd)throw new Pe(`No project found in ${t}`);let i=e.projectCwd,n=t,s=null;for(;s!==e.projectCwd;){if(s=n,K.existsSync(k.join(s,kt.manifest))){i=s;break}n=k.dirname(s)}let o=new ze(e.projectCwd,{configuration:e});(p=ye.telemetry)==null||p.reportProject(o.cwd),await o.setupResolutions(),await o.setupWorkspaces(),(m=ye.telemetry)==null||m.reportWorkspaceCount(o.workspaces.length),(y=ye.telemetry)==null||y.reportDependencyCount(o.workspaces.reduce((b,v)=>b+v.manifest.dependencies.size+v.manifest.devDependencies.size,0));let a=o.tryWorkspaceByCwd(i);if(a)return{project:o,workspace:a,locator:a.anchoredLocator};let l=await o.findLocatorForLocation(`${i}/`,{strict:!0});if(l)return{project:o,locator:l,workspace:null};let c=tt(e,o.cwd,qe.PATH),u=tt(e,k.relative(o.cwd,i),qe.PATH),g=`- If ${c} isn't intended to be a project, remove any yarn.lock and/or package.json file there.`,f=`- If ${c} is intended to be a project, it might be that you forgot to list ${u} in its workspace configuration.`,h=`- Finally, if ${c} is fine and you intend ${u} to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.`;throw new Pe(`The nearest package directory (${tt(e,i,qe.PATH)}) doesn't seem to be part of the project declared in ${tt(e,o.cwd,qe.PATH)}. + +${[g,f,h].join(` +`)}`)}async setupResolutions(){var i;this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let e=k.join(this.cwd,this.configuration.get("lockfileFilename")),t=this.configuration.get("defaultLanguageName");if(K.existsSync(e)){let n=await K.readFilePromise(e,"utf8");this.lockFileChecksum=AZ(n);let s=Si(n);if(s.__metadata){let o=s.__metadata.version,a=s.__metadata.cacheKey;this.lockfileNeedsRefresh=o0;){let t=e;e=[];for(let i of t){if(this.workspacesByCwd.has(i))continue;let n=await this.addWorkspace(i),s=this.storedPackages.get(n.anchoredLocator.locatorHash);s&&(n.dependencies=s.dependencies);for(let o of n.workspacesCwds)e.push(o)}}}async addWorkspace(e){let t=new CC(e,{project:this});await t.setup();let i=this.workspacesByIdent.get(t.locator.identHash);if(typeof i!="undefined")throw new Error(`Duplicate workspace name ${fi(this.configuration,t.locator)}: ${H.fromPortablePath(e)} conflicts with ${H.fromPortablePath(i.cwd)}`);return this.workspaces.push(t),this.workspacesByCwd.set(e,t),this.workspacesByIdent.set(t.locator.identHash,t),t}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){k.isAbsolute(e)||(e=k.resolve(this.cwd,e)),e=k.normalize(e).replace(/\/+$/,"");let t=this.workspacesByCwd.get(e);return t||null}getWorkspaceByCwd(e){let t=this.tryWorkspaceByCwd(e);if(!t)throw new Error(`Workspace not found (${e})`);return t}tryWorkspaceByFilePath(e){let t=null;for(let i of this.workspaces)k.relative(i.cwd,e).startsWith("../")||t&&t.cwd.length>=i.cwd.length||(t=i);return t||null}getWorkspaceByFilePath(e){let t=this.tryWorkspaceByFilePath(e);if(!t)throw new Error(`Workspace not found (${e})`);return t}tryWorkspaceByIdent(e){let t=this.workspacesByIdent.get(e.identHash);return typeof t=="undefined"?null:t}getWorkspaceByIdent(e){let t=this.tryWorkspaceByIdent(e);if(!t)throw new Error(`Workspace not found (${fi(this.configuration,e)})`);return t}tryWorkspaceByDescriptor(e){let t=this.tryWorkspaceByIdent(e);return t===null||(Al(e)&&(e=ud(e)),!t.accepts(e.range))?null:t}getWorkspaceByDescriptor(e){let t=this.tryWorkspaceByDescriptor(e);if(t===null)throw new Error(`Workspace not found (${sr(this.configuration,e)})`);return t}tryWorkspaceByLocator(e){let t=this.tryWorkspaceByIdent(e);return t===null||(ea(e)&&(e=gd(e)),t.locator.locatorHash!==e.locatorHash&&t.anchoredLocator.locatorHash!==e.locatorHash)?null:t}getWorkspaceByLocator(e){let t=this.tryWorkspaceByLocator(e);if(!t)throw new Error(`Workspace not found (${It(this.configuration,e)})`);return t}refreshWorkspaceDependencies(){for(let e of this.workspaces){let t=this.storedPackages.get(e.anchoredLocator.locatorHash);if(!t)throw new Error(`Assertion failed: Expected workspace ${Cd(this.configuration,e)} (${tt(this.configuration,k.join(e.cwd,kt.manifest),qe.PATH)}) to have been resolved. Run "yarn install" to update the lockfile`);e.dependencies=new Map(t.dependencies)}}forgetResolution(e){let t=n=>{this.storedResolutions.delete(n),this.storedDescriptors.delete(n)},i=n=>{this.originalPackages.delete(n),this.storedPackages.delete(n),this.accessibleLocators.delete(n)};if("descriptorHash"in e){let n=this.storedResolutions.get(e.descriptorHash);t(e.descriptorHash);let s=new Set(this.storedResolutions.values());typeof n!="undefined"&&!s.has(n)&&i(n)}if("locatorHash"in e){i(e.locatorHash);for(let[n,s]of this.storedResolutions)s===e.locatorHash&&t(n)}}forgetTransientResolutions(){let e=this.configuration.makeResolver();for(let t of this.originalPackages.values()){let i;try{i=e.shouldPersistResolution(t,{project:this,resolver:e})}catch{i=!1}i||this.forgetResolution(t)}}forgetVirtualResolutions(){for(let e of this.storedPackages.values())for(let[t,i]of e.dependencies)Al(i)&&e.dependencies.set(t,ud(i))}getDependencyMeta(e,t){let i={},s=this.topLevelWorkspace.manifest.dependenciesMeta.get(Ot(e));if(!s)return i;let o=s.get(null);if(o&&Object.assign(i,o),t===null||!sZ.default.valid(t))return i;for(let[a,l]of s)a!==null&&a===t&&Object.assign(i,l);return i}async findLocatorForLocation(e,{strict:t=!1}={}){let i=new di,n=this.configuration.getLinkers(),s={project:this,report:i};for(let o of n){let a=await o.findPackageLocator(e,s);if(a){if(t&&(await o.findPackageLocation(a,s)).replace(aZ,"")!==e.replace(aZ,""))continue;return a}}return null}async resolveEverything(e){if(!this.workspacesByCwd||!this.workspacesByIdent)throw new Error("Workspaces must have been setup before calling this function");this.forgetVirtualResolutions(),e.lockfileOnly||this.forgetTransientResolutions();let t=e.resolver||this.configuration.makeResolver(),i=new NR(t);await i.setup(this,{report:e.report});let n=e.lockfileOnly?[new TR(t)]:[i,t],s=new wd([new LR(t),...n]),o=this.configuration.makeFetcher(),a=e.lockfileOnly?{project:this,report:e.report,resolver:s}:{project:this,report:e.report,resolver:s,fetchOptions:{project:this,cache:e.cache,checksums:this.storedChecksums,report:e.report,fetcher:o,cacheOptions:{mirrorWriteOnly:!0}}},l=new Map,c=new Map,u=new Map,g=new Map,f=new Map,h=new Map,p=this.topLevelWorkspace.anchoredLocator,m=new Set,y=[],b=ck(),v=this.configuration.getSupportedArchitectures();await e.report.startProgressPromise(Ji.progressViaTitle(),async ne=>{let ee=async O=>{let L=await Lg(async()=>await s.resolve(O,a),je=>`${It(this.configuration,O)}: ${je}`);if(!hd(O,L))throw new Error(`Assertion failed: The locator cannot be changed by the resolver (went from ${It(this.configuration,O)} to ${It(this.configuration,L)})`);g.set(L.locatorHash,L);let de=this.configuration.normalizePackage(L);for(let[je,re]of de.dependencies){let se=await this.configuration.reduceHook(he=>he.reduceDependency,re,this,de,re,{resolver:s,resolveOptions:a});if(!fd(re,se))throw new Error("Assertion failed: The descriptor ident cannot be changed through aliases");let be=s.bindDescriptor(se,O,a);de.dependencies.set(je,be)}let Be=go([...de.dependencies.values()].map(je=>Z(je)));return y.push(Be),Be.catch(()=>{}),c.set(de.locatorHash,de),de},A=async O=>{let L=f.get(O.locatorHash);if(typeof L!="undefined")return L;let de=Promise.resolve().then(()=>ee(O));return f.set(O.locatorHash,de),de},oe=async(O,L)=>{let de=await Z(L);return l.set(O.descriptorHash,O),u.set(O.descriptorHash,de.locatorHash),de},ce=async O=>{ne.setTitle(sr(this.configuration,O));let L=this.resolutionAliases.get(O.descriptorHash);if(typeof L!="undefined")return oe(O,this.storedDescriptors.get(L));let de=s.getResolutionDependencies(O,a),Be=new Map(await go(de.map(async se=>{let be=s.bindDescriptor(se,p,a),he=await Z(be);return m.add(he.locatorHash),[se.descriptorHash,he]}))),re=(await Lg(async()=>await s.getCandidates(O,Be,a),se=>`${sr(this.configuration,O)}: ${se}`))[0];if(typeof re=="undefined")throw new Error(`${sr(this.configuration,O)}: No candidates found`);return l.set(O.descriptorHash,O),u.set(O.descriptorHash,re.locatorHash),A(re)},Z=O=>{let L=h.get(O.descriptorHash);if(typeof L!="undefined")return L;l.set(O.descriptorHash,O);let de=Promise.resolve().then(()=>ce(O));return h.set(O.descriptorHash,de),de};for(let O of this.workspaces){let L=O.anchoredDescriptor;y.push(Z(L))}for(;y.length>0;){let O=[...y];y.length=0,await go(O)}});let x=new Set(this.resolutionAliases.values()),T=new Set(c.keys()),q=new Set,Y=new Map;ZOe({project:this,report:e.report,accessibleLocators:q,volatileDescriptors:x,optionalBuilds:T,peerRequirements:Y,allDescriptors:l,allResolutions:u,allPackages:c});for(let ne of m)T.delete(ne);for(let ne of x)l.delete(ne),u.delete(ne);let $=new Set,_=new Set;for(let ne of c.values())ne.conditions!=null&&(!T.has(ne.locatorHash)||(gw(ne,v)||(gw(ne,b)&&e.report.reportWarningOnce(X.GHOST_ARCHITECTURE,`${It(this.configuration,ne)}: Your current architecture (${process.platform}-${process.arch}) is supported by this package, but is missing from the ${tt(this.configuration,"supportedArchitectures",Ri.SETTING)} setting`),_.add(ne.locatorHash)),$.add(ne.locatorHash)));this.storedResolutions=u,this.storedDescriptors=l,this.storedPackages=c,this.accessibleLocators=q,this.conditionalLocators=$,this.disabledLocators=_,this.originalPackages=g,this.optionalBuilds=T,this.peerRequirements=Y,this.refreshWorkspaceDependencies()}async fetchEverything({cache:e,report:t,fetcher:i,mode:n}){let s={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators},o=i||this.configuration.makeFetcher(),a={checksums:this.storedChecksums,project:this,cache:e,fetcher:o,report:t,cacheOptions:s},l=Array.from(new Set(kn(this.storedResolutions.values(),[f=>{let h=this.storedPackages.get(f);if(!h)throw new Error("Assertion failed: The locator should have been registered");return Rs(h)}])));n===Ci.UpdateLockfile&&(l=l.filter(f=>!this.storedChecksums.has(f)));let c=!1,u=Ji.progressViaCounter(l.length);t.reportProgress(u);let g=(0,nZ.default)(_Oe);if(await t.startCacheReport(async()=>{await go(l.map(f=>g(async()=>{let h=this.storedPackages.get(f);if(!h)throw new Error("Assertion failed: The locator should have been registered");if(ea(h))return;let p;try{p=await o.fetch(h,a)}catch(m){m.message=`${It(this.configuration,h)}: ${m.message}`,t.reportExceptionOnce(m),c=m;return}p.checksum!=null?this.storedChecksums.set(h.locatorHash,p.checksum):this.storedChecksums.delete(h.locatorHash),p.releaseFs&&p.releaseFs()}).finally(()=>{u.tick()})))}),c)throw c}async linkEverything({cache:e,report:t,fetcher:i,mode:n}){var A,oe,ce;let s={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators,skipIntegrityCheck:!0},o=i||this.configuration.makeFetcher(),a={checksums:this.storedChecksums,project:this,cache:e,fetcher:o,report:t,skipIntegrityCheck:!0,cacheOptions:s},l=this.configuration.getLinkers(),c={project:this,report:t},u=new Map(l.map(Z=>{let O=Z.makeInstaller(c),L=O.getCustomDataKey(),de=this.installersCustomData.get(L);return typeof de!="undefined"&&O.attachCustomData(de),[Z,O]})),g=new Map,f=new Map,h=new Map,p=new Map(await go([...this.accessibleLocators].map(async Z=>{let O=this.storedPackages.get(Z);if(!O)throw new Error("Assertion failed: The locator should have been registered");return[Z,await o.fetch(O,a)]}))),m=[];for(let Z of this.accessibleLocators){let O=this.storedPackages.get(Z);if(typeof O=="undefined")throw new Error("Assertion failed: The locator should have been registered");let L=p.get(O.locatorHash);if(typeof L=="undefined")throw new Error("Assertion failed: The fetch result should have been registered");let de=[],Be=re=>{de.push(re)},je=this.tryWorkspaceByLocator(O);if(je!==null){let re=[],{scripts:se}=je.manifest;for(let he of["preinstall","install","postinstall"])se.has(he)&&re.push([cs.SCRIPT,he]);try{for(let[he,Fe]of u)if(he.supportsPackage(O,c)&&(await Fe.installPackage(O,L,{holdFetchResult:Be})).buildDirective!==null)throw new Error("Assertion failed: Linkers can't return build directives for workspaces; this responsibility befalls to the Yarn core")}finally{de.length===0?(A=L.releaseFs)==null||A.call(L):m.push(go(de).catch(()=>{}).then(()=>{var he;(he=L.releaseFs)==null||he.call(L)}))}let be=k.join(L.packageFs.getRealPath(),L.prefixPath);f.set(O.locatorHash,be),!ea(O)&&re.length>0&&h.set(O.locatorHash,{directives:re,buildLocations:[be]})}else{let re=l.find(he=>he.supportsPackage(O,c));if(!re)throw new ct(X.LINKER_NOT_FOUND,`${It(this.configuration,O)} isn't supported by any available linker`);let se=u.get(re);if(!se)throw new Error("Assertion failed: The installer should have been registered");let be;try{be=await se.installPackage(O,L,{holdFetchResult:Be})}finally{de.length===0?(oe=L.releaseFs)==null||oe.call(L):m.push(go(de).then(()=>{}).then(()=>{var he;(he=L.releaseFs)==null||he.call(L)}))}g.set(O.locatorHash,re),f.set(O.locatorHash,be.packageLocation),be.buildDirective&&be.buildDirective.length>0&&be.packageLocation&&h.set(O.locatorHash,{directives:be.buildDirective,buildLocations:[be.packageLocation]})}}let y=new Map;for(let Z of this.accessibleLocators){let O=this.storedPackages.get(Z);if(!O)throw new Error("Assertion failed: The locator should have been registered");let L=this.tryWorkspaceByLocator(O)!==null,de=async(Be,je)=>{let re=f.get(O.locatorHash);if(typeof re=="undefined")throw new Error(`Assertion failed: The package (${It(this.configuration,O)}) should have been registered`);let se=[];for(let be of O.dependencies.values()){let he=this.storedResolutions.get(be.descriptorHash);if(typeof he=="undefined")throw new Error(`Assertion failed: The resolution (${sr(this.configuration,be)}, from ${It(this.configuration,O)})should have been registered`);let Fe=this.storedPackages.get(he);if(typeof Fe=="undefined")throw new Error(`Assertion failed: The package (${he}, resolved from ${sr(this.configuration,be)}) should have been registered`);let Ke=this.tryWorkspaceByLocator(Fe)===null?g.get(he):null;if(typeof Ke=="undefined")throw new Error(`Assertion failed: The package (${he}, resolved from ${sr(this.configuration,be)}) should have been registered`);Ke===Be||Ke===null?f.get(Fe.locatorHash)!==null&&se.push([be,Fe]):!L&&re!==null&&Fg(y,he).push(re)}re!==null&&await je.attachInternalDependencies(O,se)};if(L)for(let[Be,je]of u)Be.supportsPackage(O,c)&&await de(Be,je);else{let Be=g.get(O.locatorHash);if(!Be)throw new Error("Assertion failed: The linker should have been found");let je=u.get(Be);if(!je)throw new Error("Assertion failed: The installer should have been registered");await de(Be,je)}}for(let[Z,O]of y){let L=this.storedPackages.get(Z);if(!L)throw new Error("Assertion failed: The package should have been registered");let de=g.get(L.locatorHash);if(!de)throw new Error("Assertion failed: The linker should have been found");let Be=u.get(de);if(!Be)throw new Error("Assertion failed: The installer should have been registered");await Be.attachExternalDependents(L,O)}let b=new Map;for(let Z of u.values()){let O=await Z.finalizeInstall();for(let L of(ce=O==null?void 0:O.records)!=null?ce:[])h.set(L.locatorHash,{directives:L.buildDirective,buildLocations:L.buildLocations});typeof(O==null?void 0:O.customData)!="undefined"&&b.set(Z.getCustomDataKey(),O.customData)}if(this.installersCustomData=b,await go(m),n===Ci.SkipBuild)return;let v=new Set(this.storedPackages.keys()),x=new Set(h.keys());for(let Z of x)v.delete(Z);let T=(0,i0.createHash)("sha512");T.update(process.versions.node),await this.configuration.triggerHook(Z=>Z.globalHashGeneration,this,Z=>{T.update("\0"),T.update(Z)});let q=T.digest("hex"),Y=new Map,$=Z=>{let O=Y.get(Z.locatorHash);if(typeof O!="undefined")return O;let L=this.storedPackages.get(Z.locatorHash);if(typeof L=="undefined")throw new Error("Assertion failed: The package should have been registered");let de=(0,i0.createHash)("sha512");de.update(Z.locatorHash),Y.set(Z.locatorHash,"");for(let Be of L.dependencies.values()){let je=this.storedResolutions.get(Be.descriptorHash);if(typeof je=="undefined")throw new Error(`Assertion failed: The resolution (${sr(this.configuration,Be)}) should have been registered`);let re=this.storedPackages.get(je);if(typeof re=="undefined")throw new Error("Assertion failed: The package should have been registered");de.update($(re))}return O=de.digest("hex"),Y.set(Z.locatorHash,O),O},_=(Z,O)=>{let L=(0,i0.createHash)("sha512");L.update(q),L.update($(Z));for(let de of O)L.update(de);return L.digest("hex")},ne=new Map,ee=!1;for(;x.size>0;){let Z=x.size,O=[];for(let L of x){let de=this.storedPackages.get(L);if(!de)throw new Error("Assertion failed: The package should have been registered");let Be=!0;for(let se of de.dependencies.values()){let be=this.storedResolutions.get(se.descriptorHash);if(!be)throw new Error(`Assertion failed: The resolution (${sr(this.configuration,se)}) should have been registered`);if(x.has(be)){Be=!1;break}}if(!Be)continue;x.delete(L);let je=h.get(de.locatorHash);if(!je)throw new Error("Assertion failed: The build directive should have been registered");let re=_(de,je.buildLocations);if(this.storedBuildState.get(de.locatorHash)===re){ne.set(de.locatorHash,re);continue}ee||(await this.persistInstallStateFile(),ee=!0),this.storedBuildState.has(de.locatorHash)?t.reportInfo(X.MUST_REBUILD,`${It(this.configuration,de)} must be rebuilt because its dependency tree changed`):t.reportInfo(X.MUST_BUILD,`${It(this.configuration,de)} must be built because it never has been before or the last one failed`);for(let se of je.buildLocations){if(!k.isAbsolute(se))throw new Error(`Assertion failed: Expected the build location to be absolute (not ${se})`);O.push((async()=>{for(let[be,he]of je.directives){let Fe=`# This file contains the result of Yarn building a package (${Rs(de)}) +`;switch(be){case cs.SCRIPT:Fe+=`# Script name: ${he} +`;break;case cs.SHELLCODE:Fe+=`# Script code: ${he} +`;break}let Ke=null;if(!await K.mktempPromise(async ve=>{let pe=k.join(ve,"build.log"),{stdout:V,stderr:Qe}=this.configuration.getSubprocessStreams(pe,{header:Fe,prefix:It(this.configuration,de),report:t}),le;try{switch(be){case cs.SCRIPT:le=await nB(de,he,[],{cwd:se,project:this,stdin:Ke,stdout:V,stderr:Qe});break;case cs.SHELLCODE:le=await rD(de,he,[],{cwd:se,project:this,stdin:Ke,stdout:V,stderr:Qe});break}}catch(gt){Qe.write(gt.stack),le=1}if(V.end(),Qe.end(),le===0)return ne.set(de.locatorHash,re),!0;K.detachTemp(ve);let fe=`${It(this.configuration,de)} couldn't be built successfully (exit code ${tt(this.configuration,le,qe.NUMBER)}, logs can be found here: ${tt(this.configuration,pe,qe.PATH)})`;return this.optionalBuilds.has(de.locatorHash)?(t.reportInfo(X.BUILD_FAILED,fe),ne.set(de.locatorHash,re),!0):(t.reportError(X.BUILD_FAILED,fe),!1)}))return}})())}}if(await go(O),Z===x.size){let L=Array.from(x).map(de=>{let Be=this.storedPackages.get(de);if(!Be)throw new Error("Assertion failed: The package should have been registered");return It(this.configuration,Be)}).join(", ");t.reportError(X.CYCLIC_DEPENDENCIES,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${L})`);break}}this.storedBuildState=ne}async install(e){var a,l;let t=this.configuration.get("nodeLinker");(a=ye.telemetry)==null||a.reportInstall(t),await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(c=>c.validateProject,this,{reportWarning:e.report.reportWarning.bind(e.report),reportError:e.report.reportError.bind(e.report)})});for(let c of this.configuration.packageExtensions.values())for(let[,u]of c)for(let g of u)g.status=qi.Inactive;let i=k.join(this.cwd,this.configuration.get("lockfileFilename")),n=null;if(e.immutable)try{n=await K.readFilePromise(i,"utf8")}catch(c){throw c.code==="ENOENT"?new ct(X.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been created by this install, which is explicitly forbidden."):c}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{for(let[,c]of this.configuration.packageExtensions)for(let[,u]of c)for(let g of u)if(g.userProvided){let f=tt(this.configuration,g,qe.PACKAGE_EXTENSION);switch(g.status){case qi.Inactive:e.report.reportWarning(X.UNUSED_PACKAGE_EXTENSION,`${f}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case qi.Redundant:e.report.reportWarning(X.REDUNDANT_PACKAGE_EXTENSION,`${f}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(n!==null){let c=sc(n,this.generateLockfile());if(c!==n){let u=V6(i,i,n,c,void 0,void 0,{maxEditLength:100});if(u){e.report.reportSeparator();for(let g of u.hunks){e.report.reportInfo(null,`@@ -${g.oldStart},${g.oldLines} +${g.newStart},${g.newLines} @@`);for(let f of g.lines)f.startsWith("+")?e.report.reportError(X.FROZEN_LOCKFILE_EXCEPTION,tt(this.configuration,f,qe.ADDED)):f.startsWith("-")?e.report.reportError(X.FROZEN_LOCKFILE_EXCEPTION,tt(this.configuration,f,qe.REMOVED)):e.report.reportInfo(null,tt(this.configuration,f,"grey"))}e.report.reportSeparator()}throw new ct(X.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let c of this.configuration.packageExtensions.values())for(let[,u]of c)for(let g of u)g.userProvided&&g.status===qi.Active&&((l=ye.telemetry)==null||l.reportPackageExtension(Oc(g,qe.PACKAGE_EXTENSION)));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(e),(typeof e.persistProject=="undefined"||e.persistProject)&&e.mode!==Ci.UpdateLockfile&&await this.cacheCleanup(e)});let s=e.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],o=await Promise.all(s.map(async c=>ow(c,{cwd:this.cwd})));(typeof e.persistProject=="undefined"||e.persistProject)&&await this.persist(),await e.report.startTimerPromise("Link step",async()=>{if(e.mode===Ci.UpdateLockfile){e.report.reportWarning(X.UPDATE_LOCKFILE_ONLY_SKIP_LINK,`Skipped due to ${tt(this.configuration,"mode=update-lockfile",qe.CODE)}`);return}await this.linkEverything(e);let c=await Promise.all(s.map(async u=>ow(u,{cwd:this.cwd})));for(let u=0;uc.afterAllInstalled,this,e)}generateLockfile(){let e=new Map;for(let[n,s]of this.storedResolutions.entries()){let o=e.get(s);o||e.set(s,o=new Set),o.add(n)}let t={};t.__metadata={version:oZ,cacheKey:void 0};for(let[n,s]of e.entries()){let o=this.originalPackages.get(n);if(!o)continue;let a=[];for(let f of s){let h=this.storedDescriptors.get(f);if(!h)throw new Error("Assertion failed: The descriptor should have been registered");a.push(h)}let l=a.map(f=>Pn(f)).sort().join(", "),c=new At;c.version=o.linkType===Qt.HARD?o.version:"0.0.0-use.local",c.languageName=o.languageName,c.dependencies=new Map(o.dependencies),c.peerDependencies=new Map(o.peerDependencies),c.dependenciesMeta=new Map(o.dependenciesMeta),c.peerDependenciesMeta=new Map(o.peerDependenciesMeta),c.bin=new Map(o.bin);let u,g=this.storedChecksums.get(o.locatorHash);if(typeof g!="undefined"){let f=g.indexOf("/");if(f===-1)throw new Error("Assertion failed: Expected the checksum to reference its cache key");let h=g.slice(0,f),p=g.slice(f+1);typeof t.__metadata.cacheKey=="undefined"&&(t.__metadata.cacheKey=h),h===t.__metadata.cacheKey?u=p:u=g}t[l]=te(N({},c.exportTo({},{compatibilityMode:!1})),{linkType:o.linkType.toLowerCase(),resolution:Rs(o),checksum:u,conditions:o.conditions||void 0})}return`${[`# This file is generated by running "yarn install" inside your project. +`,`# Manual changes might be lost - proceed with caution! +`].join("")} +`+Ma(t)}async persistLockfile(){let e=k.join(this.cwd,this.configuration.get("lockfileFilename")),t="";try{t=await K.readFilePromise(e,"utf8")}catch(s){}let i=this.generateLockfile(),n=sc(t,i);n!==t&&(await K.writeFilePromise(e,n),this.lockFileChecksum=AZ(n),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let e=[];for(let o of Object.values(UR))e.push(...o);let t=(0,n0.default)(this,e),i=MR.default.serialize(t),n=ln(i);if(this.installStateChecksum===n)return;let s=this.configuration.get("installStatePath");await K.mkdirPromise(k.dirname(s),{recursive:!0}),await K.writeFilePromise(s,await VOe(i)),this.installStateChecksum=n}async restoreInstallState({restoreInstallersCustomData:e=!0,restoreResolutions:t=!0,restoreBuildState:i=!0}={}){let n=this.configuration.get("installStatePath"),s;try{let o=await XOe(await K.readFilePromise(n));s=MR.default.deserialize(o),this.installStateChecksum=ln(o)}catch{t&&await this.applyLightResolution();return}e&&typeof s.installersCustomData!="undefined"&&(this.installersCustomData=s.installersCustomData),i&&Object.assign(this,(0,n0.default)(s,UR.restoreBuildState)),t&&(s.lockFileChecksum===this.lockFileChecksum?(Object.assign(this,(0,n0.default)(s,UR.restoreResolutions)),this.refreshWorkspaceDependencies()):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new di}),await this.persistInstallStateFile()}async persist(){await this.persistLockfile();for(let e of this.workspacesByCwd.values())await e.persistManifest()}async cacheCleanup({cache:e,report:t}){if(this.configuration.get("enableGlobalCache"))return;let i=new Set([".gitignore"]);if(!Ak(e.cwd,this.cwd)||!await K.existsPromise(e.cwd))return;let n=this.configuration.get("preferAggregateCacheInfo"),s=0,o=null;for(let a of await K.readdirPromise(e.cwd)){if(i.has(a))continue;let l=k.resolve(e.cwd,a);e.markedFiles.has(l)||(o=a,e.immutable?t.reportError(X.IMMUTABLE_CACHE,`${tt(this.configuration,k.basename(l),"magenta")} appears to be unused and would be marked for deletion, but the cache is immutable`):(n?s+=1:t.reportInfo(X.UNUSED_CACHE_ENTRY,`${tt(this.configuration,k.basename(l),"magenta")} appears to be unused - removing`),await K.removePromise(l)))}n&&s!==0&&t.reportInfo(X.UNUSED_CACHE_ENTRY,s>1?`${s} packages appeared to be unused and were removed`:`${o} appeared to be unused and was removed`),e.markedFiles.clear()}};function ZOe({project:r,allDescriptors:e,allResolutions:t,allPackages:i,accessibleLocators:n=new Set,optionalBuilds:s=new Set,peerRequirements:o=new Map,volatileDescriptors:a=new Set,report:l,tolerateMissingPackages:c=!1}){var ne;let u=new Map,g=[],f=new Map,h=new Map,p=new Map,m=new Map,y=new Map,b=new Map(r.workspaces.map(ee=>{let A=ee.anchoredLocator.locatorHash,oe=i.get(A);if(typeof oe=="undefined"){if(c)return[A,null];throw new Error("Assertion failed: The workspace should have an associated package")}return[A,cd(oe)]})),v=()=>{let ee=K.mktempSync(),A=k.join(ee,"stacktrace.log"),oe=String(g.length+1).length,ce=g.map((Z,O)=>`${`${O+1}.`.padStart(oe," ")} ${Rs(Z)} +`).join("");throw K.writeFileSync(A,ce),K.detachTemp(ee),new ct(X.STACK_OVERFLOW_RESOLUTION,`Encountered a stack overflow when resolving peer dependencies; cf ${H.fromPortablePath(A)}`)},x=ee=>{let A=t.get(ee.descriptorHash);if(typeof A=="undefined")throw new Error("Assertion failed: The resolution should have been registered");let oe=i.get(A);if(!oe)throw new Error("Assertion failed: The package could not be found");return oe},T=(ee,A,oe,{top:ce,optional:Z})=>{g.length>1e3&&v(),g.push(A);let O=q(ee,A,oe,{top:ce,optional:Z});return g.pop(),O},q=(ee,A,oe,{top:ce,optional:Z})=>{if(n.has(A.locatorHash))return;n.add(A.locatorHash),Z||s.delete(A.locatorHash);let O=i.get(A.locatorHash);if(!O){if(c)return;throw new Error(`Assertion failed: The package (${It(r.configuration,A)}) should have been registered`)}let L=[],de=[],Be=[],je=[],re=[];for(let be of Array.from(O.dependencies.values())){if(O.peerDependencies.has(be.identHash)&&O.locatorHash!==ce)continue;if(Al(be))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");a.delete(be.descriptorHash);let he=Z;if(!he){let Qe=O.dependenciesMeta.get(Ot(be));if(typeof Qe!="undefined"){let le=Qe.get(null);typeof le!="undefined"&&le.optional&&(he=!0)}}let Fe=t.get(be.descriptorHash);if(!Fe){if(c)continue;throw new Error(`Assertion failed: The resolution (${sr(r.configuration,be)}) should have been registered`)}let Ke=b.get(Fe)||i.get(Fe);if(!Ke)throw new Error(`Assertion failed: The package (${Fe}, resolved from ${sr(r.configuration,be)}) should have been registered`);if(Ke.peerDependencies.size===0){T(be,Ke,new Map,{top:ce,optional:he});continue}let ke,ve,pe=new Set,V;de.push(()=>{ke=Vx(be,A.locatorHash),ve=Xx(Ke,A.locatorHash),O.dependencies.delete(be.identHash),O.dependencies.set(ke.identHash,ke),t.set(ke.descriptorHash,ve.locatorHash),e.set(ke.descriptorHash,ke),i.set(ve.locatorHash,ve),L.push([Ke,ke,ve])}),Be.push(()=>{var Qe;V=new Map;for(let le of ve.peerDependencies.values()){let fe=O.dependencies.get(le.identHash);if(!fe&&fd(A,le)&&(ee.identHash===A.identHash?fe=ee:(fe=rr(A,ee.range),e.set(fe.descriptorHash,fe),t.set(fe.descriptorHash,A.locatorHash),a.delete(fe.descriptorHash))),(!fe||fe.range==="missing:")&&ve.dependencies.has(le.identHash)){ve.peerDependencies.delete(le.identHash);continue}fe||(fe=rr(le,"missing:")),ve.dependencies.set(fe.identHash,fe),Al(fe)&&Nc(p,fe.descriptorHash).add(ve.locatorHash),f.set(fe.identHash,fe),fe.range==="missing:"&&pe.add(fe.identHash),V.set(le.identHash,(Qe=oe.get(le.identHash))!=null?Qe:ve.locatorHash)}ve.dependencies=new Map(kn(ve.dependencies,([le,fe])=>Ot(fe)))}),je.push(()=>{if(!i.has(ve.locatorHash))return;let Qe=u.get(Ke.locatorHash);typeof Qe=="number"&&Qe>=2&&v();let le=u.get(Ke.locatorHash),fe=typeof le!="undefined"?le+1:1;u.set(Ke.locatorHash,fe),T(ke,ve,V,{top:ce,optional:he}),u.set(Ke.locatorHash,fe-1)}),re.push(()=>{let Qe=O.dependencies.get(be.identHash);if(typeof Qe=="undefined")throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");let le=t.get(Qe.descriptorHash);if(typeof le=="undefined")throw new Error("Assertion failed: Expected the descriptor to be registered");if(Nc(y,le).add(A.locatorHash),!!i.has(ve.locatorHash)){for(let fe of ve.peerDependencies.values()){let gt=V.get(fe.identHash);if(typeof gt=="undefined")throw new Error("Assertion failed: Expected the peer dependency ident to be registered");Fg(Ng(m,gt),Ot(fe)).push(ve.locatorHash)}for(let fe of pe)ve.dependencies.delete(fe)}})}for(let be of[...de,...Be])be();let se;do{se=!0;for(let[be,he,Fe]of L){let Ke=Ng(h,be.locatorHash),ke=ln(...[...Fe.dependencies.values()].map(Qe=>{let le=Qe.range!=="missing:"?t.get(Qe.descriptorHash):"missing:";if(typeof le=="undefined")throw new Error(`Assertion failed: Expected the resolution for ${sr(r.configuration,Qe)} to have been registered`);return le===ce?`${le} (top)`:le}),he.identHash),ve=Ke.get(ke);if(typeof ve=="undefined"){Ke.set(ke,he);continue}if(ve===he)continue;i.delete(Fe.locatorHash),e.delete(he.descriptorHash),t.delete(he.descriptorHash),n.delete(Fe.locatorHash);let pe=p.get(he.descriptorHash)||[],V=[O.locatorHash,...pe];p.delete(he.descriptorHash);for(let Qe of V){let le=i.get(Qe);typeof le!="undefined"&&(le.dependencies.get(he.identHash).descriptorHash!==ve.descriptorHash&&(se=!1),le.dependencies.set(he.identHash,ve))}}}while(!se);for(let be of[...je,...re])be()};for(let ee of r.workspaces){let A=ee.anchoredLocator;a.delete(ee.anchoredDescriptor.descriptorHash),T(ee.anchoredDescriptor,A,new Map,{top:A.locatorHash,optional:!1})}var Y;(function(oe){oe[oe.NotProvided=0]="NotProvided",oe[oe.NotCompatible=1]="NotCompatible"})(Y||(Y={}));let $=[];for(let[ee,A]of y){let oe=i.get(ee);if(typeof oe=="undefined")throw new Error("Assertion failed: Expected the root to be registered");let ce=m.get(ee);if(typeof ce!="undefined")for(let Z of A){let O=i.get(Z);if(typeof O!="undefined")for(let[L,de]of ce){let Be=An(L);if(O.peerDependencies.has(Be.identHash))continue;let je=`p${ln(Z,L,ee).slice(0,5)}`;o.set(je,{subject:Z,requested:Be,rootRequester:ee,allRequesters:de});let re=oe.dependencies.get(Be.identHash);if(typeof re!="undefined"){let se=x(re),be=(ne=se.version)!=null?ne:"0.0.0",he=new Set;for(let Ke of de){let ke=i.get(Ke);if(typeof ke=="undefined")throw new Error("Assertion failed: Expected the link to be registered");let ve=ke.peerDependencies.get(Be.identHash);if(typeof ve=="undefined")throw new Error("Assertion failed: Expected the ident to be registered");he.add(ve.range)}[...he].every(Ke=>{if(Ke.startsWith(oi.protocol)){if(!r.tryWorkspaceByLocator(se))return!1;Ke=Ke.slice(oi.protocol.length),(Ke==="^"||Ke==="~")&&(Ke="*")}return qc(be,Ke)})||$.push({type:1,subject:O,requested:Be,requester:oe,version:be,hash:je,requirementCount:de.length})}else{let se=oe.peerDependenciesMeta.get(L);(se==null?void 0:se.optional)||$.push({type:0,subject:O,requested:Be,requester:oe,hash:je})}}}}let _=[ee=>$x(ee.subject),ee=>Ot(ee.requested),ee=>`${ee.type}`];l==null||l.startSectionSync({reportFooter:()=>{l.reportWarning(X.UNNAMED,`Some peer dependencies are incorrectly met; run ${tt(r.configuration,"yarn explain peer-requirements ",qe.CODE)} for details, where ${tt(r.configuration,"",qe.CODE)} is the six-letter p-prefixed code`)},skipIfEmpty:!0},()=>{for(let ee of kn($,_))switch(ee.type){case 0:l.reportWarning(X.MISSING_PEER_DEPENDENCY,`${It(r.configuration,ee.subject)} doesn't provide ${fi(r.configuration,ee.requested)} (${tt(r.configuration,ee.hash,qe.CODE)}), requested by ${fi(r.configuration,ee.requester)}`);break;case 1:{let A=ee.requirementCount>1?"and some of its descendants request":"requests";l.reportWarning(X.INCOMPATIBLE_PEER_DEPENDENCY,`${It(r.configuration,ee.subject)} provides ${fi(r.configuration,ee.requested)} (${tt(r.configuration,ee.hash,qe.CODE)}) with version ${dd(r.configuration,ee.version)}, which doesn't satisfy what ${fi(r.configuration,ee.requester)} ${A}`)}break}})}var ca;(function(l){l.VERSION="version",l.COMMAND_NAME="commandName",l.PLUGIN_NAME="pluginName",l.INSTALL_COUNT="installCount",l.PROJECT_COUNT="projectCount",l.WORKSPACE_COUNT="workspaceCount",l.DEPENDENCY_COUNT="dependencyCount",l.EXTENSION="packageExtension"})(ca||(ca={}));var mC=class{constructor(e,t){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.configuration=e;let i=this.getRegistryPath();this.isNew=!K.existsSync(i),this.sendReport(t),this.startBuffer()}reportVersion(e){this.reportValue(ca.VERSION,e.replace(/-git\..*/,"-git"))}reportCommandName(e){this.reportValue(ca.COMMAND_NAME,e||"")}reportPluginName(e){this.reportValue(ca.PLUGIN_NAME,e)}reportProject(e){this.reportEnumerator(ca.PROJECT_COUNT,e)}reportInstall(e){this.reportHit(ca.INSTALL_COUNT,e)}reportPackageExtension(e){this.reportValue(ca.EXTENSION,e)}reportWorkspaceCount(e){this.reportValue(ca.WORKSPACE_COUNT,String(e))}reportDependencyCount(e){this.reportValue(ca.DEPENDENCY_COUNT,String(e))}reportValue(e,t){Nc(this.values,e).add(t)}reportEnumerator(e,t){Nc(this.enumerators,e).add(ln(t))}reportHit(e,t="*"){let i=Ng(this.hits,e),n=_a(i,t,()=>0);i.set(t,n+1)}getRegistryPath(){let e=this.configuration.get("globalFolder");return k.join(e,"telemetry.json")}sendReport(e){var u,g,f;let t=this.getRegistryPath(),i;try{i=K.readJsonSync(t)}catch{i={}}let n=Date.now(),s=this.configuration.get("telemetryInterval")*24*60*60*1e3,a=((u=i.lastUpdate)!=null?u:n+s+Math.floor(s*Math.random()))+s;if(a>n&&i.lastUpdate!=null)return;try{K.mkdirSync(k.dirname(t),{recursive:!0}),K.writeJsonSync(t,{lastUpdate:n})}catch{return}if(a>n||!i.blocks)return;let l=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${e}?ddsource=yarn`,c=h=>HP(l,h,{configuration:this.configuration}).catch(()=>{});for(let[h,p]of Object.entries((g=i.blocks)!=null?g:{})){if(Object.keys(p).length===0)continue;let m=p;m.userId=h,m.reportType="primary";for(let v of Object.keys((f=m.enumerators)!=null?f:{}))m.enumerators[v]=m.enumerators[v].length;c(m);let y=new Map,b=20;for(let[v,x]of Object.entries(m.values))x.length>0&&y.set(v,x.slice(0,b));for(;y.size>0;){let v={};v.userId=h,v.reportType="secondary",v.metrics={};for(let[x,T]of y)v.metrics[x]=T.shift(),T.length===0&&y.delete(x);c(v)}}}applyChanges(){var o,a,l,c,u,g,f,h,p;let e=this.getRegistryPath(),t;try{t=K.readJsonSync(e)}catch{t={}}let i=(o=this.configuration.get("telemetryUserId"))!=null?o:"*",n=t.blocks=(a=t.blocks)!=null?a:{},s=n[i]=(l=n[i])!=null?l:{};for(let m of this.hits.keys()){let y=s.hits=(c=s.hits)!=null?c:{},b=y[m]=(u=y[m])!=null?u:{};for(let[v,x]of this.hits.get(m))b[v]=((g=b[v])!=null?g:0)+x}for(let m of["values","enumerators"])for(let y of this[m].keys()){let b=s[m]=(f=s[m])!=null?f:{};b[y]=[...new Set([...(h=b[y])!=null?h:[],...(p=this[m].get(y))!=null?p:[]])]}K.mkdirSync(k.dirname(e),{recursive:!0}),K.writeJsonSync(e,t)}startBuffer(){process.on("exit",()=>{try{this.applyChanges()}catch{}})}};var HR=ge(require("child_process")),lZ=ge(Ic());var jR=ge(require("fs"));var Lf=new Map([["constraints",[["constraints","query"],["constraints","source"],["constraints"]]],["exec",[]],["interactive-tools",[["search"],["upgrade-interactive"]]],["stage",[["stage"]]],["typescript",[]],["version",[["version","apply"],["version","check"],["version"]]],["workspace-tools",[["workspaces","focus"],["workspaces","foreach"]]]]);function $Oe(r){let e=H.fromPortablePath(r);process.on("SIGINT",()=>{}),e?(0,HR.execFileSync)(process.execPath,[e,...process.argv.slice(2)],{stdio:"inherit",env:te(N({},process.env),{YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"})}):(0,HR.execFileSync)(e,process.argv.slice(2),{stdio:"inherit",env:te(N({},process.env),{YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"})})}async function s0({binaryVersion:r,pluginConfiguration:e}){async function t(){let n=new ws({binaryLabel:"Yarn Package Manager",binaryName:"yarn",binaryVersion:r});try{await i(n)}catch(s){process.stdout.write(n.error(s)),process.exitCode=1}}async function i(n){var m,y,b,v,x;let s=process.versions.node,o=">=12 <14 || 14.2 - 14.9 || >14.10.0";if(!Se.parseOptionalBoolean(process.env.YARN_IGNORE_NODE)&&!Wt.satisfiesWithPrereleases(s,o))throw new Pe(`This tool requires a Node version compatible with ${o} (got ${s}). Upgrade Node, or set \`YARN_IGNORE_NODE=1\` in your environment.`);let l=await ye.find(H.toPortablePath(process.cwd()),e,{usePath:!0,strict:!1}),c=l.get("yarnPath"),u=l.get("ignorePath"),g=l.get("ignoreCwd"),f=H.toPortablePath(H.resolve(process.argv[1])),h=T=>K.readFilePromise(T).catch(()=>Buffer.of());if(!u&&!g&&await(async()=>c===f||Buffer.compare(...await Promise.all([h(c),h(f)]))===0)()){process.env.YARN_IGNORE_PATH="1",process.env.YARN_IGNORE_CWD="1",await i(n);return}else if(c!==null&&!u)if(!K.existsSync(c))process.stdout.write(n.error(new Error(`The "yarn-path" option has been set (in ${l.sources.get("yarnPath")}), but the specified location doesn't exist (${c}).`))),process.exitCode=1;else try{$Oe(c)}catch(T){process.exitCode=T.code||1}else{u&&delete process.env.YARN_IGNORE_PATH,l.get("enableTelemetry")&&!lZ.isCI&&process.stdout.isTTY&&(ye.telemetry=new mC(l,"puba9cdc10ec5790a2cf4969dd413a47270")),(m=ye.telemetry)==null||m.reportVersion(r);for(let[$,_]of l.plugins.entries()){Lf.has((b=(y=$.match(/^@yarnpkg\/plugin-(.*)$/))==null?void 0:y[1])!=null?b:"")&&((v=ye.telemetry)==null||v.reportPluginName($));for(let ne of _.commands||[])n.register(ne)}let q=n.process(process.argv.slice(2));q.help||(x=ye.telemetry)==null||x.reportCommandName(q.path.join(" "));let Y=q.cwd;if(typeof Y!="undefined"&&!g){let $=(0,jR.realpathSync)(process.cwd()),_=(0,jR.realpathSync)(Y);if($!==_){process.chdir(Y),await t();return}}await n.runExit(q,{cwd:H.toPortablePath(process.cwd()),plugins:e,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr})}}return t().catch(n=>{process.stdout.write(n.stack||n.message),process.exitCode=1}).finally(()=>K.rmtempPromise())}function cZ(r){r.Command.Path=(...e)=>t=>{t.paths=t.paths||[],t.paths.push(e)};for(let e of["Array","Boolean","String","Proxy","Rest","Counter"])r.Command[e]=(...t)=>(i,n)=>{let s=r.Option[e](...t);Object.defineProperty(i,`__${n}`,{configurable:!1,enumerable:!0,get(){return s},set(o){this[n]=o}})};return r}var GC={};ft(GC,{BaseCommand:()=>Le,WorkspaceRequiredError:()=>ht,getDynamicLibs:()=>bre,getPluginConfiguration:()=>L0,main:()=>s0,openWorkspace:()=>Wf,pluginCommands:()=>Lf});var Le=class extends Re{constructor(){super(...arguments);this.cwd=J.String("--cwd",{hidden:!0})}};var ht=class extends Pe{constructor(e,t){let i=k.relative(e,t),n=k.join(e,At.fileName);super(`This command can only be run from within a workspace of your project (${i} isn't a workspace of ${n}).`)}};var sGe=ge(ri());ys();var oGe=ge(UF()),bre=()=>new Map([["@yarnpkg/cli",GC],["@yarnpkg/core",EC],["@yarnpkg/fslib",Zh],["@yarnpkg/libzip",Md],["@yarnpkg/parsers",op],["@yarnpkg/shell",Ud],["clipanion",Cp],["semver",sGe],["typanion",cg],["yup",oGe]]);async function Wf(r,e){let{project:t,workspace:i}=await ze.find(r,e);if(!i)throw new ht(t.cwd,e);return i}var Q_e=ge(ri());ys();var S_e=ge(UF());var GN={};ft(GN,{dedupeUtils:()=>wN,default:()=>mWe,suggestUtils:()=>lN});var Sae=ge(Ic());var Fne=ge(WC());ys();var lN={};ft(lN,{Modifier:()=>pa,Strategy:()=>Vr,Target:()=>Hr,WorkspaceModifier:()=>Xf,applyModifier:()=>kne,extractDescriptorFromPath:()=>gN,extractRangeModifier:()=>xne,fetchDescriptorFrom:()=>uN,findProjectDescriptors:()=>Rne,getModifier:()=>zC,getSuggestedDescriptors:()=>_C,makeWorkspaceDescriptor:()=>Dne,toWorkspaceModifier:()=>Pne});var cN=ge(ri()),bYe="workspace:",Hr;(function(i){i.REGULAR="dependencies",i.DEVELOPMENT="devDependencies",i.PEER="peerDependencies"})(Hr||(Hr={}));var pa;(function(i){i.CARET="^",i.TILDE="~",i.EXACT=""})(pa||(pa={}));var Xf;(function(i){i.CARET="^",i.TILDE="~",i.EXACT="*"})(Xf||(Xf={}));var Vr;(function(s){s.KEEP="keep",s.REUSE="reuse",s.PROJECT="project",s.LATEST="latest",s.CACHE="cache"})(Vr||(Vr={}));function zC(r,e){return r.exact?pa.EXACT:r.caret?pa.CARET:r.tilde?pa.TILDE:e.configuration.get("defaultSemverRangePrefix")}var QYe=/^([\^~]?)[0-9]+(?:\.[0-9]+){0,2}(?:-\S+)?$/;function xne(r,{project:e}){let t=r.match(QYe);return t?t[1]:e.configuration.get("defaultSemverRangePrefix")}function kne(r,e){let{protocol:t,source:i,params:n,selector:s}=P.parseRange(r.range);return cN.default.valid(s)&&(s=`${e}${r.range}`),P.makeDescriptor(r,P.makeRange({protocol:t,source:i,params:n,selector:s}))}function Pne(r){switch(r){case pa.CARET:return Xf.CARET;case pa.TILDE:return Xf.TILDE;case pa.EXACT:return Xf.EXACT;default:throw new Error(`Assertion failed: Unknown modifier: "${r}"`)}}function Dne(r,e){return P.makeDescriptor(r.anchoredDescriptor,`${bYe}${Pne(e)}`)}async function Rne(r,{project:e,target:t}){let i=new Map,n=s=>{let o=i.get(s.descriptorHash);return o||i.set(s.descriptorHash,o={descriptor:s,locators:[]}),o};for(let s of e.workspaces)if(t===Hr.PEER){let o=s.manifest.peerDependencies.get(r.identHash);o!==void 0&&n(o).locators.push(s.locator)}else{let o=s.manifest.dependencies.get(r.identHash),a=s.manifest.devDependencies.get(r.identHash);t===Hr.DEVELOPMENT?a!==void 0?n(a).locators.push(s.locator):o!==void 0&&n(o).locators.push(s.locator):o!==void 0?n(o).locators.push(s.locator):a!==void 0&&n(a).locators.push(s.locator)}return i}async function gN(r,{cwd:e,workspace:t}){return await SYe(async i=>{k.isAbsolute(r)||(r=k.relative(t.cwd,k.resolve(e,r)),r.match(/^\.{0,2}\//)||(r=`./${r}`));let{project:n}=t,s=await uN(P.makeIdent(null,"archive"),r,{project:t.project,cache:i,workspace:t});if(!s)throw new Error("Assertion failed: The descriptor should have been found");let o=new di,a=n.configuration.makeResolver(),l=n.configuration.makeFetcher(),c={checksums:n.storedChecksums,project:n,cache:i,fetcher:l,report:o,resolver:a},u=a.bindDescriptor(s,t.anchoredLocator,c),g=P.convertDescriptorToLocator(u),f=await l.fetch(g,c),h=await At.find(f.prefixPath,{baseFs:f.packageFs});if(!h.name)throw new Error("Target path doesn't have a name");return P.makeDescriptor(h.name,r)})}async function _C(r,{project:e,workspace:t,cache:i,target:n,modifier:s,strategies:o,maxResults:a=Infinity}){if(!(a>=0))throw new Error(`Invalid maxResults (${a})`);if(r.range!=="unknown")return{suggestions:[{descriptor:r,name:`Use ${P.prettyDescriptor(e.configuration,r)}`,reason:"(unambiguous explicit request)"}],rejections:[]};let l=typeof t!="undefined"&&t!==null&&t.manifest[n].get(r.identHash)||null,c=[],u=[],g=async f=>{try{await f()}catch(h){u.push(h)}};for(let f of o){if(c.length>=a)break;switch(f){case Vr.KEEP:await g(async()=>{l&&c.push({descriptor:l,name:`Keep ${P.prettyDescriptor(e.configuration,l)}`,reason:"(no changes)"})});break;case Vr.REUSE:await g(async()=>{for(let{descriptor:h,locators:p}of(await Rne(r,{project:e,target:n})).values()){if(p.length===1&&p[0].locatorHash===t.anchoredLocator.locatorHash&&o.includes(Vr.KEEP))continue;let m=`(originally used by ${P.prettyLocator(e.configuration,p[0])}`;m+=p.length>1?` and ${p.length-1} other${p.length>2?"s":""})`:")",c.push({descriptor:h,name:`Reuse ${P.prettyDescriptor(e.configuration,h)}`,reason:m})}});break;case Vr.CACHE:await g(async()=>{for(let h of e.storedDescriptors.values())h.identHash===r.identHash&&c.push({descriptor:h,name:`Reuse ${P.prettyDescriptor(e.configuration,h)}`,reason:"(already used somewhere in the lockfile)"})});break;case Vr.PROJECT:await g(async()=>{if(t.manifest.name!==null&&r.identHash===t.manifest.name.identHash)return;let h=e.tryWorkspaceByIdent(r);if(h===null)return;let p=Dne(h,s);c.push({descriptor:p,name:`Attach ${P.prettyDescriptor(e.configuration,p)}`,reason:`(local workspace at ${ae.pretty(e.configuration,h.relativeCwd,ae.Type.PATH)})`})});break;case Vr.LATEST:await g(async()=>{if(r.range!=="unknown")c.push({descriptor:r,name:`Use ${P.prettyRange(e.configuration,r.range)}`,reason:"(explicit range requested)"});else if(n===Hr.PEER)c.push({descriptor:P.makeDescriptor(r,"*"),name:"Use *",reason:"(catch-all peer dependency pattern)"});else if(!e.configuration.get("enableNetwork"))c.push({descriptor:null,name:"Resolve from latest",reason:ae.pretty(e.configuration,"(unavailable because enableNetwork is toggled off)","grey")});else{let h=await uN(r,"latest",{project:e,cache:i,workspace:t,preserveModifier:!1});h&&(h=kne(h,s),c.push({descriptor:h,name:`Use ${P.prettyDescriptor(e.configuration,h)}`,reason:"(resolved from latest)"}))}});break}}return{suggestions:c.slice(0,a),rejections:u.slice(0,a)}}async function uN(r,e,{project:t,cache:i,workspace:n,preserveModifier:s=!0}){let o=P.makeDescriptor(r,e),a=new di,l=t.configuration.makeFetcher(),c=t.configuration.makeResolver(),u={project:t,fetcher:l,cache:i,checksums:t.storedChecksums,report:a,cacheOptions:{skipIntegrityCheck:!0},skipIntegrityCheck:!0},g=te(N({},u),{resolver:c,fetchOptions:u}),f=c.bindDescriptor(o,n.anchoredLocator,g),h=await c.getCandidates(f,new Map,g);if(h.length===0)return null;let p=h[0],{protocol:m,source:y,params:b,selector:v}=P.parseRange(P.convertToManifestRange(p.reference));if(m===t.configuration.get("defaultProtocol")&&(m=null),cN.default.valid(v)&&s!==!1){let x=typeof s=="string"?s:o.range;v=xne(x,{project:t})+v}return P.makeDescriptor(p,P.makeRange({protocol:m,source:y,params:b,selector:v}))}async function SYe(r){return await K.mktempPromise(async e=>{let t=ye.create(e);return t.useWithSource(e,{enableMirror:!1,compressionLevel:0},e,{overwrite:!0}),await r(new Nt(e,{configuration:t,check:!1,immutable:!1}))})}var VC=class extends Le{constructor(){super(...arguments);this.json=J.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.exact=J.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=J.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=J.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.dev=J.Boolean("-D,--dev",!1,{description:"Add a package as a dev dependency"});this.peer=J.Boolean("-P,--peer",!1,{description:"Add a package as a peer dependency"});this.optional=J.Boolean("-O,--optional",!1,{description:"Add / upgrade a package to an optional regular / peer dependency"});this.preferDev=J.Boolean("--prefer-dev",!1,{description:"Add / upgrade a package to a dev dependency"});this.interactive=J.Boolean("-i,--interactive",{description:"Reuse the specified package from other workspaces in the project"});this.cached=J.Boolean("--cached",!1,{description:"Reuse the highest version already used somewhere within the project"});this.mode=J.String("--mode",{description:"Change what artifacts installs generate",validator:nn(Ci)});this.silent=J.Boolean("--silent",{hidden:!0});this.packages=J.Rest()}async execute(){var m;let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd),n=await Nt.find(e);if(!i)throw new ht(t.cwd,this.context.cwd);await t.restoreInstallState({restoreResolutions:!1});let s=(m=this.interactive)!=null?m:e.get("preferInteractive"),o=zC(this,t),a=[...s?[Vr.REUSE]:[],Vr.PROJECT,...this.cached?[Vr.CACHE]:[],Vr.LATEST],l=s?Infinity:1,c=await Promise.all(this.packages.map(async y=>{let b=y.match(/^\.{0,2}\//)?await gN(y,{cwd:this.context.cwd,workspace:i}):P.tryParseDescriptor(y),v=y.match(/^(https?:|git@github)/);if(v)throw new Pe(`It seems you are trying to add a package using a ${ae.pretty(e,`${v[0]}...`,Ri.RANGE)} url; we now require package names to be explicitly specified. +Try running the command again with the package name prefixed: ${ae.pretty(e,"yarn add",Ri.CODE)} ${ae.pretty(e,P.makeDescriptor(P.makeIdent(null,"my-package"),`${v[0]}...`),Ri.DESCRIPTOR)}`);if(!b)throw new Pe(`The ${ae.pretty(e,y,Ri.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let x=vYe(i,b,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional}),T=await _C(b,{project:t,workspace:i,cache:n,target:x,modifier:o,strategies:a,maxResults:l});return[b,T,x]})),u=await pA.start({configuration:e,stdout:this.context.stdout,suggestInstall:!1},async y=>{for(let[b,{suggestions:v,rejections:x}]of c)if(v.filter(q=>q.descriptor!==null).length===0){let[q]=x;if(typeof q=="undefined")throw new Error("Assertion failed: Expected an error to have been set");t.configuration.get("enableNetwork")?y.reportError(X.CANT_SUGGEST_RESOLUTIONS,`${P.prettyDescriptor(e,b)} can't be resolved to a satisfying range`):y.reportError(X.CANT_SUGGEST_RESOLUTIONS,`${P.prettyDescriptor(e,b)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),y.reportSeparator(),y.reportExceptionOnce(q)}});if(u.hasErrors())return u.exitCode();let g=!1,f=[],h=[];for(let[,{suggestions:y},b]of c){let v,x=y.filter($=>$.descriptor!==null),T=x[0].descriptor,q=x.every($=>P.areDescriptorsEqual($.descriptor,T));x.length===1||q?v=T:(g=!0,{answer:v}=await(0,Fne.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:y.map(({descriptor:$,name:_,reason:ne})=>$?{name:_,hint:ne,descriptor:$}:{name:_,hint:ne,disabled:!0}),onCancel:()=>process.exit(130),result($){return this.find($,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let Y=i.manifest[b].get(v.identHash);(typeof Y=="undefined"||Y.descriptorHash!==v.descriptorHash)&&(i.manifest[b].set(v.identHash,v),this.optional&&(b==="dependencies"?i.manifest.ensureDependencyMeta(te(N({},v),{range:"unknown"})).optional=!0:b==="peerDependencies"&&(i.manifest.ensurePeerDependencyMeta(te(N({},v),{range:"unknown"})).optional=!0)),typeof Y=="undefined"?f.push([i,b,v,a]):h.push([i,b,Y,v]))}return await e.triggerMultipleHooks(y=>y.afterWorkspaceDependencyAddition,f),await e.triggerMultipleHooks(y=>y.afterWorkspaceDependencyReplacement,h),g&&this.context.stdout.write(` +`),(await Je.start({configuration:e,json:this.json,stdout:this.context.stdout,includeLogs:!this.context.quiet},async y=>{await t.install({cache:n,report:y,mode:this.mode})})).exitCode()}};VC.paths=[["add"]],VC.usage=Re.Usage({description:"add dependencies to the project",details:"\n This command adds a package to the package.json for the nearest workspace.\n\n - If it didn't exist before, the package will by default be added to the regular `dependencies` field, but this behavior can be overriden thanks to the `-D,--dev` flag (which will cause the dependency to be added to the `devDependencies` field instead) and the `-P,--peer` flag (which will do the same but for `peerDependencies`).\n\n - If the package was already listed in your dependencies, it will by default be upgraded whether it's part of your `dependencies` or `devDependencies` (it won't ever update `peerDependencies`, though).\n\n - If set, the `--prefer-dev` flag will operate as a more flexible `-D,--dev` in that it will add the package to your `devDependencies` if it isn't already listed in either `dependencies` or `devDependencies`, but it will also happily upgrade your `dependencies` if that's what you already use (whereas `-D,--dev` would throw an exception).\n\n - If set, the `-O,--optional` flag will add the package to the `optionalDependencies` field and, in combination with the `-P,--peer` flag, it will add the package as an optional peer dependency. If the package was already listed in your `dependencies`, it will be upgraded to `optionalDependencies`. If the package was already listed in your `peerDependencies`, in combination with the `-P,--peer` flag, it will be upgraded to an optional peer dependency: `\"peerDependenciesMeta\": { \"\": { \"optional\": true } }`\n\n - If the added package doesn't specify a range at all its `latest` tag will be resolved and the returned version will be used to generate a new semver range (using the `^` modifier by default unless otherwise configured via the `defaultSemverRangePrefix` configuration, or the `~` modifier if `-T,--tilde` is specified, or no modifier at all if `-E,--exact` is specified). Two exceptions to this rule: the first one is that if the package is a workspace then its local version will be used, and the second one is that if you use `-P,--peer` the default range will be `*` and won't be resolved at all.\n\n - If the added package specifies a range (such as `^1.0.0`, `latest`, or `rc`), Yarn will add this range as-is in the resulting package.json entry (in particular, tags such as `rc` will be encoded as-is rather than being converted into a semver range).\n\n If the `--cached` option is used, Yarn will preferably reuse the highest version already used somewhere within the project, even if through a transitive dependency.\n\n If the `-i,--interactive` option is used (or if the `preferInteractive` settings is toggled on) the command will first try to check whether other workspaces in the project use the specified package and, if so, will offer to reuse them.\n\n If the `--mode=` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the later will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/features/protocols.\n ",examples:[["Add a regular package to the current workspace","$0 add lodash"],["Add a specific version for a package to the current workspace","$0 add lodash@1.2.3"],["Add a package from a GitHub repository (the master branch) to the current workspace using a URL","$0 add lodash@https://github.com/lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol","$0 add lodash@github:lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol (shorthand)","$0 add lodash@lodash/lodash"],["Add a package from a specific branch of a GitHub repository to the current workspace using the GitHub protocol (shorthand)","$0 add lodash-es@lodash/lodash#es"]]});var Nne=VC;function vYe(r,e,{dev:t,peer:i,preferDev:n,optional:s}){let o=r.manifest[Hr.REGULAR].has(e.identHash),a=r.manifest[Hr.DEVELOPMENT].has(e.identHash),l=r.manifest[Hr.PEER].has(e.identHash);if((t||i)&&o)throw new Pe(`Package "${P.prettyIdent(r.project.configuration,e)}" is already listed as a regular dependency - remove the -D,-P flags or remove it from your dependencies first`);if(!t&&!i&&l)throw new Pe(`Package "${P.prettyIdent(r.project.configuration,e)}" is already listed as a peer dependency - use either of -D or -P, or remove it from your peer dependencies first`);if(s&&a)throw new Pe(`Package "${P.prettyIdent(r.project.configuration,e)}" is already listed as a dev dependency - remove the -O flag or remove it from your dev dependencies first`);if(s&&!i&&l)throw new Pe(`Package "${P.prettyIdent(r.project.configuration,e)}" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);if((t||n)&&s)throw new Pe(`Package "${P.prettyIdent(r.project.configuration,e)}" cannot simultaneously be a dev dependency and an optional dependency`);return i?Hr.PEER:t||n?Hr.DEVELOPMENT:o?Hr.REGULAR:a?Hr.DEVELOPMENT:Hr.REGULAR}var XC=class extends Le{constructor(){super(...arguments);this.verbose=J.Boolean("-v,--verbose",!1,{description:"Print both the binary name and the locator of the package that provides the binary"});this.json=J.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.name=J.String({required:!1})}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,locator:i}=await ze.find(e,this.context.cwd);if(await t.restoreInstallState(),this.name){let o=(await Zt.getPackageAccessibleBinaries(i,{project:t})).get(this.name);if(!o)throw new Pe(`Couldn't find a binary named "${this.name}" for package "${P.prettyLocator(e,i)}"`);let[,a]=o;return this.context.stdout.write(`${a} +`),0}return(await Je.start({configuration:e,json:this.json,stdout:this.context.stdout},async s=>{let o=await Zt.getPackageAccessibleBinaries(i,{project:t}),l=Array.from(o.keys()).reduce((c,u)=>Math.max(c,u.length),0);for(let[c,[u,g]]of o)s.reportJson({name:c,source:P.stringifyIdent(u),path:g});if(this.verbose)for(let[c,[u]]of o)s.reportInfo(null,`${c.padEnd(l," ")} ${P.prettyLocator(e,u)}`);else for(let c of o.keys())s.reportInfo(null,c)})).exitCode()}};XC.paths=[["bin"]],XC.usage=Re.Usage({description:"get the path to a binary script",details:` + When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the \`-v,--verbose\` flag will cause the output to contain both the binary name and the locator of the package that provides the binary. + + When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive. + `,examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]});var Lne=XC;var ZC=class extends Le{constructor(){super(...arguments);this.mirror=J.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=J.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),t=await Nt.find(e);return(await Je.start({configuration:e,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&t.mirrorCwd!==null,s=!this.mirror;n&&(await K.removePromise(t.mirrorCwd),await e.triggerHook(o=>o.cleanGlobalArtifacts,e)),s&&await K.removePromise(t.cwd)})).exitCode()}};ZC.paths=[["cache","clean"],["cache","clear"]],ZC.usage=Re.Usage({description:"remove the shared cache files",details:` + This command will remove all the files from the cache. + `,examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]});var Tne=ZC;var One=ge(C0()),fN=ge(require("util")),$C=class extends Le{constructor(){super(...arguments);this.json=J.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=J.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=J.String()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),t=this.name.replace(/[.[].*$/,""),i=this.name.replace(/^[^.[]*/,"");if(typeof e.settings.get(t)=="undefined")throw new Pe(`Couldn't find a configuration settings named "${t}"`);let s=e.getSpecial(t,{hideSecrets:!this.unsafe,getNativePaths:!0}),o=Se.convertMapsToIndexableObjects(s),a=i?(0,One.default)(o,i):o,l=await Je.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async c=>{c.reportJson(a)});if(!this.json){if(typeof a=="string")return this.context.stdout.write(`${a} +`),l.exitCode();fN.inspect.styles.name="cyan",this.context.stdout.write(`${(0,fN.inspect)(a,{depth:Infinity,colors:e.get("enableColors"),compact:!1})} +`)}return l.exitCode()}};$C.paths=[["config","get"]],$C.usage=Re.Usage({description:"read a configuration settings",details:` + This command will print a configuration setting. + + Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the \`--no-redacted\` to get the untransformed value. + `,examples:[["Print a simple configuration setting","yarn config get yarnPath"],["Print a complex configuration setting","yarn config get packageExtensions"],["Print a nested field from the configuration",`yarn config get 'npmScopes["my-company"].npmRegistryServer'`],["Print a token from the configuration","yarn config get npmAuthToken --no-redacted"],["Print a configuration setting as JSON","yarn config get packageExtensions --json"]]});var Mne=$C;var Vse=ge(EN()),Xse=ge(C0()),Zse=ge(_se()),IN=ge(require("util")),tm=class extends Le{constructor(){super(...arguments);this.json=J.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=J.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=J.String();this.value=J.String()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),t=()=>{if(!e.projectCwd)throw new Pe("This command must be run from within a project folder");return e.projectCwd},i=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof e.settings.get(i)=="undefined")throw new Pe(`Couldn't find a configuration settings named "${i}"`);if(i==="enableStrictSettings")throw new Pe("This setting only affects the file it's in, and thus cannot be set from the CLI");let o=this.json?JSON.parse(this.value):this.value;await(this.home?h=>ye.updateHomeConfiguration(h):h=>ye.updateConfiguration(t(),h))(h=>{if(n){let p=(0,Vse.default)(h);return(0,Zse.default)(p,this.name,o),p}else return te(N({},h),{[i]:o})});let c=(await ye.find(this.context.cwd,this.context.plugins)).getSpecial(i,{hideSecrets:!0,getNativePaths:!0}),u=Se.convertMapsToIndexableObjects(c),g=n?(0,Xse.default)(u,n):u;return(await Je.start({configuration:e,includeFooter:!1,stdout:this.context.stdout},async h=>{IN.inspect.styles.name="cyan",h.reportInfo(X.UNNAMED,`Successfully set ${this.name} to ${(0,IN.inspect)(g,{depth:Infinity,colors:e.get("enableColors"),compact:!1})}`)})).exitCode()}};tm.paths=[["config","set"]],tm.usage=Re.Usage({description:"change a configuration settings",details:` + This command will set a configuration setting. + + When used without the \`--json\` flag, it can only set a simple configuration setting (a string, a number, or a boolean). + + When used with the \`--json\` flag, it can set both simple and complex configuration settings, including Arrays and Objects. + `,examples:[["Set a simple configuration setting (a string, a number, or a boolean)","yarn config set initScope myScope"],["Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag",'yarn config set initScope --json \\"myScope\\"'],["Set a complex configuration setting (an Array) using the `--json` flag",`yarn config set unsafeHttpWhitelist --json '["*.example.com", "example.com"]'`],["Set a complex configuration setting (an Object) using the `--json` flag",`yarn config set packageExtensions --json '{ "@babel/parser@*": { "dependencies": { "@babel/types": "*" } } }'`],["Set a nested configuration setting",'yarn config set npmScopes.company.npmRegistryServer "https://npm.example.com"'],["Set a nested configuration setting using indexed access for non-simple keys",`yarn config set 'npmRegistries["//npm.example.com"].npmAuthToken' "ffffffff-ffff-ffff-ffff-ffffffffffff"`]]});var $se=tm;var Aoe=ge(EN()),loe=ge(yC()),coe=ge(aoe()),rm=class extends Le{constructor(){super(...arguments);this.home=J.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=J.String()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),t=()=>{if(!e.projectCwd)throw new Pe("This command must be run from within a project folder");return e.projectCwd},i=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof e.settings.get(i)=="undefined")throw new Pe(`Couldn't find a configuration settings named "${i}"`);let o=this.home?l=>ye.updateHomeConfiguration(l):l=>ye.updateConfiguration(t(),l);return(await Je.start({configuration:e,includeFooter:!1,stdout:this.context.stdout},async l=>{let c=!1;await o(u=>{if(!(0,loe.default)(u,this.name))return l.reportWarning(X.UNNAMED,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),c=!0,u;let g=n?(0,Aoe.default)(u):N({},u);return(0,coe.default)(g,this.name),g}),c||l.reportInfo(X.UNNAMED,`Successfully unset ${this.name}`)})).exitCode()}};rm.paths=[["config","unset"]],rm.usage=Re.Usage({description:"unset a configuration setting",details:` + This command will unset a configuration setting. + `,examples:[["Unset a simple configuration setting","yarn config unset initScope"],["Unset a complex configuration setting","yarn config unset packageExtensions"],["Unset a nested configuration setting","yarn config unset npmScopes.company.npmRegistryServer"]]});var uoe=rm;var yN=ge(require("util")),im=class extends Le{constructor(){super(...arguments);this.verbose=J.Boolean("-v,--verbose",!1,{description:"Print the setting description on top of the regular key/value information"});this.why=J.Boolean("--why",!1,{description:"Print the reason why a setting is set a particular way"});this.json=J.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins,{strict:!1});return(await Je.start({configuration:e,json:this.json,stdout:this.context.stdout},async i=>{if(e.invalid.size>0&&!this.json){for(let[n,s]of e.invalid)i.reportError(X.INVALID_CONFIGURATION_KEY,`Invalid configuration key "${n}" in ${s}`);i.reportSeparator()}if(this.json){let n=Se.sortMap(e.settings.keys(),s=>s);for(let s of n){let o=e.settings.get(s),a=e.getSpecial(s,{hideSecrets:!0,getNativePaths:!0}),l=e.sources.get(s);this.verbose?i.reportJson({key:s,effective:a,source:l}):i.reportJson(N({key:s,effective:a,source:l},o))}}else{let n=Se.sortMap(e.settings.keys(),a=>a),s=n.reduce((a,l)=>Math.max(a,l.length),0),o={breakLength:Infinity,colors:e.get("enableColors"),maxArrayLength:2};if(this.why||this.verbose){let a=n.map(c=>{let u=e.settings.get(c);if(!u)throw new Error(`Assertion failed: This settings ("${c}") should have been registered`);let g=this.why?e.sources.get(c)||"":u.description;return[c,g]}),l=a.reduce((c,[,u])=>Math.max(c,u.length),0);for(let[c,u]of a)i.reportInfo(null,`${c.padEnd(s," ")} ${u.padEnd(l," ")} ${(0,yN.inspect)(e.getSpecial(c,{hideSecrets:!0,getNativePaths:!0}),o)}`)}else for(let a of n)i.reportInfo(null,`${a.padEnd(s," ")} ${(0,yN.inspect)(e.getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),o)}`)}})).exitCode()}};im.paths=[["config"]],im.usage=Re.Usage({description:"display the current configuration",details:` + This command prints the current active configuration settings. + `,examples:[["Print the active configuration settings","$0 config"]]});var goe=im;ys();var wN={};ft(wN,{Strategy:()=>Bu,acceptedStrategies:()=>P3e,dedupe:()=>BN});var foe=ge(is()),Bu;(function(e){e.HIGHEST="highest"})(Bu||(Bu={}));var P3e=new Set(Object.values(Bu)),D3e={highest:async(r,e,{resolver:t,fetcher:i,resolveOptions:n,fetchOptions:s})=>{let o=new Map;for(let[a,l]of r.storedResolutions){let c=r.storedDescriptors.get(a);if(typeof c=="undefined")throw new Error(`Assertion failed: The descriptor (${a}) should have been registered`);Se.getSetWithDefault(o,c.identHash).add(l)}return Array.from(r.storedDescriptors.values(),async a=>{if(e.length&&!foe.default.isMatch(P.stringifyIdent(a),e))return null;let l=r.storedResolutions.get(a.descriptorHash);if(typeof l=="undefined")throw new Error(`Assertion failed: The resolution (${a.descriptorHash}) should have been registered`);let c=r.originalPackages.get(l);if(typeof c=="undefined"||!t.shouldPersistResolution(c,n))return null;let u=o.get(a.identHash);if(typeof u=="undefined")throw new Error(`Assertion failed: The resolutions (${a.identHash}) should have been registered`);if(u.size===1)return null;let g=[...u].map(y=>{let b=r.originalPackages.get(y);if(typeof b=="undefined")throw new Error(`Assertion failed: The package (${y}) should have been registered`);return b.reference}),f=await t.getSatisfying(a,g,n),h=f==null?void 0:f[0];if(typeof h=="undefined")return null;let p=h.locatorHash,m=r.originalPackages.get(p);if(typeof m=="undefined")throw new Error(`Assertion failed: The package (${p}) should have been registered`);return p===l?null:{descriptor:a,currentPackage:c,updatedPackage:m}})}};async function BN(r,{strategy:e,patterns:t,cache:i,report:n}){let{configuration:s}=r,o=new di,a=s.makeResolver(),l=s.makeFetcher(),c={cache:i,checksums:r.storedChecksums,fetcher:l,project:r,report:o,skipIntegrityCheck:!0,cacheOptions:{skipIntegrityCheck:!0}},u={project:r,resolver:a,report:o,fetchOptions:c};return await n.startTimerPromise("Deduplication step",async()=>{let f=await D3e[e](r,t,{resolver:a,resolveOptions:u,fetcher:l,fetchOptions:c}),h=Ji.progressViaCounter(f.length);n.reportProgress(h);let p=0;await Promise.all(f.map(b=>b.then(v=>{if(v===null)return;p++;let{descriptor:x,currentPackage:T,updatedPackage:q}=v;n.reportInfo(X.UNNAMED,`${P.prettyDescriptor(s,x)} can be deduped from ${P.prettyLocator(s,T)} to ${P.prettyLocator(s,q)}`),n.reportJson({descriptor:P.stringifyDescriptor(x),currentResolution:P.stringifyLocator(T),updatedResolution:P.stringifyLocator(q)}),r.storedResolutions.set(x.descriptorHash,q.locatorHash)}).finally(()=>h.tick())));let m;switch(p){case 0:m="No packages";break;case 1:m="One package";break;default:m=`${p} packages`}let y=ae.pretty(s,e,ae.Type.CODE);return n.reportInfo(X.UNNAMED,`${m} can be deduped using the ${y} strategy`),p})}var nm=class extends Le{constructor(){super(...arguments);this.strategy=J.String("-s,--strategy",Bu.HIGHEST,{description:"The strategy to use when deduping dependencies",validator:nn(Bu)});this.check=J.Boolean("-c,--check",!1,{description:"Exit with exit code 1 when duplicates are found, without persisting the dependency tree"});this.json=J.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.mode=J.String("--mode",{description:"Change what artifacts installs generate",validator:nn(Ci)});this.patterns=J.Rest()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t}=await ze.find(e,this.context.cwd),i=await Nt.find(e);await t.restoreInstallState({restoreResolutions:!1});let n=0,s=await Je.start({configuration:e,includeFooter:!1,stdout:this.context.stdout,json:this.json},async o=>{n=await BN(t,{strategy:this.strategy,patterns:this.patterns,cache:i,report:o})});return s.hasErrors()?s.exitCode():this.check?n?1:0:(await Je.start({configuration:e,stdout:this.context.stdout,json:this.json},async a=>{await t.install({cache:i,report:a,mode:this.mode})})).exitCode()}};nm.paths=[["dedupe"]],nm.usage=Re.Usage({description:"deduplicate dependencies with overlapping ranges",details:"\n Duplicates are defined as descriptors with overlapping ranges being resolved and locked to different locators. They are a natural consequence of Yarn's deterministic installs, but they can sometimes pile up and unnecessarily increase the size of your project.\n\n This command dedupes dependencies in the current project using different strategies (only one is implemented at the moment):\n\n - `highest`: Reuses (where possible) the locators with the highest versions. This means that dependencies can only be upgraded, never downgraded. It's also guaranteed that it never takes more than a single pass to dedupe the entire dependency tree.\n\n **Note:** Even though it never produces a wrong dependency tree, this command should be used with caution, as it modifies the dependency tree, which can sometimes cause problems when packages don't strictly follow semver recommendations. Because of this, it is recommended to also review the changes manually.\n\n If set, the `-c,--check` flag will only report the found duplicates, without persisting the modified dependency tree. If changes are found, the command will exit with a non-zero exit code, making it suitable for CI purposes.\n\n If the `--mode=` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the later will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n ### In-depth explanation:\n\n Yarn doesn't deduplicate dependencies by default, otherwise installs wouldn't be deterministic and the lockfile would be useless. What it actually does is that it tries to not duplicate dependencies in the first place.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@*`will cause Yarn to reuse `foo@2.3.4`, even if the latest `foo` is actually `foo@2.10.14`, thus preventing unnecessary duplication.\n\n Duplication happens when Yarn can't unlock dependencies that have already been locked inside the lockfile.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@2.10.14` will cause Yarn to install `foo@2.10.14` because the existing resolution doesn't satisfy the range `2.10.14`. This behavior can lead to (sometimes) unwanted duplication, since now the lockfile contains 2 separate resolutions for the 2 `foo` descriptors, even though they have overlapping ranges, which means that the lockfile can be simplified so that both descriptors resolve to `foo@2.10.14`.\n ",examples:[["Dedupe all packages","$0 dedupe"],["Dedupe all packages using a specific strategy","$0 dedupe --strategy highest"],["Dedupe a specific package","$0 dedupe lodash"],["Dedupe all packages with the `@babel/*` scope","$0 dedupe '@babel/*'"],["Check for duplicates (can be used as a CI step)","$0 dedupe --check"]]});var hoe=nm;var J0=class extends Le{async execute(){let{plugins:e}=await ye.find(this.context.cwd,this.context.plugins),t=[];for(let o of e){let{commands:a}=o[1];if(a){let c=ws.from(a).definitions();t.push([o[0],c])}}let i=this.cli.definitions(),n=(o,a)=>o.split(" ").slice(1).join()===a.split(" ").slice(1).join(),s=doe()["@yarnpkg/builder"].bundles.standard;for(let o of t){let a=o[1];for(let l of a)i.find(c=>n(c.path,l.path)).plugin={name:o[0],isDefault:s.includes(o[0])}}this.context.stdout.write(`${JSON.stringify(i,null,2)} +`)}};J0.paths=[["--clipanion=definitions"]];var Coe=J0;var W0=class extends Le{async execute(){this.context.stdout.write(this.cli.usage(null))}};W0.paths=[["help"],["--help"],["-h"]];var moe=W0;var bN=class extends Le{constructor(){super(...arguments);this.leadingArgument=J.String();this.args=J.Proxy()}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!P.tryParseIdent(this.leadingArgument)){let e=k.resolve(this.context.cwd,H.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:e})}else return await this.cli.run(["run",this.leadingArgument,...this.args])}},Eoe=bN;var z0=class extends Le{async execute(){this.context.stdout.write(`${Ur||""} +`)}};z0.paths=[["-v"],["--version"]];var Ioe=z0;var sm=class extends Le{constructor(){super(...arguments);this.commandName=J.String();this.args=J.Proxy()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,locator:i}=await ze.find(e,this.context.cwd);return await t.restoreInstallState(),await Zt.executePackageShellcode(i,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:t})}};sm.paths=[["exec"]],sm.usage=Re.Usage({description:"execute a shell script",details:` + This command simply executes a shell script within the context of the root directory of the active workspace using the portable shell. + + It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment). + `,examples:[["Execute a single shell command","$0 exec echo Hello World"],["Execute a shell script",'$0 exec "tsc & babel src --out-dir lib"']]});var yoe=sm;ys();var om=class extends Le{constructor(){super(...arguments);this.hash=J.String({required:!1,validator:fp(gp(),[hp(/^p[0-9a-f]{5}$/)])})}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t}=await ze.find(e,this.context.cwd);return await t.restoreInstallState({restoreResolutions:!1}),await t.applyLightResolution(),typeof this.hash!="undefined"?await R3e(this.hash,t,{stdout:this.context.stdout}):(await Je.start({configuration:e,stdout:this.context.stdout,includeFooter:!1},async n=>{var o;let s=[([,a])=>P.stringifyLocator(t.storedPackages.get(a.subject)),([,a])=>P.stringifyIdent(a.requested)];for(let[a,l]of Se.sortMap(t.peerRequirements,s)){let c=t.storedPackages.get(l.subject);if(typeof c=="undefined")throw new Error("Assertion failed: Expected the subject package to have been registered");let u=t.storedPackages.get(l.rootRequester);if(typeof u=="undefined")throw new Error("Assertion failed: Expected the root package to have been registered");let g=(o=c.dependencies.get(l.requested.identHash))!=null?o:null,f=ae.pretty(e,a,ae.Type.CODE),h=P.prettyLocator(e,c),p=P.prettyIdent(e,l.requested),m=P.prettyIdent(e,u),y=l.allRequesters.length-1,b=`descendant${y===1?"":"s"}`,v=y>0?` and ${y} ${b}`:"",x=g!==null?"provides":"doesn't provide";n.reportInfo(null,`${f} \u2192 ${h} ${x} ${p} to ${m}${v}`)}})).exitCode()}};om.paths=[["explain","peer-requirements"]],om.usage=Re.Usage({description:"explain a set of peer requirements",details:` + A set of peer requirements represents all peer requirements that a dependent must satisfy when providing a given peer request to a requester and its descendants. + + When the hash argument is specified, this command prints a detailed explanation of all requirements of the set corresponding to the hash and whether they're satisfied or not. + + When used without arguments, this command lists all sets of peer requirements and the corresponding hash that can be used to get detailed information about a given set. + + **Note:** A hash is a six-letter p-prefixed code that can be obtained from peer dependency warnings or from the list of all peer requirements (\`yarn explain peer-requirements\`). + `,examples:[["Explain the corresponding set of peer requirements for a hash","$0 explain peer-requirements p1a4ed"],["List all sets of peer requirements","$0 explain peer-requirements"]]});var woe=om;async function R3e(r,e,t){let{configuration:i}=e,n=e.peerRequirements.get(r);if(typeof n=="undefined")throw new Error(`No peerDependency requirements found for hash: "${r}"`);return(await Je.start({configuration:i,stdout:t.stdout,includeFooter:!1},async o=>{var b,v;let a=e.storedPackages.get(n.subject);if(typeof a=="undefined")throw new Error("Assertion failed: Expected the subject package to have been registered");let l=e.storedPackages.get(n.rootRequester);if(typeof l=="undefined")throw new Error("Assertion failed: Expected the root package to have been registered");let c=(b=a.dependencies.get(n.requested.identHash))!=null?b:null,u=c!==null?e.storedResolutions.get(c.descriptorHash):null;if(typeof u=="undefined")throw new Error("Assertion failed: Expected the resolution to have been registered");let g=u!==null?e.storedPackages.get(u):null;if(typeof g=="undefined")throw new Error("Assertion failed: Expected the provided package to have been registered");let f=[...n.allRequesters.values()].map(x=>{let T=e.storedPackages.get(x);if(typeof T=="undefined")throw new Error("Assertion failed: Expected the package to be registered");let q=P.devirtualizeLocator(T),Y=e.storedPackages.get(q.locatorHash);if(typeof Y=="undefined")throw new Error("Assertion failed: Expected the package to be registered");let $=Y.peerDependencies.get(n.requested.identHash);if(typeof $=="undefined")throw new Error("Assertion failed: Expected the peer dependency to be registered");return{pkg:T,peerDependency:$}});if(g!==null){let x=f.every(({peerDependency:T})=>Wt.satisfiesWithPrereleases(g.version,T.range));o.reportInfo(X.UNNAMED,`${P.prettyLocator(i,a)} provides ${P.prettyLocator(i,g)} with version ${P.prettyReference(i,(v=g.version)!=null?v:"")}, which ${x?"satisfies":"doesn't satisfy"} the following requirements:`)}else o.reportInfo(X.UNNAMED,`${P.prettyLocator(i,a)} doesn't provide ${P.prettyIdent(i,n.requested)}, breaking the following requirements:`);o.reportSeparator();let h=ae.mark(i),p=[];for(let{pkg:x,peerDependency:T}of Se.sortMap(f,q=>P.stringifyLocator(q.pkg))){let Y=(g!==null?Wt.satisfiesWithPrereleases(g.version,T.range):!1)?h.Check:h.Cross;p.push({stringifiedLocator:P.stringifyLocator(x),prettyLocator:P.prettyLocator(i,x),prettyRange:P.prettyRange(i,T.range),mark:Y})}let m=Math.max(...p.map(({stringifiedLocator:x})=>x.length)),y=Math.max(...p.map(({prettyRange:x})=>x.length));for(let{stringifiedLocator:x,prettyLocator:T,prettyRange:q,mark:Y}of Se.sortMap(p,({stringifiedLocator:$})=>$))o.reportInfo(null,`${T.padEnd(m+(T.length-x.length)," ")} \u2192 ${q.padEnd(y," ")} ${Y}`);p.length>1&&(o.reportSeparator(),o.reportInfo(X.UNNAMED,`Note: these requirements start with ${P.prettyLocator(e.configuration,l)}`))})).exitCode()}ys();var Boe=ge(ri()),am=class extends Le{constructor(){super(...arguments);this.onlyIfNeeded=J.Boolean("--only-if-needed",!1,{description:"Only lock the Yarn version if it isn't already locked"});this.version=J.String()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins);if(e.get("yarnPath")&&this.onlyIfNeeded)return 0;let t=()=>{if(typeof Ur=="undefined")throw new Pe("The --install flag can only be used without explicit version specifier from the Yarn CLI");return`file://${process.argv[1]}`},i;if(this.version==="self")i=t();else if(this.version==="latest"||this.version==="berry"||this.version==="stable")i=`https://repo.yarnpkg.com/${await Am(e,"stable")}/packages/yarnpkg-cli/bin/yarn.js`;else if(this.version==="canary")i=`https://repo.yarnpkg.com/${await Am(e,"canary")}/packages/yarnpkg-cli/bin/yarn.js`;else if(this.version==="classic")i="https://nightly.yarnpkg.com/latest.js";else if(this.version.match(/^https?:/))i=this.version;else if(this.version.match(/^\.{0,2}[\\/]/)||H.isAbsolute(this.version))i=`file://${H.resolve(this.version)}`;else if(Wt.satisfiesWithPrereleases(this.version,">=2.0.0"))i=`https://repo.yarnpkg.com/${this.version}/packages/yarnpkg-cli/bin/yarn.js`;else if(Wt.satisfiesWithPrereleases(this.version,"^0.x || ^1.x"))i=`https://github.com/yarnpkg/yarn/releases/download/v${this.version}/yarn-${this.version}.js`;else if(Wt.validRange(this.version))i=`https://repo.yarnpkg.com/${await F3e(e,this.version)}/packages/yarnpkg-cli/bin/yarn.js`;else throw new Pe(`Invalid version descriptor "${this.version}"`);return(await Je.start({configuration:e,stdout:this.context.stdout,includeLogs:!this.context.quiet},async s=>{let o="file://",a;i.startsWith(o)?(s.reportInfo(X.UNNAMED,`Downloading ${ae.pretty(e,i,Ri.URL)}`),a=await K.readFilePromise(H.toPortablePath(i.slice(o.length)))):(s.reportInfo(X.UNNAMED,`Retrieving ${ae.pretty(e,i,Ri.PATH)}`),a=await ir.get(i,{configuration:e})),await QN(e,null,a,{report:s})})).exitCode()}};am.paths=[["set","version"]],am.usage=Re.Usage({description:"lock the Yarn version used by the project",details:"\n This command will download a specific release of Yarn directly from the Yarn GitHub repository, will store it inside your project, and will change the `yarnPath` settings from your project `.yarnrc.yml` file to point to the new file.\n\n A very good use case for this command is to enforce the version of Yarn used by the any single member of your team inside a same project - by doing this you ensure that you have control on Yarn upgrades and downgrades (including on your deployment servers), and get rid of most of the headaches related to someone using a slightly different version and getting a different behavior than you.\n\n The version specifier can be:\n\n - a tag:\n - `latest` / `berry` / `stable` -> the most recent stable berry (`>=2.0.0`) release\n - `canary` -> the most recent canary (release candidate) berry (`>=2.0.0`) release\n - `classic` -> the most recent classic (`^0.x || ^1.x`) release\n\n - a semver range (e.g. `2.x`) -> the most recent version satisfying the range (limited to berry releases)\n\n - a semver version (e.g. `2.4.1`, `1.22.1`)\n\n - a local file referenced through either a relative or absolute path\n\n - `self` -> the version used to invoke the command\n ",examples:[["Download the latest release from the Yarn repository","$0 set version latest"],["Download the latest canary release from the Yarn repository","$0 set version canary"],["Download the latest classic release from the Yarn repository","$0 set version classic"],["Download the most recent Yarn 3 build","$0 set version 3.x"],["Download a specific Yarn 2 build","$0 set version 2.0.0-rc.30"],["Switch back to a specific Yarn 1 release","$0 set version 1.22.1"],["Use a release from the local filesystem","$0 set version ./yarn.cjs"],["Use a release from a URL","$0 set version https://repo.yarnpkg.com/3.1.0/packages/yarnpkg-cli/bin/yarn.js"],["Download the version used to invoke the command","$0 set version self"]]});var boe=am;async function F3e(r,e){let i=(await ir.get("https://repo.yarnpkg.com/tags",{configuration:r,jsonResponse:!0})).tags.filter(n=>Wt.satisfiesWithPrereleases(n,e));if(i.length===0)throw new Pe(`No matching release found for range ${ae.pretty(r,e,ae.Type.RANGE)}.`);return i[0]}async function Am(r,e){let t=await ir.get("https://repo.yarnpkg.com/tags",{configuration:r,jsonResponse:!0});if(!t.latest[e])throw new Pe(`Tag ${ae.pretty(r,e,ae.Type.RANGE)} not found`);return t.latest[e]}async function QN(r,e,t,{report:i}){var g;e===null&&await K.mktempPromise(async f=>{let h=k.join(f,"yarn.cjs");await K.writeFilePromise(h,t);let{stdout:p}=await Nr.execvp(process.execPath,[H.fromPortablePath(h),"--version"],{cwd:f,env:te(N({},process.env),{YARN_IGNORE_PATH:"1"})});if(e=p.trim(),!Boe.default.valid(e))throw new Error(`Invalid semver version. ${ae.pretty(r,"yarn --version",ae.Type.CODE)} returned: +${e}`)});let n=(g=r.projectCwd)!=null?g:r.startingCwd,s=k.resolve(n,".yarn/releases"),o=k.resolve(s,`yarn-${e}.cjs`),a=k.relative(r.startingCwd,o),l=k.relative(n,o),c=r.get("yarnPath"),u=c===null||c.startsWith(`${s}/`);if(i.reportInfo(X.UNNAMED,`Saving the new release in ${ae.pretty(r,a,"magenta")}`),await K.removePromise(k.dirname(o)),await K.mkdirPromise(k.dirname(o),{recursive:!0}),await K.writeFilePromise(o,t,{mode:493}),u){await ye.updateConfiguration(n,{yarnPath:l});let f=await At.tryFind(n)||new At;f.packageManager=`yarn@${e&&Se.isTaggedYarnVersion(e)?e:await Am(r,"stable")}`;let h={};f.exportTo(h);let p=k.join(n,At.fileName),m=`${JSON.stringify(h,null,f.indent)} +`;await K.changeFilePromise(p,m,{automaticNewlines:!0})}}function Qoe(r){return X[II(r)]}var N3e=/## (?YN[0-9]{4}) - `(?[A-Z_]+)`\n\n(?
(?:.(?!##))+)/gs;async function L3e(r){let t=`https://repo.yarnpkg.com/${Se.isTaggedYarnVersion(Ur)?Ur:await Am(r,"canary")}/packages/gatsby/content/advanced/error-codes.md`,i=await ir.get(t,{configuration:r});return new Map(Array.from(i.toString().matchAll(N3e),({groups:n})=>{if(!n)throw new Error("Assertion failed: Expected the match to have been successful");let s=Qoe(n.code);if(n.name!==s)throw new Error(`Assertion failed: Invalid error code data: Expected "${n.name}" to be named "${s}"`);return[n.code,n.details]}))}var lm=class extends Le{constructor(){super(...arguments);this.code=J.String({required:!1,validator:fp(gp(),[hp(/^YN[0-9]{4}$/)])});this.json=J.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins);if(typeof this.code!="undefined"){let t=Qoe(this.code),i=ae.pretty(e,t,ae.Type.CODE),n=this.cli.format().header(`${this.code} - ${i}`),o=(await L3e(e)).get(this.code),a=typeof o!="undefined"?ae.jsonOrPretty(this.json,e,ae.tuple(ae.Type.MARKDOWN,{text:o,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description. + +You can help us by editing this page on GitHub \u{1F642}: +${ae.jsonOrPretty(this.json,e,ae.tuple(ae.Type.URL,"https://github.com/yarnpkg/berry/blob/master/packages/gatsby/content/advanced/error-codes.md"))} +`;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:t,details:a})} +`):this.context.stdout.write(`${n} + +${a} +`)}else{let t={children:Se.mapAndFilter(Object.entries(X),([i,n])=>Number.isNaN(Number(i))?Se.mapAndFilter.skip:{label:_A(Number(i)),value:ae.tuple(ae.Type.CODE,n)})};ls.emitTree(t,{configuration:e,stdout:this.context.stdout,json:this.json})}}};lm.paths=[["explain"]],lm.usage=Re.Usage({description:"explain an error code",details:` + When the code argument is specified, this command prints its name and its details. + + When used without arguments, this command lists all error codes and their names. + `,examples:[["Explain an error code","$0 explain YN0006"],["List all error codes","$0 explain"]]});var Soe=lm;var voe=ge(is()),cm=class extends Le{constructor(){super(...arguments);this.all=J.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=J.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=J.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=J.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=J.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=J.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=J.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=J.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=J.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=J.Rest()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd),n=await Nt.find(e);if(!i&&!this.all)throw new ht(t.cwd,this.context.cwd);await t.restoreInstallState();let s=new Set(this.extra);this.cache&&s.add("cache"),this.dependents&&s.add("dependents"),this.manifest&&s.add("manifest");let o=(x,{recursive:T})=>{let q=x.anchoredLocator.locatorHash,Y=new Map,$=[q];for(;$.length>0;){let _=$.shift();if(Y.has(_))continue;let ne=t.storedPackages.get(_);if(typeof ne=="undefined")throw new Error("Assertion failed: Expected the package to be registered");if(Y.set(_,ne),P.isVirtualLocator(ne)&&$.push(P.devirtualizeLocator(ne).locatorHash),!(!T&&_!==q))for(let ee of ne.dependencies.values()){let A=t.storedResolutions.get(ee.descriptorHash);if(typeof A=="undefined")throw new Error("Assertion failed: Expected the resolution to be registered");$.push(A)}}return Y.values()},a=({recursive:x})=>{let T=new Map;for(let q of t.workspaces)for(let Y of o(q,{recursive:x}))T.set(Y.locatorHash,Y);return T.values()},l=({all:x,recursive:T})=>x&&T?t.storedPackages.values():x?a({recursive:T}):o(i,{recursive:T}),c=({all:x,recursive:T})=>{let q=l({all:x,recursive:T}),Y=this.patterns.map(ne=>{let ee=P.parseLocator(ne),A=voe.default.makeRe(P.stringifyIdent(ee)),oe=P.isVirtualLocator(ee),ce=oe?P.devirtualizeLocator(ee):ee;return Z=>{let O=P.stringifyIdent(Z);if(!A.test(O))return!1;if(ee.reference==="unknown")return!0;let L=P.isVirtualLocator(Z),de=L?P.devirtualizeLocator(Z):Z;return!(oe&&L&&ee.reference!==Z.reference||ce.reference!==de.reference)}}),$=Se.sortMap([...q],ne=>P.stringifyLocator(ne));return{selection:$.filter(ne=>Y.length===0||Y.some(ee=>ee(ne))),sortedLookup:$}},{selection:u,sortedLookup:g}=c({all:this.all,recursive:this.recursive});if(u.length===0)throw new Pe("No package matched your request");let f=new Map;if(this.dependents)for(let x of g)for(let T of x.dependencies.values()){let q=t.storedResolutions.get(T.descriptorHash);if(typeof q=="undefined")throw new Error("Assertion failed: Expected the resolution to be registered");Se.getArrayWithDefault(f,q).push(x)}let h=new Map;for(let x of g){if(!P.isVirtualLocator(x))continue;let T=P.devirtualizeLocator(x);Se.getArrayWithDefault(h,T.locatorHash).push(x)}let p={},m={children:p},y=e.makeFetcher(),b={project:t,fetcher:y,cache:n,checksums:t.storedChecksums,report:new di,cacheOptions:{skipIntegrityCheck:!0},skipIntegrityCheck:!0},v=[async(x,T,q)=>{var _,ne;if(!T.has("manifest"))return;let Y=await y.fetch(x,b),$;try{$=await At.find(Y.prefixPath,{baseFs:Y.packageFs})}finally{(_=Y.releaseFs)==null||_.call(Y)}q("Manifest",{License:ae.tuple(ae.Type.NO_HINT,$.license),Homepage:ae.tuple(ae.Type.URL,(ne=$.raw.homepage)!=null?ne:null)})},async(x,T,q)=>{var A;if(!T.has("cache"))return;let Y={mockedPackages:t.disabledLocators,unstablePackages:t.conditionalLocators},$=(A=t.storedChecksums.get(x.locatorHash))!=null?A:null,_=n.getLocatorPath(x,$,Y),ne;if(_!==null)try{ne=K.statSync(_)}catch{}let ee=typeof ne!="undefined"?[ne.size,ae.Type.SIZE]:void 0;q("Cache",{Checksum:ae.tuple(ae.Type.NO_HINT,$),Path:ae.tuple(ae.Type.PATH,_),Size:ee})}];for(let x of u){let T=P.isVirtualLocator(x);if(!this.virtuals&&T)continue;let q={},Y={value:[x,ae.Type.LOCATOR],children:q};if(p[P.stringifyLocator(x)]=Y,this.nameOnly){delete Y.children;continue}let $=h.get(x.locatorHash);typeof $!="undefined"&&(q.Instances={label:"Instances",value:ae.tuple(ae.Type.NUMBER,$.length)}),q.Version={label:"Version",value:ae.tuple(ae.Type.NO_HINT,x.version)};let _=(ee,A)=>{let oe={};if(q[ee]=oe,Array.isArray(A))oe.children=A.map(ce=>({value:ce}));else{let ce={};oe.children=ce;for(let[Z,O]of Object.entries(A))typeof O!="undefined"&&(ce[Z]={label:Z,value:O})}};if(!T){for(let ee of v)await ee(x,s,_);await e.triggerHook(ee=>ee.fetchPackageInfo,x,s,_)}x.bin.size>0&&!T&&_("Exported Binaries",[...x.bin.keys()].map(ee=>ae.tuple(ae.Type.PATH,ee)));let ne=f.get(x.locatorHash);typeof ne!="undefined"&&ne.length>0&&_("Dependents",ne.map(ee=>ae.tuple(ae.Type.LOCATOR,ee))),x.dependencies.size>0&&!T&&_("Dependencies",[...x.dependencies.values()].map(ee=>{var ce;let A=t.storedResolutions.get(ee.descriptorHash),oe=typeof A!="undefined"&&(ce=t.storedPackages.get(A))!=null?ce:null;return ae.tuple(ae.Type.RESOLUTION,{descriptor:ee,locator:oe})})),x.peerDependencies.size>0&&T&&_("Peer dependencies",[...x.peerDependencies.values()].map(ee=>{var Z,O;let A=x.dependencies.get(ee.identHash),oe=typeof A!="undefined"&&(Z=t.storedResolutions.get(A.descriptorHash))!=null?Z:null,ce=oe!==null&&(O=t.storedPackages.get(oe))!=null?O:null;return ae.tuple(ae.Type.RESOLUTION,{descriptor:ee,locator:ce})}))}ls.emitTree(m,{configuration:e,json:this.json,stdout:this.context.stdout,separators:this.nameOnly?0:2})}};cm.paths=[["info"]],cm.usage=Re.Usage({description:"see information related to packages",details:"\n This command prints various information related to the specified packages, accepting glob patterns.\n\n By default, if the locator reference is missing, Yarn will default to print the information about all the matching direct dependencies of the package for the active workspace. To instead print all versions of the package that are direct dependencies of any of your workspaces, use the `-A,--all` flag. Adding the `-R,--recursive` flag will also report transitive dependencies.\n\n Some fields will be hidden by default in order to keep the output readable, but can be selectively displayed by using additional options (`--dependents`, `--manifest`, `--virtuals`, ...) described in the option descriptions.\n\n Note that this command will only print the information directly related to the selected packages - if you wish to know why the package is there in the first place, use `yarn why` which will do just that (it also provides a `-R,--recursive` flag that may be of some help).\n ",examples:[["Show information about Lodash","$0 info lodash"]]});var xoe=cm;var _0=ge(Ic());ys();var um=class extends Le{constructor(){super(...arguments);this.json=J.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.immutable=J.Boolean("--immutable",{description:"Abort with an error exit code if the lockfile was to be modified"});this.immutableCache=J.Boolean("--immutable-cache",{description:"Abort with an error exit code if the cache folder was to be modified"});this.checkCache=J.Boolean("--check-cache",!1,{description:"Always refetch the packages and ensure that their checksums are consistent"});this.inlineBuilds=J.Boolean("--inline-builds",{description:"Verbosely print the output of the build steps of dependencies"});this.mode=J.String("--mode",{description:"Change what artifacts installs generate",validator:nn(Ci)});this.cacheFolder=J.String("--cache-folder",{hidden:!0});this.frozenLockfile=J.Boolean("--frozen-lockfile",{hidden:!0});this.ignoreEngines=J.Boolean("--ignore-engines",{hidden:!0});this.nonInteractive=J.Boolean("--non-interactive",{hidden:!0});this.preferOffline=J.Boolean("--prefer-offline",{hidden:!0});this.production=J.Boolean("--production",{hidden:!0});this.registry=J.String("--registry",{hidden:!0});this.silent=J.Boolean("--silent",{hidden:!0});this.networkTimeout=J.String("--network-timeout",{hidden:!0})}async execute(){var g;let e=await ye.find(this.context.cwd,this.context.plugins);typeof this.inlineBuilds!="undefined"&&e.useWithSource("",{enableInlineBuilds:this.inlineBuilds},e.startingCwd,{overwrite:!0});let t=!!process.env.FUNCTION_TARGET||!!process.env.GOOGLE_RUNTIME,i=async(f,{error:h})=>{let p=await Je.start({configuration:e,stdout:this.context.stdout,includeFooter:!1},async m=>{h?m.reportError(X.DEPRECATED_CLI_SETTINGS,f):m.reportWarning(X.DEPRECATED_CLI_SETTINGS,f)});return p.hasErrors()?p.exitCode():null};if(typeof this.ignoreEngines!="undefined"){let f=await i("The --ignore-engines option is deprecated; engine checking isn't a core feature anymore",{error:!_0.default.VERCEL});if(f!==null)return f}if(typeof this.registry!="undefined"){let f=await i("The --registry option is deprecated; prefer setting npmRegistryServer in your .yarnrc.yml file",{error:!1});if(f!==null)return f}if(typeof this.preferOffline!="undefined"){let f=await i("The --prefer-offline flag is deprecated; use the --cached flag with 'yarn add' instead",{error:!_0.default.VERCEL});if(f!==null)return f}if(typeof this.production!="undefined"){let f=await i("The --production option is deprecated on 'install'; use 'yarn workspaces focus' instead",{error:!0});if(f!==null)return f}if(typeof this.nonInteractive!="undefined"){let f=await i("The --non-interactive option is deprecated",{error:!t});if(f!==null)return f}if(typeof this.frozenLockfile!="undefined"&&(await i("The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache instead",{error:!1}),this.immutable=this.frozenLockfile),typeof this.cacheFolder!="undefined"){let f=await i("The cache-folder option has been deprecated; use rc settings instead",{error:!_0.default.NETLIFY});if(f!==null)return f}let n=this.mode===Ci.UpdateLockfile;if(n&&(this.immutable||this.immutableCache))throw new Pe(`${ae.pretty(e,"--immutable",ae.Type.CODE)} and ${ae.pretty(e,"--immutable-cache",ae.Type.CODE)} cannot be used with ${ae.pretty(e,"--mode=update-lockfile",ae.Type.CODE)}`);let s=((g=this.immutable)!=null?g:e.get("enableImmutableInstalls"))&&!n,o=this.immutableCache&&!n;if(e.projectCwd!==null){let f=await Je.start({configuration:e,json:this.json,stdout:this.context.stdout,includeFooter:!1},async h=>{await T3e(e,s)&&(h.reportInfo(X.AUTOMERGE_SUCCESS,"Automatically fixed merge conflicts \u{1F44D}"),h.reportSeparator())});if(f.hasErrors())return f.exitCode()}if(e.projectCwd!==null&&typeof e.sources.get("nodeLinker")=="undefined"){let f=e.projectCwd,h;try{h=await K.readFilePromise(k.join(f,kt.lockfile),"utf8")}catch{}if(h==null?void 0:h.includes("yarn lockfile v1")){let p=await Je.start({configuration:e,json:this.json,stdout:this.context.stdout,includeFooter:!1},async m=>{m.reportInfo(X.AUTO_NM_SUCCESS,"Migrating from Yarn 1; automatically enabling the compatibility node-modules linker \u{1F44D}"),m.reportSeparator(),e.use("",{nodeLinker:"node-modules"},f,{overwrite:!0}),await ye.updateConfiguration(f,{nodeLinker:"node-modules"})});if(p.hasErrors())return p.exitCode()}}if(e.projectCwd!==null){let f=await Je.start({configuration:e,json:this.json,stdout:this.context.stdout,includeFooter:!1},async h=>{var p;((p=ye.telemetry)==null?void 0:p.isNew)&&(h.reportInfo(X.TELEMETRY_NOTICE,"Yarn will periodically gather anonymous telemetry: https://yarnpkg.com/advanced/telemetry"),h.reportInfo(X.TELEMETRY_NOTICE,`Run ${ae.pretty(e,"yarn config set --home enableTelemetry 0",ae.Type.CODE)} to disable`),h.reportSeparator())});if(f.hasErrors())return f.exitCode()}let{project:a,workspace:l}=await ze.find(e,this.context.cwd),c=await Nt.find(e,{immutable:o,check:this.checkCache});if(!l)throw new ht(a.cwd,this.context.cwd);return await a.restoreInstallState({restoreResolutions:!1}),(await Je.start({configuration:e,json:this.json,stdout:this.context.stdout,includeLogs:!0},async f=>{await a.install({cache:c,report:f,immutable:s,mode:this.mode})})).exitCode()}};um.paths=[["install"],Re.Default],um.usage=Re.Usage({description:"install the project dependencies",details:` + This command sets up your project if needed. The installation is split into four different steps that each have their own characteristics: + + - **Resolution:** First the package manager will resolve your dependencies. The exact way a dependency version is privileged over another isn't standardized outside of the regular semver guarantees. If a package doesn't resolve to what you would expect, check that all dependencies are correctly declared (also check our website for more information: ). + + - **Fetch:** Then we download all the dependencies if needed, and make sure that they're all stored within our cache (check the value of \`cacheFolder\` in \`yarn config\` to see where the cache files are stored). + + - **Link:** Then we send the dependency tree information to internal plugins tasked with writing them on the disk in some form (for example by generating the .pnp.cjs file you might know). + + - **Build:** Once the dependency tree has been written on the disk, the package manager will now be free to run the build scripts for all packages that might need it, in a topological order compatible with the way they depend on one another. See https://yarnpkg.com/advanced/lifecycle-scripts for detail. + + Note that running this command is not part of the recommended workflow. Yarn supports zero-installs, which means that as long as you store your cache and your .pnp.cjs file inside your repository, everything will work without requiring any install right after cloning your repository or switching branches. + + If the \`--immutable\` option is set (defaults to true on CI), Yarn will abort with an error exit code if the lockfile was to be modified (other paths can be added using the \`immutablePatterns\` configuration setting). For backward compatibility we offer an alias under the name of \`--frozen-lockfile\`, but it will be removed in a later release. + + If the \`--immutable-cache\` option is set, Yarn will abort with an error exit code if the cache folder was to be modified (either because files would be added, or because they'd be removed). + + If the \`--check-cache\` option is set, Yarn will always refetch the packages and will ensure that their checksum matches what's 1/ described in the lockfile 2/ inside the existing cache files (if present). This is recommended as part of your CI workflow if you're both following the Zero-Installs model and accepting PRs from third-parties, as they'd otherwise have the ability to alter the checked-in packages before submitting them. + + If the \`--inline-builds\` option is set, Yarn will verbosely print the output of the build steps of your dependencies (instead of writing them into individual files). This is likely useful mostly for debug purposes only when using Docker-like environments. + + If the \`--mode=\` option is set, Yarn will change which artifacts are generated. The modes currently supported are: + + - \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the later will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run. + + - \`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost. + `,examples:[["Install the project","$0 install"],["Validate a project when using Zero-Installs","$0 install --immutable --immutable-cache"],["Validate a project when using Zero-Installs (slightly safer if you accept external PRs)","$0 install --immutable --immutable-cache --check-cache"]]});var koe=um,O3e="|||||||",M3e=">>>>>>>",K3e="=======",Poe="<<<<<<<";async function T3e(r,e){if(!r.projectCwd)return!1;let t=k.join(r.projectCwd,r.get("lockfileFilename"));if(!await K.existsPromise(t))return!1;let i=await K.readFilePromise(t,"utf8");if(!i.includes(Poe))return!1;if(e)throw new ct(X.AUTOMERGE_IMMUTABLE,"Cannot autofix a lockfile when running an immutable install");let[n,s]=U3e(i),o,a;try{o=Si(n),a=Si(s)}catch(c){throw new ct(X.AUTOMERGE_FAILED_TO_PARSE,"The individual variants of the lockfile failed to parse")}let l=N(N({},o),a);for(let[c,u]of Object.entries(l))typeof u=="string"&&delete l[c];return await K.changeFilePromise(t,Ma(l),{automaticNewlines:!0}),!0}function U3e(r){let e=[[],[]],t=r.split(/\r?\n/g),i=!1;for(;t.length>0;){let n=t.shift();if(typeof n=="undefined")throw new Error("Assertion failed: Some lines should remain");if(n.startsWith(Poe)){for(;t.length>0;){let s=t.shift();if(typeof s=="undefined")throw new Error("Assertion failed: Some lines should remain");if(s===K3e){i=!1;break}else if(i||s.startsWith(O3e)){i=!0;continue}else e[0].push(s)}for(;t.length>0;){let s=t.shift();if(typeof s=="undefined")throw new Error("Assertion failed: Some lines should remain");if(s.startsWith(M3e))break;e[1].push(s)}}else e[0].push(n),e[1].push(n)}return[e[0].join(` +`),e[1].join(` +`)]}var gm=class extends Le{constructor(){super(...arguments);this.all=J.Boolean("-A,--all",!1,{description:"Link all workspaces belonging to the target project to the current one"});this.private=J.Boolean("-p,--private",!1,{description:"Also link private workspaces belonging to the target project to the current one"});this.relative=J.Boolean("-r,--relative",!1,{description:"Link workspaces using relative paths instead of absolute paths"});this.destination=J.String()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd),n=await Nt.find(e);if(!i)throw new ht(t.cwd,this.context.cwd);await t.restoreInstallState({restoreResolutions:!1});let s=k.resolve(this.context.cwd,H.toPortablePath(this.destination)),o=await ye.find(s,this.context.plugins,{useRc:!1,strict:!1}),{project:a,workspace:l}=await ze.find(o,s);if(t.cwd===a.cwd)throw new Pe("Invalid destination; Can't link the project to itself");if(!l)throw new ht(a.cwd,s);let c=t.topLevelWorkspace,u=[];if(this.all){for(let f of a.workspaces)f.manifest.name&&(!f.manifest.private||this.private)&&u.push(f);if(u.length===0)throw new Pe("No workspace found to be linked in the target project")}else{if(!l.manifest.name)throw new Pe("The target workspace doesn't have a name and thus cannot be linked");if(l.manifest.private&&!this.private)throw new Pe("The target workspace is marked private - use the --private flag to link it anyway");u.push(l)}for(let f of u){let h=P.stringifyIdent(f.locator),p=this.relative?k.relative(t.cwd,f.cwd):f.cwd;c.manifest.resolutions.push({pattern:{descriptor:{fullName:h}},reference:`portal:${p}`})}return(await Je.start({configuration:e,stdout:this.context.stdout},async f=>{await t.install({cache:n,report:f})})).exitCode()}};gm.paths=[["link"]],gm.usage=Re.Usage({description:"connect the local project to another one",details:"\n This command will set a new `resolutions` field in the project-level manifest and point it to the workspace at the specified location (even if part of another project).\n ",examples:[["Register a remote workspace for use in the current project","$0 link ~/ts-loader"],["Register all workspaces from a remote project for use in the current project","$0 link ~/jest --all"]]});var Doe=gm;var fm=class extends Le{constructor(){super(...arguments);this.args=J.Proxy()}async execute(){return this.cli.run(["exec","node",...this.args])}};fm.paths=[["node"]],fm.usage=Re.Usage({description:"run node with the hook already setup",details:` + This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment). + + The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version. + `,examples:[["Run a Node script","$0 node ./my-script.js"]]});var Roe=fm;var Hoe=ge(require("os"));var Noe=ge(require("os"));var H3e="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function bu(r){let e=await ir.get(H3e,{configuration:r});return Si(e.toString())}var hm=class extends Le{constructor(){super(...arguments);this.json=J.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins);return(await Je.start({configuration:e,json:this.json,stdout:this.context.stdout},async i=>{let n=await bu(e);for(let s of Object.entries(n)){let[l,o]=s,a=o,{experimental:c}=a,u=Or(a,["experimental"]);let g=l;c&&(g+=" [experimental]"),i.reportJson(N({name:l,experimental:c},u)),i.reportInfo(null,g)}})).exitCode()}};hm.paths=[["plugin","list"]],hm.usage=Re.Usage({category:"Plugin-related commands",description:"list the available official plugins",details:"\n This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarn plugin import`.\n ",examples:[["List the official plugins","$0 plugin list"]]});var Foe=hm;var j3e=/^[0-9]+$/;function Loe(r){return j3e.test(r)?`pull/${r}/head`:r}var G3e=({repository:r,branch:e},t)=>[["git","init",H.fromPortablePath(t)],["git","remote","add","origin",r],["git","fetch","origin","--depth=1",Loe(e)],["git","reset","--hard","FETCH_HEAD"]],Y3e=({branch:r})=>[["git","fetch","origin","--depth=1",Loe(r),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx"]],q3e=({plugins:r,noMinify:e},t)=>[["yarn","build:cli",...new Array().concat(...r.map(i=>["--plugin",k.resolve(t,i)])),...e?["--no-minify"]:[],"|"]],pm=class extends Le{constructor(){super(...arguments);this.installPath=J.String("--path",{description:"The path where the repository should be cloned to"});this.repository=J.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=J.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=J.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.noMinify=J.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=J.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=J.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t}=await ze.find(e,this.context.cwd),i=typeof this.installPath!="undefined"?k.resolve(this.context.cwd,H.toPortablePath(this.installPath)):k.resolve(H.toPortablePath((0,Noe.tmpdir)()),"yarnpkg-sources",Dn.makeHash(this.repository).slice(0,6));return(await Je.start({configuration:e,stdout:this.context.stdout},async s=>{await vN(this,{configuration:e,report:s,target:i}),s.reportSeparator(),s.reportInfo(X.UNNAMED,"Building a fresh bundle"),s.reportSeparator(),await dm(q3e(this,i),{configuration:e,context:this.context,target:i}),s.reportSeparator();let o=k.resolve(i,"packages/yarnpkg-cli/bundles/yarn.js"),a=await K.readFilePromise(o);await QN(e,"sources",a,{report:s}),this.skipPlugins||await J3e(this,{project:t,report:s,target:i})})).exitCode()}};pm.paths=[["set","version","from","sources"]],pm.usage=Re.Usage({description:"build Yarn from master",details:` + This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project. + + By default, it also updates all contrib plugins to the same commit the bundle is built from. This behavior can be disabled by using the \`--skip-plugins\` flag. + `,examples:[["Build Yarn from master","$0 set version from sources"]]});var Toe=pm;async function dm(r,{configuration:e,context:t,target:i}){for(let[n,...s]of r){let o=s[s.length-1]==="|";if(o&&s.pop(),o)await Nr.pipevp(n,s,{cwd:i,stdin:t.stdin,stdout:t.stdout,stderr:t.stderr,strict:!0});else{t.stdout.write(`${ae.pretty(e,` $ ${[n,...s].join(" ")}`,"grey")} +`);try{await Nr.execvp(n,s,{cwd:i,strict:!0})}catch(a){throw t.stdout.write(a.stdout||a.stack),a}}}}async function vN(r,{configuration:e,report:t,target:i}){let n=!1;if(!r.force&&K.existsSync(k.join(i,".git"))){t.reportInfo(X.UNNAMED,"Fetching the latest commits"),t.reportSeparator();try{await dm(Y3e(r),{configuration:e,context:r.context,target:i}),n=!0}catch(s){t.reportSeparator(),t.reportWarning(X.UNNAMED,"Repository update failed; we'll try to regenerate it")}}n||(t.reportInfo(X.UNNAMED,"Cloning the remote repository"),t.reportSeparator(),await K.removePromise(i),await K.mkdirPromise(i,{recursive:!0}),await dm(G3e(r,i),{configuration:e,context:r.context,target:i}))}async function J3e(r,{project:e,report:t,target:i}){let n=await bu(e.configuration),s=new Set(Object.keys(n));for(let o of e.configuration.plugins.keys())!s.has(o)||await SN(o,r,{project:e,report:t,target:i})}var Ooe=ge(ri()),Moe=ge(require("url")),Koe=ge(require("vm"));var Cm=class extends Le{constructor(){super(...arguments);this.name=J.String()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins);return(await Je.start({configuration:e,stdout:this.context.stdout},async i=>{let{project:n}=await ze.find(e,this.context.cwd),s,o;if(this.name.match(/^\.{0,2}[\\/]/)||H.isAbsolute(this.name)){let a=k.resolve(this.context.cwd,H.toPortablePath(this.name));i.reportInfo(X.UNNAMED,`Reading ${ae.pretty(e,a,ae.Type.PATH)}`),s=k.relative(n.cwd,a),o=await K.readFilePromise(a)}else{let a;if(this.name.match(/^https?:/)){try{new Moe.URL(this.name)}catch{throw new ct(X.INVALID_PLUGIN_REFERENCE,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}s=this.name,a=this.name}else{let l=P.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(l.reference!=="unknown"&&!Ooe.default.valid(l.reference))throw new ct(X.UNNAMED,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let c=P.stringifyIdent(l),u=await bu(e);if(!Object.prototype.hasOwnProperty.call(u,c))throw new ct(X.PLUGIN_NAME_NOT_FOUND,`Couldn't find a plugin named "${c}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be referenced by their name; any other plugin will have to be referenced through its public url (for example https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js).`);s=c,a=u[c].url,l.reference!=="unknown"?a=a.replace(/\/master\//,`/${c}/${l.reference}/`):Ur!==null&&(a=a.replace(/\/master\//,`/@yarnpkg/cli/${Ur}/`))}i.reportInfo(X.UNNAMED,`Downloading ${ae.pretty(e,a,"green")}`),o=await ir.get(a,{configuration:e})}await xN(s,o,{project:n,report:i})})).exitCode()}};Cm.paths=[["plugin","import"]],Cm.usage=Re.Usage({category:"Plugin-related commands",description:"download a plugin",details:` + This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations. + + Three types of plugin references are accepted: + + - If the plugin is stored within the Yarn repository, it can be referenced by name. + - Third-party plugins can be referenced directly through their public urls. + - Local plugins can be referenced by their path on the disk. + + Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the \`@yarnpkg/builder\` package). + `,examples:[['Download and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import @yarnpkg/plugin-exec"],['Download and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import exec"],["Download and activate a community plugin","$0 plugin import https://example.org/path/to/plugin.js"],["Activate a local plugin","$0 plugin import ./path/to/plugin.js"]]});var Uoe=Cm;async function xN(r,e,{project:t,report:i}){let{configuration:n}=t,s={},o={exports:s};(0,Koe.runInNewContext)(e.toString(),{module:o,exports:s});let a=o.exports.name,l=`.yarn/plugins/${a}.cjs`,c=k.resolve(t.cwd,l);i.reportInfo(X.UNNAMED,`Saving the new plugin in ${ae.pretty(n,l,"magenta")}`),await K.mkdirPromise(k.dirname(c),{recursive:!0}),await K.writeFilePromise(c,e);let u={path:l,spec:r};await ye.updateConfiguration(t.cwd,g=>{let f=[],h=!1;for(let p of g.plugins||[]){let m=typeof p!="string"?p.path:p,y=k.resolve(t.cwd,H.toPortablePath(m)),{name:b}=Se.dynamicRequire(y);b!==a?f.push(p):(f.push(u),h=!0)}return h||f.push(u),te(N({},g),{plugins:f})})}var W3e=({pluginName:r,noMinify:e},t)=>[["yarn",`build:${r}`,...e?["--no-minify"]:[],"|"]],mm=class extends Le{constructor(){super(...arguments);this.installPath=J.String("--path",{description:"The path where the repository should be cloned to"});this.repository=J.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=J.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=J.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=J.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=J.String()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),t=typeof this.installPath!="undefined"?k.resolve(this.context.cwd,H.toPortablePath(this.installPath)):k.resolve(H.toPortablePath((0,Hoe.tmpdir)()),"yarnpkg-sources",Dn.makeHash(this.repository).slice(0,6));return(await Je.start({configuration:e,stdout:this.context.stdout},async n=>{let{project:s}=await ze.find(e,this.context.cwd),o=P.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),a=P.stringifyIdent(o),l=await bu(e);if(!Object.prototype.hasOwnProperty.call(l,a))throw new ct(X.PLUGIN_NAME_NOT_FOUND,`Couldn't find a plugin named "${a}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);let c=a;await vN(this,{configuration:e,report:n,target:t}),await SN(c,this,{project:s,report:n,target:t})})).exitCode()}};mm.paths=[["plugin","import","from","sources"]],mm.usage=Re.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:` + This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations. + + The plugins can be referenced by their short name if sourced from the official Yarn repository. + `,examples:[['Build and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import from sources @yarnpkg/plugin-exec"],['Build and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import from sources exec"]]});var joe=mm;async function SN(r,{context:e,noMinify:t},{project:i,report:n,target:s}){let o=r.replace(/@yarnpkg\//,""),{configuration:a}=i;n.reportSeparator(),n.reportInfo(X.UNNAMED,`Building a fresh ${o}`),n.reportSeparator(),await dm(W3e({pluginName:o,noMinify:t},s),{configuration:a,context:e,target:s}),n.reportSeparator();let l=k.resolve(s,`packages/${o}/bundles/${r}.js`),c=await K.readFilePromise(l);await xN(r,c,{project:i,report:n})}var Em=class extends Le{constructor(){super(...arguments);this.name=J.String()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t}=await ze.find(e,this.context.cwd);return(await Je.start({configuration:e,stdout:this.context.stdout},async n=>{let s=this.name,o=P.parseIdent(s);if(!e.plugins.has(s))throw new Pe(`${P.prettyIdent(e,o)} isn't referenced by the current configuration`);let a=`.yarn/plugins/${s}.cjs`,l=k.resolve(t.cwd,a);K.existsSync(l)&&(n.reportInfo(X.UNNAMED,`Removing ${ae.pretty(e,a,ae.Type.PATH)}...`),await K.removePromise(l)),n.reportInfo(X.UNNAMED,"Updating the configuration..."),await ye.updateConfiguration(t.cwd,c=>{if(!Array.isArray(c.plugins))return c;let u=c.plugins.filter(g=>g.path!==a);return c.plugins.length===u.length?c:te(N({},c),{plugins:u})})})).exitCode()}};Em.paths=[["plugin","remove"]],Em.usage=Re.Usage({category:"Plugin-related commands",description:"remove a plugin",details:` + This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration. + + **Note:** The plugins have to be referenced by their name property, which can be obtained using the \`yarn plugin runtime\` command. Shorthands are not allowed. + `,examples:[["Remove a plugin imported from the Yarn repository","$0 plugin remove @yarnpkg/plugin-typescript"],["Remove a plugin imported from a local file","$0 plugin remove my-local-plugin"]]});var Goe=Em;var Im=class extends Le{constructor(){super(...arguments);this.json=J.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins);return(await Je.start({configuration:e,json:this.json,stdout:this.context.stdout},async i=>{for(let n of e.plugins.keys()){let s=this.context.plugins.plugins.has(n),o=n;s&&(o+=" [builtin]"),i.reportJson({name:n,builtin:s}),i.reportInfo(null,`${o}`)}})).exitCode()}};Im.paths=[["plugin","runtime"]],Im.usage=Re.Usage({category:"Plugin-related commands",description:"list the active plugins",details:` + This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins. + `,examples:[["List the currently active plugins","$0 plugin runtime"]]});var Yoe=Im;var ym=class extends Le{constructor(){super(...arguments);this.idents=J.Rest()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd),n=await Nt.find(e);if(!i)throw new ht(t.cwd,this.context.cwd);let s=new Set;for(let a of this.idents)s.add(P.parseIdent(a).identHash);if(await t.restoreInstallState({restoreResolutions:!1}),await t.resolveEverything({cache:n,report:new di}),s.size>0)for(let a of t.storedPackages.values())s.has(a.identHash)&&t.storedBuildState.delete(a.locatorHash);else t.storedBuildState.clear();return(await Je.start({configuration:e,stdout:this.context.stdout,includeLogs:!this.context.quiet},async a=>{await t.install({cache:n,report:a})})).exitCode()}};ym.paths=[["rebuild"]],ym.usage=Re.Usage({description:"rebuild the project's native packages",details:` + This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again. + + Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future). + + By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory. + `,examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]});var qoe=ym;var kN=ge(is());ys();var wm=class extends Le{constructor(){super(...arguments);this.all=J.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=J.String("--mode",{description:"Change what artifacts installs generate",validator:nn(Ci)});this.patterns=J.Rest()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd),n=await Nt.find(e);if(!i)throw new ht(t.cwd,this.context.cwd);await t.restoreInstallState({restoreResolutions:!1});let s=this.all?t.workspaces:[i],o=[Hr.REGULAR,Hr.DEVELOPMENT,Hr.PEER],a=[],l=!1,c=[];for(let h of this.patterns){let p=!1,m=P.parseIdent(h);for(let y of s){let b=[...y.manifest.peerDependenciesMeta.keys()];for(let v of(0,kN.default)(b,h))y.manifest.peerDependenciesMeta.delete(v),l=!0,p=!0;for(let v of o){let x=y.manifest.getForScope(v),T=[...x.values()].map(q=>P.stringifyIdent(q));for(let q of(0,kN.default)(T,P.stringifyIdent(m))){let{identHash:Y}=P.parseIdent(q),$=x.get(Y);if(typeof $=="undefined")throw new Error("Assertion failed: Expected the descriptor to be registered");y.manifest[v].delete(Y),c.push([y,v,$]),l=!0,p=!0}}}p||a.push(h)}let u=a.length>1?"Patterns":"Pattern",g=a.length>1?"don't":"doesn't",f=this.all?"any":"this";if(a.length>0)throw new Pe(`${u} ${ae.prettyList(e,a,Ri.CODE)} ${g} match any packages referenced by ${f} workspace`);return l?(await e.triggerMultipleHooks(p=>p.afterWorkspaceDependencyRemoval,c),(await Je.start({configuration:e,stdout:this.context.stdout},async p=>{await t.install({cache:n,report:p,mode:this.mode})})).exitCode()):0}};wm.paths=[["remove"]],wm.usage=Re.Usage({description:"remove dependencies from the project",details:` + This command will remove the packages matching the specified patterns from the current workspace. + + If the \`--mode=\` option is set, Yarn will change which artifacts are generated. The modes currently supported are: + + - \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the later will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run. + + - \`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost. + + This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them. + `,examples:[["Remove a dependency from the current project","$0 remove lodash"],["Remove a dependency from all workspaces at once","$0 remove lodash --all"],["Remove all dependencies starting with `eslint-`","$0 remove 'eslint-*'"],["Remove all dependencies with the `@babel` scope","$0 remove '@babel/*'"],["Remove all dependencies matching `react-dom` or `react-helmet`","$0 remove 'react-{dom,helmet}'"]]});var Joe=wm;var Woe=ge(require("util")),V0=class extends Le{async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd);if(!i)throw new ht(t.cwd,this.context.cwd);return(await Je.start({configuration:e,stdout:this.context.stdout},async s=>{let o=i.manifest.scripts,a=Se.sortMap(o.keys(),u=>u),l={breakLength:Infinity,colors:e.get("enableColors"),maxArrayLength:2},c=a.reduce((u,g)=>Math.max(u,g.length),0);for(let[u,g]of o.entries())s.reportInfo(null,`${u.padEnd(c," ")} ${(0,Woe.inspect)(g,l)}`)})).exitCode()}};V0.paths=[["run"]];var zoe=V0;var Bm=class extends Le{constructor(){super(...arguments);this.inspect=J.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=J.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=J.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=J.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.silent=J.Boolean("--silent",{hidden:!0});this.scriptName=J.String();this.args=J.Proxy()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i,locator:n}=await ze.find(e,this.context.cwd);await t.restoreInstallState();let s=this.topLevel?t.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await Zt.hasPackageScript(s,this.scriptName,{project:t}))return await Zt.executePackageScript(s,this.scriptName,this.args,{project:t,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let o=await Zt.getPackageAccessibleBinaries(s,{project:t});if(o.get(this.scriptName)){let l=[];return this.inspect&&(typeof this.inspect=="string"?l.push(`--inspect=${this.inspect}`):l.push("--inspect")),this.inspectBrk&&(typeof this.inspectBrk=="string"?l.push(`--inspect-brk=${this.inspectBrk}`):l.push("--inspect-brk")),await Zt.executePackageAccessibleBinary(s,this.scriptName,this.args,{cwd:this.context.cwd,project:t,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:l,packageAccessibleBinaries:o})}if(!this.topLevel&&!this.binariesOnly&&i&&this.scriptName.includes(":")){let c=(await Promise.all(t.workspaces.map(async u=>u.manifest.scripts.has(this.scriptName)?u:null))).filter(u=>u!==null);if(c.length===1)return await Zt.executeWorkspaceScript(c[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw this.scriptName==="node-gyp"?new Pe(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${P.prettyLocator(e,n)}). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new Pe(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${P.prettyLocator(e,n)}).`);{if(this.scriptName==="global")throw new Pe("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");let l=[this.scriptName].concat(this.args);for(let[c,u]of Lf)for(let g of u)if(l.length>=g.length&&JSON.stringify(l.slice(0,g.length))===JSON.stringify(g))throw new Pe(`Couldn't find a script named "${this.scriptName}", but a matching command can be found in the ${c} plugin. You can install it with "yarn plugin import ${c}".`);throw new Pe(`Couldn't find a script named "${this.scriptName}".`)}}};Bm.paths=[["run"]],Bm.usage=Re.Usage({description:"run a script defined in the package.json",details:` + This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace: + + - If the \`scripts\` field from your local package.json contains a matching script name, its definition will get executed. + + - Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed. + + - Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed. + + Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax). + `,examples:[["Run the tests from the local workspace","$0 run test"],['Same thing, but without the "run" keyword',"$0 test"],["Inspect Webpack while running","$0 run --inspect-brk webpack"]]});var _oe=Bm;var bm=class extends Le{constructor(){super(...arguments);this.save=J.Boolean("-s,--save",!1,{description:"Persist the resolution inside the top-level manifest"});this.descriptor=J.String();this.resolution=J.String()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd),n=await Nt.find(e);if(await t.restoreInstallState({restoreResolutions:!1}),!i)throw new ht(t.cwd,this.context.cwd);let s=P.parseDescriptor(this.descriptor,!0),o=P.makeDescriptor(s,this.resolution);return t.storedDescriptors.set(s.descriptorHash,s),t.storedDescriptors.set(o.descriptorHash,o),t.resolutionAliases.set(s.descriptorHash,o.descriptorHash),(await Je.start({configuration:e,stdout:this.context.stdout},async l=>{await t.install({cache:n,report:l})})).exitCode()}};bm.paths=[["set","resolution"]],bm.usage=Re.Usage({description:"enforce a package resolution",details:'\n This command updates the resolution table so that `descriptor` is resolved by `resolution`.\n\n Note that by default this command only affect the current resolution table - meaning that this "manual override" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, add the `-s,--save` flag which will also edit the `resolutions` field from your top-level manifest.\n\n Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\n ',examples:[["Force all instances of lodash@npm:^1.2.3 to resolve to 1.5.0","$0 set resolution lodash@npm:^1.2.3 1.5.0"]]});var Voe=bm;var Xoe=ge(is()),Qm=class extends Le{constructor(){super(...arguments);this.all=J.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=J.Rest()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd),n=await Nt.find(e);if(!i)throw new ht(t.cwd,this.context.cwd);let s=t.topLevelWorkspace,o=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:l,reference:c}of s.manifest.resolutions)c.startsWith("portal:")&&o.add(l.descriptor.fullName);if(this.leadingArguments.length>0)for(let l of this.leadingArguments){let c=k.resolve(this.context.cwd,H.toPortablePath(l));if(Se.isPathLike(l)){let u=await ye.find(c,this.context.plugins,{useRc:!1,strict:!1}),{project:g,workspace:f}=await ze.find(u,c);if(!f)throw new ht(g.cwd,c);if(this.all){for(let h of g.workspaces)h.manifest.name&&o.add(P.stringifyIdent(h.locator));if(o.size===0)throw new Pe("No workspace found to be unlinked in the target project")}else{if(!f.manifest.name)throw new Pe("The target workspace doesn't have a name and thus cannot be unlinked");o.add(P.stringifyIdent(f.locator))}}else{let u=[...s.manifest.resolutions.map(({pattern:g})=>g.descriptor.fullName)];for(let g of(0,Xoe.default)(u,l))o.add(g)}}return s.manifest.resolutions=s.manifest.resolutions.filter(({pattern:l})=>!o.has(l.descriptor.fullName)),(await Je.start({configuration:e,stdout:this.context.stdout},async l=>{await t.install({cache:n,report:l})})).exitCode()}};Qm.paths=[["unlink"]],Qm.usage=Re.Usage({description:"disconnect the local project from another one",details:` + This command will remove any resolutions in the project-level manifest that would have been added via a yarn link with similar arguments. + `,examples:[["Unregister a remote workspace in the current project","$0 unlink ~/ts-loader"],["Unregister all workspaces from a remote project in the current project","$0 unlink ~/jest --all"],["Unregister all previously linked workspaces","$0 unlink --all"],["Unregister all workspaces matching a glob","$0 unlink '@babel/*' 'pkg-{a,b}'"]]});var Zoe=Qm;var $oe=ge(WC()),PN=ge(is());ys();var th=class extends Le{constructor(){super(...arguments);this.interactive=J.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.exact=J.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=J.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=J.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=J.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.mode=J.String("--mode",{description:"Change what artifacts installs generate",validator:nn(Ci)});this.patterns=J.Rest()}async execute(){return this.recursive?await this.executeUpRecursive():await this.executeUpClassic()}async executeUpRecursive(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd),n=await Nt.find(e);if(!i)throw new ht(t.cwd,this.context.cwd);await t.restoreInstallState({restoreResolutions:!1});let s=[...t.storedDescriptors.values()],o=s.map(u=>P.stringifyIdent(u)),a=new Set;for(let u of this.patterns){if(P.parseDescriptor(u).range!=="unknown")throw new Pe("Ranges aren't allowed when using --recursive");for(let g of(0,PN.default)(o,u)){let f=P.parseIdent(g);a.add(f.identHash)}}let l=s.filter(u=>a.has(u.identHash));for(let u of l)t.storedDescriptors.delete(u.descriptorHash),t.storedResolutions.delete(u.descriptorHash);return(await Je.start({configuration:e,stdout:this.context.stdout},async u=>{await t.install({cache:n,report:u})})).exitCode()}async executeUpClassic(){var m;let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd),n=await Nt.find(e);if(!i)throw new ht(t.cwd,this.context.cwd);await t.restoreInstallState({restoreResolutions:!1});let s=(m=this.interactive)!=null?m:e.get("preferInteractive"),o=zC(this,t),a=s?[Vr.KEEP,Vr.REUSE,Vr.PROJECT,Vr.LATEST]:[Vr.PROJECT,Vr.LATEST],l=[],c=[];for(let y of this.patterns){let b=!1,v=P.parseDescriptor(y);for(let x of t.workspaces)for(let T of[Hr.REGULAR,Hr.DEVELOPMENT]){let Y=[...x.manifest.getForScope(T).values()].map($=>P.stringifyIdent($));for(let $ of(0,PN.default)(Y,P.stringifyIdent(v))){let _=P.parseIdent($),ne=x.manifest[T].get(_.identHash);if(typeof ne=="undefined")throw new Error("Assertion failed: Expected the descriptor to be registered");let ee=P.makeDescriptor(_,v.range);l.push(Promise.resolve().then(async()=>[x,T,ne,await _C(ee,{project:t,workspace:x,cache:n,target:T,modifier:o,strategies:a})])),b=!0}}b||c.push(y)}if(c.length>1)throw new Pe(`Patterns ${ae.prettyList(e,c,Ri.CODE)} don't match any packages referenced by any workspace`);if(c.length>0)throw new Pe(`Pattern ${ae.prettyList(e,c,Ri.CODE)} doesn't match any packages referenced by any workspace`);let u=await Promise.all(l),g=await pA.start({configuration:e,stdout:this.context.stdout,suggestInstall:!1},async y=>{for(let[,,b,{suggestions:v,rejections:x}]of u){let T=v.filter(q=>q.descriptor!==null);if(T.length===0){let[q]=x;if(typeof q=="undefined")throw new Error("Assertion failed: Expected an error to have been set");let Y=this.cli.error(q);t.configuration.get("enableNetwork")?y.reportError(X.CANT_SUGGEST_RESOLUTIONS,`${P.prettyDescriptor(e,b)} can't be resolved to a satisfying range + +${Y}`):y.reportError(X.CANT_SUGGEST_RESOLUTIONS,`${P.prettyDescriptor(e,b)} can't be resolved to a satisfying range (note: network resolution has been disabled) + +${Y}`)}else T.length>1&&!s&&y.reportError(X.CANT_SUGGEST_RESOLUTIONS,`${P.prettyDescriptor(e,b)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(g.hasErrors())return g.exitCode();let f=!1,h=[];for(let[y,b,,{suggestions:v}]of u){let x,T=v.filter(_=>_.descriptor!==null),q=T[0].descriptor,Y=T.every(_=>P.areDescriptorsEqual(_.descriptor,q));T.length===1||Y?x=q:(f=!0,{answer:x}=await(0,$oe.prompt)({type:"select",name:"answer",message:`Which range to you want to use in ${P.prettyWorkspace(e,y)} \u276F ${b}?`,choices:v.map(({descriptor:_,name:ne,reason:ee})=>_?{name:ne,hint:ee,descriptor:_}:{name:ne,hint:ee,disabled:!0}),onCancel:()=>process.exit(130),result(_){return this.find(_,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let $=y.manifest[b].get(x.identHash);if(typeof $=="undefined")throw new Error("Assertion failed: This descriptor should have a matching entry");if($.descriptorHash!==x.descriptorHash)y.manifest[b].set(x.identHash,x),h.push([y,b,$,x]);else{let _=e.makeResolver(),ne={project:t,resolver:_},ee=_.bindDescriptor($,y.anchoredLocator,ne);t.forgetResolution(ee)}}return await e.triggerMultipleHooks(y=>y.afterWorkspaceDependencyReplacement,h),f&&this.context.stdout.write(` +`),(await Je.start({configuration:e,stdout:this.context.stdout},async y=>{await t.install({cache:n,report:y,mode:this.mode})})).exitCode()}};th.paths=[["up"]],th.usage=Re.Usage({description:"upgrade dependencies across the project",details:"\n This command upgrades the packages matching the list of specified patterns to their latest available version across the whole project (regardless of whether they're part of `dependencies` or `devDependencies` - `peerDependencies` won't be affected). This is a project-wide command: all workspaces will be upgraded in the process.\n\n If `-R,--recursive` is set the command will change behavior and no other switch will be allowed. When operating under this mode `yarn up` will force all ranges matching the selected packages to be resolved again (often to the highest available versions) before being stored in the lockfile. It however won't touch your manifests anymore, so depending on your needs you might want to run both `yarn up` and `yarn up -R` to cover all bases.\n\n If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\n\n The, `-C,--caret`, `-E,--exact` and `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\n\n If the `--mode=` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the later will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n Generally you can see `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarn upgrade` which only upgraded dependencies in the current workspace, `yarn up` will upgrade all workspaces at the same time.\n\n This command accepts glob patterns as arguments (if valid Descriptors and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n **Note:** The ranges have to be static, only the package scopes and names can contain glob patterns.\n ",examples:[["Upgrade all instances of lodash to the latest release","$0 up lodash"],["Upgrade all instances of lodash to the latest release, but ask confirmation for each","$0 up lodash -i"],["Upgrade all instances of lodash to 1.2.3","$0 up lodash@1.2.3"],["Upgrade all instances of packages with the `@babel` scope to the latest release","$0 up '@babel/*'"],["Upgrade all instances of packages containing the word `jest` to the latest release","$0 up '*jest*'"],["Upgrade all instances of packages with the `@babel` scope to 7.0.0","$0 up '@babel/*@7.0.0'"]]}),th.schema=[eS("recursive",Bc.Forbids,["interactive","exact","tilde","caret"],{ignore:[void 0,!1]})];var eae=th;var Sm=class extends Le{constructor(){super(...arguments);this.recursive=J.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=J.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=J.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});this.package=J.String()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd);if(!i)throw new ht(t.cwd,this.context.cwd);await t.restoreInstallState();let n=P.parseIdent(this.package).identHash,s=this.recursive?_3e(t,n,{configuration:e,peers:this.peers}):z3e(t,n,{configuration:e,peers:this.peers});ls.emitTree(s,{configuration:e,stdout:this.context.stdout,json:this.json,separators:1})}};Sm.paths=[["why"]],Sm.usage=Re.Usage({description:"display the reason why a package is needed",details:` + This command prints the exact reasons why a package appears in the dependency tree. + + If \`-R,--recursive\` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named "Foo" when looking for "Bar", it means that "Foo" already got printed higher in the tree. + `,examples:[["Explain why lodash is used in your project","$0 why lodash"]]});var tae=Sm;function z3e(r,e,{configuration:t,peers:i}){let n=Se.sortMap(r.storedPackages.values(),a=>P.stringifyLocator(a)),s={},o={children:s};for(let a of n){let l={},c=null;for(let u of a.dependencies.values()){if(!i&&a.peerDependencies.has(u.identHash))continue;let g=r.storedResolutions.get(u.descriptorHash);if(!g)throw new Error("Assertion failed: The resolution should have been registered");let f=r.storedPackages.get(g);if(!f)throw new Error("Assertion failed: The package should have been registered");if(f.identHash!==e)continue;if(c===null){let p=P.stringifyLocator(a);s[p]={value:[a,ae.Type.LOCATOR],children:l}}let h=P.stringifyLocator(f);l[h]={value:[{descriptor:u,locator:f},ae.Type.DEPENDENT]}}}return o}function _3e(r,e,{configuration:t,peers:i}){let n=Se.sortMap(r.workspaces,f=>P.stringifyLocator(f.anchoredLocator)),s=new Set,o=new Set,a=f=>{if(s.has(f.locatorHash))return o.has(f.locatorHash);if(s.add(f.locatorHash),f.identHash===e)return o.add(f.locatorHash),!0;let h=!1;f.identHash===e&&(h=!0);for(let p of f.dependencies.values()){if(!i&&f.peerDependencies.has(p.identHash))continue;let m=r.storedResolutions.get(p.descriptorHash);if(!m)throw new Error("Assertion failed: The resolution should have been registered");let y=r.storedPackages.get(m);if(!y)throw new Error("Assertion failed: The package should have been registered");a(y)&&(h=!0)}return h&&o.add(f.locatorHash),h};for(let f of n){let h=r.storedPackages.get(f.anchoredLocator.locatorHash);if(!h)throw new Error("Assertion failed: The package should have been registered");a(h)}let l=new Set,c={},u={children:c},g=(f,h,p)=>{if(!o.has(f.locatorHash))return;let m=p!==null?ae.tuple(ae.Type.DEPENDENT,{locator:f,descriptor:p}):ae.tuple(ae.Type.LOCATOR,f),y={},b={value:m,children:y},v=P.stringifyLocator(f);if(h[v]=b,!l.has(f.locatorHash)&&(l.add(f.locatorHash),!(p!==null&&r.tryWorkspaceByLocator(f))))for(let x of f.dependencies.values()){if(!i&&f.peerDependencies.has(x.identHash))continue;let T=r.storedResolutions.get(x.descriptorHash);if(!T)throw new Error("Assertion failed: The resolution should have been registered");let q=r.storedPackages.get(T);if(!q)throw new Error("Assertion failed: The package should have been registered");g(q,y,x)}};for(let f of n){let h=r.storedPackages.get(f.anchoredLocator.locatorHash);if(!h)throw new Error("Assertion failed: The package should have been registered");g(h,c,null)}return u}var jN={};ft(jN,{default:()=>dWe,gitUtils:()=>Qu});var Qu={};ft(Qu,{TreeishProtocols:()=>On,clone:()=>KN,fetchBase:()=>wae,fetchChangedFiles:()=>Bae,fetchChangedWorkspaces:()=>hWe,fetchRoot:()=>yae,isGitUrl:()=>ih,lsRemote:()=>Iae,normalizeLocator:()=>TN,normalizeRepoUrl:()=>vm,resolveUrl:()=>MN,splitRepoUrl:()=>xm});var NN=ge(dae()),Cae=ge(Zw()),rh=ge(require("querystring")),LN=ge(ri()),mae=ge(require("url"));function Eae(){return te(N({},process.env),{GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"} -o BatchMode=yes`})}var fWe=[/^ssh:/,/^git(?:\+[^:]+)?:/,/^(?:git\+)?https?:[^#]+\/[^#]+(?:\.git)(?:#.*)?$/,/^git@[^#]+\/[^#]+\.git(?:#.*)?$/,/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z._0-9-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\.git)?(?:#.*)?$/,/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/],On;(function(n){n.Commit="commit",n.Head="head",n.Tag="tag",n.Semver="semver"})(On||(On={}));function ih(r){return r?fWe.some(e=>!!r.match(e)):!1}function xm(r){r=vm(r);let e=r.indexOf("#");if(e===-1)return{repo:r,treeish:{protocol:On.Head,request:"HEAD"},extra:{}};let t=r.slice(0,e),i=r.slice(e+1);if(i.match(/^[a-z]+=/)){let n=rh.default.parse(i);for(let[l,c]of Object.entries(n))if(typeof c!="string")throw new Error(`Assertion failed: The ${l} parameter must be a literal string`);let s=Object.values(On).find(l=>Object.prototype.hasOwnProperty.call(n,l)),o,a;typeof s!="undefined"?(o=s,a=n[s]):(o=On.Head,a="HEAD");for(let l of Object.values(On))delete n[l];return{repo:t,treeish:{protocol:o,request:a},extra:n}}else{let n=i.indexOf(":"),s,o;return n===-1?(s=null,o=i):(s=i.slice(0,n),o=i.slice(n+1)),{repo:t,treeish:{protocol:s,request:o},extra:{}}}}function vm(r,{git:e=!1}={}){var t;if(r=r.replace(/^git\+https:/,"https:"),r=r.replace(/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\.git)?(#.*)?$/,"https://github.com/$1/$2.git$3"),r=r.replace(/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/,"https://github.com/$1/$2.git#$3"),e){r=r.replace(/^git\+([^:]+):/,"$1:");let i;try{i=mae.default.parse(r)}catch{i=null}i&&i.protocol==="ssh:"&&((t=i.path)==null?void 0:t.startsWith("/:"))&&(r=r.replace(/^ssh:\/\//,""))}return r}function TN(r){return P.makeLocator(r,vm(r.reference))}async function Iae(r,e){let t=vm(r,{git:!0});if(!ir.getNetworkSettings(`https://${(0,NN.default)(t).resource}`,{configuration:e}).enableNetwork)throw new Error(`Request to '${t}' has been blocked because of your configuration settings`);let n=await ON("listing refs",["ls-remote",t],{cwd:e.startingCwd,env:Eae()},{configuration:e,normalizedRepoUrl:t}),s=new Map,o=/^([a-f0-9]{40})\t([^\n]+)/gm,a;for(;(a=o.exec(n.stdout))!==null;)s.set(a[2],a[1]);return s}async function MN(r,e){let{repo:t,treeish:{protocol:i,request:n},extra:s}=xm(r),o=await Iae(t,e),a=(c,u)=>{switch(c){case On.Commit:{if(!u.match(/^[a-f0-9]{40}$/))throw new Error("Invalid commit hash");return rh.default.stringify(te(N({},s),{commit:u}))}case On.Head:{let g=o.get(u==="HEAD"?u:`refs/heads/${u}`);if(typeof g=="undefined")throw new Error(`Unknown head ("${u}")`);return rh.default.stringify(te(N({},s),{commit:g}))}case On.Tag:{let g=o.get(`refs/tags/${u}`);if(typeof g=="undefined")throw new Error(`Unknown tag ("${u}")`);return rh.default.stringify(te(N({},s),{commit:g}))}case On.Semver:{let g=Wt.validRange(u);if(!g)throw new Error(`Invalid range ("${u}")`);let f=new Map([...o.entries()].filter(([p])=>p.startsWith("refs/tags/")).map(([p,m])=>[LN.default.parse(p.slice(10)),m]).filter(p=>p[0]!==null)),h=LN.default.maxSatisfying([...f.keys()],g);if(h===null)throw new Error(`No matching range ("${u}")`);return rh.default.stringify(te(N({},s),{commit:f.get(h)}))}case null:{let g;if((g=l(On.Commit,u))!==null||(g=l(On.Tag,u))!==null||(g=l(On.Head,u))!==null)return g;throw u.match(/^[a-f0-9]+$/)?new Error(`Couldn't resolve "${u}" as either a commit, a tag, or a head - if a commit, use the 40-characters commit hash`):new Error(`Couldn't resolve "${u}" as either a commit, a tag, or a head`)}default:throw new Error(`Invalid Git resolution protocol ("${c}")`)}},l=(c,u)=>{try{return a(c,u)}catch(g){return null}};return`${t}#${a(i,n)}`}async function KN(r,e){return await e.getLimit("cloneConcurrency")(async()=>{let{repo:t,treeish:{protocol:i,request:n}}=xm(r);if(i!=="commit")throw new Error("Invalid treeish protocol when cloning");let s=vm(t,{git:!0});if(ir.getNetworkSettings(`https://${(0,NN.default)(s).resource}`,{configuration:e}).enableNetwork===!1)throw new Error(`Request to '${s}' has been blocked because of your configuration settings`);let o=await K.mktempPromise(),a={cwd:o,env:Eae()};return await ON("cloning the repository",["clone","-c core.autocrlf=false",s,H.fromPortablePath(o)],a,{configuration:e,normalizedRepoUrl:s}),await ON("switching branch",["checkout",`${n}`],a,{configuration:e,normalizedRepoUrl:s}),o})}async function yae(r){let e=null,t,i=r;do t=i,await K.existsPromise(k.join(t,".git"))&&(e=t),i=k.dirname(t);while(e===null&&i!==t);return e}async function wae(r,{baseRefs:e}){if(e.length===0)throw new Pe("Can't run this command with zero base refs specified.");let t=[];for(let a of e){let{code:l}=await Nr.execvp("git",["merge-base",a,"HEAD"],{cwd:r});l===0&&t.push(a)}if(t.length===0)throw new Pe(`No ancestor could be found between any of HEAD and ${e.join(", ")}`);let{stdout:i}=await Nr.execvp("git",["merge-base","HEAD",...t],{cwd:r,strict:!0}),n=i.trim(),{stdout:s}=await Nr.execvp("git",["show","--quiet","--pretty=format:%s",n],{cwd:r,strict:!0}),o=s.trim();return{hash:n,title:o}}async function Bae(r,{base:e,project:t}){let i=Se.buildIgnorePattern(t.configuration.get("changesetIgnorePatterns")),{stdout:n}=await Nr.execvp("git",["diff","--name-only",`${e}`],{cwd:r,strict:!0}),s=n.split(/\r\n|\r|\n/).filter(c=>c.length>0).map(c=>k.resolve(r,H.toPortablePath(c))),{stdout:o}=await Nr.execvp("git",["ls-files","--others","--exclude-standard"],{cwd:r,strict:!0}),a=o.split(/\r\n|\r|\n/).filter(c=>c.length>0).map(c=>k.resolve(r,H.toPortablePath(c))),l=[...new Set([...s,...a].sort())];return i?l.filter(c=>!k.relative(t.cwd,c).match(i)):l}async function hWe({ref:r,project:e}){if(e.configuration.projectCwd===null)throw new Pe("This command can only be run from within a Yarn project");let t=[k.resolve(e.cwd,e.configuration.get("cacheFolder")),k.resolve(e.cwd,e.configuration.get("installStatePath")),k.resolve(e.cwd,e.configuration.get("lockfileFilename")),k.resolve(e.cwd,e.configuration.get("virtualFolder"))];await e.configuration.triggerHook(o=>o.populateYarnPaths,e,o=>{o!=null&&t.push(o)});let i=await yae(e.configuration.projectCwd);if(i==null)throw new Pe("This command can only be run on Git repositories");let n=await wae(i,{baseRefs:typeof r=="string"?[r]:e.configuration.get("changesetBaseRefs")}),s=await Bae(i,{base:n.hash,project:e});return new Set(Se.mapAndFilter(s,o=>{let a=e.tryWorkspaceByFilePath(o);return a===null?Se.mapAndFilter.skip:t.some(l=>o.startsWith(l))?Se.mapAndFilter.skip:a}))}async function ON(r,e,t,{configuration:i,normalizedRepoUrl:n}){try{return await Nr.execvp("git",e,te(N({},t),{strict:!0}))}catch(s){if(!(s instanceof Nr.ExecError))throw s;let o=s.reportExtra,a=s.stderr.toString();throw new ct(X.EXCEPTION,`Failed ${r}`,l=>{l.reportError(X.EXCEPTION,` ${ae.prettyField(i,{label:"Repository URL",value:ae.tuple(ae.Type.URL,n)})}`);for(let c of a.matchAll(/^(.+?): (.*)$/gm)){let[,u,g]=c;u=u.toLowerCase();let f=u==="error"?"Error":`${(0,Cae.default)(u)} Error`;l.reportError(X.EXCEPTION,` ${ae.prettyField(i,{label:f,value:ae.tuple(ae.Type.NO_HINT,g)})}`)}o==null||o(l)})}}var UN=class{supports(e,t){return ih(e.reference)}getLocalPath(e,t){return null}async fetch(e,t){let i=t.checksums.get(e.locatorHash)||null,n=TN(e),s=new Map(t.checksums);s.set(n.locatorHash,i);let o=te(N({},t),{checksums:s}),a=await this.downloadHosted(n,o);if(a!==null)return a;let[l,c,u]=await t.cache.fetchPackageFromCache(e,i,N({onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,`${P.prettyLocator(t.project.configuration,e)} can't be found in the cache and will be fetched from the remote repository`),loader:()=>this.cloneFromRemote(n,o),skipIntegrityCheck:t.skipIntegrityCheck},t.cacheOptions));return{packageFs:l,releaseFs:c,prefixPath:P.getIdentVendorPath(e),checksum:u}}async downloadHosted(e,t){return t.project.configuration.reduceHook(i=>i.fetchHostedRepository,null,e,t)}async cloneFromRemote(e,t){let i=await KN(e.reference,t.project.configuration),n=xm(e.reference),s=k.join(i,"package.tgz");await Zt.prepareExternalProject(i,s,{configuration:t.project.configuration,report:t.report,workspace:n.extra.workspace,locator:e});let o=await K.readFilePromise(s);return await Se.releaseAfterUseAsync(async()=>await Bi.convertToZip(o,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:P.getIdentVendorPath(e),stripComponents:1}))}};var HN=class{supportsDescriptor(e,t){return ih(e.range)}supportsLocator(e,t){return ih(e.reference)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,i){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,i){let n=await MN(e.range,i.project.configuration);return[P.makeLocator(e,n)]}async getSatisfying(e,t,i){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let i=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),n=await Se.releaseAfterUseAsync(async()=>await At.find(i.prefixPath,{baseFs:i.packageFs}),i.releaseFs);return te(N({},e),{version:n.version||"0.0.0",languageName:n.languageName||t.project.configuration.get("defaultLanguageName"),linkType:Qt.HARD,conditions:n.getConditions(),dependencies:n.dependencies,peerDependencies:n.peerDependencies,dependenciesMeta:n.dependenciesMeta,peerDependenciesMeta:n.peerDependenciesMeta,bin:n.bin})}};var pWe={configuration:{changesetBaseRefs:{description:"The base git refs that the current HEAD is compared against when detecting changes. Supports git branches, tags, and commits.",type:Ie.STRING,isArray:!0,isNullable:!1,default:["master","origin/master","upstream/master","main","origin/main","upstream/main"]},changesetIgnorePatterns:{description:"Array of glob patterns; files matching them will be ignored when fetching the changed files",type:Ie.STRING,default:[],isArray:!0},cloneConcurrency:{description:"Maximal number of concurrent clones",type:Ie.NUMBER,default:2}},fetchers:[UN],resolvers:[HN]};var dWe=pWe;var km=class extends Le{constructor(){super(...arguments);this.since=J.String("--since",{description:"Only include workspaces that have been changed since the specified ref.",tolerateBoolean:!0});this.recursive=J.Boolean("-R,--recursive",!1,{description:"Find packages via dependencies/devDependencies instead of using the workspaces field"});this.verbose=J.Boolean("-v,--verbose",!1,{description:"Also return the cross-dependencies between workspaces"});this.json=J.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t}=await ze.find(e,this.context.cwd);return(await Je.start({configuration:e,json:this.json,stdout:this.context.stdout},async n=>{let s=this.since?await Qu.fetchChangedWorkspaces({ref:this.since,project:t}):t.workspaces,o=new Set(s);if(this.recursive)for(let a of[...s].map(l=>l.getRecursiveWorkspaceDependents()))for(let l of a)o.add(l);for(let a of o){let{manifest:l}=a,c;if(this.verbose){let u=new Set,g=new Set;for(let f of At.hardDependencies)for(let[h,p]of l.getForScope(f)){let m=t.tryWorkspaceByDescriptor(p);m===null?t.workspacesByIdent.has(h)&&g.add(p):u.add(m)}c={workspaceDependencies:Array.from(u).map(f=>f.relativeCwd),mismatchedWorkspaceDependencies:Array.from(g).map(f=>P.stringifyDescriptor(f))}}n.reportInfo(null,`${a.relativeCwd}`),n.reportJson(N({location:a.relativeCwd,name:l.name?P.stringifyIdent(l.name):null},c))}})).exitCode()}};km.paths=[["workspaces","list"]],km.usage=Re.Usage({category:"Workspace-related commands",description:"list all available workspaces",details:"\n This command will print the list of all workspaces in the project.\n\n - If `--since` is set, Yarn will only list workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\n\n - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\n\n - If both the `-v,--verbose` and `--json` options are set, Yarn will also return the cross-dependencies between each workspaces (useful when you wish to automatically generate Buck / Bazel rules).\n "});var bae=km;var Pm=class extends Le{constructor(){super(...arguments);this.workspaceName=J.String();this.commandName=J.String();this.args=J.Proxy()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd);if(!i)throw new ht(t.cwd,this.context.cwd);let n=t.workspaces,s=new Map(n.map(a=>{let l=P.convertToIdent(a.locator);return[P.stringifyIdent(l),a]})),o=s.get(this.workspaceName);if(o===void 0){let a=Array.from(s.keys()).sort();throw new Pe(`Workspace '${this.workspaceName}' not found. Did you mean any of the following: + - ${a.join(` + - `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:o.cwd})}};Pm.paths=[["workspace"]],Pm.usage=Re.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:` + This command will run a given sub-command on a single workspace. + `,examples:[["Add a package to a single workspace","yarn workspace components add -D react"],["Run build script on a single workspace","yarn workspace components run build"]]});var Qae=Pm;var CWe={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:Ie.BOOLEAN,default:Sae.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:Ie.STRING,values:["^","~",""],default:pa.CARET}},commands:[Tne,Mne,$se,uoe,Voe,Toe,boe,bae,Coe,moe,Eoe,Ioe,Nne,Lne,goe,hoe,yoe,woe,Soe,xoe,koe,Doe,Zoe,Roe,joe,Uoe,Goe,Foe,Yoe,qoe,Joe,zoe,_oe,eae,tae,Qae]},mWe=CWe;var zN={};ft(zN,{default:()=>IWe});var Ge={optional:!0},YN=[["@tailwindcss/aspect-ratio@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@tailwindcss/line-clamp@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@fullhuman/postcss-purgecss@3.1.3 || 3.1.3-alpha.0",{peerDependencies:{postcss:"^8.0.0"}}],["@samverschueren/stream-to-observable@<0.3.1",{peerDependenciesMeta:{rxjs:Ge,zenObservable:Ge}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:Ge,zenObservable:Ge}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{["supports-color"]:Ge}}],["got@<11",{dependencies:{["@types/responselike"]:"^1.0.0",["@types/keyv"]:"^3.1.1"}}],["cacheable-lookup@<4.1.2",{dependencies:{["@types/keyv"]:"^3.1.1"}}],["http-link-dataloader@*",{peerDependencies:{graphql:"^0.13.1 || ^14.0.0"}}],["typescript-language-server@*",{dependencies:{["vscode-jsonrpc"]:"^5.0.1",["vscode-languageserver-protocol"]:"^3.15.0"}}],["postcss-syntax@*",{peerDependenciesMeta:{["postcss-html"]:Ge,["postcss-jsx"]:Ge,["postcss-less"]:Ge,["postcss-markdown"]:Ge,["postcss-scss"]:Ge}}],["jss-plugin-rule-value-function@<=10.1.1",{dependencies:{["tiny-warning"]:"^1.0.2"}}],["ink-select-input@<4.1.0",{peerDependencies:{react:"^16.8.2"}}],["license-webpack-plugin@<2.3.18",{peerDependenciesMeta:{webpack:Ge}}],["snowpack@>=3.3.0",{dependencies:{["node-gyp"]:"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:Ge}}],["reactcss@*",{peerDependencies:{react:"*"}}],["react-color@<=2.19.0",{peerDependencies:{react:"*"}}],["gatsby-plugin-i18n@*",{dependencies:{ramda:"^0.24.1"}}],["useragent@^2.0.0",{dependencies:{request:"^2.88.0",yamlparser:"0.0.x",semver:"5.5.x"}}],["@apollographql/apollo-tools@<=0.5.2",{peerDependencies:{graphql:"^14.2.1 || ^15.0.0"}}],["material-table@^2.0.0",{dependencies:{"@babel/runtime":"^7.11.2"}}],["@babel/parser@*",{dependencies:{"@babel/types":"^7.8.3"}}],["fork-ts-checker-webpack-plugin@<=6.3.4",{peerDependencies:{eslint:">= 6",typescript:">= 2.7",webpack:">= 4","vue-template-compiler":"*"},peerDependenciesMeta:{eslint:Ge,"vue-template-compiler":Ge}}],["rc-animate@<=3.1.1",{peerDependencies:{react:">=16.9.0","react-dom":">=16.9.0"}}],["react-bootstrap-table2-paginator@*",{dependencies:{classnames:"^2.2.6"}}],["react-draggable@<=4.4.3",{peerDependencies:{react:">= 16.3.0","react-dom":">= 16.3.0"}}],["apollo-upload-client@<14",{peerDependencies:{graphql:"14 - 15"}}],["react-instantsearch-core@<=6.7.0",{peerDependencies:{algoliasearch:">= 3.1 < 5"}}],["react-instantsearch-dom@<=6.7.0",{dependencies:{"react-fast-compare":"^3.0.0"}}],["ws@<7.2.1",{peerDependencies:{bufferutil:"^4.0.1","utf-8-validate":"^5.0.2"},peerDependenciesMeta:{bufferutil:Ge,"utf-8-validate":Ge}}],["react-portal@*",{peerDependencies:{"react-dom":"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"}}],["react-scripts@<=4.0.1",{peerDependencies:{react:"*"}}],["testcafe@<=1.10.1",{dependencies:{"@babel/plugin-transform-for-of":"^7.12.1","@babel/runtime":"^7.12.5"}}],["testcafe-legacy-api@<=4.2.0",{dependencies:{"testcafe-hammerhead":"^17.0.1","read-file-relative":"^1.2.0"}}],["@google-cloud/firestore@<=4.9.3",{dependencies:{protobufjs:"^6.8.6"}}],["gatsby-source-apiserver@*",{dependencies:{["babel-polyfill"]:"^6.26.0"}}],["@webpack-cli/package-utils@<=1.0.1-alpha.4",{dependencies:{["cross-spawn"]:"^7.0.3"}}],["gatsby-remark-prismjs@<3.3.28",{dependencies:{lodash:"^4"}}],["gatsby-plugin-favicon@*",{peerDependencies:{webpack:"*"}}],["gatsby-plugin-sharp@<=4.6.0-next.3",{dependencies:{debug:"^4.3.1"}}],["gatsby-react-router-scroll@<=5.6.0-next.0",{dependencies:{["prop-types"]:"^15.7.2"}}],["@rebass/forms@*",{dependencies:{["@styled-system/should-forward-prop"]:"^5.0.0"},peerDependencies:{react:"^16.8.6"}}],["rebass@*",{peerDependencies:{react:"^16.8.6"}}],["@ant-design/react-slick@<=0.28.3",{peerDependencies:{react:">=16.0.0"}}],["mqtt@<4.2.7",{dependencies:{duplexify:"^4.1.1"}}],["vue-cli-plugin-vuetify@<=2.0.3",{dependencies:{semver:"^6.3.0"},peerDependenciesMeta:{"sass-loader":Ge,"vuetify-loader":Ge}}],["vue-cli-plugin-vuetify@<=2.0.4",{dependencies:{"null-loader":"^3.0.0"}}],["vue-cli-plugin-vuetify@>=2.4.3",{peerDependencies:{vue:"*"}}],["@vuetify/cli-plugin-utils@<=0.0.4",{dependencies:{semver:"^6.3.0"},peerDependenciesMeta:{"sass-loader":Ge}}],["@vue/cli-plugin-typescript@<=5.0.0-alpha.0",{dependencies:{"babel-loader":"^8.1.0"}}],["@vue/cli-plugin-typescript@<=5.0.0-beta.0",{dependencies:{"@babel/core":"^7.12.16"},peerDependencies:{"vue-template-compiler":"^2.0.0"},peerDependenciesMeta:{"vue-template-compiler":Ge}}],["cordova-ios@<=6.3.0",{dependencies:{underscore:"^1.9.2"}}],["cordova-lib@<=10.0.1",{dependencies:{underscore:"^1.9.2"}}],["git-node-fs@*",{peerDependencies:{"js-git":"^0.7.8"},peerDependenciesMeta:{"js-git":Ge}}],["consolidate@<0.16.0",{peerDependencies:{mustache:"^3.0.0"},peerDependenciesMeta:{mustache:Ge}}],["consolidate@*",{peerDependencies:{velocityjs:"^2.0.1",tinyliquid:"^0.2.34","liquid-node":"^3.0.1",jade:"^1.11.0","then-jade":"*",dust:"^0.3.0","dustjs-helpers":"^1.7.4","dustjs-linkedin":"^2.7.5",swig:"^1.4.2","swig-templates":"^2.0.3","razor-tmpl":"^1.3.1",atpl:">=0.7.6",liquor:"^0.0.5",twig:"^1.15.2",ejs:"^3.1.5",eco:"^1.1.0-rc-3",jazz:"^0.0.18",jqtpl:"~1.1.0",hamljs:"^0.6.2",hamlet:"^0.3.3",whiskers:"^0.4.0","haml-coffee":"^1.14.1","hogan.js":"^3.0.2",templayed:">=0.2.3",handlebars:"^4.7.6",underscore:"^1.11.0",lodash:"^4.17.20",pug:"^3.0.0","then-pug":"*",qejs:"^3.0.5",walrus:"^0.10.1",mustache:"^4.0.1",just:"^0.1.8",ect:"^0.5.9",mote:"^0.2.0",toffee:"^0.3.6",dot:"^1.1.3","bracket-template":"^1.1.5",ractive:"^1.3.12",nunjucks:"^3.2.2",htmling:"^0.0.8","babel-core":"^6.26.3",plates:"~0.4.11","react-dom":"^16.13.1",react:"^16.13.1","arc-templates":"^0.5.3",vash:"^0.13.0",slm:"^2.0.0",marko:"^3.14.4",teacup:"^2.0.0","coffee-script":"^1.12.7",squirrelly:"^5.1.0",twing:"^5.0.2"},peerDependenciesMeta:{velocityjs:Ge,tinyliquid:Ge,"liquid-node":Ge,jade:Ge,"then-jade":Ge,dust:Ge,"dustjs-helpers":Ge,"dustjs-linkedin":Ge,swig:Ge,"swig-templates":Ge,"razor-tmpl":Ge,atpl:Ge,liquor:Ge,twig:Ge,ejs:Ge,eco:Ge,jazz:Ge,jqtpl:Ge,hamljs:Ge,hamlet:Ge,whiskers:Ge,"haml-coffee":Ge,"hogan.js":Ge,templayed:Ge,handlebars:Ge,underscore:Ge,lodash:Ge,pug:Ge,"then-pug":Ge,qejs:Ge,walrus:Ge,mustache:Ge,just:Ge,ect:Ge,mote:Ge,toffee:Ge,dot:Ge,"bracket-template":Ge,ractive:Ge,nunjucks:Ge,htmling:Ge,"babel-core":Ge,plates:Ge,"react-dom":Ge,react:Ge,"arc-templates":Ge,vash:Ge,slm:Ge,marko:Ge,teacup:Ge,"coffee-script":Ge,squirrelly:Ge,twing:Ge}}],["vue-loader@<=16.3.3",{peerDependencies:{"@vue/compiler-sfc":"^3.0.8",webpack:"^4.1.0 || ^5.0.0-0"},peerDependenciesMeta:{"@vue/compiler-sfc":Ge}}],["vue-loader@^16.7.0",{peerDependencies:{"@vue/compiler-sfc":"^3.0.8",vue:"^3.2.13"},peerDependenciesMeta:{"@vue/compiler-sfc":Ge,vue:Ge}}],["scss-parser@*",{dependencies:{lodash:"^4.17.21"}}],["query-ast@*",{dependencies:{lodash:"^4.17.21"}}],["redux-thunk@<=2.3.0",{peerDependencies:{redux:"^4.0.0"}}],["skypack@<=0.3.2",{dependencies:{tar:"^6.1.0"}}],["@npmcli/metavuln-calculator@<2.0.0",{dependencies:{"json-parse-even-better-errors":"^2.3.1"}}],["bin-links@<2.3.0",{dependencies:{"mkdirp-infer-owner":"^1.0.2"}}],["rollup-plugin-polyfill-node@<=0.8.0",{peerDependencies:{rollup:"^1.20.0 || ^2.0.0"}}],["snowpack@<3.8.6",{dependencies:{"magic-string":"^0.25.7"}}],["elm-webpack-loader@*",{dependencies:{temp:"^0.9.4"}}],["winston-transport@<=4.4.0",{dependencies:{logform:"^2.2.0"}}],["jest-vue-preprocessor@*",{dependencies:{"@babel/core":"7.8.7","@babel/template":"7.8.6"},peerDependencies:{pug:"^2.0.4"},peerDependenciesMeta:{pug:Ge}}],["redux-persist@*",{peerDependencies:{react:">=16"},peerDependenciesMeta:{react:Ge}}],["sodium@>=3",{dependencies:{"node-gyp":"^3.8.0"}}],["babel-plugin-graphql-tag@<=3.1.0",{peerDependencies:{graphql:"^14.0.0 || ^15.0.0"}}],["@playwright/test@<=1.14.1",{dependencies:{"jest-matcher-utils":"^26.4.2"}}],...["babel-plugin-remove-graphql-queries@<3.14.0-next.1","babel-preset-gatsby-package@<1.14.0-next.1","create-gatsby@<1.14.0-next.1","gatsby-admin@<0.24.0-next.1","gatsby-cli@<3.14.0-next.1","gatsby-core-utils@<2.14.0-next.1","gatsby-design-tokens@<3.14.0-next.1","gatsby-legacy-polyfills@<1.14.0-next.1","gatsby-plugin-benchmark-reporting@<1.14.0-next.1","gatsby-plugin-graphql-config@<0.23.0-next.1","gatsby-plugin-image@<1.14.0-next.1","gatsby-plugin-mdx@<2.14.0-next.1","gatsby-plugin-netlify-cms@<5.14.0-next.1","gatsby-plugin-no-sourcemaps@<3.14.0-next.1","gatsby-plugin-page-creator@<3.14.0-next.1","gatsby-plugin-preact@<5.14.0-next.1","gatsby-plugin-preload-fonts@<2.14.0-next.1","gatsby-plugin-schema-snapshot@<2.14.0-next.1","gatsby-plugin-styletron@<6.14.0-next.1","gatsby-plugin-subfont@<3.14.0-next.1","gatsby-plugin-utils@<1.14.0-next.1","gatsby-recipes@<0.25.0-next.1","gatsby-source-shopify@<5.6.0-next.1","gatsby-source-wikipedia@<3.14.0-next.1","gatsby-transformer-screenshot@<3.14.0-next.1","gatsby-worker@<0.5.0-next.1"].map(r=>[r,{dependencies:{"@babel/runtime":"^7.14.8"}}]),["gatsby-core-utils@<2.14.0-next.1",{dependencies:{got:"8.3.2"}}],["gatsby-plugin-gatsby-cloud@<=3.1.0-next.0",{dependencies:{"gatsby-core-utils":"^2.13.0-next.0"}}],["gatsby-plugin-gatsby-cloud@<=3.2.0-next.1",{peerDependencies:{webpack:"*"}}],["babel-plugin-remove-graphql-queries@<=3.14.0-next.1",{dependencies:{"gatsby-core-utils":"^2.8.0-next.1"}}],["gatsby-plugin-netlify@3.13.0-next.1",{dependencies:{"gatsby-core-utils":"^2.13.0-next.0"}}],["clipanion-v3-codemod@<=0.2.0",{peerDependencies:{jscodeshift:"^0.11.0"}}],["react-live@*",{peerDependencies:{"react-dom":"*",react:"*"}}],["webpack@<4.44.1",{peerDependenciesMeta:{"webpack-cli":Ge,"webpack-command":Ge}}],["webpack@<5.0.0-beta.23",{peerDependenciesMeta:{"webpack-cli":Ge}}],["webpack-dev-server@<3.10.2",{peerDependenciesMeta:{"webpack-cli":Ge}}],["@docusaurus/responsive-loader@<1.5.0",{peerDependenciesMeta:{sharp:Ge,jimp:Ge}}],["eslint-module-utils@*",{peerDependenciesMeta:{"eslint-import-resolver-node":Ge,"eslint-import-resolver-typescript":Ge,"eslint-import-resolver-webpack":Ge,"@typescript-eslint/parser":Ge}}],["eslint-plugin-import@*",{peerDependenciesMeta:{"@typescript-eslint/parser":Ge}}],["critters-webpack-plugin@<3.0.2",{peerDependenciesMeta:{"html-webpack-plugin":Ge}}],["terser@<=5.10.0",{dependencies:{acorn:"^8.5.0"}}],["babel-preset-react-app@10.0.x",{dependencies:{"@babel/plugin-proposal-private-property-in-object":"^7.16.0"}}],["eslint-config-react-app@*",{peerDependenciesMeta:{typescript:Ge}}],["@vue/eslint-config-typescript@<11.0.0",{peerDependenciesMeta:{typescript:Ge}}],["unplugin-vue2-script-setup@<0.9.1",{peerDependencies:{"@vue/composition-api":"^1.4.3","@vue/runtime-dom":"^3.2.26"}}],["@cypress/snapshot@*",{dependencies:{debug:"^3.2.7"}}],["auto-relay@*",{peerDependencies:{"reflect-metadata":"^0.1.13"}}],["vue-template-babel-compiler@<1.2.0",{peerDependencies:{["vue-template-compiler"]:"^2.6.0"}}],["@parcel/transformer-image@<2.5.0",{peerDependencies:{["@parcel/core"]:"*"}}],["@parcel/transformer-js@<2.5.0",{peerDependencies:{["@parcel/core"]:"*"}}],["parcel@*",{peerDependenciesMeta:{["@parcel/core"]:Ge}}],["react-scripts@*",{peerDependencies:{eslint:"*"}}],["focus-trap-react@^8.0.0",{dependencies:{tabbable:"^5.3.2"}}],["react-rnd@<10.3.7",{peerDependencies:{react:">=16.3.0","react-dom":">=16.3.0"}}],["connect-mongo@*",{peerDependencies:{"express-session":"^1.17.1"}}],["vue-i18n@<9",{peerDependencies:{vue:"^2"}}],["vue-router@<4",{peerDependencies:{vue:"^2"}}],["unified@<10",{dependencies:{"@types/unist":"^2.0.0"}}],["react-github-btn@<=1.3.0",{peerDependencies:{react:">=16.3.0"}}],["react-dev-utils@*",{peerDependencies:{typescript:">=2.7",webpack:">=4"},peerDependenciesMeta:{typescript:{optional:!0}}}],["@asyncapi/react-component@<=1.0.0-next.39",{peerDependencies:{react:">=16.8.0","react-dom":">=16.8.0"}}]];var qN;function vae(){return typeof qN=="undefined"&&(qN=require("zlib").brotliDecompressSync(Buffer.from("G7weAByFTVk3Vs7UfHhq4yykgEM7pbW7TI43SG2S5tvGrwHBAzdz+s/npQ6tgEvobvxisrPIadkXeUAJotBn5bDZ5kAhcRqsIHe3F75Walet5hNalwgFDtxb0BiDUjiUQkjG0yW2hto9HPgiCkm316d6bC0kST72YN7D7rfkhCE9x4J0XwB0yavalxpUu2t9xszHrmtwalOxT7VslsxWcB1qpqZwERUra4psWhTV8BgwWeizurec82Caf1ABL11YMfbf8FJ9JBceZOkgmvrQPbC9DUldX/yMbmX06UQluCEjSwUoyO+EZPIjofr+/oAZUck2enraRD+oWLlnlYnj8xB+gwSo9lmmks4fXv574qSqcWA6z21uYkzMu3EWj+K23RxeQlLqiE35/rC8GcS4CGkKHKKq+zAIQwD9iRDNfiAqueLLpicFFrNsAI4zeTD/eO9MHcnRa5m8UT+M2+V+AkFST4BlKneiAQRSdST8KEAIyFlULt6wa9EBd0Ds28VmpaxquJdVt+nwdEs5xUskI13OVtFyY0UrQIRAlCuvvWivvlSKQfTO+2Q8OyUR1W5RvetaPz4jD27hdtwHFFA1Ptx6Ee/t2cY2rg2G46M1pNDRf2pWhvpy8pqMnuI3++4OF3+7OFIWXGjh+o7Nr2jNvbiYcQdQS1h903/jVFgOpA0yJ78z+x759bFA0rq+6aY5qPB4FzS3oYoLupDUhD9nDz6F6H7hpnlMf18KNKDu4IKjTWwrAnY6MFQw1W6ymOALHlFyCZmQhldg1MQHaMVVQTVgDC60TfaBqG++Y8PEoFhN/PBTZT175KNP/BlHDYGOOBmnBdzqJKplZ/ljiVG0ZBzfqeBRrrUkn6rA54462SgiliKoYVnbeptMdXNfAuaupIEi0bApF10TlgHfmEJAPUVidRVFyDupSem5po5vErPqWKhKbUIp0LozpYsIKK57dM/HKr+nguF+7924IIWMICkQ8JUigs9D+W+c4LnNoRtPPKNRUiCYmP+Jfo2lfKCKw8qpraEeWU3uiNRO6zcyKQoXPR5htmzzLznke7b4YbXW3I1lIRzmgG02Udb58U+7TpwyN7XymCgH+wuPDthZVQvRZuEP+SnLtMicz9m5zASWOBiAcLmkuFlTKuHspSIhCBD0yUPKcxu81A+4YD78rA2vtwsUEday9WNyrShyrl60rWmA+SmbYZkQOwFJWArxRYYc5jGhA5ikxYw1rx3ei4NmeX/lKiwpZ9Ln1tV2Ae7sArvxuVLbJjqJRjW1vFXAyHpvLG+8MJ6T2Ubx5M2KDa2SN6vuIGxJ9WQM9Mk3Q7aCNiZONXllhqq24DmoLbQfW2rYWsOgHWjtOmIQMyMKdiHZDjoyIq5+U700nZ6odJAoYXPQBvFNiQ78d5jaXliBqLTJEqUCwi+LiH2mx92EmNKDsJL74Z613+3lf20pxkV1+erOrjj8pW00vsPaahKUM+05ssd5uwM7K482KWEf3TCwlg/o3e5ngto7qSMz7YteIgCsF1UOcsLk7F7MxWbvrPMY473ew0G+noVL8EPbkmEMftMSeL6HFub/zy+2JQ==","base64")).toString()),qN}var JN;function xae(){return typeof JN=="undefined"&&(JN=require("zlib").brotliDecompressSync(Buffer.from("G8MSIIzURnVBnObTcvb3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js0mvSvZcLTpIGAekeR7GCgl8eo3ndAqEe2XCav4huliHjdbIPBsGJuPX7lrO9HX1UbXRH5opOe1x6JsOSgHZR+EaxuXVhpLLxm6jk1LJtZfHSc6BKPun3CpYYVMJGwEUyk8MTGG0XL5MfEwaXpnc9TKnBmlGn6nHiGREc3ysn47XIBDzA+YvFdjZzVIEDcKGpS6PbUJehFRjEne8D0lVU1XuRtlgszq6pTNlQ/3MzNOEgCWPyTct22V2mEi2krizn5VDo9B19/X2DB3hCGRMM7ONbtnAcIx/OWB1u5uPbW1gsH8irXxT/IzG0PoXWYjhbMsH3KTuoOl5o17PulcgvsfTSnKFM354GWI8luqZnrswWjiXy3G+Vbyo1KMopFmmvBwNELgaS8z8dNZchx/Cl/xjddxhMcyqtzFyONb2Zdu90NkI8pAeufe7YlXrp53v8Dj/l8vWeVspRKBGXScBBPI/HinSTGmLDOGGOCIyH0JFdOZx0gWsacNlQLJMIrBhqRxXxHF/5pseWwejlAAvZ3klZSDSYY8mkToaWejXhgNomeGtx1DTLEUFMRkgF5yFB22WYdJnaWN14r1YJj81hGi45+jrADS5nYRhCiSlCJJ1nL8pYX+HDSMhdTEWyRcgHVp/IsUIZYMfT+YYncUQPgcxNGCHfZ88vDdrcUuaGIl6zhAsiaq7R5dfqrqXH/JcBhfjT8D0azayIyEz75Nxp6YkcyDxlJq3EXnJUpqDohJJOysL1t1uNiHESlvsxPb5cpbW0+ICZqJmUZus1BMW0F5IVBODLIo2zHHjA0=","base64")).toString()),JN}var WN;function kae(){return typeof WN=="undefined"&&(WN=require("zlib").brotliDecompressSync(Buffer.from("m/HeG1HktgFU2009LlML2K3wbht8rnXF03SVHSBVb6bUwIJ/X0CPw40xECizvpKcRcKWansp3DpGvMOmCfX1cSwYSTU897x3/dUiIRj6qdVoSiBOoXoNNrhqwKhhnuLKYzT59P10Oq0qXxDajWhLOofkc8GW7/2vYK6AtGTLCpDFavr6bogekTli/vkbZYGLaFta32u59++9nB7UmFK1rcl3I0t0YzBh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MXAACJt54EAFg3E2S51W4AwJUBLGL4WDpvL3FCLGW7HcvOQ+7aV2FQAMxsJQQAMFmAbRk4CgePUfNxdatojBYsgVyatgFy6RAmkL4aGot8BItj/gluCYSHy75vODafrmX1Fcone8N5g/4EvGx3Y228Eh4FtUodutt9i0VoCbPYmoYxy90oAADLUPaxn06Q4ENpgJfdEA7VZo2jrgdbWtnyC95ty+BI8FXrSOfelp26dvUI99nzzzwEAEAS2yZKDOLUJnKZcOY6tQEAXg8xkFZUotj60Ryg4ahN7aBCBDQ5U6zrYQIS0awtpQPyJ9Bdq1f3+Qk2qYKrolDcJx3YEosBmwIvm8tVBmy6uPY311YfmBJczuwKFAhXj41iACLp8VAGQMxuPQkAqIgJcdlqNwDQvUwonupLGr/wDUotd8wAqmpbReCIBoUPGVYzIQBwmY5JrSYuLQjKBY3amgQyNG0LZOgQNhCuhuASE5Zj+3MwEI7eG7Q42d0YmpmER1KpkqfmTOayQKMqC28tT125IQUA0OGuMh/jDMxUSre7DOhkCLrr+rMr3B3d4IC7pyOd4Ny5KlEAgONEOQ4JZSJt1HFuzL46sdivpngAoAjSlVy2u/daWIRNM4//tg/dq5R4FkDTpbZunrzceJG6Hl0ISXWiu1En7TPkqElGl7S8dI2rboPTHQinelsgtdaGAXm0HhGUa0AJAGzGO013A0Ade1X0uVVIcGPuFXfxIe9gCQXdm81qTGyF5hPR73D4ZfCus9vd+BqERE5wCFD1H7ntN4LteLyUPwknevKJMdndmMdoNF5j1WpjDOkA2F5rGIsY6O2pKgUAEHtTVm92KwsYU+HIrmvQcuylbNCgbCZpOOnA7U227cCj7HJt91kuEvu4OpHspzEeAMixJw3Iyz4KzrDv4rjYT8mt2Z/iG4znCn8B","base64")).toString()),WN}var Pae=new Map([[P.makeIdent(null,"fsevents").identHash,vae],[P.makeIdent(null,"resolve").identHash,xae],[P.makeIdent(null,"typescript").identHash,kae]]),EWe={hooks:{registerPackageExtensions:async(r,e)=>{for(let[t,i]of YN)e(P.parseDescriptor(t,!0),i)},getBuiltinPatch:async(r,e)=>{var s;let t="compat/";if(!e.startsWith(t))return;let i=P.parseIdent(e.slice(t.length)),n=(s=Pae.get(i.identHash))==null?void 0:s();return typeof n!="undefined"?n:null},reduceDependency:async(r,e,t,i)=>typeof Pae.get(r.identHash)=="undefined"?r:P.makeDescriptor(r,P.makeRange({protocol:"patch:",source:P.stringifyDescriptor(r),selector:`~builtin`,params:null}))}},IWe=EWe;var _N={};ft(_N,{default:()=>wWe});var X0=class extends Le{constructor(){super(...arguments);this.pkg=J.String("-p,--package",{description:"The package to run the provided command from"});this.quiet=J.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=J.String();this.args=J.Proxy()}async execute(){let e=[];this.pkg&&e.push("--package",this.pkg),this.quiet&&e.push("--quiet");let t=P.parseDescriptor(this.command),i;t.scope?i=P.makeIdent(t.scope,`create-${t.name}`):t.name.startsWith("@")?i=P.makeIdent(t.name.substring(1),"create"):i=P.makeIdent(null,`create-${t.name}`);let n=P.stringifyIdent(i);return t.range!=="unknown"&&(n+=`@${t.range}`),this.cli.run(["dlx",...e,n,...this.args])}};X0.paths=[["create"]];var Dae=X0;var Dm=class extends Le{constructor(){super(...arguments);this.packages=J.Array("-p,--package",{description:"The package(s) to install before running the command"});this.quiet=J.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=J.String();this.args=J.Proxy()}async execute(){return ye.telemetry=null,await K.mktempPromise(async e=>{var p;let t=k.join(e,`dlx-${process.pid}`);await K.mkdirPromise(t),await K.writeFilePromise(k.join(t,"package.json"),`{} +`),await K.writeFilePromise(k.join(t,"yarn.lock"),"");let i=k.join(t,".yarnrc.yml"),n=await ye.findProjectCwd(this.context.cwd,kt.lockfile),s=!(await ye.find(this.context.cwd,null,{strict:!1})).get("enableGlobalCache"),o=n!==null?k.join(n,".yarnrc.yml"):null;o!==null&&K.existsSync(o)?(await K.copyFilePromise(o,i),await ye.updateConfiguration(t,m=>{let y=te(N({},m),{enableGlobalCache:s,enableTelemetry:!1});return Array.isArray(m.plugins)&&(y.plugins=m.plugins.map(b=>{let v=typeof b=="string"?b:b.path,x=H.isAbsolute(v)?v:H.resolve(H.fromPortablePath(n),v);return typeof b=="string"?x:{path:x,spec:b.spec}})),y})):await K.writeFilePromise(i,`enableGlobalCache: ${s} +enableTelemetry: false +`);let a=(p=this.packages)!=null?p:[this.command],l=P.parseDescriptor(this.command).name,c=await this.cli.run(["add","--",...a],{cwd:t,quiet:this.quiet});if(c!==0)return c;this.quiet||this.context.stdout.write(` +`);let u=await ye.find(t,this.context.plugins),{project:g,workspace:f}=await ze.find(u,t);if(f===null)throw new ht(g.cwd,t);await g.restoreInstallState();let h=await Zt.getWorkspaceAccessibleBinaries(f);return h.has(l)===!1&&h.size===1&&typeof this.packages=="undefined"&&(l=Array.from(h)[0][0]),await Zt.executeWorkspaceAccessibleBinary(f,l,this.args,{packageAccessibleBinaries:h,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};Dm.paths=[["dlx"]],Dm.usage=Re.Usage({description:"run a package in a temporary environment",details:"\n This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\n\n By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\n\n Using `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\n ",examples:[["Use create-react-app to create a new React app","yarn dlx create-react-app ./my-app"],["Install multiple packages for a single command",`yarn dlx -p typescript -p ts-node ts-node --transpile-only -e "console.log('hello!')"`]]});var Rae=Dm;var yWe={commands:[Dae,Rae]},wWe=yWe;var nL={};ft(nL,{default:()=>QWe,fileUtils:()=>VN});var nh=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,Rm=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,Xr="file:";var VN={};ft(VN,{makeArchiveFromLocator:()=>Z0,makeBufferFromLocator:()=>$N,makeLocator:()=>ZN,makeSpec:()=>Fae,parseSpec:()=>XN});function XN(r){let{params:e,selector:t}=P.parseRange(r),i=H.toPortablePath(t);return{parentLocator:e&&typeof e.locator=="string"?P.parseLocator(e.locator):null,path:i}}function Fae({parentLocator:r,path:e,folderHash:t,protocol:i}){let n=r!==null?{locator:P.stringifyLocator(r)}:{},s=typeof t!="undefined"?{hash:t}:{};return P.makeRange({protocol:i,source:e,selector:e,params:N(N({},s),n)})}function ZN(r,{parentLocator:e,path:t,folderHash:i,protocol:n}){return P.makeLocator(r,Fae({parentLocator:e,path:t,folderHash:i,protocol:n}))}async function Z0(r,{protocol:e,fetchOptions:t,inMemory:i=!1}){let{parentLocator:n,path:s}=P.parseFileStyleRange(r.reference,{protocol:e}),o=k.isAbsolute(s)?{packageFs:new _t(Me.root),prefixPath:Me.dot,localPath:Me.root}:await t.fetcher.fetch(n,t),a=o.localPath?{packageFs:new _t(Me.root),prefixPath:k.relative(Me.root,o.localPath)}:o;o!==a&&o.releaseFs&&o.releaseFs();let l=a.packageFs,c=k.join(a.prefixPath,s);return await Se.releaseAfterUseAsync(async()=>await Bi.makeArchiveFromDirectory(c,{baseFs:l,prefixPath:P.getIdentVendorPath(r),compressionLevel:t.project.configuration.get("compressionLevel"),inMemory:i}),a.releaseFs)}async function $N(r,{protocol:e,fetchOptions:t}){return(await Z0(r,{protocol:e,fetchOptions:t,inMemory:!0})).getBufferAndClose()}var eL=class{supports(e,t){return!!e.reference.startsWith(Xr)}getLocalPath(e,t){let{parentLocator:i,path:n}=P.parseFileStyleRange(e.reference,{protocol:Xr});if(k.isAbsolute(n))return n;let s=t.fetcher.getLocalPath(i,t);return s===null?null:k.resolve(s,n)}async fetch(e,t){let i=t.checksums.get(e.locatorHash)||null,[n,s,o]=await t.cache.fetchPackageFromCache(e,i,N({onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,`${P.prettyLocator(t.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,t),skipIntegrityCheck:t.skipIntegrityCheck},t.cacheOptions));return{packageFs:n,releaseFs:s,prefixPath:P.getIdentVendorPath(e),localPath:this.getLocalPath(e,t),checksum:o}}async fetchFromDisk(e,t){return Z0(e,{protocol:Xr,fetchOptions:t})}};var BWe=2,tL=class{supportsDescriptor(e,t){return e.range.match(nh)?!0:!!e.range.startsWith(Xr)}supportsLocator(e,t){return!!e.reference.startsWith(Xr)}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,i){return nh.test(e.range)&&(e=P.makeDescriptor(e,`${Xr}${e.range}`)),P.bindDescriptor(e,{locator:P.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,i){if(!i.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:n,parentLocator:s}=XN(e.range);if(s===null)throw new Error("Assertion failed: The descriptor should have been bound");let o=await $N(P.makeLocator(e,P.makeRange({protocol:Xr,source:n,selector:n,params:{locator:P.stringifyLocator(s)}})),{protocol:Xr,fetchOptions:i.fetchOptions}),a=Dn.makeHash(`${BWe}`,o).slice(0,6);return[ZN(e,{parentLocator:s,path:n,folderHash:a,protocol:Xr})]}async getSatisfying(e,t,i){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let i=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),n=await Se.releaseAfterUseAsync(async()=>await At.find(i.prefixPath,{baseFs:i.packageFs}),i.releaseFs);return te(N({},e),{version:n.version||"0.0.0",languageName:n.languageName||t.project.configuration.get("defaultLanguageName"),linkType:Qt.HARD,conditions:n.getConditions(),dependencies:n.dependencies,peerDependencies:n.peerDependencies,dependenciesMeta:n.dependenciesMeta,peerDependenciesMeta:n.peerDependenciesMeta,bin:n.bin})}};var rL=class{supports(e,t){return Rm.test(e.reference)?!!e.reference.startsWith(Xr):!1}getLocalPath(e,t){return null}async fetch(e,t){let i=t.checksums.get(e.locatorHash)||null,[n,s,o]=await t.cache.fetchPackageFromCache(e,i,N({onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,`${P.prettyLocator(t.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,t),skipIntegrityCheck:t.skipIntegrityCheck},t.cacheOptions));return{packageFs:n,releaseFs:s,prefixPath:P.getIdentVendorPath(e),checksum:o}}async fetchFromDisk(e,t){let{parentLocator:i,path:n}=P.parseFileStyleRange(e.reference,{protocol:Xr}),s=k.isAbsolute(n)?{packageFs:new _t(Me.root),prefixPath:Me.dot,localPath:Me.root}:await t.fetcher.fetch(i,t),o=s.localPath?{packageFs:new _t(Me.root),prefixPath:k.relative(Me.root,s.localPath)}:s;s!==o&&s.releaseFs&&s.releaseFs();let a=o.packageFs,l=k.join(o.prefixPath,n),c=await a.readFilePromise(l);return await Se.releaseAfterUseAsync(async()=>await Bi.convertToZip(c,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:P.getIdentVendorPath(e),stripComponents:1}),o.releaseFs)}};var iL=class{supportsDescriptor(e,t){return Rm.test(e.range)?!!(e.range.startsWith(Xr)||nh.test(e.range)):!1}supportsLocator(e,t){return Rm.test(e.reference)?!!e.reference.startsWith(Xr):!1}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,i){return nh.test(e.range)&&(e=P.makeDescriptor(e,`${Xr}${e.range}`)),P.bindDescriptor(e,{locator:P.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,i){let n=e.range;return n.startsWith(Xr)&&(n=n.slice(Xr.length)),[P.makeLocator(e,`${Xr}${H.toPortablePath(n)}`)]}async getSatisfying(e,t,i){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let i=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),n=await Se.releaseAfterUseAsync(async()=>await At.find(i.prefixPath,{baseFs:i.packageFs}),i.releaseFs);return te(N({},e),{version:n.version||"0.0.0",languageName:n.languageName||t.project.configuration.get("defaultLanguageName"),linkType:Qt.HARD,conditions:n.getConditions(),dependencies:n.dependencies,peerDependencies:n.peerDependencies,dependenciesMeta:n.dependenciesMeta,peerDependenciesMeta:n.peerDependenciesMeta,bin:n.bin})}};var bWe={fetchers:[rL,eL],resolvers:[iL,tL]},QWe=bWe;var oL={};ft(oL,{default:()=>xWe});var Nae=ge(require("querystring")),Lae=[/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+)\/tarball\/([^/#]+)(?:#(.*))?$/,/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+?)(?:\.git)?(?:#(.*))?$/];function Tae(r){return r?Lae.some(e=>!!r.match(e)):!1}function Oae(r){let e;for(let a of Lae)if(e=r.match(a),e)break;if(!e)throw new Error(SWe(r));let[,t,i,n,s="master"]=e,{commit:o}=Nae.default.parse(s);return s=o||s.replace(/[^:]*:/,""),{auth:t,username:i,reponame:n,treeish:s}}function SWe(r){return`Input cannot be parsed as a valid GitHub URL ('${r}').`}var sL=class{supports(e,t){return!!Tae(e.reference)}getLocalPath(e,t){return null}async fetch(e,t){let i=t.checksums.get(e.locatorHash)||null,[n,s,o]=await t.cache.fetchPackageFromCache(e,i,N({onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,`${P.prettyLocator(t.project.configuration,e)} can't be found in the cache and will be fetched from GitHub`),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck},t.cacheOptions));return{packageFs:n,releaseFs:s,prefixPath:P.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,t){let i=await ir.get(this.getLocatorUrl(e,t),{configuration:t.project.configuration});return await K.mktempPromise(async n=>{let s=new _t(n);await Bi.extractArchiveTo(i,s,{stripComponents:1});let o=Qu.splitRepoUrl(e.reference),a=k.join(n,"package.tgz");await Zt.prepareExternalProject(n,a,{configuration:t.project.configuration,report:t.report,workspace:o.extra.workspace,locator:e});let l=await K.readFilePromise(a);return await Bi.convertToZip(l,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:P.getIdentVendorPath(e),stripComponents:1})})}getLocatorUrl(e,t){let{auth:i,username:n,reponame:s,treeish:o}=Oae(e.reference);return`https://${i?`${i}@`:""}github.com/${n}/${s}/archive/${o}.tar.gz`}};var vWe={hooks:{async fetchHostedRepository(r,e,t){if(r!==null)return r;let i=new sL;if(!i.supports(e,t))return null;try{return await i.fetch(e,t)}catch(n){return null}}}},xWe=vWe;var lL={};ft(lL,{default:()=>PWe});var Fm=/^[^?]*\.(?:tar\.gz|tgz)(?:\?.*)?$/,Nm=/^https?:/;var aL=class{supports(e,t){return Fm.test(e.reference)?!!Nm.test(e.reference):!1}getLocalPath(e,t){return null}async fetch(e,t){let i=t.checksums.get(e.locatorHash)||null,[n,s,o]=await t.cache.fetchPackageFromCache(e,i,N({onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,`${P.prettyLocator(t.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck},t.cacheOptions));return{packageFs:n,releaseFs:s,prefixPath:P.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,t){let i=await ir.get(e.reference,{configuration:t.project.configuration});return await Bi.convertToZip(i,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:P.getIdentVendorPath(e),stripComponents:1})}};var AL=class{supportsDescriptor(e,t){return Fm.test(e.range)?!!Nm.test(e.range):!1}supportsLocator(e,t){return Fm.test(e.reference)?!!Nm.test(e.reference):!1}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,i){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,i){return[P.convertDescriptorToLocator(e)]}async getSatisfying(e,t,i){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let i=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),n=await Se.releaseAfterUseAsync(async()=>await At.find(i.prefixPath,{baseFs:i.packageFs}),i.releaseFs);return te(N({},e),{version:n.version||"0.0.0",languageName:n.languageName||t.project.configuration.get("defaultLanguageName"),linkType:Qt.HARD,conditions:n.getConditions(),dependencies:n.dependencies,peerDependencies:n.peerDependencies,dependenciesMeta:n.dependenciesMeta,peerDependenciesMeta:n.peerDependenciesMeta,bin:n.bin})}};var kWe={fetchers:[aL],resolvers:[AL]},PWe=kWe;var fL={};ft(fL,{default:()=>D4e});var cAe=ge(lAe()),gL=ge(require("util")),Lm=class extends Le{constructor(){super(...arguments);this.private=J.Boolean("-p,--private",!1,{description:"Initialize a private package"});this.workspace=J.Boolean("-w,--workspace",!1,{description:"Initialize a workspace root with a `packages/` directory"});this.install=J.String("-i,--install",!1,{tolerateBoolean:!0,description:"Initialize a package with a specific bundle that will be locked in the project"});this.usev2=J.Boolean("-2",!1,{hidden:!0});this.yes=J.Boolean("-y,--yes",{hidden:!0});this.assumeFreshProject=J.Boolean("--assume-fresh-project",!1,{hidden:!0})}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),t=typeof this.install=="string"?this.install:this.usev2||this.install===!0?"latest":null;return t!==null?await this.executeProxy(e,t):await this.executeRegular(e)}async executeProxy(e,t){if(e.projectCwd!==null&&e.projectCwd!==this.context.cwd)throw new Pe("Cannot use the --install flag from within a project subdirectory");K.existsSync(this.context.cwd)||await K.mkdirPromise(this.context.cwd,{recursive:!0});let i=k.join(this.context.cwd,e.get("lockfileFilename"));K.existsSync(i)||await K.writeFilePromise(i,"");let n=await this.cli.run(["set","version",t],{quiet:!0});if(n!==0)return n;let s=[];return this.private&&s.push("-p"),this.workspace&&s.push("-w"),this.yes&&s.push("-y"),await K.mktempPromise(async o=>{let{code:a}=await Nr.pipevp("yarn",["init",...s],{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await Zt.makeScriptEnv({binFolder:o})});return a})}async executeRegular(e){var l;let t=null;try{t=(await ze.find(e,this.context.cwd)).project}catch{t=null}K.existsSync(this.context.cwd)||await K.mkdirPromise(this.context.cwd,{recursive:!0});let i=await At.tryFind(this.context.cwd)||new At,n=Object.fromEntries(e.get("initFields").entries());i.load(n),i.name=(l=i.name)!=null?l:P.makeIdent(e.get("initScope"),k.basename(this.context.cwd)),i.packageManager=Ur&&Se.isTaggedYarnVersion(Ur)?`yarn@${Ur}`:null,typeof i.raw.private=="undefined"&&(this.private||this.workspace&&i.workspaceDefinitions.length===0)&&(i.private=!0),this.workspace&&i.workspaceDefinitions.length===0&&(await K.mkdirPromise(k.join(this.context.cwd,"packages"),{recursive:!0}),i.workspaceDefinitions=[{pattern:"packages/*"}]);let s={};i.exportTo(s),gL.inspect.styles.name="cyan",this.context.stdout.write(`${(0,gL.inspect)(s,{depth:Infinity,colors:!0,compact:!1})} +`);let o=k.join(this.context.cwd,At.fileName);await K.changeFilePromise(o,`${JSON.stringify(s,null,2)} +`,{automaticNewlines:!0});let a=k.join(this.context.cwd,"README.md");if(K.existsSync(a)||await K.writeFilePromise(a,`# ${P.stringifyIdent(i.name)} +`),!t||t.cwd===this.context.cwd){let c=k.join(this.context.cwd,kt.lockfile);K.existsSync(c)||await K.writeFilePromise(c,"");let g=[".yarn/*","!.yarn/patches","!.yarn/plugins","!.yarn/releases","!.yarn/sdks","!.yarn/versions","","# Swap the comments on the following lines if you don't wish to use zero-installs","# Documentation here: https://yarnpkg.com/features/zero-installs","!.yarn/cache","#.pnp.*"].map(y=>`${y} +`).join(""),f=k.join(this.context.cwd,".gitignore");K.existsSync(f)||await K.writeFilePromise(f,g);let h={["*"]:{endOfLine:"lf",insertFinalNewline:!0},["*.{js,json,yml}"]:{charset:"utf-8",indentStyle:"space",indentSize:2}};(0,cAe.default)(h,e.get("initEditorConfig"));let p=`root = true +`;for(let[y,b]of Object.entries(h)){p+=` +[${y}] +`;for(let[v,x]of Object.entries(b))p+=`${v.replace(/[A-Z]/g,q=>`_${q.toLowerCase()}`)} = ${x} +`}let m=k.join(this.context.cwd,".editorconfig");K.existsSync(m)||await K.writeFilePromise(m,p),K.existsSync(k.join(this.context.cwd,".git"))||await Nr.execvp("git",["init"],{cwd:this.context.cwd})}}};Lm.paths=[["init"]],Lm.usage=Re.Usage({description:"create a new package",details:"\n This command will setup a new package in your local directory.\n\n If the `-p,--private` or `-w,--workspace` options are set, the package will be private by default.\n\n If the `-w,--workspace` option is set, the package will be configured to accept a set of workspaces in the `packages/` directory.\n\n If the `-i,--install` option is given a value, Yarn will first download it using `yarn set version` and only then forward the init call to the newly downloaded bundle. Without arguments, the downloaded bundle will be `latest`.\n\n The initial settings of the manifest can be changed by using the `initScope` and `initFields` configuration values. Additionally, Yarn will generate an EditorConfig file whose rules can be altered via `initEditorConfig`, and will initialize a Git repository in the current directory.\n ",examples:[["Create a new package in the local directory","yarn init"],["Create a new private package in the local directory","yarn init -p"],["Create a new package and store the Yarn release inside","yarn init -i=latest"],["Create a new private package and defines it as a workspace root","yarn init -w"]]});var uAe=Lm;var P4e={configuration:{initScope:{description:"Scope used when creating packages via the init command",type:Ie.STRING,default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:Ie.MAP,valueDefinition:{description:"",type:Ie.ANY}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:Ie.MAP,valueDefinition:{description:"",type:Ie.ANY}}},commands:[uAe]},D4e=P4e;var mL={};ft(mL,{default:()=>F4e});var wA="portal:",BA="link:";var hL=class{supports(e,t){return!!e.reference.startsWith(wA)}getLocalPath(e,t){let{parentLocator:i,path:n}=P.parseFileStyleRange(e.reference,{protocol:wA});if(k.isAbsolute(n))return n;let s=t.fetcher.getLocalPath(i,t);return s===null?null:k.resolve(s,n)}async fetch(e,t){var c;let{parentLocator:i,path:n}=P.parseFileStyleRange(e.reference,{protocol:wA}),s=k.isAbsolute(n)?{packageFs:new _t(Me.root),prefixPath:Me.dot,localPath:Me.root}:await t.fetcher.fetch(i,t),o=s.localPath?{packageFs:new _t(Me.root),prefixPath:k.relative(Me.root,s.localPath),localPath:Me.root}:s;s!==o&&s.releaseFs&&s.releaseFs();let a=o.packageFs,l=k.resolve((c=o.localPath)!=null?c:o.packageFs.getRealPath(),o.prefixPath,n);return s.localPath?{packageFs:new _t(l,{baseFs:a}),releaseFs:o.releaseFs,prefixPath:Me.dot,localPath:l}:{packageFs:new La(l,{baseFs:a}),releaseFs:o.releaseFs,prefixPath:Me.dot}}};var pL=class{supportsDescriptor(e,t){return!!e.range.startsWith(wA)}supportsLocator(e,t){return!!e.reference.startsWith(wA)}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,i){return P.bindDescriptor(e,{locator:P.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,i){let n=e.range.slice(wA.length);return[P.makeLocator(e,`${wA}${H.toPortablePath(n)}`)]}async getSatisfying(e,t,i){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let i=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),n=await Se.releaseAfterUseAsync(async()=>await At.find(i.prefixPath,{baseFs:i.packageFs}),i.releaseFs);return te(N({},e),{version:n.version||"0.0.0",languageName:n.languageName||t.project.configuration.get("defaultLanguageName"),linkType:Qt.SOFT,conditions:n.getConditions(),dependencies:new Map([...n.dependencies]),peerDependencies:n.peerDependencies,dependenciesMeta:n.dependenciesMeta,peerDependenciesMeta:n.peerDependenciesMeta,bin:n.bin})}};var dL=class{supports(e,t){return!!e.reference.startsWith(BA)}getLocalPath(e,t){let{parentLocator:i,path:n}=P.parseFileStyleRange(e.reference,{protocol:BA});if(k.isAbsolute(n))return n;let s=t.fetcher.getLocalPath(i,t);return s===null?null:k.resolve(s,n)}async fetch(e,t){var c;let{parentLocator:i,path:n}=P.parseFileStyleRange(e.reference,{protocol:BA}),s=k.isAbsolute(n)?{packageFs:new _t(Me.root),prefixPath:Me.dot,localPath:Me.root}:await t.fetcher.fetch(i,t),o=s.localPath?{packageFs:new _t(Me.root),prefixPath:k.relative(Me.root,s.localPath),localPath:Me.root}:s;s!==o&&s.releaseFs&&s.releaseFs();let a=o.packageFs,l=k.resolve((c=o.localPath)!=null?c:o.packageFs.getRealPath(),o.prefixPath,n);return s.localPath?{packageFs:new _t(l,{baseFs:a}),releaseFs:o.releaseFs,prefixPath:Me.dot,discardFromLookup:!0,localPath:l}:{packageFs:new La(l,{baseFs:a}),releaseFs:o.releaseFs,prefixPath:Me.dot,discardFromLookup:!0}}};var CL=class{supportsDescriptor(e,t){return!!e.range.startsWith(BA)}supportsLocator(e,t){return!!e.reference.startsWith(BA)}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,i){return P.bindDescriptor(e,{locator:P.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,i){let n=e.range.slice(BA.length);return[P.makeLocator(e,`${BA}${H.toPortablePath(n)}`)]}async getSatisfying(e,t,i){return null}async resolve(e,t){return te(N({},e),{version:"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:Qt.SOFT,conditions:null,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map})}};var R4e={fetchers:[dL,hL],resolvers:[CL,pL]},F4e=R4e;var JL={};ft(JL,{default:()=>j8e});var Mn;(function(i){i[i.REGULAR=0]="REGULAR",i[i.WORKSPACE=1]="WORKSPACE",i[i.EXTERNAL_SOFT_LINK=2]="EXTERNAL_SOFT_LINK"})(Mn||(Mn={}));var bA;(function(i){i[i.YES=0]="YES",i[i.NO=1]="NO",i[i.DEPENDS=2]="DEPENDS"})(bA||(bA={}));var EL=(r,e)=>`${r}@${e}`,gAe=(r,e)=>{let t=e.indexOf("#"),i=t>=0?e.substring(t+1):e;return EL(r,i)},yo;(function(s){s[s.NONE=-1]="NONE",s[s.PERF=0]="PERF",s[s.CHECK=1]="CHECK",s[s.REASONS=2]="REASONS",s[s.INTENSIVE_CHECK=9]="INTENSIVE_CHECK"})(yo||(yo={}));var hAe=(r,e={})=>{let t=e.debugLevel||Number(process.env.NM_DEBUG_LEVEL||-1),i=e.check||t>=9,n=e.hoistingLimits||new Map,s={check:i,debugLevel:t,hoistingLimits:n,fastLookupPossible:!0},o;s.debugLevel>=0&&(o=Date.now());let a=N4e(r,s),l=!1,c=0;do l=IL(a,[a],new Set([a.locator]),new Map,s).anotherRoundNeeded,s.fastLookupPossible=!1,c++;while(l);if(s.debugLevel>=0&&console.log(`hoist time: ${Date.now()-o}ms, rounds: ${c}`),s.debugLevel>=1){let u=Tm(a);if(IL(a,[a],new Set([a.locator]),new Map,s).isGraphChanged)throw new Error(`The hoisting result is not terminal, prev tree: +${u}, next tree: +${Tm(a)}`);let f=fAe(a);if(f)throw new Error(`${f}, after hoisting finished: +${Tm(a)}`)}return s.debugLevel>=2&&console.log(Tm(a)),L4e(a)},T4e=r=>{let e=r[r.length-1],t=new Map,i=new Set,n=s=>{if(!i.has(s)){i.add(s);for(let o of s.hoistedDependencies.values())t.set(o.name,o);for(let o of s.dependencies.values())s.peerNames.has(o.name)||n(o)}};return n(e),t},O4e=r=>{let e=r[r.length-1],t=new Map,i=new Set,n=new Set,s=(o,a)=>{if(i.has(o))return;i.add(o);for(let c of o.hoistedDependencies.values())if(!a.has(c.name)){let u;for(let g of r)u=g.dependencies.get(c.name),u&&t.set(u.name,u)}let l=new Set;for(let c of o.dependencies.values())l.add(c.name);for(let c of o.dependencies.values())o.peerNames.has(c.name)||s(c,l)};return s(e,n),t},pAe=(r,e)=>{if(e.decoupled)return e;let{name:t,references:i,ident:n,locator:s,dependencies:o,originalDependencies:a,hoistedDependencies:l,peerNames:c,reasons:u,isHoistBorder:g,hoistPriority:f,dependencyKind:h,hoistedFrom:p,hoistedTo:m}=e,y={name:t,references:new Set(i),ident:n,locator:s,dependencies:new Map(o),originalDependencies:new Map(a),hoistedDependencies:new Map(l),peerNames:new Set(c),reasons:new Map(u),decoupled:!0,isHoistBorder:g,hoistPriority:f,dependencyKind:h,hoistedFrom:new Map(p),hoistedTo:new Map(m)},b=y.dependencies.get(t);return b&&b.ident==y.ident&&y.dependencies.set(t,y),r.dependencies.set(y.name,y),y},M4e=(r,e)=>{let t=new Map([[r.name,[r.ident]]]);for(let n of r.dependencies.values())r.peerNames.has(n.name)||t.set(n.name,[n.ident]);let i=Array.from(e.keys());i.sort((n,s)=>{let o=e.get(n),a=e.get(s);return a.hoistPriority!==o.hoistPriority?a.hoistPriority-o.hoistPriority:a.peerDependents.size!==o.peerDependents.size?a.peerDependents.size-o.peerDependents.size:a.dependents.size-o.dependents.size});for(let n of i){let s=n.substring(0,n.indexOf("@",1)),o=n.substring(s.length+1);if(!r.peerNames.has(s)){let a=t.get(s);a||(a=[],t.set(s,a)),a.indexOf(o)<0&&a.push(o)}}return t},yL=r=>{let e=new Set,t=(i,n=new Set)=>{if(!n.has(i)){n.add(i);for(let s of i.peerNames)if(!r.peerNames.has(s)){let o=r.dependencies.get(s);o&&!e.has(o)&&t(o,n)}e.add(i)}};for(let i of r.dependencies.values())r.peerNames.has(i.name)||t(i);return e},IL=(r,e,t,i,n,s=new Set)=>{let o=e[e.length-1];if(s.has(o))return{anotherRoundNeeded:!1,isGraphChanged:!1};s.add(o);let a=U4e(o),l=M4e(o,a),c=r==o?new Map:n.fastLookupPossible?T4e(e):O4e(e),u,g=!1,f=!1,h=new Map(Array.from(l.entries()).map(([m,y])=>[m,y[0]])),p=new Map;do{let m=K4e(r,e,t,c,h,l,i,p,n);m.isGraphChanged&&(f=!0),m.anotherRoundNeeded&&(g=!0),u=!1;for(let[y,b]of l)b.length>1&&!o.dependencies.has(y)&&(h.delete(y),b.shift(),h.set(y,b[0]),u=!0)}while(u);for(let m of o.dependencies.values())if(!o.peerNames.has(m.name)&&!t.has(m.locator)){t.add(m.locator);let y=IL(r,[...e,m],t,p,n);y.isGraphChanged&&(f=!0),y.anotherRoundNeeded&&(g=!0),t.delete(m.locator)}return{anotherRoundNeeded:g,isGraphChanged:f}},H4e=r=>{for(let[e,t]of r.dependencies)if(!r.peerNames.has(e)&&t.ident!==r.ident)return!0;return!1},j4e=(r,e,t,i,n,s,o,a,{outputReason:l,fastLookupPossible:c})=>{let u,g=null,f=new Set;l&&(u=`${Array.from(e).map(y=>Li(y)).join("\u2192")}`);let h=t[t.length-1],m=!(i.ident===h.ident);if(l&&!m&&(g="- self-reference"),m&&(m=i.dependencyKind!==1,l&&!m&&(g="- workspace")),m&&i.dependencyKind===2&&(m=!H4e(i),l&&!m&&(g="- external soft link with unhoisted dependencies")),m&&(m=h.dependencyKind!==1||h.hoistedFrom.has(i.name)||e.size===1,l&&!m&&(g=h.reasons.get(i.name))),m&&(m=!r.peerNames.has(i.name),l&&!m&&(g=`- cannot shadow peer: ${Li(r.originalDependencies.get(i.name).locator)} at ${u}`)),m){let y=!1,b=n.get(i.name);if(y=!b||b.ident===i.ident,l&&!y&&(g=`- filled by: ${Li(b.locator)} at ${u}`),y)for(let v=t.length-1;v>=1;v--){let T=t[v].dependencies.get(i.name);if(T&&T.ident!==i.ident){y=!1;let q=a.get(h);q||(q=new Set,a.set(h,q)),q.add(i.name),l&&(g=`- filled by ${Li(T.locator)} at ${t.slice(0,v).map(Y=>Li(Y.locator)).join("\u2192")}`);break}}m=y}if(m&&(m=s.get(i.name)===i.ident,l&&!m&&(g=`- filled by: ${Li(o.get(i.name)[0])} at ${u}`)),m){let y=!0,b=new Set(i.peerNames);for(let v=t.length-1;v>=1;v--){let x=t[v];for(let T of b){if(x.peerNames.has(T)&&x.originalDependencies.has(T))continue;let q=x.dependencies.get(T);q&&r.dependencies.get(T)!==q&&(v===t.length-1?f.add(q):(f=null,y=!1,l&&(g=`- peer dependency ${Li(q.locator)} from parent ${Li(x.locator)} was not hoisted to ${u}`))),b.delete(T)}if(!y)break}m=y}if(m&&!c)for(let y of i.hoistedDependencies.values()){let b=n.get(y.name)||r.dependencies.get(y.name);if(!b||y.ident!==b.ident){m=!1,l&&(g=`- previously hoisted dependency mismatch, needed: ${Li(y.locator)}, available: ${Li(b==null?void 0:b.locator)}`);break}}return f!==null&&f.size>0?{isHoistable:2,dependsOn:f,reason:g}:{isHoistable:m?0:1,reason:g}},$0=r=>`${r.name}@${r.locator}`,K4e=(r,e,t,i,n,s,o,a,l)=>{let c=e[e.length-1],u=new Set,g=!1,f=!1,h=(b,v,x,T,q)=>{if(u.has(T))return;let Y=[...v,$0(T)],$=[...x,$0(T)],_=new Map,ne=new Map;for(let Z of yL(T)){let O=j4e(c,t,[c,...b,T],Z,i,n,s,a,{outputReason:l.debugLevel>=2,fastLookupPossible:l.fastLookupPossible});if(ne.set(Z,O),O.isHoistable===2)for(let L of O.dependsOn){let de=_.get(L.name)||new Set;de.add(Z.name),_.set(L.name,de)}}let ee=new Set,A=(Z,O,L)=>{if(!ee.has(Z)){ee.add(Z),ne.set(Z,{isHoistable:1,reason:L});for(let de of _.get(Z.name)||[])A(T.dependencies.get(de),O,l.debugLevel>=2?`- peer dependency ${Li(Z.locator)} from parent ${Li(T.locator)} was not hoisted`:"")}};for(let[Z,O]of ne)O.isHoistable===1&&A(Z,O,O.reason);let oe=!1;for(let Z of ne.keys())if(!ee.has(Z)){f=!0;let O=o.get(T);O&&O.has(Z.name)&&(g=!0),oe=!0,T.dependencies.delete(Z.name),T.hoistedDependencies.set(Z.name,Z),T.reasons.delete(Z.name);let L=c.dependencies.get(Z.name);if(l.debugLevel>=2){let de=Array.from(v).concat([T.locator]).map(je=>Li(je)).join("\u2192"),Be=c.hoistedFrom.get(Z.name);Be||(Be=[],c.hoistedFrom.set(Z.name,Be)),Be.push(de),T.hoistedTo.set(Z.name,Array.from(e).map(je=>Li(je.locator)).join("\u2192"))}if(!L)c.ident!==Z.ident&&(c.dependencies.set(Z.name,Z),q.add(Z));else for(let de of Z.references)L.references.add(de)}if(T.dependencyKind===2&&oe&&(g=!0),l.check){let Z=fAe(r);if(Z)throw new Error(`${Z}, after hoisting dependencies of ${[c,...b,T].map(O=>Li(O.locator)).join("\u2192")}: +${Tm(r)}`)}let ce=yL(T);for(let Z of ce)if(ee.has(Z)){let O=ne.get(Z);if((n.get(Z.name)===Z.ident||!T.reasons.has(Z.name))&&O.isHoistable!==0&&T.reasons.set(Z.name,O.reason),!Z.isHoistBorder&&$.indexOf($0(Z))<0){u.add(T);let de=pAe(T,Z);h([...b,T],Y,$,de,m),u.delete(T)}}},p,m=new Set(yL(c)),y=Array.from(e).map(b=>$0(b));do{p=m,m=new Set;for(let b of p){if(b.locator===c.locator||b.isHoistBorder)continue;let v=pAe(c,b);h([],Array.from(t),y,v,m)}}while(m.size>0);return{anotherRoundNeeded:g,isGraphChanged:f}},fAe=r=>{let e=[],t=new Set,i=new Set,n=(s,o,a)=>{if(t.has(s)||(t.add(s),i.has(s)))return;let l=new Map(o);for(let c of s.dependencies.values())s.peerNames.has(c.name)||l.set(c.name,c);for(let c of s.originalDependencies.values()){let u=l.get(c.name),g=()=>`${Array.from(i).concat([s]).map(f=>Li(f.locator)).join("\u2192")}`;if(s.peerNames.has(c.name)){let f=o.get(c.name);(f!==u||!f||f.ident!==c.ident)&&e.push(`${g()} - broken peer promise: expected ${c.ident} but found ${f&&f.ident}`)}else{let f=a.hoistedFrom.get(s.name),h=s.hoistedTo.get(c.name),p=`${f?` hoisted from ${f.join(", ")}`:""}`,m=`${h?` hoisted to ${h}`:""}`,y=`${g()}${p}`;u?u.ident!==c.ident&&e.push(`${y} - broken require promise for ${c.name}${m}: expected ${c.ident}, but found: ${u.ident}`):e.push(`${y} - broken require promise: no required dependency ${c.name}${m} found`)}}i.add(s);for(let c of s.dependencies.values())s.peerNames.has(c.name)||n(c,l,s);i.delete(s)};return n(r,r.dependencies,r),e.join(` +`)},N4e=(r,e)=>{let{identName:t,name:i,reference:n,peerNames:s}=r,o={name:i,references:new Set([n]),locator:EL(t,n),ident:gAe(t,n),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(s),reasons:new Map,decoupled:!0,isHoistBorder:!0,hoistPriority:0,dependencyKind:1,hoistedFrom:new Map,hoistedTo:new Map},a=new Map([[r,o]]),l=(c,u)=>{let g=a.get(c),f=!!g;if(!g){let{name:h,identName:p,reference:m,peerNames:y,hoistPriority:b,dependencyKind:v}=c,x=e.hoistingLimits.get(u.locator);g={name:h,references:new Set([m]),locator:EL(p,m),ident:gAe(p,m),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(y),reasons:new Map,decoupled:!0,isHoistBorder:x?x.has(h):!1,hoistPriority:b||0,dependencyKind:v||0,hoistedFrom:new Map,hoistedTo:new Map},a.set(c,g)}if(u.dependencies.set(c.name,g),u.originalDependencies.set(c.name,g),f){let h=new Set,p=m=>{if(!h.has(m)){h.add(m),m.decoupled=!1;for(let y of m.dependencies.values())m.peerNames.has(y.name)||p(y)}};p(g)}else for(let h of c.dependencies)l(h,g)};for(let c of r.dependencies)l(c,o);return o},wL=r=>r.substring(0,r.indexOf("@",1)),L4e=r=>{let e={name:r.name,identName:wL(r.locator),references:new Set(r.references),dependencies:new Set},t=new Set([r]),i=(n,s,o)=>{let a=t.has(n),l;if(s===n)l=o;else{let{name:c,references:u,locator:g}=n;l={name:c,identName:wL(g),references:u,dependencies:new Set}}if(o.dependencies.add(l),!a){t.add(n);for(let c of n.dependencies.values())n.peerNames.has(c.name)||i(c,n,l);t.delete(n)}};for(let n of r.dependencies.values())i(n,r,e);return e},U4e=r=>{let e=new Map,t=new Set([r]),i=o=>`${o.name}@${o.ident}`,n=o=>{let a=i(o),l=e.get(a);return l||(l={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(a,l)),l},s=(o,a)=>{let l=!!t.has(a);if(n(a).dependents.add(o.ident),!l){t.add(a);for(let u of a.dependencies.values()){let g=n(u);g.hoistPriority=Math.max(g.hoistPriority,u.hoistPriority),a.peerNames.has(u.name)?g.peerDependents.add(a.ident):s(a,u)}}};for(let o of r.dependencies.values())r.peerNames.has(o.name)||s(r,o);return e},Li=r=>{if(!r)return"none";let e=r.indexOf("@",1),t=r.substring(0,e);t.endsWith("$wsroot$")&&(t=`wh:${t.replace("$wsroot$","")}`);let i=r.substring(e+1);if(i==="workspace:.")return".";if(i){let n=(i.indexOf("#")>0?i.split("#")[1]:i).replace("npm:","");return i.startsWith("virtual")&&(t=`v:${t}`),n.startsWith("workspace")&&(t=`w:${t}`,n=""),`${t}${n?`@${n}`:""}`}else return`${t}`},dAe=5e4,Tm=r=>{let e=0,t=(n,s,o="")=>{if(e>dAe||s.has(n))return"";e++;let a=Array.from(n.dependencies.values()).sort((c,u)=>c.name===u.name?0:c.name>u.name?1:-1),l="";s.add(n);for(let c=0;c":"")+(f!==u.name?`a:${u.name}:`:"")+Li(u.locator)+(g?` ${g}`:"")} +`,l+=t(u,s,`${o}${cdAe?` +Tree is too large, part of the tree has been dunped +`:"")};var wo;(function(t){t.HARD="HARD",t.SOFT="SOFT"})(wo||(wo={}));var Kn;(function(i){i.WORKSPACES="workspaces",i.DEPENDENCIES="dependencies",i.NONE="none"})(Kn||(Kn={}));var CAe="node_modules",Su="$wsroot$";var Om=(r,e)=>{let{packageTree:t,hoistingLimits:i,errors:n,preserveSymlinksRequired:s}=G4e(r,e),o=null;if(n.length===0){let a=hAe(t,{hoistingLimits:i});o=Y4e(r,a,e)}return{tree:o,errors:n,preserveSymlinksRequired:s}},da=r=>`${r.name}@${r.reference}`,BL=r=>{let e=new Map;for(let[t,i]of r.entries())if(!i.dirList){let n=e.get(i.locator);n||(n={target:i.target,linkType:i.linkType,locations:[],aliases:i.aliases},e.set(i.locator,n)),n.locations.push(t)}for(let t of e.values())t.locations=t.locations.sort((i,n)=>{let s=i.split(k.delimiter).length,o=n.split(k.delimiter).length;return n===i?0:s!==o?o-s:n>i?1:-1});return e},mAe=(r,e)=>{let t=P.isVirtualLocator(r)?P.devirtualizeLocator(r):r,i=P.isVirtualLocator(e)?P.devirtualizeLocator(e):e;return P.areLocatorsEqual(t,i)},bL=(r,e,t,i)=>{if(r.linkType!==wo.SOFT)return!1;let n=H.toPortablePath(t.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?t.resolveVirtual(r.packageLocation):r.packageLocation);return k.contains(i,n)===null},q4e=r=>{let e=r.getPackageInformation(r.topLevel);if(e===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");if(r.findPackageLocator(e.packageLocation)===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let i=H.toPortablePath(e.packageLocation.slice(0,-1)),n=new Map,s={children:new Map},o=r.getDependencyTreeRoots(),a=new Map,l=new Set,c=(f,h)=>{let p=da(f);if(l.has(p))return;l.add(p);let m=r.getPackageInformation(f);if(m){let y=h?da(h):"";if(da(f)!==y&&m.linkType===wo.SOFT&&!bL(m,f,r,i)){let b=EAe(m,f,r);(!a.get(b)||f.reference.startsWith("workspace:"))&&a.set(b,f)}for(let[b,v]of m.packageDependencies)v!==null&&(m.packagePeers.has(b)||c(r.getLocator(b,v),f))}};for(let f of o)c(f,null);let u=i.split(k.sep);for(let f of a.values()){let h=r.getPackageInformation(f),m=H.toPortablePath(h.packageLocation.slice(0,-1)).split(k.sep).slice(u.length),y=s;for(let b of m){let v=y.children.get(b);v||(v={children:new Map},y.children.set(b,v)),y=v}y.workspaceLocator=f}let g=(f,h)=>{if(f.workspaceLocator){let p=da(h),m=n.get(p);m||(m=new Set,n.set(p,m)),m.add(f.workspaceLocator)}for(let p of f.children.values())g(p,f.workspaceLocator||h)};for(let f of s.children.values())g(f,s.workspaceLocator);return n},G4e=(r,e)=>{let t=[],i=!1,n=new Map,s=q4e(r),o=r.getPackageInformation(r.topLevel);if(o===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let a=r.findPackageLocator(o.packageLocation);if(a===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let l=H.toPortablePath(o.packageLocation.slice(0,-1)),c={name:a.name,identName:a.name,reference:a.reference,peerNames:o.packagePeers,dependencies:new Set,dependencyKind:Mn.WORKSPACE},u=new Map,g=(h,p)=>`${da(p)}:${h}`,f=(h,p,m,y,b,v,x,T)=>{var Z,O;let q=g(h,m),Y=u.get(q),$=!!Y;!$&&m.name===a.name&&m.reference===a.reference&&(Y=c,u.set(q,c));let _=bL(p,m,r,l);if(!Y){let L=Mn.REGULAR;_?L=Mn.EXTERNAL_SOFT_LINK:p.linkType===wo.SOFT&&m.name.endsWith(Su)&&(L=Mn.WORKSPACE),Y={name:h,identName:m.name,reference:m.reference,dependencies:new Set,peerNames:L===Mn.WORKSPACE?new Set:p.packagePeers,dependencyKind:L},u.set(q,Y)}let ne;if(_?ne=2:b.linkType===wo.SOFT?ne=1:ne=0,Y.hoistPriority=Math.max(Y.hoistPriority||0,ne),T&&!_){let L=da({name:y.identName,reference:y.reference}),de=n.get(L)||new Set;n.set(L,de),de.add(Y.name)}let ee=new Map(p.packageDependencies);if(e.project){let L=e.project.workspacesByCwd.get(H.toPortablePath(p.packageLocation.slice(0,-1)));if(L){let de=new Set([...Array.from(L.manifest.peerDependencies.values(),Be=>P.stringifyIdent(Be)),...Array.from(L.manifest.peerDependenciesMeta.keys())]);for(let Be of de)ee.has(Be)||(ee.set(Be,v.get(Be)||null),Y.peerNames.add(Be))}}let A=da({name:m.name.replace(Su,""),reference:m.reference}),oe=s.get(A);if(oe)for(let L of oe)ee.set(`${L.name}${Su}`,L.reference);(p!==b||p.linkType!==wo.SOFT||!_&&(!e.selfReferencesByCwd||e.selfReferencesByCwd.get(x)))&&y.dependencies.add(Y);let ce=m!==a&&p.linkType===wo.SOFT&&!m.name.endsWith(Su)&&!_;if(!$&&!ce){let L=new Map;for(let[de,Be]of ee)if(Be!==null){let je=r.getLocator(de,Be),re=r.getLocator(de.replace(Su,""),Be),se=r.getPackageInformation(re);if(se===null)throw new Error("Assertion failed: Expected the package to have been registered");let be=bL(se,je,r,l);if(e.validateExternalSoftLinks&&e.project&&be){se.packageDependencies.size>0&&(i=!0);for(let[ve,pe]of se.packageDependencies)if(pe!==null){let V=P.parseLocator(Array.isArray(pe)?`${pe[0]}@${pe[1]}`:`${ve}@${pe}`);if(da(V)!==da(je)){let Qe=ee.get(ve);if(Qe){let le=P.parseLocator(Array.isArray(Qe)?`${Qe[0]}@${Qe[1]}`:`${ve}@${Qe}`);mAe(le,V)||t.push({messageName:X.NM_CANT_INSTALL_EXTERNAL_SOFT_LINK,text:`Cannot link ${P.prettyIdent(e.project.configuration,P.parseIdent(je.name))} into ${P.prettyLocator(e.project.configuration,P.parseLocator(`${m.name}@${m.reference}`))} dependency ${P.prettyLocator(e.project.configuration,V)} conflicts with parent dependency ${P.prettyLocator(e.project.configuration,le)}`})}else{let le=L.get(ve);if(le){let fe=le.target,gt=P.parseLocator(Array.isArray(fe)?`${fe[0]}@${fe[1]}`:`${ve}@${fe}`);mAe(gt,V)||t.push({messageName:X.NM_CANT_INSTALL_EXTERNAL_SOFT_LINK,text:`Cannot link ${P.prettyIdent(e.project.configuration,P.parseIdent(je.name))} into ${P.prettyLocator(e.project.configuration,P.parseLocator(`${m.name}@${m.reference}`))} dependency ${P.prettyLocator(e.project.configuration,V)} conflicts with dependency ${P.prettyLocator(e.project.configuration,gt)} from sibling portal ${P.prettyIdent(e.project.configuration,P.parseIdent(le.portal.name))}`})}else L.set(ve,{target:V.reference,portal:je})}}}}let he=(Z=e.hoistingLimitsByCwd)==null?void 0:Z.get(x),Fe=be?x:k.relative(l,H.toPortablePath(se.packageLocation))||Me.dot,Ke=(O=e.hoistingLimitsByCwd)==null?void 0:O.get(Fe),ke=he===Kn.DEPENDENCIES||Ke===Kn.DEPENDENCIES||Ke===Kn.WORKSPACES;f(de,se,je,Y,p,ee,Fe,ke)}}};return f(a.name,o,a,c,o,o.packageDependencies,Me.dot,!1),{packageTree:c,hoistingLimits:n,errors:t,preserveSymlinksRequired:i}};function EAe(r,e,t){let i=t.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?t.resolveVirtual(r.packageLocation):r.packageLocation;return H.toPortablePath(i||r.packageLocation)}function J4e(r,e,t){let i=e.getLocator(r.name.replace(Su,""),r.reference),n=e.getPackageInformation(i);if(n===null)throw new Error("Assertion failed: Expected the package to be registered");let s,o;return t.pnpifyFs?(o=H.toPortablePath(n.packageLocation),s=wo.SOFT):(o=EAe(n,r,e),s=n.linkType),{linkType:s,target:o}}var Y4e=(r,e,t)=>{let i=new Map,n=(u,g,f)=>{let{linkType:h,target:p}=J4e(u,r,t);return{locator:da(u),nodePath:g,target:p,linkType:h,aliases:f}},s=u=>{let[g,f]=u.split("/");return f?{scope:Jr(g),name:Jr(f)}:{scope:null,name:Jr(g)}},o=new Set,a=(u,g,f)=>{if(!o.has(u)){o.add(u);for(let h of u.dependencies){if(h===u)continue;let p=Array.from(h.references).sort(),m={name:h.identName,reference:p[0]},{name:y,scope:b}=s(h.name),v=b?[b,y]:[y],x=k.join(g,CAe),T=k.join(x,...v),q=`${f}/${m.name}`,Y=n(m,f,p.slice(1)),$=!1;if(Y.linkType===wo.SOFT&&t.project){let _=t.project.workspacesByCwd.get(Y.target.slice(0,-1));$=!!(_&&!_.manifest.name)}if(!h.name.endsWith(Su)&&!$){let _=i.get(T);if(_){if(_.dirList)throw new Error(`Assertion failed: ${T} cannot merge dir node with leaf node`);{let oe=P.parseLocator(_.locator),ce=P.parseLocator(Y.locator);if(_.linkType!==Y.linkType)throw new Error(`Assertion failed: ${T} cannot merge nodes with different link types ${_.nodePath}/${P.stringifyLocator(oe)} and ${f}/${P.stringifyLocator(ce)}`);if(oe.identHash!==ce.identHash)throw new Error(`Assertion failed: ${T} cannot merge nodes with different idents ${_.nodePath}/${P.stringifyLocator(oe)} and ${f}/s${P.stringifyLocator(ce)}`);Y.aliases=[...Y.aliases,..._.aliases,P.parseLocator(_.locator).reference]}}i.set(T,Y);let ne=T.split("/"),ee=ne.indexOf(CAe),A=ne.length-1;for(;ee>=0&&A>ee;){let oe=H.toPortablePath(ne.slice(0,A).join(k.sep)),ce=Jr(ne[A]),Z=i.get(oe);if(!Z)i.set(oe,{dirList:new Set([ce])});else if(Z.dirList){if(Z.dirList.has(ce))break;Z.dirList.add(ce)}A--}}a(h,Y.linkType===wo.SOFT?Y.target:T,q)}}},l=n({name:e.name,reference:Array.from(e.references)[0]},"",[]),c=l.target;return i.set(c,l),a(e,c,""),i};var LL={};ft(LL,{PnpInstaller:()=>oh,PnpLinker:()=>xu,default:()=>d8e,getPnpPath:()=>Tl,jsInstallUtils:()=>Ca,pnpUtils:()=>FL,quotePathIfNeeded:()=>GAe});var HAe=ge(ri()),jAe=ge(require("url"));var IAe;(function(t){t.HARD="HARD",t.SOFT="SOFT"})(IAe||(IAe={}));var er;(function(f){f.DEFAULT="DEFAULT",f.TOP_LEVEL="TOP_LEVEL",f.FALLBACK_EXCLUSION_LIST="FALLBACK_EXCLUSION_LIST",f.FALLBACK_EXCLUSION_ENTRIES="FALLBACK_EXCLUSION_ENTRIES",f.FALLBACK_EXCLUSION_DATA="FALLBACK_EXCLUSION_DATA",f.PACKAGE_REGISTRY_DATA="PACKAGE_REGISTRY_DATA",f.PACKAGE_REGISTRY_ENTRIES="PACKAGE_REGISTRY_ENTRIES",f.PACKAGE_STORE_DATA="PACKAGE_STORE_DATA",f.PACKAGE_STORE_ENTRIES="PACKAGE_STORE_ENTRIES",f.PACKAGE_INFORMATION_DATA="PACKAGE_INFORMATION_DATA",f.PACKAGE_DEPENDENCIES="PACKAGE_DEPENDENCIES",f.PACKAGE_DEPENDENCY="PACKAGE_DEPENDENCY"})(er||(er={}));var yAe={[er.DEFAULT]:{collapsed:!1,next:{["*"]:er.DEFAULT}},[er.TOP_LEVEL]:{collapsed:!1,next:{fallbackExclusionList:er.FALLBACK_EXCLUSION_LIST,packageRegistryData:er.PACKAGE_REGISTRY_DATA,["*"]:er.DEFAULT}},[er.FALLBACK_EXCLUSION_LIST]:{collapsed:!1,next:{["*"]:er.FALLBACK_EXCLUSION_ENTRIES}},[er.FALLBACK_EXCLUSION_ENTRIES]:{collapsed:!0,next:{["*"]:er.FALLBACK_EXCLUSION_DATA}},[er.FALLBACK_EXCLUSION_DATA]:{collapsed:!0,next:{["*"]:er.DEFAULT}},[er.PACKAGE_REGISTRY_DATA]:{collapsed:!1,next:{["*"]:er.PACKAGE_REGISTRY_ENTRIES}},[er.PACKAGE_REGISTRY_ENTRIES]:{collapsed:!0,next:{["*"]:er.PACKAGE_STORE_DATA}},[er.PACKAGE_STORE_DATA]:{collapsed:!1,next:{["*"]:er.PACKAGE_STORE_ENTRIES}},[er.PACKAGE_STORE_ENTRIES]:{collapsed:!0,next:{["*"]:er.PACKAGE_INFORMATION_DATA}},[er.PACKAGE_INFORMATION_DATA]:{collapsed:!1,next:{packageDependencies:er.PACKAGE_DEPENDENCIES,["*"]:er.DEFAULT}},[er.PACKAGE_DEPENDENCIES]:{collapsed:!1,next:{["*"]:er.PACKAGE_DEPENDENCY}},[er.PACKAGE_DEPENDENCY]:{collapsed:!0,next:{["*"]:er.DEFAULT}}};function W4e(r,e,t){let i="";i+="[";for(let n=0,s=r.length;ns(o)));let n=t.map((s,o)=>o);return n.sort((s,o)=>{for(let a of i){let l=a[s]a[o]?1:0;if(l!==0)return l}return 0}),n.map(s=>t[s])}function X4e(r){let e=new Map,t=Mm(r.fallbackExclusionList||[],[({name:i,reference:n})=>i,({name:i,reference:n})=>n]);for(let{name:i,reference:n}of t){let s=e.get(i);typeof s=="undefined"&&e.set(i,s=new Set),s.add(n)}return Array.from(e).map(([i,n])=>[i,Array.from(n)])}function Z4e(r){return Mm(r.fallbackPool||[],([e])=>e)}function $4e(r){let e=[];for(let[t,i]of Mm(r.packageRegistry,([n])=>n===null?"0":`1${n}`)){let n=[];e.push([t,n]);for(let[s,{packageLocation:o,packageDependencies:a,packagePeers:l,linkType:c,discardFromLookup:u}]of Mm(i,([g])=>g===null?"0":`1${g}`)){let g=[];t!==null&&s!==null&&!a.has(t)&&g.push([t,s]);for(let[p,m]of Mm(a.entries(),([y])=>y))g.push([p,m]);let f=l&&l.size>0?Array.from(l):void 0,h=u||void 0;n.push([s,{packageLocation:o,packageDependencies:g,packagePeers:f,linkType:c,discardFromLookup:h}])}}return e}function Km(r){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost. We also recommend you not to read","it either without using the @yarnpkg/pnp package, as the data layout","is entirely unspecified and WILL change from a version to another."],dependencyTreeRoots:r.dependencyTreeRoots,enableTopLevelFallback:r.enableTopLevelFallback||!1,ignorePatternData:r.ignorePattern||null,fallbackExclusionList:X4e(r),fallbackPool:Z4e(r),packageRegistryData:$4e(r)}}var SAe=ge(QAe());function vAe(r,e){return[r?`${r} +`:"",`/* eslint-disable */ + +`,`try { +`,` Object.freeze({}).detectStrictMode = true; +`,`} catch (error) { +`," throw new Error(`The whole PnP file got strict-mode-ified, which is known to break (Emscripten libraries aren't strict mode). This usually happens when the file goes through Babel.`);\n",`} +`,` +`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) { +`,e.replace(/^/gm," "),`} +`,` +`,(0,SAe.default)()].join("")}function e8e(r){return JSON.stringify(r,null,2)}function t8e(r){return`'${r.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,`\\ +`)}'`}function r8e(r){return[`return hydrateRuntimeState(JSON.parse(${t8e(BAe(r))}), {basePath: basePath || __dirname}); +`].join("")}function i8e(r){return[`var path = require('path'); +`,`var dataLocation = path.resolve(__dirname, ${JSON.stringify(r)}); +`,`return hydrateRuntimeState(require(dataLocation), {basePath: basePath || path.dirname(dataLocation)}); +`].join("")}function xAe(r){let e=Km(r),t=r8e(e);return vAe(r.shebang,t)}function kAe(r){let e=Km(r),t=i8e(r.dataLocation),i=vAe(r.shebang,t);return{dataFile:e8e(e),loaderFile:i}}var RAe=ge(require("fs")),l8e=ge(require("path")),FAe=ge(require("util"));function SL(r,{basePath:e}){let t=H.toPortablePath(e),i=k.resolve(t),n=r.ignorePatternData!==null?new RegExp(r.ignorePatternData):null,s=new Map,o=new Map(r.packageRegistryData.map(([g,f])=>[g,new Map(f.map(([h,p])=>{var x;if(g===null!=(h===null))throw new Error("Assertion failed: The name and reference should be null, or neither should");let m=(x=p.discardFromLookup)!=null?x:!1,y={name:g,reference:h},b=s.get(p.packageLocation);b?(b.discardFromLookup=b.discardFromLookup&&m,m||(b.locator=y)):s.set(p.packageLocation,{locator:y,discardFromLookup:m});let v=null;return[h,{packageDependencies:new Map(p.packageDependencies),packagePeers:new Set(p.packagePeers),linkType:p.linkType,discardFromLookup:m,get packageLocation(){return v||(v=k.join(i,p.packageLocation))}}]}))])),a=new Map(r.fallbackExclusionList.map(([g,f])=>[g,new Set(f)])),l=new Map(r.fallbackPool),c=r.dependencyTreeRoots,u=r.enableTopLevelFallback;return{basePath:t,dependencyTreeRoots:c,enableTopLevelFallback:u,fallbackExclusionList:a,fallbackPool:l,ignorePattern:n,packageLocatorsByLocations:s,packageRegistry:o}}var Um=ge(require("module"));function sh(r,e){if(typeof r=="string")return r;if(r){let t,i;if(Array.isArray(r)){for(t=0;t0)return(f=sh(n[g],u))?f.replace("*",c.substring(g.length-1)):vu(i,c,1)}return vu(i,c)}}var vL=ge(require("util"));var ur;(function(c){c.API_ERROR="API_ERROR",c.BUILTIN_NODE_RESOLUTION_FAILED="BUILTIN_NODE_RESOLUTION_FAILED",c.EXPORTS_RESOLUTION_FAILED="EXPORTS_RESOLUTION_FAILED",c.MISSING_DEPENDENCY="MISSING_DEPENDENCY",c.MISSING_PEER_DEPENDENCY="MISSING_PEER_DEPENDENCY",c.QUALIFIED_PATH_RESOLUTION_FAILED="QUALIFIED_PATH_RESOLUTION_FAILED",c.INTERNAL="INTERNAL",c.UNDECLARED_DEPENDENCY="UNDECLARED_DEPENDENCY",c.UNSUPPORTED="UNSUPPORTED"})(ur||(ur={}));var s8e=new Set([ur.BUILTIN_NODE_RESOLUTION_FAILED,ur.MISSING_DEPENDENCY,ur.MISSING_PEER_DEPENDENCY,ur.QUALIFIED_PATH_RESOLUTION_FAILED,ur.UNDECLARED_DEPENDENCY]);function ai(r,e,t={},i){i!=null||(i=s8e.has(r)?"MODULE_NOT_FOUND":r);let n={configurable:!0,writable:!0,enumerable:!1};return Object.defineProperties(new Error(e),{code:te(N({},n),{value:i}),pnpCode:te(N({},n),{value:r}),data:te(N({},n),{value:t})})}function Bo(r){return H.normalize(H.fromPortablePath(r))}var o8e=ge(require("fs")),DAe=ge(require("module")),a8e=ge(require("path")),A8e=new Set(DAe.Module.builtinModules||Object.keys(process.binding("natives"))),tb=r=>r.startsWith("node:")||A8e.has(r);function xL(r,e){let t=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,i=Number(process.env.PNP_DEBUG_LEVEL),n=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/,s=/^(\/|\.{1,2}(\/|$))/,o=/\/$/,a=/^\.{0,2}\//,l={name:null,reference:null},c=[],u=new Set;if(r.enableTopLevelFallback===!0&&c.push(l),e.compatibilityMode!==!1)for(let re of["react-scripts","gatsby"]){let se=r.packageRegistry.get(re);if(se)for(let be of se.keys()){if(be===null)throw new Error("Assertion failed: This reference shouldn't be null");c.push({name:re,reference:be})}}let{ignorePattern:g,packageRegistry:f,packageLocatorsByLocations:h}=r;function p(re,se){return{fn:re,args:se,error:null,result:null}}function m(re){var Ke,ke,ve,pe,V,Qe;let se=(ve=(ke=(Ke=process.stderr)==null?void 0:Ke.hasColors)==null?void 0:ke.call(Ke))!=null?ve:process.stdout.isTTY,be=(le,fe)=>`[${le}m${fe}`,he=re.error;console.error(he?be("31;1",`\u2716 ${(pe=re.error)==null?void 0:pe.message.replace(/\n.*/s,"")}`):be("33;1","\u203C Resolution")),re.args.length>0&&console.error();for(let le of re.args)console.error(` ${be("37;1","In \u2190")} ${(0,vL.inspect)(le,{colors:se,compact:!0})}`);re.result&&(console.error(),console.error(` ${be("37;1","Out \u2192")} ${(0,vL.inspect)(re.result,{colors:se,compact:!0})}`));let Fe=(Qe=(V=new Error().stack.match(/(?<=^ +)at.*/gm))==null?void 0:V.slice(2))!=null?Qe:[];if(Fe.length>0){console.error();for(let le of Fe)console.error(` ${be("38;5;244",le)}`)}console.error()}function y(re,se){if(e.allowDebug===!1)return se;if(Number.isFinite(i)){if(i>=2)return(...be)=>{let he=p(re,be);try{return he.result=se(...be)}catch(Fe){throw he.error=Fe}finally{m(he)}};if(i>=1)return(...be)=>{try{return se(...be)}catch(he){let Fe=p(re,be);throw Fe.error=he,m(Fe),he}}}return se}function b(re){let se=A(re);if(!se)throw ai(ur.INTERNAL,"Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return se}function v(re){if(re.name===null)return!0;for(let se of r.dependencyTreeRoots)if(se.name===re.name&&se.reference===re.reference)return!0;return!1}let x=new Set(["default","node","require"]);function T(re,se=x){let be=Z(k.join(re,"internal.js"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(be===null)throw ai(ur.INTERNAL,`The locator that owns the "${re}" path can't be found inside the dependency tree (this is probably an internal error)`);let{packageLocation:he}=b(be),Fe=k.join(he,kt.manifest);if(!e.fakeFs.existsSync(Fe))return null;let Ke=JSON.parse(e.fakeFs.readFileSync(Fe,"utf8")),ke=k.contains(he,re);if(ke===null)throw ai(ur.INTERNAL,"unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)");a.test(ke)||(ke=`./${ke}`);let ve;try{ve=PAe(Ke,k.normalize(ke),{conditions:se,unsafe:!0})}catch(pe){throw ai(ur.EXPORTS_RESOLUTION_FAILED,pe.message,{unqualifiedPath:Bo(re),locator:be,pkgJson:Ke,subpath:Bo(ke),conditions:se},"ERR_PACKAGE_PATH_NOT_EXPORTED")}return typeof ve=="string"?k.join(he,ve):null}function q(re,se,{extensions:be}){let he;try{se.push(re),he=e.fakeFs.statSync(re)}catch(Fe){}if(he&&!he.isDirectory())return e.fakeFs.realpathSync(re);if(he&&he.isDirectory()){let Fe;try{Fe=JSON.parse(e.fakeFs.readFileSync(k.join(re,kt.manifest),"utf8"))}catch(ke){}let Ke;if(Fe&&Fe.main&&(Ke=k.resolve(re,Fe.main)),Ke&&Ke!==re){let ke=q(Ke,se,{extensions:be});if(ke!==null)return ke}}for(let Fe=0,Ke=be.length;Fe{let ve=JSON.stringify(ke.name);if(he.has(ve))return;he.add(ve);let pe=oe(ke);for(let V of pe)if(b(V).packagePeers.has(re))Fe(V);else{let le=be.get(V.name);typeof le=="undefined"&&be.set(V.name,le=new Set),le.add(V.reference)}};Fe(se);let Ke=[];for(let ke of[...be.keys()].sort())for(let ve of[...be.get(ke)].sort())Ke.push({name:ke,reference:ve});return Ke}function Z(re,{resolveIgnored:se=!1,includeDiscardFromLookup:be=!1}={}){if(_(re)&&!se)return null;let he=k.relative(r.basePath,re);he.match(s)||(he=`./${he}`),he.endsWith("/")||(he=`${he}/`);do{let Fe=h.get(he);if(typeof Fe=="undefined"||Fe.discardFromLookup&&!be){he=he.substring(0,he.lastIndexOf("/",he.length-2)+1);continue}return Fe.locator}while(he!=="");return null}function O(re,se,{considerBuiltins:be=!0}={}){if(re==="pnpapi")return H.toPortablePath(e.pnpapiResolution);if(be&&tb(re))return null;let he=Bo(re),Fe=se&&Bo(se);if(se&&_(se)&&(!k.isAbsolute(re)||Z(re)===null)){let ve=$(re,se);if(ve===!1)throw ai(ur.BUILTIN_NODE_RESOLUTION_FAILED,`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer was explicitely ignored by the regexp) + +Require request: "${he}" +Required by: ${Fe} +`,{request:he,issuer:Fe});return H.toPortablePath(ve)}let Ke,ke=re.match(n);if(ke){if(!se)throw ai(ur.API_ERROR,"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:he,issuer:Fe});let[,ve,pe]=ke,V=Z(se);if(!V){let jt=$(re,se);if(jt===!1)throw ai(ur.BUILTIN_NODE_RESOLUTION_FAILED,`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree). + +Require path: "${he}" +Required by: ${Fe} +`,{request:he,issuer:Fe});return H.toPortablePath(jt)}let le=b(V).packageDependencies.get(ve),fe=null;if(le==null&&V.name!==null){let jt=r.fallbackExclusionList.get(V.name);if(!jt||!jt.has(V.reference)){for(let Oi=0,Xs=c.length;Oiv(Qr))?gt=ai(ur.MISSING_PEER_DEPENDENCY,`${V.name} tried to access ${ve} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound. + +Required package: ${ve}${ve!==he?` (via "${he}")`:""} +Required by: ${V.name}@${V.reference} (via ${Fe}) +${jt.map(Qr=>`Ancestor breaking the chain: ${Qr.name}@${Qr.reference} +`).join("")} +`,{request:he,issuer:Fe,issuerLocator:Object.assign({},V),dependencyName:ve,brokenAncestors:jt}):gt=ai(ur.MISSING_PEER_DEPENDENCY,`${V.name} tried to access ${ve} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound. + +Required package: ${ve}${ve!==he?` (via "${he}")`:""} +Required by: ${V.name}@${V.reference} (via ${Fe}) + +${jt.map(Qr=>`Ancestor breaking the chain: ${Qr.name}@${Qr.reference} +`).join("")} +`,{request:he,issuer:Fe,issuerLocator:Object.assign({},V),dependencyName:ve,brokenAncestors:jt})}else le===void 0&&(!be&&tb(re)?v(V)?gt=ai(ur.UNDECLARED_DEPENDENCY,`Your application tried to access ${ve}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${ve} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound. + +Required package: ${ve}${ve!==he?` (via "${he}")`:""} +Required by: ${Fe} +`,{request:he,issuer:Fe,dependencyName:ve}):gt=ai(ur.UNDECLARED_DEPENDENCY,`${V.name} tried to access ${ve}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${ve} isn't otherwise declared in ${V.name}'s dependencies, this makes the require call ambiguous and unsound. + +Required package: ${ve}${ve!==he?` (via "${he}")`:""} +Required by: ${Fe} +`,{request:he,issuer:Fe,issuerLocator:Object.assign({},V),dependencyName:ve}):v(V)?gt=ai(ur.UNDECLARED_DEPENDENCY,`Your application tried to access ${ve}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound. + +Required package: ${ve}${ve!==he?` (via "${he}")`:""} +Required by: ${Fe} +`,{request:he,issuer:Fe,dependencyName:ve}):gt=ai(ur.UNDECLARED_DEPENDENCY,`${V.name} tried to access ${ve}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound. + +Required package: ${ve}${ve!==he?` (via "${he}")`:""} +Required by: ${V.name}@${V.reference} (via ${Fe}) +`,{request:he,issuer:Fe,issuerLocator:Object.assign({},V),dependencyName:ve}));if(le==null){if(fe===null||gt===null)throw gt||new Error("Assertion failed: Expected an error to have been set");le=fe;let jt=gt.message.replace(/\n.*/g,"");gt.message=jt,!u.has(jt)&&i!==0&&(u.add(jt),process.emitWarning(gt))}let Ht=Array.isArray(le)?{name:le[0],reference:le[1]}:{name:ve,reference:le},Mt=b(Ht);if(!Mt.packageLocation)throw ai(ur.MISSING_DEPENDENCY,`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod. + +Required package: ${Ht.name}@${Ht.reference}${Ht.name!==he?` (via "${he}")`:""} +Required by: ${V.name}@${V.reference} (via ${Fe}) +`,{request:he,issuer:Fe,dependencyLocator:Object.assign({},Ht)});let Ei=Mt.packageLocation;pe?Ke=k.join(Ei,pe):Ke=Ei}else if(k.isAbsolute(re))Ke=k.normalize(re);else{if(!se)throw ai(ur.API_ERROR,"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:he,issuer:Fe});let ve=k.resolve(se);se.match(o)?Ke=k.normalize(k.join(ve,re)):Ke=k.normalize(k.join(k.dirname(ve),re))}return k.normalize(Ke)}function L(re,se,be=x){if(s.test(re))return se;let he=T(se,be);return he?k.normalize(he):se}function de(re,{extensions:se=Object.keys(Um.Module._extensions)}={}){var Fe,Ke;let be=[],he=q(re,be,{extensions:se});if(he)return k.normalize(he);{let ke=Bo(re),ve=Z(re);if(ve){let{packageLocation:pe}=b(ve),V=!0;try{e.fakeFs.accessSync(pe)}catch(Qe){if((Qe==null?void 0:Qe.code)==="ENOENT")V=!1;else{let le=((Ke=(Fe=Qe==null?void 0:Qe.message)!=null?Fe:Qe)!=null?Ke:"empty exception thrown").replace(/^[A-Z]/,fe=>fe.toLowerCase());throw ai(ur.QUALIFIED_PATH_RESOLUTION_FAILED,`Required package exists but could not be accessed (${le}). + +Missing package: ${ve.name}@${ve.reference} +Expected package location: ${Bo(pe)} +`,{unqualifiedPath:ke,extensions:se})}}if(!V){let Qe=pe.includes("/unplugged/")?"Required unplugged package missing from disk. This may happen when switching branches without running installs (unplugged packages must be fully materialized on disk to work).":"Required package missing from disk. If you keep your packages inside your repository then restarting the Node process may be enough. Otherwise, try to run an install first.";throw ai(ur.QUALIFIED_PATH_RESOLUTION_FAILED,`${Qe} + +Missing package: ${ve.name}@${ve.reference} +Expected package location: ${Bo(pe)} +`,{unqualifiedPath:ke,extensions:se})}}throw ai(ur.QUALIFIED_PATH_RESOLUTION_FAILED,`Qualified path resolution failed: we looked for the following paths, but none could be accessed. + +Source path: ${ke} +${be.map(pe=>`Not found: ${Bo(pe)} +`).join("")}`,{unqualifiedPath:ke,extensions:se})}}function Be(re,se,{considerBuiltins:be,extensions:he,conditions:Fe}={}){try{let Ke=O(re,se,{considerBuiltins:be});if(re==="pnpapi")return Ke;if(Ke===null)return null;let ke=()=>se!==null?_(se):!1,ve=(!be||!tb(re))&&!ke()?L(re,Ke,Fe):Ke;return de(ve,{extensions:he})}catch(Ke){throw Object.prototype.hasOwnProperty.call(Ke,"pnpCode")&&Object.assign(Ke.data,{request:Bo(re),issuer:se&&Bo(se)}),Ke}}function je(re){let se=k.normalize(re),be=Wr.resolveVirtual(se);return be!==se?be:null}return{VERSIONS:ne,topLevel:ee,getLocator:(re,se)=>Array.isArray(se)?{name:se[0],reference:se[1]}:{name:re,reference:se},getDependencyTreeRoots:()=>[...r.dependencyTreeRoots],getAllLocators(){let re=[];for(let[se,be]of f)for(let he of be.keys())se!==null&&he!==null&&re.push({name:se,reference:he});return re},getPackageInformation:re=>{let se=A(re);if(se===null)return null;let be=H.fromPortablePath(se.packageLocation);return te(N({},se),{packageLocation:be})},findPackageLocator:re=>Z(H.toPortablePath(re)),resolveToUnqualified:y("resolveToUnqualified",(re,se,be)=>{let he=se!==null?H.toPortablePath(se):null,Fe=O(H.toPortablePath(re),he,be);return Fe===null?null:H.fromPortablePath(Fe)}),resolveUnqualified:y("resolveUnqualified",(re,se)=>H.fromPortablePath(de(H.toPortablePath(re),se))),resolveRequest:y("resolveRequest",(re,se,be)=>{let he=se!==null?H.toPortablePath(se):null,Fe=Be(H.toPortablePath(re),he,be);return Fe===null?null:H.fromPortablePath(Fe)}),resolveVirtual:y("resolveVirtual",re=>{let se=je(H.toPortablePath(re));return se!==null?H.fromPortablePath(se):null})}}var O0t=(0,FAe.promisify)(RAe.readFile);var NAe=(r,e,t)=>{let i=Km(r),n=SL(i,{basePath:e}),s=H.join(e,kt.pnpCjs);return xL(n,{fakeFs:t,pnpapiResolution:s})};var PL=ge(TAe());var Ca={};ft(Ca,{checkAndReportManifestCompatibility:()=>MAe,checkManifestCompatibility:()=>OAe,extractBuildScripts:()=>rb,getExtractHint:()=>DL,hasBindingGyp:()=>RL});function OAe(r){return P.isPackageCompatible(r,Vg.getArchitectureSet())}function MAe(r,e,{configuration:t,report:i}){return OAe(r)?!0:(i==null||i.reportWarningOnce(X.INCOMPATIBLE_ARCHITECTURE,`${P.prettyLocator(t,r)} The ${Vg.getArchitectureName()} architecture is incompatible with this package, ${e} skipped.`),!1)}function rb(r,e,t,{configuration:i,report:n}){let s=[];for(let a of["preinstall","install","postinstall"])e.manifest.scripts.has(a)&&s.push([cs.SCRIPT,a]);return!e.manifest.scripts.has("install")&&e.misc.hasBindingGyp&&s.push([cs.SHELLCODE,"node-gyp rebuild"]),s.length===0?[]:r.linkType!==Qt.HARD?(n==null||n.reportWarningOnce(X.SOFT_LINK_BUILD,`${P.prettyLocator(i,r)} lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored.`),[]):t&&t.built===!1?(n==null||n.reportInfoOnce(X.BUILD_DISABLED,`${P.prettyLocator(i,r)} lists build scripts, but its build has been explicitly disabled through configuration.`),[]):!i.get("enableScripts")&&!t.built?(n==null||n.reportWarningOnce(X.DISABLED_BUILD_SCRIPTS,`${P.prettyLocator(i,r)} lists build scripts, but all build scripts have been disabled.`),[]):MAe(r,"build",{configuration:i,report:n})?s:[]}var c8e=new Set([".exe",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function DL(r){return r.packageFs.getExtractHint({relevantExtensions:c8e})}function RL(r){let e=k.join(r.prefixPath,"binding.gyp");return r.packageFs.existsSync(e)}var FL={};ft(FL,{getUnpluggedPath:()=>Hm});function Hm(r,{configuration:e}){return k.resolve(e.get("pnpUnpluggedFolder"),P.slugifyLocator(r))}var u8e=new Set([P.makeIdent(null,"nan").identHash,P.makeIdent(null,"node-gyp").identHash,P.makeIdent(null,"node-pre-gyp").identHash,P.makeIdent(null,"node-addon-api").identHash,P.makeIdent(null,"fsevents").identHash,P.makeIdent(null,"open").identHash,P.makeIdent(null,"opn").identHash]),xu=class{constructor(){this.mode="strict";this.pnpCache=new Map}supportsPackage(e,t){return this.isEnabled(t)}async findPackageLocation(e,t){if(!this.isEnabled(t))throw new Error("Assertion failed: Expected the PnP linker to be enabled");let i=Tl(t.project).cjs;if(!K.existsSync(i))throw new Pe(`The project in ${ae.pretty(t.project.configuration,`${t.project.cwd}/package.json`,ae.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=Se.getFactoryWithDefault(this.pnpCache,i,()=>Se.dynamicRequire(i,{cachingStrategy:Se.CachingStrategy.FsTime})),s={name:P.stringifyIdent(e),reference:e.reference},o=n.getPackageInformation(s);if(!o)throw new Pe(`Couldn't find ${P.prettyLocator(t.project.configuration,e)} in the currently installed PnP map - running an install might help`);return H.toPortablePath(o.packageLocation)}async findPackageLocator(e,t){if(!this.isEnabled(t))return null;let i=Tl(t.project).cjs;if(!K.existsSync(i))return null;let s=Se.getFactoryWithDefault(this.pnpCache,i,()=>Se.dynamicRequire(i,{cachingStrategy:Se.CachingStrategy.FsTime})).findPackageLocator(H.fromPortablePath(e));return s?P.makeLocator(P.parseIdent(s.name),s.reference):null}makeInstaller(e){return new oh(e)}isEnabled(e){return!(e.project.configuration.get("nodeLinker")!=="pnp"||e.project.configuration.get("pnpMode")!==this.mode)}},oh=class{constructor(e){this.opts=e;this.mode="strict";this.asyncActions=new Se.AsyncActions(10);this.packageRegistry=new Map;this.virtualTemplates=new Map;this.isESMLoaderRequired=!1;this.customData={store:new Map};this.unpluggedPaths=new Set;this.opts=e}getCustomDataKey(){return JSON.stringify({name:"PnpInstaller",version:2})}attachCustomData(e){this.customData=e}async installPackage(e,t,i){let n=P.stringifyIdent(e),s=e.reference,o=!!this.opts.project.tryWorkspaceByLocator(e),a=P.isVirtualLocator(e),l=e.peerDependencies.size>0&&!a,c=!l&&!o,u=!l&&e.linkType!==Qt.SOFT,g,f;if(c||u){let x=a?P.devirtualizeLocator(e):e;g=this.customData.store.get(x.locatorHash),typeof g=="undefined"&&(g=await g8e(t),e.linkType===Qt.HARD&&this.customData.store.set(x.locatorHash,g)),g.manifest.type==="module"&&(this.isESMLoaderRequired=!0),f=this.opts.project.getDependencyMeta(x,e.version)}let h=c?rb(e,g,f,{configuration:this.opts.project.configuration,report:this.opts.report}):[],p=u?await this.unplugPackageIfNeeded(e,g,t,f,i):t.packageFs;if(k.isAbsolute(t.prefixPath))throw new Error(`Assertion failed: Expected the prefix path (${t.prefixPath}) to be relative to the parent`);let m=k.resolve(p.getRealPath(),t.prefixPath),y=NL(this.opts.project.cwd,m),b=new Map,v=new Set;if(a){for(let x of e.peerDependencies.values())b.set(P.stringifyIdent(x),null),v.add(P.stringifyIdent(x));if(!o){let x=P.devirtualizeLocator(e);this.virtualTemplates.set(x.locatorHash,{location:NL(this.opts.project.cwd,Wr.resolveVirtual(m)),locator:x})}}return Se.getMapWithDefault(this.packageRegistry,n).set(s,{packageLocation:y,packageDependencies:b,packagePeers:v,linkType:e.linkType,discardFromLookup:t.discardFromLookup||!1}),{packageLocation:m,buildDirective:h.length>0?h:null}}async attachInternalDependencies(e,t){let i=this.getPackageInformation(e);for(let[n,s]of t){let o=P.areIdentsEqual(n,s)?s.reference:[P.stringifyIdent(s),s.reference];i.packageDependencies.set(P.stringifyIdent(n),o)}}async attachExternalDependents(e,t){for(let i of t)this.getDiskInformation(i).packageDependencies.set(P.stringifyIdent(e),e.reference)}async finalizeInstall(){if(this.opts.project.configuration.get("pnpMode")!==this.mode)return;let e=Tl(this.opts.project);if(K.existsSync(e.cjsLegacy)&&(this.opts.report.reportWarning(X.UNNAMED,`Removing the old ${ae.pretty(this.opts.project.configuration,kt.pnpJs,ae.Type.PATH)} file. You might need to manually update existing references to reference the new ${ae.pretty(this.opts.project.configuration,kt.pnpCjs,ae.Type.PATH)} file. If you use Editor SDKs, you'll have to rerun ${ae.pretty(this.opts.project.configuration,"yarn sdks",ae.Type.CODE)}.`),await K.removePromise(e.cjsLegacy)),this.isEsmEnabled()||await K.removePromise(e.esmLoader),this.opts.project.configuration.get("nodeLinker")!=="pnp"){await K.removePromise(e.cjs),await K.removePromise(this.opts.project.configuration.get("pnpDataPath")),await K.removePromise(e.esmLoader);return}for(let{locator:u,location:g}of this.virtualTemplates.values())Se.getMapWithDefault(this.packageRegistry,P.stringifyIdent(u)).set(u.reference,{packageLocation:g,packageDependencies:new Map,packagePeers:new Set,linkType:Qt.SOFT,discardFromLookup:!1});this.packageRegistry.set(null,new Map([[null,this.getPackageInformation(this.opts.project.topLevelWorkspace.anchoredLocator)]]));let t=this.opts.project.configuration.get("pnpFallbackMode"),i=this.opts.project.workspaces.map(({anchoredLocator:u})=>({name:P.stringifyIdent(u),reference:u.reference})),n=t!=="none",s=[],o=new Map,a=Se.buildIgnorePattern([".yarn/sdks/**",...this.opts.project.configuration.get("pnpIgnorePatterns")]),l=this.packageRegistry,c=this.opts.project.configuration.get("pnpShebang");if(t==="dependencies-only")for(let u of this.opts.project.storedPackages.values())this.opts.project.tryWorkspaceByLocator(u)&&s.push({name:P.stringifyIdent(u),reference:u.reference});return await this.asyncActions.wait(),await this.finalizeInstallWithPnp({dependencyTreeRoots:i,enableTopLevelFallback:n,fallbackExclusionList:s,fallbackPool:o,ignorePattern:a,packageRegistry:l,shebang:c}),{customData:this.customData}}async transformPnpSettings(e){}isEsmEnabled(){if(this.opts.project.configuration.sources.has("pnpEnableEsmLoader"))return this.opts.project.configuration.get("pnpEnableEsmLoader");if(this.isESMLoaderRequired)return!0;for(let e of this.opts.project.workspaces)if(e.manifest.type==="module")return!0;return!1}async finalizeInstallWithPnp(e){let t=Tl(this.opts.project),i=this.opts.project.configuration.get("pnpDataPath"),n=await this.locateNodeModules(e.ignorePattern);if(n.length>0){this.opts.report.reportWarning(X.DANGEROUS_NODE_MODULES,"One or more node_modules have been detected and will be removed. This operation may take some time.");for(let o of n)await K.removePromise(o)}if(await this.transformPnpSettings(e),this.opts.project.configuration.get("pnpEnableInlining")){let o=xAe(e);await K.changeFilePromise(t.cjs,o,{automaticNewlines:!0,mode:493}),await K.removePromise(i)}else{let o=k.relative(k.dirname(t.cjs),i),{dataFile:a,loaderFile:l}=kAe(te(N({},e),{dataLocation:o}));await K.changeFilePromise(t.cjs,l,{automaticNewlines:!0,mode:493}),await K.changeFilePromise(i,a,{automaticNewlines:!0,mode:420})}this.isEsmEnabled()&&(this.opts.report.reportWarning(X.UNNAMED,"ESM support for PnP uses the experimental loader API and is therefore experimental"),await K.changeFilePromise(t.esmLoader,(0,PL.default)(),{automaticNewlines:!0,mode:420}));let s=this.opts.project.configuration.get("pnpUnpluggedFolder");if(this.unpluggedPaths.size===0)await K.removePromise(s);else for(let o of await K.readdirPromise(s)){let a=k.resolve(s,o);this.unpluggedPaths.has(a)||await K.removePromise(a)}}async locateNodeModules(e){let t=[],i=e?new RegExp(e):null;for(let n of this.opts.project.workspaces){let s=k.join(n.cwd,"node_modules");if(i&&i.test(k.relative(this.opts.project.cwd,n.cwd))||!K.existsSync(s))continue;let o=await K.readdirPromise(s,{withFileTypes:!0}),a=o.filter(l=>!l.isDirectory()||l.name===".bin"||!l.name.startsWith("."));if(a.length===o.length)t.push(s);else for(let l of a)t.push(k.join(s,l.name))}return t}async unplugPackageIfNeeded(e,t,i,n,s){return this.shouldBeUnplugged(e,t,n)?this.unplugPackage(e,i,s):i.packageFs}shouldBeUnplugged(e,t,i){return typeof i.unplugged!="undefined"?i.unplugged:u8e.has(e.identHash)||e.conditions!=null?!0:t.manifest.preferUnplugged!==null?t.manifest.preferUnplugged:!!(rb(e,t,i,{configuration:this.opts.project.configuration}).length>0||t.misc.extractHint)}async unplugPackage(e,t,i){let n=Hm(e,{configuration:this.opts.project.configuration});return this.opts.project.disabledLocators.has(e.locatorHash)?new Na(n,{baseFs:t.packageFs,pathUtils:k}):(this.unpluggedPaths.add(n),i.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{let s=k.join(n,t.prefixPath,".ready");await K.existsPromise(s)||(this.opts.project.storedBuildState.delete(e.locatorHash),await K.mkdirPromise(n,{recursive:!0}),await K.copyPromise(n,Me.dot,{baseFs:t.packageFs,overwrite:!1}),await K.writeFilePromise(s,""))})),new _t(n))}getPackageInformation(e){let t=P.stringifyIdent(e),i=e.reference,n=this.packageRegistry.get(t);if(!n)throw new Error(`Assertion failed: The package information store should have been available (for ${P.prettyIdent(this.opts.project.configuration,e)})`);let s=n.get(i);if(!s)throw new Error(`Assertion failed: The package information should have been available (for ${P.prettyLocator(this.opts.project.configuration,e)})`);return s}getDiskInformation(e){let t=Se.getMapWithDefault(this.packageRegistry,"@@disk"),i=NL(this.opts.project.cwd,e);return Se.getFactoryWithDefault(t,i,()=>({packageLocation:i,packageDependencies:new Map,packagePeers:new Set,linkType:Qt.SOFT,discardFromLookup:!1}))}};function NL(r,e){let t=k.relative(r,e);return t.match(/^\.{0,2}\//)||(t=`./${t}`),t.replace(/\/?$/,"/")}async function g8e(r){var i;let e=(i=await At.tryFind(r.prefixPath,{baseFs:r.packageFs}))!=null?i:new At,t=new Set(["preinstall","install","postinstall"]);for(let n of e.scripts.keys())t.has(n)||e.scripts.delete(n);return{manifest:{scripts:e.scripts,preferUnplugged:e.preferUnplugged,type:e.type},misc:{extractHint:DL(r),hasBindingGyp:RL(r)}}}var KAe=ge(is());var jm=class extends Le{constructor(){super(...arguments);this.all=J.Boolean("-A,--all",!1,{description:"Unplug direct dependencies from the entire project"});this.recursive=J.Boolean("-R,--recursive",!1,{description:"Unplug both direct and transitive dependencies"});this.json=J.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=J.Rest()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd),n=await Nt.find(e);if(!i)throw new ht(t.cwd,this.context.cwd);if(e.get("nodeLinker")!=="pnp")throw new Pe("This command can only be used if the `nodeLinker` option is set to `pnp`");await t.restoreInstallState();let s=new Set(this.patterns),o=this.patterns.map(f=>{let h=P.parseDescriptor(f),p=h.range!=="unknown"?h:P.makeDescriptor(h,"*");if(!Wt.validRange(p.range))throw new Pe(`The range of the descriptor patterns must be a valid semver range (${P.prettyDescriptor(e,p)})`);return m=>{let y=P.stringifyIdent(m);return!KAe.default.isMatch(y,P.stringifyIdent(p))||m.version&&!Wt.satisfiesWithPrereleases(m.version,p.range)?!1:(s.delete(f),!0)}}),a=()=>{let f=[];for(let h of t.storedPackages.values())!t.tryWorkspaceByLocator(h)&&!P.isVirtualLocator(h)&&o.some(p=>p(h))&&f.push(h);return f},l=f=>{let h=new Set,p=[],m=(y,b)=>{if(!h.has(y.locatorHash)&&(h.add(y.locatorHash),!t.tryWorkspaceByLocator(y)&&o.some(v=>v(y))&&p.push(y),!(b>0&&!this.recursive)))for(let v of y.dependencies.values()){let x=t.storedResolutions.get(v.descriptorHash);if(!x)throw new Error("Assertion failed: The resolution should have been registered");let T=t.storedPackages.get(x);if(!T)throw new Error("Assertion failed: The package should have been registered");m(T,b+1)}};for(let y of f){let b=t.storedPackages.get(y.anchoredLocator.locatorHash);if(!b)throw new Error("Assertion failed: The package should have been registered");m(b,0)}return p},c,u;if(this.all&&this.recursive?(c=a(),u="the project"):this.all?(c=l(t.workspaces),u="any workspace"):(c=l([i]),u="this workspace"),s.size>1)throw new Pe(`Patterns ${ae.prettyList(e,s,ae.Type.CODE)} don't match any packages referenced by ${u}`);if(s.size>0)throw new Pe(`Pattern ${ae.prettyList(e,s,ae.Type.CODE)} doesn't match any packages referenced by ${u}`);return c=Se.sortMap(c,f=>P.stringifyLocator(f)),(await Je.start({configuration:e,stdout:this.context.stdout,json:this.json},async f=>{var h;for(let p of c){let m=(h=p.version)!=null?h:"unknown",y=t.topLevelWorkspace.manifest.ensureDependencyMeta(P.makeDescriptor(p,m));y.unplugged=!0,f.reportInfo(X.UNNAMED,`Will unpack ${P.prettyLocator(e,p)} to ${ae.pretty(e,Hm(p,{configuration:e}),ae.Type.PATH)}`),f.reportJson({locator:P.stringifyLocator(p),version:m})}await t.topLevelWorkspace.persistManifest(),f.reportSeparator(),await t.install({cache:n,report:f})})).exitCode()}};jm.paths=[["unplug"]],jm.usage=Re.Usage({description:"force the unpacking of a list of packages",details:"\n This command will add the selectors matching the specified patterns to the list of packages that must be unplugged when installed.\n\n A package being unplugged means that instead of being referenced directly through its archive, it will be unpacked at install time in the directory configured via `pnpUnpluggedFolder`. Note that unpacking packages this way is generally not recommended because it'll make it harder to store your packages within the repository. However, it's a good approach to quickly and safely debug some packages, and can even sometimes be required depending on the context (for example when the package contains shellscripts).\n\n Running the command will set a persistent flag inside your top-level `package.json`, in the `dependenciesMeta` field. As such, to undo its effects, you'll need to revert the changes made to the manifest and run `yarn install` to apply the modification.\n\n By default, only direct dependencies from the current workspace are affected. If `-A,--all` is set, direct dependencies from the entire project are affected. Using the `-R,--recursive` flag will affect transitive dependencies as well as direct ones.\n\n This command accepts glob patterns inside the scope and name components (not the range). Make sure to escape the patterns to prevent your own shell from trying to expand them.\n ",examples:[["Unplug the lodash dependency from the active workspace","yarn unplug lodash"],["Unplug all instances of lodash referenced by any workspace","yarn unplug lodash -A"],["Unplug all instances of lodash referenced by the active workspace and its dependencies","yarn unplug lodash -R"],["Unplug all instances of lodash, anywhere","yarn unplug lodash -AR"],["Unplug one specific version of lodash","yarn unplug lodash@1.2.3"],["Unplug all packages with the `@babel` scope","yarn unplug '@babel/*'"],["Unplug all packages (only for testing, not recommended)","yarn unplug -R '*'"]]});var UAe=jm;var Tl=r=>({cjs:k.join(r.cwd,kt.pnpCjs),cjsLegacy:k.join(r.cwd,kt.pnpJs),esmLoader:k.join(r.cwd,".pnp.loader.mjs")}),GAe=r=>/\s/.test(r)?JSON.stringify(r):r;async function f8e(r,e,t){let i=Tl(r),n=`--require ${GAe(H.fromPortablePath(i.cjs))}`;if(K.existsSync(i.esmLoader)&&(n=`${n} --experimental-loader ${(0,jAe.pathToFileURL)(H.fromPortablePath(i.esmLoader)).href}`),i.cjs.includes(" ")&&HAe.default.lt(process.versions.node,"12.0.0"))throw new Error(`Expected the build location to not include spaces when using Node < 12.0.0 (${process.versions.node})`);if(K.existsSync(i.cjs)){let s=e.NODE_OPTIONS||"",o=/\s*--require\s+\S*\.pnp\.c?js\s*/g,a=/\s*--experimental-loader\s+\S*\.pnp\.loader\.mjs\s*/;s=s.replace(o," ").replace(a," ").trim(),s=s?`${n} ${s}`:n,e.NODE_OPTIONS=s}}async function h8e(r,e){let t=Tl(r);e(t.cjs),e(t.esmLoader),e(r.configuration.get("pnpDataPath")),e(r.configuration.get("pnpUnpluggedFolder"))}var p8e={hooks:{populateYarnPaths:h8e,setupScriptEnvironment:f8e},configuration:{nodeLinker:{description:'The linker used for installing Node packages, one of: "pnp", "node-modules"',type:Ie.STRING,default:"pnp"},pnpMode:{description:"If 'strict', generates standard PnP maps. If 'loose', merges them with the n_m resolution.",type:Ie.STRING,default:"strict"},pnpShebang:{description:"String to prepend to the generated PnP script",type:Ie.STRING,default:"#!/usr/bin/env node"},pnpIgnorePatterns:{description:"Array of glob patterns; files matching them will use the classic resolution",type:Ie.STRING,default:[],isArray:!0},pnpEnableEsmLoader:{description:"If true, Yarn will generate an ESM loader (`.pnp.loader.mjs`). If this is not explicitly set Yarn tries to automatically detect whether ESM support is required.",type:Ie.BOOLEAN,default:!1},pnpEnableInlining:{description:"If true, the PnP data will be inlined along with the generated loader",type:Ie.BOOLEAN,default:!0},pnpFallbackMode:{description:"If true, the generated PnP loader will follow the top-level fallback rule",type:Ie.STRING,default:"dependencies-only"},pnpUnpluggedFolder:{description:"Folder where the unplugged packages must be stored",type:Ie.ABSOLUTE_PATH,default:"./.yarn/unplugged"},pnpDataPath:{description:"Path of the file where the PnP data (used by the loader) must be written",type:Ie.ABSOLUTE_PATH,default:"./.pnp.data.json"}},linkers:[xu],commands:[UAe]},d8e=p8e;var _Ae=ge(zAe());var UL=ge(require("crypto")),VAe=ge(require("fs")),XAe=1,jr="node_modules",ib=".bin",ZAe=".yarn-state.yml",Ti;(function(i){i.CLASSIC="classic",i.HARDLINKS_LOCAL="hardlinks-local",i.HARDLINKS_GLOBAL="hardlinks-global"})(Ti||(Ti={}));var HL=class{constructor(){this.installStateCache=new Map}supportsPackage(e,t){return this.isEnabled(t)}async findPackageLocation(e,t){if(!this.isEnabled(t))throw new Error("Assertion failed: Expected the node-modules linker to be enabled");let i=t.project.tryWorkspaceByLocator(e);if(i)return i.cwd;let n=await Se.getFactoryWithDefault(this.installStateCache,t.project.cwd,async()=>await jL(t.project,{unrollAliases:!0}));if(n===null)throw new Pe("Couldn't find the node_modules state file - running an install might help (findPackageLocation)");let s=n.locatorMap.get(P.stringifyLocator(e));if(!s){let a=new Pe(`Couldn't find ${P.prettyLocator(t.project.configuration,e)} in the currently installed node_modules map - running an install might help`);throw a.code="LOCATOR_NOT_INSTALLED",a}let o=t.project.configuration.startingCwd;return s.locations.find(a=>k.contains(o,a))||s.locations[0]}async findPackageLocator(e,t){if(!this.isEnabled(t))return null;let i=await Se.getFactoryWithDefault(this.installStateCache,t.project.cwd,async()=>await jL(t.project,{unrollAliases:!0}));if(i===null)return null;let{locationRoot:n,segments:s}=nb(k.resolve(e),{skipPrefix:t.project.cwd}),o=i.locationTree.get(n);if(!o)return null;let a=o.locator;for(let l of s){if(o=o.children.get(l),!o)break;a=o.locator||a}return P.parseLocator(a)}makeInstaller(e){return new $Ae(e)}isEnabled(e){return e.project.configuration.get("nodeLinker")==="node-modules"}},$Ae=class{constructor(e){this.opts=e;this.localStore=new Map;this.realLocatorChecksums=new Map;this.customData={store:new Map}}getCustomDataKey(){return JSON.stringify({name:"NodeModulesInstaller",version:2})}attachCustomData(e){this.customData=e}async installPackage(e,t){var u;let i=k.resolve(t.packageFs.getRealPath(),t.prefixPath),n=this.customData.store.get(e.locatorHash);if(typeof n=="undefined"&&(n=await F8e(e,t),e.linkType===Qt.HARD&&this.customData.store.set(e.locatorHash,n)),!P.isPackageCompatible(e,this.opts.project.configuration.getSupportedArchitectures()))return{packageLocation:null,buildDirective:null};let s=new Map,o=new Set;s.has(P.stringifyIdent(e))||s.set(P.stringifyIdent(e),e.reference);let a=e;if(P.isVirtualLocator(e)){a=P.devirtualizeLocator(e);for(let g of e.peerDependencies.values())s.set(P.stringifyIdent(g),null),o.add(P.stringifyIdent(g))}let l={packageLocation:`${H.fromPortablePath(i)}/`,packageDependencies:s,packagePeers:o,linkType:e.linkType,discardFromLookup:(u=t.discardFromLookup)!=null?u:!1};this.localStore.set(e.locatorHash,{pkg:e,customPackageData:n,dependencyMeta:this.opts.project.getDependencyMeta(e,e.version),pnpNode:l});let c=t.checksum?t.checksum.substring(t.checksum.indexOf("/")+1):null;return this.realLocatorChecksums.set(a.locatorHash,c),{packageLocation:i,buildDirective:null}}async attachInternalDependencies(e,t){let i=this.localStore.get(e.locatorHash);if(typeof i=="undefined")throw new Error("Assertion failed: Expected information object to have been registered");for(let[n,s]of t){let o=P.areIdentsEqual(n,s)?s.reference:[P.stringifyIdent(s),s.reference];i.pnpNode.packageDependencies.set(P.stringifyIdent(n),o)}}async attachExternalDependents(e,t){throw new Error("External dependencies haven't been implemented for the node-modules linker")}async finalizeInstall(){if(this.opts.project.configuration.get("nodeLinker")!=="node-modules")return;let e=new Wr({baseFs:new Is({libzip:await fn(),maxOpenFiles:80,readOnlyArchives:!0})}),t=await jL(this.opts.project),i=this.opts.project.configuration.get("nmMode");(t===null||i!==t.nmMode)&&(this.opts.project.storedBuildState.clear(),t={locatorMap:new Map,binSymlinks:new Map,locationTree:new Map,nmMode:i,mtimeMs:0});let n=new Map(this.opts.project.workspaces.map(f=>{var p,m;let h=this.opts.project.configuration.get("nmHoistingLimits");try{h=Se.validateEnum(Kn,(m=(p=f.manifest.installConfig)==null?void 0:p.hoistingLimits)!=null?m:h)}catch(y){let b=P.prettyWorkspace(this.opts.project.configuration,f);this.opts.report.reportWarning(X.INVALID_MANIFEST,`${b}: Invalid 'installConfig.hoistingLimits' value. Expected one of ${Object.values(Kn).join(", ")}, using default: "${h}"`)}return[f.relativeCwd,h]})),s=new Map(this.opts.project.workspaces.map(f=>{var p,m;let h=this.opts.project.configuration.get("nmSelfReferences");return h=(m=(p=f.manifest.installConfig)==null?void 0:p.selfReferences)!=null?m:h,[f.relativeCwd,h]})),o={VERSIONS:{std:1},topLevel:{name:null,reference:null},getLocator:(f,h)=>Array.isArray(h)?{name:h[0],reference:h[1]}:{name:f,reference:h},getDependencyTreeRoots:()=>this.opts.project.workspaces.map(f=>{let h=f.anchoredLocator;return{name:P.stringifyIdent(f.locator),reference:h.reference}}),getPackageInformation:f=>{let h=f.reference===null?this.opts.project.topLevelWorkspace.anchoredLocator:P.makeLocator(P.parseIdent(f.name),f.reference),p=this.localStore.get(h.locatorHash);if(typeof p=="undefined")throw new Error("Assertion failed: Expected the package reference to have been registered");return p.pnpNode},findPackageLocator:f=>{let h=this.opts.project.tryWorkspaceByCwd(H.toPortablePath(f));if(h!==null){let p=h.anchoredLocator;return{name:P.stringifyIdent(p),reference:p.reference}}throw new Error("Assertion failed: Unimplemented")},resolveToUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveRequest:()=>{throw new Error("Assertion failed: Unimplemented")},resolveVirtual:f=>H.fromPortablePath(Wr.resolveVirtual(H.toPortablePath(f)))},{tree:a,errors:l,preserveSymlinksRequired:c}=Om(o,{pnpifyFs:!1,validateExternalSoftLinks:!0,hoistingLimitsByCwd:n,project:this.opts.project,selfReferencesByCwd:s});if(!a){for(let{messageName:f,text:h}of l)this.opts.report.reportError(f,h);return}let u=BL(a);await N8e(t,u,{baseFs:e,project:this.opts.project,report:this.opts.report,realLocatorChecksums:this.realLocatorChecksums,loadManifest:async f=>{let h=P.parseLocator(f),p=this.localStore.get(h.locatorHash);if(typeof p=="undefined")throw new Error("Assertion failed: Expected the slot to exist");return p.customPackageData.manifest}});let g=[];for(let[f,h]of u.entries()){if(ele(f))continue;let p=P.parseLocator(f),m=this.localStore.get(p.locatorHash);if(typeof m=="undefined")throw new Error("Assertion failed: Expected the slot to exist");if(this.opts.project.tryWorkspaceByLocator(m.pkg))continue;let y=Ca.extractBuildScripts(m.pkg,m.customPackageData,m.dependencyMeta,{configuration:this.opts.project.configuration,report:this.opts.report});y.length!==0&&g.push({buildLocations:h.locations,locatorHash:p.locatorHash,buildDirective:y})}return c&&this.opts.report.reportWarning(X.NM_PRESERVE_SYMLINKS_REQUIRED,`The application uses portals and that's why ${ae.pretty(this.opts.project.configuration,"--preserve-symlinks",ae.Type.CODE)} Node option is required for launching it`),{customData:this.customData,records:g}}};async function F8e(r,e){var n;let t=(n=await At.tryFind(e.prefixPath,{baseFs:e.packageFs}))!=null?n:new At,i=new Set(["preinstall","install","postinstall"]);for(let s of t.scripts.keys())i.has(s)||t.scripts.delete(s);return{manifest:{bin:t.bin,scripts:t.scripts},misc:{extractHint:Ca.getExtractHint(e),hasBindingGyp:Ca.hasBindingGyp(e)}}}async function L8e(r,e,t,i,{installChangedByUser:n}){let s="";s+=`# Warning: This file is automatically generated. Removing it is fine, but will +`,s+=`# cause your node_modules installation to become invalidated. +`,s+=` +`,s+=`__metadata: +`,s+=` version: ${XAe} +`,s+=` nmMode: ${i.value} +`;let o=Array.from(e.keys()).sort(),a=P.stringifyLocator(r.topLevelWorkspace.anchoredLocator);for(let u of o){let g=e.get(u);s+=` +`,s+=`${JSON.stringify(u)}: +`,s+=` locations: +`;for(let f of g.locations){let h=k.contains(r.cwd,f);if(h===null)throw new Error(`Assertion failed: Expected the path to be within the project (${f})`);s+=` - ${JSON.stringify(h)} +`}if(g.aliases.length>0){s+=` aliases: +`;for(let f of g.aliases)s+=` - ${JSON.stringify(f)} +`}if(u===a&&t.size>0){s+=` bin: +`;for(let[f,h]of t){let p=k.contains(r.cwd,f);if(p===null)throw new Error(`Assertion failed: Expected the path to be within the project (${f})`);s+=` ${JSON.stringify(p)}: +`;for(let[m,y]of h){let b=k.relative(k.join(f,jr),y);s+=` ${JSON.stringify(m)}: ${JSON.stringify(b)} +`}}}}let l=r.cwd,c=k.join(l,jr,ZAe);n&&await K.removePromise(c),await K.changeFilePromise(c,s,{automaticNewlines:!0})}async function jL(r,{unrollAliases:e=!1}={}){let t=r.cwd,i=k.join(t,jr,ZAe),n;try{n=await K.statPromise(i)}catch(c){}if(!n)return null;let s=Si(await K.readFilePromise(i,"utf8"));if(s.__metadata.version>XAe)return null;let o=s.__metadata.nmMode||Ti.CLASSIC,a=new Map,l=new Map;delete s.__metadata;for(let[c,u]of Object.entries(s)){let g=u.locations.map(h=>k.join(t,h)),f=u.bin;if(f)for(let[h,p]of Object.entries(f)){let m=k.join(t,H.toPortablePath(h)),y=Se.getMapWithDefault(l,m);for(let[b,v]of Object.entries(p))y.set(Jr(b),H.toPortablePath([m,jr,v].join(k.sep)))}if(a.set(c,{target:Me.dot,linkType:Qt.HARD,locations:g,aliases:u.aliases||[]}),e&&u.aliases)for(let h of u.aliases){let{scope:p,name:m}=P.parseLocator(c),y=P.makeLocator(P.makeIdent(p,m),h),b=P.stringifyLocator(y);a.set(b,{target:Me.dot,linkType:Qt.HARD,locations:g,aliases:[]})}}return{locatorMap:a,binSymlinks:l,locationTree:tle(a,{skipPrefix:r.cwd}),nmMode:o,mtimeMs:n.mtimeMs}}var Ah=async(r,e)=>{if(r.split(k.sep).indexOf(jr)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${r}`);try{if(!e.innerLoop){let i=e.allowSymlink?await K.statPromise(r):await K.lstatPromise(r);if(e.allowSymlink&&!i.isDirectory()||!e.allowSymlink&&i.isSymbolicLink()){await K.unlinkPromise(r);return}}let t=await K.readdirPromise(r,{withFileTypes:!0});for(let i of t){let n=k.join(r,Jr(i.name));i.isDirectory()?(i.name!==jr||e&&e.innerLoop)&&await Ah(n,{innerLoop:!0,contentsOnly:!1}):await K.unlinkPromise(n)}e.contentsOnly||await K.rmdirPromise(r)}catch(t){if(t.code!=="ENOENT"&&t.code!=="ENOTEMPTY")throw t}},rle=4,nb=(r,{skipPrefix:e})=>{let t=k.contains(e,r);if(t===null)throw new Error(`Assertion failed: Writing attempt prevented to ${r} which is outside project root: ${e}`);let i=t.split(k.sep).filter(l=>l!==""),n=i.indexOf(jr),s=i.slice(0,n).join(k.sep),o=k.join(e,s),a=i.slice(n);return{locationRoot:o,segments:a}},tle=(r,{skipPrefix:e})=>{let t=new Map;if(r===null)return t;let i=()=>({children:new Map,linkType:Qt.HARD});for(let[n,s]of r.entries()){if(s.linkType===Qt.SOFT&&k.contains(e,s.target)!==null){let a=Se.getFactoryWithDefault(t,s.target,i);a.locator=n,a.linkType=s.linkType}for(let o of s.locations){let{locationRoot:a,segments:l}=nb(o,{skipPrefix:e}),c=Se.getFactoryWithDefault(t,a,i);for(let u=0;u{let t;try{process.platform==="win32"&&(t=await K.lstatPromise(r))}catch(i){}process.platform=="win32"&&(!t||t.isDirectory())?await K.symlinkPromise(r,e,"junction"):await K.symlinkPromise(k.relative(k.dirname(e),r),e)};async function ile(r,e,t){let i=k.join(r,Jr(`${UL.default.randomBytes(16).toString("hex")}.tmp`));try{await K.writeFilePromise(i,t);try{await K.linkPromise(i,e)}catch(n){}}finally{await K.unlinkPromise(i)}}async function T8e({srcPath:r,dstPath:e,srcMode:t,globalHardlinksStore:i,baseFs:n,nmMode:s,digest:o}){if(s.value===Ti.HARDLINKS_GLOBAL&&i&&o){let l=k.join(i,o.substring(0,2),`${o.substring(2)}.dat`),c;try{if(await Dn.checksumFile(l,{baseFs:K,algorithm:"sha1"})!==o){let g=k.join(i,Jr(`${UL.default.randomBytes(16).toString("hex")}.tmp`));await K.renamePromise(l,g);let f=await n.readFilePromise(r);await K.writeFilePromise(g,f);try{await K.linkPromise(g,l),await K.unlinkPromise(g)}catch(h){}}await K.linkPromise(l,e),c=!0}catch(u){c=!1}if(!c){let u=await n.readFilePromise(r);await ile(i,l,u);try{await K.linkPromise(l,e)}catch(g){g&&g.code&&g.code=="EXDEV"&&(s.value=Ti.HARDLINKS_LOCAL,await n.copyFilePromise(r,e))}}}else await n.copyFilePromise(r,e);let a=t&511;a!==420&&await K.chmodPromise(e,a)}var Ol;(function(i){i.FILE="file",i.DIRECTORY="directory",i.SYMLINK="symlink"})(Ol||(Ol={}));var O8e=async(r,e,{baseFs:t,globalHardlinksStore:i,nmMode:n,packageChecksum:s})=>{await K.mkdirPromise(r,{recursive:!0});let o=async(l=Me.dot)=>{let c=k.join(e,l),u=await t.readdirPromise(c,{withFileTypes:!0}),g=new Map;for(let f of u){let h=k.join(l,f.name),p,m=k.join(c,f.name);if(f.isFile()){if(p={kind:Ol.FILE,mode:(await t.lstatPromise(m)).mode},n.value===Ti.HARDLINKS_GLOBAL){let y=await Dn.checksumFile(m,{baseFs:t,algorithm:"sha1"});p.digest=y}}else if(f.isDirectory())p={kind:Ol.DIRECTORY};else if(f.isSymbolicLink())p={kind:Ol.SYMLINK,symlinkTo:await t.readlinkPromise(m)};else throw new Error(`Unsupported file type (file: ${m}, mode: 0o${await t.statSync(m).mode.toString(8).padStart(6,"0")})`);if(g.set(h,p),f.isDirectory()&&h!==jr){let y=await o(h);for(let[b,v]of y)g.set(b,v)}}return g},a;if(n.value===Ti.HARDLINKS_GLOBAL&&i&&s){let l=k.join(i,s.substring(0,2),`${s.substring(2)}.json`);try{a=new Map(Object.entries(JSON.parse(await K.readFilePromise(l,"utf8"))))}catch(c){a=await o(),await ile(i,l,Buffer.from(JSON.stringify(Object.fromEntries(a))))}}else a=await o();for(let[l,c]of a){let u=k.join(e,l),g=k.join(r,l);c.kind===Ol.DIRECTORY?await K.mkdirPromise(g,{recursive:!0}):c.kind===Ol.FILE?await T8e({srcPath:u,dstPath:g,srcMode:c.mode,digest:c.digest,nmMode:n,baseFs:t,globalHardlinksStore:i}):c.kind===Ol.SYMLINK&&await GL(k.resolve(k.dirname(g),c.symlinkTo),g)}};function M8e(r,e,t,i){let n=new Map,s=new Map,o=new Map,a=!1,l=(c,u,g,f,h)=>{let p=!0,m=k.join(c,u),y=new Set;if(u===jr||u.startsWith("@")){let v;try{v=K.statSync(m)}catch(T){}p=!!v,v?v.mtimeMs>t?(a=!0,y=new Set(K.readdirSync(m))):y=new Set(g.children.get(u).children.keys()):a=!0;let x=e.get(c);if(x){let T=k.join(c,jr,ib),q;try{q=K.statSync(T)}catch(Y){}if(!q)a=!0;else if(q.mtimeMs>t){a=!0;let Y=new Set(K.readdirSync(T)),$=new Map;s.set(c,$);for(let[_,ne]of x)Y.has(_)&&$.set(_,ne)}else s.set(c,x)}}else p=h.has(u);let b=g.children.get(u);if(p){let{linkType:v,locator:x}=b,T={children:new Map,linkType:v,locator:x};if(f.children.set(u,T),x){let q=Se.getSetWithDefault(o,x);q.add(m),o.set(x,q)}for(let q of b.children.keys())l(m,q,b,T,y)}else b.locator&&i.storedBuildState.delete(P.parseLocator(b.locator).locatorHash)};for(let[c,u]of r){let{linkType:g,locator:f}=u,h={children:new Map,linkType:g,locator:f};if(n.set(c,h),f){let p=Se.getSetWithDefault(o,u.locator);p.add(c),o.set(u.locator,p)}u.children.has(jr)&&l(c,jr,u,h,new Set)}return{locationTree:n,binSymlinks:s,locatorLocations:o,installChangedByUser:a}}function ele(r){let e=P.parseDescriptor(r);return P.isVirtualDescriptor(e)&&(e=P.devirtualizeDescriptor(e)),e.range.startsWith("link:")}async function K8e(r,e,t,{loadManifest:i}){let n=new Map;for(let[a,{locations:l}]of r){let c=ele(a)?null:await i(a,l[0]),u=new Map;if(c)for(let[g,f]of c.bin){let h=k.join(l[0],f);f!==""&&K.existsSync(h)&&u.set(g,f)}n.set(a,u)}let s=new Map,o=(a,l,c)=>{let u=new Map,g=k.contains(t,a);if(c.locator&&g!==null){let f=n.get(c.locator);for(let[h,p]of f){let m=k.join(a,H.toPortablePath(p));u.set(Jr(h),m)}for(let[h,p]of c.children){let m=k.join(a,h),y=o(m,m,p);y.size>0&&s.set(a,new Map([...s.get(a)||new Map,...y]))}}else for(let[f,h]of c.children){let p=o(k.join(a,f),l,h);for(let[m,y]of p)u.set(m,y)}return u};for(let[a,l]of e){let c=o(a,a,l);c.size>0&&s.set(a,new Map([...s.get(a)||new Map,...c]))}return s}var nle=(r,e)=>{if(!r||!e)return r===e;let t=P.parseLocator(r);P.isVirtualLocator(t)&&(t=P.devirtualizeLocator(t));let i=P.parseLocator(e);return P.isVirtualLocator(i)&&(i=P.devirtualizeLocator(i)),P.areLocatorsEqual(t,i)};function YL(r){return k.join(r.get("globalFolder"),"store")}async function N8e(r,e,{baseFs:t,project:i,report:n,loadManifest:s,realLocatorChecksums:o}){let a=k.join(i.cwd,jr),{locationTree:l,binSymlinks:c,locatorLocations:u,installChangedByUser:g}=M8e(r.locationTree,r.binSymlinks,r.mtimeMs,i),f=tle(e,{skipPrefix:i.cwd}),h=[],p=async({srcDir:_,dstDir:ne,linkType:ee,globalHardlinksStore:A,nmMode:oe,packageChecksum:ce})=>{let Z=(async()=>{try{ee===Qt.SOFT?(await K.mkdirPromise(k.dirname(ne),{recursive:!0}),await GL(k.resolve(_),ne)):await O8e(ne,_,{baseFs:t,globalHardlinksStore:A,nmMode:oe,packageChecksum:ce})}catch(O){throw O.message=`While persisting ${_} -> ${ne} ${O.message}`,O}finally{T.tick()}})().then(()=>h.splice(h.indexOf(Z),1));h.push(Z),h.length>rle&&await Promise.race(h)},m=async(_,ne,ee)=>{let A=(async()=>{let oe=async(ce,Z,O)=>{try{O.innerLoop||await K.mkdirPromise(Z,{recursive:!0});let L=await K.readdirPromise(ce,{withFileTypes:!0});for(let de of L){if(!O.innerLoop&&de.name===ib)continue;let Be=k.join(ce,de.name),je=k.join(Z,de.name);de.isDirectory()?(de.name!==jr||O&&O.innerLoop)&&(await K.mkdirPromise(je,{recursive:!0}),await oe(Be,je,te(N({},O),{innerLoop:!0}))):$.value===Ti.HARDLINKS_LOCAL||$.value===Ti.HARDLINKS_GLOBAL?await K.linkPromise(Be,je):await K.copyFilePromise(Be,je,VAe.default.constants.COPYFILE_FICLONE)}}catch(L){throw O.innerLoop||(L.message=`While cloning ${ce} -> ${Z} ${L.message}`),L}finally{O.innerLoop||T.tick()}};await oe(_,ne,ee)})().then(()=>h.splice(h.indexOf(A),1));h.push(A),h.length>rle&&await Promise.race(h)},y=async(_,ne,ee)=>{if(ee)for(let[A,oe]of ne.children){let ce=ee.children.get(A);await y(k.join(_,A),oe,ce)}else{ne.children.has(jr)&&await Ah(k.join(_,jr),{contentsOnly:!1});let A=k.basename(_)===jr&&f.has(k.join(k.dirname(_),k.sep));await Ah(_,{contentsOnly:_===a,allowSymlink:A})}};for(let[_,ne]of l){let ee=f.get(_);for(let[A,oe]of ne.children){if(A===".")continue;let ce=ee&&ee.children.get(A),Z=k.join(_,A);await y(Z,oe,ce)}}let b=async(_,ne,ee)=>{if(ee){nle(ne.locator,ee.locator)||await Ah(_,{contentsOnly:ne.linkType===Qt.HARD});for(let[A,oe]of ne.children){let ce=ee.children.get(A);await b(k.join(_,A),oe,ce)}}else{ne.children.has(jr)&&await Ah(k.join(_,jr),{contentsOnly:!0});let A=k.basename(_)===jr&&f.has(k.join(k.dirname(_),k.sep));await Ah(_,{contentsOnly:ne.linkType===Qt.HARD,allowSymlink:A})}};for(let[_,ne]of f){let ee=l.get(_);for(let[A,oe]of ne.children){if(A===".")continue;let ce=ee&&ee.children.get(A);await b(k.join(_,A),oe,ce)}}let v=new Map,x=[];for(let[_,ne]of u)for(let ee of ne){let{locationRoot:A,segments:oe}=nb(ee,{skipPrefix:i.cwd}),ce=f.get(A),Z=A;if(ce){for(let O of oe)if(Z=k.join(Z,O),ce=ce.children.get(O),!ce)break;if(ce){let O=nle(ce.locator,_),L=e.get(ce.locator),de=L.target,Be=Z,je=L.linkType;if(O)v.has(de)||v.set(de,Be);else if(de!==Be){let re=P.parseLocator(ce.locator);P.isVirtualLocator(re)&&(re=P.devirtualizeLocator(re)),x.push({srcDir:de,dstDir:Be,linkType:je,realLocatorHash:re.locatorHash})}}}}for(let[_,{locations:ne}]of e.entries())for(let ee of ne){let{locationRoot:A,segments:oe}=nb(ee,{skipPrefix:i.cwd}),ce=l.get(A),Z=f.get(A),O=A,L=e.get(_),de=P.parseLocator(_);P.isVirtualLocator(de)&&(de=P.devirtualizeLocator(de));let Be=de.locatorHash,je=L.target,re=ee;if(je===re)continue;let se=L.linkType;for(let be of oe)Z=Z.children.get(be);if(!ce)x.push({srcDir:je,dstDir:re,linkType:se,realLocatorHash:Be});else for(let be of oe)if(O=k.join(O,be),ce=ce.children.get(be),!ce){x.push({srcDir:je,dstDir:re,linkType:se,realLocatorHash:Be});break}}let T=Ji.progressViaCounter(x.length),q=n.reportProgress(T),Y=i.configuration.get("nmMode"),$={value:Y};try{let _=$.value===Ti.HARDLINKS_GLOBAL?`${YL(i.configuration)}/v1`:null;if(_&&!await K.existsPromise(_)){await K.mkdirpPromise(_);for(let ee=0;ee<256;ee++)await K.mkdirPromise(k.join(_,ee.toString(16).padStart(2,"0")))}for(let ee of x)(ee.linkType===Qt.SOFT||!v.has(ee.srcDir))&&(v.set(ee.srcDir,ee.dstDir),await p(te(N({},ee),{globalHardlinksStore:_,nmMode:$,packageChecksum:o.get(ee.realLocatorHash)||null})));await Promise.all(h),h.length=0;for(let ee of x){let A=v.get(ee.srcDir);ee.linkType!==Qt.SOFT&&ee.dstDir!==A&&await m(A,ee.dstDir,{nmMode:$})}await Promise.all(h),await K.mkdirPromise(a,{recursive:!0});let ne=await K8e(e,f,i.cwd,{loadManifest:s});await U8e(c,ne,i.cwd),await L8e(i,e,ne,$,{installChangedByUser:g}),Y==Ti.HARDLINKS_GLOBAL&&$.value==Ti.HARDLINKS_LOCAL&&n.reportWarningOnce(X.NM_HARDLINKS_MODE_DOWNGRADED,"'nmMode' has been downgraded to 'hardlinks-local' due to global cache and install folder being on different devices")}finally{q.stop()}}async function U8e(r,e,t){for(let i of r.keys()){if(k.contains(t,i)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${i}`);if(!e.has(i)){let n=k.join(i,jr,ib);await K.removePromise(n)}}for(let[i,n]of e){if(k.contains(t,i)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${i}`);let s=k.join(i,jr,ib),o=r.get(i)||new Map;await K.mkdirPromise(s,{recursive:!0});for(let a of o.keys())n.has(a)||(await K.removePromise(k.join(s,a)),process.platform==="win32"&&await K.removePromise(k.join(s,Jr(`${a}.cmd`))));for(let[a,l]of n){let c=o.get(a),u=k.join(s,a);c!==l&&(process.platform==="win32"?await(0,_Ae.default)(H.fromPortablePath(l),H.fromPortablePath(u),{createPwshFile:!1}):(await K.removePromise(u),await GL(l,u),k.contains(t,await K.realpathPromise(l))!==null&&await K.chmodPromise(l,493)))}}}var qL=class extends xu{constructor(){super(...arguments);this.mode="loose"}makeInstaller(e){return new sle(e)}},sle=class extends oh{constructor(){super(...arguments);this.mode="loose"}async transformPnpSettings(e){let t=new Wr({baseFs:new Is({libzip:await fn(),maxOpenFiles:80,readOnlyArchives:!0})}),i=NAe(e,this.opts.project.cwd,t),{tree:n,errors:s}=Om(i,{pnpifyFs:!1,project:this.opts.project});if(!n){for(let{messageName:u,text:g}of s)this.opts.report.reportError(u,g);return}let o=new Map;e.fallbackPool=o;let a=(u,g)=>{let f=P.parseLocator(g.locator),h=P.stringifyIdent(f);h===u?o.set(u,f.reference):o.set(u,[h,f.reference])},l=k.join(this.opts.project.cwd,kt.nodeModules),c=n.get(l);if(typeof c!="undefined"){if("target"in c)throw new Error("Assertion failed: Expected the root junction point to be a directory");for(let u of c.dirList){let g=k.join(l,u),f=n.get(g);if(typeof f=="undefined")throw new Error("Assertion failed: Expected the child to have been registered");if("target"in f)a(u,f);else for(let h of f.dirList){let p=k.join(g,h),m=n.get(p);if(typeof m=="undefined")throw new Error("Assertion failed: Expected the subchild to have been registered");if("target"in m)a(`${u}/${h}`,m);else throw new Error("Assertion failed: Expected the leaf junction to be a package")}}}}};var H8e={hooks:{cleanGlobalArtifacts:async r=>{let e=YL(r);await K.removePromise(e)}},configuration:{nmHoistingLimits:{description:"Prevent packages to be hoisted past specific levels",type:Ie.STRING,values:[Kn.WORKSPACES,Kn.DEPENDENCIES,Kn.NONE],default:Kn.NONE},nmMode:{description:'If set to "hardlinks-local" Yarn will utilize hardlinks to reduce disk space consumption inside "node_modules" directories. With "hardlinks-global" Yarn will use global content addressable storage to reduce "node_modules" size across all the projects using this option.',type:Ie.STRING,values:[Ti.CLASSIC,Ti.HARDLINKS_LOCAL,Ti.HARDLINKS_GLOBAL],default:Ti.CLASSIC},nmSelfReferences:{description:"If set to 'false' the workspace will not be allowed to require itself and corresponding self-referencing symlink will not be created",type:Ie.BOOLEAN,default:!0}},linkers:[HL,qL]},j8e=H8e;var qT={};ft(qT,{default:()=>V9e,npmConfigUtils:()=>br,npmHttpUtils:()=>zt,npmPublishUtils:()=>wh});var cle=ge(ri());var Cr="npm:";var zt={};ft(zt,{AuthType:()=>us,customPackageError:()=>q8e,del:()=>z8e,get:()=>bo,getIdentUrl:()=>Kl,handleInvalidAuthenticationError:()=>Ml,post:()=>J8e,put:()=>W8e});var Ale=ge(WC()),lle=ge(require("url"));var br={};ft(br,{RegistryType:()=>QA,getAuditRegistry:()=>G8e,getAuthConfiguration:()=>zL,getDefaultRegistry:()=>sb,getPublishRegistry:()=>ole,getRegistryConfiguration:()=>ale,getScopeConfiguration:()=>WL,getScopeRegistry:()=>SA,normalizeRegistry:()=>ma});var QA;(function(i){i.AUDIT_REGISTRY="npmAuditRegistry",i.FETCH_REGISTRY="npmRegistryServer",i.PUBLISH_REGISTRY="npmPublishRegistry"})(QA||(QA={}));function ma(r){return r.replace(/\/$/,"")}function G8e(r,{configuration:e}){let t=e.get(QA.AUDIT_REGISTRY);return t!==null?ma(t):ole(r,{configuration:e})}function ole(r,{configuration:e}){var t;return((t=r.publishConfig)==null?void 0:t.registry)?ma(r.publishConfig.registry):r.name?SA(r.name.scope,{configuration:e,type:QA.PUBLISH_REGISTRY}):sb({configuration:e,type:QA.PUBLISH_REGISTRY})}function SA(r,{configuration:e,type:t=QA.FETCH_REGISTRY}){let i=WL(r,{configuration:e});if(i===null)return sb({configuration:e,type:t});let n=i.get(t);return n===null?sb({configuration:e,type:t}):ma(n)}function sb({configuration:r,type:e=QA.FETCH_REGISTRY}){let t=r.get(e);return ma(t!==null?t:r.get(QA.FETCH_REGISTRY))}function ale(r,{configuration:e}){let t=e.get("npmRegistries"),i=ma(r),n=t.get(i);if(typeof n!="undefined")return n;let s=t.get(i.replace(/^[a-z]+:/,""));return typeof s!="undefined"?s:null}function WL(r,{configuration:e}){if(r===null)return null;let i=e.get("npmScopes").get(r);return i||null}function zL(r,{configuration:e,ident:t}){let i=t&&WL(t.scope,{configuration:e});return(i==null?void 0:i.get("npmAuthIdent"))||(i==null?void 0:i.get("npmAuthToken"))?i:ale(r,{configuration:e})||e}var us;(function(n){n[n.NO_AUTH=0]="NO_AUTH",n[n.BEST_EFFORT=1]="BEST_EFFORT",n[n.CONFIGURATION=2]="CONFIGURATION",n[n.ALWAYS_AUTH=3]="ALWAYS_AUTH"})(us||(us={}));async function Ml(r,{attemptedAs:e,registry:t,headers:i,configuration:n}){var s,o;if(ob(r))throw new ct(X.AUTHENTICATION_INVALID,"Invalid OTP token");if(((s=r.originalError)==null?void 0:s.name)==="HTTPError"&&((o=r.originalError)==null?void 0:o.response.statusCode)===401)throw new ct(X.AUTHENTICATION_INVALID,`Invalid authentication (${typeof e!="string"?`as ${await Y8e(t,i,{configuration:n})}`:`attempted as ${e}`})`)}function q8e(r){var e;return((e=r.response)==null?void 0:e.statusCode)===404?"Package not found":null}function Kl(r){return r.scope?`/@${r.scope}%2f${r.name}`:`/${r.name}`}async function bo(r,a){var l=a,{configuration:e,headers:t,ident:i,authType:n,registry:s}=l,o=Or(l,["configuration","headers","ident","authType","registry"]);if(i&&typeof s=="undefined"&&(s=SA(i.scope,{configuration:e})),i&&i.scope&&typeof n=="undefined"&&(n=1),typeof s!="string")throw new Error("Assertion failed: The registry should be a string");let c=await ab(s,{authType:n,configuration:e,ident:i});c&&(t=te(N({},t),{authorization:c}));try{return await ir.get(r.charAt(0)==="/"?`${s}${r}`:r,N({configuration:e,headers:t},o))}catch(u){throw await Ml(u,{registry:s,configuration:e,headers:t}),u}}async function J8e(r,e,u){var g=u,{attemptedAs:t,configuration:i,headers:n,ident:s,authType:o=3,registry:a,otp:l}=g,c=Or(g,["attemptedAs","configuration","headers","ident","authType","registry","otp"]);if(s&&typeof a=="undefined"&&(a=SA(s.scope,{configuration:i})),typeof a!="string")throw new Error("Assertion failed: The registry should be a string");let f=await ab(a,{authType:o,configuration:i,ident:s});f&&(n=te(N({},n),{authorization:f})),l&&(n=N(N({},n),lh(l)));try{return await ir.post(a+r,e,N({configuration:i,headers:n},c))}catch(h){if(!ob(h)||l)throw await Ml(h,{attemptedAs:t,registry:a,configuration:i,headers:n}),h;l=await _L();let p=N(N({},n),lh(l));try{return await ir.post(`${a}${r}`,e,N({configuration:i,headers:p},c))}catch(m){throw await Ml(m,{attemptedAs:t,registry:a,configuration:i,headers:n}),m}}}async function W8e(r,e,u){var g=u,{attemptedAs:t,configuration:i,headers:n,ident:s,authType:o=3,registry:a,otp:l}=g,c=Or(g,["attemptedAs","configuration","headers","ident","authType","registry","otp"]);if(s&&typeof a=="undefined"&&(a=SA(s.scope,{configuration:i})),typeof a!="string")throw new Error("Assertion failed: The registry should be a string");let f=await ab(a,{authType:o,configuration:i,ident:s});f&&(n=te(N({},n),{authorization:f})),l&&(n=N(N({},n),lh(l)));try{return await ir.put(a+r,e,N({configuration:i,headers:n},c))}catch(h){if(!ob(h))throw await Ml(h,{attemptedAs:t,registry:a,configuration:i,headers:n}),h;l=await _L();let p=N(N({},n),lh(l));try{return await ir.put(`${a}${r}`,e,N({configuration:i,headers:p},c))}catch(m){throw await Ml(m,{attemptedAs:t,registry:a,configuration:i,headers:n}),m}}}async function z8e(r,c){var u=c,{attemptedAs:e,configuration:t,headers:i,ident:n,authType:s=3,registry:o,otp:a}=u,l=Or(u,["attemptedAs","configuration","headers","ident","authType","registry","otp"]);if(n&&typeof o=="undefined"&&(o=SA(n.scope,{configuration:t})),typeof o!="string")throw new Error("Assertion failed: The registry should be a string");let g=await ab(o,{authType:s,configuration:t,ident:n});g&&(i=te(N({},i),{authorization:g})),a&&(i=N(N({},i),lh(a)));try{return await ir.del(o+r,N({configuration:t,headers:i},l))}catch(f){if(!ob(f)||a)throw await Ml(f,{attemptedAs:e,registry:o,configuration:t,headers:i}),f;a=await _L();let h=N(N({},i),lh(a));try{return await ir.del(`${o}${r}`,N({configuration:t,headers:h},l))}catch(p){throw await Ml(p,{attemptedAs:e,registry:o,configuration:t,headers:i}),p}}}async function ab(r,{authType:e=2,configuration:t,ident:i}){let n=zL(r,{configuration:t,ident:i}),s=_8e(n,e);if(!s)return null;let o=await t.reduceHook(a=>a.getNpmAuthenticationHeader,void 0,r,{configuration:t,ident:i});if(o)return o;if(n.get("npmAuthToken"))return`Bearer ${n.get("npmAuthToken")}`;if(n.get("npmAuthIdent")){let a=n.get("npmAuthIdent");return a.includes(":")?`Basic ${Buffer.from(a).toString("base64")}`:`Basic ${a}`}if(s&&e!==1)throw new ct(X.AUTHENTICATION_NOT_FOUND,"No authentication configured for request");return null}function _8e(r,e){switch(e){case 2:return r.get("npmAlwaysAuth");case 1:case 3:return!0;case 0:return!1;default:throw new Error("Unreachable")}}async function Y8e(r,e,{configuration:t}){var i;if(typeof e=="undefined"||typeof e.authorization=="undefined")return"an anonymous user";try{return(i=(await ir.get(new lle.URL(`${r}/-/whoami`).href,{configuration:t,headers:e,jsonResponse:!0})).username)!=null?i:"an unknown user"}catch{return"an unknown user"}}async function _L(){if(process.env.TEST_ENV)return process.env.TEST_NPM_2FA_TOKEN||"";let{otp:r}=await(0,Ale.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return r}function ob(r){var e,t;if(((e=r.originalError)==null?void 0:e.name)!=="HTTPError")return!1;try{return((t=r.originalError)==null?void 0:t.response.headers["www-authenticate"].split(/,\s*/).map(n=>n.toLowerCase())).includes("otp")}catch(i){return!1}}function lh(r){return{["npm-otp"]:r}}var VL=class{supports(e,t){if(!e.reference.startsWith(Cr))return!1;let{selector:i,params:n}=P.parseRange(e.reference);return!(!cle.default.valid(i)||n===null||typeof n.__archiveUrl!="string")}getLocalPath(e,t){return null}async fetch(e,t){let i=t.checksums.get(e.locatorHash)||null,[n,s,o]=await t.cache.fetchPackageFromCache(e,i,N({onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,`${P.prettyLocator(t.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck},t.cacheOptions));return{packageFs:n,releaseFs:s,prefixPath:P.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,t){let{params:i}=P.parseRange(e.reference);if(i===null||typeof i.__archiveUrl!="string")throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");let n=await bo(i.__archiveUrl,{configuration:t.project.configuration,ident:e});return await Bi.convertToZip(n,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:P.getIdentVendorPath(e),stripComponents:1})}};var XL=class{supportsDescriptor(e,t){return!(!e.range.startsWith(Cr)||!P.tryParseDescriptor(e.range.slice(Cr.length),!0))}supportsLocator(e,t){return!1}shouldPersistResolution(e,t){throw new Error("Unreachable")}bindDescriptor(e,t,i){return e}getResolutionDependencies(e,t){let i=P.parseDescriptor(e.range.slice(Cr.length),!0);return t.resolver.getResolutionDependencies(i,t)}async getCandidates(e,t,i){let n=P.parseDescriptor(e.range.slice(Cr.length),!0);return await i.resolver.getCandidates(n,t,i)}async getSatisfying(e,t,i){let n=P.parseDescriptor(e.range.slice(Cr.length),!0);return i.resolver.getSatisfying(n,t,i)}resolve(e,t){throw new Error("Unreachable")}};var ule=ge(ri()),gle=ge(require("url"));var Qo=class{supports(e,t){if(!e.reference.startsWith(Cr))return!1;let i=new gle.URL(e.reference);return!(!ule.default.valid(i.pathname)||i.searchParams.has("__archiveUrl"))}getLocalPath(e,t){return null}async fetch(e,t){let i=t.checksums.get(e.locatorHash)||null,[n,s,o]=await t.cache.fetchPackageFromCache(e,i,N({onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,`${P.prettyLocator(t.project.configuration,e)} can't be found in the cache and will be fetched from the remote registry`),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck},t.cacheOptions));return{packageFs:n,releaseFs:s,prefixPath:P.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,t){let i;try{i=await bo(Qo.getLocatorUrl(e),{configuration:t.project.configuration,ident:e})}catch(n){i=await bo(Qo.getLocatorUrl(e).replace(/%2f/g,"/"),{configuration:t.project.configuration,ident:e})}return await Bi.convertToZip(i,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:P.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,t,{configuration:i}){let n=SA(e.scope,{configuration:i}),s=Qo.getLocatorUrl(e);return t=t.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),n=n.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),t=t.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),t===n+s||t===n+s.replace(/%2f/g,"/")}static getLocatorUrl(e){let t=Wt.clean(e.reference.slice(Cr.length));if(t===null)throw new ct(X.RESOLVER_NOT_FOUND,"The npm semver resolver got selected, but the version isn't semver");return`${Kl(e)}/-/${e.name}-${t}.tgz`}};var fle=ge(ri());var Ab=P.makeIdent(null,"node-gyp"),V8e=/\b(node-gyp|prebuild-install)\b/,ZL=class{supportsDescriptor(e,t){return e.range.startsWith(Cr)?!!Wt.validRange(e.range.slice(Cr.length)):!1}supportsLocator(e,t){if(!e.reference.startsWith(Cr))return!1;let{selector:i}=P.parseRange(e.reference);return!!fle.default.valid(i)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,i){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,i){let n=Wt.validRange(e.range.slice(Cr.length));if(n===null)throw new Error(`Expected a valid range, got ${e.range.slice(Cr.length)}`);let s=await bo(Kl(e),{configuration:i.project.configuration,ident:e,jsonResponse:!0}),o=Se.mapAndFilter(Object.keys(s.versions),c=>{try{let u=new Wt.SemVer(c);if(n.test(u))return u}catch{}return Se.mapAndFilter.skip}),a=o.filter(c=>!s.versions[c.raw].deprecated),l=a.length>0?a:o;return l.sort((c,u)=>-c.compare(u)),l.map(c=>{let u=P.makeLocator(e,`${Cr}${c.raw}`),g=s.versions[c.raw].dist.tarball;return Qo.isConventionalTarballUrl(u,g,{configuration:i.project.configuration})?u:P.bindLocator(u,{__archiveUrl:g})})}async getSatisfying(e,t,i){let n=Wt.validRange(e.range.slice(Cr.length));if(n===null)throw new Error(`Expected a valid range, got ${e.range.slice(Cr.length)}`);return Se.mapAndFilter(t,s=>{try{let{selector:o}=P.parseRange(s,{requireProtocol:Cr}),a=new Wt.SemVer(o);if(n.test(a))return{reference:s,version:a}}catch{}return Se.mapAndFilter.skip}).sort((s,o)=>-s.version.compare(o.version)).map(({reference:s})=>P.makeLocator(e,s))}async resolve(e,t){let{selector:i}=P.parseRange(e.reference),n=Wt.clean(i);if(n===null)throw new ct(X.RESOLVER_NOT_FOUND,"The npm semver resolver got selected, but the version isn't semver");let s=await bo(Kl(e),{configuration:t.project.configuration,ident:e,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(s,"versions"))throw new ct(X.REMOTE_INVALID,'Registry returned invalid data for - missing "versions" field');if(!Object.prototype.hasOwnProperty.call(s.versions,n))throw new ct(X.REMOTE_NOT_FOUND,`Registry failed to return reference "${n}"`);let o=new At;if(o.load(s.versions[n]),!o.dependencies.has(Ab.identHash)&&!o.peerDependencies.has(Ab.identHash)){for(let a of o.scripts.values())if(a.match(V8e)){o.dependencies.set(Ab.identHash,P.makeDescriptor(Ab,"latest")),t.report.reportWarningOnce(X.NODE_GYP_INJECTED,`${P.prettyLocator(t.project.configuration,e)}: Implicit dependencies on node-gyp are discouraged`);break}}if(typeof o.raw.deprecated=="string"&&o.raw.deprecated!==""){let a=P.prettyLocator(t.project.configuration,e),l=o.raw.deprecated.match(/\S/)?`${a} is deprecated: ${o.raw.deprecated}`:`${a} is deprecated`;t.report.reportWarningOnce(X.DEPRECATED_PACKAGE,l)}return te(N({},e),{version:n,languageName:"node",linkType:Qt.HARD,conditions:o.getConditions(),dependencies:o.dependencies,peerDependencies:o.peerDependencies,dependenciesMeta:o.dependenciesMeta,peerDependenciesMeta:o.peerDependenciesMeta,bin:o.bin})}};var $L=class{supportsDescriptor(e,t){return!(!e.range.startsWith(Cr)||!zg.test(e.range.slice(Cr.length)))}supportsLocator(e,t){return!1}shouldPersistResolution(e,t){throw new Error("Unreachable")}bindDescriptor(e,t,i){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,i){let n=e.range.slice(Cr.length),s=await bo(Kl(e),{configuration:i.project.configuration,ident:e,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(s,"dist-tags"))throw new ct(X.REMOTE_INVALID,'Registry returned invalid data - missing "dist-tags" field');let o=s["dist-tags"];if(!Object.prototype.hasOwnProperty.call(o,n))throw new ct(X.REMOTE_NOT_FOUND,`Registry failed to return tag "${n}"`);let a=o[n],l=P.makeLocator(e,`${Cr}${a}`),c=s.versions[a].dist.tarball;return Qo.isConventionalTarballUrl(l,c,{configuration:i.project.configuration})?[l]:[P.bindLocator(l,{__archiveUrl:c})]}async getSatisfying(e,t,i){return null}async resolve(e,t){throw new Error("Unreachable")}};var wh={};ft(wh,{getGitHead:()=>z9e,makePublishBody:()=>W9e});var HT={};ft(HT,{default:()=>k9e,packUtils:()=>PA});var PA={};ft(PA,{genPackList:()=>Pb,genPackStream:()=>UT,genPackageManifest:()=>Hce,hasPackScripts:()=>MT,prepareForPack:()=>KT});var OT=ge(is()),Kce=ge(Mce()),Uce=ge(require("zlib")),m9e=["/package.json","/readme","/readme.*","/license","/license.*","/licence","/licence.*","/changelog","/changelog.*"],E9e=["/package.tgz",".github",".git",".hg","node_modules",".npmignore",".gitignore",".#*",".DS_Store"];async function MT(r){return!!(Zt.hasWorkspaceScript(r,"prepack")||Zt.hasWorkspaceScript(r,"postpack"))}async function KT(r,{report:e},t){await Zt.maybeExecuteWorkspaceLifecycleScript(r,"prepack",{report:e});try{let i=k.join(r.cwd,At.fileName);await K.existsPromise(i)&&await r.manifest.loadFile(i,{baseFs:K}),await t()}finally{await Zt.maybeExecuteWorkspaceLifecycleScript(r,"postpack",{report:e})}}async function UT(r,e){var s,o;typeof e=="undefined"&&(e=await Pb(r));let t=new Set;for(let a of(o=(s=r.manifest.publishConfig)==null?void 0:s.executableFiles)!=null?o:new Set)t.add(k.normalize(a));for(let a of r.manifest.bin.values())t.add(k.normalize(a));let i=Kce.default.pack();process.nextTick(async()=>{for(let a of e){let l=k.normalize(a),c=k.resolve(r.cwd,l),u=k.join("package",l),g=await K.lstatPromise(c),f={name:u,mtime:new Date(Rr.SAFE_TIME*1e3)},h=t.has(l)?493:420,p,m,y=new Promise((v,x)=>{p=v,m=x}),b=v=>{v?m(v):p()};if(g.isFile()){let v;l==="package.json"?v=Buffer.from(JSON.stringify(await Hce(r),null,2)):v=await K.readFilePromise(c),i.entry(te(N({},f),{mode:h,type:"file"}),v,b)}else g.isSymbolicLink()?i.entry(te(N({},f),{mode:h,type:"symlink",linkname:await K.readlinkPromise(c)}),b):b(new Error(`Unsupported file type ${g.mode} for ${H.fromPortablePath(l)}`));await y}i.finalize()});let n=(0,Uce.createGzip)();return i.pipe(n),n}async function Hce(r){let e=JSON.parse(JSON.stringify(r.manifest.raw));return await r.project.configuration.triggerHook(t=>t.beforeWorkspacePacking,r,e),e}async function Pb(r){var g,f,h,p,m,y,b,v;let e=r.project,t=e.configuration,i={accept:[],reject:[]};for(let x of E9e)i.reject.push(x);for(let x of m9e)i.accept.push(x);i.reject.push(t.get("rcFilename"));let n=x=>{if(x===null||!x.startsWith(`${r.cwd}/`))return;let T=k.relative(r.cwd,x),q=k.resolve(Me.root,T);i.reject.push(q)};n(k.resolve(e.cwd,t.get("lockfileFilename"))),n(t.get("cacheFolder")),n(t.get("globalFolder")),n(t.get("installStatePath")),n(t.get("virtualFolder")),n(t.get("yarnPath")),await t.triggerHook(x=>x.populateYarnPaths,e,x=>{n(x)});for(let x of e.workspaces){let T=k.relative(r.cwd,x.cwd);T!==""&&!T.match(/^(\.\.)?\//)&&i.reject.push(`/${T}`)}let s={accept:[],reject:[]},o=(f=(g=r.manifest.publishConfig)==null?void 0:g.main)!=null?f:r.manifest.main,a=(p=(h=r.manifest.publishConfig)==null?void 0:h.module)!=null?p:r.manifest.module,l=(y=(m=r.manifest.publishConfig)==null?void 0:m.browser)!=null?y:r.manifest.browser,c=(v=(b=r.manifest.publishConfig)==null?void 0:b.bin)!=null?v:r.manifest.bin;o!=null&&s.accept.push(k.resolve(Me.root,o)),a!=null&&s.accept.push(k.resolve(Me.root,a)),typeof l=="string"&&s.accept.push(k.resolve(Me.root,l));for(let x of c.values())s.accept.push(k.resolve(Me.root,x));if(l instanceof Map)for(let[x,T]of l.entries())s.accept.push(k.resolve(Me.root,x)),typeof T=="string"&&s.accept.push(k.resolve(Me.root,T));let u=r.manifest.files!==null;if(u){s.reject.push("/*");for(let x of r.manifest.files)jce(s.accept,x,{cwd:Me.root})}return await I9e(r.cwd,{hasExplicitFileList:u,globalList:i,ignoreList:s})}async function I9e(r,{hasExplicitFileList:e,globalList:t,ignoreList:i}){let n=[],s=new La(r),o=[[Me.root,[i]]];for(;o.length>0;){let[a,l]=o.pop(),c=await s.lstatPromise(a);if(!Yce(a,{globalList:t,ignoreLists:c.isDirectory()?null:l}))if(c.isDirectory()){let u=await s.readdirPromise(a),g=!1,f=!1;if(!e||a!==Me.root)for(let m of u)g=g||m===".gitignore",f=f||m===".npmignore";let h=f?await Gce(s,a,".npmignore"):g?await Gce(s,a,".gitignore"):null,p=h!==null?[h].concat(l):l;Yce(a,{globalList:t,ignoreLists:l})&&(p=[...l,{accept:[],reject:["**/*"]}]);for(let m of u)o.push([k.resolve(a,m),p])}else(c.isFile()||c.isSymbolicLink())&&n.push(k.relative(Me.root,a))}return n.sort()}async function Gce(r,e,t){let i={accept:[],reject:[]},n=await r.readFilePromise(k.join(e,t),"utf8");for(let s of n.split(/\n/g))jce(i.reject,s,{cwd:e});return i}function y9e(r,{cwd:e}){let t=r[0]==="!";return t&&(r=r.slice(1)),r.match(/\.{0,1}\//)&&(r=k.resolve(e,r)),t&&(r=`!${r}`),r}function jce(r,e,{cwd:t}){let i=e.trim();i===""||i[0]==="#"||r.push(y9e(i,{cwd:t}))}var gs;(function(i){i[i.None=0]="None",i[i.Match=1]="Match",i[i.NegatedMatch=2]="NegatedMatch"})(gs||(gs={}));function Yce(r,{globalList:e,ignoreLists:t}){let i=Db(r,e.accept);if(i!==0)return i===2;let n=Db(r,e.reject);if(n!==0)return n===1;if(t!==null)for(let s of t){let o=Db(r,s.accept);if(o!==0)return o===2;let a=Db(r,s.reject);if(a!==0)return a===1}return!1}function Db(r,e){let t=e,i=[];for(let n=0;n{await KT(i,{report:l},async()=>{l.reportJson({base:H.fromPortablePath(i.cwd)});let c=await Pb(i);for(let u of c)l.reportInfo(null,H.fromPortablePath(u)),l.reportJson({location:H.fromPortablePath(u)});if(!this.dryRun){let u=await UT(i,c),g=K.createWriteStream(s);u.pipe(g),await new Promise(f=>{g.on("finish",f)})}}),this.dryRun||(l.reportInfo(X.UNNAMED,`Package archive generated in ${ae.pretty(e,s,ae.Type.PATH)}`),l.reportJson({output:H.fromPortablePath(s)}))})).exitCode()}};rE.paths=[["pack"]],rE.usage=Re.Usage({description:"generate a tarball from the active workspace",details:"\n This command will turn the active workspace into a compressed archive suitable for publishing. The archive will by default be stored at the root of the workspace (`package.tgz`).\n\n If the `-o,---out` is set the archive will be created at the specified path. The `%s` and `%v` variables can be used within the path and will be respectively replaced by the package name and version.\n ",examples:[["Create an archive from the active workspace","yarn pack"],["List the files that would be made part of the workspace's archive","yarn pack --dry-run"],["Name and output the archive in a dedicated folder","yarn pack --out /artifacts/%s-%v.tgz"]]});var Jce=rE;function w9e(r,{workspace:e}){let t=r.replace("%s",B9e(e)).replace("%v",b9e(e));return H.toPortablePath(t)}function B9e(r){return r.manifest.name!==null?P.slugifyIdent(r.manifest.name):"package"}function b9e(r){return r.manifest.version!==null?r.manifest.version:"unknown"}var Q9e=["dependencies","devDependencies","peerDependencies"],S9e="workspace:",v9e=(r,e)=>{var i,n;e.publishConfig&&(e.publishConfig.main&&(e.main=e.publishConfig.main),e.publishConfig.browser&&(e.browser=e.publishConfig.browser),e.publishConfig.module&&(e.module=e.publishConfig.module),e.publishConfig.browser&&(e.browser=e.publishConfig.browser),e.publishConfig.exports&&(e.exports=e.publishConfig.exports),e.publishConfig.bin&&(e.bin=e.publishConfig.bin));let t=r.project;for(let s of Q9e)for(let o of r.manifest.getForScope(s).values()){let a=t.tryWorkspaceByDescriptor(o),l=P.parseRange(o.range);if(l.protocol===S9e)if(a===null){if(t.tryWorkspaceByIdent(o)===null)throw new ct(X.WORKSPACE_NOT_FOUND,`${P.prettyDescriptor(t.configuration,o)}: No local workspace found for this range`)}else{let c;P.areDescriptorsEqual(o,a.anchoredDescriptor)||l.selector==="*"?c=(i=a.manifest.version)!=null?i:"0.0.0":l.selector==="~"||l.selector==="^"?c=`${l.selector}${(n=a.manifest.version)!=null?n:"0.0.0"}`:c=l.selector;let u=s==="dependencies"?P.makeDescriptor(o,"unknown"):null,g=u!==null&&r.manifest.ensureDependencyMeta(u).optional?"optionalDependencies":s;e[g][P.stringifyIdent(o)]=c}}},x9e={hooks:{beforeWorkspacePacking:v9e},commands:[Jce]},k9e=x9e;var tue=ge(require("crypto")),rue=ge(eue()),iue=ge(require("url"));async function W9e(r,e,{access:t,tag:i,registry:n,gitHead:s}){let o=r.project.configuration,a=r.manifest.name,l=r.manifest.version,c=P.stringifyIdent(a),u=(0,tue.createHash)("sha1").update(e).digest("hex"),g=rue.default.fromData(e).toString();typeof t=="undefined"&&(r.manifest.publishConfig&&typeof r.manifest.publishConfig.access=="string"?t=r.manifest.publishConfig.access:o.get("npmPublishAccess")!==null?t=o.get("npmPublishAccess"):a.scope?t="restricted":t="public");let f=await PA.genPackageManifest(r),h=`${c}-${l}.tgz`,p=new iue.URL(`${ma(n)}/${c}/-/${h}`);return{_id:c,_attachments:{[h]:{content_type:"application/octet-stream",data:e.toString("base64"),length:e.length}},name:c,access:t,["dist-tags"]:{[i]:l},versions:{[l]:te(N({},f),{_id:`${c}@${l}`,name:c,version:l,gitHead:s,dist:{shasum:u,integrity:g,tarball:p.toString()}})}}}async function z9e(r){try{let{stdout:e}=await Nr.execvp("git",["rev-parse","--revs-only","HEAD"],{cwd:r});return e.trim()===""?void 0:e.trim()}catch{return}}var JT={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:Ie.BOOLEAN,default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:Ie.SECRET,default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:Ie.SECRET,default:null}},nue={npmAuditRegistry:{description:"Registry to query for audit reports",type:Ie.STRING,default:null},npmPublishRegistry:{description:"Registry to push packages to",type:Ie.STRING,default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:Ie.STRING,default:"https://registry.yarnpkg.com"}},_9e={configuration:te(N(N({},JT),nue),{npmScopes:{description:"Settings per package scope",type:Ie.MAP,valueDefinition:{description:"",type:Ie.SHAPE,properties:N(N({},JT),nue)}},npmRegistries:{description:"Settings per registry",type:Ie.MAP,normalizeKeys:ma,valueDefinition:{description:"",type:Ie.SHAPE,properties:N({},JT)}}}),fetchers:[VL,Qo],resolvers:[XL,ZL,$L]},V9e=_9e;var VT={};ft(VT,{default:()=>s_e});ys();var Ba;(function(i){i.All="all",i.Production="production",i.Development="development"})(Ba||(Ba={}));var vo;(function(s){s.Info="info",s.Low="low",s.Moderate="moderate",s.High="high",s.Critical="critical"})(vo||(vo={}));var Rb=[vo.Info,vo.Low,vo.Moderate,vo.High,vo.Critical];function sue(r,e){let t=[],i=new Set,n=o=>{i.has(o)||(i.add(o),t.push(o))};for(let o of e)n(o);let s=new Set;for(;t.length>0;){let o=t.shift(),a=r.storedResolutions.get(o);if(typeof a=="undefined")throw new Error("Assertion failed: Expected the resolution to have been registered");let l=r.storedPackages.get(a);if(!!l){s.add(o);for(let c of l.dependencies.values())n(c.descriptorHash)}}return s}function X9e(r,e){return new Set([...r].filter(t=>!e.has(t)))}function Z9e(r,e,{all:t}){let i=t?r.workspaces:[e],n=i.map(f=>f.manifest),s=new Set(n.map(f=>[...f.dependencies].map(([h,p])=>h)).flat()),o=new Set(n.map(f=>[...f.devDependencies].map(([h,p])=>h)).flat()),a=i.map(f=>[...f.dependencies.values()]).flat(),l=a.filter(f=>s.has(f.identHash)).map(f=>f.descriptorHash),c=a.filter(f=>o.has(f.identHash)).map(f=>f.descriptorHash),u=sue(r,l),g=sue(r,c);return X9e(g,u)}function oue(r){let e={};for(let t of r)e[P.stringifyIdent(t)]=P.parseRange(t.range).selector;return e}function aue(r){if(typeof r=="undefined")return new Set;let e=Rb.indexOf(r),t=Rb.slice(e);return new Set(t)}function $9e(r,e){let t=aue(e),i={};for(let n of t)i[n]=r[n];return i}function Aue(r,e){var i;let t=$9e(r,e);for(let n of Object.keys(t))if((i=t[n])!=null?i:0>0)return!0;return!1}function lue(r,e){var s;let t={},i={children:t},n=Object.values(r.advisories);if(e!=null){let o=aue(e);n=n.filter(a=>o.has(a.severity))}for(let o of Se.sortMap(n,a=>a.module_name))t[o.module_name]={label:o.module_name,value:ae.tuple(ae.Type.RANGE,o.findings.map(a=>a.version).join(", ")),children:{Issue:{label:"Issue",value:ae.tuple(ae.Type.NO_HINT,o.title)},URL:{label:"URL",value:ae.tuple(ae.Type.URL,o.url)},Severity:{label:"Severity",value:ae.tuple(ae.Type.NO_HINT,o.severity)},["Vulnerable Versions"]:{label:"Vulnerable Versions",value:ae.tuple(ae.Type.RANGE,o.vulnerable_versions)},["Patched Versions"]:{label:"Patched Versions",value:ae.tuple(ae.Type.RANGE,o.patched_versions)},Via:{label:"Via",value:ae.tuple(ae.Type.NO_HINT,Array.from(new Set(o.findings.map(a=>a.paths).flat().map(a=>a.split(">")[0]))).join(", "))},Recommendation:{label:"Recommendation",value:ae.tuple(ae.Type.NO_HINT,(s=o.recommendation)==null?void 0:s.replace(/\n/g," "))}}};return i}function cue(r,e,{all:t,environment:i}){let n=t?r.workspaces:[e],s=[Ba.All,Ba.Production].includes(i),o=[];if(s)for(let c of n)for(let u of c.manifest.dependencies.values())o.push(u);let a=[Ba.All,Ba.Development].includes(i),l=[];if(a)for(let c of n)for(let u of c.manifest.devDependencies.values())l.push(u);return oue([...o,...l].filter(c=>P.parseRange(c.range).protocol===null))}function uue(r,e,{all:t}){var s;let i=Z9e(r,e,{all:t}),n={};for(let o of r.storedPackages.values())n[P.stringifyIdent(o)]={version:(s=o.version)!=null?s:"0.0.0",integrity:o.identHash,requires:oue(o.dependencies.values()),dev:i.has(P.convertLocatorToDescriptor(o).descriptorHash)};return n}var sE=class extends Le{constructor(){super(...arguments);this.all=J.Boolean("-A,--all",!1,{description:"Audit dependencies from all workspaces"});this.recursive=J.Boolean("-R,--recursive",!1,{description:"Audit transitive dependencies as well"});this.environment=J.String("--environment",Ba.All,{description:"Which environments to cover",validator:nn(Ba)});this.json=J.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.severity=J.String("--severity",vo.Info,{description:"Minimal severity requested for packages to be displayed",validator:nn(vo)})}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd);if(!i)throw new ht(t.cwd,this.context.cwd);await t.restoreInstallState();let n=cue(t,i,{all:this.all,environment:this.environment}),s=uue(t,i,{all:this.all});if(!this.recursive)for(let f of Object.keys(s))Object.prototype.hasOwnProperty.call(n,f)?s[f].requires={}:delete s[f];let o={requires:n,dependencies:s},a=br.getAuditRegistry(i.manifest,{configuration:e}),l,c=await pA.start({configuration:e,stdout:this.context.stdout},async()=>{l=await zt.post("/-/npm/v1/security/audits/quick",o,{authType:zt.AuthType.BEST_EFFORT,configuration:e,jsonResponse:!0,registry:a})});if(c.hasErrors())return c.exitCode();let u=Aue(l.metadata.vulnerabilities,this.severity);return!this.json&&u?(ls.emitTree(lue(l,this.severity),{configuration:e,json:this.json,stdout:this.context.stdout,separators:2}),1):(await Je.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async f=>{f.reportJson(l),u||f.reportInfo(X.EXCEPTION,"No audit suggestions")})).exitCode()}};sE.paths=[["npm","audit"]],sE.usage=Re.Usage({description:"perform a vulnerability audit against the installed packages",details:` + This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths). + + For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \`-A,--all\`. To extend this search to both direct and transitive dependencies, use \`-R,--recursive\`. + + Applying the \`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${Rb.map(e=>`\`${e}\``).join(", ")}. + + If the \`--json\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages. + + To understand the dependency tree requiring vulnerable packages, check the raw report with the \`--json\` flag or use \`yarn why \` to get more information as to who depends on them. + `,examples:[["Checks for known security issues with the installed packages. The output is a list of known issues.","yarn npm audit"],["Audit dependencies in all workspaces","yarn npm audit --all"],["Limit auditing to `dependencies` (excludes `devDependencies`)","yarn npm audit --environment production"],["Show audit report as valid JSON","yarn npm audit --json"],["Audit all direct and transitive dependencies","yarn npm audit --recursive"],["Output moderate (or more severe) vulnerabilities","yarn npm audit --severity moderate"]]});var gue=sE;var WT=ge(ri()),zT=ge(require("util")),oE=class extends Le{constructor(){super(...arguments);this.fields=J.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=J.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=J.Rest()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t}=await ze.find(e,this.context.cwd),i=typeof this.fields!="undefined"?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,n=[],s=!1,o=await Je.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async a=>{for(let l of this.packages){let c;if(l==="."){let x=t.topLevelWorkspace;if(!x.manifest.name)throw new Pe(`Missing ${ae.pretty(e,"name",ae.Type.CODE)} field in ${H.fromPortablePath(k.join(x.cwd,kt.manifest))}`);c=P.makeDescriptor(x.manifest.name,"unknown")}else c=P.parseDescriptor(l);let u=zt.getIdentUrl(c),g=_T(await zt.get(u,{configuration:e,ident:c,jsonResponse:!0,customErrorMessage:zt.customPackageError})),f=Object.keys(g.versions).sort(WT.default.compareLoose),p=g["dist-tags"].latest||f[f.length-1],m=Wt.validRange(c.range);if(m){let x=WT.default.maxSatisfying(f,m);x!==null?p=x:(a.reportWarning(X.UNNAMED,`Unmet range ${P.prettyRange(e,c.range)}; falling back to the latest version`),s=!0)}else Object.prototype.hasOwnProperty.call(g["dist-tags"],c.range)?p=g["dist-tags"][c.range]:c.range!=="unknown"&&(a.reportWarning(X.UNNAMED,`Unknown tag ${P.prettyRange(e,c.range)}; falling back to the latest version`),s=!0);let y=g.versions[p],b=te(N(N({},g),y),{version:p,versions:f}),v;if(i!==null){v={};for(let x of i){let T=b[x];if(typeof T!="undefined")v[x]=T;else{a.reportWarning(X.EXCEPTION,`The ${ae.pretty(e,x,ae.Type.CODE)} field doesn't exist inside ${P.prettyIdent(e,c)}'s information`),s=!0;continue}}}else this.json||(delete b.dist,delete b.readme,delete b.users),v=b;a.reportJson(v),this.json||n.push(v)}});zT.inspect.styles.name="cyan";for(let a of n)(a!==n[0]||s)&&this.context.stdout.write(` +`),this.context.stdout.write(`${(0,zT.inspect)(a,{depth:Infinity,colors:!0,compact:!1})} +`);return o.exitCode()}};oE.paths=[["npm","info"]],oE.usage=Re.Usage({category:"Npm-related commands",description:"show information about a package",details:"\n This command fetches information about a package from the npm registry and prints it in a tree format.\n\n The package does not have to be installed locally, but needs to have been published (in particular, local changes will be ignored even for workspaces).\n\n Append `@` to the package argument to provide information specific to the latest version that satisfies the range or to the corresponding tagged version. If the range is invalid or if there is no version satisfying the range, the command will print a warning and fall back to the latest version.\n\n If the `-f,--fields` option is set, it's a comma-separated list of fields which will be used to only display part of the package information.\n\n By default, this command won't return the `dist`, `readme`, and `users` fields, since they are often very long. To explicitly request those fields, explicitly list them with the `--fields` flag or request the output in JSON mode.\n ",examples:[["Show all available information about react (except the `dist`, `readme`, and `users` fields)","yarn npm info react"],["Show all available information about react as valid JSON (including the `dist`, `readme`, and `users` fields)","yarn npm info react --json"],["Show all available information about react@16.12.0","yarn npm info react@16.12.0"],["Show all available information about react@next","yarn npm info react@next"],["Show the description of react","yarn npm info react --fields description"],["Show all available versions of react","yarn npm info react --fields versions"],["Show the readme of react","yarn npm info react --fields readme"],["Show a few fields of react","yarn npm info react --fields homepage,repository"]]});var fue=oE;function _T(r){if(Array.isArray(r)){let e=[];for(let t of r)t=_T(t),t&&e.push(t);return e}else if(typeof r=="object"&&r!==null){let e={};for(let t of Object.keys(r)){if(t.startsWith("_"))continue;let i=_T(r[t]);i&&(e[t]=i)}return e}else return r||null}var hue=ge(WC()),aE=class extends Le{constructor(){super(...arguments);this.scope=J.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=J.Boolean("--publish",!1,{description:"Login to the publish registry"})}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),t=await Fb({configuration:e,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Je.start({configuration:e,stdout:this.context.stdout},async n=>{let s=await t_e({registry:t,report:n,stdin:this.context.stdin,stdout:this.context.stdout}),o=`/-/user/org.couchdb.user:${encodeURIComponent(s.name)}`,a=await zt.put(o,s,{attemptedAs:s.name,configuration:e,registry:t,jsonResponse:!0,authType:zt.AuthType.NO_AUTH});return await e_e(t,a.token,{configuration:e,scope:this.scope}),n.reportInfo(X.UNNAMED,"Successfully logged in")})).exitCode()}};aE.paths=[["npm","login"]],aE.usage=Re.Usage({category:"Npm-related commands",description:"store new login info to access the npm registry",details:"\n This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\n\n Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n ",examples:[["Login to the default registry","yarn npm login"],["Login to the registry linked to the @my-scope registry","yarn npm login --scope my-scope"],["Login to the publish registry for the current package","yarn npm login --publish"]]});var pue=aE;async function Fb({scope:r,publish:e,configuration:t,cwd:i}){return r&&e?br.getScopeRegistry(r,{configuration:t,type:br.RegistryType.PUBLISH_REGISTRY}):r?br.getScopeRegistry(r,{configuration:t}):e?br.getPublishRegistry((await Wf(t,i)).manifest,{configuration:t}):br.getDefaultRegistry({configuration:t})}async function e_e(r,e,{configuration:t,scope:i}){let n=o=>a=>{let l=Se.isIndexableObject(a)?a:{},c=l[o],u=Se.isIndexableObject(c)?c:{};return te(N({},l),{[o]:te(N({},u),{npmAuthToken:e})})},s=i?{npmScopes:n(i)}:{npmRegistries:n(r)};return await ye.updateHomeConfiguration(s)}async function t_e({registry:r,report:e,stdin:t,stdout:i}){if(process.env.TEST_ENV)return{name:process.env.TEST_NPM_USER||"",password:process.env.TEST_NPM_PASSWORD||""};e.reportInfo(X.UNNAMED,`Logging in to ${r}`);let n=!1;r.match(/^https:\/\/npm\.pkg\.github\.com(\/|$)/)&&(e.reportInfo(X.UNNAMED,"You seem to be using the GitHub Package Registry. Tokens must be generated with the 'repo', 'write:packages', and 'read:packages' permissions."),n=!0),e.reportSeparator();let{username:s,password:o}=await(0,hue.prompt)([{type:"input",name:"username",message:"Username:",required:!0,onCancel:()=>process.exit(130),stdin:t,stdout:i},{type:"password",name:"password",message:n?"Token:":"Password:",required:!0,onCancel:()=>process.exit(130),stdin:t,stdout:i}]);return e.reportSeparator(),{name:s,password:o}}var Bh=new Set(["npmAuthIdent","npmAuthToken"]),AE=class extends Le{constructor(){super(...arguments);this.scope=J.String("-s,--scope",{description:"Logout of the registry configured for a given scope"});this.publish=J.Boolean("--publish",!1,{description:"Logout of the publish registry"});this.all=J.Boolean("-A,--all",!1,{description:"Logout of all registries"})}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),t=async()=>{var l;let n=await Fb({configuration:e,cwd:this.context.cwd,publish:this.publish,scope:this.scope}),s=await ye.find(this.context.cwd,this.context.plugins),o=P.makeIdent((l=this.scope)!=null?l:null,"pkg");return!br.getAuthConfiguration(n,{configuration:s,ident:o}).get("npmAuthToken")};return(await Je.start({configuration:e,stdout:this.context.stdout},async n=>{if(this.all&&(await r_e(),n.reportInfo(X.UNNAMED,"Successfully logged out from everything")),this.scope){await due("npmScopes",this.scope),await t()?n.reportInfo(X.UNNAMED,`Successfully logged out from ${this.scope}`):n.reportWarning(X.UNNAMED,"Scope authentication settings removed, but some other ones settings still apply to it");return}let s=await Fb({configuration:e,cwd:this.context.cwd,publish:this.publish});await due("npmRegistries",s),await t()?n.reportInfo(X.UNNAMED,`Successfully logged out from ${s}`):n.reportWarning(X.UNNAMED,"Registry authentication settings removed, but some other ones settings still apply to it")})).exitCode()}};AE.paths=[["npm","logout"]],AE.usage=Re.Usage({category:"Npm-related commands",description:"logout of the npm registry",details:"\n This command will log you out by modifying your local configuration (in your home folder, never in the project itself) to delete all credentials linked to a registry.\n\n Adding the `-s,--scope` flag will cause the deletion to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the deletion to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n\n Adding the `-A,--all` flag will cause the deletion to be done against all registries and scopes.\n ",examples:[["Logout of the default registry","yarn npm logout"],["Logout of the @my-scope scope","yarn npm logout --scope my-scope"],["Logout of the publish registry for the current package","yarn npm logout --publish"],["Logout of all registries","yarn npm logout --all"]]});var Cue=AE;function i_e(r,e){let t=r[e];if(!Se.isIndexableObject(t))return!1;let i=new Set(Object.keys(t));if([...Bh].every(s=>!i.has(s)))return!1;for(let s of Bh)i.delete(s);if(i.size===0)return r[e]=void 0,!0;let n=N({},t);for(let s of Bh)delete n[s];return r[e]=n,!0}async function r_e(){let r=e=>{let t=!1,i=Se.isIndexableObject(e)?N({},e):{};i.npmAuthToken&&(delete i.npmAuthToken,t=!0);for(let n of Object.keys(i))i_e(i,n)&&(t=!0);if(Object.keys(i).length!==0)return t?i:e};return await ye.updateHomeConfiguration({npmRegistries:r,npmScopes:r})}async function due(r,e){return await ye.updateHomeConfiguration({[r]:t=>{let i=Se.isIndexableObject(t)?t:{};if(!Object.prototype.hasOwnProperty.call(i,e))return t;let n=i[e],s=Se.isIndexableObject(n)?n:{},o=new Set(Object.keys(s));if([...Bh].every(l=>!o.has(l)))return t;for(let l of Bh)o.delete(l);if(o.size===0)return Object.keys(i).length===1?void 0:te(N({},i),{[e]:void 0});let a={};for(let l of Bh)a[l]=void 0;return te(N({},i),{[e]:N(N({},s),a)})}})}var lE=class extends Le{constructor(){super(...arguments);this.access=J.String("--access",{description:"The access for the published package (public or restricted)"});this.tag=J.String("--tag","latest",{description:"The tag on the registry that the package should be attached to"});this.tolerateRepublish=J.Boolean("--tolerate-republish",!1,{description:"Warn and exit when republishing an already existing version of a package"});this.otp=J.String("--otp",{description:"The OTP token to use with the command"})}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd);if(!i)throw new ht(t.cwd,this.context.cwd);if(i.manifest.private)throw new Pe("Private workspaces cannot be published");if(i.manifest.name===null||i.manifest.version===null)throw new Pe("Workspaces must have valid names and versions to be published on an external registry");await t.restoreInstallState();let n=i.manifest.name,s=i.manifest.version,o=br.getPublishRegistry(i.manifest,{configuration:e});return(await Je.start({configuration:e,stdout:this.context.stdout},async l=>{var c,u;if(this.tolerateRepublish)try{let g=await zt.get(zt.getIdentUrl(n),{configuration:e,registry:o,ident:n,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(g,"versions"))throw new ct(X.REMOTE_INVALID,'Registry returned invalid data for - missing "versions" field');if(Object.prototype.hasOwnProperty.call(g.versions,s)){l.reportWarning(X.UNNAMED,`Registry already knows about version ${s}; skipping.`);return}}catch(g){if(((u=(c=g.originalError)==null?void 0:c.response)==null?void 0:u.statusCode)!==404)throw g}await Zt.maybeExecuteWorkspaceLifecycleScript(i,"prepublish",{report:l}),await PA.prepareForPack(i,{report:l},async()=>{let g=await PA.genPackList(i);for(let y of g)l.reportInfo(null,y);let f=await PA.genPackStream(i,g),h=await Se.bufferStream(f),p=await wh.getGitHead(i.cwd),m=await wh.makePublishBody(i,h,{access:this.access,tag:this.tag,registry:o,gitHead:p});await zt.put(zt.getIdentUrl(n),m,{configuration:e,registry:o,ident:n,otp:this.otp,jsonResponse:!0})}),l.reportInfo(X.UNNAMED,"Package archive published")})).exitCode()}};lE.paths=[["npm","publish"]],lE.usage=Re.Usage({category:"Npm-related commands",description:"publish the active workspace to the npm registry",details:'\n This command will pack the active workspace into a fresh archive and upload it to the npm registry.\n\n The package will by default be attached to the `latest` tag on the registry, but this behavior can be overriden by using the `--tag` option.\n\n Note that for legacy reasons scoped packages are by default published with an access set to `restricted` (aka "private packages"). This requires you to register for a paid npm plan. In case you simply wish to publish a public scoped package to the registry (for free), just add the `--access public` flag. This behavior can be enabled by default through the `npmPublishAccess` settings.\n ',examples:[["Publish the active workspace","yarn npm publish"]]});var mue=lE;var Iue=ge(ri());var cE=class extends Le{constructor(){super(...arguments);this.json=J.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.package=J.String({required:!1})}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd),n;if(typeof this.package!="undefined")n=P.parseIdent(this.package);else{if(!i)throw new ht(t.cwd,this.context.cwd);if(!i.manifest.name)throw new Pe(`Missing 'name' field in ${H.fromPortablePath(k.join(i.cwd,kt.manifest))}`);n=i.manifest.name}let s=await uE(n,e),a={children:Se.sortMap(Object.entries(s),([l])=>l).map(([l,c])=>({value:ae.tuple(ae.Type.RESOLUTION,{descriptor:P.makeDescriptor(n,l),locator:P.makeLocator(n,c)})}))};return ls.emitTree(a,{configuration:e,json:this.json,stdout:this.context.stdout})}};cE.paths=[["npm","tag","list"]],cE.usage=Re.Usage({category:"Npm-related commands",description:"list all dist-tags of a package",details:` + This command will list all tags of a package from the npm registry. + + If the package is not specified, Yarn will default to the current workspace. + `,examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]});var Eue=cE;async function uE(r,e){let t=`/-/package${zt.getIdentUrl(r)}/dist-tags`;return zt.get(t,{configuration:e,ident:r,jsonResponse:!0,customErrorMessage:zt.customPackageError})}var gE=class extends Le{constructor(){super(...arguments);this.package=J.String();this.tag=J.String()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd);if(!i)throw new ht(t.cwd,this.context.cwd);let n=P.parseDescriptor(this.package,!0),s=n.range;if(!Iue.default.valid(s))throw new Pe(`The range ${ae.pretty(e,n.range,ae.Type.RANGE)} must be a valid semver version`);let o=br.getPublishRegistry(i.manifest,{configuration:e}),a=ae.pretty(e,n,ae.Type.IDENT),l=ae.pretty(e,s,ae.Type.RANGE),c=ae.pretty(e,this.tag,ae.Type.CODE);return(await Je.start({configuration:e,stdout:this.context.stdout},async g=>{let f=await uE(n,e);Object.prototype.hasOwnProperty.call(f,this.tag)&&f[this.tag]===s&&g.reportWarning(X.UNNAMED,`Tag ${c} is already set to version ${l}`);let h=`/-/package${zt.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await zt.put(h,s,{configuration:e,registry:o,ident:n,jsonRequest:!0,jsonResponse:!0}),g.reportInfo(X.UNNAMED,`Tag ${c} added to version ${l} of package ${a}`)})).exitCode()}};gE.paths=[["npm","tag","add"]],gE.usage=Re.Usage({category:"Npm-related commands",description:"add a tag for a specific version of a package",details:` + This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten. + `,examples:[["Add a `beta` tag for version `2.3.4-beta.4` of package `my-pkg`","yarn npm tag add my-pkg@2.3.4-beta.4 beta"]]});var yue=gE;var fE=class extends Le{constructor(){super(...arguments);this.package=J.String();this.tag=J.String()}async execute(){if(this.tag==="latest")throw new Pe("The 'latest' tag cannot be removed.");let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd);if(!i)throw new ht(t.cwd,this.context.cwd);let n=P.parseIdent(this.package),s=br.getPublishRegistry(i.manifest,{configuration:e}),o=ae.pretty(e,this.tag,ae.Type.CODE),a=ae.pretty(e,n,ae.Type.IDENT),l=await uE(n,e);if(!Object.prototype.hasOwnProperty.call(l,this.tag))throw new Pe(`${o} is not a tag of package ${a}`);return(await Je.start({configuration:e,stdout:this.context.stdout},async u=>{let g=`/-/package${zt.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await zt.del(g,{configuration:e,registry:s,ident:n,jsonResponse:!0}),u.reportInfo(X.UNNAMED,`Tag ${o} removed from package ${a}`)})).exitCode()}};fE.paths=[["npm","tag","remove"]],fE.usage=Re.Usage({category:"Npm-related commands",description:"remove a tag from a package",details:` + This command will remove a tag from a package from the npm registry. + `,examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]});var wue=fE;var hE=class extends Le{constructor(){super(...arguments);this.scope=J.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=J.Boolean("--publish",!1,{description:"Print username for the publish registry"})}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),t;return this.scope&&this.publish?t=br.getScopeRegistry(this.scope,{configuration:e,type:br.RegistryType.PUBLISH_REGISTRY}):this.scope?t=br.getScopeRegistry(this.scope,{configuration:e}):this.publish?t=br.getPublishRegistry((await Wf(e,this.context.cwd)).manifest,{configuration:e}):t=br.getDefaultRegistry({configuration:e}),(await Je.start({configuration:e,stdout:this.context.stdout},async n=>{var o,a;let s;try{s=await zt.get("/-/whoami",{configuration:e,registry:t,authType:zt.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?P.makeIdent(this.scope,""):void 0})}catch(l){if(((o=l.response)==null?void 0:o.statusCode)===401||((a=l.response)==null?void 0:a.statusCode)===403){n.reportError(X.AUTHENTICATION_INVALID,"Authentication failed - your credentials may have expired");return}else throw l}n.reportInfo(X.UNNAMED,s.username)})).exitCode()}};hE.paths=[["npm","whoami"]],hE.usage=Re.Usage({category:"Npm-related commands",description:"display the name of the authenticated user",details:"\n Print the username associated with the current authentication settings to the standard output.\n\n When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\n\n When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\n ",examples:[["Print username for the default registry","yarn npm whoami"],["Print username for the registry on a given scope","yarn npm whoami --scope company"]]});var Bue=hE;var n_e={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:Ie.STRING,default:null}},commands:[gue,fue,pue,Cue,mue,yue,Eue,wue,Bue]},s_e=n_e;var nO={};ft(nO,{default:()=>y_e,patchUtils:()=>XT});var XT={};ft(XT,{applyPatchFile:()=>Tb,diffFolders:()=>tO,extractPackageToDisk:()=>eO,extractPatchFlags:()=>Due,isParentRequired:()=>$T,loadPatchFiles:()=>mE,makeDescriptor:()=>m_e,makeLocator:()=>ZT,parseDescriptor:()=>dE,parseLocator:()=>CE,parsePatchFile:()=>Lb});var pE=class extends Error{constructor(e,t){super(`Cannot apply hunk #${e+1}`);this.hunk=t}};var o_e=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function bh(r){return k.relative(Me.root,k.resolve(Me.root,H.toPortablePath(r)))}function a_e(r){let e=r.trim().match(o_e);if(!e)throw new Error(`Bad header line: '${r}'`);return{original:{start:Math.max(Number(e[1]),1),length:Number(e[3]||1)},patched:{start:Math.max(Number(e[4]),1),length:Number(e[6]||1)}}}var A_e=420,l_e=493,Zr;(function(i){i.Context="context",i.Insertion="insertion",i.Deletion="deletion"})(Zr||(Zr={}));var bue=()=>({semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null}),c_e=r=>({header:a_e(r),parts:[]}),u_e={["@"]:"header",["-"]:Zr.Deletion,["+"]:Zr.Insertion,[" "]:Zr.Context,["\\"]:"pragma",undefined:Zr.Context};function f_e(r){let e=[],t=bue(),i="parsing header",n=null,s=null;function o(){n&&(s&&(n.parts.push(s),s=null),t.hunks.push(n),n=null)}function a(){o(),e.push(t),t=bue()}for(let l=0;l0?"patch":"mode change",v=null;switch(b){case"rename":{if(!u||!g)throw new Error("Bad parser state: rename from & to not given");e.push({type:"rename",semverExclusivity:i,fromPath:bh(u),toPath:bh(g)}),v=g}break;case"file deletion":{let x=n||p;if(!x)throw new Error("Bad parse state: no path given for file deletion");e.push({type:"file deletion",semverExclusivity:i,hunk:y&&y[0]||null,path:bh(x),mode:Nb(l),hash:f})}break;case"file creation":{let x=s||m;if(!x)throw new Error("Bad parse state: no path given for file creation");e.push({type:"file creation",semverExclusivity:i,hunk:y&&y[0]||null,path:bh(x),mode:Nb(c),hash:h})}break;case"patch":case"mode change":v=m||s;break;default:Se.assertNever(b);break}v&&o&&a&&o!==a&&e.push({type:"mode change",semverExclusivity:i,path:bh(v),oldMode:Nb(o),newMode:Nb(a)}),v&&y&&y.length&&e.push({type:"patch",semverExclusivity:i,path:bh(v),hunks:y,beforeHash:f,afterHash:h})}if(e.length===0)throw new Error("Unable to parse patch file: No changes found. Make sure the patch is a valid UTF8 encoded string");return e}function Nb(r){let e=parseInt(r,8)&511;if(e!==A_e&&e!==l_e)throw new Error(`Unexpected file mode string: ${r}`);return e}function Lb(r){let e=r.split(/\n/g);return e[e.length-1]===""&&e.pop(),h_e(f_e(e))}function g_e(r){let e=0,t=0;for(let{type:i,lines:n}of r.parts)switch(i){case Zr.Context:t+=n.length,e+=n.length;break;case Zr.Deletion:e+=n.length;break;case Zr.Insertion:t+=n.length;break;default:Se.assertNever(i);break}if(e!==r.header.original.length||t!==r.header.patched.length){let i=n=>n<0?n:`+${n}`;throw new Error(`hunk header integrity check failed (expected @@ ${i(r.header.original.length)} ${i(r.header.patched.length)} @@, got @@ ${i(e)} ${i(t)} @@)`)}}async function Qh(r,e,t){let i=await r.lstatPromise(e),n=await t();if(typeof n!="undefined"&&(e=n),r.lutimesPromise)await r.lutimesPromise(e,i.atime,i.mtime);else if(!i.isSymbolicLink())await r.utimesPromise(e,i.atime,i.mtime);else throw new Error("Cannot preserve the time values of a symlink")}async function Tb(r,{baseFs:e=new ar,dryRun:t=!1,version:i=null}={}){for(let n of r)if(!(n.semverExclusivity!==null&&i!==null&&!Wt.satisfiesWithPrereleases(i,n.semverExclusivity)))switch(n.type){case"file deletion":if(t){if(!e.existsSync(n.path))throw new Error(`Trying to delete a file that doesn't exist: ${n.path}`)}else await Qh(e,k.dirname(n.path),async()=>{await e.unlinkPromise(n.path)});break;case"rename":if(t){if(!e.existsSync(n.fromPath))throw new Error(`Trying to move a file that doesn't exist: ${n.fromPath}`)}else await Qh(e,k.dirname(n.fromPath),async()=>{await Qh(e,k.dirname(n.toPath),async()=>{await Qh(e,n.fromPath,async()=>(await e.movePromise(n.fromPath,n.toPath),n.toPath))})});break;case"file creation":if(t){if(e.existsSync(n.path))throw new Error(`Trying to create a file that already exists: ${n.path}`)}else{let s=n.hunk?n.hunk.parts[0].lines.join(` +`)+(n.hunk.parts[0].noNewlineAtEndOfFile?"":` +`):"";await e.mkdirpPromise(k.dirname(n.path),{chmod:493,utimes:[Rr.SAFE_TIME,Rr.SAFE_TIME]}),await e.writeFilePromise(n.path,s,{mode:n.mode}),await e.utimesPromise(n.path,Rr.SAFE_TIME,Rr.SAFE_TIME)}break;case"patch":await Qh(e,n.path,async()=>{await p_e(n,{baseFs:e,dryRun:t})});break;case"mode change":{let o=(await e.statPromise(n.path)).mode;if(Que(n.newMode)!==Que(o))continue;await Qh(e,n.path,async()=>{await e.chmodPromise(n.path,n.newMode)})}break;default:Se.assertNever(n);break}}function Que(r){return(r&64)>0}function Sue(r){return r.replace(/\s+$/,"")}function d_e(r,e){return Sue(r)===Sue(e)}async function p_e({hunks:r,path:e},{baseFs:t,dryRun:i=!1}){let n=await t.statSync(e).mode,o=(await t.readFileSync(e,"utf8")).split(/\n/),a=[],l=0,c=0;for(let g of r){let f=Math.max(c,g.header.patched.start+l),h=Math.max(0,f-c),p=Math.max(0,o.length-f-g.header.original.length),m=Math.max(h,p),y=0,b=0,v=null;for(;y<=m;){if(y<=h&&(b=f-y,v=vue(g,o,b),v!==null)){y=-y;break}if(y<=p&&(b=f+y,v=vue(g,o,b),v!==null))break;y+=1}if(v===null)throw new pE(r.indexOf(g),g);a.push(v),l+=y,c=b+g.header.original.length}if(i)return;let u=0;for(let g of a)for(let f of g)switch(f.type){case"splice":{let h=f.index+u;o.splice(h,f.numToDelete,...f.linesToInsert),u+=f.linesToInsert.length-f.numToDelete}break;case"pop":o.pop();break;case"push":o.push(f.line);break;default:Se.assertNever(f);break}await t.writeFilePromise(e,o.join(` +`),{mode:n})}function vue(r,e,t){let i=[];for(let n of r.parts)switch(n.type){case Zr.Context:case Zr.Deletion:{for(let s of n.lines){let o=e[t];if(o==null||!d_e(o,s))return null;t+=1}n.type===Zr.Deletion&&(i.push({type:"splice",index:t-n.lines.length,numToDelete:n.lines.length,linesToInsert:[]}),n.noNewlineAtEndOfFile&&i.push({type:"push",line:""}))}break;case Zr.Insertion:i.push({type:"splice",index:t,numToDelete:0,linesToInsert:n.lines}),n.noNewlineAtEndOfFile&&i.push({type:"pop"});break;default:Se.assertNever(n.type);break}return i}var C_e=/^builtin<([^>]+)>$/;function xue(r,e){let{source:t,selector:i,params:n}=P.parseRange(r);if(t===null)throw new Error("Patch locators must explicitly define their source");let s=i?i.split(/&/).map(c=>H.toPortablePath(c)):[],o=n&&typeof n.locator=="string"?P.parseLocator(n.locator):null,a=n&&typeof n.version=="string"?n.version:null,l=e(t);return{parentLocator:o,sourceItem:l,patchPaths:s,sourceVersion:a}}function dE(r){let i=xue(r.range,P.parseDescriptor),{sourceItem:e}=i,t=Or(i,["sourceItem"]);return te(N({},t),{sourceDescriptor:e})}function CE(r){let i=xue(r.reference,P.parseLocator),{sourceItem:e}=i,t=Or(i,["sourceItem"]);return te(N({},t),{sourceLocator:e})}function kue({parentLocator:r,sourceItem:e,patchPaths:t,sourceVersion:i,patchHash:n},s){let o=r!==null?{locator:P.stringifyLocator(r)}:{},a=typeof i!="undefined"?{version:i}:{},l=typeof n!="undefined"?{hash:n}:{};return P.makeRange({protocol:"patch:",source:s(e),selector:t.join("&"),params:N(N(N({},a),l),o)})}function m_e(r,{parentLocator:e,sourceDescriptor:t,patchPaths:i}){return P.makeLocator(r,kue({parentLocator:e,sourceItem:t,patchPaths:i},P.stringifyDescriptor))}function ZT(r,{parentLocator:e,sourcePackage:t,patchPaths:i,patchHash:n}){return P.makeLocator(r,kue({parentLocator:e,sourceItem:t,sourceVersion:t.version,patchPaths:i,patchHash:n},P.stringifyLocator))}function Pue({onAbsolute:r,onRelative:e,onBuiltin:t},i){i.startsWith("~")&&(i=i.slice(1));let s=i.match(C_e);return s!==null?t(s[1]):k.isAbsolute(i)?r(i):e(i)}function Due(r){let e=r.startsWith("~");return e&&(r=r.slice(1)),{optional:e}}function $T(r){return Pue({onAbsolute:()=>!1,onRelative:()=>!0,onBuiltin:()=>!1},r)}async function mE(r,e,t){let i=r!==null?await t.fetcher.fetch(r,t):null,n=i&&i.localPath?{packageFs:new _t(Me.root),prefixPath:k.relative(Me.root,i.localPath)}:i;i&&i!==n&&i.releaseFs&&i.releaseFs();let s=await Se.releaseAfterUseAsync(async()=>await Promise.all(e.map(async o=>{let a=Due(o),l=await Pue({onAbsolute:async()=>await K.readFilePromise(o,"utf8"),onRelative:async()=>{if(n===null)throw new Error("Assertion failed: The parent locator should have been fetched");return await n.packageFs.readFilePromise(k.join(n.prefixPath,o),"utf8")},onBuiltin:async c=>await t.project.configuration.firstHook(u=>u.getBuiltinPatch,t.project,c)},o);return te(N({},a),{source:l})})));for(let o of s)typeof o.source=="string"&&(o.source=o.source.replace(/\r\n?/g,` +`));return s}async function eO(r,{cache:e,project:t}){let i=t.storedPackages.get(r.locatorHash);if(typeof i=="undefined")throw new Error("Assertion failed: Expected the package to be registered");let n=t.storedChecksums,s=new di,o=t.configuration.makeFetcher(),a=await o.fetch(r,{cache:e,project:t,fetcher:o,checksums:n,report:s}),l=await K.mktempPromise(),c=k.join(l,"source"),u=k.join(l,"user"),g=k.join(l,".yarn-patch.json");return await Promise.all([K.copyPromise(c,a.prefixPath,{baseFs:a.packageFs}),K.copyPromise(u,a.prefixPath,{baseFs:a.packageFs}),K.writeJsonPromise(g,{locator:P.stringifyLocator(r),version:i.version})]),K.detachTemp(l),u}async function tO(r,e){let t=H.fromPortablePath(r).replace(/\\/g,"/"),i=H.fromPortablePath(e).replace(/\\/g,"/"),{stdout:n,stderr:s}=await Nr.execvp("git",["-c","core.safecrlf=false","diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index","--no-renames","--text",t,i],{cwd:H.toPortablePath(process.cwd()),env:te(N({},process.env),{GIT_CONFIG_NOSYSTEM:"1",HOME:"",XDG_CONFIG_HOME:"",USERPROFILE:""})});if(s.length>0)throw new Error(`Unable to diff directories. Make sure you have a recent version of 'git' available in PATH. +The following error was reported by 'git': +${s}`);let o=t.startsWith("/")?a=>a.slice(1):a=>a;return n.replace(new RegExp(`(a|b)(${Se.escapeRegExp(`/${o(t)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${Se.escapeRegExp(`/${o(i)}/`)}`,"g"),"$1/").replace(new RegExp(Se.escapeRegExp(`${t}/`),"g"),"").replace(new RegExp(Se.escapeRegExp(`${i}/`),"g"),"")}function Rue(r,{configuration:e,report:t}){for(let i of r.parts)for(let n of i.lines)switch(i.type){case Zr.Context:t.reportInfo(null,` ${ae.pretty(e,n,"grey")}`);break;case Zr.Deletion:t.reportError(X.FROZEN_LOCKFILE_EXCEPTION,`- ${ae.pretty(e,n,ae.Type.REMOVED)}`);break;case Zr.Insertion:t.reportError(X.FROZEN_LOCKFILE_EXCEPTION,`+ ${ae.pretty(e,n,ae.Type.ADDED)}`);break;default:Se.assertNever(i.type)}}var rO=class{supports(e,t){return!!e.reference.startsWith("patch:")}getLocalPath(e,t){return null}async fetch(e,t){let i=t.checksums.get(e.locatorHash)||null,[n,s,o]=await t.cache.fetchPackageFromCache(e,i,N({onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,`${P.prettyLocator(t.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.patchPackage(e,t),skipIntegrityCheck:t.skipIntegrityCheck},t.cacheOptions));return{packageFs:n,releaseFs:s,prefixPath:P.getIdentVendorPath(e),localPath:this.getLocalPath(e,t),checksum:o}}async patchPackage(e,t){let{parentLocator:i,sourceLocator:n,sourceVersion:s,patchPaths:o}=CE(e),a=await mE(i,o,t),l=await K.mktempPromise(),c=k.join(l,"current.zip"),u=await t.fetcher.fetch(n,t),g=P.getIdentVendorPath(e),f=await fn(),h=new li(c,{libzip:f,create:!0,level:t.project.configuration.get("compressionLevel")});await Se.releaseAfterUseAsync(async()=>{await h.copyPromise(g,u.prefixPath,{baseFs:u.packageFs,stableSort:!0})},u.releaseFs),h.saveAndClose();for(let{source:p,optional:m}of a){if(p===null)continue;let y=new li(c,{libzip:f,level:t.project.configuration.get("compressionLevel")}),b=new _t(k.resolve(Me.root,g),{baseFs:y});try{await Tb(Lb(p),{baseFs:b,version:s})}catch(v){if(!(v instanceof pE))throw v;let x=t.project.configuration.get("enableInlineHunks"),T=!x&&!m?" (set enableInlineHunks for details)":"",q=`${P.prettyLocator(t.project.configuration,e)}: ${v.message}${T}`,Y=$=>{!x||Rue(v.hunk,{configuration:t.project.configuration,report:$})};if(y.discardAndClose(),m){t.report.reportWarningOnce(X.PATCH_HUNK_FAILED,q,{reportExtra:Y});continue}else throw new ct(X.PATCH_HUNK_FAILED,q,Y)}y.saveAndClose()}return new li(c,{libzip:f,level:t.project.configuration.get("compressionLevel")})}};var E_e=3,iO=class{supportsDescriptor(e,t){return!!e.range.startsWith("patch:")}supportsLocator(e,t){return!!e.reference.startsWith("patch:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,i){let{patchPaths:n}=dE(e);return n.every(s=>!$T(s))?e:P.bindDescriptor(e,{locator:P.stringifyLocator(t)})}getResolutionDependencies(e,t){let{sourceDescriptor:i}=dE(e);return[i]}async getCandidates(e,t,i){if(!i.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:n,sourceDescriptor:s,patchPaths:o}=dE(e),a=await mE(n,o,i.fetchOptions),l=t.get(s.descriptorHash);if(typeof l=="undefined")throw new Error("Assertion failed: The dependency should have been resolved");let c=Dn.makeHash(`${E_e}`,...a.map(u=>JSON.stringify(u))).slice(0,6);return[ZT(e,{parentLocator:n,sourcePackage:l,patchPaths:o,patchHash:c})]}async getSatisfying(e,t,i){return null}async resolve(e,t){let{sourceLocator:i}=CE(e),n=await t.resolver.resolve(i,t);return N(N({},n),e)}};var EE=class extends Le{constructor(){super(...arguments);this.save=J.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=J.String()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd);if(!i)throw new ht(t.cwd,this.context.cwd);await t.restoreInstallState();let n=k.resolve(this.context.cwd,H.toPortablePath(this.patchFolder)),s=k.join(n,"../source"),o=k.join(n,"../.yarn-patch.json");if(!K.existsSync(s))throw new Pe("The argument folder didn't get created by 'yarn patch'");let a=await tO(s,n),l=await K.readJsonPromise(o),c=P.parseLocator(l.locator,!0);if(!t.storedPackages.has(c.locatorHash))throw new Pe("No package found in the project for the given locator");if(!this.save){this.context.stdout.write(a);return}let u=e.get("patchFolder"),g=k.join(u,`${P.slugifyLocator(c)}.patch`);await K.mkdirPromise(u,{recursive:!0}),await K.writeFilePromise(g,a);let f=k.relative(t.cwd,g);t.topLevelWorkspace.manifest.resolutions.push({pattern:{descriptor:{fullName:P.stringifyIdent(c),description:l.version}},reference:`patch:${P.stringifyLocator(c)}#${f}`}),await t.persist()}};EE.paths=[["patch-commit"]],EE.usage=Re.Usage({description:"generate a patch out of a directory",details:"\n By default, this will print a patchfile on stdout based on the diff between the folder passed in and the original version of the package. Such file is suitable for consumption with the `patch:` protocol.\n\n With the `-s,--save` option set, the patchfile won't be printed on stdout anymore and will instead be stored within a local file (by default kept within `.yarn/patches`, but configurable via the `patchFolder` setting). A `resolutions` entry will also be added to your top-level manifest, referencing the patched package via the `patch:` protocol.\n\n Note that only folders generated by `yarn patch` are accepted as valid input for `yarn patch-commit`.\n "});var Fue=EE;var IE=class extends Le{constructor(){super(...arguments);this.json=J.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.package=J.String()}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await ze.find(e,this.context.cwd),n=await Nt.find(e);if(!i)throw new ht(t.cwd,this.context.cwd);await t.restoreInstallState();let s=P.parseLocator(this.package);if(s.reference==="unknown"){let o=Se.mapAndFilter([...t.storedPackages.values()],a=>a.identHash!==s.identHash?Se.mapAndFilter.skip:P.isVirtualLocator(a)?Se.mapAndFilter.skip:a);if(o.length===0)throw new Pe("No package found in the project for the given locator");if(o.length>1)throw new Pe(`Multiple candidate packages found; explicitly choose one of them (use \`yarn why \` to get more information as to who depends on them): +${o.map(a=>` +- ${P.prettyLocator(e,a)}`).join("")}`);s=o[0]}if(!t.storedPackages.has(s.locatorHash))throw new Pe("No package found in the project for the given locator");await Je.start({configuration:e,json:this.json,stdout:this.context.stdout},async o=>{let a=await eO(s,{cache:n,project:t});o.reportJson({locator:P.stringifyLocator(s),path:H.fromPortablePath(a)}),o.reportInfo(X.UNNAMED,`Package ${P.prettyLocator(e,s)} got extracted with success!`),o.reportInfo(X.UNNAMED,`You can now edit the following folder: ${ae.pretty(e,H.fromPortablePath(a),"magenta")}`),o.reportInfo(X.UNNAMED,`Once you are done run ${ae.pretty(e,`yarn patch-commit -s ${process.platform==="win32"?'"':""}${H.fromPortablePath(a)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};IE.paths=[["patch"]],IE.usage=Re.Usage({description:"prepare a package for patching",details:"\n This command will cause a package to be extracted in a temporary directory intended to be editable at will.\n \n Once you're done with your changes, run `yarn patch-commit -s ` (with `` being the temporary directory you received) to generate a patchfile and register it into your top-level manifest via the `patch:` protocol. Run `yarn patch-commit -h` for more details.\n "});var Nue=IE;var I_e={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:Ie.BOOLEAN,default:!1},patchFolder:{description:"Folder where the patch files must be written",type:Ie.ABSOLUTE_PATH,default:"./.yarn/patches"}},commands:[Fue,Nue],fetchers:[rO],resolvers:[iO]},y_e=I_e;var AO={};ft(AO,{default:()=>b_e});var sO=class{supportsPackage(e,t){return this.isEnabled(t)}async findPackageLocation(e,t){if(!this.isEnabled(t))throw new Error("Assertion failed: Expected the pnpm linker to be enabled");let i=oO(),n=t.project.installersCustomData.get(i);if(!n)throw new Pe(`The project in ${ae.pretty(t.project.configuration,`${t.project.cwd}/package.json`,ae.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let s=n.pathByLocator.get(e.locatorHash);if(typeof s=="undefined")throw new Pe(`Couldn't find ${P.prettyLocator(t.project.configuration,e)} in the currently installed pnpm map - running an install might help`);return s}async findPackageLocator(e,t){if(!this.isEnabled(t))return null;let i=oO(),n=t.project.installersCustomData.get(i);if(!n)throw new Pe(`The project in ${ae.pretty(t.project.configuration,`${t.project.cwd}/package.json`,ae.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let s=e.match(/(^.*\/node_modules\/(@[^/]*\/)?[^/]+)(\/.*$)/);if(s){let l=n.locatorByPath.get(s[1]);if(l)return l}let o=e,a=e;do{a=o,o=k.dirname(a);let l=n.locatorByPath.get(a);if(l)return l}while(o!==a);return null}makeInstaller(e){return new Lue(e)}isEnabled(e){return e.project.configuration.get("nodeLinker")==="pnpm"}},Lue=class{constructor(e){this.opts=e;this.asyncActions=new Se.AsyncActions(10);this.customData={pathByLocator:new Map,locatorByPath:new Map}}getCustomDataKey(){return oO()}attachCustomData(e){}async installPackage(e,t,i){switch(e.linkType){case Qt.SOFT:return this.installPackageSoft(e,t,i);case Qt.HARD:return this.installPackageHard(e,t,i)}throw new Error("Assertion failed: Unsupported package link type")}async installPackageSoft(e,t,i){let n=k.resolve(t.packageFs.getRealPath(),t.prefixPath);return this.customData.pathByLocator.set(e.locatorHash,n),{packageLocation:n,buildDirective:null}}async installPackageHard(e,t,i){var u;let n=w_e(e,{project:this.opts.project});this.customData.locatorByPath.set(n,P.stringifyLocator(e)),this.customData.pathByLocator.set(e.locatorHash,n),i.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{await K.mkdirPromise(n,{recursive:!0}),await K.copyPromise(n,t.prefixPath,{baseFs:t.packageFs,overwrite:!1})}));let o=P.isVirtualLocator(e)?P.devirtualizeLocator(e):e,a={manifest:(u=await At.tryFind(t.prefixPath,{baseFs:t.packageFs}))!=null?u:new At,misc:{hasBindingGyp:Ca.hasBindingGyp(t)}},l=this.opts.project.getDependencyMeta(o,e.version),c=Ca.extractBuildScripts(e,a,l,{configuration:this.opts.project.configuration,report:this.opts.report});return{packageLocation:n,buildDirective:c}}async attachInternalDependencies(e,t){this.opts.project.configuration.get("nodeLinker")==="pnpm"&&(!Mue(e,{project:this.opts.project})||this.asyncActions.reduce(e.locatorHash,async i=>{await i;let n=this.customData.pathByLocator.get(e.locatorHash);if(typeof n=="undefined")throw new Error(`Assertion failed: Expected the package to have been registered (${P.stringifyLocator(e)})`);let s=k.join(n,kt.nodeModules),o=[],a=await Kue(s);for(let[l,c]of t){let u=c;Mue(c,{project:this.opts.project})||(this.opts.report.reportWarning(X.UNNAMED,"The pnpm linker doesn't support providing different versions to workspaces' peer dependencies"),u=P.devirtualizeLocator(c));let g=this.customData.pathByLocator.get(u.locatorHash);if(typeof g=="undefined")throw new Error(`Assertion failed: Expected the package to have been registered (${P.stringifyLocator(c)})`);let f=P.stringifyIdent(l),h=k.join(s,f),p=k.relative(k.dirname(h),g),m=a.get(f);a.delete(f),o.push(Promise.resolve().then(async()=>{if(m){if(m.isSymbolicLink()&&await K.readlinkPromise(h)===p)return;await K.removePromise(h)}await K.mkdirpPromise(k.dirname(h)),process.platform=="win32"?await K.symlinkPromise(g,h,"junction"):await K.symlinkPromise(p,h)}))}o.push(Uue(s,a)),await Promise.all(o)}))}async attachExternalDependents(e,t){throw new Error("External dependencies haven't been implemented for the pnpm linker")}async finalizeInstall(){let e=Oue(this.opts.project);if(this.opts.project.configuration.get("nodeLinker")!=="pnpm")await K.removePromise(e);else{let t=[],i=new Set;for(let s of this.customData.pathByLocator.values()){let o=k.contains(e,s);if(o!==null){let[a,,...l]=o.split(k.sep);i.add(a);let c=k.join(e,a);t.push(K.readdirPromise(c).then(u=>Promise.all(u.map(async g=>{let f=k.join(c,g);if(g===kt.nodeModules){let h=await Kue(f);return h.delete(l.join(k.sep)),Uue(f,h)}else return K.removePromise(f)}))).catch(u=>{if(u.code!=="ENOENT")throw u}))}}let n;try{n=await K.readdirPromise(e)}catch{n=[]}for(let s of n)i.has(s)||t.push(K.removePromise(k.join(e,s)));await Promise.all(t)}return await this.asyncActions.wait(),await aO(e),this.opts.project.configuration.get("nodeLinker")!=="node-modules"&&await aO(Tue(this.opts.project)),{customData:this.customData}}};function oO(){return JSON.stringify({name:"PnpmInstaller",version:2})}function Tue(r){return k.join(r.cwd,kt.nodeModules)}function Oue(r){return k.join(Tue(r),".store")}function w_e(r,{project:e}){let t=P.slugifyLocator(r),i=P.getIdentVendorPath(r);return k.join(Oue(e),t,i)}function Mue(r,{project:e}){return!P.isVirtualLocator(r)||!e.tryWorkspaceByLocator(r)}async function Kue(r){let e=new Map,t=[];try{t=await K.readdirPromise(r,{withFileTypes:!0})}catch(i){if(i.code!=="ENOENT")throw i}try{for(let i of t)if(!i.name.startsWith("."))if(i.name.startsWith("@")){let n=await K.readdirPromise(k.join(r,i.name),{withFileTypes:!0});if(n.length===0)e.set(i.name,i);else for(let s of n)e.set(`${i.name}/${s.name}`,s)}else e.set(i.name,i)}catch(i){if(i.code!=="ENOENT")throw i}return e}async function Uue(r,e){var n;let t=[],i=new Set;for(let s of e.keys()){t.push(K.removePromise(k.join(r,s)));let o=(n=P.tryParseIdent(s))==null?void 0:n.scope;o&&i.add(`@${o}`)}return Promise.all(t).then(()=>Promise.all([...i].map(s=>aO(k.join(r,s)))))}async function aO(r){try{await K.rmdirPromise(r)}catch(e){if(e.code!=="ENOENT"&&e.code!=="ENOTEMPTY")throw e}}var B_e={linkers:[sO]},b_e=B_e;var L0=()=>({modules:new Map([["@yarnpkg/cli",GC],["@yarnpkg/core",EC],["@yarnpkg/fslib",Zh],["@yarnpkg/libzip",Md],["@yarnpkg/parsers",op],["@yarnpkg/shell",Ud],["clipanion",cZ(Cp)],["semver",Q_e],["typanion",cg],["yup",S_e],["@yarnpkg/plugin-essentials",GN],["@yarnpkg/plugin-compat",zN],["@yarnpkg/plugin-dlx",_N],["@yarnpkg/plugin-file",nL],["@yarnpkg/plugin-git",jN],["@yarnpkg/plugin-github",oL],["@yarnpkg/plugin-http",lL],["@yarnpkg/plugin-init",fL],["@yarnpkg/plugin-link",mL],["@yarnpkg/plugin-nm",JL],["@yarnpkg/plugin-npm",qT],["@yarnpkg/plugin-npm-cli",VT],["@yarnpkg/plugin-pack",HT],["@yarnpkg/plugin-patch",nO],["@yarnpkg/plugin-pnp",LL],["@yarnpkg/plugin-pnpm",AO]]),plugins:new Set(["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-dlx","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@yarnpkg/plugin-link","@yarnpkg/plugin-nm","@yarnpkg/plugin-npm","@yarnpkg/plugin-npm-cli","@yarnpkg/plugin-pack","@yarnpkg/plugin-patch","@yarnpkg/plugin-pnp","@yarnpkg/plugin-pnpm"])});s0({binaryVersion:Ur||"",pluginConfiguration:L0()});})(); +/*! + * buildToken + * Builds OAuth token prefix (helper function) + * + * @name buildToken + * @function + * @param {GitUrl} obj The parsed Git url object. + * @return {String} token prefix + */ +/*! + * fill-range + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Licensed under the MIT License. + */ +/*! + * is-extglob + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ +/*! + * is-glob + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ +/*! + * is-number + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Released under the MIT License. + */ +/*! + * is-windows + * + * Copyright © 2015-2018, Jon Schlinkert. + * Released under the MIT License. + */ +/*! + * to-regex-range + * + * Copyright (c) 2015-present, Jon Schlinkert. + * Released under the MIT License. + */ diff --git a/.yarnrc.yml b/.yarnrc.yml new file mode 100644 index 000000000000..0aa98227973f --- /dev/null +++ b/.yarnrc.yml @@ -0,0 +1,17 @@ +checksumBehavior: update + +enableImmutableInstalls: false + +nodeLinker: node-modules + +plugins: + - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs + spec: "@yarnpkg/plugin-workspace-tools" + - path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs + spec: "@yarnpkg/plugin-interactive-tools" + - path: .yarn/plugins/@yarnpkg/plugin-engines.cjs + spec: "https://raw.githubusercontent.com/devoto13/yarn-plugin-engines/main/bundles/%40yarnpkg/plugin-engines.js" + - path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs + spec: "@yarnpkg/plugin-typescript" + +yarnPath: .yarn/releases/yarn-3.2.2.cjs diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index c644d9ba3f99..8b863ff5d4a1 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -3,7 +3,7 @@ ## Our Pledge In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and +contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and @@ -56,7 +56,7 @@ further defined and clarified by project maintainers. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at team@rocket.chat. The project team -will review and investigate all complaints, and will respond in a way that it deems +will review and investigate all complaints and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. diff --git a/FEATURES.md b/FEATURES.md index 381c09a0baf0..e4b11c141184 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -48,7 +48,7 @@ - Reactions - Message editing - Editing is as simple as using your arrow keys for picking the right message to edit - - Setup to keep history of edits or discard the previous text + - Setup to keep the history of edits or discard the previous text - Show or hide edited/deleted status - History - Search @@ -58,10 +58,10 @@ - Add stars and pins to messages - Star messages that are important to you. Only you have access to your stars. - Pin messages that are important to everyone. - - Access your starred/pinned and messages you were mentioned on quickly through side bar buttons -- REST Api + - Access your starred/pinned and messages you were mentioned on quickly through sidebar buttons +- REST API - Roles and Permissions - Public and Private multi-user rooms - One-on-one conversations - - Off-the-record messaging (messages are encrypted and transiently saved on database) -- Slashcommands + - Off-the-record messaging (messages are encrypted and transiently saved on the database) +- Slash commands diff --git a/HISTORY.md b/HISTORY.md index ebef69f92788..f045b88ef99c 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,7674 @@ +# 5.1.0 +`2022-09-02 · 8 🎉 · 7 🚀 · 42 🐛 · 129 🔍 · 38 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.19.3` +- NPM: `6.14.17` +- MongoDB: `4.2, 4.4, 5.0` + +### 🎉 New features + + +- `Home` page ([#25734](https://github.com/RocketChat/Rocket.Chat/pull/25734)) + + image + +- Adding oauth crud on the rocket.chat side ([#26220](https://github.com/RocketChat/Rocket.Chat/pull/26220) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- allow ephemeral messages to receive a specific id ([#26118](https://github.com/RocketChat/Rocket.Chat/pull/26118) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + + Allow apps to pass a specific ID for ephemeral messages as a way to edit them. + +- Capability to search visitors by custom fields ([#26312](https://github.com/RocketChat/Rocket.Chat/pull/26312)) + + Users of the endpoints [api/v1/omnichannel/contact.search](https://developer.rocket.chat/reference/api/rest-api/endpoints/omnichannel/livechat-endpoints/livechat-contact/omnichannel-search-contact) and [/api/v1/livechat/visitors.search](https://developer.rocket.chat/reference/api/rest-api/endpoints/omnichannel/livechat-endpoints/visitor/search-for-visitors) are now able to search by custom fields in their objects. + Capability of selecting if a custom field can be searched for is added in the Omnichannel pannel as a toggle for `searchable`, the included JSON in the Accounts' Custom Field example has been updated to make it explicit for future configurations that the field has to be enabled as searchable for that to happen. + +- Fallback Error component for Engagement Dashboard widgets ([#26441](https://github.com/RocketChat/Rocket.Chat/pull/26441) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + + As proposed, was added a fallback component to catch errors at Engagement Dashboard widgets individually. + It used an Error boundary to catch `react-query` errors, due to this scenario was necessary to install and use the library [react-error-boundary](https://github.com/bvaughn/react-error-boundary) that implements everything and more compared to our ErrorBoundary component, the main reason was to capture Query errors and the implementation with `react-query` library. + + **New layout:** + + Before: + ![image](https://user-images.githubusercontent.com/20212776/184968003-607eda93-ae3f-406c-a775-becd2720a607.png) + + After: + ![image](https://user-images.githubusercontent.com/20212776/184970152-25a425f3-6aad-4620-b1c1-5f8c8bb35fbb.png) + +- Marketplace apps page new list view layout ([#26181](https://github.com/RocketChat/Rocket.Chat/pull/26181)) + + Refactored the layout of the marketplace list of apps, now it has a more minimalist and flexbox-based style. Also implemented a new status filter. + + Demo gif: + ![new-app-list](https://user-images.githubusercontent.com/43561537/179572667-792d8d34-1003-4e95-bf10-37ba93f8c1ef.gif) + + ClickUp task: + https://app.clickup.com/t/1na7437 + +- Surface featured apps endpoint ([#26416](https://github.com/RocketChat/Rocket.Chat/pull/26416)) + + Created the /featured endpoints on the rest.js file. Also created the necessary typings to use together with it. + +- Warn admins about running multiple instances of the monolith ([#26667](https://github.com/RocketChat/Rocket.Chat/pull/26667) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +### 🚀 Improvements + + +- Added identification on calls to/from existing contacts ([#26334](https://github.com/RocketChat/Rocket.Chat/pull/26334)) + + Before: + Screen Shot 2022-07-02 at 01 50 52 + + After: + Screen Shot 2022-07-21 at 16 00 27 + +- General federation improvements ([#26150](https://github.com/RocketChat/Rocket.Chat/pull/26150)) + + I know this changed a lot of files, but the main goal for this PR is not to change any behavior, the goals for the PR are: + + - Refactor the code; + - Solve any tech debt; + - Simplify and reuse some parts of the code; + - Remove duplicated code; + - Remove all unsafe type castings; + - Solve all Eslint errors and warnings; + - Split too big files; + - Encapsulate the business logic in a better way, avoiding exposing and leaking internal logic to the unintended layers; + - Improve the actual test cases; + - Add more test cases, since a lot of cases were omitted during the release phase; + - Remove unsafe `Object.assign` statements and prefer to use the class `constructor` instead; + +- New 'not found page' design ([#26452](https://github.com/RocketChat/Rocket.Chat/pull/26452) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + + - Add a new design for the not-found page + - Add English translation for "page not found" and "Homepage" + - Update English translation for "Room_not_exist_or_not_permission" + - Add "Homepage" button on the room not found page + +- OTR refactoring ([#24757](https://github.com/RocketChat/Rocket.Chat/pull/24757)) + + Rewritten OTR files to TS with new code patterns + +- Remove device-management banner and modal ([#26729](https://github.com/RocketChat/Rocket.Chat/pull/26729)) + +- Spotlight search user results ([#26599](https://github.com/RocketChat/Rocket.Chat/pull/26599) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- use enter key to call using DialPad ([#26454](https://github.com/RocketChat/Rocket.Chat/pull/26454)) + +### 🐛 Bug fixes + + +- - Incoming SMSs no longer clash with ongoing livechat conversations by the same visitor ([#26307](https://github.com/RocketChat/Rocket.Chat/pull/26307) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + + There was a data race in the defineVisitor function, causing new guests to be created even if a registered guest with that number already existed, also made sure that the open room being searched on is the correct source type, so the clash is not possible anymore. + +- Active users count on `@all` and `@here` ([#25957](https://github.com/RocketChat/Rocket.Chat/pull/25957) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + + this PR updates the old `roomMembersCount` to count active users instead of everyone + +- add image format validation ([#25912](https://github.com/RocketChat/Rocket.Chat/pull/25912) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Add Offline License Endpoint ([#26282](https://github.com/RocketChat/Rocket.Chat/pull/26282) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + + This PR updates the endpoint to add a license + +- Agents (with user status offline & omni-status as available) not able to take or forward chat ([#26575](https://github.com/RocketChat/Rocket.Chat/pull/26575) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Allow normal user to open apps contextual bar ([#26495](https://github.com/RocketChat/Rocket.Chat/pull/26495)) + + Fix the bug where normal users cannot open an app contextual bar. + The request made by the contextual bar to get the app information, which was for admin only, was removed since the response was not being used. + +- Autotranslate method should respect setting ([#26549](https://github.com/RocketChat/Rocket.Chat/pull/26549)) + +- Avatars of other chats disappear when they located near chat with broken avatar ([#26689](https://github.com/RocketChat/Rocket.Chat/pull/26689)) + +- Blank screen after requesting transcript ([#26385](https://github.com/RocketChat/Rocket.Chat/pull/26385) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chats not getting assigned to offline agents even when "Accept with No Online agents" setting is turned on ([#26147](https://github.com/RocketChat/Rocket.Chat/pull/26147) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Clear push token on save user password ([#26466](https://github.com/RocketChat/Rocket.Chat/pull/26466)) + +- Correct IMAP configuration for email inbox ([#25789](https://github.com/RocketChat/Rocket.Chat/pull/25789)) + + The primary change here has been to make the library try and reconnect after some time, up to a certain configured number of times, on a few different error classes. + +- Current Chat Custom Field Filter ([#26200](https://github.com/RocketChat/Rocket.Chat/pull/26200) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Decrypt E2EE messages on thread list ([#26133](https://github.com/RocketChat/Rocket.Chat/pull/26133)) + + ### Before + Screenshot 2022-07-05 at 9 28 22 PM + ### After + Screenshot 2022-07-05 at 9 27 42 PM + +- Default BH not getting applied in-case any other BH is disabled ([#26471](https://github.com/RocketChat/Rocket.Chat/pull/26471) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- DialPad call button from end to center ([#26459](https://github.com/RocketChat/Rocket.Chat/pull/26459)) + +- Don't give errors on outbound voip call Request Terminated ([#26373](https://github.com/RocketChat/Rocket.Chat/pull/26373)) + +- Don't wrap wrap up notes ([#26375](https://github.com/RocketChat/Rocket.Chat/pull/26375)) + +- incorrect error toast messages ([#26320](https://github.com/RocketChat/Rocket.Chat/pull/26320)) + +- Katex is not respecting the 'Katex_Enabled' setting ([#26542](https://github.com/RocketChat/Rocket.Chat/pull/26542) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- MDM content alignment ([#26665](https://github.com/RocketChat/Rocket.Chat/pull/26665)) + + - remove left margin of MDM content + + before: + ![image](https://user-images.githubusercontent.com/48109548/186213428-946d6061-8f8d-415f-9b3b-049082c1bc25.png) + + after: + Screen Shot 2022-08-23 at 11 50 55 + +- Missing bio field UI validation ([#26345](https://github.com/RocketChat/Rocket.Chat/pull/26345) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Not allowed error in discussion room with a private parent channel ([#26394](https://github.com/RocketChat/Rocket.Chat/pull/26394)) + +- Notification preferences not updated on save ([#26461](https://github.com/RocketChat/Rocket.Chat/pull/26461) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + + Publish required notification subscription fields on change, so that changes can be seen on save. + +- Onhold auto chat resume feature not working for email channel ([#26363](https://github.com/RocketChat/Rocket.Chat/pull/26363)) + +- Open team after room not found page ([#26264](https://github.com/RocketChat/Rocket.Chat/pull/26264) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + + After the room not found page, the `FlowRouter` was not clearing `msg` query param, causing the next redirect to private teams break because it's try to find the unknow msg id + +- Permission `view-all-teams` is not checked in the `teams.info` endpoint ([#25841](https://github.com/RocketChat/Rocket.Chat/pull/25841) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + + Previously any authenticated user was able to access the `teams.info` endpoint, this PR updates this so only users with the `view-all-teams` permission or team members can access it. + +- Prevent VoIP issues during disconnection when network failed ([#26321](https://github.com/RocketChat/Rocket.Chat/pull/26321)) + +- Prune messages not removing thumbnails ([#26443](https://github.com/RocketChat/Rocket.Chat/pull/26443) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + + This PR adds a method on `Uploads` called `findOneByName`, and excludes a thumbnail of an image on `cleanRoomHistory` + +- Request at least one field in the payload of `/v1/users.setStatus` ([#26490](https://github.com/RocketChat/Rocket.Chat/pull/26490)) + + Requests `status` and/or `message` fields on `/v1/users.setStatus` request payload. + +- Reset password errors ([#26597](https://github.com/RocketChat/Rocket.Chat/pull/26597)) + +- Save edited tags for omnichannel departments ([#26481](https://github.com/RocketChat/Rocket.Chat/pull/26481) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Slack User CSV importer not working ([#26629](https://github.com/RocketChat/Rocket.Chat/pull/26629) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Slackbridge Connect Error ([#25793](https://github.com/RocketChat/Rocket.Chat/pull/25793) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + + This PR fixes an issue that was happening when an invalid token was passed on SlackBridge, basically the app crashes because the error was not being handled + +- Slash commands description as undefined ([#26372](https://github.com/RocketChat/Rocket.Chat/pull/26372) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- SMS service check ([#26558](https://github.com/RocketChat/Rocket.Chat/pull/26558) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Too many REST API requests ([#26330](https://github.com/RocketChat/Rocket.Chat/pull/26330)) + + Uses React Query cache as an alternative for querying data "sorta" real time. + +- UI fixes on dropdown titles ([#26318](https://github.com/RocketChat/Rocket.Chat/pull/26318)) + + - Add paddings on profile dropdown title + - Fix paddings on 'sort' and 'create new' dropdown titles + - Remove inline styles of `OptionTitle` (removing uppercase style) + + | Location | Before | After | + | --------------- | --------------- | --------------- | + | Sort Dropdown | ![image](https://user-images.githubusercontent.com/48109548/183442156-9cc5269e-458e-4b6a-b2e5-91102dcfe153.png) | Screen Shot 2022-08-05 at 15 54 14 | + | User Dropdown | ![image](https://user-images.githubusercontent.com/48109548/183442678-49667402-57fd-4a5c-9077-eaef53aad10c.png) | Screen Shot 2022-08-05 at 15 54 05 | + | Create new Dropdown | Screen Shot 2022-08-08 at 11 33 17 | Screen Shot 2022-08-05 at 15 54 26 | + +- Unable to remove a user who joined a public team with a mention ([#26218](https://github.com/RocketChat/Rocket.Chat/pull/26218) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + + This PR fixes a bug where a user that joins a team by mention don't get added to the team. + +- Unable to send voice recording to Whatsapp ([#26276](https://github.com/RocketChat/Rocket.Chat/pull/26276)) + +- Users can access public discussions inside private channels they are not members of ([#26619](https://github.com/RocketChat/Rocket.Chat/pull/26619) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Users can access public discussions inside private channels they are not members of ([#25981](https://github.com/RocketChat/Rocket.Chat/pull/25981) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +
+🔍 Minor changes + + +- Chore: Accounts/token to TS ([#26434](https://github.com/RocketChat/Rocket.Chat/pull/26434)) + +- Chore: Add end-to-end tests to teams listing in the `directory` endpoint ([#26347](https://github.com/RocketChat/Rocket.Chat/pull/26347)) + +- Chore: Add license env var to ee tests ([#26650](https://github.com/RocketChat/Rocket.Chat/pull/26650) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: add playwright ee coverage ([#26293](https://github.com/RocketChat/Rocket.Chat/pull/26293)) + +- Chore: Add translations code owner ([#26560](https://github.com/RocketChat/Rocket.Chat/pull/26560)) + +- Chore: Bump fuselage packages ([#26769](https://github.com/RocketChat/Rocket.Chat/pull/26769)) + +- Chore: Bypass turbo cache on `ui-contexts` ([#26526](https://github.com/RocketChat/Rocket.Chat/pull/26526)) + + Skips cache for building `@rocket.chat/ui-contexts`, avoiding Turborepo issues with a symlink. + +- Chore: Cache playwright ([#26432](https://github.com/RocketChat/Rocket.Chat/pull/26432)) + +- Chore: Change some places still using `fields` to `projection` ([#26308](https://github.com/RocketChat/Rocket.Chat/pull/26308)) + +- Chore: cleanup startup of test and put wizard in setup function ([#26306](https://github.com/RocketChat/Rocket.Chat/pull/26306)) + +- Chore: Codecov threshold ([#26477](https://github.com/RocketChat/Rocket.Chat/pull/26477)) + +- Chore: Convert `client/views/account/preferences` folder to ts ([#26496](https://github.com/RocketChat/Rocket.Chat/pull/26496)) + +- Chore: Convert `LivechatCustomField` model to raw model ([#26446](https://github.com/RocketChat/Rocket.Chat/pull/26446) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Convert AccountPreferencesPage to ts ([#26096](https://github.com/RocketChat/Rocket.Chat/pull/26096)) + +- Chore: Convert AppSetting to tsx ([#26625](https://github.com/RocketChat/Rocket.Chat/pull/26625)) + +- Chore: Convert AppSettingsAssembler to tsx ([#26626](https://github.com/RocketChat/Rocket.Chat/pull/26626) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Convert AutoCompleteAgent to tsx ([#26704](https://github.com/RocketChat/Rocket.Chat/pull/26704)) + +- Chore: convert autotranslate to ts ([#25953](https://github.com/RocketChat/Rocket.Chat/pull/25953) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + + Converted the `apps/meteor/app/api/server/v1/autotranslate.js` to ts and created endpoint typings on the `packages/rest-typings/src/v1/autotranslate` folder. + +- Chore: Convert client/views/account/security folder to ts ([#26413](https://github.com/RocketChat/Rocket.Chat/pull/26413)) + +- Chore: create a test for managers screen ([#26581](https://github.com/RocketChat/Rocket.Chat/pull/26581)) + +- Chore: create removeWebdavAccount endpoint ([#26393](https://github.com/RocketChat/Rocket.Chat/pull/26393)) + + Created the '/v1/webdav.removeWebdavAccount' endpoint for the `apps/meteor/client/views/account/integrations/AccountIntegrationsPage.tsx` file, and added Ajv validations. + +- Chore: create roomNameExists endpoint ([#26386](https://github.com/RocketChat/Rocket.Chat/pull/26386)) + + Created the missing rest endpoint 'roomNameExists' for `apps/meteor/client/sidebar/header/CreateChannel.tsx`, on the packages/rest-typings/src/v1/ folder. + +- Chore: Create teams management tests ([#26578](https://github.com/RocketChat/Rocket.Chat/pull/26578) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Create tests for Omnichannel admin add a custom fields ([#26609](https://github.com/RocketChat/Rocket.Chat/pull/26609) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Engagement Dashboard end to end tests ([#26702](https://github.com/RocketChat/Rocket.Chat/pull/26702)) + + Adding tests to check the behavior of the Engagement Dashboard for the Enterprise Edition license. + The tests include: + - Visibility and navigation of page and tabs + - Fallback component on widgets error + +- Chore: ESLint warnings ([#26504](https://github.com/RocketChat/Rocket.Chat/pull/26504)) + + The current amount of ESLint warning messages is overwhelming to properly debug serious issues. This PR aims to reduce them to a sane amount. + +- Chore: Exclude private/public folders from typecheck ([#26399](https://github.com/RocketChat/Rocket.Chat/pull/26399)) + +- Chore: Exit process on `unhandledRejection` on CI ([#26467](https://github.com/RocketChat/Rocket.Chat/pull/26467)) + +- Chore: Fail-fast on callbacks ([#26572](https://github.com/RocketChat/Rocket.Chat/pull/26572)) + +- Chore: Fix CI intermittent ([#26649](https://github.com/RocketChat/Rocket.Chat/pull/26649)) + +- Chore: Fix docker latest tag push ([#26770](https://github.com/RocketChat/Rocket.Chat/pull/26770)) + +- Chore: Fix grammatical typo when only one message is pruned ([#21902](https://github.com/RocketChat/Rocket.Chat/pull/21902) by [@shrinish123](https://github.com/shrinish123)) + + Whenever only 1 message is pruned it says '1 messages pruned' instead of '1 message pruned' in the toast message + +- Chore: Fix lint issues ([#26531](https://github.com/RocketChat/Rocket.Chat/pull/26531)) + + #24757 was an old PR and was recently auto-merged, it was not following our latest eslint rules, so now there are some lint issues on the develop. + +- Chore: Fix some settings with incompatible default value types ([#26114](https://github.com/RocketChat/Rocket.Chat/pull/26114) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: fix tests with beforeEach ([#26335](https://github.com/RocketChat/Rocket.Chat/pull/26335)) + +- Chore: Fix UiKit dependency issue for Livechat ([#26534](https://github.com/RocketChat/Rocket.Chat/pull/26534)) + +- Chore: Importer rest types, meteor methods to TS and API unit tests ([#26284](https://github.com/RocketChat/Rocket.Chat/pull/26284) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Improve test for livechat ([#26527](https://github.com/RocketChat/Rocket.Chat/pull/26527)) + +- Chore: Migrate AppPermissionsReviewModal from JS to TS ([#26498](https://github.com/RocketChat/Rocket.Chat/pull/26498)) + +- Chore: Migrate modules related to `room` template to TypeScript ([#25881](https://github.com/RocketChat/Rocket.Chat/pull/25881)) + +- Chore: Migrate omni-chat forwarding to use API instead of meteor method ([#26377](https://github.com/RocketChat/Rocket.Chat/pull/26377)) + + - Use `livechat/room.forward` endpoint to forward omnichannel chats instead of using meteor method "livechat:transfer" + +- Chore: Missing permissions translations ([#26546](https://github.com/RocketChat/Rocket.Chat/pull/26546) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Missing some English translation keywords ([#20131](https://github.com/RocketChat/Rocket.Chat/pull/20131) by [@Karting06](https://github.com/Karting06)) + + Add missing translation keys in `en.i18n.json` to be able to translate them via Lingohub. + +- Chore: Mocha handling multiple React instances ([#26513](https://github.com/RocketChat/Rocket.Chat/pull/26513)) + + Whenever Mocha runs a test file which imports stuff from outside `apps/meteor`, it uses a hoisted version of React (i.e. located at the root `node_modules`) instead of the one tied to `apps/meteor/node_modules`. This PR adds a monkey patch while we can't migrate to another test runner. + +- Chore: ModalFooterControllers adoption ([#26445](https://github.com/RocketChat/Rocket.Chat/pull/26445) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: More Omnichannel tests ([#26691](https://github.com/RocketChat/Rocket.Chat/pull/26691) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Move `Card` and related components to `@rocket.chat/ui-client` ([#26653](https://github.com/RocketChat/Rocket.Chat/pull/26653)) + +- Chore: Move fuselage-ui-kit to main repo ([#26630](https://github.com/RocketChat/Rocket.Chat/pull/26630) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Omnichannel endpoints e2e tests ([#26376](https://github.com/RocketChat/Rocket.Chat/pull/26376)) + +- Chore: omnichannel-departments tests ([#26607](https://github.com/RocketChat/Rocket.Chat/pull/26607) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Options in BaseRaw model could possibly be undefined ([#26395](https://github.com/RocketChat/Rocket.Chat/pull/26395)) + + I found this while I was doing some refactorings on the federation side. 😬 + +- Chore: Parallelize e2e tests ([#26390](https://github.com/RocketChat/Rocket.Chat/pull/26390)) + +- Chore: Permissions check per endpoint/method ([#26419](https://github.com/RocketChat/Rocket.Chat/pull/26419)) + +- Chore: Prevent tooltip from opening after click ([#26612](https://github.com/RocketChat/Rocket.Chat/pull/26612)) + +- Chore: Purge some unused modules ([#26447](https://github.com/RocketChat/Rocket.Chat/pull/26447)) + + The title says it all. + +- Chore: Refactor create-target-channel util ([#26493](https://github.com/RocketChat/Rocket.Chat/pull/26493)) + +- Chore: Refactor ReportMessage Modal to React Component ([#26478](https://github.com/RocketChat/Rocket.Chat/pull/26478) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Refactor RoomMembers to Typescript ([#26559](https://github.com/RocketChat/Rocket.Chat/pull/26559) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Refactor WebdavFilePicker Modal to React Component ([#26422](https://github.com/RocketChat/Rocket.Chat/pull/26422)) + +- Chore: Remove & Test cannedResponse meteor templates ([#26706](https://github.com/RocketChat/Rocket.Chat/pull/26706)) + +- Chore: Remove & Test old closeChat templates ([#26631](https://github.com/RocketChat/Rocket.Chat/pull/26631)) + +- Chore: Remove console.log ([#26618](https://github.com/RocketChat/Rocket.Chat/pull/26618)) + +- Chore: Remove italic/bold font-style from system messages ([#26655](https://github.com/RocketChat/Rocket.Chat/pull/26655)) + + It was removed from system messages font-styles elements (italic and bold) that highlighted some words as `users`, `room_name` and others. + + In addition to this PR, was also created a PR to Fuselage to remove italic font style in general at system messages. + + Fuselage PR: https://github.com/RocketChat/fuselage/pull/830 + +- Chore: Remove Livechat Dashboard Templates ([#26627](https://github.com/RocketChat/Rocket.Chat/pull/26627)) + +- Chore: Remove method calls - Stage 1 ([#26149](https://github.com/RocketChat/Rocket.Chat/pull/26149) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Remove public and node_modules folders from TypeScript server watcher ([#26391](https://github.com/RocketChat/Rocket.Chat/pull/26391)) + +- Chore: Remove settings Fibers usage ([#26465](https://github.com/RocketChat/Rocket.Chat/pull/26465)) + +- Chore: Remove translation owners ([#26598](https://github.com/RocketChat/Rocket.Chat/pull/26598)) + +- Chore: Remove trash collection from models when not used ([#26628](https://github.com/RocketChat/Rocket.Chat/pull/26628) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: remove useMethod calls ([#26195](https://github.com/RocketChat/Rocket.Chat/pull/26195) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Remove visitor, agent and customTemplate meteor templates ([#26700](https://github.com/RocketChat/Rocket.Chat/pull/26700)) + +- Chore: Replace direct multiple icon ([#26342](https://github.com/RocketChat/Rocket.Chat/pull/26342) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Replace timeAgo on WebdavFilePickerTable ([#26564](https://github.com/RocketChat/Rocket.Chat/pull/26564) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: restrict `.only` ([#26537](https://github.com/RocketChat/Rocket.Chat/pull/26537) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Rewrite custom OAuth Modals to react ([#26204](https://github.com/RocketChat/Rocket.Chat/pull/26204)) + +- Chore: Rewrite Location modal to React ([#26196](https://github.com/RocketChat/Rocket.Chat/pull/26196)) + +- Chore: Rewrite SaveToWebdav Modal to React Component ([#24365](https://github.com/RocketChat/Rocket.Chat/pull/24365)) + + ### before + ![Screen Shot 2022-01-31 at 11 02 34](https://user-images.githubusercontent.com/27704687/151807376-6dc87be5-287a-45a0-ac1b-47a7cdf4e3d3.png) + + ### after + ![Screen Shot 2022-01-31 at 10 58 04](https://user-images.githubusercontent.com/27704687/151806686-7110cec8-a006-4ac1-befd-a2684550ecc5.png) + +- Chore: Rewrite VerticalBarOldActions to TS ([#26277](https://github.com/RocketChat/Rocket.Chat/pull/26277) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Separating user edit form to prevent browser autocomplete ([#26280](https://github.com/RocketChat/Rocket.Chat/pull/26280) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + + Separating user edit form to prevent browser password and username auto-complete. + The browser will continue showing the suggestion dropdown for the password field, but when you select a suggestion the other text field will not be impacted, as was happening before with 'Nickname' field + +- Chore: skipping tests that are based on kebab menu ([#26616](https://github.com/RocketChat/Rocket.Chat/pull/26616) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: test for change avatar ([#26543](https://github.com/RocketChat/Rocket.Chat/pull/26543)) + +- Chore: Tests intermitences ([#26464](https://github.com/RocketChat/Rocket.Chat/pull/26464)) + +- Chore: transfer to another agent ([#26545](https://github.com/RocketChat/Rocket.Chat/pull/26545) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Update Apps-Engine ([#26765](https://github.com/RocketChat/Rocket.Chat/pull/26765)) + +- Chore: update codeowners for omnichannel ([#25771](https://github.com/RocketChat/Rocket.Chat/pull/25771)) + +- Chore: update fuselage rounded edition ([#26540](https://github.com/RocketChat/Rocket.Chat/pull/26540) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Upgrade dependencies ([#26694](https://github.com/RocketChat/Rocket.Chat/pull/26694)) + +- Chore: Upgrade ESLint ([#26132](https://github.com/RocketChat/Rocket.Chat/pull/26132)) + + Upgrade ESLint (to 8.19.0) and its dependencies, dropping outdated rules. + +- Chore: Upgrade Fuselage packages to next dist-tag ([#26435](https://github.com/RocketChat/Rocket.Chat/pull/26435)) + +- Chore: Upgrade nivo and React Query ([#26338](https://github.com/RocketChat/Rocket.Chat/pull/26338)) + +- Chore: Use Docker compose on CI ([#26437](https://github.com/RocketChat/Rocket.Chat/pull/26437)) + +- Chore: useEndpointData deprecation ([#26494](https://github.com/RocketChat/Rocket.Chat/pull/26494)) + +- Chore: Wait subscription to expose message composer ([#26600](https://github.com/RocketChat/Rocket.Chat/pull/26600)) + +- i18n: Fix Korean set role translation ([#24966](https://github.com/RocketChat/Rocket.Chat/pull/24966) by [@imyaman](https://github.com/imyaman)) + + English https://pbs.twimg.com/media/FO2zby1aQAMB84D?format=png&name=small + Korean https://pbs.twimg.com/media/FO2zWgKaIAYidJ7?format=png&name=small + Google Translate https://pbs.twimg.com/media/FO20MPnaUAU-TU_?format=jpg&name=medium + +- i18n: Language update from LingoHub 🤖 on 2022-08-01Z ([#26429](https://github.com/RocketChat/Rocket.Chat/pull/26429)) + +- i18n: Language update from LingoHub 🤖 on 2022-08-08Z ([#26508](https://github.com/RocketChat/Rocket.Chat/pull/26508) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- i18n: Language update from LingoHub 🤖 on 2022-08-15Z ([#26570](https://github.com/RocketChat/Rocket.Chat/pull/26570) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- i18n: Language update from LingoHub 🤖 on 2022-08-22Z ([#26645](https://github.com/RocketChat/Rocket.Chat/pull/26645) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- i18n: Makes the text less ambiguous ([#20895](https://github.com/RocketChat/Rocket.Chat/pull/20895) by [@pierreozoux](https://github.com/pierreozoux)) + +- i18n: Manual sync from LingoHub ([#26397](https://github.com/RocketChat/Rocket.Chat/pull/26397)) + +- i18n: pt-BR translation typo ([#26732](https://github.com/RocketChat/Rocket.Chat/pull/26732)) + +- Regression: "Cache size is not a function" error when booting ([#26683](https://github.com/RocketChat/Rocket.Chat/pull/26683) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Regression: Add alsoSendThreadToChannel to user settings api ([#26663](https://github.com/RocketChat/Rocket.Chat/pull/26663) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Regression: AutoTranslate is disabled error ([#26701](https://github.com/RocketChat/Rocket.Chat/pull/26701)) + +- Regression: Banner - Room not found - Omnichannel room ([#26693](https://github.com/RocketChat/Rocket.Chat/pull/26693)) + +- Regression: CI ([#26658](https://github.com/RocketChat/Rocket.Chat/pull/26658)) + +- Regression: Custom fields not being saved for room ([#26747](https://github.com/RocketChat/Rocket.Chat/pull/26747)) + +- Regression: Custom status loading forever in Usercard ([#26656](https://github.com/RocketChat/Rocket.Chat/pull/26656)) + +- Regression: Empty custom-fields filter on Current Chats causing issues ([#26720](https://github.com/RocketChat/Rocket.Chat/pull/26720)) + +- Regression: Fix Current Chats Page Issues ([#26744](https://github.com/RocketChat/Rocket.Chat/pull/26744)) + +- Regression: Fix spacing problem on AppStatus component ([#26421](https://github.com/RocketChat/Rocket.Chat/pull/26421)) + + Fixed a problem where the AppStatus component would show a unwanted margin when an app was installed and had an update. + Before: + ![image](https://user-images.githubusercontent.com/43561537/181837343-c51ed297-442c-4507-aff3-20df5ac9366a.png) + + After: + ![image](https://user-images.githubusercontent.com/43561537/181838756-b04fe31c-9e85-4830-8dd4-fddf8ec03458.png) + +- Regression: Home cards UI tweaks ([#26610](https://github.com/RocketChat/Rocket.Chat/pull/26610) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Regression: Instances Modal breaking ([#26779](https://github.com/RocketChat/Rocket.Chat/pull/26779)) + + Revert back to meteor method for now. + +- Regression: invalid statistics format ([#26684](https://github.com/RocketChat/Rocket.Chat/pull/26684) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Regression: Modal footer alignment ([#26635](https://github.com/RocketChat/Rocket.Chat/pull/26635) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Regression: Prevent message from being temp forever ([#26668](https://github.com/RocketChat/Rocket.Chat/pull/26668) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Regression: Remove log from banners.ts ([#26699](https://github.com/RocketChat/Rocket.Chat/pull/26699)) + +- Regression: REST setUserPublicAndPrivateKeys ([#26753](https://github.com/RocketChat/Rocket.Chat/pull/26753)) + +- Regression: Select settings options not visible on Apps Setting panel ([#26759](https://github.com/RocketChat/Rocket.Chat/pull/26759)) + +- Regression: Sidebar Search list local data cache and keyboard navigation ([#26764](https://github.com/RocketChat/Rocket.Chat/pull/26764)) + +- Regression: Team name validation failing always. ([#26574](https://github.com/RocketChat/Rocket.Chat/pull/26574)) + +- Regression: Update custom homepage content behavior ([#26571](https://github.com/RocketChat/Rocket.Chat/pull/26571) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Regression: Visitor being overwritten on call end ([#26756](https://github.com/RocketChat/Rocket.Chat/pull/26756)) + + This PR adds a check to the `createRoom` method, responsible for creating VoIP rooms. It checks whether the visitor already exists before creating a new one, if one is found it uses it instead of overwriting existing visitors. + +- Regression: Workaround to handle auto stopped computations 😞 ([#26745](https://github.com/RocketChat/Rocket.Chat/pull/26745)) + +- Release 5.0.1 ([#26450](https://github.com/RocketChat/Rocket.Chat/pull/26450)) + +- Release 5.0.2 ([#26507](https://github.com/RocketChat/Rocket.Chat/pull/26507)) + +- Release 5.0.3 ([#26551](https://github.com/RocketChat/Rocket.Chat/pull/26551)) + +- Release 5.0.4 ([#26620](https://github.com/RocketChat/Rocket.Chat/pull/26620)) + +- Release 5.0.5 ([#26718](https://github.com/RocketChat/Rocket.Chat/pull/26718)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Karting06](https://github.com/Karting06) +- [@imyaman](https://github.com/imyaman) +- [@kodiakhq[bot]](https://github.com/kodiakhq[bot]) +- [@pierreozoux](https://github.com/pierreozoux) +- [@shrinish123](https://github.com/shrinish123) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@AllanPazRibeiro](https://github.com/AllanPazRibeiro) +- [@KevLehman](https://github.com/KevLehman) +- [@LucianoPierdona](https://github.com/LucianoPierdona) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@albuquerquefabio](https://github.com/albuquerquefabio) +- [@aleksandernsilva](https://github.com/aleksandernsilva) +- [@carlosrodrigues94](https://github.com/carlosrodrigues94) +- [@casalsgh](https://github.com/casalsgh) +- [@cauefcr](https://github.com/cauefcr) +- [@d-gubert](https://github.com/d-gubert) +- [@debdutdeb](https://github.com/debdutdeb) +- [@dougfabris](https://github.com/dougfabris) +- [@felipe-rod123](https://github.com/felipe-rod123) +- [@filipemarins](https://github.com/filipemarins) +- [@gabriellsh](https://github.com/gabriellsh) +- [@ggazzo](https://github.com/ggazzo) +- [@guijun13](https://github.com/guijun13) +- [@hugocostadev](https://github.com/hugocostadev) +- [@jeanfbrito](https://github.com/jeanfbrito) +- [@juliajforesti](https://github.com/juliajforesti) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@rique223](https://github.com/rique223) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@souzaramon](https://github.com/souzaramon) +- [@tapiarafael](https://github.com/tapiarafael) +- [@tassoevan](https://github.com/tassoevan) +- [@tiagoevanp](https://github.com/tiagoevanp) +- [@weslley543](https://github.com/weslley543) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 5.0.5 +`2022-08-29 · 3 🐛 · 1 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.19.3` +- NPM: `6.14.17` +- MongoDB: `4.2, 4.4, 5.0` + +### 🐛 Bug fixes + + +- **ENTERPRISE:** Omnichannel real time data on micro services ([#26703](https://github.com/RocketChat/Rocket.Chat/pull/26703)) + +- Business Units endpoints not filtering by Unit type ([#26713](https://github.com/RocketChat/Rocket.Chat/pull/26713)) + +- Omnichannel inquiries being updated even if not needed ([#26692](https://github.com/RocketChat/Rocket.Chat/pull/26692)) + +
+🔍 Minor changes + + +- Release 5.0.5 ([#26718](https://github.com/RocketChat/Rocket.Chat/pull/26718)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@Harmeet221](https://github.com/Harmeet221) +- [@KevLehman](https://github.com/KevLehman) +- [@murtaza98](https://github.com/murtaza98) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 5.0.4 +`2022-08-19 · 1 🐛 · 3 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.19.3` +- NPM: `6.14.17` +- MongoDB: `4.2, 4.4, 5.0` + +### 🐛 Bug fixes + + +- **ENTERPRISE:** User not marked as offline on log out when using micro services ([#26579](https://github.com/RocketChat/Rocket.Chat/pull/26579) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +
+🔍 Minor changes + + +- Chore: Fix services image publish do DockerHub ([#26608](https://github.com/RocketChat/Rocket.Chat/pull/26608)) + +- Regression: Fix services Docker build ([#26617](https://github.com/RocketChat/Rocket.Chat/pull/26617)) + +- Release 5.0.4 ([#26620](https://github.com/RocketChat/Rocket.Chat/pull/26620)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@kodiakhq[bot]](https://github.com/kodiakhq[bot]) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@murtaza98](https://github.com/murtaza98) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 5.0.3 +`2022-08-11 · 3 🐛 · 2 🔍 · 8 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.19.3` +- NPM: `6.14.17` +- MongoDB: `4.2, 4.4, 5.0` + +### 🐛 Bug fixes + + +- Chats holds to load history for some time ([#26425](https://github.com/RocketChat/Rocket.Chat/pull/26425)) + +- Endpoints not working when using "Use Real Name" setting ([#26530](https://github.com/RocketChat/Rocket.Chat/pull/26530) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + + The list of endpoints affected is: + + - `/api/v1/channels.list` + - `/api/v1/channels.list.joined` + - `/api/v1/groups.list` + - `/api/v1/groups.listAll` + - `/api/v1/im.list` + - `/api/v1/im.list.everyone` + +- LDAP fails to sync teams when the user DN has escaped characters. ([#26535](https://github.com/RocketChat/Rocket.Chat/pull/26535) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +
+🔍 Minor changes + + +- Chore: validateParams to accept different validators per request method ([#26357](https://github.com/RocketChat/Rocket.Chat/pull/26357)) + +- Release 5.0.3 ([#26551](https://github.com/RocketChat/Rocket.Chat/pull/26551)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@kodiakhq[bot]](https://github.com/kodiakhq[bot]) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@filipemarins](https://github.com/filipemarins) +- [@gabriellsh](https://github.com/gabriellsh) +- [@ggazzo](https://github.com/ggazzo) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 5.0.2 +`2022-08-08 · 2 🐛 · 1 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.19.3` +- NPM: `6.14.17` +- MongoDB: `4.2, 4.4, 5.0` + +### 🐛 Bug fixes + + +- Empty results on `im.list` endpoint ([#26438](https://github.com/RocketChat/Rocket.Chat/pull/26438)) + +- Undefined MediaDevices error on HTTP ([#26396](https://github.com/RocketChat/Rocket.Chat/pull/26396)) + +
+🔍 Minor changes + + +- Release 5.0.2 ([#26507](https://github.com/RocketChat/Rocket.Chat/pull/26507)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@albuquerquefabio](https://github.com/albuquerquefabio) +- [@murtaza98](https://github.com/murtaza98) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 5.0.1 +`2022-08-02 · 1 🚀 · 1 🐛 · 4 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.19.3` +- NPM: `6.14.17` +- MongoDB: `4.2, 4.4, 5.0` + +### 🚀 Improvements + + +- Use single change stream to watch DB changes ([#26336](https://github.com/RocketChat/Rocket.Chat/pull/26336)) + +### 🐛 Bug fixes + + +- Not possible to deactivate users ([#26323](https://github.com/RocketChat/Rocket.Chat/pull/26323)) + +
+🔍 Minor changes + + +- Chore: Convert UserCardWithData to ts ([#26192](https://github.com/RocketChat/Rocket.Chat/pull/26192) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Remove square prop from IconButton ([#26343](https://github.com/RocketChat/Rocket.Chat/pull/26343) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Regression: Fix app privacy links opening in desktop client instead of browser ([#26368](https://github.com/RocketChat/Rocket.Chat/pull/26368)) + + Demo gif: + ![privacy-links](https://user-images.githubusercontent.com/43561537/181083695-bc37b5c2-8aa5-4714-9098-9ad02d2fc2bb.gif) + +- Release 5.0.1 ([#26450](https://github.com/RocketChat/Rocket.Chat/pull/26450)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@kodiakhq[bot]](https://github.com/kodiakhq[bot]) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@dougfabris](https://github.com/dougfabris) +- [@rique223](https://github.com/rique223) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 5.0.0 +`2022-07-21 · 14 ️️️⚠️ · 33 🎉 · 20 🚀 · 110 🐛 · 389 🔍 · 63 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.19.3` +- NPM: `6.14.17` +- MongoDB: `4.2, 4.4, 5.0` + +### ⚠️ BREAKING CHANGES + + +- Chore: Remove unused tokenpass integration code ([#25831](https://github.com/RocketChat/Rocket.Chat/pull/25831)) + +- Deactivated team members are added to auto-join rooms ([#25016](https://github.com/RocketChat/Rocket.Chat/pull/25016)) + + - Do not add deactivated users to auto-join rooms. + +- Remove Blockstack authentication ([#25649](https://github.com/RocketChat/Rocket.Chat/pull/25649)) + + Blockstack authentication is broken and is preventing some dependencies to be up to date. As a migration to Stacks authentication is not trivial, we've opted for removing the authentication service. + +- Remove RDStation integration ([#25774](https://github.com/RocketChat/Rocket.Chat/pull/25774)) + +- Remove show message in main thread preference ([#26002](https://github.com/RocketChat/Rocket.Chat/pull/26002)) + + This PR removes the confusion between the `show message in main thread` and the function `also to send to channel`. In the past, we used the `show message in main thread` as a solution to help users to understand the thread feature, as this feature is now mature enough there's no reason to maintain this preference. + + Send the thread message to the main channel or just inside of the thread, should be a decision from the user where the function `also send to channel` appears. Because of that, and because of a bunch of requests and issues we received, we're introducing a new preference `also send thread to channel` where users will be able to decide the behavior of the checkbox. + + ![image](https://user-images.githubusercontent.com/27704687/175655594-023c5907-adc8-4924-ba7d-467608d06fec.png) + + Now there are three behavior options + - `Default`: when it unchecks after sending the first message + + + - `Always`: stay checked for all messages + + + - `Never`: stay unchecked for all messages + + +- Remove support to old MongoDB versions ([#26098](https://github.com/RocketChat/Rocket.Chat/pull/26098)) + + As per MongoDB Lifecycle Schedules (https://www.mongodb.com/support-policy/lifecycles) we're removing official support to MongoDB versions **3.6 and 4.0** that have already reached end-of-life. + + As MongoDB 4.2 was a "supported" version before Rocket.Chat 5.0, we'll continue supporting it, but will be flagged as deprecated. We recommend upgrading to MongoDB 4.4+. + + Here are official docs on how to upgrade to some of the supported versions: + + - https://www.mongodb.com/docs/manual/release-notes/4.2-upgrade-replica-set/ + - https://www.mongodb.com/docs/v4.4/release-notes/4.4-upgrade-replica-set/ + - https://www.mongodb.com/docs/manual/release-notes/5.0-upgrade-replica-set/ + +- remove unused endpoints and restify others ([#25889](https://github.com/RocketChat/Rocket.Chat/pull/25889)) + +- Remove webRTC for channels/dm/groups ([#26225](https://github.com/RocketChat/Rocket.Chat/pull/26225)) + +- Suspend push notifications when login token is invalidated ([#20913](https://github.com/RocketChat/Rocket.Chat/pull/20913) by [@g-thome](https://github.com/g-thome)) + + link the auth token to the push token + +- Upgrade to version 5.0 can be done only from version 4.x ([#26100](https://github.com/RocketChat/Rocket.Chat/pull/26100)) + +- use urlParams on omnichannel/agent/extension/ ([#25982](https://github.com/RocketChat/Rocket.Chat/pull/25982)) + +- use urlParams on omnichannel/agent/extension/ ([#25874](https://github.com/RocketChat/Rocket.Chat/pull/25874)) + +- use urlParams on omnichannel/agent/extension/" ([#25980](https://github.com/RocketChat/Rocket.Chat/pull/25980)) + +- VideoConference ([#25570](https://github.com/RocketChat/Rocket.Chat/pull/25570)) + + In this PR we're deprecating the Video Conference functionality from the core of the application and introducing a **new video conference flow**: + + + + Now the video conference feature will be agnostic so you'll be able to set the provider such as **Jisti** and **BBB** as apps from our marketplace: + + + + Video conferences settings are now global, allowing you to set the default provider + + + + ### [Enterprise Features] + - Video Conferences List + + + - Ringing function for direct messages + + + + + +### 🎉 New features + + +- **APPS:** Allow apps to modify a subset of global settings ([#25913](https://github.com/RocketChat/Rocket.Chat/pull/25913)) + +- **APPS:** Allow dispatchment of actions from input elements ([#25949](https://github.com/RocketChat/Rocket.Chat/pull/25949)) + + This allows for apps receiving block actions when a user types on a plain text input field or selects an item from the static. A debounce of 700 ms is done when listening for typing action so the app is not flooded with actions. + + + https://user-images.githubusercontent.com/733282/174858175-5ea53046-c791-493e-859b-b80431e94ffa.mp4 + +- **APPS:** Allowing apps to register authenticated routes ([#25937](https://github.com/RocketChat/Rocket.Chat/pull/25937)) + + Adds adaptations that allow apps to declare an API endpoint that requires authorization from Rocket.Chat prior to executing + +- **ENTERPRISE:** Device Management ([#25791](https://github.com/RocketChat/Rocket.Chat/pull/25791)) + +- **ENTERPRISE:** Introducing dial pad component into sidebar, calls table, contextual bar ([#26081](https://github.com/RocketChat/Rocket.Chat/pull/26081)) + + This PR adds a new call button that can be used from Sidebar & Contact Center. This also enables Omnichannel agents to make outbound calls from within Rocket.Chat. + + Depending on your server and call server configuration, you can do international calling, national and domestic calling. + + The buttons on Contact Center allows an agent to call an existing number without having to type the number again. + +- Ability for RC server to check the business hour for a specific department ([#25436](https://github.com/RocketChat/Rocket.Chat/pull/25436)) + +- Accept quoted slash command arguments ([#11744](https://github.com/RocketChat/Rocket.Chat/pull/11744) by [@Hudell](https://github.com/Hudell)) + +- Add expire index to integration history ([#25087](https://github.com/RocketChat/Rocket.Chat/pull/25087)) + +- Add new app events for pin, react and follow message ([#25337](https://github.com/RocketChat/Rocket.Chat/pull/25337)) + +- Add new events after user login, logout and change his status ([#25234](https://github.com/RocketChat/Rocket.Chat/pull/25234)) + +- Add option to show mentions badge when show counter is disabled ([#25329](https://github.com/RocketChat/Rocket.Chat/pull/25329)) + +- Add user events for apps ([#25165](https://github.com/RocketChat/Rocket.Chat/pull/25165)) + +- Adding app button on user dropdown ([#25326](https://github.com/RocketChat/Rocket.Chat/pull/25326)) + +- Alpha Matrix Federation ([#23688](https://github.com/RocketChat/Rocket.Chat/pull/23688)) + + Experimental support for Matrix Federation with a Bridge + + https://user-images.githubusercontent.com/51996/164530391-e8b17ecd-a4d0-4ef8-a8b7-81230c1773d3.mp4 + +- Colors Palette - Buttons ([#25626](https://github.com/RocketChat/Rocket.Chat/pull/25626)) + +- Community Edition Watermark ([#25844](https://github.com/RocketChat/Rocket.Chat/pull/25844)) + +- Create releases tab in the marketplace app info page ([#25965](https://github.com/RocketChat/Rocket.Chat/pull/25965)) + + Added a Releases tab to the app info page of installed marketplace apps. This tab will show all the released versions of a given app with its version number, release date in humanized form, and the changelog of this given release with the information provided by the publisher, this changelog accepts and renders markdown. Also refactored some component names and logic for maintainability reasons. + Demo gif: + ![app-releases-tab-final](https://user-images.githubusercontent.com/43561537/176228928-651074ce-1f8b-4531-95be-1dd107938bf3.gif) + +- Create Team with a member list of usernames ([#25868](https://github.com/RocketChat/Rocket.Chat/pull/25868)) + +- Enable outbound calling for EE (#25843) ([#25960](https://github.com/RocketChat/Rocket.Chat/pull/25960) by [@amolghode1981](https://github.com/amolghode1981)) + +- Engagement Metrics - Phase 2 ([#25505](https://github.com/RocketChat/Rocket.Chat/pull/25505)) + + Add the following new statistics (metrics): + - Total Broadcast rooms + - Total rooms with an active Livestream; + - Total triggered emails; + - Total subscription roles; + - Total User Roles; + - Total uncaught exceptions; + - `homeTitleChanged`: boolean value to indicate whether the `Layout_Home_Title` setting has been changed; + - `homeBodyChanged`: boolean value to indicate whether the `Layout_Home_Body` setting has been changed; + - `customCSSChanged`: boolean value to indicate whether the `theme-custom-css` setting has been changed; + - `onLogoutCustomScriptChanged`: boolean value to indicate whether the `Custom_Script_On_Logout` setting has been changed; + - `loggedOutCustomScriptChanged`: boolean value to indicate whether the `Custom_Script_Logged_Out` setting has been changed; + - `loggedInCustomScriptChanged`: boolean value to indicate whether the `Custom_Script_Logged_In` setting has been changed; + - `matrixBridgeEnabled`: boolean value to indicate whether the Matrix bridge has been enabled; + +- Expand Apps Engine's environment variable allowed list ([#23870](https://github.com/RocketChat/Rocket.Chat/pull/23870) by [@cuonghuunguyen](https://github.com/cuonghuunguyen)) + +- Federation (Alpha Stabilization) ([#25457](https://github.com/RocketChat/Rocket.Chat/pull/25457)) + +- Fuselage ToastBar ([#25583](https://github.com/RocketChat/Rocket.Chat/pull/25583)) + + ![Kapture 2022-05-20 at 14 50 19](https://user-images.githubusercontent.com/27704687/169584462-270e73aa-6dbe-4045-9847-d429125f15a6.gif) + +- Get user's preferred language via apps ([#25514](https://github.com/RocketChat/Rocket.Chat/pull/25514)) + +- Marketplace new app details page ([#24711](https://github.com/RocketChat/Rocket.Chat/pull/24711)) + + Change the app details page layout for the new marketplace UI. General Task: [MKP12 - New UI - App Detail Page](https://app.clickup.com/t/1na769h) + + ## [MKP12 - Tab Navigation](https://app.clickup.com/t/2452f5u) + New tab navigation layout for the app details page. Now the app details page is divided into three sections, details, logs, and settings, that can each be accessed through a Tabs fuselage component. + + Demo gif: + ![tab_navigation_demo_gif](https://user-images.githubusercontent.com/43561537/157276436-3dab34c5-20da-4f5d-99d0-54c1c718ac1f.gif) + + ## [MKP12 - Header](https://app.clickup.com/t/25rhm0x) + Implemented a new header for the marketplaces app details page. + -Changed the size of the app name; + -Implemented the app description field on the header; + -Changed the "metadata" section of the header(The part with the version and author information) now it also shows the last time the app was updated; + -Created a chip that will show when an app is part of one or more bundles and inform which are the bundles; + -Implemented a tooltip for the bundle chips; + -Created a new button + data badge component to substitute the current App Status; + -Changed the title of the "purchase button". Now it shows different text based on the "purchase type" of the app; + -Created a new Pricing & Status display which shows the price when the app is not bought/installed and shows the app status(Enabled/Disabled) when it is bought/installed; + -Changed the way the tabs are rendered, now if the app is not installed(and consequently doesn't have logs and settings tab) it will not render these tabs; + + Demo gif: + ![new-header-gif](https://user-images.githubusercontent.com/43561537/159064599-fd64dfe2-86a3-47da-81ba-1e83f1b87432.gif) + + ## [MKP12 - Configuration Tab](https://app.clickup.com/t/2452gh4) + Delivered together with the tab-navigation task. Changed the app settings from the details of the app to the new settings tab. + Demo image: + ![New configuration tab](https://user-images.githubusercontent.com/43561537/160211324-95db0566-85bf-4dde-a814-3c6f23dcee4d.png) + + ## [MKP12 - Log Tab](https://app.clickup.com/t/2452gg1) + Changed the place of the app logs from the page to the new logs tab. Also changed some styles of the logs accordions to fit better with the new container. + + Before: + ![Before](https://user-images.githubusercontent.com/43561537/160210302-148ce584-604f-40ff-8209-141667016163.png) + + After + ![After](https://user-images.githubusercontent.com/43561537/160210984-d4060c5a-f912-4ef9-87e3-fa459080e2d4.png) + + ## [MKP12 - Page Header](https://app.clickup.com/t/29b0b12) + Changed the design for the page header of the app details page from a title on the left with a save and back button on the right to a back arrow icon on the left side of the title with the save button still on the right. Also changed the title of the page from App details to Back. + Edit: After some design reconsideration, the page title was changed to App Info. + Demo gif: + ![new_page_header_app_details](https://user-images.githubusercontent.com/43561537/160937741-f5514f70-f43b-4400-8b2f-a5a26f95de9d.gif) + + ## [MKP12 - Detail Tab](https://app.clickup.com/t/2452gf7) + Implemented markdown on the description section of the app details page, now the description will show the detailedDescription.rendered (as rendered JSX) information in case it exists and show the description (a.k.a. short description) information in case it doesn't. Unfortunately, as of right now no app has a visual example of a markdown description and because of that, I will not be able to provide a demo image/gif for this PR. + + ## [MKP12 - Slider Component](https://app.clickup.com/t/2452h26) + Created an image carousel component on the app details page. This component receives images from the apps/appId/screenshots endpoint and shows them on the content section of the app details of any apps that have screenshots registered, if the app has no screenshots it simply shows nothing where the carousel should be. This component is complete with keyboard arrow navigation on the "open" carousel, hover highlight on the carousel preview and close on esc press. + Demo gif: + ![new_carousel_component](https://user-images.githubusercontent.com/43561537/167415212-9d8359c7-4132-4afa-a698-8be4ab1e1393.gif) + +- Marketplace security tab app info page ([#25739](https://github.com/RocketChat/Rocket.Chat/pull/25739)) + + Created a new security tab for installed apps that displays information related to the given app security policies, terms of services, and necessary permissions for the use of the app. + Demo gif: + ![privacy-tab](https://user-images.githubusercontent.com/43561537/173878394-333057d4-3c7e-434e-a3ca-d3e08f33c7bc.gif) + +- Matrix Federation UX improvements ([#25847](https://github.com/RocketChat/Rocket.Chat/pull/25847)) + +- Message Template React Component ([#23971](https://github.com/RocketChat/Rocket.Chat/pull/23971)) + + Complete rewrite of the messages component in react. Visual changes should be minimal as well as user impact, with no break changes (unless you've customized the blaze template). + + + + ![Screen Shot 2022-04-05 at 11 14 18](https://user-images.githubusercontent.com/27704687/161774027-38dd9c7b-eeeb-45e2-b9d8-ea2a9be8486d.png) + In case you encounter any problems, or want to compare, temporarily it is possible to use the old version + + image + +- New button for network outage ([#25499](https://github.com/RocketChat/Rocket.Chat/pull/25499) by [@amolghode1981](https://github.com/amolghode1981)) + + When network outage happens it should be conveyed to the user with special icon. This icon should not be clickable. + Network outage handling is handled in https://app.clickup.com/t/245c0d8 task. + +- New stats rewrite ([#25078](https://github.com/RocketChat/Rocket.Chat/pull/25078) by [@ostjen](https://github.com/ostjen)) + + Add the following new statistics (**metrics**): + + - Total users with TOTP enabled; + - Total users with 2FA enabled; + - Total pinned messages; + - Total starred messages; + - Total email messages; + - Total rooms with at least one starred message; + - Total rooms with at least one pinned message; + - Total encrypted rooms; + - Total link invitations; + - Total email invitations; + - Logo change; + - Number of rooms inside teams; + - Number of default (auto-join) rooms inside teams; + - Number of users created through link invitation; + - Number of users created through manual entry; + - Number of imported users (by import type); + +- Star message, report and delete message events ([#25383](https://github.com/RocketChat/Rocket.Chat/pull/25383)) + +- Use setting to determine if initial general channel is needed ([#25441](https://github.com/RocketChat/Rocket.Chat/pull/25441) by [@felipe-menelau](https://github.com/felipe-menelau)) + + - Adds flag responsible for overwriting #general channel creation + +- VoIP Input/Output Device Selection ([#25966](https://github.com/RocketChat/Rocket.Chat/pull/25966) by [@amolghode1981](https://github.com/amolghode1981)) + +### 🚀 Improvements + + +- **ENTERPRISE:** Allow mapping LDAP groups to multiple RC roles ([#23849](https://github.com/RocketChat/Rocket.Chat/pull/23849)) + + - Add support to mapping LDAP groups to multiple roles (by specifying arrays in the "User Data Group Map" enterprise setting. + +- Add OTR Room States ([#24565](https://github.com/RocketChat/Rocket.Chat/pull/24565)) + + Earlier OTR room uses only 2 states, we need more states to support future features. + This adds more states for the OTR contextualBar. + + - Expired + Screen Shot 2022-04-20 at 13 55 52 + + - Declined + Screen Shot 2022-04-20 at 13 49 28 + + - Error + Screen Shot 2022-04-20 at 13 55 26 + +- Add tooltip to sidebar room menu ([#24405](https://github.com/RocketChat/Rocket.Chat/pull/24405) by [@Himanshu664](https://github.com/Himanshu664)) + +- add warnings for federation setup ([#25684](https://github.com/RocketChat/Rocket.Chat/pull/25684)) + +- Added MaxNickNameLength and MaxBioLength constants ([#25231](https://github.com/RocketChat/Rocket.Chat/pull/25231) by [@aakash-gitdev](https://github.com/aakash-gitdev)) + +- Added tooltip options for message menu ([#24431](https://github.com/RocketChat/Rocket.Chat/pull/24431) by [@Himanshu664](https://github.com/Himanshu664)) + +- Avoid using omnichannel-queue collection ([#25491](https://github.com/RocketChat/Rocket.Chat/pull/25491)) + +- Differ Voip calls from Incoming and Outgoing ([#25643](https://github.com/RocketChat/Rocket.Chat/pull/25643)) + + Updated this column and its respective endpoints to support inbound/outfound call definitions + ![image](https://user-images.githubusercontent.com/34130764/170512008-34202ed8-3ed4-4c28-baa5-25efc17543d5.png) + +- Expand the feature set of the new message rendering ([#25970](https://github.com/RocketChat/Rocket.Chat/pull/25970)) + + - Everything inside a new package (`@rocket.chat/gazzodown`); + - KaTeX support; + - Highlighted Words support; + - Emoji rendering expanded; + - Code rendering fixed + +- Fix multiple bugs with Matrix bridge ([#25318](https://github.com/RocketChat/Rocket.Chat/pull/25318)) + +- Improve active/hover colors in account sidebar ([#25024](https://github.com/RocketChat/Rocket.Chat/pull/25024) by [@Himanshu664](https://github.com/Himanshu664)) + +- Moved call hold/unhold to EE ([#26007](https://github.com/RocketChat/Rocket.Chat/pull/26007)) + + This PR adds a restriction, enabling the feature to hold/unhold calls only for Enterprise Edition users. + +- Moved call wrap up modal to EE ([#25875](https://github.com/RocketChat/Rocket.Chat/pull/25875)) + + This PR adds a restriction, enabling the feature to display the call wrap up modal only for Enterprise Edition users. + +- New admin settings Page ([#25439](https://github.com/RocketChat/Rocket.Chat/pull/25439)) + + ![Screen Shot 2022-05-09 at 11 31 58](https://user-images.githubusercontent.com/27704687/167432811-f4970f23-5dae-48a0-a427-92269d08a859.png) + +- Pass allowDiskUse to channel aggregations on engagement dashboard ([#22374](https://github.com/RocketChat/Rocket.Chat/pull/22374)) + +- Performance for some Omnichannel features ([#25217](https://github.com/RocketChat/Rocket.Chat/pull/25217)) + +- Refactor + unit tests for federation-v2 ([#25680](https://github.com/RocketChat/Rocket.Chat/pull/25680)) + + The main goal for this PR is to add the ability to add tests in our current federation-v2 implementation. + In this PR, I've added only unit tests (80%), but the goal is to add other kinds of tests in the near future. + + Also, I've created a diagram to show how this refactor was done, and how is the structure of the code + + ![image](https://user-images.githubusercontent.com/15324204/171039619-22168000-3626-424e-b408-18dea540f786.png) + +- Rename upgrade tab routes ([#25097](https://github.com/RocketChat/Rocket.Chat/pull/25097)) + + Change 'upgrade tab' routes names from camelCase ('goFullyFeatured') to kebab-case ('go-fully-featured') due to URL naming consistency. Changed types, main function and test. + +- Unify voip streams into single stream ([#25108](https://github.com/RocketChat/Rocket.Chat/pull/25108)) + +- VoIP admin page cleanup: remove unused settings ([#25993](https://github.com/RocketChat/Rocket.Chat/pull/25993)) + + https://app.clickup.com/t/2n4m61m + +### 🐛 Bug fixes + + +- `You and @yourUsername reacted with`title on reactions ([#25733](https://github.com/RocketChat/Rocket.Chat/pull/25733)) + +- Access issue on chat.getThreadsList ([#25750](https://github.com/RocketChat/Rocket.Chat/pull/25750)) + +- AccountBox checks for condition ([#25708](https://github.com/RocketChat/Rocket.Chat/pull/25708)) + +- Add katex render to new message react template ([#25239](https://github.com/RocketChat/Rocket.Chat/pull/25239)) + +- Add open user card to user avatar ([#25445](https://github.com/RocketChat/Rocket.Chat/pull/25445)) + +- Add reaction not working in legacy messages ([#25222](https://github.com/RocketChat/Rocket.Chat/pull/25222)) + +- Added invalid password error message ([#24714](https://github.com/RocketChat/Rocket.Chat/pull/24714) by [@Himanshu664](https://github.com/Himanshu664)) + +- Adjust email label in Setup Wizard i18n files ([#25260](https://github.com/RocketChat/Rocket.Chat/pull/25260)) + + - remove 'Company' label on onboarding email keys in certain languages + +- AgentOverview analytics wrong departmentId parameter ([#25073](https://github.com/RocketChat/Rocket.Chat/pull/25073) by [@paulobernardoaf](https://github.com/paulobernardoaf)) + + When filtering the analytics charts by department, data would not appear because the object: + ```js + { + value: "department-id", + label: "department-name" + } + ``` + was being used in the `departmentId` parameter. + + - Before: + ![image](https://user-images.githubusercontent.com/30026625/161832057-d96ffd21-a7dd-421e-bfaa-3b9f4a9127b2.png) + + - After: + ![image](https://user-images.githubusercontent.com/30026625/161831092-9ee77b51-b083-4f45-9c48-ab2e0511c4d6.png) + +- AgentsPage pagination ([#25820](https://github.com/RocketChat/Rocket.Chat/pull/25820)) + +- allow only livechat-agents to be contact manager for any omnichannel contact ([#25451](https://github.com/RocketChat/Rocket.Chat/pull/25451)) + +- Append path To Route For Custom Emoji ([#24379](https://github.com/RocketChat/Rocket.Chat/pull/24379)) + +- Attachments and OEmbed margins ([#25713](https://github.com/RocketChat/Rocket.Chat/pull/25713)) + +- Broken Omnichannel>Agents page ([#25731](https://github.com/RocketChat/Rocket.Chat/pull/25731)) + +- Bump meteor-node-stubs to version 1.2.3 ([#25669](https://github.com/RocketChat/Rocket.Chat/pull/25669) by [@Sh0uld](https://github.com/Sh0uld)) + + With meteor-node-stubs version 1.2.3 a bug was fixed, which occured in issue #25460 and probably #25513 (last one not tested). + For the issue in meteor see: https://github.com/meteor/meteor/issues/11974 + +- Change form body parameter charset to UTF-8 to fix issue #25456 ([#25673](https://github.com/RocketChat/Rocket.Chat/pull/25673) by [@divinespear](https://github.com/divinespear)) + + since [mscdex/busboy](https://github.com/mscdex/busboy) 1.5.0, new option named `defParamCharset` for form body parameter encoding is added with default value `latin1`, so unicode filenames are broken since 4.7.0. + + ![Screenshot from 2022-05-28 16-26-06](https://user-images.githubusercontent.com/126630/170815447-1f3bd579-243a-42d3-86f6-814aeaa30ce9.png) + +- Change NPS Vote identifier + nps index to unique ([#25423](https://github.com/RocketChat/Rocket.Chat/pull/25423)) + +- Click to join button Jitsi Call ([#25569](https://github.com/RocketChat/Rocket.Chat/pull/25569)) + + Added `ToolboxProvider` to `MessageListProvider` and fixed actionLink.js open function exec + +- Client disconnection on network loss ([#25170](https://github.com/RocketChat/Rocket.Chat/pull/25170) by [@amolghode1981](https://github.com/amolghode1981)) + + Agent gets disconnected (or Unregistered) from asterisk in multiple ways. The goal is that agent should remain online + unless agent explicitly logs off. + Agent can stop receiving calls in multiple ways due to network loss. Network loss can happen in following ways. + 1. User tries to switch the network. User experiences a glitch of disconnectivity. This can be simulated by turning the network off + in the network tab of chrome's dev tool. This can disconnect the UA if the disconnection happens just before the registration refresh. + 2. Second reason is when computer goes in sleep mode. + 3. Third reason is that when asterisk is crashed/in maintenance mode/explicitly stopped. + + Solution: + The idea is to detect the network disconnection and start the start the attempts to reconnect. + The detection of the disconnection does not happen in case#1. The SIPUA's UserAgent transport does not + call onDisconnected when network loss of such kind happens. To tackle this problem, window's online and offline event handlers are + used. + + The number of retries is configurable but ideally it is to be kept at -1. Whenever disconnection happens, it should keep on trying to + reconnect with increasing backoff time. This behaviour is useful when the asterisk is stopped. + + When the server is disconnected, it should be indicated on the phone button. + +- Client-generated sort parameters in channel directory ([#25768](https://github.com/RocketChat/Rocket.Chat/pull/25768) by [@BenWiederhake](https://github.com/BenWiederhake)) + +- Close room when dismiss wrap up call modal ([#25056](https://github.com/RocketChat/Rocket.Chat/pull/25056)) + +- Custom emoji reaction size ([#25393](https://github.com/RocketChat/Rocket.Chat/pull/25393)) + +- Custom sound error toast messages ([#24515](https://github.com/RocketChat/Rocket.Chat/pull/24515) by [@Himanshu664](https://github.com/Himanshu664)) + +- Deactivating user breaks if user is the only room owner ([#24933](https://github.com/RocketChat/Rocket.Chat/pull/24933) by [@sidmohanty11](https://github.com/sidmohanty11)) + + ## Before + + https://user-images.githubusercontent.com/73601258/160000871-cfc2f2a5-2a59-4d27-8049-7754d003dd48.mp4 + + + + ## After + https://user-images.githubusercontent.com/73601258/159998287-681ab475-ff33-4282-82ff-db751c59a392.mp4 + +- Desktop notification on multi-instance environments ([#25220](https://github.com/RocketChat/Rocket.Chat/pull/25220)) + +- Direct Reply ([#22588](https://github.com/RocketChat/Rocket.Chat/pull/22588)) + +- Discussion alphabetical ordering ([#25788](https://github.com/RocketChat/Rocket.Chat/pull/25788)) + + Added a validation in the prop used for sorting (loweCaseName) checking for a prop that only exists in discussions (prid) + +- Dynamic load matrix is enabled and handle failure ([#25495](https://github.com/RocketChat/Rocket.Chat/pull/25495)) + +- End call button disappearing when on-hold ([#24936](https://github.com/RocketChat/Rocket.Chat/pull/24936)) + +- Error "numRequestsAllowed" property in rateLimiter for REST API endpoint when upgrading ([#26058](https://github.com/RocketChat/Rocket.Chat/pull/26058)) + +- Failure to update Integration History index ([#25473](https://github.com/RocketChat/Rocket.Chat/pull/25473)) + +- Fix max-width message block ([#25686](https://github.com/RocketChat/Rocket.Chat/pull/25686)) + +- Fix prom-client new promise usage ([#25781](https://github.com/RocketChat/Rocket.Chat/pull/25781)) + +- fixes HTML sanitizing error. ([#25410](https://github.com/RocketChat/Rocket.Chat/pull/25410)) + + If the user sent a HTML message over our product to a livechat user the HTML would get rendered on the message box, this prevents it from happening. + +- Fixing app contextual bar functionality ([#25615](https://github.com/RocketChat/Rocket.Chat/pull/25615)) + +- Fixing Network connectivity issues with SIP client. ([#25391](https://github.com/RocketChat/Rocket.Chat/pull/25391) by [@amolghode1981](https://github.com/amolghode1981)) + + The previous PR https://github.com/RocketChat/Rocket.Chat/pull/25170 did not handle the issues completely. + This PR is expected to handle + 1. Clearing call related UI when the network is disconnected or switched. + 2. Do clean connectivity. There were few issues discovered in earlier implementation. e.g endpoint would randomly + get disconnected after a while. This was due to the fact that the earlier socket disconnection caused the + removal of contact on asterisk. This should be fixed in this PR. + 3. This PR contains a lot of logs. This will be removed before the final merge. + +- FormData uploads not working ([#25069](https://github.com/RocketChat/Rocket.Chat/pull/25069)) + +- Full error message is visible ([#24856](https://github.com/RocketChat/Rocket.Chat/pull/24856) by [@Himanshu664](https://github.com/Himanshu664)) + +- getUserMentionsByChannel method room permission ([#25748](https://github.com/RocketChat/Rocket.Chat/pull/25748)) + +- Importer fails to download files from URLs with query string params ([#25934](https://github.com/RocketChat/Rocket.Chat/pull/25934)) + +- Importer files are unnecessarily transferred over the network. ([#25919](https://github.com/RocketChat/Rocket.Chat/pull/25919)) + +- Incorrect websocket url in livechat widget ([#25261](https://github.com/RocketChat/Rocket.Chat/pull/25261)) + +- Initial members value on Create Channel Modal ([#26000](https://github.com/RocketChat/Rocket.Chat/pull/26000)) + + #### before + ![Screen Shot 2022-06-24 at 11 58 22](https://user-images.githubusercontent.com/27704687/175562315-221dbc9a-5695-4259-a8f7-644e2ff0ab36.png) + + #### after + ![Screen Shot 2022-06-24 at 11 59 38](https://user-images.githubusercontent.com/27704687/175562510-a4a6be49-bbd2-4aeb-aedb-a5a7a6f1159d.png) + +- Initial User not added to default channel ([#25544](https://github.com/RocketChat/Rocket.Chat/pull/25544)) + + If injecting initial user. The user wasn’t added to the default General channel + +- Integrations avatar attribute misuse ([#25283](https://github.com/RocketChat/Rocket.Chat/pull/25283)) + +- Invitation links don't redirect to the registration form ([#25082](https://github.com/RocketChat/Rocket.Chat/pull/25082)) + +- Kebab menu clicking issue ([#25869](https://github.com/RocketChat/Rocket.Chat/pull/25869)) + +- LDAP sync removing users from channels when multiple groups are mapped to it ([#25434](https://github.com/RocketChat/Rocket.Chat/pull/25434)) + +- Members selection field on creating team modal ([#25871](https://github.com/RocketChat/Rocket.Chat/pull/25871)) + + - Fix: add members breaking when searching users + + ![image](https://user-images.githubusercontent.com/27704687/121788070-b792f700-cba0-11eb-92b9-5833e1213c74.png) + +- Message menu action not working on legacy messages. ([#25148](https://github.com/RocketChat/Rocket.Chat/pull/25148)) + +- Message menu dropdown not working on Mobile Web ([#25616](https://github.com/RocketChat/Rocket.Chat/pull/25616)) + +- Message preview not available for queued chats ([#25092](https://github.com/RocketChat/Rocket.Chat/pull/25092)) + +- Messages spacing ([#25631](https://github.com/RocketChat/Rocket.Chat/pull/25631)) + + Adding `sequential` prop to Message component from Fuselage + +- Misaligned username on Room Info card for omnichannel chats ([#25331](https://github.com/RocketChat/Rocket.Chat/pull/25331)) + +- Not showing edit message button when blocking edit after N minutes ([#25724](https://github.com/RocketChat/Rocket.Chat/pull/25724) by [@matthias4217](https://github.com/matthias4217)) + + Previously, in Rocketchat 4.7.0 and later, as mentioned in https://github.com/RocketChat/Rocket.Chat/issues/25478, the edit button was not displayed on the interface in the minute after having sent a message. This is now fixed : messages can be edited right after sending them. + +- NPS never finishing sending results ([#25067](https://github.com/RocketChat/Rocket.Chat/pull/25067)) + +- One of the triggers was not working correctly ([#25409](https://github.com/RocketChat/Rocket.Chat/pull/25409)) + +- Ordered and unordered list styles, Line breaks. ([#25494](https://github.com/RocketChat/Rocket.Chat/pull/25494)) + + Also removed the message.md cache from server, since changes in the parser might break messages in the future (and will in this specific case). + +- Pinned Message display cutting off information ([#25535](https://github.com/RocketChat/Rocket.Chat/pull/25535)) + +- Prevent federation crash on invite users as a non-owner user ([#25683](https://github.com/RocketChat/Rocket.Chat/pull/25683)) + +- Prevent sequential messages edited icon to hide on hover ([#24984](https://github.com/RocketChat/Rocket.Chat/pull/24984)) + + ### before + Screen Shot 2022-03-29 at 13 35 56 + + ### after + Screen Shot 2022-03-29 at 11 48 05 + +- Proxy settings being ignored ([#25022](https://github.com/RocketChat/Rocket.Chat/pull/25022)) + + Modify Meteor's `HTTP.call` to add back proxy support + +- Quote message spacing ([#25613](https://github.com/RocketChat/Rocket.Chat/pull/25613)) + +- Read receipts show with color gray when not read yet ([#25244](https://github.com/RocketChat/Rocket.Chat/pull/25244)) + +- Read receipts showing before message read ([#25216](https://github.com/RocketChat/Rocket.Chat/pull/25216)) + +- Remove 'total' text in admin info page ([#25638](https://github.com/RocketChat/Rocket.Chat/pull/25638)) + + - Remove initial 'total' text from rooms and messages groups in the admin info page + - Add 'total' before 'rooms' and 'messages' title on the same section. To use the new 'Total Rooms', was created a new key in the en.i18n.json file. + +- Remove duplicated icon bell when is thread main message ([#26051](https://github.com/RocketChat/Rocket.Chat/pull/26051)) + +- Remove duplicated property _USERNAMES from createDirectRoom.ts ([#26087](https://github.com/RocketChat/Rocket.Chat/pull/26087)) + + This pull request removes the duplicated property `_USERNAMES` from `apps/meteor/app/lib/server/functions/createDirectRoom.ts`, using only the existing property `roomInfo.usernames`. + +- Removing user also removes them from Omni collections ([#25444](https://github.com/RocketChat/Rocket.Chat/pull/25444)) + +- Replace encrypted text to Encrypted Message Placeholder ([#24166](https://github.com/RocketChat/Rocket.Chat/pull/24166)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/150807900-154a9cdb-ee13-4333-8628-f287ab914b40.png) + + ### after + Screenshot 2022-01-13 at 8 57 47 PM + +- Reply button behavior on broadcast channel ([#25175](https://github.com/RocketChat/Rocket.Chat/pull/25175)) + + Hide reply button for the user that sent the message + +- room creation fails if app framework is disabled ([#25200](https://github.com/RocketChat/Rocket.Chat/pull/25200)) + +- Rooms' names turn lower case on CSV import ([#24612](https://github.com/RocketChat/Rocket.Chat/pull/24612)) + + * Change 'Settings' import to not get cached configs + * Remove update `UI_Allow_room_names_with_special_chars` value + +- Sanitize customUserStatus and fix infinite loop ([#25449](https://github.com/RocketChat/Rocket.Chat/pull/25449)) + + ### Additional improves: + - usage of RHF to avoid unnecessary Add and Edit components separately and form validation + - usage of `GenericTableV2` and some hooks to avoid unnecessary code + - fix `IUserStatus` type + - improves in UI design + - improves **empty** and **loading** state + - improves files structure + + [LOOP ERROR ATTACHMENT] + ![Screen Shot 2022-05-09 at 19 42 53](https://user-images.githubusercontent.com/27704687/167510439-1980461c-a885-46d2-9a49-79da432c7521.png) + +- Sanitize styles in message ([#25744](https://github.com/RocketChat/Rocket.Chat/pull/25744)) + +- Settings listeners not receiving overwritten values from env vars ([#25448](https://github.com/RocketChat/Rocket.Chat/pull/25448)) + +- Settings not being overwritten to their default values ([#25891](https://github.com/RocketChat/Rocket.Chat/pull/25891)) + +- Showing Blank Message Inside Report ([#25007](https://github.com/RocketChat/Rocket.Chat/pull/25007)) + + https://user-images.githubusercontent.com/53515714/161038085-4a86c7ae-6751-4996-9767-b1c9e0331a6c.mp4 + +- sidebar colors ([#25987](https://github.com/RocketChat/Rocket.Chat/pull/25987)) + +- Sort by scope or creation date not working on canned responses list ([#25475](https://github.com/RocketChat/Rocket.Chat/pull/25475)) + +- Spotlight results showing usernames instead of real names ([#25471](https://github.com/RocketChat/Rocket.Chat/pull/25471)) + +- Thread Message Preview ([#25709](https://github.com/RocketChat/Rocket.Chat/pull/25709)) + +- Too many watchers in dev environment. ([#25930](https://github.com/RocketChat/Rocket.Chat/pull/25930)) + +- Toolbox hiding under contextual bar ([#25237](https://github.com/RocketChat/Rocket.Chat/pull/25237)) + +- toolbox menu behind thread component ([#25925](https://github.com/RocketChat/Rocket.Chat/pull/25925)) + +- UI/UX issues on Live Chat widget ([#25407](https://github.com/RocketChat/Rocket.Chat/pull/25407)) + +- Unable to close chats when comments is disabled ([#26057](https://github.com/RocketChat/Rocket.Chat/pull/26057)) + + Fixes https://github.com/RocketChat/Rocket.Chat/issues/25954 + +- Unable to see channel member list by authorized channel roles ([#25412](https://github.com/RocketChat/Rocket.Chat/pull/25412)) + +- Undefined headers on API Client ([#26083](https://github.com/RocketChat/Rocket.Chat/pull/26083)) + +- Unnecessary padding on teams channels footer ([#25712](https://github.com/RocketChat/Rocket.Chat/pull/25712)) + + #### before + + + ### after + + +- Update chartjs usage to v3 ([#25873](https://github.com/RocketChat/Rocket.Chat/pull/25873)) + +- Update import from `csv-parse` ([#25872](https://github.com/RocketChat/Rocket.Chat/pull/25872)) + + This PR updates the importing of `csv-parse` because the used method wasn't working anymore, we were receiving the following error: + + `error: "this.csvParser is not a function"` + +- Update subscription on update team member ([#25855](https://github.com/RocketChat/Rocket.Chat/pull/25855)) + + Added update to subscription when a team member is updated on `teams.updateMember` + +- Upgrade tab loader in incorrect position ([#25398](https://github.com/RocketChat/Rocket.Chat/pull/25398)) + + - Add invisible prop to iframe when loading state is active. + +- Upgrade Tab showing for a split second ([#25050](https://github.com/RocketChat/Rocket.Chat/pull/25050)) + +- Use correct room property for call ended at ([#24932](https://github.com/RocketChat/Rocket.Chat/pull/24932)) + +- useCurrentChatTags is not a function ([#25604](https://github.com/RocketChat/Rocket.Chat/pull/25604)) + +- User abandonment setting was not working doe to failing event hook ([#25520](https://github.com/RocketChat/Rocket.Chat/pull/25520)) + + A setting watcher and the query for grabbing abandoned chats were broken, now they're not. + +- User avatar reseting and getting random image ([#25603](https://github.com/RocketChat/Rocket.Chat/pull/25603)) + + - fixes user avatar not being saved after editing the user profile issue + - fixes user avatar not getting another user picture due to database deletion error + +- user status Offline misnamed as Invisible in Custom Status edit dropdown menu ([#24796](https://github.com/RocketChat/Rocket.Chat/pull/24796) by [@Kunalvrm555](https://github.com/Kunalvrm555)) + +- User's with non-agent role shown on voip agent association model ([#25682](https://github.com/RocketChat/Rocket.Chat/pull/25682)) + +- UserAutoComplete not rendering UserAvatar correctly ([#25055](https://github.com/RocketChat/Rocket.Chat/pull/25055)) + + ### before + ![Screen Shot 2022-04-04 at 16 50 21](https://user-images.githubusercontent.com/27704687/161620921-800bf66a-806d-4f83-b2e1-073c34215001.png) + + ### after + ![Screen Shot 2022-04-04 at 16 49 00](https://user-images.githubusercontent.com/27704687/161620720-3e27774d-c241-46ca-b764-932a9295d709.png) + +- UserCard sanitization ([#25089](https://github.com/RocketChat/Rocket.Chat/pull/25089)) + + - Rewrites the component to TS + - Fixes some visual issues + + ### before + ![Screen Shot 2022-04-07 at 00 23 11](https://user-images.githubusercontent.com/27704687/162113925-5c9484d1-23e9-4623-8b86-3fbc71b461a1.png) + + ### after + ![Screen Shot 2022-04-07 at 00 07 13](https://user-images.githubusercontent.com/27704687/162112353-afd6aac6-b27c-4470-a642-631b8080d59e.png) + +- Users without the `view-other-user-info` permission can't use the `users.list` endpoint ([#26050](https://github.com/RocketChat/Rocket.Chat/pull/26050)) + + This PR fix the query when a normal users access `users.list` + +- Validate room access ([#24534](https://github.com/RocketChat/Rocket.Chat/pull/24534)) + + The request must be blocked If the user has no permission to view rooms. + +- Video and Audio not skipping forward ([#19866](https://github.com/RocketChat/Rocket.Chat/pull/19866)) + +- VOIP CallContext snapshot infinite loop ([#25947](https://github.com/RocketChat/Rocket.Chat/pull/25947)) + + The application was crashing due to an error on the `useCallerInfo()` hook. + The error was: + ![image](https://user-images.githubusercontent.com/20212776/174823914-4832e5dd-c91a-4ae4-9d1f-1b960bcd372c.png) + ![image](https://user-images.githubusercontent.com/20212776/174823982-cb543fe0-663f-4530-bb94-0720653ca897.png) + + To prevent this issue to happen it was added a cached and out-of-scope snapshot variable to the hook using `useSyncExternalStore` + +- VoIP disabled/enabled sequence puts voip agent in error state ([#25230](https://github.com/RocketChat/Rocket.Chat/pull/25230) by [@amolghode1981](https://github.com/amolghode1981)) + + Initially it was thought that the issue occurs because of the race condition while changing the client settings vs those settings reflected on server side. So a natural solution to solve this is to wait for setting change event 'private-settings-changed'. Then if 'VoIP_Enabled' is updated and it is true, set voipEnabled to true in useVoipClient.ts (on client side) + + It was realised that the race does not happen because of the database or server noticing the changes late. But because of the time taken to establish the AMI connection with Asterisk. + + Solution: + + 1. Change apps/meteor/app/voip/server/startup.ts. When VoIP_Enabled is changed, await for Voip.init() to complete and then broadcast connector.statuschanged with changed value. + 2. From apps/meteor/server/modules/listeners/listeners.module.ts use notifyLoggedInThisInstance to notify all logged in users on current instance. + 3. in apps/meteor/client/providers/CallProvider/hooks/useVoipClient.ts add the event handler that receives this event. Change voipEnabled from constant to state. Change this state based on the 'value' that is received by the handler. + +- Voip endpoint permissions ([#25783](https://github.com/RocketChat/Rocket.Chat/pull/25783)) + +- Wrong argument name preventing Omnichannel Chat Forward to User ([#25723](https://github.com/RocketChat/Rocket.Chat/pull/25723)) + +
+🔍 Minor changes + + +- Bump body-parser from 1.19.2 to 1.20.0 in /ee/server/services ([#25042](https://github.com/RocketChat/Rocket.Chat/pull/25042) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump ejson from 2.2.1 to 2.2.2 ([#25057](https://github.com/RocketChat/Rocket.Chat/pull/25057) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump eslint-plugin-anti-trojan-source from 1.0.6 to 1.1.0 ([#25076](https://github.com/RocketChat/Rocket.Chat/pull/25076) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump minimist from 1.2.5 to 1.2.6 in /ee/server/services ([#24991](https://github.com/RocketChat/Rocket.Chat/pull/24991) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino and pino-pretty ([#25052](https://github.com/RocketChat/Rocket.Chat/pull/25052)) + +- Bump template-file from 6.0.0 to 6.0.1 ([#25002](https://github.com/RocketChat/Rocket.Chat/pull/25002) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore: `@rocket.chat/favicon` ([#25920](https://github.com/RocketChat/Rocket.Chat/pull/25920)) + +- Chore: `refactor/tsc-perf` ([#26040](https://github.com/RocketChat/Rocket.Chat/pull/26040)) + +- Chore: Account/Profile to TS ([#25929](https://github.com/RocketChat/Rocket.Chat/pull/25929)) + +- Chore: add _id and name options to JSON Schemas ([#25813](https://github.com/RocketChat/Rocket.Chat/pull/25813)) + + This pull request adds the `roomId` and `roomName` options for the Ajv JSON Schemas on the `packages/rest-typings/src/v1/channels/` and `packages/rest-typings/src/v1/dm/` folders. + +- Chore: Add /v1/video-conference endpoint types ([#25278](https://github.com/RocketChat/Rocket.Chat/pull/25278)) + +- Chore: Add Agenda fork to the monorepo ([#25681](https://github.com/RocketChat/Rocket.Chat/pull/25681)) + +- Chore: add Ajv JSON Schema to api/v1 ([#25601](https://github.com/RocketChat/Rocket.Chat/pull/25601)) + + This pull request adds Ajv JSON Schema validation to `apps/meteor/app/api/server/v1/` and `packages/rest-typings/src/v1/`, where needed. + +- Chore: Add auto label and improve Kodiak configuration ([#25829](https://github.com/RocketChat/Rocket.Chat/pull/25829)) + +- Chore: Add channel endpoints (rest-typings) ([#25279](https://github.com/RocketChat/Rocket.Chat/pull/25279)) + +- Chore: Add client folder to CODEOWNERS ([#25397](https://github.com/RocketChat/Rocket.Chat/pull/25397)) + +- Chore: Add error boundary to message component ([#25223](https://github.com/RocketChat/Rocket.Chat/pull/25223)) + + Not crash the whole application if something goes wrong in the MessageList component. + + ![image](https://user-images.githubusercontent.com/40830821/162269915-931c5c3c-c979-4234-b74c-371f67467ce0.png) + +- Chore: Add Livechat repo into Monorepo packages ([#25312](https://github.com/RocketChat/Rocket.Chat/pull/25312)) + +- Chore: Add missing Swedish livechat translations ([#26048](https://github.com/RocketChat/Rocket.Chat/pull/26048) by [@joakimaho](https://github.com/joakimaho)) + + Added missing Swedish translations. + +- Chore: Add options to debug stdout and rate limiter ([#25336](https://github.com/RocketChat/Rocket.Chat/pull/25336)) + +- Chore: Add root package.json to houston files ([#25286](https://github.com/RocketChat/Rocket.Chat/pull/25286)) + + See title + +- Chore: Add tests for agents screens ([#25637](https://github.com/RocketChat/Rocket.Chat/pull/25637)) + +- Chore: Add typings for /v1/webdav.getMyAccounts ([#25276](https://github.com/RocketChat/Rocket.Chat/pull/25276)) + +- Chore: Add yarn plugin to check node and yarn version ([#25224](https://github.com/RocketChat/Rocket.Chat/pull/25224)) + +- Chore: Adding default message parser template ([#26064](https://github.com/RocketChat/Rocket.Chat/pull/26064)) + +- Chore: adjust in some configurations ([#25612](https://github.com/RocketChat/Rocket.Chat/pull/25612)) + +- Chore: Allow endpoints to optionally require authentication ([#26084](https://github.com/RocketChat/Rocket.Chat/pull/26084)) + +- Chore: API test on method GET with params as a number. ([#25769](https://github.com/RocketChat/Rocket.Chat/pull/25769)) + +- Chore: AutoTranslate contextualBar rewrite ([#25751](https://github.com/RocketChat/Rocket.Chat/pull/25751)) + +- Chore: Avoid set useless set UTC Offset ([#26270](https://github.com/RocketChat/Rocket.Chat/pull/26270)) + +- Chore: Avoid unneeded permission updates when EE license is applied ([#26253](https://github.com/RocketChat/Rocket.Chat/pull/26253)) + +- Chore: Broken Storybook ([#25714](https://github.com/RocketChat/Rocket.Chat/pull/25714)) + + There is another small improvement on the way we got storybook files. + +- Chore: Bump deps ([#25624](https://github.com/RocketChat/Rocket.Chat/pull/25624)) + +- Chore: bump fuselage ([#25605](https://github.com/RocketChat/Rocket.Chat/pull/25605)) + +- Chore: Bump fuselage ([#25371](https://github.com/RocketChat/Rocket.Chat/pull/25371)) + +- Chore: Bump fuselage and update icon ([#26036](https://github.com/RocketChat/Rocket.Chat/pull/26036)) + +- Chore: bump fuselage packages ([#26325](https://github.com/RocketChat/Rocket.Chat/pull/26325)) + +- Chore: Bump Fuselage packages ([#25259](https://github.com/RocketChat/Rocket.Chat/pull/25259)) + +- Chore: Cancel running jobs if PR is updated ([#24708](https://github.com/RocketChat/Rocket.Chat/pull/24708)) + +- Chore: Change Apps-Engine version source for info ([#26205](https://github.com/RocketChat/Rocket.Chat/pull/26205)) + + Now that we're using `yarn`, the version stored in the `package.json` is no longer the resolved one, but it matches the input. This means that when we ran `yarn add @rocket.chat/apps-engine@alpha`, yarn saves `"alpha"` as the version of the package, while NPM added the resolved version for the tag, e.g. `"1.33.0-alpha.6507"`. This ends up breaking a few places where we need the Apps-Engine version for communication with the Marketplace. + + With this PR we change the source of that info so the problem doesn't happen anymore. + +- Chore: Change stats to daily ([#26113](https://github.com/RocketChat/Rocket.Chat/pull/26113)) + +- Chore: Check for env var values and not just if they are set ([#26219](https://github.com/RocketChat/Rocket.Chat/pull/26219)) + +- Chore: Chore add validation option to rest endpoints ([#25443](https://github.com/RocketChat/Rocket.Chat/pull/25443)) + +- Chore: Close tooltip on click ([#26070](https://github.com/RocketChat/Rocket.Chat/pull/26070)) + +- Chore: Code Improvements for #25391 ([#25606](https://github.com/RocketChat/Rocket.Chat/pull/25606)) + +- Chore: Collect e2e coverage ([#25743](https://github.com/RocketChat/Rocket.Chat/pull/25743)) + +- Chore: Colors ([#25969](https://github.com/RocketChat/Rocket.Chat/pull/25969)) + +- Chore: command's endpoints ([#25630](https://github.com/RocketChat/Rocket.Chat/pull/25630)) + +- Chore: Convert `UserStatusMenu` to TS ([#25265](https://github.com/RocketChat/Rocket.Chat/pull/25265)) + +- Chore: Convert additionalForms ([#25586](https://github.com/RocketChat/Rocket.Chat/pull/25586)) + +- Chore: Convert Admin -> Rooms to TS ([#25348](https://github.com/RocketChat/Rocket.Chat/pull/25348)) + +- Chore: Convert admin custom sound to tsx ([#25128](https://github.com/RocketChat/Rocket.Chat/pull/25128)) + +- Chore: Convert Admin/OAuthApps to TS ([#25277](https://github.com/RocketChat/Rocket.Chat/pull/25277)) + + - Converts Admin/OAuthApps to TS. + - migrated forms to react-hook-form + +- Chore: Convert AdminSideBar to ts ([#25372](https://github.com/RocketChat/Rocket.Chat/pull/25372)) + +- Chore: convert apps/meteor/app/api/server/lib/ files to TS ([#25840](https://github.com/RocketChat/Rocket.Chat/pull/25840)) + + This pull request converts files on `apps/meteor/app/api/server/lib/` to Typescript. + +- Chore: Convert apps/meteor/client/components/UserAutoComplete ([#25554](https://github.com/RocketChat/Rocket.Chat/pull/25554)) + +- Chore: Convert apps/meteor/client/sidebar/header/index ([#25671](https://github.com/RocketChat/Rocket.Chat/pull/25671)) + +- Chore: Convert apps/meteor/client/sidebar/search ([#25754](https://github.com/RocketChat/Rocket.Chat/pull/25754)) + +- Chore: Convert apps/meteor/client/views/admin/settings ([#25565](https://github.com/RocketChat/Rocket.Chat/pull/25565)) + +- Chore: Convert apps/meteor/client/views/admin/settings/inputs folder ([#25427](https://github.com/RocketChat/Rocket.Chat/pull/25427)) + +- Chore: Convert assets endpoint to Typescript ([#25358](https://github.com/RocketChat/Rocket.Chat/pull/25358)) + +- Chore: Convert AutoTranslate ([#25591](https://github.com/RocketChat/Rocket.Chat/pull/25591)) + +- Chore: Convert client/views/admin/settings/groups folder to ts ([#25345](https://github.com/RocketChat/Rocket.Chat/pull/25345)) + +- Chore: convert communication methods to Typescript ([#25503](https://github.com/RocketChat/Rocket.Chat/pull/25503)) + + Convert files from `apps/meteor/app/apps/server/communication/` to ts. + +- Chore: Convert components/sidebar to TS ([#25429](https://github.com/RocketChat/Rocket.Chat/pull/25429)) + +- Chore: Convert Create Channel ([#25589](https://github.com/RocketChat/Rocket.Chat/pull/25589)) + +- Chore: Convert CreateChannelWithData ([#25667](https://github.com/RocketChat/Rocket.Chat/pull/25667)) + +- Chore: Convert customSounds folder to ts ([#25274](https://github.com/RocketChat/Rocket.Chat/pull/25274)) + +- Chore: Convert customUserStatus folder to ts ([#25288](https://github.com/RocketChat/Rocket.Chat/pull/25288)) + +- Chore: convert e2e to ts ([#25958](https://github.com/RocketChat/Rocket.Chat/pull/25958)) + + Converted the `apps/meteor/app/api/server/v1/e2e.js` to ts and created endpoint typings on the `packages/rest-typings/src/v1/e2e` folder. + +- Chore: Convert email inbox feature to TypeScript ([#25298](https://github.com/RocketChat/Rocket.Chat/pull/25298) by [@ujorgeleite](https://github.com/ujorgeleite)) + +- Chore: Convert federationDashboard folder to ts ([#25343](https://github.com/RocketChat/Rocket.Chat/pull/25343)) + +- Chore: Convert getStatistics ([#25342](https://github.com/RocketChat/Rocket.Chat/pull/25342)) + +- Chore: convert import.js endpoints to TS ([#25956](https://github.com/RocketChat/Rocket.Chat/pull/25956)) + + Converted the `apps/meteor/app/api/server/v1/import.js` to ts and created endpoint typings on the `packages/rest-typings/src/v1/import` folder. + +- Chore: convert info to typescript ([#25420](https://github.com/RocketChat/Rocket.Chat/pull/25420)) + +- Chore: convert invites, misc and subscriptions to TS and create definitions ([#25350](https://github.com/RocketChat/Rocket.Chat/pull/25350)) + + Converted `apps/meteor/app/api/server/v1/invites.js`, `misc.js` and `subscriptions.js` to Typescript and created their endpoint definitions on the rest-typings folder. + +- Chore: Convert LivechatAgentActivity to raw model and TS ([#25123](https://github.com/RocketChat/Rocket.Chat/pull/25123)) + +- Chore: Convert Mailer to TS ([#25121](https://github.com/RocketChat/Rocket.Chat/pull/25121)) + +- Chore: convert marketplace price display component to use typescript ([#25504](https://github.com/RocketChat/Rocket.Chat/pull/25504)) + + **Marketplace apps listing page** + ![Screen Shot 2022-05-13 at 12 57 43](https://user-images.githubusercontent.com/4161171/168322189-67990fdf-a447-46dc-8f88-08b16c2a5416.png) + + **Apps detail page** + ![Screen Shot 2022-05-13 at 12 58 56](https://user-images.githubusercontent.com/4161171/168322241-505ee5bb-d3d8-4b0e-8757-873a1a65a6a6.png) + +- Chore: Convert MemoizedSetting, Setting, Section ([#25572](https://github.com/RocketChat/Rocket.Chat/pull/25572)) + +- Chore: Convert normalizeMessagesForUser ([#26059](https://github.com/RocketChat/Rocket.Chat/pull/26059)) + +- Chore: Convert NotificationStatus to TS ([#25125](https://github.com/RocketChat/Rocket.Chat/pull/25125)) + +- Chore: Convert push endpoints to TS ([#25347](https://github.com/RocketChat/Rocket.Chat/pull/25347)) + +- Chore: Convert RoomForeword, TextCopy and RoomAvatarEditor to TS ([#25424](https://github.com/RocketChat/Rocket.Chat/pull/25424)) + +- Chore: Convert RoomMenu ([#25914](https://github.com/RocketChat/Rocket.Chat/pull/25914)) + +- Chore: Convert sidebar/header/actions ([#25581](https://github.com/RocketChat/Rocket.Chat/pull/25581)) + +- Chore: Convert sidebar/item ([#25634](https://github.com/RocketChat/Rocket.Chat/pull/25634)) + +- Chore: Convert slashCommands to typescript ([#25592](https://github.com/RocketChat/Rocket.Chat/pull/25592) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + +- Chore: Convert to TS omnichannel/agent ([#25511](https://github.com/RocketChat/Rocket.Chat/pull/25511)) + +- Chore: Convert to TS RoomAutoComplete ([#25536](https://github.com/RocketChat/Rocket.Chat/pull/25536)) + +- Chore: Convert to typescript some functions from app/lib/server/functions ([#24519](https://github.com/RocketChat/Rocket.Chat/pull/24519)) + + Convert to typescript some functions from app/lib/server/functions and transfered theses files to server/lib + +- Chore: Convert to typescript the slash commands help files ([#24307](https://github.com/RocketChat/Rocket.Chat/pull/24307) by [@eduardofcabrera](https://github.com/eduardofcabrera)) + + Convert to typescript the slash commands help files + +- Chore: Convert useFileInput to TS ([#25426](https://github.com/RocketChat/Rocket.Chat/pull/25426)) + +- Chore: Convert usePreventDefault, useQueryOptions, useShortcutOpenMenu ([#26035](https://github.com/RocketChat/Rocket.Chat/pull/26035)) + +- Chore: Convert UserAutoCompleteMultiple ([#25587](https://github.com/RocketChat/Rocket.Chat/pull/25587)) + +- Chore: Convert users endpoints ([#25635](https://github.com/RocketChat/Rocket.Chat/pull/25635)) + +- Chore: Convert useSidebarPaletteColor ([#26065](https://github.com/RocketChat/Rocket.Chat/pull/26065)) + +- Chore: Convert useUpdateAvatar to TS and type avatar endpoints ([#25430](https://github.com/RocketChat/Rocket.Chat/pull/25430)) + +- Chore: Converting files from app/livechat folder from JS to TS ([#25658](https://github.com/RocketChat/Rocket.Chat/pull/25658) by [@amolghode1981](https://github.com/amolghode1981)) + + Converting files from apps/meteor/app/livechat/lib/ from JS to TS + +- Chore: Converting omnichannel installation files to ts ([#25665](https://github.com/RocketChat/Rocket.Chat/pull/25665)) + + This PR converts the omnichannel/installation folder from js to ts + +- Chore: Converting orchestrator.js to ts ([#25367](https://github.com/RocketChat/Rocket.Chat/pull/25367)) + +- Chore: create a e2e test guideline ([#25884](https://github.com/RocketChat/Rocket.Chat/pull/25884)) + +- Chore: Create a token for each action ([#26023](https://github.com/RocketChat/Rocket.Chat/pull/26023)) + +- Chore: Create README.md for Rest Typings ([#25335](https://github.com/RocketChat/Rocket.Chat/pull/25335)) + +- Chore: Custom Sounds Endpoints ([#25633](https://github.com/RocketChat/Rocket.Chat/pull/25633)) + +- Chore: Dedicated package for UI contexts ([#25432](https://github.com/RocketChat/Rocket.Chat/pull/25432)) + + Moving our React contexts to a different package on the monorepo enable us to deliver components from another packages, because they work as a loose connection to the core APIs. + +- Chore: Dependencies upgrade ([#25290](https://github.com/RocketChat/Rocket.Chat/pull/25290)) + +- Chore: Disabled icon colors on sidebar ([#26257](https://github.com/RocketChat/Rocket.Chat/pull/26257)) + +- Chore: Do not log integrations using `name` key ([#26163](https://github.com/RocketChat/Rocket.Chat/pull/26163)) + +- Chore: Enable marketplace screenshots endpoint ([#25395](https://github.com/RocketChat/Rocket.Chat/pull/25395)) + +- Chore: ensure scripts use cross-env and ignore some dirs (ROC-54) ([#25218](https://github.com/RocketChat/Rocket.Chat/pull/25218)) + + - data and test-failure should be ignored + - ensure scripts use cross-env + +- Chore: Fix CI ([#25797](https://github.com/RocketChat/Rocket.Chat/pull/25797)) + +- Chore: Fix correct unit test to api files ([#25870](https://github.com/RocketChat/Rocket.Chat/pull/25870)) + +- Chore: Fix incorrect checksum for agenda package (cause of breaking develop builds) ([#25741](https://github.com/RocketChat/Rocket.Chat/pull/25741)) + +- Chore: Fix Omnichannel E2E tests not running ([#26092](https://github.com/RocketChat/Rocket.Chat/pull/26092)) + +- Chore: Fix return type warnings ([#25275](https://github.com/RocketChat/Rocket.Chat/pull/25275)) + +- Chore: Fix version on develop branch ([#25842](https://github.com/RocketChat/Rocket.Chat/pull/25842)) + +- Chore: fix watermark condition ([#26095](https://github.com/RocketChat/Rocket.Chat/pull/26095)) + +- Chore: Fixes e2e playwright intermittences ([#25984](https://github.com/RocketChat/Rocket.Chat/pull/25984)) + +- Chore: Fuselage update ([#26004](https://github.com/RocketChat/Rocket.Chat/pull/26004)) + +- Chore: Fuselage update ([#25983](https://github.com/RocketChat/Rocket.Chat/pull/25983)) + +- Chore: Handle errors on index creation ([#26094](https://github.com/RocketChat/Rocket.Chat/pull/26094)) + +- Chore: Hide deprecation query log on production ([#26188](https://github.com/RocketChat/Rocket.Chat/pull/26188)) + +- Chore: Improve CI cache ([#25907](https://github.com/RocketChat/Rocket.Chat/pull/25907)) + +- Chore: Improve footer Template ([#26085](https://github.com/RocketChat/Rocket.Chat/pull/26085)) + +- Chore: Increase performance and security of integrations’ scripts ([#25641](https://github.com/RocketChat/Rocket.Chat/pull/25641)) + + Replace internal VM implementation with VM2 which implements many more mechanisms to ensure timeout, security and allow easier configuration for future improvements on the integrations' feature. + +- Chore: Info page ([#26201](https://github.com/RocketChat/Rocket.Chat/pull/26201)) + +- Chore: Introduce Modal Region ([#25962](https://github.com/RocketChat/Rocket.Chat/pull/25962)) + +- Chore: Introduce new index to query active livechat conversations for cloud scaling ([#26047](https://github.com/RocketChat/Rocket.Chat/pull/26047)) + +- Chore: Keep the option to run only the meteor app ([#25915](https://github.com/RocketChat/Rocket.Chat/pull/25915)) + +- Chore: Keyboard shortcuts contextualBar rewrite ([#25753](https://github.com/RocketChat/Rocket.Chat/pull/25753)) + +- Chore: Livechat change output level ([#25522](https://github.com/RocketChat/Rocket.Chat/pull/25522)) + +- Chore: Major refactors in pageobjects ([#26015](https://github.com/RocketChat/Rocket.Chat/pull/26015)) + +- Chore: Make kodiak merge message empty ([#26069](https://github.com/RocketChat/Rocket.Chat/pull/26069)) + +- Chore: Manager Page Rewrite ([#25431](https://github.com/RocketChat/Rocket.Chat/pull/25431)) + +- Chore: Messages raw model rewrite to ts ([#25761](https://github.com/RocketChat/Rocket.Chat/pull/25761)) + +- Chore: Migrate 15-message-popup from cypress to playwright ([#25462](https://github.com/RocketChat/Rocket.Chat/pull/25462)) + +- Chore: migrate from cypress to pw 14-setting-permission ([#25523](https://github.com/RocketChat/Rocket.Chat/pull/25523)) + +- Chore: migrate katex to ts ([#25501](https://github.com/RocketChat/Rocket.Chat/pull/25501)) + +- Chore: Migrate LivechatVisitors model to raw ([#25756](https://github.com/RocketChat/Rocket.Chat/pull/25756)) + +- Chore: Migrate NotFoundPage to TS ([#25509](https://github.com/RocketChat/Rocket.Chat/pull/25509)) + +- Chore: Migrate oauth2server to typescript ([#25126](https://github.com/RocketChat/Rocket.Chat/pull/25126)) + +- Chore: Migrate oembed to ts ([#25622](https://github.com/RocketChat/Rocket.Chat/pull/25622)) + +- Chore: Migrate retention-policy to ts ([#25582](https://github.com/RocketChat/Rocket.Chat/pull/25582)) + +- Chore: Migrate some small helper functions to TypeScript ([#25666](https://github.com/RocketChat/Rocket.Chat/pull/25666)) + +- Chore: Migrate spotify to ts ([#25507](https://github.com/RocketChat/Rocket.Chat/pull/25507)) + +- Chore: migrate-to-pw-16-discussion ([#25567](https://github.com/RocketChat/Rocket.Chat/pull/25567)) + +- Chore: migrate-to-pw-adjust-in-intermitences ([#25542](https://github.com/RocketChat/Rocket.Chat/pull/25542)) + +- Chore: Minor dependency updates ([#25269](https://github.com/RocketChat/Rocket.Chat/pull/25269)) + +- Chore: Missing keys in APIsDisplay ([#24464](https://github.com/RocketChat/Rocket.Chat/pull/24464)) + +- Chore: Model Typings ([#25758](https://github.com/RocketChat/Rocket.Chat/pull/25758)) + +- Chore: Monorepo ([#25074](https://github.com/RocketChat/Rocket.Chat/pull/25074)) + +- Chore: Move admin sidebarItems registration to the main file ([#25442](https://github.com/RocketChat/Rocket.Chat/pull/25442)) + +- Chore: Move ddp-streamer micro service to its own sub-repo ([#25246](https://github.com/RocketChat/Rocket.Chat/pull/25246)) + +- Chore: move definitions to packages ([#25085](https://github.com/RocketChat/Rocket.Chat/pull/25085)) + +- Chore: move fork of cas module to the monorepo ([#26107](https://github.com/RocketChat/Rocket.Chat/pull/26107)) + +- Chore: Move markdown message parser to a `callback` ([#25413](https://github.com/RocketChat/Rocket.Chat/pull/25413)) + +- Chore: Move voip's Wrap-up and On-hold functionality to EE (Backend) ([#25160](https://github.com/RocketChat/Rocket.Chat/pull/25160)) + +- Chore: Notification Preferences to TS ([#25827](https://github.com/RocketChat/Rocket.Chat/pull/25827)) + + - Notifications Preferences to TS. + - Fix broken save action. + +- Chore: organize test files and fix code coverage ([#24900](https://github.com/RocketChat/Rocket.Chat/pull/24900)) + +- Chore: Plan tag ([#26224](https://github.com/RocketChat/Rocket.Chat/pull/26224)) + + Now we only have one plan tag for all plans \/ + ![image](https://user-images.githubusercontent.com/40830821/178366367-12388c4c-6822-4e41-be8d-ca306718be98.png) + +- Chore: Prune Messages contextualBar rewrite ([#25757](https://github.com/RocketChat/Rocket.Chat/pull/25757)) + +- Chore: Remove all cypress tests, configs and references ([#25564](https://github.com/RocketChat/Rocket.Chat/pull/25564)) + +- Chore: Remove Alpine image deps after using them ([#25053](https://github.com/RocketChat/Rocket.Chat/pull/25053)) + +- Chore: Remove compose from main repo ([#23426](https://github.com/RocketChat/Rocket.Chat/pull/23426)) + +- Chore: Remove duplicate checksumBehavior key from yarn file ([#25730](https://github.com/RocketChat/Rocket.Chat/pull/25730)) + +- Chore: remove duplicated NotFoundPage.js ([#25749](https://github.com/RocketChat/Rocket.Chat/pull/25749)) + +- Chore: Remove duplicated useUserRoom ([#25180](https://github.com/RocketChat/Rocket.Chat/pull/25180)) + +- Chore: Remove Imperative Modal from context ([#25911](https://github.com/RocketChat/Rocket.Chat/pull/25911)) + +- Chore: Remove old files from removed Omnichannel feature ([#25129](https://github.com/RocketChat/Rocket.Chat/pull/25129)) + +- Chore: Remove old rest api code ([#25863](https://github.com/RocketChat/Rocket.Chat/pull/25863)) + +- Chore: Remove package-lock.json from houston files ([#25280](https://github.com/RocketChat/Rocket.Chat/pull/25280)) + + Houston config in the `package.json` file still mentioned `package-lock.json`, but it doesn't exist anymore + +- Chore: Remove snap files from Houston config ([#25819](https://github.com/RocketChat/Rocket.Chat/pull/25819)) + +- Chore: Remove TimeSync usage ([#26294](https://github.com/RocketChat/Rocket.Chat/pull/26294)) + +- Chore: Remove toastr package ([#25787](https://github.com/RocketChat/Rocket.Chat/pull/25787)) + +- Chore: Remove unused Drone CI files ([#25124](https://github.com/RocketChat/Rocket.Chat/pull/25124)) + +- Chore: remove unused locators from e2e tests ([#25860](https://github.com/RocketChat/Rocket.Chat/pull/25860)) + +- Chore: Remove unused migrations ([#26102](https://github.com/RocketChat/Rocket.Chat/pull/26102)) + + After giving it some thought: + + - 234 through 240 are not going to be run anymore. Keeping them does not affect behavior of course, but this (removing) makes it easier to quickly glance at and understand what migrations are actually included in 5.x.y (especially in tag compare view or in general just checking the ref). + + - Also changed the file name of 233 to be more explicit at what it does so to not confuse with actual "migrations" without having to open the file. + + - The redirect to the documentation page (go.rocket....) is not yet set up, jfyi. + +- Chore: Reorder unreleased migrations ([#25508](https://github.com/RocketChat/Rocket.Chat/pull/25508)) + +- Chore: Replace `useSubscription` with `useSyncExternalStore` ([#25909](https://github.com/RocketChat/Rocket.Chat/pull/25909)) + +- Chore: Replace AnnouncementModal in favor of GenericModal ([#25752](https://github.com/RocketChat/Rocket.Chat/pull/25752)) + +- Chore: Rest API query parameters handling ([#25648](https://github.com/RocketChat/Rocket.Chat/pull/25648)) + +- Chore: REST query and body params validation ([#25446](https://github.com/RocketChat/Rocket.Chat/pull/25446)) + +- Chore: RestApiClient as Package ([#25469](https://github.com/RocketChat/Rocket.Chat/pull/25469)) + +- Chore: Revert `yarn dev` implementation ([#26075](https://github.com/RocketChat/Rocket.Chat/pull/26075)) + +- Chore: Rewrite 2fa to typescript ([#25285](https://github.com/RocketChat/Rocket.Chat/pull/25285)) + +- Chore: Rewrite action-links to ts ([#25418](https://github.com/RocketChat/Rocket.Chat/pull/25418)) + +- Chore: Rewrite AddUsers to TS ([#25830](https://github.com/RocketChat/Rocket.Chat/pull/25830) by [@kodiakhq[bot]](https://github.com/kodiakhq[bot])) + +- Chore: Rewrite Admin UsersTable to Typescript ([#25698](https://github.com/RocketChat/Rocket.Chat/pull/25698)) + +- Chore: Rewrite autotranslate to ts ([#25425](https://github.com/RocketChat/Rocket.Chat/pull/25425)) + +- Chore: Rewrite im and dm endpoints to ts ([#25521](https://github.com/RocketChat/Rocket.Chat/pull/25521)) + + - Endpoints rewritten to TS + - dm.create + - dm.delete + - dm.close + - dm.counters + - dm.files + - dm.history + - dm.members + - dm.messages + - dm.messages.others + - dm.list + - dm.list.everyone + - dm.open + - dm.setTopic + - im.create + - im.delete + - im.close + - im.counters + - im.files + - im.history + - im.members + - im.messages + - im.messages.others + - im.list + - im.list.everyone + - im.open + - im.setTopic + - Some lines of code was refactored on `apps/meteor/app/api/server/v1/im.ts` + - Unnecessary functions were deleted on `apps/meteor/app/lib/server/functions/getDirectMessageByNameOrIdWithOptionToJoin.ts` + - New types was added on `apps/meteor/app/api/server/api.d.ts` + +- Chore: Rewrite Jitsi Contextualbar to TS ([#25303](https://github.com/RocketChat/Rocket.Chat/pull/25303)) + +- Chore: Rewrite mail-messages to ts ([#25421](https://github.com/RocketChat/Rocket.Chat/pull/25421)) + +- Chore: Rewrite RoomWithData ([#25858](https://github.com/RocketChat/Rocket.Chat/pull/25858)) + +- Chore: Rewrite some Omnichannel files to TypeScript ([#25359](https://github.com/RocketChat/Rocket.Chat/pull/25359)) + + apps/meteor/client/components/Omnichannel/modals/* + apps/meteor/client/components/Omnichannel/Tags.js + +- Chore: Room access validation may be called without user information ([#26086](https://github.com/RocketChat/Rocket.Chat/pull/26086)) + +- Chore: RouteGroup for My Account sidebar ([#25632](https://github.com/RocketChat/Rocket.Chat/pull/25632)) + + Refactoring My Accounts routes. Allows to add "my account" routes for EE. + +- Chore: Run tests on docker ([#25556](https://github.com/RocketChat/Rocket.Chat/pull/25556)) + +- Chore: Settings UI issue ([#26053](https://github.com/RocketChat/Rocket.Chat/pull/26053)) + +- Chore: Small fix on callProvider ([#25963](https://github.com/RocketChat/Rocket.Chat/pull/25963)) + +- Chore: solve yarn issues from env var ([#25468](https://github.com/RocketChat/Rocket.Chat/pull/25468)) + +- Chore: Split useUserInfoActions into small hooks ([#25747](https://github.com/RocketChat/Rocket.Chat/pull/25747)) + +- Chore: Sync with master ([#25284](https://github.com/RocketChat/Rocket.Chat/pull/25284)) + +- Chore: Taking out Blaze from routes with `MainLayout` ([#25697](https://github.com/RocketChat/Rocket.Chat/pull/25697)) + + While working with @guijun13 on the new homepage I saw we're still rendering a Blaze template even to just embedded components into `MainLayout`. This PR addresses it. + +- Chore: Template to generate packages ([#25174](https://github.com/RocketChat/Rocket.Chat/pull/25174)) + + ``` + npx hygen package new test + ``` + +- Chore: Test for department screen ([#25696](https://github.com/RocketChat/Rocket.Chat/pull/25696)) + +- Chore: test turbo params ([#26038](https://github.com/RocketChat/Rocket.Chat/pull/26038)) + +- Chore: Testing Kodiak feature ([#25794](https://github.com/RocketChat/Rocket.Chat/pull/25794)) + +- Chore: Tests refactor pageobjects ([#26245](https://github.com/RocketChat/Rocket.Chat/pull/26245)) + +- Chore: Tests with Playwright (task: All works) ([#25122](https://github.com/RocketChat/Rocket.Chat/pull/25122)) + +- Chore: Tests with Playwright (task: ROC-25, 06-message) ([#25252](https://github.com/RocketChat/Rocket.Chat/pull/25252)) + +- Chore: Tests with Playwright (task: ROC-28, 09-channels) ([#25196](https://github.com/RocketChat/Rocket.Chat/pull/25196)) + +- Chore: Tests with Playwright (task: ROC-31, 12-settings) ([#25253](https://github.com/RocketChat/Rocket.Chat/pull/25253)) + +- Chore: Tests with Playwright (task: ROC-66, Intermittent resolution in tests) ([#25416](https://github.com/RocketChat/Rocket.Chat/pull/25416)) + +- Chore: Translate admin helpers to TS ([#25690](https://github.com/RocketChat/Rocket.Chat/pull/25690)) + +- Chore: TS conversion folder client ([#25031](https://github.com/RocketChat/Rocket.Chat/pull/25031)) + +- Chore: TS migration SortList ([#25167](https://github.com/RocketChat/Rocket.Chat/pull/25167)) + +- Chore: ui-client package ([#25916](https://github.com/RocketChat/Rocket.Chat/pull/25916)) + +- Chore: Update Apps-Engine and Fuselage ([#25700](https://github.com/RocketChat/Rocket.Chat/pull/25700)) + +- Chore: Update Apps-Engine version ([#25617](https://github.com/RocketChat/Rocket.Chat/pull/25617)) + +- Chore: Update Apps-Engine version ([#26258](https://github.com/RocketChat/Rocket.Chat/pull/26258)) + + Bumping Apps-Engine version + +- Chore: update avatar colors ([#26153](https://github.com/RocketChat/Rocket.Chat/pull/26153)) + +- Chore: Update Livechat to the last version ([#25257](https://github.com/RocketChat/Rocket.Chat/pull/25257)) + +- Chore: Update Livechat version ([#25130](https://github.com/RocketChat/Rocket.Chat/pull/25130)) + +- Chore: Update Meteor 2.7.3 ([#25991](https://github.com/RocketChat/Rocket.Chat/pull/25991)) + +- Chore: update OTR icon ([#24521](https://github.com/RocketChat/Rocket.Chat/pull/24521) by [@kibonusp](https://github.com/kibonusp)) + + I changed the shredder icon in OTR contextual bar to the stopwatch icon, recently added to the fuselage. + +- Chore: Update package.json update tsc memory ([#25755](https://github.com/RocketChat/Rocket.Chat/pull/25755)) + +- Chore: update pageobjects to use es6 getters and remove export default ([#25867](https://github.com/RocketChat/Rocket.Chat/pull/25867)) + +- Chore: Update poplib ([#25964](https://github.com/RocketChat/Rocket.Chat/pull/25964)) + +- Chore: Update useSidebarPalette selectors ([#26322](https://github.com/RocketChat/Rocket.Chat/pull/26322)) + +- Chore: Update Volta configuration ([#25394](https://github.com/RocketChat/Rocket.Chat/pull/25394)) + + [Volta](https://volta.sh/) need some extra configuration to work on monorepos. + +- Chore: Updating Apps-Engine ([#26001](https://github.com/RocketChat/Rocket.Chat/pull/26001)) + +- Chore: Upgrade and remove unnecessary Livechat dependencies ([#25672](https://github.com/RocketChat/Rocket.Chat/pull/25672)) + +- Chore: Upgrade Fuselage packages to `next` dist-tag ([#26274](https://github.com/RocketChat/Rocket.Chat/pull/26274)) + + Upgrade Fuselage packages to the latest development versions. + +- Chore: use params instead of URL building on livechat endpoints ([#25810](https://github.com/RocketChat/Rocket.Chat/pull/25810)) + +- Chore: User set UTC offset ([#25381](https://github.com/RocketChat/Rocket.Chat/pull/25381)) + +- Chore: VideoConference UX/UI Refactor 1st Interaction ([#26183](https://github.com/RocketChat/Rocket.Chat/pull/26183)) + +- Chore: VoIP Context ([#25994](https://github.com/RocketChat/Rocket.Chat/pull/25994)) + +- Chore: Watch for package changes ([#25910](https://github.com/RocketChat/Rocket.Chat/pull/25910)) + + With the current `dev` pipeline, whenever we modify a package (e.g. `api-client`), we have to kill the meteor proccess and run `yarn dev` again in order for the changes to be compiled and the new output to be used by meteor. + + This has the drawback of taking a little longer to run the dev environment, since we can't cache a watched buid. In the other hand, it reduces the friction of modifying internal packages since we don't need to rebuild the project for changes to take effect. + + This will enable us to move more things to separate packages without affecting the dev experience too much. + +- Chore(deps): Bump sharp from 0.30.4 to 0.30.6 ([#25719](https://github.com/RocketChat/Rocket.Chat/pull/25719) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- i18n: Language update from LingoHub 🤖 on 2022-04-04Z ([#25043](https://github.com/RocketChat/Rocket.Chat/pull/25043)) + +- Merge master into develop & Set version to 4.7.0-develop ([#25028](https://github.com/RocketChat/Rocket.Chat/pull/25028)) + +- Merge master into develop & Set version to 5.0.0 ([#25702](https://github.com/RocketChat/Rocket.Chat/pull/25702) by [@felipe-menelau](https://github.com/felipe-menelau)) + +- Regression: Admin Avatar Edit endpoint fix ([#26232](https://github.com/RocketChat/Rocket.Chat/pull/26232)) + +- Regression: [VideoConference] Callee client behaves improperly when accepting a call from someone who lost the connection ([#26101](https://github.com/RocketChat/Rocket.Chat/pull/26101)) + + If the caller loses connection and the callee accepts the call anyway, the client will wait for five seconds for confirmation that they can join the call. This PR improves the UI behavior during those five seconds. + +- Regression: [VideoConference] If the caller loses connection, direct calls are never canceled ([#26099](https://github.com/RocketChat/Rocket.Chat/pull/26099)) + +- Regression: `yarn dev` not working ([#26071](https://github.com/RocketChat/Rocket.Chat/pull/26071)) + +- Regression: Add `isPending` status to message ([#25299](https://github.com/RocketChat/Rocket.Chat/pull/25299)) + +- Regression: Add appId prop to slashcommand ([#25988](https://github.com/RocketChat/Rocket.Chat/pull/25988)) + + Pass the appId when present to the slashcommand array. This avoid problems with contextual bar and modals not opening. + +- Regression: Add better error messages when call fails ([#26134](https://github.com/RocketChat/Rocket.Chat/pull/26134)) + +- Regression: Add Error boundary to katex render component ([#26067](https://github.com/RocketChat/Rocket.Chat/pull/26067)) + +- Regression: Add eslint package to micro services Dockerfile ([#25311](https://github.com/RocketChat/Rocket.Chat/pull/25311)) + +- Regression: Add select message to system message and thread preview and allow select on legacy template ([#25251](https://github.com/RocketChat/Rocket.Chat/pull/25251)) + +- Regression: Add v1 to licenses.add endpoint ([#26311](https://github.com/RocketChat/Rocket.Chat/pull/26311)) + +- Regression: Added missing call button in the contact info contextual bar ([#26135](https://github.com/RocketChat/Rocket.Chat/pull/26135)) + +- Regression: Added missing call button to contact center calls list ([#26119](https://github.com/RocketChat/Rocket.Chat/pull/26119)) + + This PR adds a call button to the contact center calls list rows. + +- Regression: Adjusted priority to run canned responses replace before new parser ([#26298](https://github.com/RocketChat/Rocket.Chat/pull/26298)) + + Canned responses placeholders were not being replaced properly after we changed to the new md parser. + This fix changes the priority so that the canned responses replace logic runs before the parser, thus bringing back this functionality. + + Before: + Screen Shot 2022-07-18 at 19 25 07 + + After: + Screen Shot 2022-07-18 at 19 26 09 + +- Regression: Align TypeScript version across workspaces ([#26184](https://github.com/RocketChat/Rocket.Chat/pull/26184)) + + Some places were still referring to TypeScript 4.3.4 instead of 4.5.5, so this PR targets it. + +- Regression: All users in members list showing as federated ([#26129](https://github.com/RocketChat/Rocket.Chat/pull/26129)) + +- Regression: App event listeners broke Slackbridge integration and importers ([#25689](https://github.com/RocketChat/Rocket.Chat/pull/25689)) + + Some event listeners triggered by Apps were calling `Meteor.user()` in functions that could run outside of Meteor environment + +- Regression: Assets & Slack Bridge Setting Page not rendering ([#25629](https://github.com/RocketChat/Rocket.Chat/pull/25629)) + +- Regression: AutoTranslate on new message template ([#26049](https://github.com/RocketChat/Rocket.Chat/pull/26049)) + +- Regression: Avatar not loading on first direct message ([#25211](https://github.com/RocketChat/Rocket.Chat/pull/25211)) + + fix avatar not loading on a first direct message + +- Regression: Better MongoDB connection management for micro services ([#25323](https://github.com/RocketChat/Rocket.Chat/pull/25323)) + +- Regression: Broken components on Federation and Engagement dashboards ([#25653](https://github.com/RocketChat/Rocket.Chat/pull/25653)) + + For reasons I've no clue, any client import path matching `**/data/**` will not be included in the final bundle, failing silently on transpiling/bundling. + +- Regression: Broken emoji picker on Livechat ([#26128](https://github.com/RocketChat/Rocket.Chat/pull/26128)) + +- Regression: bump onboarding-ui version ([#25320](https://github.com/RocketChat/Rocket.Chat/pull/25320)) + + - Bump to 'next' the onboarding-ui package from fuselage. + - Update from 'companyEmail' to 'email' adminData usage types + +- Regression: Burger menu showing arrow instead of burguer ([#26170](https://github.com/RocketChat/Rocket.Chat/pull/26170)) + +- Regression: Call toggle missing network disconnection state ([#26237](https://github.com/RocketChat/Rocket.Chat/pull/26237)) + + This PR brings back the network disconnection state to the voip call toggle button + + ![image (4)](https://user-images.githubusercontent.com/6494543/178564719-f436505e-3ae3-4d69-ba5a-27ce8e8c5fba.png) + +- Regression: Calling info on VoipFooter when performing an outbound call ([#26138](https://github.com/RocketChat/Rocket.Chat/pull/26138)) + + ![image](https://user-images.githubusercontent.com/17487063/177395438-a0b2d30a-e0e2-4a31-9b55-2c6c3216bbd7.png) + +- Regression: Cannot logout when CallProvider is unregistered and mounted ([#26158](https://github.com/RocketChat/Rocket.Chat/pull/26158)) + +- Regression: Cannot open Menu in searched message. ([#26172](https://github.com/RocketChat/Rocket.Chat/pull/26172)) + +- Regression: Change Audio settings for device settings as modal title ([#26159](https://github.com/RocketChat/Rocket.Chat/pull/26159)) + +- Regression: Change logic to check if connection is online on unstable networks ([#25618](https://github.com/RocketChat/Rocket.Chat/pull/25618)) + +- Regression: Change preference to be default legacy messages ([#25255](https://github.com/RocketChat/Rocket.Chat/pull/25255)) + +- Regression: Changing isEnterprise useQuery name to prevent conflict of queries ([#26116](https://github.com/RocketChat/Rocket.Chat/pull/26116)) + + Changed the name of useQuery hook to prevent conflict of queries with same name. + +- Regression: Channel `type` icon on Engagement Dashboard ([#26269](https://github.com/RocketChat/Rocket.Chat/pull/26269)) + + This PR fixes a bug on which the channel type is inverted. + +- Regression: CI playwright ([#25168](https://github.com/RocketChat/Rocket.Chat/pull/25168)) + +- Regression: CI services build ([#25555](https://github.com/RocketChat/Rocket.Chat/pull/25555)) + +- Regression: Clear user selection filter after selecting desired user. ([#26295](https://github.com/RocketChat/Rocket.Chat/pull/26295)) + +- Regression: Close button on modals created via apps not working ([#26127](https://github.com/RocketChat/Rocket.Chat/pull/26127)) + +- Regression: Contact manager edit/view not working ([#26155](https://github.com/RocketChat/Rocket.Chat/pull/26155)) + + Basically, the Contact Center was working, but not the right way. This PR fixes: + - Ability to select Contact Managers from dropdown + - Ability to validate Contact Edits without requesting data a ton of times + - Ability to remove Contact manager from a contact + - Ability to see Contacts and Contact Managers on Contact View + - Fix endpoints validation + - Add validators (ajv) to endpoint, thou not being used yet (since we hit a special endpoint) + +- Regression: Contact manager endpoint usage ([#26063](https://github.com/RocketChat/Rocket.Chat/pull/26063)) + +- Regression: Correct call ringtones ([#26111](https://github.com/RocketChat/Rocket.Chat/pull/26111)) + + - outbound-call-ringing ringtone: Should be played when the outbound call is initiated and not yet established(Current implementation is playing the incoming-call ringtone) + - call-ended ringtone: Should be played whenever a call ends. + +- Regression: Device management table missing device icon and ip text ellipsis ([#26255](https://github.com/RocketChat/Rocket.Chat/pull/26255)) + +- Regression: Do not show federated tooltip on non-federated rooms ([#26115](https://github.com/RocketChat/Rocket.Chat/pull/26115)) + +- Regression: Docker image publish ([#25931](https://github.com/RocketChat/Rocket.Chat/pull/25931)) + +- Regression: Don't open mdm feature modal on registration page ([#26234](https://github.com/RocketChat/Rocket.Chat/pull/26234)) + +- Regression: Emojis displaying as `:undefined:` ([#26141](https://github.com/RocketChat/Rocket.Chat/pull/26141)) + +- Regression: Empty URL previews in messages. ([#26160](https://github.com/RocketChat/Rocket.Chat/pull/26160)) + +- Regression: Endpoint types with Ajv Coercing data types ([#25644](https://github.com/RocketChat/Rocket.Chat/pull/25644)) + + Ajv Coercing data types should be `true` to accept all kinds of data requested. + +- Regression: eslint not running on packages ([#25305](https://github.com/RocketChat/Rocket.Chat/pull/25305)) + +- Regression: Federated users not showing as federated in Room Members ([#26249](https://github.com/RocketChat/Rocket.Chat/pull/26249)) + +- Regression: fix `directory` endpoint not listing teams ([#26310](https://github.com/RocketChat/Rocket.Chat/pull/26310)) + +- Regression: Fix app icons breaking UI ([#26278](https://github.com/RocketChat/Rocket.Chat/pull/26278)) + +- Regression: fix apps path ([#25809](https://github.com/RocketChat/Rocket.Chat/pull/25809)) + +- Regression: Fix apps wrong typing ([#25824](https://github.com/RocketChat/Rocket.Chat/pull/25824)) + +- Regression: Fix assets format ([#26140](https://github.com/RocketChat/Rocket.Chat/pull/26140)) + +- Regression: Fix blackscreen after app install ([#25950](https://github.com/RocketChat/Rocket.Chat/pull/25950)) + + Fixed an error where the client screen would go black after installing an app. This was hapenning because the handleAppAddedOrUpdated function from the AppsProvider had a wrong type for the return of the getAppFromMarketplace function. + + Demo gifs: + + Before + ![app-install-error-before](https://user-images.githubusercontent.com/43561537/174861410-024dff74-b5d9-49ba-ae67-849f1ff239a9.gif) + + After: + ![app-install-error-after](https://user-images.githubusercontent.com/43561537/174861448-58b071e6-8e1b-4391-b49a-44b68249acbf.gif) + +- Regression: Fix breaking omnichannel tests ([#26305](https://github.com/RocketChat/Rocket.Chat/pull/26305)) + +- Regression: Fix call direction ([#26055](https://github.com/RocketChat/Rocket.Chat/pull/26055)) + +- Regression: Fix CI monorepo build ([#25107](https://github.com/RocketChat/Rocket.Chat/pull/25107)) + +- Regression: Fix clicking on visitor's chat in the sidebar does not display the chat window ([#25380](https://github.com/RocketChat/Rocket.Chat/pull/25380)) + + Fix: livechat room not opening. + +- Regression: Fix command previews ([#26199](https://github.com/RocketChat/Rocket.Chat/pull/26199)) + + Fixes slash command previews not being showed + +- Regression: Fix e2e CI ([#25974](https://github.com/RocketChat/Rocket.Chat/pull/25974)) + +- Regression: Fix English i18n react text ([#25368](https://github.com/RocketChat/Rocket.Chat/pull/25368)) + + Incorrect text in reaction tooltip has been fixed + +- Regression: Fix extended sidebar item ([#25887](https://github.com/RocketChat/Rocket.Chat/pull/25887)) + +- Regression: Fix federation Matrix bridge startup ([#25273](https://github.com/RocketChat/Rocket.Chat/pull/25273)) + +- Regression: Fix files list endpoints ([#26226](https://github.com/RocketChat/Rocket.Chat/pull/26226)) + +- Regression: Fix get myself user data ([#26328](https://github.com/RocketChat/Rocket.Chat/pull/26328)) + +- Regression: Fix import endpoints ([#26074](https://github.com/RocketChat/Rocket.Chat/pull/26074)) + +- Regression: Fix job Id not returned by agenda ([#26315](https://github.com/RocketChat/Rocket.Chat/pull/26315)) + +- Regression: Fix marketplace app apis visibility problem ([#26080](https://github.com/RocketChat/Rocket.Chat/pull/26080)) + + Solved a problem that showed an unwanted zero in place of the APIs section for apps that weren't installed/did not have an APIs section. + Before: + ![image](https://user-images.githubusercontent.com/43561537/176743542-8f5d2e97-48e7-4947-a82a-43c3a15ea0ac.png) + + After(non installed app): + ![image](https://user-images.githubusercontent.com/43561537/176744082-0139e15b-b03b-4c03-9267-9a17d14b70e9.png) + + After(installed app) + ![image](https://user-images.githubusercontent.com/43561537/176772870-c5382edc-59e6-42e4-8dfa-f1e4fd0267c0.png) + +- Regression: Fix marketplace releases tab crash bug ([#26162](https://github.com/RocketChat/Rocket.Chat/pull/26162)) + + Fixed a bug where RC would crash because the marketplace releases tab was trying to display undefined data from manually installed apps. + Demo gif: + ![app-releases-tab-crash-error](https://user-images.githubusercontent.com/43561537/177656489-325790d3-49e0-46c8-8ac2-1f74c6a309ad.gif) + +- Regression: Fix micro services ([#26054](https://github.com/RocketChat/Rocket.Chat/pull/26054)) + +- Regression: Fix micro services Docker build ([#25193](https://github.com/RocketChat/Rocket.Chat/pull/25193)) + +- Regression: Fix multi line is not showing an empty line between lines ([#25317](https://github.com/RocketChat/Rocket.Chat/pull/25317)) + +- Regression: Fix Omnichannel not working after meteor update ([#26194](https://github.com/RocketChat/Rocket.Chat/pull/26194)) + + Fixed things: + - Omnichannel Directory + - Omnichannel Current Chats + - Auto Selection Algo + - Load Balance Algo + - Manual Selection Algo + - Livechat New Conversations + + Other fixed things: + - Warning on fields deprecation + - Warning on "remove" deprecation + - Remove findAndModify usage + +- Regression: Fix permissions page pagination ([#26304](https://github.com/RocketChat/Rocket.Chat/pull/26304)) + +- Regression: Fix rendered markdown styling on app info page details section ([#26093](https://github.com/RocketChat/Rocket.Chat/pull/26093)) + + Fixed two styling problems on the AppDetails markdown. The first one was a misuse of flex and the second was the fact that the withRichContent flag was missing on the box that received the markdown. + Demo images: + Before: + ![image](https://user-images.githubusercontent.com/43561537/177857346-54476879-2618-452f-8585-1922dcbfa9c1.png) + + After: + ![image](https://user-images.githubusercontent.com/43561537/177857376-e96e4ad3-3410-4847-89b7-df074ff87b2f.png) + + Clickup task: https://app.clickup.com/t/2rwq0q7 + +- Regression: Fix reply button not working when hideFlexTab is enabled ([#25306](https://github.com/RocketChat/Rocket.Chat/pull/25306)) + +- Regression: Fix routing for public queue and visitor abandonment fiber usage ([#26233](https://github.com/RocketChat/Rocket.Chat/pull/26233)) + +- Regression: Fix scheduler not working ([#26242](https://github.com/RocketChat/Rocket.Chat/pull/26242)) + +- Regression: Fix services Docker build on CI ([#25181](https://github.com/RocketChat/Rocket.Chat/pull/25181)) + +- Regression: Fix services-image-build-check ([#25519](https://github.com/RocketChat/Rocket.Chat/pull/25519)) + +- Regression: Fix size of custom emoji and render emoji on thread message preview ([#25314](https://github.com/RocketChat/Rocket.Chat/pull/25314)) + +- Regression: Fix sort field files.list ([#25687](https://github.com/RocketChat/Rocket.Chat/pull/25687)) + +- Regression: Fix the alpine image and dev UX installing matrix-rust-sdk-bindings ([#25319](https://github.com/RocketChat/Rocket.Chat/pull/25319)) + + The package only included a few pre-built which caused all macs to have to compile every time they installed and also caused our alpine not to work. + + This temporarily switches to a fork of the matrix-appservice-bridge package. + + Made changes to one of its child dependencies `matrix-rust-sdk-bindings` that adds pre-built binaries for mac and musl (for alpine). + +- Regression: Fix threads list ([#26052](https://github.com/RocketChat/Rocket.Chat/pull/26052)) + +- Regression: Fix users.create call ([#25834](https://github.com/RocketChat/Rocket.Chat/pull/25834)) + +- Regression: Fix voip call wrap-up model not working ([#26024](https://github.com/RocketChat/Rocket.Chat/pull/26024)) + +- Regression: get user from `req` on `ui.interaction` endpoints ([#26256](https://github.com/RocketChat/Rocket.Chat/pull/26256)) + +- Regression: Inline code and copyonly tag styles ([#26173](https://github.com/RocketChat/Rocket.Chat/pull/26173)) + +- Regression: Invalid Voip host issue preventing agents connecting to asterisk ([#26056](https://github.com/RocketChat/Rocket.Chat/pull/26056)) + +- Regression: Last_login translation key ([#26203](https://github.com/RocketChat/Rocket.Chat/pull/26203)) + +- Regression: Link not scrolling to message ([#26073](https://github.com/RocketChat/Rocket.Chat/pull/26073)) + +- Regression: Livechat not rendering UiKit messages with action buttons ([#26327](https://github.com/RocketChat/Rocket.Chat/pull/26327)) + +- Regression: Livechat rooms not opening due to route desync ([#26209](https://github.com/RocketChat/Rocket.Chat/pull/26209)) + + Due to route information only updating on `Tracker.afterFlush` (https://github.com/RocketChat/Rocket.Chat/pull/25990), we found out that calling the `tabBar.openUserInfo()` method at this point will cause a route change to the previous route instead of the current one, preventing livechat rooms from being opened. + + As a provisory solution, we're delaying the opening of the contextual bar, which then ensures that the route info is up to date. Although this solution works, we need to find a more reliable way of ensuring consistent route changes with up-to-date information. + + ### I'm definitely open for better looking alternatives. Please leave a comment if you have a better solution to share. + +- Regression: Matrix Federation regressions ([#26283](https://github.com/RocketChat/Rocket.Chat/pull/26283)) + +- Regression: Messages in new message template Crashing. ([#25327](https://github.com/RocketChat/Rocket.Chat/pull/25327)) + +- Regression: Meteor uses `projection` for its observes ([#26223](https://github.com/RocketChat/Rocket.Chat/pull/26223)) + +- Regression: Missing settings group descriptions ([#25639](https://github.com/RocketChat/Rocket.Chat/pull/25639)) + + + +- Regression: moving Community Watermark to `ee` folder ([#26148](https://github.com/RocketChat/Rocket.Chat/pull/26148)) + + Due to legal reasons, the Watermark used in community Edition was moved to Enterprise folder `ee` + +- Regression: Non-reactive routes ([#25990](https://github.com/RocketChat/Rocket.Chat/pull/25990)) + + When `Tracker.autorun()` calls are nested, it's possible that an invalidation at the parent render the children non-reactive due to synchronous calls. To avoid that under the callback given by `useSyncExternalStore`, we schedule an `onStoreChange` callback call to not make it reside at the same backtrace. + +- Regression: Omni-chats not getting routed automatically to bots ([#26267](https://github.com/RocketChat/Rocket.Chat/pull/26267)) + +- Regression: Options overlapping input in Users Autocomplete ([#26309](https://github.com/RocketChat/Rocket.Chat/pull/26309)) + +- Regression: OTR with new React Messages ([#26179](https://github.com/RocketChat/Rocket.Chat/pull/26179)) + + This PR solves 2 OTR issues with new react message components + + - disable the server side message parser for OTR messages + - adds the stopwatch icon for otr messages + + ### Before + Screenshot 2022-07-08 at 12 58 08 AM + + ### After + Screenshot 2022-07-08 at 12 55 08 AM + +- Regression: Parse outbound phone number removing * putting + char ([#26154](https://github.com/RocketChat/Rocket.Chat/pull/26154)) + +- Regression: Re-add view logs button ([#25876](https://github.com/RocketChat/Rocket.Chat/pull/25876)) + + Re-added the view logs button to the appMenu component so that the user can go directly from the marketplace list of apps to the app info page with the logs tab already open. + Demo gif: + ![re-add-view-logs-button](https://user-images.githubusercontent.com/43561537/173681990-86c8a93c-bb2e-4540-824d-b7fbb3161356.gif) + +- Regression: Remove 4.0 version banner ([#26251](https://github.com/RocketChat/Rocket.Chat/pull/26251)) + + Created a migration to disable and dismiss for all users the old 4.0 version banner. + It happened when a new admin user has been added. + +- Regression: Remove alpha tag and fix initialization process ([#26248](https://github.com/RocketChat/Rocket.Chat/pull/26248)) + +- Regression: remove italic from reaction translation ([#26152](https://github.com/RocketChat/Rocket.Chat/pull/26152)) + +- Regression: Removed CE watermark from VoipFooter ([#26239](https://github.com/RocketChat/Rocket.Chat/pull/26239)) + + The objective of this change is to remove the CE watermark **only** during an active call. The CE watermark will be displayed normally in all other scenarios. Bellow you can see a demonstration of the expected behavior: + + ![ce-watermark-removed-voip](https://user-images.githubusercontent.com/6494543/178615342-8049a2a8-d331-46a9-a8f1-8461ae341b50.gif) + +- Regression: Replace contact center icon ([#26216](https://github.com/RocketChat/Rocket.Chat/pull/26216)) + +- Regression: REST API calls at Engagement Dashboard ([#26235](https://github.com/RocketChat/Rocket.Chat/pull/26235)) + + Parameters for GET requests are *not* serialized as for other methods, therefore sending `Date` objects is not viable due to the way `Date.prototype.toString` works. This PR uses `Date.prototype.toISOString` explicitly to serialize dates. + +- Regression: Revert Bugsnag version ([#25313](https://github.com/RocketChat/Rocket.Chat/pull/25313)) + +- Regression: Revert Livechat packages upgrades/removals that were causing issues ([#26077](https://github.com/RocketChat/Rocket.Chat/pull/26077)) + +- Regression: Revert replace contact center icon ([#26238](https://github.com/RocketChat/Rocket.Chat/pull/26238)) + +- Regression: Reverting @rocket.chat/mp3-encoder version to fix Audio Message ([#26197](https://github.com/RocketChat/Rocket.Chat/pull/26197)) + + An unknow breaking change (still investigating) happened when upgrading the [@rocket.chat/mp3-encoder](https://github.com/RocketChat/fuselage/tree/develop/packages/mp3-encoder) package to version 0.25.0, because of that we revert the version to 0.24.0 the last know working version. + +- Regression: Rocket.Chat Webapp not loading. ([#25349](https://github.com/RocketChat/Rocket.Chat/pull/25349)) + +- Regression: Room Endpoint Call Issues ([#25928](https://github.com/RocketChat/Rocket.Chat/pull/25928)) + + This PR fixes small management bugs related with channels, rooms and teams + +- Regression: Search on Member List ([#26273](https://github.com/RocketChat/Rocket.Chat/pull/26273)) + +- Regression: Send files with `enter` key ([#26136](https://github.com/RocketChat/Rocket.Chat/pull/26136)) + +- Regression: Set `offset` and `count` optional on `ChatGetThreadsListSchema` ([#25961](https://github.com/RocketChat/Rocket.Chat/pull/25961)) + +- Regression: Show username and real name on the message system ([#25254](https://github.com/RocketChat/Rocket.Chat/pull/25254)) + +- Regression: Shows error if micro service cannot connect to Mongo ([#25301](https://github.com/RocketChat/Rocket.Chat/pull/25301)) + +- Regression: Sidebar icons spacing ([#26139](https://github.com/RocketChat/Rocket.Chat/pull/26139)) + + - Fixed the sidebar icons ('display' and 'create new') spacing issue + + before: + ![image](https://user-images.githubusercontent.com/5263975/178897210-50615ea9-28d5-4b35-a93a-c5facea365e5.png) + + + + after: + + ![image](https://user-images.githubusercontent.com/5263975/178896945-1bf71112-8a01-4db6-9f9b-20ea778496f7.png) + +- Regression: Special characters on phone number ([#26241](https://github.com/RocketChat/Rocket.Chat/pull/26241)) + + PR Includes: + - Keep focus on phone input of dial pad + - Handle submit with "Enter" key + - Remove mask and mandatory "+" char + - Long press for "0"/"+" button + +- Regression: Subscription menu not appearing for non installed but subscribed apps ([#25627](https://github.com/RocketChat/Rocket.Chat/pull/25627)) + + Fixed a problem on which the AppMenu component did not appear for apps that had an active subscription but weren't installed, now the rendering of the component is also based on the isSubscribed flag, and the appearance of the uninstall and enable/disable options are based on the app.installed flag so that the correct options appear on all the edge cases. + Demo gif: + ![subscription-manager-fix](https://user-images.githubusercontent.com/43561537/170132040-dc8535c0-8056-4fb2-b008-afaece744868.gif) + +- Regression: TOTP Modal with new rest api package ([#25893](https://github.com/RocketChat/Rocket.Chat/pull/25893)) + +- Regression: UIKit buttons auth user validation ([#26171](https://github.com/RocketChat/Rocket.Chat/pull/26171)) + + Fix the validation to match the new feature that allows apps to register auth-required routes. + +- Regression: Unable to click on UiKit buttons provided by apps ([#26125](https://github.com/RocketChat/Rocket.Chat/pull/26125)) + +- Regression: Unable to edit user details via admin panel ([#25923](https://github.com/RocketChat/Rocket.Chat/pull/25923)) + +- Regression: Unavailable devices in unsupported browsers ([#26174](https://github.com/RocketChat/Rocket.Chat/pull/26174)) + +- Regression: Unhandled Exceptions metric causing a secondary exception ([#26088](https://github.com/RocketChat/Rocket.Chat/pull/26088)) + +- Regression: Update error message on `useEndpointActionExperimental` ([#26062](https://github.com/RocketChat/Rocket.Chat/pull/26062)) + + This PR changes the way we show an error message to the user on the `useEndpointActionExperimental` hook, previously for `Object` error messages it was being shown as undefined + +- Regression: Update message reaction text ([#26097](https://github.com/RocketChat/Rocket.Chat/pull/26097)) + +- Regression: Update settings groups description ([#25663](https://github.com/RocketChat/Rocket.Chat/pull/25663)) + +- Regression: Use exact Node version on micro services Docker images ([#25287](https://github.com/RocketChat/Rocket.Chat/pull/25287)) + +- Regression: Use fname instead real unique name for Voip ([#26319](https://github.com/RocketChat/Rocket.Chat/pull/26319)) + + Affect: + - Voip room header + - Contacts table + - Contact info + +- Regression: UserInfo/RoomInfo Menu ([#26252](https://github.com/RocketChat/Rocket.Chat/pull/26252)) + + **note**: next fuselage's version needed + + #### before + ![Screen Shot 2022-07-13 at 12 24 38](https://user-images.githubusercontent.com/27704687/178771262-d482b300-de80-4961-be2e-8c034480d237.png) + + #### after + ![Screen Shot 2022-07-13 at 12 25 39](https://user-images.githubusercontent.com/27704687/178771460-db10883b-aa6d-4254-82d4-8cadd6991ae8.png) + +- Regression: Users on new sessions are forced to re-configure 2fa ([#26117](https://github.com/RocketChat/Rocket.Chat/pull/26117)) + +- Regression: Users Table loading state ([#26079](https://github.com/RocketChat/Rocket.Chat/pull/26079)) + +- Regression: Validate empty fields for Message template ([#25250](https://github.com/RocketChat/Rocket.Chat/pull/25250)) + +- Regression: VoIp wrap up modal not opening after call disconnect ([#25651](https://github.com/RocketChat/Rocket.Chat/pull/25651)) + + This PR fixes a bug preventing the wrap up call modal from being displayed after caller or agent ends the call. + +- Regression: Webhook Integration Creation + string error toast msg ([#26008](https://github.com/RocketChat/Rocket.Chat/pull/26008)) + +- Regression: yarn dev triggers build dependencies ([#25208](https://github.com/RocketChat/Rocket.Chat/pull/25208)) + +- Revert: "Chore: Collect e2e coverage" ([#25936](https://github.com/RocketChat/Rocket.Chat/pull/25936)) + +- Test: Migrate 13-permissions from cypress to playwright ([#25558](https://github.com/RocketChat/Rocket.Chat/pull/25558)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@BenWiederhake](https://github.com/BenWiederhake) +- [@Himanshu664](https://github.com/Himanshu664) +- [@Hudell](https://github.com/Hudell) +- [@Kunalvrm555](https://github.com/Kunalvrm555) +- [@Sh0uld](https://github.com/Sh0uld) +- [@aakash-gitdev](https://github.com/aakash-gitdev) +- [@amolghode1981](https://github.com/amolghode1981) +- [@cuonghuunguyen](https://github.com/cuonghuunguyen) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@divinespear](https://github.com/divinespear) +- [@eduardofcabrera](https://github.com/eduardofcabrera) +- [@felipe-menelau](https://github.com/felipe-menelau) +- [@g-thome](https://github.com/g-thome) +- [@joakimaho](https://github.com/joakimaho) +- [@kibonusp](https://github.com/kibonusp) +- [@kodiakhq[bot]](https://github.com/kodiakhq[bot]) +- [@matthias4217](https://github.com/matthias4217) +- [@ostjen](https://github.com/ostjen) +- [@paulobernardoaf](https://github.com/paulobernardoaf) +- [@sidmohanty11](https://github.com/sidmohanty11) +- [@ujorgeleite](https://github.com/ujorgeleite) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@AllanPazRibeiro](https://github.com/AllanPazRibeiro) +- [@KevLehman](https://github.com/KevLehman) +- [@LucianoPierdona](https://github.com/LucianoPierdona) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@PedroRorato](https://github.com/PedroRorato) +- [@alansikora](https://github.com/alansikora) +- [@albuquerquefabio](https://github.com/albuquerquefabio) +- [@aleksandernsilva](https://github.com/aleksandernsilva) +- [@carlosrodrigues94](https://github.com/carlosrodrigues94) +- [@cauefcr](https://github.com/cauefcr) +- [@csuadev](https://github.com/csuadev) +- [@d-gubert](https://github.com/d-gubert) +- [@debdutdeb](https://github.com/debdutdeb) +- [@dougfabris](https://github.com/dougfabris) +- [@dudanogueira](https://github.com/dudanogueira) +- [@felipe-rod123](https://github.com/felipe-rod123) +- [@filipemarins](https://github.com/filipemarins) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@guijun13](https://github.com/guijun13) +- [@hugocostadev](https://github.com/hugocostadev) +- [@jeanfbrito](https://github.com/jeanfbrito) +- [@juliajforesti](https://github.com/juliajforesti) +- [@marceloschmidt](https://github.com/marceloschmidt) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@matheuslc](https://github.com/matheuslc) +- [@murtaza98](https://github.com/murtaza98) +- [@nishant23122000](https://github.com/nishant23122000) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@rique223](https://github.com/rique223) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@souzaramon](https://github.com/souzaramon) +- [@tapiarafael](https://github.com/tapiarafael) +- [@tassoevan](https://github.com/tassoevan) +- [@thassiov](https://github.com/thassiov) +- [@tiagoevanp](https://github.com/tiagoevanp) +- [@tmontini](https://github.com/tmontini) +- [@weslley543](https://github.com/weslley543) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 4.8.4 +`2022-08-11 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` + +### 🐛 Bug fixes + + +- Endpoints `im.list` not working with Use Real Name setting ([#26532](https://github.com/RocketChat/Rocket.Chat/pull/26532)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 4.8.3 +`2022-08-02 · 4 🐛 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` + +### 🐛 Bug fixes + + +- Empty results on `im.list` endpoint ([#26438](https://github.com/RocketChat/Rocket.Chat/pull/26438)) + +- Unable to close chats when comments is disabled ([#26057](https://github.com/RocketChat/Rocket.Chat/pull/26057)) + + Fixes https://github.com/RocketChat/Rocket.Chat/issues/25954 + +- Unable to send voice recording to Whatsapp ([#26276](https://github.com/RocketChat/Rocket.Chat/pull/26276)) + +- Update chartjs usage to v3 ([#25873](https://github.com/RocketChat/Rocket.Chat/pull/25873)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@albuquerquefabio](https://github.com/albuquerquefabio) +- [@murtaza98](https://github.com/murtaza98) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 4.8.2 +`2022-07-21 · 4 🐛 · 3 🔍 · 7 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` + +### 🐛 Bug fixes + + +- Error "numRequestsAllowed" property in rateLimiter for REST API endpoint when upgrading ([#26058](https://github.com/RocketChat/Rocket.Chat/pull/26058)) + +- Not showing edit message button when blocking edit after N minutes ([#25724](https://github.com/RocketChat/Rocket.Chat/pull/25724) by [@matthias4217](https://github.com/matthias4217)) + + Previously, in Rocketchat 4.7.0 and later, as mentioned in https://github.com/RocketChat/Rocket.Chat/issues/25478, the edit button was not displayed on the interface in the minute after having sent a message. This is now fixed : messages can be edited right after sending them. + +- Security Hotfix (https://docs.rocket.chat/guides/security/security-updates) + +- Settings not being overwritten to their default values ([#25891](https://github.com/RocketChat/Rocket.Chat/pull/25891)) + +
+🔍 Minor changes + + +- Chore: Avoid unneeded permission updates when EE license is applied ([#26253](https://github.com/RocketChat/Rocket.Chat/pull/26253)) + +- Release 4.8.1 ([#25814](https://github.com/RocketChat/Rocket.Chat/pull/25814) by [@Sh0uld](https://github.com/Sh0uld)) + +- Release 4.8.2 ([#26326](https://github.com/RocketChat/Rocket.Chat/pull/26326) by [@matthias4217](https://github.com/matthias4217)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Sh0uld](https://github.com/Sh0uld) +- [@matthias4217](https://github.com/matthias4217) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@dudanogueira](https://github.com/dudanogueira) +- [@ggazzo](https://github.com/ggazzo) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 4.8.1 +`2022-06-08 · 4 🐛 · 5 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` + +### 🐛 Bug fixes + + +- AccountBox checks for condition ([#25708](https://github.com/RocketChat/Rocket.Chat/pull/25708)) + +- Bump meteor-node-stubs to version 1.2.3 ([#25669](https://github.com/RocketChat/Rocket.Chat/pull/25669) by [@Sh0uld](https://github.com/Sh0uld)) + + With meteor-node-stubs version 1.2.3 a bug was fixed, which occured in issue #25460 and probably #25513 (last one not tested). + For the issue in meteor see: https://github.com/meteor/meteor/issues/11974 + +- Fix prom-client new promise usage ([#25781](https://github.com/RocketChat/Rocket.Chat/pull/25781)) + +- Wrong argument name preventing Omnichannel Chat Forward to User ([#25723](https://github.com/RocketChat/Rocket.Chat/pull/25723)) + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Sh0uld](https://github.com/Sh0uld) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@dudanogueira](https://github.com/dudanogueira) +- [@ggazzo](https://github.com/ggazzo) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 4.8.0 +`2022-05-31 · 16 🎉 · 13 🚀 · 55 🐛 · 151 🔍 · 52 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` + +### 🎉 New features + + +- Ability for RC server to check the business hour for a specific department ([#25436](https://github.com/RocketChat/Rocket.Chat/pull/25436)) + +- Add expire index to integration history ([#25087](https://github.com/RocketChat/Rocket.Chat/pull/25087)) + +- Add new app events for pin, react and follow message ([#25337](https://github.com/RocketChat/Rocket.Chat/pull/25337)) + +- Add new events after user login, logout and change his status ([#25234](https://github.com/RocketChat/Rocket.Chat/pull/25234)) + +- Add option to show mentions badge when show counter is disabled ([#25329](https://github.com/RocketChat/Rocket.Chat/pull/25329)) + +- Add user events for apps ([#25165](https://github.com/RocketChat/Rocket.Chat/pull/25165)) + +- Adding app button on user dropdown ([#25326](https://github.com/RocketChat/Rocket.Chat/pull/25326)) + +- Alpha Matrix Federation ([#23688](https://github.com/RocketChat/Rocket.Chat/pull/23688)) + + Experimental support for Matrix Federation with a Bridge + + https://user-images.githubusercontent.com/51996/164530391-e8b17ecd-a4d0-4ef8-a8b7-81230c1773d3.mp4 + +- Expand Apps Engine's environment variable allowed list ([#23870](https://github.com/RocketChat/Rocket.Chat/pull/23870) by [@cuonghuunguyen](https://github.com/cuonghuunguyen)) + +- Federation (Alpha Stabilization) ([#25457](https://github.com/RocketChat/Rocket.Chat/pull/25457)) + +- Get user's preferred language via apps ([#25514](https://github.com/RocketChat/Rocket.Chat/pull/25514)) + +- Marketplace new app details page ([#24711](https://github.com/RocketChat/Rocket.Chat/pull/24711)) + + Change the app details page layout for the new marketplace UI. General Task: [MKP12 - New UI - App Detail Page](https://app.clickup.com/t/1na769h) + + ## [MKP12 - Tab Navigation](https://app.clickup.com/t/2452f5u) + New tab navigation layout for the app details page. Now the app details page is divided into three sections, details, logs, and settings, that can each be accessed through a Tabs fuselage component. + + Demo gif: + ![tab_navigation_demo_gif](https://user-images.githubusercontent.com/43561537/157276436-3dab34c5-20da-4f5d-99d0-54c1c718ac1f.gif) + + ## [MKP12 - Header](https://app.clickup.com/t/25rhm0x) + Implemented a new header for the marketplaces app details page. + -Changed the size of the app name; + -Implemented the app description field on the header; + -Changed the "metadata" section of the header(The part with the version and author information) now it also shows the last time the app was updated; + -Created a chip that will show when an app is part of one or more bundles and inform which are the bundles; + -Implemented a tooltip for the bundle chips; + -Created a new button + data badge component to substitute the current App Status; + -Changed the title of the "purchase button". Now it shows different text based on the "purchase type" of the app; + -Created a new Pricing & Status display which shows the price when the app is not bought/installed and shows the app status(Enabled/Disabled) when it is bought/installed; + -Changed the way the tabs are rendered, now if the app is not installed(and consequently doesn't have logs and settings tab) it will not render these tabs; + + Demo gif: + ![new-header-gif](https://user-images.githubusercontent.com/43561537/159064599-fd64dfe2-86a3-47da-81ba-1e83f1b87432.gif) + + ## [MKP12 - Configuration Tab](https://app.clickup.com/t/2452gh4) + Delivered together with the tab-navigation task. Changed the app settings from the details of the app to the new settings tab. + Demo image: + ![New configuration tab](https://user-images.githubusercontent.com/43561537/160211324-95db0566-85bf-4dde-a814-3c6f23dcee4d.png) + + ## [MKP12 - Log Tab](https://app.clickup.com/t/2452gg1) + Changed the place of the app logs from the page to the new logs tab. Also changed some styles of the logs accordions to fit better with the new container. + + Before: + ![Before](https://user-images.githubusercontent.com/43561537/160210302-148ce584-604f-40ff-8209-141667016163.png) + + After + ![After](https://user-images.githubusercontent.com/43561537/160210984-d4060c5a-f912-4ef9-87e3-fa459080e2d4.png) + + ## [MKP12 - Page Header](https://app.clickup.com/t/29b0b12) + Changed the design for the page header of the app details page from a title on the left with a save and back button on the right to a back arrow icon on the left side of the title with the save button still on the right. Also changed the title of the page from App details to Back. + Edit: After some design reconsideration, the page title was changed to App Info. + Demo gif: + ![new_page_header_app_details](https://user-images.githubusercontent.com/43561537/160937741-f5514f70-f43b-4400-8b2f-a5a26f95de9d.gif) + + ## [MKP12 - Detail Tab](https://app.clickup.com/t/2452gf7) + Implemented markdown on the description section of the app details page, now the description will show the detailedDescription.rendered (as rendered JSX) information in case it exists and show the description (a.k.a. short description) information in case it doesn't. Unfortunately, as of right now no app has a visual example of a markdown description and because of that, I will not be able to provide a demo image/gif for this PR. + + ## [MKP12 - Slider Component](https://app.clickup.com/t/2452h26) + Created an image carousel component on the app details page. This component receives images from the apps/appId/screenshots endpoint and shows them on the content section of the app details of any apps that have screenshots registered, if the app has no screenshots it simply shows nothing where the carousel should be. This component is complete with keyboard arrow navigation on the "open" carousel, hover highlight on the carousel preview and close on esc press. + Demo gif: + ![new_carousel_component](https://user-images.githubusercontent.com/43561537/167415212-9d8359c7-4132-4afa-a698-8be4ab1e1393.gif) + +- Message Template React Component ([#23971](https://github.com/RocketChat/Rocket.Chat/pull/23971)) + + Complete rewrite of the messages component in react. Visual changes should be minimal as well as user impact, with no break changes (unless you've customized the blaze template). + + + + ![Screen Shot 2022-04-05 at 11 14 18](https://user-images.githubusercontent.com/27704687/161774027-38dd9c7b-eeeb-45e2-b9d8-ea2a9be8486d.png) + In case you encounter any problems, or want to compare, temporarily it is possible to use the old version + + image + +- New button for network outage ([#25499](https://github.com/RocketChat/Rocket.Chat/pull/25499) by [@amolghode1981](https://github.com/amolghode1981)) + + When network outage happens it should be conveyed to the user with special icon. This icon should not be clickable. + Network outage handling is handled in https://app.clickup.com/t/245c0d8 task. + +- New stats rewrite ([#25078](https://github.com/RocketChat/Rocket.Chat/pull/25078) by [@ostjen](https://github.com/ostjen)) + + Add the following new statistics (**metrics**): + + - Total users with TOTP enabled; + - Total users with 2FA enabled; + - Total pinned messages; + - Total starred messages; + - Total email messages; + - Total rooms with at least one starred message; + - Total rooms with at least one pinned message; + - Total encrypted rooms; + - Total link invitations; + - Total email invitations; + - Logo change; + - Number of custom script lines; + - Number of custom CSS lines; + - Number of rooms inside teams; + - Number of default (auto-join) rooms inside teams; + - Number of users created through link invitation; + - Number of users created through manual entry; + - Number of imported users (by import type); + +- Star message, report and delete message events ([#25383](https://github.com/RocketChat/Rocket.Chat/pull/25383)) + +### 🚀 Improvements + + +- **ENTERPRISE:** Allow mapping LDAP groups to multiple RC roles ([#23849](https://github.com/RocketChat/Rocket.Chat/pull/23849)) + + - Add support to mapping LDAP groups to multiple roles (by specifying arrays in the "User Data Group Map" enterprise setting. + +- Add OTR Room States ([#24565](https://github.com/RocketChat/Rocket.Chat/pull/24565)) + + Earlier OTR room uses only 2 states, we need more states to support future features. + This adds more states for the OTR contextualBar. + + - Expired + Screen Shot 2022-04-20 at 13 55 52 + + - Declined + Screen Shot 2022-04-20 at 13 49 28 + + - Error + Screen Shot 2022-04-20 at 13 55 26 + +- Add tooltip to sidebar room menu ([#24405](https://github.com/RocketChat/Rocket.Chat/pull/24405) by [@Himanshu664](https://github.com/Himanshu664)) + +- add warnings for federation setup ([#25684](https://github.com/RocketChat/Rocket.Chat/pull/25684)) + +- Added MaxNickNameLength and MaxBioLength constants ([#25231](https://github.com/RocketChat/Rocket.Chat/pull/25231) by [@aakash-gitdev](https://github.com/aakash-gitdev)) + +- Added tooltip options for message menu ([#24431](https://github.com/RocketChat/Rocket.Chat/pull/24431) by [@Himanshu664](https://github.com/Himanshu664)) + +- Fix multiple bugs with Matrix bridge ([#25318](https://github.com/RocketChat/Rocket.Chat/pull/25318)) + +- Improve active/hover colors in account sidebar ([#25024](https://github.com/RocketChat/Rocket.Chat/pull/25024) by [@Himanshu664](https://github.com/Himanshu664)) + +- New admin settings Page ([#25439](https://github.com/RocketChat/Rocket.Chat/pull/25439)) + + ![Screen Shot 2022-05-09 at 11 31 58](https://user-images.githubusercontent.com/27704687/167432811-f4970f23-5dae-48a0-a427-92269d08a859.png) + +- Pass allowDiskUse to channel aggregations on engagement dashboard ([#22374](https://github.com/RocketChat/Rocket.Chat/pull/22374)) + +- Performance for some Omnichannel features ([#25217](https://github.com/RocketChat/Rocket.Chat/pull/25217)) + +- Rename upgrade tab routes ([#25097](https://github.com/RocketChat/Rocket.Chat/pull/25097)) + + Change 'upgrade tab' routes names from camelCase ('goFullyFeatured') to kebab-case ('go-fully-featured') due to URL naming consistency. Changed types, main function and test. + +- Unify voip streams into single stream ([#25108](https://github.com/RocketChat/Rocket.Chat/pull/25108)) + +### 🐛 Bug fixes + + +- Add katex render to new message react template ([#25239](https://github.com/RocketChat/Rocket.Chat/pull/25239)) + +- Add open user card to user avatar ([#25445](https://github.com/RocketChat/Rocket.Chat/pull/25445)) + +- Add reaction not working in legacy messages ([#25222](https://github.com/RocketChat/Rocket.Chat/pull/25222)) + +- Added invalid password error message ([#24714](https://github.com/RocketChat/Rocket.Chat/pull/24714) by [@Himanshu664](https://github.com/Himanshu664)) + +- Adjust email label in Setup Wizard i18n files ([#25260](https://github.com/RocketChat/Rocket.Chat/pull/25260)) + + - remove 'Company' label on onboarding email keys in certain languages + +- AgentOverview analytics wrong departmentId parameter ([#25073](https://github.com/RocketChat/Rocket.Chat/pull/25073) by [@paulobernardoaf](https://github.com/paulobernardoaf)) + + When filtering the analytics charts by department, data would not appear because the object: + ```js + { + value: "department-id", + label: "department-name" + } + ``` + was being used in the `departmentId` parameter. + + - Before: + ![image](https://user-images.githubusercontent.com/30026625/161832057-d96ffd21-a7dd-421e-bfaa-3b9f4a9127b2.png) + + - After: + ![image](https://user-images.githubusercontent.com/30026625/161831092-9ee77b51-b083-4f45-9c48-ab2e0511c4d6.png) + +- Change form body parameter charset to UTF-8 to fix issue #25456 ([#25673](https://github.com/RocketChat/Rocket.Chat/pull/25673) by [@divinespear](https://github.com/divinespear)) + + since [mscdex/busboy](https://github.com/mscdex/busboy) 1.5.0, new option named `defParamCharset` for form body parameter encoding is added with default value `latin1`, so unicode filenames are broken since 4.7.0. + + ![Screenshot from 2022-05-28 16-26-06](https://user-images.githubusercontent.com/126630/170815447-1f3bd579-243a-42d3-86f6-814aeaa30ce9.png) + +- Change NPS Vote identifier + nps index to unique ([#25423](https://github.com/RocketChat/Rocket.Chat/pull/25423)) + +- Click to join button Jitsi Call ([#25569](https://github.com/RocketChat/Rocket.Chat/pull/25569)) + + Added `ToolboxProvider` to `MessageListProvider` and fixed actionLink.js open function exec + +- Client disconnection on network loss ([#25170](https://github.com/RocketChat/Rocket.Chat/pull/25170) by [@amolghode1981](https://github.com/amolghode1981)) + + Agent gets disconnected (or Unregistered) from asterisk in multiple ways. The goal is that agent should remain online + unless agent explicitly logs off. + Agent can stop receiving calls in multiple ways due to network loss. Network loss can happen in following ways. + 1. User tries to switch the network. User experiences a glitch of disconnectivity. This can be simulated by turning the network off + in the network tab of chrome's dev tool. This can disconnect the UA if the disconnection happens just before the registration refresh. + 2. Second reason is when computer goes in sleep mode. + 3. Third reason is that when asterisk is crashed/in maintenance mode/explicitly stopped. + + Solution: + The idea is to detect the network disconnection and start the start the attempts to reconnect. + The detection of the disconnection does not happen in case#1. The SIPUA's UserAgent transport does not + call onDisconnected when network loss of such kind happens. To tackle this problem, window's online and offline event handlers are + used. + + The number of retries is configurable but ideally it is to be kept at -1. Whenever disconnection happens, it should keep on trying to + reconnect with increasing backoff time. This behaviour is useful when the asterisk is stopped. + + When the server is disconnected, it should be indicated on the phone button. + +- Close room when dismiss wrap up call modal ([#25056](https://github.com/RocketChat/Rocket.Chat/pull/25056)) + +- Custom sound error toast messages ([#24515](https://github.com/RocketChat/Rocket.Chat/pull/24515) by [@Himanshu664](https://github.com/Himanshu664)) + +- Deactivating user breaks if user is the only room owner ([#24933](https://github.com/RocketChat/Rocket.Chat/pull/24933) by [@sidmohanty11](https://github.com/sidmohanty11)) + + ## Before + + https://user-images.githubusercontent.com/73601258/160000871-cfc2f2a5-2a59-4d27-8049-7754d003dd48.mp4 + + + + ## After + https://user-images.githubusercontent.com/73601258/159998287-681ab475-ff33-4282-82ff-db751c59a392.mp4 + +- Desktop notification on multi-instance environments ([#25220](https://github.com/RocketChat/Rocket.Chat/pull/25220)) + +- End call button disappearing when on-hold ([#24936](https://github.com/RocketChat/Rocket.Chat/pull/24936)) + +- Failure to update Integration History index ([#25473](https://github.com/RocketChat/Rocket.Chat/pull/25473)) + +- Fix max-width message block ([#25686](https://github.com/RocketChat/Rocket.Chat/pull/25686)) + +- Fixing app contextual bar functionality ([#25615](https://github.com/RocketChat/Rocket.Chat/pull/25615)) + +- Fixing Network connectivity issues with SIP client. ([#25391](https://github.com/RocketChat/Rocket.Chat/pull/25391) by [@amolghode1981](https://github.com/amolghode1981)) + + The previous PR https://github.com/RocketChat/Rocket.Chat/pull/25170 did not handle the issues completely. + This PR is expected to handle + 1. Clearing call related UI when the network is disconnected or switched. + 2. Do clean connectivity. There were few issues discovered in earlier implementation. e.g endpoint would randomly + get disconnected after a while. This was due to the fact that the earlier socket disconnection caused the + removal of contact on asterisk. This should be fixed in this PR. + 3. This PR contains a lot of logs. This will be removed before the final merge. + +- FormData uploads not working ([#25069](https://github.com/RocketChat/Rocket.Chat/pull/25069)) + +- Full error message is visible ([#24856](https://github.com/RocketChat/Rocket.Chat/pull/24856) by [@Himanshu664](https://github.com/Himanshu664)) + +- Incorrect websocket url in livechat widget ([#25261](https://github.com/RocketChat/Rocket.Chat/pull/25261)) + +- Integrations avatar attribute misuse ([#25283](https://github.com/RocketChat/Rocket.Chat/pull/25283)) + +- Invitation links don't redirect to the registration form ([#25082](https://github.com/RocketChat/Rocket.Chat/pull/25082)) + +- Message menu action not working on legacy messages. ([#25148](https://github.com/RocketChat/Rocket.Chat/pull/25148)) + +- Message menu dropdown not working on Mobile Web ([#25616](https://github.com/RocketChat/Rocket.Chat/pull/25616)) + +- Message preview not available for queued chats ([#25092](https://github.com/RocketChat/Rocket.Chat/pull/25092)) + +- NPS never finishing sending results ([#25067](https://github.com/RocketChat/Rocket.Chat/pull/25067)) + +- Ordered and unordered list styles, Line breaks. ([#25494](https://github.com/RocketChat/Rocket.Chat/pull/25494)) + + Also removed the message.md cache from server, since changes in the parser might break messages in the future (and will in this specific case). + +- Pinned Message display cutting off information ([#25535](https://github.com/RocketChat/Rocket.Chat/pull/25535)) + +- Prevent federation crash on invite users as a non-owner user ([#25683](https://github.com/RocketChat/Rocket.Chat/pull/25683)) + +- Prevent sequential messages edited icon to hide on hover ([#24984](https://github.com/RocketChat/Rocket.Chat/pull/24984)) + + ### before + Screen Shot 2022-03-29 at 13 35 56 + + ### after + Screen Shot 2022-03-29 at 11 48 05 + +- Proxy settings being ignored ([#25022](https://github.com/RocketChat/Rocket.Chat/pull/25022)) + + Modify Meteor's `HTTP.call` to add back proxy support + +- Quote message spacing ([#25613](https://github.com/RocketChat/Rocket.Chat/pull/25613)) + +- Read receipts show with color gray when not read yet ([#25244](https://github.com/RocketChat/Rocket.Chat/pull/25244)) + +- Read receipts showing before message read ([#25216](https://github.com/RocketChat/Rocket.Chat/pull/25216)) + +- Remove 'total' text in admin info page ([#25638](https://github.com/RocketChat/Rocket.Chat/pull/25638)) + + - Remove initial 'total' text from rooms and messages groups in the admin info page + - Add 'total' before 'rooms' and 'messages' title on the same section. To use the new 'Total Rooms', was created a new key in the en.i18n.json file. + +- Removing user also removes them from Omni collections ([#25444](https://github.com/RocketChat/Rocket.Chat/pull/25444)) + +- Replace encrypted text to Encrypted Message Placeholder ([#24166](https://github.com/RocketChat/Rocket.Chat/pull/24166)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/150807900-154a9cdb-ee13-4333-8628-f287ab914b40.png) + + ### after + Screenshot 2022-01-13 at 8 57 47 PM + +- Reply button behavior on broadcast channel ([#25175](https://github.com/RocketChat/Rocket.Chat/pull/25175)) + + Hide reply button for the user that sent the message + +- room creation fails if app framework is disabled ([#25200](https://github.com/RocketChat/Rocket.Chat/pull/25200)) + +- Rooms' names turn lower case on CSV import ([#24612](https://github.com/RocketChat/Rocket.Chat/pull/24612)) + + * Change 'Settings' import to not get cached configs + * Remove update `UI_Allow_room_names_with_special_chars` value + +- Sanitize customUserStatus and fix infinite loop ([#25449](https://github.com/RocketChat/Rocket.Chat/pull/25449)) + + ### Additional improves: + - usage of RHF to avoid unnecessary Add and Edit components separately and form validation + - usage of `GenericTableV2` and some hooks to avoid unnecessary code + - fix `IUserStatus` type + - improves in UI design + - improves **empty** and **loading** state + - improves files structure + + [LOOP ERROR ATTACHMENT] + ![Screen Shot 2022-05-09 at 19 42 53](https://user-images.githubusercontent.com/27704687/167510439-1980461c-a885-46d2-9a49-79da432c7521.png) + +- Settings listeners not receiving overwritten values from env vars ([#25448](https://github.com/RocketChat/Rocket.Chat/pull/25448)) + +- Showing Blank Message Inside Report ([#25007](https://github.com/RocketChat/Rocket.Chat/pull/25007)) + + https://user-images.githubusercontent.com/53515714/161038085-4a86c7ae-6751-4996-9767-b1c9e0331a6c.mp4 + +- Toolbox hiding under contextual bar ([#25237](https://github.com/RocketChat/Rocket.Chat/pull/25237)) + +- Unable to see channel member list by authorized channel roles ([#25412](https://github.com/RocketChat/Rocket.Chat/pull/25412)) + +- Upgrade tab loader in incorrect position ([#25398](https://github.com/RocketChat/Rocket.Chat/pull/25398)) + + - Add invisible prop to iframe when loading state is active. + +- Upgrade Tab showing for a split second ([#25050](https://github.com/RocketChat/Rocket.Chat/pull/25050)) + +- Use correct room property for call ended at ([#24932](https://github.com/RocketChat/Rocket.Chat/pull/24932)) + +- useCurrentChatTags is not a function ([#25604](https://github.com/RocketChat/Rocket.Chat/pull/25604)) + +- UserAutoComplete not rendering UserAvatar correctly ([#25055](https://github.com/RocketChat/Rocket.Chat/pull/25055)) + + ### before + ![Screen Shot 2022-04-04 at 16 50 21](https://user-images.githubusercontent.com/27704687/161620921-800bf66a-806d-4f83-b2e1-073c34215001.png) + + ### after + ![Screen Shot 2022-04-04 at 16 49 00](https://user-images.githubusercontent.com/27704687/161620720-3e27774d-c241-46ca-b764-932a9295d709.png) + +- UserCard sanitization ([#25089](https://github.com/RocketChat/Rocket.Chat/pull/25089)) + + - Rewrites the component to TS + - Fixes some visual issues + + ### before + ![Screen Shot 2022-04-07 at 00 23 11](https://user-images.githubusercontent.com/27704687/162113925-5c9484d1-23e9-4623-8b86-3fbc71b461a1.png) + + ### after + ![Screen Shot 2022-04-07 at 00 07 13](https://user-images.githubusercontent.com/27704687/162112353-afd6aac6-b27c-4470-a642-631b8080d59e.png) + +- Video and Audio not skipping forward ([#19866](https://github.com/RocketChat/Rocket.Chat/pull/19866)) + +- VoIP disabled/enabled sequence puts voip agent in error state ([#25230](https://github.com/RocketChat/Rocket.Chat/pull/25230) by [@amolghode1981](https://github.com/amolghode1981)) + + Initially it was thought that the issue occurs because of the race condition while changing the client settings vs those settings reflected on server side. So a natural solution to solve this is to wait for setting change event 'private-settings-changed'. Then if 'VoIP_Enabled' is updated and it is true, set voipEnabled to true in useVoipClient.ts (on client side) + + It was realised that the race does not happen because of the database or server noticing the changes late. But because of the time taken to establish the AMI connection with Asterisk. + + Solution: + + 1. Change apps/meteor/app/voip/server/startup.ts. When VoIP_Enabled is changed, await for Voip.init() to complete and then broadcast connector.statuschanged with changed value. + 2. From apps/meteor/server/modules/listeners/listeners.module.ts use notifyLoggedInThisInstance to notify all logged in users on current instance. + 3. in apps/meteor/client/providers/CallProvider/hooks/useVoipClient.ts add the event handler that receives this event. Change voipEnabled from constant to state. Change this state based on the 'value' that is received by the handler. + +
+🔍 Minor changes + + +- Bump body-parser from 1.19.2 to 1.20.0 in /ee/server/services ([#25042](https://github.com/RocketChat/Rocket.Chat/pull/25042) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump ejson from 2.2.1 to 2.2.2 ([#25057](https://github.com/RocketChat/Rocket.Chat/pull/25057) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump eslint-plugin-anti-trojan-source from 1.0.6 to 1.1.0 ([#25076](https://github.com/RocketChat/Rocket.Chat/pull/25076) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump minimist from 1.2.5 to 1.2.6 in /ee/server/services ([#24991](https://github.com/RocketChat/Rocket.Chat/pull/24991) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino and pino-pretty ([#25052](https://github.com/RocketChat/Rocket.Chat/pull/25052)) + +- Bump template-file from 6.0.0 to 6.0.1 ([#25002](https://github.com/RocketChat/Rocket.Chat/pull/25002) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore: Add /v1/video-conference endpoint types ([#25278](https://github.com/RocketChat/Rocket.Chat/pull/25278)) + +- Chore: Add channel endpoints (rest-typings) ([#25279](https://github.com/RocketChat/Rocket.Chat/pull/25279)) + +- Chore: Add client folder to CODEOWNERS ([#25397](https://github.com/RocketChat/Rocket.Chat/pull/25397)) + +- Chore: Add error boundary to message component ([#25223](https://github.com/RocketChat/Rocket.Chat/pull/25223)) + + Not crash the whole application if something goes wrong in the MessageList component. + + ![image](https://user-images.githubusercontent.com/40830821/162269915-931c5c3c-c979-4234-b74c-371f67467ce0.png) + +- Chore: Add options to debug stdout and rate limiter ([#25336](https://github.com/RocketChat/Rocket.Chat/pull/25336)) + +- Chore: Add root package.json to houston files ([#25286](https://github.com/RocketChat/Rocket.Chat/pull/25286)) + + See title + +- Chore: Add typings for /v1/webdav.getMyAccounts ([#25276](https://github.com/RocketChat/Rocket.Chat/pull/25276)) + +- Chore: Add yarn plugin to check node and yarn version ([#25224](https://github.com/RocketChat/Rocket.Chat/pull/25224)) + +- Chore: bump fuselage ([#25605](https://github.com/RocketChat/Rocket.Chat/pull/25605)) + +- Chore: Bump fuselage ([#25371](https://github.com/RocketChat/Rocket.Chat/pull/25371)) + +- Chore: Bump Fuselage packages ([#25259](https://github.com/RocketChat/Rocket.Chat/pull/25259)) + +- Chore: Cancel running jobs if PR is updated ([#24708](https://github.com/RocketChat/Rocket.Chat/pull/24708)) + +- Chore: Chore add validation option to rest endpoints ([#25443](https://github.com/RocketChat/Rocket.Chat/pull/25443)) + +- Chore: Code Improvements for #25391 ([#25606](https://github.com/RocketChat/Rocket.Chat/pull/25606)) + +- Chore: Convert `UserStatusMenu` to TS ([#25265](https://github.com/RocketChat/Rocket.Chat/pull/25265)) + +- Chore: Convert additionalForms ([#25586](https://github.com/RocketChat/Rocket.Chat/pull/25586)) + +- Chore: Convert Admin -> Rooms to TS ([#25348](https://github.com/RocketChat/Rocket.Chat/pull/25348)) + +- Chore: Convert admin custom sound to tsx ([#25128](https://github.com/RocketChat/Rocket.Chat/pull/25128)) + +- Chore: Convert Admin/OAuthApps to TS ([#25277](https://github.com/RocketChat/Rocket.Chat/pull/25277)) + + - Converts Admin/OAuthApps to TS. + - migrated forms to react-hook-form + +- Chore: Convert AdminSideBar to ts ([#25372](https://github.com/RocketChat/Rocket.Chat/pull/25372)) + +- Chore: Convert apps/meteor/client/components/UserAutoComplete ([#25554](https://github.com/RocketChat/Rocket.Chat/pull/25554)) + +- Chore: Convert apps/meteor/client/views/admin/settings ([#25565](https://github.com/RocketChat/Rocket.Chat/pull/25565)) + +- Chore: Convert apps/meteor/client/views/admin/settings/inputs folder ([#25427](https://github.com/RocketChat/Rocket.Chat/pull/25427)) + +- Chore: Convert AutoTranslate ([#25591](https://github.com/RocketChat/Rocket.Chat/pull/25591)) + +- Chore: Convert client/views/admin/settings/groups folder to ts ([#25345](https://github.com/RocketChat/Rocket.Chat/pull/25345)) + +- Chore: Convert Create Channel ([#25589](https://github.com/RocketChat/Rocket.Chat/pull/25589)) + +- Chore: Convert customSounds folder to ts ([#25274](https://github.com/RocketChat/Rocket.Chat/pull/25274)) + +- Chore: Convert customUserStatus folder to ts ([#25288](https://github.com/RocketChat/Rocket.Chat/pull/25288)) + +- Chore: Convert email inbox feature to TypeScript ([#25298](https://github.com/RocketChat/Rocket.Chat/pull/25298) by [@ujorgeleite](https://github.com/ujorgeleite)) + +- Chore: Convert federationDashboard folder to ts ([#25343](https://github.com/RocketChat/Rocket.Chat/pull/25343)) + +- Chore: Convert getStatistics ([#25342](https://github.com/RocketChat/Rocket.Chat/pull/25342)) + +- Chore: convert info to typescript ([#25420](https://github.com/RocketChat/Rocket.Chat/pull/25420)) + +- Chore: Convert LivechatAgentActivity to raw model and TS ([#25123](https://github.com/RocketChat/Rocket.Chat/pull/25123)) + +- Chore: Convert Mailer to TS ([#25121](https://github.com/RocketChat/Rocket.Chat/pull/25121)) + +- Chore: convert marketplace price display component to use typescript ([#25504](https://github.com/RocketChat/Rocket.Chat/pull/25504)) + + **Marketplace apps listing page** + ![Screen Shot 2022-05-13 at 12 57 43](https://user-images.githubusercontent.com/4161171/168322189-67990fdf-a447-46dc-8f88-08b16c2a5416.png) + + **Apps detail page** + ![Screen Shot 2022-05-13 at 12 58 56](https://user-images.githubusercontent.com/4161171/168322241-505ee5bb-d3d8-4b0e-8757-873a1a65a6a6.png) + +- Chore: Convert NotificationStatus to TS ([#25125](https://github.com/RocketChat/Rocket.Chat/pull/25125)) + +- Chore: Convert push endpoints to TS ([#25347](https://github.com/RocketChat/Rocket.Chat/pull/25347)) + +- Chore: Convert RoomForeword, TextCopy and RoomAvatarEditor to TS ([#25424](https://github.com/RocketChat/Rocket.Chat/pull/25424)) + +- Chore: Convert slashCommands to typescript ([#25592](https://github.com/RocketChat/Rocket.Chat/pull/25592) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + +- Chore: Convert to typescript some functions from app/lib/server/functions ([#24519](https://github.com/RocketChat/Rocket.Chat/pull/24519)) + + Convert to typescript some functions from app/lib/server/functions and transfered theses files to server/lib + +- Chore: Convert to typescript the slash commands help files ([#24307](https://github.com/RocketChat/Rocket.Chat/pull/24307) by [@eduardofcabrera](https://github.com/eduardofcabrera)) + + Convert to typescript the slash commands help files + +- Chore: Convert useFileInput to TS ([#25426](https://github.com/RocketChat/Rocket.Chat/pull/25426)) + +- Chore: Convert useUpdateAvatar to TS and type avatar endpoints ([#25430](https://github.com/RocketChat/Rocket.Chat/pull/25430)) + +- Chore: Converting orchestrator.js to ts ([#25367](https://github.com/RocketChat/Rocket.Chat/pull/25367)) + +- Chore: Create README.md for Rest Typings ([#25335](https://github.com/RocketChat/Rocket.Chat/pull/25335)) + +- Chore: Dedicated package for UI contexts ([#25432](https://github.com/RocketChat/Rocket.Chat/pull/25432)) + + Moving our React contexts to a different package on the monorepo enable us to deliver components from another packages, because they work as a loose connection to the core APIs. + +- Chore: Dependencies upgrade ([#25290](https://github.com/RocketChat/Rocket.Chat/pull/25290)) + +- Chore: Enable marketplace screenshots endpoint ([#25395](https://github.com/RocketChat/Rocket.Chat/pull/25395)) + +- Chore: ensure scripts use cross-env and ignore some dirs (ROC-54) ([#25218](https://github.com/RocketChat/Rocket.Chat/pull/25218)) + + - data and test-failure should be ignored + - ensure scripts use cross-env + +- Chore: Fix return type warnings ([#25275](https://github.com/RocketChat/Rocket.Chat/pull/25275)) + +- Chore: Increase performance and security of integrations’ scripts ([#25641](https://github.com/RocketChat/Rocket.Chat/pull/25641)) + + Replace internal VM implementation with VM2 which implements many more mechanisms to ensure timeout, security and allow easier configuration for future improvements on the integrations' feature. + +- Chore: Livechat change output level ([#25522](https://github.com/RocketChat/Rocket.Chat/pull/25522)) + +- Chore: Manager Page Rewrite ([#25431](https://github.com/RocketChat/Rocket.Chat/pull/25431)) + +- Chore: Migrate 15-message-popup from cypress to playwright ([#25462](https://github.com/RocketChat/Rocket.Chat/pull/25462)) + +- Chore: migrate from cypress to pw 14-setting-permission ([#25523](https://github.com/RocketChat/Rocket.Chat/pull/25523)) + +- Chore: Migrate NotFoundPage to TS ([#25509](https://github.com/RocketChat/Rocket.Chat/pull/25509)) + +- Chore: Migrate oauth2server to typescript ([#25126](https://github.com/RocketChat/Rocket.Chat/pull/25126)) + +- Chore: Migrate retention-policy to ts ([#25582](https://github.com/RocketChat/Rocket.Chat/pull/25582)) + +- Chore: Migrate spotify to ts ([#25507](https://github.com/RocketChat/Rocket.Chat/pull/25507)) + +- Chore: migrate-to-pw-adjust-in-intermitences ([#25542](https://github.com/RocketChat/Rocket.Chat/pull/25542)) + +- Chore: Minor dependency updates ([#25269](https://github.com/RocketChat/Rocket.Chat/pull/25269)) + +- Chore: Missing keys in APIsDisplay ([#24464](https://github.com/RocketChat/Rocket.Chat/pull/24464)) + +- Chore: Monorepo ([#25074](https://github.com/RocketChat/Rocket.Chat/pull/25074)) + +- Chore: Move admin sidebarItems registration to the main file ([#25442](https://github.com/RocketChat/Rocket.Chat/pull/25442)) + +- Chore: Move ddp-streamer micro service to its own sub-repo ([#25246](https://github.com/RocketChat/Rocket.Chat/pull/25246)) + +- Chore: move definitions to packages ([#25085](https://github.com/RocketChat/Rocket.Chat/pull/25085)) + +- Chore: Move markdown message parser to a `callback` ([#25413](https://github.com/RocketChat/Rocket.Chat/pull/25413)) + +- Chore: organize test files and fix code coverage ([#24900](https://github.com/RocketChat/Rocket.Chat/pull/24900)) + +- Chore: Remove Alpine image deps after using them ([#25053](https://github.com/RocketChat/Rocket.Chat/pull/25053)) + +- Chore: Remove duplicated useUserRoom ([#25180](https://github.com/RocketChat/Rocket.Chat/pull/25180)) + +- Chore: Remove old files from removed Omnichannel feature ([#25129](https://github.com/RocketChat/Rocket.Chat/pull/25129)) + +- Chore: Remove package-lock.json from houston files ([#25280](https://github.com/RocketChat/Rocket.Chat/pull/25280)) + + Houston config in the `package.json` file still mentioned `package-lock.json`, but it doesn't exist anymore + +- Chore: Remove unused Drone CI files ([#25124](https://github.com/RocketChat/Rocket.Chat/pull/25124)) + +- Chore: Reorder unreleased migrations ([#25508](https://github.com/RocketChat/Rocket.Chat/pull/25508)) + +- Chore: Rest API query parameters handling ([#25648](https://github.com/RocketChat/Rocket.Chat/pull/25648)) + +- Chore: REST query and body params validation ([#25446](https://github.com/RocketChat/Rocket.Chat/pull/25446)) + +- Chore: Rewrite 2fa to typescript ([#25285](https://github.com/RocketChat/Rocket.Chat/pull/25285)) + +- Chore: Rewrite action-links to ts ([#25418](https://github.com/RocketChat/Rocket.Chat/pull/25418)) + +- Chore: Rewrite autotranslate to ts ([#25425](https://github.com/RocketChat/Rocket.Chat/pull/25425)) + +- Chore: Rewrite im and dm endpoints to ts ([#25521](https://github.com/RocketChat/Rocket.Chat/pull/25521)) + + - Endpoints rewritten to TS + - dm.create + - dm.delete + - dm.close + - dm.counters + - dm.files + - dm.history + - dm.members + - dm.messages + - dm.messages.others + - dm.list + - dm.list.everyone + - dm.open + - dm.setTopic + - im.create + - im.delete + - im.close + - im.counters + - im.files + - im.history + - im.members + - im.messages + - im.messages.others + - im.list + - im.list.everyone + - im.open + - im.setTopic + - Some lines of code was refactored on `apps/meteor/app/api/server/v1/im.ts` + - Unnecessary functions were deleted on `apps/meteor/app/lib/server/functions/getDirectMessageByNameOrIdWithOptionToJoin.ts` + - New types was added on `apps/meteor/app/api/server/api.d.ts` + +- Chore: Rewrite Jitsi Contextualbar to TS ([#25303](https://github.com/RocketChat/Rocket.Chat/pull/25303)) + +- Chore: Rewrite mail-messages to ts ([#25421](https://github.com/RocketChat/Rocket.Chat/pull/25421)) + +- Chore: Rewrite some Omnichannel files to TypeScript ([#25359](https://github.com/RocketChat/Rocket.Chat/pull/25359)) + + apps/meteor/client/components/Omnichannel/modals/* + apps/meteor/client/components/Omnichannel/Tags.js + +- Chore: solve yarn issues from env var ([#25468](https://github.com/RocketChat/Rocket.Chat/pull/25468)) + +- Chore: Sync with master ([#25284](https://github.com/RocketChat/Rocket.Chat/pull/25284)) + +- Chore: Template to generate packages ([#25174](https://github.com/RocketChat/Rocket.Chat/pull/25174)) + + ``` + npx hygen package new test + ``` + +- Chore: Tests with Playwright (task: All works) ([#25122](https://github.com/RocketChat/Rocket.Chat/pull/25122)) + +- Chore: Tests with Playwright (task: ROC-25, 06-message) ([#25252](https://github.com/RocketChat/Rocket.Chat/pull/25252)) + +- Chore: Tests with Playwright (task: ROC-28, 09-channels) ([#25196](https://github.com/RocketChat/Rocket.Chat/pull/25196)) + +- Chore: Tests with Playwright (task: ROC-31, 12-settings) ([#25253](https://github.com/RocketChat/Rocket.Chat/pull/25253)) + +- Chore: Tests with Playwright (task: ROC-66, Intermittent resolution in tests) ([#25416](https://github.com/RocketChat/Rocket.Chat/pull/25416)) + +- Chore: TS conversion folder client ([#25031](https://github.com/RocketChat/Rocket.Chat/pull/25031)) + +- Chore: TS migration SortList ([#25167](https://github.com/RocketChat/Rocket.Chat/pull/25167)) + +- Chore: Update Apps-Engine and Fuselage ([#25700](https://github.com/RocketChat/Rocket.Chat/pull/25700)) + +- Chore: Update Apps-Engine version ([#25617](https://github.com/RocketChat/Rocket.Chat/pull/25617)) + +- Chore: Update Livechat to the last version ([#25257](https://github.com/RocketChat/Rocket.Chat/pull/25257)) + +- Chore: Update Livechat version ([#25130](https://github.com/RocketChat/Rocket.Chat/pull/25130)) + +- Chore: update OTR icon ([#24521](https://github.com/RocketChat/Rocket.Chat/pull/24521) by [@kibonusp](https://github.com/kibonusp)) + + I changed the shredder icon in OTR contextual bar to the stopwatch icon, recently added to the fuselage. + +- Chore: Update Volta configuration ([#25394](https://github.com/RocketChat/Rocket.Chat/pull/25394)) + + [Volta](https://volta.sh/) need some extra configuration to work on monorepos. + +- Chore: User set UTC offset ([#25381](https://github.com/RocketChat/Rocket.Chat/pull/25381)) + +- i18n: Language update from LingoHub 🤖 on 2022-04-04Z ([#25043](https://github.com/RocketChat/Rocket.Chat/pull/25043)) + +- Merge master into develop & Set version to 4.7.0-develop ([#25028](https://github.com/RocketChat/Rocket.Chat/pull/25028)) + +- Regression: Add `isPending` status to message ([#25299](https://github.com/RocketChat/Rocket.Chat/pull/25299)) + +- Regression: Add eslint package to micro services Dockerfile ([#25311](https://github.com/RocketChat/Rocket.Chat/pull/25311)) + +- Regression: Add select message to system message and thread preview and allow select on legacy template ([#25251](https://github.com/RocketChat/Rocket.Chat/pull/25251)) + +- Regression: App event listeners broke Slackbridge integration and importers ([#25689](https://github.com/RocketChat/Rocket.Chat/pull/25689)) + + Some event listeners triggered by Apps were calling `Meteor.user()` in functions that could run outside of Meteor environment + +- Regression: Assets & Slack Bridge Setting Page not rendering ([#25629](https://github.com/RocketChat/Rocket.Chat/pull/25629)) + +- Regression: Avatar not loading on first direct message ([#25211](https://github.com/RocketChat/Rocket.Chat/pull/25211)) + + fix avatar not loading on a first direct message + +- Regression: Better MongoDB connection management for micro services ([#25323](https://github.com/RocketChat/Rocket.Chat/pull/25323)) + +- Regression: Broken components on Federation and Engagement dashboards ([#25653](https://github.com/RocketChat/Rocket.Chat/pull/25653)) + + For reasons I've no clue, any client import path matching `**/data/**` will not be included in the final bundle, failing silently on transpiling/bundling. + +- Regression: bump onboarding-ui version ([#25320](https://github.com/RocketChat/Rocket.Chat/pull/25320)) + + - Bump to 'next' the onboarding-ui package from fuselage. + - Update from 'companyEmail' to 'email' adminData usage types + +- Regression: Change logic to check if connection is online on unstable networks ([#25618](https://github.com/RocketChat/Rocket.Chat/pull/25618)) + +- Regression: Change preference to be default legacy messages ([#25255](https://github.com/RocketChat/Rocket.Chat/pull/25255)) + +- Regression: CI playwright ([#25168](https://github.com/RocketChat/Rocket.Chat/pull/25168)) + +- Regression: CI services build ([#25555](https://github.com/RocketChat/Rocket.Chat/pull/25555)) + +- Regression: Endpoint types with Ajv Coercing data types ([#25644](https://github.com/RocketChat/Rocket.Chat/pull/25644)) + + Ajv Coercing data types should be `true` to accept all kinds of data requested. + +- Regression: eslint not running on packages ([#25305](https://github.com/RocketChat/Rocket.Chat/pull/25305)) + +- Regression: Fix CI monorepo build ([#25107](https://github.com/RocketChat/Rocket.Chat/pull/25107)) + +- Regression: Fix clicking on visitor's chat in the sidebar does not display the chat window ([#25380](https://github.com/RocketChat/Rocket.Chat/pull/25380)) + + Fix: livechat room not opening. + +- Regression: Fix English i18n react text ([#25368](https://github.com/RocketChat/Rocket.Chat/pull/25368)) + + Incorrect text in reaction tooltip has been fixed + +- Regression: Fix federation Matrix bridge startup ([#25273](https://github.com/RocketChat/Rocket.Chat/pull/25273)) + +- Regression: Fix micro services Docker build ([#25193](https://github.com/RocketChat/Rocket.Chat/pull/25193)) + +- Regression: Fix multi line is not showing an empty line between lines ([#25317](https://github.com/RocketChat/Rocket.Chat/pull/25317)) + +- Regression: Fix reply button not working when hideFlexTab is enabled ([#25306](https://github.com/RocketChat/Rocket.Chat/pull/25306)) + +- Regression: Fix services Docker build on CI ([#25181](https://github.com/RocketChat/Rocket.Chat/pull/25181)) + +- Regression: Fix services-image-build-check ([#25519](https://github.com/RocketChat/Rocket.Chat/pull/25519)) + +- Regression: Fix size of custom emoji and render emoji on thread message preview ([#25314](https://github.com/RocketChat/Rocket.Chat/pull/25314)) + +- Regression: Fix sort field files.list ([#25687](https://github.com/RocketChat/Rocket.Chat/pull/25687)) + +- Regression: Fix the alpine image and dev UX installing matrix-rust-sdk-bindings ([#25319](https://github.com/RocketChat/Rocket.Chat/pull/25319)) + + The package only included a few pre-built which caused all macs to have to compile every time they installed and also caused our alpine not to work. + + This temporarily switches to a fork of the matrix-appservice-bridge package. + + Made changes to one of its child dependencies `matrix-rust-sdk-bindings` that adds pre-built binaries for mac and musl (for alpine). + +- Regression: Messages in new message template Crashing. ([#25327](https://github.com/RocketChat/Rocket.Chat/pull/25327)) + +- Regression: Missing settings group descriptions ([#25639](https://github.com/RocketChat/Rocket.Chat/pull/25639)) + + + +- Regression: Revert Bugsnag version ([#25313](https://github.com/RocketChat/Rocket.Chat/pull/25313)) + +- Regression: Rocket.Chat Webapp not loading. ([#25349](https://github.com/RocketChat/Rocket.Chat/pull/25349)) + +- Regression: Show username and real name on the message system ([#25254](https://github.com/RocketChat/Rocket.Chat/pull/25254)) + +- Regression: Shows error if micro service cannot connect to Mongo ([#25301](https://github.com/RocketChat/Rocket.Chat/pull/25301)) + +- Regression: Subscription menu not appearing for non installed but subscribed apps ([#25627](https://github.com/RocketChat/Rocket.Chat/pull/25627)) + + Fixed a problem on which the AppMenu component did not appear for apps that had an active subscription but weren't installed, now the rendering of the component is also based on the isSubscribed flag, and the appearance of the uninstall and enable/disable options are based on the app.installed flag so that the correct options appear on all the edge cases. + Demo gif: + ![subscription-manager-fix](https://user-images.githubusercontent.com/43561537/170132040-dc8535c0-8056-4fb2-b008-afaece744868.gif) + +- Regression: Update settings groups description ([#25663](https://github.com/RocketChat/Rocket.Chat/pull/25663)) + +- Regression: Use exact Node version on micro services Docker images ([#25287](https://github.com/RocketChat/Rocket.Chat/pull/25287)) + +- Regression: Validate empty fields for Message template ([#25250](https://github.com/RocketChat/Rocket.Chat/pull/25250)) + +- Regression: VoIp wrap up modal not opening after call disconnect ([#25651](https://github.com/RocketChat/Rocket.Chat/pull/25651)) + + This PR fixes a bug preventing the wrap up call modal from being displayed after caller or agent ends the call. + +- Regression: yarn dev triggers build dependencies ([#25208](https://github.com/RocketChat/Rocket.Chat/pull/25208)) + +- Release 4.7.0 ([#25390](https://github.com/RocketChat/Rocket.Chat/pull/25390) by [@Himanshu664](https://github.com/Himanshu664) & [@dependabot[bot]](https://github.com/dependabot[bot]) & [@lingohub[bot]](https://github.com/lingohub[bot])) + +- Release 4.7.1 ([#25510](https://github.com/RocketChat/Rocket.Chat/pull/25510) by [@felipe-menelau](https://github.com/felipe-menelau)) + +- Release 4.7.2 ([#25580](https://github.com/RocketChat/Rocket.Chat/pull/25580)) + +- Test: Migrate 13-permissions from cypress to playwright ([#25558](https://github.com/RocketChat/Rocket.Chat/pull/25558)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Himanshu664](https://github.com/Himanshu664) +- [@aakash-gitdev](https://github.com/aakash-gitdev) +- [@amolghode1981](https://github.com/amolghode1981) +- [@cuonghuunguyen](https://github.com/cuonghuunguyen) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@divinespear](https://github.com/divinespear) +- [@eduardofcabrera](https://github.com/eduardofcabrera) +- [@felipe-menelau](https://github.com/felipe-menelau) +- [@kibonusp](https://github.com/kibonusp) +- [@lingohub[bot]](https://github.com/lingohub[bot]) +- [@ostjen](https://github.com/ostjen) +- [@paulobernardoaf](https://github.com/paulobernardoaf) +- [@sidmohanty11](https://github.com/sidmohanty11) +- [@ujorgeleite](https://github.com/ujorgeleite) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@AllanPazRibeiro](https://github.com/AllanPazRibeiro) +- [@KevLehman](https://github.com/KevLehman) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@PedroRorato](https://github.com/PedroRorato) +- [@alansikora](https://github.com/alansikora) +- [@albuquerquefabio](https://github.com/albuquerquefabio) +- [@aleksandernsilva](https://github.com/aleksandernsilva) +- [@carlosrodrigues94](https://github.com/carlosrodrigues94) +- [@cauefcr](https://github.com/cauefcr) +- [@d-gubert](https://github.com/d-gubert) +- [@debdutdeb](https://github.com/debdutdeb) +- [@dougfabris](https://github.com/dougfabris) +- [@felipe-rod123](https://github.com/felipe-rod123) +- [@filipemarins](https://github.com/filipemarins) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@guijun13](https://github.com/guijun13) +- [@hugocostadev](https://github.com/hugocostadev) +- [@jeanfbrito](https://github.com/jeanfbrito) +- [@juliajforesti](https://github.com/juliajforesti) +- [@marceloschmidt](https://github.com/marceloschmidt) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@matheuslc](https://github.com/matheuslc) +- [@murtaza98](https://github.com/murtaza98) +- [@nishant23122000](https://github.com/nishant23122000) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@rique223](https://github.com/rique223) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@souzaramon](https://github.com/souzaramon) +- [@tapiarafael](https://github.com/tapiarafael) +- [@tassoevan](https://github.com/tassoevan) +- [@tiagoevanp](https://github.com/tiagoevanp) +- [@tmontini](https://github.com/tmontini) +- [@weslley543](https://github.com/weslley543) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 4.7.4 +`2022-05-30 · 1 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` + +### 🐛 Bug fixes + + +- Security Hotfix (https://docs.rocket.chat/guides/security/security-updates) + +
+🔍 Minor changes + + +- Load missed messages from opened rooms when reconnect ([#553](https://github.com/RocketChat/Rocket.Chat/pull/553)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@rodrigok](https://github.com/rodrigok) + +# 4.7.3 +`2022-05-20 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` + +### 🐛 Bug fixes + + +- Security Hotfix (https://docs.rocket.chat/guides/security/security-updates) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) + +# 4.7.2 +`2022-05-20 · 5 🐛 · 2 🔍 · 7 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` + +### 🐛 Bug fixes + + +- Dynamic load matrix is enabled and handle failure ([#25495](https://github.com/RocketChat/Rocket.Chat/pull/25495)) + +- Initial User not added to default channel ([#25544](https://github.com/RocketChat/Rocket.Chat/pull/25544)) + + If injecting initial user. The user wasn’t added to the default General channel + +- One of the triggers was not working correctly ([#25409](https://github.com/RocketChat/Rocket.Chat/pull/25409)) + +- UI/UX issues on Live Chat widget ([#25407](https://github.com/RocketChat/Rocket.Chat/pull/25407)) + +- User abandonment setting was not working doe to failing event hook ([#25520](https://github.com/RocketChat/Rocket.Chat/pull/25520)) + + A setting watcher and the query for grabbing abandoned chats were broken, now they're not. + +
+🔍 Minor changes + + +- Chore: Add Livechat repo into Monorepo packages ([#25312](https://github.com/RocketChat/Rocket.Chat/pull/25312)) + +- Release 4.7.2 ([#25580](https://github.com/RocketChat/Rocket.Chat/pull/25580)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@cauefcr](https://github.com/cauefcr) +- [@d-gubert](https://github.com/d-gubert) +- [@dougfabris](https://github.com/dougfabris) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 4.7.1 +`2022-05-13 · 1 🎉 · 2 🐛 · 1 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` + +### 🎉 New features + + +- Use setting to determine if initial general channel is needed ([#25441](https://github.com/RocketChat/Rocket.Chat/pull/25441) by [@felipe-menelau](https://github.com/felipe-menelau)) + + - Adds flag responsible for overwriting #general channel creation + +### 🐛 Bug fixes + + +- LDAP sync removing users from channels when multiple groups are mapped to it ([#25434](https://github.com/RocketChat/Rocket.Chat/pull/25434)) + +- Spotlight results showing usernames instead of real names ([#25471](https://github.com/RocketChat/Rocket.Chat/pull/25471)) + +
+🔍 Minor changes + + +- Release 4.7.1 ([#25510](https://github.com/RocketChat/Rocket.Chat/pull/25510) by [@felipe-menelau](https://github.com/felipe-menelau)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@felipe-menelau](https://github.com/felipe-menelau) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 4.7.0 +`2022-05-04 · 4 🎉 · 7 🚀 · 33 🐛 · 69 🔍 · 35 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` + +### 🎉 New features + + +- Add expire index to integration history ([#25087](https://github.com/RocketChat/Rocket.Chat/pull/25087)) + +- Alpha Matrix Federation ([#23688](https://github.com/RocketChat/Rocket.Chat/pull/23688)) + + Experimental support for Matrix Federation with a Bridge + + https://user-images.githubusercontent.com/51996/164530391-e8b17ecd-a4d0-4ef8-a8b7-81230c1773d3.mp4 + +- Expand Apps Engine's environment variable allowed list ([#23870](https://github.com/RocketChat/Rocket.Chat/pull/23870) by [@cuonghuunguyen](https://github.com/cuonghuunguyen)) + +- Message Template React Component ([#23971](https://github.com/RocketChat/Rocket.Chat/pull/23971)) + + Complete rewrite of the messages component in react. Visual changes should be minimal as well as user impact, with no break changes (unless you've customized the blaze template). + + + + ![Screen Shot 2022-04-05 at 11 14 18](https://user-images.githubusercontent.com/27704687/161774027-38dd9c7b-eeeb-45e2-b9d8-ea2a9be8486d.png) + In case you encounter any problems, or want to compare, temporarily it is possible to use the old version + + image + +### 🚀 Improvements + + +- Add OTR Room States ([#24565](https://github.com/RocketChat/Rocket.Chat/pull/24565)) + + Earlier OTR room uses only 2 states, we need more states to support future features. + This adds more states for the OTR contextualBar. + + - Expired + Screen Shot 2022-04-20 at 13 55 52 + + - Declined + Screen Shot 2022-04-20 at 13 49 28 + + - Error + Screen Shot 2022-04-20 at 13 55 26 + +- Add tooltip to sidebar room menu ([#24405](https://github.com/RocketChat/Rocket.Chat/pull/24405) by [@Himanshu664](https://github.com/Himanshu664)) + +- Added MaxNickNameLength and MaxBioLength constants ([#25231](https://github.com/RocketChat/Rocket.Chat/pull/25231) by [@aakash-gitdev](https://github.com/aakash-gitdev)) + +- Added tooltip options for message menu ([#24431](https://github.com/RocketChat/Rocket.Chat/pull/24431) by [@Himanshu664](https://github.com/Himanshu664)) + +- Improve active/hover colors in account sidebar ([#25024](https://github.com/RocketChat/Rocket.Chat/pull/25024) by [@Himanshu664](https://github.com/Himanshu664)) + +- Performance for some Omnichannel features ([#25217](https://github.com/RocketChat/Rocket.Chat/pull/25217)) + +- Rename upgrade tab routes ([#25097](https://github.com/RocketChat/Rocket.Chat/pull/25097)) + + Change 'upgrade tab' routes names from camelCase ('goFullyFeatured') to kebab-case ('go-fully-featured') due to URL naming consistency. Changed types, main function and test. + +### 🐛 Bug fixes + + +- Add katex render to new message react template ([#25239](https://github.com/RocketChat/Rocket.Chat/pull/25239)) + +- Add reaction not working in legacy messages ([#25222](https://github.com/RocketChat/Rocket.Chat/pull/25222)) + +- Added invalid password error message ([#24714](https://github.com/RocketChat/Rocket.Chat/pull/24714) by [@Himanshu664](https://github.com/Himanshu664)) + +- Adjust email label in Setup Wizard i18n files ([#25260](https://github.com/RocketChat/Rocket.Chat/pull/25260)) + + - remove 'Company' label on onboarding email keys in certain languages + +- AgentOverview analytics wrong departmentId parameter ([#25073](https://github.com/RocketChat/Rocket.Chat/pull/25073) by [@paulobernardoaf](https://github.com/paulobernardoaf)) + + When filtering the analytics charts by department, data would not appear because the object: + ```js + { + value: "department-id", + label: "department-name" + } + ``` + was being used in the `departmentId` parameter. + + - Before: + ![image](https://user-images.githubusercontent.com/30026625/161832057-d96ffd21-a7dd-421e-bfaa-3b9f4a9127b2.png) + + - After: + ![image](https://user-images.githubusercontent.com/30026625/161831092-9ee77b51-b083-4f45-9c48-ab2e0511c4d6.png) + +- Client disconnection on network loss ([#25170](https://github.com/RocketChat/Rocket.Chat/pull/25170) by [@amolghode1981](https://github.com/amolghode1981)) + + Agent gets disconnected (or Unregistered) from asterisk in multiple ways. The goal is that agent should remain online + unless agent explicitly logs off. + Agent can stop receiving calls in multiple ways due to network loss. Network loss can happen in following ways. + 1. User tries to switch the network. User experiences a glitch of disconnectivity. This can be simulated by turning the network off + in the network tab of chrome's dev tool. This can disconnect the UA if the disconnection happens just before the registration refresh. + 2. Second reason is when computer goes in sleep mode. + 3. Third reason is that when asterisk is crashed/in maintenance mode/explicitly stopped. + + Solution: + The idea is to detect the network disconnection and start the start the attempts to reconnect. + The detection of the disconnection does not happen in case#1. The SIPUA's UserAgent transport does not + call onDisconnected when network loss of such kind happens. To tackle this problem, window's online and offline event handlers are + used. + + The number of retries is configurable but ideally it is to be kept at -1. Whenever disconnection happens, it should keep on trying to + reconnect with increasing backoff time. This behaviour is useful when the asterisk is stopped. + + When the server is disconnected, it should be indicated on the phone button. + +- Close room when dismiss wrap up call modal ([#25056](https://github.com/RocketChat/Rocket.Chat/pull/25056)) + +- Custom sound error toast messages ([#24515](https://github.com/RocketChat/Rocket.Chat/pull/24515) by [@Himanshu664](https://github.com/Himanshu664)) + +- Deactivating user breaks if user is the only room owner ([#24933](https://github.com/RocketChat/Rocket.Chat/pull/24933) by [@sidmohanty11](https://github.com/sidmohanty11)) + + ## Before + + https://user-images.githubusercontent.com/73601258/160000871-cfc2f2a5-2a59-4d27-8049-7754d003dd48.mp4 + + + + ## After + https://user-images.githubusercontent.com/73601258/159998287-681ab475-ff33-4282-82ff-db751c59a392.mp4 + +- Desktop notification on multi-instance environments ([#25220](https://github.com/RocketChat/Rocket.Chat/pull/25220)) + +- End call button disappearing when on-hold ([#24936](https://github.com/RocketChat/Rocket.Chat/pull/24936)) + +- FormData uploads not working ([#25069](https://github.com/RocketChat/Rocket.Chat/pull/25069)) + +- Full error message is visible ([#24856](https://github.com/RocketChat/Rocket.Chat/pull/24856) by [@Himanshu664](https://github.com/Himanshu664)) + +- Incorrect websocket url in livechat widget ([#25261](https://github.com/RocketChat/Rocket.Chat/pull/25261)) + +- Invitation links don't redirect to the registration form ([#25082](https://github.com/RocketChat/Rocket.Chat/pull/25082)) + +- Message menu action not working on legacy messages. ([#25148](https://github.com/RocketChat/Rocket.Chat/pull/25148)) + +- Message preview not available for queued chats ([#25092](https://github.com/RocketChat/Rocket.Chat/pull/25092)) + +- NPS never finishing sending results ([#25067](https://github.com/RocketChat/Rocket.Chat/pull/25067)) + +- Prevent sequential messages edited icon to hide on hover ([#24984](https://github.com/RocketChat/Rocket.Chat/pull/24984)) + + ### before + Screen Shot 2022-03-29 at 13 35 56 + + ### after + Screen Shot 2022-03-29 at 11 48 05 + +- Proxy settings being ignored ([#25022](https://github.com/RocketChat/Rocket.Chat/pull/25022)) + + Modify Meteor's `HTTP.call` to add back proxy support + +- Read receipts show with color gray when not read yet ([#25244](https://github.com/RocketChat/Rocket.Chat/pull/25244)) + +- Read receipts showing before message read ([#25216](https://github.com/RocketChat/Rocket.Chat/pull/25216)) + +- Replace encrypted text to Encrypted Message Placeholder ([#24166](https://github.com/RocketChat/Rocket.Chat/pull/24166)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/150807900-154a9cdb-ee13-4333-8628-f287ab914b40.png) + + ### after + Screenshot 2022-01-13 at 8 57 47 PM + +- Reply button behavior on broadcast channel ([#25175](https://github.com/RocketChat/Rocket.Chat/pull/25175)) + + Hide reply button for the user that sent the message + +- room creation fails if app framework is disabled ([#25200](https://github.com/RocketChat/Rocket.Chat/pull/25200)) + +- Showing Blank Message Inside Report ([#25007](https://github.com/RocketChat/Rocket.Chat/pull/25007)) + + https://user-images.githubusercontent.com/53515714/161038085-4a86c7ae-6751-4996-9767-b1c9e0331a6c.mp4 + +- Toolbox hiding under contextual bar ([#25237](https://github.com/RocketChat/Rocket.Chat/pull/25237)) + +- Upgrade Tab showing for a split second ([#25050](https://github.com/RocketChat/Rocket.Chat/pull/25050)) + +- Use correct room property for call ended at ([#24932](https://github.com/RocketChat/Rocket.Chat/pull/24932)) + +- UserAutoComplete not rendering UserAvatar correctly ([#25055](https://github.com/RocketChat/Rocket.Chat/pull/25055)) + + ### before + ![Screen Shot 2022-04-04 at 16 50 21](https://user-images.githubusercontent.com/27704687/161620921-800bf66a-806d-4f83-b2e1-073c34215001.png) + + ### after + ![Screen Shot 2022-04-04 at 16 49 00](https://user-images.githubusercontent.com/27704687/161620720-3e27774d-c241-46ca-b764-932a9295d709.png) + +- UserCard sanitization ([#25089](https://github.com/RocketChat/Rocket.Chat/pull/25089)) + + - Rewrites the component to TS + - Fixes some visual issues + + ### before + ![Screen Shot 2022-04-07 at 00 23 11](https://user-images.githubusercontent.com/27704687/162113925-5c9484d1-23e9-4623-8b86-3fbc71b461a1.png) + + ### after + ![Screen Shot 2022-04-07 at 00 07 13](https://user-images.githubusercontent.com/27704687/162112353-afd6aac6-b27c-4470-a642-631b8080d59e.png) + +- Video and Audio not skipping forward ([#19866](https://github.com/RocketChat/Rocket.Chat/pull/19866)) + +- VoIP disabled/enabled sequence puts voip agent in error state ([#25230](https://github.com/RocketChat/Rocket.Chat/pull/25230) by [@amolghode1981](https://github.com/amolghode1981)) + + Initially it was thought that the issue occurs because of the race condition while changing the client settings vs those settings reflected on server side. So a natural solution to solve this is to wait for setting change event 'private-settings-changed'. Then if 'VoIP_Enabled' is updated and it is true, set voipEnabled to true in useVoipClient.ts (on client side) + + It was realised that the race does not happen because of the database or server noticing the changes late. But because of the time taken to establish the AMI connection with Asterisk. + + Solution: + + 1. Change apps/meteor/app/voip/server/startup.ts. When VoIP_Enabled is changed, await for Voip.init() to complete and then broadcast connector.statuschanged with changed value. + 2. From apps/meteor/server/modules/listeners/listeners.module.ts use notifyLoggedInThisInstance to notify all logged in users on current instance. + 3. in apps/meteor/client/providers/CallProvider/hooks/useVoipClient.ts add the event handler that receives this event. Change voipEnabled from constant to state. Change this state based on the 'value' that is received by the handler. + +
+🔍 Minor changes + + +- Bump body-parser from 1.19.2 to 1.20.0 in /ee/server/services ([#25042](https://github.com/RocketChat/Rocket.Chat/pull/25042) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump ejson from 2.2.1 to 2.2.2 ([#25057](https://github.com/RocketChat/Rocket.Chat/pull/25057) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump eslint-plugin-anti-trojan-source from 1.0.6 to 1.1.0 ([#25076](https://github.com/RocketChat/Rocket.Chat/pull/25076) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump minimist from 1.2.5 to 1.2.6 in /ee/server/services ([#24991](https://github.com/RocketChat/Rocket.Chat/pull/24991) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino and pino-pretty ([#25052](https://github.com/RocketChat/Rocket.Chat/pull/25052)) + +- Bump template-file from 6.0.0 to 6.0.1 ([#25002](https://github.com/RocketChat/Rocket.Chat/pull/25002) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore: Add error boundary to message component ([#25223](https://github.com/RocketChat/Rocket.Chat/pull/25223)) + + Not crash the whole application if something goes wrong in the MessageList component. + + ![image](https://user-images.githubusercontent.com/40830821/162269915-931c5c3c-c979-4234-b74c-371f67467ce0.png) + +- Chore: Add options to debug stdout and rate limiter ([#25336](https://github.com/RocketChat/Rocket.Chat/pull/25336)) + +- Chore: Add root package.json to houston files ([#25286](https://github.com/RocketChat/Rocket.Chat/pull/25286)) + + See title + +- Chore: Add yarn plugin to check node and yarn version ([#25224](https://github.com/RocketChat/Rocket.Chat/pull/25224)) + +- Chore: Bump fuselage ([#25371](https://github.com/RocketChat/Rocket.Chat/pull/25371)) + +- Chore: Bump Fuselage packages ([#25259](https://github.com/RocketChat/Rocket.Chat/pull/25259)) + +- Chore: Cancel running jobs if PR is updated ([#24708](https://github.com/RocketChat/Rocket.Chat/pull/24708)) + +- Chore: Convert admin custom sound to tsx ([#25128](https://github.com/RocketChat/Rocket.Chat/pull/25128)) + +- Chore: Convert LivechatAgentActivity to raw model and TS ([#25123](https://github.com/RocketChat/Rocket.Chat/pull/25123)) + +- Chore: Convert Mailer to TS ([#25121](https://github.com/RocketChat/Rocket.Chat/pull/25121)) + +- Chore: Convert NotificationStatus to TS ([#25125](https://github.com/RocketChat/Rocket.Chat/pull/25125)) + +- Chore: Create README.md for Rest Typings ([#25335](https://github.com/RocketChat/Rocket.Chat/pull/25335)) + +- Chore: ensure scripts use cross-env and ignore some dirs (ROC-54) ([#25218](https://github.com/RocketChat/Rocket.Chat/pull/25218)) + + - data and test-failure should be ignored + - ensure scripts use cross-env + +- Chore: Fix return type warnings ([#25275](https://github.com/RocketChat/Rocket.Chat/pull/25275)) + +- Chore: Migrate oauth2server to typescript ([#25126](https://github.com/RocketChat/Rocket.Chat/pull/25126)) + +- Chore: Minor dependency updates ([#25269](https://github.com/RocketChat/Rocket.Chat/pull/25269)) + +- Chore: Missing keys in APIsDisplay ([#24464](https://github.com/RocketChat/Rocket.Chat/pull/24464)) + +- Chore: Monorepo ([#25074](https://github.com/RocketChat/Rocket.Chat/pull/25074)) + +- Chore: move definitions to packages ([#25085](https://github.com/RocketChat/Rocket.Chat/pull/25085)) + +- Chore: organize test files and fix code coverage ([#24900](https://github.com/RocketChat/Rocket.Chat/pull/24900)) + +- Chore: Remove Alpine image deps after using them ([#25053](https://github.com/RocketChat/Rocket.Chat/pull/25053)) + +- Chore: Remove duplicated useUserRoom ([#25180](https://github.com/RocketChat/Rocket.Chat/pull/25180)) + +- Chore: Remove old files from removed Omnichannel feature ([#25129](https://github.com/RocketChat/Rocket.Chat/pull/25129)) + +- Chore: Remove package-lock.json from houston files ([#25280](https://github.com/RocketChat/Rocket.Chat/pull/25280)) + + Houston config in the `package.json` file still mentioned `package-lock.json`, but it doesn't exist anymore + +- Chore: Remove unused Drone CI files ([#25124](https://github.com/RocketChat/Rocket.Chat/pull/25124)) + +- Chore: Sync with master ([#25284](https://github.com/RocketChat/Rocket.Chat/pull/25284)) + +- Chore: Template to generate packages ([#25174](https://github.com/RocketChat/Rocket.Chat/pull/25174)) + + ``` + npx hygen package new test + ``` + +- Chore: Tests with Playwright (task: All works) ([#25122](https://github.com/RocketChat/Rocket.Chat/pull/25122)) + +- Chore: Tests with Playwright (task: ROC-28, 09-channels) ([#25196](https://github.com/RocketChat/Rocket.Chat/pull/25196)) + +- Chore: TS conversion folder client ([#25031](https://github.com/RocketChat/Rocket.Chat/pull/25031)) + +- Chore: TS migration SortList ([#25167](https://github.com/RocketChat/Rocket.Chat/pull/25167)) + +- Chore: Update Livechat to the last version ([#25257](https://github.com/RocketChat/Rocket.Chat/pull/25257)) + +- Chore: Update Livechat version ([#25130](https://github.com/RocketChat/Rocket.Chat/pull/25130)) + +- Chore: update OTR icon ([#24521](https://github.com/RocketChat/Rocket.Chat/pull/24521) by [@kibonusp](https://github.com/kibonusp)) + + I changed the shredder icon in OTR contextual bar to the stopwatch icon, recently added to the fuselage. + +- i18n: Language update from LingoHub 🤖 on 2022-04-04Z ([#25043](https://github.com/RocketChat/Rocket.Chat/pull/25043)) + +- Merge master into develop & Set version to 4.7.0-develop ([#25028](https://github.com/RocketChat/Rocket.Chat/pull/25028)) + +- Regression: Add `isPending` status to message ([#25299](https://github.com/RocketChat/Rocket.Chat/pull/25299)) + +- Regression: Add eslint package to micro services Dockerfile ([#25311](https://github.com/RocketChat/Rocket.Chat/pull/25311)) + +- Regression: Add select message to system message and thread preview and allow select on legacy template ([#25251](https://github.com/RocketChat/Rocket.Chat/pull/25251)) + +- Regression: Avatar not loading on first direct message ([#25211](https://github.com/RocketChat/Rocket.Chat/pull/25211)) + + fix avatar not loading on a first direct message + +- Regression: Better MongoDB connection management for micro services ([#25323](https://github.com/RocketChat/Rocket.Chat/pull/25323)) + +- Regression: bump onboarding-ui version ([#25320](https://github.com/RocketChat/Rocket.Chat/pull/25320)) + + - Bump to 'next' the onboarding-ui package from fuselage. + - Update from 'companyEmail' to 'email' adminData usage types + +- Regression: Change preference to be default legacy messages ([#25255](https://github.com/RocketChat/Rocket.Chat/pull/25255)) + +- Regression: CI playwright ([#25168](https://github.com/RocketChat/Rocket.Chat/pull/25168)) + +- Regression: eslint not running on packages ([#25305](https://github.com/RocketChat/Rocket.Chat/pull/25305)) + +- Regression: Fix CI monorepo build ([#25107](https://github.com/RocketChat/Rocket.Chat/pull/25107)) + +- Regression: Fix clicking on visitor's chat in the sidebar does not display the chat window ([#25380](https://github.com/RocketChat/Rocket.Chat/pull/25380)) + + Fix: livechat room not opening. + +- Regression: Fix English i18n react text ([#25368](https://github.com/RocketChat/Rocket.Chat/pull/25368)) + + Incorrect text in reaction tooltip has been fixed + +- Regression: Fix federation Matrix bridge startup ([#25273](https://github.com/RocketChat/Rocket.Chat/pull/25273)) + +- Regression: Fix micro services Docker build ([#25193](https://github.com/RocketChat/Rocket.Chat/pull/25193)) + +- Regression: Fix multi line is not showing an empty line between lines ([#25317](https://github.com/RocketChat/Rocket.Chat/pull/25317)) + +- Regression: Fix reply button not working when hideFlexTab is enabled ([#25306](https://github.com/RocketChat/Rocket.Chat/pull/25306)) + +- Regression: Fix services Docker build on CI ([#25181](https://github.com/RocketChat/Rocket.Chat/pull/25181)) + +- Regression: Fix size of custom emoji and render emoji on thread message preview ([#25314](https://github.com/RocketChat/Rocket.Chat/pull/25314)) + +- Regression: Fix the alpine image and dev UX installing matrix-rust-sdk-bindings ([#25319](https://github.com/RocketChat/Rocket.Chat/pull/25319)) + + The package only included a few pre-built which caused all macs to have to compile every time they installed and also caused our alpine not to work. + + This temporarily switches to a fork of the matrix-appservice-bridge package. + + Made changes to one of its child dependencies `matrix-rust-sdk-bindings` that adds pre-built binaries for mac and musl (for alpine). + +- Regression: Messages in new message template Crashing. ([#25327](https://github.com/RocketChat/Rocket.Chat/pull/25327)) + +- Regression: Revert Bugsnag version ([#25313](https://github.com/RocketChat/Rocket.Chat/pull/25313)) + +- Regression: Rocket.Chat Webapp not loading. ([#25349](https://github.com/RocketChat/Rocket.Chat/pull/25349)) + +- Regression: Show username and real name on the message system ([#25254](https://github.com/RocketChat/Rocket.Chat/pull/25254)) + +- Regression: Shows error if micro service cannot connect to Mongo ([#25301](https://github.com/RocketChat/Rocket.Chat/pull/25301)) + +- Regression: Use exact Node version on micro services Docker images ([#25287](https://github.com/RocketChat/Rocket.Chat/pull/25287)) + +- Regression: Validate empty fields for Message template ([#25250](https://github.com/RocketChat/Rocket.Chat/pull/25250)) + +- Regression: yarn dev triggers build dependencies ([#25208](https://github.com/RocketChat/Rocket.Chat/pull/25208)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Himanshu664](https://github.com/Himanshu664) +- [@aakash-gitdev](https://github.com/aakash-gitdev) +- [@amolghode1981](https://github.com/amolghode1981) +- [@cuonghuunguyen](https://github.com/cuonghuunguyen) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@kibonusp](https://github.com/kibonusp) +- [@paulobernardoaf](https://github.com/paulobernardoaf) +- [@sidmohanty11](https://github.com/sidmohanty11) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@AllanPazRibeiro](https://github.com/AllanPazRibeiro) +- [@KevLehman](https://github.com/KevLehman) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@alansikora](https://github.com/alansikora) +- [@albuquerquefabio](https://github.com/albuquerquefabio) +- [@d-gubert](https://github.com/d-gubert) +- [@debdutdeb](https://github.com/debdutdeb) +- [@dougfabris](https://github.com/dougfabris) +- [@filipemarins](https://github.com/filipemarins) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@guijun13](https://github.com/guijun13) +- [@jeanfbrito](https://github.com/jeanfbrito) +- [@juliajforesti](https://github.com/juliajforesti) +- [@murtaza98](https://github.com/murtaza98) +- [@nishant23122000](https://github.com/nishant23122000) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@souzaramon](https://github.com/souzaramon) +- [@tassoevan](https://github.com/tassoevan) +- [@tiagoevanp](https://github.com/tiagoevanp) +- [@tmontini](https://github.com/tmontini) +- [@weslley543](https://github.com/weslley543) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 4.6.3 +`2022-04-19 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🐛 Bug fixes + + +- Desktop notification on multi-instance environments ([#25220](https://github.com/RocketChat/Rocket.Chat/pull/25220)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 4.6.2 +`2022-04-14 · 2 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🐛 Bug fixes + + +- Database indexes not being created ([#25101](https://github.com/RocketChat/Rocket.Chat/pull/25101)) + +- Deactivating user breaks if user is the only room owner ([#24933](https://github.com/RocketChat/Rocket.Chat/pull/24933) by [@sidmohanty11](https://github.com/sidmohanty11)) + + ## Before + + https://user-images.githubusercontent.com/73601258/160000871-cfc2f2a5-2a59-4d27-8049-7754d003dd48.mp4 + + + + ## After + https://user-images.githubusercontent.com/73601258/159998287-681ab475-ff33-4282-82ff-db751c59a392.mp4 + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@sidmohanty11](https://github.com/sidmohanty11) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 4.6.1 +`2022-04-07 · 6 🐛 · 5 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🐛 Bug fixes + + +- FormData uploads not working ([#25069](https://github.com/RocketChat/Rocket.Chat/pull/25069)) + +- Invitation links don't redirect to the registration form ([#25082](https://github.com/RocketChat/Rocket.Chat/pull/25082)) + +- NPS never finishing sending results ([#25067](https://github.com/RocketChat/Rocket.Chat/pull/25067)) + +- Proxy settings being ignored ([#25022](https://github.com/RocketChat/Rocket.Chat/pull/25022)) + + Modify Meteor's `HTTP.call` to add back proxy support + +- Upgrade Tab showing for a split second ([#25050](https://github.com/RocketChat/Rocket.Chat/pull/25050)) + +- UserAutoComplete not rendering UserAvatar correctly ([#25055](https://github.com/RocketChat/Rocket.Chat/pull/25055)) + + ### before + ![Screen Shot 2022-04-04 at 16 50 21](https://user-images.githubusercontent.com/27704687/161620921-800bf66a-806d-4f83-b2e1-073c34215001.png) + + ### after + ![Screen Shot 2022-04-04 at 16 49 00](https://user-images.githubusercontent.com/27704687/161620720-3e27774d-c241-46ca-b764-932a9295d709.png) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 4.6.0 +`2022-04-01 · 2 🎉 · 7 🚀 · 57 🐛 · 62 🔍 · 34 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🎉 New features + + +- Telemetry Events ([#24781](https://github.com/RocketChat/Rocket.Chat/pull/24781) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + +- Upgrade Tab ([#24835](https://github.com/RocketChat/Rocket.Chat/pull/24835)) + + ![image](https://user-images.githubusercontent.com/27704687/160172260-c656282e-a487-4092-948d-d11c9bacb598.png) + +### 🚀 Improvements + + +- **ENTERPRISE:** Don't start presence monitor when running micro services ([#24739](https://github.com/RocketChat/Rocket.Chat/pull/24739)) + +- Adding new statistics related to voip and omnichannel ([#24887](https://github.com/RocketChat/Rocket.Chat/pull/24887)) + + - Total of Canned response messages sent + - Total of tags used + - Last-Chatted Agent Preferred (enabled/disabled) + - Assign new conversations to the contact manager (enabled/disabled) + - How to handle Visitor Abandonment setting + - Amount of chats placed on hold + - VoIP Enabled + - Amount of VoIP Calls + - Amount of VoIP Extensions connected + - Amount of Calls placed on hold (1x per call) + - Fixed Session Aggregation type definitions + +- New omnichannel statistics and async statistics processing. ([#24749](https://github.com/RocketChat/Rocket.Chat/pull/24749)) + + https://app.clickup.com/t/1z4zg4e + +- Standarize queue behavior for managers and agents when subscribing ([#24837](https://github.com/RocketChat/Rocket.Chat/pull/24837)) + +- Updated links in readme ([#24028](https://github.com/RocketChat/Rocket.Chat/pull/24028) by [@aswinidev](https://github.com/aswinidev)) + +- UX - VoIP Call Component ([#24748](https://github.com/RocketChat/Rocket.Chat/pull/24748)) + +- Voip Extensions disabled state ([#24750](https://github.com/RocketChat/Rocket.Chat/pull/24750)) + +### 🐛 Bug fixes + + +- "livechat/webrtc.call" endpoint not working ([#24804](https://github.com/RocketChat/Rocket.Chat/pull/24804)) + +- "Match error" when converting a team to a channel ([#24629](https://github.com/RocketChat/Rocket.Chat/pull/24629)) + + - Fix "Match error" when trying to convert a channel to a team; + +- **ENTERPRISE:** Auto reload feature of ddp-streamer micro service ([#24793](https://github.com/RocketChat/Rocket.Chat/pull/24793)) + +- **ENTERPRISE:** DDP streamer not sending data to all clients ([#24738](https://github.com/RocketChat/Rocket.Chat/pull/24738)) + +- **ENTERPRISE:** Notifications not being sent by ddp-streamer ([#24831](https://github.com/RocketChat/Rocket.Chat/pull/24831)) + +- **ENTERPRISE:** Presence micro service logic ([#24724](https://github.com/RocketChat/Rocket.Chat/pull/24724)) + +- **VOIP:** SidebarFooter component ([#24838](https://github.com/RocketChat/Rocket.Chat/pull/24838)) + + - Improve the CallProvider code; + - Adjust the text case of the VoIP component on the FooterSidebar; + - Fix the bad behavior with the changes in queue's name. + +- `PaginatedSelectFiltered` not handling changes ([#24732](https://github.com/RocketChat/Rocket.Chat/pull/24732)) + +- API Error preventing adding an email to users without one (like bot/app users) ([#24709](https://github.com/RocketChat/Rocket.Chat/pull/24709)) + +- Apple login script being loaded even when Apple Login is disabled. ([#24760](https://github.com/RocketChat/Rocket.Chat/pull/24760)) + +- Apple OAuth ([#24879](https://github.com/RocketChat/Rocket.Chat/pull/24879)) + +- auto-join team channels not honoring user preferences ([#24779](https://github.com/RocketChat/Rocket.Chat/pull/24779) by [@ostjen](https://github.com/ostjen)) + +- Broken build caused by PRs modifying same file differently ([#24863](https://github.com/RocketChat/Rocket.Chat/pull/24863)) + +- Broken multiple OAuth integrations ([#24705](https://github.com/RocketChat/Rocket.Chat/pull/24705)) + +- Components for user search ([#24677](https://github.com/RocketChat/Rocket.Chat/pull/24677)) + +- Critical: Incorrect visitor getting assigned to a chat from apps ([#24805](https://github.com/RocketChat/Rocket.Chat/pull/24805)) + +- Custom script not being fired ([#24901](https://github.com/RocketChat/Rocket.Chat/pull/24901)) + +- Date Message Export Filter Fix ([#24542](https://github.com/RocketChat/Rocket.Chat/pull/24542) by [@eduardofcabrera](https://github.com/eduardofcabrera)) + + Fix message export filter to get all messages between "from date" and "to date", including "to date". + +- DDP Rate Limiter Translation key ([#24898](https://github.com/RocketChat/Rocket.Chat/pull/24898)) + + Before: + image + + + Now: + image + +- DDP streamer errors ([#24710](https://github.com/RocketChat/Rocket.Chat/pull/24710)) + +- Disable voip button when call is in progress ([#24864](https://github.com/RocketChat/Rocket.Chat/pull/24864)) + +- Duplicated 'name' log key ([#24590](https://github.com/RocketChat/Rocket.Chat/pull/24590)) + +- Duplicated "jump to message" button on starred messages ([#24867](https://github.com/RocketChat/Rocket.Chat/pull/24867) by [@Himanshu664](https://github.com/Himanshu664)) + +- External search providers not working ([#24860](https://github.com/RocketChat/Rocket.Chat/pull/24860) by [@tkurz](https://github.com/tkurz)) + +- German translation for Monitore ([#24785](https://github.com/RocketChat/Rocket.Chat/pull/24785) by [@JMoVS](https://github.com/JMoVS)) + +- Handle Other Formats inside Upload Avatar ([#24226](https://github.com/RocketChat/Rocket.Chat/pull/24226)) + + After resolving issue #24213 : + + + https://user-images.githubusercontent.com/53515714/150325012-91413025-786e-4ce0-ae75-629f6b05b024.mp4 + +- High CPU usage caused by CallProvider ([#24994](https://github.com/RocketChat/Rocket.Chat/pull/24994)) + + Remove infinity loop inside useVoipClient hook. + + #closes #24970 + +- Ignore customClass on messages ([#24845](https://github.com/RocketChat/Rocket.Chat/pull/24845)) + +- LDAP avatars being rotated according to metadata even if the setting to rotate uploads is off ([#24320](https://github.com/RocketChat/Rocket.Chat/pull/24320)) + + - Use the `FileUpload_RotateImages` setting (**Administration > File Upload > Rotate images on upload**) to control whether avatars should be rotated automatically based on their data (XEIF); + - Display the avatar image preview (orientation) according to the `FileUpload_RotateImages` setting. + +- Missing dependency on useEffect at CallProvider ([#24882](https://github.com/RocketChat/Rocket.Chat/pull/24882)) + +- Missing username on messages imported from Slack ([#24674](https://github.com/RocketChat/Rocket.Chat/pull/24674)) + + - Fix missing sender's username on messages imported from Slack. + +- Nextcloud OAuth for incomplete token URL ([#24476](https://github.com/RocketChat/Rocket.Chat/pull/24476)) + +- no id of room closer in livechat-close message ([#24683](https://github.com/RocketChat/Rocket.Chat/pull/24683)) + +- Opening a new DM from user card ([#24623](https://github.com/RocketChat/Rocket.Chat/pull/24623)) + + A race condition on `useRoomIcon` -- delayed merge of rooms and subscriptions -- was causing a UI crash whenever someone tried to open a DM from the user card component. + +- Prevent call button toggle when user is on call ([#24758](https://github.com/RocketChat/Rocket.Chat/pull/24758)) + +- Prune Message issue ([#24424](https://github.com/RocketChat/Rocket.Chat/pull/24424)) + +- Push privacy config to not show username not being respected ([#24606](https://github.com/RocketChat/Rocket.Chat/pull/24606)) + +- Register with Secret URL ([#24921](https://github.com/RocketChat/Rocket.Chat/pull/24921)) + +- Reload roomslist after successful deletion of a room from admin panel. ([#23795](https://github.com/RocketChat/Rocket.Chat/pull/23795) by [@Aman-Maheshwari](https://github.com/Aman-Maheshwari)) + + Removed the logic for calling the `rooms.adminRooms` endPoint from the `RoomsTable` Component and moved it to its parent component `RoomsPage`. + This allows to call the endPoint `rooms.adminRooms` from `EditRoomContextBar` Component which is also has `RoomPage` Component as its parent. + + Also added a succes toast message after the successful deletion of room. + +- Revert AutoComplete ([#24812](https://github.com/RocketChat/Rocket.Chat/pull/24812)) + +- Room archived/unarchived system messages aren't sent when editing room settings ([#24897](https://github.com/RocketChat/Rocket.Chat/pull/24897)) + + - Send the "Room archived" and "Room unarchived" system messages when editing room settings (and not only when rooms are archived/unarchived with the slash-command); + - Fix the "Hide System Messages" option for the "Room archived" and "Room unarchived" system messages; + +- room message not load when is a new message ([#24955](https://github.com/RocketChat/Rocket.Chat/pull/24955)) + + When the room object is searched for the first time, it does not exist on the front object yet (subscription), adding a fallback search for room list will guarantee to search the room details. + + before: + https://user-images.githubusercontent.com/9275105/160223241-d2319f3e-82c5-47d6-867f-695ab2361a17.mp4 + + after: + https://user-images.githubusercontent.com/9275105/160223244-84d0d2a1-3d95-464d-8b8a-e264b0d4d690.mp4 + +- Room's message count not being incremented on import ([#24696](https://github.com/RocketChat/Rocket.Chat/pull/24696)) + + - Fix rooms' message counter not being incremented on message import. + +- SAML Force name to string ([#24930](https://github.com/RocketChat/Rocket.Chat/pull/24930)) + +- Several issues related to custom roles ([#24052](https://github.com/RocketChat/Rocket.Chat/pull/24052)) + + - Throw an error when trying to delete a role (User or Subscription role) that are still being used; + - Fix "Invalid Role" error for custom roles in Role Editing sidebar; + - Fix "Users in Role" screen for custom roles. + +- Show call icon only when user has extension associated ([#24752](https://github.com/RocketChat/Rocket.Chat/pull/24752)) + +- Show only available agents on extension association modal ([#24680](https://github.com/RocketChat/Rocket.Chat/pull/24680)) + +- Show only enabled departments on forward ([#24829](https://github.com/RocketChat/Rocket.Chat/pull/24829)) + +- System messages are sent when adding or removing a group from a team ([#24743](https://github.com/RocketChat/Rocket.Chat/pull/24743)) + + - Do not send system messages when adding or removing a new or existing _group_ from a team. + +- Typo and placeholder on wrap up call modal ([#24737](https://github.com/RocketChat/Rocket.Chat/pull/24737)) + +- Typo in wrap-up term ([#24661](https://github.com/RocketChat/Rocket.Chat/pull/24661)) + +- VoIP button gets disabled whenever user status changes ([#24789](https://github.com/RocketChat/Rocket.Chat/pull/24789) by [@amolghode1981](https://github.com/amolghode1981)) + +- VoIP Enable/Disable setting on CallContext/CallProvider Notifications ([#24607](https://github.com/RocketChat/Rocket.Chat/pull/24607)) + +- Voip Stream Reinitialization Error ([#24657](https://github.com/RocketChat/Rocket.Chat/pull/24657) by [@amolghode1981](https://github.com/amolghode1981)) + +- VoipExtensionsPage component call ([#24792](https://github.com/RocketChat/Rocket.Chat/pull/24792)) + +- Wrong business hour behavior ([#24896](https://github.com/RocketChat/Rocket.Chat/pull/24896)) + +- Wrong param usage on queue summary call ([#24799](https://github.com/RocketChat/Rocket.Chat/pull/24799)) + +
+🔍 Minor changes + + +- Bump @rocket.chat/emitter from 0.31.4 to 0.31.9 in /ee/server/services ([#25021](https://github.com/RocketChat/Rocket.Chat/pull/25021) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @rocket.chat/message-parser from 0.31.4 to 0.31.9 in /ee/server/services ([#25019](https://github.com/RocketChat/Rocket.Chat/pull/25019) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @rocket.chat/string-helpers from 0.31.4 to 0.31.9 in /ee/server/services ([#25018](https://github.com/RocketChat/Rocket.Chat/pull/25018) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @rocket.chat/ui-kit from 0.31.4 to 0.31.9 in /ee/server/services ([#25020](https://github.com/RocketChat/Rocket.Chat/pull/25020) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/clipboard from 2.0.1 to 2.0.7 ([#24832](https://github.com/RocketChat/Rocket.Chat/pull/24832) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/mailparser from 3.0.2 to 3.4.0 ([#24833](https://github.com/RocketChat/Rocket.Chat/pull/24833) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/nodemailer from 6.4.2 to 6.4.4 ([#24822](https://github.com/RocketChat/Rocket.Chat/pull/24822) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/ws from 8.2.3 to 8.5.2 in /ee/server/services ([#24666](https://github.com/RocketChat/Rocket.Chat/pull/24666) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/ws from 8.5.2 to 8.5.3 in /ee/server/services ([#24820](https://github.com/RocketChat/Rocket.Chat/pull/24820) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump actions/checkout from 2 to 3 ([#24668](https://github.com/RocketChat/Rocket.Chat/pull/24668) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump actions/setup-node from 2 to 3 ([#24642](https://github.com/RocketChat/Rocket.Chat/pull/24642) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump body-parser from 1.19.0 to 1.19.2 ([#24821](https://github.com/RocketChat/Rocket.Chat/pull/24821) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump is-svg from 4.3.1 to 4.3.2 ([#24801](https://github.com/RocketChat/Rocket.Chat/pull/24801) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump jschardet from 1.6.0 to 3.0.0 ([#23121](https://github.com/RocketChat/Rocket.Chat/pull/23121) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino from 7.8.0 to 7.8.1 in /ee/server/services ([#24783](https://github.com/RocketChat/Rocket.Chat/pull/24783) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino from 7.8.1 to 7.9.1 in /ee/server/services ([#24869](https://github.com/RocketChat/Rocket.Chat/pull/24869) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino-pretty from 7.5.1 to 7.5.2 in /ee/server/services ([#24689](https://github.com/RocketChat/Rocket.Chat/pull/24689) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino-pretty from 7.5.2 to 7.5.3 in /ee/server/services ([#24698](https://github.com/RocketChat/Rocket.Chat/pull/24698) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino-pretty from 7.5.3 to 7.5.4 in /ee/server/services ([#24870](https://github.com/RocketChat/Rocket.Chat/pull/24870) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump prometheus-gc-stats from 0.6.2 to 0.6.3 ([#24803](https://github.com/RocketChat/Rocket.Chat/pull/24803) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump ts-node from 10.5.0 to 10.6.0 in /ee/server/services ([#24667](https://github.com/RocketChat/Rocket.Chat/pull/24667) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump ts-node from 10.6.0 to 10.7.0 in /ee/server/services ([#24716](https://github.com/RocketChat/Rocket.Chat/pull/24716) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump url-parse from 1.5.7 to 1.5.10 ([#24640](https://github.com/RocketChat/Rocket.Chat/pull/24640) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore: Add E2E tests for livechat/room.close ([#24729](https://github.com/RocketChat/Rocket.Chat/pull/24729) by [@Muramatsu2602](https://github.com/Muramatsu2602)) + + * Create a new test suite file under tests/end-to-end/api/livechat + * Create tests for the following endpoint: + + ivechat/room.close + +- Chore: Add E2E tests for livechat/visitor ([#24764](https://github.com/RocketChat/Rocket.Chat/pull/24764) by [@Muramatsu2602](https://github.com/Muramatsu2602)) + + - Create a new test suite file under tests/end-to-end/api/livechat + - Create tests for the following endpoints: + + livechat/visitor (create visitor, update visitor, add custom fields to visitors) + +- Chore: add some missing REST definitions ([#24925](https://github.com/RocketChat/Rocket.Chat/pull/24925) by [@gerzonc](https://github.com/gerzonc)) + + On the [mobile client](https://github.com/RocketChat/Rocket.Chat.ReactNative), we made an effort to collect more `REST API` definitions that are missing on the server side during our migration to TypeScript. Since we're both migrating to TypeScript, we thought it would be a good idea to share those so you guys can benefit from our initiative. + +- Chore: added Server Instances endpoint types ([#24507](https://github.com/RocketChat/Rocket.Chat/pull/24507)) + + Created typing for endpoint definitions on `instances.ts`. + +- Chore: added settings endpoint types ([#24506](https://github.com/RocketChat/Rocket.Chat/pull/24506)) + + Created typing for endpoint definitions on `settings.ts`. + +- Chore: APIClass types ([#24747](https://github.com/RocketChat/Rocket.Chat/pull/24747)) + + This pull request creates a new `restivus` module (.d.ts) for the `api.js` file. + +- Chore: Bump Fuselage packages ([#25015](https://github.com/RocketChat/Rocket.Chat/pull/25015)) + + It uses the last stable version of Fuselage packages. + +- Chore: Convert server functions from javascript to typescript ([#24384](https://github.com/RocketChat/Rocket.Chat/pull/24384)) + + This pull request will be used to rewrite some functions on the Chat Engine to Typescript, in order to increase security and specify variable types on the code. + +- Chore: converted more hooks to typescript ([#24628](https://github.com/RocketChat/Rocket.Chat/pull/24628)) + + Converted some functions on `client/hooks/` from JavaScript to Typescript. + +- Chore: Fix Cypress tests ([#24544](https://github.com/RocketChat/Rocket.Chat/pull/24544)) + +- Chore: Fix grammatical errors in Code of Conduct ([#24759](https://github.com/RocketChat/Rocket.Chat/pull/24759) by [@aadishJ01](https://github.com/aadishJ01)) + +- Chore: fix grammatical errors in Features ([#24771](https://github.com/RocketChat/Rocket.Chat/pull/24771) by [@aadishJ01](https://github.com/aadishJ01)) + +- Chore: Fix MongoDB versions on release notes ([#24877](https://github.com/RocketChat/Rocket.Chat/pull/24877)) + +- Chore: Get Settings Statistics ([#24397](https://github.com/RocketChat/Rocket.Chat/pull/24397)) + +- Chore: Improve logger to allow log of `unknown` values ([#24726](https://github.com/RocketChat/Rocket.Chat/pull/24726)) + +- Chore: Improvements on role syncing (ldap, oauth and saml) ([#23824](https://github.com/RocketChat/Rocket.Chat/pull/23824)) + +- Chore: Micro services fixes and cleanup ([#24753](https://github.com/RocketChat/Rocket.Chat/pull/24753)) + +- Chore: Remove old scripts ([#24911](https://github.com/RocketChat/Rocket.Chat/pull/24911)) + +- Chore: Skip local services changes when shutting down duplicated services ([#24810](https://github.com/RocketChat/Rocket.Chat/pull/24810)) + +- Chore: Storybook mocking and examples improved ([#24969](https://github.com/RocketChat/Rocket.Chat/pull/24969)) + + - Stories from `ee/` included; + - Differentiate root story kinds; + - Mocking of `ServerContext` via Storybook parameters. + +- Chore: Update Livechat ([#24754](https://github.com/RocketChat/Rocket.Chat/pull/24754)) + +- Chore: Update Livechat ([#24990](https://github.com/RocketChat/Rocket.Chat/pull/24990)) + +- Chore(deps-dev): Bump @types/mock-require from 2.0.0 to 2.0.1 ([#24574](https://github.com/RocketChat/Rocket.Chat/pull/24574) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- i18n: Language update from LingoHub 🤖 on 2022-02-28Z ([#24644](https://github.com/RocketChat/Rocket.Chat/pull/24644)) + +- i18n: Language update from LingoHub 🤖 on 2022-03-07Z ([#24717](https://github.com/RocketChat/Rocket.Chat/pull/24717)) + +- i18n: Language update from LingoHub 🤖 on 2022-03-14Z ([#24823](https://github.com/RocketChat/Rocket.Chat/pull/24823)) + +- i18n: Language update from LingoHub 🤖 on 2022-03-21Z ([#24895](https://github.com/RocketChat/Rocket.Chat/pull/24895)) + +- i18n: Language update from LingoHub 🤖 on 2022-03-28Z ([#24971](https://github.com/RocketChat/Rocket.Chat/pull/24971)) + +- Merge master into develop & Set version to 4.6.0-develop ([#24653](https://github.com/RocketChat/Rocket.Chat/pull/24653)) + +- Regression: Add createdOTR index ([#25017](https://github.com/RocketChat/Rocket.Chat/pull/25017)) + +- Regression: Call doesn't stop ringing after agent unregistration ([#24908](https://github.com/RocketChat/Rocket.Chat/pull/24908)) + +- Regression: Custom roles displaying ID instead of name on some admin screens ([#24999](https://github.com/RocketChat/Rocket.Chat/pull/24999)) + + ![image](https://user-images.githubusercontent.com/55164754/160981416-555bcaa1-c075-4260-937c-64523472da43.png) + ![image](https://user-images.githubusercontent.com/55164754/160981452-6eae4e74-8425-4073-8256-472aba72b9db.png) + +- Regression: Error is raised when there's no Asterisk queue available yet ([#24980](https://github.com/RocketChat/Rocket.Chat/pull/24980) by [@amolghode1981](https://github.com/amolghode1981)) + +- Regression: Fix account service login expiration ([#24920](https://github.com/RocketChat/Rocket.Chat/pull/24920)) + +- Regression: Fix ParentRoomWithEndpointData in loop ([#24809](https://github.com/RocketChat/Rocket.Chat/pull/24809)) + +- Regression: Fix unexpected errors breaking ddp-streamer ([#24948](https://github.com/RocketChat/Rocket.Chat/pull/24948)) + +- Regression: Improve Sidenav open/close handling and fixed codeql configs and E2E tests ([#24756](https://github.com/RocketChat/Rocket.Chat/pull/24756)) + +- Regression: Register services right away ([#24800](https://github.com/RocketChat/Rocket.Chat/pull/24800)) + +- Regression: Role Sync not always working ([#24850](https://github.com/RocketChat/Rocket.Chat/pull/24850)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Aman-Maheshwari](https://github.com/Aman-Maheshwari) +- [@Himanshu664](https://github.com/Himanshu664) +- [@JMoVS](https://github.com/JMoVS) +- [@Muramatsu2602](https://github.com/Muramatsu2602) +- [@aadishJ01](https://github.com/aadishJ01) +- [@amolghode1981](https://github.com/amolghode1981) +- [@aswinidev](https://github.com/aswinidev) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@eduardofcabrera](https://github.com/eduardofcabrera) +- [@gerzonc](https://github.com/gerzonc) +- [@ostjen](https://github.com/ostjen) +- [@tkurz](https://github.com/tkurz) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@albuquerquefabio](https://github.com/albuquerquefabio) +- [@cauefcr](https://github.com/cauefcr) +- [@debdutdeb](https://github.com/debdutdeb) +- [@dougfabris](https://github.com/dougfabris) +- [@felipe-rod123](https://github.com/felipe-rod123) +- [@filipemarins](https://github.com/filipemarins) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@juliajforesti](https://github.com/juliajforesti) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@murtaza98](https://github.com/murtaza98) +- [@nishant23122000](https://github.com/nishant23122000) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@tiagoevanp](https://github.com/tiagoevanp) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 4.5.6 +`2022-04-07 · 2 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🐛 Bug fixes + + +- NPS never finishing sending results ([#25067](https://github.com/RocketChat/Rocket.Chat/pull/25067)) + +- Proxy settings being ignored ([#25022](https://github.com/RocketChat/Rocket.Chat/pull/25022)) + + Modify Meteor's `HTTP.call` to add back proxy support + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 4.5.5 +`2022-03-30 · 2 🐛 · 2 🔍 · 6 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🐛 Bug fixes + + +- High CPU usage caused by CallProvider ([#24994](https://github.com/RocketChat/Rocket.Chat/pull/24994)) + + Remove infinity loop inside useVoipClient hook. + + #closes #24970 + +- Multiple issues starting a new DM ([#24955](https://github.com/RocketChat/Rocket.Chat/pull/24955)) + + When the room object is searched for the first time, it does not exist on the front object yet (subscription), adding a fallback search for room list will guarantee to search the room details. + + before: + https://user-images.githubusercontent.com/9275105/160223241-d2319f3e-82c5-47d6-867f-695ab2361a17.mp4 + + after: + https://user-images.githubusercontent.com/9275105/160223244-84d0d2a1-3d95-464d-8b8a-e264b0d4d690.mp4 + +
+🔍 Minor changes + + +- Chore: Update Livechat ([#24990](https://github.com/RocketChat/Rocket.Chat/pull/24990)) + +- Release 4.5.5 ([#24998](https://github.com/RocketChat/Rocket.Chat/pull/24998)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@filipemarins](https://github.com/filipemarins) +- [@ggazzo](https://github.com/ggazzo) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 4.5.4 +`2022-03-24 · 1 🐛 · 1 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🐛 Bug fixes + + +- SAML Force name to string ([#24930](https://github.com/RocketChat/Rocket.Chat/pull/24930)) + +
+🔍 Minor changes + + +- Release 4.5.4 ([#24938](https://github.com/RocketChat/Rocket.Chat/pull/24938)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@AllanPazRibeiro](https://github.com/AllanPazRibeiro) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) + +# 4.5.3 +`2022-03-21 · 2 🚀 · 8 🐛 · 1 🔍 · 5 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🚀 Improvements + + +- Standarize queue behavior for managers and agents when subscribing ([#24837](https://github.com/RocketChat/Rocket.Chat/pull/24837)) + +- UX - VoIP Call Component ([#24748](https://github.com/RocketChat/Rocket.Chat/pull/24748)) + +### 🐛 Bug fixes + + +- **VOIP:** SidebarFooter component ([#24838](https://github.com/RocketChat/Rocket.Chat/pull/24838)) + + - Improve the CallProvider code; + - Adjust the text case of the VoIP component on the FooterSidebar; + - Fix the bad behavior with the changes in queue's name. + +- Broken build caused by PRs modifying same file differently ([#24863](https://github.com/RocketChat/Rocket.Chat/pull/24863)) + +- Custom script not being fired ([#24901](https://github.com/RocketChat/Rocket.Chat/pull/24901)) + +- Disable voip button when call is in progress ([#24864](https://github.com/RocketChat/Rocket.Chat/pull/24864)) + +- Show call icon only when user has extension associated ([#24752](https://github.com/RocketChat/Rocket.Chat/pull/24752)) + +- Show only enabled departments on forward ([#24829](https://github.com/RocketChat/Rocket.Chat/pull/24829)) + +- VoIP button gets disabled whenever user status changes ([#24789](https://github.com/RocketChat/Rocket.Chat/pull/24789) by [@amolghode1981](https://github.com/amolghode1981)) + +- Wrong param usage on queue summary call ([#24799](https://github.com/RocketChat/Rocket.Chat/pull/24799)) + +
+🔍 Minor changes + + +- Chore: Fix MongoDB versions on release notes ([#24877](https://github.com/RocketChat/Rocket.Chat/pull/24877)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@amolghode1981](https://github.com/amolghode1981) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@ggazzo](https://github.com/ggazzo) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 4.5.2 +`2022-03-12 · 1 🚀 · 7 🐛 · 1 🔍 · 8 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🚀 Improvements + + +- Voip Extensions disabled state ([#24750](https://github.com/RocketChat/Rocket.Chat/pull/24750)) + +### 🐛 Bug fixes + + +- "livechat/webrtc.call" endpoint not working ([#24804](https://github.com/RocketChat/Rocket.Chat/pull/24804)) + +- `PaginatedSelectFiltered` not handling changes ([#24732](https://github.com/RocketChat/Rocket.Chat/pull/24732)) + +- Broken multiple OAuth integrations ([#24705](https://github.com/RocketChat/Rocket.Chat/pull/24705)) + +- Critical: Incorrect visitor getting assigned to a chat from apps ([#24805](https://github.com/RocketChat/Rocket.Chat/pull/24805)) + +- Opening a new DM from user card ([#24623](https://github.com/RocketChat/Rocket.Chat/pull/24623)) + + A race condition on `useRoomIcon` -- delayed merge of rooms and subscriptions -- was causing a UI crash whenever someone tried to open a DM from the user card component. + +- Revert AutoComplete ([#24812](https://github.com/RocketChat/Rocket.Chat/pull/24812)) + +- VoipExtensionsPage component call ([#24792](https://github.com/RocketChat/Rocket.Chat/pull/24792)) + +
+🔍 Minor changes + + +- Regression: Fix ParentRoomWithEndpointData in loop ([#24809](https://github.com/RocketChat/Rocket.Chat/pull/24809)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@debdutdeb](https://github.com/debdutdeb) +- [@ggazzo](https://github.com/ggazzo) +- [@juliajforesti](https://github.com/juliajforesti) +- [@murtaza98](https://github.com/murtaza98) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 4.5.1 +`2022-03-09 · 13 🐛 · 2 🔍 · 12 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🐛 Bug fixes + + +- Apple login script being loaded even when Apple Login is disabled. ([#24760](https://github.com/RocketChat/Rocket.Chat/pull/24760)) + +- Components for user search ([#24677](https://github.com/RocketChat/Rocket.Chat/pull/24677)) + +- Duplicated 'name' log key ([#24590](https://github.com/RocketChat/Rocket.Chat/pull/24590)) + +- Missing username on messages imported from Slack ([#24674](https://github.com/RocketChat/Rocket.Chat/pull/24674)) + + - Fix missing sender's username on messages imported from Slack. + +- no id of room closer in livechat-close message ([#24683](https://github.com/RocketChat/Rocket.Chat/pull/24683)) + +- Reload roomslist after successful deletion of a room from admin panel. ([#23795](https://github.com/RocketChat/Rocket.Chat/pull/23795) by [@Aman-Maheshwari](https://github.com/Aman-Maheshwari)) + + Removed the logic for calling the `rooms.adminRooms` endPoint from the `RoomsTable` Component and moved it to its parent component `RoomsPage`. + This allows to call the endPoint `rooms.adminRooms` from `EditRoomContextBar` Component which is also has `RoomPage` Component as its parent. + + Also added a succes toast message after the successful deletion of room. + +- Room's message count not being incremented on import ([#24696](https://github.com/RocketChat/Rocket.Chat/pull/24696)) + + - Fix rooms' message counter not being incremented on message import. + +- Show only available agents on extension association modal ([#24680](https://github.com/RocketChat/Rocket.Chat/pull/24680)) + +- System messages are sent when adding or removing a group from a team ([#24743](https://github.com/RocketChat/Rocket.Chat/pull/24743)) + + - Do not send system messages when adding or removing a new or existing _group_ from a team. + +- Typo and placeholder on wrap up call modal ([#24737](https://github.com/RocketChat/Rocket.Chat/pull/24737)) + +- Typo in wrap-up term ([#24661](https://github.com/RocketChat/Rocket.Chat/pull/24661)) + +- VoIP Enable/Disable setting on CallContext/CallProvider Notifications ([#24607](https://github.com/RocketChat/Rocket.Chat/pull/24607)) + +- Voip Stream Reinitialization Error ([#24657](https://github.com/RocketChat/Rocket.Chat/pull/24657) by [@amolghode1981](https://github.com/amolghode1981)) + +
+🔍 Minor changes + + +- Chore: Update Livechat ([#24754](https://github.com/RocketChat/Rocket.Chat/pull/24754)) + +- Release 4.5.1 ([#24782](https://github.com/RocketChat/Rocket.Chat/pull/24782) by [@Aman-Maheshwari](https://github.com/Aman-Maheshwari) & [@amolghode1981](https://github.com/amolghode1981) & [@cuonghuunguyen](https://github.com/cuonghuunguyen)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Aman-Maheshwari](https://github.com/Aman-Maheshwari) +- [@amolghode1981](https://github.com/amolghode1981) +- [@cuonghuunguyen](https://github.com/cuonghuunguyen) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@juliajforesti](https://github.com/juliajforesti) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 4.5.0 +`2022-02-28 · 3 🎉 · 15 🚀 · 19 🐛 · 72 🔍 · 30 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🎉 New features + + +- E2E password generator ([#24114](https://github.com/RocketChat/Rocket.Chat/pull/24114) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + +- Marketplace sort filter ([#24567](https://github.com/RocketChat/Rocket.Chat/pull/24567) by [@ujorgeleite](https://github.com/ujorgeleite)) + + Implemented a sort filter for the marketplace screen. This component sorts the marketplace apps list in 4 ways, alphabetical order(A-Z), inverse alphabetical order(Z-A), most recently updated(MRU), and least recent updated(LRU). Besides that, I've generalized some components and types to increase code reusability, renamed some helpers as well as deleted some useless ones, and inserted the necessary new translations on the English i18n dictionary. + Demo gif: + ![Marketplace sort filter](https://user-images.githubusercontent.com/43561537/155033709-e07a6306-a85a-4f7f-9624-b53ba5dd7fa9.gif) + +- VoIP Support for Omnichannel ([#23102](https://github.com/RocketChat/Rocket.Chat/pull/23102) by [@amolghode1981](https://github.com/amolghode1981)) + + - Created VoipService to manage VoIP connections and PBX connection + - Created LivechatVoipService that will handle custom cases for livechat (creating rooms, assigning chats to queue, actions when call is finished, etc) + - Created Basic interfaces to support new services and new model + - Created Endpoints for management interfaces + - Implemented asterisk connector on VoIP service + - Created UI components to show calls incoming and to allow answering/rejecting calls + - Added new settings to control call server/management server connection values + - Added endpoints to associate Omnichannel Agents with PBX Extensions + - Added support for event listening on server side, to get metadata about calls being received/ongoing + - Created new pages to update settings & to see user-extension association + - Created new page to see ongoing calls (and past calls) + - Added support for remote hangup/hold on calls + - Implemented call metrics calculation (hold time, waiting time, talk time) + - Show a notificaiton when call is received + +### 🚀 Improvements + + +- **ENTERPRISE:** Improve how micro services are loaded ([#24388](https://github.com/RocketChat/Rocket.Chat/pull/24388)) + +- Add return button in chats opened from the list of current chats ([#24458](https://github.com/RocketChat/Rocket.Chat/pull/24458) by [@LucasFASouza](https://github.com/LucasFASouza)) + + The new return button for Omnichannel chats came out with release 3.15 but the feature was only available for chats that were opened from Omnichannel Contact Center. + Now, the same UI/UX is supported for chats opened from Current Chats list. + + ![image](https://user-images.githubusercontent.com/32396925/153283190-bd5c9748-c36b-4874-a704-6043afc7e3a1.png) + + The chat now opens in the Omnichannel settings and has the return button so the user can go back to the Current Chats list. + + ![image](https://user-images.githubusercontent.com/32396925/153285591-fad8e4a0-d2ea-4a02-8b2a-15e383b3c876.png) + +- Add tooltips on action buttons of Canned Response message composer ([#24483](https://github.com/RocketChat/Rocket.Chat/pull/24483) by [@LucasFASouza](https://github.com/LucasFASouza)) + + The tooltips were missing on the action buttons of CR message composer. + + ![image](https://user-images.githubusercontent.com/32396925/153620327-91107245-4b47-4d39-a99a-6da6d1cf5734.png) + + Users can now feel more encouraged to use these actions knowing what they are supposed to do. + +- Add user to room on "Click to Join!" button press ([#24041](https://github.com/RocketChat/Rocket.Chat/pull/24041) by [@ostjen](https://github.com/ostjen)) + + - Add user to room on "Click to Join!" button press; + - Display the "Join" button in discussions inside channels (keeping the behavior consistent with discussions inside groups). + +- Added a new "All" tab which shows all integrations in Integrations ([#24109](https://github.com/RocketChat/Rocket.Chat/pull/24109) by [@aswinidev](https://github.com/aswinidev)) + +- ChatBox Text to File Description ([#24451](https://github.com/RocketChat/Rocket.Chat/pull/24451) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + The text content from chatbox goes to the file description when drag and drop a file. + +- Close modal on esc and outside click ([#24275](https://github.com/RocketChat/Rocket.Chat/pull/24275)) + + This is a QUICK change in order to close modals pressing Esc button and clicking outside of it **intentionally**. + +- CloudLoginModal visual consistency ([#24334](https://github.com/RocketChat/Rocket.Chat/pull/24334)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/151585064-dc6a1e29-9903-4241-8fbd-dfbe6c55fbef.png) + + ### after + ![Screen Shot 2022-01-28 at 13 32 02](https://user-images.githubusercontent.com/27704687/151585101-75b98502-9aae-4198-bc3e-4956750e5d8b.png) + +- Convert tag edit with department data to tsx ([#24369](https://github.com/RocketChat/Rocket.Chat/pull/24369) by [@LucasFASouza](https://github.com/LucasFASouza)) + +- Descriptive tooltip for Encrypted Key on Room Header ([#24121](https://github.com/RocketChat/Rocket.Chat/pull/24121)) + +- OTR system messages ([#24382](https://github.com/RocketChat/Rocket.Chat/pull/24382)) + + OTR system messages to indicate key refresh and joining chat to users. + +- Purchase Type Filter for marketplace apps and Categories filter anchor refactoring ([#24454](https://github.com/RocketChat/Rocket.Chat/pull/24454)) + + Implemented a filter by purchase type(free or paid) component for the apps screen of the marketplace. Besides that, new entries on the dictionary, fixed some parts of the App type (purchaseType was typed as unknown and price as string), and created some helpers to work alongside the filter. Will be refactoring the categories filter anchor and then will open this PR for reviews. + + Demo gif: + ![purchaseTypeFIlter](https://user-images.githubusercontent.com/43561537/153101228-7b7ebdc3-2d34-420f-aa9d-f7cbc8d4b53f.gif) + + Refactored the categories filter anchor from a plain fuselage select to a select button with dynamic colors. + Demo gif: + ![New categories filter anchor(PR)](https://user-images.githubusercontent.com/43561537/153422427-28012b7d-e0ec-45f4-861d-c9368c57ad04.gif) + +- Replace AutoComplete in UserAutoComplete & UserAutoCompleteMultiple components ([#24529](https://github.com/RocketChat/Rocket.Chat/pull/24529)) + + This PR replaces a deprecated fuselage's component `AutoComplete` in favor of `Select` and `MultiSelect` which fixes some of UX/UI issues in selecting users + + ### before + ![Screen Shot 2022-02-19 at 13 33 28](https://user-images.githubusercontent.com/27704687/154809737-8181a06c-4f20-48ea-90f7-01e828b9a452.png) + + ### after + ![Screen Shot 2022-02-19 at 13 30 58](https://user-images.githubusercontent.com/27704687/154809653-a8ec9a80-c0dd-4a25-9c00-0f96147d79e9.png) + +- Skip encryption for slash commands in E2E rooms ([#24475](https://github.com/RocketChat/Rocket.Chat/pull/24475)) + + Currently Slash Commands don't work in an E2EE room, as we encrypt the message before slash command is detected by the server, So removed encryption for slash commands in e2e rooms. + +- Team system messages feedback ([#24209](https://github.com/RocketChat/Rocket.Chat/pull/24209) by [@ostjen](https://github.com/ostjen)) + + - Delete some keys that aren't being used (eg: User_left_female). + - Add new Teams' system messages: + - `added-user-to-team`: **added** @\user to this Team; + - `removed-user-from-team`: **removed** @\user from this Team; + - `user-converted-to-team`: **converted** #\room to a Team; + - `user-converted-to-channel`: **converted** #\room to a Channel; + - `user-removed-room-from-team`: **removed** @\user from this Team; + - `user-deleted-room-from-team`: **deleted** #\room from this Team; + - `user-added-room-to-team`: **deleted** #\room to this Team; + - Add the corresponding options to hide each new system message and the missing `ujt` and `ult` hide options. + +### 🐛 Bug fixes + + +- 2FA via email when logging in using OAuth ([#24572](https://github.com/RocketChat/Rocket.Chat/pull/24572)) + +- Add ?close to OAuth callback url ([#24381](https://github.com/RocketChat/Rocket.Chat/pull/24381)) + +- GDPR action to forget visitor data on request ([#24441](https://github.com/RocketChat/Rocket.Chat/pull/24441)) + +- Implement client errors on ddp-streamer ([#24310](https://github.com/RocketChat/Rocket.Chat/pull/24310)) + +- Inconsistent validation of user's access to rooms ([#24037](https://github.com/RocketChat/Rocket.Chat/pull/24037) by [@ostjen](https://github.com/ostjen)) + +- Issues on selecting users when importing CSV ([#24253](https://github.com/RocketChat/Rocket.Chat/pull/24253)) + + * Fix users selecting by fixing their _id + * Add condition to disable 'Start importing' button if `usersCount`, `channelsCount` and `messageCount` equals 0, or if messageCount is alone + * Remove `disabled={usersCount === 0}` on user Tab + +- OAuth mismatch redirect_uri error ([#24450](https://github.com/RocketChat/Rocket.Chat/pull/24450)) + +- Oembed request not respecting payload limit ([#24418](https://github.com/RocketChat/Rocket.Chat/pull/24418)) + +- Omnichannel managers can't join chats in progress ([#24553](https://github.com/RocketChat/Rocket.Chat/pull/24553)) + +- Outgoing webhook without scripts not saving messages ([#24401](https://github.com/RocketChat/Rocket.Chat/pull/24401)) + +- Prevent Apps Bridge to remove visitor status from room ([#24305](https://github.com/RocketChat/Rocket.Chat/pull/24305)) + +- Read receipts showing first messages of the room as read even if not read by everyone ([#24508](https://github.com/RocketChat/Rocket.Chat/pull/24508)) + +- respect `Accounts_Registration_Users_Default_Roles` setting ([#24173](https://github.com/RocketChat/Rocket.Chat/pull/24173)) + + - Fix `user` role being added as default regardless of the `Accounts_Registration_Users_Default_Roles` setting. + +- Room context tabs not working in Omnichannel current chats page ([#24559](https://github.com/RocketChat/Rocket.Chat/pull/24559)) + +- Skip admin info in setup wizard for servers with admin registered ([#24485](https://github.com/RocketChat/Rocket.Chat/pull/24485)) + +- Skip cloud steps for registered servers on setup wizard ([#24407](https://github.com/RocketChat/Rocket.Chat/pull/24407)) + +- Slash commands previews not working ([#24387](https://github.com/RocketChat/Rocket.Chat/pull/24387) by [@ostjen](https://github.com/ostjen)) + +- Startup errors creating indexes ([#24409](https://github.com/RocketChat/Rocket.Chat/pull/24409)) + + Fix `bio` and `prid` startup index creation errors. + +- typo on register server tooltip of setup wizard ([#24466](https://github.com/RocketChat/Rocket.Chat/pull/24466)) + +
+🔍 Minor changes + + +- Bump @types/ws from 8.2.2 to 8.2.3 in /ee/server/services ([#24556](https://github.com/RocketChat/Rocket.Chat/pull/24556) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump adm-zip from 0.4.14 to 0.5.9 ([#24538](https://github.com/RocketChat/Rocket.Chat/pull/24538) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump body-parser from 1.19.0 to 1.19.1 in /ee/server/services ([#23963](https://github.com/RocketChat/Rocket.Chat/pull/23963) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump body-parser from 1.19.1 to 1.19.2 in /ee/server/services ([#24517](https://github.com/RocketChat/Rocket.Chat/pull/24517) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump cookie from 0.4.1 to 0.4.2 in /ee/server/services ([#24472](https://github.com/RocketChat/Rocket.Chat/pull/24472) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump date-fns from 2.24.0 to 2.28.0 ([#24058](https://github.com/RocketChat/Rocket.Chat/pull/24058) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump express from 4.17.1 to 4.17.2 in /ee/server/services ([#24469](https://github.com/RocketChat/Rocket.Chat/pull/24469) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump express from 4.17.2 to 4.17.3 in /ee/server/services ([#24522](https://github.com/RocketChat/Rocket.Chat/pull/24522) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump follow-redirects from 1.14.7 to 1.14.8 in /ee/server/services ([#24491](https://github.com/RocketChat/Rocket.Chat/pull/24491) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump jaeger-client from 3.18.1 to 3.19.0 in /ee/server/services ([#23961](https://github.com/RocketChat/Rocket.Chat/pull/23961) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pm2 from 5.1.2 to 5.2.0 in /ee/server/services ([#24537](https://github.com/RocketChat/Rocket.Chat/pull/24537) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump simple-get from 4.0.0 to 4.0.1 ([#24341](https://github.com/RocketChat/Rocket.Chat/pull/24341) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump sodium-native from 3.2.1 to 3.3.0 in /ee/server/services ([#23512](https://github.com/RocketChat/Rocket.Chat/pull/23512) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump underscore.string from 3.3.5 to 3.3.6 in /ee/server/services ([#24498](https://github.com/RocketChat/Rocket.Chat/pull/24498) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump url-parse from 1.5.3 to 1.5.7 ([#24528](https://github.com/RocketChat/Rocket.Chat/pull/24528) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump vm2 from 3.9.5 to 3.9.7 in /ee/server/services ([#24509](https://github.com/RocketChat/Rocket.Chat/pull/24509) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore: `twoFactorRequired` signature ([#24518](https://github.com/RocketChat/Rocket.Chat/pull/24518)) + + Improved type checking for decorator `twoFactorRequired`. + +- Chore: Add description to global OTR setting ([#24333](https://github.com/RocketChat/Rocket.Chat/pull/24333) by [@pedrogssouza](https://github.com/pedrogssouza)) + +- Chore: Bump Fuselage packages ([#24573](https://github.com/RocketChat/Rocket.Chat/pull/24573)) + + It uses the last stable version of Fuselage packages. + +- Chore: bump fuselage version ([#24453](https://github.com/RocketChat/Rocket.Chat/pull/24453)) + +- Chore: Convert JS files to Typescript ([#24410](https://github.com/RocketChat/Rocket.Chat/pull/24410)) + + This pull request converts 26 more files from Javascript to Typescript, to check variable types and increase validation on the code. + +- Chore: Convert to typescript the me slashCommands files ([#24321](https://github.com/RocketChat/Rocket.Chat/pull/24321) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert to typescript the me slashCommands files + +- Chore: Convert to typescript the mute and unmute slash commands files ([#24325](https://github.com/RocketChat/Rocket.Chat/pull/24325) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert to typescript the mute and unmute slash commands files + +- Chore: Convert to typescript the slash commands create files ([#24306](https://github.com/RocketChat/Rocket.Chat/pull/24306) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert Slash Commands create files to typescript. + +- Chore: Convert to typescript the slash commands invite files ([#24311](https://github.com/RocketChat/Rocket.Chat/pull/24311) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert to typescript the slash commands invite files + +- Chore: Convert to typescript the unarchive slash commands files ([#24331](https://github.com/RocketChat/Rocket.Chat/pull/24331) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert to typescript the unarchive slash commands files + +- Chore: Delete unused file (NewAdminInfoPage.js) ([#24196](https://github.com/RocketChat/Rocket.Chat/pull/24196)) + + Just removing a duplicated/unused file. + +- Chore: Improve PR title validation regex ([#24467](https://github.com/RocketChat/Rocket.Chat/pull/24467)) + +- Chore: Js to ts slash commands archive ([#24304](https://github.com/RocketChat/Rocket.Chat/pull/24304) by [@eduardofcabrera](https://github.com/eduardofcabrera)) + + Convert Slash Commands archive files to typescript + +- Chore: Remove storybook build job from CI ([#24530](https://github.com/RocketChat/Rocket.Chat/pull/24530)) + +- Chore: roomTypes: Stop mixing client and server code together ([#24536](https://github.com/RocketChat/Rocket.Chat/pull/24536)) + +- Chore: Run tests using microservices deployment on CI ([#24513](https://github.com/RocketChat/Rocket.Chat/pull/24513)) + +- Chore: Set Docker image tag to latest only when really latest ([#24366](https://github.com/RocketChat/Rocket.Chat/pull/24366)) + +- Chore: Unify ILivechatAgent with ILivechatAgentRecord ([#24406](https://github.com/RocketChat/Rocket.Chat/pull/24406)) + +- Chore: Update Apps-Engine ([#24568](https://github.com/RocketChat/Rocket.Chat/pull/24568)) + +- Chore: Update Apps-Engine ([#24651](https://github.com/RocketChat/Rocket.Chat/pull/24651)) + +- Chore: Update fuselage deps to match monolith versions ([#24501](https://github.com/RocketChat/Rocket.Chat/pull/24501)) + +- Chore: Update Meteor to 2.5.6 ([#24461](https://github.com/RocketChat/Rocket.Chat/pull/24461)) + +- Chore: Update ws package ([#24477](https://github.com/RocketChat/Rocket.Chat/pull/24477)) + +- Chore(deps-dev): Bump ts-node from 10.0.0 to 10.5.0 in /ee/server/services ([#24435](https://github.com/RocketChat/Rocket.Chat/pull/24435) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore(deps): Bump node-fetch from 2.6.1 to 2.6.7 in /ee/server/services ([#24299](https://github.com/RocketChat/Rocket.Chat/pull/24299) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- i18n: Language update from LingoHub 🤖 on 2022-01-31Z ([#24357](https://github.com/RocketChat/Rocket.Chat/pull/24357)) + +- i18n: Language update from LingoHub 🤖 on 2022-02-07Z ([#24429](https://github.com/RocketChat/Rocket.Chat/pull/24429)) + +- i18n: Language update from LingoHub 🤖 on 2022-02-14Z ([#24493](https://github.com/RocketChat/Rocket.Chat/pull/24493)) + +- i18n: Language update from LingoHub 🤖 on 2022-02-21Z ([#24558](https://github.com/RocketChat/Rocket.Chat/pull/24558)) + +- Merge master into develop & Set version to 4.5.0-develop ([#24363](https://github.com/RocketChat/Rocket.Chat/pull/24363)) + +- Regression: Add support to namespace within micro services ([#24581](https://github.com/RocketChat/Rocket.Chat/pull/24581)) + +- Regression: Admin Sidebar colors inverted. ([#24609](https://github.com/RocketChat/Rocket.Chat/pull/24609)) + +- Regression: Bunch of settings fixes for VoIP ([#24594](https://github.com/RocketChat/Rocket.Chat/pull/24594)) + +- Regression: Do not show toast on incoming voip calls ([#24619](https://github.com/RocketChat/Rocket.Chat/pull/24619)) + +- Regression: Encode registration info as JWT when signing key is provided ([#24626](https://github.com/RocketChat/Rocket.Chat/pull/24626)) + +- Regression: Error setting user avatars and mentioning rooms on Slack Import ([#24585](https://github.com/RocketChat/Rocket.Chat/pull/24585)) + + - Fix `Mentioned room not found` error when importing rooms from Slack; + - Fix `Forbidden` error when setting avatars for users imported from Slack (on user import/creation); + - Fix incorrect message count on imported rooms; + - Fix missing username on messages imported from Slack; + +- Regression: Error when trying to load name of dm rooms for avatars and notifications ([#24583](https://github.com/RocketChat/Rocket.Chat/pull/24583)) + +- Regression: Extension List panel UI not aligned with designs ([#24645](https://github.com/RocketChat/Rocket.Chat/pull/24645)) + +- Regression: Fix double value on holdTime and empty msg on last message ([#24630](https://github.com/RocketChat/Rocket.Chat/pull/24630)) + +- Regression: Fix in-correct room status shown to agents ([#24592](https://github.com/RocketChat/Rocket.Chat/pull/24592)) + +- Regression: Fix incoming voip call ringtone is not ringing ([#24616](https://github.com/RocketChat/Rocket.Chat/pull/24616)) + +- Regression: Fix room not getting created due to null visitor status ([#24562](https://github.com/RocketChat/Rocket.Chat/pull/24562)) + +- Regression: Fix time fields and wrap up in Voip Room Contexual bar ([#24625](https://github.com/RocketChat/Rocket.Chat/pull/24625)) + +- Regression: Fix time format on Voip system messages ([#24603](https://github.com/RocketChat/Rocket.Chat/pull/24603)) + +- Regression: Fix translation for call started message ([#24615](https://github.com/RocketChat/Rocket.Chat/pull/24615)) + +- Regression: Fix wrong tab name for VoIP settings ([#24647](https://github.com/RocketChat/Rocket.Chat/pull/24647)) + +- Regression: Fixes in Voice Contextual Bar and Directory ([#24596](https://github.com/RocketChat/Rocket.Chat/pull/24596)) + +- Regression: If Asterisk suddenly goes down, server has no way to know. Causes server to get stuck. Needs restart ([#24624](https://github.com/RocketChat/Rocket.Chat/pull/24624) by [@amolghode1981](https://github.com/amolghode1981)) + +- Regression: Mark all rooms as read modal closing instantly. ([#24610](https://github.com/RocketChat/Rocket.Chat/pull/24610)) + +- Regression: No audio when call comes from Skype/IP phone ([#24602](https://github.com/RocketChat/Rocket.Chat/pull/24602) by [@amolghode1981](https://github.com/amolghode1981)) + + The audio was not rendered because of re-rendering of react element based on + queueCounter and roomInfo. queueCounter and roomInfo cause the dom to re-render when call gets accepted + because after accepting call, queueCounter changes or a room gets created. + The audio element gets recreated. But VoIP user probably holds the old one. + The behaviour is not predictable when such case happens. If everything gets cleanly setup, + even if the audio element goes headless, it still continues to play the remote audio. + But in other cases, it is unreferenced the one on dom has its srcObject as null. + This causes no audio. + + This fix provides a way to re-initialise the rendering elements in VoIP user + and calls this function on useEffect() if the re-render has happen. + +- Regression: Prevent button from losing state when rerendering ([#24648](https://github.com/RocketChat/Rocket.Chat/pull/24648)) + +- Regression: Prevent connect to asterisk when VoIP is disabled ([#24601](https://github.com/RocketChat/Rocket.Chat/pull/24601)) + +- Regression: Queue counter aggregator for incoming/hanged calls ([#24635](https://github.com/RocketChat/Rocket.Chat/pull/24635) by [@amolghode1981](https://github.com/amolghode1981)) + +- Regression: Refresh server connection when MI server settings change ([#24649](https://github.com/RocketChat/Rocket.Chat/pull/24649)) + +- Regression: Server crashing if Voip credentials are invalid ([#24646](https://github.com/RocketChat/Rocket.Chat/pull/24646)) + +- Regression: VoIP service button displayed when VoIP is disabled ([#24598](https://github.com/RocketChat/Rocket.Chat/pull/24598)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@LucasFASouza](https://github.com/LucasFASouza) +- [@amolghode1981](https://github.com/amolghode1981) +- [@aswinidev](https://github.com/aswinidev) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@eduardofcabrera](https://github.com/eduardofcabrera) +- [@ostjen](https://github.com/ostjen) +- [@pedrogssouza](https://github.com/pedrogssouza) +- [@ujorgeleite](https://github.com/ujorgeleite) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@albuquerquefabio](https://github.com/albuquerquefabio) +- [@d-gubert](https://github.com/d-gubert) +- [@debdutdeb](https://github.com/debdutdeb) +- [@dougfabris](https://github.com/dougfabris) +- [@felipe-rod123](https://github.com/felipe-rod123) +- [@filipemarins](https://github.com/filipemarins) +- [@gabriellsh](https://github.com/gabriellsh) +- [@ggazzo](https://github.com/ggazzo) +- [@guijun13](https://github.com/guijun13) +- [@juliajforesti](https://github.com/juliajforesti) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rique223](https://github.com/rique223) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@tiagoevanp](https://github.com/tiagoevanp) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 4.4.5 +`2022-05-30 · 12 🎉 · 26 🚀 · 79 🐛 · 213 🔍 · 54 👩‍💻👨‍💻` + +### Engine versions +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` + +### 🎉 New features + + +- Add expire index to integration history ([#25087](https://github.com/RocketChat/Rocket.Chat/pull/25087)) + +- Alpha Matrix Federation ([#23688](https://github.com/RocketChat/Rocket.Chat/pull/23688)) + + Experimental support for Matrix Federation with a Bridge + + https://user-images.githubusercontent.com/51996/164530391-e8b17ecd-a4d0-4ef8-a8b7-81230c1773d3.mp4 + +- E2E password generator ([#24114](https://github.com/RocketChat/Rocket.Chat/pull/24114) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + +- Engagement Statistics ([#24989](https://github.com/RocketChat/Rocket.Chat/pull/24989)) + +- Engagement Statistics ([#24777](https://github.com/RocketChat/Rocket.Chat/pull/24777) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + +- Expand Apps Engine's environment variable allowed list ([#23870](https://github.com/RocketChat/Rocket.Chat/pull/23870) by [@cuonghuunguyen](https://github.com/cuonghuunguyen)) + +- Marketplace sort filter ([#24567](https://github.com/RocketChat/Rocket.Chat/pull/24567) by [@ujorgeleite](https://github.com/ujorgeleite)) + + Implemented a sort filter for the marketplace screen. This component sorts the marketplace apps list in 4 ways, alphabetical order(A-Z), inverse alphabetical order(Z-A), most recently updated(MRU), and least recent updated(LRU). Besides that, I've generalized some components and types to increase code reusability, renamed some helpers as well as deleted some useless ones, and inserted the necessary new translations on the English i18n dictionary. + Demo gif: + ![Marketplace sort filter](https://user-images.githubusercontent.com/43561537/155033709-e07a6306-a85a-4f7f-9624-b53ba5dd7fa9.gif) + +- Message Template React Component ([#23971](https://github.com/RocketChat/Rocket.Chat/pull/23971)) + + Complete rewrite of the messages component in react. Visual changes should be minimal as well as user impact, with no break changes (unless you've customized the blaze template). + + + + ![Screen Shot 2022-04-05 at 11 14 18](https://user-images.githubusercontent.com/27704687/161774027-38dd9c7b-eeeb-45e2-b9d8-ea2a9be8486d.png) + In case you encounter any problems, or want to compare, temporarily it is possible to use the old version + + image + +- Telemetry Events ([#24781](https://github.com/RocketChat/Rocket.Chat/pull/24781) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + +- Upgrade Tab ([#24835](https://github.com/RocketChat/Rocket.Chat/pull/24835)) + + ![image](https://user-images.githubusercontent.com/27704687/160172260-c656282e-a487-4092-948d-d11c9bacb598.png) + +- Use setting to determine if initial general channel is needed ([#25441](https://github.com/RocketChat/Rocket.Chat/pull/25441) by [@felipe-menelau](https://github.com/felipe-menelau)) + + - Adds flag responsible for overwriting #general channel creation + +- VoIP Support for Omnichannel ([#23102](https://github.com/RocketChat/Rocket.Chat/pull/23102) by [@amolghode1981](https://github.com/amolghode1981)) + + - Created VoipService to manage VoIP connections and PBX connection + - Created LivechatVoipService that will handle custom cases for livechat (creating rooms, assigning chats to queue, actions when call is finished, etc) + - Created Basic interfaces to support new services and new model + - Created Endpoints for management interfaces + - Implemented asterisk connector on VoIP service + - Created UI components to show calls incoming and to allow answering/rejecting calls + - Added new settings to control call server/management server connection values + - Added endpoints to associate Omnichannel Agents with PBX Extensions + - Added support for event listening on server side, to get metadata about calls being received/ongoing + - Created new pages to update settings & to see user-extension association + - Created new page to see ongoing calls (and past calls) + - Added support for remote hangup/hold on calls + - Implemented call metrics calculation (hold time, waiting time, talk time) + - Show a notificaiton when call is received + +### 🚀 Improvements + + +- **ENTERPRISE:** Don't start presence monitor when running micro services ([#24739](https://github.com/RocketChat/Rocket.Chat/pull/24739)) + +- **ENTERPRISE:** Improve how micro services are loaded ([#24388](https://github.com/RocketChat/Rocket.Chat/pull/24388)) + +- Add OTR Room States ([#24565](https://github.com/RocketChat/Rocket.Chat/pull/24565)) + + Earlier OTR room uses only 2 states, we need more states to support future features. + This adds more states for the OTR contextualBar. + + - Expired + Screen Shot 2022-04-20 at 13 55 52 + + - Declined + Screen Shot 2022-04-20 at 13 49 28 + + - Error + Screen Shot 2022-04-20 at 13 55 26 + +- Add return button in chats opened from the list of current chats ([#24458](https://github.com/RocketChat/Rocket.Chat/pull/24458) by [@LucasFASouza](https://github.com/LucasFASouza)) + + The new return button for Omnichannel chats came out with release 3.15 but the feature was only available for chats that were opened from Omnichannel Contact Center. + Now, the same UI/UX is supported for chats opened from Current Chats list. + + ![image](https://user-images.githubusercontent.com/32396925/153283190-bd5c9748-c36b-4874-a704-6043afc7e3a1.png) + + The chat now opens in the Omnichannel settings and has the return button so the user can go back to the Current Chats list. + + ![image](https://user-images.githubusercontent.com/32396925/153285591-fad8e4a0-d2ea-4a02-8b2a-15e383b3c876.png) + +- Add tooltip to sidebar room menu ([#24405](https://github.com/RocketChat/Rocket.Chat/pull/24405) by [@Himanshu664](https://github.com/Himanshu664)) + +- Add tooltips on action buttons of Canned Response message composer ([#24483](https://github.com/RocketChat/Rocket.Chat/pull/24483) by [@LucasFASouza](https://github.com/LucasFASouza)) + + The tooltips were missing on the action buttons of CR message composer. + + ![image](https://user-images.githubusercontent.com/32396925/153620327-91107245-4b47-4d39-a99a-6da6d1cf5734.png) + + Users can now feel more encouraged to use these actions knowing what they are supposed to do. + +- Add user to room on "Click to Join!" button press ([#24041](https://github.com/RocketChat/Rocket.Chat/pull/24041) by [@ostjen](https://github.com/ostjen)) + + - Add user to room on "Click to Join!" button press; + - Display the "Join" button in discussions inside channels (keeping the behavior consistent with discussions inside groups). + +- Added a new "All" tab which shows all integrations in Integrations ([#24109](https://github.com/RocketChat/Rocket.Chat/pull/24109) by [@aswinidev](https://github.com/aswinidev)) + +- Added MaxNickNameLength and MaxBioLength constants ([#25231](https://github.com/RocketChat/Rocket.Chat/pull/25231) by [@aakash-gitdev](https://github.com/aakash-gitdev)) + +- Added tooltip options for message menu ([#24431](https://github.com/RocketChat/Rocket.Chat/pull/24431) by [@Himanshu664](https://github.com/Himanshu664)) + +- Adding new statistics related to voip and omnichannel ([#24887](https://github.com/RocketChat/Rocket.Chat/pull/24887)) + + - Total of Canned response messages sent + - Total of tags used + - Last-Chatted Agent Preferred (enabled/disabled) + - Assign new conversations to the contact manager (enabled/disabled) + - How to handle Visitor Abandonment setting + - Amount of chats placed on hold + - VoIP Enabled + - Amount of VoIP Calls + - Amount of VoIP Extensions connected + - Amount of Calls placed on hold (1x per call) + - Fixed Session Aggregation type definitions + +- ChatBox Text to File Description ([#24451](https://github.com/RocketChat/Rocket.Chat/pull/24451) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + The text content from chatbox goes to the file description when drag and drop a file. + +- Close modal on esc and outside click ([#24275](https://github.com/RocketChat/Rocket.Chat/pull/24275)) + + This is a QUICK change in order to close modals pressing Esc button and clicking outside of it **intentionally**. + +- CloudLoginModal visual consistency ([#24334](https://github.com/RocketChat/Rocket.Chat/pull/24334)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/151585064-dc6a1e29-9903-4241-8fbd-dfbe6c55fbef.png) + + ### after + ![Screen Shot 2022-01-28 at 13 32 02](https://user-images.githubusercontent.com/27704687/151585101-75b98502-9aae-4198-bc3e-4956750e5d8b.png) + +- Convert tag edit with department data to tsx ([#24369](https://github.com/RocketChat/Rocket.Chat/pull/24369) by [@LucasFASouza](https://github.com/LucasFASouza)) + +- Descriptive tooltip for Encrypted Key on Room Header ([#24121](https://github.com/RocketChat/Rocket.Chat/pull/24121)) + +- Improve active/hover colors in account sidebar ([#25024](https://github.com/RocketChat/Rocket.Chat/pull/25024) by [@Himanshu664](https://github.com/Himanshu664)) + +- New omnichannel statistics and async statistics processing. ([#24749](https://github.com/RocketChat/Rocket.Chat/pull/24749)) + + https://app.clickup.com/t/1z4zg4e + +- OTR system messages ([#24382](https://github.com/RocketChat/Rocket.Chat/pull/24382)) + + OTR system messages to indicate key refresh and joining chat to users. + +- Performance for some Omnichannel features ([#25217](https://github.com/RocketChat/Rocket.Chat/pull/25217)) + +- Purchase Type Filter for marketplace apps and Categories filter anchor refactoring ([#24454](https://github.com/RocketChat/Rocket.Chat/pull/24454)) + + Implemented a filter by purchase type(free or paid) component for the apps screen of the marketplace. Besides that, new entries on the dictionary, fixed some parts of the App type (purchaseType was typed as unknown and price as string), and created some helpers to work alongside the filter. Will be refactoring the categories filter anchor and then will open this PR for reviews. + + Demo gif: + ![purchaseTypeFIlter](https://user-images.githubusercontent.com/43561537/153101228-7b7ebdc3-2d34-420f-aa9d-f7cbc8d4b53f.gif) + + Refactored the categories filter anchor from a plain fuselage select to a select button with dynamic colors. + Demo gif: + ![New categories filter anchor(PR)](https://user-images.githubusercontent.com/43561537/153422427-28012b7d-e0ec-45f4-861d-c9368c57ad04.gif) + +- Rename upgrade tab routes ([#25097](https://github.com/RocketChat/Rocket.Chat/pull/25097)) + + Change 'upgrade tab' routes names from camelCase ('goFullyFeatured') to kebab-case ('go-fully-featured') due to URL naming consistency. Changed types, main function and test. + +- Replace AutoComplete in UserAutoComplete & UserAutoCompleteMultiple components ([#24529](https://github.com/RocketChat/Rocket.Chat/pull/24529)) + + This PR replaces a deprecated fuselage's component `AutoComplete` in favor of `Select` and `MultiSelect` which fixes some of UX/UI issues in selecting users + + ### before + ![Screen Shot 2022-02-19 at 13 33 28](https://user-images.githubusercontent.com/27704687/154809737-8181a06c-4f20-48ea-90f7-01e828b9a452.png) + + ### after + ![Screen Shot 2022-02-19 at 13 30 58](https://user-images.githubusercontent.com/27704687/154809653-a8ec9a80-c0dd-4a25-9c00-0f96147d79e9.png) + +- Skip encryption for slash commands in E2E rooms ([#24475](https://github.com/RocketChat/Rocket.Chat/pull/24475)) + + Currently Slash Commands don't work in an E2EE room, as we encrypt the message before slash command is detected by the server, So removed encryption for slash commands in e2e rooms. + +- Team system messages feedback ([#24209](https://github.com/RocketChat/Rocket.Chat/pull/24209) by [@ostjen](https://github.com/ostjen)) + + - Delete some keys that aren't being used (eg: User_left_female). + - Add new Teams' system messages: + - `added-user-to-team`: **added** @\user to this Team; + - `removed-user-from-team`: **removed** @\user from this Team; + - `user-converted-to-team`: **converted** #\room to a Team; + - `user-converted-to-channel`: **converted** #\room to a Channel; + - `user-removed-room-from-team`: **removed** @\user from this Team; + - `user-deleted-room-from-team`: **deleted** #\room from this Team; + - `user-added-room-to-team`: **deleted** #\room to this Team; + - Add the corresponding options to hide each new system message and the missing `ujt` and `ult` hide options. + +- Updated links in readme ([#24028](https://github.com/RocketChat/Rocket.Chat/pull/24028) by [@aswinidev](https://github.com/aswinidev)) + +### 🐛 Bug fixes + + +- "Match error" when converting a team to a channel ([#24629](https://github.com/RocketChat/Rocket.Chat/pull/24629)) + + - Fix "Match error" when trying to convert a channel to a team; + +- **ENTERPRISE:** Auto reload feature of ddp-streamer micro service ([#24793](https://github.com/RocketChat/Rocket.Chat/pull/24793)) + +- **ENTERPRISE:** DDP streamer not sending data to all clients ([#24738](https://github.com/RocketChat/Rocket.Chat/pull/24738)) + +- **ENTERPRISE:** Notifications not being sent by ddp-streamer ([#24831](https://github.com/RocketChat/Rocket.Chat/pull/24831)) + +- **ENTERPRISE:** Presence micro service logic ([#24724](https://github.com/RocketChat/Rocket.Chat/pull/24724)) + +- 2FA via email when logging in using OAuth ([#24572](https://github.com/RocketChat/Rocket.Chat/pull/24572)) + +- Add ?close to OAuth callback url ([#24381](https://github.com/RocketChat/Rocket.Chat/pull/24381)) + +- Add katex render to new message react template ([#25239](https://github.com/RocketChat/Rocket.Chat/pull/25239)) + +- Add reaction not working in legacy messages ([#25222](https://github.com/RocketChat/Rocket.Chat/pull/25222)) + +- Added invalid password error message ([#24714](https://github.com/RocketChat/Rocket.Chat/pull/24714) by [@Himanshu664](https://github.com/Himanshu664)) + +- Adjust email label in Setup Wizard i18n files ([#25260](https://github.com/RocketChat/Rocket.Chat/pull/25260)) + + - remove 'Company' label on onboarding email keys in certain languages + +- AgentOverview analytics wrong departmentId parameter ([#25073](https://github.com/RocketChat/Rocket.Chat/pull/25073) by [@paulobernardoaf](https://github.com/paulobernardoaf)) + + When filtering the analytics charts by department, data would not appear because the object: + ```js + { + value: "department-id", + label: "department-name" + } + ``` + was being used in the `departmentId` parameter. + + - Before: + ![image](https://user-images.githubusercontent.com/30026625/161832057-d96ffd21-a7dd-421e-bfaa-3b9f4a9127b2.png) + + - After: + ![image](https://user-images.githubusercontent.com/30026625/161831092-9ee77b51-b083-4f45-9c48-ab2e0511c4d6.png) + +- API Error preventing adding an email to users without one (like bot/app users) ([#24709](https://github.com/RocketChat/Rocket.Chat/pull/24709)) + +- Apple OAuth ([#24879](https://github.com/RocketChat/Rocket.Chat/pull/24879)) + +- auto-join team channels not honoring user preferences ([#24779](https://github.com/RocketChat/Rocket.Chat/pull/24779) by [@ostjen](https://github.com/ostjen)) + +- Client disconnection on network loss ([#25170](https://github.com/RocketChat/Rocket.Chat/pull/25170) by [@amolghode1981](https://github.com/amolghode1981)) + + Agent gets disconnected (or Unregistered) from asterisk in multiple ways. The goal is that agent should remain online + unless agent explicitly logs off. + Agent can stop receiving calls in multiple ways due to network loss. Network loss can happen in following ways. + 1. User tries to switch the network. User experiences a glitch of disconnectivity. This can be simulated by turning the network off + in the network tab of chrome's dev tool. This can disconnect the UA if the disconnection happens just before the registration refresh. + 2. Second reason is when computer goes in sleep mode. + 3. Third reason is that when asterisk is crashed/in maintenance mode/explicitly stopped. + + Solution: + The idea is to detect the network disconnection and start the start the attempts to reconnect. + The detection of the disconnection does not happen in case#1. The SIPUA's UserAgent transport does not + call onDisconnected when network loss of such kind happens. To tackle this problem, window's online and offline event handlers are + used. + + The number of retries is configurable but ideally it is to be kept at -1. Whenever disconnection happens, it should keep on trying to + reconnect with increasing backoff time. This behaviour is useful when the asterisk is stopped. + + When the server is disconnected, it should be indicated on the phone button. + +- Close room when dismiss wrap up call modal ([#25056](https://github.com/RocketChat/Rocket.Chat/pull/25056)) + +- Custom sound error toast messages ([#24515](https://github.com/RocketChat/Rocket.Chat/pull/24515) by [@Himanshu664](https://github.com/Himanshu664)) + +- Database indexes not being created ([#25101](https://github.com/RocketChat/Rocket.Chat/pull/25101)) + +- Date Message Export Filter Fix ([#24542](https://github.com/RocketChat/Rocket.Chat/pull/24542) by [@eduardofcabrera](https://github.com/eduardofcabrera)) + + Fix message export filter to get all messages between "from date" and "to date", including "to date". + +- DDP Rate Limiter Translation key ([#24898](https://github.com/RocketChat/Rocket.Chat/pull/24898)) + + Before: + image + + + Now: + image + +- DDP streamer errors ([#24710](https://github.com/RocketChat/Rocket.Chat/pull/24710)) + +- Duplicated "jump to message" button on starred messages ([#24867](https://github.com/RocketChat/Rocket.Chat/pull/24867) by [@Himanshu664](https://github.com/Himanshu664)) + +- Dynamic load matrix is enabled and handle failure ([#25495](https://github.com/RocketChat/Rocket.Chat/pull/25495)) + +- End call button disappearing when on-hold ([#24936](https://github.com/RocketChat/Rocket.Chat/pull/24936)) + +- External search providers not working ([#24860](https://github.com/RocketChat/Rocket.Chat/pull/24860) by [@tkurz](https://github.com/tkurz)) + +- Full error message is visible ([#24856](https://github.com/RocketChat/Rocket.Chat/pull/24856) by [@Himanshu664](https://github.com/Himanshu664)) + +- GDPR action to forget visitor data on request ([#24441](https://github.com/RocketChat/Rocket.Chat/pull/24441)) + +- German translation for Monitore ([#24785](https://github.com/RocketChat/Rocket.Chat/pull/24785) by [@JMoVS](https://github.com/JMoVS)) + +- Handle Other Formats inside Upload Avatar ([#24226](https://github.com/RocketChat/Rocket.Chat/pull/24226)) + + After resolving issue #24213 : + + + https://user-images.githubusercontent.com/53515714/150325012-91413025-786e-4ce0-ae75-629f6b05b024.mp4 + +- Ignore customClass on messages ([#24845](https://github.com/RocketChat/Rocket.Chat/pull/24845)) + +- Implement client errors on ddp-streamer ([#24310](https://github.com/RocketChat/Rocket.Chat/pull/24310)) + +- Inconsistent validation of user's access to rooms ([#24037](https://github.com/RocketChat/Rocket.Chat/pull/24037) by [@ostjen](https://github.com/ostjen)) + +- Incorrect websocket url in livechat widget ([#25261](https://github.com/RocketChat/Rocket.Chat/pull/25261)) + +- Initial User not added to default channel ([#25544](https://github.com/RocketChat/Rocket.Chat/pull/25544)) + + If injecting initial user. The user wasn’t added to the default General channel + +- Issues on selecting users when importing CSV ([#24253](https://github.com/RocketChat/Rocket.Chat/pull/24253)) + + * Fix users selecting by fixing their _id + * Add condition to disable 'Start importing' button if `usersCount`, `channelsCount` and `messageCount` equals 0, or if messageCount is alone + * Remove `disabled={usersCount === 0}` on user Tab + +- LDAP avatars being rotated according to metadata even if the setting to rotate uploads is off ([#24320](https://github.com/RocketChat/Rocket.Chat/pull/24320)) + + - Use the `FileUpload_RotateImages` setting (**Administration > File Upload > Rotate images on upload**) to control whether avatars should be rotated automatically based on their data (XEIF); + - Display the avatar image preview (orientation) according to the `FileUpload_RotateImages` setting. + +- LDAP sync removing users from channels when multiple groups are mapped to it ([#25434](https://github.com/RocketChat/Rocket.Chat/pull/25434)) + +- Message menu action not working on legacy messages. ([#25148](https://github.com/RocketChat/Rocket.Chat/pull/25148)) + +- Message preview not available for queued chats ([#25092](https://github.com/RocketChat/Rocket.Chat/pull/25092)) + +- Missing dependency on useEffect at CallProvider ([#24882](https://github.com/RocketChat/Rocket.Chat/pull/24882)) + +- Nextcloud OAuth for incomplete token URL ([#24476](https://github.com/RocketChat/Rocket.Chat/pull/24476)) + +- OAuth mismatch redirect_uri error ([#24450](https://github.com/RocketChat/Rocket.Chat/pull/24450)) + +- Oembed request not respecting payload limit ([#24418](https://github.com/RocketChat/Rocket.Chat/pull/24418)) + +- Omnichannel managers can't join chats in progress ([#24553](https://github.com/RocketChat/Rocket.Chat/pull/24553)) + +- One of the triggers was not working correctly ([#25409](https://github.com/RocketChat/Rocket.Chat/pull/25409)) + +- Outgoing webhook without scripts not saving messages ([#24401](https://github.com/RocketChat/Rocket.Chat/pull/24401)) + +- Prevent Apps Bridge to remove visitor status from room ([#24305](https://github.com/RocketChat/Rocket.Chat/pull/24305)) + +- Prevent call button toggle when user is on call ([#24758](https://github.com/RocketChat/Rocket.Chat/pull/24758)) + +- Prevent sequential messages edited icon to hide on hover ([#24984](https://github.com/RocketChat/Rocket.Chat/pull/24984)) + + ### before + Screen Shot 2022-03-29 at 13 35 56 + + ### after + Screen Shot 2022-03-29 at 11 48 05 + +- Prune Message issue ([#24424](https://github.com/RocketChat/Rocket.Chat/pull/24424)) + +- Push privacy config to not show username not being respected ([#24606](https://github.com/RocketChat/Rocket.Chat/pull/24606)) + +- Read receipts show with color gray when not read yet ([#25244](https://github.com/RocketChat/Rocket.Chat/pull/25244)) + +- Read receipts showing before message read ([#25216](https://github.com/RocketChat/Rocket.Chat/pull/25216)) + +- Read receipts showing first messages of the room as read even if not read by everyone ([#24508](https://github.com/RocketChat/Rocket.Chat/pull/24508)) + +- Register with Secret URL ([#24921](https://github.com/RocketChat/Rocket.Chat/pull/24921)) + +- Replace encrypted text to Encrypted Message Placeholder ([#24166](https://github.com/RocketChat/Rocket.Chat/pull/24166)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/150807900-154a9cdb-ee13-4333-8628-f287ab914b40.png) + + ### after + Screenshot 2022-01-13 at 8 57 47 PM + +- Reply button behavior on broadcast channel ([#25175](https://github.com/RocketChat/Rocket.Chat/pull/25175)) + + Hide reply button for the user that sent the message + +- respect `Accounts_Registration_Users_Default_Roles` setting ([#24173](https://github.com/RocketChat/Rocket.Chat/pull/24173)) + + - Fix `user` role being added as default regardless of the `Accounts_Registration_Users_Default_Roles` setting. + +- Room archived/unarchived system messages aren't sent when editing room settings ([#24897](https://github.com/RocketChat/Rocket.Chat/pull/24897)) + + - Send the "Room archived" and "Room unarchived" system messages when editing room settings (and not only when rooms are archived/unarchived with the slash-command); + - Fix the "Hide System Messages" option for the "Room archived" and "Room unarchived" system messages; + +- Room context tabs not working in Omnichannel current chats page ([#24559](https://github.com/RocketChat/Rocket.Chat/pull/24559)) + +- room creation fails if app framework is disabled ([#25200](https://github.com/RocketChat/Rocket.Chat/pull/25200)) + +- Security Hotfix (https://docs.rocket.chat/guides/security/security-updates) + +- Several issues related to custom roles ([#24052](https://github.com/RocketChat/Rocket.Chat/pull/24052)) + + - Throw an error when trying to delete a role (User or Subscription role) that are still being used; + - Fix "Invalid Role" error for custom roles in Role Editing sidebar; + - Fix "Users in Role" screen for custom roles. + +- Showing Blank Message Inside Report ([#25007](https://github.com/RocketChat/Rocket.Chat/pull/25007)) + + https://user-images.githubusercontent.com/53515714/161038085-4a86c7ae-6751-4996-9767-b1c9e0331a6c.mp4 + +- Skip admin info in setup wizard for servers with admin registered ([#24485](https://github.com/RocketChat/Rocket.Chat/pull/24485)) + +- Skip cloud steps for registered servers on setup wizard ([#24407](https://github.com/RocketChat/Rocket.Chat/pull/24407)) + +- Slash commands previews not working ([#24387](https://github.com/RocketChat/Rocket.Chat/pull/24387) by [@ostjen](https://github.com/ostjen)) + +- Spotlight results showing usernames instead of real names ([#25471](https://github.com/RocketChat/Rocket.Chat/pull/25471)) + +- Startup errors creating indexes ([#24409](https://github.com/RocketChat/Rocket.Chat/pull/24409)) + + Fix `bio` and `prid` startup index creation errors. + +- Toolbox hiding under contextual bar ([#25237](https://github.com/RocketChat/Rocket.Chat/pull/25237)) + +- typo on register server tooltip of setup wizard ([#24466](https://github.com/RocketChat/Rocket.Chat/pull/24466)) + +- UI/UX issues on Live Chat widget ([#25407](https://github.com/RocketChat/Rocket.Chat/pull/25407)) + +- Use correct room property for call ended at ([#24932](https://github.com/RocketChat/Rocket.Chat/pull/24932)) + +- User abandonment setting was not working doe to failing event hook ([#25520](https://github.com/RocketChat/Rocket.Chat/pull/25520)) + + A setting watcher and the query for grabbing abandoned chats were broken, now they're not. + +- UserCard sanitization ([#25089](https://github.com/RocketChat/Rocket.Chat/pull/25089)) + + - Rewrites the component to TS + - Fixes some visual issues + + ### before + ![Screen Shot 2022-04-07 at 00 23 11](https://user-images.githubusercontent.com/27704687/162113925-5c9484d1-23e9-4623-8b86-3fbc71b461a1.png) + + ### after + ![Screen Shot 2022-04-07 at 00 07 13](https://user-images.githubusercontent.com/27704687/162112353-afd6aac6-b27c-4470-a642-631b8080d59e.png) + +- Video and Audio not skipping forward ([#19866](https://github.com/RocketChat/Rocket.Chat/pull/19866)) + +- VoIP disabled/enabled sequence puts voip agent in error state ([#25230](https://github.com/RocketChat/Rocket.Chat/pull/25230) by [@amolghode1981](https://github.com/amolghode1981)) + + Initially it was thought that the issue occurs because of the race condition while changing the client settings vs those settings reflected on server side. So a natural solution to solve this is to wait for setting change event 'private-settings-changed'. Then if 'VoIP_Enabled' is updated and it is true, set voipEnabled to true in useVoipClient.ts (on client side) + + It was realised that the race does not happen because of the database or server noticing the changes late. But because of the time taken to establish the AMI connection with Asterisk. + + Solution: + + 1. Change apps/meteor/app/voip/server/startup.ts. When VoIP_Enabled is changed, await for Voip.init() to complete and then broadcast connector.statuschanged with changed value. + 2. From apps/meteor/server/modules/listeners/listeners.module.ts use notifyLoggedInThisInstance to notify all logged in users on current instance. + 3. in apps/meteor/client/providers/CallProvider/hooks/useVoipClient.ts add the event handler that receives this event. Change voipEnabled from constant to state. Change this state based on the 'value' that is received by the handler. + +- Wrong business hour behavior ([#24896](https://github.com/RocketChat/Rocket.Chat/pull/24896)) + +
+🔍 Minor changes + + +- Bump @rocket.chat/emitter from 0.31.4 to 0.31.9 in /ee/server/services ([#25021](https://github.com/RocketChat/Rocket.Chat/pull/25021) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @rocket.chat/message-parser from 0.31.4 to 0.31.9 in /ee/server/services ([#25019](https://github.com/RocketChat/Rocket.Chat/pull/25019) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @rocket.chat/string-helpers from 0.31.4 to 0.31.9 in /ee/server/services ([#25018](https://github.com/RocketChat/Rocket.Chat/pull/25018) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @rocket.chat/ui-kit from 0.31.4 to 0.31.9 in /ee/server/services ([#25020](https://github.com/RocketChat/Rocket.Chat/pull/25020) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/clipboard from 2.0.1 to 2.0.7 ([#24832](https://github.com/RocketChat/Rocket.Chat/pull/24832) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/mailparser from 3.0.2 to 3.4.0 ([#24833](https://github.com/RocketChat/Rocket.Chat/pull/24833) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/nodemailer from 6.4.2 to 6.4.4 ([#24822](https://github.com/RocketChat/Rocket.Chat/pull/24822) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/ws from 8.2.2 to 8.2.3 in /ee/server/services ([#24556](https://github.com/RocketChat/Rocket.Chat/pull/24556) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/ws from 8.2.3 to 8.5.2 in /ee/server/services ([#24666](https://github.com/RocketChat/Rocket.Chat/pull/24666) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/ws from 8.5.2 to 8.5.3 in /ee/server/services ([#24820](https://github.com/RocketChat/Rocket.Chat/pull/24820) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump actions/checkout from 2 to 3 ([#24668](https://github.com/RocketChat/Rocket.Chat/pull/24668) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump actions/setup-node from 2 to 3 ([#24642](https://github.com/RocketChat/Rocket.Chat/pull/24642) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump adm-zip from 0.4.14 to 0.5.9 ([#24538](https://github.com/RocketChat/Rocket.Chat/pull/24538) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump body-parser from 1.19.0 to 1.19.1 in /ee/server/services ([#23963](https://github.com/RocketChat/Rocket.Chat/pull/23963) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump body-parser from 1.19.0 to 1.19.2 ([#24821](https://github.com/RocketChat/Rocket.Chat/pull/24821) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump body-parser from 1.19.1 to 1.19.2 in /ee/server/services ([#24517](https://github.com/RocketChat/Rocket.Chat/pull/24517) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump body-parser from 1.19.2 to 1.20.0 in /ee/server/services ([#25042](https://github.com/RocketChat/Rocket.Chat/pull/25042) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump cookie from 0.4.1 to 0.4.2 in /ee/server/services ([#24472](https://github.com/RocketChat/Rocket.Chat/pull/24472) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump date-fns from 2.24.0 to 2.28.0 ([#24058](https://github.com/RocketChat/Rocket.Chat/pull/24058) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump ejson from 2.2.1 to 2.2.2 ([#25057](https://github.com/RocketChat/Rocket.Chat/pull/25057) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump eslint-plugin-anti-trojan-source from 1.0.6 to 1.1.0 ([#25076](https://github.com/RocketChat/Rocket.Chat/pull/25076) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump express from 4.17.1 to 4.17.2 in /ee/server/services ([#24469](https://github.com/RocketChat/Rocket.Chat/pull/24469) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump express from 4.17.2 to 4.17.3 in /ee/server/services ([#24522](https://github.com/RocketChat/Rocket.Chat/pull/24522) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump follow-redirects from 1.14.7 to 1.14.8 in /ee/server/services ([#24491](https://github.com/RocketChat/Rocket.Chat/pull/24491) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump is-svg from 4.3.1 to 4.3.2 ([#24801](https://github.com/RocketChat/Rocket.Chat/pull/24801) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump jaeger-client from 3.18.1 to 3.19.0 in /ee/server/services ([#23961](https://github.com/RocketChat/Rocket.Chat/pull/23961) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump jschardet from 1.6.0 to 3.0.0 ([#23121](https://github.com/RocketChat/Rocket.Chat/pull/23121) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump minimist from 1.2.5 to 1.2.6 in /ee/server/services ([#24991](https://github.com/RocketChat/Rocket.Chat/pull/24991) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino and pino-pretty ([#25052](https://github.com/RocketChat/Rocket.Chat/pull/25052)) + +- Bump pino from 7.8.0 to 7.8.1 in /ee/server/services ([#24783](https://github.com/RocketChat/Rocket.Chat/pull/24783) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino from 7.8.1 to 7.9.1 in /ee/server/services ([#24869](https://github.com/RocketChat/Rocket.Chat/pull/24869) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino-pretty from 7.5.1 to 7.5.2 in /ee/server/services ([#24689](https://github.com/RocketChat/Rocket.Chat/pull/24689) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino-pretty from 7.5.2 to 7.5.3 in /ee/server/services ([#24698](https://github.com/RocketChat/Rocket.Chat/pull/24698) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino-pretty from 7.5.3 to 7.5.4 in /ee/server/services ([#24870](https://github.com/RocketChat/Rocket.Chat/pull/24870) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pm2 from 5.1.2 to 5.2.0 in /ee/server/services ([#24537](https://github.com/RocketChat/Rocket.Chat/pull/24537) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump prometheus-gc-stats from 0.6.2 to 0.6.3 ([#24803](https://github.com/RocketChat/Rocket.Chat/pull/24803) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump simple-get from 4.0.0 to 4.0.1 ([#24341](https://github.com/RocketChat/Rocket.Chat/pull/24341) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump sodium-native from 3.2.1 to 3.3.0 in /ee/server/services ([#23512](https://github.com/RocketChat/Rocket.Chat/pull/23512) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump template-file from 6.0.0 to 6.0.1 ([#25002](https://github.com/RocketChat/Rocket.Chat/pull/25002) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump ts-node from 10.5.0 to 10.6.0 in /ee/server/services ([#24667](https://github.com/RocketChat/Rocket.Chat/pull/24667) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump ts-node from 10.6.0 to 10.7.0 in /ee/server/services ([#24716](https://github.com/RocketChat/Rocket.Chat/pull/24716) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump underscore.string from 3.3.5 to 3.3.6 in /ee/server/services ([#24498](https://github.com/RocketChat/Rocket.Chat/pull/24498) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump url-parse from 1.5.3 to 1.5.7 ([#24528](https://github.com/RocketChat/Rocket.Chat/pull/24528) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump url-parse from 1.5.7 to 1.5.10 ([#24640](https://github.com/RocketChat/Rocket.Chat/pull/24640) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump vm2 from 3.9.5 to 3.9.7 in /ee/server/services ([#24509](https://github.com/RocketChat/Rocket.Chat/pull/24509) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore: `twoFactorRequired` signature ([#24518](https://github.com/RocketChat/Rocket.Chat/pull/24518)) + + Improved type checking for decorator `twoFactorRequired`. + +- Chore: Add description to global OTR setting ([#24333](https://github.com/RocketChat/Rocket.Chat/pull/24333) by [@pedrogssouza](https://github.com/pedrogssouza)) + +- Chore: Add E2E tests for livechat/room.close ([#24729](https://github.com/RocketChat/Rocket.Chat/pull/24729) by [@Muramatsu2602](https://github.com/Muramatsu2602)) + + * Create a new test suite file under tests/end-to-end/api/livechat + * Create tests for the following endpoint: + + ivechat/room.close + +- Chore: Add E2E tests for livechat/visitor ([#24764](https://github.com/RocketChat/Rocket.Chat/pull/24764) by [@Muramatsu2602](https://github.com/Muramatsu2602)) + + - Create a new test suite file under tests/end-to-end/api/livechat + - Create tests for the following endpoints: + + livechat/visitor (create visitor, update visitor, add custom fields to visitors) + +- Chore: Add error boundary to message component ([#25223](https://github.com/RocketChat/Rocket.Chat/pull/25223)) + + Not crash the whole application if something goes wrong in the MessageList component. + + ![image](https://user-images.githubusercontent.com/40830821/162269915-931c5c3c-c979-4234-b74c-371f67467ce0.png) + +- Chore: Add Livechat repo into Monorepo packages ([#25312](https://github.com/RocketChat/Rocket.Chat/pull/25312)) + +- Chore: Add options to debug stdout and rate limiter ([#25336](https://github.com/RocketChat/Rocket.Chat/pull/25336)) + +- Chore: Add root package.json to houston files ([#25286](https://github.com/RocketChat/Rocket.Chat/pull/25286)) + + See title + +- Chore: add some missing REST definitions ([#24925](https://github.com/RocketChat/Rocket.Chat/pull/24925) by [@gerzonc](https://github.com/gerzonc)) + + On the [mobile client](https://github.com/RocketChat/Rocket.Chat.ReactNative), we made an effort to collect more `REST API` definitions that are missing on the server side during our migration to TypeScript. Since we're both migrating to TypeScript, we thought it would be a good idea to share those so you guys can benefit from our initiative. + +- Chore: Add yarn plugin to check node and yarn version ([#25224](https://github.com/RocketChat/Rocket.Chat/pull/25224)) + +- Chore: added Server Instances endpoint types ([#24507](https://github.com/RocketChat/Rocket.Chat/pull/24507)) + + Created typing for endpoint definitions on `instances.ts`. + +- Chore: added settings endpoint types ([#24506](https://github.com/RocketChat/Rocket.Chat/pull/24506)) + + Created typing for endpoint definitions on `settings.ts`. + +- Chore: APIClass types ([#24747](https://github.com/RocketChat/Rocket.Chat/pull/24747)) + + This pull request creates a new `restivus` module (.d.ts) for the `api.js` file. + +- Chore: Bump fuselage ([#25371](https://github.com/RocketChat/Rocket.Chat/pull/25371)) + +- Chore: Bump Fuselage packages ([#25259](https://github.com/RocketChat/Rocket.Chat/pull/25259)) + +- Chore: Bump Fuselage packages ([#25015](https://github.com/RocketChat/Rocket.Chat/pull/25015)) + + It uses the last stable version of Fuselage packages. + +- Chore: Bump Fuselage packages ([#24573](https://github.com/RocketChat/Rocket.Chat/pull/24573)) + + It uses the last stable version of Fuselage packages. + +- Chore: bump fuselage version ([#24453](https://github.com/RocketChat/Rocket.Chat/pull/24453)) + +- Chore: Cancel running jobs if PR is updated ([#24708](https://github.com/RocketChat/Rocket.Chat/pull/24708)) + +- Chore: Convert admin custom sound to tsx ([#25128](https://github.com/RocketChat/Rocket.Chat/pull/25128)) + +- Chore: Convert JS files to Typescript ([#24410](https://github.com/RocketChat/Rocket.Chat/pull/24410)) + + This pull request converts 26 more files from Javascript to Typescript, to check variable types and increase validation on the code. + +- Chore: Convert LivechatAgentActivity to raw model and TS ([#25123](https://github.com/RocketChat/Rocket.Chat/pull/25123)) + +- Chore: Convert Mailer to TS ([#25121](https://github.com/RocketChat/Rocket.Chat/pull/25121)) + +- Chore: Convert NotificationStatus to TS ([#25125](https://github.com/RocketChat/Rocket.Chat/pull/25125)) + +- Chore: Convert server functions from javascript to typescript ([#24384](https://github.com/RocketChat/Rocket.Chat/pull/24384)) + + This pull request will be used to rewrite some functions on the Chat Engine to Typescript, in order to increase security and specify variable types on the code. + +- Chore: Convert to typescript the me slashCommands files ([#24321](https://github.com/RocketChat/Rocket.Chat/pull/24321) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert to typescript the me slashCommands files + +- Chore: Convert to typescript the mute and unmute slash commands files ([#24325](https://github.com/RocketChat/Rocket.Chat/pull/24325) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert to typescript the mute and unmute slash commands files + +- Chore: Convert to typescript the slash commands create files ([#24306](https://github.com/RocketChat/Rocket.Chat/pull/24306) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert Slash Commands create files to typescript. + +- Chore: Convert to typescript the slash commands invite files ([#24311](https://github.com/RocketChat/Rocket.Chat/pull/24311) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert to typescript the slash commands invite files + +- Chore: Convert to typescript the unarchive slash commands files ([#24331](https://github.com/RocketChat/Rocket.Chat/pull/24331) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert to typescript the unarchive slash commands files + +- Chore: converted more hooks to typescript ([#24628](https://github.com/RocketChat/Rocket.Chat/pull/24628)) + + Converted some functions on `client/hooks/` from JavaScript to Typescript. + +- Chore: Create README.md for Rest Typings ([#25335](https://github.com/RocketChat/Rocket.Chat/pull/25335)) + +- Chore: Delete unused file (NewAdminInfoPage.js) ([#24196](https://github.com/RocketChat/Rocket.Chat/pull/24196)) + + Just removing a duplicated/unused file. + +- Chore: ensure scripts use cross-env and ignore some dirs (ROC-54) ([#25218](https://github.com/RocketChat/Rocket.Chat/pull/25218)) + + - data and test-failure should be ignored + - ensure scripts use cross-env + +- Chore: Fix Cypress tests ([#24544](https://github.com/RocketChat/Rocket.Chat/pull/24544)) + +- Chore: Fix grammatical errors in Code of Conduct ([#24759](https://github.com/RocketChat/Rocket.Chat/pull/24759) by [@aadishJ01](https://github.com/aadishJ01)) + +- Chore: fix grammatical errors in Features ([#24771](https://github.com/RocketChat/Rocket.Chat/pull/24771) by [@aadishJ01](https://github.com/aadishJ01)) + +- Chore: Fix return type warnings ([#25275](https://github.com/RocketChat/Rocket.Chat/pull/25275)) + +- Chore: Get Settings Statistics ([#24397](https://github.com/RocketChat/Rocket.Chat/pull/24397)) + +- Chore: Improve logger to allow log of `unknown` values ([#24726](https://github.com/RocketChat/Rocket.Chat/pull/24726)) + +- Chore: Improve PR title validation regex ([#24467](https://github.com/RocketChat/Rocket.Chat/pull/24467)) + +- Chore: Improvements on role syncing (ldap, oauth and saml) ([#23824](https://github.com/RocketChat/Rocket.Chat/pull/23824)) + +- Chore: Js to ts slash commands archive ([#24304](https://github.com/RocketChat/Rocket.Chat/pull/24304) by [@eduardofcabrera](https://github.com/eduardofcabrera)) + + Convert Slash Commands archive files to typescript + +- Chore: Micro services fixes and cleanup ([#24753](https://github.com/RocketChat/Rocket.Chat/pull/24753)) + +- Chore: Migrate oauth2server to typescript ([#25126](https://github.com/RocketChat/Rocket.Chat/pull/25126)) + +- Chore: Minor dependency updates ([#25269](https://github.com/RocketChat/Rocket.Chat/pull/25269)) + +- Chore: Missing keys in APIsDisplay ([#24464](https://github.com/RocketChat/Rocket.Chat/pull/24464)) + +- Chore: Monorepo ([#25074](https://github.com/RocketChat/Rocket.Chat/pull/25074)) + +- Chore: move definitions to packages ([#25085](https://github.com/RocketChat/Rocket.Chat/pull/25085)) + +- Chore: organize test files and fix code coverage ([#24900](https://github.com/RocketChat/Rocket.Chat/pull/24900)) + +- Chore: Remove Alpine image deps after using them ([#25053](https://github.com/RocketChat/Rocket.Chat/pull/25053)) + +- Chore: Remove duplicated useUserRoom ([#25180](https://github.com/RocketChat/Rocket.Chat/pull/25180)) + +- Chore: Remove old files from removed Omnichannel feature ([#25129](https://github.com/RocketChat/Rocket.Chat/pull/25129)) + +- Chore: Remove old scripts ([#24911](https://github.com/RocketChat/Rocket.Chat/pull/24911)) + +- Chore: Remove package-lock.json from houston files ([#25280](https://github.com/RocketChat/Rocket.Chat/pull/25280)) + + Houston config in the `package.json` file still mentioned `package-lock.json`, but it doesn't exist anymore + +- Chore: Remove storybook build job from CI ([#24530](https://github.com/RocketChat/Rocket.Chat/pull/24530)) + +- Chore: Remove unused Drone CI files ([#25124](https://github.com/RocketChat/Rocket.Chat/pull/25124)) + +- Chore: roomTypes: Stop mixing client and server code together ([#24536](https://github.com/RocketChat/Rocket.Chat/pull/24536)) + +- Chore: Run tests using microservices deployment on CI ([#24513](https://github.com/RocketChat/Rocket.Chat/pull/24513)) + +- Chore: Set Docker image tag to latest only when really latest ([#24366](https://github.com/RocketChat/Rocket.Chat/pull/24366)) + +- Chore: Skip local services changes when shutting down duplicated services ([#24810](https://github.com/RocketChat/Rocket.Chat/pull/24810)) + +- Chore: Storybook mocking and examples improved ([#24969](https://github.com/RocketChat/Rocket.Chat/pull/24969)) + + - Stories from `ee/` included; + - Differentiate root story kinds; + - Mocking of `ServerContext` via Storybook parameters. + +- Chore: Sync with master ([#25284](https://github.com/RocketChat/Rocket.Chat/pull/25284)) + +- Chore: Template to generate packages ([#25174](https://github.com/RocketChat/Rocket.Chat/pull/25174)) + + ``` + npx hygen package new test + ``` + +- Chore: Tests with Playwright (task: All works) ([#25122](https://github.com/RocketChat/Rocket.Chat/pull/25122)) + +- Chore: Tests with Playwright (task: ROC-28, 09-channels) ([#25196](https://github.com/RocketChat/Rocket.Chat/pull/25196)) + +- Chore: TS conversion folder client ([#25031](https://github.com/RocketChat/Rocket.Chat/pull/25031)) + +- Chore: TS migration SortList ([#25167](https://github.com/RocketChat/Rocket.Chat/pull/25167)) + +- Chore: Unify ILivechatAgent with ILivechatAgentRecord ([#24406](https://github.com/RocketChat/Rocket.Chat/pull/24406)) + +- Chore: Update Apps-Engine ([#24651](https://github.com/RocketChat/Rocket.Chat/pull/24651)) + +- Chore: Update Apps-Engine ([#24568](https://github.com/RocketChat/Rocket.Chat/pull/24568)) + +- Chore: Update fuselage deps to match monolith versions ([#24501](https://github.com/RocketChat/Rocket.Chat/pull/24501)) + +- Chore: Update Livechat to the last version ([#25257](https://github.com/RocketChat/Rocket.Chat/pull/25257)) + +- Chore: Update Livechat version ([#25130](https://github.com/RocketChat/Rocket.Chat/pull/25130)) + +- Chore: Update Meteor to 2.5.6 ([#24461](https://github.com/RocketChat/Rocket.Chat/pull/24461)) + +- Chore: update OTR icon ([#24521](https://github.com/RocketChat/Rocket.Chat/pull/24521) by [@kibonusp](https://github.com/kibonusp)) + + I changed the shredder icon in OTR contextual bar to the stopwatch icon, recently added to the fuselage. + +- Chore: Update ws package ([#24477](https://github.com/RocketChat/Rocket.Chat/pull/24477)) + +- Chore(deps-dev): Bump @types/mock-require from 2.0.0 to 2.0.1 ([#24574](https://github.com/RocketChat/Rocket.Chat/pull/24574) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore(deps-dev): Bump ts-node from 10.0.0 to 10.5.0 in /ee/server/services ([#24435](https://github.com/RocketChat/Rocket.Chat/pull/24435) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore(deps): Bump node-fetch from 2.6.1 to 2.6.7 in /ee/server/services ([#24299](https://github.com/RocketChat/Rocket.Chat/pull/24299) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- i18n: Language update from LingoHub 🤖 on 2022-01-31Z ([#24357](https://github.com/RocketChat/Rocket.Chat/pull/24357)) + +- i18n: Language update from LingoHub 🤖 on 2022-02-07Z ([#24429](https://github.com/RocketChat/Rocket.Chat/pull/24429)) + +- i18n: Language update from LingoHub 🤖 on 2022-02-14Z ([#24493](https://github.com/RocketChat/Rocket.Chat/pull/24493)) + +- i18n: Language update from LingoHub 🤖 on 2022-02-21Z ([#24558](https://github.com/RocketChat/Rocket.Chat/pull/24558)) + +- i18n: Language update from LingoHub 🤖 on 2022-02-28Z ([#24644](https://github.com/RocketChat/Rocket.Chat/pull/24644)) + +- i18n: Language update from LingoHub 🤖 on 2022-03-07Z ([#24717](https://github.com/RocketChat/Rocket.Chat/pull/24717)) + +- i18n: Language update from LingoHub 🤖 on 2022-03-14Z ([#24823](https://github.com/RocketChat/Rocket.Chat/pull/24823)) + +- i18n: Language update from LingoHub 🤖 on 2022-03-21Z ([#24895](https://github.com/RocketChat/Rocket.Chat/pull/24895)) + +- i18n: Language update from LingoHub 🤖 on 2022-03-28Z ([#24971](https://github.com/RocketChat/Rocket.Chat/pull/24971)) + +- i18n: Language update from LingoHub 🤖 on 2022-04-04Z ([#25043](https://github.com/RocketChat/Rocket.Chat/pull/25043)) + +- Merge master into develop & Set version to 4.5.0-develop ([#24363](https://github.com/RocketChat/Rocket.Chat/pull/24363)) + +- Merge master into develop & Set version to 4.6.0-develop ([#24653](https://github.com/RocketChat/Rocket.Chat/pull/24653)) + +- Merge master into develop & Set version to 4.7.0-develop ([#25028](https://github.com/RocketChat/Rocket.Chat/pull/25028)) + +- Regression: Add `isPending` status to message ([#25299](https://github.com/RocketChat/Rocket.Chat/pull/25299)) + +- Regression: Add createdOTR index ([#25017](https://github.com/RocketChat/Rocket.Chat/pull/25017)) + +- Regression: Add eslint package to micro services Dockerfile ([#25311](https://github.com/RocketChat/Rocket.Chat/pull/25311)) + +- Regression: Add select message to system message and thread preview and allow select on legacy template ([#25251](https://github.com/RocketChat/Rocket.Chat/pull/25251)) + +- Regression: Add support to namespace within micro services ([#24581](https://github.com/RocketChat/Rocket.Chat/pull/24581)) + +- Regression: Admin Sidebar colors inverted. ([#24609](https://github.com/RocketChat/Rocket.Chat/pull/24609)) + +- Regression: Avatar not loading on first direct message ([#25211](https://github.com/RocketChat/Rocket.Chat/pull/25211)) + + fix avatar not loading on a first direct message + +- Regression: Better MongoDB connection management for micro services ([#25323](https://github.com/RocketChat/Rocket.Chat/pull/25323)) + +- Regression: bump onboarding-ui version ([#25320](https://github.com/RocketChat/Rocket.Chat/pull/25320)) + + - Bump to 'next' the onboarding-ui package from fuselage. + - Update from 'companyEmail' to 'email' adminData usage types + +- Regression: Bunch of settings fixes for VoIP ([#24594](https://github.com/RocketChat/Rocket.Chat/pull/24594)) + +- Regression: Call doesn't stop ringing after agent unregistration ([#24908](https://github.com/RocketChat/Rocket.Chat/pull/24908)) + +- Regression: Change preference to be default legacy messages ([#25255](https://github.com/RocketChat/Rocket.Chat/pull/25255)) + +- Regression: CI playwright ([#25168](https://github.com/RocketChat/Rocket.Chat/pull/25168)) + +- Regression: Custom roles displaying ID instead of name on some admin screens ([#24999](https://github.com/RocketChat/Rocket.Chat/pull/24999)) + + ![image](https://user-images.githubusercontent.com/55164754/160981416-555bcaa1-c075-4260-937c-64523472da43.png) + ![image](https://user-images.githubusercontent.com/55164754/160981452-6eae4e74-8425-4073-8256-472aba72b9db.png) + +- Regression: Do not show toast on incoming voip calls ([#24619](https://github.com/RocketChat/Rocket.Chat/pull/24619)) + +- Regression: Encode registration info as JWT when signing key is provided ([#24626](https://github.com/RocketChat/Rocket.Chat/pull/24626)) + +- Regression: Error is raised when there's no Asterisk queue available yet ([#24980](https://github.com/RocketChat/Rocket.Chat/pull/24980) by [@amolghode1981](https://github.com/amolghode1981)) + +- Regression: Error setting user avatars and mentioning rooms on Slack Import ([#24585](https://github.com/RocketChat/Rocket.Chat/pull/24585)) + + - Fix `Mentioned room not found` error when importing rooms from Slack; + - Fix `Forbidden` error when setting avatars for users imported from Slack (on user import/creation); + - Fix incorrect message count on imported rooms; + - Fix missing username on messages imported from Slack; + +- Regression: Error when trying to load name of dm rooms for avatars and notifications ([#24583](https://github.com/RocketChat/Rocket.Chat/pull/24583)) + +- Regression: eslint not running on packages ([#25305](https://github.com/RocketChat/Rocket.Chat/pull/25305)) + +- Regression: Extension List panel UI not aligned with designs ([#24645](https://github.com/RocketChat/Rocket.Chat/pull/24645)) + +- Regression: Fix account service login expiration ([#24920](https://github.com/RocketChat/Rocket.Chat/pull/24920)) + +- Regression: Fix CI monorepo build ([#25107](https://github.com/RocketChat/Rocket.Chat/pull/25107)) + +- Regression: Fix clicking on visitor's chat in the sidebar does not display the chat window ([#25380](https://github.com/RocketChat/Rocket.Chat/pull/25380)) + + Fix: livechat room not opening. + +- Regression: Fix double value on holdTime and empty msg on last message ([#24630](https://github.com/RocketChat/Rocket.Chat/pull/24630)) + +- Regression: Fix English i18n react text ([#25368](https://github.com/RocketChat/Rocket.Chat/pull/25368)) + + Incorrect text in reaction tooltip has been fixed + +- Regression: Fix federation Matrix bridge startup ([#25273](https://github.com/RocketChat/Rocket.Chat/pull/25273)) + +- Regression: Fix in-correct room status shown to agents ([#24592](https://github.com/RocketChat/Rocket.Chat/pull/24592)) + +- Regression: Fix incoming voip call ringtone is not ringing ([#24616](https://github.com/RocketChat/Rocket.Chat/pull/24616)) + +- Regression: Fix micro services Docker build ([#25193](https://github.com/RocketChat/Rocket.Chat/pull/25193)) + +- Regression: Fix multi line is not showing an empty line between lines ([#25317](https://github.com/RocketChat/Rocket.Chat/pull/25317)) + +- Regression: Fix reply button not working when hideFlexTab is enabled ([#25306](https://github.com/RocketChat/Rocket.Chat/pull/25306)) + +- Regression: Fix room not getting created due to null visitor status ([#24562](https://github.com/RocketChat/Rocket.Chat/pull/24562)) + +- Regression: Fix services Docker build on CI ([#25181](https://github.com/RocketChat/Rocket.Chat/pull/25181)) + +- Regression: Fix size of custom emoji and render emoji on thread message preview ([#25314](https://github.com/RocketChat/Rocket.Chat/pull/25314)) + +- Regression: Fix the alpine image and dev UX installing matrix-rust-sdk-bindings ([#25319](https://github.com/RocketChat/Rocket.Chat/pull/25319)) + + The package only included a few pre-built which caused all macs to have to compile every time they installed and also caused our alpine not to work. + + This temporarily switches to a fork of the matrix-appservice-bridge package. + + Made changes to one of its child dependencies `matrix-rust-sdk-bindings` that adds pre-built binaries for mac and musl (for alpine). + +- Regression: Fix time fields and wrap up in Voip Room Contexual bar ([#24625](https://github.com/RocketChat/Rocket.Chat/pull/24625)) + +- Regression: Fix time format on Voip system messages ([#24603](https://github.com/RocketChat/Rocket.Chat/pull/24603)) + +- Regression: Fix translation for call started message ([#24615](https://github.com/RocketChat/Rocket.Chat/pull/24615)) + +- Regression: Fix unexpected errors breaking ddp-streamer ([#24948](https://github.com/RocketChat/Rocket.Chat/pull/24948)) + +- Regression: Fix wrong tab name for VoIP settings ([#24647](https://github.com/RocketChat/Rocket.Chat/pull/24647)) + +- Regression: Fixes in Voice Contextual Bar and Directory ([#24596](https://github.com/RocketChat/Rocket.Chat/pull/24596)) + +- Regression: If Asterisk suddenly goes down, server has no way to know. Causes server to get stuck. Needs restart ([#24624](https://github.com/RocketChat/Rocket.Chat/pull/24624) by [@amolghode1981](https://github.com/amolghode1981)) + +- Regression: Improve Sidenav open/close handling and fixed codeql configs and E2E tests ([#24756](https://github.com/RocketChat/Rocket.Chat/pull/24756)) + +- Regression: Mark all rooms as read modal closing instantly. ([#24610](https://github.com/RocketChat/Rocket.Chat/pull/24610)) + +- Regression: Messages in new message template Crashing. ([#25327](https://github.com/RocketChat/Rocket.Chat/pull/25327)) + +- Regression: No audio when call comes from Skype/IP phone ([#24602](https://github.com/RocketChat/Rocket.Chat/pull/24602) by [@amolghode1981](https://github.com/amolghode1981)) + + The audio was not rendered because of re-rendering of react element based on + queueCounter and roomInfo. queueCounter and roomInfo cause the dom to re-render when call gets accepted + because after accepting call, queueCounter changes or a room gets created. + The audio element gets recreated. But VoIP user probably holds the old one. + The behaviour is not predictable when such case happens. If everything gets cleanly setup, + even if the audio element goes headless, it still continues to play the remote audio. + But in other cases, it is unreferenced the one on dom has its srcObject as null. + This causes no audio. + + This fix provides a way to re-initialise the rendering elements in VoIP user + and calls this function on useEffect() if the re-render has happen. + +- Regression: Prevent button from losing state when rerendering ([#24648](https://github.com/RocketChat/Rocket.Chat/pull/24648)) + +- Regression: Prevent connect to asterisk when VoIP is disabled ([#24601](https://github.com/RocketChat/Rocket.Chat/pull/24601)) + +- Regression: Queue counter aggregator for incoming/hanged calls ([#24635](https://github.com/RocketChat/Rocket.Chat/pull/24635) by [@amolghode1981](https://github.com/amolghode1981)) + +- Regression: Refresh server connection when MI server settings change ([#24649](https://github.com/RocketChat/Rocket.Chat/pull/24649)) + +- Regression: Register services right away ([#24800](https://github.com/RocketChat/Rocket.Chat/pull/24800)) + +- Regression: Revert Bugsnag version ([#25313](https://github.com/RocketChat/Rocket.Chat/pull/25313)) + +- Regression: Rocket.Chat Webapp not loading. ([#25349](https://github.com/RocketChat/Rocket.Chat/pull/25349)) + +- Regression: Role Sync not always working ([#24850](https://github.com/RocketChat/Rocket.Chat/pull/24850)) + +- Regression: Server crashing if Voip credentials are invalid ([#24646](https://github.com/RocketChat/Rocket.Chat/pull/24646)) + +- Regression: Show username and real name on the message system ([#25254](https://github.com/RocketChat/Rocket.Chat/pull/25254)) + +- Regression: Shows error if micro service cannot connect to Mongo ([#25301](https://github.com/RocketChat/Rocket.Chat/pull/25301)) + +- Regression: Use exact Node version on micro services Docker images ([#25287](https://github.com/RocketChat/Rocket.Chat/pull/25287)) + +- Regression: Validate empty fields for Message template ([#25250](https://github.com/RocketChat/Rocket.Chat/pull/25250)) + +- Regression: VoIP service button displayed when VoIP is disabled ([#24598](https://github.com/RocketChat/Rocket.Chat/pull/24598)) + +- Regression: yarn dev triggers build dependencies ([#25208](https://github.com/RocketChat/Rocket.Chat/pull/25208)) + +- Release 4.5.0 ([#24652](https://github.com/RocketChat/Rocket.Chat/pull/24652) by [@LucasFASouza](https://github.com/LucasFASouza) & [@aswinidev](https://github.com/aswinidev) & [@dependabot[bot]](https://github.com/dependabot[bot]) & [@lingohub[bot]](https://github.com/lingohub[bot]) & [@ostjen](https://github.com/ostjen)) + +- Release 4.5.1 ([#24782](https://github.com/RocketChat/Rocket.Chat/pull/24782) by [@Aman-Maheshwari](https://github.com/Aman-Maheshwari) & [@amolghode1981](https://github.com/amolghode1981) & [@cuonghuunguyen](https://github.com/cuonghuunguyen)) + +- Release 4.5.2 ([#24814](https://github.com/RocketChat/Rocket.Chat/pull/24814)) + +- Release 4.5.3 ([#24884](https://github.com/RocketChat/Rocket.Chat/pull/24884) by [@amolghode1981](https://github.com/amolghode1981)) + +- Release 4.5.4 ([#24938](https://github.com/RocketChat/Rocket.Chat/pull/24938)) + +- Release 4.5.5 ([#24998](https://github.com/RocketChat/Rocket.Chat/pull/24998)) + +- Release 4.6.0 ([#25027](https://github.com/RocketChat/Rocket.Chat/pull/25027) by [@amolghode1981](https://github.com/amolghode1981) & [@aswinidev](https://github.com/aswinidev) & [@dependabot[bot]](https://github.com/dependabot[bot]) & [@eduardofcabrera](https://github.com/eduardofcabrera) & [@lingohub[bot]](https://github.com/lingohub[bot])) + +- Release 4.6.1 ([#25095](https://github.com/RocketChat/Rocket.Chat/pull/25095)) + +- Release 4.6.2 ([#25191](https://github.com/RocketChat/Rocket.Chat/pull/25191) by [@sidmohanty11](https://github.com/sidmohanty11)) + +- Release 4.6.3 ([#25235](https://github.com/RocketChat/Rocket.Chat/pull/25235)) + +- Release 4.7.0 ([#25390](https://github.com/RocketChat/Rocket.Chat/pull/25390) by [@Himanshu664](https://github.com/Himanshu664) & [@dependabot[bot]](https://github.com/dependabot[bot]) & [@lingohub[bot]](https://github.com/lingohub[bot])) + +- Release 4.7.1 ([#25510](https://github.com/RocketChat/Rocket.Chat/pull/25510) by [@felipe-menelau](https://github.com/felipe-menelau)) + +- Release 4.7.2 ([#25580](https://github.com/RocketChat/Rocket.Chat/pull/25580)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Aman-Maheshwari](https://github.com/Aman-Maheshwari) +- [@Himanshu664](https://github.com/Himanshu664) +- [@JMoVS](https://github.com/JMoVS) +- [@LucasFASouza](https://github.com/LucasFASouza) +- [@Muramatsu2602](https://github.com/Muramatsu2602) +- [@aadishJ01](https://github.com/aadishJ01) +- [@aakash-gitdev](https://github.com/aakash-gitdev) +- [@amolghode1981](https://github.com/amolghode1981) +- [@aswinidev](https://github.com/aswinidev) +- [@cuonghuunguyen](https://github.com/cuonghuunguyen) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@eduardofcabrera](https://github.com/eduardofcabrera) +- [@felipe-menelau](https://github.com/felipe-menelau) +- [@gerzonc](https://github.com/gerzonc) +- [@kibonusp](https://github.com/kibonusp) +- [@lingohub[bot]](https://github.com/lingohub[bot]) +- [@ostjen](https://github.com/ostjen) +- [@paulobernardoaf](https://github.com/paulobernardoaf) +- [@pedrogssouza](https://github.com/pedrogssouza) +- [@sidmohanty11](https://github.com/sidmohanty11) +- [@tkurz](https://github.com/tkurz) +- [@ujorgeleite](https://github.com/ujorgeleite) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@AllanPazRibeiro](https://github.com/AllanPazRibeiro) +- [@KevLehman](https://github.com/KevLehman) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@alansikora](https://github.com/alansikora) +- [@albuquerquefabio](https://github.com/albuquerquefabio) +- [@cauefcr](https://github.com/cauefcr) +- [@d-gubert](https://github.com/d-gubert) +- [@debdutdeb](https://github.com/debdutdeb) +- [@dougfabris](https://github.com/dougfabris) +- [@felipe-rod123](https://github.com/felipe-rod123) +- [@filipemarins](https://github.com/filipemarins) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@guijun13](https://github.com/guijun13) +- [@jeanfbrito](https://github.com/jeanfbrito) +- [@juliajforesti](https://github.com/juliajforesti) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@murtaza98](https://github.com/murtaza98) +- [@nishant23122000](https://github.com/nishant23122000) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rique223](https://github.com/rique223) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@souzaramon](https://github.com/souzaramon) +- [@tassoevan](https://github.com/tassoevan) +- [@tiagoevanp](https://github.com/tiagoevanp) +- [@tmontini](https://github.com/tmontini) +- [@weslley543](https://github.com/weslley543) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 4.4.4 +`2022-05-20 · 12 🎉 · 26 🚀 · 79 🐛 · 213 🔍 · 54 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` + +### 🎉 New features + + +- Add expire index to integration history ([#25087](https://github.com/RocketChat/Rocket.Chat/pull/25087)) + +- Alpha Matrix Federation ([#23688](https://github.com/RocketChat/Rocket.Chat/pull/23688)) + + Experimental support for Matrix Federation with a Bridge + + https://user-images.githubusercontent.com/51996/164530391-e8b17ecd-a4d0-4ef8-a8b7-81230c1773d3.mp4 + +- E2E password generator ([#24114](https://github.com/RocketChat/Rocket.Chat/pull/24114) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + +- Engagement Statistics ([#24989](https://github.com/RocketChat/Rocket.Chat/pull/24989)) + +- Engagement Statistics ([#24777](https://github.com/RocketChat/Rocket.Chat/pull/24777) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + +- Expand Apps Engine's environment variable allowed list ([#23870](https://github.com/RocketChat/Rocket.Chat/pull/23870) by [@cuonghuunguyen](https://github.com/cuonghuunguyen)) + +- Marketplace sort filter ([#24567](https://github.com/RocketChat/Rocket.Chat/pull/24567) by [@ujorgeleite](https://github.com/ujorgeleite)) + + Implemented a sort filter for the marketplace screen. This component sorts the marketplace apps list in 4 ways, alphabetical order(A-Z), inverse alphabetical order(Z-A), most recently updated(MRU), and least recent updated(LRU). Besides that, I've generalized some components and types to increase code reusability, renamed some helpers as well as deleted some useless ones, and inserted the necessary new translations on the English i18n dictionary. + Demo gif: + ![Marketplace sort filter](https://user-images.githubusercontent.com/43561537/155033709-e07a6306-a85a-4f7f-9624-b53ba5dd7fa9.gif) + +- Message Template React Component ([#23971](https://github.com/RocketChat/Rocket.Chat/pull/23971)) + + Complete rewrite of the messages component in react. Visual changes should be minimal as well as user impact, with no break changes (unless you've customized the blaze template). + + + + ![Screen Shot 2022-04-05 at 11 14 18](https://user-images.githubusercontent.com/27704687/161774027-38dd9c7b-eeeb-45e2-b9d8-ea2a9be8486d.png) + In case you encounter any problems, or want to compare, temporarily it is possible to use the old version + + image + +- Telemetry Events ([#24781](https://github.com/RocketChat/Rocket.Chat/pull/24781) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + +- Upgrade Tab ([#24835](https://github.com/RocketChat/Rocket.Chat/pull/24835)) + + ![image](https://user-images.githubusercontent.com/27704687/160172260-c656282e-a487-4092-948d-d11c9bacb598.png) + +- Use setting to determine if initial general channel is needed ([#25441](https://github.com/RocketChat/Rocket.Chat/pull/25441) by [@felipe-menelau](https://github.com/felipe-menelau)) + + - Adds flag responsible for overwriting #general channel creation + +- VoIP Support for Omnichannel ([#23102](https://github.com/RocketChat/Rocket.Chat/pull/23102) by [@amolghode1981](https://github.com/amolghode1981)) + + - Created VoipService to manage VoIP connections and PBX connection + - Created LivechatVoipService that will handle custom cases for livechat (creating rooms, assigning chats to queue, actions when call is finished, etc) + - Created Basic interfaces to support new services and new model + - Created Endpoints for management interfaces + - Implemented asterisk connector on VoIP service + - Created UI components to show calls incoming and to allow answering/rejecting calls + - Added new settings to control call server/management server connection values + - Added endpoints to associate Omnichannel Agents with PBX Extensions + - Added support for event listening on server side, to get metadata about calls being received/ongoing + - Created new pages to update settings & to see user-extension association + - Created new page to see ongoing calls (and past calls) + - Added support for remote hangup/hold on calls + - Implemented call metrics calculation (hold time, waiting time, talk time) + - Show a notificaiton when call is received + +### 🚀 Improvements + + +- **ENTERPRISE:** Don't start presence monitor when running micro services ([#24739](https://github.com/RocketChat/Rocket.Chat/pull/24739)) + +- **ENTERPRISE:** Improve how micro services are loaded ([#24388](https://github.com/RocketChat/Rocket.Chat/pull/24388)) + +- Add OTR Room States ([#24565](https://github.com/RocketChat/Rocket.Chat/pull/24565)) + + Earlier OTR room uses only 2 states, we need more states to support future features. + This adds more states for the OTR contextualBar. + + - Expired + Screen Shot 2022-04-20 at 13 55 52 + + - Declined + Screen Shot 2022-04-20 at 13 49 28 + + - Error + Screen Shot 2022-04-20 at 13 55 26 + +- Add return button in chats opened from the list of current chats ([#24458](https://github.com/RocketChat/Rocket.Chat/pull/24458) by [@LucasFASouza](https://github.com/LucasFASouza)) + + The new return button for Omnichannel chats came out with release 3.15 but the feature was only available for chats that were opened from Omnichannel Contact Center. + Now, the same UI/UX is supported for chats opened from Current Chats list. + + ![image](https://user-images.githubusercontent.com/32396925/153283190-bd5c9748-c36b-4874-a704-6043afc7e3a1.png) + + The chat now opens in the Omnichannel settings and has the return button so the user can go back to the Current Chats list. + + ![image](https://user-images.githubusercontent.com/32396925/153285591-fad8e4a0-d2ea-4a02-8b2a-15e383b3c876.png) + +- Add tooltip to sidebar room menu ([#24405](https://github.com/RocketChat/Rocket.Chat/pull/24405) by [@Himanshu664](https://github.com/Himanshu664)) + +- Add tooltips on action buttons of Canned Response message composer ([#24483](https://github.com/RocketChat/Rocket.Chat/pull/24483) by [@LucasFASouza](https://github.com/LucasFASouza)) + + The tooltips were missing on the action buttons of CR message composer. + + ![image](https://user-images.githubusercontent.com/32396925/153620327-91107245-4b47-4d39-a99a-6da6d1cf5734.png) + + Users can now feel more encouraged to use these actions knowing what they are supposed to do. + +- Add user to room on "Click to Join!" button press ([#24041](https://github.com/RocketChat/Rocket.Chat/pull/24041) by [@ostjen](https://github.com/ostjen)) + + - Add user to room on "Click to Join!" button press; + - Display the "Join" button in discussions inside channels (keeping the behavior consistent with discussions inside groups). + +- Added a new "All" tab which shows all integrations in Integrations ([#24109](https://github.com/RocketChat/Rocket.Chat/pull/24109) by [@aswinidev](https://github.com/aswinidev)) + +- Added MaxNickNameLength and MaxBioLength constants ([#25231](https://github.com/RocketChat/Rocket.Chat/pull/25231) by [@aakash-gitdev](https://github.com/aakash-gitdev)) + +- Added tooltip options for message menu ([#24431](https://github.com/RocketChat/Rocket.Chat/pull/24431) by [@Himanshu664](https://github.com/Himanshu664)) + +- Adding new statistics related to voip and omnichannel ([#24887](https://github.com/RocketChat/Rocket.Chat/pull/24887)) + + - Total of Canned response messages sent + - Total of tags used + - Last-Chatted Agent Preferred (enabled/disabled) + - Assign new conversations to the contact manager (enabled/disabled) + - How to handle Visitor Abandonment setting + - Amount of chats placed on hold + - VoIP Enabled + - Amount of VoIP Calls + - Amount of VoIP Extensions connected + - Amount of Calls placed on hold (1x per call) + - Fixed Session Aggregation type definitions + +- ChatBox Text to File Description ([#24451](https://github.com/RocketChat/Rocket.Chat/pull/24451) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + The text content from chatbox goes to the file description when drag and drop a file. + +- Close modal on esc and outside click ([#24275](https://github.com/RocketChat/Rocket.Chat/pull/24275)) + + This is a QUICK change in order to close modals pressing Esc button and clicking outside of it **intentionally**. + +- CloudLoginModal visual consistency ([#24334](https://github.com/RocketChat/Rocket.Chat/pull/24334)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/151585064-dc6a1e29-9903-4241-8fbd-dfbe6c55fbef.png) + + ### after + ![Screen Shot 2022-01-28 at 13 32 02](https://user-images.githubusercontent.com/27704687/151585101-75b98502-9aae-4198-bc3e-4956750e5d8b.png) + +- Convert tag edit with department data to tsx ([#24369](https://github.com/RocketChat/Rocket.Chat/pull/24369) by [@LucasFASouza](https://github.com/LucasFASouza)) + +- Descriptive tooltip for Encrypted Key on Room Header ([#24121](https://github.com/RocketChat/Rocket.Chat/pull/24121)) + +- Improve active/hover colors in account sidebar ([#25024](https://github.com/RocketChat/Rocket.Chat/pull/25024) by [@Himanshu664](https://github.com/Himanshu664)) + +- New omnichannel statistics and async statistics processing. ([#24749](https://github.com/RocketChat/Rocket.Chat/pull/24749)) + + https://app.clickup.com/t/1z4zg4e + +- OTR system messages ([#24382](https://github.com/RocketChat/Rocket.Chat/pull/24382)) + + OTR system messages to indicate key refresh and joining chat to users. + +- Performance for some Omnichannel features ([#25217](https://github.com/RocketChat/Rocket.Chat/pull/25217)) + +- Purchase Type Filter for marketplace apps and Categories filter anchor refactoring ([#24454](https://github.com/RocketChat/Rocket.Chat/pull/24454)) + + Implemented a filter by purchase type(free or paid) component for the apps screen of the marketplace. Besides that, new entries on the dictionary, fixed some parts of the App type (purchaseType was typed as unknown and price as string), and created some helpers to work alongside the filter. Will be refactoring the categories filter anchor and then will open this PR for reviews. + + Demo gif: + ![purchaseTypeFIlter](https://user-images.githubusercontent.com/43561537/153101228-7b7ebdc3-2d34-420f-aa9d-f7cbc8d4b53f.gif) + + Refactored the categories filter anchor from a plain fuselage select to a select button with dynamic colors. + Demo gif: + ![New categories filter anchor(PR)](https://user-images.githubusercontent.com/43561537/153422427-28012b7d-e0ec-45f4-861d-c9368c57ad04.gif) + +- Rename upgrade tab routes ([#25097](https://github.com/RocketChat/Rocket.Chat/pull/25097)) + + Change 'upgrade tab' routes names from camelCase ('goFullyFeatured') to kebab-case ('go-fully-featured') due to URL naming consistency. Changed types, main function and test. + +- Replace AutoComplete in UserAutoComplete & UserAutoCompleteMultiple components ([#24529](https://github.com/RocketChat/Rocket.Chat/pull/24529)) + + This PR replaces a deprecated fuselage's component `AutoComplete` in favor of `Select` and `MultiSelect` which fixes some of UX/UI issues in selecting users + + ### before + ![Screen Shot 2022-02-19 at 13 33 28](https://user-images.githubusercontent.com/27704687/154809737-8181a06c-4f20-48ea-90f7-01e828b9a452.png) + + ### after + ![Screen Shot 2022-02-19 at 13 30 58](https://user-images.githubusercontent.com/27704687/154809653-a8ec9a80-c0dd-4a25-9c00-0f96147d79e9.png) + +- Skip encryption for slash commands in E2E rooms ([#24475](https://github.com/RocketChat/Rocket.Chat/pull/24475)) + + Currently Slash Commands don't work in an E2EE room, as we encrypt the message before slash command is detected by the server, So removed encryption for slash commands in e2e rooms. + +- Team system messages feedback ([#24209](https://github.com/RocketChat/Rocket.Chat/pull/24209) by [@ostjen](https://github.com/ostjen)) + + - Delete some keys that aren't being used (eg: User_left_female). + - Add new Teams' system messages: + - `added-user-to-team`: **added** @\user to this Team; + - `removed-user-from-team`: **removed** @\user from this Team; + - `user-converted-to-team`: **converted** #\room to a Team; + - `user-converted-to-channel`: **converted** #\room to a Channel; + - `user-removed-room-from-team`: **removed** @\user from this Team; + - `user-deleted-room-from-team`: **deleted** #\room from this Team; + - `user-added-room-to-team`: **deleted** #\room to this Team; + - Add the corresponding options to hide each new system message and the missing `ujt` and `ult` hide options. + +- Updated links in readme ([#24028](https://github.com/RocketChat/Rocket.Chat/pull/24028) by [@aswinidev](https://github.com/aswinidev)) + +### 🐛 Bug fixes + + +- "Match error" when converting a team to a channel ([#24629](https://github.com/RocketChat/Rocket.Chat/pull/24629)) + + - Fix "Match error" when trying to convert a channel to a team; + +- **ENTERPRISE:** Auto reload feature of ddp-streamer micro service ([#24793](https://github.com/RocketChat/Rocket.Chat/pull/24793)) + +- **ENTERPRISE:** DDP streamer not sending data to all clients ([#24738](https://github.com/RocketChat/Rocket.Chat/pull/24738)) + +- **ENTERPRISE:** Notifications not being sent by ddp-streamer ([#24831](https://github.com/RocketChat/Rocket.Chat/pull/24831)) + +- **ENTERPRISE:** Presence micro service logic ([#24724](https://github.com/RocketChat/Rocket.Chat/pull/24724)) + +- 2FA via email when logging in using OAuth ([#24572](https://github.com/RocketChat/Rocket.Chat/pull/24572)) + +- Add ?close to OAuth callback url ([#24381](https://github.com/RocketChat/Rocket.Chat/pull/24381)) + +- Add katex render to new message react template ([#25239](https://github.com/RocketChat/Rocket.Chat/pull/25239)) + +- Add reaction not working in legacy messages ([#25222](https://github.com/RocketChat/Rocket.Chat/pull/25222)) + +- Added invalid password error message ([#24714](https://github.com/RocketChat/Rocket.Chat/pull/24714) by [@Himanshu664](https://github.com/Himanshu664)) + +- Adjust email label in Setup Wizard i18n files ([#25260](https://github.com/RocketChat/Rocket.Chat/pull/25260)) + + - remove 'Company' label on onboarding email keys in certain languages + +- AgentOverview analytics wrong departmentId parameter ([#25073](https://github.com/RocketChat/Rocket.Chat/pull/25073) by [@paulobernardoaf](https://github.com/paulobernardoaf)) + + When filtering the analytics charts by department, data would not appear because the object: + ```js + { + value: "department-id", + label: "department-name" + } + ``` + was being used in the `departmentId` parameter. + + - Before: + ![image](https://user-images.githubusercontent.com/30026625/161832057-d96ffd21-a7dd-421e-bfaa-3b9f4a9127b2.png) + + - After: + ![image](https://user-images.githubusercontent.com/30026625/161831092-9ee77b51-b083-4f45-9c48-ab2e0511c4d6.png) + +- API Error preventing adding an email to users without one (like bot/app users) ([#24709](https://github.com/RocketChat/Rocket.Chat/pull/24709)) + +- Apple OAuth ([#24879](https://github.com/RocketChat/Rocket.Chat/pull/24879)) + +- auto-join team channels not honoring user preferences ([#24779](https://github.com/RocketChat/Rocket.Chat/pull/24779) by [@ostjen](https://github.com/ostjen)) + +- Client disconnection on network loss ([#25170](https://github.com/RocketChat/Rocket.Chat/pull/25170) by [@amolghode1981](https://github.com/amolghode1981)) + + Agent gets disconnected (or Unregistered) from asterisk in multiple ways. The goal is that agent should remain online + unless agent explicitly logs off. + Agent can stop receiving calls in multiple ways due to network loss. Network loss can happen in following ways. + 1. User tries to switch the network. User experiences a glitch of disconnectivity. This can be simulated by turning the network off + in the network tab of chrome's dev tool. This can disconnect the UA if the disconnection happens just before the registration refresh. + 2. Second reason is when computer goes in sleep mode. + 3. Third reason is that when asterisk is crashed/in maintenance mode/explicitly stopped. + + Solution: + The idea is to detect the network disconnection and start the start the attempts to reconnect. + The detection of the disconnection does not happen in case#1. The SIPUA's UserAgent transport does not + call onDisconnected when network loss of such kind happens. To tackle this problem, window's online and offline event handlers are + used. + + The number of retries is configurable but ideally it is to be kept at -1. Whenever disconnection happens, it should keep on trying to + reconnect with increasing backoff time. This behaviour is useful when the asterisk is stopped. + + When the server is disconnected, it should be indicated on the phone button. + +- Close room when dismiss wrap up call modal ([#25056](https://github.com/RocketChat/Rocket.Chat/pull/25056)) + +- Custom sound error toast messages ([#24515](https://github.com/RocketChat/Rocket.Chat/pull/24515) by [@Himanshu664](https://github.com/Himanshu664)) + +- Database indexes not being created ([#25101](https://github.com/RocketChat/Rocket.Chat/pull/25101)) + +- Date Message Export Filter Fix ([#24542](https://github.com/RocketChat/Rocket.Chat/pull/24542) by [@eduardofcabrera](https://github.com/eduardofcabrera)) + + Fix message export filter to get all messages between "from date" and "to date", including "to date". + +- DDP Rate Limiter Translation key ([#24898](https://github.com/RocketChat/Rocket.Chat/pull/24898)) + + Before: + image + + + Now: + image + +- DDP streamer errors ([#24710](https://github.com/RocketChat/Rocket.Chat/pull/24710)) + +- Duplicated "jump to message" button on starred messages ([#24867](https://github.com/RocketChat/Rocket.Chat/pull/24867) by [@Himanshu664](https://github.com/Himanshu664)) + +- Dynamic load matrix is enabled and handle failure ([#25495](https://github.com/RocketChat/Rocket.Chat/pull/25495)) + +- End call button disappearing when on-hold ([#24936](https://github.com/RocketChat/Rocket.Chat/pull/24936)) + +- External search providers not working ([#24860](https://github.com/RocketChat/Rocket.Chat/pull/24860) by [@tkurz](https://github.com/tkurz)) + +- Full error message is visible ([#24856](https://github.com/RocketChat/Rocket.Chat/pull/24856) by [@Himanshu664](https://github.com/Himanshu664)) + +- GDPR action to forget visitor data on request ([#24441](https://github.com/RocketChat/Rocket.Chat/pull/24441)) + +- German translation for Monitore ([#24785](https://github.com/RocketChat/Rocket.Chat/pull/24785) by [@JMoVS](https://github.com/JMoVS)) + +- Handle Other Formats inside Upload Avatar ([#24226](https://github.com/RocketChat/Rocket.Chat/pull/24226)) + + After resolving issue #24213 : + + + https://user-images.githubusercontent.com/53515714/150325012-91413025-786e-4ce0-ae75-629f6b05b024.mp4 + +- Ignore customClass on messages ([#24845](https://github.com/RocketChat/Rocket.Chat/pull/24845)) + +- Implement client errors on ddp-streamer ([#24310](https://github.com/RocketChat/Rocket.Chat/pull/24310)) + +- Inconsistent validation of user's access to rooms ([#24037](https://github.com/RocketChat/Rocket.Chat/pull/24037) by [@ostjen](https://github.com/ostjen)) + +- Incorrect websocket url in livechat widget ([#25261](https://github.com/RocketChat/Rocket.Chat/pull/25261)) + +- Initial User not added to default channel ([#25544](https://github.com/RocketChat/Rocket.Chat/pull/25544)) + + If injecting initial user. The user wasn’t added to the default General channel + +- Issues on selecting users when importing CSV ([#24253](https://github.com/RocketChat/Rocket.Chat/pull/24253)) + + * Fix users selecting by fixing their _id + * Add condition to disable 'Start importing' button if `usersCount`, `channelsCount` and `messageCount` equals 0, or if messageCount is alone + * Remove `disabled={usersCount === 0}` on user Tab + +- LDAP avatars being rotated according to metadata even if the setting to rotate uploads is off ([#24320](https://github.com/RocketChat/Rocket.Chat/pull/24320)) + + - Use the `FileUpload_RotateImages` setting (**Administration > File Upload > Rotate images on upload**) to control whether avatars should be rotated automatically based on their data (XEIF); + - Display the avatar image preview (orientation) according to the `FileUpload_RotateImages` setting. + +- LDAP sync removing users from channels when multiple groups are mapped to it ([#25434](https://github.com/RocketChat/Rocket.Chat/pull/25434)) + +- Message menu action not working on legacy messages. ([#25148](https://github.com/RocketChat/Rocket.Chat/pull/25148)) + +- Message preview not available for queued chats ([#25092](https://github.com/RocketChat/Rocket.Chat/pull/25092)) + +- Missing dependency on useEffect at CallProvider ([#24882](https://github.com/RocketChat/Rocket.Chat/pull/24882)) + +- Nextcloud OAuth for incomplete token URL ([#24476](https://github.com/RocketChat/Rocket.Chat/pull/24476)) + +- OAuth mismatch redirect_uri error ([#24450](https://github.com/RocketChat/Rocket.Chat/pull/24450)) + +- Oembed request not respecting payload limit ([#24418](https://github.com/RocketChat/Rocket.Chat/pull/24418)) + +- Omnichannel managers can't join chats in progress ([#24553](https://github.com/RocketChat/Rocket.Chat/pull/24553)) + +- One of the triggers was not working correctly ([#25409](https://github.com/RocketChat/Rocket.Chat/pull/25409)) + +- Outgoing webhook without scripts not saving messages ([#24401](https://github.com/RocketChat/Rocket.Chat/pull/24401)) + +- Prevent Apps Bridge to remove visitor status from room ([#24305](https://github.com/RocketChat/Rocket.Chat/pull/24305)) + +- Prevent call button toggle when user is on call ([#24758](https://github.com/RocketChat/Rocket.Chat/pull/24758)) + +- Prevent sequential messages edited icon to hide on hover ([#24984](https://github.com/RocketChat/Rocket.Chat/pull/24984)) + + ### before + Screen Shot 2022-03-29 at 13 35 56 + + ### after + Screen Shot 2022-03-29 at 11 48 05 + +- Prune Message issue ([#24424](https://github.com/RocketChat/Rocket.Chat/pull/24424)) + +- Push privacy config to not show username not being respected ([#24606](https://github.com/RocketChat/Rocket.Chat/pull/24606)) + +- Read receipts show with color gray when not read yet ([#25244](https://github.com/RocketChat/Rocket.Chat/pull/25244)) + +- Read receipts showing before message read ([#25216](https://github.com/RocketChat/Rocket.Chat/pull/25216)) + +- Read receipts showing first messages of the room as read even if not read by everyone ([#24508](https://github.com/RocketChat/Rocket.Chat/pull/24508)) + +- Register with Secret URL ([#24921](https://github.com/RocketChat/Rocket.Chat/pull/24921)) + +- Replace encrypted text to Encrypted Message Placeholder ([#24166](https://github.com/RocketChat/Rocket.Chat/pull/24166)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/150807900-154a9cdb-ee13-4333-8628-f287ab914b40.png) + + ### after + Screenshot 2022-01-13 at 8 57 47 PM + +- Reply button behavior on broadcast channel ([#25175](https://github.com/RocketChat/Rocket.Chat/pull/25175)) + + Hide reply button for the user that sent the message + +- respect `Accounts_Registration_Users_Default_Roles` setting ([#24173](https://github.com/RocketChat/Rocket.Chat/pull/24173)) + + - Fix `user` role being added as default regardless of the `Accounts_Registration_Users_Default_Roles` setting. + +- Room archived/unarchived system messages aren't sent when editing room settings ([#24897](https://github.com/RocketChat/Rocket.Chat/pull/24897)) + + - Send the "Room archived" and "Room unarchived" system messages when editing room settings (and not only when rooms are archived/unarchived with the slash-command); + - Fix the "Hide System Messages" option for the "Room archived" and "Room unarchived" system messages; + +- Room context tabs not working in Omnichannel current chats page ([#24559](https://github.com/RocketChat/Rocket.Chat/pull/24559)) + +- room creation fails if app framework is disabled ([#25200](https://github.com/RocketChat/Rocket.Chat/pull/25200)) + +- Security Hotfix (https://docs.rocket.chat/guides/security/security-updates) + +- Several issues related to custom roles ([#24052](https://github.com/RocketChat/Rocket.Chat/pull/24052)) + + - Throw an error when trying to delete a role (User or Subscription role) that are still being used; + - Fix "Invalid Role" error for custom roles in Role Editing sidebar; + - Fix "Users in Role" screen for custom roles. + +- Showing Blank Message Inside Report ([#25007](https://github.com/RocketChat/Rocket.Chat/pull/25007)) + + https://user-images.githubusercontent.com/53515714/161038085-4a86c7ae-6751-4996-9767-b1c9e0331a6c.mp4 + +- Skip admin info in setup wizard for servers with admin registered ([#24485](https://github.com/RocketChat/Rocket.Chat/pull/24485)) + +- Skip cloud steps for registered servers on setup wizard ([#24407](https://github.com/RocketChat/Rocket.Chat/pull/24407)) + +- Slash commands previews not working ([#24387](https://github.com/RocketChat/Rocket.Chat/pull/24387) by [@ostjen](https://github.com/ostjen)) + +- Spotlight results showing usernames instead of real names ([#25471](https://github.com/RocketChat/Rocket.Chat/pull/25471)) + +- Startup errors creating indexes ([#24409](https://github.com/RocketChat/Rocket.Chat/pull/24409)) + + Fix `bio` and `prid` startup index creation errors. + +- Toolbox hiding under contextual bar ([#25237](https://github.com/RocketChat/Rocket.Chat/pull/25237)) + +- typo on register server tooltip of setup wizard ([#24466](https://github.com/RocketChat/Rocket.Chat/pull/24466)) + +- UI/UX issues on Live Chat widget ([#25407](https://github.com/RocketChat/Rocket.Chat/pull/25407)) + +- Use correct room property for call ended at ([#24932](https://github.com/RocketChat/Rocket.Chat/pull/24932)) + +- User abandonment setting was not working doe to failing event hook ([#25520](https://github.com/RocketChat/Rocket.Chat/pull/25520)) + + A setting watcher and the query for grabbing abandoned chats were broken, now they're not. + +- UserCard sanitization ([#25089](https://github.com/RocketChat/Rocket.Chat/pull/25089)) + + - Rewrites the component to TS + - Fixes some visual issues + + ### before + ![Screen Shot 2022-04-07 at 00 23 11](https://user-images.githubusercontent.com/27704687/162113925-5c9484d1-23e9-4623-8b86-3fbc71b461a1.png) + + ### after + ![Screen Shot 2022-04-07 at 00 07 13](https://user-images.githubusercontent.com/27704687/162112353-afd6aac6-b27c-4470-a642-631b8080d59e.png) + +- Video and Audio not skipping forward ([#19866](https://github.com/RocketChat/Rocket.Chat/pull/19866)) + +- VoIP disabled/enabled sequence puts voip agent in error state ([#25230](https://github.com/RocketChat/Rocket.Chat/pull/25230) by [@amolghode1981](https://github.com/amolghode1981)) + + Initially it was thought that the issue occurs because of the race condition while changing the client settings vs those settings reflected on server side. So a natural solution to solve this is to wait for setting change event 'private-settings-changed'. Then if 'VoIP_Enabled' is updated and it is true, set voipEnabled to true in useVoipClient.ts (on client side) + + It was realised that the race does not happen because of the database or server noticing the changes late. But because of the time taken to establish the AMI connection with Asterisk. + + Solution: + + 1. Change apps/meteor/app/voip/server/startup.ts. When VoIP_Enabled is changed, await for Voip.init() to complete and then broadcast connector.statuschanged with changed value. + 2. From apps/meteor/server/modules/listeners/listeners.module.ts use notifyLoggedInThisInstance to notify all logged in users on current instance. + 3. in apps/meteor/client/providers/CallProvider/hooks/useVoipClient.ts add the event handler that receives this event. Change voipEnabled from constant to state. Change this state based on the 'value' that is received by the handler. + +- Wrong business hour behavior ([#24896](https://github.com/RocketChat/Rocket.Chat/pull/24896)) + +
+🔍 Minor changes + + +- Bump @rocket.chat/emitter from 0.31.4 to 0.31.9 in /ee/server/services ([#25021](https://github.com/RocketChat/Rocket.Chat/pull/25021) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @rocket.chat/message-parser from 0.31.4 to 0.31.9 in /ee/server/services ([#25019](https://github.com/RocketChat/Rocket.Chat/pull/25019) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @rocket.chat/string-helpers from 0.31.4 to 0.31.9 in /ee/server/services ([#25018](https://github.com/RocketChat/Rocket.Chat/pull/25018) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @rocket.chat/ui-kit from 0.31.4 to 0.31.9 in /ee/server/services ([#25020](https://github.com/RocketChat/Rocket.Chat/pull/25020) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/clipboard from 2.0.1 to 2.0.7 ([#24832](https://github.com/RocketChat/Rocket.Chat/pull/24832) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/mailparser from 3.0.2 to 3.4.0 ([#24833](https://github.com/RocketChat/Rocket.Chat/pull/24833) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/nodemailer from 6.4.2 to 6.4.4 ([#24822](https://github.com/RocketChat/Rocket.Chat/pull/24822) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/ws from 8.2.2 to 8.2.3 in /ee/server/services ([#24556](https://github.com/RocketChat/Rocket.Chat/pull/24556) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/ws from 8.2.3 to 8.5.2 in /ee/server/services ([#24666](https://github.com/RocketChat/Rocket.Chat/pull/24666) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/ws from 8.5.2 to 8.5.3 in /ee/server/services ([#24820](https://github.com/RocketChat/Rocket.Chat/pull/24820) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump actions/checkout from 2 to 3 ([#24668](https://github.com/RocketChat/Rocket.Chat/pull/24668) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump actions/setup-node from 2 to 3 ([#24642](https://github.com/RocketChat/Rocket.Chat/pull/24642) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump adm-zip from 0.4.14 to 0.5.9 ([#24538](https://github.com/RocketChat/Rocket.Chat/pull/24538) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump body-parser from 1.19.0 to 1.19.1 in /ee/server/services ([#23963](https://github.com/RocketChat/Rocket.Chat/pull/23963) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump body-parser from 1.19.0 to 1.19.2 ([#24821](https://github.com/RocketChat/Rocket.Chat/pull/24821) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump body-parser from 1.19.1 to 1.19.2 in /ee/server/services ([#24517](https://github.com/RocketChat/Rocket.Chat/pull/24517) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump body-parser from 1.19.2 to 1.20.0 in /ee/server/services ([#25042](https://github.com/RocketChat/Rocket.Chat/pull/25042) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump cookie from 0.4.1 to 0.4.2 in /ee/server/services ([#24472](https://github.com/RocketChat/Rocket.Chat/pull/24472) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump date-fns from 2.24.0 to 2.28.0 ([#24058](https://github.com/RocketChat/Rocket.Chat/pull/24058) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump ejson from 2.2.1 to 2.2.2 ([#25057](https://github.com/RocketChat/Rocket.Chat/pull/25057) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump eslint-plugin-anti-trojan-source from 1.0.6 to 1.1.0 ([#25076](https://github.com/RocketChat/Rocket.Chat/pull/25076) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump express from 4.17.1 to 4.17.2 in /ee/server/services ([#24469](https://github.com/RocketChat/Rocket.Chat/pull/24469) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump express from 4.17.2 to 4.17.3 in /ee/server/services ([#24522](https://github.com/RocketChat/Rocket.Chat/pull/24522) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump follow-redirects from 1.14.7 to 1.14.8 in /ee/server/services ([#24491](https://github.com/RocketChat/Rocket.Chat/pull/24491) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump is-svg from 4.3.1 to 4.3.2 ([#24801](https://github.com/RocketChat/Rocket.Chat/pull/24801) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump jaeger-client from 3.18.1 to 3.19.0 in /ee/server/services ([#23961](https://github.com/RocketChat/Rocket.Chat/pull/23961) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump jschardet from 1.6.0 to 3.0.0 ([#23121](https://github.com/RocketChat/Rocket.Chat/pull/23121) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump minimist from 1.2.5 to 1.2.6 in /ee/server/services ([#24991](https://github.com/RocketChat/Rocket.Chat/pull/24991) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino and pino-pretty ([#25052](https://github.com/RocketChat/Rocket.Chat/pull/25052)) + +- Bump pino from 7.8.0 to 7.8.1 in /ee/server/services ([#24783](https://github.com/RocketChat/Rocket.Chat/pull/24783) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino from 7.8.1 to 7.9.1 in /ee/server/services ([#24869](https://github.com/RocketChat/Rocket.Chat/pull/24869) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino-pretty from 7.5.1 to 7.5.2 in /ee/server/services ([#24689](https://github.com/RocketChat/Rocket.Chat/pull/24689) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino-pretty from 7.5.2 to 7.5.3 in /ee/server/services ([#24698](https://github.com/RocketChat/Rocket.Chat/pull/24698) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino-pretty from 7.5.3 to 7.5.4 in /ee/server/services ([#24870](https://github.com/RocketChat/Rocket.Chat/pull/24870) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pm2 from 5.1.2 to 5.2.0 in /ee/server/services ([#24537](https://github.com/RocketChat/Rocket.Chat/pull/24537) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump prometheus-gc-stats from 0.6.2 to 0.6.3 ([#24803](https://github.com/RocketChat/Rocket.Chat/pull/24803) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump simple-get from 4.0.0 to 4.0.1 ([#24341](https://github.com/RocketChat/Rocket.Chat/pull/24341) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump sodium-native from 3.2.1 to 3.3.0 in /ee/server/services ([#23512](https://github.com/RocketChat/Rocket.Chat/pull/23512) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump template-file from 6.0.0 to 6.0.1 ([#25002](https://github.com/RocketChat/Rocket.Chat/pull/25002) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump ts-node from 10.5.0 to 10.6.0 in /ee/server/services ([#24667](https://github.com/RocketChat/Rocket.Chat/pull/24667) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump ts-node from 10.6.0 to 10.7.0 in /ee/server/services ([#24716](https://github.com/RocketChat/Rocket.Chat/pull/24716) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump underscore.string from 3.3.5 to 3.3.6 in /ee/server/services ([#24498](https://github.com/RocketChat/Rocket.Chat/pull/24498) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump url-parse from 1.5.3 to 1.5.7 ([#24528](https://github.com/RocketChat/Rocket.Chat/pull/24528) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump url-parse from 1.5.7 to 1.5.10 ([#24640](https://github.com/RocketChat/Rocket.Chat/pull/24640) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump vm2 from 3.9.5 to 3.9.7 in /ee/server/services ([#24509](https://github.com/RocketChat/Rocket.Chat/pull/24509) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore: `twoFactorRequired` signature ([#24518](https://github.com/RocketChat/Rocket.Chat/pull/24518)) + + Improved type checking for decorator `twoFactorRequired`. + +- Chore: Add description to global OTR setting ([#24333](https://github.com/RocketChat/Rocket.Chat/pull/24333) by [@pedrogssouza](https://github.com/pedrogssouza)) + +- Chore: Add E2E tests for livechat/room.close ([#24729](https://github.com/RocketChat/Rocket.Chat/pull/24729) by [@Muramatsu2602](https://github.com/Muramatsu2602)) + + * Create a new test suite file under tests/end-to-end/api/livechat + * Create tests for the following endpoint: + + ivechat/room.close + +- Chore: Add E2E tests for livechat/visitor ([#24764](https://github.com/RocketChat/Rocket.Chat/pull/24764) by [@Muramatsu2602](https://github.com/Muramatsu2602)) + + - Create a new test suite file under tests/end-to-end/api/livechat + - Create tests for the following endpoints: + + livechat/visitor (create visitor, update visitor, add custom fields to visitors) + +- Chore: Add error boundary to message component ([#25223](https://github.com/RocketChat/Rocket.Chat/pull/25223)) + + Not crash the whole application if something goes wrong in the MessageList component. + + ![image](https://user-images.githubusercontent.com/40830821/162269915-931c5c3c-c979-4234-b74c-371f67467ce0.png) + +- Chore: Add Livechat repo into Monorepo packages ([#25312](https://github.com/RocketChat/Rocket.Chat/pull/25312)) + +- Chore: Add options to debug stdout and rate limiter ([#25336](https://github.com/RocketChat/Rocket.Chat/pull/25336)) + +- Chore: Add root package.json to houston files ([#25286](https://github.com/RocketChat/Rocket.Chat/pull/25286)) + + See title + +- Chore: add some missing REST definitions ([#24925](https://github.com/RocketChat/Rocket.Chat/pull/24925) by [@gerzonc](https://github.com/gerzonc)) + + On the [mobile client](https://github.com/RocketChat/Rocket.Chat.ReactNative), we made an effort to collect more `REST API` definitions that are missing on the server side during our migration to TypeScript. Since we're both migrating to TypeScript, we thought it would be a good idea to share those so you guys can benefit from our initiative. + +- Chore: Add yarn plugin to check node and yarn version ([#25224](https://github.com/RocketChat/Rocket.Chat/pull/25224)) + +- Chore: added Server Instances endpoint types ([#24507](https://github.com/RocketChat/Rocket.Chat/pull/24507)) + + Created typing for endpoint definitions on `instances.ts`. + +- Chore: added settings endpoint types ([#24506](https://github.com/RocketChat/Rocket.Chat/pull/24506)) + + Created typing for endpoint definitions on `settings.ts`. + +- Chore: APIClass types ([#24747](https://github.com/RocketChat/Rocket.Chat/pull/24747)) + + This pull request creates a new `restivus` module (.d.ts) for the `api.js` file. + +- Chore: Bump fuselage ([#25371](https://github.com/RocketChat/Rocket.Chat/pull/25371)) + +- Chore: Bump Fuselage packages ([#25259](https://github.com/RocketChat/Rocket.Chat/pull/25259)) + +- Chore: Bump Fuselage packages ([#25015](https://github.com/RocketChat/Rocket.Chat/pull/25015)) + + It uses the last stable version of Fuselage packages. + +- Chore: Bump Fuselage packages ([#24573](https://github.com/RocketChat/Rocket.Chat/pull/24573)) + + It uses the last stable version of Fuselage packages. + +- Chore: bump fuselage version ([#24453](https://github.com/RocketChat/Rocket.Chat/pull/24453)) + +- Chore: Cancel running jobs if PR is updated ([#24708](https://github.com/RocketChat/Rocket.Chat/pull/24708)) + +- Chore: Convert admin custom sound to tsx ([#25128](https://github.com/RocketChat/Rocket.Chat/pull/25128)) + +- Chore: Convert JS files to Typescript ([#24410](https://github.com/RocketChat/Rocket.Chat/pull/24410)) + + This pull request converts 26 more files from Javascript to Typescript, to check variable types and increase validation on the code. + +- Chore: Convert LivechatAgentActivity to raw model and TS ([#25123](https://github.com/RocketChat/Rocket.Chat/pull/25123)) + +- Chore: Convert Mailer to TS ([#25121](https://github.com/RocketChat/Rocket.Chat/pull/25121)) + +- Chore: Convert NotificationStatus to TS ([#25125](https://github.com/RocketChat/Rocket.Chat/pull/25125)) + +- Chore: Convert server functions from javascript to typescript ([#24384](https://github.com/RocketChat/Rocket.Chat/pull/24384)) + + This pull request will be used to rewrite some functions on the Chat Engine to Typescript, in order to increase security and specify variable types on the code. + +- Chore: Convert to typescript the me slashCommands files ([#24321](https://github.com/RocketChat/Rocket.Chat/pull/24321) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert to typescript the me slashCommands files + +- Chore: Convert to typescript the mute and unmute slash commands files ([#24325](https://github.com/RocketChat/Rocket.Chat/pull/24325) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert to typescript the mute and unmute slash commands files + +- Chore: Convert to typescript the slash commands create files ([#24306](https://github.com/RocketChat/Rocket.Chat/pull/24306) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert Slash Commands create files to typescript. + +- Chore: Convert to typescript the slash commands invite files ([#24311](https://github.com/RocketChat/Rocket.Chat/pull/24311) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert to typescript the slash commands invite files + +- Chore: Convert to typescript the unarchive slash commands files ([#24331](https://github.com/RocketChat/Rocket.Chat/pull/24331) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert to typescript the unarchive slash commands files + +- Chore: converted more hooks to typescript ([#24628](https://github.com/RocketChat/Rocket.Chat/pull/24628)) + + Converted some functions on `client/hooks/` from JavaScript to Typescript. + +- Chore: Create README.md for Rest Typings ([#25335](https://github.com/RocketChat/Rocket.Chat/pull/25335)) + +- Chore: Delete unused file (NewAdminInfoPage.js) ([#24196](https://github.com/RocketChat/Rocket.Chat/pull/24196)) + + Just removing a duplicated/unused file. + +- Chore: ensure scripts use cross-env and ignore some dirs (ROC-54) ([#25218](https://github.com/RocketChat/Rocket.Chat/pull/25218)) + + - data and test-failure should be ignored + - ensure scripts use cross-env + +- Chore: Fix Cypress tests ([#24544](https://github.com/RocketChat/Rocket.Chat/pull/24544)) + +- Chore: Fix grammatical errors in Code of Conduct ([#24759](https://github.com/RocketChat/Rocket.Chat/pull/24759) by [@aadishJ01](https://github.com/aadishJ01)) + +- Chore: fix grammatical errors in Features ([#24771](https://github.com/RocketChat/Rocket.Chat/pull/24771) by [@aadishJ01](https://github.com/aadishJ01)) + +- Chore: Fix return type warnings ([#25275](https://github.com/RocketChat/Rocket.Chat/pull/25275)) + +- Chore: Get Settings Statistics ([#24397](https://github.com/RocketChat/Rocket.Chat/pull/24397)) + +- Chore: Improve logger to allow log of `unknown` values ([#24726](https://github.com/RocketChat/Rocket.Chat/pull/24726)) + +- Chore: Improve PR title validation regex ([#24467](https://github.com/RocketChat/Rocket.Chat/pull/24467)) + +- Chore: Improvements on role syncing (ldap, oauth and saml) ([#23824](https://github.com/RocketChat/Rocket.Chat/pull/23824)) + +- Chore: Js to ts slash commands archive ([#24304](https://github.com/RocketChat/Rocket.Chat/pull/24304) by [@eduardofcabrera](https://github.com/eduardofcabrera)) + + Convert Slash Commands archive files to typescript + +- Chore: Micro services fixes and cleanup ([#24753](https://github.com/RocketChat/Rocket.Chat/pull/24753)) + +- Chore: Migrate oauth2server to typescript ([#25126](https://github.com/RocketChat/Rocket.Chat/pull/25126)) + +- Chore: Minor dependency updates ([#25269](https://github.com/RocketChat/Rocket.Chat/pull/25269)) + +- Chore: Missing keys in APIsDisplay ([#24464](https://github.com/RocketChat/Rocket.Chat/pull/24464)) + +- Chore: Monorepo ([#25074](https://github.com/RocketChat/Rocket.Chat/pull/25074)) + +- Chore: move definitions to packages ([#25085](https://github.com/RocketChat/Rocket.Chat/pull/25085)) + +- Chore: organize test files and fix code coverage ([#24900](https://github.com/RocketChat/Rocket.Chat/pull/24900)) + +- Chore: Remove Alpine image deps after using them ([#25053](https://github.com/RocketChat/Rocket.Chat/pull/25053)) + +- Chore: Remove duplicated useUserRoom ([#25180](https://github.com/RocketChat/Rocket.Chat/pull/25180)) + +- Chore: Remove old files from removed Omnichannel feature ([#25129](https://github.com/RocketChat/Rocket.Chat/pull/25129)) + +- Chore: Remove old scripts ([#24911](https://github.com/RocketChat/Rocket.Chat/pull/24911)) + +- Chore: Remove package-lock.json from houston files ([#25280](https://github.com/RocketChat/Rocket.Chat/pull/25280)) + + Houston config in the `package.json` file still mentioned `package-lock.json`, but it doesn't exist anymore + +- Chore: Remove storybook build job from CI ([#24530](https://github.com/RocketChat/Rocket.Chat/pull/24530)) + +- Chore: Remove unused Drone CI files ([#25124](https://github.com/RocketChat/Rocket.Chat/pull/25124)) + +- Chore: roomTypes: Stop mixing client and server code together ([#24536](https://github.com/RocketChat/Rocket.Chat/pull/24536)) + +- Chore: Run tests using microservices deployment on CI ([#24513](https://github.com/RocketChat/Rocket.Chat/pull/24513)) + +- Chore: Set Docker image tag to latest only when really latest ([#24366](https://github.com/RocketChat/Rocket.Chat/pull/24366)) + +- Chore: Skip local services changes when shutting down duplicated services ([#24810](https://github.com/RocketChat/Rocket.Chat/pull/24810)) + +- Chore: Storybook mocking and examples improved ([#24969](https://github.com/RocketChat/Rocket.Chat/pull/24969)) + + - Stories from `ee/` included; + - Differentiate root story kinds; + - Mocking of `ServerContext` via Storybook parameters. + +- Chore: Sync with master ([#25284](https://github.com/RocketChat/Rocket.Chat/pull/25284)) + +- Chore: Template to generate packages ([#25174](https://github.com/RocketChat/Rocket.Chat/pull/25174)) + + ``` + npx hygen package new test + ``` + +- Chore: Tests with Playwright (task: All works) ([#25122](https://github.com/RocketChat/Rocket.Chat/pull/25122)) + +- Chore: Tests with Playwright (task: ROC-28, 09-channels) ([#25196](https://github.com/RocketChat/Rocket.Chat/pull/25196)) + +- Chore: TS conversion folder client ([#25031](https://github.com/RocketChat/Rocket.Chat/pull/25031)) + +- Chore: TS migration SortList ([#25167](https://github.com/RocketChat/Rocket.Chat/pull/25167)) + +- Chore: Unify ILivechatAgent with ILivechatAgentRecord ([#24406](https://github.com/RocketChat/Rocket.Chat/pull/24406)) + +- Chore: Update Apps-Engine ([#24651](https://github.com/RocketChat/Rocket.Chat/pull/24651)) + +- Chore: Update Apps-Engine ([#24568](https://github.com/RocketChat/Rocket.Chat/pull/24568)) + +- Chore: Update fuselage deps to match monolith versions ([#24501](https://github.com/RocketChat/Rocket.Chat/pull/24501)) + +- Chore: Update Livechat to the last version ([#25257](https://github.com/RocketChat/Rocket.Chat/pull/25257)) + +- Chore: Update Livechat version ([#25130](https://github.com/RocketChat/Rocket.Chat/pull/25130)) + +- Chore: Update Meteor to 2.5.6 ([#24461](https://github.com/RocketChat/Rocket.Chat/pull/24461)) + +- Chore: update OTR icon ([#24521](https://github.com/RocketChat/Rocket.Chat/pull/24521) by [@kibonusp](https://github.com/kibonusp)) + + I changed the shredder icon in OTR contextual bar to the stopwatch icon, recently added to the fuselage. + +- Chore: Update ws package ([#24477](https://github.com/RocketChat/Rocket.Chat/pull/24477)) + +- Chore(deps-dev): Bump @types/mock-require from 2.0.0 to 2.0.1 ([#24574](https://github.com/RocketChat/Rocket.Chat/pull/24574) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore(deps-dev): Bump ts-node from 10.0.0 to 10.5.0 in /ee/server/services ([#24435](https://github.com/RocketChat/Rocket.Chat/pull/24435) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore(deps): Bump node-fetch from 2.6.1 to 2.6.7 in /ee/server/services ([#24299](https://github.com/RocketChat/Rocket.Chat/pull/24299) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- i18n: Language update from LingoHub 🤖 on 2022-01-31Z ([#24357](https://github.com/RocketChat/Rocket.Chat/pull/24357)) + +- i18n: Language update from LingoHub 🤖 on 2022-02-07Z ([#24429](https://github.com/RocketChat/Rocket.Chat/pull/24429)) + +- i18n: Language update from LingoHub 🤖 on 2022-02-14Z ([#24493](https://github.com/RocketChat/Rocket.Chat/pull/24493)) + +- i18n: Language update from LingoHub 🤖 on 2022-02-21Z ([#24558](https://github.com/RocketChat/Rocket.Chat/pull/24558)) + +- i18n: Language update from LingoHub 🤖 on 2022-02-28Z ([#24644](https://github.com/RocketChat/Rocket.Chat/pull/24644)) + +- i18n: Language update from LingoHub 🤖 on 2022-03-07Z ([#24717](https://github.com/RocketChat/Rocket.Chat/pull/24717)) + +- i18n: Language update from LingoHub 🤖 on 2022-03-14Z ([#24823](https://github.com/RocketChat/Rocket.Chat/pull/24823)) + +- i18n: Language update from LingoHub 🤖 on 2022-03-21Z ([#24895](https://github.com/RocketChat/Rocket.Chat/pull/24895)) + +- i18n: Language update from LingoHub 🤖 on 2022-03-28Z ([#24971](https://github.com/RocketChat/Rocket.Chat/pull/24971)) + +- i18n: Language update from LingoHub 🤖 on 2022-04-04Z ([#25043](https://github.com/RocketChat/Rocket.Chat/pull/25043)) + +- Merge master into develop & Set version to 4.5.0-develop ([#24363](https://github.com/RocketChat/Rocket.Chat/pull/24363)) + +- Merge master into develop & Set version to 4.6.0-develop ([#24653](https://github.com/RocketChat/Rocket.Chat/pull/24653)) + +- Merge master into develop & Set version to 4.7.0-develop ([#25028](https://github.com/RocketChat/Rocket.Chat/pull/25028)) + +- Regression: Add `isPending` status to message ([#25299](https://github.com/RocketChat/Rocket.Chat/pull/25299)) + +- Regression: Add createdOTR index ([#25017](https://github.com/RocketChat/Rocket.Chat/pull/25017)) + +- Regression: Add eslint package to micro services Dockerfile ([#25311](https://github.com/RocketChat/Rocket.Chat/pull/25311)) + +- Regression: Add select message to system message and thread preview and allow select on legacy template ([#25251](https://github.com/RocketChat/Rocket.Chat/pull/25251)) + +- Regression: Add support to namespace within micro services ([#24581](https://github.com/RocketChat/Rocket.Chat/pull/24581)) + +- Regression: Admin Sidebar colors inverted. ([#24609](https://github.com/RocketChat/Rocket.Chat/pull/24609)) + +- Regression: Avatar not loading on first direct message ([#25211](https://github.com/RocketChat/Rocket.Chat/pull/25211)) + + fix avatar not loading on a first direct message + +- Regression: Better MongoDB connection management for micro services ([#25323](https://github.com/RocketChat/Rocket.Chat/pull/25323)) + +- Regression: bump onboarding-ui version ([#25320](https://github.com/RocketChat/Rocket.Chat/pull/25320)) + + - Bump to 'next' the onboarding-ui package from fuselage. + - Update from 'companyEmail' to 'email' adminData usage types + +- Regression: Bunch of settings fixes for VoIP ([#24594](https://github.com/RocketChat/Rocket.Chat/pull/24594)) + +- Regression: Call doesn't stop ringing after agent unregistration ([#24908](https://github.com/RocketChat/Rocket.Chat/pull/24908)) + +- Regression: Change preference to be default legacy messages ([#25255](https://github.com/RocketChat/Rocket.Chat/pull/25255)) + +- Regression: CI playwright ([#25168](https://github.com/RocketChat/Rocket.Chat/pull/25168)) + +- Regression: Custom roles displaying ID instead of name on some admin screens ([#24999](https://github.com/RocketChat/Rocket.Chat/pull/24999)) + + ![image](https://user-images.githubusercontent.com/55164754/160981416-555bcaa1-c075-4260-937c-64523472da43.png) + ![image](https://user-images.githubusercontent.com/55164754/160981452-6eae4e74-8425-4073-8256-472aba72b9db.png) + +- Regression: Do not show toast on incoming voip calls ([#24619](https://github.com/RocketChat/Rocket.Chat/pull/24619)) + +- Regression: Encode registration info as JWT when signing key is provided ([#24626](https://github.com/RocketChat/Rocket.Chat/pull/24626)) + +- Regression: Error is raised when there's no Asterisk queue available yet ([#24980](https://github.com/RocketChat/Rocket.Chat/pull/24980) by [@amolghode1981](https://github.com/amolghode1981)) + +- Regression: Error setting user avatars and mentioning rooms on Slack Import ([#24585](https://github.com/RocketChat/Rocket.Chat/pull/24585)) + + - Fix `Mentioned room not found` error when importing rooms from Slack; + - Fix `Forbidden` error when setting avatars for users imported from Slack (on user import/creation); + - Fix incorrect message count on imported rooms; + - Fix missing username on messages imported from Slack; + +- Regression: Error when trying to load name of dm rooms for avatars and notifications ([#24583](https://github.com/RocketChat/Rocket.Chat/pull/24583)) + +- Regression: eslint not running on packages ([#25305](https://github.com/RocketChat/Rocket.Chat/pull/25305)) + +- Regression: Extension List panel UI not aligned with designs ([#24645](https://github.com/RocketChat/Rocket.Chat/pull/24645)) + +- Regression: Fix account service login expiration ([#24920](https://github.com/RocketChat/Rocket.Chat/pull/24920)) + +- Regression: Fix CI monorepo build ([#25107](https://github.com/RocketChat/Rocket.Chat/pull/25107)) + +- Regression: Fix clicking on visitor's chat in the sidebar does not display the chat window ([#25380](https://github.com/RocketChat/Rocket.Chat/pull/25380)) + + Fix: livechat room not opening. + +- Regression: Fix double value on holdTime and empty msg on last message ([#24630](https://github.com/RocketChat/Rocket.Chat/pull/24630)) + +- Regression: Fix English i18n react text ([#25368](https://github.com/RocketChat/Rocket.Chat/pull/25368)) + + Incorrect text in reaction tooltip has been fixed + +- Regression: Fix federation Matrix bridge startup ([#25273](https://github.com/RocketChat/Rocket.Chat/pull/25273)) + +- Regression: Fix in-correct room status shown to agents ([#24592](https://github.com/RocketChat/Rocket.Chat/pull/24592)) + +- Regression: Fix incoming voip call ringtone is not ringing ([#24616](https://github.com/RocketChat/Rocket.Chat/pull/24616)) + +- Regression: Fix micro services Docker build ([#25193](https://github.com/RocketChat/Rocket.Chat/pull/25193)) + +- Regression: Fix multi line is not showing an empty line between lines ([#25317](https://github.com/RocketChat/Rocket.Chat/pull/25317)) + +- Regression: Fix reply button not working when hideFlexTab is enabled ([#25306](https://github.com/RocketChat/Rocket.Chat/pull/25306)) + +- Regression: Fix room not getting created due to null visitor status ([#24562](https://github.com/RocketChat/Rocket.Chat/pull/24562)) + +- Regression: Fix services Docker build on CI ([#25181](https://github.com/RocketChat/Rocket.Chat/pull/25181)) + +- Regression: Fix size of custom emoji and render emoji on thread message preview ([#25314](https://github.com/RocketChat/Rocket.Chat/pull/25314)) + +- Regression: Fix the alpine image and dev UX installing matrix-rust-sdk-bindings ([#25319](https://github.com/RocketChat/Rocket.Chat/pull/25319)) + + The package only included a few pre-built which caused all macs to have to compile every time they installed and also caused our alpine not to work. + + This temporarily switches to a fork of the matrix-appservice-bridge package. + + Made changes to one of its child dependencies `matrix-rust-sdk-bindings` that adds pre-built binaries for mac and musl (for alpine). + +- Regression: Fix time fields and wrap up in Voip Room Contexual bar ([#24625](https://github.com/RocketChat/Rocket.Chat/pull/24625)) + +- Regression: Fix time format on Voip system messages ([#24603](https://github.com/RocketChat/Rocket.Chat/pull/24603)) + +- Regression: Fix translation for call started message ([#24615](https://github.com/RocketChat/Rocket.Chat/pull/24615)) + +- Regression: Fix unexpected errors breaking ddp-streamer ([#24948](https://github.com/RocketChat/Rocket.Chat/pull/24948)) + +- Regression: Fix wrong tab name for VoIP settings ([#24647](https://github.com/RocketChat/Rocket.Chat/pull/24647)) + +- Regression: Fixes in Voice Contextual Bar and Directory ([#24596](https://github.com/RocketChat/Rocket.Chat/pull/24596)) + +- Regression: If Asterisk suddenly goes down, server has no way to know. Causes server to get stuck. Needs restart ([#24624](https://github.com/RocketChat/Rocket.Chat/pull/24624) by [@amolghode1981](https://github.com/amolghode1981)) + +- Regression: Improve Sidenav open/close handling and fixed codeql configs and E2E tests ([#24756](https://github.com/RocketChat/Rocket.Chat/pull/24756)) + +- Regression: Mark all rooms as read modal closing instantly. ([#24610](https://github.com/RocketChat/Rocket.Chat/pull/24610)) + +- Regression: Messages in new message template Crashing. ([#25327](https://github.com/RocketChat/Rocket.Chat/pull/25327)) + +- Regression: No audio when call comes from Skype/IP phone ([#24602](https://github.com/RocketChat/Rocket.Chat/pull/24602) by [@amolghode1981](https://github.com/amolghode1981)) + + The audio was not rendered because of re-rendering of react element based on + queueCounter and roomInfo. queueCounter and roomInfo cause the dom to re-render when call gets accepted + because after accepting call, queueCounter changes or a room gets created. + The audio element gets recreated. But VoIP user probably holds the old one. + The behaviour is not predictable when such case happens. If everything gets cleanly setup, + even if the audio element goes headless, it still continues to play the remote audio. + But in other cases, it is unreferenced the one on dom has its srcObject as null. + This causes no audio. + + This fix provides a way to re-initialise the rendering elements in VoIP user + and calls this function on useEffect() if the re-render has happen. + +- Regression: Prevent button from losing state when rerendering ([#24648](https://github.com/RocketChat/Rocket.Chat/pull/24648)) + +- Regression: Prevent connect to asterisk when VoIP is disabled ([#24601](https://github.com/RocketChat/Rocket.Chat/pull/24601)) + +- Regression: Queue counter aggregator for incoming/hanged calls ([#24635](https://github.com/RocketChat/Rocket.Chat/pull/24635) by [@amolghode1981](https://github.com/amolghode1981)) + +- Regression: Refresh server connection when MI server settings change ([#24649](https://github.com/RocketChat/Rocket.Chat/pull/24649)) + +- Regression: Register services right away ([#24800](https://github.com/RocketChat/Rocket.Chat/pull/24800)) + +- Regression: Revert Bugsnag version ([#25313](https://github.com/RocketChat/Rocket.Chat/pull/25313)) + +- Regression: Rocket.Chat Webapp not loading. ([#25349](https://github.com/RocketChat/Rocket.Chat/pull/25349)) + +- Regression: Role Sync not always working ([#24850](https://github.com/RocketChat/Rocket.Chat/pull/24850)) + +- Regression: Server crashing if Voip credentials are invalid ([#24646](https://github.com/RocketChat/Rocket.Chat/pull/24646)) + +- Regression: Show username and real name on the message system ([#25254](https://github.com/RocketChat/Rocket.Chat/pull/25254)) + +- Regression: Shows error if micro service cannot connect to Mongo ([#25301](https://github.com/RocketChat/Rocket.Chat/pull/25301)) + +- Regression: Use exact Node version on micro services Docker images ([#25287](https://github.com/RocketChat/Rocket.Chat/pull/25287)) + +- Regression: Validate empty fields for Message template ([#25250](https://github.com/RocketChat/Rocket.Chat/pull/25250)) + +- Regression: VoIP service button displayed when VoIP is disabled ([#24598](https://github.com/RocketChat/Rocket.Chat/pull/24598)) + +- Regression: yarn dev triggers build dependencies ([#25208](https://github.com/RocketChat/Rocket.Chat/pull/25208)) + +- Release 4.5.0 ([#24652](https://github.com/RocketChat/Rocket.Chat/pull/24652) by [@LucasFASouza](https://github.com/LucasFASouza) & [@aswinidev](https://github.com/aswinidev) & [@dependabot[bot]](https://github.com/dependabot[bot]) & [@lingohub[bot]](https://github.com/lingohub[bot]) & [@ostjen](https://github.com/ostjen)) + +- Release 4.5.1 ([#24782](https://github.com/RocketChat/Rocket.Chat/pull/24782) by [@Aman-Maheshwari](https://github.com/Aman-Maheshwari) & [@amolghode1981](https://github.com/amolghode1981) & [@cuonghuunguyen](https://github.com/cuonghuunguyen)) + +- Release 4.5.2 ([#24814](https://github.com/RocketChat/Rocket.Chat/pull/24814)) + +- Release 4.5.3 ([#24884](https://github.com/RocketChat/Rocket.Chat/pull/24884) by [@amolghode1981](https://github.com/amolghode1981)) + +- Release 4.5.4 ([#24938](https://github.com/RocketChat/Rocket.Chat/pull/24938)) + +- Release 4.5.5 ([#24998](https://github.com/RocketChat/Rocket.Chat/pull/24998)) + +- Release 4.6.0 ([#25027](https://github.com/RocketChat/Rocket.Chat/pull/25027) by [@amolghode1981](https://github.com/amolghode1981) & [@aswinidev](https://github.com/aswinidev) & [@dependabot[bot]](https://github.com/dependabot[bot]) & [@eduardofcabrera](https://github.com/eduardofcabrera) & [@lingohub[bot]](https://github.com/lingohub[bot])) + +- Release 4.6.1 ([#25095](https://github.com/RocketChat/Rocket.Chat/pull/25095)) + +- Release 4.6.2 ([#25191](https://github.com/RocketChat/Rocket.Chat/pull/25191) by [@sidmohanty11](https://github.com/sidmohanty11)) + +- Release 4.6.3 ([#25235](https://github.com/RocketChat/Rocket.Chat/pull/25235)) + +- Release 4.7.0 ([#25390](https://github.com/RocketChat/Rocket.Chat/pull/25390) by [@Himanshu664](https://github.com/Himanshu664) & [@dependabot[bot]](https://github.com/dependabot[bot]) & [@lingohub[bot]](https://github.com/lingohub[bot])) + +- Release 4.7.1 ([#25510](https://github.com/RocketChat/Rocket.Chat/pull/25510) by [@felipe-menelau](https://github.com/felipe-menelau)) + +- Release 4.7.2 ([#25580](https://github.com/RocketChat/Rocket.Chat/pull/25580)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Aman-Maheshwari](https://github.com/Aman-Maheshwari) +- [@Himanshu664](https://github.com/Himanshu664) +- [@JMoVS](https://github.com/JMoVS) +- [@LucasFASouza](https://github.com/LucasFASouza) +- [@Muramatsu2602](https://github.com/Muramatsu2602) +- [@aadishJ01](https://github.com/aadishJ01) +- [@aakash-gitdev](https://github.com/aakash-gitdev) +- [@amolghode1981](https://github.com/amolghode1981) +- [@aswinidev](https://github.com/aswinidev) +- [@cuonghuunguyen](https://github.com/cuonghuunguyen) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@eduardofcabrera](https://github.com/eduardofcabrera) +- [@felipe-menelau](https://github.com/felipe-menelau) +- [@gerzonc](https://github.com/gerzonc) +- [@kibonusp](https://github.com/kibonusp) +- [@lingohub[bot]](https://github.com/lingohub[bot]) +- [@ostjen](https://github.com/ostjen) +- [@paulobernardoaf](https://github.com/paulobernardoaf) +- [@pedrogssouza](https://github.com/pedrogssouza) +- [@sidmohanty11](https://github.com/sidmohanty11) +- [@tkurz](https://github.com/tkurz) +- [@ujorgeleite](https://github.com/ujorgeleite) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@AllanPazRibeiro](https://github.com/AllanPazRibeiro) +- [@KevLehman](https://github.com/KevLehman) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@alansikora](https://github.com/alansikora) +- [@albuquerquefabio](https://github.com/albuquerquefabio) +- [@cauefcr](https://github.com/cauefcr) +- [@d-gubert](https://github.com/d-gubert) +- [@debdutdeb](https://github.com/debdutdeb) +- [@dougfabris](https://github.com/dougfabris) +- [@felipe-rod123](https://github.com/felipe-rod123) +- [@filipemarins](https://github.com/filipemarins) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@guijun13](https://github.com/guijun13) +- [@jeanfbrito](https://github.com/jeanfbrito) +- [@juliajforesti](https://github.com/juliajforesti) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@murtaza98](https://github.com/murtaza98) +- [@nishant23122000](https://github.com/nishant23122000) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rique223](https://github.com/rique223) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@souzaramon](https://github.com/souzaramon) +- [@tassoevan](https://github.com/tassoevan) +- [@tiagoevanp](https://github.com/tiagoevanp) +- [@tmontini](https://github.com/tmontini) +- [@weslley543](https://github.com/weslley543) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 4.4.3 +`2022-04-07 · 2 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.2` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.30.0` + +### 🐛 Bug fixes + + +- NPS never finishing sending results ([#25067](https://github.com/RocketChat/Rocket.Chat/pull/25067)) + +- Proxy settings being ignored ([#25022](https://github.com/RocketChat/Rocket.Chat/pull/25022)) + + Modify Meteor's `HTTP.call` to add back proxy support + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) + # 4.4.2 -`2022-02-09 · 1 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` +`2022-02-09 · 1 🐛 · 2 🔍 · 3 👩‍💻👨‍💻` ### Engine versions - Node: `14.18.2` @@ -19,11 +7687,14 @@ - Chore: bump fuselage version ([#24453](https://github.com/RocketChat/Rocket.Chat/pull/24453)) +- Release 4.4.2 ([#24459](https://github.com/RocketChat/Rocket.Chat/pull/24459)) +
### 👩‍💻👨‍💻 Core Team 🤓 - [@dougfabris](https://github.com/dougfabris) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) - [@sampaiodiego](https://github.com/sampaiodiego) # 4.4.1 @@ -46,7 +7717,7 @@ - Skip cloud steps for registered servers on setup wizard ([#24407](https://github.com/RocketChat/Rocket.Chat/pull/24407)) -- Slash commands previews not working ([#24387](https://github.com/RocketChat/Rocket.Chat/pull/24387)) +- Slash commands previews not working ([#24387](https://github.com/RocketChat/Rocket.Chat/pull/24387) by [@ostjen](https://github.com/ostjen)) - Startup errors creating indexes ([#24409](https://github.com/RocketChat/Rocket.Chat/pull/24409)) @@ -56,15 +7727,18 @@ 🔍 Minor changes -- Release 4.4.1 ([#24432](https://github.com/RocketChat/Rocket.Chat/pull/24432)) +- Release 4.4.1 ([#24432](https://github.com/RocketChat/Rocket.Chat/pull/24432) by [@ostjen](https://github.com/ostjen)) +### 👩‍💻👨‍💻 Contributors 😍 + +- [@ostjen](https://github.com/ostjen) + ### 👩‍💻👨‍💻 Core Team 🤓 - [@dougfabris](https://github.com/dougfabris) - [@gabriellsh](https://github.com/gabriellsh) -- [@ostjen](https://github.com/ostjen) - [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) - [@sampaiodiego](https://github.com/sampaiodiego) - [@tassoevan](https://github.com/tassoevan) @@ -125,9 +7799,9 @@ ![Screen Shot 2022-01-13 at 13 38 59](https://user-images.githubusercontent.com/27704687/149371232-3d292f5e-e8b0-41e1-b065-90a80a5f08ce.png) ![Screen Shot 2022-01-13 at 13 39 08](https://user-images.githubusercontent.com/27704687/149371263-64fd09e4-456e-48ee-9976-83f42b90e4d9.png) -- Importer text for CSV upload file format ([#23817](https://github.com/RocketChat/Rocket.Chat/pull/23817)) +- Importer text for CSV upload file format ([#23817](https://github.com/RocketChat/Rocket.Chat/pull/23817) by [@ostjen](https://github.com/ostjen)) -- lib/Statistics improved and metrics collector ([#24177](https://github.com/RocketChat/Rocket.Chat/pull/24177)) +- lib/Statistics improved and metrics collector ([#24177](https://github.com/RocketChat/Rocket.Chat/pull/24177) by [@ostjen](https://github.com/ostjen)) - On `statistics` object the property `get` is an async function now. - We need to collect additional data of feature activation through the statistics collector. @@ -247,7 +7921,7 @@ Right now, if we try to press enter for a new line on multi-line modal input... it auto triggers the submit event. This PR fixes this behaviour by not submitting the modal in case the enter was pressed within an input text with multiline expected -- Errors on advanced sync prevent LDAP users from logging in ([#23958](https://github.com/RocketChat/Rocket.Chat/pull/23958)) +- Errors on advanced sync prevent LDAP users from logging in ([#23958](https://github.com/RocketChat/Rocket.Chat/pull/23958) by [@ostjen](https://github.com/ostjen)) - Filter ability for admin room checkboxes ([#23970](https://github.com/RocketChat/Rocket.Chat/pull/23970) by [@sidmohanty11](https://github.com/sidmohanty11)) @@ -283,7 +7957,7 @@ We should not keep `password` as required field when we check set random password field. In this password should not be required -- Solved Report Message Blank ([#24262](https://github.com/RocketChat/Rocket.Chat/pull/24262) by [@nishant23122000](https://github.com/nishant23122000)) +- Solved Report Message Blank ([#24262](https://github.com/RocketChat/Rocket.Chat/pull/24262)) After resolving issue #24261 : @@ -337,7 +8011,7 @@ It replaces some templates used by login and invitation flows with React components. It also drops `main` template, allowing `appLayout` to just handle components now. -- Chore: Slash Commands Join to Typescript ([#24254](https://github.com/RocketChat/Rocket.Chat/pull/24254)) +- Chore: Slash Commands Join to Typescript ([#24254](https://github.com/RocketChat/Rocket.Chat/pull/24254) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) Convert the slash commands .js files to .ts files. @@ -418,9 +8092,10 @@ - [@arshxyz](https://github.com/arshxyz) - [@aswinidev](https://github.com/aswinidev) - [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@eduardofcabrera](https://github.com/eduardofcabrera) - [@grahhnt](https://github.com/grahhnt) - [@mbreslein-thd](https://github.com/mbreslein-thd) -- [@nishant23122000](https://github.com/nishant23122000) +- [@ostjen](https://github.com/ostjen) - [@sidmohanty11](https://github.com/sidmohanty11) ### 👩‍💻👨‍💻 Core Team 🤓 @@ -433,14 +8108,13 @@ - [@d-gubert](https://github.com/d-gubert) - [@debdutdeb](https://github.com/debdutdeb) - [@dougfabris](https://github.com/dougfabris) -- [@eduardofcabrera](https://github.com/eduardofcabrera) - [@gabriellsh](https://github.com/gabriellsh) - [@geekgonecrazy](https://github.com/geekgonecrazy) - [@ggazzo](https://github.com/ggazzo) - [@juliajforesti](https://github.com/juliajforesti) - [@matheusbsilva137](https://github.com/matheusbsilva137) - [@murtaza98](https://github.com/murtaza98) -- [@ostjen](https://github.com/ostjen) +- [@nishant23122000](https://github.com/nishant23122000) - [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) - [@renatobecker](https://github.com/renatobecker) - [@rique223](https://github.com/rique223) @@ -664,7 +8338,7 @@ - DMs being created with username instead of user's name ([#23848](https://github.com/RocketChat/Rocket.Chat/pull/23848)) -- Email notifications settings not being honored on new DMs ([#23574](https://github.com/RocketChat/Rocket.Chat/pull/23574)) +- Email notifications settings not being honored on new DMs ([#23574](https://github.com/RocketChat/Rocket.Chat/pull/23574) by [@ostjen](https://github.com/ostjen)) - Error when creating an inactive user in admin panel ([#23859](https://github.com/RocketChat/Rocket.Chat/pull/23859)) @@ -768,7 +8442,7 @@ - Bump thehanimo/pr-title-checker from 1.2 to 1.3.4 ([#23853](https://github.com/RocketChat/Rocket.Chat/pull/23853) by [@dependabot[bot]](https://github.com/dependabot[bot])) -- Chore: added last login to users.list ([#23846](https://github.com/RocketChat/Rocket.Chat/pull/23846)) +- Chore: added last login to users.list ([#23846](https://github.com/RocketChat/Rocket.Chat/pull/23846) by [@ostjen](https://github.com/ostjen)) - Chore: Bump fuselage 0.31.0 ([#24046](https://github.com/RocketChat/Rocket.Chat/pull/24046)) @@ -784,7 +8458,7 @@ - Create NPM script to add new migrations - TODO: Infer next migration number from file list -- Chore: Deleted LivechatPageVisited ([#23993](https://github.com/RocketChat/Rocket.Chat/pull/23993)) +- Chore: Deleted LivechatPageVisited ([#23993](https://github.com/RocketChat/Rocket.Chat/pull/23993) by [@ostjen](https://github.com/ostjen)) - Chore: Enable prefer-optional-chain ESLint rule for TypeScript files ([#23786](https://github.com/RocketChat/Rocket.Chat/pull/23786)) @@ -884,6 +8558,7 @@ - [@aswinidev](https://github.com/aswinidev) - [@dependabot[bot]](https://github.com/dependabot[bot]) - [@goyome](https://github.com/goyome) +- [@ostjen](https://github.com/ostjen) - [@qwertiko](https://github.com/qwertiko) - [@rafaelblink](https://github.com/rafaelblink) - [@sidmohanty11](https://github.com/sidmohanty11) @@ -902,7 +8577,6 @@ - [@juliajforesti](https://github.com/juliajforesti) - [@matheusbsilva137](https://github.com/matheusbsilva137) - [@murtaza98](https://github.com/murtaza98) -- [@ostjen](https://github.com/ostjen) - [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) - [@renatobecker](https://github.com/renatobecker) - [@rique223](https://github.com/rique223) @@ -1021,13 +8695,13 @@ Open the Enterprise LDAP API that executes background sync to be used without any Enterprise License and enforce 2FA requirements. -- Permission for download/uploading files on mobile ([#23686](https://github.com/RocketChat/Rocket.Chat/pull/23686)) +- Permission for download/uploading files on mobile ([#23686](https://github.com/RocketChat/Rocket.Chat/pull/23686) by [@ostjen](https://github.com/ostjen)) - Permissions for interacting with Omnichannel Contact Center ([#23389](https://github.com/RocketChat/Rocket.Chat/pull/23389)) Adds a new permission, one that allows for control over user access to Omnichannel Contact Center, -- Rate limiting for user registering ([#23732](https://github.com/RocketChat/Rocket.Chat/pull/23732)) +- Rate limiting for user registering ([#23732](https://github.com/RocketChat/Rocket.Chat/pull/23732) by [@ostjen](https://github.com/ostjen)) - REST endpoints to manage Omnichannel Business Units ([#23750](https://github.com/RocketChat/Rocket.Chat/pull/23750)) @@ -1084,7 +8758,7 @@ ### 🐛 Bug fixes -- "to users" not working in export message ([#23576](https://github.com/RocketChat/Rocket.Chat/pull/23576)) +- "to users" not working in export message ([#23576](https://github.com/RocketChat/Rocket.Chat/pull/23576) by [@ostjen](https://github.com/ostjen)) - **ENTERPRISE:** OAuth "Merge Roles" removes roles from users ([#23588](https://github.com/RocketChat/Rocket.Chat/pull/23588)) @@ -1124,7 +8798,7 @@ - Fix typo in FR translation ([#23711](https://github.com/RocketChat/Rocket.Chat/pull/23711) by [@Cormoran96](https://github.com/Cormoran96)) -- Fixed E2E default room settings not being honoured ([#23468](https://github.com/RocketChat/Rocket.Chat/pull/23468) by [@TheDigitalEagle](https://github.com/TheDigitalEagle)) +- Fixed E2E default room settings not being honoured ([#23468](https://github.com/RocketChat/Rocket.Chat/pull/23468) by [@TheDigitalEagle](https://github.com/TheDigitalEagle) & [@ostjen](https://github.com/ostjen)) - LDAP users being disabled when an AD security policy is enabled ([#23820](https://github.com/RocketChat/Rocket.Chat/pull/23820)) @@ -1164,7 +8838,7 @@ When you take an Omnichannel chat from queue, the guest's typing information will appear. -- Registration not possible when any user is blocked for multiple failed logins ([#23565](https://github.com/RocketChat/Rocket.Chat/pull/23565)) +- Registration not possible when any user is blocked for multiple failed logins ([#23565](https://github.com/RocketChat/Rocket.Chat/pull/23565) by [@ostjen](https://github.com/ostjen))
🔍 Minor changes @@ -1265,6 +8939,7 @@ - [@TheDigitalEagle](https://github.com/TheDigitalEagle) - [@bhardwajaditya](https://github.com/bhardwajaditya) - [@dhruvjain99](https://github.com/dhruvjain99) +- [@ostjen](https://github.com/ostjen) ### 👩‍💻👨‍💻 Core Team 🤓 @@ -1278,7 +8953,6 @@ - [@ggazzo](https://github.com/ggazzo) - [@matheusbsilva137](https://github.com/matheusbsilva137) - [@murtaza98](https://github.com/murtaza98) -- [@ostjen](https://github.com/ostjen) - [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) - [@renatobecker](https://github.com/renatobecker) - [@rodrigok](https://github.com/rodrigok) @@ -1286,6 +8960,30 @@ - [@tassoevan](https://github.com/tassoevan) - [@tiagoevanp](https://github.com/tiagoevanp) +# 4.1.6 +`2022-06-02 · 1 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` + +### 🐛 Bug fixes + + +- Omnichannel managers can't join chats in progress ([#24553](https://github.com/RocketChat/Rocket.Chat/pull/24553)) + +
+🔍 Minor changes + + +- Regression: Fix in-correct room status shown to agents ([#24592](https://github.com/RocketChat/Rocket.Chat/pull/24592)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@murtaza98](https://github.com/murtaza98) +- [@renatobecker](https://github.com/renatobecker) + # 4.1.2 `2021-11-08 · 3 🐛 · 3 👩‍💻👨‍💻` @@ -1370,7 +9068,7 @@ Since now we're supporting markdown text on this field (via this PR - https://github.com/RocketChat/Rocket.Chat.Livechat/pull/648), it would be nice to make this setting multiline so users can have more space to edit the text ![image](https://user-images.githubusercontent.com/34130764/138146712-13e4968b-5312-4d53-b44c-b5699c5e49c1.png) -- optimized groups.listAll response time ([#22941](https://github.com/RocketChat/Rocket.Chat/pull/22941)) +- optimized groups.listAll response time ([#22941](https://github.com/RocketChat/Rocket.Chat/pull/22941) by [@ostjen](https://github.com/ostjen)) groups.listAll endpoint was having performance issues, specially when the total number of groups was high. This happened because the endpoint was loading all objects in memory then using splice to paginate, instead of paginating beforehand. @@ -1398,7 +9096,7 @@ - Attachment buttons overlap in mobile view ([#23377](https://github.com/RocketChat/Rocket.Chat/pull/23377) by [@Aman-Maheshwari](https://github.com/Aman-Maheshwari)) -- Avoid last admin deactivate itself ([#22949](https://github.com/RocketChat/Rocket.Chat/pull/22949)) +- Avoid last admin deactivate itself ([#22949](https://github.com/RocketChat/Rocket.Chat/pull/22949) by [@ostjen](https://github.com/ostjen)) Co-authored-by: @Kartik18g @@ -1408,7 +9106,7 @@ - Delay start of email inbox ([#23521](https://github.com/RocketChat/Rocket.Chat/pull/23521)) -- imported migration v240 ([#23374](https://github.com/RocketChat/Rocket.Chat/pull/23374)) +- imported migration v240 ([#23374](https://github.com/RocketChat/Rocket.Chat/pull/23374) by [@ostjen](https://github.com/ostjen)) - LDAP not stoping after wrong password ([#23382](https://github.com/RocketChat/Rocket.Chat/pull/23382)) @@ -1451,7 +9149,7 @@ - Server crashing when Routing method is not available at start ([#23473](https://github.com/RocketChat/Rocket.Chat/pull/23473)) -- unwanted toastr error message when deleting user ([#23372](https://github.com/RocketChat/Rocket.Chat/pull/23372)) +- unwanted toastr error message when deleting user ([#23372](https://github.com/RocketChat/Rocket.Chat/pull/23372) by [@ostjen](https://github.com/ostjen)) - useEndpointAction replace by useEndpointActionExperimental ([#23469](https://github.com/RocketChat/Rocket.Chat/pull/23469)) @@ -1586,6 +9284,7 @@ - [@badbart](https://github.com/badbart) - [@cuonghuunguyen](https://github.com/cuonghuunguyen) - [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@ostjen](https://github.com/ostjen) - [@wolbernd](https://github.com/wolbernd) ### 👩‍💻👨‍💻 Core Team 🤓 @@ -1599,7 +9298,6 @@ - [@ggazzo](https://github.com/ggazzo) - [@matheusbsilva137](https://github.com/matheusbsilva137) - [@murtaza98](https://github.com/murtaza98) -- [@ostjen](https://github.com/ostjen) - [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) - [@rodrigok](https://github.com/rodrigok) - [@sampaiodiego](https://github.com/sampaiodiego) @@ -1759,7 +9457,7 @@ Fixes BigBlueButton integration -- imported migration v240 ([#23374](https://github.com/RocketChat/Rocket.Chat/pull/23374)) +- imported migration v240 ([#23374](https://github.com/RocketChat/Rocket.Chat/pull/23374) by [@ostjen](https://github.com/ostjen)) - LDAP not stoping after wrong password ([#23382](https://github.com/RocketChat/Rocket.Chat/pull/23382)) @@ -1767,7 +9465,7 @@ - resumeToken not working ([#23379](https://github.com/RocketChat/Rocket.Chat/pull/23379)) -- unwanted toastr error message when deleting user ([#23372](https://github.com/RocketChat/Rocket.Chat/pull/23372)) +- unwanted toastr error message when deleting user ([#23372](https://github.com/RocketChat/Rocket.Chat/pull/23372) by [@ostjen](https://github.com/ostjen)) - Users' `roles` and `type` being reset to default on LDAP DataSync ([#23378](https://github.com/RocketChat/Rocket.Chat/pull/23378)) @@ -1779,19 +9477,19 @@ - Chore: Update Apps-Engine version ([#23375](https://github.com/RocketChat/Rocket.Chat/pull/23375)) -- Release 4.0.1 ([#23386](https://github.com/RocketChat/Rocket.Chat/pull/23386) by [@wolbernd](https://github.com/wolbernd)) +- Release 4.0.1 ([#23386](https://github.com/RocketChat/Rocket.Chat/pull/23386) by [@ostjen](https://github.com/ostjen) & [@wolbernd](https://github.com/wolbernd))
### 👩‍💻👨‍💻 Contributors 😍 +- [@ostjen](https://github.com/ostjen) - [@wolbernd](https://github.com/wolbernd) ### 👩‍💻👨‍💻 Core Team 🤓 - [@d-gubert](https://github.com/d-gubert) - [@matheusbsilva137](https://github.com/matheusbsilva137) -- [@ostjen](https://github.com/ostjen) - [@rodrigok](https://github.com/rodrigok) - [@sampaiodiego](https://github.com/sampaiodiego) - [@tassoevan](https://github.com/tassoevan) @@ -1826,13 +9524,13 @@ - LDAP Refactoring ([#23171](https://github.com/RocketChat/Rocket.Chat/pull/23171)) -- Moved advanced oAuth features to EE ([#23201](https://github.com/RocketChat/Rocket.Chat/pull/23201)) +- Moved advanced oAuth features to EE ([#23201](https://github.com/RocketChat/Rocket.Chat/pull/23201) by [@ostjen](https://github.com/ostjen)) -- Moved role-sync and advanced SAML settings to EE ([#23107](https://github.com/RocketChat/Rocket.Chat/pull/23107)) +- Moved role-sync and advanced SAML settings to EE ([#23107](https://github.com/RocketChat/Rocket.Chat/pull/23107) by [@ostjen](https://github.com/ostjen)) -- Moved SAML custom field map to EE ([#23319](https://github.com/RocketChat/Rocket.Chat/pull/23319)) +- Moved SAML custom field map to EE ([#23319](https://github.com/RocketChat/Rocket.Chat/pull/23319) by [@ostjen](https://github.com/ostjen)) -- Remove cordova compatibility setting ([#23302](https://github.com/RocketChat/Rocket.Chat/pull/23302)) +- Remove cordova compatibility setting ([#23302](https://github.com/RocketChat/Rocket.Chat/pull/23302) by [@ostjen](https://github.com/ostjen)) - Remove deprecated endpoints ([#23162](https://github.com/RocketChat/Rocket.Chat/pull/23162)) @@ -1859,9 +9557,9 @@ This aims to clean up the code, since upgrades jumping 2 major versions are too risky and hard to maintain, we'll keep only migration from that last major (in this case 3.x). -- Remove patch info from endpoint /api/info for non-logged in users ([#16050](https://github.com/RocketChat/Rocket.Chat/pull/16050) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove patch info from endpoint /api/info for non-logged in users ([#16050](https://github.com/RocketChat/Rocket.Chat/pull/16050)) -- Removed support of MongoDB 3.4; Deprecated MongoDB 3.6 and 4.0 ([#22907](https://github.com/RocketChat/Rocket.Chat/pull/22907)) +- Removed support of MongoDB 3.4; Deprecated MongoDB 3.6 and 4.0 ([#22907](https://github.com/RocketChat/Rocket.Chat/pull/22907) by [@ostjen](https://github.com/ostjen)) - Stop sending audio notifications via stream ([#23108](https://github.com/RocketChat/Rocket.Chat/pull/23108)) @@ -1959,7 +9657,7 @@ - Use `encodeURIComponent()` to encode values received by `_generateQueryFromParams()`. -- "Read Only" and "Allow Reacting" system messages are missing in rooms ([#23037](https://github.com/RocketChat/Rocket.Chat/pull/23037)) +- "Read Only" and "Allow Reacting" system messages are missing in rooms ([#23037](https://github.com/RocketChat/Rocket.Chat/pull/23037) by [@ostjen](https://github.com/ostjen)) - Add system message to notify changes on the **"Read Only"** setting; - Add system message to notify changes on the **"Allow Reacting"** setting; @@ -1976,7 +9674,7 @@ - Check which fields have been updated before throwing errors in `validateUserEditing`. -- Inaccurate use of 'Mobile notifications' instead of 'Push notifications' in i18n strings ([#22978](https://github.com/RocketChat/Rocket.Chat/pull/22978)) +- Inaccurate use of 'Mobile notifications' instead of 'Push notifications' in i18n strings ([#22978](https://github.com/RocketChat/Rocket.Chat/pull/22978) by [@ostjen](https://github.com/ostjen)) - Fix inaccurate use of 'Mobile notifications' (which is misleading in German) by 'Push notifications'; - Update `'Notification_Mobile_Default_For'` key to `'Notification_Push_Default_For'` (and text to 'Send Push Notifications For' for English Language); @@ -2035,7 +9733,7 @@ - Update bugsnag package ([#23104](https://github.com/RocketChat/Rocket.Chat/pull/23104)) -- User list not being updated after creation/deletion of user ([#23032](https://github.com/RocketChat/Rocket.Chat/pull/23032)) +- User list not being updated after creation/deletion of user ([#23032](https://github.com/RocketChat/Rocket.Chat/pull/23032) by [@ostjen](https://github.com/ostjen)) - Wrap canned-responses endpoints with ee license ([#23204](https://github.com/RocketChat/Rocket.Chat/pull/23204)) @@ -2178,7 +9876,7 @@ Spotted by @gabriellsh. -- Regression: Removed exclusive tests statement ([#23333](https://github.com/RocketChat/Rocket.Chat/pull/23333)) +- Regression: Removed exclusive tests statement ([#23333](https://github.com/RocketChat/Rocket.Chat/pull/23333) by [@ostjen](https://github.com/ostjen)) - Regression: Request seats link ([#23312](https://github.com/RocketChat/Rocket.Chat/pull/23312)) @@ -2202,17 +9900,18 @@ ### 👩‍💻👨‍💻 Contributors 😍 -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@cuonghuunguyen](https://github.com/cuonghuunguyen) - [@dependabot[bot]](https://github.com/dependabot[bot]) - [@g-thome](https://github.com/g-thome) - [@gabrieloliverio](https://github.com/gabrieloliverio) - [@lucassartor](https://github.com/lucassartor) +- [@ostjen](https://github.com/ostjen) - [@sumukhah](https://github.com/sumukhah) ### 👩‍💻👨‍💻 Core Team 🤓 - [@KevLehman](https://github.com/KevLehman) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@MartinSchoeler](https://github.com/MartinSchoeler) - [@casalsgh](https://github.com/casalsgh) - [@d-gubert](https://github.com/d-gubert) @@ -2223,7 +9922,6 @@ - [@graywolf336](https://github.com/graywolf336) - [@matheusbsilva137](https://github.com/matheusbsilva137) - [@murtaza98](https://github.com/murtaza98) -- [@ostjen](https://github.com/ostjen) - [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) - [@renatobecker](https://github.com/renatobecker) - [@rodrigok](https://github.com/rodrigok) @@ -2232,6 +9930,36 @@ - [@thassiov](https://github.com/thassiov) - [@tiagoevanp](https://github.com/tiagoevanp) +# 3.18.7 +`2022-05-30 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- MongoDB: `3.4, 3.6, 4.0, 4.2` + +### 🐛 Bug fixes + + +- Security Hotfix (https://docs.rocket.chat/guides/security/security-updates) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) + +# 3.18.6 +`2022-05-26 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- MongoDB: `3.4, 3.6, 4.0, 4.2` + +### 🐛 Bug fixes + + +- Security Hotfix (https://docs.rocket.chat/guides/security/security-updates) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) + # 3.18.2 `2021-10-01 · 2 🐛 · 2 🔍 · 4 👩‍💻👨‍💻` @@ -2389,15 +10117,15 @@ - Bad words falling if message is empty ([#22930](https://github.com/RocketChat/Rocket.Chat/pull/22930)) -- Broken download link on uploaded files ([#22848](https://github.com/RocketChat/Rocket.Chat/pull/22848)) +- Broken download link on uploaded files ([#22848](https://github.com/RocketChat/Rocket.Chat/pull/22848) by [@ostjen](https://github.com/ostjen)) Uploaded files had wrong download links when the deploy had a sub directory. This misbehavior was caused by the wrong usage of the rtrim method, the 2nd parameter is a list of chars, [not a string](https://www.php.net/manual/pt_BR/function.rtrim.php) (this method was inspired by php) -- Can't access other administration menus after opening Engagement Dashboard ([#22870](https://github.com/RocketChat/Rocket.Chat/pull/22870)) +- Can't access other administration menus after opening Engagement Dashboard ([#22870](https://github.com/RocketChat/Rocket.Chat/pull/22870) by [@ostjen](https://github.com/ostjen)) -- Go command duplicating subfolder path on iframes. ([#22796](https://github.com/RocketChat/Rocket.Chat/pull/22796)) +- Go command duplicating subfolder path on iframes. ([#22796](https://github.com/RocketChat/Rocket.Chat/pull/22796) by [@ostjen](https://github.com/ostjen)) -- Manually approve new users is not applied to SAML users ([#22823](https://github.com/RocketChat/Rocket.Chat/pull/22823)) +- Manually approve new users is not applied to SAML users ([#22823](https://github.com/RocketChat/Rocket.Chat/pull/22823) by [@ostjen](https://github.com/ostjen)) - Production-environment dependencies ([#22868](https://github.com/RocketChat/Rocket.Chat/pull/22868)) @@ -2405,7 +10133,7 @@ - QuickActions for mobile screen ([#23016](https://github.com/RocketChat/Rocket.Chat/pull/23016)) -- Registration not possible with TOTP and email verification ([#22778](https://github.com/RocketChat/Rocket.Chat/pull/22778)) +- Registration not possible with TOTP and email verification ([#22778](https://github.com/RocketChat/Rocket.Chat/pull/22778) by [@ostjen](https://github.com/ostjen)) - Return transcript/dashboards based on timezone settings ([#22850](https://github.com/RocketChat/Rocket.Chat/pull/22850)) @@ -2430,7 +10158,7 @@ - TypeError on Callout type prop ([#22790](https://github.com/RocketChat/Rocket.Chat/pull/22790) by [@hrahul2605](https://github.com/hrahul2605)) -- User is still asked for 2FA confirmation even if it is deactivated ([#22801](https://github.com/RocketChat/Rocket.Chat/pull/22801)) +- User is still asked for 2FA confirmation even if it is deactivated ([#22801](https://github.com/RocketChat/Rocket.Chat/pull/22801) by [@ostjen](https://github.com/ostjen)) - User presence being processes even if presence monitor was disabled ([#22927](https://github.com/RocketChat/Rocket.Chat/pull/22927)) @@ -2509,6 +10237,7 @@ - [@hrahul2605](https://github.com/hrahul2605) - [@jsm84](https://github.com/jsm84) - [@nmagedman](https://github.com/nmagedman) +- [@ostjen](https://github.com/ostjen) - [@piotrkochan](https://github.com/piotrkochan) ### 👩‍💻👨‍💻 Core Team 🤓 @@ -2522,7 +10251,6 @@ - [@marceloschmidt](https://github.com/marceloschmidt) - [@matheusbsilva137](https://github.com/matheusbsilva137) - [@murtaza98](https://github.com/murtaza98) -- [@ostjen](https://github.com/ostjen) - [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) - [@renatobecker](https://github.com/renatobecker) - [@sampaiodiego](https://github.com/sampaiodiego) @@ -2640,14 +10368,14 @@ - Federation setup ([#22208](https://github.com/RocketChat/Rocket.Chat/pull/22208) by [@g-thome](https://github.com/g-thome)) -- Logout other user endpoint ([#22661](https://github.com/RocketChat/Rocket.Chat/pull/22661)) +- Logout other user endpoint ([#22661](https://github.com/RocketChat/Rocket.Chat/pull/22661) by [@ostjen](https://github.com/ostjen)) - Monitoring Track messages' round trip time ([#22676](https://github.com/RocketChat/Rocket.Chat/pull/22676)) Track messages' roundtrip time from backend saves time to the time when received back from the oplog allowing track of oplog slowness. Prometheus metric: `rocketchat_messages_roundtrip_time` -- REST endpoint to remove User from Role ([#20485](https://github.com/RocketChat/Rocket.Chat/pull/20485) by [@Cosnavel](https://github.com/Cosnavel) & [@lucassartor](https://github.com/lucassartor)) +- REST endpoint to remove User from Role ([#20485](https://github.com/RocketChat/Rocket.Chat/pull/20485) by [@Cosnavel](https://github.com/Cosnavel) & [@lucassartor](https://github.com/lucassartor) & [@ostjen](https://github.com/ostjen)) ### 🚀 Improvements @@ -2768,7 +10496,7 @@ If the commit hash happens to be null, the administration page will still attempt to slice the value and display it. This causes the admin page to not display, and essentially crash the web app. This fixes it by checking for a null value first. -- Blank screen in message auditing DM tab ([#22763](https://github.com/RocketChat/Rocket.Chat/pull/22763)) +- Blank screen in message auditing DM tab ([#22763](https://github.com/RocketChat/Rocket.Chat/pull/22763) by [@ostjen](https://github.com/ostjen)) The DM tab in message auditing was displaying a blank screen, instead of the actual tab. @@ -2805,9 +10533,9 @@ **New behavior:** ![image](https://user-images.githubusercontent.com/49413772/124958882-05a8e800-dff1-11eb-8203-b34a4f1c98a0.png) -- Channel is automatically getting added to the first option in move to team feature ([#22670](https://github.com/RocketChat/Rocket.Chat/pull/22670)) +- Channel is automatically getting added to the first option in move to team feature ([#22670](https://github.com/RocketChat/Rocket.Chat/pull/22670) by [@ostjen](https://github.com/ostjen)) -- Channels or Teams deleted are not removed from the sidebar. ([#22613](https://github.com/RocketChat/Rocket.Chat/pull/22613)) +- Channels or Teams deleted are not removed from the sidebar. ([#22613](https://github.com/RocketChat/Rocket.Chat/pull/22613) by [@ostjen](https://github.com/ostjen)) - Checks the list of agents if at least one is online ([#22584](https://github.com/RocketChat/Rocket.Chat/pull/22584)) @@ -2815,7 +10543,7 @@ - Content-Security-Policy ignoring CDN configuration ([#22791](https://github.com/RocketChat/Rocket.Chat/pull/22791) by [@nmagedman](https://github.com/nmagedman)) -- Create discussion modal - cancel button and invite users alignment ([#22718](https://github.com/RocketChat/Rocket.Chat/pull/22718)) +- Create discussion modal - cancel button and invite users alignment ([#22718](https://github.com/RocketChat/Rocket.Chat/pull/22718) by [@ostjen](https://github.com/ostjen)) Changes in "open discussion" modal @@ -2918,11 +10646,11 @@ - Chore: [Snyk] Security upgrade node-gcm from 0.14.4 to 1.0.0 ([#22582](https://github.com/RocketChat/Rocket.Chat/pull/22582) by [@snyk-bot](https://github.com/snyk-bot)) -- Chore: added pagination to search msg endpoint ([#22632](https://github.com/RocketChat/Rocket.Chat/pull/22632)) +- Chore: added pagination to search msg endpoint ([#22632](https://github.com/RocketChat/Rocket.Chat/pull/22632) by [@ostjen](https://github.com/ostjen)) - Chore: Create README.md ([#22615](https://github.com/RocketChat/Rocket.Chat/pull/22615)) -- Chore: Enable Omnicahnnel by default ([#22697](https://github.com/RocketChat/Rocket.Chat/pull/22697)) +- Chore: Enable Omnicahnnel by default ([#22697](https://github.com/RocketChat/Rocket.Chat/pull/22697) by [@ostjen](https://github.com/ostjen)) - Chore: Meteor 2.2 and bump dependencies ([#22399](https://github.com/RocketChat/Rocket.Chat/pull/22399)) @@ -3058,6 +10786,7 @@ - [@g-thome](https://github.com/g-thome) - [@lucassartor](https://github.com/lucassartor) - [@nmagedman](https://github.com/nmagedman) +- [@ostjen](https://github.com/ostjen) - [@rafaelblink](https://github.com/rafaelblink) - [@snyk-bot](https://github.com/snyk-bot) @@ -3073,7 +10802,6 @@ - [@ggazzo](https://github.com/ggazzo) - [@matheusbsilva137](https://github.com/matheusbsilva137) - [@murtaza98](https://github.com/murtaza98) -- [@ostjen](https://github.com/ostjen) - [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) - [@renatobecker](https://github.com/renatobecker) - [@rodrigok](https://github.com/rodrigok) @@ -6258,6 +13986,32 @@ - [@tiagoevanp](https://github.com/tiagoevanp) - [@yash-rajpal](https://github.com/yash-rajpal) +# 3.11.6 +`2022-08-22 · 2 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Support DISABLE_PRESENCE_MONITOR env var in new DB watchers ([#22257](https://github.com/RocketChat/Rocket.Chat/pull/22257)) + +- User presence being processes even if presence monitor was disabled ([#22927](https://github.com/RocketChat/Rocket.Chat/pull/22927)) + +
+🔍 Minor changes + + +- Chore: Change Ubuntu version to 20.04 on all GitHub Actions ([#23200](https://github.com/RocketChat/Rocket.Chat/pull/23200)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@sampaiodiego](https://github.com/sampaiodiego) + # 3.11.5 `2021-04-20 · 1 🐛 · 1 👩‍💻👨‍💻` @@ -7358,7 +15112,7 @@ ### 🎉 New features -- 2 Factor Authentication when using OAuth and SAML ([#11726](https://github.com/RocketChat/Rocket.Chat/pull/11726) by [@Hudell](https://github.com/Hudell) & [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- 2 Factor Authentication when using OAuth and SAML ([#11726](https://github.com/RocketChat/Rocket.Chat/pull/11726) by [@Hudell](https://github.com/Hudell)) - Added setting to disable password changes for users who log in using SSO ([#10391](https://github.com/RocketChat/Rocket.Chat/pull/10391) by [@Hudell](https://github.com/Hudell)) @@ -7537,7 +15291,6 @@ ### 👩‍💻👨‍💻 Contributors 😍 - [@Hudell](https://github.com/Hudell) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@antkaz](https://github.com/antkaz) - [@dependabot[bot]](https://github.com/dependabot[bot]) - [@g-thome](https://github.com/g-thome) @@ -7549,6 +15302,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@MartinSchoeler](https://github.com/MartinSchoeler) - [@d-gubert](https://github.com/d-gubert) - [@dougfabris](https://github.com/dougfabris) @@ -8483,7 +16237,7 @@ - Agents enabledDepartment attribute not set on collection ([#18614](https://github.com/RocketChat/Rocket.Chat/pull/18614) by [@paulobernardoaf](https://github.com/paulobernardoaf)) -- Anonymous users were created as inactive if the manual approval setting was enabled ([#17427](https://github.com/RocketChat/Rocket.Chat/pull/17427) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Anonymous users were created as inactive if the manual approval setting was enabled ([#17427](https://github.com/RocketChat/Rocket.Chat/pull/17427)) - Auto complete user suggestions ([#18437](https://github.com/RocketChat/Rocket.Chat/pull/18437)) @@ -8621,7 +16375,6 @@ ### 👩‍💻👨‍💻 Contributors 😍 -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@antkaz](https://github.com/antkaz) - [@densik](https://github.com/densik) - [@dependabot[bot]](https://github.com/dependabot[bot]) @@ -8634,6 +16387,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@MartinSchoeler](https://github.com/MartinSchoeler) - [@Sing-Li](https://github.com/Sing-Li) - [@d-gubert](https://github.com/d-gubert) @@ -8822,7 +16576,7 @@ - Change setting that blocks unauthenticated access to avatar to public ([#18316](https://github.com/RocketChat/Rocket.Chat/pull/18316) by [@djorkaeffalexandre](https://github.com/djorkaeffalexandre)) -- Improve performance and remove agents when the department is removed ([#17049](https://github.com/RocketChat/Rocket.Chat/pull/17049) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Improve performance and remove agents when the department is removed ([#17049](https://github.com/RocketChat/Rocket.Chat/pull/17049)) - List dropdown ([#18081](https://github.com/RocketChat/Rocket.Chat/pull/18081)) @@ -8912,7 +16666,7 @@ - LingoHub based on develop ([#18176](https://github.com/RocketChat/Rocket.Chat/pull/18176)) -- Merge master into develop & Set version to 3.5.0-develop ([#18083](https://github.com/RocketChat/Rocket.Chat/pull/18083) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@cking-vonix](https://github.com/cking-vonix) & [@lpilz](https://github.com/lpilz) & [@mariaeduardacunha](https://github.com/mariaeduardacunha)) +- Merge master into develop & Set version to 3.5.0-develop ([#18083](https://github.com/RocketChat/Rocket.Chat/pull/18083) by [@cking-vonix](https://github.com/cking-vonix) & [@lpilz](https://github.com/lpilz) & [@mariaeduardacunha](https://github.com/mariaeduardacunha)) - Move the development guidelines to our handbook ([#18026](https://github.com/RocketChat/Rocket.Chat/pull/18026)) @@ -8979,7 +16733,6 @@ ### 👩‍💻👨‍💻 Contributors 😍 - [@20051231](https://github.com/20051231) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@antkaz](https://github.com/antkaz) - [@cking-vonix](https://github.com/cking-vonix) - [@darigovresearch](https://github.com/darigovresearch) @@ -8991,6 +16744,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@MartinSchoeler](https://github.com/MartinSchoeler) - [@d-gubert](https://github.com/d-gubert) - [@gabriellsh](https://github.com/gabriellsh) @@ -9115,13 +16869,13 @@ - **ENTERPRISE:** Download engagement data ([#17920](https://github.com/RocketChat/Rocket.Chat/pull/17920)) -- **ENTERPRISE:** Omnichannel multiple business hours ([#17947](https://github.com/RocketChat/Rocket.Chat/pull/17947) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- **ENTERPRISE:** Omnichannel multiple business hours ([#17947](https://github.com/RocketChat/Rocket.Chat/pull/17947)) - Ability to configure Jitsi room options via new setting `URL Suffix` ([#17950](https://github.com/RocketChat/Rocket.Chat/pull/17950) by [@fthiery](https://github.com/fthiery)) - Accept variable `#{userdn}` on LDAP group filter ([#16273](https://github.com/RocketChat/Rocket.Chat/pull/16273) by [@ChrissW-R1](https://github.com/ChrissW-R1)) -- Add ability to block failed login attempts by user and IP ([#17783](https://github.com/RocketChat/Rocket.Chat/pull/17783) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add ability to block failed login attempts by user and IP ([#17783](https://github.com/RocketChat/Rocket.Chat/pull/17783)) - Allows agents to send chat transcript to omnichannel end-users ([#17774](https://github.com/RocketChat/Rocket.Chat/pull/17774)) @@ -9162,7 +16916,7 @@ - React hooks lint rules ([#17941](https://github.com/RocketChat/Rocket.Chat/pull/17941)) -- Refactor Omnichannel Office Hours feature ([#17824](https://github.com/RocketChat/Rocket.Chat/pull/17824) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Refactor Omnichannel Office Hours feature ([#17824](https://github.com/RocketChat/Rocket.Chat/pull/17824)) - Refactor Omnichannel Past Chats List ([#17346](https://github.com/RocketChat/Rocket.Chat/pull/17346) by [@nitinkumartiwari](https://github.com/nitinkumartiwari)) @@ -9353,7 +17107,7 @@ - Regression: Image Upload not working ([#17993](https://github.com/RocketChat/Rocket.Chat/pull/17993)) -- Regression: Improve Omnichannel Business Hours ([#18050](https://github.com/RocketChat/Rocket.Chat/pull/18050) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Regression: Improve Omnichannel Business Hours ([#18050](https://github.com/RocketChat/Rocket.Chat/pull/18050)) - Regression: Improve the logic to get request IPs ([#18033](https://github.com/RocketChat/Rocket.Chat/pull/18033)) @@ -9399,7 +17153,6 @@ - [@EwoutH](https://github.com/EwoutH) - [@InstinctBas](https://github.com/InstinctBas) - [@Karting06](https://github.com/Karting06) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@Siedlerchr](https://github.com/Siedlerchr) - [@alexbartsch](https://github.com/alexbartsch) - [@antkaz](https://github.com/antkaz) @@ -9433,6 +17186,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@MartinSchoeler](https://github.com/MartinSchoeler) - [@Sing-Li](https://github.com/Sing-Li) - [@alansikora](https://github.com/alansikora) @@ -9532,11 +17286,11 @@ 🔍 Minor changes -- [REGRESSION] Omnichannel visitor forward was applying wrong restrictions ([#17826](https://github.com/RocketChat/Rocket.Chat/pull/17826) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- [REGRESSION] Omnichannel visitor forward was applying wrong restrictions ([#17826](https://github.com/RocketChat/Rocket.Chat/pull/17826)) - Fix the update check not working ([#17809](https://github.com/RocketChat/Rocket.Chat/pull/17809)) -- Release 3.3.1 ([#17865](https://github.com/RocketChat/Rocket.Chat/pull/17865) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@cking-vonix](https://github.com/cking-vonix) & [@lpilz](https://github.com/lpilz) & [@mariaeduardacunha](https://github.com/mariaeduardacunha)) +- Release 3.3.1 ([#17865](https://github.com/RocketChat/Rocket.Chat/pull/17865) by [@cking-vonix](https://github.com/cking-vonix) & [@lpilz](https://github.com/lpilz) & [@mariaeduardacunha](https://github.com/mariaeduardacunha)) - Update Apps-Engine version ([#17804](https://github.com/RocketChat/Rocket.Chat/pull/17804)) @@ -9546,13 +17300,13 @@ ### 👩‍💻👨‍💻 Contributors 😍 -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@cking-vonix](https://github.com/cking-vonix) - [@lpilz](https://github.com/lpilz) - [@mariaeduardacunha](https://github.com/mariaeduardacunha) ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@d-gubert](https://github.com/d-gubert) - [@geekgonecrazy](https://github.com/geekgonecrazy) - [@graywolf336](https://github.com/graywolf336) @@ -9590,11 +17344,11 @@ - **ENTERPRISE:** Support Omnichannel conversations auditing ([#17692](https://github.com/RocketChat/Rocket.Chat/pull/17692)) -- Add Livechat website URL to the offline message e-mail ([#17429](https://github.com/RocketChat/Rocket.Chat/pull/17429) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add Livechat website URL to the offline message e-mail ([#17429](https://github.com/RocketChat/Rocket.Chat/pull/17429)) -- Add permissions to deal with Omnichannel custom fields ([#17567](https://github.com/RocketChat/Rocket.Chat/pull/17567) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add permissions to deal with Omnichannel custom fields ([#17567](https://github.com/RocketChat/Rocket.Chat/pull/17567)) -- Add Permissions to deal with Omnichannel visitor past chats history ([#17580](https://github.com/RocketChat/Rocket.Chat/pull/17580) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add Permissions to deal with Omnichannel visitor past chats history ([#17580](https://github.com/RocketChat/Rocket.Chat/pull/17580)) - Add the ability to send Livechat offline messages to a channel ([#17442](https://github.com/RocketChat/Rocket.Chat/pull/17442)) @@ -9604,7 +17358,7 @@ - Admin refactor Second phase ([#17551](https://github.com/RocketChat/Rocket.Chat/pull/17551)) -- Allow filtering Omnichannel analytics dashboards by department ([#17463](https://github.com/RocketChat/Rocket.Chat/pull/17463) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Allow filtering Omnichannel analytics dashboards by department ([#17463](https://github.com/RocketChat/Rocket.Chat/pull/17463)) - API endpoint to fetch Omnichannel's room transfer history ([#17694](https://github.com/RocketChat/Rocket.Chat/pull/17694)) @@ -9695,7 +17449,7 @@ - Omnichannel departments are not saved when the offline channel name is not defined ([#17553](https://github.com/RocketChat/Rocket.Chat/pull/17553)) -- Omnichannel room priorities system messages were create on every saved room info ([#17479](https://github.com/RocketChat/Rocket.Chat/pull/17479) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Omnichannel room priorities system messages were create on every saved room info ([#17479](https://github.com/RocketChat/Rocket.Chat/pull/17479)) - Password reset/change accepting current password as new password ([#16331](https://github.com/RocketChat/Rocket.Chat/pull/16331) by [@ashwaniYDV](https://github.com/ashwaniYDV)) @@ -9715,7 +17469,7 @@ - remove multiple options from dontAskMeAgain ([#17514](https://github.com/RocketChat/Rocket.Chat/pull/17514) by [@TaimurAzhar](https://github.com/TaimurAzhar)) -- Replace obsolete X-FRAME-OPTIONS header on Livechat route ([#17419](https://github.com/RocketChat/Rocket.Chat/pull/17419) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace obsolete X-FRAME-OPTIONS header on Livechat route ([#17419](https://github.com/RocketChat/Rocket.Chat/pull/17419)) - Replace postcss Meteor package ([#15929](https://github.com/RocketChat/Rocket.Chat/pull/15929)) @@ -9751,7 +17505,7 @@ - Improve: New PR Template ([#16968](https://github.com/RocketChat/Rocket.Chat/pull/16968) by [@regalstreak](https://github.com/regalstreak)) -- Improve: Remove index files from action-links, accounts and assets ([#17607](https://github.com/RocketChat/Rocket.Chat/pull/17607) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Improve: Remove index files from action-links, accounts and assets ([#17607](https://github.com/RocketChat/Rocket.Chat/pull/17607)) - Improve: Remove uncessary RegExp query by email ([#17654](https://github.com/RocketChat/Rocket.Chat/pull/17654)) @@ -9829,7 +17583,6 @@ ### 👩‍💻👨‍💻 Contributors 😍 -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@Nikhil713](https://github.com/Nikhil713) - [@TaimurAzhar](https://github.com/TaimurAzhar) - [@ashwaniYDV](https://github.com/ashwaniYDV) @@ -9857,6 +17610,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@MartinSchoeler](https://github.com/MartinSchoeler) - [@d-gubert](https://github.com/d-gubert) - [@engelgabriel](https://github.com/engelgabriel) @@ -9954,11 +17708,11 @@ ### 🎉 New features -- **ENTERPRISE:** Allows to set a group of departments accepted for forwarding chats ([#17335](https://github.com/RocketChat/Rocket.Chat/pull/17335) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- **ENTERPRISE:** Allows to set a group of departments accepted for forwarding chats ([#17335](https://github.com/RocketChat/Rocket.Chat/pull/17335)) -- **ENTERPRISE:** Auto close abandoned Omnichannel rooms ([#17055](https://github.com/RocketChat/Rocket.Chat/pull/17055) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- **ENTERPRISE:** Auto close abandoned Omnichannel rooms ([#17055](https://github.com/RocketChat/Rocket.Chat/pull/17055)) -- **ENTERPRISE:** Omnichannel queue priorities ([#17141](https://github.com/RocketChat/Rocket.Chat/pull/17141) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- **ENTERPRISE:** Omnichannel queue priorities ([#17141](https://github.com/RocketChat/Rocket.Chat/pull/17141)) - **ENTERPRISE:** Restrict the permissions configuration for guest users ([#17333](https://github.com/RocketChat/Rocket.Chat/pull/17333)) @@ -10009,7 +17763,7 @@ - Add `file-title` and `file-desc` as new filter tag options on message search ([#16858](https://github.com/RocketChat/Rocket.Chat/pull/16858) by [@subham103](https://github.com/subham103)) -- Add possibility to sort the Omnichannel current chats list by column ([#17347](https://github.com/RocketChat/Rocket.Chat/pull/17347) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add possibility to sort the Omnichannel current chats list by column ([#17347](https://github.com/RocketChat/Rocket.Chat/pull/17347)) - Administration -> Mailer Rewrite. ([#17191](https://github.com/RocketChat/Rocket.Chat/pull/17191)) @@ -10074,7 +17828,7 @@ - Red color error outline is not removed after password update on profile details ([#16536](https://github.com/RocketChat/Rocket.Chat/pull/16536) by [@ashwaniYDV](https://github.com/ashwaniYDV)) -- Remove properties from users.info response ([#17238](https://github.com/RocketChat/Rocket.Chat/pull/17238) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove properties from users.info response ([#17238](https://github.com/RocketChat/Rocket.Chat/pull/17238)) - SAML assertion signature enforcement ([#17278](https://github.com/RocketChat/Rocket.Chat/pull/17278)) @@ -10147,7 +17901,6 @@ - [@1rV1N-git](https://github.com/1rV1N-git) - [@CC007](https://github.com/CC007) - [@Krinkle](https://github.com/Krinkle) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@Nikhil713](https://github.com/Nikhil713) - [@RavenSystem](https://github.com/RavenSystem) - [@aKn1ghtOut](https://github.com/aKn1ghtOut) @@ -10170,6 +17923,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@MartinSchoeler](https://github.com/MartinSchoeler) - [@alansikora](https://github.com/alansikora) - [@d-gubert](https://github.com/d-gubert) @@ -10304,7 +18058,7 @@ ### 🎉 New features -- **ENTERPRISE:** Engagement Dashboard ([#16960](https://github.com/RocketChat/Rocket.Chat/pull/16960) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- **ENTERPRISE:** Engagement Dashboard ([#16960](https://github.com/RocketChat/Rocket.Chat/pull/16960)) - Add default chat closing tags in Omnichannel departments ([#16859](https://github.com/RocketChat/Rocket.Chat/pull/16859)) @@ -10334,7 +18088,7 @@ - Open the Visitor Info panel automatically when the agent enters an Omnichannel room ([#16496](https://github.com/RocketChat/Rocket.Chat/pull/16496)) -- Route to get updated roles after a date ([#16610](https://github.com/RocketChat/Rocket.Chat/pull/16610) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@ashwaniYDV](https://github.com/ashwaniYDV)) +- Route to get updated roles after a date ([#16610](https://github.com/RocketChat/Rocket.Chat/pull/16610) by [@ashwaniYDV](https://github.com/ashwaniYDV)) - SAML config to allow clock drift ([#16751](https://github.com/RocketChat/Rocket.Chat/pull/16751) by [@localguru](https://github.com/localguru)) @@ -10358,11 +18112,11 @@ ### 🚀 Improvements -- Ability to change offline message button link on emails notifications ([#16784](https://github.com/RocketChat/Rocket.Chat/pull/16784) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Ability to change offline message button link on emails notifications ([#16784](https://github.com/RocketChat/Rocket.Chat/pull/16784)) - Accept open formarts of text, spreadsheet, presentation for upload by default ([#16502](https://github.com/RocketChat/Rocket.Chat/pull/16502)) -- Add option to require authentication on user's shield endpoint ([#16845](https://github.com/RocketChat/Rocket.Chat/pull/16845) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add option to require authentication on user's shield endpoint ([#16845](https://github.com/RocketChat/Rocket.Chat/pull/16845)) - Added autofocus to Directory ([#16217](https://github.com/RocketChat/Rocket.Chat/pull/16217) by [@ashwaniYDV](https://github.com/ashwaniYDV)) @@ -10380,11 +18134,11 @@ - Fallback content-type as application/octet-stream for FileSystem uploads ([#16776](https://github.com/RocketChat/Rocket.Chat/pull/16776) by [@georgmu](https://github.com/georgmu)) -- First data load from existing data on engagement dashboard ([#17035](https://github.com/RocketChat/Rocket.Chat/pull/17035) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- First data load from existing data on engagement dashboard ([#17035](https://github.com/RocketChat/Rocket.Chat/pull/17035)) - Increase the push throughput to prevent queuing ([#17194](https://github.com/RocketChat/Rocket.Chat/pull/17194)) -- Omnichannel aggregations performance improvements ([#16755](https://github.com/RocketChat/Rocket.Chat/pull/16755) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Omnichannel aggregations performance improvements ([#16755](https://github.com/RocketChat/Rocket.Chat/pull/16755)) - Removed the 'reply in thread' from thread replies ([#16630](https://github.com/RocketChat/Rocket.Chat/pull/16630) by [@ritwizsinha](https://github.com/ritwizsinha)) @@ -10407,7 +18161,7 @@ - "Jump to message" is rendered twice when message is starred. ([#16170](https://github.com/RocketChat/Rocket.Chat/pull/16170) by [@ashwaniYDV](https://github.com/ashwaniYDV)) -- `users.setStatus` API was ignoring the user from params when trying to set status of other users ([#16128](https://github.com/RocketChat/Rocket.Chat/pull/16128) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@rm-yakovenko](https://github.com/rm-yakovenko)) +- `users.setStatus` API was ignoring the user from params when trying to set status of other users ([#16128](https://github.com/RocketChat/Rocket.Chat/pull/16128) by [@rm-yakovenko](https://github.com/rm-yakovenko)) - Additional scroll when contextual bar is open ([#16667](https://github.com/RocketChat/Rocket.Chat/pull/16667)) @@ -10473,7 +18227,7 @@ - LDAP sync admin action was not syncing existent users ([#16671](https://github.com/RocketChat/Rocket.Chat/pull/16671)) -- livechat/rooms endpoint not working with big amount of livechats ([#16623](https://github.com/RocketChat/Rocket.Chat/pull/16623) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- livechat/rooms endpoint not working with big amount of livechats ([#16623](https://github.com/RocketChat/Rocket.Chat/pull/16623)) - Login with LinkedIn not mapping name and picture correctly ([#16955](https://github.com/RocketChat/Rocket.Chat/pull/16955)) @@ -10535,7 +18289,7 @@ - UiKit not updating new actionIds received as responses from actions ([#16624](https://github.com/RocketChat/Rocket.Chat/pull/16624)) -- users.info endpoint not handling the error if the user does not exist ([#16495](https://github.com/RocketChat/Rocket.Chat/pull/16495) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- users.info endpoint not handling the error if the user does not exist ([#16495](https://github.com/RocketChat/Rocket.Chat/pull/16495)) - Verification email body ([#17062](https://github.com/RocketChat/Rocket.Chat/pull/17062) by [@GOVINDDIXIT](https://github.com/GOVINDDIXIT)) @@ -10569,7 +18323,7 @@ - Add lint to `.less` files ([#16893](https://github.com/RocketChat/Rocket.Chat/pull/16893)) -- Add methods to include room types on dashboard ([#16576](https://github.com/RocketChat/Rocket.Chat/pull/16576) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add methods to include room types on dashboard ([#16576](https://github.com/RocketChat/Rocket.Chat/pull/16576)) - Add new Omnichannel department forwarding callback ([#16779](https://github.com/RocketChat/Rocket.Chat/pull/16779)) @@ -10631,7 +18385,7 @@ - Improve room types usage ([#16753](https://github.com/RocketChat/Rocket.Chat/pull/16753)) -- Improve: Apps-engine E2E tests ([#16781](https://github.com/RocketChat/Rocket.Chat/pull/16781) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Improve: Apps-engine E2E tests ([#16781](https://github.com/RocketChat/Rocket.Chat/pull/16781)) - LingoHub based on develop ([#16837](https://github.com/RocketChat/Rocket.Chat/pull/16837)) @@ -10649,7 +18403,7 @@ - Reduce notifyUser propagation ([#17088](https://github.com/RocketChat/Rocket.Chat/pull/17088)) -- Regression: `users.setStatus` throwing an error if message is empty ([#17036](https://github.com/RocketChat/Rocket.Chat/pull/17036) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Regression: `users.setStatus` throwing an error if message is empty ([#17036](https://github.com/RocketChat/Rocket.Chat/pull/17036)) - Regression: Admin create user button ([#17186](https://github.com/RocketChat/Rocket.Chat/pull/17186)) @@ -10693,7 +18447,7 @@ - Regression: Invite links working for group DMs ([#17056](https://github.com/RocketChat/Rocket.Chat/pull/17056)) -- Regression: OmniChannel agent activity monitor was counting time wrongly ([#16979](https://github.com/RocketChat/Rocket.Chat/pull/16979) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Regression: OmniChannel agent activity monitor was counting time wrongly ([#16979](https://github.com/RocketChat/Rocket.Chat/pull/16979)) - Regression: omnichannel manual queued sidebarlist ([#17048](https://github.com/RocketChat/Rocket.Chat/pull/17048)) @@ -10731,7 +18485,6 @@ - [@1rV1N-git](https://github.com/1rV1N-git) - [@GOVINDDIXIT](https://github.com/GOVINDDIXIT) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@Nikhil713](https://github.com/Nikhil713) - [@aKn1ghtOut](https://github.com/aKn1ghtOut) - [@antkaz](https://github.com/antkaz) @@ -10759,6 +18512,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@PrajvalRaval](https://github.com/PrajvalRaval) - [@Rodriq](https://github.com/Rodriq) - [@Sing-Li](https://github.com/Sing-Li) @@ -11082,14 +18836,11 @@ - Omnichannel Inquiry queues when removing chats ([#16603](https://github.com/RocketChat/Rocket.Chat/pull/16603)) -- users.info endpoint not handling the error if the user does not exist ([#16495](https://github.com/RocketChat/Rocket.Chat/pull/16495) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) - -### 👩‍💻👨‍💻 Contributors 😍 - -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- users.info endpoint not handling the error if the user does not exist ([#16495](https://github.com/RocketChat/Rocket.Chat/pull/16495)) ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@gabriellsh](https://github.com/gabriellsh) - [@ggazzo](https://github.com/ggazzo) - [@renatobecker](https://github.com/renatobecker) @@ -11112,7 +18863,7 @@ - Data converters overriding fields added by apps ([#16639](https://github.com/RocketChat/Rocket.Chat/pull/16639)) -- livechat/rooms endpoint not working with big amount of livechats ([#16623](https://github.com/RocketChat/Rocket.Chat/pull/16623) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- livechat/rooms endpoint not working with big amount of livechats ([#16623](https://github.com/RocketChat/Rocket.Chat/pull/16623)) - Regression: Jitsi on external window infinite loop ([#16625](https://github.com/RocketChat/Rocket.Chat/pull/16625)) @@ -11120,12 +18871,9 @@ - UiKit not updating new actionIds received as responses from actions ([#16624](https://github.com/RocketChat/Rocket.Chat/pull/16624)) -### 👩‍💻👨‍💻 Contributors 😍 - -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@d-gubert](https://github.com/d-gubert) - [@ggazzo](https://github.com/ggazzo) - [@sampaiodiego](https://github.com/sampaiodiego) @@ -11147,7 +18895,7 @@ - Hide system messages ([#16243](https://github.com/RocketChat/Rocket.Chat/pull/16243) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) -- Remove deprecated publications ([#16351](https://github.com/RocketChat/Rocket.Chat/pull/16351) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove deprecated publications ([#16351](https://github.com/RocketChat/Rocket.Chat/pull/16351)) - Removed room counter from sidebar ([#16036](https://github.com/RocketChat/Rocket.Chat/pull/16036)) @@ -11160,7 +18908,7 @@ - Add GUI for customFields in Omnichannel conversations ([#15840](https://github.com/RocketChat/Rocket.Chat/pull/15840) by [@antkaz](https://github.com/antkaz)) -- Button to download admin server info ([#16059](https://github.com/RocketChat/Rocket.Chat/pull/16059) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Button to download admin server info ([#16059](https://github.com/RocketChat/Rocket.Chat/pull/16059)) - Check the Omnichannel service status per Department ([#16425](https://github.com/RocketChat/Rocket.Chat/pull/16425) by [@lolimay](https://github.com/lolimay)) @@ -11212,7 +18960,7 @@ - Adding 'lang' tag ([#16375](https://github.com/RocketChat/Rocket.Chat/pull/16375) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) -- api-bypass-rate-limiter permission was not working ([#16080](https://github.com/RocketChat/Rocket.Chat/pull/16080) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- api-bypass-rate-limiter permission was not working ([#16080](https://github.com/RocketChat/Rocket.Chat/pull/16080)) - App removal was moving logs to the trash collection ([#16362](https://github.com/RocketChat/Rocket.Chat/pull/16362)) @@ -11238,7 +18986,7 @@ - Integrations admin page ([#16183](https://github.com/RocketChat/Rocket.Chat/pull/16183)) -- Integrations list without pagination and outgoing integration creation ([#16233](https://github.com/RocketChat/Rocket.Chat/pull/16233) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Integrations list without pagination and outgoing integration creation ([#16233](https://github.com/RocketChat/Rocket.Chat/pull/16233)) - Introduce AppLivechatBridge.isOnlineAsync method ([#16467](https://github.com/RocketChat/Rocket.Chat/pull/16467)) @@ -11254,13 +19002,13 @@ - Missing edited icon in newly created messages ([#16484](https://github.com/RocketChat/Rocket.Chat/pull/16484)) -- Option to make a channel default ([#16433](https://github.com/RocketChat/Rocket.Chat/pull/16433) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Option to make a channel default ([#16433](https://github.com/RocketChat/Rocket.Chat/pull/16433)) - Read Message after receive a message and the room is opened ([#16473](https://github.com/RocketChat/Rocket.Chat/pull/16473)) - Readme Help wanted section ([#16197](https://github.com/RocketChat/Rocket.Chat/pull/16197)) -- Result of get avatar from url can be null ([#16123](https://github.com/RocketChat/Rocket.Chat/pull/16123) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Result of get avatar from url can be null ([#16123](https://github.com/RocketChat/Rocket.Chat/pull/16123)) - Role tags missing - Description field explanation ([#16356](https://github.com/RocketChat/Rocket.Chat/pull/16356) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) @@ -11368,7 +19116,7 @@ - Regression: Update Uikit ([#16515](https://github.com/RocketChat/Rocket.Chat/pull/16515)) -- Release 2.4.7 ([#16444](https://github.com/RocketChat/Rocket.Chat/pull/16444) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Release 2.4.7 ([#16444](https://github.com/RocketChat/Rocket.Chat/pull/16444)) - Release 2.4.9 ([#16544](https://github.com/RocketChat/Rocket.Chat/pull/16544)) @@ -11376,7 +19124,7 @@ - Revert importer streamed uploads ([#16465](https://github.com/RocketChat/Rocket.Chat/pull/16465)) -- Revert message properties validation ([#16395](https://github.com/RocketChat/Rocket.Chat/pull/16395) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Revert message properties validation ([#16395](https://github.com/RocketChat/Rocket.Chat/pull/16395)) - Send build artifacts to S3 ([#16237](https://github.com/RocketChat/Rocket.Chat/pull/16237)) @@ -11395,7 +19143,6 @@ ### 👩‍💻👨‍💻 Contributors 😍 - [@Cool-fire](https://github.com/Cool-fire) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@antkaz](https://github.com/antkaz) - [@ashwaniYDV](https://github.com/ashwaniYDV) - [@aviral243](https://github.com/aviral243) @@ -11408,6 +19155,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 - [@LuluGO](https://github.com/LuluGO) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@MartinSchoeler](https://github.com/MartinSchoeler) - [@d-gubert](https://github.com/d-gubert) - [@gabriellsh](https://github.com/gabriellsh) @@ -11467,14 +19215,11 @@ ### 🐛 Bug fixes -- users.info endpoint not handling the error if the user does not exist ([#16495](https://github.com/RocketChat/Rocket.Chat/pull/16495) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) - -### 👩‍💻👨‍💻 Contributors 😍 - -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- users.info endpoint not handling the error if the user does not exist ([#16495](https://github.com/RocketChat/Rocket.Chat/pull/16495)) ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@sampaiodiego](https://github.com/sampaiodiego) # 2.4.9 @@ -11535,22 +19280,19 @@ ### 🐛 Bug fixes -- Option to make a channel default ([#16433](https://github.com/RocketChat/Rocket.Chat/pull/16433) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Option to make a channel default ([#16433](https://github.com/RocketChat/Rocket.Chat/pull/16433))
🔍 Minor changes -- Release 2.4.7 ([#16444](https://github.com/RocketChat/Rocket.Chat/pull/16444) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Release 2.4.7 ([#16444](https://github.com/RocketChat/Rocket.Chat/pull/16444))
-### 👩‍💻👨‍💻 Contributors 😍 - -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@ggazzo](https://github.com/ggazzo) # 2.4.6 @@ -11567,18 +19309,15 @@ - Fix index creation for apps_logs collection ([#16401](https://github.com/RocketChat/Rocket.Chat/pull/16401)) -- Release 2.4.6 ([#16402](https://github.com/RocketChat/Rocket.Chat/pull/16402) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Release 2.4.6 ([#16402](https://github.com/RocketChat/Rocket.Chat/pull/16402)) -- Revert message properties validation ([#16395](https://github.com/RocketChat/Rocket.Chat/pull/16395) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Revert message properties validation ([#16395](https://github.com/RocketChat/Rocket.Chat/pull/16395)) -### 👩‍💻👨‍💻 Contributors 😍 - -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@rodrigok](https://github.com/rodrigok) - [@sampaiodiego](https://github.com/sampaiodiego) @@ -11669,7 +19408,7 @@ ### 🐛 Bug fixes -- Integrations list without pagination and outgoing integration creation ([#16233](https://github.com/RocketChat/Rocket.Chat/pull/16233) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Integrations list without pagination and outgoing integration creation ([#16233](https://github.com/RocketChat/Rocket.Chat/pull/16233)) - Setup Wizard inputs and Admin Settings ([#16147](https://github.com/RocketChat/Rocket.Chat/pull/16147)) @@ -11681,16 +19420,13 @@ 🔍 Minor changes -- Release 2.4.2 ([#16274](https://github.com/RocketChat/Rocket.Chat/pull/16274) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Release 2.4.2 ([#16274](https://github.com/RocketChat/Rocket.Chat/pull/16274)) -### 👩‍💻👨‍💻 Contributors 😍 - -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@ggazzo](https://github.com/ggazzo) - [@sampaiodiego](https://github.com/sampaiodiego) - [@tassoevan](https://github.com/tassoevan) @@ -11752,61 +19488,61 @@ ### 🚀 Improvements -- Add deprecate warning in some unused publications ([#15935](https://github.com/RocketChat/Rocket.Chat/pull/15935) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add deprecate warning in some unused publications ([#15935](https://github.com/RocketChat/Rocket.Chat/pull/15935)) -- Livechat realtime dashboard ([#15792](https://github.com/RocketChat/Rocket.Chat/pull/15792) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Livechat realtime dashboard ([#15792](https://github.com/RocketChat/Rocket.Chat/pull/15792)) - Move 'Reply in Thread' button from menu to message actions ([#15685](https://github.com/RocketChat/Rocket.Chat/pull/15685) by [@antkaz](https://github.com/antkaz)) - Notify logged agents when their departments change ([#16033](https://github.com/RocketChat/Rocket.Chat/pull/16033)) -- Replace adminRooms publication by REST ([#15948](https://github.com/RocketChat/Rocket.Chat/pull/15948) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace adminRooms publication by REST ([#15948](https://github.com/RocketChat/Rocket.Chat/pull/15948)) -- Replace customSounds publication by REST ([#15907](https://github.com/RocketChat/Rocket.Chat/pull/15907) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace customSounds publication by REST ([#15907](https://github.com/RocketChat/Rocket.Chat/pull/15907)) -- Replace discussionsOfARoom publication by REST ([#15908](https://github.com/RocketChat/Rocket.Chat/pull/15908) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace discussionsOfARoom publication by REST ([#15908](https://github.com/RocketChat/Rocket.Chat/pull/15908)) -- Replace forgotten livechat:departmentAgents subscriptions ([#15970](https://github.com/RocketChat/Rocket.Chat/pull/15970) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace forgotten livechat:departmentAgents subscriptions ([#15970](https://github.com/RocketChat/Rocket.Chat/pull/15970)) -- Replace fullEmojiData publication by REST ([#15901](https://github.com/RocketChat/Rocket.Chat/pull/15901) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace fullEmojiData publication by REST ([#15901](https://github.com/RocketChat/Rocket.Chat/pull/15901)) -- Replace fullUserData publication by REST ([#15650](https://github.com/RocketChat/Rocket.Chat/pull/15650) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace fullUserData publication by REST ([#15650](https://github.com/RocketChat/Rocket.Chat/pull/15650)) -- Replace fullUserStatusData publication by REST ([#15942](https://github.com/RocketChat/Rocket.Chat/pull/15942) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace fullUserStatusData publication by REST ([#15942](https://github.com/RocketChat/Rocket.Chat/pull/15942)) -- Replace integrations and integrationHistory publications by REST ([#15885](https://github.com/RocketChat/Rocket.Chat/pull/15885) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace integrations and integrationHistory publications by REST ([#15885](https://github.com/RocketChat/Rocket.Chat/pull/15885)) -- Replace livechat:customFields to REST ([#15496](https://github.com/RocketChat/Rocket.Chat/pull/15496) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace livechat:customFields to REST ([#15496](https://github.com/RocketChat/Rocket.Chat/pull/15496)) -- Replace livechat:inquiry publication by REST and Streamer ([#15977](https://github.com/RocketChat/Rocket.Chat/pull/15977) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace livechat:inquiry publication by REST and Streamer ([#15977](https://github.com/RocketChat/Rocket.Chat/pull/15977)) -- Replace livechat:managers publication by REST ([#15944](https://github.com/RocketChat/Rocket.Chat/pull/15944) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace livechat:managers publication by REST ([#15944](https://github.com/RocketChat/Rocket.Chat/pull/15944)) -- Replace livechat:officeHour publication to REST ([#15503](https://github.com/RocketChat/Rocket.Chat/pull/15503) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace livechat:officeHour publication to REST ([#15503](https://github.com/RocketChat/Rocket.Chat/pull/15503)) -- Replace livechat:queue subscription ([#15612](https://github.com/RocketChat/Rocket.Chat/pull/15612) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace livechat:queue subscription ([#15612](https://github.com/RocketChat/Rocket.Chat/pull/15612)) -- Replace livechat:rooms publication by REST ([#15968](https://github.com/RocketChat/Rocket.Chat/pull/15968) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace livechat:rooms publication by REST ([#15968](https://github.com/RocketChat/Rocket.Chat/pull/15968)) -- Replace livechat:visitorHistory publication by REST ([#15943](https://github.com/RocketChat/Rocket.Chat/pull/15943) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace livechat:visitorHistory publication by REST ([#15943](https://github.com/RocketChat/Rocket.Chat/pull/15943)) -- Replace oauth publications by REST ([#15878](https://github.com/RocketChat/Rocket.Chat/pull/15878) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace oauth publications by REST ([#15878](https://github.com/RocketChat/Rocket.Chat/pull/15878)) -- Replace roles publication by REST ([#15910](https://github.com/RocketChat/Rocket.Chat/pull/15910) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace roles publication by REST ([#15910](https://github.com/RocketChat/Rocket.Chat/pull/15910)) -- Replace stdout publication by REST ([#16004](https://github.com/RocketChat/Rocket.Chat/pull/16004) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace stdout publication by REST ([#16004](https://github.com/RocketChat/Rocket.Chat/pull/16004)) -- Replace userAutocomplete publication by REST ([#15956](https://github.com/RocketChat/Rocket.Chat/pull/15956) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace userAutocomplete publication by REST ([#15956](https://github.com/RocketChat/Rocket.Chat/pull/15956)) -- Replace userData subscriptions by REST ([#15916](https://github.com/RocketChat/Rocket.Chat/pull/15916) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace userData subscriptions by REST ([#15916](https://github.com/RocketChat/Rocket.Chat/pull/15916)) -- Replace webdavAccounts publication by REST ([#15926](https://github.com/RocketChat/Rocket.Chat/pull/15926) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace webdavAccounts publication by REST ([#15926](https://github.com/RocketChat/Rocket.Chat/pull/15926)) -- Sorting on livechat analytics queries were wrong ([#16021](https://github.com/RocketChat/Rocket.Chat/pull/16021) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Sorting on livechat analytics queries were wrong ([#16021](https://github.com/RocketChat/Rocket.Chat/pull/16021)) - Update ui for Roles field ([#15888](https://github.com/RocketChat/Rocket.Chat/pull/15888) by [@antkaz](https://github.com/antkaz)) -- Validate user identity on send message process ([#15887](https://github.com/RocketChat/Rocket.Chat/pull/15887) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Validate user identity on send message process ([#15887](https://github.com/RocketChat/Rocket.Chat/pull/15887)) ### 🐛 Bug fixes @@ -11835,7 +19571,7 @@ - Error of bind environment on user data export ([#15985](https://github.com/RocketChat/Rocket.Chat/pull/15985)) -- Fix sort livechat rooms ([#16001](https://github.com/RocketChat/Rocket.Chat/pull/16001) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix sort livechat rooms ([#16001](https://github.com/RocketChat/Rocket.Chat/pull/16001)) - Guest's name field missing when forwarding livechat rooms ([#15991](https://github.com/RocketChat/Rocket.Chat/pull/15991)) @@ -11915,7 +19651,6 @@ ### 👩‍💻👨‍💻 Contributors 😍 -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@antkaz](https://github.com/antkaz) - [@ashwaniYDV](https://github.com/ashwaniYDV) - [@breaking-let](https://github.com/breaking-let) @@ -11930,6 +19665,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@MartinSchoeler](https://github.com/MartinSchoeler) - [@d-gubert](https://github.com/d-gubert) - [@gabriellsh](https://github.com/gabriellsh) @@ -12032,9 +19768,9 @@ - Allow Regexes on SAML user field mapping ([#15743](https://github.com/RocketChat/Rocket.Chat/pull/15743)) -- Livechat analytics ([#15230](https://github.com/RocketChat/Rocket.Chat/pull/15230) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Livechat analytics ([#15230](https://github.com/RocketChat/Rocket.Chat/pull/15230)) -- Livechat analytics functions ([#15666](https://github.com/RocketChat/Rocket.Chat/pull/15666) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Livechat analytics functions ([#15666](https://github.com/RocketChat/Rocket.Chat/pull/15666)) - Notify users when their email address change ([#15828](https://github.com/RocketChat/Rocket.Chat/pull/15828)) @@ -12051,7 +19787,7 @@ ### 🚀 Improvements -- Add more fields to iframe integration event `unread-changed-by-subscription` ([#15786](https://github.com/RocketChat/Rocket.Chat/pull/15786) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add more fields to iframe integration event `unread-changed-by-subscription` ([#15786](https://github.com/RocketChat/Rocket.Chat/pull/15786)) - Administration UI - React and Fuselage components ([#15452](https://github.com/RocketChat/Rocket.Chat/pull/15452)) @@ -12065,23 +19801,23 @@ - Make push notification batchsize and interval configurable ([#15804](https://github.com/RocketChat/Rocket.Chat/pull/15804) by [@Exordian](https://github.com/Exordian)) -- Remove "EmojiCustom" unused subscription ([#15658](https://github.com/RocketChat/Rocket.Chat/pull/15658) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove "EmojiCustom" unused subscription ([#15658](https://github.com/RocketChat/Rocket.Chat/pull/15658)) - remove computations inside messageAttachment ([#15716](https://github.com/RocketChat/Rocket.Chat/pull/15716)) -- Replace livechat:departmentAgents subscription to REST ([#15529](https://github.com/RocketChat/Rocket.Chat/pull/15529) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace livechat:departmentAgents subscription to REST ([#15529](https://github.com/RocketChat/Rocket.Chat/pull/15529)) -- Replace livechat:externalMessages publication by REST ([#15643](https://github.com/RocketChat/Rocket.Chat/pull/15643) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace livechat:externalMessages publication by REST ([#15643](https://github.com/RocketChat/Rocket.Chat/pull/15643)) -- Replace livechat:pagesvisited publication by REST ([#15629](https://github.com/RocketChat/Rocket.Chat/pull/15629) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace livechat:pagesvisited publication by REST ([#15629](https://github.com/RocketChat/Rocket.Chat/pull/15629)) -- Replace livechat:visitorInfo publication by REST ([#15639](https://github.com/RocketChat/Rocket.Chat/pull/15639) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace livechat:visitorInfo publication by REST ([#15639](https://github.com/RocketChat/Rocket.Chat/pull/15639)) -- Replace personalAccessTokens publication by REST ([#15644](https://github.com/RocketChat/Rocket.Chat/pull/15644) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace personalAccessTokens publication by REST ([#15644](https://github.com/RocketChat/Rocket.Chat/pull/15644)) -- Replace snippetedMessage publication by REST ([#15679](https://github.com/RocketChat/Rocket.Chat/pull/15679) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace snippetedMessage publication by REST ([#15679](https://github.com/RocketChat/Rocket.Chat/pull/15679)) -- Replace snipptedMessages publication by REST ([#15678](https://github.com/RocketChat/Rocket.Chat/pull/15678) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace snipptedMessages publication by REST ([#15678](https://github.com/RocketChat/Rocket.Chat/pull/15678)) - Unfollow own threads ([#15740](https://github.com/RocketChat/Rocket.Chat/pull/15740)) @@ -12120,17 +19856,17 @@ - Missing Privacy Policy Agree on register ([#15832](https://github.com/RocketChat/Rocket.Chat/pull/15832)) -- Not valid relative URLs on message attachments ([#15651](https://github.com/RocketChat/Rocket.Chat/pull/15651) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Not valid relative URLs on message attachments ([#15651](https://github.com/RocketChat/Rocket.Chat/pull/15651)) - Null value at Notifications Preferences tab ([#15638](https://github.com/RocketChat/Rocket.Chat/pull/15638)) - Pasting images on reply as thread ([#15811](https://github.com/RocketChat/Rocket.Chat/pull/15811)) -- Prevent agent last message undefined ([#15809](https://github.com/RocketChat/Rocket.Chat/pull/15809) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Prevent agent last message undefined ([#15809](https://github.com/RocketChat/Rocket.Chat/pull/15809)) - Push: fix notification priority for google (FCM) ([#15803](https://github.com/RocketChat/Rocket.Chat/pull/15803) by [@Exordian](https://github.com/Exordian)) -- REST endpoint `chat.syncMessages` returning an error with deleted messages ([#15824](https://github.com/RocketChat/Rocket.Chat/pull/15824) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST endpoint `chat.syncMessages` returning an error with deleted messages ([#15824](https://github.com/RocketChat/Rocket.Chat/pull/15824)) - Sending messages to livechat rooms without a subscription ([#15707](https://github.com/RocketChat/Rocket.Chat/pull/15707)) @@ -12146,7 +19882,7 @@ - [CHORE] Add lingohub to readme ([#15849](https://github.com/RocketChat/Rocket.Chat/pull/15849)) -- [REGRESSION] Add livechat room type to the room's file list ([#15795](https://github.com/RocketChat/Rocket.Chat/pull/15795) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- [REGRESSION] Add livechat room type to the room's file list ([#15795](https://github.com/RocketChat/Rocket.Chat/pull/15795)) - Fix Livechat duplicated templates error ([#15869](https://github.com/RocketChat/Rocket.Chat/pull/15869)) @@ -12183,7 +19919,6 @@ ### 👩‍💻👨‍💻 Contributors 😍 - [@Exordian](https://github.com/Exordian) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@mariaeduardacunha](https://github.com/mariaeduardacunha) - [@mpdbl](https://github.com/mpdbl) - [@nstseek](https://github.com/nstseek) @@ -12192,6 +19927,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@MartinSchoeler](https://github.com/MartinSchoeler) - [@d-gubert](https://github.com/d-gubert) - [@gabriellsh](https://github.com/gabriellsh) @@ -12238,11 +19974,11 @@ - Add new Livechat appearance setting to set the conversation finished message ([#15577](https://github.com/RocketChat/Rocket.Chat/pull/15577)) -- Add option to enable X-Frame-options header to avoid loading inside any Iframe ([#14698](https://github.com/RocketChat/Rocket.Chat/pull/14698) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add option to enable X-Frame-options header to avoid loading inside any Iframe ([#14698](https://github.com/RocketChat/Rocket.Chat/pull/14698)) -- Add users.requestDataDownload API endpoint ([#14428](https://github.com/RocketChat/Rocket.Chat/pull/14428) by [@Hudell](https://github.com/Hudell) & [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@ubarsaiyan](https://github.com/ubarsaiyan)) +- Add users.requestDataDownload API endpoint ([#14428](https://github.com/RocketChat/Rocket.Chat/pull/14428) by [@Hudell](https://github.com/Hudell) & [@ubarsaiyan](https://github.com/ubarsaiyan)) -- Added file type filter to RoomFiles ([#15289](https://github.com/RocketChat/Rocket.Chat/pull/15289) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@juanpetterson](https://github.com/juanpetterson)) +- Added file type filter to RoomFiles ([#15289](https://github.com/RocketChat/Rocket.Chat/pull/15289) by [@juanpetterson](https://github.com/juanpetterson)) - Assign new Livechat conversations to bot agents first ([#15317](https://github.com/RocketChat/Rocket.Chat/pull/15317)) @@ -12256,7 +19992,7 @@ - Remove all closed Livechat chats ([#13991](https://github.com/RocketChat/Rocket.Chat/pull/13991) by [@knrt10](https://github.com/knrt10)) -- Separate integration roles ([#13902](https://github.com/RocketChat/Rocket.Chat/pull/13902) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Separate integration roles ([#13902](https://github.com/RocketChat/Rocket.Chat/pull/13902)) - Thread support to apps slashcommands and slashcommand previews ([#15574](https://github.com/RocketChat/Rocket.Chat/pull/15574)) @@ -12273,25 +20009,25 @@ - Lazyload Katex Package ([#15398](https://github.com/RocketChat/Rocket.Chat/pull/15398)) -- Replace `livechat:departments` publication by REST Calls ([#15478](https://github.com/RocketChat/Rocket.Chat/pull/15478) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace `livechat:departments` publication by REST Calls ([#15478](https://github.com/RocketChat/Rocket.Chat/pull/15478)) -- Replace `livechat:triggers` publication by REST calls ([#15507](https://github.com/RocketChat/Rocket.Chat/pull/15507) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace `livechat:triggers` publication by REST calls ([#15507](https://github.com/RocketChat/Rocket.Chat/pull/15507)) -- Replace livechat:agents pub by REST calls ([#15490](https://github.com/RocketChat/Rocket.Chat/pull/15490) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace livechat:agents pub by REST calls ([#15490](https://github.com/RocketChat/Rocket.Chat/pull/15490)) -- Replace livechat:appearance pub to REST ([#15510](https://github.com/RocketChat/Rocket.Chat/pull/15510) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace livechat:appearance pub to REST ([#15510](https://github.com/RocketChat/Rocket.Chat/pull/15510)) -- Replace livechat:integration publication by REST ([#15607](https://github.com/RocketChat/Rocket.Chat/pull/15607) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace livechat:integration publication by REST ([#15607](https://github.com/RocketChat/Rocket.Chat/pull/15607)) -- Replace mentionedMessages publication to REST ([#15540](https://github.com/RocketChat/Rocket.Chat/pull/15540) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace mentionedMessages publication to REST ([#15540](https://github.com/RocketChat/Rocket.Chat/pull/15540)) -- Replace pinned messages subscription ([#15544](https://github.com/RocketChat/Rocket.Chat/pull/15544) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace pinned messages subscription ([#15544](https://github.com/RocketChat/Rocket.Chat/pull/15544)) -- Replace roomFilesWithSearchText subscription ([#15550](https://github.com/RocketChat/Rocket.Chat/pull/15550) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace roomFilesWithSearchText subscription ([#15550](https://github.com/RocketChat/Rocket.Chat/pull/15550)) -- Replace some livechat:rooms subscriptions ([#15532](https://github.com/RocketChat/Rocket.Chat/pull/15532) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace some livechat:rooms subscriptions ([#15532](https://github.com/RocketChat/Rocket.Chat/pull/15532)) -- Replace starred messages subscription ([#15548](https://github.com/RocketChat/Rocket.Chat/pull/15548) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Replace starred messages subscription ([#15548](https://github.com/RocketChat/Rocket.Chat/pull/15548)) - Secure cookies when using HTTPS connection ([#15500](https://github.com/RocketChat/Rocket.Chat/pull/15500)) @@ -12354,15 +20090,15 @@ - [CHORE] remove 'bulk-create-c' permission ([#15517](https://github.com/RocketChat/Rocket.Chat/pull/15517) by [@antkaz](https://github.com/antkaz)) -- [CHORE] Split logger classes to avoid cyclic dependencies ([#15559](https://github.com/RocketChat/Rocket.Chat/pull/15559) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- [CHORE] Split logger classes to avoid cyclic dependencies ([#15559](https://github.com/RocketChat/Rocket.Chat/pull/15559)) - [CHORE] Update latest Livechat widget version to 1.2.2 ([#15592](https://github.com/RocketChat/Rocket.Chat/pull/15592)) - [CHORE] Update latest Livechat widget version to 1.2.4 ([#15596](https://github.com/RocketChat/Rocket.Chat/pull/15596)) -- [FEATURE] Rest API upload file returns message object ([#13821](https://github.com/RocketChat/Rocket.Chat/pull/13821) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@knrt10](https://github.com/knrt10)) +- [FEATURE] Rest API upload file returns message object ([#13821](https://github.com/RocketChat/Rocket.Chat/pull/13821) by [@knrt10](https://github.com/knrt10)) -- [REGRESSION] Fix remove department from list ([#15591](https://github.com/RocketChat/Rocket.Chat/pull/15591) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- [REGRESSION] Fix remove department from list ([#15591](https://github.com/RocketChat/Rocket.Chat/pull/15591)) - Chore: Add Client Setup Information to Issue Template ([#15625](https://github.com/RocketChat/Rocket.Chat/pull/15625)) @@ -12378,7 +20114,7 @@ - Merge master into develop & Set version to 2.2.0-develop ([#15469](https://github.com/RocketChat/Rocket.Chat/pull/15469)) -- Move publication deprecation warnings ([#15676](https://github.com/RocketChat/Rocket.Chat/pull/15676) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Move publication deprecation warnings ([#15676](https://github.com/RocketChat/Rocket.Chat/pull/15676)) - New: Add dev dependency david badge to README ([#9058](https://github.com/RocketChat/Rocket.Chat/pull/9058) by [@robbyoconnor](https://github.com/robbyoconnor)) @@ -12394,7 +20130,7 @@ - Regression: hasPermission ignoring subscription roles ([#15652](https://github.com/RocketChat/Rocket.Chat/pull/15652)) -- Regression: Move import to avoid circular dependencies ([#15628](https://github.com/RocketChat/Rocket.Chat/pull/15628) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Regression: Move import to avoid circular dependencies ([#15628](https://github.com/RocketChat/Rocket.Chat/pull/15628)) - Regression: Remove reference to obsolete template helper ([#15675](https://github.com/RocketChat/Rocket.Chat/pull/15675)) @@ -12406,20 +20142,20 @@ - Revert fix package-lock.json ([#15563](https://github.com/RocketChat/Rocket.Chat/pull/15563)) -- Updating license term ([#15476](https://github.com/RocketChat/Rocket.Chat/pull/15476)) +- Updating license term ([#15476](https://github.com/RocketChat/Rocket.Chat/pull/15476) by [@mar-v](https://github.com/mar-v)) ### 👩‍💻👨‍💻 Contributors 😍 - [@Hudell](https://github.com/Hudell) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@Montel](https://github.com/Montel) - [@RafaelGSS](https://github.com/RafaelGSS) - [@antkaz](https://github.com/antkaz) - [@hmagarotto](https://github.com/hmagarotto) - [@juanpetterson](https://github.com/juanpetterson) - [@knrt10](https://github.com/knrt10) +- [@mar-v](https://github.com/mar-v) - [@mohamedar97](https://github.com/mohamedar97) - [@nstseek](https://github.com/nstseek) - [@oguhpereira](https://github.com/oguhpereira) @@ -12432,11 +20168,11 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@MartinSchoeler](https://github.com/MartinSchoeler) - [@d-gubert](https://github.com/d-gubert) - [@geekgonecrazy](https://github.com/geekgonecrazy) - [@ggazzo](https://github.com/ggazzo) -- [@mar-v](https://github.com/mar-v) - [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) - [@renatobecker](https://github.com/renatobecker) - [@rodrigok](https://github.com/rodrigok) @@ -12534,9 +20270,9 @@ ### 🎉 New features -- Add ability to disable email notifications globally ([#9667](https://github.com/RocketChat/Rocket.Chat/pull/9667) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@ferdifly](https://github.com/ferdifly)) +- Add ability to disable email notifications globally ([#9667](https://github.com/RocketChat/Rocket.Chat/pull/9667) by [@ferdifly](https://github.com/ferdifly)) -- Add JWT to uploaded files urls ([#15297](https://github.com/RocketChat/Rocket.Chat/pull/15297) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add JWT to uploaded files urls ([#15297](https://github.com/RocketChat/Rocket.Chat/pull/15297)) - Allow file sharing through Twilio(WhatsApp) integration ([#15415](https://github.com/RocketChat/Rocket.Chat/pull/15415)) @@ -12569,7 +20305,7 @@ - Add missing indices used by read receipts ([#15316](https://github.com/RocketChat/Rocket.Chat/pull/15316)) -- Add possibility of renaming a discussion ([#15122](https://github.com/RocketChat/Rocket.Chat/pull/15122) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add possibility of renaming a discussion ([#15122](https://github.com/RocketChat/Rocket.Chat/pull/15122)) - Administration UI ([#15401](https://github.com/RocketChat/Rocket.Chat/pull/15401)) @@ -12590,13 +20326,13 @@ ### 🐛 Bug fixes -- Add ENV VAR to enable users create token feature ([#15334](https://github.com/RocketChat/Rocket.Chat/pull/15334) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add ENV VAR to enable users create token feature ([#15334](https://github.com/RocketChat/Rocket.Chat/pull/15334)) - CAS users can take control of Rocket.Chat accounts ([#15346](https://github.com/RocketChat/Rocket.Chat/pull/15346)) -- Delivering real-time messages to users that left a room ([#15389](https://github.com/RocketChat/Rocket.Chat/pull/15389) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Delivering real-time messages to users that left a room ([#15389](https://github.com/RocketChat/Rocket.Chat/pull/15389)) -- Don't allow email violating whitelist addresses ([#15339](https://github.com/RocketChat/Rocket.Chat/pull/15339) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Don't allow email violating whitelist addresses ([#15339](https://github.com/RocketChat/Rocket.Chat/pull/15339)) - Double send bug on message box ([#15409](https://github.com/RocketChat/Rocket.Chat/pull/15409)) @@ -12606,13 +20342,13 @@ - Federation messages notifications ([#15418](https://github.com/RocketChat/Rocket.Chat/pull/15418)) -- Fix file uploads JWT ([#15412](https://github.com/RocketChat/Rocket.Chat/pull/15412) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix file uploads JWT ([#15412](https://github.com/RocketChat/Rocket.Chat/pull/15412)) - Grammatical error in Not Found page ([#15382](https://github.com/RocketChat/Rocket.Chat/pull/15382)) - LDAP usernames get additional '.' if they contain numbers ([#14644](https://github.com/RocketChat/Rocket.Chat/pull/14644) by [@Hudell](https://github.com/Hudell)) -- Limit exposed fields on some users. endpoints ([#15327](https://github.com/RocketChat/Rocket.Chat/pull/15327) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Limit exposed fields on some users. endpoints ([#15327](https://github.com/RocketChat/Rocket.Chat/pull/15327)) - Message box not centered ([#15367](https://github.com/RocketChat/Rocket.Chat/pull/15367)) @@ -12624,13 +20360,13 @@ - Reduce Message cache time to 500ms ([#15295](https://github.com/RocketChat/Rocket.Chat/pull/15295) by [@vickyokrm](https://github.com/vickyokrm)) -- REST API to return only public custom fields ([#15292](https://github.com/RocketChat/Rocket.Chat/pull/15292) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST API to return only public custom fields ([#15292](https://github.com/RocketChat/Rocket.Chat/pull/15292)) -- REST endpoint `users.setPreferences` to not override all user's preferences ([#15288](https://github.com/RocketChat/Rocket.Chat/pull/15288) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST endpoint `users.setPreferences` to not override all user's preferences ([#15288](https://github.com/RocketChat/Rocket.Chat/pull/15288)) - Set the DEFAULT_ECDH_CURVE to auto (#15245) ([#15365](https://github.com/RocketChat/Rocket.Chat/pull/15365) by [@dlundgren](https://github.com/dlundgren)) -- Subscription record not having the `ls` field ([#14544](https://github.com/RocketChat/Rocket.Chat/pull/14544) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Subscription record not having the `ls` field ([#14544](https://github.com/RocketChat/Rocket.Chat/pull/14544)) - User Profile Time Format ([#15385](https://github.com/RocketChat/Rocket.Chat/pull/15385)) @@ -12654,7 +20390,7 @@ - LingoHub based on develop ([#15377](https://github.com/RocketChat/Rocket.Chat/pull/15377)) -- Merge master into develop & Set version to 2.1.0-develop ([#15357](https://github.com/RocketChat/Rocket.Chat/pull/15357) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Merge master into develop & Set version to 2.1.0-develop ([#15357](https://github.com/RocketChat/Rocket.Chat/pull/15357)) - Regression: API CORS not working after Cordova being disabled by default ([#15443](https://github.com/RocketChat/Rocket.Chat/pull/15443)) @@ -12668,11 +20404,11 @@ - Regression: Messagebox height changing when typing ([#15380](https://github.com/RocketChat/Rocket.Chat/pull/15380)) -- Regression: Prevent parsing empty custom field setting ([#15413](https://github.com/RocketChat/Rocket.Chat/pull/15413) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Regression: Prevent parsing empty custom field setting ([#15413](https://github.com/RocketChat/Rocket.Chat/pull/15413)) - Regression: setup wizard dynamic import using relative url ([#15432](https://github.com/RocketChat/Rocket.Chat/pull/15432)) -- Remove GraphQL dependencies left ([#15356](https://github.com/RocketChat/Rocket.Chat/pull/15356) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove GraphQL dependencies left ([#15356](https://github.com/RocketChat/Rocket.Chat/pull/15356)) - Remove log ADMIN_PASS environment variable ([#15307](https://github.com/RocketChat/Rocket.Chat/pull/15307)) @@ -12687,7 +20423,6 @@ ### 👩‍💻👨‍💻 Contributors 😍 - [@Hudell](https://github.com/Hudell) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@dlundgren](https://github.com/dlundgren) - [@ferdifly](https://github.com/ferdifly) - [@ifantom](https://github.com/ifantom) @@ -12699,6 +20434,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@MartinSchoeler](https://github.com/MartinSchoeler) - [@alansikora](https://github.com/alansikora) - [@d-gubert](https://github.com/d-gubert) @@ -12758,7 +20494,7 @@ ### 🎉 New features -- Add autotranslate Rest endpoints ([#14885](https://github.com/RocketChat/Rocket.Chat/pull/14885) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add autotranslate Rest endpoints ([#14885](https://github.com/RocketChat/Rocket.Chat/pull/14885)) - Add Mobex to the list of SMS service providers ([#14655](https://github.com/RocketChat/Rocket.Chat/pull/14655) by [@zolbayars](https://github.com/zolbayars)) @@ -12766,7 +20502,7 @@ - Custom message popups ([#15117](https://github.com/RocketChat/Rocket.Chat/pull/15117) by [@Hudell](https://github.com/Hudell)) -- Endpoint to fetch livechat rooms with several filters ([#15155](https://github.com/RocketChat/Rocket.Chat/pull/15155) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Endpoint to fetch livechat rooms with several filters ([#15155](https://github.com/RocketChat/Rocket.Chat/pull/15155)) - Granular permissions for settings ([#8942](https://github.com/RocketChat/Rocket.Chat/pull/8942) by [@mrsimpson](https://github.com/mrsimpson)) @@ -12780,7 +20516,7 @@ - Options for SAML auth for individual organizations needs ([#14275](https://github.com/RocketChat/Rocket.Chat/pull/14275) by [@Deltachaos](https://github.com/Deltachaos) & [@Hudell](https://github.com/Hudell)) -- Rest API Endpoint to get pinned messages from a room ([#13864](https://github.com/RocketChat/Rocket.Chat/pull/13864) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@thayannevls](https://github.com/thayannevls)) +- Rest API Endpoint to get pinned messages from a room ([#13864](https://github.com/RocketChat/Rocket.Chat/pull/13864) by [@thayannevls](https://github.com/thayannevls)) - Setup Wizard and Page not found, using React components ([#15204](https://github.com/RocketChat/Rocket.Chat/pull/15204)) @@ -12789,11 +20525,11 @@ ### 🚀 Improvements -- Add asset extension validation ([#15088](https://github.com/RocketChat/Rocket.Chat/pull/15088) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add asset extension validation ([#15088](https://github.com/RocketChat/Rocket.Chat/pull/15088)) -- Add limit of 50 user's resume tokens ([#15102](https://github.com/RocketChat/Rocket.Chat/pull/15102) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add limit of 50 user's resume tokens ([#15102](https://github.com/RocketChat/Rocket.Chat/pull/15102)) -- Add possibility to use commands inside threads through Rest API ([#15167](https://github.com/RocketChat/Rocket.Chat/pull/15167) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add possibility to use commands inside threads through Rest API ([#15167](https://github.com/RocketChat/Rocket.Chat/pull/15167)) - Livechat User Management Improvements ([#14736](https://github.com/RocketChat/Rocket.Chat/pull/14736) by [@Hudell](https://github.com/Hudell)) @@ -12822,7 +20558,7 @@ - Messages search scroll ([#15175](https://github.com/RocketChat/Rocket.Chat/pull/15175)) -- Prevent to create discussion with empty name ([#14507](https://github.com/RocketChat/Rocket.Chat/pull/14507) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Prevent to create discussion with empty name ([#14507](https://github.com/RocketChat/Rocket.Chat/pull/14507)) - Rate limit incoming integrations (webhooks) ([#15038](https://github.com/RocketChat/Rocket.Chat/pull/15038) by [@mrsimpson](https://github.com/mrsimpson)) @@ -12840,7 +20576,7 @@ - User's auto complete showing everyone on the server ([#15212](https://github.com/RocketChat/Rocket.Chat/pull/15212)) -- Webdav crash ([#14918](https://github.com/RocketChat/Rocket.Chat/pull/14918) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Webdav crash ([#14918](https://github.com/RocketChat/Rocket.Chat/pull/14918))
🔍 Minor changes @@ -12852,7 +20588,7 @@ - Add wreiske to authorized users in catbot ([#15147](https://github.com/RocketChat/Rocket.Chat/pull/15147)) -- Allow file upload paths on attachments URLs ([#15121](https://github.com/RocketChat/Rocket.Chat/pull/15121) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Allow file upload paths on attachments URLs ([#15121](https://github.com/RocketChat/Rocket.Chat/pull/15121)) - Change notifications file imports to server ([#15184](https://github.com/RocketChat/Rocket.Chat/pull/15184)) @@ -12868,7 +20604,7 @@ - Fix v148 migration ([#15285](https://github.com/RocketChat/Rocket.Chat/pull/15285)) -- Improve url validation inside message object ([#15074](https://github.com/RocketChat/Rocket.Chat/pull/15074) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Improve url validation inside message object ([#15074](https://github.com/RocketChat/Rocket.Chat/pull/15074)) - LingoHub based on develop ([#15218](https://github.com/RocketChat/Rocket.Chat/pull/15218)) @@ -12930,7 +20666,6 @@ - [@Deltachaos](https://github.com/Deltachaos) - [@Hudell](https://github.com/Hudell) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@NatsumiKubo](https://github.com/NatsumiKubo) - [@cardoso](https://github.com/cardoso) - [@cesarmal](https://github.com/cesarmal) @@ -12947,6 +20682,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 - [@LuluGO](https://github.com/LuluGO) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@MartinSchoeler](https://github.com/MartinSchoeler) - [@alansikora](https://github.com/alansikora) - [@d-gubert](https://github.com/d-gubert) @@ -13052,18 +20788,15 @@ 🔍 Minor changes -- Fix custom auth ([#15141](https://github.com/RocketChat/Rocket.Chat/pull/15141) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix custom auth ([#15141](https://github.com/RocketChat/Rocket.Chat/pull/15141)) -- Release 1.3.1 ([#15148](https://github.com/RocketChat/Rocket.Chat/pull/15148) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Release 1.3.1 ([#15148](https://github.com/RocketChat/Rocket.Chat/pull/15148))
-### 👩‍💻👨‍💻 Contributors 😍 - -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@ggazzo](https://github.com/ggazzo) - [@sampaiodiego](https://github.com/sampaiodiego) @@ -13099,7 +20832,7 @@ ### 🚀 Improvements -- Add descriptions on user data download buttons and popup info ([#14852](https://github.com/RocketChat/Rocket.Chat/pull/14852) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add descriptions on user data download buttons and popup info ([#14852](https://github.com/RocketChat/Rocket.Chat/pull/14852)) - Add flag to identify remote federation users ([#15004](https://github.com/RocketChat/Rocket.Chat/pull/15004)) @@ -13128,7 +20861,7 @@ - Edit message with arrow up key if not last message ([#15021](https://github.com/RocketChat/Rocket.Chat/pull/15021)) -- Edit permissions screen ([#14950](https://github.com/RocketChat/Rocket.Chat/pull/14950) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Edit permissions screen ([#14950](https://github.com/RocketChat/Rocket.Chat/pull/14950)) - eternal loading file list ([#14952](https://github.com/RocketChat/Rocket.Chat/pull/14952)) @@ -13144,9 +20877,9 @@ - Loading indicator positioning ([#14968](https://github.com/RocketChat/Rocket.Chat/pull/14968)) -- Message attachments not allowing float numbers ([#14412](https://github.com/RocketChat/Rocket.Chat/pull/14412) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Message attachments not allowing float numbers ([#14412](https://github.com/RocketChat/Rocket.Chat/pull/14412)) -- Method `getUsersOfRoom` not returning offline users if limit is not defined ([#14753](https://github.com/RocketChat/Rocket.Chat/pull/14753) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Method `getUsersOfRoom` not returning offline users if limit is not defined ([#14753](https://github.com/RocketChat/Rocket.Chat/pull/14753)) - Not being able to mention users with "all" and "here" usernames - do not allow users register that usernames ([#14468](https://github.com/RocketChat/Rocket.Chat/pull/14468) by [@hamidrezabstn](https://github.com/hamidrezabstn)) @@ -13156,7 +20889,7 @@ - OTR key icon missing on messages ([#14953](https://github.com/RocketChat/Rocket.Chat/pull/14953)) -- Prevent error on trying insert message with duplicated id ([#14945](https://github.com/RocketChat/Rocket.Chat/pull/14945) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Prevent error on trying insert message with duplicated id ([#14945](https://github.com/RocketChat/Rocket.Chat/pull/14945)) - Russian grammatical errors ([#14622](https://github.com/RocketChat/Rocket.Chat/pull/14622) by [@BehindLoader](https://github.com/BehindLoader)) @@ -13168,7 +20901,7 @@ - Typo in german translation ([#14833](https://github.com/RocketChat/Rocket.Chat/pull/14833) by [@Le-onardo](https://github.com/Le-onardo)) -- Users staying online after logout ([#14966](https://github.com/RocketChat/Rocket.Chat/pull/14966) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Users staying online after logout ([#14966](https://github.com/RocketChat/Rocket.Chat/pull/14966)) - users.setStatus REST endpoint not allowing reset status message ([#14916](https://github.com/RocketChat/Rocket.Chat/pull/14916) by [@cardoso](https://github.com/cardoso)) @@ -13186,7 +20919,7 @@ - Add missing French translation ([#15013](https://github.com/RocketChat/Rocket.Chat/pull/15013) by [@commiaI](https://github.com/commiaI)) -- Always convert the sha256 password to lowercase on checking ([#14941](https://github.com/RocketChat/Rocket.Chat/pull/14941) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Always convert the sha256 password to lowercase on checking ([#14941](https://github.com/RocketChat/Rocket.Chat/pull/14941)) - Bump jquery from 3.3.1 to 3.4.0 in /packages/rocketchat-livechat/.app ([#14922](https://github.com/RocketChat/Rocket.Chat/pull/14922) by [@dependabot[bot]](https://github.com/dependabot[bot])) @@ -13210,9 +20943,9 @@ - improve: relocate some of wizard info to register ([#14884](https://github.com/RocketChat/Rocket.Chat/pull/14884)) -- Merge master into develop & Set version to 1.3.0-develop ([#14889](https://github.com/RocketChat/Rocket.Chat/pull/14889) by [@Hudell](https://github.com/Hudell) & [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Merge master into develop & Set version to 1.3.0-develop ([#14889](https://github.com/RocketChat/Rocket.Chat/pull/14889) by [@Hudell](https://github.com/Hudell)) -- New: Apps and integrations statistics ([#14878](https://github.com/RocketChat/Rocket.Chat/pull/14878) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- New: Apps and integrations statistics ([#14878](https://github.com/RocketChat/Rocket.Chat/pull/14878)) - Regression: Apps and Marketplace UI issues ([#15045](https://github.com/RocketChat/Rocket.Chat/pull/15045)) @@ -13253,7 +20986,6 @@ - [@BehindLoader](https://github.com/BehindLoader) - [@Hudell](https://github.com/Hudell) - [@Le-onardo](https://github.com/Le-onardo) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@NateScarlet](https://github.com/NateScarlet) - [@anandpathak](https://github.com/anandpathak) - [@brakhane](https://github.com/brakhane) @@ -13272,6 +21004,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@alansikora](https://github.com/alansikora) - [@d-gubert](https://github.com/d-gubert) - [@engelgabriel](https://github.com/engelgabriel) @@ -13295,11 +21028,11 @@ 🔍 Minor changes -- Fix custom auth ([#15141](https://github.com/RocketChat/Rocket.Chat/pull/15141) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix custom auth ([#15141](https://github.com/RocketChat/Rocket.Chat/pull/15141)) -### 👩‍💻👨‍💻 Contributors 😍 +### 👩‍💻👨‍💻 Core Team 🤓 - [@MarcosSpessatto](https://github.com/MarcosSpessatto) @@ -13357,11 +21090,11 @@ ### 🎉 New features -- Add Livechat inquiries endpoints ([#14779](https://github.com/RocketChat/Rocket.Chat/pull/14779) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add Livechat inquiries endpoints ([#14779](https://github.com/RocketChat/Rocket.Chat/pull/14779)) - Add loading animation to webdav file picker ([#14759](https://github.com/RocketChat/Rocket.Chat/pull/14759) by [@ubarsaiyan](https://github.com/ubarsaiyan)) -- Add tmid property to outgoing integration ([#14699](https://github.com/RocketChat/Rocket.Chat/pull/14699) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add tmid property to outgoing integration ([#14699](https://github.com/RocketChat/Rocket.Chat/pull/14699)) - changed mongo version for snap from 3.2.7 to 3.4.20 ([#14838](https://github.com/RocketChat/Rocket.Chat/pull/14838)) @@ -13369,7 +21102,7 @@ - Custom User Status ([#13933](https://github.com/RocketChat/Rocket.Chat/pull/13933) by [@Hudell](https://github.com/Hudell) & [@wreiske](https://github.com/wreiske)) -- Endpoint to anonymously read channel's messages ([#14714](https://github.com/RocketChat/Rocket.Chat/pull/14714) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Endpoint to anonymously read channel's messages ([#14714](https://github.com/RocketChat/Rocket.Chat/pull/14714)) - Show App bundles and its apps ([#14886](https://github.com/RocketChat/Rocket.Chat/pull/14886)) @@ -13378,7 +21111,7 @@ - Add an optional rocketchat-protocol DNS entry for Federation ([#14589](https://github.com/RocketChat/Rocket.Chat/pull/14589)) -- Adds link to download generated user data file ([#14175](https://github.com/RocketChat/Rocket.Chat/pull/14175) by [@Hudell](https://github.com/Hudell) & [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Adds link to download generated user data file ([#14175](https://github.com/RocketChat/Rocket.Chat/pull/14175) by [@Hudell](https://github.com/Hudell)) - Layout of livechat manager pages to new style ([#13900](https://github.com/RocketChat/Rocket.Chat/pull/13900)) @@ -13393,19 +21126,19 @@ - Direct reply delete config and description ([#14493](https://github.com/RocketChat/Rocket.Chat/pull/14493) by [@ruKurz](https://github.com/ruKurz)) -- Error when using Download My Data or Export My Data ([#14645](https://github.com/RocketChat/Rocket.Chat/pull/14645) by [@Hudell](https://github.com/Hudell) & [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Error when using Download My Data or Export My Data ([#14645](https://github.com/RocketChat/Rocket.Chat/pull/14645) by [@Hudell](https://github.com/Hudell)) - Gap of messages when loading history when using threads ([#14837](https://github.com/RocketChat/Rocket.Chat/pull/14837)) - Import Chart.js error ([#14471](https://github.com/RocketChat/Rocket.Chat/pull/14471) by [@Hudell](https://github.com/Hudell) & [@sonbn0](https://github.com/sonbn0)) -- Increasing time to rate limit in shield.svg endpoint and add a setting to disable API rate limiter ([#14709](https://github.com/RocketChat/Rocket.Chat/pull/14709) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Increasing time to rate limit in shield.svg endpoint and add a setting to disable API rate limiter ([#14709](https://github.com/RocketChat/Rocket.Chat/pull/14709)) - LinkedIn OAuth login ([#14887](https://github.com/RocketChat/Rocket.Chat/pull/14887) by [@Hudell](https://github.com/Hudell)) -- Move the set Avatar call on user creation to make sure the user has username ([#14665](https://github.com/RocketChat/Rocket.Chat/pull/14665) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Move the set Avatar call on user creation to make sure the user has username ([#14665](https://github.com/RocketChat/Rocket.Chat/pull/14665)) -- Name is undefined in some emails ([#14533](https://github.com/RocketChat/Rocket.Chat/pull/14533) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Name is undefined in some emails ([#14533](https://github.com/RocketChat/Rocket.Chat/pull/14533)) - Removes E2E action button, icon and banner when E2E is disabled. ([#14810](https://github.com/RocketChat/Rocket.Chat/pull/14810)) @@ -13441,7 +21174,6 @@ - [@AnBo83](https://github.com/AnBo83) - [@Hudell](https://github.com/Hudell) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@knrt10](https://github.com/knrt10) - [@lolimay](https://github.com/lolimay) - [@mohamedar97](https://github.com/mohamedar97) @@ -13454,6 +21186,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 - [@LuluGO](https://github.com/LuluGO) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@PrajvalRaval](https://github.com/PrajvalRaval) - [@alansikora](https://github.com/alansikora) - [@engelgabriel](https://github.com/engelgabriel) @@ -13476,11 +21209,11 @@ 🔍 Minor changes -- Fix custom auth ([#15141](https://github.com/RocketChat/Rocket.Chat/pull/15141) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix custom auth ([#15141](https://github.com/RocketChat/Rocket.Chat/pull/15141)) -### 👩‍💻👨‍💻 Contributors 😍 +### 👩‍💻👨‍💻 Core Team 🤓 - [@MarcosSpessatto](https://github.com/MarcosSpessatto) @@ -13540,27 +21273,27 @@ ### 🐛 Bug fixes -- Anonymous chat read ([#14717](https://github.com/RocketChat/Rocket.Chat/pull/14717) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Anonymous chat read ([#14717](https://github.com/RocketChat/Rocket.Chat/pull/14717)) - User Real Name being erased when not modified ([#14711](https://github.com/RocketChat/Rocket.Chat/pull/14711) by [@Hudell](https://github.com/Hudell)) -- User status information on User Info panel ([#14763](https://github.com/RocketChat/Rocket.Chat/pull/14763) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- User status information on User Info panel ([#14763](https://github.com/RocketChat/Rocket.Chat/pull/14763))
🔍 Minor changes -- Release 1.1.2 ([#14823](https://github.com/RocketChat/Rocket.Chat/pull/14823) by [@Hudell](https://github.com/Hudell) & [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Release 1.1.2 ([#14823](https://github.com/RocketChat/Rocket.Chat/pull/14823) by [@Hudell](https://github.com/Hudell))
### 👩‍💻👨‍💻 Contributors 😍 - [@Hudell](https://github.com/Hudell) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@ggazzo](https://github.com/ggazzo) - [@sampaiodiego](https://github.com/sampaiodiego) @@ -13615,7 +21348,7 @@ - Returns custom emojis through the Livechat REST API ([#14370](https://github.com/RocketChat/Rocket.Chat/pull/14370)) -- Setting option to mark as containing a secret/password ([#10273](https://github.com/RocketChat/Rocket.Chat/pull/10273) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Setting option to mark as containing a secret/password ([#10273](https://github.com/RocketChat/Rocket.Chat/pull/10273)) ### 🚀 Improvements @@ -13661,13 +21394,13 @@ - Channel settings form to textarea for Topic and Description ([#13328](https://github.com/RocketChat/Rocket.Chat/pull/13328) by [@supra08](https://github.com/supra08)) -- Custom scripts descriptions were not clear enough ([#14516](https://github.com/RocketChat/Rocket.Chat/pull/14516) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Custom scripts descriptions were not clear enough ([#14516](https://github.com/RocketChat/Rocket.Chat/pull/14516)) - Discussion name being invalid ([#14442](https://github.com/RocketChat/Rocket.Chat/pull/14442)) - Downloading files when running in sub directory ([#14485](https://github.com/RocketChat/Rocket.Chat/pull/14485) by [@miolane](https://github.com/miolane)) -- Duplicated link to jump to message ([#14505](https://github.com/RocketChat/Rocket.Chat/pull/14505) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Duplicated link to jump to message ([#14505](https://github.com/RocketChat/Rocket.Chat/pull/14505)) - E2E messages not decrypting in message threads ([#14580](https://github.com/RocketChat/Rocket.Chat/pull/14580)) @@ -13687,7 +21420,7 @@ - Fallback to mongo version that doesn't require clusterMonitor role ([#14403](https://github.com/RocketChat/Rocket.Chat/pull/14403)) -- Fix redirect to First channel after login ([#14434](https://github.com/RocketChat/Rocket.Chat/pull/14434) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix redirect to First channel after login ([#14434](https://github.com/RocketChat/Rocket.Chat/pull/14434)) - IE11 support ([#14422](https://github.com/RocketChat/Rocket.Chat/pull/14422)) @@ -13695,7 +21428,7 @@ - Inject code at the end of tag ([#14623](https://github.com/RocketChat/Rocket.Chat/pull/14623)) -- Mailer breaking if user doesn't have an email address ([#14614](https://github.com/RocketChat/Rocket.Chat/pull/14614) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Mailer breaking if user doesn't have an email address ([#14614](https://github.com/RocketChat/Rocket.Chat/pull/14614)) - Main thread title on replies ([#14372](https://github.com/RocketChat/Rocket.Chat/pull/14372)) @@ -13711,13 +21444,13 @@ - New day separator overlapping above system message ([#14362](https://github.com/RocketChat/Rocket.Chat/pull/14362)) -- No feedback when adding users that already exists in a room ([#14534](https://github.com/RocketChat/Rocket.Chat/pull/14534) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@gsunit](https://github.com/gsunit)) +- No feedback when adding users that already exists in a room ([#14534](https://github.com/RocketChat/Rocket.Chat/pull/14534) by [@gsunit](https://github.com/gsunit)) - Optional exit on Unhandled Promise Rejection ([#14291](https://github.com/RocketChat/Rocket.Chat/pull/14291)) - Popup cloud console in new window ([#14296](https://github.com/RocketChat/Rocket.Chat/pull/14296)) -- Pressing Enter in User Search field at channel causes reload ([#14388](https://github.com/RocketChat/Rocket.Chat/pull/14388) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Pressing Enter in User Search field at channel causes reload ([#14388](https://github.com/RocketChat/Rocket.Chat/pull/14388)) - preview pdf its not working ([#14419](https://github.com/RocketChat/Rocket.Chat/pull/14419)) @@ -13725,15 +21458,15 @@ - RocketChat client sending out video call requests unnecessarily ([#14496](https://github.com/RocketChat/Rocket.Chat/pull/14496)) -- Role `user` has being added after email verification even for non anonymous users ([#14263](https://github.com/RocketChat/Rocket.Chat/pull/14263) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Role `user` has being added after email verification even for non anonymous users ([#14263](https://github.com/RocketChat/Rocket.Chat/pull/14263)) - Role name spacing on Permissions page ([#14625](https://github.com/RocketChat/Rocket.Chat/pull/14625)) -- Room name was undefined in some info dialogs ([#14415](https://github.com/RocketChat/Rocket.Chat/pull/14415) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Room name was undefined in some info dialogs ([#14415](https://github.com/RocketChat/Rocket.Chat/pull/14415)) - SAML credentialToken removal was preventing mobile from being able to authenticate ([#14345](https://github.com/RocketChat/Rocket.Chat/pull/14345)) -- Save custom emoji with special characters causes some errors ([#14456](https://github.com/RocketChat/Rocket.Chat/pull/14456) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Save custom emoji with special characters causes some errors ([#14456](https://github.com/RocketChat/Rocket.Chat/pull/14456)) - Send replyTo for livechat offline messages ([#14568](https://github.com/RocketChat/Rocket.Chat/pull/14568)) @@ -13749,15 +21482,15 @@ - Unnecessary meteor.defer on openRoom ([#14396](https://github.com/RocketChat/Rocket.Chat/pull/14396)) -- Unread property of the room's lastMessage object was being wrong some times ([#13919](https://github.com/RocketChat/Rocket.Chat/pull/13919) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Unread property of the room's lastMessage object was being wrong some times ([#13919](https://github.com/RocketChat/Rocket.Chat/pull/13919)) - Users actions in administration were returning error ([#14400](https://github.com/RocketChat/Rocket.Chat/pull/14400)) -- Verify if the user is requesting your own information in users.info ([#14242](https://github.com/RocketChat/Rocket.Chat/pull/14242) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Verify if the user is requesting your own information in users.info ([#14242](https://github.com/RocketChat/Rocket.Chat/pull/14242)) - Wrong header at Apps admin section ([#14290](https://github.com/RocketChat/Rocket.Chat/pull/14290)) -- Wrong token name was generating error on Gitlab OAuth login ([#14379](https://github.com/RocketChat/Rocket.Chat/pull/14379) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Wrong token name was generating error on Gitlab OAuth login ([#14379](https://github.com/RocketChat/Rocket.Chat/pull/14379)) - You must join to view messages in this channel ([#14461](https://github.com/RocketChat/Rocket.Chat/pull/14461)) @@ -13771,13 +21504,13 @@ - [IMPROVEMENT] Don't group messages with different alias ([#14257](https://github.com/RocketChat/Rocket.Chat/pull/14257) by [@jungeonkim](https://github.com/jungeonkim)) -- [REGRESSION] Fix Slack bridge channel owner on channel creation ([#14565](https://github.com/RocketChat/Rocket.Chat/pull/14565) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- [REGRESSION] Fix Slack bridge channel owner on channel creation ([#14565](https://github.com/RocketChat/Rocket.Chat/pull/14565)) - Add digitalocean button to readme ([#14583](https://github.com/RocketChat/Rocket.Chat/pull/14583)) - Add missing german translations ([#14386](https://github.com/RocketChat/Rocket.Chat/pull/14386) by [@mrsimpson](https://github.com/mrsimpson)) -- Allow removing description, topic and annoucement of rooms(set as empty string) ([#13682](https://github.com/RocketChat/Rocket.Chat/pull/13682) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Allow removing description, topic and annoucement of rooms(set as empty string) ([#13682](https://github.com/RocketChat/Rocket.Chat/pull/13682)) - Ci improvements ([#14600](https://github.com/RocketChat/Rocket.Chat/pull/14600)) @@ -13842,7 +21575,6 @@ - [@AnBo83](https://github.com/AnBo83) - [@Hudell](https://github.com/Hudell) - [@Kailash0311](https://github.com/Kailash0311) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@arminfelder](https://github.com/arminfelder) - [@ashwaniYDV](https://github.com/ashwaniYDV) - [@bhardwajaditya](https://github.com/bhardwajaditya) @@ -13861,6 +21593,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@alansikora](https://github.com/alansikora) - [@d-gubert](https://github.com/d-gubert) - [@engelgabriel](https://github.com/engelgabriel) @@ -13883,11 +21616,11 @@ 🔍 Minor changes -- Fix custom auth ([#15141](https://github.com/RocketChat/Rocket.Chat/pull/15141) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix custom auth ([#15141](https://github.com/RocketChat/Rocket.Chat/pull/15141)) -### 👩‍💻👨‍💻 Contributors 😍 +### 👩‍💻👨‍💻 Core Team 🤓 - [@MarcosSpessatto](https://github.com/MarcosSpessatto) @@ -13920,17 +21653,17 @@ 🔍 Minor changes -- Release 1.0.3 ([#14446](https://github.com/RocketChat/Rocket.Chat/pull/14446) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@mrsimpson](https://github.com/mrsimpson)) +- Release 1.0.3 ([#14446](https://github.com/RocketChat/Rocket.Chat/pull/14446) by [@mrsimpson](https://github.com/mrsimpson)) ### 👩‍💻👨‍💻 Contributors 😍 -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@mrsimpson](https://github.com/mrsimpson) ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@engelgabriel](https://github.com/engelgabriel) - [@geekgonecrazy](https://github.com/geekgonecrazy) - [@ggazzo](https://github.com/ggazzo) @@ -14056,7 +21789,7 @@ - Remove deprecated file upload engine Slingshot ([#13724](https://github.com/RocketChat/Rocket.Chat/pull/13724)) -- Remove internal hubot package ([#13522](https://github.com/RocketChat/Rocket.Chat/pull/13522) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove internal hubot package ([#13522](https://github.com/RocketChat/Rocket.Chat/pull/13522)) - Require OPLOG/REPLICASET to run Rocket.Chat ([#14227](https://github.com/RocketChat/Rocket.Chat/pull/14227)) @@ -14073,13 +21806,13 @@ - Add message action to copy message to input as reply ([#12626](https://github.com/RocketChat/Rocket.Chat/pull/12626) by [@mrsimpson](https://github.com/mrsimpson)) -- Add missing remove add leader channel ([#13315](https://github.com/RocketChat/Rocket.Chat/pull/13315) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@Montel](https://github.com/Montel)) +- Add missing remove add leader channel ([#13315](https://github.com/RocketChat/Rocket.Chat/pull/13315) by [@Montel](https://github.com/Montel)) - Add offset parameter to channels.history, groups.history, dm.history ([#13310](https://github.com/RocketChat/Rocket.Chat/pull/13310) by [@xbolshe](https://github.com/xbolshe)) - Add parseUrls field to the apps message converter ([#13248](https://github.com/RocketChat/Rocket.Chat/pull/13248)) -- Add support to updatedSince parameter in emoji-custom.list and deprecated old endpoint ([#13510](https://github.com/RocketChat/Rocket.Chat/pull/13510) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add support to updatedSince parameter in emoji-custom.list and deprecated old endpoint ([#13510](https://github.com/RocketChat/Rocket.Chat/pull/13510)) - Add Voxtelesys to list of SMS providers ([#13697](https://github.com/RocketChat/Rocket.Chat/pull/13697) by [@jhnburke8](https://github.com/jhnburke8) & [@john08burke](https://github.com/john08burke)) @@ -14107,7 +21840,7 @@ - option to not use nrr (experimental) ([#14224](https://github.com/RocketChat/Rocket.Chat/pull/14224)) -- Permission to assign roles ([#13597](https://github.com/RocketChat/Rocket.Chat/pull/13597) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Permission to assign roles ([#13597](https://github.com/RocketChat/Rocket.Chat/pull/13597)) - Provide new Livechat client as community feature ([#13723](https://github.com/RocketChat/Rocket.Chat/pull/13723)) @@ -14115,9 +21848,9 @@ - REST endpoint to forward livechat rooms ([#13308](https://github.com/RocketChat/Rocket.Chat/pull/13308)) -- Rest endpoints of discussions ([#13987](https://github.com/RocketChat/Rocket.Chat/pull/13987) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Rest endpoints of discussions ([#13987](https://github.com/RocketChat/Rocket.Chat/pull/13987)) -- Rest threads ([#14045](https://github.com/RocketChat/Rocket.Chat/pull/14045) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Rest threads ([#14045](https://github.com/RocketChat/Rocket.Chat/pull/14045)) - Set up livechat connections created from new client ([#14236](https://github.com/RocketChat/Rocket.Chat/pull/14236)) @@ -14125,18 +21858,18 @@ - Threads V 1.0 ([#13996](https://github.com/RocketChat/Rocket.Chat/pull/13996)) -- Update message actions ([#14268](https://github.com/RocketChat/Rocket.Chat/pull/14268) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Update message actions ([#14268](https://github.com/RocketChat/Rocket.Chat/pull/14268)) - User avatars from external source ([#7929](https://github.com/RocketChat/Rocket.Chat/pull/7929) by [@mjovanovic0](https://github.com/mjovanovic0)) -- users.setActiveStatus endpoint in rest api ([#13443](https://github.com/RocketChat/Rocket.Chat/pull/13443) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@thayannevls](https://github.com/thayannevls)) +- users.setActiveStatus endpoint in rest api ([#13443](https://github.com/RocketChat/Rocket.Chat/pull/13443) by [@thayannevls](https://github.com/thayannevls)) ### 🚀 Improvements - Add decoding for commonName (cn) and displayName attributes for SAML ([#12347](https://github.com/RocketChat/Rocket.Chat/pull/12347) by [@pkolmann](https://github.com/pkolmann)) -- Add department field on find guest method ([#13491](https://github.com/RocketChat/Rocket.Chat/pull/13491) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add department field on find guest method ([#13491](https://github.com/RocketChat/Rocket.Chat/pull/13491)) - Add index for room's ts ([#13726](https://github.com/RocketChat/Rocket.Chat/pull/13726)) @@ -14205,7 +21938,7 @@ - .bin extension added to attached file names ([#13468](https://github.com/RocketChat/Rocket.Chat/pull/13468) by [@Hudell](https://github.com/Hudell)) -- Ability to activate an app installed by zip even offline ([#13563](https://github.com/RocketChat/Rocket.Chat/pull/13563) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Ability to activate an app installed by zip even offline ([#13563](https://github.com/RocketChat/Rocket.Chat/pull/13563)) - Add custom MIME types for *.ico extension ([#13969](https://github.com/RocketChat/Rocket.Chat/pull/13969)) @@ -14239,9 +21972,9 @@ - Bugfix markdown Marked link new tab ([#13245](https://github.com/RocketChat/Rocket.Chat/pull/13245) by [@DeviaVir](https://github.com/DeviaVir)) -- Change localStorage keys to work when server is running in a subdir ([#13968](https://github.com/RocketChat/Rocket.Chat/pull/13968) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Change localStorage keys to work when server is running in a subdir ([#13968](https://github.com/RocketChat/Rocket.Chat/pull/13968)) -- Change userId of rate limiter, change to logged user ([#13442](https://github.com/RocketChat/Rocket.Chat/pull/13442) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Change userId of rate limiter, change to logged user ([#13442](https://github.com/RocketChat/Rocket.Chat/pull/13442)) - Changing Room name updates the webhook ([#13672](https://github.com/RocketChat/Rocket.Chat/pull/13672) by [@knrt10](https://github.com/knrt10)) @@ -14259,15 +21992,15 @@ - Display first message when taking Livechat inquiry ([#13896](https://github.com/RocketChat/Rocket.Chat/pull/13896)) -- Do not allow change avatars of another users without permission ([#13629](https://github.com/RocketChat/Rocket.Chat/pull/13629) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Do not allow change avatars of another users without permission ([#13629](https://github.com/RocketChat/Rocket.Chat/pull/13629)) - Emoji detection at line breaks ([#13447](https://github.com/RocketChat/Rocket.Chat/pull/13447) by [@savish28](https://github.com/savish28)) - Empty result when getting badge count notification ([#14244](https://github.com/RocketChat/Rocket.Chat/pull/14244)) -- Error when recording data into the connection object ([#13553](https://github.com/RocketChat/Rocket.Chat/pull/13553) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Error when recording data into the connection object ([#13553](https://github.com/RocketChat/Rocket.Chat/pull/13553)) -- Fix bug when user try recreate channel or group with same name and remove room from cache when user leaves room ([#12341](https://github.com/RocketChat/Rocket.Chat/pull/12341) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix bug when user try recreate channel or group with same name and remove room from cache when user leaves room ([#12341](https://github.com/RocketChat/Rocket.Chat/pull/12341)) - Fix issue cannot filter channels by name ([#12952](https://github.com/RocketChat/Rocket.Chat/pull/12952) by [@huydang284](https://github.com/huydang284)) @@ -14275,7 +22008,7 @@ - Fix snap refresh hook ([#13702](https://github.com/RocketChat/Rocket.Chat/pull/13702)) -- Fix wrong this scope in Notifications ([#13515](https://github.com/RocketChat/Rocket.Chat/pull/13515) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix wrong this scope in Notifications ([#13515](https://github.com/RocketChat/Rocket.Chat/pull/13515)) - Fixed grammatical error. ([#13559](https://github.com/RocketChat/Rocket.Chat/pull/13559) by [@gsunit](https://github.com/gsunit)) @@ -14291,7 +22024,7 @@ - Get next Livechat agent endpoint ([#13485](https://github.com/RocketChat/Rocket.Chat/pull/13485)) -- Groups endpoints permission validations ([#13994](https://github.com/RocketChat/Rocket.Chat/pull/13994) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Groups endpoints permission validations ([#13994](https://github.com/RocketChat/Rocket.Chat/pull/13994)) - Handle showing/hiding input in messageBox ([#13564](https://github.com/RocketChat/Rocket.Chat/pull/13564)) @@ -14313,9 +22046,9 @@ - link of k8s deploy ([#13612](https://github.com/RocketChat/Rocket.Chat/pull/13612) by [@Mr-Linus](https://github.com/Mr-Linus)) -- Links and upload paths when running in a subdir ([#13982](https://github.com/RocketChat/Rocket.Chat/pull/13982) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Links and upload paths when running in a subdir ([#13982](https://github.com/RocketChat/Rocket.Chat/pull/13982)) -- Livechat office hours ([#14031](https://github.com/RocketChat/Rocket.Chat/pull/14031) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Livechat office hours ([#14031](https://github.com/RocketChat/Rocket.Chat/pull/14031)) - Livechat user registration in another department ([#10695](https://github.com/RocketChat/Rocket.Chat/pull/10695)) @@ -14357,19 +22090,19 @@ - Read Receipt for Livechat Messages fixed ([#13832](https://github.com/RocketChat/Rocket.Chat/pull/13832) by [@knrt10](https://github.com/knrt10)) -- Real names were not displayed in the reactions (API/UI) ([#13495](https://github.com/RocketChat/Rocket.Chat/pull/13495) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Real names were not displayed in the reactions (API/UI) ([#13495](https://github.com/RocketChat/Rocket.Chat/pull/13495)) - Receiving agent for new livechats from REST API ([#14103](https://github.com/RocketChat/Rocket.Chat/pull/14103)) - Remove Room info for Direct Messages (#9383) ([#12429](https://github.com/RocketChat/Rocket.Chat/pull/12429) by [@vinade](https://github.com/vinade)) -- Remove spaces in some i18n files ([#13801](https://github.com/RocketChat/Rocket.Chat/pull/13801) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove spaces in some i18n files ([#13801](https://github.com/RocketChat/Rocket.Chat/pull/13801)) - renderField template to correct short property usage ([#14148](https://github.com/RocketChat/Rocket.Chat/pull/14148)) - REST endpoint for creating custom emojis ([#13306](https://github.com/RocketChat/Rocket.Chat/pull/13306)) -- Restart required to apply changes in API Rate Limiter settings ([#13451](https://github.com/RocketChat/Rocket.Chat/pull/13451) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Restart required to apply changes in API Rate Limiter settings ([#13451](https://github.com/RocketChat/Rocket.Chat/pull/13451)) - Right arrows in default HTML content ([#13502](https://github.com/RocketChat/Rocket.Chat/pull/13502)) @@ -14377,11 +22110,11 @@ - Setup wizard calling 'saveSetting' for each field/setting ([#13349](https://github.com/RocketChat/Rocket.Chat/pull/13349)) -- Sidenav does not open on some admin pages ([#14010](https://github.com/RocketChat/Rocket.Chat/pull/14010) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Sidenav does not open on some admin pages ([#14010](https://github.com/RocketChat/Rocket.Chat/pull/14010)) - Sidenav mouse hover was slow ([#13482](https://github.com/RocketChat/Rocket.Chat/pull/13482)) -- Slackbridge private channels ([#14273](https://github.com/RocketChat/Rocket.Chat/pull/14273) by [@Hudell](https://github.com/Hudell) & [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@nylen](https://github.com/nylen)) +- Slackbridge private channels ([#14273](https://github.com/RocketChat/Rocket.Chat/pull/14273) by [@Hudell](https://github.com/Hudell) & [@nylen](https://github.com/nylen)) - Small improvements on message box ([#13444](https://github.com/RocketChat/Rocket.Chat/pull/13444)) @@ -14421,59 +22154,59 @@ 🔍 Minor changes -- Convert rocketchat-apps to main module structure ([#13409](https://github.com/RocketChat/Rocket.Chat/pull/13409) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-apps to main module structure ([#13409](https://github.com/RocketChat/Rocket.Chat/pull/13409)) -- Convert rocketchat-lib to main module structure ([#13415](https://github.com/RocketChat/Rocket.Chat/pull/13415) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-lib to main module structure ([#13415](https://github.com/RocketChat/Rocket.Chat/pull/13415)) -- Fix some imports from wrong packages, remove exports and files unused in rc-ui ([#13422](https://github.com/RocketChat/Rocket.Chat/pull/13422) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix some imports from wrong packages, remove exports and files unused in rc-ui ([#13422](https://github.com/RocketChat/Rocket.Chat/pull/13422)) -- Import missed functions to remove dependency of RC namespace ([#13414](https://github.com/RocketChat/Rocket.Chat/pull/13414) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Import missed functions to remove dependency of RC namespace ([#13414](https://github.com/RocketChat/Rocket.Chat/pull/13414)) -- Remove dependency of RC namespace in livechat/client ([#13370](https://github.com/RocketChat/Rocket.Chat/pull/13370) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in livechat/client ([#13370](https://github.com/RocketChat/Rocket.Chat/pull/13370)) -- Remove dependency of RC namespace in rc-integrations and importer-hipchat-enterprise ([#13386](https://github.com/RocketChat/Rocket.Chat/pull/13386) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in rc-integrations and importer-hipchat-enterprise ([#13386](https://github.com/RocketChat/Rocket.Chat/pull/13386)) -- Remove dependency of RC namespace in rc-livechat/server/publications ([#13383](https://github.com/RocketChat/Rocket.Chat/pull/13383) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in rc-livechat/server/publications ([#13383](https://github.com/RocketChat/Rocket.Chat/pull/13383)) -- Remove dependency of RC namespace in rc-message-pin and message-snippet ([#13343](https://github.com/RocketChat/Rocket.Chat/pull/13343) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in rc-message-pin and message-snippet ([#13343](https://github.com/RocketChat/Rocket.Chat/pull/13343)) -- Remove dependency of RC namespace in rc-oembed and rc-otr ([#13345](https://github.com/RocketChat/Rocket.Chat/pull/13345) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in rc-oembed and rc-otr ([#13345](https://github.com/RocketChat/Rocket.Chat/pull/13345)) -- Remove dependency of RC namespace in rc-reactions, retention-policy and search ([#13347](https://github.com/RocketChat/Rocket.Chat/pull/13347) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in rc-reactions, retention-policy and search ([#13347](https://github.com/RocketChat/Rocket.Chat/pull/13347)) -- Remove dependency of RC namespace in rc-slash-archiveroom, create, help, hide, invite, inviteall and join ([#13356](https://github.com/RocketChat/Rocket.Chat/pull/13356) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in rc-slash-archiveroom, create, help, hide, invite, inviteall and join ([#13356](https://github.com/RocketChat/Rocket.Chat/pull/13356)) -- Remove dependency of RC namespace in rc-smarsh-connector, sms and spotify ([#13358](https://github.com/RocketChat/Rocket.Chat/pull/13358) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in rc-smarsh-connector, sms and spotify ([#13358](https://github.com/RocketChat/Rocket.Chat/pull/13358)) -- Remove dependency of RC namespace in rc-statistics and tokenpass ([#13359](https://github.com/RocketChat/Rocket.Chat/pull/13359) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in rc-statistics and tokenpass ([#13359](https://github.com/RocketChat/Rocket.Chat/pull/13359)) -- Remove dependency of RC namespace in rc-ui-master, ui-message- user-data-download and version-check ([#13365](https://github.com/RocketChat/Rocket.Chat/pull/13365) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in rc-ui-master, ui-message- user-data-download and version-check ([#13365](https://github.com/RocketChat/Rocket.Chat/pull/13365)) -- Remove dependency of RC namespace in rc-ui, ui-account and ui-admin ([#13361](https://github.com/RocketChat/Rocket.Chat/pull/13361) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in rc-ui, ui-account and ui-admin ([#13361](https://github.com/RocketChat/Rocket.Chat/pull/13361)) -- Remove dependency of RC namespace in rc-videobridge and webdav ([#13366](https://github.com/RocketChat/Rocket.Chat/pull/13366) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in rc-videobridge and webdav ([#13366](https://github.com/RocketChat/Rocket.Chat/pull/13366)) -- Remove dependency of RC namespace in root client folder, imports/message-read-receipt and imports/personal-access-tokens ([#13389](https://github.com/RocketChat/Rocket.Chat/pull/13389) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in root client folder, imports/message-read-receipt and imports/personal-access-tokens ([#13389](https://github.com/RocketChat/Rocket.Chat/pull/13389)) -- Remove dependency of RC namespace in root server folder - step 1 ([#13390](https://github.com/RocketChat/Rocket.Chat/pull/13390) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in root server folder - step 1 ([#13390](https://github.com/RocketChat/Rocket.Chat/pull/13390)) -- Remove dependency of RC namespace in root server folder - step 4 ([#13400](https://github.com/RocketChat/Rocket.Chat/pull/13400) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in root server folder - step 4 ([#13400](https://github.com/RocketChat/Rocket.Chat/pull/13400)) -- Remove functions from globals ([#13421](https://github.com/RocketChat/Rocket.Chat/pull/13421) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove functions from globals ([#13421](https://github.com/RocketChat/Rocket.Chat/pull/13421)) -- Remove LIvechat global variable from RC namespace ([#13378](https://github.com/RocketChat/Rocket.Chat/pull/13378) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove LIvechat global variable from RC namespace ([#13378](https://github.com/RocketChat/Rocket.Chat/pull/13378)) -- Remove unused files and code in rc-lib - step 1 ([#13416](https://github.com/RocketChat/Rocket.Chat/pull/13416) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove unused files and code in rc-lib - step 1 ([#13416](https://github.com/RocketChat/Rocket.Chat/pull/13416)) -- Remove unused files and code in rc-lib - step 3 ([#13420](https://github.com/RocketChat/Rocket.Chat/pull/13420) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove unused files and code in rc-lib - step 3 ([#13420](https://github.com/RocketChat/Rocket.Chat/pull/13420)) -- Remove unused files in rc-lib - step 2 ([#13419](https://github.com/RocketChat/Rocket.Chat/pull/13419) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove unused files in rc-lib - step 2 ([#13419](https://github.com/RocketChat/Rocket.Chat/pull/13419)) - [BUG] Icon Fixed for Knowledge base on Livechat ([#13806](https://github.com/RocketChat/Rocket.Chat/pull/13806) by [@knrt10](https://github.com/knrt10)) -- [New] Reply privately to group messages ([#14150](https://github.com/RocketChat/Rocket.Chat/pull/14150) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@bhardwajaditya](https://github.com/bhardwajaditya)) +- [New] Reply privately to group messages ([#14150](https://github.com/RocketChat/Rocket.Chat/pull/14150) by [@bhardwajaditya](https://github.com/bhardwajaditya)) -- [Regression] Fix integrations message example ([#14111](https://github.com/RocketChat/Rocket.Chat/pull/14111) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- [Regression] Fix integrations message example ([#14111](https://github.com/RocketChat/Rocket.Chat/pull/14111)) - [REGRESSION] Fix variable name references in message template ([#14184](https://github.com/RocketChat/Rocket.Chat/pull/14184)) @@ -14497,21 +22230,21 @@ - Broken styles in Administration's contextual bar ([#14222](https://github.com/RocketChat/Rocket.Chat/pull/14222)) -- Change dynamic dependency of FileUpload in Messages models ([#13776](https://github.com/RocketChat/Rocket.Chat/pull/13776) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Change dynamic dependency of FileUpload in Messages models ([#13776](https://github.com/RocketChat/Rocket.Chat/pull/13776)) - Change the way to resolve DNS for Federation ([#13695](https://github.com/RocketChat/Rocket.Chat/pull/13695)) - Convert imports to relative paths ([#13740](https://github.com/RocketChat/Rocket.Chat/pull/13740)) -- Convert rc-nrr and slashcommands open to main module structure ([#13520](https://github.com/RocketChat/Rocket.Chat/pull/13520) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rc-nrr and slashcommands open to main module structure ([#13520](https://github.com/RocketChat/Rocket.Chat/pull/13520)) - created function to allow change default values, fix loading search users ([#14177](https://github.com/RocketChat/Rocket.Chat/pull/14177)) - Depack: Use mainModule for root files ([#13508](https://github.com/RocketChat/Rocket.Chat/pull/13508)) -- Depackaging ([#13483](https://github.com/RocketChat/Rocket.Chat/pull/13483) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Depackaging ([#13483](https://github.com/RocketChat/Rocket.Chat/pull/13483)) -- Deprecate /api/v1/info in favor of /api/info ([#13798](https://github.com/RocketChat/Rocket.Chat/pull/13798) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Deprecate /api/v1/info in favor of /api/info ([#13798](https://github.com/RocketChat/Rocket.Chat/pull/13798)) - ESLint: Add more import rules ([#14226](https://github.com/RocketChat/Rocket.Chat/pull/14226)) @@ -14595,13 +22328,13 @@ - Lingohub sync and additional fixes ([#13825](https://github.com/RocketChat/Rocket.Chat/pull/13825)) -- Merge master into develop & Set version to 1.0.0-develop ([#13435](https://github.com/RocketChat/Rocket.Chat/pull/13435) by [@Hudell](https://github.com/Hudell) & [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@TkTech](https://github.com/TkTech) & [@theundefined](https://github.com/theundefined)) +- Merge master into develop & Set version to 1.0.0-develop ([#13435](https://github.com/RocketChat/Rocket.Chat/pull/13435) by [@Hudell](https://github.com/Hudell) & [@TkTech](https://github.com/TkTech) & [@theundefined](https://github.com/theundefined)) - Move LDAP Escape to login handler ([#14234](https://github.com/RocketChat/Rocket.Chat/pull/14234)) - Move mongo config away from cors package ([#13531](https://github.com/RocketChat/Rocket.Chat/pull/13531)) -- Move rc-livechat server models to rc-models ([#13384](https://github.com/RocketChat/Rocket.Chat/pull/13384) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Move rc-livechat server models to rc-models ([#13384](https://github.com/RocketChat/Rocket.Chat/pull/13384)) - New threads layout ([#14269](https://github.com/RocketChat/Rocket.Chat/pull/14269)) @@ -14619,7 +22352,7 @@ - Regression: Active room was not being marked ([#14276](https://github.com/RocketChat/Rocket.Chat/pull/14276)) -- Regression: Add debounce on admin users search to avoid blocking by DDP Rate Limiter ([#13529](https://github.com/RocketChat/Rocket.Chat/pull/13529) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Regression: Add debounce on admin users search to avoid blocking by DDP Rate Limiter ([#13529](https://github.com/RocketChat/Rocket.Chat/pull/13529)) - Regression: Add missing translations used in Apps pages ([#13674](https://github.com/RocketChat/Rocket.Chat/pull/13674)) @@ -14637,7 +22370,7 @@ - Regression: fix app pages styles ([#13567](https://github.com/RocketChat/Rocket.Chat/pull/13567)) -- Regression: Fix autolinker that was not parsing urls correctly ([#13497](https://github.com/RocketChat/Rocket.Chat/pull/13497) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Regression: Fix autolinker that was not parsing urls correctly ([#13497](https://github.com/RocketChat/Rocket.Chat/pull/13497)) - Regression: fix drop file ([#14225](https://github.com/RocketChat/Rocket.Chat/pull/14225)) @@ -14647,15 +22380,15 @@ - Regression: Fix icon for DMs ([#13679](https://github.com/RocketChat/Rocket.Chat/pull/13679)) -- Regression: Fix wrong imports in rc-models ([#13516](https://github.com/RocketChat/Rocket.Chat/pull/13516) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Regression: Fix wrong imports in rc-models ([#13516](https://github.com/RocketChat/Rocket.Chat/pull/13516)) - Regression: grouping messages on threads ([#14238](https://github.com/RocketChat/Rocket.Chat/pull/14238)) - Regression: Message box does not go back to initial state after sending a message ([#14161](https://github.com/RocketChat/Rocket.Chat/pull/14161)) -- Regression: Message box geolocation was throwing error ([#13496](https://github.com/RocketChat/Rocket.Chat/pull/13496) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Regression: Message box geolocation was throwing error ([#13496](https://github.com/RocketChat/Rocket.Chat/pull/13496)) -- Regression: Missing settings import at `packages/rocketchat-livechat/server/methods/saveAppearance.js` ([#13573](https://github.com/RocketChat/Rocket.Chat/pull/13573) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Regression: Missing settings import at `packages/rocketchat-livechat/server/methods/saveAppearance.js` ([#13573](https://github.com/RocketChat/Rocket.Chat/pull/13573)) - Regression: Not updating subscriptions and not showing desktop notifcations ([#13509](https://github.com/RocketChat/Rocket.Chat/pull/13509)) @@ -14687,33 +22420,33 @@ - Remove bitcoin link in Readme.md since the link is broken ([#13935](https://github.com/RocketChat/Rocket.Chat/pull/13935) by [@ashwaniYDV](https://github.com/ashwaniYDV)) -- Remove dependency of RC namespace in rc-livechat/imports, lib, server/api, server/hooks and server/lib ([#13379](https://github.com/RocketChat/Rocket.Chat/pull/13379) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in rc-livechat/imports, lib, server/api, server/hooks and server/lib ([#13379](https://github.com/RocketChat/Rocket.Chat/pull/13379)) -- Remove dependency of RC namespace in rc-livechat/server/methods ([#13382](https://github.com/RocketChat/Rocket.Chat/pull/13382) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in rc-livechat/server/methods ([#13382](https://github.com/RocketChat/Rocket.Chat/pull/13382)) -- Remove dependency of RC namespace in rc-livechat/server/models ([#13377](https://github.com/RocketChat/Rocket.Chat/pull/13377) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in rc-livechat/server/models ([#13377](https://github.com/RocketChat/Rocket.Chat/pull/13377)) -- Remove dependency of RC namespace in rc-oauth2-server and message-star ([#13344](https://github.com/RocketChat/Rocket.Chat/pull/13344) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in rc-oauth2-server and message-star ([#13344](https://github.com/RocketChat/Rocket.Chat/pull/13344)) -- Remove dependency of RC namespace in rc-setup-wizard, slackbridge and asciiarts ([#13348](https://github.com/RocketChat/Rocket.Chat/pull/13348) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in rc-setup-wizard, slackbridge and asciiarts ([#13348](https://github.com/RocketChat/Rocket.Chat/pull/13348)) -- Remove dependency of RC namespace in rc-slash-kick, leave, me, msg, mute, open, topic and unarchiveroom ([#13357](https://github.com/RocketChat/Rocket.Chat/pull/13357) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in rc-slash-kick, leave, me, msg, mute, open, topic and unarchiveroom ([#13357](https://github.com/RocketChat/Rocket.Chat/pull/13357)) -- Remove dependency of RC namespace in rc-ui-clean-history, ui-admin and ui-login ([#13362](https://github.com/RocketChat/Rocket.Chat/pull/13362) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in rc-ui-clean-history, ui-admin and ui-login ([#13362](https://github.com/RocketChat/Rocket.Chat/pull/13362)) -- Remove dependency of RC namespace in rc-wordpress, chatpal-search and irc ([#13492](https://github.com/RocketChat/Rocket.Chat/pull/13492) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in rc-wordpress, chatpal-search and irc ([#13492](https://github.com/RocketChat/Rocket.Chat/pull/13492)) -- Remove dependency of RC namespace in root server folder - step 2 ([#13397](https://github.com/RocketChat/Rocket.Chat/pull/13397) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in root server folder - step 2 ([#13397](https://github.com/RocketChat/Rocket.Chat/pull/13397)) -- Remove dependency of RC namespace in root server folder - step 3 ([#13398](https://github.com/RocketChat/Rocket.Chat/pull/13398) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in root server folder - step 3 ([#13398](https://github.com/RocketChat/Rocket.Chat/pull/13398)) -- Remove dependency of RC namespace in root server folder - step 5 ([#13402](https://github.com/RocketChat/Rocket.Chat/pull/13402) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in root server folder - step 5 ([#13402](https://github.com/RocketChat/Rocket.Chat/pull/13402)) -- Remove dependency of RC namespace in root server folder - step 6 ([#13405](https://github.com/RocketChat/Rocket.Chat/pull/13405) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RC namespace in root server folder - step 6 ([#13405](https://github.com/RocketChat/Rocket.Chat/pull/13405)) -- Remove Npm.depends and Npm.require except those that are inside package.js ([#13518](https://github.com/RocketChat/Rocket.Chat/pull/13518) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove Npm.depends and Npm.require except those that are inside package.js ([#13518](https://github.com/RocketChat/Rocket.Chat/pull/13518)) -- Remove Package references ([#13523](https://github.com/RocketChat/Rocket.Chat/pull/13523) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove Package references ([#13523](https://github.com/RocketChat/Rocket.Chat/pull/13523)) - Remove Sandstorm support ([#13773](https://github.com/RocketChat/Rocket.Chat/pull/13773)) @@ -14729,7 +22462,7 @@ - Removed old templates ([#13406](https://github.com/RocketChat/Rocket.Chat/pull/13406)) -- Removing (almost) every dynamic imports ([#13767](https://github.com/RocketChat/Rocket.Chat/pull/13767) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Removing (almost) every dynamic imports ([#13767](https://github.com/RocketChat/Rocket.Chat/pull/13767)) - Rename Cloud to Connectivity Services & split Apps in Apps and Marketplace ([#14211](https://github.com/RocketChat/Rocket.Chat/pull/14211)) @@ -14763,7 +22496,7 @@ - Use main message as thread tab title ([#14213](https://github.com/RocketChat/Rocket.Chat/pull/14213)) -- Use own logic to get thread infos via REST ([#14210](https://github.com/RocketChat/Rocket.Chat/pull/14210) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Use own logic to get thread infos via REST ([#14210](https://github.com/RocketChat/Rocket.Chat/pull/14210)) - User remove role dialog fixed ([#13874](https://github.com/RocketChat/Rocket.Chat/pull/13874) by [@bhardwajaditya](https://github.com/bhardwajaditya)) @@ -14776,7 +22509,6 @@ - [@DeviaVir](https://github.com/DeviaVir) - [@Hudell](https://github.com/Hudell) - [@Kailash0311](https://github.com/Kailash0311) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@MohammedEssehemy](https://github.com/MohammedEssehemy) - [@Montel](https://github.com/Montel) - [@Mr-Linus](https://github.com/Mr-Linus) @@ -14825,6 +22557,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 - [@LuluGO](https://github.com/LuluGO) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@alansikora](https://github.com/alansikora) - [@d-gubert](https://github.com/d-gubert) - [@engelgabriel](https://github.com/engelgabriel) @@ -14957,7 +22690,7 @@ ### 🐛 Bug fixes -- Fix bug when user try recreate channel or group with same name and remove room from cache when user leaves room ([#12341](https://github.com/RocketChat/Rocket.Chat/pull/12341) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix bug when user try recreate channel or group with same name and remove room from cache when user leaves room ([#12341](https://github.com/RocketChat/Rocket.Chat/pull/12341)) - HipChat Enterprise importer fails when importing a large amount of messages (millions) ([#13221](https://github.com/RocketChat/Rocket.Chat/pull/13221) by [@Hudell](https://github.com/Hudell)) @@ -14982,10 +22715,10 @@ ### 👩‍💻👨‍💻 Contributors 😍 - [@Hudell](https://github.com/Hudell) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@d-gubert](https://github.com/d-gubert) - [@geekgonecrazy](https://github.com/geekgonecrazy) - [@renatobecker](https://github.com/renatobecker) @@ -15004,19 +22737,19 @@ ### 🎉 New features -- Add Allow Methods directive to CORS ([#13073](https://github.com/RocketChat/Rocket.Chat/pull/13073) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add Allow Methods directive to CORS ([#13073](https://github.com/RocketChat/Rocket.Chat/pull/13073)) -- Add create, update and delete endpoint for custom emojis ([#13160](https://github.com/RocketChat/Rocket.Chat/pull/13160) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add create, update and delete endpoint for custom emojis ([#13160](https://github.com/RocketChat/Rocket.Chat/pull/13160)) - Add new Livechat REST endpoint to update the visitor's status ([#13108](https://github.com/RocketChat/Rocket.Chat/pull/13108)) -- Add rate limiter to REST endpoints ([#11251](https://github.com/RocketChat/Rocket.Chat/pull/11251) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add rate limiter to REST endpoints ([#11251](https://github.com/RocketChat/Rocket.Chat/pull/11251)) -- Added an option to disable email when activate and deactivate users ([#13183](https://github.com/RocketChat/Rocket.Chat/pull/13183) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Added an option to disable email when activate and deactivate users ([#13183](https://github.com/RocketChat/Rocket.Chat/pull/13183)) -- Added endpoint to update timeout of the jitsi video conference ([#13167](https://github.com/RocketChat/Rocket.Chat/pull/13167) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Added endpoint to update timeout of the jitsi video conference ([#13167](https://github.com/RocketChat/Rocket.Chat/pull/13167)) -- Added stream to notify when agent status change ([#13076](https://github.com/RocketChat/Rocket.Chat/pull/13076) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Added stream to notify when agent status change ([#13076](https://github.com/RocketChat/Rocket.Chat/pull/13076)) - Cloud Integration ([#13013](https://github.com/RocketChat/Rocket.Chat/pull/13013)) @@ -15049,7 +22782,7 @@ - Return room type field on Livechat findRoom method ([#13078](https://github.com/RocketChat/Rocket.Chat/pull/13078)) -- Return visitorEmails field on Livechat findGuest method ([#13097](https://github.com/RocketChat/Rocket.Chat/pull/13097) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Return visitorEmails field on Livechat findGuest method ([#13097](https://github.com/RocketChat/Rocket.Chat/pull/13097)) ### 🐛 Bug fixes @@ -15060,7 +22793,7 @@ - Change input type of e2e to password ([#13077](https://github.com/RocketChat/Rocket.Chat/pull/13077) by [@supra08](https://github.com/supra08)) -- Change webdav creation, due to changes in the npm lib after last update ([#13170](https://github.com/RocketChat/Rocket.Chat/pull/13170) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Change webdav creation, due to changes in the npm lib after last update ([#13170](https://github.com/RocketChat/Rocket.Chat/pull/13170)) - Emoticons not displayed in room topic ([#12858](https://github.com/RocketChat/Rocket.Chat/pull/12858) by [@alexbartsch](https://github.com/alexbartsch)) @@ -15076,7 +22809,7 @@ - REST api client base url on subdir ([#13180](https://github.com/RocketChat/Rocket.Chat/pull/13180)) -- REST API endpoint `users.getPersonalAccessTokens` error when user has no access tokens ([#13150](https://github.com/RocketChat/Rocket.Chat/pull/13150) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST API endpoint `users.getPersonalAccessTokens` error when user has no access tokens ([#13150](https://github.com/RocketChat/Rocket.Chat/pull/13150)) - Snap upgrade add post-refresh hook ([#13153](https://github.com/RocketChat/Rocket.Chat/pull/13153)) @@ -15088,75 +22821,75 @@ 🔍 Minor changes -- Remove dependency of RocketChat namespace and push-notifications ([#13137](https://github.com/RocketChat/Rocket.Chat/pull/13137) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RocketChat namespace and push-notifications ([#13137](https://github.com/RocketChat/Rocket.Chat/pull/13137)) - Change apps engine persistence bridge method to updateByAssociations ([#13239](https://github.com/RocketChat/Rocket.Chat/pull/13239)) -- Convert rocketchat-file-upload to main module structure ([#13094](https://github.com/RocketChat/Rocket.Chat/pull/13094) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-file-upload to main module structure ([#13094](https://github.com/RocketChat/Rocket.Chat/pull/13094)) -- Convert rocketchat-ui-master to main module structure ([#13107](https://github.com/RocketChat/Rocket.Chat/pull/13107) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-ui-master to main module structure ([#13107](https://github.com/RocketChat/Rocket.Chat/pull/13107)) -- Convert rocketchat-ui-sidenav to main module structure ([#13098](https://github.com/RocketChat/Rocket.Chat/pull/13098) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-ui-sidenav to main module structure ([#13098](https://github.com/RocketChat/Rocket.Chat/pull/13098)) -- Convert rocketchat-webrtc to main module structure ([#13117](https://github.com/RocketChat/Rocket.Chat/pull/13117) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-webrtc to main module structure ([#13117](https://github.com/RocketChat/Rocket.Chat/pull/13117)) -- Convert rocketchat:ui to main module structure ([#13132](https://github.com/RocketChat/Rocket.Chat/pull/13132) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat:ui to main module structure ([#13132](https://github.com/RocketChat/Rocket.Chat/pull/13132)) -- Globals/main module custom oauth ([#13037](https://github.com/RocketChat/Rocket.Chat/pull/13037) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Globals/main module custom oauth ([#13037](https://github.com/RocketChat/Rocket.Chat/pull/13037)) -- Globals/move rocketchat notifications ([#13035](https://github.com/RocketChat/Rocket.Chat/pull/13035) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Globals/move rocketchat notifications ([#13035](https://github.com/RocketChat/Rocket.Chat/pull/13035)) - Language: Edit typo "Обновлить" ([#13177](https://github.com/RocketChat/Rocket.Chat/pull/13177) by [@zpavlig](https://github.com/zpavlig)) - LingoHub based on develop ([#13201](https://github.com/RocketChat/Rocket.Chat/pull/13201)) -- Merge master into develop & Set version to 0.74.0-develop ([#13050](https://github.com/RocketChat/Rocket.Chat/pull/13050) by [@Hudell](https://github.com/Hudell) & [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@ohmonster](https://github.com/ohmonster) & [@piotrkochan](https://github.com/piotrkochan)) +- Merge master into develop & Set version to 0.74.0-develop ([#13050](https://github.com/RocketChat/Rocket.Chat/pull/13050) by [@Hudell](https://github.com/Hudell) & [@ohmonster](https://github.com/ohmonster) & [@piotrkochan](https://github.com/piotrkochan)) -- Move rocketchat models ([#13027](https://github.com/RocketChat/Rocket.Chat/pull/13027) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Move rocketchat models ([#13027](https://github.com/RocketChat/Rocket.Chat/pull/13027)) -- Move rocketchat promises ([#13039](https://github.com/RocketChat/Rocket.Chat/pull/13039) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Move rocketchat promises ([#13039](https://github.com/RocketChat/Rocket.Chat/pull/13039)) -- Move rocketchat settings to specific package ([#13026](https://github.com/RocketChat/Rocket.Chat/pull/13026) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Move rocketchat settings to specific package ([#13026](https://github.com/RocketChat/Rocket.Chat/pull/13026)) -- Move some function to utils ([#13122](https://github.com/RocketChat/Rocket.Chat/pull/13122) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Move some function to utils ([#13122](https://github.com/RocketChat/Rocket.Chat/pull/13122)) -- Move some ui function to ui-utils ([#13123](https://github.com/RocketChat/Rocket.Chat/pull/13123) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Move some ui function to ui-utils ([#13123](https://github.com/RocketChat/Rocket.Chat/pull/13123)) -- Move UI Collections to rocketchat:models ([#13064](https://github.com/RocketChat/Rocket.Chat/pull/13064) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Move UI Collections to rocketchat:models ([#13064](https://github.com/RocketChat/Rocket.Chat/pull/13064)) -- Move/create rocketchat callbacks ([#13034](https://github.com/RocketChat/Rocket.Chat/pull/13034) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Move/create rocketchat callbacks ([#13034](https://github.com/RocketChat/Rocket.Chat/pull/13034)) -- Move/create rocketchat metrics ([#13032](https://github.com/RocketChat/Rocket.Chat/pull/13032) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Move/create rocketchat metrics ([#13032](https://github.com/RocketChat/Rocket.Chat/pull/13032)) - Regression: Fix audio message upload ([#13224](https://github.com/RocketChat/Rocket.Chat/pull/13224)) - Regression: Fix emoji search ([#13207](https://github.com/RocketChat/Rocket.Chat/pull/13207)) -- Regression: Fix export AudioRecorder ([#13192](https://github.com/RocketChat/Rocket.Chat/pull/13192) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Regression: Fix export AudioRecorder ([#13192](https://github.com/RocketChat/Rocket.Chat/pull/13192)) - Regression: fix rooms model's collection name ([#13146](https://github.com/RocketChat/Rocket.Chat/pull/13146)) - Regression: fix upload permissions ([#13157](https://github.com/RocketChat/Rocket.Chat/pull/13157)) -- Release 0.74.0 ([#13270](https://github.com/RocketChat/Rocket.Chat/pull/13270) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@Xuhao](https://github.com/Xuhao) & [@supra08](https://github.com/supra08)) +- Release 0.74.0 ([#13270](https://github.com/RocketChat/Rocket.Chat/pull/13270) by [@Xuhao](https://github.com/Xuhao) & [@supra08](https://github.com/supra08)) -- Remove dependency between lib and authz ([#13066](https://github.com/RocketChat/Rocket.Chat/pull/13066) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency between lib and authz ([#13066](https://github.com/RocketChat/Rocket.Chat/pull/13066)) -- Remove dependency between RocketChat namespace and migrations ([#13133](https://github.com/RocketChat/Rocket.Chat/pull/13133) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency between RocketChat namespace and migrations ([#13133](https://github.com/RocketChat/Rocket.Chat/pull/13133)) -- Remove dependency of RocketChat namespace and custom-sounds ([#13136](https://github.com/RocketChat/Rocket.Chat/pull/13136) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RocketChat namespace and custom-sounds ([#13136](https://github.com/RocketChat/Rocket.Chat/pull/13136)) -- Remove dependency of RocketChat namespace and logger ([#13135](https://github.com/RocketChat/Rocket.Chat/pull/13135) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RocketChat namespace and logger ([#13135](https://github.com/RocketChat/Rocket.Chat/pull/13135)) -- Remove dependency of RocketChat namespace inside rocketchat:ui ([#13131](https://github.com/RocketChat/Rocket.Chat/pull/13131) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove dependency of RocketChat namespace inside rocketchat:ui ([#13131](https://github.com/RocketChat/Rocket.Chat/pull/13131)) -- Remove directly dependency between lib and e2e ([#13115](https://github.com/RocketChat/Rocket.Chat/pull/13115) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove directly dependency between lib and e2e ([#13115](https://github.com/RocketChat/Rocket.Chat/pull/13115)) -- Remove directly dependency between rocketchat:lib and emoji ([#13118](https://github.com/RocketChat/Rocket.Chat/pull/13118) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove directly dependency between rocketchat:lib and emoji ([#13118](https://github.com/RocketChat/Rocket.Chat/pull/13118)) - Remove incorrect pt-BR translation ([#13074](https://github.com/RocketChat/Rocket.Chat/pull/13074)) -- Rocketchat mailer ([#13036](https://github.com/RocketChat/Rocket.Chat/pull/13036) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Rocketchat mailer ([#13036](https://github.com/RocketChat/Rocket.Chat/pull/13036)) - Test only MongoDB with oplog versions 3.2 and 4.0 for PRs ([#13119](https://github.com/RocketChat/Rocket.Chat/pull/13119)) @@ -15167,7 +22900,6 @@ - [@Hudell](https://github.com/Hudell) - [@Jeroeny](https://github.com/Jeroeny) - [@Kailash0311](https://github.com/Kailash0311) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@Xuhao](https://github.com/Xuhao) - [@alexbartsch](https://github.com/alexbartsch) - [@behnejad](https://github.com/behnejad) @@ -15180,6 +22912,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 - [@LuluGO](https://github.com/LuluGO) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@d-gubert](https://github.com/d-gubert) - [@geekgonecrazy](https://github.com/geekgonecrazy) - [@ggazzo](https://github.com/ggazzo) @@ -15264,17 +22997,17 @@ - /api/v1/spotlight: return joinCodeRequired field for rooms ([#12651](https://github.com/RocketChat/Rocket.Chat/pull/12651) by [@cardoso](https://github.com/cardoso)) -- Add permission to enable personal access token to specific roles ([#12309](https://github.com/RocketChat/Rocket.Chat/pull/12309) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add permission to enable personal access token to specific roles ([#12309](https://github.com/RocketChat/Rocket.Chat/pull/12309)) -- Add query parameter support to emoji-custom endpoint ([#12754](https://github.com/RocketChat/Rocket.Chat/pull/12754) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add query parameter support to emoji-custom endpoint ([#12754](https://github.com/RocketChat/Rocket.Chat/pull/12754)) - Added a link to contributing.md ([#12856](https://github.com/RocketChat/Rocket.Chat/pull/12856) by [@sanketsingh24](https://github.com/sanketsingh24)) -- Added chat.getDeletedMessages since specific date ([#13010](https://github.com/RocketChat/Rocket.Chat/pull/13010) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Added chat.getDeletedMessages since specific date ([#13010](https://github.com/RocketChat/Rocket.Chat/pull/13010)) - Config hooks for snap ([#12351](https://github.com/RocketChat/Rocket.Chat/pull/12351)) -- Create new permission.listAll endpoint to be able to use updatedSince parameter ([#12748](https://github.com/RocketChat/Rocket.Chat/pull/12748) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Create new permission.listAll endpoint to be able to use updatedSince parameter ([#12748](https://github.com/RocketChat/Rocket.Chat/pull/12748)) - Download button for each file in fileslist ([#12874](https://github.com/RocketChat/Rocket.Chat/pull/12874) by [@alexbartsch](https://github.com/alexbartsch)) @@ -15286,7 +23019,7 @@ - Mandatory 2fa for role ([#9748](https://github.com/RocketChat/Rocket.Chat/pull/9748) by [@Hudell](https://github.com/Hudell) & [@karlprieb](https://github.com/karlprieb)) -- New API Endpoints for the new version of JS SDK ([#12623](https://github.com/RocketChat/Rocket.Chat/pull/12623) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- New API Endpoints for the new version of JS SDK ([#12623](https://github.com/RocketChat/Rocket.Chat/pull/12623)) - Option to reset e2e key ([#12483](https://github.com/RocketChat/Rocket.Chat/pull/12483) by [@Hudell](https://github.com/Hudell)) @@ -15307,7 +23040,7 @@ - Add new acceptable header for Livechat REST requests ([#12561](https://github.com/RocketChat/Rocket.Chat/pull/12561)) -- Add rooms property in user object, if the user has the permission, with rooms roles ([#12105](https://github.com/RocketChat/Rocket.Chat/pull/12105) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add rooms property in user object, if the user has the permission, with rooms roles ([#12105](https://github.com/RocketChat/Rocket.Chat/pull/12105)) - Adding debugging instructions in README ([#12989](https://github.com/RocketChat/Rocket.Chat/pull/12989) by [@hypery2k](https://github.com/hypery2k)) @@ -15333,7 +23066,7 @@ - Ignore non-existent Livechat custom fields on Livechat API ([#12522](https://github.com/RocketChat/Rocket.Chat/pull/12522)) -- Improve unreads and unreadsFrom response, prevent it to be equal null ([#12563](https://github.com/RocketChat/Rocket.Chat/pull/12563) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Improve unreads and unreadsFrom response, prevent it to be equal null ([#12563](https://github.com/RocketChat/Rocket.Chat/pull/12563)) - Japanese translations ([#12382](https://github.com/RocketChat/Rocket.Chat/pull/12382) by [@ura14h](https://github.com/ura14h)) @@ -15368,7 +23101,7 @@ - Change field checks in RocketChat.saveStreamingOptions ([#12973](https://github.com/RocketChat/Rocket.Chat/pull/12973)) -- Change JSON to EJSON.parse query to support type Date ([#12706](https://github.com/RocketChat/Rocket.Chat/pull/12706) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Change JSON to EJSON.parse query to support type Date ([#12706](https://github.com/RocketChat/Rocket.Chat/pull/12706)) - Change registration message when user need to confirm email ([#9336](https://github.com/RocketChat/Rocket.Chat/pull/9336) by [@karlprieb](https://github.com/karlprieb)) @@ -15394,13 +23127,13 @@ - Exception in getSingleMessage ([#12970](https://github.com/RocketChat/Rocket.Chat/pull/12970) by [@tsukiRep](https://github.com/tsukiRep)) -- Fix favico error ([#12643](https://github.com/RocketChat/Rocket.Chat/pull/12643) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix favico error ([#12643](https://github.com/RocketChat/Rocket.Chat/pull/12643)) -- Fix set avatar http call, to avoid SSL errors ([#12790](https://github.com/RocketChat/Rocket.Chat/pull/12790) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix set avatar http call, to avoid SSL errors ([#12790](https://github.com/RocketChat/Rocket.Chat/pull/12790)) -- Fix users.setPreferences endpoint, set language correctly ([#12734](https://github.com/RocketChat/Rocket.Chat/pull/12734) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix users.setPreferences endpoint, set language correctly ([#12734](https://github.com/RocketChat/Rocket.Chat/pull/12734)) -- Fix wrong parameter in chat.delete endpoint and add some test cases ([#12408](https://github.com/RocketChat/Rocket.Chat/pull/12408) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix wrong parameter in chat.delete endpoint and add some test cases ([#12408](https://github.com/RocketChat/Rocket.Chat/pull/12408)) - Fixed Anonymous Registration ([#12633](https://github.com/RocketChat/Rocket.Chat/pull/12633) by [@wreiske](https://github.com/wreiske)) @@ -15412,7 +23145,7 @@ - high cpu usage ~ svg icon ([#12677](https://github.com/RocketChat/Rocket.Chat/pull/12677) by [@ph1p](https://github.com/ph1p)) -- Import missed file in rocketchat-authorization ([#12570](https://github.com/RocketChat/Rocket.Chat/pull/12570) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Import missed file in rocketchat-authorization ([#12570](https://github.com/RocketChat/Rocket.Chat/pull/12570)) - Incorrect parameter name in Livechat stream ([#12851](https://github.com/RocketChat/Rocket.Chat/pull/12851)) @@ -15430,9 +23163,9 @@ - PDF view loading indicator ([#12882](https://github.com/RocketChat/Rocket.Chat/pull/12882)) -- Pin and unpin message were not checking permissions ([#12739](https://github.com/RocketChat/Rocket.Chat/pull/12739) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Pin and unpin message were not checking permissions ([#12739](https://github.com/RocketChat/Rocket.Chat/pull/12739)) -- Prevent subscriptions and calls to rooms events that the user is not participating ([#12558](https://github.com/RocketChat/Rocket.Chat/pull/12558) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Prevent subscriptions and calls to rooms events that the user is not participating ([#12558](https://github.com/RocketChat/Rocket.Chat/pull/12558)) - Provide better Dutch translations 🇳🇱 ([#12792](https://github.com/RocketChat/Rocket.Chat/pull/12792) by [@mathysie](https://github.com/mathysie)) @@ -15468,27 +23201,27 @@ - Webdav integration account settings were being shown even when Webdav was disabled ([#12569](https://github.com/RocketChat/Rocket.Chat/pull/12569) by [@karakayasemi](https://github.com/karakayasemi)) -- Wrong test case for `users.setAvatar` endpoint ([#12539](https://github.com/RocketChat/Rocket.Chat/pull/12539) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Wrong test case for `users.setAvatar` endpoint ([#12539](https://github.com/RocketChat/Rocket.Chat/pull/12539))
🔍 Minor changes -- Convert rocketchat-channel-settings to main module structure ([#12594](https://github.com/RocketChat/Rocket.Chat/pull/12594) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-channel-settings to main module structure ([#12594](https://github.com/RocketChat/Rocket.Chat/pull/12594)) -- Convert rocketchat-emoji-custom to main module structure ([#12604](https://github.com/RocketChat/Rocket.Chat/pull/12604) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-emoji-custom to main module structure ([#12604](https://github.com/RocketChat/Rocket.Chat/pull/12604)) -- Convert rocketchat-importer-slack to main module structure ([#12666](https://github.com/RocketChat/Rocket.Chat/pull/12666) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-importer-slack to main module structure ([#12666](https://github.com/RocketChat/Rocket.Chat/pull/12666)) -- Convert rocketchat-livestream to main module structure ([#12679](https://github.com/RocketChat/Rocket.Chat/pull/12679) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-livestream to main module structure ([#12679](https://github.com/RocketChat/Rocket.Chat/pull/12679)) -- Convert rocketchat-mentions-flextab to main module structure ([#12757](https://github.com/RocketChat/Rocket.Chat/pull/12757) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-mentions-flextab to main module structure ([#12757](https://github.com/RocketChat/Rocket.Chat/pull/12757)) -- Convert rocketchat-reactions to main module structure ([#12888](https://github.com/RocketChat/Rocket.Chat/pull/12888) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-reactions to main module structure ([#12888](https://github.com/RocketChat/Rocket.Chat/pull/12888)) -- Convert rocketchat-ui-account to main module structure ([#12842](https://github.com/RocketChat/Rocket.Chat/pull/12842) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-ui-account to main module structure ([#12842](https://github.com/RocketChat/Rocket.Chat/pull/12842)) -- Convert rocketchat-ui-flextab to main module structure ([#12859](https://github.com/RocketChat/Rocket.Chat/pull/12859) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-ui-flextab to main module structure ([#12859](https://github.com/RocketChat/Rocket.Chat/pull/12859)) - [DOCS] Remove Cordova links, include F-Droid download button and few other adjustments ([#12583](https://github.com/RocketChat/Rocket.Chat/pull/12583) by [@rafaelks](https://github.com/rafaelks)) @@ -15496,215 +23229,215 @@ - Added "npm install" to quick start for developers ([#12374](https://github.com/RocketChat/Rocket.Chat/pull/12374) by [@wreiske](https://github.com/wreiske)) -- Added imports for global variables in rocketchat-google-natural-language package ([#12647](https://github.com/RocketChat/Rocket.Chat/pull/12647) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Added imports for global variables in rocketchat-google-natural-language package ([#12647](https://github.com/RocketChat/Rocket.Chat/pull/12647)) - Bump Apps Engine to 1.3.0 ([#12705](https://github.com/RocketChat/Rocket.Chat/pull/12705)) -- Change `chat.getDeletedMessages` to get messages after informed date and return only message's _id ([#13021](https://github.com/RocketChat/Rocket.Chat/pull/13021) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Change `chat.getDeletedMessages` to get messages after informed date and return only message's _id ([#13021](https://github.com/RocketChat/Rocket.Chat/pull/13021)) - changed maxRoomsOpen ([#12949](https://github.com/RocketChat/Rocket.Chat/pull/12949)) -- Convert chatpal search package to modular structure ([#12485](https://github.com/RocketChat/Rocket.Chat/pull/12485) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert chatpal search package to modular structure ([#12485](https://github.com/RocketChat/Rocket.Chat/pull/12485)) -- Convert emoji-emojione to main module structure ([#12605](https://github.com/RocketChat/Rocket.Chat/pull/12605) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert emoji-emojione to main module structure ([#12605](https://github.com/RocketChat/Rocket.Chat/pull/12605)) -- Convert meteor-accounts-saml to main module structure ([#12486](https://github.com/RocketChat/Rocket.Chat/pull/12486) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert meteor-accounts-saml to main module structure ([#12486](https://github.com/RocketChat/Rocket.Chat/pull/12486)) -- Convert meteor-autocomplete package to main module structure ([#12491](https://github.com/RocketChat/Rocket.Chat/pull/12491) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert meteor-autocomplete package to main module structure ([#12491](https://github.com/RocketChat/Rocket.Chat/pull/12491)) -- Convert meteor-timesync to main module structure ([#12495](https://github.com/RocketChat/Rocket.Chat/pull/12495) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert meteor-timesync to main module structure ([#12495](https://github.com/RocketChat/Rocket.Chat/pull/12495)) -- Convert rocketchat-2fa to main module structure ([#12501](https://github.com/RocketChat/Rocket.Chat/pull/12501) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-2fa to main module structure ([#12501](https://github.com/RocketChat/Rocket.Chat/pull/12501)) -- Convert rocketchat-action-links to main module structure ([#12503](https://github.com/RocketChat/Rocket.Chat/pull/12503) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-action-links to main module structure ([#12503](https://github.com/RocketChat/Rocket.Chat/pull/12503)) -- Convert rocketchat-analytics to main module structure ([#12506](https://github.com/RocketChat/Rocket.Chat/pull/12506) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-analytics to main module structure ([#12506](https://github.com/RocketChat/Rocket.Chat/pull/12506)) -- Convert rocketchat-api to main module structure ([#12510](https://github.com/RocketChat/Rocket.Chat/pull/12510) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-api to main module structure ([#12510](https://github.com/RocketChat/Rocket.Chat/pull/12510)) -- Convert rocketchat-assets to main module structure ([#12521](https://github.com/RocketChat/Rocket.Chat/pull/12521) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-assets to main module structure ([#12521](https://github.com/RocketChat/Rocket.Chat/pull/12521)) -- Convert rocketchat-authorization to main module structure ([#12523](https://github.com/RocketChat/Rocket.Chat/pull/12523) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-authorization to main module structure ([#12523](https://github.com/RocketChat/Rocket.Chat/pull/12523)) -- Convert rocketchat-autolinker to main module structure ([#12529](https://github.com/RocketChat/Rocket.Chat/pull/12529) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-autolinker to main module structure ([#12529](https://github.com/RocketChat/Rocket.Chat/pull/12529)) -- Convert rocketchat-autotranslate to main module structure ([#12530](https://github.com/RocketChat/Rocket.Chat/pull/12530) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-autotranslate to main module structure ([#12530](https://github.com/RocketChat/Rocket.Chat/pull/12530)) -- Convert rocketchat-bot-helpers to main module structure ([#12531](https://github.com/RocketChat/Rocket.Chat/pull/12531) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-bot-helpers to main module structure ([#12531](https://github.com/RocketChat/Rocket.Chat/pull/12531)) -- Convert rocketchat-cas to main module structure ([#12532](https://github.com/RocketChat/Rocket.Chat/pull/12532) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-cas to main module structure ([#12532](https://github.com/RocketChat/Rocket.Chat/pull/12532)) -- Convert rocketchat-channel-settings-mail-messages to main module structure ([#12537](https://github.com/RocketChat/Rocket.Chat/pull/12537) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-channel-settings-mail-messages to main module structure ([#12537](https://github.com/RocketChat/Rocket.Chat/pull/12537)) -- Convert rocketchat-colors to main module structure ([#12538](https://github.com/RocketChat/Rocket.Chat/pull/12538) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-colors to main module structure ([#12538](https://github.com/RocketChat/Rocket.Chat/pull/12538)) -- Convert rocketchat-cors to main module structure ([#12595](https://github.com/RocketChat/Rocket.Chat/pull/12595) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-cors to main module structure ([#12595](https://github.com/RocketChat/Rocket.Chat/pull/12595)) -- Convert rocketchat-crowd to main module structure ([#12596](https://github.com/RocketChat/Rocket.Chat/pull/12596) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-crowd to main module structure ([#12596](https://github.com/RocketChat/Rocket.Chat/pull/12596)) -- Convert rocketchat-custom-sounds to main module structure ([#12599](https://github.com/RocketChat/Rocket.Chat/pull/12599) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-custom-sounds to main module structure ([#12599](https://github.com/RocketChat/Rocket.Chat/pull/12599)) -- Convert rocketchat-dolphin to main module structure ([#12600](https://github.com/RocketChat/Rocket.Chat/pull/12600) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-dolphin to main module structure ([#12600](https://github.com/RocketChat/Rocket.Chat/pull/12600)) -- Convert rocketchat-drupal to main module structure ([#12601](https://github.com/RocketChat/Rocket.Chat/pull/12601) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-drupal to main module structure ([#12601](https://github.com/RocketChat/Rocket.Chat/pull/12601)) -- Convert rocketchat-emoji to main module structure ([#12603](https://github.com/RocketChat/Rocket.Chat/pull/12603) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-emoji to main module structure ([#12603](https://github.com/RocketChat/Rocket.Chat/pull/12603)) -- Convert rocketchat-error-handler to main module structure ([#12606](https://github.com/RocketChat/Rocket.Chat/pull/12606) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-error-handler to main module structure ([#12606](https://github.com/RocketChat/Rocket.Chat/pull/12606)) -- Convert rocketchat-favico to main module structure ([#12607](https://github.com/RocketChat/Rocket.Chat/pull/12607) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-favico to main module structure ([#12607](https://github.com/RocketChat/Rocket.Chat/pull/12607)) -- Convert rocketchat-file to main module structure ([#12644](https://github.com/RocketChat/Rocket.Chat/pull/12644) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-file to main module structure ([#12644](https://github.com/RocketChat/Rocket.Chat/pull/12644)) -- Convert rocketchat-github-enterprise to main module structure ([#12642](https://github.com/RocketChat/Rocket.Chat/pull/12642) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-github-enterprise to main module structure ([#12642](https://github.com/RocketChat/Rocket.Chat/pull/12642)) -- Convert rocketchat-gitlab to main module structure ([#12646](https://github.com/RocketChat/Rocket.Chat/pull/12646) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-gitlab to main module structure ([#12646](https://github.com/RocketChat/Rocket.Chat/pull/12646)) -- Convert rocketchat-google-vision to main module structure ([#12649](https://github.com/RocketChat/Rocket.Chat/pull/12649) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-google-vision to main module structure ([#12649](https://github.com/RocketChat/Rocket.Chat/pull/12649)) -- Convert rocketchat-grant to main module structure ([#12657](https://github.com/RocketChat/Rocket.Chat/pull/12657) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-grant to main module structure ([#12657](https://github.com/RocketChat/Rocket.Chat/pull/12657)) -- Convert rocketchat-graphql to main module structure ([#12658](https://github.com/RocketChat/Rocket.Chat/pull/12658) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-graphql to main module structure ([#12658](https://github.com/RocketChat/Rocket.Chat/pull/12658)) -- Convert rocketchat-highlight-words to main module structure ([#12659](https://github.com/RocketChat/Rocket.Chat/pull/12659) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-highlight-words to main module structure ([#12659](https://github.com/RocketChat/Rocket.Chat/pull/12659)) -- Convert rocketchat-iframe-login to main module structure ([#12661](https://github.com/RocketChat/Rocket.Chat/pull/12661) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-iframe-login to main module structure ([#12661](https://github.com/RocketChat/Rocket.Chat/pull/12661)) -- Convert rocketchat-importer to main module structure ([#12662](https://github.com/RocketChat/Rocket.Chat/pull/12662) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-importer to main module structure ([#12662](https://github.com/RocketChat/Rocket.Chat/pull/12662)) -- Convert rocketchat-importer-csv to main module structure ([#12663](https://github.com/RocketChat/Rocket.Chat/pull/12663) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-importer-csv to main module structure ([#12663](https://github.com/RocketChat/Rocket.Chat/pull/12663)) -- Convert rocketchat-importer-hipchat to main module structure ([#12664](https://github.com/RocketChat/Rocket.Chat/pull/12664) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-importer-hipchat to main module structure ([#12664](https://github.com/RocketChat/Rocket.Chat/pull/12664)) -- Convert rocketchat-importer-hipchat-enterprise to main module structure ([#12665](https://github.com/RocketChat/Rocket.Chat/pull/12665) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-importer-hipchat-enterprise to main module structure ([#12665](https://github.com/RocketChat/Rocket.Chat/pull/12665)) -- Convert rocketchat-importer-slack-users to main module structure ([#12669](https://github.com/RocketChat/Rocket.Chat/pull/12669) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-importer-slack-users to main module structure ([#12669](https://github.com/RocketChat/Rocket.Chat/pull/12669)) -- Convert rocketchat-integrations to main module structure ([#12670](https://github.com/RocketChat/Rocket.Chat/pull/12670) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-integrations to main module structure ([#12670](https://github.com/RocketChat/Rocket.Chat/pull/12670)) -- Convert rocketchat-internal-hubot to main module structure ([#12671](https://github.com/RocketChat/Rocket.Chat/pull/12671) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-internal-hubot to main module structure ([#12671](https://github.com/RocketChat/Rocket.Chat/pull/12671)) -- Convert rocketchat-irc to main module structure ([#12672](https://github.com/RocketChat/Rocket.Chat/pull/12672) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-irc to main module structure ([#12672](https://github.com/RocketChat/Rocket.Chat/pull/12672)) -- Convert rocketchat-issuelinks to main module structure ([#12674](https://github.com/RocketChat/Rocket.Chat/pull/12674) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-issuelinks to main module structure ([#12674](https://github.com/RocketChat/Rocket.Chat/pull/12674)) -- Convert rocketchat-katex to main module structure ([#12895](https://github.com/RocketChat/Rocket.Chat/pull/12895) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-katex to main module structure ([#12895](https://github.com/RocketChat/Rocket.Chat/pull/12895)) -- Convert rocketchat-ldap to main module structure ([#12678](https://github.com/RocketChat/Rocket.Chat/pull/12678) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-ldap to main module structure ([#12678](https://github.com/RocketChat/Rocket.Chat/pull/12678)) -- Convert rocketchat-livechat to main module structure ([#12942](https://github.com/RocketChat/Rocket.Chat/pull/12942) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-livechat to main module structure ([#12942](https://github.com/RocketChat/Rocket.Chat/pull/12942)) -- Convert rocketchat-logger to main module structure and remove Logger from eslintrc ([#12995](https://github.com/RocketChat/Rocket.Chat/pull/12995) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-logger to main module structure and remove Logger from eslintrc ([#12995](https://github.com/RocketChat/Rocket.Chat/pull/12995)) -- Convert rocketchat-mail-messages to main module structure ([#12682](https://github.com/RocketChat/Rocket.Chat/pull/12682) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-mail-messages to main module structure ([#12682](https://github.com/RocketChat/Rocket.Chat/pull/12682)) -- Convert rocketchat-mapview to main module structure ([#12701](https://github.com/RocketChat/Rocket.Chat/pull/12701) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-mapview to main module structure ([#12701](https://github.com/RocketChat/Rocket.Chat/pull/12701)) -- Convert rocketchat-markdown to main module structure ([#12755](https://github.com/RocketChat/Rocket.Chat/pull/12755) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-markdown to main module structure ([#12755](https://github.com/RocketChat/Rocket.Chat/pull/12755)) -- Convert rocketchat-mentions to main module structure ([#12756](https://github.com/RocketChat/Rocket.Chat/pull/12756) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-mentions to main module structure ([#12756](https://github.com/RocketChat/Rocket.Chat/pull/12756)) -- Convert rocketchat-message-action to main module structure ([#12759](https://github.com/RocketChat/Rocket.Chat/pull/12759) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-message-action to main module structure ([#12759](https://github.com/RocketChat/Rocket.Chat/pull/12759)) -- Convert rocketchat-message-attachments to main module structure ([#12760](https://github.com/RocketChat/Rocket.Chat/pull/12760) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-message-attachments to main module structure ([#12760](https://github.com/RocketChat/Rocket.Chat/pull/12760)) -- Convert rocketchat-message-mark-as-unread to main module structure ([#12766](https://github.com/RocketChat/Rocket.Chat/pull/12766) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-message-mark-as-unread to main module structure ([#12766](https://github.com/RocketChat/Rocket.Chat/pull/12766)) -- Convert rocketchat-message-pin to main module structure ([#12767](https://github.com/RocketChat/Rocket.Chat/pull/12767) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-message-pin to main module structure ([#12767](https://github.com/RocketChat/Rocket.Chat/pull/12767)) -- Convert rocketchat-message-snippet to main module structure ([#12768](https://github.com/RocketChat/Rocket.Chat/pull/12768) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-message-snippet to main module structure ([#12768](https://github.com/RocketChat/Rocket.Chat/pull/12768)) -- Convert rocketchat-message-star to main module structure ([#12770](https://github.com/RocketChat/Rocket.Chat/pull/12770) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-message-star to main module structure ([#12770](https://github.com/RocketChat/Rocket.Chat/pull/12770)) -- Convert rocketchat-migrations to main-module structure ([#12772](https://github.com/RocketChat/Rocket.Chat/pull/12772) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-migrations to main-module structure ([#12772](https://github.com/RocketChat/Rocket.Chat/pull/12772)) -- Convert rocketchat-oauth2-server-config to main module structure ([#12773](https://github.com/RocketChat/Rocket.Chat/pull/12773) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-oauth2-server-config to main module structure ([#12773](https://github.com/RocketChat/Rocket.Chat/pull/12773)) -- Convert rocketchat-oembed to main module structure ([#12775](https://github.com/RocketChat/Rocket.Chat/pull/12775) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-oembed to main module structure ([#12775](https://github.com/RocketChat/Rocket.Chat/pull/12775)) -- Convert rocketchat-otr to main module structure ([#12777](https://github.com/RocketChat/Rocket.Chat/pull/12777) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-otr to main module structure ([#12777](https://github.com/RocketChat/Rocket.Chat/pull/12777)) -- Convert rocketchat-push-notifications to main module structure ([#12778](https://github.com/RocketChat/Rocket.Chat/pull/12778) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-push-notifications to main module structure ([#12778](https://github.com/RocketChat/Rocket.Chat/pull/12778)) -- Convert rocketchat-retention-policy to main module structure ([#12797](https://github.com/RocketChat/Rocket.Chat/pull/12797) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-retention-policy to main module structure ([#12797](https://github.com/RocketChat/Rocket.Chat/pull/12797)) -- Convert rocketchat-sandstorm to main module structure ([#12799](https://github.com/RocketChat/Rocket.Chat/pull/12799) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-sandstorm to main module structure ([#12799](https://github.com/RocketChat/Rocket.Chat/pull/12799)) -- Convert rocketchat-search to main module structure ([#12801](https://github.com/RocketChat/Rocket.Chat/pull/12801) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-search to main module structure ([#12801](https://github.com/RocketChat/Rocket.Chat/pull/12801)) -- Convert rocketchat-setup-wizard to main module structure ([#12806](https://github.com/RocketChat/Rocket.Chat/pull/12806) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-setup-wizard to main module structure ([#12806](https://github.com/RocketChat/Rocket.Chat/pull/12806)) -- Convert rocketchat-slackbridge to main module structure ([#12807](https://github.com/RocketChat/Rocket.Chat/pull/12807) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-slackbridge to main module structure ([#12807](https://github.com/RocketChat/Rocket.Chat/pull/12807)) -- Convert rocketchat-slashcomands-archiveroom to main module structure ([#12810](https://github.com/RocketChat/Rocket.Chat/pull/12810) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-slashcomands-archiveroom to main module structure ([#12810](https://github.com/RocketChat/Rocket.Chat/pull/12810)) -- Convert rocketchat-slashcommands-asciiarts to main module structure ([#12808](https://github.com/RocketChat/Rocket.Chat/pull/12808) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-slashcommands-asciiarts to main module structure ([#12808](https://github.com/RocketChat/Rocket.Chat/pull/12808)) -- Convert rocketchat-slashcommands-create to main module structure ([#12811](https://github.com/RocketChat/Rocket.Chat/pull/12811) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-slashcommands-create to main module structure ([#12811](https://github.com/RocketChat/Rocket.Chat/pull/12811)) -- Convert rocketchat-slashcommands-help to main module structure ([#12812](https://github.com/RocketChat/Rocket.Chat/pull/12812) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-slashcommands-help to main module structure ([#12812](https://github.com/RocketChat/Rocket.Chat/pull/12812)) -- Convert rocketchat-slashcommands-hide to main module structure ([#12813](https://github.com/RocketChat/Rocket.Chat/pull/12813) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-slashcommands-hide to main module structure ([#12813](https://github.com/RocketChat/Rocket.Chat/pull/12813)) -- Convert rocketchat-slashcommands-invite to main module structure ([#12814](https://github.com/RocketChat/Rocket.Chat/pull/12814) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-slashcommands-invite to main module structure ([#12814](https://github.com/RocketChat/Rocket.Chat/pull/12814)) -- Convert rocketchat-slashcommands-inviteall to main module structure ([#12815](https://github.com/RocketChat/Rocket.Chat/pull/12815) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-slashcommands-inviteall to main module structure ([#12815](https://github.com/RocketChat/Rocket.Chat/pull/12815)) -- Convert rocketchat-slashcommands-join to main module structure ([#12816](https://github.com/RocketChat/Rocket.Chat/pull/12816) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-slashcommands-join to main module structure ([#12816](https://github.com/RocketChat/Rocket.Chat/pull/12816)) -- Convert rocketchat-slashcommands-kick to main module structure ([#12817](https://github.com/RocketChat/Rocket.Chat/pull/12817) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-slashcommands-kick to main module structure ([#12817](https://github.com/RocketChat/Rocket.Chat/pull/12817)) -- Convert rocketchat-slashcommands-leave to main module structure ([#12821](https://github.com/RocketChat/Rocket.Chat/pull/12821) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-slashcommands-leave to main module structure ([#12821](https://github.com/RocketChat/Rocket.Chat/pull/12821)) -- Convert rocketchat-slashcommands-me to main module structure ([#12822](https://github.com/RocketChat/Rocket.Chat/pull/12822) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-slashcommands-me to main module structure ([#12822](https://github.com/RocketChat/Rocket.Chat/pull/12822)) -- Convert rocketchat-slashcommands-msg to main module structure ([#12823](https://github.com/RocketChat/Rocket.Chat/pull/12823) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-slashcommands-msg to main module structure ([#12823](https://github.com/RocketChat/Rocket.Chat/pull/12823)) -- Convert rocketchat-slashcommands-mute to main module structure ([#12824](https://github.com/RocketChat/Rocket.Chat/pull/12824) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-slashcommands-mute to main module structure ([#12824](https://github.com/RocketChat/Rocket.Chat/pull/12824)) -- Convert rocketchat-slashcommands-open to main module structure ([#12825](https://github.com/RocketChat/Rocket.Chat/pull/12825) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-slashcommands-open to main module structure ([#12825](https://github.com/RocketChat/Rocket.Chat/pull/12825)) -- Convert rocketchat-slashcommands-topic to main module structure ([#12826](https://github.com/RocketChat/Rocket.Chat/pull/12826) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-slashcommands-topic to main module structure ([#12826](https://github.com/RocketChat/Rocket.Chat/pull/12826)) -- Convert rocketchat-slashcommands-unarchiveroom to main module structure ([#12827](https://github.com/RocketChat/Rocket.Chat/pull/12827) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-slashcommands-unarchiveroom to main module structure ([#12827](https://github.com/RocketChat/Rocket.Chat/pull/12827)) -- Convert rocketchat-slider to main module structure ([#12828](https://github.com/RocketChat/Rocket.Chat/pull/12828) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-slider to main module structure ([#12828](https://github.com/RocketChat/Rocket.Chat/pull/12828)) -- Convert rocketchat-smarsh-connector to main module structure ([#12830](https://github.com/RocketChat/Rocket.Chat/pull/12830) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-smarsh-connector to main module structure ([#12830](https://github.com/RocketChat/Rocket.Chat/pull/12830)) -- Convert rocketchat-sms to main module structure ([#12831](https://github.com/RocketChat/Rocket.Chat/pull/12831) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-sms to main module structure ([#12831](https://github.com/RocketChat/Rocket.Chat/pull/12831)) -- Convert rocketchat-spotify to main module structure ([#12832](https://github.com/RocketChat/Rocket.Chat/pull/12832) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-spotify to main module structure ([#12832](https://github.com/RocketChat/Rocket.Chat/pull/12832)) -- Convert rocketchat-statistics to main module structure ([#12833](https://github.com/RocketChat/Rocket.Chat/pull/12833) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-statistics to main module structure ([#12833](https://github.com/RocketChat/Rocket.Chat/pull/12833)) -- Convert rocketchat-theme to main module structure ([#12896](https://github.com/RocketChat/Rocket.Chat/pull/12896) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-theme to main module structure ([#12896](https://github.com/RocketChat/Rocket.Chat/pull/12896)) -- Convert rocketchat-token-login to main module structure ([#12837](https://github.com/RocketChat/Rocket.Chat/pull/12837) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-token-login to main module structure ([#12837](https://github.com/RocketChat/Rocket.Chat/pull/12837)) -- Convert rocketchat-tokenpass to main module structure ([#12838](https://github.com/RocketChat/Rocket.Chat/pull/12838) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-tokenpass to main module structure ([#12838](https://github.com/RocketChat/Rocket.Chat/pull/12838)) -- Convert rocketchat-tooltip to main module structure ([#12839](https://github.com/RocketChat/Rocket.Chat/pull/12839) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-tooltip to main module structure ([#12839](https://github.com/RocketChat/Rocket.Chat/pull/12839)) -- Convert rocketchat-ui-admin to main module structure ([#12844](https://github.com/RocketChat/Rocket.Chat/pull/12844) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-ui-admin to main module structure ([#12844](https://github.com/RocketChat/Rocket.Chat/pull/12844)) -- Convert rocketchat-ui-clean-history to main module structure ([#12846](https://github.com/RocketChat/Rocket.Chat/pull/12846) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-ui-clean-history to main module structure ([#12846](https://github.com/RocketChat/Rocket.Chat/pull/12846)) -- Convert rocketchat-ui-login to main module structure ([#12861](https://github.com/RocketChat/Rocket.Chat/pull/12861) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-ui-login to main module structure ([#12861](https://github.com/RocketChat/Rocket.Chat/pull/12861)) -- Convert rocketchat-ui-message to main module structure ([#12871](https://github.com/RocketChat/Rocket.Chat/pull/12871) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-ui-message to main module structure ([#12871](https://github.com/RocketChat/Rocket.Chat/pull/12871)) -- Convert rocketchat-ui-vrecord to main module structure ([#12875](https://github.com/RocketChat/Rocket.Chat/pull/12875) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-ui-vrecord to main module structure ([#12875](https://github.com/RocketChat/Rocket.Chat/pull/12875)) -- Convert rocketchat-user-data-dowload to main module structure ([#12877](https://github.com/RocketChat/Rocket.Chat/pull/12877) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-user-data-dowload to main module structure ([#12877](https://github.com/RocketChat/Rocket.Chat/pull/12877)) -- Convert rocketchat-version-check to main module structure ([#12879](https://github.com/RocketChat/Rocket.Chat/pull/12879) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-version-check to main module structure ([#12879](https://github.com/RocketChat/Rocket.Chat/pull/12879)) -- Convert rocketchat-videobridge to main module structure ([#12881](https://github.com/RocketChat/Rocket.Chat/pull/12881) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-videobridge to main module structure ([#12881](https://github.com/RocketChat/Rocket.Chat/pull/12881)) -- Convert rocketchat-webdav to main module structure ([#12886](https://github.com/RocketChat/Rocket.Chat/pull/12886) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-webdav to main module structure ([#12886](https://github.com/RocketChat/Rocket.Chat/pull/12886)) -- Convert rocketchat-wordpress to main module structure ([#12887](https://github.com/RocketChat/Rocket.Chat/pull/12887) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-wordpress to main module structure ([#12887](https://github.com/RocketChat/Rocket.Chat/pull/12887)) - Dependencies update ([#12624](https://github.com/RocketChat/Rocket.Chat/pull/12624)) @@ -15720,15 +23453,15 @@ - Fix some Ukrainian translations ([#12712](https://github.com/RocketChat/Rocket.Chat/pull/12712) by [@zdumitru](https://github.com/zdumitru)) -- Fix users.setAvatar endpoint tests and logic ([#12625](https://github.com/RocketChat/Rocket.Chat/pull/12625) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix users.setAvatar endpoint tests and logic ([#12625](https://github.com/RocketChat/Rocket.Chat/pull/12625)) -- Fix: Add email dependency in package.js ([#12645](https://github.com/RocketChat/Rocket.Chat/pull/12645) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix: Add email dependency in package.js ([#12645](https://github.com/RocketChat/Rocket.Chat/pull/12645)) - Fix: Developers not being able to debug root files in VSCode ([#12440](https://github.com/RocketChat/Rocket.Chat/pull/12440) by [@mrsimpson](https://github.com/mrsimpson)) -- Fix: Exception when registering a user with gravatar ([#12699](https://github.com/RocketChat/Rocket.Chat/pull/12699) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix: Exception when registering a user with gravatar ([#12699](https://github.com/RocketChat/Rocket.Chat/pull/12699)) -- Fix: Fix tests by increasing window size ([#12707](https://github.com/RocketChat/Rocket.Chat/pull/12707) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix: Fix tests by increasing window size ([#12707](https://github.com/RocketChat/Rocket.Chat/pull/12707)) - Fix: snap push from ci ([#12883](https://github.com/RocketChat/Rocket.Chat/pull/12883)) @@ -15750,9 +23483,9 @@ - Move globals of test to a specific eslintrc file ([#12959](https://github.com/RocketChat/Rocket.Chat/pull/12959)) -- Move isFirefox and isChrome functions to rocketchat-utils ([#13011](https://github.com/RocketChat/Rocket.Chat/pull/13011) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Move isFirefox and isChrome functions to rocketchat-utils ([#13011](https://github.com/RocketChat/Rocket.Chat/pull/13011)) -- Move tapi18n t and isRtl functions from ui to utils ([#13005](https://github.com/RocketChat/Rocket.Chat/pull/13005) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Move tapi18n t and isRtl functions from ui to utils ([#13005](https://github.com/RocketChat/Rocket.Chat/pull/13005)) - Regression: Account pages layout ([#12735](https://github.com/RocketChat/Rocket.Chat/pull/12735)) @@ -15762,7 +23495,7 @@ - Regression: Inherit font-family for message box ([#12729](https://github.com/RocketChat/Rocket.Chat/pull/12729)) -- Regression: List of custom emojis wasn't working ([#13031](https://github.com/RocketChat/Rocket.Chat/pull/13031) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Regression: List of custom emojis wasn't working ([#13031](https://github.com/RocketChat/Rocket.Chat/pull/13031)) - Release 0.72.2 ([#12901](https://github.com/RocketChat/Rocket.Chat/pull/12901)) @@ -15770,21 +23503,21 @@ - Removal of EJSON, Accounts, Email, HTTP, Random, ReactiveDict, ReactiveVar, SHA256 and WebApp global variables ([#12377](https://github.com/RocketChat/Rocket.Chat/pull/12377)) -- Removal of Match, check, moment, Tracker and Mongo global variables ([#12410](https://github.com/RocketChat/Rocket.Chat/pull/12410) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Removal of Match, check, moment, Tracker and Mongo global variables ([#12410](https://github.com/RocketChat/Rocket.Chat/pull/12410)) - Removal of Meteor global variable ([#12371](https://github.com/RocketChat/Rocket.Chat/pull/12371)) -- Removal of TAPi18n and TAPi18next global variables ([#12467](https://github.com/RocketChat/Rocket.Chat/pull/12467) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Removal of TAPi18n and TAPi18next global variables ([#12467](https://github.com/RocketChat/Rocket.Chat/pull/12467)) -- Removal of Template, Blaze, BlazeLayout, FlowRouter, DDPRateLimiter, Session, UAParser, Promise, Reload and CryptoJS global variables ([#12433](https://github.com/RocketChat/Rocket.Chat/pull/12433) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Removal of Template, Blaze, BlazeLayout, FlowRouter, DDPRateLimiter, Session, UAParser, Promise, Reload and CryptoJS global variables ([#12433](https://github.com/RocketChat/Rocket.Chat/pull/12433)) -- Remove /* globals */ from files wave-1 ([#12984](https://github.com/RocketChat/Rocket.Chat/pull/12984) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove /* globals */ from files wave-1 ([#12984](https://github.com/RocketChat/Rocket.Chat/pull/12984)) -- Remove /* globals */ wave 2 ([#12988](https://github.com/RocketChat/Rocket.Chat/pull/12988) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove /* globals */ wave 2 ([#12988](https://github.com/RocketChat/Rocket.Chat/pull/12988)) -- Remove /* globals */ wave 3 ([#12997](https://github.com/RocketChat/Rocket.Chat/pull/12997) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove /* globals */ wave 3 ([#12997](https://github.com/RocketChat/Rocket.Chat/pull/12997)) -- Remove /* globals */ wave 4 ([#12999](https://github.com/RocketChat/Rocket.Chat/pull/12999) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove /* globals */ wave 4 ([#12999](https://github.com/RocketChat/Rocket.Chat/pull/12999)) - Remove conventional changelog cli, we are using our own cli now (Houston) ([#12798](https://github.com/RocketChat/Rocket.Chat/pull/12798)) @@ -15792,13 +23525,13 @@ - Remove global toastr ([#12961](https://github.com/RocketChat/Rocket.Chat/pull/12961)) -- Remove rocketchat-tutum package ([#12840](https://github.com/RocketChat/Rocket.Chat/pull/12840) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove rocketchat-tutum package ([#12840](https://github.com/RocketChat/Rocket.Chat/pull/12840)) - Remove template for feature requests as issues ([#12426](https://github.com/RocketChat/Rocket.Chat/pull/12426)) -- Removed RocketChatFile from globals ([#12650](https://github.com/RocketChat/Rocket.Chat/pull/12650) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Removed RocketChatFile from globals ([#12650](https://github.com/RocketChat/Rocket.Chat/pull/12650)) -- Revert imports of css, reAdd them to the addFiles function ([#12934](https://github.com/RocketChat/Rocket.Chat/pull/12934) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Revert imports of css, reAdd them to the addFiles function ([#12934](https://github.com/RocketChat/Rocket.Chat/pull/12934)) - Update Apps Engine to 1.3.1 ([#12741](https://github.com/RocketChat/Rocket.Chat/pull/12741)) @@ -15811,7 +23544,6 @@ - [@AndreamApp](https://github.com/AndreamApp) - [@Hudell](https://github.com/Hudell) - [@Ismaw34](https://github.com/Ismaw34) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@alexbartsch](https://github.com/alexbartsch) - [@cardoso](https://github.com/cardoso) - [@cyberb](https://github.com/cyberb) @@ -15841,6 +23573,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 - [@LuluGO](https://github.com/LuluGO) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@d-gubert](https://github.com/d-gubert) - [@engelgabriel](https://github.com/engelgabriel) - [@geekgonecrazy](https://github.com/geekgonecrazy) @@ -15918,21 +23651,21 @@ - Bump Apps-Engine version ([#12848](https://github.com/RocketChat/Rocket.Chat/pull/12848)) -- Change file order in rocketchat-cors ([#12804](https://github.com/RocketChat/Rocket.Chat/pull/12804) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Change file order in rocketchat-cors ([#12804](https://github.com/RocketChat/Rocket.Chat/pull/12804)) -- Release 0.72.1 ([#12850](https://github.com/RocketChat/Rocket.Chat/pull/12850) by [@Hudell](https://github.com/Hudell) & [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@ohmonster](https://github.com/ohmonster) & [@piotrkochan](https://github.com/piotrkochan)) +- Release 0.72.1 ([#12850](https://github.com/RocketChat/Rocket.Chat/pull/12850) by [@Hudell](https://github.com/Hudell) & [@ohmonster](https://github.com/ohmonster) & [@piotrkochan](https://github.com/piotrkochan))
### 👩‍💻👨‍💻 Contributors 😍 - [@Hudell](https://github.com/Hudell) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@ohmonster](https://github.com/ohmonster) - [@piotrkochan](https://github.com/piotrkochan) ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@d-gubert](https://github.com/d-gubert) - [@rodrigok](https://github.com/rodrigok) - [@sampaiodiego](https://github.com/sampaiodiego) @@ -15953,11 +23686,11 @@ - /api/v1/spotlight: return joinCodeRequired field for rooms ([#12651](https://github.com/RocketChat/Rocket.Chat/pull/12651) by [@cardoso](https://github.com/cardoso)) -- Add permission to enable personal access token to specific roles ([#12309](https://github.com/RocketChat/Rocket.Chat/pull/12309) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add permission to enable personal access token to specific roles ([#12309](https://github.com/RocketChat/Rocket.Chat/pull/12309)) - Make Livechat's widget draggable ([#12378](https://github.com/RocketChat/Rocket.Chat/pull/12378)) -- New API Endpoints for the new version of JS SDK ([#12623](https://github.com/RocketChat/Rocket.Chat/pull/12623) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- New API Endpoints for the new version of JS SDK ([#12623](https://github.com/RocketChat/Rocket.Chat/pull/12623)) - Option to reset e2e key ([#12483](https://github.com/RocketChat/Rocket.Chat/pull/12483) by [@Hudell](https://github.com/Hudell)) @@ -15972,7 +23705,7 @@ - Add new acceptable header for Livechat REST requests ([#12561](https://github.com/RocketChat/Rocket.Chat/pull/12561)) -- Add rooms property in user object, if the user has the permission, with rooms roles ([#12105](https://github.com/RocketChat/Rocket.Chat/pull/12105) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add rooms property in user object, if the user has the permission, with rooms roles ([#12105](https://github.com/RocketChat/Rocket.Chat/pull/12105)) - Allow apps to update persistence by association ([#12714](https://github.com/RocketChat/Rocket.Chat/pull/12714)) @@ -15990,7 +23723,7 @@ - Ignore non-existent Livechat custom fields on Livechat API ([#12522](https://github.com/RocketChat/Rocket.Chat/pull/12522)) -- Improve unreads and unreadsFrom response, prevent it to be equal null ([#12563](https://github.com/RocketChat/Rocket.Chat/pull/12563) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Improve unreads and unreadsFrom response, prevent it to be equal null ([#12563](https://github.com/RocketChat/Rocket.Chat/pull/12563)) - Japanese translations ([#12382](https://github.com/RocketChat/Rocket.Chat/pull/12382) by [@ura14h](https://github.com/ura14h)) @@ -16019,9 +23752,9 @@ - Emoji picker is not in viewport on small screens ([#12457](https://github.com/RocketChat/Rocket.Chat/pull/12457) by [@ramrami](https://github.com/ramrami)) -- Fix favico error ([#12643](https://github.com/RocketChat/Rocket.Chat/pull/12643) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix favico error ([#12643](https://github.com/RocketChat/Rocket.Chat/pull/12643)) -- Fix wrong parameter in chat.delete endpoint and add some test cases ([#12408](https://github.com/RocketChat/Rocket.Chat/pull/12408) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix wrong parameter in chat.delete endpoint and add some test cases ([#12408](https://github.com/RocketChat/Rocket.Chat/pull/12408)) - Fixed Anonymous Registration ([#12633](https://github.com/RocketChat/Rocket.Chat/pull/12633) by [@wreiske](https://github.com/wreiske)) @@ -16031,11 +23764,11 @@ - high cpu usage ~ svg icon ([#12677](https://github.com/RocketChat/Rocket.Chat/pull/12677) by [@ph1p](https://github.com/ph1p)) -- Import missed file in rocketchat-authorization ([#12570](https://github.com/RocketChat/Rocket.Chat/pull/12570) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Import missed file in rocketchat-authorization ([#12570](https://github.com/RocketChat/Rocket.Chat/pull/12570)) - Manage own integrations permissions check ([#12397](https://github.com/RocketChat/Rocket.Chat/pull/12397)) -- Prevent subscriptions and calls to rooms events that the user is not participating ([#12558](https://github.com/RocketChat/Rocket.Chat/pull/12558) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Prevent subscriptions and calls to rooms events that the user is not participating ([#12558](https://github.com/RocketChat/Rocket.Chat/pull/12558)) - Spotlight method being called multiple times ([#12536](https://github.com/RocketChat/Rocket.Chat/pull/12536)) @@ -16043,115 +23776,115 @@ - Update caret position on insert a new line in message box ([#12713](https://github.com/RocketChat/Rocket.Chat/pull/12713)) -- Wrong test case for `users.setAvatar` endpoint ([#12539](https://github.com/RocketChat/Rocket.Chat/pull/12539) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Wrong test case for `users.setAvatar` endpoint ([#12539](https://github.com/RocketChat/Rocket.Chat/pull/12539))
🔍 Minor changes -- Convert rocketchat-channel-settings to main module structure ([#12594](https://github.com/RocketChat/Rocket.Chat/pull/12594) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-channel-settings to main module structure ([#12594](https://github.com/RocketChat/Rocket.Chat/pull/12594)) -- Convert rocketchat-emoji-custom to main module structure ([#12604](https://github.com/RocketChat/Rocket.Chat/pull/12604) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-emoji-custom to main module structure ([#12604](https://github.com/RocketChat/Rocket.Chat/pull/12604)) -- Convert rocketchat-importer-slack to main module structure ([#12666](https://github.com/RocketChat/Rocket.Chat/pull/12666) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-importer-slack to main module structure ([#12666](https://github.com/RocketChat/Rocket.Chat/pull/12666)) -- Convert rocketchat-livestream to main module structure ([#12679](https://github.com/RocketChat/Rocket.Chat/pull/12679) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-livestream to main module structure ([#12679](https://github.com/RocketChat/Rocket.Chat/pull/12679)) - [DOCS] Remove Cordova links, include F-Droid download button and few other adjustments ([#12583](https://github.com/RocketChat/Rocket.Chat/pull/12583) by [@rafaelks](https://github.com/rafaelks)) - Added "npm install" to quick start for developers ([#12374](https://github.com/RocketChat/Rocket.Chat/pull/12374) by [@wreiske](https://github.com/wreiske)) -- Added imports for global variables in rocketchat-google-natural-language package ([#12647](https://github.com/RocketChat/Rocket.Chat/pull/12647) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Added imports for global variables in rocketchat-google-natural-language package ([#12647](https://github.com/RocketChat/Rocket.Chat/pull/12647)) - Bump Apps Engine to 1.3.0 ([#12705](https://github.com/RocketChat/Rocket.Chat/pull/12705)) -- Convert chatpal search package to modular structure ([#12485](https://github.com/RocketChat/Rocket.Chat/pull/12485) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert chatpal search package to modular structure ([#12485](https://github.com/RocketChat/Rocket.Chat/pull/12485)) -- Convert emoji-emojione to main module structure ([#12605](https://github.com/RocketChat/Rocket.Chat/pull/12605) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert emoji-emojione to main module structure ([#12605](https://github.com/RocketChat/Rocket.Chat/pull/12605)) -- Convert meteor-accounts-saml to main module structure ([#12486](https://github.com/RocketChat/Rocket.Chat/pull/12486) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert meteor-accounts-saml to main module structure ([#12486](https://github.com/RocketChat/Rocket.Chat/pull/12486)) -- Convert meteor-autocomplete package to main module structure ([#12491](https://github.com/RocketChat/Rocket.Chat/pull/12491) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert meteor-autocomplete package to main module structure ([#12491](https://github.com/RocketChat/Rocket.Chat/pull/12491)) -- Convert meteor-timesync to main module structure ([#12495](https://github.com/RocketChat/Rocket.Chat/pull/12495) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert meteor-timesync to main module structure ([#12495](https://github.com/RocketChat/Rocket.Chat/pull/12495)) -- Convert rocketchat-2fa to main module structure ([#12501](https://github.com/RocketChat/Rocket.Chat/pull/12501) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-2fa to main module structure ([#12501](https://github.com/RocketChat/Rocket.Chat/pull/12501)) -- Convert rocketchat-action-links to main module structure ([#12503](https://github.com/RocketChat/Rocket.Chat/pull/12503) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-action-links to main module structure ([#12503](https://github.com/RocketChat/Rocket.Chat/pull/12503)) -- Convert rocketchat-analytics to main module structure ([#12506](https://github.com/RocketChat/Rocket.Chat/pull/12506) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-analytics to main module structure ([#12506](https://github.com/RocketChat/Rocket.Chat/pull/12506)) -- Convert rocketchat-api to main module structure ([#12510](https://github.com/RocketChat/Rocket.Chat/pull/12510) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-api to main module structure ([#12510](https://github.com/RocketChat/Rocket.Chat/pull/12510)) -- Convert rocketchat-assets to main module structure ([#12521](https://github.com/RocketChat/Rocket.Chat/pull/12521) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-assets to main module structure ([#12521](https://github.com/RocketChat/Rocket.Chat/pull/12521)) -- Convert rocketchat-authorization to main module structure ([#12523](https://github.com/RocketChat/Rocket.Chat/pull/12523) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-authorization to main module structure ([#12523](https://github.com/RocketChat/Rocket.Chat/pull/12523)) -- Convert rocketchat-autolinker to main module structure ([#12529](https://github.com/RocketChat/Rocket.Chat/pull/12529) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-autolinker to main module structure ([#12529](https://github.com/RocketChat/Rocket.Chat/pull/12529)) -- Convert rocketchat-autotranslate to main module structure ([#12530](https://github.com/RocketChat/Rocket.Chat/pull/12530) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-autotranslate to main module structure ([#12530](https://github.com/RocketChat/Rocket.Chat/pull/12530)) -- Convert rocketchat-bot-helpers to main module structure ([#12531](https://github.com/RocketChat/Rocket.Chat/pull/12531) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-bot-helpers to main module structure ([#12531](https://github.com/RocketChat/Rocket.Chat/pull/12531)) -- Convert rocketchat-cas to main module structure ([#12532](https://github.com/RocketChat/Rocket.Chat/pull/12532) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-cas to main module structure ([#12532](https://github.com/RocketChat/Rocket.Chat/pull/12532)) -- Convert rocketchat-channel-settings-mail-messages to main module structure ([#12537](https://github.com/RocketChat/Rocket.Chat/pull/12537) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-channel-settings-mail-messages to main module structure ([#12537](https://github.com/RocketChat/Rocket.Chat/pull/12537)) -- Convert rocketchat-colors to main module structure ([#12538](https://github.com/RocketChat/Rocket.Chat/pull/12538) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-colors to main module structure ([#12538](https://github.com/RocketChat/Rocket.Chat/pull/12538)) -- Convert rocketchat-cors to main module structure ([#12595](https://github.com/RocketChat/Rocket.Chat/pull/12595) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-cors to main module structure ([#12595](https://github.com/RocketChat/Rocket.Chat/pull/12595)) -- Convert rocketchat-crowd to main module structure ([#12596](https://github.com/RocketChat/Rocket.Chat/pull/12596) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-crowd to main module structure ([#12596](https://github.com/RocketChat/Rocket.Chat/pull/12596)) -- Convert rocketchat-custom-sounds to main module structure ([#12599](https://github.com/RocketChat/Rocket.Chat/pull/12599) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-custom-sounds to main module structure ([#12599](https://github.com/RocketChat/Rocket.Chat/pull/12599)) -- Convert rocketchat-dolphin to main module structure ([#12600](https://github.com/RocketChat/Rocket.Chat/pull/12600) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-dolphin to main module structure ([#12600](https://github.com/RocketChat/Rocket.Chat/pull/12600)) -- Convert rocketchat-drupal to main module structure ([#12601](https://github.com/RocketChat/Rocket.Chat/pull/12601) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-drupal to main module structure ([#12601](https://github.com/RocketChat/Rocket.Chat/pull/12601)) -- Convert rocketchat-emoji to main module structure ([#12603](https://github.com/RocketChat/Rocket.Chat/pull/12603) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-emoji to main module structure ([#12603](https://github.com/RocketChat/Rocket.Chat/pull/12603)) -- Convert rocketchat-error-handler to main module structure ([#12606](https://github.com/RocketChat/Rocket.Chat/pull/12606) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-error-handler to main module structure ([#12606](https://github.com/RocketChat/Rocket.Chat/pull/12606)) -- Convert rocketchat-favico to main module structure ([#12607](https://github.com/RocketChat/Rocket.Chat/pull/12607) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-favico to main module structure ([#12607](https://github.com/RocketChat/Rocket.Chat/pull/12607)) -- Convert rocketchat-file to main module structure ([#12644](https://github.com/RocketChat/Rocket.Chat/pull/12644) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-file to main module structure ([#12644](https://github.com/RocketChat/Rocket.Chat/pull/12644)) -- Convert rocketchat-github-enterprise to main module structure ([#12642](https://github.com/RocketChat/Rocket.Chat/pull/12642) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-github-enterprise to main module structure ([#12642](https://github.com/RocketChat/Rocket.Chat/pull/12642)) -- Convert rocketchat-gitlab to main module structure ([#12646](https://github.com/RocketChat/Rocket.Chat/pull/12646) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-gitlab to main module structure ([#12646](https://github.com/RocketChat/Rocket.Chat/pull/12646)) -- Convert rocketchat-google-vision to main module structure ([#12649](https://github.com/RocketChat/Rocket.Chat/pull/12649) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-google-vision to main module structure ([#12649](https://github.com/RocketChat/Rocket.Chat/pull/12649)) -- Convert rocketchat-grant to main module structure ([#12657](https://github.com/RocketChat/Rocket.Chat/pull/12657) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-grant to main module structure ([#12657](https://github.com/RocketChat/Rocket.Chat/pull/12657)) -- Convert rocketchat-graphql to main module structure ([#12658](https://github.com/RocketChat/Rocket.Chat/pull/12658) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-graphql to main module structure ([#12658](https://github.com/RocketChat/Rocket.Chat/pull/12658)) -- Convert rocketchat-highlight-words to main module structure ([#12659](https://github.com/RocketChat/Rocket.Chat/pull/12659) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-highlight-words to main module structure ([#12659](https://github.com/RocketChat/Rocket.Chat/pull/12659)) -- Convert rocketchat-iframe-login to main module structure ([#12661](https://github.com/RocketChat/Rocket.Chat/pull/12661) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-iframe-login to main module structure ([#12661](https://github.com/RocketChat/Rocket.Chat/pull/12661)) -- Convert rocketchat-importer to main module structure ([#12662](https://github.com/RocketChat/Rocket.Chat/pull/12662) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-importer to main module structure ([#12662](https://github.com/RocketChat/Rocket.Chat/pull/12662)) -- Convert rocketchat-importer-csv to main module structure ([#12663](https://github.com/RocketChat/Rocket.Chat/pull/12663) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-importer-csv to main module structure ([#12663](https://github.com/RocketChat/Rocket.Chat/pull/12663)) -- Convert rocketchat-importer-hipchat to main module structure ([#12664](https://github.com/RocketChat/Rocket.Chat/pull/12664) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-importer-hipchat to main module structure ([#12664](https://github.com/RocketChat/Rocket.Chat/pull/12664)) -- Convert rocketchat-importer-hipchat-enterprise to main module structure ([#12665](https://github.com/RocketChat/Rocket.Chat/pull/12665) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-importer-hipchat-enterprise to main module structure ([#12665](https://github.com/RocketChat/Rocket.Chat/pull/12665)) -- Convert rocketchat-importer-slack-users to main module structure ([#12669](https://github.com/RocketChat/Rocket.Chat/pull/12669) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-importer-slack-users to main module structure ([#12669](https://github.com/RocketChat/Rocket.Chat/pull/12669)) -- Convert rocketchat-integrations to main module structure ([#12670](https://github.com/RocketChat/Rocket.Chat/pull/12670) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-integrations to main module structure ([#12670](https://github.com/RocketChat/Rocket.Chat/pull/12670)) -- Convert rocketchat-internal-hubot to main module structure ([#12671](https://github.com/RocketChat/Rocket.Chat/pull/12671) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-internal-hubot to main module structure ([#12671](https://github.com/RocketChat/Rocket.Chat/pull/12671)) -- Convert rocketchat-irc to main module structure ([#12672](https://github.com/RocketChat/Rocket.Chat/pull/12672) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-irc to main module structure ([#12672](https://github.com/RocketChat/Rocket.Chat/pull/12672)) -- Convert rocketchat-issuelinks to main module structure ([#12674](https://github.com/RocketChat/Rocket.Chat/pull/12674) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-issuelinks to main module structure ([#12674](https://github.com/RocketChat/Rocket.Chat/pull/12674)) -- Convert rocketchat-ldap to main module structure ([#12678](https://github.com/RocketChat/Rocket.Chat/pull/12678) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-ldap to main module structure ([#12678](https://github.com/RocketChat/Rocket.Chat/pull/12678)) -- Convert rocketchat-mail-messages to main module structure ([#12682](https://github.com/RocketChat/Rocket.Chat/pull/12682) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Convert rocketchat-mail-messages to main module structure ([#12682](https://github.com/RocketChat/Rocket.Chat/pull/12682)) - Fix crowd error with import of SyncedCron ([#12641](https://github.com/RocketChat/Rocket.Chat/pull/12641)) @@ -16163,15 +23896,15 @@ - Fix some Ukrainian translations ([#12712](https://github.com/RocketChat/Rocket.Chat/pull/12712) by [@zdumitru](https://github.com/zdumitru)) -- Fix users.setAvatar endpoint tests and logic ([#12625](https://github.com/RocketChat/Rocket.Chat/pull/12625) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix users.setAvatar endpoint tests and logic ([#12625](https://github.com/RocketChat/Rocket.Chat/pull/12625)) -- Fix: Add email dependency in package.js ([#12645](https://github.com/RocketChat/Rocket.Chat/pull/12645) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix: Add email dependency in package.js ([#12645](https://github.com/RocketChat/Rocket.Chat/pull/12645)) - Fix: Developers not being able to debug root files in VSCode ([#12440](https://github.com/RocketChat/Rocket.Chat/pull/12440) by [@mrsimpson](https://github.com/mrsimpson)) -- Fix: Exception when registering a user with gravatar ([#12699](https://github.com/RocketChat/Rocket.Chat/pull/12699) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix: Exception when registering a user with gravatar ([#12699](https://github.com/RocketChat/Rocket.Chat/pull/12699)) -- Fix: Fix tests by increasing window size ([#12707](https://github.com/RocketChat/Rocket.Chat/pull/12707) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix: Fix tests by increasing window size ([#12707](https://github.com/RocketChat/Rocket.Chat/pull/12707)) - Improve: Add missing translation keys. ([#12708](https://github.com/RocketChat/Rocket.Chat/pull/12708) by [@ura14h](https://github.com/ura14h)) @@ -16191,17 +23924,17 @@ - Removal of EJSON, Accounts, Email, HTTP, Random, ReactiveDict, ReactiveVar, SHA256 and WebApp global variables ([#12377](https://github.com/RocketChat/Rocket.Chat/pull/12377)) -- Removal of Match, check, moment, Tracker and Mongo global variables ([#12410](https://github.com/RocketChat/Rocket.Chat/pull/12410) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Removal of Match, check, moment, Tracker and Mongo global variables ([#12410](https://github.com/RocketChat/Rocket.Chat/pull/12410)) - Removal of Meteor global variable ([#12371](https://github.com/RocketChat/Rocket.Chat/pull/12371)) -- Removal of TAPi18n and TAPi18next global variables ([#12467](https://github.com/RocketChat/Rocket.Chat/pull/12467) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Removal of TAPi18n and TAPi18next global variables ([#12467](https://github.com/RocketChat/Rocket.Chat/pull/12467)) -- Removal of Template, Blaze, BlazeLayout, FlowRouter, DDPRateLimiter, Session, UAParser, Promise, Reload and CryptoJS global variables ([#12433](https://github.com/RocketChat/Rocket.Chat/pull/12433) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Removal of Template, Blaze, BlazeLayout, FlowRouter, DDPRateLimiter, Session, UAParser, Promise, Reload and CryptoJS global variables ([#12433](https://github.com/RocketChat/Rocket.Chat/pull/12433)) - Remove template for feature requests as issues ([#12426](https://github.com/RocketChat/Rocket.Chat/pull/12426)) -- Removed RocketChatFile from globals ([#12650](https://github.com/RocketChat/Rocket.Chat/pull/12650) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Removed RocketChatFile from globals ([#12650](https://github.com/RocketChat/Rocket.Chat/pull/12650)) - Update Apps Engine to 1.3.1 ([#12741](https://github.com/RocketChat/Rocket.Chat/pull/12741)) @@ -16214,7 +23947,6 @@ - [@AndreamApp](https://github.com/AndreamApp) - [@Hudell](https://github.com/Hudell) - [@Ismaw34](https://github.com/Ismaw34) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@cardoso](https://github.com/cardoso) - [@imronras](https://github.com/imronras) - [@karlprieb](https://github.com/karlprieb) @@ -16232,6 +23964,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@engelgabriel](https://github.com/engelgabriel) - [@ggazzo](https://github.com/ggazzo) - [@marceloschmidt](https://github.com/marceloschmidt) @@ -16290,9 +24023,9 @@ ### ⚠️ BREAKING CHANGES -- Add expiration to API login tokens and fix duplicate login tokens created by LDAP ([#12186](https://github.com/RocketChat/Rocket.Chat/pull/12186) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add expiration to API login tokens and fix duplicate login tokens created by LDAP ([#12186](https://github.com/RocketChat/Rocket.Chat/pull/12186)) -- Update `lastMessage` rooms property and convert the "starred" property, to the same format ([#12266](https://github.com/RocketChat/Rocket.Chat/pull/12266) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Update `lastMessage` rooms property and convert the "starred" property, to the same format ([#12266](https://github.com/RocketChat/Rocket.Chat/pull/12266)) ### 🎉 New features @@ -16301,7 +24034,7 @@ - Add "help wanted" section to Readme ([#12432](https://github.com/RocketChat/Rocket.Chat/pull/12432) by [@isabellarussell](https://github.com/isabellarussell)) -- Add delete channel mutation to GraphQL API ([#11860](https://github.com/RocketChat/Rocket.Chat/pull/11860) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add delete channel mutation to GraphQL API ([#11860](https://github.com/RocketChat/Rocket.Chat/pull/11860)) - PDF message attachment preview (client side rendering) ([#10519](https://github.com/RocketChat/Rocket.Chat/pull/10519) by [@kb0304](https://github.com/kb0304)) @@ -16361,13 +24094,13 @@ - Modal confirm on enter ([#12283](https://github.com/RocketChat/Rocket.Chat/pull/12283)) -- Remove e2e from users endpoint responses ([#12344](https://github.com/RocketChat/Rocket.Chat/pull/12344) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove e2e from users endpoint responses ([#12344](https://github.com/RocketChat/Rocket.Chat/pull/12344)) -- REST `users.setAvatar` endpoint wasn't allowing update the avatar of other users even with correct permissions ([#11431](https://github.com/RocketChat/Rocket.Chat/pull/11431) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST `users.setAvatar` endpoint wasn't allowing update the avatar of other users even with correct permissions ([#11431](https://github.com/RocketChat/Rocket.Chat/pull/11431)) - Slack importer: image previews not showing ([#11875](https://github.com/RocketChat/Rocket.Chat/pull/11875) by [@Hudell](https://github.com/Hudell) & [@madguy02](https://github.com/madguy02)) -- users.register endpoint to not create an user if username already being used ([#12297](https://github.com/RocketChat/Rocket.Chat/pull/12297) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- users.register endpoint to not create an user if username already being used ([#12297](https://github.com/RocketChat/Rocket.Chat/pull/12297))
🔍 Minor changes @@ -16383,7 +24116,7 @@ - Improve: Drop database between running tests on CI ([#12358](https://github.com/RocketChat/Rocket.Chat/pull/12358)) -- Regression: Change `starred` message property from object to array ([#12405](https://github.com/RocketChat/Rocket.Chat/pull/12405) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Regression: Change `starred` message property from object to array ([#12405](https://github.com/RocketChat/Rocket.Chat/pull/12405)) - Regression: do not render pdf preview on safari <= 12 ([#12375](https://github.com/RocketChat/Rocket.Chat/pull/12375)) @@ -16397,7 +24130,6 @@ - [@Hudell](https://github.com/Hudell) - [@MarcosEllys](https://github.com/MarcosEllys) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@crazy-max](https://github.com/crazy-max) - [@isabellarussell](https://github.com/isabellarussell) - [@kb0304](https://github.com/kb0304) @@ -16410,6 +24142,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@Sing-Li](https://github.com/Sing-Li) - [@geekgonecrazy](https://github.com/geekgonecrazy) - [@ggazzo](https://github.com/ggazzo) @@ -16591,11 +24324,11 @@ - Livechat trigger option to run only once ([#12068](https://github.com/RocketChat/Rocket.Chat/pull/12068) by [@edzluhan](https://github.com/edzluhan)) -- REST endpoint to set groups' announcement ([#11905](https://github.com/RocketChat/Rocket.Chat/pull/11905) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST endpoint to set groups' announcement ([#11905](https://github.com/RocketChat/Rocket.Chat/pull/11905)) - REST endpoints to create roles and assign roles to users ([#11855](https://github.com/RocketChat/Rocket.Chat/pull/11855) by [@aferreira44](https://github.com/aferreira44)) -- REST endpoints to get moderators from groups and channels ([#11909](https://github.com/RocketChat/Rocket.Chat/pull/11909) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST endpoints to get moderators from groups and channels ([#11909](https://github.com/RocketChat/Rocket.Chat/pull/11909)) - Support for end to end encryption ([#10094](https://github.com/RocketChat/Rocket.Chat/pull/10094) by [@mrinaldhar](https://github.com/mrinaldhar)) @@ -16653,7 +24386,7 @@ - Horizontal scroll on user info tab ([#12102](https://github.com/RocketChat/Rocket.Chat/pull/12102) by [@rssilva](https://github.com/rssilva)) -- Internal error when cross-origin with CORS is disabled ([#11953](https://github.com/RocketChat/Rocket.Chat/pull/11953) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Internal error when cross-origin with CORS is disabled ([#11953](https://github.com/RocketChat/Rocket.Chat/pull/11953)) - IRC Federation no longer working ([#11906](https://github.com/RocketChat/Rocket.Chat/pull/11906) by [@Hudell](https://github.com/Hudell)) @@ -16663,7 +24396,7 @@ - Markdown ampersand escape on links ([#12140](https://github.com/RocketChat/Rocket.Chat/pull/12140) by [@rssilva](https://github.com/rssilva)) -- Message reaction in GraphQL API ([#11967](https://github.com/RocketChat/Rocket.Chat/pull/11967) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Message reaction in GraphQL API ([#11967](https://github.com/RocketChat/Rocket.Chat/pull/11967)) - Not able to set per-channel retention policies if no global policy is set for this channel type ([#11927](https://github.com/RocketChat/Rocket.Chat/pull/11927) by [@vynmera](https://github.com/vynmera)) @@ -16719,7 +24452,7 @@ - LingoHub based on develop ([#11936](https://github.com/RocketChat/Rocket.Chat/pull/11936)) -- Merge master into develop & Set version to 0.70.0-develop ([#11921](https://github.com/RocketChat/Rocket.Chat/pull/11921) by [@Hudell](https://github.com/Hudell) & [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@c0dzilla](https://github.com/c0dzilla) & [@rndmh3ro](https://github.com/rndmh3ro) & [@ubarsaiyan](https://github.com/ubarsaiyan) & [@vynmera](https://github.com/vynmera)) +- Merge master into develop & Set version to 0.70.0-develop ([#11921](https://github.com/RocketChat/Rocket.Chat/pull/11921) by [@Hudell](https://github.com/Hudell) & [@c0dzilla](https://github.com/c0dzilla) & [@rndmh3ro](https://github.com/rndmh3ro) & [@ubarsaiyan](https://github.com/ubarsaiyan) & [@vynmera](https://github.com/vynmera)) - New: Option to change E2E key ([#12169](https://github.com/RocketChat/Rocket.Chat/pull/12169) by [@Hudell](https://github.com/Hudell)) @@ -16733,7 +24466,6 @@ - [@Hudell](https://github.com/Hudell) - [@MIKI785](https://github.com/MIKI785) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@TobiasKappe](https://github.com/TobiasKappe) - [@aferreira44](https://github.com/aferreira44) - [@arch119](https://github.com/arch119) @@ -16757,6 +24489,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@MartinSchoeler](https://github.com/MartinSchoeler) - [@engelgabriel](https://github.com/engelgabriel) - [@geekgonecrazy](https://github.com/geekgonecrazy) @@ -16844,9 +24577,9 @@ - Make font of unread items bolder for better contrast ([#8602](https://github.com/RocketChat/Rocket.Chat/pull/8602) by [@ausminternet](https://github.com/ausminternet)) -- Personal access tokens for users to create API tokens ([#11638](https://github.com/RocketChat/Rocket.Chat/pull/11638) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Personal access tokens for users to create API tokens ([#11638](https://github.com/RocketChat/Rocket.Chat/pull/11638)) -- REST endpoint to manage server assets ([#11697](https://github.com/RocketChat/Rocket.Chat/pull/11697) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST endpoint to manage server assets ([#11697](https://github.com/RocketChat/Rocket.Chat/pull/11697)) - Rich message text and image buttons ([#11473](https://github.com/RocketChat/Rocket.Chat/pull/11473) by [@ubarsaiyan](https://github.com/ubarsaiyan)) @@ -16898,7 +24631,7 @@ - Default server language not being applied ([#11719](https://github.com/RocketChat/Rocket.Chat/pull/11719)) -- Delete removed user's subscriptions ([#10700](https://github.com/RocketChat/Rocket.Chat/pull/10700) by [@Hudell](https://github.com/Hudell) & [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Delete removed user's subscriptions ([#10700](https://github.com/RocketChat/Rocket.Chat/pull/10700) by [@Hudell](https://github.com/Hudell)) - directory search table not clickable lines ([#11809](https://github.com/RocketChat/Rocket.Chat/pull/11809)) @@ -16946,11 +24679,11 @@ - Render Attachment Pretext When Markdown Specified ([#11578](https://github.com/RocketChat/Rocket.Chat/pull/11578) by [@glstewart17](https://github.com/glstewart17)) -- REST `im.members` endpoint not working without sort parameter ([#11821](https://github.com/RocketChat/Rocket.Chat/pull/11821) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST `im.members` endpoint not working without sort parameter ([#11821](https://github.com/RocketChat/Rocket.Chat/pull/11821)) -- REST endpoints to update user not respecting some settings ([#11474](https://github.com/RocketChat/Rocket.Chat/pull/11474) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST endpoints to update user not respecting some settings ([#11474](https://github.com/RocketChat/Rocket.Chat/pull/11474)) -- Results pagination on /directory REST endpoint ([#11551](https://github.com/RocketChat/Rocket.Chat/pull/11551) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Results pagination on /directory REST endpoint ([#11551](https://github.com/RocketChat/Rocket.Chat/pull/11551)) - Return room ID for groups where user joined ([#11703](https://github.com/RocketChat/Rocket.Chat/pull/11703) by [@timkinnane](https://github.com/timkinnane)) @@ -16960,13 +24693,13 @@ - SAML login not working when user has multiple emails ([#11642](https://github.com/RocketChat/Rocket.Chat/pull/11642) by [@Hudell](https://github.com/Hudell)) -- Searching by `undefined` via REST when using `query` param ([#11657](https://github.com/RocketChat/Rocket.Chat/pull/11657) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Searching by `undefined` via REST when using `query` param ([#11657](https://github.com/RocketChat/Rocket.Chat/pull/11657)) - Some assets were pointing to nonexistent path ([#11796](https://github.com/RocketChat/Rocket.Chat/pull/11796)) - Translations were not unique per app allowing conflicts among apps ([#11878](https://github.com/RocketChat/Rocket.Chat/pull/11878)) -- User info APIs not returning customFields correctly ([#11625](https://github.com/RocketChat/Rocket.Chat/pull/11625) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- User info APIs not returning customFields correctly ([#11625](https://github.com/RocketChat/Rocket.Chat/pull/11625)) - wrong create date of channels and users on directory view ([#11682](https://github.com/RocketChat/Rocket.Chat/pull/11682) by [@gsperezb](https://github.com/gsperezb)) @@ -17004,7 +24737,6 @@ - [@Atisom](https://github.com/Atisom) - [@Hudell](https://github.com/Hudell) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@TheReal1604](https://github.com/TheReal1604) - [@ausminternet](https://github.com/ausminternet) - [@c0dzilla](https://github.com/c0dzilla) @@ -17024,6 +24756,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@engelgabriel](https://github.com/engelgabriel) - [@geekgonecrazy](https://github.com/geekgonecrazy) - [@ggazzo](https://github.com/ggazzo) @@ -17092,24 +24825,24 @@ - SAML login not working when user has multiple emails ([#11642](https://github.com/RocketChat/Rocket.Chat/pull/11642) by [@Hudell](https://github.com/Hudell)) -- User info APIs not returning customFields correctly ([#11625](https://github.com/RocketChat/Rocket.Chat/pull/11625) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- User info APIs not returning customFields correctly ([#11625](https://github.com/RocketChat/Rocket.Chat/pull/11625))
🔍 Minor changes -- Release 0.68.3 ([#11650](https://github.com/RocketChat/Rocket.Chat/pull/11650) by [@Hudell](https://github.com/Hudell) & [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@rndmh3ro](https://github.com/rndmh3ro)) +- Release 0.68.3 ([#11650](https://github.com/RocketChat/Rocket.Chat/pull/11650) by [@Hudell](https://github.com/Hudell) & [@rndmh3ro](https://github.com/rndmh3ro))
### 👩‍💻👨‍💻 Contributors 😍 - [@Hudell](https://github.com/Hudell) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@rndmh3ro](https://github.com/rndmh3ro) ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@sampaiodiego](https://github.com/sampaiodiego) # 0.68.2 @@ -17179,18 +24912,18 @@ ### ⚠️ BREAKING CHANGES -- Remove deprecated /user.roles endpoint ([#11493](https://github.com/RocketChat/Rocket.Chat/pull/11493) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Remove deprecated /user.roles endpoint ([#11493](https://github.com/RocketChat/Rocket.Chat/pull/11493)) -- Update GraphQL dependencies ([#11430](https://github.com/RocketChat/Rocket.Chat/pull/11430) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Update GraphQL dependencies ([#11430](https://github.com/RocketChat/Rocket.Chat/pull/11430)) ### 🎉 New features - Accept resumeToken as query param to log in ([#11443](https://github.com/RocketChat/Rocket.Chat/pull/11443)) -- Add /roles.list REST endpoint to retrieve all server roles ([#11500](https://github.com/RocketChat/Rocket.Chat/pull/11500) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add /roles.list REST endpoint to retrieve all server roles ([#11500](https://github.com/RocketChat/Rocket.Chat/pull/11500)) -- Add /users.deleteOwnAccount REST endpoint to an user delete his own account ([#11488](https://github.com/RocketChat/Rocket.Chat/pull/11488) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add /users.deleteOwnAccount REST endpoint to an user delete his own account ([#11488](https://github.com/RocketChat/Rocket.Chat/pull/11488)) - Livechat File Upload ([#10514](https://github.com/RocketChat/Rocket.Chat/pull/10514)) @@ -17224,7 +24957,7 @@ ### 🐛 Bug fixes -- Add customFields property to /me REST endpoint response ([#11496](https://github.com/RocketChat/Rocket.Chat/pull/11496) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add customFields property to /me REST endpoint response ([#11496](https://github.com/RocketChat/Rocket.Chat/pull/11496)) - broadcast channel reply ([#11462](https://github.com/RocketChat/Rocket.Chat/pull/11462)) @@ -17266,7 +24999,7 @@ - Unlimited upload file size not working ([#11471](https://github.com/RocketChat/Rocket.Chat/pull/11471) by [@Hudell](https://github.com/Hudell)) -- Unreads counter for new rooms on /channels.counters REST endpoint ([#11531](https://github.com/RocketChat/Rocket.Chat/pull/11531) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Unreads counter for new rooms on /channels.counters REST endpoint ([#11531](https://github.com/RocketChat/Rocket.Chat/pull/11531)) - Wrap custom fields in user profile to new line ([#10119](https://github.com/RocketChat/Rocket.Chat/pull/10119) by [@PhpXp](https://github.com/PhpXp) & [@karlprieb](https://github.com/karlprieb)) @@ -17301,7 +25034,6 @@ - [@HappyTobi](https://github.com/HappyTobi) - [@Hudell](https://github.com/Hudell) - [@Joe-mcgee](https://github.com/Joe-mcgee) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@PhpXp](https://github.com/PhpXp) - [@arminfelder](https://github.com/arminfelder) - [@arungalva](https://github.com/arungalva) @@ -17314,6 +25046,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@MartinSchoeler](https://github.com/MartinSchoeler) - [@engelgabriel](https://github.com/engelgabriel) - [@geekgonecrazy](https://github.com/geekgonecrazy) @@ -17514,12 +25247,12 @@ ### ⚠️ BREAKING CHANGES -- Always remove the field `services` from user data responses in REST API ([#10799](https://github.com/RocketChat/Rocket.Chat/pull/10799) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Always remove the field `services` from user data responses in REST API ([#10799](https://github.com/RocketChat/Rocket.Chat/pull/10799)) ### 🎉 New features -- Add input to set time for avatar cache control ([#10958](https://github.com/RocketChat/Rocket.Chat/pull/10958) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add input to set time for avatar cache control ([#10958](https://github.com/RocketChat/Rocket.Chat/pull/10958)) - Add prometheus port config ([#11115](https://github.com/RocketChat/Rocket.Chat/pull/11115) by [@brylie](https://github.com/brylie) & [@stuartpb](https://github.com/stuartpb) & [@thaiphv](https://github.com/thaiphv)) @@ -17581,9 +25314,9 @@ - "blank" screen on iOS < 11 ([#11199](https://github.com/RocketChat/Rocket.Chat/pull/11199)) -- /groups.invite not allow a user to invite even with permission ([#11010](https://github.com/RocketChat/Rocket.Chat/pull/11010) by [@Hudell](https://github.com/Hudell) & [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- /groups.invite not allow a user to invite even with permission ([#11010](https://github.com/RocketChat/Rocket.Chat/pull/11010) by [@Hudell](https://github.com/Hudell)) -- Add parameter to REST chat.react endpoint, to make it work like a setter ([#10447](https://github.com/RocketChat/Rocket.Chat/pull/10447) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add parameter to REST chat.react endpoint, to make it work like a setter ([#10447](https://github.com/RocketChat/Rocket.Chat/pull/10447)) - Allow inviting livechat managers to the same LiveChat room ([#10956](https://github.com/RocketChat/Rocket.Chat/pull/10956)) @@ -17661,9 +25394,9 @@ - Rendering of emails and mentions in messages ([#11165](https://github.com/RocketChat/Rocket.Chat/pull/11165)) -- REST API: Add more test cases for `/login` ([#10999](https://github.com/RocketChat/Rocket.Chat/pull/10999) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST API: Add more test cases for `/login` ([#10999](https://github.com/RocketChat/Rocket.Chat/pull/10999)) -- REST endpoint `users.updateOwnBasicInfo` was not returning errors for invalid names and trying to save custom fields when empty ([#11204](https://github.com/RocketChat/Rocket.Chat/pull/11204) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST endpoint `users.updateOwnBasicInfo` was not returning errors for invalid names and trying to save custom fields when empty ([#11204](https://github.com/RocketChat/Rocket.Chat/pull/11204)) - Room creation error due absence of subscriptions ([#11178](https://github.com/RocketChat/Rocket.Chat/pull/11178)) @@ -17677,7 +25410,7 @@ - The process was freezing in some cases when HTTP calls exceeds timeout on integrations ([#11253](https://github.com/RocketChat/Rocket.Chat/pull/11253)) -- title and value attachments are optionals on sendMessage method ([#11021](https://github.com/RocketChat/Rocket.Chat/pull/11021) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- title and value attachments are optionals on sendMessage method ([#11021](https://github.com/RocketChat/Rocket.Chat/pull/11021)) - Update capnproto dependence for Sandstorm Build ([#11263](https://github.com/RocketChat/Rocket.Chat/pull/11263) by [@peterlee0127](https://github.com/peterlee0127)) @@ -17703,7 +25436,7 @@ - Add Dockerfile with MongoDB ([#10971](https://github.com/RocketChat/Rocket.Chat/pull/10971)) -- Add verification to make sure the user exists in REST insert object helper ([#11008](https://github.com/RocketChat/Rocket.Chat/pull/11008) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add verification to make sure the user exists in REST insert object helper ([#11008](https://github.com/RocketChat/Rocket.Chat/pull/11008)) - Build Docker image on CI ([#11076](https://github.com/RocketChat/Rocket.Chat/pull/11076)) @@ -17799,7 +25532,6 @@ - [@Hudell](https://github.com/Hudell) - [@JoseRenan](https://github.com/JoseRenan) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@brylie](https://github.com/brylie) - [@c0dzilla](https://github.com/c0dzilla) - [@cardoso](https://github.com/cardoso) @@ -17836,6 +25568,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@alansikora](https://github.com/alansikora) - [@engelgabriel](https://github.com/engelgabriel) - [@geekgonecrazy](https://github.com/geekgonecrazy) @@ -17916,13 +25649,13 @@ - Add permission `view-broadcast-member-list` ([#10753](https://github.com/RocketChat/Rocket.Chat/pull/10753) by [@cardoso](https://github.com/cardoso)) -- Add REST API endpoint `users.getUsernameSuggestion` to get username suggestion ([#10702](https://github.com/RocketChat/Rocket.Chat/pull/10702) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add REST API endpoint `users.getUsernameSuggestion` to get username suggestion ([#10702](https://github.com/RocketChat/Rocket.Chat/pull/10702)) -- Add REST API endpoints `channels.counters`, `groups.counters and `im.counters` ([#9679](https://github.com/RocketChat/Rocket.Chat/pull/9679) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@xbolshe](https://github.com/xbolshe)) +- Add REST API endpoints `channels.counters`, `groups.counters and `im.counters` ([#9679](https://github.com/RocketChat/Rocket.Chat/pull/9679) by [@xbolshe](https://github.com/xbolshe)) - Add REST API endpoints `channels.setCustomFields` and `groups.setCustomFields` ([#9733](https://github.com/RocketChat/Rocket.Chat/pull/9733) by [@xbolshe](https://github.com/xbolshe)) -- Add REST endpoint `subscriptions.unread` to mark messages as unread ([#10778](https://github.com/RocketChat/Rocket.Chat/pull/10778) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add REST endpoint `subscriptions.unread` to mark messages as unread ([#10778](https://github.com/RocketChat/Rocket.Chat/pull/10778)) - Add REST endpoints `channels.roles` & `groups.roles` ([#10607](https://github.com/RocketChat/Rocket.Chat/pull/10607) by [@cardoso](https://github.com/cardoso) & [@rafaelks](https://github.com/rafaelks)) @@ -17932,15 +25665,15 @@ - Lazy load image attachments ([#10608](https://github.com/RocketChat/Rocket.Chat/pull/10608) by [@karlprieb](https://github.com/karlprieb)) -- Now is possible to access files using header authorization (`x-user-id` and `x-auth-token`) ([#10741](https://github.com/RocketChat/Rocket.Chat/pull/10741) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Now is possible to access files using header authorization (`x-user-id` and `x-auth-token`) ([#10741](https://github.com/RocketChat/Rocket.Chat/pull/10741)) - Options to enable/disable each Livechat registration form field ([#10584](https://github.com/RocketChat/Rocket.Chat/pull/10584)) -- REST API endpoint `/me` now returns all the settings, including the default values ([#10662](https://github.com/RocketChat/Rocket.Chat/pull/10662) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST API endpoint `/me` now returns all the settings, including the default values ([#10662](https://github.com/RocketChat/Rocket.Chat/pull/10662)) -- REST API endpoint `settings` now allow set colors and trigger actions ([#10488](https://github.com/RocketChat/Rocket.Chat/pull/10488) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@ThomasRoehl](https://github.com/ThomasRoehl)) +- REST API endpoint `settings` now allow set colors and trigger actions ([#10488](https://github.com/RocketChat/Rocket.Chat/pull/10488) by [@ThomasRoehl](https://github.com/ThomasRoehl)) -- Return the result of the `/me` endpoint within the result of the `/login` endpoint ([#10677](https://github.com/RocketChat/Rocket.Chat/pull/10677) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Return the result of the `/me` endpoint within the result of the `/login` endpoint ([#10677](https://github.com/RocketChat/Rocket.Chat/pull/10677)) - Setup Wizard ([#10523](https://github.com/RocketChat/Rocket.Chat/pull/10523) by [@karlprieb](https://github.com/karlprieb)) @@ -17953,7 +25686,7 @@ - Cancel button wasn't working while uploading file ([#10715](https://github.com/RocketChat/Rocket.Chat/pull/10715) by [@Mr-Gryphon](https://github.com/Mr-Gryphon) & [@karlprieb](https://github.com/karlprieb)) -- Channel owner was being set as muted when creating a read-only channel ([#10665](https://github.com/RocketChat/Rocket.Chat/pull/10665) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Channel owner was being set as muted when creating a read-only channel ([#10665](https://github.com/RocketChat/Rocket.Chat/pull/10665)) - Enabling `Collapse Embedded Media by Default` was hiding replies and quotes ([#10427](https://github.com/RocketChat/Rocket.Chat/pull/10427) by [@c0dzilla](https://github.com/c0dzilla)) @@ -17975,7 +25708,7 @@ - Missing option to disable/enable System Messages ([#10704](https://github.com/RocketChat/Rocket.Chat/pull/10704)) -- Missing pagination fields in the response of REST /directory endpoint ([#10840](https://github.com/RocketChat/Rocket.Chat/pull/10840) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Missing pagination fields in the response of REST /directory endpoint ([#10840](https://github.com/RocketChat/Rocket.Chat/pull/10840)) - Not escaping special chars on mentions ([#10793](https://github.com/RocketChat/Rocket.Chat/pull/10793) by [@erhan-](https://github.com/erhan-)) @@ -17987,7 +25720,7 @@ - SAML wasn't working correctly when running multiple instances ([#10681](https://github.com/RocketChat/Rocket.Chat/pull/10681) by [@Hudell](https://github.com/Hudell)) -- Send a message when muted returns inconsistent result in chat.sendMessage ([#10720](https://github.com/RocketChat/Rocket.Chat/pull/10720) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Send a message when muted returns inconsistent result in chat.sendMessage ([#10720](https://github.com/RocketChat/Rocket.Chat/pull/10720)) - Slack-Bridge bug when migrating to 0.64.1 ([#10875](https://github.com/RocketChat/Rocket.Chat/pull/10875)) @@ -18021,7 +25754,7 @@ - Fix: Manage apps layout was a bit confuse ([#10882](https://github.com/RocketChat/Rocket.Chat/pull/10882) by [@gdelavald](https://github.com/gdelavald)) -- Fix: Regression in REST API endpoint `/me` ([#10833](https://github.com/RocketChat/Rocket.Chat/pull/10833) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix: Regression in REST API endpoint `/me` ([#10833](https://github.com/RocketChat/Rocket.Chat/pull/10833)) - Fix: Regression Lazyload fix shuffle avatars ([#10887](https://github.com/RocketChat/Rocket.Chat/pull/10887)) @@ -18057,7 +25790,7 @@ - Regression: Make settings `Site_Name` and `Language` public again ([#10848](https://github.com/RocketChat/Rocket.Chat/pull/10848)) -- Release 0.65.0 ([#10893](https://github.com/RocketChat/Rocket.Chat/pull/10893) by [@Hudell](https://github.com/Hudell) & [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@Sameesunkaria](https://github.com/Sameesunkaria) & [@cardoso](https://github.com/cardoso) & [@erhan-](https://github.com/erhan-) & [@gdelavald](https://github.com/gdelavald) & [@karlprieb](https://github.com/karlprieb) & [@peccu](https://github.com/peccu) & [@winterstefan](https://github.com/winterstefan)) +- Release 0.65.0 ([#10893](https://github.com/RocketChat/Rocket.Chat/pull/10893) by [@Hudell](https://github.com/Hudell) & [@Sameesunkaria](https://github.com/Sameesunkaria) & [@cardoso](https://github.com/cardoso) & [@erhan-](https://github.com/erhan-) & [@gdelavald](https://github.com/gdelavald) & [@karlprieb](https://github.com/karlprieb) & [@peccu](https://github.com/peccu) & [@winterstefan](https://github.com/winterstefan)) - Wizard improvements ([#10776](https://github.com/RocketChat/Rocket.Chat/pull/10776)) @@ -18066,7 +25799,6 @@ ### 👩‍💻👨‍💻 Contributors 😍 - [@Hudell](https://github.com/Hudell) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@Mr-Gryphon](https://github.com/Mr-Gryphon) - [@Sameesunkaria](https://github.com/Sameesunkaria) - [@ThomasRoehl](https://github.com/ThomasRoehl) @@ -18086,6 +25818,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@engelgabriel](https://github.com/engelgabriel) - [@geekgonecrazy](https://github.com/geekgonecrazy) - [@ggazzo](https://github.com/ggazzo) @@ -18105,14 +25838,13 @@ 🔍 Minor changes -- Release 0.64.2 ([#10812](https://github.com/RocketChat/Rocket.Chat/pull/10812) by [@Hudell](https://github.com/Hudell) & [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@Sameesunkaria](https://github.com/Sameesunkaria) & [@cardoso](https://github.com/cardoso) & [@erhan-](https://github.com/erhan-) & [@gdelavald](https://github.com/gdelavald) & [@karlprieb](https://github.com/karlprieb) & [@peccu](https://github.com/peccu) & [@winterstefan](https://github.com/winterstefan)) +- Release 0.64.2 ([#10812](https://github.com/RocketChat/Rocket.Chat/pull/10812) by [@Hudell](https://github.com/Hudell) & [@Sameesunkaria](https://github.com/Sameesunkaria) & [@cardoso](https://github.com/cardoso) & [@erhan-](https://github.com/erhan-) & [@gdelavald](https://github.com/gdelavald) & [@karlprieb](https://github.com/karlprieb) & [@peccu](https://github.com/peccu) & [@winterstefan](https://github.com/winterstefan))
### 👩‍💻👨‍💻 Contributors 😍 - [@Hudell](https://github.com/Hudell) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@Sameesunkaria](https://github.com/Sameesunkaria) - [@cardoso](https://github.com/cardoso) - [@erhan-](https://github.com/erhan-) @@ -18123,6 +25855,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@engelgabriel](https://github.com/engelgabriel) - [@rodrigok](https://github.com/rodrigok) - [@sampaiodiego](https://github.com/sampaiodiego) @@ -18183,7 +25916,7 @@ - The property "settings" is no longer available to regular users via rest api ([#10411](https://github.com/RocketChat/Rocket.Chat/pull/10411)) -- Validate incoming message schema ([#9922](https://github.com/RocketChat/Rocket.Chat/pull/9922) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Validate incoming message schema ([#9922](https://github.com/RocketChat/Rocket.Chat/pull/9922)) ### 🎉 New features @@ -18210,13 +25943,13 @@ - Prevent the browser to autocomplete some setting fields ([#10439](https://github.com/RocketChat/Rocket.Chat/pull/10439) by [@gdelavald](https://github.com/gdelavald)) -- REST API endpoint `/directory` ([#10442](https://github.com/RocketChat/Rocket.Chat/pull/10442) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST API endpoint `/directory` ([#10442](https://github.com/RocketChat/Rocket.Chat/pull/10442)) -- REST API endpoint `rooms.favorite` to favorite and unfavorite rooms ([#10342](https://github.com/RocketChat/Rocket.Chat/pull/10342) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST API endpoint `rooms.favorite` to favorite and unfavorite rooms ([#10342](https://github.com/RocketChat/Rocket.Chat/pull/10342)) -- REST endpoint to recover forgotten password ([#10371](https://github.com/RocketChat/Rocket.Chat/pull/10371) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST endpoint to recover forgotten password ([#10371](https://github.com/RocketChat/Rocket.Chat/pull/10371)) -- REST endpoint to report messages ([#10354](https://github.com/RocketChat/Rocket.Chat/pull/10354) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST endpoint to report messages ([#10354](https://github.com/RocketChat/Rocket.Chat/pull/10354)) - Search Provider Framework ([#10110](https://github.com/RocketChat/Rocket.Chat/pull/10110) by [@tkurz](https://github.com/tkurz)) @@ -18231,7 +25964,7 @@ - "Idle Time Limit" using milliseconds instead of seconds ([#9824](https://github.com/RocketChat/Rocket.Chat/pull/9824) by [@kaiiiiiiiii](https://github.com/kaiiiiiiiii)) -- Add user object to responses in /*.files Rest endpoints ([#10480](https://github.com/RocketChat/Rocket.Chat/pull/10480) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add user object to responses in /*.files Rest endpoints ([#10480](https://github.com/RocketChat/Rocket.Chat/pull/10480)) - Autocomplete list when inviting a user was partial hidden ([#10409](https://github.com/RocketChat/Rocket.Chat/pull/10409) by [@karlprieb](https://github.com/karlprieb)) @@ -18285,13 +26018,13 @@ - Remove a user from the user's list when creating a new channel removes the wrong user ([#10423](https://github.com/RocketChat/Rocket.Chat/pull/10423) by [@gdelavald](https://github.com/gdelavald) & [@karlprieb](https://github.com/karlprieb)) -- Rename method to clean history of messages ([#10498](https://github.com/RocketChat/Rocket.Chat/pull/10498) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Rename method to clean history of messages ([#10498](https://github.com/RocketChat/Rocket.Chat/pull/10498)) - Renaming agent's username within Livechat's department ([#10344](https://github.com/RocketChat/Rocket.Chat/pull/10344)) -- REST API OAuth services endpoint were missing fields and flag to indicate custom services ([#10299](https://github.com/RocketChat/Rocket.Chat/pull/10299) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST API OAuth services endpoint were missing fields and flag to indicate custom services ([#10299](https://github.com/RocketChat/Rocket.Chat/pull/10299)) -- REST spotlight API wasn't allowing searches with # and @ ([#10410](https://github.com/RocketChat/Rocket.Chat/pull/10410) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST spotlight API wasn't allowing searches with # and @ ([#10410](https://github.com/RocketChat/Rocket.Chat/pull/10410)) - Room's name was cutting instead of having ellipses on sidebar ([#10430](https://github.com/RocketChat/Rocket.Chat/pull/10430)) @@ -18337,7 +26070,7 @@ - Fix and improve vietnamese translation ([#10397](https://github.com/RocketChat/Rocket.Chat/pull/10397) by [@TDiNguyen](https://github.com/TDiNguyen) & [@tttt-conan](https://github.com/tttt-conan)) -- Fix: Remove "secret" from REST endpoint /settings.oauth response ([#10513](https://github.com/RocketChat/Rocket.Chat/pull/10513) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix: Remove "secret" from REST endpoint /settings.oauth response ([#10513](https://github.com/RocketChat/Rocket.Chat/pull/10513)) - Included missing lib for migrations ([#10532](https://github.com/RocketChat/Rocket.Chat/pull/10532) by [@Hudell](https://github.com/Hudell)) @@ -18357,7 +26090,7 @@ - Regression: Fix announcement bar being displayed without content ([#10554](https://github.com/RocketChat/Rocket.Chat/pull/10554) by [@gdelavald](https://github.com/gdelavald)) -- Regression: Inconsistent response of settings.oauth endpoint ([#10553](https://github.com/RocketChat/Rocket.Chat/pull/10553) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Regression: Inconsistent response of settings.oauth endpoint ([#10553](https://github.com/RocketChat/Rocket.Chat/pull/10553)) - Regression: Remove added mentions on quote/reply ([#10571](https://github.com/RocketChat/Rocket.Chat/pull/10571) by [@gdelavald](https://github.com/gdelavald)) @@ -18386,7 +26119,6 @@ ### 👩‍💻👨‍💻 Contributors 😍 - [@Hudell](https://github.com/Hudell) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@Prakharsvnit](https://github.com/Prakharsvnit) - [@TDiNguyen](https://github.com/TDiNguyen) - [@TwizzyDizzy](https://github.com/TwizzyDizzy) @@ -18411,6 +26143,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@engelgabriel](https://github.com/engelgabriel) - [@geekgonecrazy](https://github.com/geekgonecrazy) - [@ggazzo](https://github.com/ggazzo) @@ -18509,21 +26242,21 @@ - Add leave public channel & leave private channel permissions ([#9584](https://github.com/RocketChat/Rocket.Chat/pull/9584) by [@kb0304](https://github.com/kb0304)) -- Add option to login via REST using Facebook and Twitter tokens ([#9816](https://github.com/RocketChat/Rocket.Chat/pull/9816) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add option to login via REST using Facebook and Twitter tokens ([#9816](https://github.com/RocketChat/Rocket.Chat/pull/9816)) -- Add REST endpoint to get the list of custom emojis ([#9629](https://github.com/RocketChat/Rocket.Chat/pull/9629) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Add REST endpoint to get the list of custom emojis ([#9629](https://github.com/RocketChat/Rocket.Chat/pull/9629)) -- Added endpoint to get the list of available oauth services ([#10144](https://github.com/RocketChat/Rocket.Chat/pull/10144) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Added endpoint to get the list of available oauth services ([#10144](https://github.com/RocketChat/Rocket.Chat/pull/10144)) -- Added endpoint to retrieve mentions of a channel ([#10105](https://github.com/RocketChat/Rocket.Chat/pull/10105) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Added endpoint to retrieve mentions of a channel ([#10105](https://github.com/RocketChat/Rocket.Chat/pull/10105)) -- Added GET/POST channels.notifications ([#10128](https://github.com/RocketChat/Rocket.Chat/pull/10128) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Added GET/POST channels.notifications ([#10128](https://github.com/RocketChat/Rocket.Chat/pull/10128)) - Announcement bar color wasn't using color from theming variables ([#9367](https://github.com/RocketChat/Rocket.Chat/pull/9367) by [@cyclops24](https://github.com/cyclops24) & [@karlprieb](https://github.com/karlprieb)) - Audio recording as mp3 and better ui for recording ([#9726](https://github.com/RocketChat/Rocket.Chat/pull/9726) by [@kb0304](https://github.com/kb0304)) -- Endpoint to retrieve message read receipts ([#9907](https://github.com/RocketChat/Rocket.Chat/pull/9907) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Endpoint to retrieve message read receipts ([#9907](https://github.com/RocketChat/Rocket.Chat/pull/9907)) - GDPR Right to be forgotten/erased ([#9947](https://github.com/RocketChat/Rocket.Chat/pull/9947) by [@Hudell](https://github.com/Hudell)) @@ -18548,9 +26281,9 @@ - "View All Members" button inside channel's "User Info" is over sized ([#10012](https://github.com/RocketChat/Rocket.Chat/pull/10012) by [@karlprieb](https://github.com/karlprieb)) -- /me REST endpoint was missing user roles and preferences ([#10240](https://github.com/RocketChat/Rocket.Chat/pull/10240) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- /me REST endpoint was missing user roles and preferences ([#10240](https://github.com/RocketChat/Rocket.Chat/pull/10240)) -- Able to react with invalid emoji ([#8667](https://github.com/RocketChat/Rocket.Chat/pull/8667) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@mutdmour](https://github.com/mutdmour)) +- Able to react with invalid emoji ([#8667](https://github.com/RocketChat/Rocket.Chat/pull/8667) by [@mutdmour](https://github.com/mutdmour)) - Apostrophe-containing URL misparsed ([#9739](https://github.com/RocketChat/Rocket.Chat/pull/9739) by [@lunaticmonk](https://github.com/lunaticmonk)) @@ -18598,7 +26331,7 @@ - Reactions not working on mobile ([#10104](https://github.com/RocketChat/Rocket.Chat/pull/10104)) -- REST API: Can't list all public channels when user has permission `view-joined-room` ([#10009](https://github.com/RocketChat/Rocket.Chat/pull/10009) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST API: Can't list all public channels when user has permission `view-joined-room` ([#10009](https://github.com/RocketChat/Rocket.Chat/pull/10009)) - Slack Import reports `invalid import file type` due to a call to BSON.native() which is now doesn't exist ([#10071](https://github.com/RocketChat/Rocket.Chat/pull/10071) by [@trongthanh](https://github.com/trongthanh)) @@ -18612,9 +26345,9 @@ - user status on sidenav ([#10222](https://github.com/RocketChat/Rocket.Chat/pull/10222)) -- Verified property of user is always set to false if not supplied ([#9719](https://github.com/RocketChat/Rocket.Chat/pull/9719) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Verified property of user is always set to false if not supplied ([#9719](https://github.com/RocketChat/Rocket.Chat/pull/9719)) -- Wrong pagination information on /api/v1/channels.members ([#10224](https://github.com/RocketChat/Rocket.Chat/pull/10224) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Wrong pagination information on /api/v1/channels.members ([#10224](https://github.com/RocketChat/Rocket.Chat/pull/10224)) - Wrong switch button border color ([#10081](https://github.com/RocketChat/Rocket.Chat/pull/10081) by [@kb0304](https://github.com/kb0304)) @@ -18624,7 +26357,7 @@ - [OTHER] Reactivate all tests ([#10036](https://github.com/RocketChat/Rocket.Chat/pull/10036)) -- [OTHER] Reactivate API tests ([#9844](https://github.com/RocketChat/Rocket.Chat/pull/9844) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@karlprieb](https://github.com/karlprieb)) +- [OTHER] Reactivate API tests ([#9844](https://github.com/RocketChat/Rocket.Chat/pull/9844) by [@karlprieb](https://github.com/karlprieb)) - Add a few listener supports for the Rocket.Chat Apps ([#10154](https://github.com/RocketChat/Rocket.Chat/pull/10154)) @@ -18648,13 +26381,13 @@ - Fix: Reaction endpoint/api only working with regular emojis ([#10323](https://github.com/RocketChat/Rocket.Chat/pull/10323)) -- Fix: Renaming channels.notifications Get/Post endpoints ([#10257](https://github.com/RocketChat/Rocket.Chat/pull/10257) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Fix: Renaming channels.notifications Get/Post endpoints ([#10257](https://github.com/RocketChat/Rocket.Chat/pull/10257)) - Fix: Scroll on content page ([#10300](https://github.com/RocketChat/Rocket.Chat/pull/10300)) - LingoHub based on develop ([#10243](https://github.com/RocketChat/Rocket.Chat/pull/10243)) -- Release 0.63.0 ([#10324](https://github.com/RocketChat/Rocket.Chat/pull/10324) by [@Hudell](https://github.com/Hudell) & [@Joe-mcgee](https://github.com/Joe-mcgee) & [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@TopHattedCat](https://github.com/TopHattedCat) & [@hmagarotto](https://github.com/hmagarotto) & [@kaiiiiiiiii](https://github.com/kaiiiiiiiii) & [@karlprieb](https://github.com/karlprieb) & [@kb0304](https://github.com/kb0304) & [@lunaticmonk](https://github.com/lunaticmonk) & [@ramrami](https://github.com/ramrami)) +- Release 0.63.0 ([#10324](https://github.com/RocketChat/Rocket.Chat/pull/10324) by [@Hudell](https://github.com/Hudell) & [@Joe-mcgee](https://github.com/Joe-mcgee) & [@TopHattedCat](https://github.com/TopHattedCat) & [@hmagarotto](https://github.com/hmagarotto) & [@kaiiiiiiiii](https://github.com/kaiiiiiiiii) & [@karlprieb](https://github.com/karlprieb) & [@kb0304](https://github.com/kb0304) & [@lunaticmonk](https://github.com/lunaticmonk) & [@ramrami](https://github.com/ramrami)) - Rename migration name on 108 to match file name ([#10237](https://github.com/RocketChat/Rocket.Chat/pull/10237)) @@ -18668,7 +26401,6 @@ - [@Hudell](https://github.com/Hudell) - [@Joe-mcgee](https://github.com/Joe-mcgee) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@SeanPackham](https://github.com/SeanPackham) - [@TopHattedCat](https://github.com/TopHattedCat) - [@bernardoetrevisan](https://github.com/bernardoetrevisan) @@ -18687,6 +26419,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@engelgabriel](https://github.com/engelgabriel) - [@geekgonecrazy](https://github.com/geekgonecrazy) - [@ggazzo](https://github.com/ggazzo) @@ -18709,13 +26442,13 @@ - Message editing is crashing the server when read receipts are enabled ([#10061](https://github.com/RocketChat/Rocket.Chat/pull/10061)) -- REST API: Can't list all public channels when user has permission `view-joined-room` ([#10009](https://github.com/RocketChat/Rocket.Chat/pull/10009) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- REST API: Can't list all public channels when user has permission `view-joined-room` ([#10009](https://github.com/RocketChat/Rocket.Chat/pull/10009)) - Slack Import reports `invalid import file type` due to a call to BSON.native() which is now doesn't exist ([#10071](https://github.com/RocketChat/Rocket.Chat/pull/10071) by [@trongthanh](https://github.com/trongthanh)) - Update preferences of users with settings: null was crashing the server ([#10076](https://github.com/RocketChat/Rocket.Chat/pull/10076)) -- Verified property of user is always set to false if not supplied ([#9719](https://github.com/RocketChat/Rocket.Chat/pull/9719) by [@MarcosSpessatto](https://github.com/MarcosSpessatto)) +- Verified property of user is always set to false if not supplied ([#9719](https://github.com/RocketChat/Rocket.Chat/pull/9719))
🔍 Minor changes @@ -18727,11 +26460,11 @@ ### 👩‍💻👨‍💻 Contributors 😍 -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@trongthanh](https://github.com/trongthanh) ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@rodrigok](https://github.com/rodrigok) - [@sampaiodiego](https://github.com/sampaiodiego) @@ -18790,7 +26523,7 @@ - Add route to get user shield/badge ([#9549](https://github.com/RocketChat/Rocket.Chat/pull/9549) by [@kb0304](https://github.com/kb0304)) -- Add user settings / preferences API endpoint ([#9457](https://github.com/RocketChat/Rocket.Chat/pull/9457) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@jgtoriginal](https://github.com/jgtoriginal)) +- Add user settings / preferences API endpoint ([#9457](https://github.com/RocketChat/Rocket.Chat/pull/9457) by [@jgtoriginal](https://github.com/jgtoriginal)) - Alert admins when user requires approval & alert users when the account is approved/activated/deactivated ([#7098](https://github.com/RocketChat/Rocket.Chat/pull/7098) by [@luisfn](https://github.com/luisfn)) @@ -18800,7 +26533,7 @@ - Allow sounds when conversation is focused ([#9312](https://github.com/RocketChat/Rocket.Chat/pull/9312) by [@RationalCoding](https://github.com/RationalCoding)) -- API to fetch permissions & user roles ([#9519](https://github.com/RocketChat/Rocket.Chat/pull/9519) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@rafaelks](https://github.com/rafaelks)) +- API to fetch permissions & user roles ([#9519](https://github.com/RocketChat/Rocket.Chat/pull/9519) by [@rafaelks](https://github.com/rafaelks)) - Browse more channels / Directory ([#9642](https://github.com/RocketChat/Rocket.Chat/pull/9642) by [@karlprieb](https://github.com/karlprieb)) @@ -18830,7 +26563,7 @@ - Request mongoDB version in github issue template ([#9807](https://github.com/RocketChat/Rocket.Chat/pull/9807) by [@TwizzyDizzy](https://github.com/TwizzyDizzy)) -- REST API to use Spotlight ([#9509](https://github.com/RocketChat/Rocket.Chat/pull/9509) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@rafaelks](https://github.com/rafaelks)) +- REST API to use Spotlight ([#9509](https://github.com/RocketChat/Rocket.Chat/pull/9509) by [@rafaelks](https://github.com/rafaelks)) - Version update check ([#9793](https://github.com/RocketChat/Rocket.Chat/pull/9793)) @@ -18841,7 +26574,7 @@ - API to retrive rooms was returning empty objects ([#9737](https://github.com/RocketChat/Rocket.Chat/pull/9737)) -- Chat Message Reactions REST API End Point ([#9487](https://github.com/RocketChat/Rocket.Chat/pull/9487) by [@MarcosSpessatto](https://github.com/MarcosSpessatto) & [@jgtoriginal](https://github.com/jgtoriginal)) +- Chat Message Reactions REST API End Point ([#9487](https://github.com/RocketChat/Rocket.Chat/pull/9487) by [@jgtoriginal](https://github.com/jgtoriginal)) - Chrome 64 breaks jitsi-meet iframe ([#9560](https://github.com/RocketChat/Rocket.Chat/pull/9560) by [@speedy01](https://github.com/speedy01)) @@ -18964,7 +26697,6 @@ - [@AmShaegar13](https://github.com/AmShaegar13) - [@HammyHavoc](https://github.com/HammyHavoc) - [@JSzaszvari](https://github.com/JSzaszvari) -- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@RationalCoding](https://github.com/RationalCoding) - [@SeanPackham](https://github.com/SeanPackham) - [@TwizzyDizzy](https://github.com/TwizzyDizzy) @@ -18995,6 +26727,7 @@ ### 👩‍💻👨‍💻 Core Team 🤓 +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@MartinSchoeler](https://github.com/MartinSchoeler) - [@engelgabriel](https://github.com/engelgabriel) - [@geekgonecrazy](https://github.com/geekgonecrazy) diff --git a/KNOWN_ISSUES.md b/KNOWN_ISSUES.md deleted file mode 100644 index 9ab0a11c366a..000000000000 --- a/KNOWN_ISSUES.md +++ /dev/null @@ -1,6 +0,0 @@ -## `registerFieldTemplate` is deprecated - hmm it's true :(, we don't encourage this type of customization anymore, it ends up opening some security holes, we prefer the use of UIKit. If you feel any difficulty let us know -## `attachment.actions` is deprecated - same reason above -## `attachment PDF preview` is no longer being rendered - it is temporarily disabled, nowadays is huge effort render the previews and requires the download of the entire file on the client. We are working to improve this :) \ No newline at end of file diff --git a/LICENSE b/LICENSE index 8f4fae1730bd..8cce70381c66 100644 --- a/LICENSE +++ b/LICENSE @@ -2,8 +2,9 @@ Copyright (c) 2015-2022 Rocket.Chat Technologies Corp. Portions of this software are licensed as follows: -* All content that resides under the "ee/" directory of this repository, if - that directory exists, is licensed under the license defined in "ee/LICENSE". +* All content that resides under the "apps/meteor/ee/" and "ee/" directories + of this repository, if that directory exists, is licensed under the license + defined in "apps/meteor/ee/LICENSE". * All third-party components incorporated into the Rocket.Chat Software are licensed under the original license provided by the owner of the applicable component. diff --git a/README.md b/README.md index 8c4efc78514f..5daa293c8abf 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Please refer to [Install Rocket.Chat](https://rocket.chat/install) to install yo Join thousands of members worldwide in our [community server](https://open.rocket.chat). Join [#Support](https://open.rocket.chat/channel/support) for help from our community with general Rocket.Chat questions. Join [#Dev](https://open.rocket.chat/channel/dev) for needing help from the community to develop new features. -Talk with Rocket.Chat's leadership at the [Community Open Call](https://www.youtube.com/watch?v=RdbqOdUb3Wk), held monthly. Join us for [the next Community Open Call](https://app.livestorm.co/rocket-chat/community-open-call?type=detailed). +Talk with Rocket.Chat's leadership at the [Community Open Call](https://www.youtube.com/playlist?list=PLee3gqXJQrFVaxryc0OKTKc92yqQX9U-5), held monthly. Join us for [the next Community Open Call](https://app.livestorm.co/rocket-chat/community-open-call?type=detailed). ## Contributions @@ -53,7 +53,7 @@ In addition to the web interface, you can also download Rocket.Chat clients for: [![Rocket.Chat on Apple App Store](https://user-images.githubusercontent.com/551004/29770691-a2082ff4-8bc6-11e7-89a6-964cd405ea8e.png)](https://itunes.apple.com/us/app/rocket-chat/id1148741252?mt=8) [![Rocket.Chat on Google Play](https://user-images.githubusercontent.com/551004/29770692-a20975c6-8bc6-11e7-8ab0-1cde275496e0.png)](https://play.google.com/store/apps/details?id=chat.rocket.android) [![](https://user-images.githubusercontent.com/551004/48210349-50649480-e35e-11e8-97d9-74a4331faf3a.png)](https://f-droid.org/en/packages/chat.rocket.android) ## Learn More -* [API](https://developer.rocket.chat) +* [API](https://developer.rocket.chat/reference/api) * [See who's using Rocket.Chat](https://rocket.chat/customer-stories) ## Become a Rocketeer @@ -68,6 +68,6 @@ We're hiring developers, support people, and product managers all the time. Plea * [Youtube](https://www.youtube.com/channel/UCin9nv7mUjoqrRiwrzS5UVQ) * [Email Newsletter](https://rocket.chat/newsletter) -Any other questions, reach out to us at [contact@rocket.chat](contact@rocket.chat). We’d happy to help! +Any other questions, reach out to us at [our website](https://rocket.chat/contact) or you can email us directly at [contact@rocket.chat](mailto:contact@rocket.chat). We’d be happy to help! diff --git a/_templates/generator/help/index.ejs.t b/_templates/generator/help/index.ejs.t new file mode 100644 index 000000000000..90a29aff2d87 --- /dev/null +++ b/_templates/generator/help/index.ejs.t @@ -0,0 +1,5 @@ +--- +message: | + hygen {bold generator new} --name [NAME] --action [ACTION] + hygen {bold generator with-prompt} --name [NAME] --action [ACTION] +--- \ No newline at end of file diff --git a/_templates/generator/new/hello.ejs.t b/_templates/generator/new/hello.ejs.t new file mode 100644 index 000000000000..5680d963905d --- /dev/null +++ b/_templates/generator/new/hello.ejs.t @@ -0,0 +1,18 @@ +--- +to: _templates/<%= name %>/<%= action || 'new' %>/hello.ejs.t +--- +--- +to: app/hello.js +--- +const hello = ``` +Hello! +This is your first hygen template. + +Learn what it can do here: + +https://github.com/jondot/hygen +``` + +console.log(hello) + + diff --git a/_templates/generator/with-prompt/hello.ejs.t b/_templates/generator/with-prompt/hello.ejs.t new file mode 100644 index 000000000000..ba6abc562d09 --- /dev/null +++ b/_templates/generator/with-prompt/hello.ejs.t @@ -0,0 +1,18 @@ +--- +to: _templates/<%= name %>/<%= action || 'new' %>/hello.ejs.t +--- +--- +to: app/hello.js +--- +const hello = ``` +Hello! +This is your first prompt based hygen template. + +Learn what it can do here: + +https://github.com/jondot/hygen +``` + +console.log(hello) + + diff --git a/_templates/generator/with-prompt/prompt.ejs.t b/_templates/generator/with-prompt/prompt.ejs.t new file mode 100644 index 000000000000..76ea532a6c56 --- /dev/null +++ b/_templates/generator/with-prompt/prompt.ejs.t @@ -0,0 +1,14 @@ +--- +to: _templates/<%= name %>/<%= action || 'new' %>/prompt.js +--- + +// see types of prompts: +// https://github.com/enquirer/enquirer/tree/master/examples +// +module.exports = [ + { + type: 'input', + name: 'message', + message: "What's your message?" + } +] diff --git a/_templates/init/repo/new-repo.ejs.t b/_templates/init/repo/new-repo.ejs.t new file mode 100644 index 000000000000..08e7cffdba11 --- /dev/null +++ b/_templates/init/repo/new-repo.ejs.t @@ -0,0 +1,4 @@ +--- +setup: <%= name %> +force: true # this is because mostly, people init into existing folders is safe +--- diff --git a/_templates/package/new/.eslintrc.json.ejs.t b/_templates/package/new/.eslintrc.json.ejs.t new file mode 100644 index 000000000000..aa7fd8cbc2c0 --- /dev/null +++ b/_templates/package/new/.eslintrc.json.ejs.t @@ -0,0 +1,7 @@ +--- +to: packages/<%= name %>/.eslintrc.json +--- +{ + "extends": ["@rocket.chat/eslint-config"], + "ignorePatterns": ["**/dist"] +} diff --git a/_templates/package/new/index.ejs.t b/_templates/package/new/index.ejs.t new file mode 100644 index 000000000000..4d66a23a76ee --- /dev/null +++ b/_templates/package/new/index.ejs.t @@ -0,0 +1,4 @@ +--- +to: packages/<%= name %>/src/index.ts +--- +export default () => "<%= h.capitalize(name) %>"; diff --git a/_templates/package/new/package.json.ejs.t b/_templates/package/new/package.json.ejs.t new file mode 100644 index 000000000000..44fe58fea9b4 --- /dev/null +++ b/_templates/package/new/package.json.ejs.t @@ -0,0 +1,28 @@ +--- +to: packages/<%= name %>/package.json +--- + +{ + "name": "@rocket.chat/<%= name.toLowerCase() %>", + "version": "0.0.1", + "private": true, + "devDependencies": { + "@types/jest": "^27.4.1", + "eslint": "^8.12.0", + "jest": "^27.5.1", + "ts-jest": "^27.1.4", + "typescript": "~4.5.5" + }, + "scripts": { + "lint": "eslint --ext .js,.jsx,.ts,.tsx .", + "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "jest": "jest", + "build": "rm -rf dist && tsc -p tsconfig.json", + "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput" + }, + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "files": [ + "/dist" + ] +} diff --git a/_templates/package/new/tsconfig.json.ejs.t b/_templates/package/new/tsconfig.json.ejs.t new file mode 100644 index 000000000000..1b5cbc20b8ed --- /dev/null +++ b/_templates/package/new/tsconfig.json.ejs.t @@ -0,0 +1,11 @@ +--- +to: packages/<%= name %>/tsconfig.json +--- +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist" + }, + "include": ["./src/**/*"] +} diff --git a/app/2fa/server/code/index.ts b/app/2fa/server/code/index.ts deleted file mode 100644 index 056db89c3715..000000000000 --- a/app/2fa/server/code/index.ts +++ /dev/null @@ -1,212 +0,0 @@ -import crypto from 'crypto'; - -import { Meteor } from 'meteor/meteor'; -import { Accounts } from 'meteor/accounts-base'; - -import { settings } from '../../../settings/server'; -import { TOTPCheck } from './TOTPCheck'; -import { EmailCheck } from './EmailCheck'; -import { PasswordCheckFallback } from './PasswordCheckFallback'; -import { IUser } from '../../../../definition/IUser'; -import { ICodeCheck } from './ICodeCheck'; -import { Users } from '../../../models/server'; -import { IMethodConnection } from '../../../../definition/IMethodThisType'; - -export interface ITwoFactorOptions { - disablePasswordFallback?: boolean; - disableRememberMe?: boolean; - requireSecondFactor?: boolean; // whether any two factor should be required -} - -export const totpCheck = new TOTPCheck(); -export const emailCheck = new EmailCheck(); -export const passwordCheckFallback = new PasswordCheckFallback(); - -export const checkMethods = new Map(); - -checkMethods.set(totpCheck.name, totpCheck); -checkMethods.set(emailCheck.name, emailCheck); - -export function getMethodByNameOrFirstActiveForUser(user: IUser, name?: string): ICodeCheck | undefined { - if (name && checkMethods.has(name)) { - return checkMethods.get(name); - } - - return Array.from(checkMethods.values()).find((method) => method.isEnabled(user)); -} - -export function getAvailableMethodNames(user: IUser): string[] | [] { - return ( - Array.from(checkMethods) - .filter(([, method]) => method.isEnabled(user)) - .map(([name]) => name) || [] - ); -} - -export function getUserForCheck(userId: string): IUser { - return Users.findOneById(userId, { - fields: { - 'emails': 1, - 'language': 1, - 'createdAt': 1, - 'services.totp': 1, - 'services.email2fa': 1, - 'services.emailCode': 1, - 'services.password': 1, - 'services.resume.loginTokens': 1, - }, - }); -} - -export function getFingerprintFromConnection(connection: IMethodConnection): string { - const data = JSON.stringify({ - userAgent: connection.httpHeaders['user-agent'], - clientAddress: connection.clientAddress, - }); - - return crypto.createHash('md5').update(data).digest('hex'); -} - -function getRememberDate(from: Date = new Date()): Date | undefined { - const rememberFor = parseInt(settings.get('Accounts_TwoFactorAuthentication_RememberFor') as string, 10); - - if (rememberFor <= 0) { - return; - } - - const expires = new Date(from); - expires.setSeconds(expires.getSeconds() + rememberFor); - - return expires; -} - -export function isAuthorizedForToken(connection: IMethodConnection, user: IUser, options: ITwoFactorOptions): boolean { - const currentToken = Accounts._getLoginToken(connection.id); - const tokenObject = user.services?.resume?.loginTokens?.find((i) => i.hashedToken === currentToken); - - if (!tokenObject) { - return false; - } - - // if any two factor is required, early abort - if (options.requireSecondFactor) { - return false; - } - - if (tokenObject.bypassTwoFactor === true) { - return true; - } - - if (options.disableRememberMe === true) { - return false; - } - - // remember user right after their registration - const rememberAfterRegistration = user.createdAt && getRememberDate(user.createdAt); - if (rememberAfterRegistration && rememberAfterRegistration >= new Date()) { - return true; - } - - if (!tokenObject.twoFactorAuthorizedUntil || !tokenObject.twoFactorAuthorizedHash) { - return false; - } - - if (tokenObject.twoFactorAuthorizedUntil < new Date()) { - return false; - } - - if (tokenObject.twoFactorAuthorizedHash !== getFingerprintFromConnection(connection)) { - return false; - } - - return true; -} - -export function rememberAuthorization(connection: IMethodConnection, user: IUser): void { - const currentToken = Accounts._getLoginToken(connection.id); - - const expires = getRememberDate(); - if (!expires) { - return; - } - - Users.setTwoFactorAuthorizationHashAndUntilForUserIdAndToken(user._id, currentToken, getFingerprintFromConnection(connection), expires); -} - -interface ICheckCodeForUser { - user: IUser | string; - code?: string; - method?: string; - options?: ITwoFactorOptions; - connection?: IMethodConnection; -} - -const getSecondFactorMethod = (user: IUser, method: string | undefined, options: ITwoFactorOptions): ICodeCheck | undefined => { - // try first getting one of the available methods or the one that was already provided - const selectedMethod = getMethodByNameOrFirstActiveForUser(user, method); - if (selectedMethod) { - return selectedMethod; - } - - // if none found but a second factor is required, chose the password check - if (options.requireSecondFactor) { - return passwordCheckFallback; - } - - // check if password fallback is enabled - if (!options.disablePasswordFallback && passwordCheckFallback.isEnabled(user, !!options.requireSecondFactor)) { - return passwordCheckFallback; - } -}; - -export function checkCodeForUser({ user, code, method, options = {}, connection }: ICheckCodeForUser): boolean { - if (process.env.TEST_MODE && !options.requireSecondFactor) { - return true; - } - - if (!settings.get('Accounts_TwoFactorAuthentication_Enabled')) { - return true; - } - - if (typeof user === 'string') { - user = getUserForCheck(user); - } - - if (!code && !method && connection?.httpHeaders?.['x-2fa-code'] && connection.httpHeaders['x-2fa-method']) { - code = connection.httpHeaders['x-2fa-code']; - method = connection.httpHeaders['x-2fa-method']; - } - - if (connection && isAuthorizedForToken(connection, user, options)) { - return true; - } - - // select a second factor method or return if none is found/available - const selectedMethod = getSecondFactorMethod(user, method, options); - if (!selectedMethod) { - return true; - } - - if (!code) { - const data = selectedMethod.processInvalidCode(user); - const availableMethods = getAvailableMethodNames(user); - - throw new Meteor.Error('totp-required', 'TOTP Required', { - method: selectedMethod.name, - ...data, - availableMethods, - }); - } - - const valid = selectedMethod.verify(user, code, options.requireSecondFactor); - - if (!valid) { - throw new Meteor.Error('totp-invalid', 'TOTP Invalid', { method: selectedMethod.name }); - } - - if (options.disableRememberMe !== true && connection) { - rememberAuthorization(connection, user); - } - - return true; -} diff --git a/app/2fa/server/lib/totp.js b/app/2fa/server/lib/totp.js deleted file mode 100644 index e662a5fde9f8..000000000000 --- a/app/2fa/server/lib/totp.js +++ /dev/null @@ -1,68 +0,0 @@ -import { SHA256 } from 'meteor/sha'; -import { Random } from 'meteor/random'; -import speakeasy from 'speakeasy'; - -import { Users } from '../../../models'; -import { settings } from '../../../settings/server'; - -export const TOTP = { - generateSecret() { - return speakeasy.generateSecret(); - }, - - generateOtpauthURL(secret, username) { - return speakeasy.otpauthURL({ - secret: secret.ascii, - label: `Rocket.Chat:${username}`, - }); - }, - - verify({ secret, token, backupTokens, userId }) { - // validates a backup code - if (token.length === 8 && backupTokens) { - const hashedCode = SHA256(token); - const usedCode = backupTokens.indexOf(hashedCode); - - if (usedCode !== -1) { - backupTokens.splice(usedCode, 1); - - // mark the code as used (remove it from the list) - Users.update2FABackupCodesByUserId(userId, backupTokens); - return true; - } - - return false; - } - - const maxDelta = settings.get('Accounts_TwoFactorAuthentication_MaxDelta'); - if (maxDelta) { - const verifiedDelta = speakeasy.totp.verifyDelta({ - secret, - encoding: 'base32', - token, - window: maxDelta, - }); - - return verifiedDelta !== undefined; - } - - return speakeasy.totp.verify({ - secret, - encoding: 'base32', - token, - }); - }, - - generateCodes() { - // generate 12 backup codes - const codes = []; - const hashedCodes = []; - for (let i = 0; i < 12; i++) { - const code = Random.id(8); - codes.push(code); - hashedCodes.push(SHA256(code)); - } - - return { codes, hashedCodes }; - }, -}; diff --git a/app/2fa/server/loginHandler.js b/app/2fa/server/loginHandler.js deleted file mode 100644 index 942abbf143e7..000000000000 --- a/app/2fa/server/loginHandler.js +++ /dev/null @@ -1,96 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Accounts } from 'meteor/accounts-base'; -import { OAuth } from 'meteor/oauth'; -import { check } from 'meteor/check'; - -import { callbacks } from '../../../lib/callbacks'; -import { checkCodeForUser } from './code/index'; - -Accounts.registerLoginHandler('totp', function (options) { - if (!options.totp || !options.totp.code) { - return; - } - - return Accounts._runLoginHandlers(this, options.totp.login); -}); - -callbacks.add( - 'onValidateLogin', - (login) => { - if (login.type === 'resume' || login.type === 'proxy' || login.methodName === 'verifyEmail') { - return login; - } - - const [loginArgs] = login.methodArguments; - // CAS login doesn't yet support 2FA. - if (loginArgs.cas) { - return login; - } - - const { totp } = loginArgs; - - checkCodeForUser({ - user: login.user, - code: totp && totp.code, - options: { disablePasswordFallback: true }, - }); - - return login; - }, - callbacks.priority.MEDIUM, - '2fa', -); - -const recreateError = (errorDoc) => { - let error; - - if (errorDoc.meteorError) { - error = new Meteor.Error(); - delete errorDoc.meteorError; - } else { - error = new Error(); - } - - Object.getOwnPropertyNames(errorDoc).forEach((key) => { - error[key] = errorDoc[key]; - }); - return error; -}; - -OAuth._retrievePendingCredential = function (key, ...args) { - const credentialSecret = args.length > 0 && args[0] !== undefined ? args[0] : null; - check(key, String); - - const pendingCredential = OAuth._pendingCredentials.findOne({ - key, - credentialSecret, - }); - - if (!pendingCredential) { - return; - } - - if (pendingCredential.credential.error) { - OAuth._pendingCredentials.remove({ - _id: pendingCredential._id, - }); - return recreateError(pendingCredential.credential.error); - } - - // Work-around to make the credentials reusable for 2FA - const future = new Date(); - future.setMinutes(future.getMinutes() + 2); - - OAuth._pendingCredentials.update( - { - _id: pendingCredential._id, - }, - { - $set: { - createdAt: future, - }, - }, - ); - - return OAuth.openSecret(pendingCredential.credential); -}; diff --git a/app/2fa/server/methods/checkCodesRemaining.js b/app/2fa/server/methods/checkCodesRemaining.js deleted file mode 100644 index 63222c87da75..000000000000 --- a/app/2fa/server/methods/checkCodesRemaining.js +++ /dev/null @@ -1,19 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -Meteor.methods({ - '2fa:checkCodesRemaining'() { - if (!Meteor.userId()) { - throw new Meteor.Error('not-authorized'); - } - - const user = Meteor.user(); - - if (!user.services || !user.services.totp || !user.services.totp.enabled) { - throw new Meteor.Error('invalid-totp'); - } - - return { - remaining: user.services.totp.hashedBackup.length, - }; - }, -}); diff --git a/app/2fa/server/methods/disable.js b/app/2fa/server/methods/disable.js deleted file mode 100644 index fe6e554305dd..000000000000 --- a/app/2fa/server/methods/disable.js +++ /dev/null @@ -1,27 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { Users } from '../../../models'; -import { TOTP } from '../lib/totp'; - -Meteor.methods({ - '2fa:disable'(code) { - if (!Meteor.userId()) { - throw new Meteor.Error('not-authorized'); - } - - const user = Meteor.user(); - - const verified = TOTP.verify({ - secret: user.services.totp.secret, - token: code, - userId: Meteor.userId(), - backupTokens: user.services.totp.hashedBackup, - }); - - if (!verified) { - return false; - } - - return Users.disable2FAByUserId(Meteor.userId()); - }, -}); diff --git a/app/2fa/server/methods/enable.js b/app/2fa/server/methods/enable.js deleted file mode 100644 index ef34662436e6..000000000000 --- a/app/2fa/server/methods/enable.js +++ /dev/null @@ -1,23 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { Users } from '../../../models'; -import { TOTP } from '../lib/totp'; - -Meteor.methods({ - '2fa:enable'() { - if (!Meteor.userId()) { - throw new Meteor.Error('not-authorized'); - } - - const user = Meteor.user(); - - const secret = TOTP.generateSecret(); - - Users.disable2FAAndSetTempSecretByUserId(Meteor.userId(), secret.base32); - - return { - secret: secret.base32, - url: TOTP.generateOtpauthURL(secret, user.username), - }; - }, -}); diff --git a/app/2fa/server/methods/regenerateCodes.js b/app/2fa/server/methods/regenerateCodes.js deleted file mode 100644 index bfdc8d955d78..000000000000 --- a/app/2fa/server/methods/regenerateCodes.js +++ /dev/null @@ -1,32 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { Users } from '../../../models'; -import { TOTP } from '../lib/totp'; - -Meteor.methods({ - '2fa:regenerateCodes'(userToken) { - if (!Meteor.userId()) { - throw new Meteor.Error('not-authorized'); - } - - const user = Meteor.user(); - - if (!user.services || !user.services.totp || !user.services.totp.enabled) { - throw new Meteor.Error('invalid-totp'); - } - - const verified = TOTP.verify({ - secret: user.services.totp.secret, - token: userToken, - userId: Meteor.userId(), - backupTokens: user.services.totp.hashedBackup, - }); - - if (verified) { - const { codes, hashedCodes } = TOTP.generateCodes(); - - Users.update2FABackupCodesByUserId(Meteor.userId(), hashedCodes); - return { codes }; - } - }, -}); diff --git a/app/2fa/server/methods/validateTempToken.js b/app/2fa/server/methods/validateTempToken.js deleted file mode 100644 index 71565b0d42e3..000000000000 --- a/app/2fa/server/methods/validateTempToken.js +++ /dev/null @@ -1,30 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { Users } from '../../../models'; -import { TOTP } from '../lib/totp'; - -Meteor.methods({ - '2fa:validateTempToken'(userToken) { - if (!Meteor.userId()) { - throw new Meteor.Error('not-authorized'); - } - - const user = Meteor.user(); - - if (!user.services || !user.services.totp || !user.services.totp.tempSecret) { - throw new Meteor.Error('invalid-totp'); - } - - const verified = TOTP.verify({ - secret: user.services.totp.tempSecret, - token: userToken, - }); - - if (verified) { - const { codes, hashedCodes } = TOTP.generateCodes(); - - Users.enable2FAAndSetSecretAndCodesByUserId(Meteor.userId(), user.services.totp.tempSecret, hashedCodes); - return { codes }; - } - }, -}); diff --git a/app/2fa/server/twoFactorRequired.ts b/app/2fa/server/twoFactorRequired.ts deleted file mode 100644 index 0fb1e8cd9d1f..000000000000 --- a/app/2fa/server/twoFactorRequired.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { checkCodeForUser, ITwoFactorOptions } from './code/index'; -import { IMethodThisType } from '../../../definition/IMethodThisType'; - -export function twoFactorRequired(fn: Function, options: ITwoFactorOptions): Function { - return function (this: IMethodThisType, ...args: any[]): any { - if (!this.userId) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'twoFactorRequired' }); - } - - // get two factor options from last item of args and remove it - const twoFactor = args.pop(); - if (twoFactor) { - if (twoFactor.twoFactorCode && twoFactor.twoFactorMethod) { - checkCodeForUser({ - user: this.userId, - connection: this.connection || undefined, - code: twoFactor.twoFactorCode, - method: twoFactor.twoFactorMethod, - options, - }); - this.twoFactorChecked = true; - } else { - // if it was not two factor options, put it back - args.push(twoFactor); - } - } - - if (!this.twoFactorChecked) { - checkCodeForUser({ user: this.userId, connection: this.connection || undefined, options }); - } - - return fn.apply(this, args); - }; -} diff --git a/app/action-links/client/lib/actionLinks.js b/app/action-links/client/lib/actionLinks.js deleted file mode 100644 index 42aef4d55dcf..000000000000 --- a/app/action-links/client/lib/actionLinks.js +++ /dev/null @@ -1,66 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { handleError } from '../../../../client/lib/utils/handleError'; -import { Messages, Subscriptions } from '../../../models/client'; - -// Action Links namespace creation. -export const actionLinks = { - actions: {}, - register(name, funct) { - actionLinks.actions[name] = funct; - }, - getMessage(name, messageId) { - const userId = Meteor.userId(); - if (!userId) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { - function: 'actionLinks.getMessage', - }); - } - - const message = Messages.findOne({ _id: messageId }); - if (!message) { - throw new Meteor.Error('error-invalid-message', 'Invalid message', { - function: 'actionLinks.getMessage', - }); - } - - const subscription = Subscriptions.findOne({ - 'rid': message.rid, - 'u._id': userId, - }); - if (!subscription) { - throw new Meteor.Error('error-not-allowed', 'Not allowed', { - function: 'actionLinks.getMessage', - }); - } - - if (!message.actionLinks || !message.actionLinks[name]) { - throw new Meteor.Error('error-invalid-actionlink', 'Invalid action link', { - function: 'actionLinks.getMessage', - }); - } - - return message; - }, - run(name, messageId, instance) { - const message = actionLinks.getMessage(name, messageId); - - const actionLink = message.actionLinks[name]; - - let ranClient = false; - - if (actionLinks && actionLinks.actions && actionLinks.actions[actionLink.method_id]) { - // run just on client side - actionLinks.actions[actionLink.method_id](message, actionLink.params, instance); - - ranClient = true; - } - - // and run on server side - Meteor.call('actionLinkHandler', name, messageId, (err) => { - if (err && !ranClient) { - handleError(err); - } - }); - }, -}; diff --git a/app/action-links/server/actionLinkHandler.js b/app/action-links/server/actionLinkHandler.js deleted file mode 100644 index 7ccd1b05775b..000000000000 --- a/app/action-links/server/actionLinkHandler.js +++ /dev/null @@ -1,18 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { actionLinks } from './lib/actionLinks'; -// Action Links Handler. This method will be called off the client. - -Meteor.methods({ - actionLinkHandler(name, messageId) { - if (!Meteor.userId()) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'actionLinkHandler' }); - } - - const message = actionLinks.getMessage(name, messageId); - - const actionLink = message.actionLinks[name]; - - actionLinks.actions[actionLink.method_id](message, actionLink.params); - }, -}); diff --git a/app/action-links/server/lib/actionLinks.js b/app/action-links/server/lib/actionLinks.js deleted file mode 100644 index 6dbbd4c5c4c1..000000000000 --- a/app/action-links/server/lib/actionLinks.js +++ /dev/null @@ -1,44 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { Messages, Subscriptions } from '../../../models/server'; - -// Action Links namespace creation. -export const actionLinks = { - actions: {}, - register(name, funct) { - actionLinks.actions[name] = funct; - }, - getMessage(name, messageId) { - const userId = Meteor.userId(); - if (!userId) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { - function: 'actionLinks.getMessage', - }); - } - - const message = Messages.findOne({ _id: messageId }); - if (!message) { - throw new Meteor.Error('error-invalid-message', 'Invalid message', { - function: 'actionLinks.getMessage', - }); - } - - const subscription = Subscriptions.findOne({ - 'rid': message.rid, - 'u._id': userId, - }); - if (!subscription) { - throw new Meteor.Error('error-not-allowed', 'Not allowed', { - function: 'actionLinks.getMessage', - }); - } - - if (!message.actionLinks || !message.actionLinks[name]) { - throw new Meteor.Error('error-invalid-actionlink', 'Invalid action link', { - function: 'actionLinks.getMessage', - }); - } - - return message; - }, -}; diff --git a/app/analytics/server/settings.ts b/app/analytics/server/settings.ts deleted file mode 100644 index f2ee6e94d04d..000000000000 --- a/app/analytics/server/settings.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { settingsRegistry } from '../../settings/server'; - -settingsRegistry.addGroup('Analytics', function addSettings() { - this.section('Piwik', function () { - const enableQuery = { _id: 'PiwikAnalytics_enabled', value: true }; - this.add('PiwikAnalytics_enabled', false, { - type: 'boolean', - public: true, - i18nLabel: 'Enable', - }); - this.add('PiwikAnalytics_url', '', { - type: 'string', - public: true, - i18nLabel: 'URL', - enableQuery, - }); - this.add('PiwikAnalytics_siteId', '', { - type: 'string', - public: true, - i18nLabel: 'Client_ID', - enableQuery, - }); - this.add('PiwikAdditionalTrackers', '', { - type: 'string', - multiline: true, - public: true, - i18nLabel: 'PiwikAdditionalTrackers', - enableQuery, - }); - this.add('PiwikAnalytics_prependDomain', false, { - type: 'boolean', - public: true, - i18nLabel: 'PiwikAnalytics_prependDomain', - enableQuery, - }); - this.add('PiwikAnalytics_cookieDomain', false, { - type: 'boolean', - public: true, - i18nLabel: 'PiwikAnalytics_cookieDomain', - enableQuery, - }); - this.add('PiwikAnalytics_domains', '', { - type: 'string', - multiline: true, - public: true, - i18nLabel: 'PiwikAnalytics_domains', - enableQuery, - }); - }); - - this.section('Analytics_Google', function () { - const enableQuery = { _id: 'GoogleAnalytics_enabled', value: true }; - this.add('GoogleAnalytics_enabled', false, { - type: 'boolean', - public: true, - i18nLabel: 'Enable', - }); - - this.add('GoogleAnalytics_ID', '', { - type: 'string', - public: true, - i18nLabel: 'Analytics_Google_id', - enableQuery, - }); - }); - - this.section('Analytics_features_enabled', function addFeaturesEnabledSettings() { - this.add('Analytics_features_messages', true, { - type: 'boolean', - public: true, - i18nLabel: 'Messages', - i18nDescription: 'Analytics_features_messages_Description', - }); - this.add('Analytics_features_rooms', true, { - type: 'boolean', - public: true, - i18nLabel: 'Rooms', - i18nDescription: 'Analytics_features_rooms_Description', - }); - this.add('Analytics_features_users', true, { - type: 'boolean', - public: true, - i18nLabel: 'Users', - i18nDescription: 'Analytics_features_users_Description', - }); - }); -}); diff --git a/app/api/server/api.d.ts b/app/api/server/api.d.ts deleted file mode 100644 index 8f478094929d..000000000000 --- a/app/api/server/api.d.ts +++ /dev/null @@ -1,182 +0,0 @@ -import type { JoinPathPattern, Method, MethodOf, OperationParams, OperationResult, PathPattern, UrlParams } from '../../../definition/rest'; -import type { IUser } from '../../../definition/IUser'; -import { IMethodConnection } from '../../../definition/IMethodThisType'; -import { ITwoFactorOptions } from '../../2fa/server/code'; - -type SuccessResult = { - statusCode: 200; - body: T extends object ? { success: true } & T : T; -}; - -type FailureResult = { - statusCode: 400; - body: T extends object - ? { success: false } & T - : { - success: false; - error: T; - stack: TStack; - errorType: TErrorType; - details: TErrorDetails; - } & (undefined extends TErrorType ? {} : { errorType: TErrorType }) & - (undefined extends TErrorDetails ? {} : { details: TErrorDetails extends string ? unknown : TErrorDetails }); -}; - -type UnauthorizedResult = { - statusCode: 403; - body: { - success: false; - error: T | 'unauthorized'; - }; -}; - -type NotFoundResult = { - statusCode: 403; - body: { - success: false; - error: T | 'Resource not found'; - }; -}; - -export type NonEnterpriseTwoFactorOptions = { - authRequired: true; - forceTwoFactorAuthenticationForNonEnterprise: true; - twoFactorRequired: true; - permissionsRequired?: string[]; - twoFactorOptions: ITwoFactorOptions; -}; - -type Options = - | { - permissionsRequired?: string[]; - authRequired?: boolean; - forceTwoFactorAuthenticationForNonEnterprise?: boolean; - } - | { - authRequired: true; - twoFactorRequired: true; - twoFactorOptions?: ITwoFactorOptions; - }; - -type Request = { - method: 'GET' | 'POST' | 'PUT' | 'DELETE'; - url: string; - headers: Record; - body: any; -}; - -type ActionThis = { - urlParams: UrlParams; - // TODO make it unsafe - readonly queryParams: TMethod extends 'GET' ? Partial> : Record; - // TODO make it unsafe - readonly bodyParams: TMethod extends 'GET' ? Record : Partial>; - readonly request: Request; - requestParams(): OperationParams; - getPaginationItems(): { - readonly offset: number; - readonly count: number; - }; - parseJsonQuery(): { - sort: Record; - fields: Record; - query: Record; - }; - getUserFromParams(): IUser; -} & (TOptions extends { authRequired: true } - ? { - readonly user: IUser; - readonly userId: string; - } - : { - readonly user: null; - readonly userId: null; - }); - -export type ResultFor = - | SuccessResult> - | FailureResult - | UnauthorizedResult; - -type Action = - | ((this: ActionThis) => Promise>) - | ((this: ActionThis) => ResultFor); - -type Operation = - | Action - | ({ - action: Action; - } & { twoFactorRequired: boolean }); - -type Operations = { - [M in MethodOf as Lowercase]: Operation, TPathPattern, TOptions>; -}; - -declare class APIClass { - processTwoFactor({ - userId, - request, - invocation, - options, - connection, - }: { - userId: string; - request: Request; - invocation: { twoFactorChecked: boolean }; - options?: Options; - connection: IMethodConnection; - }): void; - - addRoute( - subpath: TSubPathPattern, - operations: Operations>, - ): void; - - addRoute>( - subpaths: TSubPathPattern[], - operations: Operations, - ): void; - - addRoute( - subpath: TSubPathPattern, - options: TOptions, - operations: Operations, TOptions>, - ): void; - - addRoute, TOptions extends Options>( - subpaths: TSubPathPattern[], - options: TOptions, - operations: Operations, - ): void; - - success(result: T): SuccessResult; - - success(): SuccessResult; - - failure( - result: T, - errorType?: TErrorType, - stack?: TStack, - error?: { details: TErrorDetails }, - ): FailureResult; - - failure(result: T): FailureResult; - - failure(): FailureResult; - - unauthorized(msg?: T): UnauthorizedResult; - - notFound(msg?: T): NotFoundResult; - - defaultFieldsToExclude: { - joinCode: 0; - members: 0; - importIds: 0; - e2e: 0; - }; -} - -export declare const API: { - v1: APIClass<'/v1'>; - default: APIClass; -}; diff --git a/app/api/server/api.js b/app/api/server/api.js deleted file mode 100644 index ec870075ea55..000000000000 --- a/app/api/server/api.js +++ /dev/null @@ -1,823 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Random } from 'meteor/random'; -import { DDPCommon } from 'meteor/ddp-common'; -import { DDP } from 'meteor/ddp'; -import { Accounts } from 'meteor/accounts-base'; -import { Restivus } from 'meteor/rocketchat:restivus'; -import _ from 'underscore'; -import { RateLimiter } from 'meteor/rate-limit'; - -import { Logger } from '../../../server/lib/logger/Logger'; -import { getRestPayload } from '../../../server/lib/logger/logPayloads'; -import { settings } from '../../settings/server'; -import { metrics } from '../../metrics/server'; -import { hasPermission, hasAllPermission } from '../../authorization/server'; -import { getDefaultUserFields } from '../../utils/server/functions/getDefaultUserFields'; -import { checkCodeForUser } from '../../2fa/server/code'; - -const logger = new Logger('API'); - -const rateLimiterDictionary = {}; -export const defaultRateLimiterOptions = { - numRequestsAllowed: settings.get('API_Enable_Rate_Limiter_Limit_Calls_Default'), - intervalTimeInMS: settings.get('API_Enable_Rate_Limiter_Limit_Time_Default'), -}; -let prometheusAPIUserAgent = false; - -export let API = {}; - -const getRequestIP = (req) => { - const socket = req.socket || req.connection?.socket; - const remoteAddress = req.headers['x-real-ip'] || socket?.remoteAddress || req.connection?.remoteAddress || null; - let forwardedFor = req.headers['x-forwarded-for']; - - if (!socket) { - return remoteAddress || forwardedFor || null; - } - - const httpForwardedCount = parseInt(process.env.HTTP_FORWARDED_COUNT) || 0; - if (httpForwardedCount <= 0) { - return remoteAddress; - } - - if (!_.isString(forwardedFor)) { - return remoteAddress; - } - - forwardedFor = forwardedFor.trim().split(/\s*,\s*/); - if (httpForwardedCount > forwardedFor.length) { - return remoteAddress; - } - - return forwardedFor[forwardedFor.length - httpForwardedCount]; -}; - -export class APIClass extends Restivus { - constructor(properties) { - super(properties); - this.apiPath = properties.apiPath; - this.authMethods = []; - this.fieldSeparator = '.'; - this.defaultFieldsToExclude = { - joinCode: 0, - members: 0, - importIds: 0, - e2e: 0, - }; - this.defaultLimitedUserFieldsToExclude = { - avatarOrigin: 0, - emails: 0, - phone: 0, - statusConnection: 0, - createdAt: 0, - lastLogin: 0, - services: 0, - requirePasswordChange: 0, - requirePasswordChangeReason: 0, - roles: 0, - statusDefault: 0, - _updatedAt: 0, - settings: 0, - }; - this.limitedUserFieldsToExclude = this.defaultLimitedUserFieldsToExclude; - this.limitedUserFieldsToExcludeIfIsPrivilegedUser = { - services: 0, - }; - } - - setLimitedCustomFields(customFields) { - const nonPublicFieds = customFields.reduce((acc, customField) => { - acc[`customFields.${customField}`] = 0; - return acc; - }, {}); - this.limitedUserFieldsToExclude = { - ...this.defaultLimitedUserFieldsToExclude, - ...nonPublicFieds, - }; - } - - hasHelperMethods() { - return API.helperMethods.size !== 0; - } - - getHelperMethods() { - return API.helperMethods; - } - - getHelperMethod(name) { - return API.helperMethods.get(name); - } - - addAuthMethod(method) { - this.authMethods.push(method); - } - - shouldAddRateLimitToRoute(options) { - const { version } = this._config; - const { rateLimiterOptions } = options; - return ( - (typeof rateLimiterOptions === 'object' || rateLimiterOptions === undefined) && - Boolean(version) && - !process.env.TEST_MODE && - Boolean(defaultRateLimiterOptions.numRequestsAllowed && defaultRateLimiterOptions.intervalTimeInMS) - ); - } - - success(result = {}) { - if (_.isObject(result)) { - result.success = true; - } - - result = { - statusCode: 200, - body: result, - }; - - return result; - } - - failure(result, errorType, stack, error) { - if (_.isObject(result)) { - result.success = false; - } else { - result = { - success: false, - error: result, - stack, - }; - - if (errorType) { - result.errorType = errorType; - } - - if (error && error.details) { - try { - result.details = JSON.parse(error.details); - } catch (e) { - result.details = error.details; - } - } - } - - result = { - statusCode: 400, - body: result, - }; - - return result; - } - - notFound(msg) { - return { - statusCode: 404, - body: { - success: false, - error: msg || 'Resource not found', - }, - }; - } - - internalError(msg) { - return { - statusCode: 500, - body: { - success: false, - error: msg || 'Internal error occured', - }, - }; - } - - unauthorized(msg) { - return { - statusCode: 403, - body: { - success: false, - error: msg || 'unauthorized', - }, - }; - } - - tooManyRequests(msg) { - return { - statusCode: 429, - body: { - success: false, - error: msg || 'Too many requests', - }, - }; - } - - getRateLimiter(route) { - return rateLimiterDictionary[route]; - } - - shouldVerifyRateLimit(route, userId) { - return ( - rateLimiterDictionary.hasOwnProperty(route) && - settings.get('API_Enable_Rate_Limiter') === true && - (process.env.NODE_ENV !== 'development' || settings.get('API_Enable_Rate_Limiter_Dev') === true) && - !(userId && hasPermission(userId, 'api-bypass-rate-limit')) - ); - } - - enforceRateLimit(objectForRateLimitMatch, request, response, userId) { - if (!this.shouldVerifyRateLimit(objectForRateLimitMatch.route, userId)) { - return; - } - - rateLimiterDictionary[objectForRateLimitMatch.route].rateLimiter.increment(objectForRateLimitMatch); - const attemptResult = rateLimiterDictionary[objectForRateLimitMatch.route].rateLimiter.check(objectForRateLimitMatch); - const timeToResetAttempsInSeconds = Math.ceil(attemptResult.timeToReset / 1000); - response.setHeader('X-RateLimit-Limit', rateLimiterDictionary[objectForRateLimitMatch.route].options.numRequestsAllowed); - response.setHeader('X-RateLimit-Remaining', attemptResult.numInvocationsLeft); - response.setHeader('X-RateLimit-Reset', new Date().getTime() + attemptResult.timeToReset); - - if (!attemptResult.allowed) { - throw new Meteor.Error( - 'error-too-many-requests', - `Error, too many requests. Please slow down. You must wait ${timeToResetAttempsInSeconds} seconds before trying this endpoint again.`, - { - timeToReset: attemptResult.timeToReset, - seconds: timeToResetAttempsInSeconds, - }, - ); - } - } - - reloadRoutesToRefreshRateLimiter() { - const { version } = this._config; - this._routes.forEach((route) => { - if (this.shouldAddRateLimitToRoute(route.options)) { - this.addRateLimiterRuleForRoutes({ - routes: [route.path], - rateLimiterOptions: route.options.rateLimiterOptions || defaultRateLimiterOptions, - endpoints: Object.keys(route.endpoints).filter((endpoint) => endpoint !== 'options'), - apiVersion: version, - }); - } - }); - } - - addRateLimiterRuleForRoutes({ routes, rateLimiterOptions, endpoints, apiVersion }) { - if (!rateLimiterOptions.numRequestsAllowed) { - throw new Meteor.Error('You must set "numRequestsAllowed" property in rateLimiter for REST API endpoint'); - } - if (!rateLimiterOptions.intervalTimeInMS) { - throw new Meteor.Error('You must set "intervalTimeInMS" property in rateLimiter for REST API endpoint'); - } - const addRateLimitRuleToEveryRoute = (routes) => { - routes.forEach((route) => { - rateLimiterDictionary[route] = { - rateLimiter: new RateLimiter(), - options: rateLimiterOptions, - }; - const rateLimitRule = { - IPAddr: (input) => input, - route, - }; - rateLimiterDictionary[route].rateLimiter.addRule( - rateLimitRule, - rateLimiterOptions.numRequestsAllowed, - rateLimiterOptions.intervalTimeInMS, - ); - }); - }; - routes.map((route) => this.namedRoutes(route, endpoints, apiVersion)).map(addRateLimitRuleToEveryRoute); - } - - processTwoFactor({ userId, request, invocation, options, connection }) { - if (!options.twoFactorRequired) { - return; - } - const code = request.headers['x-2fa-code']; - const method = request.headers['x-2fa-method']; - - checkCodeForUser({ user: userId, code, method, options: options.twoFactorOptions, connection }); - - invocation.twoFactorChecked = true; - } - - getFullRouteName(route, method, apiVersion = null) { - let prefix = `/${this.apiPath || ''}`; - if (apiVersion) { - prefix += `${apiVersion}/`; - } - return `${prefix}${route}${method}`; - } - - namedRoutes(route, endpoints, apiVersion) { - const routeActions = Array.isArray(endpoints) ? endpoints : Object.keys(endpoints); - - return routeActions.map((action) => this.getFullRouteName(route, action, apiVersion)); - } - - addRoute(routes, options, endpoints) { - // Note: required if the developer didn't provide options - if (typeof endpoints === 'undefined') { - endpoints = options; - options = {}; - } - - let shouldVerifyPermissions; - - if (!_.isArray(options.permissionsRequired)) { - options.permissionsRequired = undefined; - shouldVerifyPermissions = false; - } else { - shouldVerifyPermissions = !!options.permissionsRequired.length; - } - - // Allow for more than one route using the same option and endpoints - if (!_.isArray(routes)) { - routes = [routes]; - } - const { version } = this._config; - if (this.shouldAddRateLimitToRoute(options)) { - this.addRateLimiterRuleForRoutes({ - routes, - rateLimiterOptions: options.rateLimiterOptions || defaultRateLimiterOptions, - endpoints, - apiVersion: version, - }); - } - routes.forEach((route) => { - // Note: This is required due to Restivus calling `addRoute` in the constructor of itself - Object.keys(endpoints).forEach((method) => { - const _options = { ...options }; - - if (typeof endpoints[method] === 'function') { - endpoints[method] = { action: endpoints[method] }; - } else { - const extraOptions = { ...endpoints[method] }; - delete extraOptions.action; - Object.assign(_options, extraOptions); - } - // Add a try/catch for each endpoint - const originalAction = endpoints[method].action; - const api = this; - endpoints[method].action = function _internalRouteActionHandler() { - const rocketchatRestApiEnd = metrics.rocketchatRestApi.startTimer({ - method, - version, - ...(prometheusAPIUserAgent && { user_agent: this.request.headers['user-agent'] }), - entrypoint: route.startsWith('method.call') ? decodeURIComponent(this.request._parsedUrl.pathname.slice(8)) : route, - }); - - this.requestIp = getRequestIP(this.request); - - const startTime = Date.now(); - - const log = logger.logger.child({ - method: this.request.method, - url: this.request.url, - userId: this.request.headers['x-user-id'], - userAgent: this.request.headers['user-agent'], - length: this.request.headers['content-length'], - host: this.request.headers.host, - referer: this.request.headers.referer, - remoteIP: this.requestIp, - ...getRestPayload(this.request.body), - }); - - const objectForRateLimitMatch = { - IPAddr: this.requestIp, - route: `${this.request.route}${this.request.method.toLowerCase()}`, - }; - - let result; - - const connection = { - id: Random.id(), - close() {}, - token: this.token, - httpHeaders: this.request.headers, - clientAddress: this.requestIp, - }; - - try { - api.enforceRateLimit(objectForRateLimitMatch, this.request, this.response, this.userId); - - if (shouldVerifyPermissions && (!this.userId || !hasAllPermission(this.userId, _options.permissionsRequired))) { - throw new Meteor.Error('error-unauthorized', 'User does not have the permissions required for this action', { - permissions: _options.permissionsRequired, - }); - } - - const invocation = new DDPCommon.MethodInvocation({ - connection, - isSimulation: false, - userId: this.userId, - }); - - Accounts._accountData[connection.id] = { - connection, - }; - Accounts._setAccountData(connection.id, 'loginToken', this.token); - - api.processTwoFactor({ - userId: this.userId, - request: this.request, - invocation, - options: _options, - connection, - }); - - result = DDP._CurrentInvocation.withValue(invocation, () => Promise.await(originalAction.apply(this))) || API.v1.success(); - - log.http({ - status: result.statusCode, - responseTime: Date.now() - startTime, - }); - } catch (e) { - const apiMethod = - { - 'error-too-many-requests': 'tooManyRequests', - 'error-unauthorized': 'unauthorized', - }[e.error] || 'failure'; - - result = API.v1[apiMethod](typeof e === 'string' ? e : e.message, e.error, process.env.TEST_MODE ? e.stack : undefined, e); - - log.http({ - err: e, - status: result.statusCode, - responseTime: Date.now() - startTime, - }); - } finally { - delete Accounts._accountData[connection.id]; - } - - rocketchatRestApiEnd({ - status: result.statusCode, - }); - - return result; - }; - - if (this.hasHelperMethods()) { - for (const [name, helperMethod] of this.getHelperMethods()) { - endpoints[method][name] = helperMethod; - } - } - - // Allow the endpoints to make usage of the logger which respects the user's settings - endpoints[method].logger = logger; - }); - - super.addRoute(route, options, endpoints); - }); - } - - updateRateLimiterDictionaryForRoute(route, numRequestsAllowed, intervalTimeInMS) { - if (rateLimiterDictionary[route]) { - rateLimiterDictionary[route].options.numRequestsAllowed = - numRequestsAllowed ?? rateLimiterDictionary[route].options.numRequestsAllowed; - rateLimiterDictionary[route].options.intervalTimeInMS = intervalTimeInMS ?? rateLimiterDictionary[route].options.intervalTimeInMS; - API.v1.reloadRoutesToRefreshRateLimiter(); - } - } - - _initAuth() { - const loginCompatibility = (bodyParams, request) => { - // Grab the username or email that the user is logging in with - const { user, username, email, password, code: bodyCode } = bodyParams; - let usernameToLDAPLogin = ''; - - if (password == null) { - return bodyParams; - } - - if (_.without(Object.keys(bodyParams), 'user', 'username', 'email', 'password', 'code').length > 0) { - return bodyParams; - } - - const code = bodyCode || request.headers['x-2fa-code']; - - const auth = { - password, - }; - - if (typeof user === 'string') { - auth.user = user.includes('@') ? { email: user } : { username: user }; - usernameToLDAPLogin = user; - } else if (username) { - auth.user = { username }; - usernameToLDAPLogin = username; - } else if (email) { - auth.user = { email }; - usernameToLDAPLogin = email; - } - - if (auth.user == null) { - return bodyParams; - } - - if (auth.password.hashed) { - auth.password = { - digest: auth.password, - algorithm: 'sha-256', - }; - } - - const objectToLDAPLogin = { - ldap: true, - username: usernameToLDAPLogin, - ldapPass: auth.password, - ldapOptions: {}, - }; - if (settings.get('LDAP_Enable') && !code) { - return objectToLDAPLogin; - } - - if (code) { - return { - totp: { - code, - login: settings.get('LDAP_Enable') ? objectToLDAPLogin : auth, - }, - }; - } - - return auth; - }; - - const self = this; - - this.addRoute( - 'login', - { authRequired: false }, - { - post() { - const args = loginCompatibility(this.bodyParams, this.request); - const getUserInfo = self.getHelperMethod('getUserInfo'); - - const invocation = new DDPCommon.MethodInvocation({ - connection: { - close() {}, - httpHeaders: this.request.headers, - clientAddress: getRequestIP(this.request), - }, - }); - - let auth; - try { - auth = DDP._CurrentInvocation.withValue(invocation, () => Meteor.call('login', args)); - } catch (error) { - let e = error; - if (error.reason === 'User not found') { - e = { - error: 'Unauthorized', - reason: 'Unauthorized', - }; - } - - return { - statusCode: 401, - body: { - status: 'error', - error: e.error, - details: e.details, - message: e.reason || e.message, - }, - }; - } - - this.user = Meteor.users.findOne( - { - _id: auth.id, - }, - { - fields: getDefaultUserFields(), - }, - ); - - this.userId = this.user._id; - - const response = { - status: 'success', - data: { - userId: this.userId, - authToken: auth.token, - me: getUserInfo(this.user), - }, - }; - - const extraData = self._config.onLoggedIn && self._config.onLoggedIn.call(this); - - if (extraData != null) { - _.extend(response.data, { - extra: extraData, - }); - } - - return response; - }, - }, - ); - - const logout = function () { - // Remove the given auth token from the user's account - const authToken = this.request.headers['x-auth-token']; - const hashedToken = Accounts._hashLoginToken(authToken); - const tokenLocation = self._config.auth.token; - const index = tokenLocation.lastIndexOf('.'); - const tokenPath = tokenLocation.substring(0, index); - const tokenFieldName = tokenLocation.substring(index + 1); - const tokenToRemove = {}; - tokenToRemove[tokenFieldName] = hashedToken; - const tokenRemovalQuery = {}; - tokenRemovalQuery[tokenPath] = tokenToRemove; - - Meteor.users.update(this.user._id, { - $pull: tokenRemovalQuery, - }); - - const response = { - status: 'success', - data: { - message: "You've been logged out!", - }, - }; - - // Call the logout hook with the authenticated user attached - const extraData = self._config.onLoggedOut && self._config.onLoggedOut.call(this); - if (extraData != null) { - _.extend(response.data, { - extra: extraData, - }); - } - return response; - }; - - /* - Add a logout endpoint to the API - After the user is logged out, the onLoggedOut hook is called (see Restfully.configure() for - adding hook). - */ - return this.addRoute( - 'logout', - { - authRequired: true, - }, - { - get() { - console.warn('Warning: Default logout via GET will be removed in Restivus v1.0. Use POST instead.'); - console.warn(' See https://github.com/kahmali/meteor-restivus/issues/100'); - return logout.call(this); - }, - post: logout, - }, - ); - } -} - -const getUserAuth = function _getUserAuth(...args) { - const invalidResults = [undefined, null, false]; - return { - token: 'services.resume.loginTokens.hashedToken', - user() { - if (this.bodyParams && this.bodyParams.payload) { - this.bodyParams = JSON.parse(this.bodyParams.payload); - } - - for (let i = 0; i < API.v1.authMethods.length; i++) { - const method = API.v1.authMethods[i]; - - if (typeof method === 'function') { - const result = method.apply(this, args); - if (!invalidResults.includes(result)) { - return result; - } - } - } - - let token; - if (this.request.headers['x-auth-token']) { - token = Accounts._hashLoginToken(this.request.headers['x-auth-token']); - } - - this.token = token; - - return { - userId: this.request.headers['x-user-id'], - token, - }; - }, - }; -}; - -API = { - helperMethods: new Map(), - getUserAuth, - ApiClass: APIClass, -}; - -const defaultOptionsEndpoint = function _defaultOptionsEndpoint() { - // check if a pre-flight request - if (!this.request.headers['access-control-request-method'] && !this.request.headers.origin) { - this.done(); - return; - } - - if (!settings.get('API_Enable_CORS')) { - this.response.writeHead(405); - this.response.write('CORS not enabled. Go to "Admin > General > REST Api" to enable it.'); - this.done(); - return; - } - - const CORSOriginSetting = String(settings.get('API_CORS_Origin')); - - const defaultHeaders = { - 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, HEAD, PATCH', - 'Access-Control-Allow-Headers': - 'Origin, X-Requested-With, Content-Type, Accept, X-User-Id, X-Auth-Token, x-visitor-token, Authorization', - }; - - if (CORSOriginSetting === '*') { - this.response.writeHead(200, { - 'Access-Control-Allow-Origin': '*', - ...defaultHeaders, - }); - this.done(); - return; - } - - const origins = CORSOriginSetting.trim() - .split(',') - .map((origin) => String(origin).trim().toLocaleLowerCase()); - - // if invalid origin reply without required CORS headers - if (!origins.includes(this.request.headers.origin)) { - this.done(); - return; - } - - this.response.writeHead(200, { - 'Access-Control-Allow-Origin': this.request.headers.origin, - 'Vary': 'Origin', - ...defaultHeaders, - }); - this.done(); -}; - -const createApi = function _createApi(_api, options = {}) { - _api = - _api || - new APIClass( - Object.assign( - { - apiPath: 'api/', - useDefaultAuth: true, - prettyJson: process.env.NODE_ENV === 'development', - defaultOptionsEndpoint, - auth: getUserAuth(), - }, - options, - ), - ); - - return _api; -}; - -const createApis = function _createApis() { - API.v1 = createApi(API.v1, { - version: 'v1', - }); - - API.default = createApi(API.default); -}; - -// also create the API immediately -createApis(); - -// register the API to be re-created once the CORS-setting changes. -settings.watchMultiple(['API_Enable_CORS', 'API_CORS_Origin'], () => { - createApis(); -}); - -settings.watch('Accounts_CustomFields', (value) => { - if (!value) { - return API.v1.setLimitedCustomFields([]); - } - try { - const customFields = JSON.parse(value); - const nonPublicCustomFields = Object.keys(customFields).filter((customFieldKey) => customFields[customFieldKey].public !== true); - API.v1.setLimitedCustomFields(nonPublicCustomFields); - } catch (error) { - console.warn('Invalid Custom Fields', error); - } -}); - -settings.watch('API_Enable_Rate_Limiter_Limit_Time_Default', (value) => { - defaultRateLimiterOptions.intervalTimeInMS = value; - API.v1.reloadRoutesToRefreshRateLimiter(); -}); - -settings.watch('API_Enable_Rate_Limiter_Limit_Calls_Default', (value) => { - defaultRateLimiterOptions.numRequestsAllowed = value; - API.v1.reloadRoutesToRefreshRateLimiter(); -}); - -settings.watch('Prometheus_API_User_Agent', (value) => { - prometheusAPIUserAgent = value; -}); diff --git a/app/api/server/helpers/composeRoomWithLastMessage.js b/app/api/server/helpers/composeRoomWithLastMessage.js deleted file mode 100644 index 8822e6d575cc..000000000000 --- a/app/api/server/helpers/composeRoomWithLastMessage.js +++ /dev/null @@ -1,10 +0,0 @@ -import { normalizeMessagesForUser } from '../../../utils/server/lib/normalizeMessagesForUser'; -import { API } from '../api'; - -API.helperMethods.set('composeRoomWithLastMessage', function _composeRoomWithLastMessage(room, userId) { - if (room.lastMessage) { - const [lastMessage] = normalizeMessagesForUser([room.lastMessage], userId); - room.lastMessage = lastMessage; - } - return room; -}); diff --git a/app/api/server/helpers/getLoggedInUser.js b/app/api/server/helpers/getLoggedInUser.js deleted file mode 100644 index 71d398c19b82..000000000000 --- a/app/api/server/helpers/getLoggedInUser.js +++ /dev/null @@ -1,17 +0,0 @@ -import { Accounts } from 'meteor/accounts-base'; - -import { Users } from '../../../models'; -import { API } from '../api'; - -API.helperMethods.set('getLoggedInUser', function _getLoggedInUser() { - let user; - - if (this.request.headers['x-auth-token'] && this.request.headers['x-user-id']) { - user = Users.findOne({ - '_id': this.request.headers['x-user-id'], - 'services.resume.loginTokens.hashedToken': Accounts._hashLoginToken(this.request.headers['x-auth-token']), - }); - } - - return user; -}); diff --git a/app/api/server/helpers/getPaginationItems.js b/app/api/server/helpers/getPaginationItems.js deleted file mode 100644 index 259f79a1191a..000000000000 --- a/app/api/server/helpers/getPaginationItems.js +++ /dev/null @@ -1,32 +0,0 @@ -// If the count query param is higher than the "API_Upper_Count_Limit" setting, then we limit that -// If the count query param isn't defined, then we set it to the "API_Default_Count" setting -// If the count is zero, then that means unlimited and is only allowed if the setting "API_Allow_Infinite_Count" is true -import { settings } from '../../../settings/server'; -import { API } from '../api'; - -API.helperMethods.set('getPaginationItems', function _getPaginationItems() { - const hardUpperLimit = settings.get('API_Upper_Count_Limit') <= 0 ? 100 : settings.get('API_Upper_Count_Limit'); - const defaultCount = settings.get('API_Default_Count') <= 0 ? 50 : settings.get('API_Default_Count'); - const offset = this.queryParams.offset ? parseInt(this.queryParams.offset) : 0; - let count = defaultCount; - - // Ensure count is an appropriate amount - if (typeof this.queryParams.count !== 'undefined') { - count = parseInt(this.queryParams.count); - } else { - count = defaultCount; - } - - if (count > hardUpperLimit) { - count = hardUpperLimit; - } - - if (count === 0 && !settings.get('API_Allow_Infinite_Count')) { - count = defaultCount; - } - - return { - offset, - count, - }; -}); diff --git a/app/api/server/helpers/getUserFromParams.js b/app/api/server/helpers/getUserFromParams.js deleted file mode 100644 index 0b562a87b993..000000000000 --- a/app/api/server/helpers/getUserFromParams.js +++ /dev/null @@ -1,52 +0,0 @@ -// Convenience method, almost need to turn it into a middleware of sorts -import { Meteor } from 'meteor/meteor'; - -import { Users } from '../../../models'; -import { API } from '../api'; - -API.helperMethods.set('getUserFromParams', function _getUserFromParams() { - const doesntExist = { _doesntExist: true }; - let user; - const params = this.requestParams(); - - if (params.userId && params.userId.trim()) { - user = Users.findOneById(params.userId) || doesntExist; - } else if (params.username && params.username.trim()) { - user = Users.findOneByUsernameIgnoringCase(params.username) || doesntExist; - } else if (params.user && params.user.trim()) { - user = Users.findOneByUsernameIgnoringCase(params.user) || doesntExist; - } else { - throw new Meteor.Error('error-user-param-not-provided', 'The required "userId" or "username" param was not provided'); - } - - if (user._doesntExist) { - throw new Meteor.Error('error-invalid-user', 'The required "userId" or "username" param provided does not match any users'); - } - - return user; -}); - -API.helperMethods.set('getUserListFromParams', function _getUserListFromParams() { - let users; - const params = this.requestParams(); - // if params.userId is provided, include it as well - const soleUser = params.userId || params.username || params.user; - let userListParam = params.userIds || params.usernames || []; - userListParam.push(soleUser); - userListParam = userListParam.filter(Boolean); - - // deduplicate to avoid errors - userListParam = [...new Set(userListParam)]; - - if (!userListParam.length) { - throw new Meteor.Error('error-users-params-not-provided', 'Please provide "userId" or "username" or "userIds" or "usernames" as param'); - } - - if (params.userIds || params.userId) { - users = Users.findByIds(userListParam); - } else { - users = Users.findByUsernamesIgnoringCase(userListParam); - } - - return users.fetch(); -}); diff --git a/app/api/server/helpers/getUserInfo.js b/app/api/server/helpers/getUserInfo.js deleted file mode 100644 index 49a3253b5774..000000000000 --- a/app/api/server/helpers/getUserInfo.js +++ /dev/null @@ -1,37 +0,0 @@ -import { settings } from '../../../settings/server'; -import { getUserPreference, getURL } from '../../../utils/server'; -import { API } from '../api'; - -API.helperMethods.set('getUserInfo', function _getUserInfo(me) { - const isVerifiedEmail = () => { - if (me && me.emails && Array.isArray(me.emails)) { - return me.emails.find((email) => email.verified); - } - return false; - }; - const getUserPreferences = () => { - const defaultUserSettingPrefix = 'Accounts_Default_User_Preferences_'; - const allDefaultUserSettings = settings.getByRegexp(new RegExp(`^${defaultUserSettingPrefix}.*$`)); - - return allDefaultUserSettings.reduce((accumulator, [key]) => { - const settingWithoutPrefix = key.replace(defaultUserSettingPrefix, ' ').trim(); - accumulator[settingWithoutPrefix] = getUserPreference(me, settingWithoutPrefix); - return accumulator; - }, {}); - }; - const verifiedEmail = isVerifiedEmail(); - me.email = verifiedEmail ? verifiedEmail.address : undefined; - - me.avatarUrl = getURL(`/avatar/${me.username}`, { cdn: false, full: true }); - - const userPreferences = (me.settings && me.settings.preferences) || {}; - - me.settings = { - preferences: { - ...getUserPreferences(), - ...userPreferences, - }, - }; - - return me; -}); diff --git a/app/api/server/helpers/insertUserObject.js b/app/api/server/helpers/insertUserObject.js deleted file mode 100644 index f36cea5275a5..000000000000 --- a/app/api/server/helpers/insertUserObject.js +++ /dev/null @@ -1,16 +0,0 @@ -import { Users } from '../../../models'; -import { API } from '../api'; - -API.helperMethods.set('insertUserObject', function _addUserToObject({ object, userId }) { - const user = Users.findOneById(userId); - object.user = {}; - if (user) { - object.user = { - _id: userId, - username: user.username, - name: user.name, - }; - } - - return object; -}); diff --git a/app/api/server/helpers/isUserFromParams.js b/app/api/server/helpers/isUserFromParams.js deleted file mode 100644 index 16789a9456f5..000000000000 --- a/app/api/server/helpers/isUserFromParams.js +++ /dev/null @@ -1,12 +0,0 @@ -import { API } from '../api'; - -API.helperMethods.set('isUserFromParams', function _isUserFromParams() { - const params = this.requestParams(); - - return ( - (!params.userId && !params.username && !params.user) || - (params.userId && this.userId === params.userId) || - (params.username && this.user.username === params.username) || - (params.user && this.user.username === params.user) - ); -}); diff --git a/app/api/server/helpers/isWidget.ts b/app/api/server/helpers/isWidget.ts deleted file mode 100644 index 203ab081925d..000000000000 --- a/app/api/server/helpers/isWidget.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { parse } from 'cookie'; - -import { API } from '../api'; - -(API as any).helperMethods.set('isWidget', function _isWidget() { - // @ts-expect-error - const { headers } = this.request; - - const { rc_room_type: roomType, rc_is_widget: isWidget } = parse(headers.cookie || ''); - - const isLivechatRoom = roomType && roomType === 'l'; - return !!(isLivechatRoom && isWidget === 't'); -}); diff --git a/app/api/server/helpers/parseJsonQuery.js b/app/api/server/helpers/parseJsonQuery.js deleted file mode 100644 index c16f81445991..000000000000 --- a/app/api/server/helpers/parseJsonQuery.js +++ /dev/null @@ -1,104 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { EJSON } from 'meteor/ejson'; - -import { hasPermission } from '../../../authorization'; -import { clean } from '../lib/cleanQuery'; -import { API } from '../api'; - -const pathAllowConf = { - '/api/v1/users.list': ['$or', '$regex', '$and'], - 'def': ['$or', '$and', '$regex'], -}; - -API.helperMethods.set('parseJsonQuery', function _parseJsonQuery() { - let sort; - if (this.queryParams.sort) { - try { - sort = JSON.parse(this.queryParams.sort); - } catch (e) { - this.logger.warn(`Invalid sort parameter provided "${this.queryParams.sort}":`, e); - throw new Meteor.Error('error-invalid-sort', `Invalid sort parameter provided: "${this.queryParams.sort}"`, { - helperMethod: 'parseJsonQuery', - }); - } - } - - let fields; - if (this.queryParams.fields) { - try { - fields = JSON.parse(this.queryParams.fields); - } catch (e) { - this.logger.warn(`Invalid fields parameter provided "${this.queryParams.fields}":`, e); - throw new Meteor.Error('error-invalid-fields', `Invalid fields parameter provided: "${this.queryParams.fields}"`, { - helperMethod: 'parseJsonQuery', - }); - } - } - - // Verify the user's selected fields only contains ones which their role allows - if (typeof fields === 'object') { - let nonSelectableFields = Object.keys(API.v1.defaultFieldsToExclude); - if (this.request.route.includes('/v1/users.')) { - const getFields = () => - Object.keys( - hasPermission(this.userId, 'view-full-other-user-info') - ? API.v1.limitedUserFieldsToExcludeIfIsPrivilegedUser - : API.v1.limitedUserFieldsToExclude, - ); - nonSelectableFields = nonSelectableFields.concat(getFields()); - } - - Object.keys(fields).forEach((k) => { - if (nonSelectableFields.includes(k) || nonSelectableFields.includes(k.split(API.v1.fieldSeparator)[0])) { - delete fields[k]; - } - }); - } - - // Limit the fields by default - fields = Object.assign({}, fields, API.v1.defaultFieldsToExclude); - if (this.request.route.includes('/v1/users.')) { - if (hasPermission(this.userId, 'view-full-other-user-info')) { - fields = Object.assign(fields, API.v1.limitedUserFieldsToExcludeIfIsPrivilegedUser); - } else { - fields = Object.assign(fields, API.v1.limitedUserFieldsToExclude); - } - } - - let query = {}; - if (this.queryParams.query) { - try { - query = EJSON.parse(this.queryParams.query); - query = clean(query, pathAllowConf[this.request.route] || pathAllowConf.def); - } catch (e) { - this.logger.warn(`Invalid query parameter provided "${this.queryParams.query}":`, e); - throw new Meteor.Error('error-invalid-query', `Invalid query parameter provided: "${this.queryParams.query}"`, { - helperMethod: 'parseJsonQuery', - }); - } - } - - // Verify the user has permission to query the fields they are - if (typeof query === 'object') { - let nonQueryableFields = Object.keys(API.v1.defaultFieldsToExclude); - if (this.request.route.includes('/v1/users.')) { - if (hasPermission(this.userId, 'view-full-other-user-info')) { - nonQueryableFields = nonQueryableFields.concat(Object.keys(API.v1.limitedUserFieldsToExcludeIfIsPrivilegedUser)); - } else { - nonQueryableFields = nonQueryableFields.concat(Object.keys(API.v1.limitedUserFieldsToExclude)); - } - } - - Object.keys(query).forEach((k) => { - if (nonQueryableFields.includes(k) || nonQueryableFields.includes(k.split(API.v1.fieldSeparator)[0])) { - delete query[k]; - } - }); - } - - return { - sort, - fields, - query, - }; -}); diff --git a/app/api/server/helpers/requestParams.js b/app/api/server/helpers/requestParams.js deleted file mode 100644 index 2883c94a727e..000000000000 --- a/app/api/server/helpers/requestParams.js +++ /dev/null @@ -1,5 +0,0 @@ -import { API } from '../api'; - -API.helperMethods.set('requestParams', function _requestParams() { - return ['POST', 'PUT'].includes(this.request.method) ? this.bodyParams : this.queryParams; -}); diff --git a/app/api/server/index.js b/app/api/server/index.js deleted file mode 100644 index 48d0caa9d6fc..000000000000 --- a/app/api/server/index.js +++ /dev/null @@ -1,48 +0,0 @@ -import './settings'; -import './helpers/composeRoomWithLastMessage'; -import './helpers/deprecationWarning'; -import './helpers/getLoggedInUser'; -import './helpers/getPaginationItems'; -import './helpers/getUserFromParams'; -import './helpers/getUserInfo'; -import './helpers/insertUserObject'; -import './helpers/isUserFromParams'; -import './helpers/parseJsonQuery'; -import './helpers/requestParams'; -import './helpers/isWidget'; -import './default/info'; -import './v1/assets'; -import './v1/channels'; -import './v1/chat'; -import './v1/cloud'; -import './v1/commands'; -import './v1/dns'; -import './v1/e2e'; -import './v1/emoji-custom'; -import './v1/groups'; -import './v1/im'; -import './v1/integrations'; -import './v1/invites'; -import './v1/import'; -import './v1/ldap'; -import './v1/misc'; -import './v1/permissions'; -import './v1/push'; -import './v1/roles'; -import './v1/rooms'; -import './v1/settings'; -import './v1/stats'; -import './v1/subscriptions'; -import './v1/users'; -import './v1/video-conference'; -import './v1/autotranslate'; -import './v1/webdav'; -import './v1/oauthapps'; -import './v1/custom-sounds'; -import './v1/custom-user-status'; -import './v1/instances'; -import './v1/banners'; -import './v1/email-inbox'; -import './v1/teams'; - -export { API, APIClass, defaultRateLimiterOptions } from './api'; diff --git a/app/api/server/lib/custom-sounds.js b/app/api/server/lib/custom-sounds.js deleted file mode 100644 index 0579e99f38e7..000000000000 --- a/app/api/server/lib/custom-sounds.js +++ /dev/null @@ -1,20 +0,0 @@ -import { CustomSounds } from '../../../models/server/raw'; - -export async function findCustomSounds({ query = {}, pagination: { offset, count, sort } }) { - const cursor = await CustomSounds.find(query, { - sort: sort || { name: 1 }, - skip: offset, - limit: count, - }); - - const total = await cursor.count(); - - const sounds = await cursor.toArray(); - - return { - sounds, - count: sounds.length, - offset, - total, - }; -} diff --git a/app/api/server/lib/custom-user-status.js b/app/api/server/lib/custom-user-status.js deleted file mode 100644 index 6108af3c6a72..000000000000 --- a/app/api/server/lib/custom-user-status.js +++ /dev/null @@ -1,20 +0,0 @@ -import { CustomUserStatus } from '../../../models/server/raw'; - -export async function findCustomUserStatus({ query = {}, pagination: { offset, count, sort } }) { - const cursor = await CustomUserStatus.find(query, { - sort: sort || { name: 1 }, - skip: offset, - limit: count, - }); - - const total = await cursor.count(); - - const statuses = await cursor.toArray(); - - return { - statuses, - count: statuses.length, - offset, - total, - }; -} diff --git a/app/api/server/lib/emailInbox.js b/app/api/server/lib/emailInbox.js deleted file mode 100644 index a874598197e2..000000000000 --- a/app/api/server/lib/emailInbox.js +++ /dev/null @@ -1,79 +0,0 @@ -import { EmailInbox } from '../../../models/server/raw'; -import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission'; -import { Users } from '../../../models'; - -export async function findEmailInboxes({ userId, query = {}, pagination: { offset, count, sort } }) { - if (!(await hasPermissionAsync(userId, 'manage-email-inbox'))) { - throw new Error('error-not-allowed'); - } - const cursor = EmailInbox.find(query, { - sort: sort || { name: 1 }, - skip: offset, - limit: count, - }); - - const total = await cursor.count(); - - const emailInboxes = await cursor.toArray(); - - return { - emailInboxes, - count: emailInboxes.length, - offset, - total, - }; -} - -export async function findOneEmailInbox({ userId, _id }) { - if (!(await hasPermissionAsync(userId, 'manage-email-inbox'))) { - throw new Error('error-not-allowed'); - } - return EmailInbox.findOneById(_id); -} - -export async function insertOneOrUpdateEmailInbox(userId, emailInboxParams) { - const { _id, active, name, email, description, senderInfo, department, smtp, imap } = emailInboxParams; - - if (!_id) { - emailInboxParams._createdAt = new Date(); - emailInboxParams._updatedAt = new Date(); - emailInboxParams._createdBy = Users.findOne(userId, { fields: { username: 1 } }); - return EmailInbox.insertOne(emailInboxParams); - } - - const emailInbox = await findOneEmailInbox({ userId, id: _id }); - - if (!emailInbox) { - throw new Error('error-invalid-email-inbox'); - } - - const updateEmailInbox = { - $set: { - active, - name, - email, - description, - senderInfo, - smtp, - imap, - _updatedAt: new Date(), - }, - }; - - if (department === 'All') { - updateEmailInbox.$unset = { - department: 1, - }; - } else { - updateEmailInbox.$set.department = department; - } - - return EmailInbox.updateOne({ _id }, updateEmailInbox); -} - -export async function findOneEmailInboxByEmail({ userId, email }) { - if (!(await hasPermissionAsync(userId, 'manage-email-inbox'))) { - throw new Error('error-not-allowed'); - } - return EmailInbox.findOne({ email }); -} diff --git a/app/api/server/lib/emoji-custom.js b/app/api/server/lib/emoji-custom.js deleted file mode 100644 index 1d7dde270664..000000000000 --- a/app/api/server/lib/emoji-custom.js +++ /dev/null @@ -1,20 +0,0 @@ -import { EmojiCustom } from '../../../models/server/raw'; - -export async function findEmojisCustom({ query = {}, pagination: { offset, count, sort } }) { - const cursor = EmojiCustom.find(query, { - sort: sort || { name: 1 }, - skip: offset, - limit: count, - }); - - const total = await cursor.count(); - - const emojis = await cursor.toArray(); - - return { - emojis, - count: emojis.length, - offset, - total, - }; -} diff --git a/app/api/server/lib/getServerInfo.ts b/app/api/server/lib/getServerInfo.ts deleted file mode 100644 index 3925aa60a04b..000000000000 --- a/app/api/server/lib/getServerInfo.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Info } from '../../../utils/server'; -import { hasAnyRoleAsync } from '../../../authorization/server/functions/hasRole'; - -type ServerInfo = - | { - info: Info; - } - | { - version: string | undefined; - }; - -const removePatchInfo = (version: string): string => version.replace(/(\d+\.\d+).*/, '$1'); - -export async function getServerInfo(userId?: string): Promise { - if (userId && (await hasAnyRoleAsync(userId, ['admin']))) { - return { - info: Info, - }; - } - return { - version: removePatchInfo(Info.version), - }; -} diff --git a/app/api/server/lib/getUploadFormData.js b/app/api/server/lib/getUploadFormData.js deleted file mode 100644 index e3698352af6c..000000000000 --- a/app/api/server/lib/getUploadFormData.js +++ /dev/null @@ -1,36 +0,0 @@ -import Busboy from 'busboy'; - -export const getUploadFormData = async ({ request }) => - new Promise((resolve, reject) => { - const busboy = new Busboy({ headers: request.headers }); - - const fields = {}; - - busboy.on('file', (fieldname, file, filename, encoding, mimetype) => { - const fileData = []; - - file.on('data', (data) => fileData.push(data)); - - file.on('end', () => { - if (fields.hasOwnProperty(fieldname)) { - return reject('Just 1 file is allowed'); - } - - fields[fieldname] = { - file, - filename, - encoding, - mimetype, - fileBuffer: Buffer.concat(fileData), - }; - }); - }); - - busboy.on('field', (fieldname, value) => { - fields[fieldname] = value; - }); - - busboy.on('finish', () => resolve(fields)); - - request.pipe(busboy); - }); diff --git a/app/api/server/lib/integrations.ts b/app/api/server/lib/integrations.ts deleted file mode 100644 index afc862e67f4e..000000000000 --- a/app/api/server/lib/integrations.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Integrations } from '../../../models/server/raw'; -import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission'; -import { IIntegration } from '../../../../definition/IIntegration'; -import { IUser } from '../../../../definition/IUser'; - -const hasIntegrationsPermission = async (userId: string, integration: IIntegration): Promise => { - const type = integration.type === 'webhook-incoming' ? 'incoming' : 'outgoing'; - - if (await hasPermissionAsync(userId, `manage-${type}-integrations`)) { - return true; - } - - if (userId === integration._createdBy._id) { - return hasPermissionAsync(userId, `manage-own-${type}-integrations`); - } - - return false; -}; - -export const findOneIntegration = async ({ - userId, - integrationId, - createdBy, -}: { - userId: string; - integrationId: string; - createdBy: IUser; -}): Promise => { - const integration = await Integrations.findOneByIdAndCreatedByIfExists({ - _id: integrationId, - createdBy, - }); - if (!integration) { - throw new Error('The integration does not exists.'); - } - if (!(await hasIntegrationsPermission(userId, integration))) { - throw new Error('not-authorized'); - } - return integration; -}; diff --git a/app/api/server/lib/messages.js b/app/api/server/lib/messages.js deleted file mode 100644 index d06eef7f0671..000000000000 --- a/app/api/server/lib/messages.js +++ /dev/null @@ -1,142 +0,0 @@ -import { canAccessRoomAsync } from '../../../authorization/server/functions/canAccessRoom'; -import { Rooms, Messages, Users } from '../../../models/server/raw'; -import { getValue } from '../../../settings/server/raw'; - -export async function findMentionedMessages({ uid, roomId, pagination: { offset, count, sort } }) { - const room = await Rooms.findOneById(roomId); - if (!(await canAccessRoomAsync(room, { _id: uid }))) { - throw new Error('error-not-allowed'); - } - const user = await Users.findOneById(uid, { fields: { username: 1 } }); - if (!user) { - throw new Error('invalid-user'); - } - - const cursor = await Messages.findVisibleByMentionAndRoomId(user.username, roomId, { - sort: sort || { ts: -1 }, - skip: offset, - limit: count, - }); - - const total = await cursor.count(); - - const messages = await cursor.toArray(); - - return { - messages, - count: messages.length, - offset, - total, - }; -} - -export async function findStarredMessages({ uid, roomId, pagination: { offset, count, sort } }) { - const room = await Rooms.findOneById(roomId); - if (!(await canAccessRoomAsync(room, { _id: uid }))) { - throw new Error('error-not-allowed'); - } - const user = await Users.findOneById(uid, { fields: { username: 1 } }); - if (!user) { - throw new Error('invalid-user'); - } - - const cursor = await Messages.findStarredByUserAtRoom(uid, roomId, { - sort: sort || { ts: -1 }, - skip: offset, - limit: count, - }); - - const total = await cursor.count(); - - const messages = await cursor.toArray(); - - return { - messages, - count: messages.length, - offset, - total, - }; -} - -export async function findSnippetedMessageById({ uid, messageId }) { - if (!(await getValue('Message_AllowSnippeting'))) { - throw new Error('error-not-allowed'); - } - - if (!uid) { - throw new Error('invalid-user'); - } - - const snippet = await Messages.findOne({ _id: messageId, snippeted: true }); - - if (!snippet) { - throw new Error('invalid-message'); - } - - const room = await Rooms.findOneById(snippet.rid); - - if (!room) { - throw new Error('invalid-message'); - } - - if (!(await canAccessRoomAsync(room, { _id: uid }))) { - throw new Error('error-not-allowed'); - } - - return { - message: snippet, - }; -} - -export async function findSnippetedMessages({ uid, roomId, pagination: { offset, count, sort } }) { - if (!(await getValue('Message_AllowSnippeting'))) { - throw new Error('error-not-allowed'); - } - const room = await Rooms.findOneById(roomId); - - if (!(await canAccessRoomAsync(room, { _id: uid }))) { - throw new Error('error-not-allowed'); - } - - const cursor = await Messages.findSnippetedByRoom(roomId, { - sort: sort || { ts: -1 }, - skip: offset, - limit: count, - }); - - const total = await cursor.count(); - - const messages = await cursor.toArray(); - - return { - messages, - count: messages.length, - offset, - total, - }; -} - -export async function findDiscussionsFromRoom({ uid, roomId, text, pagination: { offset, count, sort } }) { - const room = await Rooms.findOneById(roomId); - - if (!(await canAccessRoomAsync(room, { _id: uid }))) { - throw new Error('error-not-allowed'); - } - - const cursor = Messages.findDiscussionsByRoomAndText(roomId, text, { - sort: sort || { ts: -1 }, - skip: offset, - limit: count, - }); - - const total = await cursor.count(); - - const messages = await cursor.toArray(); - - return { - messages, - count: messages.length, - offset, - total, - }; -} diff --git a/app/api/server/lib/oauthApps.js b/app/api/server/lib/oauthApps.js deleted file mode 100644 index f914e7c8daed..000000000000 --- a/app/api/server/lib/oauthApps.js +++ /dev/null @@ -1,13 +0,0 @@ -import { OAuthApps } from '../../../models/server/raw'; -import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission'; - -export async function findOAuthApps({ uid }) { - if (!(await hasPermissionAsync(uid, 'manage-oauth-apps'))) { - throw new Error('error-not-allowed'); - } - return OAuthApps.find().toArray(); -} - -export async function findOneAuthApp({ clientId, appId }) { - return OAuthApps.findOneAuthAppByIdOrClientId({ clientId, appId }); -} diff --git a/app/api/server/lib/rooms.js b/app/api/server/lib/rooms.js deleted file mode 100644 index 5516f15676c3..000000000000 --- a/app/api/server/lib/rooms.js +++ /dev/null @@ -1,200 +0,0 @@ -import { hasPermissionAsync, hasAtLeastOnePermissionAsync } from '../../../authorization/server/functions/hasPermission'; -import { Rooms } from '../../../models/server/raw'; -import { Subscriptions } from '../../../models/server'; - -export async function findAdminRooms({ uid, filter, types = [], pagination: { offset, count, sort } }) { - if (!(await hasPermissionAsync(uid, 'view-room-administration'))) { - throw new Error('error-not-authorized'); - } - const fields = { - prid: 1, - fname: 1, - name: 1, - t: 1, - cl: 1, - u: 1, - usernames: 1, - usersCount: 1, - muted: 1, - unmuted: 1, - ro: 1, - default: 1, - favorite: 1, - featured: 1, - topic: 1, - msgs: 1, - archived: 1, - tokenpass: 1, - teamId: 1, - teamMain: 1, - }; - - const name = filter && filter.trim(); - const discussion = types && types.includes('discussions'); - const includeTeams = types && types.includes('teams'); - const showOnlyTeams = types.length === 1 && types.includes('teams'); - const typesToRemove = ['discussions', 'teams']; - const showTypes = Array.isArray(types) ? types.filter((type) => !typesToRemove.includes(type)) : []; - const options = { - fields, - sort: sort || { default: -1, name: 1 }, - skip: offset, - limit: count, - }; - - let cursor; - if (name && showTypes.length) { - cursor = Rooms.findByNameContainingAndTypes(name, showTypes, discussion, includeTeams, showOnlyTeams, options); - } else if (showTypes.length) { - cursor = Rooms.findByTypes(showTypes, discussion, includeTeams, showOnlyTeams, options); - } else { - cursor = Rooms.findByNameContaining(name, discussion, includeTeams, showOnlyTeams, options); - } - - const total = await cursor.count(); - - const rooms = await cursor.toArray(); - - return { - rooms, - count: rooms.length, - offset, - total, - }; -} - -export async function findAdminRoom({ uid, rid }) { - if (!(await hasPermissionAsync(uid, 'view-room-administration'))) { - throw new Error('error-not-authorized'); - } - const fields = { - prid: 1, - fname: 1, - name: 1, - t: 1, - cl: 1, - u: 1, - usernames: 1, - usersCount: 1, - muted: 1, - unmuted: 1, - ro: 1, - default: 1, - favorite: 1, - featured: 1, - topic: 1, - msgs: 1, - archived: 1, - tokenpass: 1, - announcement: 1, - description: 1, - }; - - return Rooms.findOneById(rid, { fields }); -} - -export async function findChannelAndPrivateAutocomplete({ uid, selector }) { - const options = { - fields: { - _id: 1, - fname: 1, - name: 1, - t: 1, - avatarETag: 1, - }, - limit: 10, - sort: { - name: 1, - }, - }; - - const userRoomsIds = Subscriptions.cachedFindByUserId(uid, { fields: { rid: 1 } }) - .fetch() - .map((item) => item.rid); - - const rooms = await Rooms.findRoomsWithoutDiscussionsByRoomIds(selector.name, userRoomsIds, options).toArray(); - - return { - items: rooms, - }; -} - -export async function findAdminRoomsAutocomplete({ uid, selector }) { - if (!(await hasAtLeastOnePermissionAsync(uid, ['view-room-administration', 'can-audit']))) { - throw new Error('error-not-authorized'); - } - const options = { - fields: { - _id: 1, - fname: 1, - name: 1, - t: 1, - avatarETag: 1, - }, - limit: 10, - sort: { - name: 1, - }, - }; - - const rooms = await Rooms.findRoomsByNameOrFnameStarting(selector.name, options).toArray(); - - return { - items: rooms, - }; -} - -export async function findChannelAndPrivateAutocompleteWithPagination({ uid, selector, pagination: { offset, count, sort } }) { - const userRoomsIds = Subscriptions.cachedFindByUserId(uid, { fields: { rid: 1 } }) - .fetch() - .map((item) => item.rid); - - const options = { - fields: { - _id: 1, - fname: 1, - name: 1, - t: 1, - avatarETag: 1, - }, - sort: sort || { name: 1 }, - skip: offset, - limit: count, - }; - - const cursor = await Rooms.findRoomsWithoutDiscussionsByRoomIds(selector.name, userRoomsIds, options); - - const total = await cursor.count(); - const rooms = await cursor.toArray(); - - return { - items: rooms, - total, - }; -} - -export async function findRoomsAvailableForTeams({ uid, name }) { - const options = { - fields: { - _id: 1, - fname: 1, - name: 1, - t: 1, - avatarETag: 1, - }, - limit: 10, - sort: { - name: 1, - }, - }; - - const userRooms = Subscriptions.findByUserIdAndRoles(uid, ['owner'], { fields: { rid: 1 } }) - .fetch() - .map((item) => item.rid); - - const rooms = await Rooms.findChannelAndGroupListWithoutTeamsByNameStartingByOwner(uid, name, userRooms, options).toArray(); - - return { - items: rooms, - }; -} diff --git a/app/api/server/lib/users.js b/app/api/server/lib/users.js deleted file mode 100644 index 1e7eb9a7a242..000000000000 --- a/app/api/server/lib/users.js +++ /dev/null @@ -1,95 +0,0 @@ -import { escapeRegExp } from '@rocket.chat/string-helpers'; - -import { Users } from '../../../models/server/raw'; -import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission'; - -export async function findUsersToAutocomplete({ uid, selector }) { - if (!(await hasPermissionAsync(uid, 'view-outside-room'))) { - return { items: [] }; - } - const exceptions = selector.exceptions || []; - const conditions = selector.conditions || {}; - const options = { - projection: { - name: 1, - username: 1, - nickname: 1, - status: 1, - avatarETag: 1, - }, - sort: { - username: 1, - }, - limit: 10, - }; - - const users = await Users.findActiveByUsernameOrNameRegexWithExceptionsAndConditions( - new RegExp(escapeRegExp(selector.term), 'i'), - exceptions, - conditions, - options, - ).toArray(); - - return { - items: users, - }; -} - -/** - * Returns a new query object with the inclusive fields only - * @param {Object} query search query for matching rows - */ -export function getInclusiveFields(query) { - const newQuery = {}; - - for (const [key, value] of Object.entries(query)) { - if (value === 1) { - newQuery[key] = value; - } - } - - return newQuery; -} - -/** - * get the default fields if **fields** are empty (`{}`) or `undefined`/`null` - * @param {Object|null|undefined} fields the fields from parsed jsonQuery - */ -export function getNonEmptyFields(fields) { - const defaultFields = { - name: 1, - username: 1, - emails: 1, - roles: 1, - status: 1, - active: 1, - avatarETag: 1, - lastLogin: 1, - }; - - if (!fields || Object.keys(fields).length === 0) { - return defaultFields; - } - - return { ...defaultFields, ...fields }; -} - -/** - * get the default query if **query** is empty (`{}`) or `undefined`/`null` - * @param {Object|null|undefined} query the query from parsed jsonQuery - */ -export function getNonEmptyQuery(query) { - const defaultQuery = { - $or: [ - { 'emails.address': { $regex: '', $options: 'i' } }, - { username: { $regex: '', $options: 'i' } }, - { name: { $regex: '', $options: 'i' } }, - ], - }; - - if (!query || Object.keys(query).length === 0) { - return defaultQuery; - } - - return { ...defaultQuery, ...query }; -} diff --git a/app/api/server/lib/webdav.ts b/app/api/server/lib/webdav.ts deleted file mode 100644 index 89e5d5427a9b..000000000000 --- a/app/api/server/lib/webdav.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { WebdavAccounts } from '../../../models/server/raw'; -import { IWebdavAccount } from '../../../../definition/IWebdavAccount'; - -export async function findWebdavAccountsByUserId({ uid }: { uid: string }): Promise<{ accounts: IWebdavAccount[] }> { - return { - accounts: await WebdavAccounts.findWithUserId(uid, { - projection: { - _id: 1, - username: 1, - serverURL: 1, - name: 1, - }, - }).toArray(), - }; -} diff --git a/app/api/server/v1/assets.js b/app/api/server/v1/assets.js deleted file mode 100644 index c232d3c0ff2c..000000000000 --- a/app/api/server/v1/assets.js +++ /dev/null @@ -1,60 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { RocketChatAssets } from '../../../assets/server'; -import { API } from '../api'; -import { getUploadFormData } from '../lib/getUploadFormData'; - -API.v1.addRoute( - 'assets.setAsset', - { authRequired: true }, - { - post() { - const { refreshAllClients, ...files } = Promise.await( - getUploadFormData({ - request: this.request, - }), - ); - - const assetsKeys = Object.keys(RocketChatAssets.assets); - - const [assetName] = Object.keys(files); - - const isValidAsset = assetsKeys.includes(assetName); - if (!isValidAsset) { - throw new Meteor.Error('error-invalid-asset', 'Invalid asset'); - } - - Meteor.runAsUser(this.userId, () => { - const { [assetName]: asset } = files; - - Meteor.call('setAsset', asset.fileBuffer, asset.mimetype, assetName); - if (refreshAllClients) { - Meteor.call('refreshClients'); - } - }); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'assets.unsetAsset', - { authRequired: true }, - { - post() { - const { assetName, refreshAllClients } = this.bodyParams; - const isValidAsset = Object.keys(RocketChatAssets.assets).includes(assetName); - if (!isValidAsset) { - throw new Meteor.Error('error-invalid-asset', 'Invalid asset'); - } - Meteor.runAsUser(this.userId, () => { - Meteor.call('unsetAsset', assetName); - if (refreshAllClients) { - Meteor.call('refreshClients'); - } - }); - return API.v1.success(); - }, - }, -); diff --git a/app/api/server/v1/autotranslate.js b/app/api/server/v1/autotranslate.js deleted file mode 100644 index bb05ff15bfb6..000000000000 --- a/app/api/server/v1/autotranslate.js +++ /dev/null @@ -1,80 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { API } from '../api'; -import { settings } from '../../../settings/server'; -import { Messages } from '../../../models/server'; - -API.v1.addRoute( - 'autotranslate.getSupportedLanguages', - { authRequired: true }, - { - get() { - if (!settings.get('AutoTranslate_Enabled')) { - return API.v1.failure('AutoTranslate is disabled.'); - } - const { targetLanguage } = this.queryParams; - const languages = Meteor.runAsUser(this.userId, () => Meteor.call('autoTranslate.getSupportedLanguages', targetLanguage)); - - return API.v1.success({ languages: languages || [] }); - }, - }, -); - -API.v1.addRoute( - 'autotranslate.saveSettings', - { authRequired: true }, - { - post() { - const { roomId, field, value, defaultLanguage } = this.bodyParams; - if (!settings.get('AutoTranslate_Enabled')) { - return API.v1.failure('AutoTranslate is disabled.'); - } - - if (!roomId) { - return API.v1.failure('The bodyParam "roomId" is required.'); - } - if (!field) { - return API.v1.failure('The bodyParam "field" is required.'); - } - if (value === undefined) { - return API.v1.failure('The bodyParam "value" is required.'); - } - if (field === 'autoTranslate' && typeof value !== 'boolean') { - return API.v1.failure('The bodyParam "autoTranslate" must be a boolean.'); - } - if (field === 'autoTranslateLanguage' && typeof value !== 'string') { - return API.v1.failure('The bodyParam "autoTranslateLanguage" must be a string.'); - } - - Meteor.runAsUser(this.userId, () => - Meteor.call('autoTranslate.saveSettings', roomId, field, value === true ? '1' : String(value).valueOf(), { defaultLanguage }), - ); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'autotranslate.translateMessage', - { authRequired: true }, - { - post() { - const { messageId, targetLanguage } = this.bodyParams; - if (!settings.get('AutoTranslate_Enabled')) { - return API.v1.failure('AutoTranslate is disabled.'); - } - if (!messageId) { - return API.v1.failure('The bodyParam "messageId" is required.'); - } - const message = Messages.findOneById(messageId); - if (!message) { - return API.v1.failure('Message not found.'); - } - - const translatedMessage = Meteor.runAsUser(this.userId, () => Meteor.call('autoTranslate.translateMessage', message, targetLanguage)); - - return API.v1.success({ message: translatedMessage }); - }, - }, -); diff --git a/app/api/server/v1/banners.ts b/app/api/server/v1/banners.ts deleted file mode 100644 index b8e15946a45e..000000000000 --- a/app/api/server/v1/banners.ts +++ /dev/null @@ -1,260 +0,0 @@ -import { Match, check } from 'meteor/check'; - -import { API } from '../api'; -import { Banner } from '../../../../server/sdk'; -import { BannerPlatform } from '../../../../definition/IBanner'; - -/** - * @deprecated - * @openapi - * /api/v1/banners.getNew: - * get: - * description: Gets the banners to be shown to the authenticated user - * deprecated: true - * security: - * $ref: '#/security/authenticated' - * parameters: - * - name: platform - * in: query - * description: The platform rendering the banner - * required: true - * schema: - * type: string - * enum: [web, mobile] - * example: web - * - name: bid - * in: query - * description: The id of a single banner - * required: false - * schema: - * type: string - * example: ByehQjC44FwMeiLbX - * responses: - * 200: - * description: The banners matching the criteria - * content: - * application/json: - * schema: - * allOf: - * - $ref: '#/components/schemas/ApiSuccessV1' - * - type: object - * properties: - * banners: - * type: array - * items: - * $ref: '#/components/schemas/IBanner' - * default: - * description: Unexpected error - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/ApiFailureV1' - */ -API.v1.addRoute( - 'banners.getNew', - { authRequired: true }, - { - // deprecated - async get() { - check( - this.queryParams, - Match.ObjectIncluding({ - platform: Match.OneOf(...Object.values(BannerPlatform)), - bid: Match.Maybe(String), - }), - ); - - const { platform, bid: bannerId } = this.queryParams; - - const banners = await Banner.getBannersForUser(this.userId, platform, bannerId ?? undefined); - - return API.v1.success({ banners }); - }, - }, -); - -/** - * @openapi - * /api/v1/banners/{id}: - * get: - * description: Gets the banner to be shown to the authenticated user - * security: - * $ref: '#/security/authenticated' - * parameters: - * - name: platform - * in: query - * description: The platform rendering the banner - * required: true - * schema: - * type: string - * enum: [web, mobile] - * example: web - * - name: id - * in: path - * description: The id of the banner - * required: true - * schema: - * type: string - * example: ByehQjC44FwMeiLbX - * responses: - * 200: - * description: | - * A collection with a single banner matching the criteria; an empty - * collection otherwise - * content: - * application/json: - * schema: - * allOf: - * - $ref: '#/components/schemas/ApiSuccessV1' - * - type: object - * properties: - * banners: - * type: array - * items: - * $ref: '#/components/schemas/IBanner' - * default: - * description: Unexpected error - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/ApiFailureV1' - */ -API.v1.addRoute( - 'banners/:id', - { authRequired: true }, - { - // TODO: move to users/:id/banners - async get() { - check( - this.urlParams, - Match.ObjectIncluding({ - id: Match.Where((id: unknown): id is string => typeof id === 'string' && Boolean(id.trim())), - }), - ); - check( - this.queryParams, - Match.ObjectIncluding({ - platform: Match.OneOf(...Object.values(BannerPlatform)), - }), - ); - - const { platform } = this.queryParams; - const { id } = this.urlParams; - - const banners = await Banner.getBannersForUser(this.userId, platform, id); - - return API.v1.success({ banners }); - }, - }, -); - -/** - * @openapi - * /api/v1/banners: - * get: - * description: Gets the banners to be shown to the authenticated user - * security: - * $ref: '#/security/authenticated' - * parameters: - * - name: platform - * in: query - * description: The platform rendering the banner - * required: true - * schema: - * type: string - * enum: [web, mobile] - * example: web - * responses: - * 200: - * description: The banners matching the criteria - * content: - * application/json: - * schema: - * allOf: - * - $ref: '#/components/schemas/ApiSuccessV1' - * - type: object - * properties: - * banners: - * type: array - * items: - * $ref: '#/components/schemas/IBanner' - * default: - * description: Unexpected error - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/ApiFailureV1' - */ -API.v1.addRoute( - 'banners', - { authRequired: true }, - { - async get() { - check( - this.queryParams, - Match.ObjectIncluding({ - platform: Match.OneOf(...Object.values(BannerPlatform)), - }), - ); - - const { platform } = this.queryParams; - - const banners = await Banner.getBannersForUser(this.userId, platform); - - return API.v1.success({ banners }); - }, - }, -); - -/** - * @openapi - * /api/v1/banners.dismiss: - * post: - * description: Dismisses a banner - * security: - * $ref: '#/security/authenticated' - * requestBody: - * content: - * application/json: - * schema: - * type: object - * properties: - * bannerId: - * type: string - * example: | - * { - * "bannerId": "ByehQjC44FwMeiLbX" - * } - * responses: - * 200: - * description: The banners matching the criteria - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/ApiSuccessV1' - * default: - * description: Unexpected error - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/ApiFailureV1' - */ -API.v1.addRoute( - 'banners.dismiss', - { authRequired: true }, - { - async post() { - check( - this.bodyParams, - Match.ObjectIncluding({ - bannerId: Match.Where((id: unknown): id is string => typeof id === 'string' && Boolean(id.trim())), - }), - ); - - const { bannerId } = this.bodyParams; - - await Banner.dismiss(this.userId, bannerId); - return API.v1.success(); - }, - }, -); diff --git a/app/api/server/v1/channels.js b/app/api/server/v1/channels.js deleted file mode 100644 index 24b3da99e45f..000000000000 --- a/app/api/server/v1/channels.js +++ /dev/null @@ -1,1394 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Match, check } from 'meteor/check'; -import _ from 'underscore'; - -import { Rooms, Subscriptions, Messages, Users } from '../../../models/server'; -import { Integrations, Uploads } from '../../../models/server/raw'; -import { canAccessRoom, hasPermission, hasAtLeastOnePermission, hasAllPermission } from '../../../authorization/server'; -import { mountIntegrationQueryBasedOnPermissions } from '../../../integrations/server/lib/mountQueriesBasedOnPermission'; -import { normalizeMessagesForUser } from '../../../utils/server/lib/normalizeMessagesForUser'; -import { API } from '../api'; -import { settings } from '../../../settings/server'; -import { Team } from '../../../../server/sdk'; -import { findUsersOfRoom } from '../../../../server/lib/findUsersOfRoom'; - -// Returns the channel IF found otherwise it will return the failure of why it didn't. Check the `statusCode` property -function findChannelByIdOrName({ params, checkedArchived = true, userId }) { - if ((!params.roomId || !params.roomId.trim()) && (!params.roomName || !params.roomName.trim())) { - throw new Meteor.Error('error-roomid-param-not-provided', 'The parameter "roomId" or "roomName" is required'); - } - - const fields = { ...API.v1.defaultFieldsToExclude }; - - let room; - if (params.roomId) { - room = Rooms.findOneById(params.roomId, { fields }); - } else if (params.roomName) { - room = Rooms.findOneByName(params.roomName, { fields }); - } - - if (!room || (room.t !== 'c' && room.t !== 'l')) { - throw new Meteor.Error('error-room-not-found', 'The required "roomId" or "roomName" param provided does not match any channel'); - } - - if (checkedArchived && room.archived) { - throw new Meteor.Error('error-room-archived', `The channel, ${room.name}, is archived`); - } - if (userId && room.lastMessage) { - const [lastMessage] = normalizeMessagesForUser([room.lastMessage], userId); - room.lastMessage = lastMessage; - } - - return room; -} - -API.v1.addRoute( - 'channels.addAll', - { authRequired: true }, - { - post() { - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - Meteor.runAsUser(this.userId, () => { - Meteor.call('addAllUserToRoom', findResult._id, this.bodyParams.activeUsersOnly); - }); - - return API.v1.success({ - channel: findChannelByIdOrName({ params: this.requestParams(), userId: this.userId }), - }); - }, - }, -); - -API.v1.addRoute( - 'channels.addModerator', - { authRequired: true }, - { - post() { - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - const user = this.getUserFromParams(); - - Meteor.runAsUser(this.userId, () => { - Meteor.call('addRoomModerator', findResult._id, user._id); - }); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'channels.addOwner', - { authRequired: true }, - { - post() { - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - const user = this.getUserFromParams(); - - Meteor.runAsUser(this.userId, () => { - Meteor.call('addRoomOwner', findResult._id, user._id); - }); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'channels.archive', - { authRequired: true }, - { - post() { - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - Meteor.runAsUser(this.userId, () => { - Meteor.call('archiveRoom', findResult._id); - }); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'channels.close', - { authRequired: true }, - { - post() { - const findResult = findChannelByIdOrName({ - params: this.requestParams(), - checkedArchived: false, - }); - - const sub = Subscriptions.findOneByRoomIdAndUserId(findResult._id, this.userId); - - if (!sub) { - return API.v1.failure(`The user/callee is not in the channel "${findResult.name}.`); - } - - if (!sub.open) { - return API.v1.failure(`The channel, ${findResult.name}, is already closed to the sender`); - } - - Meteor.runAsUser(this.userId, () => { - Meteor.call('hideRoom', findResult._id); - }); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'channels.counters', - { authRequired: true }, - { - get() { - const access = hasPermission(this.userId, 'view-room-administration'); - const { userId } = this.requestParams(); - let user = this.userId; - let unreads = null; - let userMentions = null; - let unreadsFrom = null; - let joined = false; - let msgs = null; - let latest = null; - let members = null; - - if (userId) { - if (!access) { - return API.v1.unauthorized(); - } - user = userId; - } - const room = findChannelByIdOrName({ - params: this.requestParams(), - returnUsernames: true, - }); - const subscription = Subscriptions.findOneByRoomIdAndUserId(room._id, user); - const lm = room.lm ? room.lm : room._updatedAt; - - if (typeof subscription !== 'undefined' && subscription.open) { - unreads = Messages.countVisibleByRoomIdBetweenTimestampsInclusive(subscription.rid, subscription.ls, lm); - unreadsFrom = subscription.ls || subscription.ts; - userMentions = subscription.userMentions; - joined = true; - } - - if (access || joined) { - msgs = room.msgs; - latest = lm; - members = room.usersCount; - } - - return API.v1.success({ - joined, - members, - unreads, - unreadsFrom, - msgs, - latest, - userMentions, - }); - }, - }, -); - -// Channel -> create - -function createChannelValidator(params) { - if (!hasPermission(params.user.value, 'create-c')) { - throw new Error('unauthorized'); - } - - if (!params.name || !params.name.value) { - throw new Error(`Param "${params.name.key}" is required`); - } - - if (params.members && params.members.value && !_.isArray(params.members.value)) { - throw new Error(`Param "${params.members.key}" must be an array if provided`); - } - - if (params.customFields && params.customFields.value && !(typeof params.customFields.value === 'object')) { - throw new Error(`Param "${params.customFields.key}" must be an object if provided`); - } - - if (params.teams.value && !Array.isArray(params.teams.value)) { - throw new Error(`Param ${params.teams.key} must be an array`); - } -} - -function createChannel(userId, params) { - const readOnly = typeof params.readOnly !== 'undefined' ? params.readOnly : false; - const id = Meteor.runAsUser(userId, () => - Meteor.call('createChannel', params.name, params.members ? params.members : [], readOnly, params.customFields, params.extraData), - ); - - return { - channel: findChannelByIdOrName({ params: { roomId: id.rid }, userId: this.userId }), - }; -} - -API.channels = {}; -API.channels.create = { - validate: createChannelValidator, - execute: createChannel, -}; - -API.v1.addRoute( - 'channels.create', - { authRequired: true }, - { - post() { - const { userId, bodyParams } = this; - - let error; - - try { - API.channels.create.validate({ - user: { - value: userId, - }, - name: { - value: bodyParams.name, - key: 'name', - }, - members: { - value: bodyParams.members, - key: 'members', - }, - teams: { - value: bodyParams.teams, - key: 'teams', - }, - }); - } catch (e) { - if (e.message === 'unauthorized') { - error = API.v1.unauthorized(); - } else { - error = API.v1.failure(e.message); - } - } - - if (error) { - return error; - } - - if (bodyParams.teams) { - const canSeeAllTeams = hasPermission(this.userId, 'view-all-teams'); - const teams = Promise.await(Team.listByNames(bodyParams.teams, { projection: { _id: 1 } })); - const teamMembers = []; - - for (const team of teams) { - const { records: members } = Promise.await( - Team.members(this.userId, team._id, canSeeAllTeams, { - offset: 0, - count: Number.MAX_SAFE_INTEGER, - }), - ); - const uids = members.map((member) => member.user.username); - teamMembers.push(...uids); - } - - const membersToAdd = new Set([...teamMembers, ...bodyParams.members]); - bodyParams.members = [...membersToAdd]; - } - - return API.v1.success(API.channels.create.execute(userId, bodyParams)); - }, - }, -); - -API.v1.addRoute( - 'channels.delete', - { authRequired: true }, - { - post() { - const findResult = findChannelByIdOrName({ - params: this.requestParams(), - checkedArchived: false, - }); - - Meteor.runAsUser(this.userId, () => { - Meteor.call('eraseRoom', findResult._id); - }); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'channels.files', - { authRequired: true }, - { - get() { - const findResult = findChannelByIdOrName({ - params: this.requestParams(), - checkedArchived: false, - }); - const addUserObjectToEveryObject = (file) => { - if (file.userId) { - file = this.insertUserObject({ object: file, userId: file.userId }); - } - return file; - }; - - if (!canAccessRoom(findResult, { _id: this.userId })) { - return API.v1.unauthorized(); - } - - const { offset, count } = this.getPaginationItems(); - const { sort, fields, query } = this.parseJsonQuery(); - - const ourQuery = Object.assign({}, query, { rid: findResult._id }); - - const files = Promise.await( - Uploads.find(ourQuery, { - sort: sort || { name: 1 }, - skip: offset, - limit: count, - fields, - }).toArray(), - ); - - return API.v1.success({ - files: files.map(addUserObjectToEveryObject), - count: files.length, - offset, - total: Promise.await(Uploads.find(ourQuery).count()), - }); - }, - }, -); - -API.v1.addRoute( - 'channels.getIntegrations', - { authRequired: true }, - { - get() { - if ( - !hasAtLeastOnePermission(this.userId, [ - 'manage-outgoing-integrations', - 'manage-own-outgoing-integrations', - 'manage-incoming-integrations', - 'manage-own-incoming-integrations', - ]) - ) { - return API.v1.unauthorized(); - } - - const findResult = findChannelByIdOrName({ - params: this.requestParams(), - checkedArchived: false, - }); - - let includeAllPublicChannels = true; - if (typeof this.queryParams.includeAllPublicChannels !== 'undefined') { - includeAllPublicChannels = this.queryParams.includeAllPublicChannels === 'true'; - } - - let ourQuery = { - channel: `#${findResult.name}`, - }; - - if (includeAllPublicChannels) { - ourQuery.channel = { - $in: [ourQuery.channel, 'all_public_channels'], - }; - } - - const { offset, count } = this.getPaginationItems(); - const { sort, fields: projection, query } = this.parseJsonQuery(); - - ourQuery = Object.assign(mountIntegrationQueryBasedOnPermissions(this.userId), query, ourQuery); - const cursor = Integrations.find(ourQuery, { - sort: sort || { _createdAt: 1 }, - skip: offset, - limit: count, - projection, - }); - - const integrations = Promise.await(cursor.toArray()); - const total = Promise.await(cursor.count()); - - return API.v1.success({ - integrations, - count: integrations.length, - offset, - total, - }); - }, - }, -); - -API.v1.addRoute( - 'channels.history', - { authRequired: true }, - { - get() { - const findResult = findChannelByIdOrName({ - params: this.requestParams(), - checkedArchived: false, - }); - - let latestDate = new Date(); - if (this.queryParams.latest) { - latestDate = new Date(this.queryParams.latest); - } - - let oldestDate = undefined; - if (this.queryParams.oldest) { - oldestDate = new Date(this.queryParams.oldest); - } - - const inclusive = this.queryParams.inclusive || false; - - let count = 20; - if (this.queryParams.count) { - count = parseInt(this.queryParams.count); - } - - let offset = 0; - if (this.queryParams.offset) { - offset = parseInt(this.queryParams.offset); - } - - const unreads = this.queryParams.unreads || false; - - const showThreadMessages = this.queryParams.showThreadMessages !== 'false'; - - const result = Meteor.call('getChannelHistory', { - rid: findResult._id, - latest: latestDate, - oldest: oldestDate, - inclusive, - offset, - count, - unreads, - showThreadMessages, - }); - - if (!result) { - return API.v1.unauthorized(); - } - - return API.v1.success(result); - }, - }, -); - -API.v1.addRoute( - 'channels.info', - { authRequired: true }, - { - get() { - return API.v1.success({ - channel: findChannelByIdOrName({ - params: this.requestParams(), - checkedArchived: false, - userId: this.userId, - }), - }); - }, - }, -); - -API.v1.addRoute( - 'channels.invite', - { authRequired: true }, - { - post() { - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - const users = this.getUserListFromParams(); - - if (!users.length) { - return API.v1.failure('invalid-user-invite-list', 'Cannot invite if no users are provided'); - } - - Meteor.runAsUser(this.userId, () => { - Meteor.call('addUsersToRoom', { rid: findResult._id, users: users.map((u) => u.username) }); - }); - - return API.v1.success({ - channel: findChannelByIdOrName({ params: this.requestParams(), userId: this.userId }), - }); - }, - }, -); - -API.v1.addRoute( - 'channels.join', - { authRequired: true }, - { - post() { - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - Meteor.runAsUser(this.userId, () => { - Meteor.call('joinRoom', findResult._id, this.bodyParams.joinCode); - }); - - return API.v1.success({ - channel: findChannelByIdOrName({ params: this.requestParams(), userId: this.userId }), - }); - }, - }, -); - -API.v1.addRoute( - 'channels.kick', - { authRequired: true }, - { - post() { - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - const user = this.getUserFromParams(); - - Meteor.runAsUser(this.userId, () => { - Meteor.call('removeUserFromRoom', { rid: findResult._id, username: user.username }); - }); - - return API.v1.success({ - channel: findChannelByIdOrName({ params: this.requestParams(), userId: this.userId }), - }); - }, - }, -); - -API.v1.addRoute( - 'channels.leave', - { authRequired: true }, - { - post() { - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - Meteor.runAsUser(this.userId, () => { - Meteor.call('leaveRoom', findResult._id); - }); - - return API.v1.success({ - channel: findChannelByIdOrName({ params: this.requestParams(), userId: this.userId }), - }); - }, - }, -); - -API.v1.addRoute( - 'channels.list', - { authRequired: true }, - { - get: { - // This is defined as such only to provide an example of how the routes can be defined :X - action() { - const { offset, count } = this.getPaginationItems(); - const { sort, fields, query } = this.parseJsonQuery(); - const hasPermissionToSeeAllPublicChannels = hasPermission(this.userId, 'view-c-room'); - - const ourQuery = { ...query, t: 'c' }; - - if (!hasPermissionToSeeAllPublicChannels) { - if (!hasPermission(this.userId, 'view-joined-room')) { - return API.v1.unauthorized(); - } - const roomIds = Subscriptions.findByUserIdAndType(this.userId, 'c', { - fields: { rid: 1 }, - }) - .fetch() - .map((s) => s.rid); - ourQuery._id = { $in: roomIds }; - } - - // teams filter - I would love to have a way to apply this filter @ db level :( - const ids = Subscriptions.cachedFindByUserId(this.userId, { fields: { rid: 1 } }) - .fetch() - .map((item) => item.rid); - - ourQuery.$or = [ - { - teamId: { - $exists: false, - }, - }, - { - teamId: { - $exists: true, - }, - _id: { - $in: ids, - }, - }, - ]; - - const cursor = Rooms.find(ourQuery, { - sort: sort || { name: 1 }, - skip: offset, - limit: count, - fields, - }); - - const total = cursor.count(); - - const rooms = cursor.fetch(); - - return API.v1.success({ - channels: rooms.map((room) => this.composeRoomWithLastMessage(room, this.userId)), - count: rooms.length, - offset, - total, - }); - }, - }, - }, -); - -API.v1.addRoute( - 'channels.list.joined', - { authRequired: true }, - { - get() { - const { offset, count } = this.getPaginationItems(); - const { sort, fields } = this.parseJsonQuery(); - - // TODO: CACHE: Add Breacking notice since we removed the query param - const cursor = Rooms.findBySubscriptionTypeAndUserId('c', this.userId, { - sort: sort || { name: 1 }, - skip: offset, - limit: count, - fields, - }); - - const totalCount = cursor.count(); - const rooms = cursor.fetch(); - - return API.v1.success({ - channels: rooms.map((room) => this.composeRoomWithLastMessage(room, this.userId)), - offset, - count: rooms.length, - total: totalCount, - }); - }, - }, -); - -API.v1.addRoute( - 'channels.members', - { authRequired: true }, - { - get() { - const findResult = findChannelByIdOrName({ - params: this.requestParams(), - checkedArchived: false, - }); - - if (findResult.broadcast && !hasPermission(this.userId, 'view-broadcast-member-list')) { - return API.v1.unauthorized(); - } - - const { offset: skip, count: limit } = this.getPaginationItems(); - const { sort = {} } = this.parseJsonQuery(); - - check( - this.queryParams, - Match.ObjectIncluding({ - status: Match.Maybe([String]), - filter: Match.Maybe(String), - }), - ); - const { status, filter } = this.queryParams; - - const cursor = findUsersOfRoom({ - rid: findResult._id, - ...(status && { status: { $in: status } }), - skip, - limit, - filter, - ...(sort?.username && { sort: { username: sort.username } }), - }); - - const total = cursor.count(); - const members = cursor.fetch(); - - return API.v1.success({ - members, - count: members.length, - offset: skip, - total, - }); - }, - }, -); - -API.v1.addRoute( - 'channels.messages', - { authRequired: true }, - { - get() { - const findResult = findChannelByIdOrName({ - params: this.requestParams(), - checkedArchived: false, - }); - const { offset, count } = this.getPaginationItems(); - const { sort, fields, query } = this.parseJsonQuery(); - - const ourQuery = Object.assign({}, query, { rid: findResult._id }); - - // Special check for the permissions - if ( - hasPermission(this.userId, 'view-joined-room') && - !Subscriptions.findOneByRoomIdAndUserId(findResult._id, this.userId, { fields: { _id: 1 } }) - ) { - return API.v1.unauthorized(); - } - if (!hasPermission(this.userId, 'view-c-room')) { - return API.v1.unauthorized(); - } - - const cursor = Messages.find(ourQuery, { - sort: sort || { ts: -1 }, - skip: offset, - limit: count, - fields, - }); - - const total = cursor.count(); - const messages = cursor.fetch(); - - return API.v1.success({ - messages: normalizeMessagesForUser(messages, this.userId), - count: messages.length, - offset, - total, - }); - }, - }, -); -// TODO: CACHE: I dont like this method( functionality and how we implemented ) its very expensive -// TODO check if this code is better or not -// RocketChat.API.v1.addRoute('channels.online', { authRequired: true }, { -// get() { -// const { query } = this.parseJsonQuery(); -// const ourQuery = Object.assign({}, query, { t: 'c' }); - -// const room = RocketChat.models.Rooms.findOne(ourQuery); - -// if (room == null) { -// return RocketChat.API.v1.failure('Channel does not exists'); -// } - -// const ids = RocketChat.models.Subscriptions.find({ rid: room._id }, { fields: { 'u._id': 1 } }).fetch().map(sub => sub.u._id); - -// const online = RocketChat.models.Users.find({ -// username: { $exists: 1 }, -// _id: { $in: ids }, -// status: { $in: ['online', 'away', 'busy'] } -// }, { -// fields: { username: 1 } -// }).fetch(); - -// return RocketChat.API.v1.success({ -// online -// }); -// } -// }); - -API.v1.addRoute( - 'channels.online', - { authRequired: true }, - { - get() { - const { query } = this.parseJsonQuery(); - if (!query || Object.keys(query).length === 0) { - return API.v1.failure('Invalid query'); - } - - const ourQuery = Object.assign({}, query, { t: 'c' }); - - const room = Rooms.findOne(ourQuery); - if (room == null) { - return API.v1.failure('Channel does not exists'); - } - - const user = this.getLoggedInUser(); - - if (!canAccessRoom(room, user)) { - throw new Meteor.Error('error-not-allowed', 'Not Allowed'); - } - - const online = Users.findUsersNotOffline({ - fields: { username: 1 }, - }).fetch(); - - const onlineInRoom = []; - online.forEach((user) => { - const subscription = Subscriptions.findOneByRoomIdAndUserId(room._id, user._id, { - fields: { _id: 1 }, - }); - if (subscription) { - onlineInRoom.push({ - _id: user._id, - username: user.username, - }); - } - }); - - return API.v1.success({ - online: onlineInRoom, - }); - }, - }, -); - -API.v1.addRoute( - 'channels.open', - { authRequired: true }, - { - post() { - const findResult = findChannelByIdOrName({ - params: this.requestParams(), - checkedArchived: false, - }); - - const sub = Subscriptions.findOneByRoomIdAndUserId(findResult._id, this.userId); - - if (!sub) { - return API.v1.failure(`The user/callee is not in the channel "${findResult.name}".`); - } - - if (sub.open) { - return API.v1.failure(`The channel, ${findResult.name}, is already open to the sender`); - } - - Meteor.runAsUser(this.userId, () => { - Meteor.call('openRoom', findResult._id); - }); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'channels.removeModerator', - { authRequired: true }, - { - post() { - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - const user = this.getUserFromParams(); - - Meteor.runAsUser(this.userId, () => { - Meteor.call('removeRoomModerator', findResult._id, user._id); - }); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'channels.removeOwner', - { authRequired: true }, - { - post() { - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - const user = this.getUserFromParams(); - - Meteor.runAsUser(this.userId, () => { - Meteor.call('removeRoomOwner', findResult._id, user._id); - }); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'channels.rename', - { authRequired: true }, - { - post() { - if (!this.bodyParams.name || !this.bodyParams.name.trim()) { - return API.v1.failure('The bodyParam "name" is required'); - } - - const findResult = findChannelByIdOrName({ params: { roomId: this.bodyParams.roomId } }); - - if (findResult.name === this.bodyParams.name) { - return API.v1.failure('The channel name is the same as what it would be renamed to.'); - } - - Meteor.runAsUser(this.userId, () => { - Meteor.call('saveRoomSettings', findResult._id, 'roomName', this.bodyParams.name); - }); - - return API.v1.success({ - channel: findChannelByIdOrName({ - params: { roomId: this.bodyParams.roomId }, - userId: this.userId, - }), - }); - }, - }, -); - -API.v1.addRoute( - 'channels.setCustomFields', - { authRequired: true }, - { - post() { - if (!this.bodyParams.customFields || !(typeof this.bodyParams.customFields === 'object')) { - return API.v1.failure('The bodyParam "customFields" is required with a type like object.'); - } - - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - Meteor.runAsUser(this.userId, () => { - Meteor.call('saveRoomSettings', findResult._id, 'roomCustomFields', this.bodyParams.customFields); - }); - - return API.v1.success({ - channel: findChannelByIdOrName({ params: this.requestParams(), userId: this.userId }), - }); - }, - }, -); - -API.v1.addRoute( - 'channels.setDefault', - { authRequired: true }, - { - post() { - if (typeof this.bodyParams.default === 'undefined') { - return API.v1.failure('The bodyParam "default" is required', 'error-channels-setdefault-is-same'); - } - - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - if (findResult.default === this.bodyParams.default) { - return API.v1.failure( - 'The channel default setting is the same as what it would be changed to.', - 'error-channels-setdefault-missing-default-param', - ); - } - - Meteor.runAsUser(this.userId, () => { - Meteor.call( - 'saveRoomSettings', - findResult._id, - 'default', - ['true', '1'].includes(this.bodyParams.default.toString().toLowerCase()), - ); - }); - - return API.v1.success({ - channel: findChannelByIdOrName({ params: this.requestParams(), userId: this.userId }), - }); - }, - }, -); - -API.v1.addRoute( - 'channels.setDescription', - { authRequired: true }, - { - post() { - if (!this.bodyParams.hasOwnProperty('description')) { - return API.v1.failure('The bodyParam "description" is required'); - } - - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - if (findResult.description === this.bodyParams.description) { - return API.v1.failure('The channel description is the same as what it would be changed to.'); - } - - Meteor.runAsUser(this.userId, () => { - Meteor.call('saveRoomSettings', findResult._id, 'roomDescription', this.bodyParams.description); - }); - - return API.v1.success({ - description: this.bodyParams.description, - }); - }, - }, -); - -API.v1.addRoute( - 'channels.setJoinCode', - { authRequired: true }, - { - post() { - if (!this.bodyParams.joinCode || !this.bodyParams.joinCode.trim()) { - return API.v1.failure('The bodyParam "joinCode" is required'); - } - - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - Meteor.runAsUser(this.userId, () => { - Meteor.call('saveRoomSettings', findResult._id, 'joinCode', this.bodyParams.joinCode); - }); - - return API.v1.success({ - channel: findChannelByIdOrName({ params: this.requestParams(), userId: this.userId }), - }); - }, - }, -); - -API.v1.addRoute( - 'channels.setPurpose', - { authRequired: true }, - { - post() { - if (!this.bodyParams.hasOwnProperty('purpose')) { - return API.v1.failure('The bodyParam "purpose" is required'); - } - - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - if (findResult.description === this.bodyParams.purpose) { - return API.v1.failure('The channel purpose (description) is the same as what it would be changed to.'); - } - - Meteor.runAsUser(this.userId, () => { - Meteor.call('saveRoomSettings', findResult._id, 'roomDescription', this.bodyParams.purpose); - }); - - return API.v1.success({ - purpose: this.bodyParams.purpose, - }); - }, - }, -); - -API.v1.addRoute( - 'channels.setReadOnly', - { authRequired: true }, - { - post() { - if (typeof this.bodyParams.readOnly === 'undefined') { - return API.v1.failure('The bodyParam "readOnly" is required'); - } - - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - if (findResult.ro === this.bodyParams.readOnly) { - return API.v1.failure('The channel read only setting is the same as what it would be changed to.'); - } - - Meteor.runAsUser(this.userId, () => { - Meteor.call('saveRoomSettings', findResult._id, 'readOnly', this.bodyParams.readOnly); - }); - - return API.v1.success({ - channel: findChannelByIdOrName({ params: this.requestParams(), userId: this.userId }), - }); - }, - }, -); - -API.v1.addRoute( - 'channels.setTopic', - { authRequired: true }, - { - post() { - if (!this.bodyParams.hasOwnProperty('topic')) { - return API.v1.failure('The bodyParam "topic" is required'); - } - - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - if (findResult.topic === this.bodyParams.topic) { - return API.v1.failure('The channel topic is the same as what it would be changed to.'); - } - - Meteor.runAsUser(this.userId, () => { - Meteor.call('saveRoomSettings', findResult._id, 'roomTopic', this.bodyParams.topic); - }); - - return API.v1.success({ - topic: this.bodyParams.topic, - }); - }, - }, -); - -API.v1.addRoute( - 'channels.setAnnouncement', - { authRequired: true }, - { - post() { - if (!this.bodyParams.hasOwnProperty('announcement')) { - return API.v1.failure('The bodyParam "announcement" is required'); - } - - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - Meteor.runAsUser(this.userId, () => { - Meteor.call('saveRoomSettings', findResult._id, 'roomAnnouncement', this.bodyParams.announcement); - }); - - return API.v1.success({ - announcement: this.bodyParams.announcement, - }); - }, - }, -); - -API.v1.addRoute( - 'channels.setType', - { authRequired: true }, - { - post() { - if (!this.bodyParams.type || !this.bodyParams.type.trim()) { - return API.v1.failure('The bodyParam "type" is required'); - } - - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - if (findResult.t === this.bodyParams.type) { - return API.v1.failure('The channel type is the same as what it would be changed to.'); - } - - Meteor.runAsUser(this.userId, () => { - Meteor.call('saveRoomSettings', findResult._id, 'roomType', this.bodyParams.type); - }); - - return API.v1.success({ - channel: this.composeRoomWithLastMessage(Rooms.findOneById(findResult._id, { fields: API.v1.defaultFieldsToExclude }), this.userId), - }); - }, - }, -); - -API.v1.addRoute( - 'channels.unarchive', - { authRequired: true }, - { - post() { - const findResult = findChannelByIdOrName({ - params: this.requestParams(), - checkedArchived: false, - }); - - if (!findResult.archived) { - return API.v1.failure(`The channel, ${findResult.name}, is not archived`); - } - - Meteor.runAsUser(this.userId, () => { - Meteor.call('unarchiveRoom', findResult._id); - }); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'channels.getAllUserMentionsByChannel', - { authRequired: true }, - { - get() { - const { roomId } = this.requestParams(); - const { offset, count } = this.getPaginationItems(); - const { sort } = this.parseJsonQuery(); - - if (!roomId) { - return API.v1.failure('The request param "roomId" is required'); - } - - const mentions = Meteor.runAsUser(this.userId, () => - Meteor.call('getUserMentionsByChannel', { - roomId, - options: { - sort: sort || { ts: 1 }, - skip: offset, - limit: count, - }, - }), - ); - - const allMentions = Meteor.runAsUser(this.userId, () => - Meteor.call('getUserMentionsByChannel', { - roomId, - options: {}, - }), - ); - - return API.v1.success({ - mentions, - count: mentions.length, - offset, - total: allMentions.length, - }); - }, - }, -); - -API.v1.addRoute( - 'channels.roles', - { authRequired: true }, - { - get() { - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - const roles = Meteor.runAsUser(this.userId, () => Meteor.call('getRoomRoles', findResult._id)); - - return API.v1.success({ - roles, - }); - }, - }, -); - -API.v1.addRoute( - 'channels.moderators', - { authRequired: true }, - { - get() { - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - const moderators = Subscriptions.findByRoomIdAndRoles(findResult._id, ['moderator'], { - fields: { u: 1 }, - }) - .fetch() - .map((sub) => sub.u); - - return API.v1.success({ - moderators, - }); - }, - }, -); - -API.v1.addRoute( - 'channels.addLeader', - { authRequired: true }, - { - post() { - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - const user = this.getUserFromParams(); - - Meteor.runAsUser(this.userId, () => { - Meteor.call('addRoomLeader', findResult._id, user._id); - }); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'channels.removeLeader', - { authRequired: true }, - { - post() { - const findResult = findChannelByIdOrName({ params: this.requestParams() }); - - const user = this.getUserFromParams(); - - Meteor.runAsUser(this.userId, () => { - Meteor.call('removeRoomLeader', findResult._id, user._id); - }); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'channels.anonymousread', - { authRequired: false }, - { - get() { - const findResult = findChannelByIdOrName({ - params: this.requestParams(), - checkedArchived: false, - }); - const { offset, count } = this.getPaginationItems(); - const { sort, fields, query } = this.parseJsonQuery(); - - const ourQuery = Object.assign({}, query, { rid: findResult._id }); - - if (!settings.get('Accounts_AllowAnonymousRead')) { - throw new Meteor.Error('error-not-allowed', 'Enable "Allow Anonymous Read"', { - method: 'channels.anonymousread', - }); - } - - const cursor = Messages.find(ourQuery, { - sort: sort || { ts: -1 }, - skip: offset, - limit: count, - fields, - }); - - const total = cursor.count(); - const messages = cursor.fetch(); - - return API.v1.success({ - messages: normalizeMessagesForUser(messages, this.userId), - count: messages.length, - offset, - total, - }); - }, - }, -); - -API.v1.addRoute( - 'channels.convertToTeam', - { authRequired: true }, - { - post() { - if (!hasAllPermission(this.userId, ['create-team', 'edit-room'])) { - return API.v1.unauthorized(); - } - - const { channelId, channelName } = this.bodyParams; - - if (!channelId && !channelName) { - return API.v1.failure('The parameter "channelId" or "channelName" is required'); - } - - const room = findChannelByIdOrName({ - params: { - roomId: channelId, - roomName: channelName, - }, - userId: this.userId, - }); - - if (!room) { - return API.v1.failure('Channel not found'); - } - - const subscriptions = Subscriptions.findByRoomId(room._id, { - fields: { 'u._id': 1 }, - }); - - const members = subscriptions.fetch().map((s) => s.u && s.u._id); - - const teamData = { - team: { - name: room.name, - type: room.t === 'c' ? 0 : 1, - }, - members, - room: { - name: room.name, - id: room._id, - }, - }; - - const team = Promise.await(Team.create(this.userId, teamData)); - - return API.v1.success({ team }); - }, - }, -); diff --git a/app/api/server/v1/cloud.ts b/app/api/server/v1/cloud.ts deleted file mode 100644 index 9ce3d6f02d29..000000000000 --- a/app/api/server/v1/cloud.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { check } from 'meteor/check'; - -import { API } from '../api'; -import { hasRole, hasPermission } from '../../../authorization/server'; -import { saveRegistrationData } from '../../../cloud/server/functions/saveRegistrationData'; -import { retrieveRegistrationStatus } from '../../../cloud/server/functions/retrieveRegistrationStatus'; -import { startRegisterWorkspaceSetupWizard } from '../../../cloud/server/functions/startRegisterWorkspaceSetupWizard'; -import { getConfirmationPoll } from '../../../cloud/server/functions/getConfirmationPoll'; - -API.v1.addRoute( - 'cloud.manualRegister', - { authRequired: true }, - { - async post() { - check(this.bodyParams, { - cloudBlob: String, - }); - - if (!hasRole(this.userId, 'admin')) { - return API.v1.unauthorized(); - } - - const registrationInfo = retrieveRegistrationStatus(); - - if (registrationInfo.workspaceRegistered) { - return API.v1.failure('Workspace is already registered'); - } - - const settingsData = JSON.parse(Buffer.from(this.bodyParams.cloudBlob, 'base64').toString()); - - await saveRegistrationData(settingsData); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'cloud.createRegistrationIntent', - { authRequired: true }, - { - async post() { - check(this.bodyParams, { - resend: Boolean, - email: String, - }); - - if (!hasPermission(this.userId, 'manage-cloud')) { - return API.v1.unauthorized(); - } - - const intentData = await startRegisterWorkspaceSetupWizard(this.bodyParams.resend, this.bodyParams.email); - - if (intentData) { - return API.v1.success({ intentData }); - } - - return API.v1.failure('Invalid query'); - }, - }, -); - -API.v1.addRoute( - 'cloud.confirmationPoll', - { authRequired: true }, - { - async get() { - const { deviceCode } = this.queryParams; - check(this.queryParams, { - deviceCode: String, - }); - - if (!hasPermission(this.userId, 'manage-cloud')) { - return API.v1.unauthorized(); - } - - if (!deviceCode) { - return API.v1.failure('Invalid query'); - } - - const pollData = await getConfirmationPoll(deviceCode); - if (pollData) { - if ('successful' in pollData && pollData.successful) { - Promise.await(saveRegistrationData(pollData.payload)); - } - return API.v1.success({ pollData }); - } - - return API.v1.failure('Invalid query'); - }, - }, -); diff --git a/app/api/server/v1/commands.js b/app/api/server/v1/commands.js deleted file mode 100644 index 0862e2325b00..000000000000 --- a/app/api/server/v1/commands.js +++ /dev/null @@ -1,346 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Random } from 'meteor/random'; -import objectPath from 'object-path'; - -import { slashCommands } from '../../../utils/server'; -import { Messages } from '../../../models/server'; -import { canAccessRoom } from '../../../authorization/server'; -import { API } from '../api'; - -API.v1.addRoute( - 'commands.get', - { authRequired: true }, - { - get() { - const params = this.queryParams; - - if (typeof params.command !== 'string') { - return API.v1.failure('The query param "command" must be provided.'); - } - - const cmd = slashCommands.commands[params.command.toLowerCase()]; - - if (!cmd) { - return API.v1.failure(`There is no command in the system by the name of: ${params.command}`); - } - - return API.v1.success({ command: cmd }); - }, - }, -); - -// TODO: replace with something like client/lib/minimongo -const processQueryOptionsOnResult = (result, options = {}) => { - if (result === undefined || result === null) { - return undefined; - } - - if (Array.isArray(result)) { - if (options.sort) { - result = result.sort((a, b) => { - let r = 0; - for (const field in options.sort) { - if (options.sort.hasOwnProperty(field)) { - const direction = options.sort[field]; - let valueA; - let valueB; - if (field.indexOf('.') > -1) { - valueA = objectPath.get(a, field); - valueB = objectPath.get(b, field); - } else { - valueA = a[field]; - valueB = b[field]; - } - if (valueA > valueB) { - r = direction; - break; - } - if (valueA < valueB) { - r = -direction; - break; - } - } - } - return r; - }); - } - - if (typeof options.skip === 'number') { - result.splice(0, options.skip); - } - - if (typeof options.limit === 'number' && options.limit !== 0) { - result.splice(options.limit); - } - } - - if (!options.fields) { - options.fields = {}; - } - - const fieldsToRemove = []; - const fieldsToGet = []; - - for (const field in options.fields) { - if (options.fields.hasOwnProperty(field)) { - if (options.fields[field] === 0) { - fieldsToRemove.push(field); - } else if (options.fields[field] === 1) { - fieldsToGet.push(field); - } - } - } - - if (fieldsToRemove.length > 0 && fieldsToGet.length > 0) { - console.warn("Can't mix remove and get fields"); - fieldsToRemove.splice(0, fieldsToRemove.length); - } - - if (fieldsToGet.length > 0 && fieldsToGet.indexOf('_id') === -1) { - fieldsToGet.push('_id'); - } - - const pickFields = (obj, fields) => { - const picked = {}; - fields.forEach((field) => { - if (field.indexOf('.') !== -1) { - objectPath.set(picked, field, objectPath.get(obj, field)); - } else { - picked[field] = obj[field]; - } - }); - return picked; - }; - - if (fieldsToRemove.length > 0 || fieldsToGet.length > 0) { - if (Array.isArray(result)) { - result = result.map((record) => { - if (fieldsToRemove.length > 0) { - return Object.fromEntries(Object.entries(record).filter(([key]) => !fieldsToRemove.includes(key))); - } - - if (fieldsToGet.length > 0) { - return pickFields(record, fieldsToGet); - } - - return null; - }); - } else { - if (fieldsToRemove.length > 0) { - return Object.fromEntries(Object.entries(result).filter(([key]) => !fieldsToRemove.includes(key))); - } - - if (fieldsToGet.length > 0) { - return pickFields(result, fieldsToGet); - } - } - } - - return result; -}; - -API.v1.addRoute( - 'commands.list', - { authRequired: true }, - { - get() { - const { offset, count } = this.getPaginationItems(); - const { sort, fields, query } = this.parseJsonQuery(); - - let commands = Object.values(slashCommands.commands); - - if (query && query.command) { - commands = commands.filter((command) => command.command === query.command); - } - - const totalCount = commands.length; - commands = processQueryOptionsOnResult(commands, { - sort: sort || { name: 1 }, - skip: offset, - limit: count, - fields, - }); - - return API.v1.success({ - commands, - offset, - count: commands.length, - total: totalCount, - }); - }, - }, -); - -// Expects a body of: { command: 'gimme', params: 'any string value', roomId: 'value', triggerId: 'value' } -API.v1.addRoute( - 'commands.run', - { authRequired: true }, - { - post() { - const body = this.bodyParams; - const user = this.getLoggedInUser(); - - if (typeof body.command !== 'string') { - return API.v1.failure('You must provide a command to run.'); - } - - if (body.params && typeof body.params !== 'string') { - return API.v1.failure('The parameters for the command must be a single string.'); - } - - if (typeof body.roomId !== 'string') { - return API.v1.failure("The room's id where to execute this command must be provided and be a string."); - } - - if (body.tmid && typeof body.tmid !== 'string') { - return API.v1.failure('The tmid parameter when provided must be a string.'); - } - - const cmd = body.command.toLowerCase(); - if (!slashCommands.commands[cmd]) { - return API.v1.failure('The command provided does not exist (or is disabled).'); - } - - if (!canAccessRoom({ _id: body.roomId }, user)) { - return API.v1.unauthorized(); - } - - const params = body.params ? body.params : ''; - const message = { - _id: Random.id(), - rid: body.roomId, - msg: `/${cmd} ${params}`, - }; - - if (body.tmid) { - const thread = Messages.findOneById(body.tmid); - if (!thread || thread.rid !== body.roomId) { - return API.v1.failure('Invalid thread.'); - } - message.tmid = body.tmid; - } - - const { triggerId } = body; - - const result = Meteor.runAsUser(user._id, () => slashCommands.run(cmd, params, message, triggerId)); - - return API.v1.success({ result }); - }, - }, -); - -API.v1.addRoute( - 'commands.preview', - { authRequired: true }, - { - // Expects these query params: command: 'giphy', params: 'mine', roomId: 'value' - get() { - const query = this.queryParams; - const user = this.getLoggedInUser(); - - if (typeof query.command !== 'string') { - return API.v1.failure('You must provide a command to get the previews from.'); - } - - if (query.params && typeof query.params !== 'string') { - return API.v1.failure('The parameters for the command must be a single string.'); - } - - if (typeof query.roomId !== 'string') { - return API.v1.failure("The room's id where the previews are being displayed must be provided and be a string."); - } - - const cmd = query.command.toLowerCase(); - if (!slashCommands.commands[cmd]) { - return API.v1.failure('The command provided does not exist (or is disabled).'); - } - - if (!canAccessRoom({ _id: query.roomId }, user)) { - return API.v1.unauthorized(); - } - - const params = query.params ? query.params : ''; - - let preview; - Meteor.runAsUser(user._id, () => { - preview = Meteor.call('getSlashCommandPreviews', { - cmd, - params, - msg: { rid: query.roomId }, - }); - }); - - return API.v1.success({ preview }); - }, - // Expects a body format of: { command: 'giphy', params: 'mine', roomId: 'value', tmid: 'value', triggerId: 'value', previewItem: { id: 'sadf8' type: 'image', value: 'https://dev.null/gif' } } - post() { - const body = this.bodyParams; - const user = this.getLoggedInUser(); - - if (typeof body.command !== 'string') { - return API.v1.failure('You must provide a command to run the preview item on.'); - } - - if (body.params && typeof body.params !== 'string') { - return API.v1.failure('The parameters for the command must be a single string.'); - } - - if (typeof body.roomId !== 'string') { - return API.v1.failure("The room's id where the preview is being executed in must be provided and be a string."); - } - - if (typeof body.previewItem === 'undefined') { - return API.v1.failure('The preview item being executed must be provided.'); - } - - if (!body.previewItem.id || !body.previewItem.type || typeof body.previewItem.value === 'undefined') { - return API.v1.failure('The preview item being executed is in the wrong format.'); - } - - if (body.tmid && typeof body.tmid !== 'string') { - return API.v1.failure('The tmid parameter when provided must be a string.'); - } - - if (body.triggerId && typeof body.triggerId !== 'string') { - return API.v1.failure('The triggerId parameter when provided must be a string.'); - } - - const cmd = body.command.toLowerCase(); - if (!slashCommands.commands[cmd]) { - return API.v1.failure('The command provided does not exist (or is disabled).'); - } - - if (!canAccessRoom({ _id: body.roomId }, user)) { - return API.v1.unauthorized(); - } - - const params = body.params ? body.params : ''; - const message = { - rid: body.roomId, - }; - - if (body.tmid) { - const thread = Messages.findOneById(body.tmid); - if (!thread || thread.rid !== body.roomId) { - return API.v1.failure('Invalid thread.'); - } - message.tmid = body.tmid; - } - - Meteor.runAsUser(user._id, () => { - Meteor.call( - 'executeSlashCommandPreview', - { - cmd, - params, - msg: { rid: body.roomId, tmid: body.tmid }, - }, - body.previewItem, - body.triggerId, - ); - }); - - return API.v1.success(); - }, - }, -); diff --git a/app/api/server/v1/custom-sounds.js b/app/api/server/v1/custom-sounds.js deleted file mode 100644 index 57c5ac9a0c7f..000000000000 --- a/app/api/server/v1/custom-sounds.js +++ /dev/null @@ -1,26 +0,0 @@ -import { API } from '../api'; -import { findCustomSounds } from '../lib/custom-sounds'; - -API.v1.addRoute( - 'custom-sounds.list', - { authRequired: true }, - { - get() { - const { offset, count } = this.getPaginationItems(); - const { sort, query } = this.parseJsonQuery(); - - return API.v1.success( - Promise.await( - findCustomSounds({ - query, - pagination: { - offset, - count, - sort, - }, - }), - ), - ); - }, - }, -); diff --git a/app/api/server/v1/custom-user-status.js b/app/api/server/v1/custom-user-status.js deleted file mode 100644 index b53583a4dc0b..000000000000 --- a/app/api/server/v1/custom-user-status.js +++ /dev/null @@ -1,108 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Match, check } from 'meteor/check'; - -import { CustomUserStatus } from '../../../models'; -import { API } from '../api'; -import { findCustomUserStatus } from '../lib/custom-user-status'; - -API.v1.addRoute( - 'custom-user-status.list', - { authRequired: true }, - { - get() { - const { offset, count } = this.getPaginationItems(); - const { sort, query } = this.parseJsonQuery(); - - return API.v1.success( - Promise.await( - findCustomUserStatus({ - query, - pagination: { - offset, - count, - sort, - }, - }), - ), - ); - }, - }, -); - -API.v1.addRoute( - 'custom-user-status.create', - { authRequired: true }, - { - post() { - check(this.bodyParams, { - name: String, - statusType: Match.Maybe(String), - }); - - const userStatusData = { - name: this.bodyParams.name, - statusType: this.bodyParams.statusType, - }; - - Meteor.runAsUser(this.userId, () => { - Meteor.call('insertOrUpdateUserStatus', userStatusData); - }); - - return API.v1.success({ - customUserStatus: CustomUserStatus.findOneByName(userStatusData.name), - }); - }, - }, -); - -API.v1.addRoute( - 'custom-user-status.delete', - { authRequired: true }, - { - post() { - const { customUserStatusId } = this.bodyParams; - if (!customUserStatusId) { - return API.v1.failure('The "customUserStatusId" params is required!'); - } - - Meteor.runAsUser(this.userId, () => Meteor.call('deleteCustomUserStatus', customUserStatusId)); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'custom-user-status.update', - { authRequired: true }, - { - post() { - check(this.bodyParams, { - _id: String, - name: String, - statusType: Match.Maybe(String), - }); - - const userStatusData = { - _id: this.bodyParams._id, - name: this.bodyParams.name, - statusType: this.bodyParams.statusType, - }; - - const customUserStatus = CustomUserStatus.findOneById(userStatusData._id); - - // Ensure the message exists - if (!customUserStatus) { - return API.v1.failure(`No custom user status found with the id of "${userStatusData._id}".`); - } - - Meteor.runAsUser(this.userId, () => { - Meteor.call('insertOrUpdateUserStatus', userStatusData); - }); - - return API.v1.success({ - customUserStatus: CustomUserStatus.findOneById(userStatusData._id), - }); - }, - }, -); diff --git a/app/api/server/v1/e2e.js b/app/api/server/v1/e2e.js deleted file mode 100644 index f079e75b8119..000000000000 --- a/app/api/server/v1/e2e.js +++ /dev/null @@ -1,183 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { API } from '../api'; - -API.v1.addRoute( - 'e2e.fetchMyKeys', - { authRequired: true }, - { - get() { - let result; - Meteor.runAsUser(this.userId, () => { - result = Meteor.call('e2e.fetchMyKeys'); - }); - - return API.v1.success(result); - }, - }, -); - -API.v1.addRoute( - 'e2e.getUsersOfRoomWithoutKey', - { authRequired: true }, - { - get() { - const { rid } = this.queryParams; - - let result; - Meteor.runAsUser(this.userId, () => { - result = Meteor.call('e2e.getUsersOfRoomWithoutKey', rid); - }); - - return API.v1.success(result); - }, - }, -); - -/** - * @openapi - * /api/v1/e2e.setRoomKeyID: - * post: - * description: Sets the end-to-end encryption key ID for a room - * security: - * - autenticated: {} - * requestBody: - * description: A tuple containing the room ID and the key ID - * content: - * application/json: - * schema: - * type: object - * properties: - * rid: - * type: string - * keyID: - * type: string - * responses: - * 200: - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/ApiSuccessV1' - * default: - * description: Unexpected error - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/ApiFailureV1' - */ -API.v1.addRoute( - 'e2e.setRoomKeyID', - { authRequired: true }, - { - post() { - const { rid, keyID } = this.bodyParams; - - Meteor.runAsUser(this.userId, () => { - API.v1.success(Meteor.call('e2e.setRoomKeyID', rid, keyID)); - }); - - return API.v1.success(); - }, - }, -); - -/** - * @openapi - * /api/v1/e2e.setUserPublicAndPrivateKeys: - * post: - * description: Sets the end-to-end encryption keys for the authenticated user - * security: - * - autenticated: {} - * requestBody: - * description: A tuple containing the public and the private keys - * content: - * application/json: - * schema: - * type: object - * properties: - * public_key: - * type: string - * private_key: - * type: string - * responses: - * 200: - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/ApiSuccessV1' - * default: - * description: Unexpected error - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/ApiFailureV1' - */ -API.v1.addRoute( - 'e2e.setUserPublicAndPrivateKeys', - { authRequired: true }, - { - post() { - const { public_key, private_key } = this.bodyParams; - - Meteor.runAsUser(this.userId, () => { - API.v1.success( - Meteor.call('e2e.setUserPublicAndPrivateKeys', { - public_key, - private_key, - }), - ); - }); - - return API.v1.success(); - }, - }, -); - -/** - * @openapi - * /api/v1/e2e.updateGroupKey: - * post: - * description: Updates the end-to-end encryption key for a user on a room - * security: - * - autenticated: {} - * requestBody: - * description: A tuple containing the user ID, the room ID, and the key - * content: - * application/json: - * schema: - * type: object - * properties: - * uid: - * type: string - * rid: - * type: string - * key: - * type: string - * responses: - * 200: - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/ApiSuccessV1' - * default: - * description: Unexpected error - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/ApiFailureV1' - */ -API.v1.addRoute( - 'e2e.updateGroupKey', - { authRequired: true }, - { - post() { - const { uid, rid, key } = this.bodyParams; - - Meteor.runAsUser(this.userId, () => { - API.v1.success(Meteor.call('e2e.updateGroupKey', rid, uid, key)); - }); - - return API.v1.success(); - }, - }, -); diff --git a/app/api/server/v1/email-inbox.js b/app/api/server/v1/email-inbox.js deleted file mode 100644 index e1ad7560d401..000000000000 --- a/app/api/server/v1/email-inbox.js +++ /dev/null @@ -1,157 +0,0 @@ -import { check, Match } from 'meteor/check'; - -import { API } from '../api'; -import { findEmailInboxes, findOneEmailInbox, insertOneOrUpdateEmailInbox } from '../lib/emailInbox'; -import { hasPermission } from '../../../authorization/server/functions/hasPermission'; -import { EmailInbox } from '../../../models/server/raw'; -import Users from '../../../models/server/models/Users'; -import { sendTestEmailToInbox } from '../../../../server/features/EmailInbox/EmailInbox_Outgoing'; - -API.v1.addRoute( - 'email-inbox.list', - { authRequired: true }, - { - get() { - const { offset, count } = this.getPaginationItems(); - const { sort, query } = this.parseJsonQuery(); - const emailInboxes = Promise.await(findEmailInboxes({ userId: this.userId, query, pagination: { offset, count, sort } })); - - return API.v1.success(emailInboxes); - }, - }, -); - -API.v1.addRoute( - 'email-inbox', - { authRequired: true }, - { - post() { - if (!hasPermission(this.userId, 'manage-email-inbox')) { - throw new Error('error-not-allowed'); - } - check(this.bodyParams, { - _id: Match.Maybe(String), - name: String, - email: String, - active: Boolean, - description: Match.Maybe(String), - senderInfo: Match.Maybe(String), - department: Match.Maybe(String), - smtp: Match.ObjectIncluding({ - password: String, - port: Number, - secure: Boolean, - server: String, - username: String, - }), - imap: Match.ObjectIncluding({ - password: String, - port: Number, - secure: Boolean, - server: String, - username: String, - }), - }); - - const emailInboxParams = this.bodyParams; - - const { _id } = emailInboxParams; - - Promise.await(insertOneOrUpdateEmailInbox(this.userId, emailInboxParams)); - - return API.v1.success({ _id }); - }, - }, -); - -API.v1.addRoute( - 'email-inbox/:_id', - { authRequired: true }, - { - get() { - check(this.urlParams, { - _id: String, - }); - - const { _id } = this.urlParams; - if (!_id) { - throw new Error('error-invalid-param'); - } - const emailInboxes = Promise.await(findOneEmailInbox({ userId: this.userId, _id })); - - return API.v1.success(emailInboxes); - }, - delete() { - if (!hasPermission(this.userId, 'manage-email-inbox')) { - throw new Error('error-not-allowed'); - } - check(this.urlParams, { - _id: String, - }); - - const { _id } = this.urlParams; - if (!_id) { - throw new Error('error-invalid-param'); - } - - const emailInboxes = Promise.await(EmailInbox.findOneById(_id)); - - if (!emailInboxes) { - return API.v1.notFound(); - } - Promise.await(EmailInbox.removeById(_id)); - return API.v1.success({ _id }); - }, - }, -); - -API.v1.addRoute( - 'email-inbox.search', - { authRequired: true }, - { - get() { - if (!hasPermission(this.userId, 'manage-email-inbox')) { - throw new Error('error-not-allowed'); - } - check(this.queryParams, { - email: String, - }); - - const { email } = this.queryParams; - const emailInbox = Promise.await(EmailInbox.findOne({ email })); - - return API.v1.success({ emailInbox }); - }, - }, -); - -API.v1.addRoute( - 'email-inbox.send-test/:_id', - { authRequired: true }, - { - post() { - if (!hasPermission(this.userId, 'manage-email-inbox')) { - throw new Error('error-not-allowed'); - } - check(this.urlParams, { - _id: String, - }); - - const { _id } = this.urlParams; - if (!_id) { - throw new Error('error-invalid-param'); - } - const emailInbox = Promise.await(findOneEmailInbox({ userId: this.userId, _id })); - - if (!emailInbox) { - return API.v1.notFound(); - } - - const user = Users.findOneById(this.userId); - - Promise.await(sendTestEmailToInbox(emailInbox, user)); - - return API.v1.success({ _id }); - }, - }, -); diff --git a/app/api/server/v1/emoji-custom.js b/app/api/server/v1/emoji-custom.js deleted file mode 100644 index 6a5fb2260e1b..000000000000 --- a/app/api/server/v1/emoji-custom.js +++ /dev/null @@ -1,161 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { EmojiCustom } from '../../../models/server/raw'; -import { API } from '../api'; -import { getUploadFormData } from '../lib/getUploadFormData'; -import { findEmojisCustom } from '../lib/emoji-custom'; -import { Media } from '../../../../server/sdk'; - -API.v1.addRoute( - 'emoji-custom.list', - { authRequired: true }, - { - get() { - const { query } = this.parseJsonQuery(); - const { updatedSince } = this.queryParams; - let updatedSinceDate; - if (updatedSince) { - if (isNaN(Date.parse(updatedSince))) { - throw new Meteor.Error('error-roomId-param-invalid', 'The "updatedSince" query parameter must be a valid date.'); - } else { - updatedSinceDate = new Date(updatedSince); - } - return API.v1.success({ - emojis: { - update: Promise.await(EmojiCustom.find({ ...query, _updatedAt: { $gt: updatedSinceDate } }).toArray()), - remove: Promise.await(EmojiCustom.trashFindDeletedAfter(updatedSinceDate).toArray()), - }, - }); - } - - return API.v1.success({ - emojis: { - update: Promise.await(EmojiCustom.find(query).toArray()), - remove: [], - }, - }); - }, - }, -); - -API.v1.addRoute( - 'emoji-custom.all', - { authRequired: true }, - { - get() { - const { offset, count } = this.getPaginationItems(); - const { sort, query } = this.parseJsonQuery(); - - return API.v1.success( - Promise.await( - findEmojisCustom({ - query, - pagination: { - offset, - count, - sort, - }, - }), - ), - ); - }, - }, -); - -API.v1.addRoute( - 'emoji-custom.create', - { authRequired: true }, - { - post() { - const { emoji, ...fields } = Promise.await( - getUploadFormData({ - request: this.request, - }), - ); - - if (!emoji) { - throw new Meteor.Error('invalid-field'); - } - - const isUploadable = Promise.await(Media.isImage(emoji.fileBuffer)); - if (!isUploadable) { - throw new Meteor.Error('emoji-is-not-image', "Emoji file provided cannot be uploaded since it's not an image"); - } - - const [, extension] = emoji.mimetype.split('/'); - fields.extension = extension; - - fields.newFile = true; - fields.aliases = fields.aliases || ''; - - Meteor.runAsUser(this.userId, () => { - Meteor.call('insertOrUpdateEmoji', fields); - Meteor.call('uploadEmojiCustom', emoji.fileBuffer, emoji.mimetype, fields); - }); - }, - }, -); - -API.v1.addRoute( - 'emoji-custom.update', - { authRequired: true }, - { - post() { - const { emoji, ...fields } = Promise.await( - getUploadFormData({ - request: this.request, - }), - ); - - if (!fields._id) { - throw new Meteor.Error('The required "_id" query param is missing.'); - } - - const emojiToUpdate = Promise.await(EmojiCustom.findOneById(fields._id)); - if (!emojiToUpdate) { - throw new Meteor.Error('Emoji not found.'); - } - - fields.previousName = emojiToUpdate.name; - fields.previousExtension = emojiToUpdate.extension; - fields.aliases = fields.aliases || ''; - fields.newFile = Boolean(emoji?.fileBuffer.length); - - if (fields.newFile) { - const isUploadable = Promise.await(Media.isImage(emoji.fileBuffer)); - if (!isUploadable) { - throw new Meteor.Error('emoji-is-not-image', "Emoji file provided cannot be uploaded since it's not an image"); - } - - const [, extension] = emoji.mimetype.split('/'); - fields.extension = extension; - } else { - fields.extension = emojiToUpdate.extension; - } - - Meteor.runAsUser(this.userId, () => { - Meteor.call('insertOrUpdateEmoji', fields); - if (fields.newFile) { - Meteor.call('uploadEmojiCustom', emoji.fileBuffer, emoji.mimetype, fields); - } - }); - }, - }, -); - -API.v1.addRoute( - 'emoji-custom.delete', - { authRequired: true }, - { - post() { - const { emojiId } = this.bodyParams; - if (!emojiId) { - return API.v1.failure('The "emojiId" params is required!'); - } - - Meteor.runAsUser(this.userId, () => Meteor.call('deleteEmojiCustom', emojiId)); - - return API.v1.success(); - }, - }, -); diff --git a/app/api/server/v1/im.js b/app/api/server/v1/im.js deleted file mode 100644 index a71647d92e3f..000000000000 --- a/app/api/server/v1/im.js +++ /dev/null @@ -1,465 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Match, check } from 'meteor/check'; - -import { Subscriptions, Users, Messages, Rooms } from '../../../models/server'; -import { Uploads } from '../../../models/server/raw'; -import { canAccessRoom, hasPermission } from '../../../authorization/server'; -import { normalizeMessagesForUser } from '../../../utils/server/lib/normalizeMessagesForUser'; -import { settings } from '../../../settings/server'; -import { API } from '../api'; -import { getDirectMessageByNameOrIdWithOptionToJoin } from '../../../lib/server/functions/getDirectMessageByNameOrIdWithOptionToJoin'; -import { createDirectMessage } from '../../../../server/methods/createDirectMessage'; - -function findDirectMessageRoom(params, user, allowAdminOverride) { - if ((!params.roomId || !params.roomId.trim()) && (!params.username || !params.username.trim())) { - throw new Meteor.Error('error-room-param-not-provided', 'Body param "roomId" or "username" is required'); - } - - const room = getDirectMessageByNameOrIdWithOptionToJoin({ - currentUserId: user._id, - nameOrId: params.username || params.roomId, - }); - - const canAccess = canAccessRoom(room, user) || (allowAdminOverride && hasPermission(user._id, 'view-room-administration')); - if (!canAccess || !room || room.t !== 'd') { - throw new Meteor.Error('error-room-not-found', 'The required "roomId" or "username" param provided does not match any direct message'); - } - - const subscription = Subscriptions.findOneByRoomIdAndUserId(room._id, user._id); - - return { - room, - subscription, - }; -} - -API.v1.addRoute( - ['dm.create', 'im.create'], - { authRequired: true }, - { - post() { - const { username, usernames, excludeSelf } = this.requestParams(); - - const users = username ? [username] : usernames && usernames.split(',').map((username) => username.trim()); - - if (!users) { - throw new Meteor.Error( - 'error-room-not-found', - 'The required "username" or "usernames" param provided does not match any direct message', - ); - } - - const room = createDirectMessage(users, this.userId, excludeSelf); - - return API.v1.success({ - room: { ...room, _id: room.rid }, - }); - }, - }, -); - -API.v1.addRoute( - ['dm.delete', 'im.delete'], - { authRequired: true }, - { - post() { - if (!hasPermission(this.userId, 'view-room-administration')) { - return API.v1.unauthorized(); - } - - const findResult = findDirectMessageRoom(this.requestParams(), this.user, true); - - Meteor.call('eraseRoom', findResult.room._id); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - ['dm.close', 'im.close'], - { authRequired: true }, - { - post() { - const findResult = findDirectMessageRoom(this.requestParams(), this.user); - - if (!findResult.subscription.open) { - return API.v1.failure(`The direct message room, ${this.bodyParams.name}, is already closed to the sender`); - } - - Meteor.runAsUser(this.userId, () => { - Meteor.call('hideRoom', findResult.room._id); - }); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - ['dm.counters', 'im.counters'], - { authRequired: true }, - { - get() { - const access = hasPermission(this.userId, 'view-room-administration'); - const ruserId = this.requestParams().userId; - let user = this.userId; - let unreads = null; - let userMentions = null; - let unreadsFrom = null; - let joined = false; - let msgs = null; - let latest = null; - let members = null; - let lm = null; - - if (ruserId) { - if (!access) { - return API.v1.unauthorized(); - } - user = ruserId; - } - const rs = findDirectMessageRoom(this.requestParams(), { _id: user }); - const { room } = rs; - const dm = rs.subscription; - lm = room.lm ? room.lm : room._updatedAt; - - if (typeof dm !== 'undefined' && dm.open) { - if (dm.ls && room.msgs) { - unreads = dm.unread; - unreadsFrom = dm.ls; - } - userMentions = dm.userMentions; - joined = true; - } - - if (access || joined) { - msgs = room.msgs; - latest = lm; - members = room.usersCount; - } - - return API.v1.success({ - joined, - members, - unreads, - unreadsFrom, - msgs, - latest, - userMentions, - }); - }, - }, -); - -API.v1.addRoute( - ['dm.files', 'im.files'], - { authRequired: true }, - { - get() { - const findResult = findDirectMessageRoom(this.requestParams(), this.user); - const addUserObjectToEveryObject = (file) => { - if (file.userId) { - file = this.insertUserObject({ object: file, userId: file.userId }); - } - return file; - }; - - const { offset, count } = this.getPaginationItems(); - const { sort, fields, query } = this.parseJsonQuery(); - - const ourQuery = Object.assign({}, query, { rid: findResult.room._id }); - - const files = Promise.await( - Uploads.find(ourQuery, { - sort: sort || { name: 1 }, - skip: offset, - limit: count, - fields, - }).toArray(), - ); - - return API.v1.success({ - files: files.map(addUserObjectToEveryObject), - count: files.length, - offset, - total: Promise.await(Uploads.find(ourQuery).count()), - }); - }, - }, -); - -API.v1.addRoute( - ['dm.history', 'im.history'], - { authRequired: true }, - { - get() { - const findResult = findDirectMessageRoom(this.requestParams(), this.user); - - let latestDate = new Date(); - if (this.queryParams.latest) { - latestDate = new Date(this.queryParams.latest); - } - - let oldestDate = undefined; - if (this.queryParams.oldest) { - oldestDate = new Date(this.queryParams.oldest); - } - - const inclusive = this.queryParams.inclusive || false; - - let count = 20; - if (this.queryParams.count) { - count = parseInt(this.queryParams.count); - } - - let offset = 0; - if (this.queryParams.offset) { - offset = parseInt(this.queryParams.offset); - } - - const unreads = this.queryParams.unreads || false; - - const showThreadMessages = this.queryParams.showThreadMessages !== 'false'; - - const result = Meteor.call('getChannelHistory', { - rid: findResult.room._id, - latest: latestDate, - oldest: oldestDate, - inclusive, - offset, - count, - unreads, - showThreadMessages, - }); - - if (!result) { - return API.v1.unauthorized(); - } - - return API.v1.success(result); - }, - }, -); - -API.v1.addRoute( - ['dm.members', 'im.members'], - { authRequired: true }, - { - get() { - const findResult = findDirectMessageRoom(this.requestParams(), this.user); - - const { offset, count } = this.getPaginationItems(); - const { sort } = this.parseJsonQuery(); - - check( - this.queryParams, - Match.ObjectIncluding({ - status: Match.Maybe([String]), - filter: Match.Maybe(String), - }), - ); - const { status, filter } = this.queryParams; - - const extraQuery = { - _id: { $in: findResult.room.uids }, - ...(status && { status: { $in: status } }), - }; - - const options = { - sort: { username: sort && sort.username ? sort.username : 1 }, - fields: { _id: 1, username: 1, name: 1, status: 1, statusText: 1, utcOffset: 1 }, - skip: offset, - limit: count, - }; - - const cursor = Users.findByActiveUsersExcept(filter, [], options, null, [extraQuery]); - - const members = cursor.fetch(); - const total = cursor.count(); - - return API.v1.success({ - members, - count: members.length, - offset, - total, - }); - }, - }, -); - -API.v1.addRoute( - ['dm.messages', 'im.messages'], - { authRequired: true }, - { - get() { - const findResult = findDirectMessageRoom(this.requestParams(), this.user); - - const { offset, count } = this.getPaginationItems(); - const { sort, fields, query } = this.parseJsonQuery(); - - const ourQuery = Object.assign({}, query, { rid: findResult.room._id }); - - const messages = Messages.find(ourQuery, { - sort: sort || { ts: -1 }, - skip: offset, - limit: count, - fields, - }).fetch(); - - return API.v1.success({ - messages: normalizeMessagesForUser(messages, this.userId), - count: messages.length, - offset, - total: Messages.find(ourQuery).count(), - }); - }, - }, -); - -API.v1.addRoute( - ['dm.messages.others', 'im.messages.others'], - { authRequired: true }, - { - get() { - if (settings.get('API_Enable_Direct_Message_History_EndPoint') !== true) { - throw new Meteor.Error('error-endpoint-disabled', 'This endpoint is disabled', { - route: '/api/v1/im.messages.others', - }); - } - - if (!hasPermission(this.userId, 'view-room-administration')) { - return API.v1.unauthorized(); - } - - const { roomId } = this.queryParams; - if (!roomId || !roomId.trim()) { - throw new Meteor.Error('error-roomid-param-not-provided', 'The parameter "roomId" is required'); - } - - const room = Rooms.findOneById(roomId); - if (!room || room.t !== 'd') { - throw new Meteor.Error('error-room-not-found', `No direct message room found by the id of: ${roomId}`); - } - - const { offset, count } = this.getPaginationItems(); - const { sort, fields, query } = this.parseJsonQuery(); - const ourQuery = Object.assign({}, query, { rid: room._id }); - - const msgs = Messages.find(ourQuery, { - sort: sort || { ts: -1 }, - skip: offset, - limit: count, - fields, - }).fetch(); - - return API.v1.success({ - messages: normalizeMessagesForUser(msgs, this.userId), - offset, - count: msgs.length, - total: Messages.find(ourQuery).count(), - }); - }, - }, -); - -API.v1.addRoute( - ['dm.list', 'im.list'], - { authRequired: true }, - { - get() { - const { offset, count } = this.getPaginationItems(); - const { sort = { name: 1 }, fields } = this.parseJsonQuery(); - - // TODO: CACHE: Add Breacking notice since we removed the query param - - const cursor = Rooms.findBySubscriptionTypeAndUserId('d', this.userId, { - sort, - skip: offset, - limit: count, - fields, - }); - - const total = cursor.count(); - const rooms = cursor.fetch(); - - return API.v1.success({ - ims: rooms.map((room) => this.composeRoomWithLastMessage(room, this.userId)), - offset, - count: rooms.length, - total, - }); - }, - }, -); - -API.v1.addRoute( - ['dm.list.everyone', 'im.list.everyone'], - { authRequired: true }, - { - get() { - if (!hasPermission(this.userId, 'view-room-administration')) { - return API.v1.unauthorized(); - } - - const { offset, count } = this.getPaginationItems(); - const { sort, fields, query } = this.parseJsonQuery(); - - const ourQuery = Object.assign({}, query, { t: 'd' }); - - const rooms = Rooms.find(ourQuery, { - sort: sort || { name: 1 }, - skip: offset, - limit: count, - fields, - }).fetch(); - - return API.v1.success({ - ims: rooms.map((room) => this.composeRoomWithLastMessage(room, this.userId)), - offset, - count: rooms.length, - total: Rooms.find(ourQuery).count(), - }); - }, - }, -); - -API.v1.addRoute( - ['dm.open', 'im.open'], - { authRequired: true }, - { - post() { - const findResult = findDirectMessageRoom(this.requestParams(), this.user); - - if (!findResult.subscription.open) { - Meteor.runAsUser(this.userId, () => { - Meteor.call('openRoom', findResult.room._id); - }); - } - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - ['dm.setTopic', 'im.setTopic'], - { authRequired: true }, - { - post() { - if (!this.bodyParams.hasOwnProperty('topic')) { - return API.v1.failure('The bodyParam "topic" is required'); - } - - const findResult = findDirectMessageRoom(this.requestParams(), this.user); - - Meteor.runAsUser(this.userId, () => { - Meteor.call('saveRoomSettings', findResult.room._id, 'roomTopic', this.bodyParams.topic); - }); - - return API.v1.success({ - topic: this.bodyParams.topic, - }); - }, - }, -); diff --git a/app/api/server/v1/import.js b/app/api/server/v1/import.js deleted file mode 100644 index b681b480d9d5..000000000000 --- a/app/api/server/v1/import.js +++ /dev/null @@ -1,185 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { API } from '../api'; -import { hasPermission } from '../../../authorization/server'; -import { Imports } from '../../../models/server'; -import { Importers } from '../../../importer/server'; - -API.v1.addRoute( - 'uploadImportFile', - { authRequired: true }, - { - post() { - const { binaryContent, contentType, fileName, importerKey } = this.bodyParams; - - return API.v1.success(Meteor.call('uploadImportFile', binaryContent, contentType, fileName, importerKey)); - }, - }, -); - -API.v1.addRoute( - 'downloadPublicImportFile', - { authRequired: true }, - { - post() { - const { fileUrl, importerKey } = this.bodyParams; - - Meteor.runAsUser(this.userId, () => { - API.v1.success(Meteor.call('downloadPublicImportFile', fileUrl, importerKey)); - }); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'startImport', - { authRequired: true }, - { - post() { - const { input } = this.bodyParams; - - Meteor.runAsUser(this.userId, () => { - API.v1.success(Meteor.call('startImport', input)); - }); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'getImportFileData', - { authRequired: true }, - { - get() { - let result; - Meteor.runAsUser(this.userId, () => { - result = Meteor.call('getImportFileData'); - }); - - return API.v1.success(result); - }, - }, -); - -API.v1.addRoute( - 'getImportProgress', - { authRequired: true }, - { - get() { - let result; - Meteor.runAsUser(this.userId, () => { - result = Meteor.call('getImportProgress'); - }); - - return API.v1.success(result); - }, - }, -); - -API.v1.addRoute( - 'getLatestImportOperations', - { authRequired: true }, - { - get() { - let result; - Meteor.runAsUser(this.userId, () => { - result = Meteor.call('getLatestImportOperations'); - }); - - return API.v1.success(result); - }, - }, -); - -API.v1.addRoute( - 'downloadPendingFiles', - { authRequired: true }, - { - post() { - if (!this.userId) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { - method: 'downloadPendingFiles', - }); - } - - if (!hasPermission(this.userId, 'run-import')) { - throw new Meteor.Error('not_authorized'); - } - - const importer = Importers.get('pending-files'); - if (!importer) { - throw new Meteor.Error('error-importer-not-defined', 'The Pending File Importer was not found.', { - method: 'downloadPendingFiles', - }); - } - - importer.instance = new importer.importer(importer); // eslint-disable-line new-cap - const count = importer.instance.prepareFileCount(); - - return API.v1.success({ - success: true, - count, - }); - }, - }, -); - -API.v1.addRoute( - 'downloadPendingAvatars', - { authRequired: true }, - { - post() { - if (!this.userId) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { - method: 'downloadPendingAvatars', - }); - } - - if (!hasPermission(this.userId, 'run-import')) { - throw new Meteor.Error('not_authorized'); - } - - const importer = Importers.get('pending-avatars'); - if (!importer) { - throw new Meteor.Error('error-importer-not-defined', 'The Pending File Importer was not found.', { - method: 'downloadPendingAvatars', - }); - } - - importer.instance = new importer.importer(importer); // eslint-disable-line new-cap - const count = importer.instance.prepareFileCount(); - - return API.v1.success({ - success: true, - count, - }); - }, - }, -); - -API.v1.addRoute( - 'getCurrentImportOperation', - { authRequired: true }, - { - get() { - if (!this.userId) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { - method: 'getCurrentImportOperation', - }); - } - - if (!hasPermission(this.userId, 'run-import')) { - throw new Meteor.Error('not_authorized'); - } - - const operation = Imports.findLastImport(); - return API.v1.success({ - success: true, - operation, - }); - }, - }, -); diff --git a/app/api/server/v1/instances.ts b/app/api/server/v1/instances.ts deleted file mode 100644 index 6e097ca53766..000000000000 --- a/app/api/server/v1/instances.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { getInstanceConnection } from '../../../../server/stream/streamBroadcast'; -import { hasPermission } from '../../../authorization/server'; -import { API } from '../api'; -import { InstanceStatus } from '../../../models/server/raw'; -import { IInstanceStatus } from '../../../../definition/IInstanceStatus'; - -API.v1.addRoute( - 'instances.get', - { authRequired: true }, - { - async get() { - if (!hasPermission(this.userId, 'view-statistics')) { - return API.v1.unauthorized(); - } - - const instances = await InstanceStatus.find().toArray(); - - return API.v1.success({ - instances: instances.map((instance: IInstanceStatus) => { - const connection = getInstanceConnection(instance); - if (connection) { - delete connection.instanceRecord; - } - return { - ...instance, - connection, - }; - }), - }); - }, - }, -); diff --git a/app/api/server/v1/integrations.js b/app/api/server/v1/integrations.js deleted file mode 100644 index 90b5f8d09b02..000000000000 --- a/app/api/server/v1/integrations.js +++ /dev/null @@ -1,296 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Match, check } from 'meteor/check'; - -import { hasAtLeastOnePermission } from '../../../authorization/server'; -import { Integrations, IntegrationHistory } from '../../../models/server/raw'; -import { API } from '../api'; -import { - mountIntegrationHistoryQueryBasedOnPermissions, - mountIntegrationQueryBasedOnPermissions, -} from '../../../integrations/server/lib/mountQueriesBasedOnPermission'; -import { findOneIntegration } from '../lib/integrations'; - -API.v1.addRoute( - 'integrations.create', - { authRequired: true }, - { - post() { - check( - this.bodyParams, - Match.ObjectIncluding({ - type: String, - name: String, - enabled: Boolean, - username: String, - urls: Match.Maybe([String]), - channel: String, - event: Match.Maybe(String), - triggerWords: Match.Maybe([String]), - alias: Match.Maybe(String), - avatar: Match.Maybe(String), - emoji: Match.Maybe(String), - token: Match.Maybe(String), - scriptEnabled: Boolean, - script: Match.Maybe(String), - targetChannel: Match.Maybe(String), - }), - ); - - let integration; - - switch (this.bodyParams.type) { - case 'webhook-outgoing': - Meteor.runAsUser(this.userId, () => { - integration = Meteor.call('addOutgoingIntegration', this.bodyParams); - }); - break; - case 'webhook-incoming': - Meteor.runAsUser(this.userId, () => { - integration = Meteor.call('addIncomingIntegration', this.bodyParams); - }); - break; - default: - return API.v1.failure('Invalid integration type.'); - } - - return API.v1.success({ integration }); - }, - }, -); - -API.v1.addRoute( - 'integrations.history', - { authRequired: true }, - { - get() { - if (!hasAtLeastOnePermission(this.userId, ['manage-outgoing-integrations', 'manage-own-outgoing-integrations'])) { - return API.v1.unauthorized(); - } - - if (!this.queryParams.id || this.queryParams.id.trim() === '') { - return API.v1.failure('Invalid integration id.'); - } - - const { id } = this.queryParams; - const { offset, count } = this.getPaginationItems(); - const { sort, fields: projection, query } = this.parseJsonQuery(); - const ourQuery = Object.assign(mountIntegrationHistoryQueryBasedOnPermissions(this.userId, id), query); - - const cursor = IntegrationHistory.find(ourQuery, { - sort: sort || { _updatedAt: -1 }, - skip: offset, - limit: count, - projection, - }); - - const history = Promise.await(cursor.toArray()); - const total = Promise.await(cursor.count()); - - return API.v1.success({ - history, - offset, - items: history.length, - total, - }); - }, - }, -); - -API.v1.addRoute( - 'integrations.list', - { authRequired: true }, - { - get() { - if ( - !hasAtLeastOnePermission(this.userId, [ - 'manage-outgoing-integrations', - 'manage-own-outgoing-integrations', - 'manage-incoming-integrations', - 'manage-own-incoming-integrations', - ]) - ) { - return API.v1.unauthorized(); - } - - const { offset, count } = this.getPaginationItems(); - const { sort, fields: projection, query } = this.parseJsonQuery(); - - const ourQuery = Object.assign(mountIntegrationQueryBasedOnPermissions(this.userId), query); - const cursor = Integrations.find(ourQuery, { - sort: sort || { ts: -1 }, - skip: offset, - limit: count, - projection, - }); - - const total = Promise.await(cursor.count()); - - const integrations = Promise.await(cursor.toArray()); - - return API.v1.success({ - integrations, - offset, - items: integrations.length, - total, - }); - }, - }, -); - -API.v1.addRoute( - 'integrations.remove', - { authRequired: true }, - { - post() { - if ( - !hasAtLeastOnePermission(this.userId, [ - 'manage-outgoing-integrations', - 'manage-own-outgoing-integrations', - 'manage-incoming-integrations', - 'manage-own-incoming-integrations', - ]) - ) { - return API.v1.unauthorized(); - } - - check( - this.bodyParams, - Match.ObjectIncluding({ - type: String, - target_url: Match.Maybe(String), - integrationId: Match.Maybe(String), - }), - ); - - if (!this.bodyParams.target_url && !this.bodyParams.integrationId) { - return API.v1.failure('An integrationId or target_url needs to be provided.'); - } - - let integration; - switch (this.bodyParams.type) { - case 'webhook-outgoing': - if (this.bodyParams.target_url) { - integration = Promise.await(Integrations.findOne({ urls: this.bodyParams.target_url })); - } else if (this.bodyParams.integrationId) { - integration = Promise.await(Integrations.findOne({ _id: this.bodyParams.integrationId })); - } - - if (!integration) { - return API.v1.failure('No integration found.'); - } - - Meteor.runAsUser(this.userId, () => { - Meteor.call('deleteOutgoingIntegration', integration._id); - }); - - return API.v1.success({ - integration, - }); - case 'webhook-incoming': - integration = Promise.await(Integrations.findOne({ _id: this.bodyParams.integrationId })); - - if (!integration) { - return API.v1.failure('No integration found.'); - } - - Meteor.runAsUser(this.userId, () => { - Meteor.call('deleteIncomingIntegration', integration._id); - }); - - return API.v1.success({ - integration, - }); - default: - return API.v1.failure('Invalid integration type.'); - } - }, - }, -); - -API.v1.addRoute( - 'integrations.get', - { authRequired: true }, - { - get() { - const { integrationId, createdBy } = this.queryParams; - if (!integrationId) { - return API.v1.failure('The query parameter "integrationId" is required.'); - } - - return API.v1.success({ - integration: Promise.await( - findOneIntegration({ - userId: this.userId, - integrationId, - createdBy, - }), - ), - }); - }, - }, -); - -API.v1.addRoute( - 'integrations.update', - { authRequired: true }, - { - put() { - check( - this.bodyParams, - Match.ObjectIncluding({ - type: String, - name: String, - enabled: Boolean, - username: String, - urls: Match.Maybe([String]), - channel: String, - event: Match.Maybe(String), - triggerWords: Match.Maybe([String]), - alias: Match.Maybe(String), - avatar: Match.Maybe(String), - emoji: Match.Maybe(String), - token: Match.Maybe(String), - scriptEnabled: Boolean, - script: Match.Maybe(String), - targetChannel: Match.Maybe(String), - integrationId: Match.Maybe(String), - target_url: Match.Maybe(String), - }), - ); - - let integration; - switch (this.bodyParams.type) { - case 'webhook-outgoing': - if (this.bodyParams.target_url) { - integration = Promise.await(Integrations.findOne({ urls: this.bodyParams.target_url })); - } else if (this.bodyParams.integrationId) { - integration = Promise.await(Integrations.findOne({ _id: this.bodyParams.integrationId })); - } - - if (!integration) { - return API.v1.failure('No integration found.'); - } - - Meteor.call('updateOutgoingIntegration', integration._id, this.bodyParams); - - return API.v1.success({ - integration: Promise.await(Integrations.findOne({ _id: integration._id })), - }); - case 'webhook-incoming': - integration = Promise.await(Integrations.findOne({ _id: this.bodyParams.integrationId })); - - if (!integration) { - return API.v1.failure('No integration found.'); - } - - Meteor.call('updateIncomingIntegration', integration._id, this.bodyParams); - - return API.v1.success({ - integration: Promise.await(Integrations.findOne({ _id: integration._id })), - }); - default: - return API.v1.failure('Invalid integration type.'); - } - }, - }, -); diff --git a/app/api/server/v1/invites.js b/app/api/server/v1/invites.js deleted file mode 100644 index 907585a818bc..000000000000 --- a/app/api/server/v1/invites.js +++ /dev/null @@ -1,76 +0,0 @@ -import { API } from '../api'; -import { findOrCreateInvite } from '../../../invites/server/functions/findOrCreateInvite'; -import { removeInvite } from '../../../invites/server/functions/removeInvite'; -import { listInvites } from '../../../invites/server/functions/listInvites'; -import { useInviteToken } from '../../../invites/server/functions/useInviteToken'; -import { validateInviteToken } from '../../../invites/server/functions/validateInviteToken'; - -API.v1.addRoute( - 'listInvites', - { authRequired: true }, - { - get() { - const result = Promise.await(listInvites(this.userId)); - return API.v1.success(result); - }, - }, -); - -API.v1.addRoute( - 'findOrCreateInvite', - { authRequired: true }, - { - post() { - const { rid, days, maxUses } = this.bodyParams; - const result = Promise.await(findOrCreateInvite(this.userId, { rid, days, maxUses })); - - return API.v1.success(result); - }, - }, -); - -API.v1.addRoute( - 'removeInvite/:_id', - { authRequired: true }, - { - delete() { - const { _id } = this.urlParams; - const result = Promise.await(removeInvite(this.userId, { _id })); - - return API.v1.success(result); - }, - }, -); - -API.v1.addRoute( - 'useInviteToken', - { authRequired: true }, - { - post() { - const { token } = this.bodyParams; - // eslint-disable-next-line react-hooks/rules-of-hooks - const result = Promise.await(useInviteToken(this.userId, token)); - - return API.v1.success(result); - }, - }, -); - -API.v1.addRoute( - 'validateInviteToken', - { authRequired: false }, - { - post() { - const { token } = this.bodyParams; - - let valid = true; - try { - Promise.await(validateInviteToken(token)); - } catch (e) { - valid = false; - } - - return API.v1.success({ valid }); - }, - }, -); diff --git a/app/api/server/v1/ldap.ts b/app/api/server/v1/ldap.ts deleted file mode 100644 index 7cdff71126ec..000000000000 --- a/app/api/server/v1/ldap.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { Match, check } from 'meteor/check'; - -import { hasRole } from '../../../authorization/server'; -import { settings } from '../../../settings/server'; -import { API } from '../api'; -import { SystemLogger } from '../../../../server/lib/logger/system'; -import { LDAP } from '../../../../server/sdk'; - -API.v1.addRoute( - 'ldap.testConnection', - { authRequired: true }, - { - async post() { - if (!this.userId) { - throw new Error('error-invalid-user'); - } - - if (!hasRole(this.userId, 'admin')) { - throw new Error('error-not-authorized'); - } - - if (settings.get('LDAP_Enable') !== true) { - throw new Error('LDAP_disabled'); - } - - try { - await LDAP.testConnection(); - } catch (error) { - SystemLogger.error(error); - throw new Error('Connection_failed'); - } - - return API.v1.success({ - message: 'Connection_success' as const, - }); - }, - }, -); - -API.v1.addRoute( - 'ldap.testSearch', - { authRequired: true }, - { - async post() { - check( - this.bodyParams, - Match.ObjectIncluding({ - username: String, - }), - ); - - if (!this.userId) { - throw new Error('error-invalid-user'); - } - - if (!hasRole(this.userId, 'admin')) { - throw new Error('error-not-authorized'); - } - - if (settings.get('LDAP_Enable') !== true) { - throw new Error('LDAP_disabled'); - } - - await LDAP.testSearch(this.bodyParams.username); - - return API.v1.success({ - message: 'LDAP_User_Found' as const, - }); - }, - }, -); diff --git a/app/api/server/v1/misc.js b/app/api/server/v1/misc.js deleted file mode 100644 index 77b8519c3818..000000000000 --- a/app/api/server/v1/misc.js +++ /dev/null @@ -1,471 +0,0 @@ -import crypto from 'crypto'; - -import { Meteor } from 'meteor/meteor'; -import { check } from 'meteor/check'; -import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; -import { EJSON } from 'meteor/ejson'; -import { DDPRateLimiter } from 'meteor/ddp-rate-limiter'; -import { escapeHTML } from '@rocket.chat/string-helpers'; - -import { hasPermission } from '../../../authorization/server'; -import { Users } from '../../../models/server'; -import { settings } from '../../../settings/server'; -import { API } from '../api'; -import { getDefaultUserFields } from '../../../utils/server/functions/getDefaultUserFields'; -import { getURL } from '../../../utils/lib/getURL'; -import { getLogs } from '../../../../server/stream/stdout'; -import { SystemLogger } from '../../../../server/lib/logger/system'; - -/** - * @openapi - * /api/v1/me: - * get: - * description: Gets user data of the authenticated user - * security: - * - authenticated: [] - * responses: - * 200: - * description: The user data of the authenticated user - * content: - * application/json: - * schema: - * allOf: - * - $ref: '#/components/schemas/ApiSuccessV1' - * - type: object - * properties: - * name: - * type: string - * username: - * type: string - * nickname: - * type: string - * emails: - * type: array - * items: - * type: object - * properties: - * address: - * type: string - * verified: - * type: boolean - * email: - * type: string - * status: - * $ref: '#/components/schemas/UserStatus' - * statusDefault: - * $ref: '#/components/schemas/UserStatus' - * statusText: - * $ref: '#/components/schemas/UserStatus' - * statusConnection: - * $ref: '#/components/schemas/UserStatus' - * bio: - * type: string - * avatarOrigin: - * type: string - * enum: [none, local, upload, url] - * utcOffset: - * type: number - * language: - * type: string - * settings: - * type: object - * properties: - * preferences: - * type: object - * enableAutoAway: - * type: boolean - * idleTimeLimit: - * type: number - * roles: - * type: array - * active: - * type: boolean - * defaultRoom: - * type: string - * customFields: - * type: array - * requirePasswordChange: - * type: boolean - * requirePasswordChangeReason: - * type: string - * services: - * type: object - * properties: - * github: - * type: object - * gitlab: - * type: object - * tokenpass: - * type: object - * blockstack: - * type: object - * password: - * type: object - * properties: - * exists: - * type: boolean - * totp: - * type: object - * properties: - * enabled: - * type: boolean - * email2fa: - * type: object - * properties: - * enabled: - * type: boolean - * statusLivechat: - * type: string - * enum: [available, 'not-available'] - * banners: - * type: array - * items: - * type: object - * properties: - * id: - * type: string - * title: - * type: string - * text: - * type: string - * textArguments: - * type: array - * items: {} - * modifiers: - * type: array - * items: - * type: string - * infoUrl: - * type: string - * oauth: - * type: object - * properties: - * authorizedClients: - * type: array - * items: - * type: string - * _updatedAt: - * type: string - * format: date-time - * avatarETag: - * type: string - * default: - * description: Unexpected error - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/ApiFailureV1' - */ -API.v1.addRoute( - 'me', - { authRequired: true }, - { - get() { - const fields = getDefaultUserFields(); - const user = Users.findOneById(this.userId, { fields }); - - // The password hash shouldn't be leaked but the client may need to know if it exists. - if (user?.services?.password?.bcrypt) { - user.services.password.exists = true; - delete user.services.password.bcrypt; - } - - return API.v1.success(this.getUserInfo(user)); - }, - }, -); - -let onlineCache = 0; -let onlineCacheDate = 0; -const cacheInvalid = 60000; // 1 minute -API.v1.addRoute( - 'shield.svg', - { authRequired: false, rateLimiterOptions: { numRequestsAllowed: 60, intervalTimeInMS: 60000 } }, - { - get() { - const { type, icon } = this.queryParams; - let { channel, name } = this.queryParams; - if (!settings.get('API_Enable_Shields')) { - throw new Meteor.Error('error-endpoint-disabled', 'This endpoint is disabled', { - route: '/api/v1/shield.svg', - }); - } - - const types = settings.get('API_Shield_Types'); - if ( - type && - types !== '*' && - !types - .split(',') - .map((t) => t.trim()) - .includes(type) - ) { - throw new Meteor.Error('error-shield-disabled', 'This shield type is disabled', { - route: '/api/v1/shield.svg', - }); - } - const hideIcon = icon === 'false'; - if (hideIcon && (!name || !name.trim())) { - return API.v1.failure('Name cannot be empty when icon is hidden'); - } - - let text; - let backgroundColor = '#4c1'; - switch (type) { - case 'online': - if (Date.now() - onlineCacheDate > cacheInvalid) { - onlineCache = Users.findUsersNotOffline().count(); - onlineCacheDate = Date.now(); - } - - text = `${onlineCache} ${TAPi18n.__('Online')}`; - break; - case 'channel': - if (!channel) { - return API.v1.failure('Shield channel is required for type "channel"'); - } - - text = `#${channel}`; - break; - case 'user': - if (settings.get('API_Shield_user_require_auth') && !this.getLoggedInUser()) { - return API.v1.failure('You must be logged in to do this.'); - } - const user = this.getUserFromParams(); - - // Respect the server's choice for using their real names or not - if (user.name && settings.get('UI_Use_Real_Name')) { - text = `${user.name}`; - } else { - text = `@${user.username}`; - } - - switch (user.status) { - case 'online': - backgroundColor = '#1fb31f'; - break; - case 'away': - backgroundColor = '#dc9b01'; - break; - case 'busy': - backgroundColor = '#bc2031'; - break; - case 'offline': - backgroundColor = '#a5a1a1'; - } - break; - default: - text = TAPi18n.__('Join_Chat').toUpperCase(); - } - - const iconSize = hideIcon ? 7 : 24; - const leftSize = name ? name.length * 6 + 7 + iconSize : iconSize; - const rightSize = text.length * 6 + 20; - const width = leftSize + rightSize; - const height = 20; - - channel = escapeHTML(channel); - text = escapeHTML(text); - name = escapeHTML(name); - - return { - headers: { 'Content-Type': 'image/svg+xml;charset=utf-8' }, - body: ` - - - - - - - - - - - - - - ${hideIcon ? '' : ``} - - ${ - name - ? `${name} - ${name}` - : '' - } - ${text} - ${text} - - - ` - .trim() - .replace(/\>[\s]+\<'), - }; - }, - }, -); - -API.v1.addRoute( - 'spotlight', - { authRequired: true }, - { - get() { - check(this.queryParams, { - query: String, - }); - - const { query } = this.queryParams; - - const result = Meteor.runAsUser(this.userId, () => Meteor.call('spotlight', query)); - - return API.v1.success(result); - }, - }, -); - -API.v1.addRoute( - 'directory', - { authRequired: true }, - { - get() { - const { offset, count } = this.getPaginationItems(); - const { sort, query } = this.parseJsonQuery(); - - const { text, type, workspace = 'local' } = query; - - if (sort && Object.keys(sort).length > 1) { - return API.v1.failure('This method support only one "sort" parameter'); - } - const sortBy = sort ? Object.keys(sort)[0] : undefined; - const sortDirection = sort && Object.values(sort)[0] === 1 ? 'asc' : 'desc'; - - const result = Meteor.runAsUser(this.userId, () => - Meteor.call('browseChannels', { - text, - type, - workspace, - sortBy, - sortDirection, - offset: Math.max(0, offset), - limit: Math.max(0, count), - }), - ); - - if (!result) { - return API.v1.failure('Please verify the parameters'); - } - return API.v1.success({ - result: result.results, - count: result.results.length, - offset, - total: result.total, - }); - }, - }, -); - -/** - * @openapi - * /api/v1/stdout.queue: - * get: - * description: Retrieves last 1000 lines of server logs - * security: - * - authenticated: ['view-logs'] - * responses: - * 200: - * description: The user data of the authenticated user - * content: - * application/json: - * schema: - * allOf: - * - $ref: '#/components/schemas/ApiSuccessV1' - * - type: object - * properties: - * queue: - * type: array - * items: - * type: object - * properties: - * id: - * type: string - * string: - * type: string - * ts: - * type: string - * format: date-time - * default: - * description: Unexpected error - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/ApiFailureV1' - */ -API.v1.addRoute( - 'stdout.queue', - { authRequired: true }, - { - get() { - if (!hasPermission(this.userId, 'view-logs')) { - return API.v1.unauthorized(); - } - return API.v1.success({ queue: getLogs() }); - }, - }, -); - -const mountResult = ({ id, error, result }) => ({ - message: EJSON.stringify({ - msg: 'result', - id, - error, - result, - }), -}); - -const methodCall = () => ({ - post() { - check(this.bodyParams, { - message: String, - }); - - const { method, params, id } = EJSON.parse(this.bodyParams.message); - - const connectionId = - this.token || - crypto - .createHash('md5') - .update(this.requestIp + this.request.headers['user-agent']) - .digest('hex'); - - const rateLimiterInput = { - userId: this.userId, - clientAddress: this.requestIp, - type: 'method', - name: method, - connectionId, - }; - - try { - DDPRateLimiter._increment(rateLimiterInput); - const rateLimitResult = DDPRateLimiter._check(rateLimiterInput); - if (!rateLimitResult.allowed) { - throw new Meteor.Error('too-many-requests', DDPRateLimiter.getErrorMessage(rateLimitResult), { - timeToReset: rateLimitResult.timeToReset, - }); - } - - const result = Meteor.call(method, ...params); - return API.v1.success(mountResult({ id, result })); - } catch (error) { - SystemLogger.error(`Exception while invoking method ${method}`, error.message); - if (settings.get('Log_Level') === '2') { - Meteor._debug(`Exception while invoking method ${method}`, error); - } - return API.v1.success(mountResult({ id, error })); - } - }, -}); - -// had to create two different endpoints for authenticated and non-authenticated calls -// because restivus does not provide 'this.userId' if 'authRequired: false' -API.v1.addRoute('method.call/:method', { authRequired: true, rateLimiterOptions: false }, methodCall()); -API.v1.addRoute('method.callAnon/:method', { authRequired: false, rateLimiterOptions: false }, methodCall()); diff --git a/app/api/server/v1/oauthapps.js b/app/api/server/v1/oauthapps.js deleted file mode 100644 index ba01223da454..000000000000 --- a/app/api/server/v1/oauthapps.js +++ /dev/null @@ -1,31 +0,0 @@ -import { API } from '../api'; -import { findOAuthApps, findOneAuthApp } from '../lib/oauthApps'; - -API.v1.addRoute( - 'oauth-apps.list', - { authRequired: true }, - { - get() { - return API.v1.success({ - oauthApps: Promise.await(findOAuthApps({ uid: this.userId })), - }); - }, - }, -); - -API.v1.addRoute( - 'oauth-apps.get', - { authRequired: true }, - { - get() { - const { clientId, appId } = this.queryParams; - if (!clientId && !appId) { - return API.v1.failure('At least one of the query parameters "clientId" or "appId" is required.'); - } - - return API.v1.success({ - oauthApp: Promise.await(findOneAuthApp({ clientId, appId })), - }); - }, - }, -); diff --git a/app/api/server/v1/permissions.ts b/app/api/server/v1/permissions.ts deleted file mode 100644 index bbf74fcba436..000000000000 --- a/app/api/server/v1/permissions.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { hasPermission } from '../../../authorization/server'; -import { API } from '../api'; -import { Permissions, Roles } from '../../../models/server/raw'; -import { IPermission } from '../../../../definition/IPermission'; -import { isBodyParamsValidPermissionUpdate } from '../../../../definition/rest/v1/permissions'; - -API.v1.addRoute( - 'permissions.listAll', - { authRequired: true }, - { - async get() { - const { updatedSince } = this.queryParams; - - let updatedSinceDate: Date | undefined; - if (updatedSince) { - if (isNaN(Date.parse(updatedSince))) { - throw new Meteor.Error('error-roomId-param-invalid', 'The "updatedSince" query parameter must be a valid date.'); - } - updatedSinceDate = new Date(updatedSince); - } - - const result = (await Meteor.call('permissions/get', updatedSinceDate)) as { - update: IPermission[]; - remove: IPermission[]; - }; - - if (Array.isArray(result)) { - return API.v1.success({ - update: result, - remove: [], - }); - } - - return API.v1.success(result); - }, - }, -); - -API.v1.addRoute( - 'permissions.update', - { authRequired: true }, - { - async post() { - if (!hasPermission(this.userId, 'access-permissions')) { - return API.v1.failure('Editing permissions is not allowed', 'error-edit-permissions-not-allowed'); - } - - const { bodyParams } = this; - - if (!isBodyParamsValidPermissionUpdate(bodyParams)) { - return API.v1.failure('Invalid body params', 'error-invalid-body-params'); - } - - const permissionKeys = bodyParams.permissions.map(({ _id }) => _id); - const permissions = await Permissions.find({ _id: { $in: permissionKeys } }).toArray(); - - if (permissions.length !== bodyParams.permissions.length) { - return API.v1.failure('Invalid permission', 'error-invalid-permission'); - } - - const roleKeys = [...new Set(bodyParams.permissions.flatMap((p) => p.roles))]; - - const roles = await Roles.find({ _id: { $in: roleKeys } }).toArray(); - - if (roles.length !== roleKeys.length) { - return API.v1.failure('Invalid role', 'error-invalid-role'); - } - - for await (const permission of bodyParams.permissions) { - await Permissions.setRoles(permission._id, permission.roles); - } - - const result = (await Meteor.call('permissions/get')) as IPermission[]; - - return API.v1.success({ - permissions: result, - }); - }, - }, -); diff --git a/app/api/server/v1/push.js b/app/api/server/v1/push.js deleted file mode 100644 index 293fd96c5811..000000000000 --- a/app/api/server/v1/push.js +++ /dev/null @@ -1,114 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Random } from 'meteor/random'; -import { Match, check } from 'meteor/check'; - -import { appTokensCollection } from '../../../push/server'; -import { API } from '../api'; -import PushNotification from '../../../push-notifications/server/lib/PushNotification'; -import { canAccessRoom } from '../../../authorization/server/functions/canAccessRoom'; -import { Users, Messages, Rooms } from '../../../models/server'; - -API.v1.addRoute( - 'push.token', - { authRequired: true }, - { - post() { - const { type, value, appName } = this.bodyParams; - let { id } = this.bodyParams; - - if (id && typeof id !== 'string') { - throw new Meteor.Error('error-id-param-not-valid', 'The required "id" body param is invalid.'); - } else { - id = Random.id(); - } - - if (!type || (type !== 'apn' && type !== 'gcm')) { - throw new Meteor.Error('error-type-param-not-valid', 'The required "type" body param is missing or invalid.'); - } - - if (!value || typeof value !== 'string') { - throw new Meteor.Error('error-token-param-not-valid', 'The required "value" body param is missing or invalid.'); - } - - if (!appName || typeof appName !== 'string') { - throw new Meteor.Error('error-appName-param-not-valid', 'The required "appName" body param is missing or invalid.'); - } - - let result; - Meteor.runAsUser(this.userId, () => { - result = Meteor.call('raix:push-update', { - id, - token: { [type]: value }, - appName, - userId: this.userId, - }); - }); - - return API.v1.success({ result }); - }, - delete() { - const { token } = this.bodyParams; - - if (!token || typeof token !== 'string') { - throw new Meteor.Error('error-token-param-not-valid', 'The required "token" body param is missing or invalid.'); - } - - const affectedRecords = appTokensCollection.remove({ - $or: [ - { - 'token.apn': token, - }, - { - 'token.gcm': token, - }, - ], - userId: this.userId, - }); - - if (affectedRecords === 0) { - return API.v1.notFound(); - } - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'push.get', - { authRequired: true }, - { - get() { - const params = this.requestParams(); - check( - params, - Match.ObjectIncluding({ - id: String, - }), - ); - - const receiver = Users.findOneById(this.userId); - if (!receiver) { - throw new Error('error-user-not-found'); - } - - const message = Messages.findOneById(params.id); - if (!message) { - throw new Error('error-message-not-found'); - } - - const room = Rooms.findOneById(message.rid); - if (!room) { - throw new Error('error-room-not-found'); - } - - if (!canAccessRoom(room, receiver)) { - throw new Error('error-not-allowed'); - } - - const data = PushNotification.getNotificationForMessageId({ receiver, room, message }); - - return API.v1.success({ data }); - }, - }, -); diff --git a/app/api/server/v1/roles.ts b/app/api/server/v1/roles.ts deleted file mode 100644 index 4f8e309116b1..000000000000 --- a/app/api/server/v1/roles.ts +++ /dev/null @@ -1,332 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { check, Match } from 'meteor/check'; - -import { Users } from '../../../models/server'; -import { API } from '../api'; -import { getUsersInRole, hasRole } from '../../../authorization/server'; -import { settings } from '../../../settings/server/index'; -import { api } from '../../../../server/sdk/api'; -import { Roles } from '../../../models/server/raw'; -import { hasAnyRoleAsync } from '../../../authorization/server/functions/hasRole'; -import { - isRoleAddUserToRoleProps, - isRoleCreateProps, - isRoleDeleteProps, - isRoleRemoveUserFromRoleProps, - isRoleUpdateProps, -} from '../../../../definition/rest/v1/roles'; -import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission'; - -API.v1.addRoute( - 'roles.list', - { authRequired: true }, - { - async get() { - const roles = await Roles.find({}, { projection: { _updatedAt: 0 } }).toArray(); - - return API.v1.success({ roles }); - }, - }, -); - -API.v1.addRoute( - 'roles.sync', - { authRequired: true }, - { - async get() { - check( - this.queryParams, - Match.ObjectIncluding({ - updatedSince: Match.Where((value: unknown): value is string => typeof value === 'string' && !Number.isNaN(Date.parse(value))), - }), - ); - - const { updatedSince } = this.queryParams; - - return API.v1.success({ - roles: { - update: await Roles.findByUpdatedDate(new Date(updatedSince)).toArray(), - remove: await Roles.trashFindDeletedAfter(new Date(updatedSince)).toArray(), - }, - }); - }, - }, -); - -API.v1.addRoute( - 'roles.create', - { authRequired: true }, - { - async post() { - if (!isRoleCreateProps(this.bodyParams)) { - throw new Meteor.Error('error-invalid-role-properties', 'The role properties are invalid.'); - } - - const { name, scope, description, mandatory2fa } = this.bodyParams; - - if (!(await hasPermissionAsync(Meteor.userId(), 'access-permissions'))) { - throw new Meteor.Error('error-action-not-allowed', 'Accessing permissions is not allowed'); - } - - if (await Roles.findOneByIdOrName(name)) { - throw new Meteor.Error('error-duplicate-role-names-not-allowed', 'Role name already exists'); - } - - const roleId = ( - await Roles.createWithRandomId( - name, - scope && ['Users', 'Subscriptions'].includes(scope) ? scope : 'Users', - description, - false, - mandatory2fa, - ) - ).insertedId; - - if (settings.get('UI_DisplayRoles')) { - api.broadcast('user.roleUpdate', { - type: 'changed', - _id: roleId, - }); - } - - const role = await Roles.findOneByIdOrName(roleId); - - if (!role) { - return API.v1.failure('error-role-not-found', 'Role not found'); - } - - return API.v1.success({ - role, - }); - }, - }, -); - -API.v1.addRoute( - 'roles.addUserToRole', - { authRequired: true }, - { - async post() { - if (!isRoleAddUserToRoleProps(this.bodyParams)) { - throw new Meteor.Error('error-invalid-role-properties', isRoleAddUserToRoleProps.errors?.map((error) => error.message).join('\n')); - } - - const user = this.getUserFromParams(); - const { roleName, roomId } = this.bodyParams; - - if (hasRole(user._id, roleName, roomId)) { - throw new Meteor.Error('error-user-already-in-role', 'User already in role'); - } - - await Meteor.call('authorization:addUserToRole', roleName, user.username, roomId); - - const role = await Roles.findOneByIdOrName(roleName); - - if (!role) { - return API.v1.failure('error-role-not-found', 'Role not found'); - } - - return API.v1.success({ - role, - }); - }, - }, -); - -API.v1.addRoute( - 'roles.getUsersInRole', - { authRequired: true }, - { - async get() { - const { roomId, role } = this.queryParams; - const { offset, count = 50 } = this.getPaginationItems(); - - const projection = { - name: 1, - username: 1, - emails: 1, - avatarETag: 1, - }; - - if (!role) { - throw new Meteor.Error('error-param-not-provided', 'Query param "role" is required'); - } - if (!(await hasPermissionAsync(this.userId, 'access-permissions'))) { - throw new Meteor.Error('error-not-allowed', 'Not allowed'); - } - if (roomId && !(await hasPermissionAsync(this.userId, 'view-other-user-channels'))) { - throw new Meteor.Error('error-not-allowed', 'Not allowed'); - } - const users = await getUsersInRole(role, roomId, { - limit: count as number, - sort: { username: 1 }, - skip: offset as number, - projection, - }); - - return API.v1.success({ users: await users.toArray(), total: await users.count() }); - }, - }, -); - -API.v1.addRoute( - 'roles.update', - { authRequired: true }, - { - async post() { - const { bodyParams } = this; - if (!isRoleUpdateProps(bodyParams)) { - throw new Meteor.Error('error-invalid-role-properties', 'The role properties are invalid.'); - } - - if (!(await hasPermissionAsync(this.userId, 'access-permissions'))) { - throw new Meteor.Error('error-action-not-allowed', 'Accessing permissions is not allowed'); - } - - const roleData = { - roleId: bodyParams.roleId, - name: bodyParams.name, - scope: bodyParams.scope || 'Users', - description: bodyParams.description, - mandatory2fa: bodyParams.mandatory2fa, - }; - - const role = await Roles.findOneByIdOrName(roleData.roleId); - - if (!role) { - throw new Meteor.Error('error-invalid-roleId', 'This role does not exist'); - } - - if (role.protected && ((roleData.name && roleData.name !== role.name) || (roleData.scope && roleData.scope !== role.scope))) { - throw new Meteor.Error('error-role-protected', 'Role is protected'); - } - - if (roleData.name) { - const otherRole = await Roles.findOneByIdOrName(roleData.name); - if (otherRole && otherRole._id !== role._id) { - throw new Meteor.Error('error-duplicate-role-names-not-allowed', 'Role name already exists'); - } - } - - if (['Users', 'Subscriptions'].includes(roleData.scope) === false) { - throw new Meteor.Error('error-invalid-scope', 'Invalid scope'); - } - - await Roles.updateById(roleData.roleId, roleData.name, roleData.scope, roleData.description, roleData.mandatory2fa); - - if (settings.get('UI_DisplayRoles')) { - api.broadcast('user.roleUpdate', { - type: 'changed', - _id: roleData.roleId, - }); - } - - const updatedRole = await Roles.findOneByIdOrName(roleData.roleId); - - if (!updatedRole) { - return API.v1.failure(); - } - - return API.v1.success({ - role: updatedRole, - }); - }, - }, -); - -API.v1.addRoute( - 'roles.delete', - { authRequired: true }, - { - async post() { - const { bodyParams } = this; - if (!isRoleDeleteProps(bodyParams)) { - throw new Meteor.Error('error-invalid-role-properties', 'The role properties are invalid.'); - } - - if (!(await hasPermissionAsync(this.userId, 'access-permissions'))) { - throw new Meteor.Error('error-action-not-allowed', 'Accessing permissions is not allowed'); - } - - const role = await Roles.findOneByIdOrName(bodyParams.roleId); - - if (!role) { - throw new Meteor.Error('error-invalid-roleId', 'This role does not exist'); - } - - if (role.protected) { - throw new Meteor.Error('error-role-protected', 'Cannot delete a protected role'); - } - - const existingUsers = await Roles.findUsersInRole(role.name, role.scope); - - if (existingUsers && (await existingUsers.count()) > 0) { - throw new Meteor.Error('error-role-in-use', "Cannot delete role because it's in use"); - } - - await Roles.removeById(role._id); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'roles.removeUserFromRole', - { authRequired: true }, - { - async post() { - const { bodyParams } = this; - if (!isRoleRemoveUserFromRoleProps(bodyParams)) { - throw new Meteor.Error('error-invalid-role-properties', 'The role properties are invalid.'); - } - - const { roleName, username, scope } = bodyParams; - - if (!(await hasPermissionAsync(this.userId, 'access-permissions'))) { - throw new Meteor.Error('error-not-allowed', 'Accessing permissions is not allowed'); - } - - const user = Users.findOneByUsername(username); - - if (!user) { - throw new Meteor.Error('error-invalid-user', 'There is no user with this username'); - } - - const role = await Roles.findOneByIdOrName(roleName); - - if (!role) { - throw new Meteor.Error('error-invalid-roleId', 'This role does not exist'); - } - - if (!(await hasAnyRoleAsync(user._id, [role.name], scope))) { - throw new Meteor.Error('error-user-not-in-role', 'User is not in this role'); - } - - if (role._id === 'admin') { - const adminCount = await (await Roles.findUsersInRole('admin')).count(); - if (adminCount === 1) { - throw new Meteor.Error('error-admin-required', 'You need to have at least one admin'); - } - } - - await Roles.removeUserRoles(user._id, [role.name], scope); - - if (settings.get('UI_DisplayRoles')) { - api.broadcast('user.roleUpdate', { - type: 'removed', - _id: role._id, - u: { - _id: user._id, - username: user.username, - }, - scope, - }); - } - - return API.v1.success({ - role, - }); - }, - }, -); diff --git a/app/api/server/v1/rooms.js b/app/api/server/v1/rooms.js deleted file mode 100644 index 30e815c9a361..000000000000 --- a/app/api/server/v1/rooms.js +++ /dev/null @@ -1,574 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { FileUpload } from '../../../file-upload'; -import { Rooms, Messages } from '../../../models'; -import { API } from '../api'; -import { - findAdminRooms, - findChannelAndPrivateAutocomplete, - findAdminRoom, - findAdminRoomsAutocomplete, - findRoomsAvailableForTeams, - findChannelAndPrivateAutocompleteWithPagination, -} from '../lib/rooms'; -import { sendFile, sendViaEmail } from '../../../../server/lib/channelExport'; -import { canAccessRoom, hasPermission } from '../../../authorization/server'; -import { Media } from '../../../../server/sdk'; -import { settings } from '../../../settings/server/index'; -import { getUploadFormData } from '../lib/getUploadFormData'; - -function findRoomByIdOrName({ params, checkedArchived = true }) { - if ((!params.roomId || !params.roomId.trim()) && (!params.roomName || !params.roomName.trim())) { - throw new Meteor.Error('error-roomid-param-not-provided', 'The parameter "roomId" or "roomName" is required'); - } - - const fields = { ...API.v1.defaultFieldsToExclude }; - - let room; - if (params.roomId) { - room = Rooms.findOneById(params.roomId, { fields }); - } else if (params.roomName) { - room = Rooms.findOneByName(params.roomName, { fields }); - } - if (!room) { - throw new Meteor.Error('error-room-not-found', 'The required "roomId" or "roomName" param provided does not match any channel'); - } - if (checkedArchived && room.archived) { - throw new Meteor.Error('error-room-archived', `The channel, ${room.name}, is archived`); - } - - return room; -} - -API.v1.addRoute( - 'rooms.get', - { authRequired: true }, - { - get() { - const { updatedSince } = this.queryParams; - - let updatedSinceDate; - if (updatedSince) { - if (isNaN(Date.parse(updatedSince))) { - throw new Meteor.Error('error-updatedSince-param-invalid', 'The "updatedSince" query parameter must be a valid date.'); - } else { - updatedSinceDate = new Date(updatedSince); - } - } - - let result; - Meteor.runAsUser(this.userId, () => { - result = Meteor.call('rooms/get', updatedSinceDate); - }); - - if (Array.isArray(result)) { - result = { - update: result, - remove: [], - }; - } - - return API.v1.success({ - update: result.update.map((room) => this.composeRoomWithLastMessage(room, this.userId)), - remove: result.remove.map((room) => this.composeRoomWithLastMessage(room, this.userId)), - }); - }, - }, -); - -API.v1.addRoute( - 'rooms.upload/:rid', - { authRequired: true }, - { - post() { - if (!canAccessRoom({ _id: this.urlParams.rid }, { _id: this.userId })) { - return API.v1.unauthorized(); - } - - const { file, ...fields } = Promise.await( - getUploadFormData({ - request: this.request, - }), - ); - - if (!file) { - throw new Meteor.Error('invalid-field'); - } - - const details = { - name: file.filename, - size: file.fileBuffer.length, - type: file.mimetype, - rid: this.urlParams.rid, - userId: this.userId, - }; - - const stripExif = settings.get('Message_Attachments_Strip_Exif'); - const fileStore = FileUpload.getStore('Uploads'); - if (stripExif) { - // No need to check mime. Library will ignore any files without exif/xmp tags (like BMP, ico, PDF, etc) - file.fileBuffer = Promise.await(Media.stripExifFromBuffer(file.fileBuffer)); - } - const uploadedFile = fileStore.insertSync(details, file.fileBuffer); - - uploadedFile.description = fields.description; - - delete fields.description; - - Meteor.call('sendFileMessage', this.urlParams.rid, null, uploadedFile, fields); - - return API.v1.success({ - message: Messages.getMessageByFileIdAndUsername(uploadedFile._id, this.userId), - }); - }, - }, -); - -API.v1.addRoute( - 'rooms.saveNotification', - { authRequired: true }, - { - post() { - const saveNotifications = (notifications, roomId) => { - Object.keys(notifications).forEach((notificationKey) => - Meteor.runAsUser(this.userId, () => - Meteor.call('saveNotificationSettings', roomId, notificationKey, notifications[notificationKey]), - ), - ); - }; - const { roomId, notifications } = this.bodyParams; - - if (!roomId) { - return API.v1.failure("The 'roomId' param is required"); - } - - if (!notifications || Object.keys(notifications).length === 0) { - return API.v1.failure("The 'notifications' param is required"); - } - - saveNotifications(notifications, roomId); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'rooms.favorite', - { authRequired: true }, - { - post() { - const { favorite } = this.bodyParams; - - if (!this.bodyParams.hasOwnProperty('favorite')) { - return API.v1.failure("The 'favorite' param is required"); - } - - const room = findRoomByIdOrName({ params: this.bodyParams }); - - Meteor.runAsUser(this.userId, () => Meteor.call('toggleFavorite', room._id, favorite)); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'rooms.cleanHistory', - { authRequired: true }, - { - post() { - const findResult = findRoomByIdOrName({ params: this.bodyParams }); - - const { - latest, - oldest, - inclusive = false, - limit, - excludePinned, - filesOnly, - ignoreThreads, - ignoreDiscussion, - users, - } = this.bodyParams; - - if (!latest) { - return API.v1.failure('Body parameter "latest" is required.'); - } - - if (!oldest) { - return API.v1.failure('Body parameter "oldest" is required.'); - } - - const count = Meteor.runAsUser(this.userId, () => - Meteor.call('cleanRoomHistory', { - roomId: findResult._id, - latest: new Date(latest), - oldest: new Date(oldest), - inclusive, - limit, - excludePinned: [true, 'true', 1, '1'].includes(excludePinned), - filesOnly: [true, 'true', 1, '1'].includes(filesOnly), - ignoreThreads: [true, 'true', 1, '1'].includes(ignoreThreads), - ignoreDiscussion: [true, 'true', 1, '1'].includes(ignoreDiscussion), - fromUsers: users, - }), - ); - - return API.v1.success({ count }); - }, - }, -); - -API.v1.addRoute( - 'rooms.info', - { authRequired: true }, - { - get() { - const room = findRoomByIdOrName({ params: this.requestParams() }); - const { fields } = this.parseJsonQuery(); - - if (!room || !canAccessRoom(room, { _id: this.userId })) { - return API.v1.failure('not-allowed', 'Not Allowed'); - } - - return API.v1.success({ room: Rooms.findOneByIdOrName(room._id, { fields }) }); - }, - }, -); - -API.v1.addRoute( - 'rooms.leave', - { authRequired: true }, - { - post() { - const room = findRoomByIdOrName({ params: this.bodyParams }); - Meteor.runAsUser(this.userId, () => { - Meteor.call('leaveRoom', room._id); - }); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'rooms.createDiscussion', - { authRequired: true }, - { - post() { - const { prid, pmid, reply, t_name, users, encrypted } = this.bodyParams; - if (!prid) { - return API.v1.failure('Body parameter "prid" is required.'); - } - if (!t_name) { - return API.v1.failure('Body parameter "t_name" is required.'); - } - if (users && !Array.isArray(users)) { - return API.v1.failure('Body parameter "users" must be an array.'); - } - - if (encrypted !== undefined && typeof encrypted !== 'boolean') { - return API.v1.failure('Body parameter "encrypted" must be a boolean when included.'); - } - - const discussion = Meteor.runAsUser(this.userId, () => - Meteor.call('createDiscussion', { - prid, - pmid, - t_name, - reply, - users: users || [], - encrypted, - }), - ); - - return API.v1.success({ discussion }); - }, - }, -); - -API.v1.addRoute( - 'rooms.getDiscussions', - { authRequired: true }, - { - get() { - const room = findRoomByIdOrName({ params: this.requestParams() }); - const { offset, count } = this.getPaginationItems(); - const { sort, fields, query } = this.parseJsonQuery(); - - if (!room || !canAccessRoom(room, { _id: this.userId })) { - return API.v1.failure('not-allowed', 'Not Allowed'); - } - - const ourQuery = Object.assign(query, { prid: room._id }); - - const discussions = Rooms.find(ourQuery, { - sort: sort || { fname: 1 }, - skip: offset, - limit: count, - fields, - }).fetch(); - - return API.v1.success({ - discussions, - count: discussions.length, - offset, - total: Rooms.find(ourQuery).count(), - }); - }, - }, -); - -API.v1.addRoute( - 'rooms.adminRooms', - { authRequired: true }, - { - get() { - const { offset, count } = this.getPaginationItems(); - const { sort } = this.parseJsonQuery(); - const { types, filter } = this.requestParams(); - - return API.v1.success( - Promise.await( - findAdminRooms({ - uid: this.userId, - filter, - types, - pagination: { - offset, - count, - sort, - }, - }), - ), - ); - }, - }, -); - -API.v1.addRoute( - 'rooms.autocomplete.adminRooms', - { authRequired: true }, - { - get() { - const { selector } = this.queryParams; - if (!selector) { - return API.v1.failure("The 'selector' param is required"); - } - - return API.v1.success( - Promise.await( - findAdminRoomsAutocomplete({ - uid: this.userId, - selector: JSON.parse(selector), - }), - ), - ); - }, - }, -); - -API.v1.addRoute( - 'rooms.adminRooms.getRoom', - { authRequired: true }, - { - get() { - const { rid } = this.requestParams(); - const room = Promise.await( - findAdminRoom({ - uid: this.userId, - rid, - }), - ); - - if (!room) { - return API.v1.failure('not-allowed', 'Not Allowed'); - } - return API.v1.success(room); - }, - }, -); - -API.v1.addRoute( - 'rooms.autocomplete.channelAndPrivate', - { authRequired: true }, - { - get() { - const { selector } = this.queryParams; - if (!selector) { - return API.v1.failure("The 'selector' param is required"); - } - - return API.v1.success( - Promise.await( - findChannelAndPrivateAutocomplete({ - uid: this.userId, - selector: JSON.parse(selector), - }), - ), - ); - }, - }, -); - -API.v1.addRoute( - 'rooms.autocomplete.channelAndPrivate.withPagination', - { authRequired: true }, - { - get() { - const { selector } = this.queryParams; - const { offset, count } = this.getPaginationItems(); - const { sort } = this.parseJsonQuery(); - - if (!selector) { - return API.v1.failure("The 'selector' param is required"); - } - - return API.v1.success( - Promise.await( - findChannelAndPrivateAutocompleteWithPagination({ - uid: this.userId, - selector: JSON.parse(selector), - pagination: { - offset, - count, - sort, - }, - }), - ), - ); - }, - }, -); - -API.v1.addRoute( - 'rooms.autocomplete.availableForTeams', - { authRequired: true }, - { - get() { - const { name } = this.queryParams; - - if (name && typeof name !== 'string') { - return API.v1.failure("The 'name' param is invalid"); - } - - return API.v1.success( - Promise.await( - findRoomsAvailableForTeams({ - uid: this.userId, - name, - }), - ), - ); - }, - }, -); - -API.v1.addRoute( - 'rooms.saveRoomSettings', - { authRequired: true }, - { - post() { - const { rid, ...params } = this.bodyParams; - - const result = Meteor.runAsUser(this.userId, () => Meteor.call('saveRoomSettings', rid, params)); - - return API.v1.success({ rid: result.rid }); - }, - }, -); - -API.v1.addRoute( - 'rooms.changeArchivationState', - { authRequired: true }, - { - post() { - const { rid, action } = this.bodyParams; - - let result; - if (action === 'archive') { - result = Meteor.runAsUser(this.userId, () => Meteor.call('archiveRoom', rid)); - } else { - result = Meteor.runAsUser(this.userId, () => Meteor.call('unarchiveRoom', rid)); - } - - return API.v1.success({ result }); - }, - }, -); - -API.v1.addRoute( - 'rooms.export', - { authRequired: true }, - { - post() { - const { rid, type } = this.bodyParams; - - if (!rid || !type || !['email', 'file'].includes(type)) { - throw new Meteor.Error('error-invalid-params'); - } - - if (!hasPermission(this.userId, 'mail-messages', rid)) { - throw new Meteor.Error('error-action-not-allowed', 'Mailing is not allowed'); - } - - const room = Rooms.findOneById(rid); - if (!room) { - throw new Meteor.Error('error-invalid-room'); - } - - const user = Meteor.users.findOne({ _id: this.userId }); - - if (!canAccessRoom(room, user)) { - throw new Meteor.Error('error-not-allowed', 'Not Allowed'); - } - - if (type === 'file') { - const { dateFrom, dateTo, format } = this.bodyParams; - - if (!['html', 'json'].includes(format)) { - throw new Meteor.Error('error-invalid-format'); - } - - sendFile( - { - rid, - format, - ...(dateFrom && { dateFrom: new Date(dateFrom) }), - ...(dateTo && { dateTo: new Date(dateTo) }), - }, - user, - ); - return API.v1.success(); - } - - if (type === 'email') { - const { toUsers, toEmails, subject, messages } = this.bodyParams; - - if ((!toUsers || toUsers.length === 0) && (!toEmails || toEmails.length === 0)) { - throw new Meteor.Error('error-invalid-recipient'); - } - - if (messages.length === 0) { - throw new Meteor.Error('error-invalid-messages'); - } - - const result = sendViaEmail( - { - rid, - toUsers, - toEmails, - subject, - messages, - }, - user, - ); - - return API.v1.success(result); - } - - return API.v1.error(); - }, - }, -); diff --git a/app/api/server/v1/settings.ts b/app/api/server/v1/settings.ts deleted file mode 100644 index 16de74ed0b4d..000000000000 --- a/app/api/server/v1/settings.ts +++ /dev/null @@ -1,216 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { ServiceConfiguration } from 'meteor/service-configuration'; -import _ from 'underscore'; - -import { Settings } from '../../../models/server/raw'; -import { hasPermission } from '../../../authorization/server'; -import { API, ResultFor } from '../api'; -import { SettingsEvents, settings } from '../../../settings/server'; -import { setValue } from '../../../settings/server/raw'; -import { ISetting, ISettingColor, isSettingAction, isSettingColor } from '../../../../definition/ISetting'; -import { - isOauthCustomConfiguration, - isSettingsUpdatePropDefault, - isSettingsUpdatePropsActions, - isSettingsUpdatePropsColor, -} from '../../../../definition/rest/v1/settings'; - -const fetchSettings = async ( - query: Parameters[0], - sort: Parameters[1]['sort'], - offset: Parameters[1]['skip'], - count: Parameters[1]['limit'], - fields: Parameters[1]['projection'], -): Promise => { - const settings = (await Settings.find(query, { - sort: sort || { _id: 1 }, - skip: offset, - limit: count, - projection: { _id: 1, value: 1, enterprise: 1, invalidValue: 1, modules: 1, ...fields }, - }).toArray()) as unknown as ISetting[]; - - SettingsEvents.emit('fetch-settings', settings); - return settings; -}; - -// settings endpoints -API.v1.addRoute( - 'settings.public', - { authRequired: false }, - { - async get() { - const { offset, count } = this.getPaginationItems(); - const { sort, fields, query } = this.parseJsonQuery(); - - const ourQuery = { - ...query, - hidden: { $ne: true }, - public: true, - }; - - const settings = await fetchSettings(ourQuery, sort, offset, count, fields); - - return API.v1.success({ - settings, - count: settings.length, - offset, - total: await Settings.find(ourQuery).count(), - }); - }, - }, -); - -API.v1.addRoute( - 'settings.oauth', - { authRequired: false }, - { - get() { - const oAuthServicesEnabled = ServiceConfiguration.configurations.find({}, { fields: { secret: 0 } }).fetch(); - - return API.v1.success({ - services: oAuthServicesEnabled.map((service) => { - if (!isOauthCustomConfiguration(service)) { - return service; - } - - if (service.custom || (service.service && ['saml', 'cas', 'wordpress'].includes(service.service))) { - return { ...service }; - } - - return { - _id: service._id, - name: service.service, - clientId: service.appId || service.clientId || service.consumerKey, - buttonLabelText: service.buttonLabelText || '', - buttonColor: service.buttonColor || '', - buttonLabelColor: service.buttonLabelColor || '', - custom: false, - }; - }), - }); - }, - }, -); - -API.v1.addRoute( - 'settings.addCustomOAuth', - { authRequired: true, twoFactorRequired: true }, - { - async post() { - if (!this.bodyParams.name || !this.bodyParams.name.trim()) { - throw new Meteor.Error('error-name-param-not-provided', 'The parameter "name" is required'); - } - - await Meteor.call('addOAuthService', this.bodyParams.name, this.userId); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'settings', - { authRequired: true }, - { - async get() { - const { offset, count } = this.getPaginationItems(); - const { sort, fields, query } = this.parseJsonQuery(); - - let ourQuery: Parameters[0] = { - hidden: { $ne: true }, - }; - - if (!hasPermission(this.userId, 'view-privileged-setting')) { - ourQuery.public = true; - } - - ourQuery = Object.assign({}, query, ourQuery); - - const settings = await fetchSettings(ourQuery, sort, offset, count, fields); - - return API.v1.success({ - settings, - count: settings.length, - offset, - total: Settings.find(ourQuery).count(), - }); - }, - }, -); - -API.v1.addRoute( - 'settings/:_id', - { authRequired: true }, - { - async get() { - if (!hasPermission(this.userId, 'view-privileged-setting')) { - return API.v1.unauthorized(); - } - const setting = await Settings.findOneNotHiddenById(this.urlParams._id); - if (!setting) { - return API.v1.failure(); - } - return API.v1.success(_.pick(setting, '_id', 'value')); - }, - post: { - twoFactorRequired: true, - async action(): Promise> { - if (!hasPermission(this.userId, 'edit-privileged-setting')) { - return API.v1.unauthorized(); - } - - if (typeof this.urlParams._id !== 'string') { - throw new Meteor.Error('error-id-param-not-provided', 'The parameter "id" is required'); - } - - // allow special handling of particular setting types - const setting = await Settings.findOneNotHiddenById(this.urlParams._id); - - if (!setting) { - return API.v1.failure(); - } - - if (isSettingAction(setting) && isSettingsUpdatePropsActions(this.bodyParams) && this.bodyParams.execute) { - // execute the configured method - Meteor.call(setting.value); - return API.v1.success(); - } - - if (isSettingColor(setting) && isSettingsUpdatePropsColor(this.bodyParams)) { - Settings.updateOptionsById(this.urlParams._id, { - editor: this.bodyParams.editor, - }); - Settings.updateValueNotHiddenById(this.urlParams._id, this.bodyParams.value); - return API.v1.success(); - } - - if ( - isSettingsUpdatePropDefault(this.bodyParams) && - (await Settings.updateValueNotHiddenById(this.urlParams._id, this.bodyParams.value)) - ) { - const s = await Settings.findOneNotHiddenById(this.urlParams._id); - if (!s) { - return API.v1.failure(); - } - settings.set(s); - setValue(this.urlParams._id, this.bodyParams.value); - return API.v1.success(); - } - - return API.v1.failure(); - }, - }, - }, -); - -API.v1.addRoute( - 'service.configurations', - { authRequired: false }, - { - get() { - return API.v1.success({ - configurations: ServiceConfiguration.configurations.find({}, { fields: { secret: 0 } }).fetch(), - }); - }, - }, -); diff --git a/app/api/server/v1/stats.js b/app/api/server/v1/stats.js deleted file mode 100644 index c010cc3090ab..000000000000 --- a/app/api/server/v1/stats.js +++ /dev/null @@ -1,46 +0,0 @@ -import { API } from '../api'; -import { getStatistics, getLastStatistics } from '../../../statistics/server'; - -API.v1.addRoute( - 'statistics', - { authRequired: true }, - { - get() { - const { refresh } = this.requestParams(); - return API.v1.success( - Promise.await( - getLastStatistics({ - userId: this.userId, - refresh: refresh && refresh === 'true', - }), - ), - ); - }, - }, -); - -API.v1.addRoute( - 'statistics.list', - { authRequired: true }, - { - get() { - const { offset, count } = this.getPaginationItems(); - const { sort, fields, query } = this.parseJsonQuery(); - - return API.v1.success( - Promise.await( - getStatistics({ - userId: this.userId, - query, - pagination: { - offset, - count, - sort, - fields, - }, - }), - ), - ); - }, - }, -); diff --git a/app/api/server/v1/subscriptions.js b/app/api/server/v1/subscriptions.js deleted file mode 100644 index 6624ede0e6c4..000000000000 --- a/app/api/server/v1/subscriptions.js +++ /dev/null @@ -1,99 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { check } from 'meteor/check'; - -import { Subscriptions } from '../../../models'; -import { API } from '../api'; - -API.v1.addRoute( - 'subscriptions.get', - { authRequired: true }, - { - get() { - const { updatedSince } = this.queryParams; - - let updatedSinceDate; - if (updatedSince) { - if (isNaN(Date.parse(updatedSince))) { - throw new Meteor.Error('error-roomId-param-invalid', 'The "lastUpdate" query parameter must be a valid date.'); - } else { - updatedSinceDate = new Date(updatedSince); - } - } - - let result; - Meteor.runAsUser(this.userId, () => { - result = Meteor.call('subscriptions/get', updatedSinceDate); - }); - - if (Array.isArray(result)) { - result = { - update: result, - remove: [], - }; - } - - return API.v1.success(result); - }, - }, -); - -API.v1.addRoute( - 'subscriptions.getOne', - { authRequired: true }, - { - get() { - const { roomId } = this.requestParams(); - - if (!roomId) { - return API.v1.failure("The 'roomId' param is required"); - } - - const subscription = Subscriptions.findOneByRoomIdAndUserId(roomId, this.userId); - - return API.v1.success({ - subscription, - }); - }, - }, -); - -/** - This API is suppose to mark any room as read. - - Method: POST - Route: api/v1/subscriptions.read - Params: - - rid: The rid of the room to be marked as read. - */ -API.v1.addRoute( - 'subscriptions.read', - { authRequired: true }, - { - post() { - check(this.bodyParams, { - rid: String, - }); - - Meteor.runAsUser(this.userId, () => Meteor.call('readMessages', this.bodyParams.rid)); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'subscriptions.unread', - { authRequired: true }, - { - post() { - const { roomId, firstUnreadMessage } = this.bodyParams; - if (!roomId && firstUnreadMessage && !firstUnreadMessage._id) { - return API.v1.failure('At least one of "roomId" or "firstUnreadMessage._id" params is required'); - } - - Meteor.runAsUser(this.userId, () => Meteor.call('unreadMessages', firstUnreadMessage, roomId)); - - return API.v1.success(); - }, - }, -); diff --git a/app/api/server/v1/users.js b/app/api/server/v1/users.js deleted file mode 100644 index 9dad4a9811f4..000000000000 --- a/app/api/server/v1/users.js +++ /dev/null @@ -1,1165 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Accounts } from 'meteor/accounts-base'; -import { Match, check } from 'meteor/check'; -import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; -import _ from 'underscore'; - -import { Users, Subscriptions } from '../../../models/server'; -import { Users as UsersRaw } from '../../../models/server/raw'; -import { hasPermission } from '../../../authorization'; -import { settings } from '../../../settings/server'; -import { getURL } from '../../../utils'; -import { - validateCustomFields, - saveUser, - saveCustomFieldsWithoutValidation, - checkUsernameAvailability, - setUserAvatar, - saveCustomFields, - setStatusText, -} from '../../../lib/server'; -import { getFullUserDataByIdOrUsername } from '../../../lib/server/functions/getFullUserData'; -import { API } from '../api'; -import { getUploadFormData } from '../lib/getUploadFormData'; -import { findUsersToAutocomplete, getInclusiveFields, getNonEmptyFields, getNonEmptyQuery } from '../lib/users'; -import { getUserForCheck, emailCheck } from '../../../2fa/server/code'; -import { resetUserE2EEncriptionKey } from '../../../../server/lib/resetUserE2EKey'; -import { setUserStatus } from '../../../../imports/users-presence/server/activeUsers'; -import { resetTOTP } from '../../../2fa/server/functions/resetTOTP'; -import { Team } from '../../../../server/sdk'; - -API.v1.addRoute( - 'users.create', - { authRequired: true }, - { - post() { - check(this.bodyParams, { - email: String, - name: String, - password: String, - username: String, - active: Match.Maybe(Boolean), - bio: Match.Maybe(String), - nickname: Match.Maybe(String), - statusText: Match.Maybe(String), - roles: Match.Maybe(Array), - joinDefaultChannels: Match.Maybe(Boolean), - requirePasswordChange: Match.Maybe(Boolean), - setRandomPassword: Match.Maybe(Boolean), - sendWelcomeEmail: Match.Maybe(Boolean), - verified: Match.Maybe(Boolean), - customFields: Match.Maybe(Object), - }); - - // New change made by pull request #5152 - if (typeof this.bodyParams.joinDefaultChannels === 'undefined') { - this.bodyParams.joinDefaultChannels = true; - } - - if (this.bodyParams.customFields) { - validateCustomFields(this.bodyParams.customFields); - } - - const newUserId = saveUser(this.userId, this.bodyParams); - - if (this.bodyParams.customFields) { - saveCustomFieldsWithoutValidation(newUserId, this.bodyParams.customFields); - } - - if (typeof this.bodyParams.active !== 'undefined') { - Meteor.runAsUser(this.userId, () => { - Meteor.call('setUserActiveStatus', newUserId, this.bodyParams.active); - }); - } - - const { fields } = this.parseJsonQuery(); - - return API.v1.success({ user: Users.findOneById(newUserId, { fields }) }); - }, - }, -); - -API.v1.addRoute( - 'users.delete', - { authRequired: true }, - { - post() { - if (!hasPermission(this.userId, 'delete-user')) { - return API.v1.unauthorized(); - } - - const user = this.getUserFromParams(); - const { confirmRelinquish = false } = this.requestParams(); - - Meteor.runAsUser(this.userId, () => { - Meteor.call('deleteUser', user._id, confirmRelinquish); - }); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'users.deleteOwnAccount', - { authRequired: true }, - { - post() { - const { password } = this.bodyParams; - if (!password) { - return API.v1.failure('Body parameter "password" is required.'); - } - if (!settings.get('Accounts_AllowDeleteOwnAccount')) { - throw new Meteor.Error('error-not-allowed', 'Not allowed'); - } - - const { confirmRelinquish = false } = this.requestParams(); - - Meteor.runAsUser(this.userId, () => { - Meteor.call('deleteUserOwnAccount', password, confirmRelinquish); - }); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'users.getAvatar', - { authRequired: false }, - { - get() { - const user = this.getUserFromParams(); - - const url = getURL(`/avatar/${user.username}`, { cdn: false, full: true }); - this.response.setHeader('Location', url); - - return { - statusCode: 307, - body: url, - }; - }, - }, -); - -API.v1.addRoute( - 'users.setActiveStatus', - { authRequired: true }, - { - post() { - check(this.bodyParams, { - userId: String, - activeStatus: Boolean, - confirmRelinquish: Match.Maybe(Boolean), - }); - - if (!hasPermission(this.userId, 'edit-other-user-active-status')) { - return API.v1.unauthorized(); - } - - Meteor.runAsUser(this.userId, () => { - const { userId, activeStatus, confirmRelinquish = false } = this.bodyParams; - Meteor.call('setUserActiveStatus', userId, activeStatus, confirmRelinquish); - }); - return API.v1.success({ - user: Users.findOneById(this.bodyParams.userId, { fields: { active: 1 } }), - }); - }, - }, -); - -API.v1.addRoute( - 'users.deactivateIdle', - { authRequired: true }, - { - post() { - check(this.bodyParams, { - daysIdle: Match.Integer, - role: Match.Optional(String), - }); - - if (!hasPermission(this.userId, 'edit-other-user-active-status')) { - return API.v1.unauthorized(); - } - - const { daysIdle, role = 'user' } = this.bodyParams; - - const lastLoggedIn = new Date(); - lastLoggedIn.setDate(lastLoggedIn.getDate() - daysIdle); - - const count = Users.setActiveNotLoggedInAfterWithRole(lastLoggedIn, role, false); - - return API.v1.success({ - count, - }); - }, - }, -); - -API.v1.addRoute( - 'users.getPresence', - { authRequired: true }, - { - get() { - if (this.isUserFromParams()) { - const user = Users.findOneById(this.userId); - return API.v1.success({ - presence: user.status, - connectionStatus: user.statusConnection, - lastLogin: user.lastLogin, - }); - } - - const user = this.getUserFromParams(); - - return API.v1.success({ - presence: user.status, - }); - }, - }, -); - -API.v1.addRoute( - 'users.info', - { authRequired: true }, - { - get() { - const { username, userId } = this.requestParams(); - const { fields } = this.parseJsonQuery(); - - check(userId, Match.Maybe(String)); - check(username, Match.Maybe(String)); - - if (userId !== undefined && username !== undefined) { - throw new Meteor.Error('invalid-filter', 'Cannot filter by id and username at once'); - } - - if (!userId && !username) { - throw new Meteor.Error('invalid-filter', 'Must filter by id or username'); - } - - const user = getFullUserDataByIdOrUsername({ userId: this.userId, filterId: userId, filterUsername: username }); - - if (!user) { - return API.v1.failure('User not found.'); - } - const myself = user._id === this.userId; - if (fields.userRooms === 1 && (myself || hasPermission(this.userId, 'view-other-user-channels'))) { - user.rooms = Subscriptions.findByUserId(user._id, { - fields: { - rid: 1, - name: 1, - t: 1, - roles: 1, - unread: 1, - }, - sort: { - t: 1, - name: 1, - }, - }).fetch(); - } - - return API.v1.success({ - user, - }); - }, - }, -); - -API.v1.addRoute( - 'users.list', - { authRequired: true }, - { - get() { - if (!hasPermission(this.userId, 'view-d-room')) { - return API.v1.unauthorized(); - } - - const { offset, count } = this.getPaginationItems(); - const { sort, fields, query } = this.parseJsonQuery(); - - const nonEmptyQuery = getNonEmptyQuery(query); - const nonEmptyFields = getNonEmptyFields(fields); - - const inclusiveFields = getInclusiveFields(nonEmptyFields); - - const actualSort = sort && sort.name ? { nameInsensitive: sort.name, ...sort } : sort || { username: 1 }; - - const limit = - count !== 0 - ? [ - { - $limit: count, - }, - ] - : []; - - const result = Promise.await( - UsersRaw.col - .aggregate([ - { - $match: nonEmptyQuery, - }, - { - $project: inclusiveFields, - }, - { - $addFields: { - nameInsensitive: { - $toLower: '$name', - }, - }, - }, - { - $facet: { - sortedResults: [ - { - $sort: actualSort, - }, - { - $skip: offset, - }, - ...limit, - ], - totalCount: [{ $group: { _id: null, total: { $sum: 1 } } }], - }, - }, - ]) - .toArray(), - ); - - const { - sortedResults: users, - totalCount: [{ total } = { total: 0 }], - } = result[0]; - - return API.v1.success({ - users, - count: users.length, - offset, - total, - }); - }, - }, -); - -API.v1.addRoute( - 'users.register', - { - authRequired: false, - rateLimiterOptions: { - numRequestsAllowed: settings.get('Rate_Limiter_Limit_RegisterUser'), - intervalTimeInMS: settings.get('API_Enable_Rate_Limiter_Limit_Time_Default'), - }, - }, - { - post() { - if (this.userId) { - return API.v1.failure('Logged in users can not register again.'); - } - - // We set their username here, so require it - // The `registerUser` checks for the other requirements - check( - this.bodyParams, - Match.ObjectIncluding({ - username: String, - }), - ); - - if (!checkUsernameAvailability(this.bodyParams.username)) { - return API.v1.failure('Username is already in use'); - } - - // Register the user - const userId = Meteor.call('registerUser', this.bodyParams); - - // Now set their username - Meteor.runAsUser(userId, () => Meteor.call('setUsername', this.bodyParams.username)); - const { fields } = this.parseJsonQuery(); - - return API.v1.success({ user: Users.findOneById(userId, { fields }) }); - }, - }, -); - -API.v1.addRoute( - 'users.resetAvatar', - { authRequired: true }, - { - post() { - const user = this.getUserFromParams(); - - if (settings.get('Accounts_AllowUserAvatarChange') && user._id === this.userId) { - Meteor.runAsUser(this.userId, () => Meteor.call('resetAvatar')); - } else if (hasPermission(this.userId, 'edit-other-user-avatar')) { - Meteor.runAsUser(this.userId, () => Meteor.call('resetAvatar', user._id)); - } else { - throw new Meteor.Error('error-not-allowed', 'Reset avatar is not allowed', { - method: 'users.resetAvatar', - }); - } - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'users.setAvatar', - { authRequired: true }, - { - async post() { - check( - this.bodyParams, - Match.ObjectIncluding({ - avatarUrl: Match.Maybe(String), - userId: Match.Maybe(String), - username: Match.Maybe(String), - }), - ); - const canEditOtherUserAvatar = hasPermission(this.userId, 'edit-other-user-avatar'); - - if (!settings.get('Accounts_AllowUserAvatarChange') && !canEditOtherUserAvatar) { - throw new Meteor.Error('error-not-allowed', 'Change avatar is not allowed', { - method: 'users.setAvatar', - }); - } - - let user; - if (this.isUserFromParams()) { - user = Meteor.users.findOne(this.userId); - } else if (canEditOtherUserAvatar) { - user = this.getUserFromParams(); - } else { - return API.v1.unauthorized(); - } - - if (this.bodyParams.avatarUrl) { - setUserAvatar(user, this.bodyParams.avatarUrl, '', 'url'); - return API.v1.success(); - } - - const { image, ...fields } = await getUploadFormData({ - request: this.request, - }); - - if (!image) { - return API.v1.failure("The 'image' param is required"); - } - - const sentTheUserByFormData = fields.userId || fields.username; - if (sentTheUserByFormData) { - if (fields.userId) { - user = Users.findOneById(fields.userId, { fields: { username: 1 } }); - } else if (fields.username) { - user = Users.findOneByUsernameIgnoringCase(fields.username, { fields: { username: 1 } }); - } - - if (!user) { - throw new Meteor.Error('error-invalid-user', 'The optional "userId" or "username" param provided does not match any users'); - } - - const isAnotherUser = this.userId !== user._id; - if (isAnotherUser && !hasPermission(this.userId, 'edit-other-user-avatar')) { - throw new Meteor.Error('error-not-allowed', 'Not allowed'); - } - } - - setUserAvatar(user, image.fileBuffer, image.mimetype, 'rest'); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'users.getStatus', - { authRequired: true }, - { - get() { - if (this.isUserFromParams()) { - const user = Users.findOneById(this.userId); - return API.v1.success({ - _id: user._id, - message: user.statusText, - connectionStatus: user.statusConnection, - status: user.status, - }); - } - - const user = this.getUserFromParams(); - - return API.v1.success({ - _id: user._id, - message: user.statusText, - status: user.status, - }); - }, - }, -); - -API.v1.addRoute( - 'users.setStatus', - { authRequired: true }, - { - post() { - check( - this.bodyParams, - Match.ObjectIncluding({ - status: Match.Maybe(String), - message: Match.Maybe(String), - }), - ); - - if (!settings.get('Accounts_AllowUserStatusMessageChange')) { - throw new Meteor.Error('error-not-allowed', 'Change status is not allowed', { - method: 'users.setStatus', - }); - } - - let user; - if (this.isUserFromParams()) { - user = Meteor.users.findOne(this.userId); - } else if (hasPermission(this.userId, 'edit-other-user-info')) { - user = this.getUserFromParams(); - } else { - return API.v1.unauthorized(); - } - - Meteor.runAsUser(user._id, () => { - if (this.bodyParams.message || this.bodyParams.message === '') { - setStatusText(user._id, this.bodyParams.message); - } - if (this.bodyParams.status) { - const validStatus = ['online', 'away', 'offline', 'busy']; - if (validStatus.includes(this.bodyParams.status)) { - const { status } = this.bodyParams; - - if (status === 'offline' && !settings.get('Accounts_AllowInvisibleStatusOption')) { - throw new Meteor.Error('error-status-not-allowed', 'Invisible status is disabled', { - method: 'users.setStatus', - }); - } - - Meteor.users.update(user._id, { - $set: { - status, - statusDefault: status, - }, - }); - - setUserStatus(user, status); - } else { - throw new Meteor.Error('error-invalid-status', 'Valid status types include online, away, offline, and busy.', { - method: 'users.setStatus', - }); - } - } - }); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'users.update', - { authRequired: true, twoFactorRequired: true }, - { - post() { - check(this.bodyParams, { - userId: String, - data: Match.ObjectIncluding({ - email: Match.Maybe(String), - name: Match.Maybe(String), - password: Match.Maybe(String), - username: Match.Maybe(String), - bio: Match.Maybe(String), - nickname: Match.Maybe(String), - statusText: Match.Maybe(String), - active: Match.Maybe(Boolean), - roles: Match.Maybe(Array), - joinDefaultChannels: Match.Maybe(Boolean), - requirePasswordChange: Match.Maybe(Boolean), - sendWelcomeEmail: Match.Maybe(Boolean), - verified: Match.Maybe(Boolean), - customFields: Match.Maybe(Object), - }), - }); - - const userData = _.extend({ _id: this.bodyParams.userId }, this.bodyParams.data); - - Meteor.runAsUser(this.userId, () => saveUser(this.userId, userData)); - - if (this.bodyParams.data.customFields) { - saveCustomFields(this.bodyParams.userId, this.bodyParams.data.customFields); - } - - if (typeof this.bodyParams.data.active !== 'undefined') { - const { - userId, - data: { active }, - confirmRelinquish = false, - } = this.bodyParams; - - Meteor.runAsUser(this.userId, () => { - Meteor.call('setUserActiveStatus', userId, active, confirmRelinquish); - }); - } - const { fields } = this.parseJsonQuery(); - - return API.v1.success({ user: Users.findOneById(this.bodyParams.userId, { fields }) }); - }, - }, -); - -API.v1.addRoute( - 'users.updateOwnBasicInfo', - { authRequired: true }, - { - post() { - check(this.bodyParams, { - data: Match.ObjectIncluding({ - email: Match.Maybe(String), - name: Match.Maybe(String), - username: Match.Maybe(String), - nickname: Match.Maybe(String), - statusText: Match.Maybe(String), - currentPassword: Match.Maybe(String), - newPassword: Match.Maybe(String), - }), - customFields: Match.Maybe(Object), - }); - - const userData = { - email: this.bodyParams.data.email, - realname: this.bodyParams.data.name, - username: this.bodyParams.data.username, - nickname: this.bodyParams.data.nickname, - statusText: this.bodyParams.data.statusText, - newPassword: this.bodyParams.data.newPassword, - typedPassword: this.bodyParams.data.currentPassword, - }; - - // saveUserProfile now uses the default two factor authentication procedures, so we need to provide that - const twoFactorOptions = !userData.typedPassword - ? null - : { - twoFactorCode: userData.typedPassword, - twoFactorMethod: 'password', - }; - - Meteor.runAsUser(this.userId, () => Meteor.call('saveUserProfile', userData, this.bodyParams.customFields, twoFactorOptions)); - - return API.v1.success({ - user: Users.findOneById(this.userId, { fields: API.v1.defaultFieldsToExclude }), - }); - }, - }, -); - -API.v1.addRoute( - 'users.createToken', - { authRequired: true }, - { - post() { - const user = this.getUserFromParams(); - let data; - Meteor.runAsUser(this.userId, () => { - data = Meteor.call('createToken', user._id); - }); - return data ? API.v1.success({ data }) : API.v1.unauthorized(); - }, - }, -); - -API.v1.addRoute( - 'users.getPreferences', - { authRequired: true }, - { - get() { - const user = Users.findOneById(this.userId); - if (user.settings) { - const { preferences = {} } = user.settings; - preferences.language = user.language; - - return API.v1.success({ - preferences, - }); - } - return API.v1.failure(TAPi18n.__('Accounts_Default_User_Preferences_not_available').toUpperCase()); - }, - }, -); - -API.v1.addRoute( - 'users.setPreferences', - { authRequired: true }, - { - post() { - check(this.bodyParams, { - userId: Match.Maybe(String), - data: Match.ObjectIncluding({ - newRoomNotification: Match.Maybe(String), - newMessageNotification: Match.Maybe(String), - clockMode: Match.Maybe(Number), - useEmojis: Match.Maybe(Boolean), - convertAsciiEmoji: Match.Maybe(Boolean), - saveMobileBandwidth: Match.Maybe(Boolean), - collapseMediaByDefault: Match.Maybe(Boolean), - autoImageLoad: Match.Maybe(Boolean), - emailNotificationMode: Match.Maybe(String), - unreadAlert: Match.Maybe(Boolean), - notificationsSoundVolume: Match.Maybe(Number), - desktopNotifications: Match.Maybe(String), - pushNotifications: Match.Maybe(String), - enableAutoAway: Match.Maybe(Boolean), - highlights: Match.Maybe(Array), - desktopNotificationRequireInteraction: Match.Maybe(Boolean), - messageViewMode: Match.Maybe(Number), - showMessageInMainThread: Match.Maybe(Boolean), - hideUsernames: Match.Maybe(Boolean), - hideRoles: Match.Maybe(Boolean), - displayAvatars: Match.Maybe(Boolean), - hideFlexTab: Match.Maybe(Boolean), - sendOnEnter: Match.Maybe(String), - language: Match.Maybe(String), - sidebarShowFavorites: Match.Optional(Boolean), - sidebarShowUnread: Match.Optional(Boolean), - sidebarSortby: Match.Optional(String), - sidebarViewMode: Match.Optional(String), - sidebarDisplayAvatar: Match.Optional(Boolean), - sidebarGroupByType: Match.Optional(Boolean), - muteFocusedConversations: Match.Optional(Boolean), - }), - }); - if (this.bodyParams.userId && this.bodyParams.userId !== this.userId && !hasPermission(this.userId, 'edit-other-user-info')) { - throw new Meteor.Error('error-action-not-allowed', 'Editing user is not allowed'); - } - const userId = this.bodyParams.userId ? this.bodyParams.userId : this.userId; - if (!Users.findOneById(userId)) { - throw new Meteor.Error('error-invalid-user', 'The optional "userId" param provided does not match any users'); - } - - Meteor.runAsUser(userId, () => Meteor.call('saveUserPreferences', this.bodyParams.data)); - const user = Users.findOneById(userId, { - fields: { - 'settings.preferences': 1, - 'language': 1, - }, - }); - return API.v1.success({ - user: { - _id: user._id, - settings: { - preferences: { - ...user.settings.preferences, - language: user.language, - }, - }, - }, - }); - }, - }, -); - -API.v1.addRoute( - 'users.forgotPassword', - { authRequired: false }, - { - post() { - const { email } = this.bodyParams; - if (!email) { - return API.v1.failure("The 'email' param is required"); - } - - Meteor.call('sendForgotPasswordEmail', email); - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'users.getUsernameSuggestion', - { authRequired: true }, - { - get() { - const result = Meteor.runAsUser(this.userId, () => Meteor.call('getUsernameSuggestion')); - - return API.v1.success({ result }); - }, - }, -); - -API.v1.addRoute( - 'users.generatePersonalAccessToken', - { authRequired: true, twoFactorRequired: true }, - { - post() { - const { tokenName, bypassTwoFactor } = this.bodyParams; - if (!tokenName) { - return API.v1.failure("The 'tokenName' param is required"); - } - const token = Meteor.runAsUser(this.userId, () => Meteor.call('personalAccessTokens:generateToken', { tokenName, bypassTwoFactor })); - - return API.v1.success({ token }); - }, - }, -); - -API.v1.addRoute( - 'users.regeneratePersonalAccessToken', - { authRequired: true, twoFactorRequired: true }, - { - post() { - const { tokenName } = this.bodyParams; - if (!tokenName) { - return API.v1.failure("The 'tokenName' param is required"); - } - const token = Meteor.runAsUser(this.userId, () => Meteor.call('personalAccessTokens:regenerateToken', { tokenName })); - - return API.v1.success({ token }); - }, - }, -); - -API.v1.addRoute( - 'users.getPersonalAccessTokens', - { authRequired: true }, - { - get() { - if (!hasPermission(this.userId, 'create-personal-access-tokens')) { - throw new Meteor.Error('not-authorized', 'Not Authorized'); - } - const loginTokens = Users.getLoginTokensByUserId(this.userId).fetch()[0]; - const getPersonalAccessTokens = () => - loginTokens.services.resume.loginTokens - .filter((loginToken) => loginToken.type && loginToken.type === 'personalAccessToken') - .map((loginToken) => ({ - name: loginToken.name, - createdAt: loginToken.createdAt, - lastTokenPart: loginToken.lastTokenPart, - bypassTwoFactor: loginToken.bypassTwoFactor, - })); - - return API.v1.success({ - tokens: loginTokens ? getPersonalAccessTokens() : [], - }); - }, - }, -); - -API.v1.addRoute( - 'users.removePersonalAccessToken', - { authRequired: true, twoFactorRequired: true }, - { - post() { - const { tokenName } = this.bodyParams; - if (!tokenName) { - return API.v1.failure("The 'tokenName' param is required"); - } - Meteor.runAsUser(this.userId, () => - Meteor.call('personalAccessTokens:removeToken', { - tokenName, - }), - ); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'users.2fa.enableEmail', - { authRequired: true }, - { - post() { - Users.enableEmail2FAByUserId(this.userId); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'users.2fa.disableEmail', - { authRequired: true, twoFactorRequired: true, twoFactorOptions: { disableRememberMe: true } }, - { - post() { - Users.disableEmail2FAByUserId(this.userId); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute('users.2fa.sendEmailCode', { - post() { - const { emailOrUsername } = this.bodyParams; - - if (!emailOrUsername) { - throw new Meteor.Error('error-parameter-required', 'emailOrUsername is required'); - } - - const method = emailOrUsername.includes('@') ? 'findOneByEmailAddress' : 'findOneByUsername'; - const userId = this.userId || Users[method](emailOrUsername, { fields: { _id: 1 } })?._id; - - if (!userId) { - this.logger.error('[2fa] User was not found when requesting 2fa email code'); - return API.v1.success(); - } - - emailCheck.sendEmailCode(getUserForCheck(userId)); - - return API.v1.success(); - }, -}); - -API.v1.addRoute( - 'users.presence', - { authRequired: true }, - { - get() { - const { from, ids } = this.queryParams; - - const options = { - fields: { - username: 1, - name: 1, - status: 1, - utcOffset: 1, - statusText: 1, - avatarETag: 1, - }, - }; - - if (ids) { - return API.v1.success({ - users: Users.findNotOfflineByIds(Array.isArray(ids) ? ids : ids.split(','), options).fetch(), - full: false, - }); - } - - if (from) { - const ts = new Date(from); - const diff = (Date.now() - ts) / 1000 / 60; - - if (diff < 10) { - return API.v1.success({ - users: Users.findNotIdUpdatedFrom(this.userId, ts, options).fetch(), - full: false, - }); - } - } - - return API.v1.success({ - users: Users.findUsersNotOffline(options).fetch(), - full: true, - }); - }, - }, -); - -API.v1.addRoute( - 'users.requestDataDownload', - { authRequired: true }, - { - get() { - const { fullExport = false } = this.queryParams; - const result = Meteor.runAsUser(this.userId, () => Meteor.call('requestDataDownload', { fullExport: fullExport === 'true' })); - - return API.v1.success({ - requested: result.requested, - exportOperation: result.exportOperation, - }); - }, - }, -); - -API.v1.addRoute( - 'users.logoutOtherClients', - { authRequired: true }, - { - async post() { - try { - const hashedToken = Accounts._hashLoginToken(this.request.headers['x-auth-token']); - - if (!(await UsersRaw.removeNonPATLoginTokensExcept(this.userId, hashedToken))) { - throw new Meteor.Error('error-invalid-user-id', 'Invalid user id'); - } - - const me = await UsersRaw.findOneById(this.userId, { projection: { 'services.resume.loginTokens': 1 } }); - - const token = me.services.resume.loginTokens.find((token) => token.hashedToken === hashedToken); - - const tokenExpires = new Date(token.when.getTime() + settings.get('Accounts_LoginExpiration') * 1000); - - return API.v1.success({ - token: this.request.headers['x-auth-token'], - tokenExpires, - }); - } catch (error) { - return API.v1.failure(error); - } - }, - }, -); - -API.v1.addRoute( - 'users.autocomplete', - { authRequired: true }, - { - get() { - const { selector } = this.queryParams; - - if (!selector) { - return API.v1.failure("The 'selector' param is required"); - } - - return API.v1.success( - Promise.await( - findUsersToAutocomplete({ - uid: this.userId, - selector: JSON.parse(selector), - }), - ), - ); - }, - }, -); - -API.v1.addRoute( - 'users.removeOtherTokens', - { authRequired: true }, - { - post() { - API.v1.success(Meteor.call('removeOtherTokens')); - }, - }, -); - -API.v1.addRoute( - 'users.resetE2EKey', - { authRequired: true, twoFactorRequired: true, twoFactorOptions: { disableRememberMe: true } }, - { - post() { - // reset own keys - if (this.isUserFromParams()) { - resetUserE2EEncriptionKey(this.userId, false); - return API.v1.success(); - } - - // reset other user keys - const user = this.getUserFromParams(); - if (!user) { - throw new Meteor.Error('error-invalid-user-id', 'Invalid user id'); - } - - if (!settings.get('Accounts_TwoFactorAuthentication_Enforce_Password_Fallback')) { - throw new Meteor.Error('error-not-allowed', 'Not allowed'); - } - - if (!hasPermission(Meteor.userId(), 'edit-other-user-e2ee')) { - throw new Meteor.Error('error-not-allowed', 'Not allowed'); - } - - if (!resetUserE2EEncriptionKey(user._id, true)) { - return API.v1.failure(); - } - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'users.resetTOTP', - { authRequired: true, twoFactorRequired: true, twoFactorOptions: { disableRememberMe: true } }, - { - post() { - // reset own keys - if (this.isUserFromParams()) { - Promise.await(resetTOTP(this.userId, false)); - return API.v1.success(); - } - - // reset other user keys - const user = this.getUserFromParams(); - if (!user) { - throw new Meteor.Error('error-invalid-user-id', 'Invalid user id'); - } - - if (!settings.get('Accounts_TwoFactorAuthentication_Enforce_Password_Fallback')) { - throw new Meteor.Error('error-not-allowed', 'Not allowed'); - } - - if (!hasPermission(Meteor.userId(), 'edit-other-user-totp')) { - throw new Meteor.Error('error-not-allowed', 'Not allowed'); - } - - Promise.await(resetTOTP(user._id, true)); - - return API.v1.success(); - }, - }, -); - -API.v1.addRoute( - 'users.listTeams', - { authRequired: true }, - { - get() { - check( - this.queryParams, - Match.ObjectIncluding({ - userId: Match.Maybe(String), - }), - ); - const { userId } = this.queryParams; - - if (!userId) { - throw new Meteor.Error('error-invalid-user-id', 'Invalid user id'); - } - - // If the caller has permission to view all teams, there's no need to filter the teams - const adminId = hasPermission(this.userId, 'view-all-teams') ? undefined : this.userId; - - const teams = Promise.await(Team.findBySubscribedUserIds(userId, adminId)); - - return API.v1.success({ - teams, - }); - }, - }, -); - -API.v1.addRoute( - 'users.logout', - { authRequired: true }, - { - post() { - const userId = this.bodyParams.userId || this.userId; - - if (userId !== this.userId && !hasPermission(this.userId, 'logout-other-user')) { - return API.v1.unauthorized(); - } - - // this method logs the user out automatically, if successful returns 1, otherwise 0 - if (!Users.unsetLoginTokens(userId)) { - throw new Meteor.Error('error-invalid-user-id', 'Invalid user id'); - } - - return API.v1.success({ - message: `User ${userId} has been logged out!`, - }); - }, - }, -); - -settings.watch('Rate_Limiter_Limit_RegisterUser', (value) => { - const userRegisterRoute = '/api/v1/users.registerpost'; - - API.v1.updateRateLimiterDictionaryForRoute(userRegisterRoute, value); -}); diff --git a/app/api/server/v1/video-conference.js b/app/api/server/v1/video-conference.js deleted file mode 100644 index dcd7a7b8f6a2..000000000000 --- a/app/api/server/v1/video-conference.js +++ /dev/null @@ -1,29 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { Rooms } from '../../../models/server'; -import { API } from '../api'; - -API.v1.addRoute( - 'video-conference/jitsi.update-timeout', - { authRequired: true }, - { - post() { - const { roomId, joiningNow = true } = this.bodyParams; - if (!roomId) { - return API.v1.failure('The "roomId" parameter is required!'); - } - - const room = Rooms.findOneById(roomId, { fields: { _id: 1 } }); - if (!room) { - return API.v1.failure('Room does not exist!'); - } - - try { - const jitsiTimeout = Meteor.runAsUser(this.userId, () => Meteor.call('jitsi:updateTimeout', roomId, Boolean(joiningNow))); - return API.v1.success({ jitsiTimeout }); - } catch (error) { - return API.v1.failure(error.message); - } - }, - }, -); diff --git a/app/api/server/v1/webdav.js b/app/api/server/v1/webdav.js deleted file mode 100644 index e242c40f379b..000000000000 --- a/app/api/server/v1/webdav.js +++ /dev/null @@ -1,12 +0,0 @@ -import { API } from '../api'; -import { findWebdavAccountsByUserId } from '../lib/webdav'; - -API.v1.addRoute( - 'webdav.getMyAccounts', - { authRequired: true }, - { - get() { - return API.v1.success(Promise.await(findWebdavAccountsByUserId({ uid: this.userId }))); - }, - }, -); diff --git a/app/apple/server/appleOauthRegisterService.ts b/app/apple/server/appleOauthRegisterService.ts deleted file mode 100644 index 11753235a9b0..000000000000 --- a/app/apple/server/appleOauthRegisterService.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { KJUR } from 'jsrsasign'; -import { ServiceConfiguration } from 'meteor/service-configuration'; - -import { CustomOAuth } from '../../custom-oauth/server/custom_oauth_server'; -import { settings, settingsRegistry } from '../../settings/server'; - -const config = { - serverURL: 'https://appleid.apple.com', - tokenPath: '/auth/token', - scope: 'name email', - mergeUsers: true, - accessTokenParam: 'access_token', - loginStyle: 'popup', -}; - -new CustomOAuth('apple', config); - -settingsRegistry.addGroup('OAuth', function () { - this.section('Apple', function () { - this.add('Accounts_OAuth_Apple', false, { type: 'boolean', public: true }); - - this.add('Accounts_OAuth_Apple_id', '', { type: 'string', public: true }); - this.add('Accounts_OAuth_Apple_secretKey', '', { type: 'string', multiline: true }); - - this.add('Accounts_OAuth_Apple_iss', '', { type: 'string' }); - this.add('Accounts_OAuth_Apple_kid', '', { type: 'string' }); - }); -}); - -settings.watchMultiple( - [ - 'Accounts_OAuth_Apple', - 'Accounts_OAuth_Apple_id', - 'Accounts_OAuth_Apple_secretKey', - 'Accounts_OAuth_Apple_iss', - 'Accounts_OAuth_Apple_kid', - ], - ([enabled, clientId, serverSecret, iss, kid]) => { - if (!enabled) { - return ServiceConfiguration.configurations.remove({ - service: 'apple', - }); - } - - const HEADER = { - kid, - alg: 'ES256', - }; - - const tokenPayload = { - iss, - iat: Math.floor(Date.now() / 1000), - exp: Math.floor(Date.now() / 1000) + 300, - aud: 'https://appleid.apple.com', - sub: clientId, - }; - - const secret = KJUR.jws.JWS.sign(null, HEADER, tokenPayload, serverSecret as string); - - ServiceConfiguration.configurations.upsert( - { - service: 'apple', - }, - { - $set: { - // We'll hide this button on Web Client - showButton: false, - secret, - enabled: settings.get('Accounts_OAuth_Apple'), - loginStyle: 'popup', - clientId, - }, - }, - ); - }, -); diff --git a/app/apple/server/index.js b/app/apple/server/index.js deleted file mode 100644 index 7b8670be5e50..000000000000 --- a/app/apple/server/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import './startup'; -import './loginHandler.js'; diff --git a/app/apple/server/loginHandler.js b/app/apple/server/loginHandler.js deleted file mode 100644 index 95bfee852c9c..000000000000 --- a/app/apple/server/loginHandler.js +++ /dev/null @@ -1,33 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Accounts } from 'meteor/accounts-base'; - -import { handleIdentityToken } from './tokenHandler'; -import { settings } from '../../settings'; - -Accounts.registerLoginHandler('apple', (loginRequest) => { - if (!loginRequest.identityToken) { - return; - } - - if (!settings.get('Accounts_OAuth_Apple')) { - return; - } - - const identityResult = handleIdentityToken(loginRequest); - - if (!identityResult.error) { - const result = Accounts.updateOrCreateUserFromExternalService('apple', identityResult.serviceData, identityResult.options); - - // Ensure processing succeeded - if (result === undefined || result.userId === undefined) { - return { - type: 'apple', - error: new Meteor.Error(Accounts.LoginCancelledError.numericError, 'User creation failed from Apple response token'), - }; - } - - return result; - } - - return identityResult; -}); diff --git a/app/apple/server/tokenHandler.js b/app/apple/server/tokenHandler.js deleted file mode 100644 index c756e1985947..000000000000 --- a/app/apple/server/tokenHandler.js +++ /dev/null @@ -1,74 +0,0 @@ -import { jws } from 'jsrsasign'; -import NodeRSA from 'node-rsa'; -import { HTTP } from 'meteor/http'; -import { Meteor } from 'meteor/meteor'; -import { Accounts } from 'meteor/accounts-base'; -import { Match, check } from 'meteor/check'; - -const isValidAppleJWT = (identityToken, header) => { - const applePublicKeys = HTTP.get('https://appleid.apple.com/auth/keys').data.keys; - const { kid } = header; - - const key = applePublicKeys.find((k) => k.kid === kid); - - const pubKey = new NodeRSA(); - pubKey.importKey({ n: Buffer.from(key.n, 'base64'), e: Buffer.from(key.e, 'base64') }, 'components-public'); - const userKey = pubKey.exportKey(['public']); - - try { - return jws.JWS.verify(identityToken, userKey, { - typ: 'JWT', - alg: 'RS256', - }); - } catch { - return false; - } -}; - -export const handleIdentityToken = ({ identityToken, fullName = {}, email }) => { - check(identityToken, String); - check(fullName, Match.Maybe(Object)); - check(email, Match.Maybe(String)); - - const decodedToken = jws.JWS.parse(identityToken); - - if (!isValidAppleJWT(identityToken, decodedToken.headerObj)) { - return { - type: 'apple', - error: new Meteor.Error(Accounts.LoginCancelledError.numericError, 'identityToken is a invalid JWT'), - }; - } - - const profile = {}; - - const { givenName, familyName } = fullName; - if (givenName && familyName) { - profile.name = `${givenName} ${familyName}`; - } - - const { iss, iat, exp } = decodedToken.payloadObj; - - if (!iss) { - return { - type: 'apple', - error: new Meteor.Error(Accounts.LoginCancelledError.numericError, 'Insufficient data in auth response token'), - }; - } - - // Collect basic auth provider details - const serviceData = { - id: iss, - did: iss.split(':').pop(), - issuedAt: new Date(iat * 1000), - expiresAt: new Date(exp * 1000), - }; - - if (email) { - serviceData.email = email; - } - - return { - serviceData, - options: { profile }, - }; -}; diff --git a/app/apps/client/communication/websockets.js b/app/apps/client/communication/websockets.js deleted file mode 100644 index 090fb059edaf..000000000000 --- a/app/apps/client/communication/websockets.js +++ /dev/null @@ -1,63 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Emitter } from '@rocket.chat/emitter'; - -import { slashCommands, APIClient } from '../../../utils'; -import { CachedCollectionManager } from '../../../ui-cached-collection'; -import { loadButtons } from '../../../ui-message/client/ActionButtonSyncer'; - -export const AppEvents = Object.freeze({ - APP_ADDED: 'app/added', - APP_REMOVED: 'app/removed', - APP_UPDATED: 'app/updated', - APP_STATUS_CHANGE: 'app/statusUpdate', - APP_SETTING_UPDATED: 'app/settingUpdated', - COMMAND_ADDED: 'command/added', - COMMAND_DISABLED: 'command/disabled', - COMMAND_UPDATED: 'command/updated', - COMMAND_REMOVED: 'command/removed', - ACTIONS_CHANGED: 'actions/changed', -}); - -export class AppWebsocketReceiver extends Emitter { - constructor() { - super(); - - this.streamer = new Meteor.Streamer('apps'); - - CachedCollectionManager.onLogin(() => { - this.listenStreamerEvents(); - }); - } - - listenStreamerEvents() { - Object.values(AppEvents).forEach((eventName) => { - this.streamer.on(eventName, this.emit.bind(this, eventName)); - }); - - this.streamer.on(AppEvents.COMMAND_ADDED, this.onCommandAddedOrUpdated); - this.streamer.on(AppEvents.COMMAND_UPDATED, this.onCommandAddedOrUpdated); - this.streamer.on(AppEvents.COMMAND_REMOVED, this.onCommandRemovedOrDisabled); - this.streamer.on(AppEvents.COMMAND_DISABLED, this.onCommandRemovedOrDisabled); - this.streamer.on(AppEvents.ACTIONS_CHANGED, this.onActionsChanged); - } - - registerListener(event, listener) { - this.on(event, listener); - } - - unregisterListener(event, listener) { - this.off(event, listener); - } - - onCommandAddedOrUpdated = (command) => { - APIClient.v1.get('commands.get', { command }).then((result) => { - slashCommands.commands[command] = result.command; - }); - }; - - onCommandRemovedOrDisabled = (command) => { - delete slashCommands.commands[command]; - }; - - onActionsChanged = () => loadButtons(); -} diff --git a/app/apps/client/gameCenter/tabBar.ts b/app/apps/client/gameCenter/tabBar.ts deleted file mode 100644 index 0190478567f6..000000000000 --- a/app/apps/client/gameCenter/tabBar.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { useMemo } from 'react'; - -import { addAction } from '../../../../client/views/room/lib/Toolbox'; -import { useEndpointData } from '../../../../client/hooks/useEndpointData'; -import { AsyncStatePhase } from '../../../../client/hooks/useAsyncState'; - -addAction('game-center', () => { - const { value = { externalComponents: [] }, phase: state, error } = useEndpointData('/apps/externalComponents'); - - const hasExternalComponents = value && value.externalComponents.length > 0; - const hasError = !!error; - return useMemo( - () => - state === AsyncStatePhase.RESOLVED && !hasError && hasExternalComponents - ? { - groups: ['channel', 'group', 'direct', 'direct_multiple', 'team'], - id: 'game-center', - title: 'Apps_Game_Center', - icon: 'game', - template: 'GameCenter', - order: -1, - } - : null, - [hasError, hasExternalComponents, state], - ); -}); diff --git a/app/apps/client/orchestrator.js b/app/apps/client/orchestrator.js deleted file mode 100644 index 09244b03bfd2..000000000000 --- a/app/apps/client/orchestrator.js +++ /dev/null @@ -1,201 +0,0 @@ -import { AppClientManager } from '@rocket.chat/apps-engine/client/AppClientManager'; -import { Meteor } from 'meteor/meteor'; -import { Tracker } from 'meteor/tracker'; - -import { dispatchToastMessage } from '../../../client/lib/toast'; -import { hasAtLeastOnePermission } from '../../authorization'; -import { settings } from '../../settings/client'; -import { CachedCollectionManager } from '../../ui-cached-collection'; -import { APIClient } from '../../utils'; -import { AppWebsocketReceiver } from './communication'; -import { handleI18nResources } from './i18n'; -import { RealAppsEngineUIHost } from './RealAppsEngineUIHost'; - -const createDeferredValue = () => { - let resolve; - let reject; - const promise = new Promise((_resolve, _reject) => { - resolve = _resolve; - reject = _reject; - }); - - return [promise, resolve, reject]; -}; - -class AppClientOrchestrator { - constructor() { - this._appClientUIHost = new RealAppsEngineUIHost(); - this._manager = new AppClientManager(this._appClientUIHost); - this.isLoaded = false; - [this.deferredIsEnabled, this.setEnabled] = createDeferredValue(); - } - - load = async (isEnabled) => { - if (!this.isLoaded) { - this.ws = new AppWebsocketReceiver(); - this.isLoaded = true; - } - - this.setEnabled(isEnabled); - - // Since the deferred value (a promise) is immutable after resolved, - // it need to be recreated to resolve a new value - [this.deferredIsEnabled, this.setEnabled] = createDeferredValue(); - - await handleI18nResources(); - this.setEnabled(isEnabled); - }; - - getWsListener = () => this.ws; - - getAppClientManager = () => this._manager; - - handleError = (error) => { - console.error(error); - if (hasAtLeastOnePermission(['manage-apps'])) { - dispatchToastMessage({ - type: 'error', - message: error.message, - }); - } - }; - - isEnabled = () => this.deferredIsEnabled; - - getApps = async () => { - const { apps } = await APIClient.get('apps'); - return apps; - }; - - getAppsFromMarketplace = async () => { - const appsOverviews = await APIClient.get('apps', { marketplace: 'true' }); - return appsOverviews.map(({ latest, price, pricingPlans, purchaseType, isEnterpriseOnly }) => ({ - ...latest, - price, - pricingPlans, - purchaseType, - isEnterpriseOnly, - })); - }; - - getAppsOnBundle = async (bundleId) => { - const { apps } = await APIClient.get(`apps/bundles/${bundleId}/apps`); - return apps; - }; - - getAppsLanguages = async () => { - const { apps } = await APIClient.get('apps/languages'); - return apps; - }; - - getApp = async (appId) => { - const { app } = await APIClient.get(`apps/${appId}`); - return app; - }; - - getAppFromMarketplace = async (appId, version) => { - const { app } = await APIClient.get(`apps/${appId}`, { - marketplace: 'true', - version, - }); - return app; - }; - - getLatestAppFromMarketplace = async (appId, version) => { - const { app } = await APIClient.get(`apps/${appId}`, { - marketplace: 'true', - update: 'true', - appVersion: version, - }); - return app; - }; - - getAppSettings = async (appId) => { - const { settings } = await APIClient.get(`apps/${appId}/settings`); - return settings; - }; - - setAppSettings = async (appId, settings) => { - const { updated } = await APIClient.post(`apps/${appId}/settings`, undefined, { settings }); - return updated; - }; - - getAppApis = async (appId) => { - const { apis } = await APIClient.get(`apps/${appId}/apis`); - return apis; - }; - - getAppLanguages = async (appId) => { - const { languages } = await APIClient.get(`apps/${appId}/languages`); - return languages; - }; - - installApp = async (appId, version, permissionsGranted) => { - const { app } = await APIClient.post('apps/', { - appId, - marketplace: true, - version, - permissionsGranted, - }); - return app; - }; - - updateApp = async (appId, version, permissionsGranted) => { - const { app } = await APIClient.post(`apps/${appId}`, { - appId, - marketplace: true, - version, - permissionsGranted, - }); - return app; - }; - - uninstallApp = (appId) => APIClient.delete(`apps/${appId}`); - - syncApp = (appId) => APIClient.post(`apps/${appId}/sync`); - - setAppStatus = async (appId, status) => { - const { status: effectiveStatus } = await APIClient.post(`apps/${appId}/status`, { status }); - return effectiveStatus; - }; - - enableApp = (appId) => this.setAppStatus(appId, 'manually_enabled'); - - disableApp = (appId) => this.setAppStatus(appId, 'manually_disabled'); - - buildExternalUrl = (appId, purchaseType = 'buy', details = false) => - APIClient.get('apps', { - buildExternalUrl: 'true', - appId, - purchaseType, - details, - }); - - getCategories = async () => { - const categories = await APIClient.get('apps', { categories: 'true' }); - return categories; - }; - - getUIHost = () => this._appClientUIHost; -} - -export const Apps = new AppClientOrchestrator(); - -Meteor.startup(() => { - CachedCollectionManager.onLogin(() => { - Meteor.call('apps/is-enabled', (error, isEnabled) => { - if (error) { - Apps.handleError(error); - return; - } - - Apps.getAppClientManager().initialize(); - Apps.load(isEnabled); - }); - }); - - Tracker.autorun(() => { - const isEnabled = settings.get('Apps_Framework_enabled'); - Apps.load(isEnabled); - }); -}); diff --git a/app/apps/lib/misc/formatAppInstanceForRest.ts b/app/apps/lib/misc/formatAppInstanceForRest.ts deleted file mode 100644 index b642d7ff48cd..000000000000 --- a/app/apps/lib/misc/formatAppInstanceForRest.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { AppStatus } from '@rocket.chat/apps-engine/definition/AppStatus'; -import { IAppInfo } from '@rocket.chat/apps-engine/definition/metadata'; -import { AppLicenseValidationResult } from '@rocket.chat/apps-engine/server/marketplace/license'; -import { ProxiedApp } from '@rocket.chat/apps-engine/server/ProxiedApp'; -import { IAppStorageItem } from '@rocket.chat/apps-engine/server/storage'; - -export interface IAppInfoRest extends IAppInfo { - status: AppStatus; - languages: IAppStorageItem['languageContent']; - licenseValidation?: AppLicenseValidationResult; -} - -export function formatAppInstanceForRest(app: ProxiedApp): IAppInfoRest { - const appRest: IAppInfoRest = { - ...app.getInfo(), - status: app.getStatus(), - languages: app.getStorageItem().languageContent, - }; - - const licenseValidation = app.getLatestLicenseValidationResult(); - - if (licenseValidation.hasErrors || licenseValidation.hasWarnings) { - appRest.licenseValidation = licenseValidation; - } - - return appRest; -} diff --git a/app/apps/server/bridges/api.ts b/app/apps/server/bridges/api.ts deleted file mode 100644 index ea2b8f05e689..000000000000 --- a/app/apps/server/bridges/api.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import express, { Response, Request, IRouter, RequestHandler } from 'express'; -import { WebApp } from 'meteor/webapp'; -import { ApiBridge } from '@rocket.chat/apps-engine/server/bridges/ApiBridge'; -import { IApiRequest, IApiEndpoint, IApi } from '@rocket.chat/apps-engine/definition/api'; -import { AppApi } from '@rocket.chat/apps-engine/server/managers/AppApi'; -import { RequestMethod } from '@rocket.chat/apps-engine/definition/accessors'; - -import { AppServerOrchestrator } from '../orchestrator'; - -const apiServer = express(); - -apiServer.disable('x-powered-by'); - -WebApp.connectHandlers.use(apiServer); - -type RequestWithPrivateHash = Request & { - _privateHash?: string; - content?: any; -}; - -export class AppApisBridge extends ApiBridge { - appRouters: Map; - - // eslint-disable-next-line no-empty-function - constructor(private readonly orch: AppServerOrchestrator) { - super(); - this.appRouters = new Map(); - - apiServer.use('/api/apps/private/:appId/:hash', (req: RequestWithPrivateHash, res: Response) => { - const notFound = (): Response => res.sendStatus(404); - - const router = this.appRouters.get(req.params.appId); - - if (router) { - req._privateHash = req.params.hash; - return router(req, res, notFound); - } - - notFound(); - }); - - apiServer.use('/api/apps/public/:appId', (req: Request, res: Response) => { - const notFound = (): Response => res.sendStatus(404); - - const router = this.appRouters.get(req.params.appId); - - if (router) { - return router(req, res, notFound); - } - - notFound(); - }); - } - - public registerApi({ api, computedPath, endpoint }: AppApi, appId: string): void { - this.orch.debugLog(`The App ${appId} is registering the api: "${endpoint.path}" (${computedPath})`); - - this._verifyApi(api, endpoint); - - let router = this.appRouters.get(appId); - - if (!router) { - router = express.Router(); // eslint-disable-line new-cap - this.appRouters.set(appId, router); - } - - const method = 'all'; - - let routePath = endpoint.path.trim(); - if (!routePath.startsWith('/')) { - routePath = `/${routePath}`; - } - - if (router[method] instanceof Function) { - router[method](routePath, Meteor.bindEnvironment(this._appApiExecutor(endpoint, appId))); - } - } - - public unregisterApis(appId: string): void { - this.orch.debugLog(`The App ${appId} is unregistering all apis`); - - if (this.appRouters.get(appId)) { - this.appRouters.delete(appId); - } - } - - private _verifyApi(api: IApi, endpoint: IApiEndpoint): void { - if (typeof api !== 'object') { - throw new Error('Invalid Api parameter provided, it must be a valid IApi object.'); - } - - if (typeof endpoint.path !== 'string') { - throw new Error('Invalid Api parameter provided, it must be a valid IApi object.'); - } - } - - private _appApiExecutor(endpoint: IApiEndpoint, appId: string): RequestHandler { - return (req: RequestWithPrivateHash, res: Response): void => { - const request: IApiRequest = { - method: req.method.toLowerCase() as RequestMethod, - headers: req.headers as { [key: string]: string }, - query: (req.query as { [key: string]: string }) || {}, - params: req.params || {}, - content: req.body, - privateHash: req._privateHash, - }; - - this.orch - .getManager() - ?.getApiManager() - .executeApi(appId, endpoint.path, request) - .then(({ status, headers = {}, content }) => { - res.set(headers); - res.status(status); - res.send(content); - }) - .catch((reason) => { - // Should we handle this as an error? - res.status(500).send(reason.message); - }); - }; - } -} diff --git a/app/apps/server/bridges/cloud.ts b/app/apps/server/bridges/cloud.ts deleted file mode 100644 index 8b78b678b3a1..000000000000 --- a/app/apps/server/bridges/cloud.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { CloudWorkspaceBridge } from '@rocket.chat/apps-engine/server/bridges/CloudWorkspaceBridge'; -import { IWorkspaceToken } from '@rocket.chat/apps-engine/definition/cloud/IWorkspaceToken'; - -import { getWorkspaceAccessTokenWithScope } from '../../../cloud/server'; -import { AppServerOrchestrator } from '../orchestrator'; - -const boundGetWorkspaceAccessToken = Meteor.bindEnvironment(getWorkspaceAccessTokenWithScope); - -export class AppCloudBridge extends CloudWorkspaceBridge { - // eslint-disable-next-line no-empty-function - constructor(private readonly orch: AppServerOrchestrator) { - super(); - } - - public async getWorkspaceToken(scope: string, appId: string): Promise { - this.orch.debugLog(`App ${appId} is getting the workspace's token`); - - const token = boundGetWorkspaceAccessToken(scope); - - return token; - } -} diff --git a/app/apps/server/bridges/commands.ts b/app/apps/server/bridges/commands.ts deleted file mode 100644 index b00b2d8bffd7..000000000000 --- a/app/apps/server/bridges/commands.ts +++ /dev/null @@ -1,194 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { SlashCommandContext, ISlashCommand, ISlashCommandPreviewItem } from '@rocket.chat/apps-engine/definition/slashcommands'; -import { CommandBridge } from '@rocket.chat/apps-engine/server/bridges/CommandBridge'; - -import { slashCommands } from '../../../utils/server'; -import { Utilities } from '../../lib/misc/Utilities'; -import { AppServerOrchestrator } from '../orchestrator'; -import { IMessage } from '../../../../definition/IMessage'; - -export class AppCommandsBridge extends CommandBridge { - disabledCommands: Map; - - // eslint-disable-next-line no-empty-function - constructor(private readonly orch: AppServerOrchestrator) { - super(); - this.disabledCommands = new Map(); - } - - protected doesCommandExist(command: string, appId: string): boolean { - this.orch.debugLog(`The App ${appId} is checking if "${command}" command exists.`); - - if (typeof command !== 'string' || command.length === 0) { - return false; - } - - const cmd = command.toLowerCase(); - - return typeof slashCommands.commands[cmd] === 'object' || this.disabledCommands.has(cmd); - } - - protected enableCommand(command: string, appId: string): void { - this.orch.debugLog(`The App ${appId} is attempting to enable the command: "${command}"`); - - if (typeof command !== 'string' || command.trim().length === 0) { - throw new Error('Invalid command parameter provided, must be a string.'); - } - - const cmd = command.toLowerCase(); - if (!this.disabledCommands.has(cmd)) { - throw new Error(`The command is not currently disabled: "${cmd}"`); - } - - slashCommands.commands[cmd] = this.disabledCommands.get(cmd); - this.disabledCommands.delete(cmd); - - this.orch.getNotifier().commandUpdated(cmd); - } - - protected disableCommand(command: string, appId: string): void { - this.orch.debugLog(`The App ${appId} is attempting to disable the command: "${command}"`); - - if (typeof command !== 'string' || command.trim().length === 0) { - throw new Error('Invalid command parameter provided, must be a string.'); - } - - const cmd = command.toLowerCase(); - if (this.disabledCommands.has(cmd)) { - // The command is already disabled, no need to disable it yet again - return; - } - - if (typeof slashCommands.commands[cmd] === 'undefined') { - throw new Error(`Command does not exist in the system currently: "${cmd}"`); - } - - this.disabledCommands.set(cmd, slashCommands.commands[cmd]); - delete slashCommands.commands[cmd]; - - this.orch.getNotifier().commandDisabled(cmd); - } - - // command: { command, paramsExample, i18nDescription, executor: function } - protected modifyCommand(command: ISlashCommand, appId: string): void { - this.orch.debugLog(`The App ${appId} is attempting to modify the command: "${command}"`); - - this._verifyCommand(command); - - const cmd = command.command.toLowerCase(); - if (typeof slashCommands.commands[cmd] === 'undefined') { - throw new Error(`Command does not exist in the system currently (or it is disabled): "${cmd}"`); - } - - const item = slashCommands.commands[cmd]; - - item.params = command.i18nParamsExample ? command.i18nParamsExample : item.params; - item.description = command.i18nDescription ? command.i18nDescription : item.params; - item.callback = this._appCommandExecutor.bind(this); - item.providesPreview = command.providesPreview; - item.previewer = command.previewer ? this._appCommandPreviewer.bind(this) : item.previewer; - item.previewCallback = command.executePreviewItem ? this._appCommandPreviewExecutor.bind(this) : item.previewCallback; - - slashCommands.commands[cmd] = item; - this.orch.getNotifier().commandUpdated(cmd); - } - - protected registerCommand(command: ISlashCommand, appId: string): void { - this.orch.debugLog(`The App ${appId} is registering the command: "${command.command}"`); - - this._verifyCommand(command); - - const item = { - appId, - command: command.command.toLowerCase(), - params: Utilities.getI18nKeyForApp(command.i18nParamsExample, appId), - description: Utilities.getI18nKeyForApp(command.i18nDescription, appId), - permission: command.permission, - callback: this._appCommandExecutor.bind(this), - providesPreview: command.providesPreview, - previewer: !command.previewer ? undefined : this._appCommandPreviewer.bind(this), - previewCallback: !command.executePreviewItem ? undefined : this._appCommandPreviewExecutor.bind(this), - }; - - slashCommands.commands[command.command.toLowerCase()] = item; - this.orch.getNotifier().commandAdded(command.command.toLowerCase()); - } - - protected unregisterCommand(command: string, appId: string): void { - this.orch.debugLog(`The App ${appId} is unregistering the command: "${command}"`); - - if (typeof command !== 'string' || command.trim().length === 0) { - throw new Error('Invalid command parameter provided, must be a string.'); - } - - const cmd = command.toLowerCase(); - this.disabledCommands.delete(cmd); - delete slashCommands.commands[cmd]; - - this.orch.getNotifier().commandRemoved(cmd); - } - - private _verifyCommand(command: ISlashCommand): void { - if (typeof command !== 'object') { - throw new Error('Invalid Slash Command parameter provided, it must be a valid ISlashCommand object.'); - } - - if (typeof command.command !== 'string') { - throw new Error('Invalid Slash Command parameter provided, it must be a valid ISlashCommand object.'); - } - - if (command.i18nParamsExample && typeof command.i18nParamsExample !== 'string') { - throw new Error('Invalid Slash Command parameter provided, it must be a valid ISlashCommand object.'); - } - - if (command.i18nDescription && typeof command.i18nDescription !== 'string') { - throw new Error('Invalid Slash Command parameter provided, it must be a valid ISlashCommand object.'); - } - - if (typeof command.providesPreview !== 'boolean') { - throw new Error('Invalid Slash Command parameter provided, it must be a valid ISlashCommand object.'); - } - - if (typeof command.executor !== 'function') { - throw new Error('Invalid Slash Command parameter provided, it must be a valid ISlashCommand object.'); - } - } - - private _appCommandExecutor(command: string, parameters: any, message: IMessage, triggerId: string): void { - const user = this.orch.getConverters()?.get('users').convertById(Meteor.userId()); - const room = this.orch.getConverters()?.get('rooms').convertById(message.rid); - const threadId = message.tmid; - const params = parameters.length === 0 || parameters === ' ' ? [] : parameters.split(' '); - - const context = new SlashCommandContext(Object.freeze(user), Object.freeze(room), Object.freeze(params), threadId, triggerId); - - Promise.await(this.orch.getManager()?.getCommandManager().executeCommand(command, context)); - } - - private _appCommandPreviewer(command: string, parameters: any, message: IMessage): any { - const user = this.orch.getConverters()?.get('users').convertById(Meteor.userId()); - const room = this.orch.getConverters()?.get('rooms').convertById(message.rid); - const threadId = message.tmid; - const params = parameters.length === 0 || parameters === ' ' ? [] : parameters.split(' '); - - const context = new SlashCommandContext(Object.freeze(user), Object.freeze(room), Object.freeze(params), threadId); - return Promise.await(this.orch.getManager()?.getCommandManager().getPreviews(command, context)); - } - - private async _appCommandPreviewExecutor( - command: string, - parameters: any, - message: IMessage, - preview: ISlashCommandPreviewItem, - triggerId: string, - ): Promise { - const user = this.orch.getConverters()?.get('users').convertById(Meteor.userId()); - const room = this.orch.getConverters()?.get('rooms').convertById(message.rid); - const threadId = message.tmid; - const params = parameters.length === 0 || parameters === ' ' ? [] : parameters.split(' '); - - const context = new SlashCommandContext(Object.freeze(user), Object.freeze(room), Object.freeze(params), threadId, triggerId); - - Promise.await(this.orch.getManager()?.getCommandManager().executePreview(command, preview, context)); - } -} diff --git a/app/apps/server/bridges/environmental.ts b/app/apps/server/bridges/environmental.ts deleted file mode 100644 index 5df9703a4df6..000000000000 --- a/app/apps/server/bridges/environmental.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { EnvironmentalVariableBridge } from '@rocket.chat/apps-engine/server/bridges/EnvironmentalVariableBridge'; - -import { AppServerOrchestrator } from '../orchestrator'; - -export class AppEnvironmentalVariableBridge extends EnvironmentalVariableBridge { - allowed: Array; - - // eslint-disable-next-line no-empty-function - constructor(private readonly orch: AppServerOrchestrator) { - super(); - this.allowed = ['NODE_ENV', 'ROOT_URL', 'INSTANCE_IP']; - } - - protected async getValueByName(envVarName: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is getting the environmental variable value ${envVarName}.`); - - if (!(await this.isReadable(envVarName, appId))) { - throw new Error(`The environmental variable "${envVarName}" is not readable.`); - } - - return process.env[envVarName]; - } - - protected async isReadable(envVarName: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is checking if the environmental variable is readable ${envVarName}.`); - - return this.allowed.includes(envVarName.toUpperCase()); - } - - protected async isSet(envVarName: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is checking if the environmental variable is set ${envVarName}.`); - - if (!(await this.isReadable(envVarName, appId))) { - throw new Error(`The environmental variable "${envVarName}" is not readable.`); - } - - return typeof process.env[envVarName] !== 'undefined'; - } -} diff --git a/app/apps/server/bridges/http.ts b/app/apps/server/bridges/http.ts deleted file mode 100644 index 46685ce9265b..000000000000 --- a/app/apps/server/bridges/http.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { fetch } from 'meteor/fetch'; -import { HttpBridge } from '@rocket.chat/apps-engine/server/bridges/HttpBridge'; -import { IHttpResponse } from '@rocket.chat/apps-engine/definition/accessors'; -import { IHttpBridgeRequestInfo } from '@rocket.chat/apps-engine/server/bridges'; - -import { AppServerOrchestrator } from '../orchestrator'; -import { getUnsafeAgent } from '../../../../server/lib/getUnsafeAgent'; - -const isGetOrHead = (method: string): boolean => ['GET', 'HEAD'].includes(method.toUpperCase()); - -export class AppHttpBridge extends HttpBridge { - // eslint-disable-next-line no-empty-function - constructor(private readonly orch: AppServerOrchestrator) { - super(); - } - - protected async call(info: IHttpBridgeRequestInfo): Promise { - // begin comptability with old HTTP.call API - const url = new URL(info.url); - - const { request, method } = info; - - const { headers = {} } = request; - - let { content } = request; - - if (!content && typeof request.data === 'object') { - content = JSON.stringify(request.data); - headers['Content-Type'] = 'application/json'; - } - - if (request.auth) { - if (request.auth.indexOf(':') < 0) { - throw new Error('auth option should be of the form "username:password"'); - } - - const base64 = Buffer.from(request.auth, 'ascii').toString('base64'); - headers.Authorization = `Basic ${base64}`; - } - - let paramsForBody; - - if (content || isGetOrHead(method)) { - if (request.params) { - Object.keys(request.params).forEach((key) => { - if (request.params?.[key]) { - url.searchParams.append(key, request.params?.[key]); - } - }); - } - } else { - paramsForBody = request.params; - } - - if (paramsForBody) { - const data = new URLSearchParams(); - Object.entries(paramsForBody).forEach(([key, value]) => { - data.append(key, value); - }); - content = data.toString(); - headers['Content-Type'] = 'application/x-www-form-urlencoded'; - } - - if (isGetOrHead(method)) { - content = undefined; - } - - // end comptability with old HTTP.call API - - this.orch.debugLog(`The App ${info.appId} is requesting from the outter webs:`, info); - - try { - const response = await fetch(url.href, { - method, - body: content, - headers, - ...(((request.hasOwnProperty('strictSSL') && !request.strictSSL) || - (request.hasOwnProperty('rejectUnauthorized') && request.rejectUnauthorized)) && { - agent: getUnsafeAgent(url.protocol === 'https:' ? 'https:' : 'http:'), - }), - }); - - const result: IHttpResponse = { - url: info.url, - method: info.method, - statusCode: response.status, - headers: Object.fromEntries(response.headers as unknown as any), - }; - - const body = Buffer.from(await response.arrayBuffer()); - - if (request.encoding === null) { - /** - * The property `content` is not appropriately typed in the - * Apps-engine definition, and we can't simply change it there - * as it would be a breaking change. Thus, we're left with this - * type assertion. - */ - result.content = body as any; - } else { - result.content = body.toString(request.encoding); - result.data = ((): any => { - const contentType = (response.headers.get('content-type') || '').split(';')[0]; - if (!['application/json', 'text/javascript', 'application/javascript', 'application/x-javascript'].includes(contentType)) { - return null; - } - - try { - return JSON.parse(result.content); - } catch { - return null; - } - })(); - } - - return result; - } catch (e) { - return e.response; - } - } -} diff --git a/app/apps/server/bridges/index.js b/app/apps/server/bridges/index.js deleted file mode 100644 index a845f0e4ca58..000000000000 --- a/app/apps/server/bridges/index.js +++ /dev/null @@ -1,29 +0,0 @@ -import { RealAppBridges } from './bridges'; -import { AppActivationBridge } from './activation'; -import { AppCommandsBridge } from './commands'; -import { AppEnvironmentalVariableBridge } from './environmental'; -import { AppHttpBridge } from './http'; -import { AppListenerBridge } from './listeners'; -import { AppMessageBridge } from './messages'; -import { AppPersistenceBridge } from './persistence'; -import { AppRoomBridge } from './rooms'; -import { AppInternalBridge } from './internal'; -import { AppSettingBridge } from './settings'; -import { AppUserBridge } from './users'; -import { AppSchedulerBridge } from './scheduler'; - -export { - RealAppBridges, - AppActivationBridge, - AppCommandsBridge, - AppEnvironmentalVariableBridge, - AppHttpBridge, - AppListenerBridge, - AppMessageBridge, - AppPersistenceBridge, - AppRoomBridge, - AppSettingBridge, - AppUserBridge, - AppInternalBridge, - AppSchedulerBridge, -}; diff --git a/app/apps/server/bridges/listeners.js b/app/apps/server/bridges/listeners.js deleted file mode 100644 index 3528aeebe588..000000000000 --- a/app/apps/server/bridges/listeners.js +++ /dev/null @@ -1,137 +0,0 @@ -import { AppInterface } from '@rocket.chat/apps-engine/definition/metadata'; -import { LivechatTransferEventType } from '@rocket.chat/apps-engine/definition/livechat'; - -export class AppListenerBridge { - constructor(orch) { - this.orch = orch; - } - - async handleEvent(event, ...payload) { - const method = (() => { - switch (event) { - case AppInterface.IPreMessageSentPrevent: - case AppInterface.IPreMessageSentExtend: - case AppInterface.IPreMessageSentModify: - case AppInterface.IPostMessageSent: - case AppInterface.IPreMessageDeletePrevent: - case AppInterface.IPostMessageDeleted: - case AppInterface.IPreMessageUpdatedPrevent: - case AppInterface.IPreMessageUpdatedExtend: - case AppInterface.IPreMessageUpdatedModify: - case AppInterface.IPostMessageUpdated: - return 'messageEvent'; - case AppInterface.IPreRoomCreatePrevent: - case AppInterface.IPreRoomCreateExtend: - case AppInterface.IPreRoomCreateModify: - case AppInterface.IPostRoomCreate: - case AppInterface.IPreRoomDeletePrevent: - case AppInterface.IPostRoomDeleted: - case AppInterface.IPreRoomUserJoined: - case AppInterface.IPostRoomUserJoined: - case AppInterface.IPreRoomUserLeave: - case AppInterface.IPostRoomUserLeave: - return 'roomEvent'; - /** - * @deprecated please prefer the AppInterface.IPostLivechatRoomClosed event - */ - case AppInterface.ILivechatRoomClosedHandler: - case AppInterface.IPostLivechatRoomStarted: - case AppInterface.IPostLivechatRoomClosed: - case AppInterface.IPostLivechatAgentAssigned: - case AppInterface.IPostLivechatAgentUnassigned: - case AppInterface.IPostLivechatRoomTransferred: - case AppInterface.IPostLivechatGuestSaved: - case AppInterface.IPostLivechatRoomSaved: - return 'livechatEvent'; - default: - return 'defaultEvent'; - } - })(); - - return this[method](event, ...payload); - } - - async defaultEvent(inte, payload) { - return this.orch.getManager().getListenerManager().executeListener(inte, payload); - } - - async messageEvent(inte, message) { - const msg = this.orch.getConverters().get('messages').convertMessage(message); - const result = await this.orch.getManager().getListenerManager().executeListener(inte, msg); - - if (typeof result === 'boolean') { - return result; - } - return this.orch.getConverters().get('messages').convertAppMessage(result); - } - - async roomEvent(inte, room, ...payload) { - const rm = this.orch.getConverters().get('rooms').convertRoom(room); - - const params = (() => { - switch (inte) { - case AppInterface.IPreRoomUserJoined: - case AppInterface.IPostRoomUserJoined: - const [joiningUser, invitingUser] = payload; - return { - room: rm, - joiningUser: this.orch.getConverters().get('users').convertToApp(joiningUser), - invitingUser: this.orch.getConverters().get('users').convertToApp(invitingUser), - }; - case AppInterface.IPreRoomUserLeave: - case AppInterface.IPostRoomUserLeave: - const [leavingUser] = payload; - return { - room: rm, - leavingUser: this.orch.getConverters().get('users').convertToApp(leavingUser), - }; - default: - return rm; - } - })(); - - const result = await this.orch.getManager().getListenerManager().executeListener(inte, params); - - if (typeof result === 'boolean') { - return result; - } - return this.orch.getConverters().get('rooms').convertAppRoom(result); - } - - async livechatEvent(inte, data) { - switch (inte) { - case AppInterface.IPostLivechatAgentAssigned: - case AppInterface.IPostLivechatAgentUnassigned: - return this.orch - .getManager() - .getListenerManager() - .executeListener(inte, { - room: this.orch.getConverters().get('rooms').convertRoom(data.room), - agent: this.orch.getConverters().get('users').convertToApp(data.user), - }); - case AppInterface.IPostLivechatRoomTransferred: - const converter = data.type === LivechatTransferEventType.AGENT ? 'users' : 'departments'; - - return this.orch - .getManager() - .getListenerManager() - .executeListener(inte, { - type: data.type, - room: this.orch.getConverters().get('rooms').convertById(data.room), - from: this.orch.getConverters().get(converter).convertById(data.from), - to: this.orch.getConverters().get(converter).convertById(data.to), - }); - case AppInterface.IPostLivechatGuestSaved: - return this.orch - .getManager() - .getListenerManager() - .executeListener(inte, this.orch.getConverters().get('visitors').convertById(data)); - case AppInterface.IPostLivechatRoomSaved: - return this.orch.getManager().getListenerManager().executeListener(inte, this.orch.getConverters().get('rooms').convertById(data)); - default: - const room = this.orch.getConverters().get('rooms').convertRoom(data); - - return this.orch.getManager().getListenerManager().executeListener(inte, room); - } - } -} diff --git a/app/apps/server/bridges/livechat.ts b/app/apps/server/bridges/livechat.ts deleted file mode 100644 index 3c79c709fbb7..000000000000 --- a/app/apps/server/bridges/livechat.ts +++ /dev/null @@ -1,284 +0,0 @@ -import { Random } from 'meteor/random'; -import { LivechatBridge } from '@rocket.chat/apps-engine/server/bridges/LivechatBridge'; -import { - ILivechatMessage, - IVisitor, - ILivechatRoom, - ILivechatTransferData, - IDepartment, -} from '@rocket.chat/apps-engine/definition/livechat'; -import { IUser } from '@rocket.chat/apps-engine/definition/users'; -import { IMessage } from '@rocket.chat/apps-engine/definition/messages'; -import { IExtraRoomParams } from '@rocket.chat/apps-engine/definition/accessors/ILivechatCreator'; - -import { getRoom } from '../../../livechat/server/api/lib/livechat'; -import { Livechat } from '../../../livechat/server/lib/Livechat'; -import { Users, LivechatDepartment, LivechatVisitors, LivechatRooms } from '../../../models/server'; -import { AppServerOrchestrator } from '../orchestrator'; -import { OmnichannelSourceType } from '../../../../definition/IRoom'; - -export class AppLivechatBridge extends LivechatBridge { - // eslint-disable-next-line no-empty-function - constructor(private readonly orch: AppServerOrchestrator) { - super(); - } - - protected isOnline(departmentId?: string): boolean { - return Livechat.online(departmentId); - } - - protected async isOnlineAsync(departmentId?: string): Promise { - return Livechat.online(departmentId); - } - - protected async createMessage(message: ILivechatMessage, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is creating a new message.`); - - if (!message.token) { - throw new Error('Invalid token for livechat message'); - } - - const msg = await Livechat.sendMessage({ - guest: this.orch.getConverters()?.get('visitors').convertAppVisitor(message.visitor), - message: this.orch.getConverters()?.get('messages').convertAppMessage(message), - agent: undefined, - roomInfo: { - source: { - type: OmnichannelSourceType.APP, - id: appId, - alias: this.orch.getManager()?.getOneById(appId)?.getNameSlug(), - }, - }, - }); - - return msg._id; - } - - protected async getMessageById(messageId: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is getting the message: "${messageId}"`); - - return this.orch.getConverters()?.get('messages').convertById(messageId); - } - - protected async updateMessage(message: ILivechatMessage, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is updating a message.`); - - const data = { - guest: message.visitor, - message: this.orch.getConverters()?.get('messages').convertAppMessage(message), - }; - - Livechat.updateMessage(data); - } - - protected async createRoom(visitor: IVisitor, agent: IUser, appId: string, extraParams?: IExtraRoomParams): Promise { - this.orch.debugLog(`The App ${appId} is creating a livechat room.`); - - const { source } = extraParams || {}; - // `source` will likely have the properties below, so we tell TS it's alright - const { sidebarIcon, defaultIcon, label } = (source || {}) as { - sidebarIcon?: string; - defaultIcon?: string; - label?: string; - }; - - let agentRoom; - if (agent?.id) { - const user = Users.getAgentInfo(agent.id); - agentRoom = Object.assign({}, { agentId: user._id, username: user.username }); - } - - const result = await getRoom({ - guest: this.orch.getConverters()?.get('visitors').convertAppVisitor(visitor), - agent: agentRoom, - rid: Random.id(), - roomInfo: { - source: { - type: OmnichannelSourceType.APP, - id: appId, - alias: this.orch.getManager()?.getOneById(appId)?.getName(), - label, - sidebarIcon, - defaultIcon, - }, - }, - extraParams: undefined, - }); - - return this.orch.getConverters()?.get('rooms').convertRoom(result.room); - } - - protected async closeRoom(room: ILivechatRoom, comment: string, closer: IUser | undefined, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is closing a livechat room.`); - - const user = closer && this.orch.getConverters()?.get('users').convertById(closer.id); - const visitor = this.orch.getConverters()?.get('visitors').convertAppVisitor(room.visitor); - - const closeData: any = { - room: this.orch.getConverters()?.get('rooms').convertAppRoom(room), - comment, - ...(user && { user }), - ...(visitor && { visitor }), - }; - - return Livechat.closeRoom(closeData); - } - - protected async findRooms(visitor: IVisitor, departmentId: string | null, appId: string): Promise> { - this.orch.debugLog(`The App ${appId} is looking for livechat visitors.`); - - if (!visitor) { - return []; - } - - let result; - - if (departmentId) { - result = LivechatRooms.findOpenByVisitorTokenAndDepartmentId(visitor.token, departmentId, {}).fetch(); - } else { - result = LivechatRooms.findOpenByVisitorToken(visitor.token, {}).fetch(); - } - - return result.map((room: ILivechatRoom) => this.orch.getConverters()?.get('rooms').convertRoom(room)); - } - - protected async createVisitor(visitor: IVisitor, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is creating a livechat visitor.`); - - const registerData = { - department: visitor.department, - username: visitor.username, - name: visitor.name, - token: visitor.token, - email: '', - connectionData: undefined, - phone: {}, - id: visitor.id, - }; - - if (visitor.visitorEmails && visitor.visitorEmails.length) { - registerData.email = visitor.visitorEmails[0].address; - } - - if (visitor.phone && visitor.phone.length) { - (registerData as any).phone = { number: visitor.phone[0].phoneNumber }; - } - - return Livechat.registerGuest(registerData); - } - - protected async transferVisitor(visitor: IVisitor, transferData: ILivechatTransferData, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is transfering a livechat.`); - - if (!visitor) { - throw new Error('Invalid visitor, cannot transfer'); - } - - const { targetAgent, targetDepartment: departmentId, currentRoom } = transferData; - - const appUser = Users.findOneByAppId(appId, {}); - if (!appUser) { - throw new Error('Invalid app user, cannot transfer'); - } - const { _id, username, name, type } = appUser; - const transferredBy = { - _id, - username, - name, - type, - }; - - let userId; - let transferredTo; - - if (targetAgent?.id) { - transferredTo = Users.findOneAgentById(targetAgent.id, { - fields: { _id: 1, username: 1, name: 1 }, - }); - if (!transferredTo) { - throw new Error('Invalid target agent, cannot transfer'); - } - - userId = transferredTo._id; - } - - return Livechat.transfer( - this.orch.getConverters()?.get('rooms').convertAppRoom(currentRoom), - this.orch.getConverters()?.get('visitors').convertAppVisitor(visitor), - { userId, departmentId, transferredBy, transferredTo }, - ); - } - - protected async findVisitors(query: object, appId: string): Promise> { - this.orch.debugLog(`The App ${appId} is looking for livechat visitors.`); - - if (this.orch.isDebugging()) { - console.warn('The method AppLivechatBridge.findVisitors is deprecated. Please consider using its alternatives'); - } - - return LivechatVisitors.find(query) - .fetch() - .map((visitor: IVisitor) => this.orch.getConverters()?.get('visitors').convertVisitor(visitor)); - } - - protected async findVisitorById(id: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is looking for livechat visitors.`); - - return this.orch.getConverters()?.get('visitors').convertById(id); - } - - protected async findVisitorByEmail(email: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is looking for livechat visitors.`); - - return this.orch.getConverters()?.get('visitors').convertVisitor(LivechatVisitors.findOneGuestByEmailAddress(email)); - } - - protected async findVisitorByToken(token: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is looking for livechat visitors.`); - - return this.orch.getConverters()?.get('visitors').convertVisitor(LivechatVisitors.getVisitorByToken(token, {})); - } - - protected async findVisitorByPhoneNumber(phoneNumber: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is looking for livechat visitors.`); - - return this.orch.getConverters()?.get('visitors').convertVisitor(LivechatVisitors.findOneVisitorByPhone(phoneNumber)); - } - - protected async findDepartmentByIdOrName(value: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is looking for livechat departments.`); - - return this.orch.getConverters()?.get('departments').convertDepartment(LivechatDepartment.findOneByIdOrName(value, {})); - } - - protected async findDepartmentsEnabledWithAgents(appId: string): Promise> { - this.orch.debugLog(`The App ${appId} is looking for livechat departments.`); - - const converter = this.orch.getConverters()?.get('departments'); - const boundConverter = converter.convertDepartment.bind(converter); - - return LivechatDepartment.findEnabledWithAgents().map(boundConverter); - } - - protected async _fetchLivechatRoomMessages(appId: string, roomId: string): Promise> { - this.orch.debugLog(`The App ${appId} is getting the transcript for livechat room ${roomId}.`); - const messageConverter = this.orch.getConverters()?.get('messages'); - - if (!messageConverter) { - throw new Error('Could not get the message converter to process livechat room messages'); - } - - const boundMessageConverter = messageConverter.convertMessage.bind(messageConverter); - - return Livechat.getRoomMessages({ rid: roomId }).map(boundMessageConverter); - } - - protected async setCustomFields( - data: { token: IVisitor['token']; key: string; value: string; overwrite: boolean }, - appId: string, - ): Promise { - this.orch.debugLog(`The App ${appId} is setting livechat visitor's custom fields.`); - - return Livechat.setCustomFields(data); - } -} diff --git a/app/apps/server/bridges/messages.ts b/app/apps/server/bridges/messages.ts deleted file mode 100644 index 3a1b59281043..000000000000 --- a/app/apps/server/bridges/messages.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { ITypingDescriptor, MessageBridge } from '@rocket.chat/apps-engine/server/bridges/MessageBridge'; -import { IMessage } from '@rocket.chat/apps-engine/definition/messages'; -import { IUser } from '@rocket.chat/apps-engine/definition/users'; -import { IRoom } from '@rocket.chat/apps-engine/definition/rooms'; - -import { Messages, Users, Subscriptions } from '../../../models/server'; -import { updateMessage } from '../../../lib/server/functions/updateMessage'; -import { executeSendMessage } from '../../../lib/server/methods/sendMessage'; -import { api } from '../../../../server/sdk/api'; -import notifications from '../../../notifications/server/lib/Notifications'; -import { ISubscription } from '../../../../definition/ISubscription'; -import { AppServerOrchestrator } from '../orchestrator'; - -export class AppMessageBridge extends MessageBridge { - // eslint-disable-next-line no-empty-function - constructor(private readonly orch: AppServerOrchestrator) { - super(); - } - - protected async create(message: IMessage, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is creating a new message.`); - - const convertedMessage = this.orch.getConverters()?.get('messages').convertAppMessage(message); - - const sentMessage = executeSendMessage(convertedMessage.u._id, convertedMessage); - - return sentMessage._id; - } - - protected async getById(messageId: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is getting the message: "${messageId}"`); - - return this.orch.getConverters()?.get('messages').convertById(messageId); - } - - protected async update(message: IMessage, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is updating a message.`); - - if (!message.editor) { - throw new Error('Invalid editor assigned to the message for the update.'); - } - - if (!message.id || !Messages.findOneById(message.id)) { - throw new Error('A message must exist to update.'); - } - - const msg = this.orch.getConverters()?.get('messages').convertAppMessage(message); - const editor = Users.findOneById(message.editor.id); - - updateMessage(msg, editor); - } - - protected async notifyUser(user: IUser, message: IMessage, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is notifying a user.`); - - const msg = this.orch.getConverters()?.get('messages').convertAppMessage(message); - - if (!msg) { - return; - } - - api.broadcast('notify.ephemeralMessage', user.id, msg.rid, { - ...msg, - }); - } - - protected async notifyRoom(room: IRoom, message: IMessage, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is notifying a room's users.`); - - if (!room || !room.id) { - return; - } - - const msg = this.orch.getConverters()?.get('messages').convertAppMessage(message); - - const users = Subscriptions.findByRoomIdWhenUserIdExists(room.id, { fields: { 'u._id': 1 } }) - .fetch() - .map((s: ISubscription) => s.u._id); - - Users.findByIds(users, { fields: { _id: 1 } }) - .fetch() - .forEach(({ _id }: { _id: string }) => - api.broadcast('notify.ephemeralMessage', _id, room.id, { - ...msg, - }), - ); - } - - protected async typing({ scope, id, username, isTyping }: ITypingDescriptor): Promise { - switch (scope) { - case 'room': - notifications.notifyRoom(id, 'typing', username, isTyping); - return; - default: - throw new Error('Unrecognized typing scope provided'); - } - } -} diff --git a/app/apps/server/bridges/rooms.ts b/app/apps/server/bridges/rooms.ts deleted file mode 100644 index a8a27c22cab9..000000000000 --- a/app/apps/server/bridges/rooms.ts +++ /dev/null @@ -1,176 +0,0 @@ -import { RoomType, IRoom } from '@rocket.chat/apps-engine/definition/rooms'; -import { RoomBridge } from '@rocket.chat/apps-engine/server/bridges/RoomBridge'; -import { IUser } from '@rocket.chat/apps-engine/definition/users'; -import { IMessage } from '@rocket.chat/apps-engine/definition/messages'; -import { Meteor } from 'meteor/meteor'; - -import { AppServerOrchestrator } from '../orchestrator'; -import { Rooms, Subscriptions, Users } from '../../../models/server'; -import { addUserToRoom } from '../../../lib/server/functions/addUserToRoom'; -import { ISubscription } from '../../../../definition/ISubscription'; - -export class AppRoomBridge extends RoomBridge { - // eslint-disable-next-line no-empty-function - constructor(private readonly orch: AppServerOrchestrator) { - super(); - } - - protected async create(room: IRoom, members: Array, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is creating a new room.`, room); - - const rcRoom = this.orch.getConverters()?.get('rooms').convertAppRoom(room); - let method: string; - - switch (room.type) { - case RoomType.CHANNEL: - method = 'createChannel'; - break; - case RoomType.PRIVATE_GROUP: - method = 'createPrivateGroup'; - break; - case RoomType.DIRECT_MESSAGE: - method = 'createDirectMessage'; - break; - default: - throw new Error('Only channels, private groups and direct messages can be created.'); - } - - let rid = ''; - Meteor.runAsUser(room.creator.id, () => { - const extraData = Object.assign({}, rcRoom); - delete extraData.name; - delete extraData.t; - delete extraData.ro; - delete extraData.customFields; - let info; - if (room.type === RoomType.DIRECT_MESSAGE) { - info = Meteor.call(method, ...members); - } else { - info = Meteor.call(method, rcRoom.name, members, rcRoom.ro, rcRoom.customFields, extraData); - } - rid = info.rid; - }); - - return rid; - } - - protected async getById(roomId: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is getting the roomById: "${roomId}"`); - - return this.orch.getConverters()?.get('rooms').convertById(roomId); - } - - protected async getByName(roomName: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is getting the roomByName: "${roomName}"`); - - return this.orch.getConverters()?.get('rooms').convertByName(roomName); - } - - protected async getCreatorById(roomId: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is getting the room's creator by id: "${roomId}"`); - - const room = Rooms.findOneById(roomId); - - if (!room || !room.u || !room.u._id) { - return undefined; - } - - return this.orch.getConverters()?.get('users').convertById(room.u._id); - } - - protected async getCreatorByName(roomName: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is getting the room's creator by name: "${roomName}"`); - - const room = Rooms.findOneByName(roomName, {}); - - if (!room || !room.u || !room.u._id) { - return undefined; - } - - return this.orch.getConverters()?.get('users').convertById(room.u._id); - } - - protected async getMembers(roomId: string, appId: string): Promise> { - this.orch.debugLog(`The App ${appId} is getting the room's members by room id: "${roomId}"`); - const subscriptions = await Subscriptions.findByRoomId(roomId, {}); - return subscriptions.map((sub: ISubscription) => - this.orch - .getConverters() - ?.get('users') - .convertById(sub.u && sub.u._id), - ); - } - - protected async getDirectByUsernames(usernames: Array, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is getting direct room by usernames: "${usernames}"`); - const room = await Rooms.findDirectRoomContainingAllUsernames(usernames, {}); - if (!room) { - return undefined; - } - return this.orch.getConverters()?.get('rooms').convertRoom(room); - } - - protected async update(room: IRoom, members: Array = [], appId: string): Promise { - this.orch.debugLog(`The App ${appId} is updating a room.`); - - if (!room.id || !Rooms.findOneById(room.id)) { - throw new Error('A room must exist to update.'); - } - - const rm = this.orch.getConverters()?.get('rooms').convertAppRoom(room); - - Rooms.update(rm._id, rm); - - for (const username of members) { - const member = Users.findOneByUsername(username, {}); - - if (!member) { - continue; - } - - addUserToRoom(rm._id, member); - } - } - - protected async delete(roomId: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is deleting a room.`); - Rooms.removeById(roomId); - } - - protected async createDiscussion( - room: IRoom, - parentMessage: IMessage | undefined = undefined, - reply: string | undefined = '', - members: Array = [], - appId: string, - ): Promise { - this.orch.debugLog(`The App ${appId} is creating a new discussion.`, room); - - const rcRoom = this.orch.getConverters()?.get('rooms').convertAppRoom(room); - - let rcMessage; - if (parentMessage) { - rcMessage = this.orch.getConverters()?.get('messages').convertAppMessage(parentMessage); - } - - if (!rcRoom.prid || !Rooms.findOneById(rcRoom.prid)) { - throw new Error('There must be a parent room to create a discussion.'); - } - - const discussion = { - prid: rcRoom.prid, - t_name: rcRoom.fname, // eslint-disable-line @typescript-eslint/camelcase - pmid: rcMessage ? rcMessage._id : undefined, - reply: reply && reply.trim() !== '' ? reply : undefined, - users: members.length > 0 ? members : [], - }; - - let rid = ''; - Meteor.runAsUser(room.creator.id, () => { - const info = Meteor.call('createDiscussion', discussion); - rid = info.rid; - }); - - return rid; - } -} diff --git a/app/apps/server/bridges/settings.ts b/app/apps/server/bridges/settings.ts deleted file mode 100644 index 9262642b2d3c..000000000000 --- a/app/apps/server/bridges/settings.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { ISetting } from '@rocket.chat/apps-engine/definition/settings'; -import { ServerSettingBridge } from '@rocket.chat/apps-engine/server/bridges/ServerSettingBridge'; - -import { Settings } from '../../../models/server/raw'; -import { AppServerOrchestrator } from '../orchestrator'; - -export class AppSettingBridge extends ServerSettingBridge { - // eslint-disable-next-line no-empty-function - constructor(private readonly orch: AppServerOrchestrator) { - super(); - } - - protected async getAll(appId: string): Promise> { - this.orch.debugLog(`The App ${appId} is getting all the settings.`); - - const settings = await Settings.find({ secret: false }).toArray(); - return settings.map((s) => this.orch.getConverters()?.get('settings').convertToApp(s)); - } - - protected async getOneById(id: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is getting the setting by id ${id}.`); - - if (!(await this.isReadableById(id, appId))) { - throw new Error(`The setting "${id}" is not readable.`); - } - - return this.orch.getConverters()?.get('settings').convertById(id); - } - - protected async hideGroup(name: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is hidding the group ${name}.`); - - throw new Error('Method not implemented.'); - } - - protected async hideSetting(id: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is hidding the setting ${id}.`); - - if (!(await this.isReadableById(id, appId))) { - throw new Error(`The setting "${id}" is not readable.`); - } - - throw new Error('Method not implemented.'); - } - - protected async isReadableById(id: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is checking if they can read the setting ${id}.`); - const setting = await Settings.findOneById(id); - return Boolean(setting && !setting.secret); - } - - protected async updateOne(setting: ISetting & { id: string }, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is updating the setting ${setting.id} .`); - - if (!(await this.isReadableById(setting.id, appId))) { - throw new Error(`The setting "${setting.id}" is not readable.`); - } - - throw new Error('Method not implemented.'); - } -} diff --git a/app/apps/server/bridges/uiInteraction.ts b/app/apps/server/bridges/uiInteraction.ts deleted file mode 100644 index 56c1fa174e08..000000000000 --- a/app/apps/server/bridges/uiInteraction.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { UiInteractionBridge as UiIntBridge } from '@rocket.chat/apps-engine/server/bridges/UiInteractionBridge'; -import { IUIKitInteraction } from '@rocket.chat/apps-engine/definition/uikit'; -import { IUser } from '@rocket.chat/apps-engine/definition/users'; - -import { Notifications } from '../../../notifications/server'; -import { AppServerOrchestrator } from '../orchestrator'; - -export class UiInteractionBridge extends UiIntBridge { - // eslint-disable-next-line no-empty-function - constructor(private readonly orch: AppServerOrchestrator) { - super(); - } - - protected async notifyUser(user: IUser, interaction: IUIKitInteraction, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is sending an interaction to user.`); - - const app = this.orch.getManager()?.getOneById(appId); - - if (!app) { - throw new Error('Invalid app provided'); - } - - Notifications.notifyUser(user.id, 'uiInteraction', interaction); - } -} diff --git a/app/apps/server/bridges/users.ts b/app/apps/server/bridges/users.ts deleted file mode 100644 index 68e5e54fc1f2..000000000000 --- a/app/apps/server/bridges/users.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { Random } from 'meteor/random'; -import { UserPresence } from 'meteor/konecty:user-presence'; -import { UserBridge } from '@rocket.chat/apps-engine/server/bridges/UserBridge'; -import { IUserCreationOptions, IUser } from '@rocket.chat/apps-engine/definition/users'; - -import { setUserAvatar, checkUsernameAvailability, deleteUser } from '../../../lib/server/functions'; -import { Users } from '../../../models/server'; -import { Subscriptions, Users as UsersRaw } from '../../../models/server/raw'; -import { AppServerOrchestrator } from '../orchestrator'; - -export class AppUserBridge extends UserBridge { - // eslint-disable-next-line no-empty-function - constructor(private readonly orch: AppServerOrchestrator) { - super(); - } - - protected async getById(userId: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is getting the userId: "${userId}"`); - - return this.orch.getConverters()?.get('users').convertById(userId); - } - - protected async getByUsername(username: string, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is getting the username: "${username}"`); - - return this.orch.getConverters()?.get('users').convertByUsername(username); - } - - protected async getAppUser(appId?: string): Promise { - this.orch.debugLog(`The App ${appId} is getting its assigned user`); - - const user = Users.findOneByAppId(appId, {}); - - return this.orch.getConverters()?.get('users').convertToApp(user); - } - - protected async create(userDescriptor: Partial, appId: string, options?: IUserCreationOptions): Promise { - this.orch.debugLog(`The App ${appId} is requesting to create a new user.`); - const user = this.orch.getConverters()?.get('users').convertToRocketChat(userDescriptor); - - if (!user._id) { - user._id = Random.id(); - } - - if (!user.createdAt) { - user.createdAt = new Date(); - } - - switch (user.type) { - case 'app': - if (!checkUsernameAvailability(user.username)) { - throw new Error(`The username "${user.username}" is already being used. Rename or remove the user using it to install this App`); - } - - Users.insert(user); - - if (options?.avatarUrl) { - setUserAvatar(user, options.avatarUrl, '', 'local'); - } - - break; - - default: - throw new Error('Creating normal users is currently not supported'); - } - - return user._id; - } - - protected async remove(user: IUser & { id: string }, appId: string): Promise { - this.orch.debugLog(`The App's user is being removed: ${appId}`); - - // It's actually not a problem if there is no App user to delete - just means we don't need to do anything more. - if (!user) { - return true; - } - - try { - deleteUser(user.id); - } catch (err) { - throw new Error(`Errors occurred while deleting an app user: ${err}`); - } - - return true; - } - - protected async update(user: IUser & { id: string }, fields: Partial, appId: string): Promise { - this.orch.debugLog(`The App ${appId} is updating a user`); - - if (!user) { - throw new Error('User not provided'); - } - - if (!Object.keys(fields).length) { - return true; - } - - const { status } = fields; - delete fields.status; - - await UsersRaw.update({ _id: user.id }, { $set: fields }); - - if (status) { - UserPresence.setDefaultStatus(user.id, status); - } - - return true; - } - - protected async getActiveUserCount(): Promise { - return Users.getActiveLocalUserCount(); - } - - protected async getUserUnreadMessageCount(uid: string): Promise { - return Subscriptions.getBadgeCount(uid); - } -} diff --git a/app/apps/server/communication/endpoints/actionButtonsHandler.ts b/app/apps/server/communication/endpoints/actionButtonsHandler.ts deleted file mode 100644 index 2bab611576f3..000000000000 --- a/app/apps/server/communication/endpoints/actionButtonsHandler.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { AppManager } from '@rocket.chat/apps-engine/server/AppManager'; - -import { API } from '../../../../api/server'; -import { AppsRestApi } from '../rest'; - -export const actionButtonsHandler = (apiManager: AppsRestApi): [Record, Record] => [ - { - authRequired: false, - }, - { - get(): any { - const manager = apiManager._manager as AppManager; - - const buttons = manager.getUIActionButtonManager().getAllActionButtons(); - - return API.v1.success(buttons); - }, - }, -]; diff --git a/app/apps/server/communication/methods.js b/app/apps/server/communication/methods.js deleted file mode 100644 index 1bccb4fbed46..000000000000 --- a/app/apps/server/communication/methods.js +++ /dev/null @@ -1,95 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { Settings } from '../../../models/server/raw'; -import { hasPermission } from '../../../authorization/server'; -import { twoFactorRequired } from '../../../2fa/server/twoFactorRequired'; - -const waitToLoad = function (orch) { - return new Promise((resolve) => { - let id = setInterval(() => { - if (orch.isEnabled() && orch.isLoaded()) { - clearInterval(id); - id = -1; - resolve(); - } - }, 100); - }); -}; - -const waitToUnload = function (orch) { - return new Promise((resolve) => { - let id = setInterval(() => { - if (!orch.isEnabled() && !orch.isLoaded()) { - clearInterval(id); - id = -1; - resolve(); - } - }, 100); - }); -}; - -export class AppMethods { - constructor(orch) { - this._orch = orch; - - this._addMethods(); - } - - isEnabled() { - return typeof this._orch !== 'undefined' && this._orch.isEnabled(); - } - - isLoaded() { - return typeof this._orch !== 'undefined' && this._orch.isEnabled() && this._orch.isLoaded(); - } - - _addMethods() { - const instance = this; - - Meteor.methods({ - 'apps/is-enabled'() { - return instance.isEnabled(); - }, - - 'apps/is-loaded'() { - return instance.isLoaded(); - }, - - 'apps/go-enable': twoFactorRequired(function _appsGoEnable() { - if (!Meteor.userId()) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { - method: 'apps/go-enable', - }); - } - - if (!hasPermission(Meteor.userId(), 'manage-apps')) { - throw new Meteor.Error('error-action-not-allowed', 'Not allowed', { - method: 'apps/go-enable', - }); - } - - Settings.updateValueById('Apps_Framework_enabled', true); - - Promise.await(waitToLoad(instance._orch)); - }), - - 'apps/go-disable': twoFactorRequired(function _appsGoDisable() { - if (!Meteor.userId()) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { - method: 'apps/go-enable', - }); - } - - if (!hasPermission(Meteor.userId(), 'manage-apps')) { - throw new Meteor.Error('error-action-not-allowed', 'Not allowed', { - method: 'apps/go-enable', - }); - } - - Settings.updateValueById('Apps_Framework_enabled', false); - - Promise.await(waitToUnload(instance._orch)); - }), - }); - } -} diff --git a/app/apps/server/communication/rest.js b/app/apps/server/communication/rest.js deleted file mode 100644 index bd8894afb765..000000000000 --- a/app/apps/server/communication/rest.js +++ /dev/null @@ -1,773 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { HTTP } from 'meteor/http'; -import { fetch } from 'meteor/fetch'; - -import { API } from '../../../api/server'; -import { getUploadFormData } from '../../../api/server/lib/getUploadFormData'; -import { getWorkspaceAccessToken, getUserCloudAccessToken } from '../../../cloud/server'; -import { settings } from '../../../settings/server'; -import { Info } from '../../../utils'; -import { Users } from '../../../models/server'; -import { Settings } from '../../../models/server/raw'; -import { Apps } from '../orchestrator'; -import { formatAppInstanceForRest } from '../../lib/misc/formatAppInstanceForRest'; -import { actionButtonsHandler } from './endpoints/actionButtonsHandler'; - -const appsEngineVersionForMarketplace = Info.marketplaceApiVersion.replace(/-.*/g, ''); -const getDefaultHeaders = () => ({ - 'X-Apps-Engine-Version': appsEngineVersionForMarketplace, -}); - -const purchaseTypes = new Set(['buy', 'subscription']); - -export class AppsRestApi { - constructor(orch, manager) { - this._orch = orch; - this._manager = manager; - this.loadAPI(); - } - - async loadAPI() { - this.api = new API.ApiClass({ - version: 'apps', - useDefaultAuth: true, - prettyJson: false, - enableCors: false, - auth: API.getUserAuth(), - }); - this.addManagementRoutes(); - } - - addManagementRoutes() { - const orchestrator = this._orch; - const manager = this._manager; - - const handleError = (message, e) => { - // when there is no `response` field in the error, it means the request - // couldn't even make it to the server - if (!e.hasOwnProperty('response')) { - orchestrator.getRocketChatLogger().warn(message, e.message); - return API.v1.internalError('Could not reach the Marketplace'); - } - - orchestrator.getRocketChatLogger().error(message, e.response.data); - - if (e.response.statusCode >= 500 && e.response.statusCode <= 599) { - return API.v1.internalError(); - } - - if (e.response.statusCode === 404) { - return API.v1.notFound(); - } - - return API.v1.failure(); - }; - - this.api.addRoute('actionButtons', ...actionButtonsHandler(this)); - - // WE NEED TO MOVE EACH ENDPOINT HANDLER TO IT'S OWN FILE - this.api.addRoute( - '', - { authRequired: true, permissionsRequired: ['manage-apps'] }, - { - get() { - const baseUrl = orchestrator.getMarketplaceUrl(); - - // Gets the Apps from the marketplace - if (this.queryParams.marketplace) { - const headers = getDefaultHeaders(); - const token = getWorkspaceAccessToken(); - if (token) { - headers.Authorization = `Bearer ${token}`; - } - - let result; - try { - result = HTTP.get(`${baseUrl}/v1/apps`, { - headers, - }); - } catch (e) { - return handleError('Unable to access Marketplace. Does the server has access to the internet?', e); - } - - if (!result || result.statusCode !== 200) { - orchestrator.getRocketChatLogger().error('Error getting the Apps:', result.data); - return API.v1.failure(); - } - - return API.v1.success(result.data); - } - - if (this.queryParams.categories) { - const headers = getDefaultHeaders(); - const token = getWorkspaceAccessToken(); - if (token) { - headers.Authorization = `Bearer ${token}`; - } - - let result; - try { - result = HTTP.get(`${baseUrl}/v1/categories`, { - headers, - }); - } catch (e) { - orchestrator.getRocketChatLogger().error('Error getting the categories from the Marketplace:', e.response.data); - return API.v1.internalError(); - } - - if (!result || result.statusCode !== 200) { - orchestrator.getRocketChatLogger().error('Error getting the categories from the Marketplace:', result.data); - return API.v1.failure(); - } - - return API.v1.success(result.data); - } - - if (this.queryParams.buildExternalUrl && this.queryParams.appId) { - const workspaceId = settings.get('Cloud_Workspace_Id'); - - if (!this.queryParams.purchaseType || !purchaseTypes.has(this.queryParams.purchaseType)) { - return API.v1.failure({ error: 'Invalid purchase type' }); - } - - const token = getUserCloudAccessToken(this.getLoggedInUser()._id, true, 'marketplace:purchase', false); - if (!token) { - return API.v1.failure({ error: 'Unauthorized' }); - } - - const subscribeRoute = this.queryParams.details === 'true' ? 'subscribe/details' : 'subscribe'; - - const seats = Users.getActiveLocalUserCount(); - - return API.v1.success({ - url: `${baseUrl}/apps/${this.queryParams.appId}/${ - this.queryParams.purchaseType === 'buy' ? this.queryParams.purchaseType : subscribeRoute - }?workspaceId=${workspaceId}&token=${token}&seats=${seats}`, - }); - } - - const apps = manager.get().map(formatAppInstanceForRest); - - return API.v1.success({ apps }); - }, - async post() { - let buff; - let marketplaceInfo; - let permissionsGranted; - - if (this.bodyParams.url) { - if (settings.get('Apps_Framework_Development_Mode') !== true) { - return API.v1.failure({ error: 'Installation from url is disabled.' }); - } - - try { - const response = await fetch(this.bodyParams.url); - - if (response.status !== 200 || response.headers.get('content-type') !== 'application/zip') { - return API.v1.failure({ - error: 'Invalid url. It doesn\'t exist or is not "application/zip".', - }); - } - - buff = Buffer.from(await response.arrayBuffer()); - } catch (e) { - orchestrator.getRocketChatLogger().error('Error getting the app from url:', e.response.data); - return API.v1.internalError(); - } - - if (this.bodyParams.downloadOnly) { - return API.v1.success({ buff }); - } - } else if (this.bodyParams.appId && this.bodyParams.marketplace && this.bodyParams.version) { - const baseUrl = orchestrator.getMarketplaceUrl(); - - const headers = getDefaultHeaders(); - try { - const downloadToken = getWorkspaceAccessToken(true, 'marketplace:download', false); - const marketplaceToken = getWorkspaceAccessToken(); - - const [downloadResponse, marketplaceResponse] = await Promise.all([ - fetch(`${baseUrl}/v2/apps/${this.bodyParams.appId}/download/${this.bodyParams.version}?token=${downloadToken}`, { - headers, - }), - fetch(`${baseUrl}/v1/apps/${this.bodyParams.appId}?appVersion=${this.bodyParams.version}`, { - headers: { - Authorization: `Bearer ${marketplaceToken}`, - ...headers, - }, - }), - ]); - - if (downloadResponse.headers.get('content-type') !== 'application/zip') { - throw new Error('Invalid url. It doesn\'t exist or is not "application/zip".'); - } - - buff = Buffer.from(await downloadResponse.arrayBuffer()); - marketplaceInfo = await marketplaceResponse.json(); - permissionsGranted = this.bodyParams.permissionsGranted; - } catch (err) { - return API.v1.failure(err.message); - } - } else { - if (settings.get('Apps_Framework_Development_Mode') !== true) { - return API.v1.failure({ error: 'Direct installation of an App is disabled.' }); - } - - const formData = await getUploadFormData({ - request: this.request, - }); - buff = formData?.app?.fileBuffer; - permissionsGranted = (() => { - try { - const permissions = JSON.parse(formData?.permissions || ''); - return permissions.length ? permissions : undefined; - } catch { - return undefined; - } - })(); - } - - if (!buff) { - return API.v1.failure({ error: 'Failed to get a file to install for the App. ' }); - } - - const user = orchestrator.getConverters().get('users').convertToApp(Meteor.user()); - - const aff = await manager.add(buff, { marketplaceInfo, permissionsGranted, enable: true, user }); - const info = aff.getAppInfo(); - - if (aff.hasStorageError()) { - return API.v1.failure({ status: 'storage_error', messages: [aff.getStorageError()] }); - } - - if (aff.hasAppUserError()) { - return API.v1.failure({ - status: 'app_user_error', - messages: [aff.getAppUserError().message], - payload: { username: aff.getAppUserError().username }, - }); - } - - info.status = aff.getApp().getStatus(); - - return API.v1.success({ - app: info, - implemented: aff.getImplementedInferfaces(), - licenseValidation: aff.getLicenseValidationResult(), - }); - }, - }, - ); - - this.api.addRoute( - 'externalComponents', - { authRequired: false }, - { - get() { - const externalComponents = orchestrator.getProvidedComponents(); - - return API.v1.success({ externalComponents }); - }, - }, - ); - - this.api.addRoute( - 'languages', - { authRequired: false }, - { - get() { - const apps = manager.get().map((prl) => ({ - id: prl.getID(), - languages: prl.getStorageItem().languageContent, - })); - - return API.v1.success({ apps }); - }, - }, - ); - - this.api.addRoute( - 'externalComponentEvent', - { authRequired: true }, - { - post() { - if ( - !this.bodyParams.externalComponent || - !['IPostExternalComponentOpened', 'IPostExternalComponentClosed'].includes(this.bodyParams.event) - ) { - return API.v1.failure({ error: 'Event and externalComponent must be provided.' }); - } - - try { - const { event, externalComponent } = this.bodyParams; - const result = Apps.getBridges().getListenerBridge().externalComponentEvent(event, externalComponent); - - return API.v1.success({ result }); - } catch (e) { - orchestrator.getRocketChatLogger().error(`Error triggering external components' events ${e.response.data}`); - return API.v1.internalError(); - } - }, - }, - ); - - this.api.addRoute( - 'bundles/:id/apps', - { authRequired: true, permissionsRequired: ['manage-apps'] }, - { - get() { - const baseUrl = orchestrator.getMarketplaceUrl(); - - const headers = {}; - const token = getWorkspaceAccessToken(); - if (token) { - headers.Authorization = `Bearer ${token}`; - } - - let result; - try { - result = HTTP.get(`${baseUrl}/v1/bundles/${this.urlParams.id}/apps`, { - headers, - }); - } catch (e) { - orchestrator.getRocketChatLogger().error("Error getting the Bundle's Apps from the Marketplace:", e.response.data); - return API.v1.internalError(); - } - - if (!result || result.statusCode !== 200 || result.data.length === 0) { - orchestrator.getRocketChatLogger().error("Error getting the Bundle's Apps from the Marketplace:", result.data); - return API.v1.failure(); - } - - return API.v1.success({ apps: result.data }); - }, - }, - ); - - this.api.addRoute( - ':id', - { authRequired: true, permissionsRequired: ['manage-apps'] }, - { - get() { - if (this.queryParams.marketplace && this.queryParams.version) { - const baseUrl = orchestrator.getMarketplaceUrl(); - - const headers = {}; // DO NOT ATTACH THE FRAMEWORK/ENGINE VERSION HERE. - const token = getWorkspaceAccessToken(); - if (token) { - headers.Authorization = `Bearer ${token}`; - } - - let result; - try { - result = HTTP.get(`${baseUrl}/v1/apps/${this.urlParams.id}?appVersion=${this.queryParams.version}`, { - headers, - }); - } catch (e) { - return handleError('Unable to access Marketplace. Does the server has access to the internet?', e); - } - - if (!result || result.statusCode !== 200 || result.data.length === 0) { - orchestrator.getRocketChatLogger().error('Error getting the App information from the Marketplace:', result.data); - return API.v1.failure(); - } - - return API.v1.success({ app: result.data[0] }); - } - - if (this.queryParams.marketplace && this.queryParams.update && this.queryParams.appVersion) { - const baseUrl = orchestrator.getMarketplaceUrl(); - - const headers = getDefaultHeaders(); - const token = getWorkspaceAccessToken(); - if (token) { - headers.Authorization = `Bearer ${token}`; - } - - let result; - try { - result = HTTP.get(`${baseUrl}/v1/apps/${this.urlParams.id}/latest?frameworkVersion=${appsEngineVersionForMarketplace}`, { - headers, - }); - } catch (e) { - return handleError('Unable to access Marketplace. Does the server has access to the internet?', e); - } - - if (result.statusCode !== 200 || result.data.length === 0) { - orchestrator.getRocketChatLogger().error('Error getting the App update info from the Marketplace:', result.data); - return API.v1.failure(); - } - - return API.v1.success({ app: result.data }); - } - const app = manager.getOneById(this.urlParams.id); - if (!app) { - return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); - } - - return API.v1.success({ - app: formatAppInstanceForRest(app), - }); - }, - async post() { - let buff; - let permissionsGranted; - - if (this.bodyParams.url) { - if (settings.get('Apps_Framework_Development_Mode') !== true) { - return API.v1.failure({ error: 'Updating an App from a url is disabled.' }); - } - - const response = await fetch(this.bodyParams.url); - - if (response.status !== 200 || response.headers.get('content-type') !== 'application/zip') { - return API.v1.failure({ - error: 'Invalid url. It doesn\'t exist or is not "application/zip".', - }); - } - - buff = Buffer.from(await response.arrayBuffer()); - } else if (this.bodyParams.appId && this.bodyParams.marketplace && this.bodyParams.version) { - const baseUrl = orchestrator.getMarketplaceUrl(); - - const headers = getDefaultHeaders(); - const token = getWorkspaceAccessToken(true, 'marketplace:download', false); - - try { - const response = await fetch( - `${baseUrl}/v2/apps/${this.bodyParams.appId}/download/${this.bodyParams.version}?token=${token}`, - { - headers, - }, - ); - - if (response.status !== 200) { - orchestrator.getRocketChatLogger().error('Error getting the App from the Marketplace:', await response.text()); - return API.v1.failure(); - } - - if (response.headers.get('content-type') !== 'application/zip') { - return API.v1.failure({ - error: 'Invalid url. It doesn\'t exist or is not "application/zip".', - }); - } - - buff = Buffer.from(await response.arrayBuffer()); - } catch (e) { - orchestrator.getRocketChatLogger().error('Error getting the App from the Marketplace:', e.response.data); - return API.v1.internalError(); - } - } else { - if (settings.get('Apps_Framework_Development_Mode') !== true) { - return API.v1.failure({ error: 'Direct updating of an App is disabled.' }); - } - - const formData = await getUploadFormData({ - request: this.request, - }); - buff = formData?.app?.fileBuffer; - permissionsGranted = (() => { - try { - const permissions = JSON.parse(formData?.permissions || ''); - return permissions.length ? permissions : undefined; - } catch { - return undefined; - } - })(); - } - - if (!buff) { - return API.v1.failure({ error: 'Failed to get a file to install for the App. ' }); - } - - const aff = await manager.update(buff, permissionsGranted); - const info = aff.getAppInfo(); - - if (aff.hasStorageError()) { - return API.v1.failure({ status: 'storage_error', messages: [aff.getStorageError()] }); - } - - if (aff.hasAppUserError()) { - return API.v1.failure({ - status: 'app_user_error', - messages: [aff.getAppUserError().message], - payload: { username: aff.getAppUserError().username }, - }); - } - - info.status = aff.getApp().getStatus(); - - return API.v1.success({ - app: info, - implemented: aff.getImplementedInferfaces(), - licenseValidation: aff.getLicenseValidationResult(), - }); - }, - delete() { - const prl = manager.getOneById(this.urlParams.id); - - if (!prl) { - return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); - } - - const user = orchestrator.getConverters().get('users').convertToApp(Meteor.user()); - - Promise.await(manager.remove(prl.getID(), { user })); - - const info = prl.getInfo(); - info.status = prl.getStatus(); - - return API.v1.success({ app: info }); - }, - }, - ); - - this.api.addRoute( - ':id/sync', - { authRequired: true, permissionsRequired: ['manage-apps'] }, - { - post() { - const baseUrl = orchestrator.getMarketplaceUrl(); - - const headers = getDefaultHeaders(); - const token = getWorkspaceAccessToken(); - if (token) { - headers.Authorization = `Bearer ${token}`; - } - - const workspaceIdSetting = Promise.await(Settings.findOneById('Cloud_Workspace_Id')); - - let result; - try { - result = HTTP.get(`${baseUrl}/v1/workspaces/${workspaceIdSetting.value}/apps/${this.urlParams.id}`, { - headers, - }); - } catch (e) { - orchestrator.getRocketChatLogger().error('Error syncing the App from the Marketplace:', e.response.data); - return API.v1.internalError(); - } - - if (result.statusCode !== 200) { - orchestrator.getRocketChatLogger().error('Error syncing the App from the Marketplace:', result.data); - return API.v1.failure(); - } - - Promise.await(Apps.updateAppsMarketplaceInfo([result.data])); - - return API.v1.success({ app: result.data }); - }, - }, - ); - - this.api.addRoute( - ':id/icon', - { authRequired: false }, - { - get() { - const prl = manager.getOneById(this.urlParams.id); - if (!prl) { - return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); - } - - const info = prl.getInfo(); - if (!info || !info.iconFileContent) { - return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); - } - - const imageData = info.iconFileContent.split(';base64,'); - - const buf = Buffer.from(imageData[1], 'base64'); - - return { - statusCode: 200, - headers: { - 'Content-Length': buf.length, - 'Content-Type': imageData[0].replace('data:', ''), - }, - body: buf, - }; - }, - }, - ); - - this.api.addRoute( - ':id/languages', - { authRequired: false }, - { - get() { - const prl = manager.getOneById(this.urlParams.id); - - if (prl) { - const languages = prl.getStorageItem().languageContent || {}; - - return API.v1.success({ languages }); - } - return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); - }, - }, - ); - - this.api.addRoute( - ':id/logs', - { authRequired: true, permissionsRequired: ['manage-apps'] }, - { - get() { - const prl = manager.getOneById(this.urlParams.id); - - if (prl) { - const { offset, count } = this.getPaginationItems(); - const { sort, fields, query } = this.parseJsonQuery(); - - const ourQuery = Object.assign({}, query, { appId: prl.getID() }); - const options = { - sort: sort || { _updatedAt: -1 }, - skip: offset, - limit: count, - fields, - }; - - const logs = Promise.await(orchestrator.getLogStorage().find(ourQuery, options)); - - return API.v1.success({ logs }); - } - return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); - }, - }, - ); - - this.api.addRoute( - ':id/settings', - { authRequired: true, permissionsRequired: ['manage-apps'] }, - { - get() { - const prl = manager.getOneById(this.urlParams.id); - - if (prl) { - const settings = Object.assign({}, prl.getStorageItem().settings); - - Object.keys(settings).forEach((k) => { - if (settings[k].hidden) { - delete settings[k]; - } - }); - - return API.v1.success({ settings }); - } - return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); - }, - post() { - if (!this.bodyParams || !this.bodyParams.settings) { - return API.v1.failure('The settings to update must be present.'); - } - - const prl = manager.getOneById(this.urlParams.id); - - if (!prl) { - return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); - } - - const { settings } = prl.getStorageItem(); - - const updated = []; - this.bodyParams.settings.forEach((s) => { - if (settings[s.id]) { - Promise.await(manager.getSettingsManager().updateAppSetting(this.urlParams.id, s)); - // Updating? - updated.push(s); - } - }); - - return API.v1.success({ updated }); - }, - }, - ); - - this.api.addRoute( - ':id/settings/:settingId', - { authRequired: true, permissionsRequired: ['manage-apps'] }, - { - get() { - try { - const setting = manager.getSettingsManager().getAppSetting(this.urlParams.id, this.urlParams.settingId); - - API.v1.success({ setting }); - } catch (e) { - if (e.message.includes('No setting found')) { - return API.v1.notFound(`No Setting found on the App by the id of: "${this.urlParams.settingId}"`); - } - if (e.message.includes('No App found')) { - return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); - } - return API.v1.failure(e.message); - } - }, - post() { - if (!this.bodyParams.setting) { - return API.v1.failure('Setting to update to must be present on the posted body.'); - } - - try { - Promise.await(manager.getSettingsManager().updateAppSetting(this.urlParams.id, this.bodyParams.setting)); - - return API.v1.success(); - } catch (e) { - if (e.message.includes('No setting found')) { - return API.v1.notFound(`No Setting found on the App by the id of: "${this.urlParams.settingId}"`); - } - if (e.message.includes('No App found')) { - return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); - } - return API.v1.failure(e.message); - } - }, - }, - ); - - this.api.addRoute( - ':id/apis', - { authRequired: true, permissionsRequired: ['manage-apps'] }, - { - get() { - const prl = manager.getOneById(this.urlParams.id); - - if (prl) { - return API.v1.success({ - apis: manager.apiManager.listApis(this.urlParams.id), - }); - } - return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); - }, - }, - ); - - this.api.addRoute( - ':id/status', - { authRequired: true, permissionsRequired: ['manage-apps'] }, - { - get() { - const prl = manager.getOneById(this.urlParams.id); - - if (prl) { - return API.v1.success({ status: prl.getStatus() }); - } - return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); - }, - post() { - if (!this.bodyParams.status || typeof this.bodyParams.status !== 'string') { - return API.v1.failure('Invalid status provided, it must be "status" field and a string.'); - } - - const prl = manager.getOneById(this.urlParams.id); - - if (!prl) { - return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); - } - - const result = Promise.await(manager.changeStatus(prl.getID(), this.bodyParams.status)); - - return API.v1.success({ status: result.getStatus() }); - }, - }, - ); - } -} diff --git a/app/apps/server/communication/uikit.js b/app/apps/server/communication/uikit.js deleted file mode 100644 index 27b7c906f8cf..000000000000 --- a/app/apps/server/communication/uikit.js +++ /dev/null @@ -1,321 +0,0 @@ -import express from 'express'; -import cors from 'cors'; -import rateLimit from 'express-rate-limit'; -import { Meteor } from 'meteor/meteor'; -import { WebApp } from 'meteor/webapp'; -import { UIKitIncomingInteractionType } from '@rocket.chat/apps-engine/definition/uikit'; -import { AppInterface } from '@rocket.chat/apps-engine/definition/metadata'; - -import { Users } from '../../../models/server'; -import { settings } from '../../../settings/server'; -import { Apps } from '../orchestrator'; -import { UiKitCoreApp } from '../../../../server/sdk'; - -const apiServer = express(); - -apiServer.disable('x-powered-by'); - -let corsEnabled = false; -let allowListOrigins = []; - -settings.watch('API_Enable_CORS', (value) => { - corsEnabled = value; -}); - -settings.watch('API_CORS_Origin', (value) => { - allowListOrigins = value - ? value - .trim() - .split(',') - .map((origin) => String(origin).trim().toLocaleLowerCase()) - : []; -}); - -const corsOptions = { - origin: (origin, callback) => { - if ( - !origin || - !corsEnabled || - allowListOrigins.includes('*') || - allowListOrigins.includes(origin) || - origin === settings.get('Site_Url') - ) { - callback(null, true); - } else { - callback('Not allowed by CORS', false); - } - }, -}; - -WebApp.connectHandlers.use(apiServer); - -// eslint-disable-next-line new-cap -const router = express.Router(); - -const unauthorized = (res) => - res.status(401).send({ - status: 'error', - message: 'You must be logged in to do this.', - }); - -Meteor.startup(() => { - // use specific rate limit of 600 (which is 60 times the default limits) requests per minute (around 10/second) - const apiLimiter = rateLimit({ - windowMs: settings.get('API_Enable_Rate_Limiter_Limit_Time_Default'), - max: settings.get('API_Enable_Rate_Limiter_Limit_Calls_Default') * 60, - skip: () => - settings.get('API_Enable_Rate_Limiter') !== true || - (process.env.NODE_ENV === 'development' && settings.get('API_Enable_Rate_Limiter_Dev') !== true), - }); - router.use(apiLimiter); -}); - -router.use((req, res, next) => { - const { 'x-user-id': userId, 'x-auth-token': authToken, 'x-visitor-token': visitorToken } = req.headers; - - if (userId && authToken) { - req.user = Users.findOneByIdAndLoginToken(userId, authToken); - req.userId = req.user._id; - } - - if (visitorToken) { - req.visitor = Apps.getConverters().get('visitors').convertByToken(visitorToken); - } - - if (!req.user && !req.visitor) { - return unauthorized(res); - } - - next(); -}); - -apiServer.use('/api/apps/ui.interaction/', cors(corsOptions), router); - -const getPayloadForType = (type, req) => { - if (type === UIKitIncomingInteractionType.BLOCK) { - const { type, actionId, triggerId, mid, rid, payload, container } = req.body; - - const { visitor, user } = req; - const room = rid; // orch.getConverters().get('rooms').convertById(rid); - const message = mid; - - return { - type, - container, - actionId, - message, - triggerId, - payload, - user, - visitor, - room, - }; - } - - if (type === UIKitIncomingInteractionType.VIEW_CLOSED) { - const { - type, - actionId, - payload: { view, isCleared }, - } = req.body; - - const { user } = req; - - return { - type, - actionId, - user, - payload: { - view, - isCleared, - }, - }; - } - - if (type === UIKitIncomingInteractionType.VIEW_SUBMIT) { - const { type, actionId, triggerId, payload } = req.body; - - const { user } = req; - - return { - type, - actionId, - triggerId, - payload, - user, - }; - } - - throw new Error('Type not supported'); -}; - -router.post('/:appId', async (req, res, next) => { - const { appId } = req.params; - - const isCore = await UiKitCoreApp.isRegistered(appId); - if (!isCore) { - return next(); - } - - const { type } = req.body; - - try { - const payload = { - ...getPayloadForType(type, req), - appId, - }; - - const result = await UiKitCoreApp[type](payload); - - res.send(result); - } catch (e) { - console.error('ops', e); - res.status(500).send({ error: e.message }); - } -}); - -const appsRoutes = (orch) => (req, res) => { - const { appId } = req.params; - - const { type } = req.body; - - switch (type) { - case UIKitIncomingInteractionType.BLOCK: { - const { type, actionId, triggerId, mid, rid, payload, container } = req.body; - - const { visitor } = req; - const room = orch.getConverters().get('rooms').convertById(rid); - const user = orch.getConverters().get('users').convertToApp(req.user); - const message = mid && orch.getConverters().get('messages').convertById(mid); - - const action = { - type, - container, - appId, - actionId, - message, - triggerId, - payload, - user, - visitor, - room, - }; - - try { - const eventInterface = !visitor ? AppInterface.IUIKitInteractionHandler : AppInterface.IUIKitLivechatInteractionHandler; - - const result = Promise.await(orch.triggerEvent(eventInterface, action)); - - res.send(result); - } catch (e) { - res.status(500).send(e.message); - } - break; - } - - case UIKitIncomingInteractionType.VIEW_CLOSED: { - const { - type, - actionId, - payload: { view, isCleared }, - } = req.body; - - const user = orch.getConverters().get('users').convertToApp(req.user); - - const action = { - type, - appId, - actionId, - user, - payload: { - view, - isCleared, - }, - }; - - try { - Promise.await(orch.triggerEvent('IUIKitInteractionHandler', action)); - - res.sendStatus(200); - } catch (e) { - res.status(500).send(e.message); - } - break; - } - - case UIKitIncomingInteractionType.VIEW_SUBMIT: { - const { type, actionId, triggerId, payload } = req.body; - - const user = orch.getConverters().get('users').convertToApp(req.user); - - const action = { - type, - appId, - actionId, - triggerId, - payload, - user, - }; - - try { - const result = Promise.await(orch.triggerEvent('IUIKitInteractionHandler', action)); - - res.send(result); - } catch (e) { - res.status(500).send(e.message); - } - break; - } - - case UIKitIncomingInteractionType.ACTION_BUTTON: { - const { - type, - actionId, - triggerId, - rid, - mid, - payload: { context }, - } = req.body; - - const room = orch.getConverters().get('rooms').convertById(rid); - const user = orch.getConverters().get('users').convertToApp(req.user); - const message = mid && orch.getConverters().get('messages').convertById(mid); - - const action = { - type, - appId, - actionId, - triggerId, - user, - room, - message, - payload: { - context, - }, - }; - - try { - const result = Promise.await(orch.triggerEvent('IUIKitInteractionHandler', action)); - - res.send(result); - } catch (e) { - res.status(500).send(e.message); - } - break; - } - - default: { - res.status(400).send({ error: 'Unknown action' }); - } - } - - // TODO: validate payloads per type -}; - -export class AppUIKitInteractionApi { - constructor(orch) { - this.orch = orch; - - router.post('/:appId', appsRoutes(orch)); - } -} diff --git a/app/apps/server/communication/websockets.js b/app/apps/server/communication/websockets.js deleted file mode 100644 index 005e74345733..000000000000 --- a/app/apps/server/communication/websockets.js +++ /dev/null @@ -1,197 +0,0 @@ -import { AppStatusUtils } from '@rocket.chat/apps-engine/definition/AppStatus'; - -import { SystemLogger } from '../../../../server/lib/logger/system'; -import notifications from '../../../notifications/server/lib/Notifications'; - -export const AppEvents = Object.freeze({ - APP_ADDED: 'app/added', - APP_REMOVED: 'app/removed', - APP_UPDATED: 'app/updated', - APP_STATUS_CHANGE: 'app/statusUpdate', - APP_SETTING_UPDATED: 'app/settingUpdated', - COMMAND_ADDED: 'command/added', - COMMAND_DISABLED: 'command/disabled', - COMMAND_UPDATED: 'command/updated', - COMMAND_REMOVED: 'command/removed', - ACTIONS_CHANGED: 'actions/changed', -}); - -export class AppServerListener { - constructor(orch, engineStreamer, clientStreamer, received) { - this.orch = orch; - this.engineStreamer = engineStreamer; - this.clientStreamer = clientStreamer; - this.received = received; - - this.engineStreamer.on(AppEvents.APP_STATUS_CHANGE, this.onAppStatusUpdated.bind(this)); - this.engineStreamer.on(AppEvents.APP_REMOVED, this.onAppRemoved.bind(this)); - this.engineStreamer.on(AppEvents.APP_UPDATED, this.onAppUpdated.bind(this)); - this.engineStreamer.on(AppEvents.APP_ADDED, this.onAppAdded.bind(this)); - this.engineStreamer.on(AppEvents.ACTIONS_CHANGED, this.onActionsChanged.bind(this)); - - this.engineStreamer.on(AppEvents.APP_SETTING_UPDATED, this.onAppSettingUpdated.bind(this)); - this.engineStreamer.on(AppEvents.COMMAND_ADDED, this.onCommandAdded.bind(this)); - this.engineStreamer.on(AppEvents.COMMAND_DISABLED, this.onCommandDisabled.bind(this)); - this.engineStreamer.on(AppEvents.COMMAND_UPDATED, this.onCommandUpdated.bind(this)); - this.engineStreamer.on(AppEvents.COMMAND_REMOVED, this.onCommandRemoved.bind(this)); - } - - async onAppAdded(appId) { - await this.orch.getManager().loadOne(appId); - this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_ADDED, appId); - } - - async onAppStatusUpdated({ appId, status }) { - const app = this.orch.getManager().getOneById(appId); - - if (!app || app.getStatus() === status) { - return; - } - - this.received.set(`${AppEvents.APP_STATUS_CHANGE}_${appId}`, { - appId, - status, - when: new Date(), - }); - - if (AppStatusUtils.isEnabled(status)) { - await this.orch.getManager().enable(appId).catch(SystemLogger.error); - this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_STATUS_CHANGE, { appId, status }); - } else if (AppStatusUtils.isDisabled(status)) { - await this.orch.getManager().disable(appId, status, true).catch(SystemLogger.error); - this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_STATUS_CHANGE, { appId, status }); - } - } - - async onAppSettingUpdated({ appId, setting }) { - this.received.set(`${AppEvents.APP_SETTING_UPDATED}_${appId}_${setting.id}`, { - appId, - setting, - when: new Date(), - }); - await this.orch.getManager().getSettingsManager().updateAppSetting(appId, setting); - this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_SETTING_UPDATED, { appId }); - } - - async onAppUpdated(appId) { - this.received.set(`${AppEvents.APP_UPDATED}_${appId}`, { appId, when: new Date() }); - - const storageItem = await this.orch.getStorage().retrieveOne(appId); - - const appPackage = await this.orch.getAppSourceStorage().fetch(storageItem); - - await this.orch.getManager().updateLocal(storageItem, appPackage); - - this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_UPDATED, appId); - } - - async onAppRemoved(appId) { - const app = this.orch.getManager().getOneById(appId); - - if (!app) { - return; - } - - await this.orch.getManager().removeLocal(appId); - this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_REMOVED, appId); - } - - async onCommandAdded(command) { - this.clientStreamer.emitWithoutBroadcast(AppEvents.COMMAND_ADDED, command); - } - - async onCommandDisabled(command) { - this.clientStreamer.emitWithoutBroadcast(AppEvents.COMMAND_DISABLED, command); - } - - async onCommandUpdated(command) { - this.clientStreamer.emitWithoutBroadcast(AppEvents.COMMAND_UPDATED, command); - } - - async onCommandRemoved(command) { - this.clientStreamer.emitWithoutBroadcast(AppEvents.COMMAND_REMOVED, command); - } - - async onActionsChanged() { - this.clientStreamer.emitWithoutBroadcast(AppEvents.ACTIONS_CHANGED); - } -} - -export class AppServerNotifier { - constructor(orch) { - this.engineStreamer = notifications.streamAppsEngine; - - // This is used to broadcast to the web clients - this.clientStreamer = notifications.streamApps; - - this.received = new Map(); - this.listener = new AppServerListener(orch, this.engineStreamer, this.clientStreamer, this.received); - } - - async appAdded(appId) { - this.engineStreamer.emit(AppEvents.APP_ADDED, appId); - this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_ADDED, appId); - } - - async appRemoved(appId) { - this.engineStreamer.emit(AppEvents.APP_REMOVED, appId); - this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_REMOVED, appId); - } - - async appUpdated(appId) { - if (this.received.has(`${AppEvents.APP_UPDATED}_${appId}`)) { - this.received.delete(`${AppEvents.APP_UPDATED}_${appId}`); - return; - } - - this.engineStreamer.emit(AppEvents.APP_UPDATED, appId); - this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_UPDATED, appId); - } - - async appStatusUpdated(appId, status) { - if (this.received.has(`${AppEvents.APP_STATUS_CHANGE}_${appId}`)) { - const details = this.received.get(`${AppEvents.APP_STATUS_CHANGE}_${appId}`); - if (details.status === status) { - this.received.delete(`${AppEvents.APP_STATUS_CHANGE}_${appId}`); - return; - } - } - - this.engineStreamer.emit(AppEvents.APP_STATUS_CHANGE, { appId, status }); - this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_STATUS_CHANGE, { appId, status }); - } - - async appSettingsChange(appId, setting) { - if (this.received.has(`${AppEvents.APP_SETTING_UPDATED}_${appId}_${setting.id}`)) { - this.received.delete(`${AppEvents.APP_SETTING_UPDATED}_${appId}_${setting.id}`); - return; - } - - this.engineStreamer.emit(AppEvents.APP_SETTING_UPDATED, { appId, setting }); - this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_SETTING_UPDATED, { appId }); - } - - async commandAdded(command) { - this.engineStreamer.emit(AppEvents.COMMAND_ADDED, command); - this.clientStreamer.emitWithoutBroadcast(AppEvents.COMMAND_ADDED, command); - } - - async commandDisabled(command) { - this.engineStreamer.emit(AppEvents.COMMAND_DISABLED, command); - this.clientStreamer.emitWithoutBroadcast(AppEvents.COMMAND_DISABLED, command); - } - - async commandUpdated(command) { - this.engineStreamer.emit(AppEvents.COMMAND_UPDATED, command); - this.clientStreamer.emitWithoutBroadcast(AppEvents.COMMAND_UPDATED, command); - } - - async commandRemoved(command) { - this.engineStreamer.emit(AppEvents.COMMAND_REMOVED, command); - this.clientStreamer.emitWithoutBroadcast(AppEvents.COMMAND_REMOVED, command); - } - - async actionsChanged() { - this.clientStreamer.emitWithoutBroadcast(AppEvents.ACTIONS_CHANGED); - } -} diff --git a/app/apps/server/converters/index.js b/app/apps/server/converters/index.js deleted file mode 100644 index edb1bcf57cb1..000000000000 --- a/app/apps/server/converters/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import { AppMessagesConverter } from './messages'; -import { AppRoomsConverter } from './rooms'; -import { AppSettingsConverter } from './settings'; -import { AppUsersConverter } from './users'; - -export { AppMessagesConverter, AppRoomsConverter, AppSettingsConverter, AppUsersConverter }; diff --git a/app/apps/server/converters/messages.js b/app/apps/server/converters/messages.js deleted file mode 100644 index 98ad0875dab0..000000000000 --- a/app/apps/server/converters/messages.js +++ /dev/null @@ -1,242 +0,0 @@ -import { Random } from 'meteor/random'; - -import { Messages, Rooms, Users } from '../../../models'; -import { transformMappedData } from '../../lib/misc/transformMappedData'; - -export class AppMessagesConverter { - constructor(orch) { - this.orch = orch; - } - - convertById(msgId) { - const msg = Messages.findOneById(msgId); - - return this.convertMessage(msg); - } - - convertMessage(msgObj) { - if (!msgObj) { - return undefined; - } - - const map = { - id: '_id', - threadId: 'tmid', - reactions: 'reactions', - parseUrls: 'parseUrls', - text: 'msg', - createdAt: 'ts', - updatedAt: '_updatedAt', - editedAt: 'editedAt', - emoji: 'emoji', - avatarUrl: 'avatar', - alias: 'alias', - file: 'file', - customFields: 'customFields', - groupable: 'groupable', - token: 'token', - blocks: 'blocks', - room: (message) => { - const result = this.orch.getConverters().get('rooms').convertById(message.rid); - delete message.rid; - return result; - }, - editor: (message) => { - const { editedBy } = message; - delete message.editedBy; - - if (!editedBy) { - return undefined; - } - - return this.orch.getConverters().get('users').convertById(editedBy._id); - }, - attachments: (message) => { - const result = this._convertAttachmentsToApp(message.attachments); - delete message.attachments; - return result; - }, - sender: (message) => { - if (!message.u || !message.u._id) { - return undefined; - } - - let user = this.orch.getConverters().get('users').convertById(message.u._id); - - // When the sender of the message is a Guest (livechat) and not a user - if (!user) { - user = this.orch.getConverters().get('users').convertToApp(message.u); - } - - delete message.u; - - return user; - }, - }; - - return transformMappedData(msgObj, map); - } - - convertAppMessage(message) { - if (!message || !message.room) { - return undefined; - } - - const room = Rooms.findOneById(message.room.id); - - if (!room) { - throw new Error('Invalid room provided on the message.'); - } - - let u; - if (message.sender && message.sender.id) { - const user = Users.findOneById(message.sender.id); - - if (user) { - u = { - _id: user._id, - username: user.username, - name: user.name, - }; - } else { - u = { - _id: message.sender.id, - username: message.sender.username, - name: message.sender.name, - }; - } - } - - let editedBy; - if (message.editor) { - const editor = Users.findOneById(message.editor.id); - editedBy = { - _id: editor._id, - username: editor.username, - }; - } - - const attachments = this._convertAppAttachments(message.attachments); - - const newMessage = { - _id: message.id || Random.id(), - tmid: message.threadId, - rid: room._id, - u, - msg: message.text, - ts: message.createdAt || new Date(), - _updatedAt: message.updatedAt || new Date(), - editedBy, - editedAt: message.editedAt, - emoji: message.emoji, - avatar: message.avatarUrl, - alias: message.alias, - customFields: message.customFields, - groupable: message.groupable, - attachments, - reactions: message.reactions, - parseUrls: message.parseUrls, - blocks: message.blocks, - token: message.token, - }; - - return Object.assign(newMessage, message._unmappedProperties_); - } - - _convertAppAttachments(attachments) { - if (typeof attachments === 'undefined' || !Array.isArray(attachments)) { - return undefined; - } - - return attachments.map((attachment) => - Object.assign( - { - collapsed: attachment.collapsed, - color: attachment.color, - text: attachment.text, - ts: attachment.timestamp ? attachment.timestamp.toJSON() : attachment.timestamp, - message_link: attachment.timestampLink, - thumb_url: attachment.thumbnailUrl, - author_name: attachment.author ? attachment.author.name : undefined, - author_link: attachment.author ? attachment.author.link : undefined, - author_icon: attachment.author ? attachment.author.icon : undefined, - title: attachment.title ? attachment.title.value : undefined, - title_link: attachment.title ? attachment.title.link : undefined, - title_link_download: attachment.title ? attachment.title.displayDownloadLink : undefined, - image_dimensions: attachment.imageDimensions, - image_preview: attachment.imagePreview, - image_url: attachment.imageUrl, - image_type: attachment.imageType, - image_size: attachment.imageSize, - audio_url: attachment.audioUrl, - audio_type: attachment.audioType, - audio_size: attachment.audioSize, - video_url: attachment.videoUrl, - video_type: attachment.videoType, - video_size: attachment.videoSize, - fields: attachment.fields, - button_alignment: attachment.actionButtonsAlignment, - actions: attachment.actions, - type: attachment.type, - description: attachment.description, - }, - attachment._unmappedProperties_, - ), - ); - } - - _convertAttachmentsToApp(attachments) { - if (typeof attachments === 'undefined' || !Array.isArray(attachments)) { - return undefined; - } - - const map = { - collapsed: 'collapsed', - color: 'color', - text: 'text', - timestampLink: 'message_link', - thumbnailUrl: 'thumb_url', - imageDimensions: 'image_dimensions', - imagePreview: 'image_preview', - imageUrl: 'image_url', - imageType: 'image_type', - imageSize: 'image_size', - audioUrl: 'audio_url', - audioType: 'audio_type', - audioSize: 'audio_size', - videoUrl: 'video_url', - videoType: 'video_type', - videoSize: 'video_size', - fields: 'fields', - actionButtonsAlignment: 'button_alignment', - actions: 'actions', - type: 'type', - description: 'description', - author: (attachment) => { - const { author_name: name, author_link: link, author_icon: icon } = attachment; - - delete attachment.author_name; - delete attachment.author_link; - delete attachment.author_icon; - - return { name, link, icon }; - }, - title: (attachment) => { - const { title: value, title_link: link, title_link_download: displayDownloadLink } = attachment; - - delete attachment.title; - delete attachment.title_link; - delete attachment.title_link_download; - - return { value, link, displayDownloadLink }; - }, - timestamp: (attachment) => { - const result = new Date(attachment.ts); - delete attachment.ts; - return result; - }, - }; - - return attachments.map((attachment) => transformMappedData(attachment, map)); - } -} diff --git a/app/apps/server/converters/rooms.js b/app/apps/server/converters/rooms.js deleted file mode 100644 index ecd2385557e0..000000000000 --- a/app/apps/server/converters/rooms.js +++ /dev/null @@ -1,240 +0,0 @@ -import { RoomType } from '@rocket.chat/apps-engine/definition/rooms'; - -import { Rooms, Users, LivechatVisitors, LivechatDepartment } from '../../../models'; -import { transformMappedData } from '../../lib/misc/transformMappedData'; - -export class AppRoomsConverter { - constructor(orch) { - this.orch = orch; - } - - convertById(roomId) { - const room = Rooms.findOneById(roomId); - - return this.convertRoom(room); - } - - convertByName(roomName) { - const room = Rooms.findOneByName(roomName); - - return this.convertRoom(room); - } - - convertAppRoom(room) { - if (!room) { - return undefined; - } - - let u; - if (room.creator) { - const creator = Users.findOneById(room.creator.id); - u = { - _id: creator._id, - username: creator.username, - }; - } - - let v; - if (room.visitor) { - const visitor = LivechatVisitors.findOneById(room.visitor.id); - v = { - _id: visitor._id, - username: visitor.username, - token: visitor.token, - }; - } - - let departmentId; - if (room.department) { - const department = LivechatDepartment.findOneById(room.department.id); - departmentId = department._id; - } - - let servedBy; - if (room.servedBy) { - const user = Users.findOneById(room.servedBy.id); - servedBy = { - _id: user._id, - username: user.username, - }; - } - - let closedBy; - if (room.closedBy) { - const user = Users.findOneById(room.closedBy.id); - closedBy = { - _id: user._id, - username: user.username, - }; - } - - const newRoom = { - ...(room.id && { _id: room.id }), - fname: room.displayName, - name: room.slugifiedName, - t: room.type, - u, - v, - departmentId, - servedBy, - closedBy, - members: room.members, - uids: room.userIds, - default: typeof room.isDefault === 'undefined' ? false : room.isDefault, - ro: typeof room.isReadOnly === 'undefined' ? false : room.isReadOnly, - sysMes: typeof room.displaySystemMessages === 'undefined' ? true : room.displaySystemMessages, - waitingResponse: typeof room.isWaitingResponse === 'undefined' ? undefined : !!room.isWaitingResponse, - open: typeof room.isOpen === 'undefined' ? undefined : !!room.isOpen, - msgs: room.messageCount || 0, - ts: room.createdAt, - _updatedAt: room.updatedAt, - closedAt: room.closedAt, - lm: room.lastModifiedAt, - customFields: room.customFields, - livechatData: room.livechatData, - prid: typeof room.parentRoom === 'undefined' ? undefined : room.parentRoom.id, - ...(room._USERNAMES && { _USERNAMES: room._USERNAMES }), - ...(room.source && { - source: { - ...room.source, - }, - }), - }; - - return Object.assign(newRoom, room._unmappedProperties_); - } - - convertRoom(room) { - if (!room) { - return undefined; - } - - const map = { - id: '_id', - displayName: 'fname', - slugifiedName: 'name', - members: 'members', - userIds: 'uids', - messageCount: 'msgs', - createdAt: 'ts', - updatedAt: '_updatedAt', - closedAt: 'closedAt', - lastModifiedAt: 'lm', - customFields: 'customFields', - livechatData: 'livechatData', - isWaitingResponse: 'waitingResponse', - isOpen: 'open', - _USERNAMES: '_USERNAMES', - description: 'description', - source: 'source', - isDefault: (room) => { - const result = !!room.default; - delete room.default; - return result; - }, - isReadOnly: (room) => { - const result = !!room.ro; - delete room.ro; - return result; - }, - displaySystemMessages: (room) => { - const { sysMes } = room; - - if (typeof sysMes === 'undefined') { - return true; - } - - delete room.sysMes; - return sysMes; - }, - type: (room) => { - const result = this._convertTypeToApp(room.t); - delete room.t; - return result; - }, - creator: (room) => { - const { u } = room; - - if (!u) { - return undefined; - } - - delete room.u; - - return this.orch.getConverters().get('users').convertById(u._id); - }, - visitor: (room) => { - const { v } = room; - - if (!v) { - return undefined; - } - - delete room.v; - - return this.orch.getConverters().get('visitors').convertById(v._id); - }, - department: (room) => { - const { departmentId } = room; - - if (!departmentId) { - return undefined; - } - - delete room.departmentId; - - return this.orch.getConverters().get('departments').convertById(departmentId); - }, - servedBy: (room) => { - const { servedBy } = room; - - if (!servedBy) { - return undefined; - } - - delete room.servedBy; - - return this.orch.getConverters().get('users').convertById(servedBy._id); - }, - responseBy: (room) => { - const { responseBy } = room; - - if (!responseBy) { - return undefined; - } - - delete room.responseBy; - - return this.orch.getConverters().get('users').convertById(responseBy._id); - }, - parentRoom: (room) => { - const { prid } = room; - - if (!prid) { - return undefined; - } - - delete room.prid; - - return this.orch.getConverters().get('rooms').convertById(prid); - }, - }; - - return transformMappedData(room, map); - } - - _convertTypeToApp(typeChar) { - switch (typeChar) { - case 'c': - return RoomType.CHANNEL; - case 'p': - return RoomType.PRIVATE_GROUP; - case 'd': - return RoomType.DIRECT_MESSAGE; - case 'l': - return RoomType.LIVE_CHAT; - default: - return typeChar; - } - } -} diff --git a/app/apps/server/converters/settings.js b/app/apps/server/converters/settings.js deleted file mode 100644 index bc5949bc7ccd..000000000000 --- a/app/apps/server/converters/settings.js +++ /dev/null @@ -1,53 +0,0 @@ -import { SettingType } from '@rocket.chat/apps-engine/definition/settings'; - -import { Settings } from '../../../models/server/raw'; - -export class AppSettingsConverter { - constructor(orch) { - this.orch = orch; - } - - async convertById(settingId) { - const setting = await Settings.findOneNotHiddenById(settingId); - - return this.convertToApp(setting); - } - - convertToApp(setting) { - return { - id: setting._id, - type: this._convertTypeToApp(setting.type), - packageValue: setting.packageValue, - values: setting.values, - value: setting.value, - public: setting.public, - hidden: setting.hidden, - group: setting.group, - i18nLabel: setting.i18nLabel, - i18nDescription: setting.i18nDescription, - createdAt: setting.ts, - updatedAt: setting._updatedAt, - }; - } - - _convertTypeToApp(type) { - switch (type) { - case 'boolean': - return SettingType.BOOLEAN; - case 'code': - return SettingType.CODE; - case 'color': - return SettingType.COLOR; - case 'font': - return SettingType.FONT; - case 'int': - return SettingType.NUMBER; - case 'select': - return SettingType.SELECT; - case 'string': - return SettingType.STRING; - default: - return type; - } - } -} diff --git a/app/apps/server/converters/uploads.js b/app/apps/server/converters/uploads.js deleted file mode 100644 index efbda7ae5fd1..000000000000 --- a/app/apps/server/converters/uploads.js +++ /dev/null @@ -1,97 +0,0 @@ -import { transformMappedData } from '../../lib/misc/transformMappedData'; -import { Uploads } from '../../../models/server/raw'; - -export class AppUploadsConverter { - constructor(orch) { - this.orch = orch; - } - - convertById(id) { - const upload = Promise.await(Uploads.findOneById(id)); - - return this.convertToApp(upload); - } - - convertToApp(upload) { - if (!upload) { - return undefined; - } - - const map = { - id: '_id', - name: 'name', - size: 'size', - type: 'type', - store: 'store', - description: 'description', - complete: 'complete', - uploading: 'uploading', - extension: 'extension', - progress: 'progress', - etag: 'etag', - path: 'path', - token: 'token', - url: 'url', - updatedAt: '_updatedAt', - uploadedAt: 'uploadedAt', - room: (upload) => { - const result = this.orch.getConverters().get('rooms').convertById(upload.rid); - delete upload.rid; - return result; - }, - user: (upload) => { - if (!upload.userId) { - return undefined; - } - - const result = this.orch.getConverters().get('users').convertById(upload.userId); - delete upload.userId; - return result; - }, - visitor: (upload) => { - if (!upload.visitorToken) { - return undefined; - } - - const result = this.orch.getConverters().get('visitors').convertByToken(upload.visitorToken); - delete upload.visitorToken; - return result; - }, - }; - - return transformMappedData(upload, map); - } - - convertToRocketChat(upload) { - if (!upload) { - return undefined; - } - - const { id: userId } = upload.user || {}; - const { token: visitorToken } = upload.visitor || {}; - const { id: rid } = upload.room; - - const newUpload = { - _id: upload.id, - name: upload.name, - size: upload.size, - type: upload.type, - extension: upload.extension, - description: upload.description, - store: upload.store, - etag: upload.etag, - complete: upload.complete, - uploading: upload.uploading, - progress: upload.progress, - token: upload.token, - url: upload.url, - _updatedAt: upload.updatedAt, - uploadedAt: upload.uploadedAt, - rid, - userId, - visitorToken, - }; - - return Object.assign(newUpload, upload._unmappedProperties_); - } -} diff --git a/app/apps/server/converters/users.js b/app/apps/server/converters/users.js deleted file mode 100644 index cadd96fbde7b..000000000000 --- a/app/apps/server/converters/users.js +++ /dev/null @@ -1,109 +0,0 @@ -import { UserStatusConnection, UserType } from '@rocket.chat/apps-engine/definition/users'; - -import { Users } from '../../../models'; - -export class AppUsersConverter { - constructor(orch) { - this.orch = orch; - } - - convertById(userId) { - const user = Users.findOneById(userId); - - return this.convertToApp(user); - } - - convertByUsername(username) { - const user = Users.findOneByUsername(username); - - return this.convertToApp(user); - } - - convertToApp(user) { - if (!user) { - return undefined; - } - - const type = this._convertUserTypeToEnum(user.type); - const statusConnection = this._convertStatusConnectionToEnum(user.username, user._id, user.statusConnection); - - return { - id: user._id, - username: user.username, - emails: user.emails, - type, - isEnabled: user.active, - name: user.name, - roles: user.roles, - status: user.status, - statusConnection, - utcOffset: user.utcOffset, - createdAt: user.createdAt, - updatedAt: user._updatedAt, - lastLoginAt: user.lastLogin, - appId: user.appId, - customFields: user.customFields, - }; - } - - convertToRocketChat(user) { - if (!user) { - return undefined; - } - - return { - _id: user.id, - username: user.username, - emails: user.emails, - type: user.type, - active: user.isEnabled, - name: user.name, - roles: user.roles, - status: user.status, - statusConnection: user.statusConnection, - utcOffset: user.utfOffset, - createdAt: user.createdAt, - _updatedAt: user.updatedAt, - lastLogin: user.lastLoginAt, - appId: user.appId, - }; - } - - _convertUserTypeToEnum(type) { - switch (type) { - case 'user': - return UserType.USER; - case 'bot': - return UserType.BOT; - case 'app': - return UserType.APP; - case '': - case undefined: - return UserType.UNKNOWN; - default: - console.warn(`A new user type has been added that the Apps don't know about? "${type}"`); - return type.toUpperCase(); - } - } - - _convertStatusConnectionToEnum(username, userId, status) { - switch (status) { - case 'offline': - return UserStatusConnection.OFFLINE; - case 'online': - return UserStatusConnection.ONLINE; - case 'away': - return UserStatusConnection.AWAY; - case 'busy': - return UserStatusConnection.BUSY; - case undefined: - // This is needed for Livechat guests and Rocket.Cat user. - return UserStatusConnection.UNDEFINED; - default: - console.warn( - `The user ${username} (${userId}) does not have a valid status (offline, online, away, or busy). It is currently: "${status}"`, - ); - return !status ? UserStatusConnection.OFFLINE : status.toUpperCase(); - } - } -} diff --git a/app/apps/server/converters/visitors.js b/app/apps/server/converters/visitors.js deleted file mode 100644 index 1f698cf41ee4..000000000000 --- a/app/apps/server/converters/visitors.js +++ /dev/null @@ -1,59 +0,0 @@ -import LivechatVisitors from '../../../models/server/models/LivechatVisitors'; -import { transformMappedData } from '../../lib/misc/transformMappedData'; - -export class AppVisitorsConverter { - constructor(orch) { - this.orch = orch; - } - - convertById(id) { - const visitor = LivechatVisitors.findOneById(id); - - return this.convertVisitor(visitor); - } - - convertByToken(token) { - const visitor = LivechatVisitors.getVisitorByToken(token); - - return this.convertVisitor(visitor); - } - - convertVisitor(visitor) { - if (!visitor) { - return undefined; - } - - const map = { - id: '_id', - username: 'username', - name: 'name', - department: 'department', - updatedAt: '_updatedAt', - token: 'token', - phone: 'phone', - visitorEmails: 'visitorEmails', - livechatData: 'livechatData', - }; - - return transformMappedData(visitor, map); - } - - convertAppVisitor(visitor) { - if (!visitor) { - return undefined; - } - - const newVisitor = { - _id: visitor.id, - username: visitor.username, - name: visitor.name, - token: visitor.token, - phone: visitor.phone, - livechatData: visitor.livechatData, - ...(visitor.visitorEmails && { visitorEmails: visitor.visitorEmails }), - ...(visitor.department && { department: visitor.department }), - }; - - return Object.assign(newVisitor, visitor._unmappedProperties_); - } -} diff --git a/app/apps/server/cron.js b/app/apps/server/cron.js deleted file mode 100644 index d70ba36d1e70..000000000000 --- a/app/apps/server/cron.js +++ /dev/null @@ -1,112 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { HTTP } from 'meteor/http'; -import { SyncedCron } from 'meteor/littledata:synced-cron'; -import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; -import { AppStatus } from '@rocket.chat/apps-engine/definition/AppStatus'; - -import { Apps } from './orchestrator'; -import { getWorkspaceAccessToken } from '../../cloud/server'; -import { Users } from '../../models/server'; -import { sendMessagesToAdmins } from '../../../server/lib/sendMessagesToAdmins'; -import { Settings } from '../../models/server/raw'; - -const notifyAdminsAboutInvalidApps = Meteor.bindEnvironment(function _notifyAdminsAboutInvalidApps(apps) { - if (!apps) { - return; - } - - const hasInvalidApps = !!apps.find((app) => app.getLatestLicenseValidationResult().hasErrors); - - if (!hasInvalidApps) { - return; - } - - const id = 'someAppInInvalidState'; - const title = 'Warning'; - const text = 'There is one or more apps in an invalid state. Click here to review.'; - const rocketCatMessage = 'There is one or more apps in an invalid state. Go to Administration > Apps to review.'; - const link = '/admin/apps'; - - Promise.await( - sendMessagesToAdmins({ - msgs: ({ adminUser }) => ({ - msg: `*${TAPi18n.__(title, adminUser.language)}*\n${TAPi18n.__(rocketCatMessage, adminUser.language)}`, - }), - banners: ({ adminUser }) => { - Users.removeBannerById(adminUser._id, { id }); - - return [ - { - id, - priority: 10, - title, - text, - modifiers: ['danger'], - link, - }, - ]; - }, - }), - ); - - return apps; -}); - -const notifyAdminsAboutRenewedApps = Meteor.bindEnvironment(function _notifyAdminsAboutRenewedApps(apps) { - if (!apps) { - return; - } - - const renewedApps = apps.filter( - (app) => app.getStatus() === AppStatus.DISABLED && app.getPreviousStatus() === AppStatus.INVALID_LICENSE_DISABLED, - ); - - if (renewedApps.length === 0) { - return; - } - - const rocketCatMessage = 'There is one or more disabled apps with valid licenses. Go to Administration > Apps to review.'; - - Promise.await( - sendMessagesToAdmins({ - msgs: ({ adminUser }) => ({ msg: `${TAPi18n.__(rocketCatMessage, adminUser.language)}` }), - }), - ); -}); - -export const appsUpdateMarketplaceInfo = Meteor.bindEnvironment(function _appsUpdateMarketplaceInfo() { - const token = Promise.await(getWorkspaceAccessToken()); - const baseUrl = Apps.getMarketplaceUrl(); - const workspaceIdSetting = Promise.await(Settings.getValueById('Cloud_Workspace_Id')); - - const currentSeats = Users.getActiveLocalUserCount(); - - const fullUrl = `${baseUrl}/v1/workspaces/${workspaceIdSetting}/apps?seats=${currentSeats}`; - const options = { - headers: { - Authorization: `Bearer ${token}`, - }, - }; - - let data = []; - - try { - const result = HTTP.get(fullUrl, options); - - if (Array.isArray(result.data)) { - data = result.data; - } - } catch (err) { - Apps.debugLog(err); - } - - Promise.await(Apps.updateAppsMarketplaceInfo(data).then(notifyAdminsAboutInvalidApps).then(notifyAdminsAboutRenewedApps)); -}); - -SyncedCron.add({ - name: 'Apps-Engine:check', - schedule: (parser) => parser.text('at 4:00 am'), - job() { - appsUpdateMarketplaceInfo(); - }, -}); diff --git a/app/apps/server/index.js b/app/apps/server/index.js deleted file mode 100644 index ad3096af3158..000000000000 --- a/app/apps/server/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import './cron'; - -export { Apps, AppEvents } from './orchestrator'; diff --git a/app/apps/server/orchestrator.js b/app/apps/server/orchestrator.js deleted file mode 100644 index 85a46fdc4a16..000000000000 --- a/app/apps/server/orchestrator.js +++ /dev/null @@ -1,338 +0,0 @@ -import { EssentialAppDisabledException } from '@rocket.chat/apps-engine/definition/exceptions'; -import { AppInterface } from '@rocket.chat/apps-engine/definition/metadata'; -import { AppManager } from '@rocket.chat/apps-engine/server/AppManager'; -import { Meteor } from 'meteor/meteor'; - -import { Logger } from '../../../server/lib/logger/Logger'; -import { AppsLogsModel, AppsModel, AppsPersistenceModel } from '../../models/server'; -import { settings, settingsRegistry } from '../../settings/server'; -import { RealAppBridges } from './bridges'; -import { AppMethods, AppServerNotifier, AppsRestApi, AppUIKitInteractionApi } from './communication'; -import { AppMessagesConverter, AppRoomsConverter, AppSettingsConverter, AppUsersConverter } from './converters'; -import { AppDepartmentsConverter } from './converters/departments'; -import { AppUploadsConverter } from './converters/uploads'; -import { AppVisitorsConverter } from './converters/visitors'; -import { AppRealLogsStorage, AppRealStorage, ConfigurableAppSourceStorage } from './storage'; - -function isTesting() { - return process.env.TEST_MODE === 'true'; -} - -let appsSourceStorageType; -let appsSourceStorageFilesystemPath; - -export class AppServerOrchestrator { - constructor() { - this._isInitialized = false; - } - - initialize() { - if (this._isInitialized) { - return; - } - - this._rocketchatLogger = new Logger('Rocket.Chat Apps'); - - if (typeof process.env.OVERWRITE_INTERNAL_MARKETPLACE_URL === 'string' && process.env.OVERWRITE_INTERNAL_MARKETPLACE_URL !== '') { - this._marketplaceUrl = process.env.OVERWRITE_INTERNAL_MARKETPLACE_URL; - } else { - this._marketplaceUrl = 'https://marketplace.rocket.chat'; - } - - this._model = new AppsModel(); - this._logModel = new AppsLogsModel(); - this._persistModel = new AppsPersistenceModel(); - this._storage = new AppRealStorage(this._model); - this._logStorage = new AppRealLogsStorage(this._logModel); - this._appSourceStorage = new ConfigurableAppSourceStorage(appsSourceStorageType, appsSourceStorageFilesystemPath); - - this._converters = new Map(); - this._converters.set('messages', new AppMessagesConverter(this)); - this._converters.set('rooms', new AppRoomsConverter(this)); - this._converters.set('settings', new AppSettingsConverter(this)); - this._converters.set('users', new AppUsersConverter(this)); - this._converters.set('visitors', new AppVisitorsConverter(this)); - this._converters.set('departments', new AppDepartmentsConverter(this)); - this._converters.set('uploads', new AppUploadsConverter(this)); - - this._bridges = new RealAppBridges(this); - - this._manager = new AppManager({ - metadataStorage: this._storage, - logStorage: this._logStorage, - bridges: this._bridges, - sourceStorage: this._appSourceStorage, - }); - - this._communicators = new Map(); - this._communicators.set('methods', new AppMethods(this)); - this._communicators.set('notifier', new AppServerNotifier(this)); - this._communicators.set('restapi', new AppsRestApi(this, this._manager)); - this._communicators.set('uikit', new AppUIKitInteractionApi(this)); - - this._isInitialized = true; - } - - getModel() { - return this._model; - } - - /** - * @returns {AppsPersistenceModel} - */ - getPersistenceModel() { - return this._persistModel; - } - - getStorage() { - return this._storage; - } - - getLogStorage() { - return this._logStorage; - } - - getConverters() { - return this._converters; - } - - getBridges() { - return this._bridges; - } - - getNotifier() { - return this._communicators.get('notifier'); - } - - getManager() { - return this._manager; - } - - getProvidedComponents() { - return this._manager.getExternalComponentManager().getProvidedComponents(); - } - - getAppSourceStorage() { - return this._appSourceStorage; - } - - isInitialized() { - return this._isInitialized; - } - - isEnabled() { - return settings.get('Apps_Framework_enabled'); - } - - isLoaded() { - return this.getManager().areAppsLoaded(); - } - - isDebugging() { - return settings.get('Apps_Framework_Development_Mode') && !isTesting(); - } - - /** - * @returns {Logger} - */ - getRocketChatLogger() { - return this._rocketchatLogger; - } - - debugLog(...args) { - if (this.isDebugging()) { - this.getRocketChatLogger().debug(...args); - } - } - - getMarketplaceUrl() { - return this._marketplaceUrl; - } - - async load() { - // Don't try to load it again if it has - // already been loaded - if (this.isLoaded()) { - return; - } - - return this._manager - .load() - .then((affs) => console.log(`Loaded the Apps Framework and loaded a total of ${affs.length} Apps!`)) - .catch((err) => console.warn('Failed to load the Apps Framework and Apps!', err)) - .then(() => this.getBridges().getSchedulerBridge().startScheduler()); - } - - async unload() { - // Don't try to unload it if it's already been - // unlaoded or wasn't unloaded to start with - if (!this.isLoaded()) { - return; - } - - return this._manager - .unload() - .then(() => console.log('Unloaded the Apps Framework.')) - .catch((err) => console.warn('Failed to unload the Apps Framework!', err)); - } - - async updateAppsMarketplaceInfo(apps = []) { - if (!this.isLoaded()) { - return; - } - - return this._manager.updateAppsMarketplaceInfo(apps).then(() => this._manager.get()); - } - - async triggerEvent(event, ...payload) { - if (!this.isLoaded()) { - return; - } - - return this.getBridges() - .getListenerBridge() - .handleEvent(event, ...payload) - .catch((error) => { - if (error instanceof EssentialAppDisabledException) { - throw new Meteor.Error('error-essential-app-disabled'); - } - - throw error; - }); - } -} - -export const AppEvents = AppInterface; -export const Apps = new AppServerOrchestrator(); - -settingsRegistry.addGroup('General', function () { - this.section('Apps', function () { - this.add('Apps_Logs_TTL', '30_days', { - type: 'select', - values: [ - { - key: '7_days', - i18nLabel: 'Apps_Logs_TTL_7days', - }, - { - key: '14_days', - i18nLabel: 'Apps_Logs_TTL_14days', - }, - { - key: '30_days', - i18nLabel: 'Apps_Logs_TTL_30days', - }, - ], - public: true, - hidden: false, - alert: 'Apps_Logs_TTL_Alert', - }); - - this.add('Apps_Framework_enabled', true, { - type: 'boolean', - hidden: false, - }); - - this.add('Apps_Framework_Development_Mode', false, { - type: 'boolean', - enableQuery: { - _id: 'Apps_Framework_enabled', - value: true, - }, - public: true, - hidden: false, - }); - - this.add('Apps_Framework_Source_Package_Storage_Type', 'gridfs', { - type: 'select', - values: [ - { - key: 'gridfs', - i18nLabel: 'GridFS', - }, - { - key: 'filesystem', - i18nLabel: 'FileSystem', - }, - ], - public: true, - hidden: false, - alert: 'Apps_Framework_Source_Package_Storage_Type_Alert', - }); - - this.add('Apps_Framework_Source_Package_Storage_FileSystem_Path', '', { - type: 'string', - public: true, - enableQuery: { - _id: 'Apps_Framework_Source_Package_Storage_Type', - value: 'filesystem', - }, - alert: 'Apps_Framework_Source_Package_Storage_FileSystem_Alert', - }); - }); -}); - -settings.watch('Apps_Framework_Source_Package_Storage_Type', (value) => { - if (!Apps.isInitialized()) { - appsSourceStorageType = value; - } else { - Apps.getAppSourceStorage().setStorage(value); - } -}); - -settings.watch('Apps_Framework_Source_Package_Storage_FileSystem_Path', (value) => { - if (!Apps.isInitialized()) { - appsSourceStorageFilesystemPath = value; - } else { - Apps.getAppSourceStorage().setFileSystemStoragePath(value); - } -}); - -settings.watch('Apps_Framework_enabled', (isEnabled) => { - // In case this gets called before `Meteor.startup` - if (!Apps.isInitialized()) { - return; - } - - if (isEnabled) { - Apps.load(); - } else { - Apps.unload(); - } -}); - -settings.watch('Apps_Logs_TTL', (value) => { - if (!Apps.isInitialized()) { - return; - } - - let expireAfterSeconds = 0; - - switch (value) { - case '7_days': - expireAfterSeconds = 604800; - break; - case '14_days': - expireAfterSeconds = 1209600; - break; - case '30_days': - expireAfterSeconds = 2592000; - break; - } - - if (!expireAfterSeconds) { - return; - } - - const model = Apps._logModel; - - model.resetTTLIndex(expireAfterSeconds); -}); - -Meteor.startup(function _appServerOrchestrator() { - Apps.initialize(); - - if (Apps.isEnabled()) { - Apps.load(); - } -}); diff --git a/app/assets/server/assets.js b/app/assets/server/assets.js deleted file mode 100644 index 79ced079ea60..000000000000 --- a/app/assets/server/assets.js +++ /dev/null @@ -1,525 +0,0 @@ -import crypto from 'crypto'; - -import { Meteor } from 'meteor/meteor'; -import { WebApp, WebAppInternals } from 'meteor/webapp'; -import { WebAppHashing } from 'meteor/webapp-hashing'; -import _ from 'underscore'; -import sizeOf from 'image-size'; -import sharp from 'sharp'; - -import { settings, settingsRegistry } from '../../settings/server'; -import { getURL } from '../../utils/lib/getURL'; -import { mime } from '../../utils/lib/mimeTypes'; -import { hasPermission } from '../../authorization'; -import { RocketChatFile } from '../../file'; -import { Settings } from '../../models/server'; - -const RocketChatAssetsInstance = new RocketChatFile.GridFS({ - name: 'assets', -}); - -const assets = { - logo: { - label: 'logo (svg, png, jpg)', - defaultUrl: 'images/logo/logo.svg', - constraints: { - type: 'image', - extensions: ['svg', 'png', 'jpg', 'jpeg'], - }, - wizard: { - step: 3, - order: 2, - }, - }, - background: { - label: 'login background (svg, png, jpg)', - constraints: { - type: 'image', - extensions: ['svg', 'png', 'jpg', 'jpeg'], - }, - }, - favicon_ico: { - label: 'favicon (ico)', - defaultUrl: 'favicon.ico', - constraints: { - type: 'image', - extensions: ['ico'], - }, - }, - favicon: { - label: 'favicon (svg)', - defaultUrl: 'images/logo/icon.svg', - constraints: { - type: 'image', - extensions: ['svg'], - }, - }, - favicon_16: { - label: 'favicon 16x16 (png)', - defaultUrl: 'images/logo/favicon-16x16.png', - constraints: { - type: 'image', - extensions: ['png'], - width: 16, - height: 16, - }, - }, - favicon_32: { - label: 'favicon 32x32 (png)', - defaultUrl: 'images/logo/favicon-32x32.png', - constraints: { - type: 'image', - extensions: ['png'], - width: 32, - height: 32, - }, - }, - favicon_192: { - label: 'android-chrome 192x192 (png)', - defaultUrl: 'images/logo/android-chrome-192x192.png', - constraints: { - type: 'image', - extensions: ['png'], - width: 192, - height: 192, - }, - }, - favicon_512: { - label: 'android-chrome 512x512 (png)', - defaultUrl: 'images/logo/android-chrome-512x512.png', - constraints: { - type: 'image', - extensions: ['png'], - width: 512, - height: 512, - }, - }, - touchicon_180: { - label: 'apple-touch-icon 180x180 (png)', - defaultUrl: 'images/logo/apple-touch-icon.png', - constraints: { - type: 'image', - extensions: ['png'], - width: 180, - height: 180, - }, - }, - touchicon_180_pre: { - label: 'apple-touch-icon-precomposed 180x180 (png)', - defaultUrl: 'images/logo/apple-touch-icon-precomposed.png', - constraints: { - type: 'image', - extensions: ['png'], - width: 180, - height: 180, - }, - }, - tile_70: { - label: 'mstile 70x70 (png)', - defaultUrl: 'images/logo/mstile-70x70.png', - constraints: { - type: 'image', - extensions: ['png'], - width: 70, - height: 70, - }, - }, - tile_144: { - label: 'mstile 144x144 (png)', - defaultUrl: 'images/logo/mstile-144x144.png', - constraints: { - type: 'image', - extensions: ['png'], - width: 144, - height: 144, - }, - }, - tile_150: { - label: 'mstile 150x150 (png)', - defaultUrl: 'images/logo/mstile-150x150.png', - constraints: { - type: 'image', - extensions: ['png'], - width: 150, - height: 150, - }, - }, - tile_310_square: { - label: 'mstile 310x310 (png)', - defaultUrl: 'images/logo/mstile-310x310.png', - constraints: { - type: 'image', - extensions: ['png'], - width: 310, - height: 310, - }, - }, - tile_310_wide: { - label: 'mstile 310x150 (png)', - defaultUrl: 'images/logo/mstile-310x150.png', - constraints: { - type: 'image', - extensions: ['png'], - width: 310, - height: 150, - }, - }, - safari_pinned: { - label: 'safari pinned tab (svg)', - defaultUrl: 'images/logo/safari-pinned-tab.svg', - constraints: { - type: 'image', - extensions: ['svg'], - }, - }, -}; - -export const RocketChatAssets = new (class { - get mime() { - return mime; - } - - get assets() { - return assets; - } - - setAsset(binaryContent, contentType, asset) { - if (!assets[asset]) { - throw new Meteor.Error('error-invalid-asset', 'Invalid asset', { - function: 'RocketChat.Assets.setAsset', - }); - } - - const extension = mime.extension(contentType); - if (assets[asset].constraints.extensions.includes(extension) === false) { - throw new Meteor.Error(contentType, `Invalid file type: ${contentType}`, { - function: 'RocketChat.Assets.setAsset', - errorTitle: 'error-invalid-file-type', - }); - } - - const file = Buffer.from(binaryContent, 'binary'); - if (assets[asset].constraints.width || assets[asset].constraints.height) { - const dimensions = sizeOf(file); - if (assets[asset].constraints.width && assets[asset].constraints.width !== dimensions.width) { - throw new Meteor.Error('error-invalid-file-width', 'Invalid file width', { - function: 'Invalid file width', - }); - } - if (assets[asset].constraints.height && assets[asset].constraints.height !== dimensions.height) { - throw new Meteor.Error('error-invalid-file-height'); - } - } - - const rs = RocketChatFile.bufferToStream(file); - RocketChatAssetsInstance.deleteFile(asset); - - const ws = RocketChatAssetsInstance.createWriteStream(asset, contentType); - ws.on( - 'end', - Meteor.bindEnvironment(function () { - return Meteor.setTimeout(function () { - const key = `Assets_${asset}`; - const value = { - url: `assets/${asset}.${extension}`, - defaultUrl: assets[asset].defaultUrl, - }; - - Settings.updateValueById(key, value); - return RocketChatAssets.processAsset(key, value); - }, 200); - }), - ); - - rs.pipe(ws); - } - - unsetAsset(asset) { - if (!assets[asset]) { - throw new Meteor.Error('error-invalid-asset', 'Invalid asset', { - function: 'RocketChat.Assets.unsetAsset', - }); - } - - RocketChatAssetsInstance.deleteFile(asset); - const key = `Assets_${asset}`; - const value = { - defaultUrl: assets[asset].defaultUrl, - }; - - Settings.updateValueById(key, value); - RocketChatAssets.processAsset(key, value); - } - - refreshClients() { - return process.emit('message', { - refresh: 'client', - }); - } - - processAsset(settingKey, settingValue) { - if (settingKey.indexOf('Assets_') !== 0) { - return; - } - - const assetKey = settingKey.replace(/^Assets_/, ''); - const assetValue = assets[assetKey]; - - if (!assetValue) { - return; - } - - if (!settingValue || !settingValue.url) { - assetValue.cache = undefined; - return; - } - - const file = RocketChatAssetsInstance.getFileSync(assetKey); - if (!file) { - assetValue.cache = undefined; - return; - } - - const hash = crypto.createHash('sha1').update(file.buffer).digest('hex'); - const extension = settingValue.url.split('.').pop(); - - assetValue.cache = { - path: `assets/${assetKey}.${extension}`, - cacheable: false, - sourceMapUrl: undefined, - where: 'client', - type: 'asset', - content: file.buffer, - extension, - url: `/assets/${assetKey}.${extension}?${hash}`, - size: file.length, - uploadDate: file.uploadDate, - contentType: file.contentType, - hash, - }; - - return assetValue.cache; - } - - getURL(assetName, options = { cdn: false, full: true }) { - const asset = settings.get(assetName); - const url = asset.url || asset.defaultUrl; - - return getURL(url, options); - } -})(); - -settingsRegistry.addGroup('Assets'); - -settingsRegistry.add('Assets_SvgFavicon_Enable', true, { - type: 'boolean', - group: 'Assets', - i18nLabel: 'Enable_Svg_Favicon', -}); - -function addAssetToSetting(asset, value) { - const key = `Assets_${asset}`; - - settingsRegistry.add( - key, - { - defaultUrl: value.defaultUrl, - }, - { - type: 'asset', - group: 'Assets', - fileConstraints: value.constraints, - i18nLabel: value.label, - asset, - public: true, - wizard: value.wizard, - }, - ); - - const currentValue = settings.get(key); - - if (typeof currentValue === 'object' && currentValue.defaultUrl !== assets[asset].defaultUrl) { - currentValue.defaultUrl = assets[asset].defaultUrl; - Settings.updateValueById(key, currentValue); - } -} - -for (const key of Object.keys(assets)) { - const value = assets[key]; - addAssetToSetting(key, value); -} - -settings.watchByRegex(/^Assets_/, (key, value) => RocketChatAssets.processAsset(key, value)); - -Meteor.startup(function () { - return Meteor.setTimeout(function () { - return process.emit('message', { - refresh: 'client', - }); - }, 200); -}); - -const { calculateClientHash } = WebAppHashing; - -WebAppHashing.calculateClientHash = function (manifest, includeFilter, runtimeConfigOverride) { - for (const key of Object.keys(assets)) { - const value = assets[key]; - if (!value.cache && !value.defaultUrl) { - continue; - } - - let cache = {}; - if (value.cache) { - cache = { - path: value.cache.path, - cacheable: value.cache.cacheable, - sourceMapUrl: value.cache.sourceMapUrl, - where: value.cache.where, - type: value.cache.type, - url: value.cache.url, - size: value.cache.size, - hash: value.cache.hash, - }; - } else { - const extension = value.defaultUrl.split('.').pop(); - cache = { - path: `assets/${key}.${extension}`, - cacheable: false, - sourceMapUrl: undefined, - where: 'client', - type: 'asset', - url: `/assets/${key}.${extension}?v3`, - hash: 'v3', - }; - } - - const manifestItem = _.findWhere(manifest, { - path: key, - }); - - if (manifestItem) { - const index = manifest.indexOf(manifestItem); - manifest[index] = cache; - } else { - manifest.push(cache); - } - } - - return calculateClientHash.call(this, manifest, includeFilter, runtimeConfigOverride); -}; - -Meteor.methods({ - refreshClients() { - if (!Meteor.userId()) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { - method: 'refreshClients', - }); - } - - const _hasPermission = hasPermission(Meteor.userId(), 'manage-assets'); - if (!_hasPermission) { - throw new Meteor.Error('error-action-not-allowed', 'Managing assets not allowed', { - method: 'refreshClients', - action: 'Managing_assets', - }); - } - - return RocketChatAssets.refreshClients(); - }, - - unsetAsset(asset) { - if (!Meteor.userId()) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { - method: 'unsetAsset', - }); - } - - const _hasPermission = hasPermission(Meteor.userId(), 'manage-assets'); - if (!_hasPermission) { - throw new Meteor.Error('error-action-not-allowed', 'Managing assets not allowed', { - method: 'unsetAsset', - action: 'Managing_assets', - }); - } - - return RocketChatAssets.unsetAsset(asset); - }, - - setAsset(binaryContent, contentType, asset) { - if (!Meteor.userId()) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { - method: 'setAsset', - }); - } - - const _hasPermission = hasPermission(Meteor.userId(), 'manage-assets'); - if (!_hasPermission) { - throw new Meteor.Error('error-action-not-allowed', 'Managing assets not allowed', { - method: 'setAsset', - action: 'Managing_assets', - }); - } - - RocketChatAssets.setAsset(binaryContent, contentType, asset); - }, -}); - -WebApp.connectHandlers.use( - '/assets/', - Meteor.bindEnvironment(function (req, res, next) { - const params = { - asset: decodeURIComponent(req.url.replace(/^\//, '').replace(/\?.*$/, '')).replace(/\.[^.]*$/, ''), - }; - - const file = assets[params.asset] && assets[params.asset].cache; - - const format = req.url.replace(/.*\.([a-z]+)(?:$|\?.*)/i, '$1'); - - if ( - assets[params.asset] && - Array.isArray(assets[params.asset].constraints.extensions) && - !assets[params.asset].constraints.extensions.includes(format) - ) { - res.writeHead(403); - return res.end(); - } - if (!file) { - const defaultUrl = assets[params.asset] && assets[params.asset].defaultUrl; - if (defaultUrl) { - const assetUrl = format && ['png', 'svg'].includes(format) ? defaultUrl.replace(/(svg|png)$/, format) : defaultUrl; - req.url = `/${assetUrl}`; - WebAppInternals.staticFilesMiddleware(WebAppInternals.staticFilesByArch, req, res, next); - } else { - res.writeHead(404); - res.end(); - } - - return; - } - - const reqModifiedHeader = req.headers['if-modified-since']; - if (reqModifiedHeader) { - if (reqModifiedHeader === (file.uploadDate && file.uploadDate.toUTCString())) { - res.setHeader('Last-Modified', reqModifiedHeader); - res.writeHead(304); - res.end(); - return; - } - } - - res.setHeader('Cache-Control', 'public, max-age=0'); - res.setHeader('Expires', '-1'); - - if (format && format !== file.extension && ['png', 'jpg', 'jpeg'].includes(format)) { - res.setHeader('Content-Type', `image/${format}`); - sharp(file.content).toFormat(format).pipe(res); - return; - } - - res.setHeader('Last-Modified', (file.uploadDate && file.uploadDate.toUTCString()) || new Date().toUTCString()); - res.setHeader('Content-Type', file.contentType); - res.setHeader('Content-Length', file.size); - res.writeHead(200); - res.end(file.content); - }), -); diff --git a/app/authentication/server/ILoginAttempt.ts b/app/authentication/server/ILoginAttempt.ts deleted file mode 100644 index 7f0351010c0d..000000000000 --- a/app/authentication/server/ILoginAttempt.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { IUser } from '../../../definition/IUser'; -import { IMethodConnection } from '../../../definition/IMethodThisType'; - -interface IMethodArgument { - user?: { username: string }; - password?: { - digest: string; - algorithm: string; - }; - resume?: string; -} - -export interface ILoginAttempt { - type: string; - allowed: boolean; - methodName: string; - methodArguments: IMethodArgument[]; - connection: IMethodConnection; - user?: IUser; -} diff --git a/app/authentication/server/startup/index.js b/app/authentication/server/startup/index.js deleted file mode 100644 index eb0ed5415673..000000000000 --- a/app/authentication/server/startup/index.js +++ /dev/null @@ -1,421 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Match } from 'meteor/check'; -import { Accounts } from 'meteor/accounts-base'; -import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; -import _ from 'underscore'; -import { escapeRegExp, escapeHTML } from '@rocket.chat/string-helpers'; - -import * as Mailer from '../../../mailer/server/api'; -import { settings } from '../../../settings/server'; -import { callbacks } from '../../../../lib/callbacks'; -import { Users, Settings } from '../../../models/server'; -import { Roles, Users as UsersRaw } from '../../../models/server/raw'; -import { addUserRoles } from '../../../authorization/server'; -import { getAvatarSuggestionForUser } from '../../../lib/server/functions/getAvatarSuggestionForUser'; -import { isValidAttemptByUser, isValidLoginAttemptByIp } from '../lib/restrictLoginAttempts'; -import './settings'; -import { getClientAddress } from '../../../../server/lib/getClientAddress'; -import { getNewUserRoles } from '../../../../server/services/user/lib/getNewUserRoles'; - -Accounts.config({ - forbidClientAccountCreation: true, -}); - -Meteor.startup(() => { - settings.watchMultiple(['Accounts_LoginExpiration', 'Site_Name', 'From_Email'], () => { - Accounts._options.loginExpirationInDays = settings.get('Accounts_LoginExpiration'); - - Accounts.emailTemplates.siteName = settings.get('Site_Name'); - - Accounts.emailTemplates.from = `${settings.get('Site_Name')} <${settings.get('From_Email')}>`; - }); -}); - -Accounts.emailTemplates.userToActivate = { - subject() { - const subject = TAPi18n.__('Accounts_Admin_Email_Approval_Needed_Subject_Default'); - const siteName = settings.get('Site_Name'); - - return `[${siteName}] ${subject}`; - }, - - html(options = {}) { - const email = options.reason - ? 'Accounts_Admin_Email_Approval_Needed_With_Reason_Default' - : 'Accounts_Admin_Email_Approval_Needed_Default'; - - return Mailer.replace(TAPi18n.__(email), { - name: escapeHTML(options.name), - email: escapeHTML(options.email), - reason: escapeHTML(options.reason), - }); - }, -}; - -Accounts.emailTemplates.userActivated = { - subject({ active, username }) { - const activated = username ? 'Activated' : 'Approved'; - const action = active ? activated : 'Deactivated'; - const subject = `Accounts_Email_${action}_Subject`; - const siteName = settings.get('Site_Name'); - - return `[${siteName}] ${TAPi18n.__(subject)}`; - }, - - html({ active, name, username }) { - const activated = username ? 'Activated' : 'Approved'; - const action = active ? activated : 'Deactivated'; - - return Mailer.replace(TAPi18n.__(`Accounts_Email_${action}`), { - name: escapeHTML(name), - }); - }, -}; - -let verifyEmailTemplate = ''; -let enrollAccountTemplate = ''; -let resetPasswordTemplate = ''; -Meteor.startup(() => { - Mailer.getTemplateWrapped('Verification_Email', (value) => { - verifyEmailTemplate = value; - }); - Mailer.getTemplateWrapped('Accounts_Enrollment_Email', (value) => { - enrollAccountTemplate = value; - }); - Mailer.getTemplateWrapped('Forgot_Password_Email', (value) => { - resetPasswordTemplate = value; - }); -}); - -Accounts.emailTemplates.verifyEmail.html = function (userModel, url) { - return Mailer.replace(verifyEmailTemplate, { Verification_Url: url, name: userModel.name }); -}; - -Accounts.emailTemplates.verifyEmail.subject = function () { - const subject = settings.get('Verification_Email_Subject'); - return Mailer.replace(subject || ''); -}; - -Accounts.urls.resetPassword = function (token) { - return Meteor.absoluteUrl(`reset-password/${token}`); -}; - -Accounts.emailTemplates.resetPassword.subject = function (userModel) { - return Mailer.replace(settings.get('Forgot_Password_Email_Subject') || '', { - name: userModel.name, - }); -}; - -Accounts.emailTemplates.resetPassword.html = function (userModel, url) { - return Mailer.replacekey( - Mailer.replace(resetPasswordTemplate, { - name: userModel.name, - }), - 'Forgot_Password_Url', - url, - ); -}; - -Accounts.emailTemplates.enrollAccount.subject = function (user) { - const subject = settings.get('Accounts_Enrollment_Email_Subject'); - return Mailer.replace(subject, user); -}; - -Accounts.emailTemplates.enrollAccount.html = function (user = {} /* , url*/) { - return Mailer.replace(enrollAccountTemplate, { - name: escapeHTML(user.name), - email: user.emails && user.emails[0] && escapeHTML(user.emails[0].address), - }); -}; - -const getLinkedInName = ({ firstName, lastName }) => { - const { preferredLocale, localized: firstNameLocalized } = firstName; - const { localized: lastNameLocalized } = lastName; - - // LinkedIn new format - if (preferredLocale && firstNameLocalized && preferredLocale.language && preferredLocale.country) { - const locale = `${preferredLocale.language}_${preferredLocale.country}`; - - if (firstNameLocalized[locale] && lastNameLocalized[locale]) { - return `${firstNameLocalized[locale]} ${lastNameLocalized[locale]}`; - } - if (firstNameLocalized[locale]) { - return firstNameLocalized[locale]; - } - } - - // LinkedIn old format - if (!lastName) { - return firstName; - } - return `${firstName} ${lastName}`; -}; - -Accounts.onCreateUser(function (options, user = {}) { - callbacks.run('beforeCreateUser', options, user); - - user.status = 'offline'; - user.active = user.active !== undefined ? user.active : !settings.get('Accounts_ManuallyApproveNewUsers'); - - if (!user.name) { - if (options.profile) { - if (options.profile.name) { - user.name = options.profile.name; - } else if (options.profile.firstName) { - // LinkedIn format - user.name = getLinkedInName(options.profile); - } - } - } - - if (user.services) { - const verified = settings.get('Accounts_Verify_Email_For_External_Accounts'); - - for (const service of Object.values(user.services)) { - if (!user.name) { - user.name = service.name || service.username; - } - - if (!user.emails && service.email) { - user.emails = [ - { - address: service.email, - verified, - }, - ]; - } - } - } - - if (!user.active) { - const destinations = []; - const usersInRole = Promise.await(Roles.findUsersInRole('admin')); - Promise.await(usersInRole.toArray()).forEach((adminUser) => { - if (Array.isArray(adminUser.emails)) { - adminUser.emails.forEach((email) => { - destinations.push(`${adminUser.name}<${email.address}>`); - }); - } - }); - - const email = { - to: destinations, - from: settings.get('From_Email'), - subject: Accounts.emailTemplates.userToActivate.subject(), - html: Accounts.emailTemplates.userToActivate.html(options), - }; - - Mailer.send(email); - } - - callbacks.run('onCreateUser', options, user); - return user; -}); - -Accounts.insertUserDoc = _.wrap(Accounts.insertUserDoc, function (insertUserDoc, options, user) { - const noRoles = !user?.hasOwnProperty('globalRoles'); - - const globalRoles = []; - - if (Match.test(user.globalRoles, [String]) && user.globalRoles.length > 0) { - globalRoles.push(...user.globalRoles); - } - - delete user.globalRoles; - - if (user.services && !user.services.password) { - const defaultAuthServiceRoles = String(settings.get('Accounts_Registration_AuthenticationServices_Default_Roles')).split(','); - if (defaultAuthServiceRoles.length > 0) { - globalRoles.push(...defaultAuthServiceRoles.map((s) => s.trim())); - } - } - - const roles = getNewUserRoles(globalRoles); - - if (!user.type) { - user.type = 'user'; - } - - if (settings.get('Accounts_TwoFactorAuthentication_By_Email_Auto_Opt_In')) { - user.services = user.services || {}; - user.services.email2fa = { - enabled: true, - changedAt: new Date(), - }; - } - - const _id = insertUserDoc.call(Accounts, options, user); - - user = Meteor.users.findOne({ - _id, - }); - - if (user.username) { - if (options.joinDefaultChannels !== false && user.joinDefaultChannels !== false) { - Meteor.runAsUser(_id, function () { - return Meteor.call('joinDefaultChannels', options.joinDefaultChannelsSilenced); - }); - } - - if (user.type !== 'visitor') { - Meteor.defer(function () { - return callbacks.run('afterCreateUser', user); - }); - } - if (settings.get('Accounts_SetDefaultAvatar') === true) { - const avatarSuggestions = Promise.await(getAvatarSuggestionForUser(user)); - Object.keys(avatarSuggestions).some((service) => { - const avatarData = avatarSuggestions[service]; - if (service !== 'gravatar') { - Meteor.runAsUser(_id, function () { - return Meteor.call('setAvatarFromService', avatarData.blob, '', service); - }); - return true; - } - - return false; - }); - } - } - - if (noRoles || roles.length === 0) { - const hasAdmin = Users.findOne( - { - roles: 'admin', - type: 'user', - }, - { - fields: { - _id: 1, - }, - }, - ); - - if (hasAdmin) { - roles.push('user'); - } else { - roles.push('admin'); - if (settings.get('Show_Setup_Wizard') === 'pending') { - Settings.updateValueById('Show_Setup_Wizard', 'in_progress'); - } - } - } - - addUserRoles(_id, roles); - - return _id; -}); - -Accounts.validateLoginAttempt(function (login) { - login = callbacks.run('beforeValidateLogin', login); - - if (!Promise.await(isValidLoginAttemptByIp(getClientAddress(login.connection)))) { - throw new Meteor.Error('error-login-blocked-for-ip', 'Login has been temporarily blocked For IP', { - function: 'Accounts.validateLoginAttempt', - }); - } - - if (!Promise.await(isValidAttemptByUser(login))) { - throw new Meteor.Error('error-login-blocked-for-user', 'Login has been temporarily blocked For User', { - function: 'Accounts.validateLoginAttempt', - }); - } - - if (login.allowed !== true) { - return login.allowed; - } - - if (login.user.type === 'visitor') { - return true; - } - - if (login.user.type === 'app') { - throw new Meteor.Error('error-app-user-is-not-allowed-to-login', 'App user is not allowed to login', { - function: 'Accounts.validateLoginAttempt', - }); - } - - if (!!login.user.active !== true) { - throw new Meteor.Error('error-user-is-not-activated', 'User is not activated', { - function: 'Accounts.validateLoginAttempt', - }); - } - - if (!login.user.roles || !Array.isArray(login.user.roles)) { - throw new Meteor.Error('error-user-has-no-roles', 'User has no roles', { - function: 'Accounts.validateLoginAttempt', - }); - } - - if (login.user.roles.includes('admin') === false && login.type === 'password' && settings.get('Accounts_EmailVerification') === true) { - const validEmail = login.user.emails.filter((email) => email.verified === true); - if (validEmail.length === 0) { - throw new Meteor.Error('error-invalid-email', 'Invalid email __email__'); - } - } - - login = callbacks.run('onValidateLogin', login); - - Users.updateLastLoginById(login.user._id); - Meteor.defer(function () { - return callbacks.run('afterValidateLogin', login); - }); - - return true; -}); - -Accounts.validateNewUser(function (user) { - if (user.type === 'visitor') { - return true; - } - - if ( - settings.get('Accounts_Registration_AuthenticationServices_Enabled') === false && - settings.get('LDAP_Enable') === false && - !(user.services && user.services.password) - ) { - throw new Meteor.Error('registration-disabled-authentication-services', 'User registration is disabled for authentication services'); - } - - return true; -}); - -Accounts.validateNewUser(function (user) { - if (user.type === 'visitor') { - return true; - } - - let domainWhiteList = settings.get('Accounts_AllowedDomainsList'); - if (_.isEmpty(domainWhiteList?.trim())) { - return true; - } - - domainWhiteList = domainWhiteList.split(',').map((domain) => domain.trim()); - - if (user.emails && user.emails.length > 0) { - const email = user.emails[0].address; - const inWhiteList = domainWhiteList.some((domain) => email.match(`@${escapeRegExp(domain)}$`)); - - if (inWhiteList === false) { - throw new Meteor.Error('error-invalid-domain'); - } - } - - return true; -}); - -export const MAX_RESUME_LOGIN_TOKENS = parseInt(process.env.MAX_RESUME_LOGIN_TOKENS) || 50; - -Accounts.onLogin(async ({ user }) => { - if (!user || !user.services || !user.services.resume || !user.services.resume.loginTokens) { - return; - } - if (user.services.resume.loginTokens.length < MAX_RESUME_LOGIN_TOKENS) { - return; - } - const { tokens } = (await UsersRaw.findAllResumeTokensByUserId(user._id))[0]; - if (tokens.length >= MAX_RESUME_LOGIN_TOKENS) { - const oldestDate = tokens.reverse()[MAX_RESUME_LOGIN_TOKENS - 1]; - Users.removeOlderResumeTokensByUserId(user._id, oldestDate.when); - } -}); diff --git a/app/authorization/README.md b/app/authorization/README.md deleted file mode 100644 index c2365d83f698..000000000000 --- a/app/authorization/README.md +++ /dev/null @@ -1,40 +0,0 @@ -Supports role or permission based authorization, and defines the association between them. - -A user is associated with role(s), and a role is associated with permission(s). This package depends on alanning:roles for the role/user association, while the role/permission association is handled internally. Thus, the underlying alanning:roles has no concept of a permission or the association between a role and permission. - -Authorization checks can be done based on a role or permission. However, permission based checks are preferred because they loosely associate an action with a role. For example: - -``` -# permission based check -if hasPermission(userId, 'edit-message') ... - # action is loosely associated to role via permission. Thus action can be revoked - # at runtime by removing the permission for user's role instead of modifying the action code. - -# role based check -if hasRole(userId, ['admin','site-moderator','moderator']) - # action is statically associated with the role - # action code has to be modified to add/remove role authorization - -``` - -Usage: -``` -# assign user to admin role. Permissions scoped globally -RocketChat.authz.addUserRoles(userId, 'admin') - -# assign user to moderator role. Permissions scoped to the specified room -# user can moderate (e.g. edit channel name, delete private group message) for only one room specified by the roomId -RocketChat.authz.addUserRoles(userId, 'moderator', roomId ) - -# check if user can modify message for any room -RocketChat.authz.hasPermission(userId, 'edit-message') - -# check if user can modify message for the specified room. Also returns true if user -# has 'edit-message' at global scope. -RocketChat.authz.hasPermission(userId, 'edit-message', roomId) -``` - -Notes: -1. Roles are statically defined. UI needs to be implemented to dynamically assign permission(s) to a Role -2. 'admin', 'moderator', 'user' role identifiers should NOT be changed (unless you update the associated code) because they are referenced when creating users and creating rooms. -3. edit, delete message permissions are at either the global or room scope. i.e. role with edit-message with GLOBAL scope can edit ANY message regardless of the room type. However, role with edit-message with room scope can only edit messages for the room. The global scope is associated with the admin role while the "room-scoped" permission is assigned to the room "moderator" (room creator). If we want a middle ground that allows for edit-message for only channel/group/direct, then we need to create individual edit-c-message, edit-p-message, edit-d-message permissions. diff --git a/app/authorization/client/hasPermission.ts b/app/authorization/client/hasPermission.ts deleted file mode 100644 index ce09644d62bb..000000000000 --- a/app/authorization/client/hasPermission.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { ChatPermissions } from './lib/ChatPermissions'; -import * as Models from '../../models/client'; -import { AuthorizationUtils } from '../lib/AuthorizationUtils'; -import { IUser } from '../../../definition/IUser'; -import { IRole } from '../../../definition/IRole'; -import { IPermission } from '../../../definition/IPermission'; - -const isValidScope = (scope: IRole['scope']): boolean => typeof scope === 'string' && scope in Models; - -const createPermissionValidator = - (quantifier: (predicate: (permissionId: IPermission['_id']) => boolean) => boolean) => - (permissionIds: IPermission['_id'][], scope: string | undefined, userId: IUser['_id']): boolean => { - const user: IUser | null = Models.Users.findOneById(userId, { fields: { roles: 1 } }); - - const checkEachPermission = quantifier.bind(permissionIds); - - return checkEachPermission((permissionId) => { - if (user?.roles) { - if (AuthorizationUtils.isPermissionRestrictedForRoleList(permissionId, user.roles)) { - return false; - } - } - - const permission: IPermission | null = ChatPermissions.findOne(permissionId, { - fields: { roles: 1 }, - }); - const roles = permission?.roles ?? []; - - return roles.some((roleName) => { - const role = Models.Roles.findOne(roleName, { fields: { scope: 1 } }); - const roleScope = role?.scope; - - if (!isValidScope(roleScope)) { - return false; - } - - const model = Models[roleScope as keyof typeof Models]; - return model.isUserInRole && model.isUserInRole(userId, roleName, scope); - }); - }); - }; - -const atLeastOne = createPermissionValidator(Array.prototype.some); - -const all = createPermissionValidator(Array.prototype.every); - -const validatePermissions = ( - permissions: IPermission['_id'] | IPermission['_id'][], - scope: string | undefined, - predicate: (permissionIds: IPermission['_id'][], scope: string | undefined, userId: IUser['_id']) => boolean, - userId?: IUser['_id'] | null, -): boolean => { - userId = userId ?? Meteor.userId(); - - if (!userId) { - return false; - } - - if (!Models.AuthzCachedCollection.ready.get()) { - return false; - } - - return predicate(([] as IPermission['_id'][]).concat(permissions), scope, userId); -}; - -export const hasAllPermission = (permissions: IPermission['_id'] | IPermission['_id'][], scope?: string): boolean => - validatePermissions(permissions, scope, all); - -export const hasAtLeastOnePermission = (permissions: IPermission['_id'] | IPermission['_id'][], scope?: string): boolean => - validatePermissions(permissions, scope, atLeastOne); - -export const userHasAllPermission = ( - permissions: IPermission['_id'] | IPermission['_id'][], - scope?: string, - userId?: IUser['_id'] | null, -): boolean => validatePermissions(permissions, scope, all, userId); - -export const hasPermission = hasAllPermission; diff --git a/app/authorization/client/hasRole.js b/app/authorization/client/hasRole.js deleted file mode 100644 index 710ae1803cae..000000000000 --- a/app/authorization/client/hasRole.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Roles } from '../../models'; - -export const hasRole = (userId, roleNames, scope) => { - roleNames = [].concat(roleNames); - return Roles.isUserInRoles(userId, roleNames, scope); -}; diff --git a/app/authorization/client/index.js b/app/authorization/client/index.js deleted file mode 100644 index 390b615ec481..000000000000 --- a/app/authorization/client/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import { hasAllPermission, hasAtLeastOnePermission, hasPermission, userHasAllPermission } from './hasPermission'; -import { hasRole } from './hasRole'; -import { AuthorizationUtils } from '../lib/AuthorizationUtils'; -import './requiresPermission.html'; -import './startup'; - -export { hasAllPermission, hasAtLeastOnePermission, hasRole, hasPermission, userHasAllPermission, AuthorizationUtils }; diff --git a/app/authorization/client/lib/ChatPermissions.js b/app/authorization/client/lib/ChatPermissions.js deleted file mode 100644 index faafd72fa5e9..000000000000 --- a/app/authorization/client/lib/ChatPermissions.js +++ /dev/null @@ -1,3 +0,0 @@ -import { AuthzCachedCollection } from '../../../models'; - -export const ChatPermissions = AuthzCachedCollection.collection; diff --git a/app/authorization/client/startup.js b/app/authorization/client/startup.js deleted file mode 100644 index 9fad47450a8a..000000000000 --- a/app/authorization/client/startup.js +++ /dev/null @@ -1,46 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Tracker } from 'meteor/tracker'; - -import { hasAtLeastOnePermission } from './hasPermission'; -import { CachedCollectionManager } from '../../ui-cached-collection'; -import { APIClient } from '../../utils/client'; -import { Roles } from '../../models/client'; -import { rolesStreamer } from './lib/streamer'; -import { registerAdminSidebarItem } from '../../../client/views/admin'; - -Meteor.startup(() => { - CachedCollectionManager.onLogin(async () => { - const { roles } = await APIClient.v1.get('roles.list'); - // if a role is checked before this collection is populated, it will return undefined - Roles._collection._docs._map = new Map(roles.map((record) => [record._id, record])); - Object.values(Roles._collection.queries).forEach((query) => Roles._collection._recomputeResults(query)); - - Roles.ready.set(true); - }); - - registerAdminSidebarItem({ - href: 'admin-permissions', - i18nLabel: 'Permissions', - icon: 'lock', - permissionGranted() { - return hasAtLeastOnePermission(['access-permissions', 'access-setting-permissions']); - }, - }); - const events = { - changed: (role) => { - delete role.type; - Roles.upsert({ _id: role._id }, role); - }, - removed: (role) => { - Roles.remove({ _id: role._id }); - }, - }; - - Tracker.autorun((c) => { - if (!Meteor.userId()) { - return; - } - rolesStreamer.on('roles', (role) => events[role.type](role)); - c.stop(); - }); -}); diff --git a/app/authorization/server/functions/addUserRoles.ts b/app/authorization/server/functions/addUserRoles.ts deleted file mode 100644 index b5b7b7913f13..000000000000 --- a/app/authorization/server/functions/addUserRoles.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import _ from 'underscore'; - -import { getRoles } from './getRoles'; -import { Users } from '../../../models/server'; -import { IRole, IUser } from '../../../../definition/IUser'; -import { Roles } from '../../../models/server/raw'; - -export const addUserRoles = (userId: IUser['_id'], roleNames: IRole['name'][], scope?: string): boolean => { - if (!userId || !roleNames) { - return false; - } - - const user = Users.db.findOneById(userId); - if (!user) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { - function: 'RocketChat.authz.addUserRoles', - }); - } - - if (!Array.isArray(roleNames)) { - // TODO: remove this check - roleNames = [roleNames]; - } - - const existingRoleNames = _.pluck(getRoles(), '_id'); - const invalidRoleNames = _.difference(roleNames, existingRoleNames); - - if (!_.isEmpty(invalidRoleNames)) { - for (const role of invalidRoleNames) { - Promise.await(Roles.createOrUpdate(role)); - } - } - - Promise.await(Roles.addUserRoles(userId, roleNames, scope)); - return true; -}; diff --git a/app/authorization/server/functions/canAccessRoom.ts b/app/authorization/server/functions/canAccessRoom.ts deleted file mode 100644 index d232f890af2e..000000000000 --- a/app/authorization/server/functions/canAccessRoom.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Authorization } from '../../../../server/sdk'; -import { IAuthorization } from '../../../../server/sdk/types/IAuthorization'; - -export const canAccessRoomAsync = Authorization.canAccessRoom; - -export const canAccessRoom = (...args: Parameters): boolean => Promise.await(canAccessRoomAsync(...args)); diff --git a/app/authorization/server/functions/canDeleteMessage.js b/app/authorization/server/functions/canDeleteMessage.js deleted file mode 100644 index 0463acd0dad0..000000000000 --- a/app/authorization/server/functions/canDeleteMessage.js +++ /dev/null @@ -1,50 +0,0 @@ -import { hasPermissionAsync } from './hasPermission'; -import { getValue } from '../../../settings/server/raw'; -import { Rooms } from '../../../models'; - -const elapsedTime = (ts) => { - const dif = Date.now() - ts; - return Math.round(dif / 1000 / 60); -}; - -export const canDeleteMessageAsync = async (uid, { u, rid, ts }) => { - const forceDelete = await hasPermissionAsync(uid, 'force-delete-message', rid); - - if (forceDelete) { - return true; - } - - if (!ts) { - return false; - } - const deleteAllowed = await getValue('Message_AllowDeleting'); - - if (!deleteAllowed) { - return false; - } - - const allowedToDeleteAny = await hasPermissionAsync(uid, 'delete-message', rid); - - const allowed = allowedToDeleteAny || (uid === u._id && (await hasPermissionAsync(uid, 'delete-own-message'))); - if (!allowed) { - return false; - } - const blockDeleteInMinutes = await getValue('Message_AllowDeleting_BlockDeleteInMinutes'); - - if (blockDeleteInMinutes) { - const timeElapsedForMessage = elapsedTime(ts); - return timeElapsedForMessage <= blockDeleteInMinutes; - } - - const room = await Rooms.findOneById(rid, { fields: { ro: 1, unmuted: 1 } }); - if (room.ro === true && !(await hasPermissionAsync(uid, 'post-readonly', rid))) { - // Unless the user was manually unmuted - if (!(room.unmuted || []).includes(u.username)) { - throw new Error("You can't delete messages because the room is readonly."); - } - } - - return true; -}; - -export const canDeleteMessage = (uid, { u, rid, ts }) => Promise.await(canDeleteMessageAsync(uid, { u, rid, ts })); diff --git a/app/authorization/server/functions/canSendMessage.js b/app/authorization/server/functions/canSendMessage.js deleted file mode 100644 index c346d6791a07..000000000000 --- a/app/authorization/server/functions/canSendMessage.js +++ /dev/null @@ -1,50 +0,0 @@ -import { canAccessRoomAsync } from './canAccessRoom'; -import { hasPermissionAsync } from './hasPermission'; -import { Subscriptions, Rooms } from '../../../models/server/raw'; -import { roomTypes, RoomMemberActions } from '../../../utils/server'; - -const subscriptionOptions = { - projection: { - blocked: 1, - blocker: 1, - }, -}; - -export const validateRoomMessagePermissionsAsync = async (room, { uid, username, type }, extraData) => { - if (!room) { - throw new Error('error-invalid-room'); - } - - if (type !== 'app' && !(await canAccessRoomAsync(room, { _id: uid, username }, extraData))) { - throw new Error('error-not-allowed'); - } - - if (roomTypes.getConfig(room.t).allowMemberAction(room, RoomMemberActions.BLOCK)) { - const subscription = await Subscriptions.findOneByRoomIdAndUserId(room._id, uid, subscriptionOptions); - if (subscription && (subscription.blocked || subscription.blocker)) { - throw new Error('room_is_blocked'); - } - } - - if (room.ro === true && !(await hasPermissionAsync(uid, 'post-readonly', room._id))) { - // Unless the user was manually unmuted - if (!(room.unmuted || []).includes(username)) { - throw new Error("You can't send messages because the room is readonly."); - } - } - - if (room?.muted?.includes(username)) { - throw new Error('You_have_been_muted'); - } -}; - -export const canSendMessageAsync = async (rid, { uid, username, type }, extraData) => { - const room = await Rooms.findOneById(rid); - await validateRoomMessagePermissionsAsync(room, { uid, username, type }, extraData); - return room; -}; - -export const canSendMessage = (rid, { uid, username, type }, extraData) => - Promise.await(canSendMessageAsync(rid, { uid, username, type }, extraData)); -export const validateRoomMessagePermissions = (room, { uid, username, type }, extraData) => - Promise.await(validateRoomMessagePermissionsAsync(room, { uid, username, type }, extraData)); diff --git a/app/authorization/server/functions/getRoles.ts b/app/authorization/server/functions/getRoles.ts deleted file mode 100644 index 27de1000bb0a..000000000000 --- a/app/authorization/server/functions/getRoles.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { IRole } from '../../../../definition/IUser'; -import { Roles } from '../../../models/server/raw'; - -export const getRoles = (): IRole[] => Promise.await(Roles.find().toArray()); diff --git a/app/authorization/server/functions/getUsersInRole.ts b/app/authorization/server/functions/getUsersInRole.ts deleted file mode 100644 index 17b5fcd86474..000000000000 --- a/app/authorization/server/functions/getUsersInRole.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Cursor, FindOneOptions, WithoutProjection } from 'mongodb'; - -import { IRole, IUser } from '../../../../definition/IUser'; -import { Roles } from '../../../models/server/raw'; - -export function getUsersInRole(name: IRole['name'], scope?: string): Promise>; - -export function getUsersInRole( - name: IRole['name'], - scope: string | undefined, - options: WithoutProjection>, -): Promise>; - -export function getUsersInRole

( - name: IRole['name'], - scope: string | undefined, - options: FindOneOptions

, -): Promise>; - -export function getUsersInRole

( - name: IRole['name'], - scope: string | undefined, - options?: any | undefined, -): Promise> { - return Roles.findUsersInRole(name, scope, options); -} diff --git a/app/authorization/server/functions/hasPermission.js b/app/authorization/server/functions/hasPermission.js deleted file mode 100644 index b907fc999bee..000000000000 --- a/app/authorization/server/functions/hasPermission.js +++ /dev/null @@ -1,11 +0,0 @@ -import { Authorization } from '../../../../server/sdk'; - -export const hasAllPermissionAsync = async (userId, permissions, scope) => Authorization.hasAllPermission(userId, permissions, scope); -export const hasPermissionAsync = async (userId, permissionId, scope) => Authorization.hasPermission(userId, permissionId, scope); -export const hasAtLeastOnePermissionAsync = async (userId, permissions, scope) => - Authorization.hasAtLeastOnePermission(userId, permissions, scope); - -export const hasAllPermission = (userId, permissions, scope) => Promise.await(hasAllPermissionAsync(userId, permissions, scope)); -export const hasPermission = (userId, permissionId, scope) => Promise.await(hasPermissionAsync(userId, permissionId, scope)); -export const hasAtLeastOnePermission = (userId, permissions, scope) => - Promise.await(hasAtLeastOnePermissionAsync(userId, permissions, scope)); diff --git a/app/authorization/server/functions/hasRole.ts b/app/authorization/server/functions/hasRole.ts deleted file mode 100644 index f26ff3208c58..000000000000 --- a/app/authorization/server/functions/hasRole.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Roles } from '../../../models/server/raw'; -import { ISubscription } from '../../../../definition/ISubscription'; - -export const hasAnyRoleAsync = async (userId: string, roleNames: string[], scope?: string | undefined): Promise => { - if (!userId || userId === '') { - return false; - } - - return Roles.isUserInRoles(userId, roleNames, scope); -}; - -export const hasRole = (userId: string, roleNames: string, scope?: string | undefined): boolean => - Promise.await(hasAnyRoleAsync(userId, [roleNames], scope)); - -export const hasAnyRole = (userId: string, roleNames: string[], scope?: string | undefined): boolean => - Promise.await(hasAnyRoleAsync(userId, roleNames, scope)); - -export const subscriptionHasRole = (sub: ISubscription, role: string): boolean | undefined => sub.roles && sub.roles.includes(role); diff --git a/app/authorization/server/functions/removeUserFromRoles.js b/app/authorization/server/functions/removeUserFromRoles.js deleted file mode 100644 index a55d722bb891..000000000000 --- a/app/authorization/server/functions/removeUserFromRoles.js +++ /dev/null @@ -1,34 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import _ from 'underscore'; - -import { getRoles } from './getRoles'; -import { Users } from '../../../models/server'; -import { Roles } from '../../../models/server/raw'; - -export const removeUserFromRoles = (userId, roleNames, scope) => { - if (!userId || !roleNames) { - return false; - } - - const user = Users.findOneById(userId); - - if (!user) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { - function: 'RocketChat.authz.removeUserFromRoles', - }); - } - - roleNames = [].concat(roleNames); - const existingRoleNames = _.pluck(getRoles(), '_id'); - const invalidRoleNames = _.difference(roleNames, existingRoleNames); - - if (!_.isEmpty(invalidRoleNames)) { - throw new Meteor.Error('error-invalid-role', 'Invalid role', { - function: 'RocketChat.authz.removeUserFromRoles', - }); - } - - Promise.await(Roles.removeUserRoles(userId, roleNames, scope)); - - return true; -}; diff --git a/app/authorization/server/index.js b/app/authorization/server/index.js deleted file mode 100644 index 6013fd9c4d63..000000000000 --- a/app/authorization/server/index.js +++ /dev/null @@ -1,33 +0,0 @@ -import { addUserRoles } from './functions/addUserRoles'; -import { canAccessRoom, roomAccessValidators } from './functions/canAccessRoom'; -import { canSendMessage, validateRoomMessagePermissions } from './functions/canSendMessage'; -import { getRoles } from './functions/getRoles'; -import { getUsersInRole } from './functions/getUsersInRole'; -import { hasAllPermission, hasAtLeastOnePermission, hasPermission } from './functions/hasPermission'; -import { hasRole, subscriptionHasRole } from './functions/hasRole'; -import { removeUserFromRoles } from './functions/removeUserFromRoles'; -import { AuthorizationUtils } from '../lib/AuthorizationUtils'; -import './methods/addPermissionToRole'; -import './methods/addUserToRole'; -import './methods/deleteRole'; -import './methods/removeRoleFromPermission'; -import './methods/removeUserFromRole'; -import './methods/saveRole'; -import './streamer/permissions'; - -export { - getRoles, - getUsersInRole, - hasRole, - subscriptionHasRole, - removeUserFromRoles, - canSendMessage, - validateRoomMessagePermissions, - roomAccessValidators, - addUserRoles, - canAccessRoom, - hasAllPermission, - hasAtLeastOnePermission, - hasPermission, - AuthorizationUtils, -}; diff --git a/app/authorization/server/methods/addUserToRole.ts b/app/authorization/server/methods/addUserToRole.ts deleted file mode 100644 index cfd4919000e0..000000000000 --- a/app/authorization/server/methods/addUserToRole.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import _ from 'underscore'; - -import { Users } from '../../../models/server'; -import { settings } from '../../../settings/server'; -import { hasPermission } from '../functions/hasPermission'; -import { api } from '../../../../server/sdk/api'; -import { Roles } from '../../../models/server/raw'; - -Meteor.methods({ - async 'authorization:addUserToRole'(roleName, username, scope) { - if (!Meteor.userId() || !hasPermission(Meteor.userId(), 'access-permissions')) { - throw new Meteor.Error('error-action-not-allowed', 'Accessing permissions is not allowed', { - method: 'authorization:addUserToRole', - action: 'Accessing_permissions', - }); - } - - if (!roleName || !_.isString(roleName) || !username || !_.isString(username)) { - throw new Meteor.Error('error-invalid-arguments', 'Invalid arguments', { - method: 'authorization:addUserToRole', - }); - } - - if (roleName === 'admin' && !hasPermission(Meteor.userId(), 'assign-admin-role')) { - throw new Meteor.Error('error-action-not-allowed', 'Assigning admin is not allowed', { - method: 'authorization:addUserToRole', - action: 'Assign_admin', - }); - } - - const user = Users.findOneByUsernameIgnoringCase(username, { - fields: { - _id: 1, - }, - }); - - if (!user || !user._id) { - throw new Meteor.Error('error-user-not-found', 'User not found', { - method: 'authorization:addUserToRole', - }); - } - - // verify if user can be added to given scope - if (scope && !(await Roles.canAddUserToRole(user._id, roleName, scope))) { - throw new Meteor.Error('error-invalid-user', 'User is not part of given room', { - method: 'authorization:addUserToRole', - }); - } - - const add = await Roles.addUserRoles(user._id, [roleName], scope); - - if (settings.get('UI_DisplayRoles')) { - api.broadcast('user.roleUpdate', { - type: 'added', - _id: roleName, - u: { - _id: user._id, - username, - }, - scope, - }); - } - - return add; - }, -}); diff --git a/app/authorization/server/methods/deleteRole.ts b/app/authorization/server/methods/deleteRole.ts deleted file mode 100644 index 78d0b0f0c6e0..000000000000 --- a/app/authorization/server/methods/deleteRole.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { Roles } from '../../../models/server/raw'; -import { hasPermission } from '../functions/hasPermission'; - -Meteor.methods({ - async 'authorization:deleteRole'(roleName) { - if (!Meteor.userId() || !hasPermission(Meteor.userId(), 'access-permissions')) { - throw new Meteor.Error('error-action-not-allowed', 'Accessing permissions is not allowed', { - method: 'authorization:deleteRole', - action: 'Accessing_permissions', - }); - } - - const role = await Roles.findOne(roleName); - if (!role) { - throw new Meteor.Error('error-invalid-role', 'Invalid role', { - method: 'authorization:deleteRole', - }); - } - - if (role.protected) { - throw new Meteor.Error('error-delete-protected-role', 'Cannot delete a protected role', { - method: 'authorization:deleteRole', - }); - } - - const users = await (await Roles.findUsersInRole(roleName)).count(); - - if (users > 0) { - throw new Meteor.Error('error-role-in-use', "Cannot delete role because it's in use", { - method: 'authorization:deleteRole', - }); - } - - return Roles.removeById(role.name); - }, -}); diff --git a/app/authorization/server/methods/removeUserFromRole.js b/app/authorization/server/methods/removeUserFromRole.js deleted file mode 100644 index bb06d0e76226..000000000000 --- a/app/authorization/server/methods/removeUserFromRole.js +++ /dev/null @@ -1,76 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import _ from 'underscore'; - -import { settings } from '../../../settings/server'; -import { hasPermission } from '../functions/hasPermission'; -import { api } from '../../../../server/sdk/api'; -import { Roles } from '../../../models/server/raw'; - -Meteor.methods({ - async 'authorization:removeUserFromRole'(roleName, username, scope) { - if (!Meteor.userId() || !hasPermission(Meteor.userId(), 'access-permissions')) { - throw new Meteor.Error('error-action-not-allowed', 'Access permissions is not allowed', { - method: 'authorization:removeUserFromRole', - action: 'Accessing_permissions', - }); - } - - if (!roleName || !_.isString(roleName) || !username || !_.isString(username)) { - throw new Meteor.Error('error-invalid-arguments', 'Invalid arguments', { - method: 'authorization:removeUserFromRole', - }); - } - - const user = Meteor.users.findOne( - { - username, - }, - { - fields: { - _id: 1, - roles: 1, - }, - }, - ); - - if (!user || !user._id) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { - method: 'authorization:removeUserFromRole', - }); - } - - // prevent removing last user from admin role - if (roleName === 'admin') { - const adminCount = Meteor.users - .find({ - roles: { - $in: ['admin'], - }, - }) - .count(); - - const userIsAdmin = user.roles?.indexOf('admin') > -1; - if (adminCount === 1 && userIsAdmin) { - throw new Meteor.Error('error-action-not-allowed', 'Leaving the app without admins is not allowed', { - method: 'removeUserFromRole', - action: 'Remove_last_admin', - }); - } - } - - const remove = await Roles.removeUserRoles(user._id, [roleName], scope); - if (settings.get('UI_DisplayRoles')) { - api.broadcast('user.roleUpdate', { - type: 'removed', - _id: roleName, - u: { - _id: user._id, - username, - }, - scope, - }); - } - - return remove; - }, -}); diff --git a/app/authorization/server/methods/saveRole.ts b/app/authorization/server/methods/saveRole.ts deleted file mode 100644 index 04f431ba9906..000000000000 --- a/app/authorization/server/methods/saveRole.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { settings } from '../../../settings/server'; -import { hasPermission } from '../functions/hasPermission'; -import { api } from '../../../../server/sdk/api'; -import { Roles } from '../../../models/server/raw'; - -Meteor.methods({ - async 'authorization:saveRole'(roleData) { - if (!Meteor.userId() || !hasPermission(Meteor.userId(), 'access-permissions')) { - throw new Meteor.Error('error-action-not-allowed', 'Accessing permissions is not allowed', { - method: 'authorization:saveRole', - action: 'Accessing_permissions', - }); - } - - if (!roleData.name) { - throw new Meteor.Error('error-role-name-required', 'Role name is required', { - method: 'authorization:saveRole', - }); - } - - if (['Users', 'Subscriptions'].includes(roleData.scope) === false) { - roleData.scope = 'Users'; - } - - const update = await Roles.createOrUpdate(roleData.name, roleData.scope, roleData.description, false, roleData.mandatory2fa); - if (settings.get('UI_DisplayRoles')) { - api.broadcast('user.roleUpdate', { - type: 'changed', - _id: roleData.name, - }); - } - return update; - }, -}); diff --git a/app/authorization/server/streamer/permissions/index.ts b/app/authorization/server/streamer/permissions/index.ts deleted file mode 100644 index 881f4f44e7b5..000000000000 --- a/app/authorization/server/streamer/permissions/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { check, Match } from 'meteor/check'; - -import { Permissions } from '../../../../models/server/raw'; - -Meteor.methods({ - async 'permissions/get'(updatedAt: Date) { - check(updatedAt, Match.Maybe(Date)); - - // TODO: should we return this for non logged users? - // TODO: we could cache this collection - - const records = await Permissions.find(updatedAt && { _updatedAt: { $gt: updatedAt } }).toArray(); - - if (updatedAt instanceof Date) { - return { - update: records, - remove: await Permissions.trashFindDeletedAfter(updatedAt, {}, { projection: { _id: 1, _deletedAt: 1 } }).toArray(), - }; - } - - return records; - }, -}); diff --git a/app/autotranslate/client/lib/actionButton.js b/app/autotranslate/client/lib/actionButton.js deleted file mode 100644 index 069977928ad7..000000000000 --- a/app/autotranslate/client/lib/actionButton.js +++ /dev/null @@ -1,64 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Tracker } from 'meteor/tracker'; - -import { AutoTranslate } from './autotranslate'; -import { settings } from '../../../settings'; -import { hasAtLeastOnePermission } from '../../../authorization'; -import { MessageAction } from '../../../ui-utils'; -import { messageArgs } from '../../../ui-utils/client/lib/messageArgs'; -import { Messages } from '../../../models'; - -Meteor.startup(() => { - AutoTranslate.init(); - - Tracker.autorun(() => { - if (settings.get('AutoTranslate_Enabled') && hasAtLeastOnePermission(['auto-translate'])) { - MessageAction.addButton({ - id: 'translate', - icon: 'language', - label: 'Translate', - context: ['message', 'message-mobile', 'threads'], - action() { - const { msg: message } = messageArgs(this); - const language = AutoTranslate.getLanguage(message.rid); - if (!message.translations || !message.translations[language]) { - // } && !_.find(message.attachments, attachment => { return attachment.translations && attachment.translations[language]; })) { - AutoTranslate.messageIdsToWait[message._id] = true; - Messages.update({ _id: message._id }, { $set: { autoTranslateFetching: true } }); - Meteor.call('autoTranslate.translateMessage', message, language); - } - const action = message.autoTranslateShowInverse ? '$unset' : '$set'; - Messages.update({ _id: message._id }, { [action]: { autoTranslateShowInverse: true } }); - }, - condition({ msg, u }) { - return msg && msg.u && msg.u._id !== u._id && msg.translations && !msg.translations.original; - }, - order: 90, - }); - MessageAction.addButton({ - id: 'view-original', - icon: 'language', - label: 'View_original', - context: ['message', 'message-mobile', 'threads'], - action() { - const { msg: message } = messageArgs(this); - const language = AutoTranslate.getLanguage(message.rid); - if (!message.translations || !message.translations[language]) { - // } && !_.find(message.attachments, attachment => { return attachment.translations && attachment.translations[language]; })) { - AutoTranslate.messageIdsToWait[message._id] = true; - Messages.update({ _id: message._id }, { $set: { autoTranslateFetching: true } }); - Meteor.call('autoTranslate.translateMessage', message, language); - } - const action = message.autoTranslateShowInverse ? '$unset' : '$set'; - Messages.update({ _id: message._id }, { [action]: { autoTranslateShowInverse: true } }); - }, - condition({ msg, u }) { - return msg && msg.u && msg.u._id !== u._id && msg.translations && msg.translations.original; - }, - order: 90, - }); - } else { - MessageAction.removeButton('toggle-language'); - } - }); -}); diff --git a/app/autotranslate/client/lib/autotranslate.js b/app/autotranslate/client/lib/autotranslate.js deleted file mode 100644 index 44ef5ae7953b..000000000000 --- a/app/autotranslate/client/lib/autotranslate.js +++ /dev/null @@ -1,146 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Tracker } from 'meteor/tracker'; -import _ from 'underscore'; -import mem from 'mem'; - -import { Subscriptions, Messages } from '../../../models'; -import { hasPermission } from '../../../authorization'; -import { callWithErrorHandling } from '../../../../client/lib/utils/callWithErrorHandling'; - -let userLanguage = 'en'; -let username = ''; - -Meteor.startup(() => { - Tracker.autorun(() => { - const user = Meteor.user(); - if (!user) { - return; - } - userLanguage = user.language || 'en'; - username = user.username; - }); -}); - -export const AutoTranslate = { - initialized: false, - providersMetadata: {}, - messageIdsToWait: {}, - supportedLanguages: [], - - findSubscriptionByRid: mem((rid) => Subscriptions.findOne({ rid })), - - getLanguage(rid) { - let subscription = {}; - if (rid) { - subscription = this.findSubscriptionByRid(rid); - } - const language = (subscription && subscription.autoTranslateLanguage) || userLanguage || window.defaultUserLanguage(); - if (language.indexOf('-') !== -1) { - if (!_.findWhere(this.supportedLanguages, { language })) { - return language.substr(0, 2); - } - } - return language; - }, - - translateAttachments(attachments, language) { - for (const attachment of attachments) { - if (attachment.author_name !== username) { - if (attachment.text && attachment.translations && attachment.translations[language]) { - attachment.text = attachment.translations[language]; - } - - if (attachment.description && attachment.translations && attachment.translations[language]) { - attachment.description = attachment.translations[language]; - } - - if (attachment.attachments && attachment.attachments.length > 0) { - attachment.attachments = this.translateAttachments(attachment.attachments, language); - } - } - } - return attachments; - }, - - init() { - if (this.initialized) { - return; - } - - Tracker.autorun(async (c) => { - const uid = Meteor.userId(); - if (!uid || !hasPermission('auto-translate')) { - return; - } - - c.stop(); - - [this.providersMetadata, this.supportedLanguages] = await Promise.all([ - callWithErrorHandling('autoTranslate.getProviderUiMetadata'), - callWithErrorHandling('autoTranslate.getSupportedLanguages', 'en'), - ]); - }); - - Subscriptions.find().observeChanges({ - changed: (id, fields) => { - if (fields.hasOwnProperty('autoTranslate') || fields.hasOwnProperty('autoTranslateLanguage')) { - mem.clear(this.findSubscriptionByRid); - } - }, - }); - - this.initialized = true; - }, -}; - -export const createAutoTranslateMessageRenderer = () => { - AutoTranslate.init(); - - return (message) => { - const subscription = AutoTranslate.findSubscriptionByRid(message.rid); - const autoTranslateLanguage = AutoTranslate.getLanguage(message.rid); - if (message.u && message.u._id !== Meteor.userId()) { - if (!message.translations) { - message.translations = {}; - } - if (!!(subscription && subscription.autoTranslate) !== !!message.autoTranslateShowInverse) { - message.translations.original = message.html; - if (message.translations[autoTranslateLanguage]) { - message.html = message.translations[autoTranslateLanguage]; - } - - if (message.attachments && message.attachments.length > 0) { - message.attachments = AutoTranslate.translateAttachments(message.attachments, autoTranslateLanguage); - } - } - } else if (message.attachments && message.attachments.length > 0) { - message.attachments = AutoTranslate.translateAttachments(message.attachments, autoTranslateLanguage); - } - return message; - }; -}; - -export const createAutoTranslateMessageStreamHandler = () => { - AutoTranslate.init(); - - return (message) => { - if (message.u && message.u._id !== Meteor.userId()) { - const subscription = AutoTranslate.findSubscriptionByRid(message.rid); - const language = AutoTranslate.getLanguage(message.rid); - if ( - subscription && - subscription.autoTranslate === true && - message.msg && - (!message.translations || !message.translations[language]) - ) { - // || (message.attachments && !_.find(message.attachments, attachment => { return attachment.translations && attachment.translations[language]; })) - Messages.update({ _id: message._id }, { $set: { autoTranslateFetching: true } }); - } else if (AutoTranslate.messageIdsToWait[message._id] !== undefined && subscription && subscription.autoTranslate !== true) { - Messages.update({ _id: message._id }, { $set: { autoTranslateShowInverse: true }, $unset: { autoTranslateFetching: true } }); - delete AutoTranslate.messageIdsToWait[message._id]; - } else if (message.autoTranslateFetching === true) { - Messages.update({ _id: message._id }, { $unset: { autoTranslateFetching: true } }); - } - } - }; -}; diff --git a/app/autotranslate/client/lib/tabBar.ts b/app/autotranslate/client/lib/tabBar.ts deleted file mode 100644 index 2690cdfe67a3..000000000000 --- a/app/autotranslate/client/lib/tabBar.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { lazy, useMemo } from 'react'; - -import { addAction } from '../../../../client/views/room/lib/Toolbox'; -import { usePermission } from '../../../../client/contexts/AuthorizationContext'; -import { useSetting } from '../../../../client/contexts/SettingsContext'; - -addAction('autotranslate', () => { - const hasPermission = usePermission('auto-translate'); - const autoTranslateEnabled = useSetting('AutoTranslate_Enabled'); - return useMemo( - () => - hasPermission && autoTranslateEnabled - ? { - groups: ['channel', 'group', 'direct', 'direct_multiple', 'team'], - id: 'autotranslate', - title: 'Auto_Translate', - icon: 'language', - template: lazy(() => import('../../../../client/views/room/contextualBar/AutoTranslate')), - order: 20, - full: true, - } - : null, - [autoTranslateEnabled, hasPermission], - ); -}); diff --git a/app/autotranslate/server/autotranslate.js b/app/autotranslate/server/autotranslate.js deleted file mode 100644 index a41837292af6..000000000000 --- a/app/autotranslate/server/autotranslate.js +++ /dev/null @@ -1,356 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import _ from 'underscore'; -import { escapeHTML } from '@rocket.chat/string-helpers'; - -import { settings } from '../../settings/server'; -import { callbacks } from '../../../lib/callbacks'; -import { Subscriptions, Messages } from '../../models'; -import { Markdown } from '../../markdown/server'; -import { Logger } from '../../logger'; - -const Providers = Symbol('Providers'); -const Provider = Symbol('Provider'); - -/** - * This class allows translation providers to - * register,load and also returns the active provider. - */ -export class TranslationProviderRegistry { - static [Providers] = {}; - - static enabled = false; - - static [Provider] = null; - - /** - * Registers the translation provider into the registry. - * @param {*} provider - */ - static registerProvider(provider) { - // get provider information - const metadata = provider._getProviderMetadata(); - TranslationProviderRegistry[Providers][metadata.name] = provider; - } - - /** - * Return the active Translation provider - */ - static getActiveProvider() { - return TranslationProviderRegistry.enabled ? TranslationProviderRegistry[Providers][TranslationProviderRegistry[Provider]] : undefined; - } - - static getSupportedLanguages(...args) { - return TranslationProviderRegistry.enabled - ? TranslationProviderRegistry.getActiveProvider()?.getSupportedLanguages(...args) - : undefined; - } - - static translateMessage(...args) { - return TranslationProviderRegistry.enabled ? TranslationProviderRegistry.getActiveProvider()?.translateMessage(...args) : undefined; - } - - static getProviders() { - return Object.values(TranslationProviderRegistry[Providers]); - } - - static setCurrentProvider(provider) { - if (provider === TranslationProviderRegistry[Provider]) { - return; - } - - TranslationProviderRegistry[Provider] = provider; - - TranslationProviderRegistry.registerCallbacks(); - } - - static setEnable(enabled) { - TranslationProviderRegistry.enabled = enabled; - - TranslationProviderRegistry.registerCallbacks(); - } - - static registerCallbacks() { - if (!TranslationProviderRegistry.enabled) { - callbacks.remove('afterSaveMessage', 'autotranslate'); - return; - } - - const provider = TranslationProviderRegistry.getActiveProvider(); - if (!provider) { - return; - } - - callbacks.add('afterSaveMessage', provider.translateMessage.bind(provider), callbacks.priority.MEDIUM, 'autotranslate'); - } -} - -/** - * Generic auto translate base implementation. - * This class provides generic parts of implementation for - * tokenization, detokenization, call back register and unregister. - * @abstract - * @class - */ -export class AutoTranslate { - /** - * Encapsulate the api key and provider settings. - * @constructor - */ - constructor() { - this.name = ''; - this.languages = []; - this.supportedLanguages = {}; - } - - /** - * Extracts non-translatable parts of a message - * @param {object} message - * @return {object} message - */ - tokenize(message) { - if (!message.tokens || !Array.isArray(message.tokens)) { - message.tokens = []; - } - message = this.tokenizeEmojis(message); - message = this.tokenizeCode(message); - message = this.tokenizeURLs(message); - message = this.tokenizeMentions(message); - return message; - } - - tokenizeEmojis(message) { - let count = message.tokens.length; - message.msg = message.msg.replace(/:[+\w\d]+:/g, function (match) { - const token = `{${count++}}`; - message.tokens.push({ - token, - text: match, - }); - return token; - }); - - return message; - } - - tokenizeURLs(message) { - let count = message.tokens.length; - - const schemes = settings.get('Markdown_SupportSchemesForLink').split(',').join('|'); - - // Support ![alt text](http://image url) and [text](http://link) - message.msg = message.msg.replace( - new RegExp(`(!?\\[)([^\\]]+)(\\]\\((?:${schemes}):\\/\\/[^\\)]+\\))`, 'gm'), - function (match, pre, text, post) { - const pretoken = `{${count++}}`; - message.tokens.push({ - token: pretoken, - text: pre, - }); - - const posttoken = `{${count++}}`; - message.tokens.push({ - token: posttoken, - text: post, - }); - - return pretoken + text + posttoken; - }, - ); - - // Support - message.msg = message.msg.replace( - new RegExp(`((?:<|<)(?:${schemes}):\\/\\/[^\\|]+\\|)(.+?)(?=>|>)((?:>|>))`, 'gm'), - function (match, pre, text, post) { - const pretoken = `{${count++}}`; - message.tokens.push({ - token: pretoken, - text: pre, - }); - - const posttoken = `{${count++}}`; - message.tokens.push({ - token: posttoken, - text: post, - }); - - return pretoken + text + posttoken; - }, - ); - - return message; - } - - tokenizeCode(message) { - let count = message.tokens.length; - message.html = message.msg; - message = Markdown.parseMessageNotEscaped(message); - - // Some parsers (e. g. Marked) wrap the complete message in a

- this is unnecessary and should be ignored with respect to translations - const regexWrappedParagraph = new RegExp('^\\s*

|

\\s*$', 'gm'); - message.msg = message.msg.replace(regexWrappedParagraph, ''); - - for (const tokenIndex in message.tokens) { - if (message.tokens.hasOwnProperty(tokenIndex)) { - const { token } = message.tokens[tokenIndex]; - if (token.indexOf('notranslate') === -1) { - const newToken = `{${count++}}`; - message.msg = message.msg.replace(token, newToken); - message.tokens[tokenIndex].token = newToken; - } - } - } - - return message; - } - - tokenizeMentions(message) { - let count = message.tokens.length; - - if (message.mentions && message.mentions.length > 0) { - message.mentions.forEach((mention) => { - message.msg = message.msg.replace(new RegExp(`(@${mention.username})`, 'gm'), (match) => { - const token = `{${count++}}`; - message.tokens.push({ - token, - text: match, - }); - return token; - }); - }); - } - - if (message.channels && message.channels.length > 0) { - message.channels.forEach((channel) => { - message.msg = message.msg.replace(new RegExp(`(#${channel.name})`, 'gm'), (match) => { - const token = `{${count++}}`; - message.tokens.push({ - token, - text: match, - }); - return token; - }); - }); - } - - return message; - } - - deTokenize(message) { - if (message.tokens && message.tokens.length > 0) { - for (const { token, text, noHtml } of message.tokens) { - message.msg = message.msg.replace(token, () => noHtml || text); - } - } - return message.msg; - } - - /** - * Triggers the translation of the prepared (tokenized) message - * and persists the result - * @public - * @param {object} message - * @param {object} room - * @param {object} targetLanguage - * @returns {object} unmodified message object. - */ - translateMessage(message, room, targetLanguage) { - let targetLanguages; - if (targetLanguage) { - targetLanguages = [targetLanguage]; - } else { - targetLanguages = Subscriptions.getAutoTranslateLanguagesByRoomAndNotUser(room._id, message.u && message.u._id); - } - if (message.msg) { - Meteor.defer(() => { - let targetMessage = Object.assign({}, message); - targetMessage.html = escapeHTML(String(targetMessage.msg)); - targetMessage = this.tokenize(targetMessage); - - const translations = this._translateMessage(targetMessage, targetLanguages); - if (!_.isEmpty(translations)) { - Messages.addTranslations(message._id, translations, TranslationProviderRegistry[Provider]); - } - }); - } - - if (message.attachments && message.attachments.length > 0) { - Meteor.defer(() => { - for (const index in message.attachments) { - if (message.attachments.hasOwnProperty(index)) { - const attachment = message.attachments[index]; - if (attachment.description || attachment.text) { - const translations = this._translateAttachmentDescriptions(attachment, targetLanguages); - if (!_.isEmpty(translations)) { - Messages.addAttachmentTranslations(message._id, index, translations); - } - } - } - } - }); - } - return Messages.findOneById(message._id); - } - - /** - * Returns metadata information about the service provider which is used by - * the generic implementation - * @abstract - * @protected - * @returns { name, displayName, settings } - }; - */ - _getProviderMetadata() { - Logger.warn('must be implemented by subclass!', '_getProviderMetadata'); - } - - /** - * Provides the possible languages _from_ which a message can be translated into a target language - * @abstract - * @protected - * @param {string} target - the language into which shall be translated - * @returns [{ language, name }] - */ - getSupportedLanguages(target) { - Logger.warn('must be implemented by subclass!', 'getSupportedLanguages', target); - } - - /** - * Performs the actual translation of a message, - * usually by sending a REST API call to the service provider. - * @abstract - * @protected - * @param {object} message - * @param {object} targetLanguages - * @return {object} - */ - _translateMessage(message, targetLanguages) { - Logger.warn('must be implemented by subclass!', '_translateMessage', message, targetLanguages); - } - - /** - * Performs the actual translation of an attachment (precisely its description), - * usually by sending a REST API call to the service provider. - * @abstract - * @param {object} attachment - * @param {object} targetLanguages - * @returns {object} translated messages for each target language - */ - _translateAttachmentDescriptions(attachment, targetLanguages) { - Logger.warn('must be implemented by subclass!', '_translateAttachmentDescriptions', attachment, targetLanguages); - } -} - -Meteor.startup(() => { - /** Register the active service provider on the 'AfterSaveMessage' callback. - * So the registered provider will be invoked when a message is saved. - * All the other inactive service provider must be deactivated. - */ - settings.watch('AutoTranslate_ServiceProvider', (providerName) => { - TranslationProviderRegistry.setCurrentProvider(providerName); - }); - - // Get Auto Translate Active flag - settings.watch('AutoTranslate_Enabled', (value) => { - TranslationProviderRegistry.setEnable(value); - }); -}); diff --git a/app/autotranslate/server/deeplTranslate.js b/app/autotranslate/server/deeplTranslate.js deleted file mode 100644 index dff3464298ce..000000000000 --- a/app/autotranslate/server/deeplTranslate.js +++ /dev/null @@ -1,270 +0,0 @@ -/** - * @author Vigneshwaran Odayappan - */ - -import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; -import { HTTP } from 'meteor/http'; -import _ from 'underscore'; - -import { TranslationProviderRegistry, AutoTranslate } from './autotranslate'; -import { SystemLogger } from '../../../server/lib/logger/system'; -import { settings } from '../../settings'; - -/** - * DeepL translation service provider class representation. - * Encapsulates the service provider settings and information. - * Provides languages supported by the service provider. - * Resolves API call to service provider to resolve the translation request. - * @class - * @augments AutoTranslate - */ -class DeeplAutoTranslate extends AutoTranslate { - /** - * setup api reference to deepl translate to be used as message translation provider. - * @constructor - */ - constructor() { - super(); - this.name = 'deepl-translate'; - this.apiEndPointUrl = 'https://api.deepl.com/v2/translate'; - // Get the service provide API key. - settings.watch('AutoTranslate_DeepLAPIKey', (value) => { - this.apiKey = value; - }); - } - - /** - * Returns metadata information about the service provide - * @private implements super abstract method. - * @return {object} - */ - _getProviderMetadata() { - return { - name: this.name, - displayName: TAPi18n.__('AutoTranslate_DeepL'), - settings: this._getSettings(), - }; - } - - /** - * Returns necessary settings information about the translation service provider. - * @private implements super abstract method. - * @return {object} - */ - _getSettings() { - return { - apiKey: this.apiKey, - apiEndPointUrl: this.apiEndPointUrl, - }; - } - - /** - * Returns supported languages for translation by the active service provider. - * Deepl does not provide an endpoint yet to retrieve the supported languages. - * So each supported languages are explicitly maintained. - * @private implements super abstract method. - * @param {string} target - * @returns {object} code : value pair - */ - getSupportedLanguages(target) { - if (!this.apiKey) { - return; - } - - if (this.supportedLanguages[target]) { - return this.supportedLanguages[target]; - } - this.supportedLanguages[target] = [ - { - language: 'bg', - name: TAPi18n.__('Language_Bulgarian', { lng: target }), - }, - { - language: 'cs', - name: TAPi18n.__('Language_Czech', { lng: target }), - }, - { - language: 'da', - name: TAPi18n.__('Language_Danish', { lng: target }), - }, - { - language: 'de', - name: TAPi18n.__('Language_German', { lng: target }), - }, - { - language: 'el', - name: TAPi18n.__('Language_Greek', { lng: target }), - }, - { - language: 'en', - name: TAPi18n.__('Language_English', { lng: target }), - }, - { - language: 'es', - name: TAPi18n.__('Language_Spanish', { lng: target }), - }, - { - language: 'et', - name: TAPi18n.__('Language_Estonian', { lng: target }), - }, - { - language: 'fi', - name: TAPi18n.__('Language_Finnish', { lng: target }), - }, - { - language: 'fr', - name: TAPi18n.__('Language_French', { lng: target }), - }, - { - language: 'hu', - name: TAPi18n.__('Language_Hungarian', { lng: target }), - }, - { - language: 'it', - name: TAPi18n.__('Language_Italian', { lng: target }), - }, - { - language: 'ja', - name: TAPi18n.__('Language_Japanese', { lng: target }), - }, - { - language: 'lt', - name: TAPi18n.__('Language_Lithuanian', { lng: target }), - }, - { - language: 'lv', - name: TAPi18n.__('Language_Latvian', { lng: target }), - }, - { - language: 'nl', - name: TAPi18n.__('Language_Dutch', { lng: target }), - }, - { - language: 'pl', - name: TAPi18n.__('Language_Polish', { lng: target }), - }, - { - language: 'pt', - name: TAPi18n.__('Language_Portuguese', { lng: target }), - }, - { - language: 'ro', - name: TAPi18n.__('Language_Romanian', { lng: target }), - }, - { - language: 'ru', - name: TAPi18n.__('Language_Russian', { lng: target }), - }, - { - language: 'sk', - name: TAPi18n.__('Language_Slovak', { lng: target }), - }, - { - language: 'sl', - name: TAPi18n.__('Language_Slovenian', { lng: target }), - }, - { - language: 'sv', - name: TAPi18n.__('Language_Swedish', { lng: target }), - }, - { - language: 'zh', - name: TAPi18n.__('Language_Chinese', { lng: target }), - }, - ]; - - return this.supportedLanguages[target]; - } - - /** - * Send Request REST API call to the service provider. - * Returns translated message for each target language in target languages. - * @private - * @param {object} message - * @param {object} targetLanguages - * @returns {object} translations: Translated messages for each language - */ - _translateMessage(message, targetLanguages) { - const translations = {}; - let msgs = message.msg.split('\n'); - msgs = msgs.map((msg) => encodeURIComponent(msg)); - const query = `text=${msgs.join('&text=')}`; - const supportedLanguages = this.getSupportedLanguages('en'); - targetLanguages.forEach((language) => { - if (language.indexOf('-') !== -1 && !_.findWhere(supportedLanguages, { language })) { - language = language.substr(0, 2); - } - try { - const result = HTTP.get(this.apiEndPointUrl, { - params: { - auth_key: this.apiKey, - target_lang: language, - }, - query, - }); - - if ( - result.statusCode === 200 && - result.data && - result.data.translations && - Array.isArray(result.data.translations) && - result.data.translations.length > 0 - ) { - // store translation only when the source and target language are different. - // multiple lines might contain different languages => Mix the text between source and detected target if neccessary - const translatedText = result.data.translations - .map((translation, index) => (translation.detected_source_language !== language ? translation.text : msgs[index])) - .join('\n'); - translations[language] = this.deTokenize(Object.assign({}, message, { msg: translatedText })); - } - } catch (e) { - SystemLogger.error('Error translating message', e); - } - }); - return translations; - } - - /** - * Returns translated message attachment description in target languages. - * @private - * @param {object} attachment - * @param {object} targetLanguages - * @returns {object} translated messages for each target language - */ - _translateAttachmentDescriptions(attachment, targetLanguages) { - const translations = {}; - const query = `text=${encodeURIComponent(attachment.description || attachment.text)}`; - const supportedLanguages = this.getSupportedLanguages('en'); - targetLanguages.forEach((language) => { - if (language.indexOf('-') !== -1 && !_.findWhere(supportedLanguages, { language })) { - language = language.substr(0, 2); - } - try { - const result = HTTP.get(this.apiEndPointUrl, { - params: { - auth_key: this.apiKey, - target_lang: language, - }, - query, - }); - if ( - result.statusCode === 200 && - result.data && - result.data.translations && - Array.isArray(result.data.translations) && - result.data.translations.length > 0 - ) { - if (result.data.translations.map((translation) => translation.detected_source_language).join() !== language) { - translations[language] = result.data.translations.map((translation) => translation.text); - } - } - } catch (e) { - SystemLogger.error('Error translating message attachment', e); - } - }); - return translations; - } -} - -// Register DeepL translation provider to the registry. -TranslationProviderRegistry.registerProvider(new DeeplAutoTranslate()); diff --git a/app/autotranslate/server/googleTranslate.js b/app/autotranslate/server/googleTranslate.js deleted file mode 100644 index af351bcaba12..000000000000 --- a/app/autotranslate/server/googleTranslate.js +++ /dev/null @@ -1,207 +0,0 @@ -/** - * @author Vigneshwaran Odayappan - */ - -import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; -import { HTTP } from 'meteor/http'; -import _ from 'underscore'; - -import { AutoTranslate, TranslationProviderRegistry } from './autotranslate'; -import { SystemLogger } from '../../../server/lib/logger/system'; -import { settings } from '../../settings/server'; - -/** - * Represents google translate class - * @class - * @augments AutoTranslate - */ - -class GoogleAutoTranslate extends AutoTranslate { - /** - * setup api reference to Google translate to be used as message translation provider. - * @constructor - */ - constructor() { - super(); - this.name = 'google-translate'; - this.apiEndPointUrl = 'https://translation.googleapis.com/language/translate/v2'; - // Get the service provide API key. - settings.watch('AutoTranslate_GoogleAPIKey', (value) => { - this.apiKey = value; - }); - } - - /** - * Returns metadata information about the service provider - * @private implements super abstract method. - * @returns {object} - */ - _getProviderMetadata() { - return { - name: this.name, - displayName: TAPi18n.__('AutoTranslate_Google'), - settings: this._getSettings(), - }; - } - - /** - * Returns necessary settings information about the translation service provider. - * @private implements super abstract method. - * @returns {object} - */ - _getSettings() { - return { - apiKey: this.apiKey, - apiEndPointUrl: this.apiEndPointUrl, - }; - } - - /** - * Returns supported languages for translation by the active service provider. - * Google Translate api provides the list of supported languages. - * @private implements super abstract method. - * @param {string} target : user language setting or 'en' - * @returns {object} code : value pair - */ - getSupportedLanguages(target) { - if (!this.apiKey) { - return []; - } - - if (this.supportedLanguages[target]) { - return this.supportedLanguages[target]; - } - - let result; - const params = { - key: this.apiKey, - }; - - if (target) { - params.target = target; - } - - try { - result = HTTP.get('https://translation.googleapis.com/language/translate/v2/languages', { - params, - }); - } catch (e) { - // Fallback: Get the English names of the target languages - if ( - e.response && - e.response.statusCode === 400 && - e.response.data && - e.response.data.error && - e.response.data.error.status === 'INVALID_ARGUMENT' - ) { - params.target = 'en'; - target = 'en'; - if (!this.supportedLanguages[target]) { - result = HTTP.get('https://translation.googleapis.com/language/translate/v2/languages', { - params, - }); - } - } - } - - if (this.supportedLanguages[target]) { - return this.supportedLanguages[target]; - } - this.supportedLanguages[target || 'en'] = result?.data?.data?.languages; - return this.supportedLanguages[target || 'en']; - } - - /** - * Send Request REST API call to the service provider. - * Returns translated message for each target language in target languages. - * @private - * @param {object} message - * @param {object} targetLanguages - * @returns {object} translations: Translated messages for each language - */ - _translateMessage(message, targetLanguages) { - const translations = {}; - let msgs = message.msg.split('\n'); - msgs = msgs.map((msg) => encodeURIComponent(msg)); - - const query = `q=${msgs.join('&q=')}`; - const supportedLanguages = this.getSupportedLanguages('en'); - - targetLanguages.forEach((language) => { - if (language.indexOf('-') !== -1 && !_.findWhere(supportedLanguages, { language })) { - language = language.substr(0, 2); - } - - try { - const result = HTTP.get(this.apiEndPointUrl, { - params: { - key: this.apiKey, - target: language, - }, - query, - }); - - if ( - result.statusCode === 200 && - result.data && - result.data.data && - result.data.data.translations && - Array.isArray(result.data.data.translations) && - result.data.data.translations.length > 0 - ) { - const txt = result.data.data.translations.map((translation) => translation.translatedText).join('\n'); - translations[language] = this.deTokenize(Object.assign({}, message, { msg: txt })); - } - } catch (e) { - SystemLogger.error('Error translating message', e); - } - }); - return translations; - } - - /** - * Returns translated message attachment description in target languages. - * @private - * @param {object} attachment - * @param {object} targetLanguages - * @returns {object} translated attachment descriptions for each target language - */ - _translateAttachmentDescriptions(attachment, targetLanguages) { - const translations = {}; - const query = `q=${encodeURIComponent(attachment.description || attachment.text)}`; - const supportedLanguages = this.getSupportedLanguages('en'); - - targetLanguages.forEach((language) => { - if (language.indexOf('-') !== -1 && !_.findWhere(supportedLanguages, { language })) { - language = language.substr(0, 2); - } - - try { - const result = HTTP.get(this.apiEndPointUrl, { - params: { - key: this.apiKey, - target: language, - }, - query, - }); - - if ( - result.statusCode === 200 && - result.data && - result.data.data && - result.data.data.translations && - Array.isArray(result.data.data.translations) && - result.data.data.translations.length > 0 - ) { - translations[language] = result.data.data.translations.map((translation) => translation.translatedText).join('\n'); - } - } catch (e) { - SystemLogger.error('Error translating message', e); - } - }); - return translations; - } -} - -// Register Google translation provider. -TranslationProviderRegistry.registerProvider(new GoogleAutoTranslate()); diff --git a/app/autotranslate/server/index.js b/app/autotranslate/server/index.js deleted file mode 100644 index 8a84b619d582..000000000000 --- a/app/autotranslate/server/index.js +++ /dev/null @@ -1,19 +0,0 @@ -/* eslint-disable import/no-duplicates */ -/** - * This file contains the exported members of the package shall be re-used. - * @module AutoTranslate, TranslationProviderRegistry - */ - -import { AutoTranslate, TranslationProviderRegistry } from './autotranslate'; -import './settings'; -import './permissions'; -import './autotranslate'; -import './methods/getSupportedLanguages'; -import './methods/saveSettings'; -import './methods/translateMessage'; -import './googleTranslate.js'; -import './deeplTranslate.js'; -import './msTranslate.js'; -import './methods/getProviderUiMetadata.js'; - -export { AutoTranslate, TranslationProviderRegistry }; diff --git a/app/autotranslate/server/methods/getSupportedLanguages.js b/app/autotranslate/server/methods/getSupportedLanguages.js deleted file mode 100644 index 64ba301efdfd..000000000000 --- a/app/autotranslate/server/methods/getSupportedLanguages.js +++ /dev/null @@ -1,29 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { DDPRateLimiter } from 'meteor/ddp-rate-limiter'; - -import { hasPermission } from '../../../authorization'; -import { TranslationProviderRegistry } from '..'; - -Meteor.methods({ - 'autoTranslate.getSupportedLanguages'(targetLanguage) { - if (!hasPermission(Meteor.userId(), 'auto-translate')) { - throw new Meteor.Error('error-action-not-allowed', 'Auto-Translate is not allowed', { - method: 'autoTranslate.saveSettings', - }); - } - - return TranslationProviderRegistry.getSupportedLanguages(targetLanguage); - }, -}); - -DDPRateLimiter.addRule( - { - type: 'method', - name: 'autoTranslate.getSupportedLanguages', - userId(/* userId*/) { - return true; - }, - }, - 5, - 60000, -); diff --git a/app/autotranslate/server/methods/saveSettings.js b/app/autotranslate/server/methods/saveSettings.js deleted file mode 100644 index 9587e890e4ac..000000000000 --- a/app/autotranslate/server/methods/saveSettings.js +++ /dev/null @@ -1,52 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { check } from 'meteor/check'; - -import { hasPermission } from '../../../authorization'; -import { Subscriptions } from '../../../models'; - -Meteor.methods({ - 'autoTranslate.saveSettings'(rid, field, value, options) { - if (!Meteor.userId()) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { - method: 'saveAutoTranslateSettings', - }); - } - - if (!hasPermission(Meteor.userId(), 'auto-translate')) { - throw new Meteor.Error('error-action-not-allowed', 'Auto-Translate is not allowed', { - method: 'autoTranslate.saveSettings', - }); - } - - check(rid, String); - check(field, String); - check(value, String); - - if (['autoTranslate', 'autoTranslateLanguage'].indexOf(field) === -1) { - throw new Meteor.Error('error-invalid-settings', 'Invalid settings field', { - method: 'saveAutoTranslateSettings', - }); - } - - const subscription = Subscriptions.findOneByRoomIdAndUserId(rid, Meteor.userId()); - if (!subscription) { - throw new Meteor.Error('error-invalid-subscription', 'Invalid subscription', { - method: 'saveAutoTranslateSettings', - }); - } - - switch (field) { - case 'autoTranslate': - Subscriptions.updateAutoTranslateById(subscription._id, value === '1'); - if (!subscription.autoTranslateLanguage && options.defaultLanguage) { - Subscriptions.updateAutoTranslateLanguageById(subscription._id, options.defaultLanguage); - } - break; - case 'autoTranslateLanguage': - Subscriptions.updateAutoTranslateLanguageById(subscription._id, value); - break; - } - - return true; - }, -}); diff --git a/app/autotranslate/server/methods/translateMessage.js b/app/autotranslate/server/methods/translateMessage.js deleted file mode 100644 index bedf65518326..000000000000 --- a/app/autotranslate/server/methods/translateMessage.js +++ /dev/null @@ -1,16 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { Rooms } from '../../../models'; -import { TranslationProviderRegistry } from '..'; - -Meteor.methods({ - 'autoTranslate.translateMessage'(message, targetLanguage) { - if (!TranslationProviderRegistry.enabled) { - return; - } - const room = Rooms.findOneById(message && message.rid); - if (message && room) { - TranslationProviderRegistry.translateMessage(message, room, targetLanguage); - } - }, -}); diff --git a/app/autotranslate/server/msTranslate.js b/app/autotranslate/server/msTranslate.js deleted file mode 100644 index 4ee381cc938b..000000000000 --- a/app/autotranslate/server/msTranslate.js +++ /dev/null @@ -1,171 +0,0 @@ -/** - * @author Vigneshwaran Odayappan - */ - -import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; -import { HTTP } from 'meteor/http'; -import _ from 'underscore'; - -import { TranslationProviderRegistry, AutoTranslate } from './autotranslate'; -import { msLogger } from './logger'; -import { settings } from '../../settings/server'; - -/** - * Microsoft translation service provider class representation. - * Encapsulates the service provider settings and information. - * Provides languages supported by the service provider. - * Resolves API call to service provider to resolve the translation request. - * @class - * @augments AutoTranslate - */ -class MsAutoTranslate extends AutoTranslate { - /** - * setup api reference to Microsoft translate to be used as message translation provider. - * @constructor - */ - constructor() { - super(); - this.name = 'microsoft-translate'; - this.apiEndPointUrl = 'https://api.cognitive.microsofttranslator.com/translate?api-version=3.0'; - this.apiDetectText = 'https://api.cognitive.microsofttranslator.com/detect?api-version=3.0'; - this.apiGetLanguages = 'https://api.cognitive.microsofttranslator.com/languages?api-version=3.0'; - this.breakSentence = 'https://api.cognitive.microsofttranslator.com/breaksentence?api-version=3.0'; - // Get the service provide API key. - settings.watch('AutoTranslate_MicrosoftAPIKey', (value) => { - this.apiKey = value; - }); - } - - /** - * Returns metadata information about the service provide - * @private implements super abstract method. - * @return {object} - */ - _getProviderMetadata() { - return { - name: this.name, - displayName: TAPi18n.__('AutoTranslate_Microsoft'), - settings: this._getSettings(), - }; - } - - /** - * Returns necessary settings information about the translation service provider. - * @private implements super abstract method. - * @return {object} - */ - _getSettings() { - return { - apiKey: this.apiKey, - apiEndPointUrl: this.apiEndPointUrl, - }; - } - - /** - * Returns supported languages for translation by the active service provider. - * Microsoft does not provide an endpoint yet to retrieve the supported languages. - * So each supported languages are explicitly maintained. - * @private implements super abstract method. - * @param {string} target - * @returns {object} code : value pair - */ - getSupportedLanguages(target) { - if (!this.apiKey) { - return; - } - if (this.supportedLanguages[target]) { - return this.supportedLanguages[target]; - } - const languages = HTTP.get(this.apiGetLanguages); - this.supportedLanguages[target] = Object.keys(languages.data.translation).map((language) => ({ - language, - name: languages.data.translation[language].name, - })); - return this.supportedLanguages[target || 'en']; - } - - /** - * Re-use method for REST API consumption of MS translate. - * @private - * @param {object} message - * @param {object} targetLanguages - * @throws Communication Errors - * @returns {object} translations: Translated messages for each language - */ - _translate(data, targetLanguages) { - let translations = {}; - const supportedLanguages = this.getSupportedLanguages('en'); - targetLanguages = targetLanguages.map((language) => { - if (language.indexOf('-') !== -1 && !_.findWhere(supportedLanguages, { language })) { - language = language.substr(0, 2); - } - return language; - }); - const url = `${this.apiEndPointUrl}&to=${targetLanguages.join('&to=')}`; - const result = HTTP.post(url, { - headers: { - 'Ocp-Apim-Subscription-Key': this.apiKey, - 'Content-Type': 'application/json; charset=UTF-8', - }, - data, - }); - - if (result.statusCode === 200 && result.data && result.data.length > 0) { - // store translation only when the source and target language are different. - translations = Object.assign( - {}, - ...targetLanguages.map((language) => ({ - [language]: result.data.map((line) => line.translations.find((translation) => translation.to === language).text).join('\n'), - })), - ); - } - - return translations; - } - - /** - * Returns translated message for each target language. - * @private - * @param {object} message - * @param {object} targetLanguages - * @returns {object} translations: Translated messages for each language - */ - _translateMessage(message, targetLanguages) { - // There are multi-sentence-messages where multiple sentences come from different languages - // This is a problem for translation services since the language detection fails. - // Thus, we'll split the message in sentences, get them translated, and join them again after translation - const msgs = message.msg.split('\n').map((msg) => ({ Text: msg })); - try { - return this._translate(msgs, targetLanguages); - } catch (e) { - msLogger.error({ err: e, msg: 'Error translating message' }); - } - return {}; - } - - /** - * Returns translated message attachment description in target languages. - * @private - * @param {object} attachment - * @param {object} targetLanguages - * @returns {object} translated messages for each target language - */ - _translateAttachmentDescriptions(attachment, targetLanguages) { - try { - return this._translate( - [ - { - Text: attachment.description || attachment.text, - }, - ], - targetLanguages, - ); - } catch (e) { - msLogger.error({ err: e, msg: 'Error translating message attachment' }); - } - return {}; - } -} - -// Register Microsoft translation provider to the registry. -TranslationProviderRegistry.registerProvider(new MsAutoTranslate()); diff --git a/app/autotranslate/server/permissions.ts b/app/autotranslate/server/permissions.ts deleted file mode 100644 index cf712cc6d552..000000000000 --- a/app/autotranslate/server/permissions.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { Permissions } from '../../models/server/raw'; - -Meteor.startup(async () => { - if (!(await Permissions.findOne({ _id: 'auto-translate' }))) { - Permissions.create('auto-translate', ['admin']); - } -}); diff --git a/app/bigbluebutton/server/bigbluebutton-api.js b/app/bigbluebutton/server/bigbluebutton-api.js deleted file mode 100644 index 8cb3f4d447c4..000000000000 --- a/app/bigbluebutton/server/bigbluebutton-api.js +++ /dev/null @@ -1,188 +0,0 @@ -/* eslint-disable */ -import crypto from 'crypto'; -import { SystemLogger } from '../../../server/lib/logger/system'; - -var BigBlueButtonApi, filterCustomParameters, include, noChecksumMethods, - __indexOf = [].indexOf || function (item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - -BigBlueButtonApi = (function () { - function BigBlueButtonApi(url, salt, debug, opts) { - var _base; - if (opts == null) { - opts = {}; - } - this.url = url; - this.salt = salt; - this.opts = opts; - if ((_base = this.opts).shaType == null) { - _base.shaType = 'sha1'; - } - } - - BigBlueButtonApi.prototype.availableApiCalls = function () { - return ['/', 'create', 'join', 'isMeetingRunning', 'getMeetingInfo', 'end', 'getMeetings', 'getDefaultConfigXML', 'setConfigXML', 'enter', 'configXML', 'signOut', 'getRecordings', 'publishRecordings', 'deleteRecordings', 'updateRecordings', 'hooks/create']; - }; - - BigBlueButtonApi.prototype.urlParamsFor = function (param) { - switch (param) { - case "create": - return [["meetingID", true], ["name", true], ["attendeePW", false], ["moderatorPW", false], ["welcome", false], ["dialNumber", false], ["voiceBridge", false], ["webVoice", false], ["logoutURL", false], ["maxParticipants", false], ["record", false], ["duration", false], ["moderatorOnlyMessage", false], ["autoStartRecording", false], ["allowStartStopRecording", false], [/meta_\w+/, false]]; - case "join": - return [["fullName", true], ["meetingID", true], ["password", true], ["createTime", false], ["userID", false], ["webVoiceConf", false], ["configToken", false], ["avatarURL", false], ["redirect", false], ["clientURL", false]]; - case "isMeetingRunning": - return [["meetingID", true]]; - case "end": - return [["meetingID", true], ["password", true]]; - case "getMeetingInfo": - return [["meetingID", true], ["password", true]]; - case "getRecordings": - return [["meetingID", false], ["recordID", false], ["state", false], [/meta_\w+/, false]]; - case "publishRecordings": - return [["recordID", true], ["publish", true]]; - case "deleteRecordings": - return [["recordID", true]]; - case "updateRecordings": - return [["recordID", true], [/meta_\w+/, false]]; - case "hooks/create": - return [["callbackURL", false], ["meetingID", false]]; - } - }; - - BigBlueButtonApi.prototype.filterParams = function (params, method) { - var filters, r; - filters = this.urlParamsFor(method); - if ((filters == null) || filters.length === 0) { - ({}); - } else { - r = include(params, function (key, value) { - var filter, _i, _len; - for (_i = 0, _len = filters.length; _i < _len; _i++) { - filter = filters[_i]; - if (filter[0] instanceof RegExp) { - if (key.match(filter[0]) || key.match(/^custom_/)) { - return true; - } - } else { - if (key.match("^" + filter[0] + "$") || key.match(/^custom_/)) { - return true; - } - } - } - return false; - }); - } - return filterCustomParameters(r); - }; - - BigBlueButtonApi.prototype.urlFor = function (method, params, filter) { - var checksum, key, keys, param, paramList, property, query, sep, url, _i, _len; - if (filter == null) { - filter = true; - } - SystemLogger.debug("Generating URL for", method); - if (filter) { - params = this.filterParams(params, method); - } else { - params = filterCustomParameters(params); - } - url = this.url; - paramList = []; - if (params != null) { - keys = []; - for (property in params) { - keys.push(property); - } - keys = keys.sort(); - for (_i = 0, _len = keys.length; _i < _len; _i++) { - key = keys[_i]; - if (key != null) { - param = params[key]; - } - if (param != null) { - paramList.push("" + (this.encodeForUrl(key)) + "=" + (this.encodeForUrl(param))); - } - } - if (paramList.length > 0) { - query = paramList.join("&"); - } - } else { - query = ''; - } - checksum = this.checksum(method, query); - if (paramList.length > 0) { - query = "" + method + "?" + query; - sep = '&'; - } else { - if (method !== '/') { - query = method; - } - sep = '?'; - } - if (__indexOf.call(noChecksumMethods(), method) < 0) { - query = "" + query + sep + "checksum=" + checksum; - } - return "" + url + "/" + query; - }; - - BigBlueButtonApi.prototype.checksum = function (method, query) { - var c, shaObj, str; - query || (query = ""); - SystemLogger.debug("- Calculating the checksum using: '" + method + "', '" + query + "', '" + this.salt + "'"); - str = method + query + this.salt; - if (this.opts.shaType === 'sha256') { - shaObj = crypto.createHash('sha256', "TEXT") - } else { - shaObj = crypto.createHash('sha1', "TEXT") - } - shaObj.update(str); - c = shaObj.digest('hex'); - SystemLogger.debug("- Checksum calculated:", c); - return c; - }; - - BigBlueButtonApi.prototype.encodeForUrl = function (value) { - return encodeURIComponent(value).replace(/%20/g, '+').replace(/[!'()]/g, escape).replace(/\*/g, "%2A"); - }; - - BigBlueButtonApi.prototype.setMobileProtocol = function (url) { - return url.replace(/http[s]?\:\/\//, "bigbluebutton://"); - }; - - return BigBlueButtonApi; - -})(); - -include = function (input, _function) { - var key, value, _match, _obj; - _obj = new Object; - _match = null; - for (key in input) { - value = input[key]; - if (_function.call(input, key, value)) { - _obj[key] = value; - } - } - return _obj; -}; - -export default BigBlueButtonApi; - -filterCustomParameters = function (params) { - var key, v; - for (key in params) { - v = params[key]; - if (key.match(/^custom_/)) { - params[key.replace(/^custom_/, "")] = v; - } - } - for (key in params) { - if (key.match(/^custom_/)) { - delete params[key]; - } - } - return params; -}; - -noChecksumMethods = function () { - return ['setConfigXML', '/', 'enter', 'configXML', 'signOut']; -}; diff --git a/app/bigbluebutton/server/index.js b/app/bigbluebutton/server/index.js deleted file mode 100644 index b6be696a20bd..000000000000 --- a/app/bigbluebutton/server/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './bigbluebutton-api'; diff --git a/app/blockstack/client/index.js b/app/blockstack/client/index.js deleted file mode 100644 index 23420dbe4d70..000000000000 --- a/app/blockstack/client/index.js +++ /dev/null @@ -1,53 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { ServiceConfiguration } from 'meteor/service-configuration'; -import { check, Match } from 'meteor/check'; -import { Session } from 'meteor/session'; -import './routes'; - -const handleError = (error) => error && Session.set('errorMessage', error.reason || 'Unknown error'); - -// TODO: allow serviceConfig.loginStyle == popup -Meteor.loginWithBlockstack = (options, callback = handleError) => { - if (!options || !options.redirectURI) { - options = ServiceConfiguration.configurations.findOne({ - service: 'blockstack', - }); - - options.blockstackIDHost = Meteor.Device.isDesktop() ? 'http://localhost:8888/auth' : 'https://blockstack.org/auth'; - - options.scopes = ['store_write']; - } - - try { - check( - options, - Match.ObjectIncluding({ - blockstackIDHost: String, - redirectURI: String, - manifestURI: String, - }), - ); - - import('blockstack/dist/blockstack').then(({ redirectToSignIn }) => - redirectToSignIn(options.redirectURI, options.manifestURI, options.scopes), - ); - } catch (err) { - callback.call(Meteor, err); - } -}; - -const meteorLogout = Meteor.logout; -Meteor.logout = (...args) => { - const serviceConfig = ServiceConfiguration.configurations.findOne({ - service: 'blockstack', - }); - - const blockstackAuth = Session.get('blockstack_auth'); - - if (serviceConfig && blockstackAuth) { - Session.delete('blockstack_auth'); - import('blockstack/dist/blockstack').then(({ signUserOut }) => signUserOut(window.location.href)); - } - - return meteorLogout(...args); -}; diff --git a/app/blockstack/client/routes.js b/app/blockstack/client/routes.js deleted file mode 100644 index 1f0e340c5eda..000000000000 --- a/app/blockstack/client/routes.js +++ /dev/null @@ -1,46 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Accounts } from 'meteor/accounts-base'; -import { FlowRouter } from 'meteor/kadira:flow-router'; - -const blockstackLogin = (authResponse, userData = {}) => { - Accounts.callLoginMethod({ - methodArguments: [ - { - blockstack: true, - authResponse, - userData, - }, - ], - userCallback() { - FlowRouter.go('home'); - }, - }); -}; - -FlowRouter.route('/_blockstack/validate', { - name: 'blockstackValidate', - async action(params, queryParams) { - const blockstack = await import('blockstack/dist/blockstack'); - - if (Meteor.userId()) { - console.log('Blockstack Auth requested when already logged in. Reloading.'); - return FlowRouter.go('home'); - } - - if (queryParams.authResponse == null) { - throw new Meteor.Error('Blockstack: Auth request without response param.'); - } - - let userData; - - if (blockstack.isUserSignedIn()) { - userData = blockstack.loadUserData(); - } - - if (blockstack.isSignInPending()) { - userData = await blockstack.handlePendingSignIn(); - } - - blockstackLogin(queryParams.authResponse, userData); - }, -}); diff --git a/app/blockstack/server/index.js b/app/blockstack/server/index.js deleted file mode 100644 index f0cf809aaf0e..000000000000 --- a/app/blockstack/server/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import './routes.js'; -import './settings.js'; -import './loginHandler.js'; diff --git a/app/blockstack/server/logger.js b/app/blockstack/server/logger.js deleted file mode 100644 index e88f4df9bf1c..000000000000 --- a/app/blockstack/server/logger.js +++ /dev/null @@ -1,3 +0,0 @@ -import { Logger } from '../../logger'; - -export const logger = new Logger('Blockstack'); diff --git a/app/blockstack/server/loginHandler.js b/app/blockstack/server/loginHandler.js deleted file mode 100644 index c1f50416d5c8..000000000000 --- a/app/blockstack/server/loginHandler.js +++ /dev/null @@ -1,56 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Accounts } from 'meteor/accounts-base'; - -import { updateOrCreateUser } from './userHandler'; -import { handleAccessToken } from './tokenHandler'; -import { logger } from './logger'; -import { settings } from '../../settings/server'; -import { Users } from '../../models'; -import { setUserAvatar } from '../../lib'; - -// Blockstack login handler, triggered by a blockstack authResponse in route -Accounts.registerLoginHandler('blockstack', (loginRequest) => { - if (!loginRequest.blockstack || !loginRequest.authResponse) { - return; - } - - if (!settings.get('Blockstack_Enable')) { - return; - } - - logger.debug('Processing login request', loginRequest); - - const auth = handleAccessToken(loginRequest); - - // TODO: Fix #9484 and re-instate usage of accounts helper - // const result = Accounts.updateOrCreateUserFromExternalService('blockstack', auth.serviceData, auth.options) - const result = updateOrCreateUser(auth.serviceData, auth.options); - logger.debug('User create/update result', result); - - // Ensure processing succeeded - if (result === undefined || result.userId === undefined) { - return { - type: 'blockstack', - error: new Meteor.Error(Accounts.LoginCancelledError.numericError, 'User creation failed from Blockstack response token'), - }; - } - - if (result.isNew) { - try { - const user = Users.findOneById(result.userId, { - fields: { 'services.blockstack.image': 1, 'username': 1 }, - }); - if (user && user.services && user.services.blockstack && user.services.blockstack.image) { - Meteor.runAsUser(user._id, () => { - setUserAvatar(user, user.services.blockstack.image, undefined, 'url'); - }); - } - } catch (e) { - logger.error(e); - } - } - - delete result.isNew; - - return result; -}); diff --git a/app/blockstack/server/routes.js b/app/blockstack/server/routes.js deleted file mode 100644 index 9f6bc061f787..000000000000 --- a/app/blockstack/server/routes.js +++ /dev/null @@ -1,31 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { WebApp } from 'meteor/webapp'; - -import { settings } from '../../settings/server'; -import { RocketChatAssets } from '../../assets/server'; - -WebApp.connectHandlers.use( - '/_blockstack/manifest', - Meteor.bindEnvironment(function (req, res) { - const name = settings.get('Site_Name'); - const startUrl = Meteor.absoluteUrl(); - const description = settings.get('Blockstack_Auth_Description'); - const iconUrl = RocketChatAssets.getURL('Assets_favicon_192'); - - res.writeHead(200, { - 'Content-Type': 'application/json', - 'Access-Control-Allow-Origin': '*', - }); - - res.end(`{ - "name": "${name}", - "start_url": "${startUrl}", - "description": "${description}", - "icons": [{ - "src": "${iconUrl}", - "sizes": "192x192", - "type": "image/png" - }] - }`); - }), -); diff --git a/app/blockstack/server/settings.js b/app/blockstack/server/settings.js deleted file mode 100644 index 640e35187a6b..000000000000 --- a/app/blockstack/server/settings.js +++ /dev/null @@ -1,70 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { ServiceConfiguration } from 'meteor/service-configuration'; - -import { logger } from './logger'; -import { settings, settingsRegistry } from '../../settings/server'; - -const defaults = { - enable: false, - loginStyle: 'redirect', - generateUsername: false, - manifestURI: Meteor.absoluteUrl('_blockstack/manifest'), - redirectURI: Meteor.absoluteUrl('_blockstack/validate'), - authDescription: 'Rocket.Chat login', - buttonLabelText: 'Blockstack', - buttonColor: '#271132', - buttonLabelColor: '#ffffff', -}; - -Meteor.startup(() => { - settingsRegistry.addGroup('Blockstack', function () { - this.add('Blockstack_Enable', defaults.enable, { - type: 'boolean', - i18nLabel: 'Enable', - }); - this.add('Blockstack_Auth_Description', defaults.authDescription, { - type: 'string', - }); - this.add('Blockstack_ButtonLabelText', defaults.buttonLabelText, { - type: 'string', - }); - this.add('Blockstack_Generate_Username', defaults.generateUsername, { - type: 'boolean', - }); - }); -}); - -// Helper to return all Blockstack settings -const getSettings = () => - Object.assign({}, defaults, { - enable: settings.get('Blockstack_Enable'), - authDescription: settings.get('Blockstack_Auth_Description'), - buttonLabelText: settings.get('Blockstack_ButtonLabelText'), - generateUsername: settings.get('Blockstack_Generate_Username'), - }); - -// Add settings to auth provider configs on startup -settings.watchMultiple( - ['Blockstack_Enable', 'Blockstack_Auth_Description', 'Blockstack_ButtonLabelText', 'Blockstack_Generate_Username'], - () => { - const serviceConfig = getSettings(); - - if (!serviceConfig.enable) { - logger.debug('Blockstack not enabled', serviceConfig); - return ServiceConfiguration.configurations.remove({ - service: 'blockstack', - }); - } - - ServiceConfiguration.configurations.upsert( - { - service: 'blockstack', - }, - { - $set: serviceConfig, - }, - ); - - logger.debug('Init Blockstack auth', serviceConfig); - }, -); diff --git a/app/blockstack/server/tokenHandler.js b/app/blockstack/server/tokenHandler.js deleted file mode 100644 index 29079e3eb0a3..000000000000 --- a/app/blockstack/server/tokenHandler.js +++ /dev/null @@ -1,63 +0,0 @@ -import { decodeToken } from 'blockstack'; -import { Meteor } from 'meteor/meteor'; -import { Accounts } from 'meteor/accounts-base'; -import { Match, check } from 'meteor/check'; - -import { logger } from './logger'; - -// Handler extracts data from JSON and tokenised reponse. -// Reflects OAuth token service, with some slight modifications for Blockstack. -// -// Uses 'iss' (issuer) as unique key (decentralised ID) for user. -// The 'did' final portion of the blockstack decentralised ID, is displayed as -// your profile ID in the service. This isn't used yet, but could be useful -// to link accounts if identity providers other than btc address are added. -export const handleAccessToken = (loginRequest) => { - logger.debug('Login request received', loginRequest); - - check( - loginRequest, - Match.ObjectIncluding({ - authResponse: String, - userData: Object, - }), - ); - - // Decode auth response for user attributes - const { username, profile } = loginRequest.userData; - const decodedToken = decodeToken(loginRequest.authResponse).payload; - - profile.username = username; - - logger.debug('User data', loginRequest.userData); - logger.debug('Login decoded', decodedToken); - - const { iss, iat, exp } = decodedToken; - - if (!iss) { - return { - type: 'blockstack', - error: new Meteor.Error(Accounts.LoginCancelledError.numericError, 'Insufficient data in auth response token'), - }; - } - - // Collect basic auth provider details - const serviceData = { - id: iss, - did: iss.split(':').pop(), - issuedAt: new Date(iat * 1000), - expiresAt: new Date(exp * 1000), - }; - - // Add Avatar image source to use for auth service suggestions - if (Array.isArray(profile.image) && profile.image.length) { - serviceData.image = profile.image[0].contentUrl; - } - - logger.debug('Login data', serviceData, profile); - - return { - serviceData, - options: { profile }, - }; -}; diff --git a/app/blockstack/server/userHandler.js b/app/blockstack/server/userHandler.js deleted file mode 100644 index 393129f74a99..000000000000 --- a/app/blockstack/server/userHandler.js +++ /dev/null @@ -1,81 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Accounts } from 'meteor/accounts-base'; -import { ServiceConfiguration } from 'meteor/service-configuration'; - -import { logger } from './logger'; -import { settings } from '../../settings/server'; -import { generateUsernameSuggestion } from '../../lib'; - -// Updates or creates a user after we authenticate with Blockstack -// Clones Accounts.updateOrCreateUserFromExternalService with some modifications -export const updateOrCreateUser = (serviceData, options) => { - const serviceConfig = ServiceConfiguration.configurations.findOne({ service: 'blockstack' }); - logger.debug('Auth config', serviceConfig); - - // Extract user data from service / token - const { id, did } = serviceData; - const { profile } = options; - - // Look for existing Blockstack user - const user = Meteor.users.findOne({ 'services.blockstack.id': id }); - let userId; - let isNew = false; - - // Use found or create a user - if (user) { - logger.info(`User login with Blockstack ID ${id}`); - userId = user._id; - } else { - isNew = true; - let emails = []; - if (!Array.isArray(profile.emails)) { - // Fix absense of emails by adding placeholder address using decentralised - // ID at blockstack.email - a holding domain only, no MX record, does not - // process email, may be used in future to provide decentralised email via - // gaia, encrypting mail for DID user only. @TODO: document this approach. - emails.push({ address: `${did}@blockstack.email`, verified: false }); - } else { - const verified = settings.get('Accounts_Verify_Email_For_External_Accounts'); - // Reformat array of emails into expected format if they exist - emails = profile.emails.map((address) => ({ address, verified })); - } - - const newUser = { - name: profile.name, - active: true, - emails, - services: { blockstack: serviceData }, - }; - - // Set username same as in blockstack, or suggest if none - if (profile.name) { - newUser.name = profile.name; - } - - // Take profile username if exists, or generate one if enabled - if (profile.username && profile.username !== '') { - newUser.username = profile.username; - } else if (serviceConfig.generateUsername === true) { - newUser.username = generateUsernameSuggestion(newUser); - } - // If no username at this point it will suggest one from the name - - // Create and get created user to make a couple more mods before returning - logger.info(`Creating user for Blockstack ID ${id}`); - userId = Accounts.insertUserDoc({}, newUser); - logger.debug('New user ${ userId }', newUser); - } - - // Add login token for blockstack auth session (take expiration from response) - // TODO: Regquired method result format ignores `.when` - const { token } = Accounts._generateStampedLoginToken(); - const tokenExpires = serviceData.expiresAt; - - return { - type: 'blockstack', - userId, - token, - tokenExpires, - isNew, - }; -}; diff --git a/app/bot-helpers/server/index.js b/app/bot-helpers/server/index.js deleted file mode 100644 index 04c6d66445b2..000000000000 --- a/app/bot-helpers/server/index.js +++ /dev/null @@ -1,170 +0,0 @@ -import './settings'; -import { Meteor } from 'meteor/meteor'; -import _ from 'underscore'; - -import { Users, Rooms } from '../../models/server'; -import { settings } from '../../settings/server'; -import { hasRole } from '../../authorization/server'; - -/** - * BotHelpers helps bots - * "private" properties use meteor collection cursors, so they stay reactive - * "public" properties use getters to fetch and filter collections as array - */ -class BotHelpers { - constructor() { - this.queries = { - online: { status: { $ne: 'offline' } }, - users: { roles: { $not: { $all: ['bot'] } } }, - }; - } - - // setup collection cursors with array of fields from setting - setupCursors(fieldsSetting) { - this.userFields = {}; - if (typeof fieldsSetting === 'string') { - fieldsSetting = fieldsSetting.split(','); - } - fieldsSetting.forEach((n) => { - this.userFields[n.trim()] = 1; - }); - this._allUsers = Users.find(this.queries.users, { fields: this.userFields }); - this._onlineUsers = Users.find({ $and: [this.queries.users, this.queries.online] }, { fields: this.userFields }); - } - - // request methods or props as arguments to Meteor.call - request(prop, ...params) { - if (typeof this[prop] === 'undefined') { - return null; - } - if (typeof this[prop] === 'function') { - return this[prop](...params); - } - return this[prop]; - } - - addUserToRole(userName, roleName) { - Meteor.call('authorization:addUserToRole', roleName, userName); - } - - removeUserFromRole(userName, roleName) { - Meteor.call('authorization:removeUserFromRole', roleName, userName); - } - - addUserToRoom(userName, room) { - const foundRoom = Rooms.findOneByIdOrName(room); - - if (!_.isObject(foundRoom)) { - throw new Meteor.Error('invalid-channel'); - } - - const data = {}; - data.rid = foundRoom._id; - data.username = userName; - Meteor.call('addUserToRoom', data); - } - - removeUserFromRoom(userName, room) { - const foundRoom = Rooms.findOneByIdOrName(room); - - if (!_.isObject(foundRoom)) { - throw new Meteor.Error('invalid-channel'); - } - const data = {}; - data.rid = foundRoom._id; - data.username = userName; - Meteor.call('removeUserFromRoom', data); - } - - // generic error whenever property access insufficient to fill request - requestError() { - throw new Meteor.Error('error-not-allowed', 'Bot request not allowed', { - method: 'botRequest', - action: 'bot_request', - }); - } - - // "public" properties accessed by getters - // allUsers / onlineUsers return whichever properties are enabled by settings - get allUsers() { - if (!Object.keys(this.userFields).length) { - this.requestError(); - return false; - } - return this._allUsers.fetch(); - } - - get onlineUsers() { - if (!Object.keys(this.userFields).length) { - this.requestError(); - return false; - } - return this._onlineUsers.fetch(); - } - - get allUsernames() { - if (!this.userFields.hasOwnProperty('username')) { - this.requestError(); - return false; - } - return this._allUsers.fetch().map((user) => user.username); - } - - get onlineUsernames() { - if (!this.userFields.hasOwnProperty('username')) { - this.requestError(); - return false; - } - return this._onlineUsers.fetch().map((user) => user.username); - } - - get allNames() { - if (!this.userFields.hasOwnProperty('name')) { - this.requestError(); - return false; - } - return this._allUsers.fetch().map((user) => user.name); - } - - get onlineNames() { - if (!this.userFields.hasOwnProperty('name')) { - this.requestError(); - return false; - } - return this._onlineUsers.fetch().map((user) => user.name); - } - - get allIDs() { - if (!this.userFields.hasOwnProperty('_id') || !this.userFields.hasOwnProperty('username')) { - this.requestError(); - return false; - } - return this._allUsers.fetch().map((user) => ({ id: user._id, name: user.username })); - } - - get onlineIDs() { - if (!this.userFields.hasOwnProperty('_id') || !this.userFields.hasOwnProperty('username')) { - this.requestError(); - return false; - } - return this._onlineUsers.fetch().map((user) => ({ id: user._id, name: user.username })); - } -} - -// add class to meteor methods -const botHelpers = new BotHelpers(); - -// init cursors with fields setting and update on setting change -settings.watch('BotHelpers_userFields', function (settingValue) { - botHelpers.setupCursors(settingValue); -}); - -Meteor.methods({ - botRequest: (...args) => { - const userID = Meteor.userId(); - if (userID && hasRole(userID, 'bot')) { - return botHelpers.request(...args); - } - throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'botRequest' }); - }, -}); diff --git a/app/channel-settings/client/tabBar.ts b/app/channel-settings/client/tabBar.ts deleted file mode 100644 index 91dc8aa1fe74..000000000000 --- a/app/channel-settings/client/tabBar.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { FC, lazy, LazyExoticComponent } from 'react'; - -import { addAction } from '../../../client/views/room/lib/Toolbox'; - -addAction('channel-settings', { - groups: ['channel', 'group'], - id: 'channel-settings', - anonymous: true, - full: true, - title: 'Room_Info', - icon: 'info-circled', - template: lazy(() => import('../../../client/views/room/contextualBar/Info')) as LazyExoticComponent, - order: 1, -}); diff --git a/app/channel-settings/server/functions/saveRoomReadOnly.js b/app/channel-settings/server/functions/saveRoomReadOnly.js deleted file mode 100644 index cee9d969efc9..000000000000 --- a/app/channel-settings/server/functions/saveRoomReadOnly.js +++ /dev/null @@ -1,19 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Match } from 'meteor/check'; - -import { Rooms, Messages } from '../../../models'; -import { hasPermission } from '../../../authorization'; - -export const saveRoomReadOnly = function (rid, readOnly, user, sendMessage = true) { - if (!Match.test(rid, String)) { - throw new Meteor.Error('invalid-room', 'Invalid room', { - function: 'RocketChat.saveRoomReadOnly', - }); - } - const result = Rooms.setReadOnlyById(rid, readOnly, hasPermission); - - if (result && sendMessage) { - readOnly ? Messages.createRoomSetReadOnlyByRoomIdAndUser(rid, user) : Messages.createRoomRemovedReadOnlyByRoomIdAndUser(rid, user); - } - return result; -}; diff --git a/app/channel-settings/server/functions/saveRoomTokens.js b/app/channel-settings/server/functions/saveRoomTokens.js deleted file mode 100644 index 400da0386611..000000000000 --- a/app/channel-settings/server/functions/saveRoomTokens.js +++ /dev/null @@ -1,14 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Match } from 'meteor/check'; - -import { Rooms } from '../../../models'; - -export const saveRoomTokenpass = function (rid, tokenpass) { - if (!Match.test(rid, String)) { - throw new Meteor.Error('invalid-room', 'Invalid room', { - function: 'RocketChat.saveRoomTokens', - }); - } - - return Rooms.setTokenpassById(rid, tokenpass); -}; diff --git a/app/channel-settings/server/functions/saveRoomTopic.js b/app/channel-settings/server/functions/saveRoomTopic.js deleted file mode 100644 index 51a5a05035e2..000000000000 --- a/app/channel-settings/server/functions/saveRoomTopic.js +++ /dev/null @@ -1,18 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Match } from 'meteor/check'; - -import { Rooms, Messages } from '../../../models'; - -export const saveRoomTopic = function (rid, roomTopic, user, sendMessage = true) { - if (!Match.test(rid, String)) { - throw new Meteor.Error('invalid-room', 'Invalid room', { - function: 'RocketChat.saveRoomTopic', - }); - } - - const update = Rooms.setTopicById(rid, roomTopic); - if (update && sendMessage) { - Messages.createRoomSettingsChangedWithTypeRoomIdMessageAndUser('room_changed_topic', rid, roomTopic, user); - } - return update; -}; diff --git a/app/chatpal-search/client/template/admin.js b/app/chatpal-search/client/template/admin.js deleted file mode 100644 index 5e4cc887601b..000000000000 --- a/app/chatpal-search/client/template/admin.js +++ /dev/null @@ -1,91 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { ReactiveVar } from 'meteor/reactive-var'; -import { Template } from 'meteor/templating'; -import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; - -import { settings } from '../../../settings'; -import { hasRole } from '../../../authorization'; -import { dispatchToastMessage } from '../../../../client/lib/toast'; -import { validateEmail } from '../../../../lib/emailValidator'; - -Template.ChatpalAdmin.onCreated(function () { - this.validateEmail = validateEmail; - - this.apiKey = new ReactiveVar(); - - const lang = settings.get('Language'); - - this.lang = lang === 'de' || lang === 'en' ? lang : 'en'; - - this.tac = new ReactiveVar(); - - Meteor.call('chatpalUtilsGetTaC', this.lang, (err, data) => { - this.tac.set(data); - }); -}); - -Template.ChatpalAdmin.events({ - 'submit form'(e, t) { - e.preventDefault(); - - const email = e.target.email.value; - const tac = e.target.readtac.checked; - - if (!tac) { - return dispatchToastMessage({ - type: 'error', - message: TAPi18n.__('Chatpal_ERROR_TAC_must_be_checked'), - }); - } - if (!email || email === '') { - return dispatchToastMessage({ - type: 'error', - message: TAPi18n.__('Chatpal_ERROR_Email_must_be_set'), - }); - } - if (!t.validateEmail(email)) { - return dispatchToastMessage({ - type: 'error', - message: TAPi18n.__('Chatpal_ERROR_Email_must_be_valid'), - }); - } - - // TODO register - try { - Meteor.call('chatpalUtilsCreateKey', email, (err, key) => { - if (!key) { - return dispatchToastMessage({ - type: 'error', - message: TAPi18n.__('Chatpal_ERROR_username_already_exists'), - }); - } - - dispatchToastMessage({ - type: 'info', - message: TAPi18n.__('Chatpal_created_key_successfully'), - }); - - t.apiKey.set(key); - }); - } catch (e) { - console.log(e); - dispatchToastMessage({ - type: 'error', - message: TAPi18n.__('Chatpal_ERROR_username_already_exists'), - }); // TODO error messages - } - }, -}); - -// template -Template.ChatpalAdmin.helpers({ - apiKey() { - return Template.instance().apiKey.get(); - }, - isAdmin() { - return hasRole(Meteor.userId(), 'admin'); - }, - tac() { - return Template.instance().tac.get(); - }, -}); diff --git a/app/chatpal-search/client/template/result.js b/app/chatpal-search/client/template/result.js deleted file mode 100644 index 63a7209cdb05..000000000000 --- a/app/chatpal-search/client/template/result.js +++ /dev/null @@ -1,152 +0,0 @@ -import { ReactiveVar } from 'meteor/reactive-var'; -import { Template } from 'meteor/templating'; -import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; - -import { roomTypes, getURL } from '../../../utils'; -import { Subscriptions } from '../../../models'; -import { getUserAvatarURL as getAvatarUrl } from '../../../utils/lib/getUserAvatarURL'; -import { formatTime } from '../../../../client/lib/utils/formatTime'; -import { formatDate } from '../../../../client/lib/utils/formatDate'; - -const getDMUrl = (username) => getURL(`/direct/${username}`); - -Template.ChatpalSearchResultTemplate.onCreated(function () { - this.badRequest = new ReactiveVar(false); - this.resultType = new ReactiveVar(this.data.settings.DefaultResultType); - this.data.parentPayload.resultType = this.resultType.get(); -}); - -Template.ChatpalSearchResultTemplate.events = { - 'click .chatpal-search-typefilter li'(evt, t) { - t.data.parentPayload.resultType = evt.currentTarget.getAttribute('value'); - t.data.payload.start = 0; - t.resultType.set(t.data.parentPayload.resultType); - t.data.search(); - }, - 'click .chatpal-paging-prev'(env, t) { - t.data.payload.start -= t.data.settings.PageSize; - t.data.search(); - }, - 'click .chatpal-paging-next'(env, t) { - t.data.payload.start = (t.data.payload.start || 0) + t.data.settings.PageSize; - t.data.search(); - }, - 'click .chatpal-show-more-messages'(evt, t) { - t.data.parentPayload.resultType = 'Messages'; - t.data.payload.start = 0; - t.data.payload.rows = t.data.settings.PageSize; - t.resultType.set(t.data.parentPayload.resultType); - t.data.search(); - }, -}; - -Template.ChatpalSearchResultTemplate.helpers({ - result() { - return Template.instance().data.result.get(); - }, - searching() { - return Template.instance().data.searching.get(); - }, - resultType() { - return Template.instance().resultType.get(); - }, - navSelected(type) { - return Template.instance().resultType.get() === type ? 'selected' : ''; - }, - resultsFoundForAllSearch() { - const result = Template.instance().data.result.get(); - - if (!result) { - return true; - } - - return result.message.numFound > 0 || result.user.numFound > 0 || result.room.numFound > 0; - }, - moreMessagesThanDisplayed() { - const result = Template.instance().data.result.get(); - - return result.message.docs.length < result.message.numFound; - }, - resultNumFound() { - const result = Template.instance().data.result.get(); - if (result) { - switch (result.message.numFound) { - case 0: - return TAPi18n.__('Chatpal_no_search_results'); - case 1: - return TAPi18n.__('Chatpal_one_search_result'); - default: - return TAPi18n.__('Chatpal_search_results', result.message.numFound); - } - } - }, - resultMessagesOnly() { - return Template.instance().resultType.get() === 'Messages' || Template.instance().resultType.get() === 'Room'; - }, - resultPaging() { - const result = Template.instance().data.result.get(); - const pageSize = Template.instance().data.settings.PageSize; - if (result) { - return { - currentPage: 1 + result.message.start / pageSize, - numOfPages: Math.ceil(result.message.numFound / pageSize), - }; - } - }, -}); - -Template.ChatpalSearchSingleMessage.helpers({ - roomIcon() { - const room = this.r; - if (room && room.t === 'd') { - return 'at'; - } - return roomTypes.getIcon(room); - }, - - roomLink() { - return roomTypes.getRouteLink(this.r.t, this.r); - }, - - roomName() { - return roomTypes.getRoomName(this.r.t, this.r); - }, - - roomNotSubscribed() { - const subscription = Subscriptions.findOne({ rid: this.rid }); - return typeof subscription === 'undefined'; - }, - - time() { - return formatTime(this.created); - }, - date() { - return formatDate(this.created); - }, - getAvatarUrl, -}); - -Template.ChatpalSearchSingleRoom.helpers({ - roomIcon() { - if (this.t === 'd') { - return 'at'; - } - return roomTypes.getIcon(this); - }, - roomLink() { - return roomTypes.getRouteLink(this.t, this); - }, - roomNotSubscribed() { - const subscription = Subscriptions.findOne({ rid: this.rid }); - return typeof subscription === 'undefined'; - }, -}); - -Template.ChatpalSearchSingleUser.helpers({ - cleanUsername() { - const username = this.user_username || this.username; // varies whether users or messages of users are displayed - return username.replace(/<\/?em>/gi, ''); - }, - getAvatarUrl, - getDMUrl, -}); diff --git a/app/chatpal-search/server/provider/index.js b/app/chatpal-search/server/provider/index.js deleted file mode 100644 index 77f88dcea5f1..000000000000 --- a/app/chatpal-search/server/provider/index.js +++ /dev/null @@ -1,444 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { HTTP } from 'meteor/http'; -import { Random } from 'meteor/random'; - -import ChatpalLogger from '../utils/logger'; -import { Rooms, Messages } from '../../../models'; - -/** - * Enables HTTP functions on Chatpal Backend - */ -class Backend { - constructor(options) { - this._options = options; - } - - /** - * index a set of Sorl documents - * @param docs - * @returns {boolean} - */ - index(docs) { - const options = { - data: docs, - params: { language: this._options.language }, - ...this._options.httpOptions, - }; - - try { - const response = HTTP.call('POST', `${this._options.baseurl}${this._options.updatepath}`, options); - - if (response.statusCode >= 200 && response.statusCode < 300) { - ChatpalLogger.debug({ msg: `indexed ${docs.length} documents`, data: response.data }); - } else { - throw new Error(response); - } - } catch (e) { - // TODO how to deal with this - ChatpalLogger.error({ msg: 'indexing failed', err: e }); - return false; - } - } - - /** - * remove an entry by type and id - * @param type - * @param id - * @returns {boolean} - */ - remove(type, id) { - ChatpalLogger.debug(`Remove ${type}(${id}) from Index`); - - const options = { - data: { - delete: { - query: `id:${id} AND type:${type}`, - }, - commit: {}, - }, - ...this._options.httpOptions, - }; - - try { - const response = HTTP.call('POST', this._options.baseurl + this._options.clearpath, options); - - return response.statusCode >= 200 && response.statusCode < 300; - } catch (e) { - return false; - } - } - - count(type) { - return this.query({ type, rows: 0, text: '*' })[type].numFound; - } - - /** - * query with params - * @param params - * @param callback - */ - query(params, callback) { - const options = { - params, - ...this._options.httpOptions, - }; - - ChatpalLogger.debug({ query: options }); - - try { - if (callback) { - HTTP.call('POST', this._options.baseurl + this._options.searchpath, options, (err, result) => { - if (err) { - return callback(err); - } - - callback(undefined, result.data); - }); - } else { - const response = HTTP.call('POST', this._options.baseurl + this._options.searchpath, options); - - if (response.statusCode >= 200 && response.statusCode < 300) { - return response.data; - } - throw new Error(response); - } - } catch (e) { - ChatpalLogger.error({ msg: 'query failed', err: e }); - throw e; - } - } - - suggest(params, callback) { - const options = { - params, - ...this._options.httpOptions, - }; - - HTTP.call('POST', this._options.baseurl + this._options.suggestionpath, options, (err, result) => { - if (err) { - return callback(err); - } - - try { - callback(undefined, result.data.suggestion); - } catch (e) { - callback(e); - } - }); - } - - clear() { - ChatpalLogger.debug('Clear Index'); - - const options = { - data: { - delete: { - query: '*:*', - }, - commit: {}, - }, - ...this._options.httpOptions, - }; - - try { - const response = HTTP.call('POST', this._options.baseurl + this._options.clearpath, options); - - return response.statusCode >= 200 && response.statusCode < 300; - } catch (e) { - return false; - } - } - - /** - * statically ping with configuration - * @param options - * @returns {boolean} - */ - static ping(config) { - const options = { - params: { - stats: true, - }, - ...config.httpOptions, - }; - - try { - const response = HTTP.call('GET', config.baseurl + config.pingpath, options); - - if (response.statusCode >= 200 && response.statusCode < 300) { - return response.data.stats; - } - return false; - } catch (e) { - return false; - } - } -} - -/** - * Enabled batch indexing - */ -class BatchIndexer { - constructor(size, func, ...rest) { - this._size = size; - this._func = func; - this._rest = rest; - this._values = []; - } - - add(value) { - this._values.push(value); - if (this._values.length === this._size) { - this.flush(); - } - } - - flush() { - this._func(this._values, this._rest); // TODO if flush does not work - this._values = []; - } -} - -/** - * Provides index functions to chatpal provider - */ -export default class Index { - /** - * Creates Index Stub - * @param options - * @param clear if a complete reindex should be done - */ - constructor(options, clear, date) { - this._id = Random.id(); - - this._backend = new Backend(options); - - this._options = options; - - this._batchIndexer = new BatchIndexer(this._options.batchSize || 100, (values) => this._backend.index(values)); - - this._bootstrap(clear, date); - } - - /** - * prepare solr documents - * @param type - * @param doc - * @returns {*} - * @private - */ - _getIndexDocument(type, doc) { - switch (type) { - case 'message': - return { - id: doc._id, - rid: doc.rid, - user: doc.u._id, - created: doc.ts, - updated: doc._updatedAt, - text: doc.msg, - type, - }; - case 'room': - return { - id: doc._id, - rid: doc._id, - created: doc.createdAt, - updated: doc.lm ? doc.lm : doc._updatedAt, - type, - room_name: doc.name, - room_announcement: doc.announcement, - room_description: doc.description, - room_topic: doc.topic, - }; - case 'user': - return { - id: doc._id, - created: doc.createdAt, - updated: doc._updatedAt, - type, - user_username: doc.username, - user_name: doc.name, - user_email: doc.emails && doc.emails.map((e) => e.address), - }; - default: - throw new Error(`Cannot index type '${type}'`); - } - } - - /** - * return true if there are messages in the databases which has been created before *date* - * @param date - * @returns {boolean} - * @private - */ - _existsDataOlderThan(date) { - return Messages.model.find({ ts: { $lt: new Date(date) }, t: { $exists: false } }, { limit: 1 }).fetch().length > 0; - } - - _doesRoomCountDiffer() { - return Rooms.find({ t: { $ne: 'd' } }).count() !== this._backend.count('room'); - } - - _doesUserCountDiffer() { - return Meteor.users.find({ active: true }).count() !== this._backend.count('user'); - } - - /** - * Index users by using a database cursor - */ - _indexUsers() { - const cursor = Meteor.users.find({ active: true }); - - ChatpalLogger.debug(`Start indexing ${cursor.count()} users`); - - cursor.forEach((user) => { - this.indexDoc('user', user, false); - }); - - ChatpalLogger.info(`Users indexed successfully (index-id: ${this._id})`); - } - - /** - * Index rooms by database cursor - * @private - */ - _indexRooms() { - const cursor = Rooms.find({ t: { $ne: 'd' } }); - - ChatpalLogger.debug(`Start indexing ${cursor.count()} rooms`); - - cursor.forEach((room) => { - this.indexDoc('room', room, false); - }); - - ChatpalLogger.info(`Rooms indexed successfully (index-id: ${this._id})`); - } - - _indexMessages(date, gap) { - const start = new Date(date - gap); - const end = new Date(date); - - const cursor = Messages.model.find({ ts: { $gt: start, $lt: end }, t: { $exists: false } }); - - ChatpalLogger.debug(`Start indexing ${cursor.count()} messages between ${start.toString()} and ${end.toString()}`); - - cursor.forEach((message) => { - this.indexDoc('message', message, false); - }); - - ChatpalLogger.info(`Messages between ${start.toString()} and ${end.toString()} indexed successfully (index-id: ${this._id})`); - - return start.getTime(); - } - - _run(date, resolve, reject) { - this._running = true; - - if (this._existsDataOlderThan(date) && !this._break) { - Meteor.setTimeout(() => { - date = this._indexMessages(date, (this._options.windowSize || 24) * 3600000); - - this._run(date, resolve, reject); - }, this._options.timeout || 1000); - } else if (this._break) { - ChatpalLogger.info(`stopped bootstrap (index-id: ${this._id})`); - - this._batchIndexer.flush(); - - this._running = false; - - resolve(); - } else { - ChatpalLogger.info(`No messages older than already indexed date ${new Date(date).toString()}`); - - if (this._doesUserCountDiffer() && !this._break) { - this._indexUsers(); - } else { - ChatpalLogger.info('Users already indexed'); - } - - if (this._doesRoomCountDiffer() && !this._break) { - this._indexRooms(); - } else { - ChatpalLogger.info('Rooms already indexed'); - } - - this._batchIndexer.flush(); - - ChatpalLogger.info(`finished bootstrap (index-id: ${this._id})`); - - this._running = false; - - resolve(); - } - } - - _bootstrap(clear, date) { - ChatpalLogger.info('Start bootstrapping'); - - return new Promise((resolve, reject) => { - if (clear) { - this._backend.clear(); - date = new Date().getTime(); - } - - this._run(date, resolve, reject); - }); - } - - static ping(options) { - return Backend.ping(options); - } - - stop() { - this._break = true; - } - - reindex() { - if (!this._running) { - this._bootstrap(true); - } - } - - indexDoc(type, doc, flush = true) { - this._batchIndexer.add(this._getIndexDocument(type, doc)); - - if (flush) { - this._batchIndexer.flush(); - } - - return true; - } - - removeDoc(type, id) { - return this._backend.remove(type, id); - } - - query(text, language, acl, type, start, rows, callback, params = {}) { - this._backend.query( - { - text, - language, - acl, - type, - start, - rows, - ...params, - }, - callback, - ); - } - - suggest(text, language, acl, type, callback) { - this._backend.suggest( - { - text, - language, - acl, - type, - }, - callback, - ); - } -} diff --git a/app/chatpal-search/server/provider/provider.js b/app/chatpal-search/server/provider/provider.js deleted file mode 100644 index 51670a762c44..000000000000 --- a/app/chatpal-search/server/provider/provider.js +++ /dev/null @@ -1,380 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { searchProviderService, SearchProvider } from '../../../search/server'; -import ChatpalLogger from '../utils/logger'; -import { Subscriptions, Rooms } from '../../../models'; -import { baseUrl } from '../utils/settings'; -import Index from './index'; - -/** - * The chatpal search provider enables chatpal search. An appropriate backedn has to be specified by settings. - */ -class ChatpalProvider extends SearchProvider { - /** - * Create chatpal provider with some settings for backend and ui - */ - constructor() { - super('chatpalProvider'); - - this.chatpalBaseUrl = `${baseUrl}`; - - ChatpalLogger.debug(`Using ${this.chatpalBaseUrl} as chatpal base url`); - - this._settings.add('Backend', 'select', 'cloud', { - values: [ - { key: 'cloud', i18nLabel: 'Cloud Service' }, - { key: 'onsite', i18nLabel: 'On-Site' }, - ], - i18nLabel: 'Chatpal_Backend', - i18nDescription: 'Chatpal_Backend_Description', - }); - this._settings.add('API_Key', 'string', '', { - enableQuery: [ - { - _id: 'Search.chatpalProvider.Backend', - value: 'cloud', - }, - ], - i18nLabel: 'Chatpal_API_Key', - i18nDescription: 'Chatpal_API_Key_Description', - }); - this._settings.add('Base_URL', 'string', '', { - enableQuery: [ - { - _id: 'Search.chatpalProvider.Backend', - value: 'onsite', - }, - ], - i18nLabel: 'Chatpal_Base_URL', - i18nDescription: 'Chatpal_Base_URL_Description', - }); - this._settings.add('HTTP_Headers', 'string', '', { - enableQuery: [ - { - _id: 'Search.chatpalProvider.Backend', - value: 'onsite', - }, - ], - multiline: true, - i18nLabel: 'Chatpal_HTTP_Headers', - i18nDescription: 'Chatpal_HTTP_Headers_Description', - }); - this._settings.add('Main_Language', 'select', 'en', { - values: [ - { key: 'en', i18nLabel: 'English' }, - { key: 'none', i18nLabel: 'Language_Not_set' }, - { key: 'cs', i18nLabel: 'Czech' }, - { key: 'de', i18nLabel: 'Deutsch' }, - { key: 'el', i18nLabel: 'Greek' }, - { key: 'es', i18nLabel: 'Spanish' }, - { key: 'fi', i18nLabel: 'Finish' }, - { key: 'fr', i18nLabel: 'French' }, - { key: 'hu', i18nLabel: 'Hungarian' }, - { key: 'it', i18nLabel: 'Italian' }, - { key: 'nl', i18nLabel: 'Dutsch' }, - { key: 'pl', i18nLabel: 'Polish' }, - { key: 'pt', i18nLabel: 'Portuguese' }, - { key: 'pt_BR', i18nLabel: 'Brasilian' }, - { key: 'ro', i18nLabel: 'Romanian' }, - { key: 'ru', i18nLabel: 'Russian' }, - { key: 'sv', i18nLabel: 'Swedisch' }, - { key: 'tr', i18nLabel: 'Turkish' }, - { key: 'uk', i18nLabel: 'Ukrainian' }, - ], - i18nLabel: 'Chatpal_Main_Language', - i18nDescription: 'Chatpal_Main_Language_Description', - }); - this._settings.add('DefaultResultType', 'select', 'All', { - values: [ - { key: 'All', i18nLabel: 'Chatpal_All_Results' }, - { key: 'Room', i18nLabel: 'Chatpal_Current_Room_Only' }, - { key: 'Messages', i18nLabel: 'Chatpal_Messages_Only' }, - ], - i18nLabel: 'Chatpal_Default_Result_Type', - i18nDescription: 'Chatpal_Default_Result_Type_Description', - }); - this._settings.add('PageSize', 'int', 15, { - i18nLabel: 'Search_Page_Size', - }); - this._settings.add('SuggestionEnabled', 'boolean', true, { - i18nLabel: 'Chatpal_Suggestion_Enabled', - alert: 'This feature is currently in beta and will be extended in the future', - }); - this._settings.add('IncludeAllPublicChannels', 'boolean', false, { - i18nLabel: 'Chatpal_Include_All_Public_Channels', - i18nDescription: 'Chatpal_Include_All_Public_Channels_Description', - }); - this._settings.add('BatchSize', 'int', 100, { - i18nLabel: 'Chatpal_Batch_Size', - i18nDescription: 'Chatpal_Batch_Size_Description', - }); - this._settings.add('TimeoutSize', 'int', 5000, { - i18nLabel: 'Chatpal_Timeout_Size', - i18nDescription: 'Chatpal_Timeout_Size_Description', - }); - this._settings.add('WindowSize', 'int', 48, { - i18nLabel: 'Chatpal_Window_Size', - i18nDescription: 'Chatpal_Window_Size_Description', - }); - } - - get i18nLabel() { - return 'Chatpal Provider'; - } - - get iconName() { - return 'chatpal-logo-icon-darkblue'; - } - - get resultTemplate() { - return 'ChatpalSearchResultTemplate'; - } - - get suggestionItemTemplate() { - return 'ChatpalSuggestionItemTemplate'; - } - - get supportsSuggestions() { - return this._settings.get('SuggestionEnabled'); - } - - /** - * indexing for messages, rooms and users - * @inheritDoc - */ - on(name, value, payload) { - if (!this.index) { - this.indexFail = true; - return false; - } - - switch (name) { - case 'message.save': - return this.index.indexDoc('message', payload); - case 'user.save': - return this.index.indexDoc('user', payload); - case 'room.save': - return this.index.indexDoc('room', payload); - case 'message.delete': - return this.index.removeDoc('message', value); - case 'user.delete': - return this.index.removeDoc('user', value); - case 'room.delete': - return this.index.removeDoc('room', value); - } - - return true; - } - - /** - * Check if the index has to be deleted and completely new reindexed - * @param reason the reason for the provider start - * @returns {boolean} - * @private - */ - _checkForClear(reason) { - if (reason === 'startup') { - return false; - } - - if (reason === 'switch') { - return true; - } - - return ( - this._indexConfig.backendtype !== this._settings.get('Backend') || - (this._indexConfig.backendtype === 'onsite' && - this._indexConfig.baseurl !== - (this._settings.get('Base_URL').endsWith('/') ? this._settings.get('Base_URL').slice(0, -1) : this._settings.get('Base_URL'))) || - (this._indexConfig.backendtype === 'cloud' && this._indexConfig.httpOptions.headers['X-Api-Key'] !== this._settings.get('API_Key')) || - this._indexConfig.language !== this._settings.get('Main_Language') - ); - } - - /** - * parse string to object that can be used as header for HTTP calls - * @returns {{}} - * @private - */ - _parseHeaders() { - const headers = {}; - const sh = this._settings.get('HTTP_Headers').split('\n'); - sh.forEach(function (d) { - const ds = d.split(':'); - if (ds.length === 2 && ds[0].trim() !== '') { - headers[ds[0]] = ds[1]; - } - }); - return headers; - } - - /** - * ping if configuration has been set correctly - * @param config - * @param resolve if ping was successfull - * @param reject if some error occurs - * @param timeout until ping is repeated - * @private - */ - _ping(config, resolve, reject, timeout = 5000) { - const maxTimeout = 200000; - - const stats = Index.ping(config); - - if (stats) { - ChatpalLogger.debug('ping was successfull'); - resolve({ config, stats }); - } else { - ChatpalLogger.warn(`ping failed, retry in ${timeout} ms`); - - this._pingTimeout = Meteor.setTimeout(() => { - this._ping(config, resolve, reject, Math.min(maxTimeout, 2 * timeout)); - }, timeout); - } - } - - /** - * Get index config based on settings - * @param callback - * @private - */ - _getIndexConfig() { - return new Promise((resolve, reject) => { - const config = { - backendtype: this._settings.get('Backend'), - }; - - if (this._settings.get('Backend') === 'cloud') { - config.baseurl = this.chatpalBaseUrl; - config.language = this._settings.get('Main_Language'); - config.searchpath = 'search/search'; - config.updatepath = 'search/update'; - config.pingpath = 'search/ping'; - config.clearpath = 'search/clear'; - config.suggestionpath = 'search/suggest'; - config.httpOptions = { - headers: { - 'X-Api-Key': this._settings.get('API_Key'), - }, - }; - } else { - config.baseurl = this._settings.get('Base_URL').replace(/\/?$/, '/'); - config.language = this._settings.get('Main_Language'); - config.searchpath = 'chatpal/search'; - config.updatepath = 'chatpal/update'; - config.pingpath = 'chatpal/ping'; - config.clearpath = 'chatpal/clear'; - config.suggestionpath = 'chatpal/suggest'; - config.httpOptions = { - headers: this._parseHeaders(), - }; - } - - config.batchSize = this._settings.get('BatchSize'); - config.timeout = this._settings.get('TimeoutSize'); - config.windowSize = this._settings.get('WindowSize'); - - this._ping(config, resolve, reject); - }); - } - - /** - * @inheritDoc - * @param callback - */ - stop(resolve) { - ChatpalLogger.info('Provider stopped'); - Meteor.clearTimeout(this._pingTimeout); - this.indexFail = false; - this.index && this.index.stop(); - resolve(); - } - - /** - * @inheritDoc - * @param reason - * @param resolve - * @param reject - */ - start(reason, resolve, reject) { - const clear = this._checkForClear(reason); - - ChatpalLogger.debug(`clear = ${clear} with reason '${reason}'`); - - this._getIndexConfig().then((server) => { - this._indexConfig = server.config; - - this._stats = server.stats; - - ChatpalLogger.debug({ config: this._indexConfig }); - ChatpalLogger.debug({ stats: this._stats }); - - this.index = new Index(this._indexConfig, this.indexFail || clear, this._stats.message.oldest || new Date().valueOf()); - - resolve(); - }, reject); - } - - /** - * returns a list of rooms that are allowed to be seen by current user - * @param context - * @private - */ - _getAcl(context) { - let aclRoomsIds = []; - - const subscribedRooms = Subscriptions.find({ 'u._id': context.uid }) - .fetch() - .map((room) => room.rid); - aclRoomsIds = aclRoomsIds.concat(subscribedRooms); - - if (this._settings.get('IncludeAllPublicChannels')) { - const publicRooms = Rooms.findByType('c') - .fetch() - .map((room) => room._id); - aclRoomsIds = aclRoomsIds.concat(publicRooms); - } - - // return unique room ids - return [...new Set(aclRoomsIds)]; - } - - /** - * @inheritDoc - * @returns {*} - */ - search(text, context, payload, callback) { - if (!this.index) { - return callback({ msg: 'Chatpal_currently_not_active' }); - } - - const type = payload.resultType === 'All' ? ['message', 'user', 'room'] : ['message']; - const params = Object.assign({}, payload.custom); - - this.index.query( - text, - this._settings.get('Main_Language'), - payload.resultType === 'Room' ? [context.rid] : this._getAcl(context), - type, - payload.start || 0, - payload.rows || this._settings.get('PageSize'), - callback, - params, - ); - } - - /** - * @inheritDoc - */ - suggest(text, context, payload, callback) { - if (!this.index) { - return callback({ msg: 'Chatpal_currently_not_active' }); - } - - const type = payload.resultType === 'All' ? ['message', 'user', 'room'] : ['message']; - - this.index.suggest(text, this._settings.get('Main_Language'), this._getAcl(context), type, callback); - } -} - -searchProviderService.register(new ChatpalProvider()); diff --git a/app/cloud/server/functions/connectWorkspace.js b/app/cloud/server/functions/connectWorkspace.js deleted file mode 100644 index 7ca7fcbb52f9..000000000000 --- a/app/cloud/server/functions/connectWorkspace.js +++ /dev/null @@ -1,58 +0,0 @@ -import { HTTP } from 'meteor/http'; - -import { getRedirectUri } from './getRedirectUri'; -import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; -import { Settings } from '../../../models'; -import { settings } from '../../../settings'; -import { saveRegistrationData } from './saveRegistrationData'; -import { SystemLogger } from '../../../../server/lib/logger/system'; - -export function connectWorkspace(token) { - const { connectToCloud } = retrieveRegistrationStatus(); - if (!connectToCloud) { - Settings.updateValueById('Register_Server', true); - } - - // shouldn't get here due to checking this on the method - // but this is just to double check - if (!token) { - return new Error('Invalid token; the registration token is required.'); - } - - const redirectUri = getRedirectUri(); - - const regInfo = { - email: settings.get('Organization_Email'), - client_name: settings.get('Site_Name'), - redirect_uris: [redirectUri], - }; - - const cloudUrl = settings.get('Cloud_Url'); - let result; - try { - result = HTTP.post(`${cloudUrl}/api/oauth/clients`, { - headers: { - Authorization: `Bearer ${token}`, - }, - data: regInfo, - }); - } catch (e) { - if (e.response && e.response.data && e.response.data.error) { - SystemLogger.error(`Failed to register with Rocket.Chat Cloud. Error: ${e.response.data.error}`); - } else { - SystemLogger.error(e); - } - - return false; - } - - const { data } = result; - - if (!data) { - return false; - } - - Promise.await(saveRegistrationData(data)); - - return true; -} diff --git a/app/cloud/server/functions/disconnectWorkspace.js b/app/cloud/server/functions/disconnectWorkspace.js deleted file mode 100644 index c1e2adda876e..000000000000 --- a/app/cloud/server/functions/disconnectWorkspace.js +++ /dev/null @@ -1,13 +0,0 @@ -import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; -import { Settings } from '../../../models'; - -export function disconnectWorkspace() { - const { connectToCloud } = retrieveRegistrationStatus(); - if (!connectToCloud) { - return true; - } - - Settings.updateValueById('Register_Server', false); - - return true; -} diff --git a/app/cloud/server/functions/getOAuthAuthorizationUrl.js b/app/cloud/server/functions/getOAuthAuthorizationUrl.js deleted file mode 100644 index ff1441fa0c0d..000000000000 --- a/app/cloud/server/functions/getOAuthAuthorizationUrl.js +++ /dev/null @@ -1,20 +0,0 @@ -import { Random } from 'meteor/random'; - -import { getRedirectUri } from './getRedirectUri'; -import { Settings } from '../../../models'; -import { settings } from '../../../settings'; -import { userScopes } from '../oauthScopes'; - -export function getOAuthAuthorizationUrl() { - const state = Random.id(); - - Settings.updateValueById('Cloud_Workspace_Registration_State', state); - - const cloudUrl = settings.get('Cloud_Url'); - const client_id = settings.get('Cloud_Workspace_Client_Id'); - const redirectUri = getRedirectUri(); - - const scope = userScopes.join(' '); - - return `${cloudUrl}/authorize?response_type=code&client_id=${client_id}&redirect_uri=${redirectUri}&scope=${scope}&state=${state}`; -} diff --git a/app/cloud/server/functions/getRedirectUri.js b/app/cloud/server/functions/getRedirectUri.js deleted file mode 100644 index 7fd0937dab15..000000000000 --- a/app/cloud/server/functions/getRedirectUri.js +++ /dev/null @@ -1,5 +0,0 @@ -import { settings } from '../../../settings'; - -export function getRedirectUri() { - return `${settings.get('Site_Url')}/admin/cloud/oauth-callback`.replace(/\/\/admin+/g, '/admin'); -} diff --git a/app/cloud/server/functions/getWorkspaceAccessToken.js b/app/cloud/server/functions/getWorkspaceAccessToken.js deleted file mode 100644 index b9e4a35694f3..000000000000 --- a/app/cloud/server/functions/getWorkspaceAccessToken.js +++ /dev/null @@ -1,28 +0,0 @@ -import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; -import { getWorkspaceAccessTokenWithScope } from './getWorkspaceAccessTokenWithScope'; -import { Settings } from '../../../models'; -import { settings } from '../../../settings'; - -export function getWorkspaceAccessToken(forceNew = false, scope = '', save = true) { - const { connectToCloud, workspaceRegistered } = retrieveRegistrationStatus(); - - if (!connectToCloud || !workspaceRegistered) { - return ''; - } - - const expires = Settings.findOneById('Cloud_Workspace_Access_Token_Expires_At'); - const now = new Date(); - - if (now < expires.value && !forceNew) { - return settings.get('Cloud_Workspace_Access_Token'); - } - - const accessToken = getWorkspaceAccessTokenWithScope(scope); - - if (save) { - Settings.updateValueById('Cloud_Workspace_Access_Token', accessToken.token); - Settings.updateValueById('Cloud_Workspace_Access_Token_Expires_At', accessToken.expiresAt); - } - - return accessToken.token; -} diff --git a/app/cloud/server/functions/getWorkspaceLicense.js b/app/cloud/server/functions/getWorkspaceLicense.js deleted file mode 100644 index 5940f495c37a..000000000000 --- a/app/cloud/server/functions/getWorkspaceLicense.js +++ /dev/null @@ -1,46 +0,0 @@ -import { HTTP } from 'meteor/http'; - -import { getWorkspaceAccessToken } from './getWorkspaceAccessToken'; -import { settings } from '../../../settings'; -import { Settings } from '../../../models'; -import { callbacks } from '../../../../lib/callbacks'; -import { LICENSE_VERSION } from '../license'; -import { SystemLogger } from '../../../../server/lib/logger/system'; - -export function getWorkspaceLicense() { - const token = getWorkspaceAccessToken(); - - if (!token) { - return { updated: false, license: '' }; - } - - let licenseResult; - try { - licenseResult = HTTP.get(`${settings.get('Cloud_Workspace_Registration_Client_Uri')}/license?version=${LICENSE_VERSION}`, { - headers: { - Authorization: `Bearer ${token}`, - }, - }); - } catch (e) { - if (e.response && e.response.data && e.response.data.error) { - SystemLogger.error(`Failed to update license from Rocket.Chat Cloud. Error: ${e.response.data.error}`); - } else { - SystemLogger.error(e); - } - - return { updated: false, license: '' }; - } - - const remoteLicense = licenseResult.data; - const currentLicense = settings.get('Cloud_Workspace_License'); - - if (remoteLicense.updatedAt <= currentLicense._updatedAt) { - return { updated: false, license: '' }; - } - - Settings.updateValueById('Cloud_Workspace_License', remoteLicense.license); - - callbacks.run('workspaceLicenseChanged', remoteLicense.license); - - return { updated: true, license: remoteLicense.license }; -} diff --git a/app/cloud/server/functions/retrieveRegistrationStatus.js b/app/cloud/server/functions/retrieveRegistrationStatus.js deleted file mode 100644 index 562238c466cb..000000000000 --- a/app/cloud/server/functions/retrieveRegistrationStatus.js +++ /dev/null @@ -1,22 +0,0 @@ -import { settings } from '../../../settings'; -import { Users } from '../../../models'; - -export function retrieveRegistrationStatus() { - const info = { - connectToCloud: settings.get('Register_Server'), - workspaceRegistered: !!settings.get('Cloud_Workspace_Client_Id'), - workspaceId: settings.get('Cloud_Workspace_Id'), - uniqueId: settings.get('uniqueID'), - token: '', - email: '', - }; - - const firstUser = Users.getOldest({ emails: 1 }); - info.email = firstUser && firstUser.emails && firstUser.emails[0].address; - - if (settings.get('Organization_Email')) { - info.email = settings.get('Organization_Email'); - } - - return info; -} diff --git a/app/cloud/server/functions/startRegisterWorkspace.js b/app/cloud/server/functions/startRegisterWorkspace.js deleted file mode 100644 index e512469248a0..000000000000 --- a/app/cloud/server/functions/startRegisterWorkspace.js +++ /dev/null @@ -1,45 +0,0 @@ -import { HTTP } from 'meteor/http'; - -import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; -import { syncWorkspace } from './syncWorkspace'; -import { settings } from '../../../settings/server'; -import { Settings } from '../../../models'; -import { buildWorkspaceRegistrationData } from './buildRegistrationData'; -import { SystemLogger } from '../../../../server/lib/logger/system'; - -export async function startRegisterWorkspace(resend = false) { - const { workspaceRegistered, connectToCloud } = retrieveRegistrationStatus(); - if ((workspaceRegistered && connectToCloud) || process.env.TEST_MODE) { - await syncWorkspace(true); - - return true; - } - - Settings.updateValueById('Register_Server', true); - - const regInfo = await buildWorkspaceRegistrationData(); - - const cloudUrl = settings.get('Cloud_Url'); - - let result; - try { - result = HTTP.post(`${cloudUrl}/api/v2/register/workspace?resend=${resend}`, { - data: regInfo, - }); - } catch (e) { - if (e.response && e.response.data && e.response.data.error) { - SystemLogger.error(`Failed to register with Rocket.Chat Cloud. ErrorCode: ${e.response.data.error}`); - } else { - SystemLogger.error(e); - } - return false; - } - const { data } = result; - if (!data) { - return false; - } - - Settings.updateValueById('Cloud_Workspace_Id', data.id); - - return true; -} diff --git a/app/cloud/server/functions/syncWorkspace.js b/app/cloud/server/functions/syncWorkspace.js deleted file mode 100644 index c937bcb6b72f..000000000000 --- a/app/cloud/server/functions/syncWorkspace.js +++ /dev/null @@ -1,92 +0,0 @@ -import { HTTP } from 'meteor/http'; - -import { buildWorkspaceRegistrationData } from './buildRegistrationData'; -import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; -import { getWorkspaceAccessToken } from './getWorkspaceAccessToken'; -import { getWorkspaceLicense } from './getWorkspaceLicense'; -import { Settings } from '../../../models'; -import { settings } from '../../../settings'; -import { getAndCreateNpsSurvey } from '../../../../server/services/nps/getAndCreateNpsSurvey'; -import { NPS, Banner } from '../../../../server/sdk'; -import { SystemLogger } from '../../../../server/lib/logger/system'; - -export async function syncWorkspace(reconnectCheck = false) { - const { workspaceRegistered, connectToCloud } = retrieveRegistrationStatus(); - if (!workspaceRegistered || (!connectToCloud && !reconnectCheck)) { - return false; - } - - const info = await buildWorkspaceRegistrationData(); - - const workspaceUrl = settings.get('Cloud_Workspace_Registration_Client_Uri'); - - let result; - try { - const headers = {}; - const token = getWorkspaceAccessToken(true); - - if (token) { - headers.Authorization = `Bearer ${token}`; - } else { - return false; - } - - result = HTTP.post(`${workspaceUrl}/client`, { - data: info, - headers, - }); - - getWorkspaceLicense(); - } catch (e) { - if (e.response && e.response.data && e.response.data.error) { - SystemLogger.error(`Failed to sync with Rocket.Chat Cloud. Error: ${e.response.data.error}`); - } else { - SystemLogger.error(e); - } - - return false; - } - - const { data } = result; - if (!data) { - return true; - } - - if (data.publicKey) { - Settings.updateValueById('Cloud_Workspace_PublicKey', data.publicKey); - } - - if (data.nps) { - const { id: npsId, expireAt } = data.nps; - - const startAt = new Date(data.nps.startAt); - - await NPS.create({ - npsId, - startAt, - expireAt: new Date(expireAt), - }); - - const now = new Date(); - - if (startAt.getFullYear() === now.getFullYear() && startAt.getMonth() === now.getMonth() && startAt.getDate() === now.getDate()) { - getAndCreateNpsSurvey(npsId); - } - } - - // add banners - if (data.banners) { - for await (const banner of data.banners) { - const { createdAt, expireAt, startAt } = banner; - - await Banner.create({ - ...banner, - createdAt: new Date(createdAt), - expireAt: new Date(expireAt), - startAt: new Date(startAt), - }); - } - } - - return true; -} diff --git a/app/cloud/server/functions/unregisterWorkspace.js b/app/cloud/server/functions/unregisterWorkspace.js deleted file mode 100644 index f28a54a55153..000000000000 --- a/app/cloud/server/functions/unregisterWorkspace.js +++ /dev/null @@ -1,19 +0,0 @@ -import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; -import { Settings } from '../../../models'; - -export function unregisterWorkspace() { - const { workspaceRegistered } = retrieveRegistrationStatus(); - if (!workspaceRegistered) { - return true; - } - - Settings.updateValueById('Cloud_Workspace_Id', null); - Settings.updateValueById('Cloud_Workspace_Name', null); - Settings.updateValueById('Cloud_Workspace_Client_Id', null); - Settings.updateValueById('Cloud_Workspace_Client_Secret', null); - Settings.updateValueById('Cloud_Workspace_Client_Secret_Expires_At', null); - Settings.updateValueById('Cloud_Workspace_PublicKey', null); - Settings.updateValueById('Cloud_Workspace_Registration_Client_Uri', null); - - return true; -} diff --git a/app/cloud/server/index.js b/app/cloud/server/index.js deleted file mode 100644 index 55ae7bbc04c1..000000000000 --- a/app/cloud/server/index.js +++ /dev/null @@ -1,60 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { SyncedCron } from 'meteor/littledata:synced-cron'; - -import './methods'; -import { getWorkspaceAccessToken } from './functions/getWorkspaceAccessToken'; -import { getWorkspaceAccessTokenWithScope } from './functions/getWorkspaceAccessTokenWithScope'; -import { getWorkspaceLicense } from './functions/getWorkspaceLicense'; -import { getUserCloudAccessToken } from './functions/getUserCloudAccessToken'; -import { retrieveRegistrationStatus } from './functions/retrieveRegistrationStatus'; -import { getWorkspaceKey } from './functions/getWorkspaceKey'; -import { syncWorkspace } from './functions/syncWorkspace'; -import { connectWorkspace } from './functions/connectWorkspace'; -import { settings } from '../../settings/server'; -import { SystemLogger } from '../../../server/lib/logger/system'; - -const licenseCronName = 'Cloud Workspace Sync'; - -Meteor.startup(function () { - // run token/license sync if registered - let TroubleshootDisableWorkspaceSync; - settings.watch('Troubleshoot_Disable_Workspace_Sync', (value) => { - if (TroubleshootDisableWorkspaceSync === value) { - return; - } - TroubleshootDisableWorkspaceSync = value; - - if (value) { - return SyncedCron.remove(licenseCronName); - } - - Meteor.defer(() => syncWorkspace()); - - SyncedCron.add({ - name: licenseCronName, - schedule(parser) { - // Every 12 hours - return parser.cron('0 */12 * * *'); - }, - job: syncWorkspace, - }); - }); - - const { workspaceRegistered } = retrieveRegistrationStatus(); - - if (process.env.REG_TOKEN && process.env.REG_TOKEN !== '' && !workspaceRegistered) { - try { - SystemLogger.info('REG_TOKEN Provided. Attempting to register'); - - if (!connectWorkspace(process.env.REG_TOKEN)) { - throw new Error("Couldn't register with token. Please make sure token is valid or hasn't already been used"); - } - - console.log('Successfully registered with token provided by REG_TOKEN!'); - } catch (e) { - SystemLogger.error('An error occured registering with token.', e.message); - } - } -}); - -export { getWorkspaceAccessToken, getWorkspaceAccessTokenWithScope, getWorkspaceLicense, getWorkspaceKey, getUserCloudAccessToken }; diff --git a/app/custom-sounds/server/methods/deleteCustomSound.js b/app/custom-sounds/server/methods/deleteCustomSound.js deleted file mode 100644 index cb1227ce29c5..000000000000 --- a/app/custom-sounds/server/methods/deleteCustomSound.js +++ /dev/null @@ -1,30 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { CustomSounds } from '../../../models/server/raw'; -import { hasPermission } from '../../../authorization'; -import { Notifications } from '../../../notifications'; -import { RocketChatFileCustomSoundsInstance } from '../startup/custom-sounds'; - -Meteor.methods({ - async deleteCustomSound(_id) { - let sound = null; - - if (hasPermission(this.userId, 'manage-sounds')) { - sound = await CustomSounds.findOneById(_id); - } else { - throw new Meteor.Error('not_authorized'); - } - - if (sound == null) { - throw new Meteor.Error('Custom_Sound_Error_Invalid_Sound', 'Invalid sound', { - method: 'deleteCustomSound', - }); - } - - RocketChatFileCustomSoundsInstance.deleteFile(`${sound._id}.${sound.extension}`); - await CustomSounds.removeById(_id); - Notifications.notifyAll('deleteCustomSound', { soundData: sound }); - - return true; - }, -}); diff --git a/app/custom-sounds/server/methods/listCustomSounds.js b/app/custom-sounds/server/methods/listCustomSounds.js deleted file mode 100644 index 475da52286be..000000000000 --- a/app/custom-sounds/server/methods/listCustomSounds.js +++ /dev/null @@ -1,9 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { CustomSounds } from '../../../models/server/raw'; - -Meteor.methods({ - async listCustomSounds() { - return CustomSounds.find({}).toArray(); - }, -}); diff --git a/app/custom-sounds/server/methods/uploadCustomSound.js b/app/custom-sounds/server/methods/uploadCustomSound.js deleted file mode 100644 index c1c13d285d0f..000000000000 --- a/app/custom-sounds/server/methods/uploadCustomSound.js +++ /dev/null @@ -1,26 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { hasPermission } from '../../../authorization'; -import { Notifications } from '../../../notifications'; -import { RocketChatFile } from '../../../file'; -import { RocketChatFileCustomSoundsInstance } from '../startup/custom-sounds'; - -Meteor.methods({ - uploadCustomSound(binaryContent, contentType, soundData) { - if (!hasPermission(this.userId, 'manage-sounds')) { - throw new Meteor.Error('not_authorized'); - } - - const file = Buffer.from(binaryContent, 'binary'); - - const rs = RocketChatFile.bufferToStream(file); - RocketChatFileCustomSoundsInstance.deleteFile(`${soundData._id}.${soundData.extension}`); - const ws = RocketChatFileCustomSoundsInstance.createWriteStream(`${soundData._id}.${soundData.extension}`, contentType); - ws.on( - 'end', - Meteor.bindEnvironment(() => Meteor.setTimeout(() => Notifications.notifyAll('updateCustomSound', { soundData }), 500)), - ); - - rs.pipe(ws); - }, -}); diff --git a/app/discussion/client/createDiscussionMessageAction.js b/app/discussion/client/createDiscussionMessageAction.js deleted file mode 100644 index fa7517d29314..000000000000 --- a/app/discussion/client/createDiscussionMessageAction.js +++ /dev/null @@ -1,63 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Tracker } from 'meteor/tracker'; - -import { settings } from '../../settings/client'; -import { hasPermission } from '../../authorization/client'; -import { MessageAction } from '../../ui-utils/client'; -import { messageArgs } from '../../ui-utils/client/lib/messageArgs'; -import { roomTypes } from '../../utils/client'; -import { imperativeModal } from '../../../client/lib/imperativeModal'; -import CreateDiscussion from '../../../client/components/CreateDiscussion/CreateDiscussion'; - -Meteor.startup(function () { - Tracker.autorun(() => { - if (!settings.get('Discussion_enabled')) { - return MessageAction.removeButton('start-discussion'); - } - - MessageAction.addButton({ - id: 'start-discussion', - icon: 'discussion', - label: 'Discussion_start', - context: ['message', 'message-mobile'], - async action() { - const { msg: message, room } = messageArgs(this); - - imperativeModal.open({ - component: CreateDiscussion, - props: { - defaultParentRoom: room.prid || room._id, - onClose: imperativeModal.close, - parentMessageId: message._id, - nameSuggestion: message?.msg?.substr(0, 140), - }, - }); - }, - condition({ - msg: { - u: { _id: uid }, - drid, - dcount, - }, - room, - subscription, - u, - }) { - if (drid || !isNaN(dcount)) { - return false; - } - if (!subscription) { - return false; - } - const isLivechatRoom = roomTypes.isLivechatRoom(room.t); - if (isLivechatRoom) { - return false; - } - - return uid !== u._id ? hasPermission('start-discussion-other-user') : hasPermission('start-discussion'); - }, - order: 1, - group: 'menu', - }); - }); -}); diff --git a/app/discussion/client/index.js b/app/discussion/client/index.js deleted file mode 100644 index c209596ea44a..000000000000 --- a/app/discussion/client/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// Other UI extensions -import './lib/messageTypes/discussionMessage'; -import './createDiscussionMessageAction'; -import './discussionFromMessageBox'; -import './tabBar'; - -import '../lib/discussionRoomType'; diff --git a/app/discussion/client/tabBar.ts b/app/discussion/client/tabBar.ts deleted file mode 100644 index 2c225cca4862..000000000000 --- a/app/discussion/client/tabBar.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { useMemo, lazy } from 'react'; - -import { addAction } from '../../../client/views/room/lib/Toolbox'; -import { useSetting } from '../../../client/contexts/SettingsContext'; - -const template = lazy(() => import('../../../client/views/room/contextualBar/Discussions')); - -addAction('discussions', ({ room: { prid } }) => { - const discussionEnabled = useSetting('Discussion_enabled'); - - return useMemo( - () => - discussionEnabled && !prid - ? { - groups: ['channel', 'group', 'direct', 'direct_multiple', 'team'], - id: 'discussions', - title: 'Discussions', - icon: 'discussion', - template, - full: true, - order: 3, - } - : null, - [discussionEnabled, prid], - ); -}); diff --git a/app/discussion/lib/discussionRoomType.js b/app/discussion/lib/discussionRoomType.js deleted file mode 100644 index da8219a17be0..000000000000 --- a/app/discussion/lib/discussionRoomType.js +++ /dev/null @@ -1,13 +0,0 @@ -import { RoomTypeConfig, roomTypes } from '../../utils'; - -export class DiscussionRoomType extends RoomTypeConfig { - constructor() { - super({ - identifier: 't', - order: 25, - label: 'Discussion', - }); - } -} - -roomTypes.add(new DiscussionRoomType()); diff --git a/app/discussion/server/index.js b/app/discussion/server/index.js deleted file mode 100644 index 92e47178450a..000000000000 --- a/app/discussion/server/index.js +++ /dev/null @@ -1,10 +0,0 @@ -import './config'; -import './permissions'; - -import './hooks/propagateDiscussionMetadata'; - -// Methods -import './methods/createDiscussion'; - -// Lib -import '../lib/discussionRoomType'; diff --git a/app/discussion/server/permissions.ts b/app/discussion/server/permissions.ts deleted file mode 100644 index 260b2da71035..000000000000 --- a/app/discussion/server/permissions.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { Permissions } from '../../models/server/raw'; - -Meteor.startup(() => { - // Add permissions for discussion - const permissions = [ - { _id: 'start-discussion', roles: ['admin', 'user', 'guest', 'app'] }, - { _id: 'start-discussion-other-user', roles: ['admin', 'user', 'owner', 'app'] }, - ]; - - for (const permission of permissions) { - Permissions.create(permission._id, permission.roles); - } -}); diff --git a/app/dolphin/lib/common.js b/app/dolphin/lib/common.js deleted file mode 100644 index ddaacc16b2a2..000000000000 --- a/app/dolphin/lib/common.js +++ /dev/null @@ -1,63 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Tracker } from 'meteor/tracker'; -import { ServiceConfiguration } from 'meteor/service-configuration'; - -import { settings } from '../../settings'; -import { CustomOAuth } from '../../custom-oauth'; -import { callbacks } from '../../../lib/callbacks'; - -const config = { - serverURL: '', - authorizePath: '/m/oauth2/auth/', - tokenPath: '/m/oauth2/token/', - identityPath: '/m/oauth2/api/me/', - scope: 'basic', - addAutopublishFields: { - forLoggedInUser: ['services.dolphin'], - forOtherUsers: ['services.dolphin.name'], - }, - accessTokenParam: 'access_token', -}; - -const Dolphin = new CustomOAuth('dolphin', config); - -function DolphinOnCreateUser(options, user) { - if (user && user.services && user.services.dolphin && user.services.dolphin.NickName) { - user.username = user.services.dolphin.NickName; - } - return options; -} - -if (Meteor.isServer) { - Meteor.startup(() => - settings.get('Accounts_OAuth_Dolphin_URL', (key, value) => { - config.serverURL = value; - return Dolphin.configure(config); - }), - ); - - if (settings.get('Accounts_OAuth_Dolphin_URL')) { - const data = { - buttonLabelText: settings.get('Accounts_OAuth_Dolphin_button_label_text'), - buttonColor: settings.get('Accounts_OAuth_Dolphin_button_color'), - buttonLabelColor: settings.get('Accounts_OAuth_Dolphin_button_label_color'), - clientId: settings.get('Accounts_OAuth_Dolphin_id'), - secret: settings.get('Accounts_OAuth_Dolphin_secret'), - serverURL: settings.get('Accounts_OAuth_Dolphin_URL'), - loginStyle: settings.get('Accounts_OAuth_Dolphin_login_style'), - }; - - ServiceConfiguration.configurations.upsert({ service: 'dolphin' }, { $set: data }); - } - - callbacks.add('beforeCreateUser', DolphinOnCreateUser, callbacks.priority.HIGH, 'dolphin'); -} else { - Meteor.startup(() => - Tracker.autorun(function () { - if (settings.get('Accounts_OAuth_Dolphin_URL')) { - config.serverURL = settings.get('Accounts_OAuth_Dolphin_URL'); - return Dolphin.configure(config); - } - }), - ); -} diff --git a/app/drupal/lib/common.js b/app/drupal/lib/common.js deleted file mode 100644 index 4eea0cf99088..000000000000 --- a/app/drupal/lib/common.js +++ /dev/null @@ -1,44 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Tracker } from 'meteor/tracker'; - -import { settings } from '../../settings'; -import { CustomOAuth } from '../../custom-oauth'; - -// Drupal Server CallBack URL needs to be http(s)://{rocketchat.server}[:port]/_oauth/drupal -// In RocketChat -> Administration the URL needs to be http(s)://{drupal.server}/ - -const config = { - serverURL: '', - identityPath: '/oauth2/UserInfo', - authorizePath: '/oauth2/authorize', - tokenPath: '/oauth2/token', - scope: 'openid email profile offline_access', - tokenSentVia: 'payload', - usernameField: 'preferred_username', - mergeUsers: true, - addAutopublishFields: { - forLoggedInUser: ['services.drupal'], - forOtherUsers: ['services.drupal.name'], - }, - accessTokenParam: 'access_token', -}; - -const Drupal = new CustomOAuth('drupal', config); - -if (Meteor.isServer) { - Meteor.startup(function () { - settings.get('API_Drupal_URL', function (key, value) { - config.serverURL = value; - Drupal.configure(config); - }); - }); -} else { - Meteor.startup(function () { - Tracker.autorun(function () { - if (settings.get('API_Drupal_URL')) { - config.serverURL = settings.get('API_Drupal_URL'); - Drupal.configure(config); - } - }); - }); -} diff --git a/app/e2e/client/helper.js b/app/e2e/client/helper.js deleted file mode 100644 index d2c40ecd626b..000000000000 --- a/app/e2e/client/helper.js +++ /dev/null @@ -1,137 +0,0 @@ -/* eslint-disable new-cap, no-proto */ - -import ByteBuffer from 'bytebuffer'; - -const StaticArrayBufferProto = new ArrayBuffer().__proto__; - -export function toString(thing) { - if (typeof thing === 'string') { - return thing; - } - return new ByteBuffer.wrap(thing).toString('binary'); -} - -export function toArrayBuffer(thing) { - if (thing === undefined) { - return undefined; - } - if (thing === Object(thing)) { - if (thing.__proto__ === StaticArrayBufferProto) { - return thing; - } - } - - if (typeof thing !== 'string') { - throw new Error(`Tried to convert a non-string of type ${typeof thing} to an array buffer`); - } - return new ByteBuffer.wrap(thing, 'binary').toArrayBuffer(); -} - -export function joinVectorAndEcryptedData(vector, encryptedData) { - const cipherText = new Uint8Array(encryptedData); - const output = new Uint8Array(vector.length + cipherText.length); - output.set(vector, 0); - output.set(cipherText, vector.length); - return output; -} - -export function splitVectorAndEcryptedData(cipherText) { - const vector = cipherText.slice(0, 16); - const encryptedData = cipherText.slice(16); - - return [vector, encryptedData]; -} - -export async function encryptRSA(key, data) { - return crypto.subtle.encrypt({ name: 'RSA-OAEP' }, key, data); -} - -export async function encryptAES(vector, key, data) { - return crypto.subtle.encrypt({ name: 'AES-CBC', iv: vector }, key, data); -} - -export async function decryptRSA(key, data) { - return crypto.subtle.decrypt({ name: 'RSA-OAEP' }, key, data); -} - -export async function decryptAES(vector, key, data) { - return crypto.subtle.decrypt({ name: 'AES-CBC', iv: vector }, key, data); -} - -export async function generateAESKey() { - return crypto.subtle.generateKey({ name: 'AES-CBC', length: 128 }, true, ['encrypt', 'decrypt']); -} - -export async function generateRSAKey() { - return crypto.subtle.generateKey( - { - name: 'RSA-OAEP', - modulusLength: 2048, - publicExponent: new Uint8Array([0x01, 0x00, 0x01]), - hash: { name: 'SHA-256' }, - }, - true, - ['encrypt', 'decrypt'], - ); -} - -export async function exportJWKKey(key) { - return crypto.subtle.exportKey('jwk', key); -} - -export async function importRSAKey(keyData, keyUsages = ['encrypt', 'decrypt']) { - return crypto.subtle.importKey( - 'jwk', - keyData, - { - name: 'RSA-OAEP', - modulusLength: 2048, - publicExponent: new Uint8Array([0x01, 0x00, 0x01]), - hash: { name: 'SHA-256' }, - }, - true, - keyUsages, - ); -} - -export async function importAESKey(keyData, keyUsages = ['encrypt', 'decrypt']) { - return crypto.subtle.importKey('jwk', keyData, { name: 'AES-CBC' }, true, keyUsages); -} - -export async function importRawKey(keyData, keyUsages = ['deriveKey']) { - return crypto.subtle.importKey('raw', keyData, { name: 'PBKDF2' }, false, keyUsages); -} - -export async function deriveKey(salt, baseKey, keyUsages = ['encrypt', 'decrypt']) { - const iterations = 1000; - const hash = 'SHA-256'; - - return crypto.subtle.deriveKey({ name: 'PBKDF2', salt, iterations, hash }, baseKey, { name: 'AES-CBC', length: 256 }, true, keyUsages); -} - -export async function readFileAsArrayBuffer(file) { - return new Promise((resolve, reject) => { - const reader = new FileReader(); - reader.onload = function (evt) { - resolve(evt.target.result); - }; - reader.onerror = function (evt) { - reject(evt); - }; - reader.readAsArrayBuffer(file); - }); -} - -export class Deferred { - constructor() { - const p = new Promise((resolve, reject) => { - this.resolve = resolve; - this.reject = reject; - }); - - p.resolve = this.resolve; - p.reject = this.reject; - - return p; - } -} diff --git a/app/e2e/client/tabbar.ts b/app/e2e/client/tabbar.ts deleted file mode 100644 index 6793405b98e8..000000000000 --- a/app/e2e/client/tabbar.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { useMemo, useCallback } from 'react'; -import { useMutableCallback } from '@rocket.chat/fuselage-hooks'; - -import { addAction } from '../../../client/views/room/lib/Toolbox'; -import { useSetting } from '../../../client/contexts/SettingsContext'; -import { usePermission } from '../../../client/contexts/AuthorizationContext'; -import { useMethod } from '../../../client/contexts/ServerContext'; -import { useReactiveValue } from '../../../client/hooks/useReactiveValue'; -import { e2e } from './rocketchat.e2e'; - -addAction('e2e', ({ room }) => { - const e2eEnabled = useSetting('E2E_Enable'); - const e2eReady = useReactiveValue(useCallback(() => e2e.isReady(), [])) || room.encrypted; - const canToggleE2e = usePermission('toggle-room-e2e-encryption', room._id); - const canEditRoom = usePermission('edit-room', room._id); - const hasPermission = (room.t === 'd' || (canEditRoom && canToggleE2e)) && e2eReady; - - const toggleE2E = useMethod('saveRoomSettings'); - - const action = useMutableCallback(() => { - toggleE2E(room._id, 'encrypted', !room.encrypted); - }); - - const enabledOnRoom = !!room.encrypted; - - return useMemo( - () => - e2eEnabled && hasPermission - ? { - groups: ['direct', 'direct_multiple', 'group', 'team'], - id: 'e2e', - title: enabledOnRoom ? 'E2E_disable' : 'E2E_enable', - icon: 'key', - order: 13, - action, - } - : null, - [action, e2eEnabled, enabledOnRoom, hasPermission], - ); -}); diff --git a/app/e2e/server/index.js b/app/e2e/server/index.js deleted file mode 100644 index 767b153c4bc3..000000000000 --- a/app/e2e/server/index.js +++ /dev/null @@ -1,21 +0,0 @@ -import { callbacks } from '../../../lib/callbacks'; -import { Notifications } from '../../notifications'; - -import './settings'; -import './beforeCreateRoom'; -import './methods/setUserPublicAndPrivateKeys'; -import './methods/getUsersOfRoomWithoutKey'; -import './methods/updateGroupKey'; -import './methods/setRoomKeyID'; -import './methods/fetchMyKeys'; -import './methods/resetOwnE2EKey'; -import './methods/requestSubscriptionKeys'; - -callbacks.add( - 'afterJoinRoom', - (user, room) => { - Notifications.notifyRoom('e2e.keyRequest', room._id, room.e2eKeyId); - }, - callbacks.priority.MEDIUM, - 'e2e', -); diff --git a/app/emoji-custom/client/admin/startup.js b/app/emoji-custom/client/admin/startup.js deleted file mode 100644 index 4c3054862df6..000000000000 --- a/app/emoji-custom/client/admin/startup.js +++ /dev/null @@ -1,11 +0,0 @@ -import { registerAdminSidebarItem } from '../../../../client/views/admin'; -import { hasPermission } from '../../../authorization'; - -registerAdminSidebarItem({ - href: 'emoji-custom', - i18nLabel: 'Custom_Emoji', - icon: 'emoji', - permissionGranted() { - return hasPermission('manage-emoji'); - }, -}); diff --git a/app/emoji-custom/client/index.js b/app/emoji-custom/client/index.js deleted file mode 100644 index 8432b7675b3b..000000000000 --- a/app/emoji-custom/client/index.js +++ /dev/null @@ -1,4 +0,0 @@ -import './lib/emojiCustom'; -import './notifications/deleteEmojiCustom'; -import './notifications/updateEmojiCustom'; -import './admin/startup'; diff --git a/app/emoji-custom/server/methods/listEmojiCustom.js b/app/emoji-custom/server/methods/listEmojiCustom.js deleted file mode 100644 index d66aeee1a6ad..000000000000 --- a/app/emoji-custom/server/methods/listEmojiCustom.js +++ /dev/null @@ -1,9 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { EmojiCustom } from '../../../models/server/raw'; - -Meteor.methods({ - async listEmojiCustom(options = {}) { - return EmojiCustom.find(options).toArray(); - }, -}); diff --git a/app/emoji/lib/rocketchat.js b/app/emoji/lib/rocketchat.js deleted file mode 100644 index a6f45c6901a0..000000000000 --- a/app/emoji/lib/rocketchat.js +++ /dev/null @@ -1,33 +0,0 @@ -import { emojioneRender } from '../../emoji-emojione/lib/emojioneRender'; - -let EmojiPicker; -const removeFromRecent = (emoji) => { - if (!EmojiPicker) { - // since this function will be only called client side, the import needs to happen here - ({ EmojiPicker } = require('../client/lib/EmojiPicker')); - } - EmojiPicker.removeFromRecent(emoji.replace(/(^:|:$)/g, '')); -}; - -export const emoji = { - packages: { - base: { - emojiCategories: [{ key: 'recent', i18n: 'Frequently_Used' }], - categoryIndex: 0, - emojisByCategory: { - recent: [], - }, - toneList: {}, - render: emojioneRender, - renderPicker(emojiToRender) { - if (!emoji.list[emojiToRender]) { - removeFromRecent(emojiToRender); - return; - } - const correctPackage = emoji.list[emojiToRender].emojiPackage; - return emoji.packages[correctPackage].renderPicker(emojiToRender); - }, - }, - }, - list: {}, -}; diff --git a/app/favico/client/favico.js b/app/favico/client/favico.js deleted file mode 100644 index b85f9b4a4ee1..000000000000 --- a/app/favico/client/favico.js +++ /dev/null @@ -1,844 +0,0 @@ -/** - * @license MIT - * @fileOverview Favico animations - * @author Miroslav Magda, http://blog.ejci.net - * @version 0.3.10 - */ - -/** - * Create new favico instance - * @param {Object} Options - * @return {Object} Favico object - * @example - * var favico = new Favico({ - * bgColor : '#d00', - * textColor : '#fff', - * fontFamily : 'sans-serif', - * fontStyle : 'bold', - * position : 'down', - * type : 'circle', - * animation : 'slide', - * dataUrl: function(url){}, - * win: top - * }); - */ -/* eslint-disable */ - - export const Favico = (function(opt) { - 'use strict'; - opt = (opt) ? opt : {}; - var _def = { - bgColor: '#d00', - textColor: '#fff', - fontFamily: 'sans-serif', //Arial,Verdana,Times New Roman,serif,sans-serif,... - fontStyle: 'bold', //normal,italic,oblique,bold,bolder,lighter,100,200,300,400,500,600,700,800,900 - type: 'circle', - position: 'down', // down, up, left, leftup (upleft) - animation: 'slide', - elementId: false, - dataUrl: false, - win: window - }; - var _opt, _orig, _h, _w, _canvas, _context, _img, _ready, _lastBadge, _running, _readyCb, _stop, _browser, _animTimeout, _drawTimeout, _doc; - - _browser = {}; - _browser.ff = typeof InstallTrigger !== 'undefined'; - _browser.chrome = !!window.chrome; - _browser.opera = !!window.opera || navigator.userAgent.indexOf('Opera') >= 0; - _browser.ie = /*@cc_on!@*/ false; - _browser.safari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; - _browser.supported = (_browser.chrome || _browser.ff || _browser.opera); - - var _queue = []; - _readyCb = function() {}; - _ready = _stop = false; - /** - * Initialize favico - */ - var init = function() { - //merge initial options - _opt = merge(_def, opt); - _opt.bgColor = hexToRgb(_opt.bgColor); - _opt.textColor = hexToRgb(_opt.textColor); - _opt.position = _opt.position.toLowerCase(); - _opt.animation = (animation.types['' + _opt.animation]) ? _opt.animation : _def.animation; - - _doc = _opt.win.document; - - var isUp = _opt.position.indexOf('up') > -1; - var isLeft = _opt.position.indexOf('left') > -1; - - //transform the animations - if (isUp || isLeft) { - for (var a in animation.types) { - for (var i = 0; i < animation.types[a].length; i++) { - var step = animation.types[a][i]; - - if (isUp) { - if (step.y < 0.6) { - step.y = step.y - 0.4; - } else { - step.y = step.y - 2 * step.y + (1 - step.w); - } - } - - if (isLeft) { - if (step.x < 0.6) { - step.x = step.x - 0.4; - } else { - step.x = step.x - 2 * step.x + (1 - step.h); - } - } - - animation.types[a][i] = step; - } - } - } - _opt.type = (type['' + _opt.type]) ? _opt.type : _def.type; - - _orig = link.getIcons(); - //create temp canvas - _canvas = document.createElement('canvas'); - //create temp image - _img = document.createElement('img'); - var lastIcon = _orig[_orig.length - 1]; - if (lastIcon.hasAttribute('href')) { - _img.setAttribute('crossOrigin', 'anonymous'); - //get width/height - _img.onload = function() { - _h = (_img.height > 0) ? _img.height : 32; - _w = (_img.width > 0) ? _img.width : 32; - _canvas.height = _h; - _canvas.width = _w; - _context = _canvas.getContext('2d'); - icon.ready(); - }; - _img.setAttribute('src', lastIcon.getAttribute('href')); - } else { - _img.onload = function() { - _h = 32; - _w = 32; - _img.height = _h; - _img.width = _w; - _canvas.height = _h; - _canvas.width = _w; - _context = _canvas.getContext('2d'); - icon.ready(); - }; - _img.setAttribute('src', ''); - } - - }; - /** - * Icon namespace - */ - var icon = {}; - /** - * Icon is ready (reset icon) and start animation (if ther is any) - */ - icon.ready = function() { - _ready = true; - icon.reset(); - _readyCb(); - }; - /** - * Reset icon to default state - */ - icon.reset = function() { - //reset - if (!_ready) { - return; - } - _queue = []; - _lastBadge = false; - _running = false; - _context.clearRect(0, 0, _w, _h); - _context.drawImage(_img, 0, 0, _w, _h); - //_stop=true; - link.setIcon(_canvas); - //webcam('stop'); - //video('stop'); - window.clearTimeout(_animTimeout); - window.clearTimeout(_drawTimeout); - }; - /** - * Start animation - */ - icon.start = function() { - if (!_ready || _running) { - return; - } - var finished = function() { - _lastBadge = _queue[0]; - _running = false; - if (_queue.length > 0) { - _queue.shift(); - icon.start(); - } - }; - if (_queue.length > 0) { - _running = true; - var run = function() { - // apply options for this animation - ['type', 'animation', 'bgColor', 'textColor', 'fontFamily', 'fontStyle'].forEach(function(a) { - if (a in _queue[0].options) { - _opt[a] = _queue[0].options[a]; - } - }); - animation.run(_queue[0].options, function() { - finished(); - }, false); - }; - if (_lastBadge) { - animation.run(_lastBadge.options, function() { - run(); - }, true); - } else { - run(); - } - } - }; - - /** - * Badge types - */ - var type = {}; - var options = function(opt) { - opt.n = ((typeof opt.n) === 'number') ? Math.abs(opt.n | 0) : opt.n; - opt.x = _w * opt.x; - opt.y = _h * opt.y; - opt.w = _w * opt.w; - opt.h = _h * opt.h; - opt.len = ('' + opt.n).length; - return opt; - }; - /** - * Generate circle - * @param {Object} opt Badge options - */ - type.circle = function(opt) { - opt = options(opt); - var more = false; - if (opt.len === 2) { - opt.x = opt.x - opt.w * 0.4; - opt.w = opt.w * 1.4; - more = true; - } else if (opt.len >= 3) { - opt.x = opt.x - opt.w * 0.65; - opt.w = opt.w * 1.65; - more = true; - } - _context.clearRect(0, 0, _w, _h); - _context.drawImage(_img, 0, 0, _w, _h); - _context.beginPath(); - _context.font = _opt.fontStyle + ' ' + Math.floor(opt.h * (opt.n > 99 ? 0.85 : 1)) + 'px ' + _opt.fontFamily; - _context.textAlign = 'center'; - if (more) { - _context.moveTo(opt.x + opt.w / 2, opt.y); - _context.lineTo(opt.x + opt.w - opt.h / 2, opt.y); - _context.quadraticCurveTo(opt.x + opt.w, opt.y, opt.x + opt.w, opt.y + opt.h / 2); - _context.lineTo(opt.x + opt.w, opt.y + opt.h - opt.h / 2); - _context.quadraticCurveTo(opt.x + opt.w, opt.y + opt.h, opt.x + opt.w - opt.h / 2, opt.y + opt.h); - _context.lineTo(opt.x + opt.h / 2, opt.y + opt.h); - _context.quadraticCurveTo(opt.x, opt.y + opt.h, opt.x, opt.y + opt.h - opt.h / 2); - _context.lineTo(opt.x, opt.y + opt.h / 2); - _context.quadraticCurveTo(opt.x, opt.y, opt.x + opt.h / 2, opt.y); - } else { - _context.arc(opt.x + opt.w / 2, opt.y + opt.h / 2, opt.h / 2, 0, 2 * Math.PI); - } - _context.fillStyle = 'rgba(' + _opt.bgColor.r + ',' + _opt.bgColor.g + ',' + _opt.bgColor.b + ',' + opt.o + ')'; - _context.fill(); - _context.closePath(); - _context.beginPath(); - _context.stroke(); - _context.fillStyle = 'rgba(' + _opt.textColor.r + ',' + _opt.textColor.g + ',' + _opt.textColor.b + ',' + opt.o + ')'; - //_context.fillText((more) ? '9+' : opt.n, Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.15)); - if ((typeof opt.n) === 'number' && opt.n > 999) { - _context.fillText(((opt.n > 9999) ? 9 : Math.floor(opt.n / 1000)) + 'k+', Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.2)); - } else { - _context.fillText(opt.n, Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.15)); - } - _context.closePath(); - }; - /** - * Generate rectangle - * @param {Object} opt Badge options - */ - type.rectangle = function(opt) { - opt = options(opt); - var more = false; - if (opt.len === 2) { - opt.x = opt.x - opt.w * 0.4; - opt.w = opt.w * 1.4; - more = true; - } else if (opt.len >= 3) { - opt.x = opt.x - opt.w * 0.65; - opt.w = opt.w * 1.65; - more = true; - } - _context.clearRect(0, 0, _w, _h); - _context.drawImage(_img, 0, 0, _w, _h); - _context.beginPath(); - _context.font = _opt.fontStyle + ' ' + Math.floor(opt.h * (opt.n > 99 ? 0.9 : 1)) + 'px ' + _opt.fontFamily; - _context.textAlign = 'center'; - _context.fillStyle = 'rgba(' + _opt.bgColor.r + ',' + _opt.bgColor.g + ',' + _opt.bgColor.b + ',' + opt.o + ')'; - _context.fillRect(opt.x, opt.y, opt.w, opt.h); - _context.fillStyle = 'rgba(' + _opt.textColor.r + ',' + _opt.textColor.g + ',' + _opt.textColor.b + ',' + opt.o + ')'; - //_context.fillText((more) ? '9+' : opt.n, Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.15)); - if ((typeof opt.n) === 'number' && opt.n > 999) { - _context.fillText(((opt.n > 9999) ? 9 : Math.floor(opt.n / 1000)) + 'k+', Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.2)); - } else { - _context.fillText(opt.n, Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.15)); - } - _context.closePath(); - }; - - /** - * Set badge - */ - var badge = function(number, opts) { - opts = ((typeof opts) === 'string' ? { - animation: opts - } : opts) || {}; - _readyCb = function() { - try { - if (typeof(number) === 'number' ? (number > 0) : (number !== '')) { - var q = { - type: 'badge', - options: { - n: number - } - }; - if ('animation' in opts && animation.types['' + opts.animation]) { - q.options.animation = '' + opts.animation; - } - if ('type' in opts && type['' + opts.type]) { - q.options.type = '' + opts.type; - } - ['bgColor', 'textColor'].forEach(function(o) { - if (o in opts) { - q.options[o] = hexToRgb(opts[o]); - } - }); - ['fontStyle', 'fontFamily'].forEach(function(o) { - if (o in opts) { - q.options[o] = opts[o]; - } - }); - _queue.push(q); - if (_queue.length > 100) { - throw new Error('Too many badges requests in queue.'); - } - icon.start(); - } else { - icon.reset(); - } - } catch (e) { - throw new Error('Error setting badge. Message: ' + e.message); - } - }; - if (_ready) { - _readyCb(); - } - }; - - /** - * Set image as icon - */ - var image = function(imageElement) { - _readyCb = function() { - try { - var w = imageElement.width; - var h = imageElement.height; - var newImg = document.createElement('img'); - var ratio = (w / _w < h / _h) ? (w / _w) : (h / _h); - newImg.setAttribute('crossOrigin', 'anonymous'); - newImg.onload = function() { - _context.clearRect(0, 0, _w, _h); - _context.drawImage(newImg, 0, 0, _w, _h); - link.setIcon(_canvas); - }; - newImg.setAttribute('src', imageElement.getAttribute('src')); - newImg.height = (h / ratio); - newImg.width = (w / ratio); - } catch (e) { - throw new Error('Error setting image. Message: ' + e.message); - } - }; - if (_ready) { - _readyCb(); - } - }; - /** - * Set video as icon - */ - var video = function(videoElement) { - _readyCb = function() { - try { - if (videoElement === 'stop') { - _stop = true; - icon.reset(); - _stop = false; - return; - } - //var w = videoElement.width; - //var h = videoElement.height; - //var ratio = (w / _w < h / _h) ? (w / _w) : (h / _h); - videoElement.addEventListener('play', function() { - drawVideo(this); - }, false); - - } catch (e) { - throw new Error('Error setting video. Message: ' + e.message); - } - }; - if (_ready) { - _readyCb(); - } - }; - /** - * Set video as icon - */ - var webcam = function(action) { - //UR - if (!window.URL || !window.URL.createObjectURL) { - window.URL = window.URL || {}; - window.URL.createObjectURL = function(obj) { - return obj; - }; - } - if (_browser.supported) { - var newVideo = false; - navigator.getUserMedia = navigator.getUserMedia || navigator.oGetUserMedia || navigator.msGetUserMedia || navigator.mozGetUserMedia || navigator.webkitGetUserMedia; - _readyCb = function() { - try { - if (action === 'stop') { - _stop = true; - icon.reset(); - _stop = false; - return; - } - newVideo = document.createElement('video'); - newVideo.width = _w; - newVideo.height = _h; - navigator.getUserMedia({ - video: true, - audio: false - }, function(stream) { - newVideo.src = URL.createObjectURL(stream); - newVideo.play(); - drawVideo(newVideo); - }, function() {}); - } catch (e) { - throw new Error('Error setting webcam. Message: ' + e.message); - } - }; - if (_ready) { - _readyCb(); - } - } - - }; - - /** - * Draw video to context and repeat :) - */ - function drawVideo(video) { - if (video.paused || video.ended || _stop) { - return false; - } - //nasty hack for FF webcam (Thanks to Julian Ćwirko, kontakt@redsunmedia.pl) - try { - _context.clearRect(0, 0, _w, _h); - _context.drawImage(video, 0, 0, _w, _h); - } catch (e) { - - } - _drawTimeout = setTimeout(function() { - drawVideo(video); - }, animation.duration); - link.setIcon(_canvas); - } - - var link = {}; - /** - * Get icons from HEAD tag or create a new element - */ - link.getIcons = function() { - var elms = []; - //get link element - var getLinks = function() { - var icons = []; - var links = _doc.getElementsByTagName('head')[0].getElementsByTagName('link'); - for (var i = 0; i < links.length; i++) { - if ((/(^|\s)icon(\s|$)/i).test(links[i].getAttribute('rel'))) { - icons.push(links[i]); - } - } - return icons; - }; - if (_opt.element) { - elms = [_opt.element]; - } else if (_opt.elementId) { - //if img element identified by elementId - elms = [_doc.getElementById(_opt.elementId)]; - elms[0].setAttribute('href', elms[0].getAttribute('src')); - } else { - //if link element - elms = getLinks(); - if (elms.length === 0) { - elms = [_doc.createElement('link')]; - elms[0].setAttribute('rel', 'icon'); - _doc.getElementsByTagName('head')[0].appendChild(elms[0]); - } - } - elms.forEach(function(item) { - item.setAttribute('type', 'image/png'); - }); - return elms; - }; - link.setIcon = function(canvas) { - var url = canvas.toDataURL('image/png'); - if (_opt.dataUrl) { - //if using custom exporter - _opt.dataUrl(url); - } - if (_opt.element) { - _opt.element.setAttribute('href', url); - _opt.element.setAttribute('src', url); - } else if (_opt.elementId) { - //if is attached to element (image) - var elm = _doc.getElementById(_opt.elementId); - elm.setAttribute('href', url); - elm.setAttribute('src', url); - } else { - //if is attached to fav icon - if (_browser.ff || _browser.opera) { - //for FF we need to "recreate" element, atach to dom and remove old - //var originalType = _orig.getAttribute('rel'); - var old = _orig[_orig.length - 1]; - var newIcon = _doc.createElement('link'); - _orig = [newIcon]; - //_orig.setAttribute('rel', originalType); - if (_browser.opera) { - newIcon.setAttribute('rel', 'icon'); - } - newIcon.setAttribute('rel', 'icon'); - newIcon.setAttribute('type', 'image/png'); - _doc.getElementsByTagName('head')[0].appendChild(newIcon); - newIcon.setAttribute('href', url); - if (old.parentNode) { - old.parentNode.removeChild(old); - } - } else { - _orig.forEach(function(icon) { - icon.setAttribute('href', url); - }); - } - } - }; - - //http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb#answer-5624139 - //HEX to RGB convertor - function hexToRgb(hex) { - var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; - hex = hex.replace(shorthandRegex, function(m, r, g, b) { - return r + r + g + g + b + b; - }); - var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); - return result ? { - r: parseInt(result[1], 16), - g: parseInt(result[2], 16), - b: parseInt(result[3], 16) - } : false; - } - - /** - * Merge options - */ - function merge(def, opt) { - var mergedOpt = {}; - var attrname; - for (attrname in def) { - mergedOpt[attrname] = def[attrname]; - } - for (attrname in opt) { - mergedOpt[attrname] = opt[attrname]; - } - return mergedOpt; - } - - /** - * Cross-browser page visibility shim - * http://stackoverflow.com/questions/12536562/detect-whether-a-window-is-visible - */ - function isPageHidden() { - return _doc.hidden || _doc.msHidden || _doc.webkitHidden || _doc.mozHidden; - } - - /** - * @namespace animation - */ - var animation = {}; - /** - * Animation "frame" duration - */ - animation.duration = 40; - /** - * Animation types (none,fade,pop,slide) - */ - animation.types = {}; - animation.types.fade = [{ - x: 0.4, - y: 0.4, - w: 0.6, - h: 0.6, - o: 0.0 - }, { - x: 0.4, - y: 0.4, - w: 0.6, - h: 0.6, - o: 0.1 - }, { - x: 0.4, - y: 0.4, - w: 0.6, - h: 0.6, - o: 0.2 - }, { - x: 0.4, - y: 0.4, - w: 0.6, - h: 0.6, - o: 0.3 - }, { - x: 0.4, - y: 0.4, - w: 0.6, - h: 0.6, - o: 0.4 - }, { - x: 0.4, - y: 0.4, - w: 0.6, - h: 0.6, - o: 0.5 - }, { - x: 0.4, - y: 0.4, - w: 0.6, - h: 0.6, - o: 0.6 - }, { - x: 0.4, - y: 0.4, - w: 0.6, - h: 0.6, - o: 0.7 - }, { - x: 0.4, - y: 0.4, - w: 0.6, - h: 0.6, - o: 0.8 - }, { - x: 0.4, - y: 0.4, - w: 0.6, - h: 0.6, - o: 0.9 - }, { - x: 0.4, - y: 0.4, - w: 0.6, - h: 0.6, - o: 1.0 - }]; - animation.types.none = [{ - x: 0.4, - y: 0.4, - w: 0.6, - h: 0.6, - o: 1 - }]; - animation.types.pop = [{ - x: 1, - y: 1, - w: 0, - h: 0, - o: 1 - }, { - x: 0.9, - y: 0.9, - w: 0.1, - h: 0.1, - o: 1 - }, { - x: 0.8, - y: 0.8, - w: 0.2, - h: 0.2, - o: 1 - }, { - x: 0.7, - y: 0.7, - w: 0.3, - h: 0.3, - o: 1 - }, { - x: 0.6, - y: 0.6, - w: 0.4, - h: 0.4, - o: 1 - }, { - x: 0.5, - y: 0.5, - w: 0.5, - h: 0.5, - o: 1 - }, { - x: 0.4, - y: 0.4, - w: 0.6, - h: 0.6, - o: 1 - }]; - animation.types.popFade = [{ - x: 0.75, - y: 0.75, - w: 0, - h: 0, - o: 0 - }, { - x: 0.65, - y: 0.65, - w: 0.1, - h: 0.1, - o: 0.2 - }, { - x: 0.6, - y: 0.6, - w: 0.2, - h: 0.2, - o: 0.4 - }, { - x: 0.55, - y: 0.55, - w: 0.3, - h: 0.3, - o: 0.6 - }, { - x: 0.50, - y: 0.50, - w: 0.4, - h: 0.4, - o: 0.8 - }, { - x: 0.45, - y: 0.45, - w: 0.5, - h: 0.5, - o: 0.9 - }, { - x: 0.4, - y: 0.4, - w: 0.6, - h: 0.6, - o: 1 - }]; - animation.types.slide = [{ - x: 0.4, - y: 1, - w: 0.6, - h: 0.6, - o: 1 - }, { - x: 0.4, - y: 0.9, - w: 0.6, - h: 0.6, - o: 1 - }, { - x: 0.4, - y: 0.9, - w: 0.6, - h: 0.6, - o: 1 - }, { - x: 0.4, - y: 0.8, - w: 0.6, - h: 0.6, - o: 1 - }, { - x: 0.4, - y: 0.7, - w: 0.6, - h: 0.6, - o: 1 - }, { - x: 0.4, - y: 0.6, - w: 0.6, - h: 0.6, - o: 1 - }, { - x: 0.4, - y: 0.5, - w: 0.6, - h: 0.6, - o: 1 - }, { - x: 0.4, - y: 0.4, - w: 0.6, - h: 0.6, - o: 1 - }]; - /** - * Run animation - * @param {Object} opt Animation options - * @param {Object} cb Callabak after all steps are done - * @param {Object} revert Reverse order? true|false - * @param {Object} step Optional step number (frame bumber) - */ - animation.run = function(opt, cb, revert, step) { - var animationType = animation.types[isPageHidden() ? 'none' : _opt.animation]; - if (revert === true) { - step = (typeof step !== 'undefined') ? step : animationType.length - 1; - } else { - step = (typeof step !== 'undefined') ? step : 0; - } - cb = (cb) ? cb : function() {}; - if ((step < animationType.length) && (step >= 0)) { - type[_opt.type](merge(opt, animationType[step])); - _animTimeout = setTimeout(function() { - if (revert) { - step = step - 1; - } else { - step = step + 1; - } - animation.run(opt, cb, revert, step); - }, animation.duration); - - link.setIcon(_canvas); - } else { - cb(); - return; - } - }; - //auto init - init(); - return { - badge: badge, - video: video, - image: image, - webcam: webcam, - reset: icon.reset, - browser: { - supported: _browser.supported - } - }; - }); diff --git a/app/favico/client/index.js b/app/favico/client/index.js deleted file mode 100644 index 239a252e455c..000000000000 --- a/app/favico/client/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import { Favico } from './favico'; - -export { Favico }; diff --git a/app/federation/server/endpoints/uploads.js b/app/federation/server/endpoints/uploads.js deleted file mode 100644 index 146ac27517a4..000000000000 --- a/app/federation/server/endpoints/uploads.js +++ /dev/null @@ -1,28 +0,0 @@ -import { API } from '../../../api/server'; -import { Uploads } from '../../../models/server/raw'; -import { FileUpload } from '../../../file-upload/server'; -import { isFederationEnabled } from '../lib/isFederationEnabled'; - -API.v1.addRoute( - 'federation.uploads', - { authRequired: false }, - { - get() { - if (!isFederationEnabled()) { - return API.v1.failure('Federation not enabled'); - } - - const { upload_id } = this.requestParams(); - - const upload = Promise.await(Uploads.findOneById(upload_id)); - - if (!upload) { - return API.v1.failure('There is no such file in this server'); - } - - const buffer = FileUpload.getBufferSync(upload); - - return API.v1.success({ upload, buffer }); - }, - }, -); diff --git a/app/federation/server/functions/helpers.ts b/app/federation/server/functions/helpers.ts deleted file mode 100644 index 2c0442bb5665..000000000000 --- a/app/federation/server/functions/helpers.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { IRoom, isDirectMessageRoom } from '../../../../definition/IRoom'; -import { ISubscription } from '../../../../definition/ISubscription'; -import { IRegisterUser, IUser } from '../../../../definition/IUser'; -import { Subscriptions, Users } from '../../../models/server'; -import { Settings } from '../../../models/server/raw'; -import { STATUS_ENABLED, STATUS_REGISTERING } from '../constants'; - -export const getNameAndDomain = (fullyQualifiedName: string): string[] => fullyQualifiedName.split('@'); - -export const isFullyQualified = (name: string): boolean => name.indexOf('@') !== -1; - -export async function isRegisteringOrEnabled(): Promise { - const value = await Settings.getValueById('FEDERATION_Status'); - return typeof value === 'string' && [STATUS_ENABLED, STATUS_REGISTERING].includes(value); -} - -export async function updateStatus(status: string): Promise { - await Settings.updateValueById('FEDERATION_Status', status); -} - -export async function updateEnabled(enabled: boolean): Promise { - await Settings.updateValueById('FEDERATION_Enabled', enabled); -} - -export const checkRoomType = (room: IRoom): boolean => room.t === 'p' || room.t === 'd'; -export const checkRoomDomainsLength = (domains: unknown[]): boolean => domains.length <= (process.env.FEDERATED_DOMAINS_LENGTH || 10); - -export const hasExternalDomain = ({ federation }: { federation: { origin: string; domains: string[] } }): boolean => { - // same test as isFederated(room) - if (!federation) { - return false; - } - - return federation.domains.some((domain) => domain !== federation.origin); -}; - -export const isLocalUser = ({ federation }: { federation: { origin: string } }, localDomain: string): boolean => - !federation || federation.origin === localDomain; - -export const getFederatedRoomData = ( - room: IRoom, -): { - hasFederatedUser: boolean; - users: IUser[]; - subscriptions: { [k: string]: ISubscription } | undefined; -} => { - if (isDirectMessageRoom(room)) { - // Check if there is a federated user on this room - - return { - users: [], - hasFederatedUser: room.usernames.some(isFullyQualified), - subscriptions: undefined, - }; - } - - // Find all subscriptions of this room - const s = Subscriptions.findByRoomIdWhenUsernameExists(room._id).fetch() as ISubscription[]; - const subscriptions = s.reduce((acc, s) => { - acc[s.u._id] = s; - return acc; - }, {} as { [k: string]: ISubscription }); - - // Get all user ids - const userIds = Object.keys(subscriptions); - - // Load all the users - const users: IRegisterUser[] = Users.findUsersWithUsernameByIds(userIds).fetch(); - - // Check if there is a federated user on this room - const hasFederatedUser = users.some((u) => isFullyQualified(u.username)); - - return { - hasFederatedUser, - users, - subscriptions, - }; -}; diff --git a/app/federation/server/startup/generateKeys.js b/app/federation/server/startup/generateKeys.js deleted file mode 100644 index 5d5bbba64e00..000000000000 --- a/app/federation/server/startup/generateKeys.js +++ /dev/null @@ -1,8 +0,0 @@ -import { FederationKeys } from '../../../models/server/raw'; - -// Create key pair if needed -(async () => { - if (!(await FederationKeys.getPublicKey())) { - await FederationKeys.generateKeys(); - } -})(); diff --git a/app/federation/server/startup/settings.ts b/app/federation/server/startup/settings.ts deleted file mode 100644 index 317aabd6d9af..000000000000 --- a/app/federation/server/startup/settings.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { settingsRegistry, settings } from '../../../settings/server'; -import { updateStatus, updateEnabled, isRegisteringOrEnabled } from '../functions/helpers'; -import { getFederationDomain } from '../lib/getFederationDomain'; -import { getFederationDiscoveryMethod } from '../lib/getFederationDiscoveryMethod'; -import { registerWithHub } from '../lib/dns'; -import { enableCallbacks, disableCallbacks } from '../lib/callbacks'; -import { setupLogger } from '../lib/logger'; -import { FederationKeys } from '../../../models/server/raw'; -import { STATUS_ENABLED, STATUS_REGISTERING, STATUS_ERROR_REGISTERING, STATUS_DISABLED } from '../constants'; - -Meteor.startup(async function () { - const federationPublicKey = await FederationKeys.getPublicKeyString(); - - settingsRegistry.addGroup('Federation', function () { - this.add('FEDERATION_Enabled', false, { - type: 'boolean', - i18nLabel: 'Enabled', - i18nDescription: 'FEDERATION_Enabled', - alert: 'FEDERATION_Enabled_Alert', - public: true, - }); - - this.add('FEDERATION_Status', 'Disabled', { - readonly: true, - type: 'string', - i18nLabel: 'FEDERATION_Status', - }); - - this.add('FEDERATION_Domain', '', { - type: 'string', - i18nLabel: 'FEDERATION_Domain', - i18nDescription: 'FEDERATION_Domain_Description', - alert: 'FEDERATION_Domain_Alert', - // disableReset: true, - }); - - this.add('FEDERATION_Public_Key', federationPublicKey || '', { - readonly: true, - type: 'string', - multiline: true, - i18nLabel: 'FEDERATION_Public_Key', - i18nDescription: 'FEDERATION_Public_Key_Description', - }); - - this.add('FEDERATION_Discovery_Method', 'dns', { - type: 'select', - values: [ - { - key: 'dns', - i18nLabel: 'DNS', - }, - { - key: 'hub', - i18nLabel: 'Hub', - }, - ], - i18nLabel: 'FEDERATION_Discovery_Method', - i18nDescription: 'FEDERATION_Discovery_Method_Description', - public: true, - }); - - this.add('FEDERATION_Test_Setup', 'FEDERATION_Test_Setup', { - type: 'action', - actionText: 'FEDERATION_Test_Setup', - }); - }); -}); - -const updateSettings = async function (): Promise { - // Get the key pair - - if (getFederationDiscoveryMethod() === 'hub' && !Promise.await(isRegisteringOrEnabled())) { - // Register with hub - try { - await updateStatus(STATUS_REGISTERING); - - await registerWithHub(getFederationDomain(), settings.get('Site_Url'), await FederationKeys.getPublicKeyString()); - - await updateStatus(STATUS_ENABLED); - } catch (err) { - // Disable federation - await updateEnabled(false); - - await updateStatus(STATUS_ERROR_REGISTERING); - } - return; - } - await updateStatus(STATUS_ENABLED); -}; - -// Add settings listeners -settings.watch('FEDERATION_Enabled', function enableOrDisable(value) { - setupLogger.info(`Federation is ${value ? 'enabled' : 'disabled'}`); - - if (value) { - Promise.await(updateSettings()); - - enableCallbacks(); - } else { - Promise.await(updateStatus(STATUS_DISABLED)); - - disableCallbacks(); - } - - value && updateSettings(); -}); - -settings.watchMultiple(['FEDERATION_Discovery_Method', 'FEDERATION_Domain'], updateSettings); diff --git a/app/file-upload/server/lib/requests.js b/app/file-upload/server/lib/requests.js deleted file mode 100644 index e4d8bb2e36b4..000000000000 --- a/app/file-upload/server/lib/requests.js +++ /dev/null @@ -1,26 +0,0 @@ -import { WebApp } from 'meteor/webapp'; - -import { FileUpload } from './FileUpload'; -import { Uploads } from '../../../models/server/raw'; - -WebApp.connectHandlers.use(FileUpload.getPath(), async function (req, res, next) { - const match = /^\/([^\/]+)\/(.*)/.exec(req.url); - - if (match && match[1]) { - const file = await Uploads.findOneById(match[1]); - - if (file) { - if (!FileUpload.requestCanAccessFiles(req)) { - res.writeHead(403); - return res.end(); - } - - res.setHeader('Content-Security-Policy', "default-src 'none'"); - res.setHeader('Cache-Control', 'max-age=31536000'); - return FileUpload.get(file, req, res, next); - } - } - - res.writeHead(404); - res.end(); -}); diff --git a/app/file-upload/server/methods/getS3FileUrl.js b/app/file-upload/server/methods/getS3FileUrl.js deleted file mode 100644 index c2a05725ec72..000000000000 --- a/app/file-upload/server/methods/getS3FileUrl.js +++ /dev/null @@ -1,22 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { UploadFS } from 'meteor/jalik:ufs'; - -import { settings } from '../../../settings/server'; -import { Uploads } from '../../../models/server/raw'; - -let protectedFiles; - -settings.watch('FileUpload_ProtectFiles', function (value) { - protectedFiles = value; -}); - -Meteor.methods({ - async getS3FileUrl(fileId) { - if (protectedFiles && !Meteor.userId()) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'sendFileMessage' }); - } - const file = await Uploads.findOneById(fileId); - - return UploadFS.getStore('AmazonS3:Uploads').getRedirectURL(file); - }, -}); diff --git a/app/file-upload/server/startup/settings.ts b/app/file-upload/server/startup/settings.ts deleted file mode 100644 index 9c0ee808de85..000000000000 --- a/app/file-upload/server/startup/settings.ts +++ /dev/null @@ -1,283 +0,0 @@ -import { settingsRegistry } from '../../../settings/server'; - -settingsRegistry.addGroup('FileUpload', function () { - this.add('FileUpload_Enabled', true, { - type: 'boolean', - public: true, - }); - - this.add('FileUpload_MaxFileSize', 104857600, { - type: 'int', - public: true, - i18nDescription: 'FileUpload_MaxFileSizeDescription', - }); - - this.add('FileUpload_MediaTypeWhiteList', '', { - type: 'string', - public: true, - i18nDescription: 'FileUpload_MediaTypeWhiteListDescription', - }); - - this.add('FileUpload_MediaTypeBlackList', 'image/svg+xml', { - type: 'string', - public: true, - i18nDescription: 'FileUpload_MediaTypeBlackListDescription', - }); - - this.add('FileUpload_ProtectFiles', true, { - type: 'boolean', - public: true, - i18nDescription: 'FileUpload_ProtectFilesDescription', - }); - - this.add('FileUpload_RotateImages', true, { - type: 'boolean', - }); - - this.add('FileUpload_Enable_json_web_token_for_files', true, { - type: 'boolean', - i18nLabel: 'FileUpload_Enable_json_web_token_for_files', - i18nDescription: 'FileUpload_Enable_json_web_token_for_files_description', - enableQuery: { - _id: 'FileUpload_ProtectFiles', - value: true, - }, - }); - - this.add('FileUpload_json_web_token_secret_for_files', '', { - type: 'string', - i18nLabel: 'FileUpload_json_web_token_secret_for_files', - i18nDescription: 'FileUpload_json_web_token_secret_for_files_description', - enableQuery: { - _id: 'FileUpload_Enable_json_web_token_for_files', - value: true, - }, - }); - - this.add('FileUpload_Storage_Type', 'GridFS', { - type: 'select', - values: [ - { - key: 'GridFS', - i18nLabel: 'GridFS', - }, - { - key: 'AmazonS3', - i18nLabel: 'AmazonS3', - }, - { - key: 'GoogleCloudStorage', - i18nLabel: 'GoogleCloudStorage', - }, - { - key: 'Webdav', - i18nLabel: 'WebDAV', - }, - { - key: 'FileSystem', - i18nLabel: 'FileSystem', - }, - ], - public: true, - }); - - this.section('Amazon S3', function () { - this.add('FileUpload_S3_Bucket', '', { - type: 'string', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'AmazonS3', - }, - }); - this.add('FileUpload_S3_Acl', '', { - type: 'string', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'AmazonS3', - }, - }); - this.add('FileUpload_S3_AWSAccessKeyId', '', { - type: 'string', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'AmazonS3', - }, - secret: true, - }); - this.add('FileUpload_S3_AWSSecretAccessKey', '', { - type: 'string', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'AmazonS3', - }, - secret: true, - }); - this.add('FileUpload_S3_CDN', '', { - type: 'string', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'AmazonS3', - }, - }); - this.add('FileUpload_S3_Region', '', { - type: 'string', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'AmazonS3', - }, - }); - this.add('FileUpload_S3_BucketURL', '', { - type: 'string', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'AmazonS3', - }, - i18nDescription: 'Override_URL_to_which_files_are_uploaded_This_url_also_used_for_downloads_unless_a_CDN_is_given.', - secret: true, - }); - this.add('FileUpload_S3_SignatureVersion', 'v4', { - type: 'string', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'AmazonS3', - }, - }); - this.add('FileUpload_S3_ForcePathStyle', false, { - type: 'boolean', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'AmazonS3', - }, - }); - this.add('FileUpload_S3_URLExpiryTimeSpan', 120, { - type: 'int', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'AmazonS3', - }, - i18nDescription: 'FileUpload_S3_URLExpiryTimeSpan_Description', - }); - this.add('FileUpload_S3_Proxy_Avatars', false, { - type: 'boolean', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'AmazonS3', - }, - }); - this.add('FileUpload_S3_Proxy_Uploads', false, { - type: 'boolean', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'AmazonS3', - }, - }); - }); - - this.section('Google Cloud Storage', function () { - this.add('FileUpload_GoogleStorage_Bucket', '', { - type: 'string', - private: true, - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'GoogleCloudStorage', - }, - secret: true, - }); - this.add('FileUpload_GoogleStorage_AccessId', '', { - type: 'string', - private: true, - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'GoogleCloudStorage', - }, - secret: true, - }); - this.add('FileUpload_GoogleStorage_Secret', '', { - type: 'string', - multiline: true, - private: true, - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'GoogleCloudStorage', - }, - secret: true, - }); - this.add('FileUpload_GoogleStorage_Proxy_Avatars', false, { - type: 'boolean', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'GoogleCloudStorage', - }, - }); - this.add('FileUpload_GoogleStorage_Proxy_Uploads', false, { - type: 'boolean', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'GoogleCloudStorage', - }, - }); - }); - - this.section('File System', function () { - this.add('FileUpload_FileSystemPath', '', { - type: 'string', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'FileSystem', - }, - }); - }); - - this.section('WebDAV', function () { - this.add('FileUpload_Webdav_Upload_Folder_Path', '', { - type: 'string', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'Webdav', - }, - }); - this.add('FileUpload_Webdav_Server_URL', '', { - type: 'string', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'Webdav', - }, - }); - this.add('FileUpload_Webdav_Username', '', { - type: 'string', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'Webdav', - }, - secret: true, - }); - this.add('FileUpload_Webdav_Password', '', { - type: 'password', - private: true, - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'Webdav', - }, - secret: true, - }); - this.add('FileUpload_Webdav_Proxy_Avatars', false, { - type: 'boolean', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'Webdav', - }, - }); - this.add('FileUpload_Webdav_Proxy_Uploads', false, { - type: 'boolean', - enableQuery: { - _id: 'FileUpload_Storage_Type', - value: 'Webdav', - }, - }); - }); - - this.add('FileUpload_Enabled_Direct', true, { - type: 'boolean', - public: true, - }); -}); diff --git a/app/github-enterprise/lib/common.js b/app/github-enterprise/lib/common.js deleted file mode 100644 index 5cb6ef471cfe..000000000000 --- a/app/github-enterprise/lib/common.js +++ /dev/null @@ -1,39 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Tracker } from 'meteor/tracker'; - -import { CustomOAuth } from '../../custom-oauth'; -import { settings } from '../../settings'; - -// GitHub Enterprise Server CallBack URL needs to be http(s)://{rocketchat.server}[:port]/_oauth/github_enterprise -// In RocketChat -> Administration the URL needs to be http(s)://{github.enterprise.server}/ - -const config = { - serverURL: '', - identityPath: '/api/v3/user', - authorizePath: '/login/oauth/authorize', - tokenPath: '/login/oauth/access_token', - addAutopublishFields: { - forLoggedInUser: ['services.github-enterprise'], - forOtherUsers: ['services.github-enterprise.username'], - }, -}; - -const GitHubEnterprise = new CustomOAuth('github_enterprise', config); - -if (Meteor.isServer) { - Meteor.startup(function () { - settings.get('API_GitHub_Enterprise_URL', function (key, value) { - config.serverURL = value; - GitHubEnterprise.configure(config); - }); - }); -} else { - Meteor.startup(function () { - Tracker.autorun(function () { - if (settings.get('API_GitHub_Enterprise_URL')) { - config.serverURL = settings.get('API_GitHub_Enterprise_URL'); - GitHubEnterprise.configure(config); - } - }); - }); -} diff --git a/app/gitlab/lib/common.js b/app/gitlab/lib/common.js deleted file mode 100644 index fd4520a7337d..000000000000 --- a/app/gitlab/lib/common.js +++ /dev/null @@ -1,59 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Tracker } from 'meteor/tracker'; -import _ from 'underscore'; - -import { settings } from '../../settings'; -import { CustomOAuth } from '../../custom-oauth'; - -const config = { - serverURL: 'https://gitlab.com', - identityPath: '/api/v4/user', - scope: 'read_user', - mergeUsers: false, - addAutopublishFields: { - forLoggedInUser: ['services.gitlab'], - forOtherUsers: ['services.gitlab.username'], - }, - accessTokenParam: 'access_token', -}; - -const Gitlab = new CustomOAuth('gitlab', config); - -if (Meteor.isServer) { - Meteor.startup(function () { - const updateConfig = _.debounce(() => { - config.serverURL = settings.get('API_Gitlab_URL').trim().replace(/\/*$/, '') || config.serverURL; - config.identityPath = settings.get('Accounts_OAuth_Gitlab_identity_path') || config.identityPath; - config.mergeUsers = Boolean(settings.get('Accounts_OAuth_Gitlab_merge_users')); - Gitlab.configure(config); - }, 300); - - settings.get('API_Gitlab_URL', updateConfig); - settings.get('Accounts_OAuth_Gitlab_identity_path', updateConfig); - settings.get('Accounts_OAuth_Gitlab_merge_users', updateConfig); - }); -} else { - Meteor.startup(function () { - Tracker.autorun(function () { - let anyChange = false; - if (settings.get('API_Gitlab_URL')) { - config.serverURL = settings.get('API_Gitlab_URL').trim().replace(/\/*$/, ''); - anyChange = true; - } - - if (settings.get('Accounts_OAuth_Gitlab_identity_path')) { - config.identityPath = settings.get('Accounts_OAuth_Gitlab_identity_path').trim() || config.identityPath; - anyChange = true; - } - - if (settings.get('Accounts_OAuth_Gitlab_merge_users')) { - config.mergeUsers = true; - anyChange = true; - } - - if (anyChange) { - Gitlab.configure(config); - } - }); - }); -} diff --git a/app/highlight-words/client/helper.js b/app/highlight-words/client/helper.js deleted file mode 100644 index eeee154aa053..000000000000 --- a/app/highlight-words/client/helper.js +++ /dev/null @@ -1,38 +0,0 @@ -import { escapeRegExp } from '@rocket.chat/string-helpers'; - -export const checkHighlightedWordsInUrls = (msg, urlRegex) => msg.match(urlRegex); - -export const removeHighlightedUrls = (msg, highlight, urlMatches) => { - const highlightRegex = new RegExp(highlight, 'gmi'); - - return urlMatches.reduce((msg, match) => { - const withTemplate = match.replace(highlightRegex, `${highlight}`); - const regexWithTemplate = new RegExp(withTemplate, 'i'); - return msg.replace(regexWithTemplate, match); - }, msg); -}; - -const highlightTemplate = '$1$2$3'; - -export const getRegexHighlight = (highlight) => - new RegExp( - `(^|\\b|[\\s\\n\\r\\t.,،'\\\"\\+!?:-])(${escapeRegExp(highlight)})($|\\b|[\\s\\n\\r\\t.,،'\\\"\\+!?:-])(?![^<]*>|[^<>]*<\\/)`, - 'gmi', - ); - -export const getRegexHighlightUrl = (highlight) => - new RegExp( - `https?:\/\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)(${escapeRegExp( - highlight, - )})\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)`, - 'gmi', - ); - -export const highlightWords = (msg, highlights) => - highlights.reduce((msg, { highlight, regex, urlRegex }) => { - const urlMatches = checkHighlightedWordsInUrls(msg, urlRegex); - if (!urlMatches) { - return msg.replace(regex, highlightTemplate); - } - return removeHighlightedUrls(msg.replace(regex, highlightTemplate), highlight, urlMatches); - }, msg); diff --git a/app/importer-csv/server/importer.js b/app/importer-csv/server/importer.js deleted file mode 100644 index ce92a08c235d..000000000000 --- a/app/importer-csv/server/importer.js +++ /dev/null @@ -1,243 +0,0 @@ -import { Random } from 'meteor/random'; - -import { Base, ProgressStep, ImporterWebsocket } from '../../importer/server'; -import { Users } from '../../models/server'; - -export class CsvImporter extends Base { - constructor(info, importRecord) { - super(info, importRecord); - - this.csvParser = require('csv-parse/lib/sync'); - } - - prepareUsingLocalFile(fullFilePath) { - this.logger.debug('start preparing import operation'); - this.converter.clearImportData(); - - const zip = new this.AdmZip(fullFilePath); - const totalEntries = zip.getEntryCount(); - - ImporterWebsocket.progressUpdated({ rate: 0 }); - - let count = 0; - let oldRate = 0; - - const increaseProgressCount = () => { - try { - count++; - const rate = Math.floor((count * 1000) / totalEntries) / 10; - if (rate > oldRate) { - ImporterWebsocket.progressUpdated({ rate }); - oldRate = rate; - } - } catch (e) { - this.logger.error(e); - } - }; - - let messagesCount = 0; - let usersCount = 0; - let channelsCount = 0; - const dmRooms = new Map(); - const roomIds = new Map(); - const usedUsernames = new Set(); - const availableUsernames = new Set(); - - const getRoomId = (roomName) => { - if (!roomIds.has(roomName)) { - roomIds.set(roomName, Random.id()); - } - - return roomIds.get(roomName); - }; - - zip.forEach((entry) => { - this.logger.debug(`Entry: ${entry.entryName}`); - - // Ignore anything that has `__MACOSX` in it's name, as sadly these things seem to mess everything up - if (entry.entryName.indexOf('__MACOSX') > -1) { - this.logger.debug(`Ignoring the file: ${entry.entryName}`); - return increaseProgressCount(); - } - - // Directories are ignored, since they are "virtual" in a zip file - if (entry.isDirectory) { - this.logger.debug(`Ignoring the directory entry: ${entry.entryName}`); - return increaseProgressCount(); - } - - // Parse the channels - if (entry.entryName.toLowerCase() === 'channels.csv') { - super.updateProgress(ProgressStep.PREPARING_CHANNELS); - const parsedChannels = this.csvParser(entry.getData().toString()); - channelsCount = parsedChannels.length; - - for (const c of parsedChannels) { - const name = c[0].trim(); - const id = getRoomId(name); - const creator = c[1].trim(); - const isPrivate = c[2].trim().toLowerCase() === 'private'; - const members = c[3] - .trim() - .split(';') - .map((m) => m.trim()) - .filter((m) => m); - - this.converter.addChannel({ - importIds: [id], - u: { - _id: creator, - }, - name, - users: members, - t: isPrivate ? 'p' : 'c', - }); - } - - super.updateRecord({ 'count.channels': channelsCount }); - return increaseProgressCount(); - } - - // Parse the users - if (entry.entryName.toLowerCase() === 'users.csv') { - super.updateProgress(ProgressStep.PREPARING_USERS); - const parsedUsers = this.csvParser(entry.getData().toString()); - usersCount = parsedUsers.length; - - for (const u of parsedUsers) { - const username = u[0].trim(); - availableUsernames.add(username); - - const email = u[1].trim(); - const name = u[2].trim(); - - this.converter.addUser({ - importIds: [username], - emails: [email], - username, - name, - }); - } - - super.updateRecord({ 'count.users': parsedUsers.length }); - return increaseProgressCount(); - } - - // Parse the messages - if (entry.entryName.indexOf('/') > -1) { - if (this.progress.step !== ProgressStep.PREPARING_MESSAGES) { - super.updateProgress(ProgressStep.PREPARING_MESSAGES); - } - - const item = entry.entryName.split('/'); // random/messages.csv - const folderName = item[0]; // random - - let msgs = []; - - try { - msgs = this.csvParser(entry.getData().toString()); - } catch (e) { - this.logger.warn(`The file ${entry.entryName} contains invalid syntax`, e); - return increaseProgressCount(); - } - - let data; - const msgGroupData = item[1].split('.')[0]; // messages - let isDirect = false; - - if (folderName.toLowerCase() === 'directmessages') { - isDirect = true; - data = msgs.map((m) => ({ - username: m[0], - ts: m[2], - text: m[3], - otherUsername: m[1], - isDirect: true, - })); - } else { - data = msgs.map((m) => ({ username: m[0], ts: m[1], text: m[2] })); - } - - messagesCount += data.length; - const channelName = `${folderName}/${msgGroupData}`; - - super.updateRecord({ messagesstatus: channelName }); - - if (isDirect) { - for (const msg of data) { - const sourceId = [msg.username, msg.otherUsername].sort().join('/'); - - if (!dmRooms.has(sourceId)) { - this.converter.addChannel({ - importIds: [sourceId], - users: [msg.username, msg.otherUsername], - t: 'd', - }); - - dmRooms.set(sourceId, true); - } - - const newMessage = { - rid: sourceId, - u: { - _id: msg.username, - }, - ts: new Date(parseInt(msg.ts)), - msg: msg.text, - }; - - usedUsernames.add(msg.username); - usedUsernames.add(msg.otherUsername); - this.converter.addMessage(newMessage); - } - } else { - const rid = getRoomId(folderName); - - for (const msg of data) { - const newMessage = { - rid, - u: { - _id: msg.username, - }, - ts: new Date(parseInt(msg.ts)), - msg: msg.text, - }; - - usedUsernames.add(msg.username); - this.converter.addMessage(newMessage); - } - } - - super.updateRecord({ 'count.messages': messagesCount, 'messagesstatus': null }); - return increaseProgressCount(); - } - - increaseProgressCount(); - }); - - // Check if any of the message usernames was not in the imported list of users - for (const username of usedUsernames) { - if (availableUsernames.has(username)) { - continue; - } - - // Check if an user with that username already exists - const user = Users.findOneByUsername(username); - if (user && !user.importIds?.includes(username)) { - // Add the username to the local user's importIds so it can be found by the import process - // This way we can support importing new messages for existing users - Users.addImportIds(user._id, username); - } - } - - super.addCountToTotal(messagesCount + usersCount + channelsCount); - ImporterWebsocket.progressUpdated({ rate: 100 }); - - // Ensure we have at least a single user, channel, or message - if (usersCount === 0 && channelsCount === 0 && messagesCount === 0) { - this.logger.error('No users, channels, or messages found in the import file.'); - super.updateProgress(ProgressStep.ERROR); - return super.getProgress(); - } - } -} diff --git a/app/importer-hipchat-enterprise/server/importer.js b/app/importer-hipchat-enterprise/server/importer.js deleted file mode 100644 index c2c05c34032f..000000000000 --- a/app/importer-hipchat-enterprise/server/importer.js +++ /dev/null @@ -1,352 +0,0 @@ -import { Readable } from 'stream'; -import path from 'path'; -import fs from 'fs'; - -import { Meteor } from 'meteor/meteor'; - -import { Base, ProgressStep } from '../../importer/server'; - -export class HipChatEnterpriseImporter extends Base { - constructor(info, importRecord) { - super(info, importRecord); - - this.Readable = Readable; - this.zlib = require('zlib'); - this.tarStream = require('tar-stream'); - this.extract = this.tarStream.extract(); - this.path = path; - } - - parseData(data) { - const dataString = data.toString(); - try { - this.logger.debug('parsing file contents'); - return JSON.parse(dataString); - } catch (e) { - this.logger.error(e); - return false; - } - } - - async prepareUsersFile(file) { - super.updateProgress(ProgressStep.PREPARING_USERS); - let count = 0; - - for (const u of file) { - const newUser = { - emails: [], - importIds: [String(u.User.id)], - username: u.User.mention_name, - name: u.User.name, - avatarUrl: u.User.avatar && `data:image/png;base64,${u.User.avatar.replace(/\n/g, '')}`, - bio: u.User.title || undefined, - deleted: u.User.is_deleted, - type: 'user', - }; - count++; - - if (u.User.email) { - newUser.emails.push(u.User.email); - } - - this.converter.addUser(newUser); - } - - super.updateRecord({ 'count.users': count }); - super.addCountToTotal(count); - } - - async prepareRoomsFile(file) { - super.updateProgress(ProgressStep.PREPARING_CHANNELS); - let count = 0; - - for (const r of file) { - this.converter.addChannel({ - u: { - _id: r.Room.owner, - }, - importIds: [String(r.Room.id)], - name: r.Room.name, - users: r.Room.members, - t: r.Room.privacy === 'private' ? 'p' : 'c', - topic: r.Room.topic, - ts: new Date(r.Room.created), - archived: r.Room.is_archived, - }); - - count++; - } - - super.updateRecord({ 'count.channels': count }); - super.addCountToTotal(count); - } - - async prepareUserMessagesFile(file) { - this.logger.debug(`preparing room with ${file.length} messages `); - let count = 0; - const dmRooms = []; - - for (const m of file) { - if (!m.PrivateUserMessage) { - continue; - } - - // If the message id is already on the list, skip it - if (this.preparedMessages[m.PrivateUserMessage.id] !== undefined) { - continue; - } - this.preparedMessages[m.PrivateUserMessage.id] = true; - - const senderId = String(m.PrivateUserMessage.sender.id); - const receiverId = String(m.PrivateUserMessage.receiver.id); - const users = [senderId, receiverId].sort(); - - if (!dmRooms[receiverId]) { - dmRooms[receiverId] = this.converter.findDMForImportedUsers(senderId, receiverId); - - if (!dmRooms[receiverId]) { - const room = { - importIds: [users.join('')], - users, - t: 'd', - ts: new Date(m.PrivateUserMessage.timestamp.split(' ')[0]), - }; - this.converter.addChannel(room); - dmRooms[receiverId] = room; - } - } - - const rid = dmRooms[receiverId].importIds[0]; - const newMessage = this.convertImportedMessage(m.PrivateUserMessage, rid, 'private'); - count++; - this.converter.addMessage(newMessage); - } - - return count; - } - - get turndownService() { - const TurndownService = Promise.await(import('turndown')).default; - - const turndownService = new TurndownService({ - strongDelimiter: '*', - hr: '', - br: '\n', - }); - - turndownService.addRule('strikethrough', { - filter: 'img', - - replacement(content, node) { - const src = node.getAttribute('src') || ''; - const alt = node.alt || node.title || src; - return src ? `[${alt}](${src})` : ''; - }, - }); - - this.turndownService = turndownService; - - return turndownService; - } - - convertImportedMessage(importedMessage, rid, type) { - const idType = type === 'private' ? type : `${rid}-${type}`; - const newId = `hipchatenterprise-${idType}-${importedMessage.id}`; - - const newMessage = { - _id: newId, - rid, - ts: new Date(importedMessage.timestamp.split(' ')[0]), - u: { - _id: String(importedMessage.sender.id), - }, - }; - - const text = importedMessage.message; - - if (importedMessage.message_format === 'html') { - newMessage.msg = this.turndownService.turndown(text); - } else if (text.startsWith('/me ')) { - newMessage.msg = `${text.replace(/\/me /, '_')}_`; - } else { - newMessage.msg = text; - } - - if (importedMessage.attachment?.url) { - const fileId = `${importedMessage.id}-${importedMessage.attachment.name || 'attachment'}`; - - newMessage._importFile = { - downloadUrl: importedMessage.attachment.url, - id: `${fileId}`, - size: importedMessage.attachment.size || 0, - name: importedMessage.attachment.name, - external: false, - source: 'hipchat-enterprise', - original: { - ...importedMessage.attachment, - }, - }; - } - - return newMessage; - } - - async prepareRoomMessagesFile(file, rid) { - this.logger.debug(`preparing room with ${file.length} messages `); - let count = 0; - - for (const m of file) { - if (m.UserMessage) { - const newMessage = this.convertImportedMessage(m.UserMessage, rid, 'user'); - this.converter.addMessage(newMessage); - count++; - } else if (m.NotificationMessage) { - const newMessage = this.convertImportedMessage(m.NotificationMessage, rid, 'notif'); - newMessage.u._id = 'rocket.cat'; - newMessage.alias = m.NotificationMessage.sender; - - this.converter.addMessage(newMessage); - count++; - } else if (m.TopicRoomMessage) { - const newMessage = this.convertImportedMessage(m.TopicRoomMessage, rid, 'topic'); - newMessage.t = 'room_changed_topic'; - - this.converter.addMessage(newMessage); - count++; - } else if (m.ArchiveRoomMessage) { - this.logger.warn('Archived Room Notification was ignored.'); - } else if (m.GuestAccessMessage) { - this.logger.warn('Guess Access Notification was ignored.'); - } else { - this.logger.error("HipChat Enterprise importer isn't configured to handle this message:", m); - } - } - - return count; - } - - async prepareMessagesFile(file, info) { - super.updateProgress(ProgressStep.PREPARING_MESSAGES); - - const [type, id] = info.dir.split('/'); - const roomIdentifier = `${type}/${id}`; - - super.updateRecord({ messagesstatus: roomIdentifier }); - - switch (type) { - case 'users': - return this.prepareUserMessagesFile(file); - case 'rooms': - return this.prepareRoomMessagesFile(file, id); - default: - this.logger.error(`HipChat Enterprise importer isn't configured to handle "${type}" files (${info.dir}).`); - return 0; - } - } - - async prepareFile(info, data, fileName) { - const file = this.parseData(data); - if (file === false) { - this.logger.error('failed to parse data'); - return false; - } - - switch (info.base) { - case 'users.json': - await this.prepareUsersFile(file); - break; - case 'rooms.json': - await this.prepareRoomsFile(file); - break; - case 'history.json': - return this.prepareMessagesFile(file, info); - case 'emoticons.json': - case 'metadata.json': - break; - default: - this.logger.error(`HipChat Enterprise importer doesn't know what to do with the file "${fileName}"`); - break; - } - - return 0; - } - - prepareUsingLocalFile(fullFilePath) { - this.logger.debug('start preparing import operation'); - this.converter.clearImportData(); - - // HipChat duplicates direct messages (one for each user) - // This object will keep track of messages that have already been prepared so it doesn't try to do it twice - this.preparedMessages = {}; - let messageCount = 0; - - const promise = new Promise((resolve, reject) => { - this.extract.on( - 'entry', - Meteor.bindEnvironment((header, stream, next) => { - this.logger.debug(`new entry from import file: ${header.name}`); - if (!header.name.endsWith('.json')) { - stream.resume(); - return next(); - } - - const info = this.path.parse(header.name); - let pos = 0; - let data = Buffer.allocUnsafe(header.size); - - stream.on( - 'data', - Meteor.bindEnvironment((chunk) => { - data.fill(chunk, pos, pos + chunk.length); - pos += chunk.length; - }), - ); - - stream.on( - 'end', - Meteor.bindEnvironment(async () => { - this.logger.info(`Processing the file: ${header.name}`); - const newMessageCount = await this.prepareFile(info, data, header.name); - - messageCount += newMessageCount; - super.updateRecord({ 'count.messages': messageCount }); - super.addCountToTotal(newMessageCount); - - data = undefined; - - this.logger.debug('next import entry'); - next(); - }), - ); - - stream.on('error', () => next()); - stream.resume(); - }), - ); - - this.extract.on('error', (err) => { - this.logger.error('extract error:', err); - reject(new Meteor.Error('error-import-file-extract-error')); - }); - - this.extract.on( - 'finish', - Meteor.bindEnvironment(() => { - resolve(); - }), - ); - - const rs = fs.createReadStream(fullFilePath); - const gunzip = this.zlib.createGunzip(); - - gunzip.on('error', (err) => { - this.logger.error('extract error:', err); - reject(new Meteor.Error('error-import-file-extract-error')); - }); - this.logger.debug('start extracting import file'); - rs.pipe(gunzip).pipe(this.extract); - }); - - return promise; - } -} diff --git a/app/importer-pending-avatars/server/importer.js b/app/importer-pending-avatars/server/importer.js deleted file mode 100644 index 2726cb35401b..000000000000 --- a/app/importer-pending-avatars/server/importer.js +++ /dev/null @@ -1,74 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { Base, ProgressStep, Selection } from '../../importer/server'; -import { Users } from '../../models'; - -export class PendingAvatarImporter extends Base { - prepareFileCount() { - this.logger.debug('start preparing import operation'); - super.updateProgress(ProgressStep.PREPARING_STARTED); - - const users = Users.findAllUsersWithPendingAvatar(); - const fileCount = users.count(); - - if (fileCount === 0) { - super.updateProgress(ProgressStep.DONE); - return 0; - } - - this.updateRecord({ 'count.messages': fileCount, 'messagesstatus': null }); - this.addCountToTotal(fileCount); - - const fileData = new Selection(this.name, [], [], fileCount); - this.updateRecord({ fileData }); - - super.updateProgress(ProgressStep.IMPORTING_FILES); - Meteor.defer(() => { - this.startImport(fileData); - }); - - return fileCount; - } - - startImport() { - const pendingFileUserList = Users.findAllUsersWithPendingAvatar(); - try { - pendingFileUserList.forEach((user) => { - try { - const { _pendingAvatarUrl: url, name, _id } = user; - - try { - if (!url || !url.startsWith('http')) { - return; - } - - Meteor.runAsUser(_id, () => { - try { - Meteor.call('setAvatarFromService', url, undefined, 'url'); - Users.update({ _id }, { $unset: { _pendingAvatarUrl: '' } }); - } catch (error) { - this.logger.warn(`Failed to set ${name}'s avatar from url ${url}`); - } - }); - } finally { - this.addCountCompleted(1); - } - } catch (error) { - this.logger.error(error); - } - }); - } catch (error) { - // If the cursor expired, restart the method - if (error && error.codeName === 'CursorNotFound') { - this.logger.info('CursorNotFound'); - return this.startImport(); - } - - super.updateProgress(ProgressStep.ERROR); - throw error; - } - - super.updateProgress(ProgressStep.DONE); - return this.getProgress(); - } -} diff --git a/app/importer-pending-files/server/importer.js b/app/importer-pending-files/server/importer.js deleted file mode 100644 index a0f6899a3f9d..000000000000 --- a/app/importer-pending-files/server/importer.js +++ /dev/null @@ -1,210 +0,0 @@ -import https from 'https'; -import http from 'http'; - -import { Meteor } from 'meteor/meteor'; -import { Random } from 'meteor/random'; - -import { Base, ProgressStep, Selection } from '../../importer/server'; -import { Messages } from '../../models'; -import { FileUpload } from '../../file-upload'; - -export class PendingFileImporter extends Base { - constructor(info, importRecord) { - super(info, importRecord); - this.userTags = []; - this.bots = {}; - } - - prepareFileCount() { - this.logger.debug('start preparing import operation'); - super.updateProgress(ProgressStep.PREPARING_STARTED); - - const messages = Messages.findAllImportedMessagesWithFilesToDownload(); - const fileCount = messages.count(); - - if (fileCount === 0) { - super.updateProgress(ProgressStep.DONE); - return 0; - } - - this.updateRecord({ 'count.messages': fileCount, 'messagesstatus': null }); - this.addCountToTotal(fileCount); - - const fileData = new Selection(this.name, [], [], fileCount); - this.updateRecord({ fileData }); - - super.updateProgress(ProgressStep.IMPORTING_FILES); - Meteor.defer(() => { - this.startImport(fileData); - }); - - return fileCount; - } - - startImport() { - const pendingFileMessageList = Messages.findAllImportedMessagesWithFilesToDownload(); - const downloadedFileIds = []; - const maxFileCount = 10; - const maxFileSize = 1024 * 1024 * 500; - - let count = 0; - let currentSize = 0; - let nextSize = 0; - - const waitForFiles = () => { - if (count + 1 < maxFileCount && currentSize + nextSize < maxFileSize) { - return; - } - - Meteor.wrapAsync((callback) => { - const handler = setInterval(() => { - if (count + 1 >= maxFileCount) { - return; - } - - if (currentSize + nextSize >= maxFileSize && count > 0) { - return; - } - - clearInterval(handler); - callback(); - }, 1000); - })(); - }; - - const completeFile = (details) => { - this.addCountCompleted(1); - count--; - currentSize -= details.size; - }; - - const logError = (error) => { - this.logger.error(error); - }; - - try { - pendingFileMessageList.forEach((message) => { - try { - const { _importFile } = message; - - if (!_importFile || _importFile.downloaded || downloadedFileIds.includes(_importFile.id)) { - this.addCountCompleted(1); - return; - } - - const url = _importFile.downloadUrl; - if (!url || !url.startsWith('http')) { - this.addCountCompleted(1); - return; - } - - const details = { - message_id: `${message._id}-file-${_importFile.id}`, - name: _importFile.name || Random.id(), - size: _importFile.size || 0, - userId: message.u._id, - rid: message.rid, - }; - - const requestModule = /https/i.test(url) ? https : http; - const fileStore = FileUpload.getStore('Uploads'); - const reportProgress = this.reportProgress.bind(this); - - nextSize = details.size; - waitForFiles(); - count++; - currentSize += nextSize; - downloadedFileIds.push(_importFile.id); - - requestModule.get( - url, - Meteor.bindEnvironment(function (res) { - const contentType = res.headers['content-type']; - if (!details.type && contentType) { - details.type = contentType; - } - - const rawData = []; - res.on( - 'data', - Meteor.bindEnvironment((chunk) => { - rawData.push(chunk); - - // Update progress more often on large files - reportProgress(); - }), - ); - res.on( - 'error', - Meteor.bindEnvironment((error) => { - completeFile(details); - logError(error); - }), - ); - - res.on( - 'end', - Meteor.bindEnvironment(() => { - try { - // Bypass the fileStore filters - fileStore._doInsert(details, Buffer.concat(rawData), function (error, file) { - if (error) { - completeFile(details); - logError(error); - return; - } - - const url = FileUpload.getPath(`${file._id}/${encodeURI(file.name)}`); - const attachment = { - title: file.name, - title_link: url, - }; - - if (/^image\/.+/.test(file.type)) { - attachment.image_url = url; - attachment.image_type = file.type; - attachment.image_size = file.size; - attachment.image_dimensions = file.identify != null ? file.identify.size : undefined; - } - - if (/^audio\/.+/.test(file.type)) { - attachment.audio_url = url; - attachment.audio_type = file.type; - attachment.audio_size = file.size; - } - - if (/^video\/.+/.test(file.type)) { - attachment.video_url = url; - attachment.video_type = file.type; - attachment.video_size = file.size; - } - - Messages.setImportFileRocketChatAttachment(_importFile.id, url, attachment); - completeFile(details); - }); - } catch (error) { - completeFile(details); - logError(error); - } - }), - ); - }), - ); - } catch (error) { - this.logger.error(error); - } - }); - } catch (error) { - // If the cursor expired, restart the method - if (error && error.codeName === 'CursorNotFound') { - return this.startImport(); - } - - super.updateProgress(ProgressStep.ERROR); - throw error; - } - - super.updateProgress(ProgressStep.DONE); - return this.getProgress(); - } -} diff --git a/app/importer-slack-users/server/importer.js b/app/importer-slack-users/server/importer.js deleted file mode 100644 index 08c2992c766c..000000000000 --- a/app/importer-slack-users/server/importer.js +++ /dev/null @@ -1,180 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Accounts } from 'meteor/accounts-base'; -import { Random } from 'meteor/random'; - -import { RawImports, Base, ProgressStep, Selection, SelectionUser } from '../../importer/server'; -import { RocketChatFile } from '../../file'; -import { Users } from '../../models'; - -export class SlackUsersImporter extends Base { - constructor(info, importRecord) { - super(info, importRecord); - - this.csvParser = require('csv-parse/lib/sync'); - this.userMap = new Map(); - this.admins = []; // Array of ids of the users which are admins - } - - prepare(dataURI, sentContentType, fileName) { - super.prepare(dataURI, sentContentType, fileName, true); - - super.updateProgress(ProgressStep.PREPARING_USERS); - const uriResult = RocketChatFile.dataURIParse(dataURI); - const buf = Buffer.from(uriResult.image, 'base64'); - const parsed = this.csvParser(buf.toString()); - - parsed.forEach((user, index) => { - // Ignore the first column - if (index === 0) { - return; - } - - const id = Random.id(); - const username = user[0]; - const email = user[1]; - let isBot = false; - let isDeleted = false; - - switch (user[2]) { - case 'Admin': - this.admins.push(id); - break; - case 'Bot': - isBot = true; - break; - case 'Deactivated': - isDeleted = true; - break; - } - - this.userMap.set(id, new SelectionUser(id, username, email, isDeleted, isBot, true)); - }); - - const userArray = Array.from(this.userMap.values()); - - const usersId = this.collection.insert({ - import: this.importRecord._id, - importer: this.name, - type: 'users', - users: userArray, - }); - this.users = this.collection.findOne(usersId); - super.updateRecord({ 'count.users': this.userMap.size }); - super.addCountToTotal(this.userMap.size); - - if (this.userMap.size === 0) { - this.logger.error('No users found in the import file.'); - super.updateProgress(ProgressStep.ERROR); - return super.getProgress(); - } - - this.collection.insert({ - import: this.importRecord._id, - importer: this.name, - type: 'admins', - admins: this.admins, - }); - - super.updateProgress(ProgressStep.USER_SELECTION); - return new Selection(this.name, userArray, [], 0); - } - - startImport(importSelection) { - const admins = this.collection.findOne({ import: this.importRecord._id, type: 'admins' }); - if (admins) { - this.admins = admins.admins || []; - } else { - this.admins = []; - } - - this.users = RawImports.findOne({ import: this.importRecord._id, type: 'users' }); - // Recreate the userMap from the collection data - this.userMap = new Map(); - for (const user of this.users.users) { - const obj = new SelectionUser(); - for (const propName in user) { - if (user.hasOwnProperty(propName)) { - obj[propName] = user[propName]; - } - } - this.userMap.set(user.user_id, obj); - } - - this.reloadCount(); - - super.startImport(importSelection); - const started = Date.now(); - - for (const user of importSelection.users) { - const u = this.userMap.get(user.user_id); - u.do_import = user.do_import; - - this.userMap.set(user.user_id, u); - } - this.collection.update({ _id: this.users._id }, { $set: { users: Array.from(this.userMap.values()) } }); - - const startedByUserId = Meteor.userId(); - Meteor.defer(() => { - super.updateProgress(ProgressStep.IMPORTING_USERS); - - try { - for (const u of this.users.users) { - if (!u.do_import) { - continue; - } - - Meteor.runAsUser(startedByUserId, () => { - const existantUser = Users.findOneByEmailAddress(u.email) || Users.findOneByUsernameIgnoringCase(u.username); - - let userId; - if (existantUser) { - // since we have an existing user, let's try a few things - userId = existantUser._id; - u.rocketId = existantUser._id; - Users.update({ _id: u.rocketId }, { $addToSet: { importIds: u.user_id } }); - - Users.setEmail(existantUser._id, u.email); - Users.setEmailVerified(existantUser._id, u.email); - } else { - userId = Accounts.createUser({ - username: u.username + Random.id(), - password: Date.now() + u.name + u.email.toUpperCase(), - }); - - if (!userId) { - console.warn('An error happened while creating a user.'); - return; - } - - Meteor.runAsUser(userId, () => { - Meteor.call('setUsername', u.username, { joinDefaultChannelsSilenced: true }); - Users.setName(userId, u.name); - Users.update({ _id: userId }, { $addToSet: { importIds: u.user_id } }); - Users.setEmail(userId, u.email); - Users.setEmailVerified(userId, u.email); - u.rocketId = userId; - }); - } - - if (this.admins.includes(u.user_id)) { - Meteor.call('setAdminStatus', userId, true); - } - - super.addCountCompleted(1); - }); - } - - super.updateProgress(ProgressStep.FINISHING); - super.updateProgress(ProgressStep.DONE); - } catch (e) { - this.logger.error(e); - super.updateProgress(ProgressStep.ERROR); - } - - const timeTook = Date.now() - started; - this.logger.log(`Slack Users Import took ${timeTook} milliseconds.`); - }); - - return super.getProgress(); - } -} diff --git a/app/importer-slack/server/importer.js b/app/importer-slack/server/importer.js deleted file mode 100644 index e18c0bb696af..000000000000 --- a/app/importer-slack/server/importer.js +++ /dev/null @@ -1,590 +0,0 @@ -import _ from 'underscore'; - -import { Base, ProgressStep, ImporterWebsocket } from '../../importer/server'; -import { Messages, ImportData } from '../../models/server'; -import { settings } from '../../settings/server'; -import { MentionsParser } from '../../mentions/lib/MentionsParser'; -import { getUserAvatarURL } from '../../utils/lib/getUserAvatarURL'; - -export class SlackImporter extends Base { - parseData(data) { - const dataString = data.toString(); - try { - this.logger.debug('parsing file contents'); - return JSON.parse(dataString); - } catch (e) { - this.logger.error(e); - return false; - } - } - - prepareChannelsFile(entry) { - super.updateProgress(ProgressStep.PREPARING_CHANNELS); - const data = JSON.parse(entry.getData().toString()).filter((channel) => channel.creator != null); - - this.logger.debug(`loaded ${data.length} channels.`); - - this.addCountToTotal(data.length); - - for (const channel of data) { - this.converter.addChannel({ - _id: channel.is_general ? 'general' : undefined, - u: { - _id: this._replaceSlackUserId(channel.creator), - }, - importIds: [channel.id], - name: channel.name, - users: this._replaceSlackUserIds(channel.members), - t: 'c', - topic: channel.topic?.value || undefined, - description: channel.purpose?.value || undefined, - ts: channel.created ? new Date(channel.created * 1000) : undefined, - archived: channel.is_archived, - }); - } - - return data.length; - } - - prepareGroupsFile(entry) { - super.updateProgress(ProgressStep.PREPARING_CHANNELS); - const data = JSON.parse(entry.getData().toString()).filter((channel) => channel.creator != null); - - this.logger.debug(`loaded ${data.length} groups.`); - - this.addCountToTotal(data.length); - - for (const channel of data) { - this.converter.addChannel({ - u: { - _id: this._replaceSlackUserId(channel.creator), - }, - importIds: [channel.id], - name: channel.name, - users: this._replaceSlackUserIds(channel.members), - t: 'p', - topic: channel.topic?.value || undefined, - description: channel.purpose?.value || undefined, - ts: channel.created ? new Date(channel.created * 1000) : undefined, - archived: channel.is_archived, - }); - } - - return data.length; - } - - prepareMpimpsFile(entry) { - super.updateProgress(ProgressStep.PREPARING_CHANNELS); - const data = JSON.parse(entry.getData().toString()).filter((channel) => channel.creator != null); - - this.logger.debug(`loaded ${data.length} mpims.`); - - this.addCountToTotal(data.length); - - const maxUsers = settings.get('DirectMesssage_maxUsers') || 1; - - for (const channel of data) { - this.converter.addChannel({ - u: { - _id: this._replaceSlackUserId(channel.creator), - }, - importIds: [channel.id], - name: channel.name, - users: this._replaceSlackUserIds(channel.members), - t: channel.members.length > maxUsers ? 'p' : 'd', - topic: channel.topic?.value || undefined, - description: channel.purpose?.value || undefined, - ts: channel.created ? new Date(channel.created * 1000) : undefined, - archived: channel.is_archived, - }); - } - - return data.length; - } - - prepareDMsFile(entry) { - super.updateProgress(ProgressStep.PREPARING_CHANNELS); - const data = JSON.parse(entry.getData().toString()); - - this.logger.debug(`loaded ${data.length} dms.`); - - this.addCountToTotal(data.length); - for (const channel of data) { - this.converter.addChannel({ - importIds: [channel.id], - users: this._replaceSlackUserIds(channel.members), - t: 'd', - ts: channel.created ? new Date(channel.created * 1000) : undefined, - }); - } - - return data.length; - } - - prepareUsersFile(entry) { - super.updateProgress(ProgressStep.PREPARING_USERS); - const data = JSON.parse(entry.getData().toString()); - - this.logger.debug(`loaded ${data.length} users.`); - - // Insert the users record - this.updateRecord({ 'count.users': data.length }); - this.addCountToTotal(data.length); - - for (const user of data) { - const newUser = { - emails: [], - importIds: [user.id], - username: user.name, - name: user.profile.real_name, - utcOffset: user.tz_offset && user.tz_offset / 3600, - avatarUrl: user.profile.image_original || user.profile.image_512, - deleted: user.deleted, - statusText: user.profile.status_text || undefined, - bio: user.profile.title || undefined, - type: 'user', - }; - - if (user.profile.email) { - newUser.emails.push(user.profile.email); - } - - if (user.is_bot) { - newUser.roles = ['bot']; - newUser.type = 'bot'; - } - - this.converter.addUser(newUser); - } - } - - prepareUsingLocalFile(fullFilePath) { - this.logger.debug('start preparing import operation'); - this.converter.clearImportData(); - - const zip = new this.AdmZip(fullFilePath); - const totalEntries = zip.getEntryCount(); - - let messagesCount = 0; - let channelCount = 0; - let count = 0; - - ImporterWebsocket.progressUpdated({ rate: 0 }); - let oldRate = 0; - - const increaseProgress = () => { - try { - count++; - const rate = Math.floor((count * 1000) / totalEntries) / 10; - if (rate > oldRate) { - ImporterWebsocket.progressUpdated({ rate }); - oldRate = rate; - } - } catch (e) { - this.logger.error(e); - } - }; - - try { - // we need to iterate the zip file twice so that all channels are loaded before the messages - - zip.forEach((entry) => { - try { - if (entry.entryName === 'channels.json') { - channelCount += this.prepareChannelsFile(entry); - this.updateRecord({ 'count.channels': channelCount }); - return increaseProgress(); - } - - if (entry.entryName === 'groups.json') { - channelCount += this.prepareGroupsFile(entry); - this.updateRecord({ 'count.channels': channelCount }); - return increaseProgress(); - } - - if (entry.entryName === 'mpims.json') { - channelCount += this.prepareMpimpsFile(entry); - this.updateRecord({ 'count.channels': channelCount }); - return increaseProgress(); - } - - if (entry.entryName === 'dms.json') { - channelCount += this.prepareDMsFile(entry); - this.updateRecord({ 'count.channels': channelCount }); - return increaseProgress(); - } - - if (entry.entryName === 'users.json') { - this.prepareUsersFile(entry); - return increaseProgress(); - } - } catch (e) { - this.logger.error(e); - } - }); - - const missedTypes = {}; - // If we have no slack message yet, then we can insert them instead of upserting - this._useUpsert = !Messages.findOne({ _id: /slack\-.*/ }); - - zip.forEach((entry) => { - try { - if (entry.entryName.includes('__MACOSX') || entry.entryName.includes('.DS_Store')) { - count++; - return this.logger.debug(`Ignoring the file: ${entry.entryName}`); - } - - if (['channels.json', 'groups.json', 'mpims.json', 'dms.json', 'users.json'].includes(entry.entryName)) { - return; - } - - if (!entry.isDirectory && entry.entryName.includes('/')) { - const item = entry.entryName.split('/'); - - const channel = item[0]; - const date = item[1].split('.')[0]; - - try { - // Insert the messages records - if (this.progress.step !== ProgressStep.PREPARING_MESSAGES) { - super.updateProgress(ProgressStep.PREPARING_MESSAGES); - } - - const tempMessages = JSON.parse(entry.getData().toString()); - messagesCount += tempMessages.length; - this.updateRecord({ messagesstatus: `${channel}/${date}` }); - this.addCountToTotal(tempMessages.length); - - const slackChannelId = ImportData.findChannelImportIdByNameOrImportId(channel); - - if (slackChannelId) { - for (const message of tempMessages) { - this.prepareMessageObject(message, missedTypes, slackChannelId); - } - } - } catch (error) { - this.logger.warn(`${entry.entryName} is not a valid JSON file! Unable to import it.`); - } - } - } catch (e) { - this.logger.error(e); - } - - increaseProgress(); - }); - - if (!_.isEmpty(missedTypes)) { - this.logger.info('Missed import types:', missedTypes); - } - } catch (e) { - this.logger.error(e); - throw e; - } - - ImporterWebsocket.progressUpdated({ rate: 100 }); - this.updateRecord({ 'count.messages': messagesCount, 'messagesstatus': null }); - } - - parseMentions(newMessage) { - const mentionsParser = new MentionsParser({ - pattern: () => settings.get('UTF8_User_Names_Validation'), - useRealName: () => settings.get('UI_Use_Real_Name'), - me: () => 'me', - }); - - const users = mentionsParser - .getUserMentions(newMessage.msg) - .filter((u) => u) - .map((uid) => this._replaceSlackUserId(uid.slice(1, uid.length))); - if (users.length) { - if (!newMessage.mentions) { - newMessage.mentions = []; - } - newMessage.mentions.push(...users); - } - - const channels = mentionsParser - .getChannelMentions(newMessage.msg) - .filter((c) => c) - .map((name) => name.slice(1, name.length)); - if (channels.length) { - if (!newMessage.channels) { - newMessage.channels = []; - } - newMessage.channels.push(...channels); - } - } - - processMessageSubType(message, slackChannelId, newMessage, missedTypes) { - const ignoreTypes = { bot_add: true, file_comment: true, file_mention: true }; - - switch (message.subtype) { - case 'channel_join': - case 'group_join': - newMessage.t = 'uj'; - newMessage.groupable = false; - return true; - case 'channel_leave': - case 'group_leave': - newMessage.t = 'ul'; - newMessage.groupable = false; - return true; - case 'channel_purpose': - case 'group_purpose': - newMessage.t = 'room_changed_description'; - newMessage.groupable = false; - newMessage.msg = message.purpose; - return true; - case 'channel_topic': - case 'group_topic': - newMessage.t = 'room_changed_topic'; - newMessage.groupable = false; - newMessage.msg = message.topic; - return true; - case 'channel_name': - case 'group_name': - newMessage.t = 'r'; - newMessage.msg = message.name; - newMessage.groupable = false; - return true; - case 'pinned_item': - if (message.attachments) { - if (!newMessage.attachments) { - newMessage.attachments = []; - } - newMessage.attachments.push({ - text: this.convertSlackMessageToRocketChat(message.attachments[0].text), - author_name: message.attachments[0].author_subname, - author_icon: getUserAvatarURL(message.attachments[0].author_subname), - }); - newMessage.t = 'message_pinned'; - } - break; - case 'file_share': - if (message.file?.url_private_download) { - const fileId = this.makeSlackMessageId(slackChannelId, message.ts, 'share'); - const fileMessage = { - _id: fileId, - rid: newMessage.rid, - ts: newMessage.ts, - msg: message.file.url_private_download || '', - _importFile: this.convertSlackFileToPendingFile(message.file), - u: { - _id: newMessage.u._id, - }, - }; - - if (message.thread_ts && message.thread_ts !== message.ts) { - fileMessage.tmid = this.makeSlackMessageId(slackChannelId, message.thread_ts); - } - - this.converter.addMessage(fileMessage, this._useUpsert); - } - break; - - default: - if (!missedTypes[message.subtype] && !ignoreTypes[message.subtype]) { - missedTypes[message.subtype] = message; - } - break; - } - } - - makeSlackMessageId(channelId, ts, fileIndex = undefined) { - const base = `slack-${channelId}-${ts.replace(/\./g, '-')}`; - - if (fileIndex) { - return `${base}-file${fileIndex}`; - } - - return base; - } - - prepareMessageObject(message, missedTypes, slackChannelId) { - const id = this.makeSlackMessageId(slackChannelId, message.ts); - const newMessage = { - _id: id, - rid: slackChannelId, - ts: new Date(parseInt(message.ts.split('.')[0]) * 1000), - u: { - _id: this._replaceSlackUserId(message.user), - }, - }; - - // Process the reactions - if (message.reactions && message.reactions.length > 0) { - newMessage.reactions = new Map(); - - message.reactions.forEach((reaction) => { - const name = `:${reaction.name}:`; - if (reaction.users && reaction.users.length) { - newMessage.reactions.set(name, { - name, - users: this._replaceSlackUserIds(reaction.users), - }); - } - }); - } - - if (message.type === 'message') { - if (message.files) { - let fileIndex = 0; - message.files.forEach((file) => { - fileIndex++; - - const fileId = this.makeSlackMessageId(slackChannelId, message.ts, fileIndex); - const fileMessage = { - _id: fileId, - rid: slackChannelId, - ts: newMessage.ts, - msg: file.url_private_download || '', - _importFile: this.convertSlackFileToPendingFile(file), - u: { - _id: this._replaceSlackUserId(message.user), - }, - }; - - if (message.thread_ts && message.thread_ts !== message.ts) { - fileMessage.tmid = this.makeSlackMessageId(slackChannelId, message.thread_ts); - } - - this.converter.addMessage(fileMessage, this._useUpsert); - }); - } - - const regularTypes = ['me_message', 'thread_broadcast']; - - const isBotMessage = message.subtype && ['bot_message', 'slackbot_response'].includes(message.subtype); - - if (message.subtype && !regularTypes.includes(message.subtype) && !isBotMessage) { - if (this.processMessageSubType(message, slackChannelId, newMessage, missedTypes)) { - this.converter.addMessage(newMessage, this._useUpsert); - } - } else { - const text = this.convertSlackMessageToRocketChat(message.text); - - if (isBotMessage) { - newMessage.bot = true; - } - - if (message.subtype === 'me_message') { - newMessage.msg = `_${text}_`; - } else { - newMessage.msg = text; - } - - if (message.thread_ts) { - if (message.thread_ts === message.ts) { - if (message.reply_users) { - const replies = new Set(); - message.reply_users.forEach((item) => { - replies.add(this._replaceSlackUserId(item)); - }); - - if (replies.length) { - newMessage.replies = Array.from(replies); - } - } else if (message.replies) { - const replies = new Set(); - message.repĺies.forEach((item) => { - replies.add(this._replaceSlackUserId(item.user)); - }); - - if (replies.length) { - newMessage.replies = Array.from(replies); - } - } else { - this.logger.warn(`Failed to import the parent comment, message: ${newMessage._id}. Missing replies/reply_users field`); - } - - newMessage.tcount = message.reply_count; - newMessage.tlm = new Date(parseInt(message.latest_reply.split('.')[0]) * 1000); - } else { - newMessage.tmid = this.makeSlackMessageId(slackChannelId, message.thread_ts); - } - } - - if (message.edited) { - newMessage.editedAt = new Date(parseInt(message.edited.ts.split('.')[0]) * 1000); - if (message.edited.user) { - newMessage.editedBy = this._replaceSlackUserId(message.edited.user); - } - } - - if (message.attachments) { - newMessage.attachments = this.convertMessageAttachments(message.attachments); - } - - if (message.icons && message.icons.emoji) { - newMessage.emoji = message.icons.emoji; - } - - this.parseMentions(newMessage); - this.converter.addMessage(newMessage, this._useUpsert); - } - } - } - - _replaceSlackUserId(userId) { - if (userId === 'USLACKBOT') { - return 'rocket.cat'; - } - - return userId; - } - - _replaceSlackUserIds(members) { - return members.map((userId) => this._replaceSlackUserId(userId)); - } - - convertSlackMessageToRocketChat(message) { - if (message) { - message = message.replace(//g, '@all'); - message = message.replace(//g, '@all'); - message = message.replace(//g, '@here'); - message = message.replace(/>/g, '>'); - message = message.replace(/</g, '<'); - message = message.replace(/&/g, '&'); - message = message.replace(/:simple_smile:/g, ':smile:'); - message = message.replace(/:memo:/g, ':pencil:'); - message = message.replace(/:piggy:/g, ':pig:'); - message = message.replace(/:uk:/g, ':gb:'); - message = message.replace(/<(http[s]?:[^>|]*)>/g, '$1'); - message = message.replace(/<(http[s]?:[^|]*)\|([^>]*)>/g, '[$2]($1)'); - message = message.replace(/<#([^|]*)\|([^>]*)>/g, '#$2'); - message = message.replace(/<@([^|]*)\|([^>]*)>/g, '@$1'); - message = message.replace(/<@([^|>]*)>/g, '@$1'); - } else { - message = ''; - } - - return message; - } - - convertSlackFileToPendingFile(file) { - return { - downloadUrl: file.url_private_download, - id: file.id, - size: file.size, - name: file.name, - external: file.is_external, - source: 'slack', - original: { - ...file, - }, - }; - } - - convertMessageAttachments(attachments) { - if (!attachments || !attachments.length) { - return attachments; - } - - return attachments.map((attachment) => ({ - ...attachment, - text: this.convertSlackMessageToRocketChat(attachment.text), - title: this.convertSlackMessageToRocketChat(attachment.title), - fallback: this.convertSlackMessageToRocketChat(attachment.fallback), - })); - } -} diff --git a/app/importer/server/definitions/IConversionCallbacks.ts b/app/importer/server/definitions/IConversionCallbacks.ts deleted file mode 100644 index aa4a1fc5b2f1..000000000000 --- a/app/importer/server/definitions/IConversionCallbacks.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { IImportUser } from '../../../../definition/IImportUser'; -import { IImportMessage } from '../../../../definition/IImportMessage'; -import { IImportChannel } from '../../../../definition/IImportChannel'; - -export type ImporterBeforeImportCallback = { - (data: IImportUser | IImportChannel | IImportMessage, type: string): boolean; -}; -export type ImporterAfterImportCallback = { - (data: IImportUser | IImportChannel | IImportMessage, type: string, isNewRecord: boolean): void; -}; - -export interface IConversionCallbacks { - beforeImportFn?: ImporterBeforeImportCallback; - afterImportFn?: ImporterAfterImportCallback; -} diff --git a/app/importer/server/index.js b/app/importer/server/index.js deleted file mode 100644 index ea11c7c25786..000000000000 --- a/app/importer/server/index.js +++ /dev/null @@ -1,20 +0,0 @@ -import { Base } from './classes/ImporterBase'; -import { ImporterWebsocket } from './classes/ImporterWebsocket'; -import { Progress } from './classes/ImporterProgress'; -import { RawImports } from './models/RawImports'; -import { Selection } from './classes/ImporterSelection'; -import { SelectionChannel } from './classes/ImporterSelectionChannel'; -import { SelectionUser } from './classes/ImporterSelectionUser'; -import { ProgressStep } from '../lib/ImporterProgressStep'; -import { ImporterInfo } from '../lib/ImporterInfo'; -import { Importers } from '../lib/Importers'; -import './methods/getImportProgress'; -import './methods/startImport'; -import './methods/uploadImportFile'; -import './methods/getImportFileData'; -import './methods/downloadPublicImportFile'; -import './methods/getLatestImportOperations'; -import './startup/setImportsToInvalid'; -import './startup/store'; - -export { Base, Importers, ImporterInfo, ImporterWebsocket, Progress, ProgressStep, RawImports, Selection, SelectionChannel, SelectionUser }; diff --git a/app/importer/server/methods/downloadPublicImportFile.js b/app/importer/server/methods/downloadPublicImportFile.js deleted file mode 100644 index 6424c633bdbe..000000000000 --- a/app/importer/server/methods/downloadPublicImportFile.js +++ /dev/null @@ -1,98 +0,0 @@ -import http from 'http'; -import https from 'https'; -import fs from 'fs'; - -import { Meteor } from 'meteor/meteor'; - -import { RocketChatImportFileInstance } from '../startup/store'; -import { ProgressStep } from '../../lib/ImporterProgressStep'; -import { hasPermission } from '../../../authorization'; -import { Importers } from '..'; - -function downloadHttpFile(fileUrl, writeStream) { - const protocol = fileUrl.startsWith('https') ? https : http; - protocol.get(fileUrl, function (response) { - response.pipe(writeStream); - }); -} - -function copyLocalFile(filePath, writeStream) { - const readStream = fs.createReadStream(filePath); - readStream.pipe(writeStream); -} - -Meteor.methods({ - downloadPublicImportFile(fileUrl, importerKey) { - const userId = Meteor.userId(); - - if (!userId) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { - method: 'downloadPublicImportFile', - }); - } - - if (!hasPermission(userId, 'run-import')) { - throw new Meteor.Error('error-action-not-allowed', 'Importing is not allowed', { - method: 'downloadPublicImportFile', - }); - } - - const importer = Importers.get(importerKey); - if (!importer) { - throw new Meteor.Error('error-importer-not-defined', `The importer (${importerKey}) has no import class defined.`, { - method: 'downloadPublicImportFile', - }); - } - - const isUrl = fileUrl.startsWith('http'); - - // Check if it's a valid url or path before creating a new import record - if (!isUrl) { - if (!fs.existsSync(fileUrl)) { - throw new Meteor.Error('error-import-file-missing', fileUrl, { - method: 'downloadPublicImportFile', - }); - } - } - - importer.instance = new importer.importer(importer); // eslint-disable-line new-cap - - const oldFileName = fileUrl.substring(fileUrl.lastIndexOf('/') + 1); - const date = new Date(); - const dateStr = `${date.getUTCFullYear()}${date.getUTCMonth()}${date.getUTCDate()}${date.getUTCHours()}${date.getUTCMinutes()}${date.getUTCSeconds()}`; - const newFileName = `${dateStr}_${userId}_${oldFileName}`; - - // Store the file name on the imports collection - importer.instance.startFileUpload(newFileName); - importer.instance.updateProgress(ProgressStep.DOWNLOADING_FILE); - - const writeStream = RocketChatImportFileInstance.createWriteStream(newFileName); - - writeStream.on( - 'error', - Meteor.bindEnvironment(() => { - importer.instance.updateProgress(ProgressStep.ERROR); - }), - ); - - writeStream.on( - 'end', - Meteor.bindEnvironment(() => { - importer.instance.updateProgress(ProgressStep.FILE_LOADED); - }), - ); - - if (isUrl) { - downloadHttpFile(fileUrl, writeStream); - } else { - // If the url is actually a folder path on the current machine, skip moving it to the file store - if (fs.statSync(fileUrl).isDirectory()) { - importer.instance.updateRecord({ file: fileUrl }); - importer.instance.updateProgress(ProgressStep.FILE_LOADED); - return; - } - - copyLocalFile(fileUrl, writeStream); - } - }, -}); diff --git a/app/importer/server/methods/getImportFileData.js b/app/importer/server/methods/getImportFileData.js deleted file mode 100644 index 32c9aa6d0cd3..000000000000 --- a/app/importer/server/methods/getImportFileData.js +++ /dev/null @@ -1,77 +0,0 @@ -import path from 'path'; -import fs from 'fs'; - -import { Meteor } from 'meteor/meteor'; - -import { RocketChatImportFileInstance } from '../startup/store'; -import { hasPermission } from '../../../authorization'; -import { Imports } from '../../../models'; -import { ProgressStep } from '../../lib/ImporterProgressStep'; -import { Importers } from '..'; - -Meteor.methods({ - getImportFileData() { - const userId = Meteor.userId(); - - if (!userId) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'getImportFileData' }); - } - - if (!hasPermission(userId, 'run-import')) { - throw new Meteor.Error('error-action-not-allowed', 'Importing is not allowed', { - method: 'getImportFileData', - }); - } - - const operation = Imports.findLastImport(); - if (!operation) { - throw new Meteor.Error('error-operation-not-found', 'Import Operation Not Found', { - method: 'getImportFileData', - }); - } - - const { importerKey } = operation; - - const importer = Importers.get(importerKey); - if (!importer) { - throw new Meteor.Error('error-importer-not-defined', `The importer (${importerKey}) has no import class defined.`, { - method: 'getImportFileData', - }); - } - - importer.instance = new importer.importer(importer, operation); // eslint-disable-line new-cap - - const waitingSteps = [ - ProgressStep.DOWNLOADING_FILE, - ProgressStep.PREPARING_CHANNELS, - ProgressStep.PREPARING_MESSAGES, - ProgressStep.PREPARING_USERS, - ProgressStep.PREPARING_STARTED, - ]; - - if (waitingSteps.indexOf(importer.instance.progress.step) >= 0) { - if (importer.instance.importRecord && importer.instance.importRecord.valid) { - return { waiting: true }; - } - throw new Meteor.Error('error-import-operation-invalid', 'Invalid Import Operation', { - method: 'getImportFileData', - }); - } - - const readySteps = [ProgressStep.USER_SELECTION, ProgressStep.DONE, ProgressStep.CANCELLED, ProgressStep.ERROR]; - - if (readySteps.indexOf(importer.instance.progress.step) >= 0) { - return importer.instance.buildSelection(); - } - - const fileName = importer.instance.importRecord.file; - const fullFilePath = fs.existsSync(fileName) ? fileName : path.join(RocketChatImportFileInstance.absolutePath, fileName); - const promise = importer.instance.prepareUsingLocalFile(fullFilePath); - - if (promise && promise instanceof Promise) { - Promise.await(promise); - } - - return importer.instance.buildSelection(); - }, -}); diff --git a/app/importer/server/methods/getImportProgress.js b/app/importer/server/methods/getImportProgress.js deleted file mode 100644 index 31c9b2d4a5d5..000000000000 --- a/app/importer/server/methods/getImportProgress.js +++ /dev/null @@ -1,38 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { hasPermission } from '../../../authorization'; -import { Imports } from '../../../models'; -import { Importers } from '..'; - -Meteor.methods({ - getImportProgress() { - if (!Meteor.userId()) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'getImportProgress' }); - } - - if (!hasPermission(Meteor.userId(), 'run-import')) { - throw new Meteor.Error('error-action-not-allowed', 'Importing is not allowed', { - method: 'setupImporter', - }); - } - - const operation = Imports.findLastImport(); - if (!operation) { - throw new Meteor.Error('error-operation-not-found', 'Import Operation Not Found', { - method: 'getImportProgress', - }); - } - - const { importerKey } = operation; - const importer = Importers.get(importerKey); - if (!importer) { - throw new Meteor.Error('error-importer-not-defined', `The importer (${importerKey}) has no import class defined.`, { - method: 'getImportProgress', - }); - } - - importer.instance = new importer.importer(importer, operation); // eslint-disable-line new-cap - - return importer.instance.getProgress(); - }, -}); diff --git a/app/importer/server/methods/getLatestImportOperations.js b/app/importer/server/methods/getLatestImportOperations.js deleted file mode 100644 index c49d05e0d98e..000000000000 --- a/app/importer/server/methods/getLatestImportOperations.js +++ /dev/null @@ -1,32 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { Imports } from '../../../models/server'; -import { hasRole } from '../../../authorization/server'; - -Meteor.methods({ - getLatestImportOperations() { - const userId = Meteor.userId(); - - if (!userId) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { - method: 'getLatestImportOperations', - }); - } - - if (!hasRole(userId, 'admin')) { - throw new Meteor.Error('not_authorized', 'User not authorized', { - method: 'getLatestImportOperations', - }); - } - - const data = Imports.find( - {}, - { - sort: { _updatedAt: -1 }, - limit: 20, - }, - ); - - return data.fetch(); - }, -}); diff --git a/app/importer/server/methods/startImport.js b/app/importer/server/methods/startImport.js deleted file mode 100644 index 45abfe5988f0..000000000000 --- a/app/importer/server/methods/startImport.js +++ /dev/null @@ -1,47 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { hasPermission } from '../../../authorization'; -import { Imports } from '../../../models'; -import { Importers, Selection, SelectionChannel, SelectionUser } from '..'; - -Meteor.methods({ - startImport(input) { - // Takes name and object with users / channels selected to import - if (!Meteor.userId()) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'startImport' }); - } - - if (!hasPermission(Meteor.userId(), 'run-import')) { - throw new Meteor.Error('error-action-not-allowed', 'Importing is not allowed', { - method: 'startImport', - }); - } - - const operation = Imports.findLastImport(); - if (!operation) { - throw new Meteor.Error('error-operation-not-found', 'Import Operation Not Found', { - method: 'startImport', - }); - } - - const { importerKey } = operation; - const importer = Importers.get(importerKey); - if (!importer) { - throw new Meteor.Error('error-importer-not-defined', `The importer (${importerKey}) has no import class defined.`, { - method: 'startImport', - }); - } - - importer.instance = new importer.importer(importer, operation); // eslint-disable-line new-cap - - const usersSelection = input.users.map( - (user) => new SelectionUser(user.user_id, user.username, user.email, user.is_deleted, user.is_bot, user.do_import), - ); - const channelsSelection = input.channels.map( - (channel) => new SelectionChannel(channel.channel_id, channel.name, channel.is_archived, channel.do_import), - ); - - const selection = new Selection(importer.name, usersSelection, channelsSelection); - return importer.instance.startImport(selection); - }, -}); diff --git a/app/importer/server/methods/uploadImportFile.js b/app/importer/server/methods/uploadImportFile.js deleted file mode 100644 index 115559664982..000000000000 --- a/app/importer/server/methods/uploadImportFile.js +++ /dev/null @@ -1,53 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { RocketChatFile } from '../../../file'; -import { RocketChatImportFileInstance } from '../startup/store'; -import { hasPermission } from '../../../authorization'; -import { ProgressStep } from '../../lib/ImporterProgressStep'; -import { Importers } from '..'; - -Meteor.methods({ - uploadImportFile(binaryContent, contentType, fileName, importerKey) { - const userId = Meteor.userId(); - - if (!userId) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'uploadImportFile' }); - } - - if (!hasPermission(userId, 'run-import')) { - throw new Meteor.Error('error-action-not-allowed', 'Importing is not allowed', { - method: 'uploadImportFile', - }); - } - - const importer = Importers.get(importerKey); - if (!importer) { - throw new Meteor.Error('error-importer-not-defined', `The importer (${importerKey}) has no import class defined.`, { - method: 'uploadImportFile', - }); - } - - importer.instance = new importer.importer(importer); // eslint-disable-line new-cap - - const date = new Date(); - const dateStr = `${date.getUTCFullYear()}${date.getUTCMonth()}${date.getUTCDate()}${date.getUTCHours()}${date.getUTCMinutes()}${date.getUTCSeconds()}`; - const newFileName = `${dateStr}_${userId}_${fileName}`; - - // Store the file name and content type on the imports collection - importer.instance.startFileUpload(newFileName, contentType); - - // Save the file on the File Store - const file = Buffer.from(binaryContent, 'base64'); - const readStream = RocketChatFile.bufferToStream(file); - const writeStream = RocketChatImportFileInstance.createWriteStream(newFileName, contentType); - - writeStream.on( - 'end', - Meteor.bindEnvironment(() => { - importer.instance.updateProgress(ProgressStep.FILE_LOADED); - }), - ); - - readStream.pipe(writeStream); - }, -}); diff --git a/app/importer/server/models/RawImports.js b/app/importer/server/models/RawImports.js deleted file mode 100644 index 168b73b3e07b..000000000000 --- a/app/importer/server/models/RawImports.js +++ /dev/null @@ -1,9 +0,0 @@ -import { Base } from '../../../models'; - -class RawImportsModel extends Base { - constructor() { - super('raw_imports'); - } -} - -export const RawImports = new RawImportsModel(); diff --git a/app/integrations/client/startup.js b/app/integrations/client/startup.js deleted file mode 100644 index 58b94ea49df6..000000000000 --- a/app/integrations/client/startup.js +++ /dev/null @@ -1,15 +0,0 @@ -import { hasAtLeastOnePermission } from '../../authorization'; -import { registerAdminSidebarItem } from '../../../client/views/admin'; - -registerAdminSidebarItem({ - href: 'admin-integrations', - i18nLabel: 'Integrations', - icon: 'code', - permissionGranted: () => - hasAtLeastOnePermission([ - 'manage-outgoing-integrations', - 'manage-own-outgoing-integrations', - 'manage-incoming-integrations', - 'manage-own-incoming-integrations', - ]), -}); diff --git a/app/integrations/lib/rocketchat.js b/app/integrations/lib/rocketchat.js deleted file mode 100644 index 076a008d4c68..000000000000 --- a/app/integrations/lib/rocketchat.js +++ /dev/null @@ -1,67 +0,0 @@ -export const integrations = { - outgoingEvents: { - sendMessage: { - label: 'Integrations_Outgoing_Type_SendMessage', - value: 'sendMessage', - use: { - channel: true, - triggerWords: true, - targetRoom: false, - }, - }, - fileUploaded: { - label: 'Integrations_Outgoing_Type_FileUploaded', - value: 'fileUploaded', - use: { - channel: true, - triggerWords: false, - targetRoom: false, - }, - }, - roomArchived: { - label: 'Integrations_Outgoing_Type_RoomArchived', - value: 'roomArchived', - use: { - channel: false, - triggerWords: false, - targetRoom: false, - }, - }, - roomCreated: { - label: 'Integrations_Outgoing_Type_RoomCreated', - value: 'roomCreated', - use: { - channel: false, - triggerWords: false, - targetRoom: false, - }, - }, - roomJoined: { - label: 'Integrations_Outgoing_Type_RoomJoined', - value: 'roomJoined', - use: { - channel: true, - triggerWords: false, - targetRoom: false, - }, - }, - roomLeft: { - label: 'Integrations_Outgoing_Type_RoomLeft', - value: 'roomLeft', - use: { - channel: true, - triggerWords: false, - targetRoom: false, - }, - }, - userCreated: { - label: 'Integrations_Outgoing_Type_UserCreated', - value: 'userCreated', - use: { - channel: false, - triggerWords: false, - targetRoom: true, - }, - }, - }, -}; diff --git a/app/integrations/server/api/api.js b/app/integrations/server/api/api.js deleted file mode 100644 index dd5d9967467b..000000000000 --- a/app/integrations/server/api/api.js +++ /dev/null @@ -1,524 +0,0 @@ -import vm from 'vm'; - -import { Meteor } from 'meteor/meteor'; -import { HTTP } from 'meteor/http'; -import { Random } from 'meteor/random'; -import { Livechat } from 'meteor/rocketchat:livechat'; -import Fiber from 'fibers'; -import Future from 'fibers/future'; -import _ from 'underscore'; -import s from 'underscore.string'; -import moment from 'moment'; - -import { incomingLogger } from '../logger'; -import { processWebhookMessage } from '../../../lib/server'; -import { API, APIClass, defaultRateLimiterOptions } from '../../../api/server'; -import * as Models from '../../../models/server'; -import { Integrations } from '../../../models/server/raw'; -import { settings } from '../../../settings/server'; - -const compiledScripts = {}; -function buildSandbox(store = {}) { - const sandbox = { - scriptTimeout(reject) { - return setTimeout(() => reject('timed out'), 3000); - }, - _, - s, - console, - moment, - Fiber, - Promise, - Livechat, - Store: { - set(key, val) { - store[key] = val; - return val; - }, - get(key) { - return store[key]; - }, - }, - HTTP(method, url, options) { - try { - return { - result: HTTP.call(method, url, options), - }; - } catch (error) { - return { - error, - }; - } - }, - }; - Object.keys(Models) - .filter((k) => !k.startsWith('_')) - .forEach((k) => { - sandbox[k] = Models[k]; - }); - return { store, sandbox }; -} - -function getIntegrationScript(integration) { - const compiledScript = compiledScripts[integration._id]; - if (compiledScript && +compiledScript._updatedAt === +integration._updatedAt) { - return compiledScript.script; - } - - const script = integration.scriptCompiled; - const { sandbox, store } = buildSandbox(); - try { - incomingLogger.info({ msg: 'Will evaluate script of Trigger', name: integration.name }); - incomingLogger.debug(script); - - const vmScript = vm.createScript(script, 'script.js'); - vmScript.runInNewContext(sandbox); - if (sandbox.Script) { - compiledScripts[integration._id] = { - script: new sandbox.Script(), - store, - _updatedAt: integration._updatedAt, - }; - - return compiledScripts[integration._id].script; - } - } catch (err) { - incomingLogger.error({ - msg: 'Error evaluating Script in Trigger', - name: integration.name, - script, - err, - }); - throw API.v1.failure('error-evaluating-script'); - } - - if (!sandbox.Script) { - incomingLogger.error({ msg: 'Class "Script" not in Trigger', name: integration.name }); - throw API.v1.failure('class-script-not-found'); - } -} - -function createIntegration(options, user) { - incomingLogger.info({ msg: 'Add integration', name: options.name }); - incomingLogger.debug(options); - - Meteor.runAsUser(user._id, function () { - switch (options.event) { - case 'newMessageOnChannel': - if (options.data == null) { - options.data = {}; - } - if (options.data.channel_name != null && options.data.channel_name.indexOf('#') === -1) { - options.data.channel_name = `#${options.data.channel_name}`; - } - return Meteor.call('addOutgoingIntegration', { - username: 'rocket.cat', - urls: [options.target_url], - name: options.name, - channel: options.data.channel_name, - triggerWords: options.data.trigger_words, - }); - case 'newMessageToUser': - if (options.data.username.indexOf('@') === -1) { - options.data.username = `@${options.data.username}`; - } - return Meteor.call('addOutgoingIntegration', { - username: 'rocket.cat', - urls: [options.target_url], - name: options.name, - channel: options.data.username, - triggerWords: options.data.trigger_words, - }); - } - }); - - return API.v1.success(); -} - -function removeIntegration(options, user) { - incomingLogger.info('Remove integration'); - incomingLogger.debug(options); - - const integrationToRemove = Promise.await(Integrations.findOneByUrl(options.target_url)); - if (!integrationToRemove) { - return API.v1.failure('integration-not-found'); - } - - Meteor.runAsUser(user._id, () => Meteor.call('deleteOutgoingIntegration', integrationToRemove._id)); - - return API.v1.success(); -} - -function executeIntegrationRest() { - incomingLogger.info({ msg: 'Post integration:', name: this.integration.name }); - incomingLogger.debug({ urlParams: this.urlParams, bodyParams: this.bodyParams }); - - if (this.integration.enabled !== true) { - return { - statusCode: 503, - body: 'Service Unavailable', - }; - } - - const defaultValues = { - channel: this.integration.channel, - alias: this.integration.alias, - avatar: this.integration.avatar, - emoji: this.integration.emoji, - }; - - if (this.integration.scriptEnabled && this.integration.scriptCompiled && this.integration.scriptCompiled.trim() !== '') { - let script; - try { - script = getIntegrationScript(this.integration); - } catch (e) { - incomingLogger.error(e); - return API.v1.failure(e.message); - } - - this.request.setEncoding('utf8'); - const content_raw = this.request.read(); - - const request = { - url: { - hash: this.request._parsedUrl.hash, - search: this.request._parsedUrl.search, - query: this.queryParams, - pathname: this.request._parsedUrl.pathname, - path: this.request._parsedUrl.path, - }, - url_raw: this.request.url, - url_params: this.urlParams, - content: this.bodyParams, - content_raw, - headers: this.request.headers, - body: this.request.body, - user: { - _id: this.user._id, - name: this.user.name, - username: this.user.username, - }, - }; - - try { - const { sandbox } = buildSandbox(compiledScripts[this.integration._id].store); - sandbox.script = script; - sandbox.request = request; - - const result = Future.fromPromise( - vm.runInNewContext( - ` - new Promise((resolve, reject) => { - Fiber(() => { - scriptTimeout(reject); - try { - resolve(script.process_incoming_request({ request: request })); - } catch(e) { - reject(e); - } - }).run(); - }).catch((error) => { throw new Error(error); }); - `, - sandbox, - { - timeout: 3000, - }, - ), - ).wait(); - - if (!result) { - incomingLogger.debug({ - msg: 'Process Incoming Request result of Trigger has no data', - name: this.integration.name, - }); - return API.v1.success(); - } - if (result && result.error) { - return API.v1.failure(result.error); - } - - this.bodyParams = result && result.content; - this.scriptResponse = result.response; - if (result.user) { - this.user = result.user; - } - - incomingLogger.debug({ - msg: 'Process Incoming Request result of Trigger', - name: this.integration.name, - result: this.bodyParams, - }); - } catch (err) { - incomingLogger.error({ - msg: 'Error running Script in Trigger', - name: this.integration.name, - script: this.integration.scriptCompiled, - err, - }); - return API.v1.failure('error-running-script'); - } - } - - // TODO: Turn this into an option on the integrations - no body means a success - // TODO: Temporary fix for https://github.com/RocketChat/Rocket.Chat/issues/7770 until the above is implemented - if (!this.bodyParams || (_.isEmpty(this.bodyParams) && !this.integration.scriptEnabled)) { - // return RocketChat.API.v1.failure('body-empty'); - return API.v1.success(); - } - - this.bodyParams.bot = { i: this.integration._id }; - - try { - const message = processWebhookMessage(this.bodyParams, this.user, defaultValues); - if (_.isEmpty(message)) { - return API.v1.failure('unknown-error'); - } - - if (this.scriptResponse) { - incomingLogger.debug({ msg: 'response', response: this.scriptResponse }); - } - - return API.v1.success(this.scriptResponse); - } catch ({ error, message }) { - return API.v1.failure(error || message); - } -} - -function addIntegrationRest() { - return createIntegration(this.bodyParams, this.user); -} - -function removeIntegrationRest() { - return removeIntegration(this.bodyParams, this.user); -} - -function integrationSampleRest() { - incomingLogger.info('Sample Integration'); - return { - statusCode: 200, - body: [ - { - token: Random.id(24), - channel_id: Random.id(), - channel_name: 'general', - timestamp: new Date(), - user_id: Random.id(), - user_name: 'rocket.cat', - text: 'Sample text 1', - trigger_word: 'Sample', - }, - { - token: Random.id(24), - channel_id: Random.id(), - channel_name: 'general', - timestamp: new Date(), - user_id: Random.id(), - user_name: 'rocket.cat', - text: 'Sample text 2', - trigger_word: 'Sample', - }, - { - token: Random.id(24), - channel_id: Random.id(), - channel_name: 'general', - timestamp: new Date(), - user_id: Random.id(), - user_name: 'rocket.cat', - text: 'Sample text 3', - trigger_word: 'Sample', - }, - ], - }; -} - -function integrationInfoRest() { - incomingLogger.info('Info integration'); - return { - statusCode: 200, - body: { - success: true, - }, - }; -} - -class WebHookAPI extends APIClass { - /* Webhooks are not versioned, so we must not validate we know a version before adding a rate limiter */ - shouldAddRateLimitToRoute(options) { - const { rateLimiterOptions } = options; - return ( - (typeof rateLimiterOptions === 'object' || rateLimiterOptions === undefined) && - !process.env.TEST_MODE && - Boolean(defaultRateLimiterOptions.numRequestsAllowed && defaultRateLimiterOptions.intervalTimeInMS) - ); - } - - shouldVerifyRateLimit(/* route */) { - return ( - settings.get('API_Enable_Rate_Limiter') === true && - (process.env.NODE_ENV !== 'development' || settings.get('API_Enable_Rate_Limiter_Dev') === true) - ); - } - - /* - There is only one generic route propagated to Restivus which has URL-path-parameters for the integration and the token. - Since the rate-limiter operates on absolute routes, we need to add a limiter to the absolute url before we can validate it - */ - enforceRateLimit(objectForRateLimitMatch, request, response, userId) { - const { method, url } = request; - const route = url.replace(`/${this.apiPath}`, ''); - const nameRoute = this.getFullRouteName(route, [method.toLowerCase()]); - // We'll be creating rate limiters on demand (when validating for the first time). - // This is possible since *all* integration hooks should be rate limited the same way. - // This way, we'll not have to add new limiters as new integrations are added - if (!this.getRateLimiter(nameRoute)) { - this.addRateLimiterRuleForRoutes({ - routes: [route], - rateLimiterOptions: defaultRateLimiterOptions, - endpoints: { - post: executeIntegrationRest, - get: executeIntegrationRest, - }, - }); - } - - const integrationForRateLimitMatch = objectForRateLimitMatch; - integrationForRateLimitMatch.route = nameRoute; - - super.enforceRateLimit(integrationForRateLimitMatch, request, response, userId); - } -} - -const Api = new WebHookAPI({ - enableCors: true, - apiPath: 'hooks/', - auth: { - user() { - const payloadKeys = Object.keys(this.bodyParams); - const payloadIsWrapped = this.bodyParams && this.bodyParams.payload && payloadKeys.length === 1; - if (payloadIsWrapped && this.request.headers['content-type'] === 'application/x-www-form-urlencoded') { - try { - this.bodyParams = JSON.parse(this.bodyParams.payload); - } catch ({ message }) { - return { - error: { - statusCode: 400, - body: { - success: false, - error: message, - }, - }, - }; - } - } - - this.integration = Promise.await( - Integrations.findOne({ - _id: this.request.params.integrationId, - token: decodeURIComponent(this.request.params.token), - }), - ); - - if (!this.integration) { - incomingLogger.info(`Invalid integration id ${this.request.params.integrationId} or token ${this.request.params.token}`); - - return { - error: { - statusCode: 404, - body: { - success: false, - error: 'Invalid integration id or token provided.', - }, - }, - }; - } - - const user = Models.Users.findOne({ - _id: this.integration.userId, - }); - - return { user }; - }, - }, -}); - -Api.addRoute( - ':integrationId/:userId/:token', - { authRequired: true }, - { - post: executeIntegrationRest, - get: executeIntegrationRest, - }, -); - -Api.addRoute( - ':integrationId/:token', - { authRequired: true }, - { - post: executeIntegrationRest, - get: executeIntegrationRest, - }, -); - -Api.addRoute( - 'sample/:integrationId/:userId/:token', - { authRequired: true }, - { - get: integrationSampleRest, - }, -); - -Api.addRoute( - 'sample/:integrationId/:token', - { authRequired: true }, - { - get: integrationSampleRest, - }, -); - -Api.addRoute( - 'info/:integrationId/:userId/:token', - { authRequired: true }, - { - get: integrationInfoRest, - }, -); - -Api.addRoute( - 'info/:integrationId/:token', - { authRequired: true }, - { - get: integrationInfoRest, - }, -); - -Api.addRoute( - 'add/:integrationId/:userId/:token', - { authRequired: true }, - { - post: addIntegrationRest, - }, -); - -Api.addRoute( - 'add/:integrationId/:token', - { authRequired: true }, - { - post: addIntegrationRest, - }, -); - -Api.addRoute( - 'remove/:integrationId/:userId/:token', - { authRequired: true }, - { - post: removeIntegrationRest, - }, -); - -Api.addRoute( - 'remove/:integrationId/:token', - { authRequired: true }, - { - post: removeIntegrationRest, - }, -); diff --git a/app/integrations/server/index.js b/app/integrations/server/index.js deleted file mode 100644 index 6b796dbcd083..000000000000 --- a/app/integrations/server/index.js +++ /dev/null @@ -1,19 +0,0 @@ -import '../lib/rocketchat'; -import './logger'; -import './lib/validation'; -import './methods/incoming/addIncomingIntegration'; -import './methods/incoming/updateIncomingIntegration'; -import './methods/incoming/deleteIncomingIntegration'; -import './methods/outgoing/addOutgoingIntegration'; -import './methods/outgoing/updateOutgoingIntegration'; -import './methods/outgoing/replayOutgoingIntegration'; -import './methods/outgoing/deleteOutgoingIntegration'; -import './methods/clearIntegrationHistory'; -import './api/api'; -import './lib/triggerHandler'; -import './triggers'; - -export { - mountIntegrationQueryBasedOnPermissions, - mountIntegrationHistoryQueryBasedOnPermissions, -} from './lib/mountQueriesBasedOnPermission'; diff --git a/app/integrations/server/lib/validation.js b/app/integrations/server/lib/validation.js deleted file mode 100644 index 9361680995e4..000000000000 --- a/app/integrations/server/lib/validation.js +++ /dev/null @@ -1,200 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Match } from 'meteor/check'; -import { Babel } from 'meteor/babel-compiler'; -import _ from 'underscore'; -import s from 'underscore.string'; - -import { Rooms, Users, Subscriptions } from '../../../models'; -import { hasPermission, hasAllPermission } from '../../../authorization'; -import { integrations } from '../../lib/rocketchat'; - -const scopedChannels = ['all_public_channels', 'all_private_groups', 'all_direct_messages']; -const validChannelChars = ['@', '#']; - -function _verifyRequiredFields(integration) { - if ( - !integration.event || - !Match.test(integration.event, String) || - integration.event.trim() === '' || - !integrations.outgoingEvents[integration.event] - ) { - throw new Meteor.Error('error-invalid-event-type', 'Invalid event type', { - function: 'validateOutgoing._verifyRequiredFields', - }); - } - - if (!integration.username || !Match.test(integration.username, String) || integration.username.trim() === '') { - throw new Meteor.Error('error-invalid-username', 'Invalid username', { - function: 'validateOutgoing._verifyRequiredFields', - }); - } - - if (integrations.outgoingEvents[integration.event].use.targetRoom && !integration.targetRoom) { - throw new Meteor.Error('error-invalid-targetRoom', 'Invalid Target Room', { - function: 'validateOutgoing._verifyRequiredFields', - }); - } - - if (!Match.test(integration.urls, [String])) { - throw new Meteor.Error('error-invalid-urls', 'Invalid URLs', { - function: 'validateOutgoing._verifyRequiredFields', - }); - } - - for (const [index, url] of integration.urls.entries()) { - if (url.trim() === '') { - delete integration.urls[index]; - } - } - - integration.urls = _.without(integration.urls, [undefined]); - - if (integration.urls.length === 0) { - throw new Meteor.Error('error-invalid-urls', 'Invalid URLs', { - function: 'validateOutgoing._verifyRequiredFields', - }); - } -} - -function _verifyUserHasPermissionForChannels(integration, userId, channels) { - for (let channel of channels) { - if (scopedChannels.includes(channel)) { - if (channel === 'all_public_channels') { - // No special permissions needed to add integration to public channels - } else if (!hasPermission(userId, 'manage-outgoing-integrations')) { - throw new Meteor.Error('error-invalid-channel', 'Invalid Channel', { - function: 'validateOutgoing._verifyUserHasPermissionForChannels', - }); - } - } else { - let record; - const channelType = channel[0]; - channel = channel.substr(1); - - switch (channelType) { - case '#': - record = Rooms.findOne({ - $or: [{ _id: channel }, { name: channel }], - }); - break; - case '@': - record = Users.findOne({ - $or: [{ _id: channel }, { username: channel }], - }); - break; - } - - if (!record) { - throw new Meteor.Error('error-invalid-room', 'Invalid room', { - function: 'validateOutgoing._verifyUserHasPermissionForChannels', - }); - } - - if ( - !hasAllPermission(userId, ['manage-outgoing-integrations', 'manage-own-outgoing-integrations']) && - !Subscriptions.findOneByRoomIdAndUserId(record._id, userId, { fields: { _id: 1 } }) - ) { - throw new Meteor.Error('error-invalid-channel', 'Invalid Channel', { - function: 'validateOutgoing._verifyUserHasPermissionForChannels', - }); - } - } - } -} - -function _verifyRetryInformation(integration) { - if (!integration.retryFailedCalls) { - return; - } - - // Don't allow negative retry counts - integration.retryCount = integration.retryCount && parseInt(integration.retryCount) > 0 ? parseInt(integration.retryCount) : 4; - integration.retryDelay = - !integration.retryDelay || !integration.retryDelay.trim() ? 'powers-of-ten' : integration.retryDelay.toLowerCase(); -} - -integrations.validateOutgoing = function _validateOutgoing(integration, userId) { - if (integration.channel && Match.test(integration.channel, String) && integration.channel.trim() === '') { - delete integration.channel; - } - - // Moved to it's own function to statisfy the complexity rule - _verifyRequiredFields(integration); - - let channels = []; - if (integrations.outgoingEvents[integration.event].use.channel) { - if (!Match.test(integration.channel, String)) { - throw new Meteor.Error('error-invalid-channel', 'Invalid Channel', { - function: 'validateOutgoing', - }); - } else { - channels = _.map(integration.channel.split(','), (channel) => s.trim(channel)); - - for (const channel of channels) { - if (!validChannelChars.includes(channel[0]) && !scopedChannels.includes(channel.toLowerCase())) { - throw new Meteor.Error('error-invalid-channel-start-with-chars', 'Invalid channel. Start with @ or #', { - function: 'validateOutgoing', - }); - } - } - } - } else if (!hasPermission(userId, 'manage-outgoing-integrations')) { - throw new Meteor.Error('error-invalid-permissions', 'Invalid permission for required Integration creation.', { - function: 'validateOutgoing', - }); - } - - if (integrations.outgoingEvents[integration.event].use.triggerWords && integration.triggerWords) { - if (!Match.test(integration.triggerWords, [String])) { - throw new Meteor.Error('error-invalid-triggerWords', 'Invalid triggerWords', { - function: 'validateOutgoing', - }); - } - - integration.triggerWords.forEach((word, index) => { - if (!word || word.trim() === '') { - delete integration.triggerWords[index]; - } - }); - - integration.triggerWords = _.without(integration.triggerWords, [undefined]); - } else { - delete integration.triggerWords; - } - - if (integration.scriptEnabled === true && integration.script && integration.script.trim() !== '') { - try { - const babelOptions = Object.assign(Babel.getDefaultOptions({ runtime: false }), { - compact: true, - minified: true, - comments: false, - }); - - integration.scriptCompiled = Babel.compile(integration.script, babelOptions).code; - integration.scriptError = undefined; - } catch (e) { - integration.scriptCompiled = undefined; - integration.scriptError = _.pick(e, 'name', 'message', 'stack'); - } - } - - if (typeof integration.runOnEdits !== 'undefined') { - // Verify this value is only true/false - integration.runOnEdits = integration.runOnEdits === true; - } - - _verifyUserHasPermissionForChannels(integration, userId, channels); - _verifyRetryInformation(integration); - - const user = Users.findOne({ username: integration.username }); - - if (!user) { - throw new Meteor.Error('error-invalid-user', 'Invalid user (did you delete the `rocket.cat` user?)', { function: 'validateOutgoing' }); - } - - integration.type = 'webhook-outgoing'; - integration.userId = user._id; - integration.channel = channels; - - return integration; -}; diff --git a/app/integrations/server/methods/incoming/addIncomingIntegration.js b/app/integrations/server/methods/incoming/addIncomingIntegration.js deleted file mode 100644 index 555acbc3a459..000000000000 --- a/app/integrations/server/methods/incoming/addIncomingIntegration.js +++ /dev/null @@ -1,120 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Random } from 'meteor/random'; -import { Babel } from 'meteor/babel-compiler'; -import _ from 'underscore'; -import s from 'underscore.string'; - -import { hasPermission, hasAllPermission } from '../../../../authorization/server'; -import { Users, Rooms, Subscriptions } from '../../../../models/server'; -import { Integrations, Roles } from '../../../../models/server/raw'; - -const validChannelChars = ['@', '#']; - -Meteor.methods({ - async addIncomingIntegration(integration) { - if (!hasPermission(this.userId, 'manage-incoming-integrations') && !hasPermission(this.userId, 'manage-own-incoming-integrations')) { - throw new Meteor.Error('not_authorized', 'Unauthorized', { - method: 'addIncomingIntegration', - }); - } - - if (!_.isString(integration.channel)) { - throw new Meteor.Error('error-invalid-channel', 'Invalid channel', { - method: 'addIncomingIntegration', - }); - } - - if (integration.channel.trim() === '') { - throw new Meteor.Error('error-invalid-channel', 'Invalid channel', { - method: 'addIncomingIntegration', - }); - } - - const channels = _.map(integration.channel.split(','), (channel) => s.trim(channel)); - - for (const channel of channels) { - if (!validChannelChars.includes(channel[0])) { - throw new Meteor.Error('error-invalid-channel-start-with-chars', 'Invalid channel. Start with @ or #', { - method: 'updateIncomingIntegration', - }); - } - } - - if (!_.isString(integration.username) || integration.username.trim() === '') { - throw new Meteor.Error('error-invalid-username', 'Invalid username', { - method: 'addIncomingIntegration', - }); - } - if (integration.scriptEnabled === true && integration.script && integration.script.trim() !== '') { - try { - let babelOptions = Babel.getDefaultOptions({ runtime: false }); - babelOptions = _.extend(babelOptions, { compact: true, minified: true, comments: false }); - - integration.scriptCompiled = Babel.compile(integration.script, babelOptions).code; - integration.scriptError = undefined; - } catch (e) { - integration.scriptCompiled = undefined; - integration.scriptError = _.pick(e, 'name', 'message', 'stack'); - } - } - - for (let channel of channels) { - let record; - const channelType = channel[0]; - channel = channel.substr(1); - - switch (channelType) { - case '#': - record = Rooms.findOne({ - $or: [{ _id: channel }, { name: channel }], - }); - break; - case '@': - record = Users.findOne({ - $or: [{ _id: channel }, { username: channel }], - }); - break; - } - - if (!record) { - throw new Meteor.Error('error-invalid-room', 'Invalid room', { - method: 'addIncomingIntegration', - }); - } - - if ( - !hasAllPermission(this.userId, ['manage-incoming-integrations', 'manage-own-incoming-integrations']) && - !Subscriptions.findOneByRoomIdAndUserId(record._id, this.userId, { fields: { _id: 1 } }) - ) { - throw new Meteor.Error('error-invalid-channel', 'Invalid Channel', { - method: 'addIncomingIntegration', - }); - } - } - - const user = Users.findOne({ username: integration.username }); - - if (!user) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { - method: 'addIncomingIntegration', - }); - } - - const token = Random.id(48); - - integration.type = 'webhook-incoming'; - integration.token = token; - integration.channel = channels; - integration.userId = user._id; - integration._createdAt = new Date(); - integration._createdBy = Users.findOne(this.userId, { fields: { username: 1 } }); - - await Roles.addUserRoles(user._id, 'bot'); - - const result = await Integrations.insertOne(integration); - - integration._id = result.insertedId; - - return integration; - }, -}); diff --git a/app/integrations/server/methods/incoming/deleteIncomingIntegration.ts b/app/integrations/server/methods/incoming/deleteIncomingIntegration.ts deleted file mode 100644 index 3c54198dc4aa..000000000000 --- a/app/integrations/server/methods/incoming/deleteIncomingIntegration.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { hasPermission } from '../../../../authorization/server'; -import { Integrations } from '../../../../models/server/raw'; - -Meteor.methods({ - async deleteIncomingIntegration(integrationId) { - let integration; - - if (hasPermission(this.userId, 'manage-incoming-integrations')) { - integration = Integrations.findOneById(integrationId); - } else if (hasPermission(this.userId, 'manage-own-incoming-integrations')) { - integration = Integrations.findOne({ - '_id': integrationId, - '_createdBy._id': this.userId, - }); - } else { - throw new Meteor.Error('not_authorized', 'Unauthorized', { - method: 'deleteIncomingIntegration', - }); - } - - if (!integration) { - throw new Meteor.Error('error-invalid-integration', 'Invalid integration', { - method: 'deleteIncomingIntegration', - }); - } - - await Integrations.removeById(integrationId); - - return true; - }, -}); diff --git a/app/integrations/server/methods/outgoing/addOutgoingIntegration.js b/app/integrations/server/methods/outgoing/addOutgoingIntegration.js deleted file mode 100644 index 7bad154a1802..000000000000 --- a/app/integrations/server/methods/outgoing/addOutgoingIntegration.js +++ /dev/null @@ -1,29 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { hasPermission } from '../../../../authorization/server'; -import { Users } from '../../../../models/server'; -import { Integrations } from '../../../../models/server/raw'; -import { integrations } from '../../../lib/rocketchat'; - -Meteor.methods({ - async addOutgoingIntegration(integration) { - if ( - !hasPermission(this.userId, 'manage-outgoing-integrations') && - !hasPermission(this.userId, 'manage-own-outgoing-integrations') && - !hasPermission(this.userId, 'manage-outgoing-integrations', 'bot') && - !hasPermission(this.userId, 'manage-own-outgoing-integrations', 'bot') - ) { - throw new Meteor.Error('not_authorized'); - } - - integration = integrations.validateOutgoing(integration, this.userId); - - integration._createdAt = new Date(); - integration._createdBy = Users.findOne(this.userId, { fields: { username: 1 } }); - - const result = await Integrations.insertOne(integration); - integration._id = result.insertedId; - - return integration; - }, -}); diff --git a/app/integrations/server/methods/outgoing/deleteOutgoingIntegration.ts b/app/integrations/server/methods/outgoing/deleteOutgoingIntegration.ts deleted file mode 100644 index d7ce4c335569..000000000000 --- a/app/integrations/server/methods/outgoing/deleteOutgoingIntegration.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { hasPermission } from '../../../../authorization/server'; -import { IntegrationHistory, Integrations } from '../../../../models/server/raw'; - -Meteor.methods({ - async deleteOutgoingIntegration(integrationId) { - let integration; - - if (hasPermission(this.userId, 'manage-outgoing-integrations') || hasPermission(this.userId, 'manage-outgoing-integrations', 'bot')) { - integration = Integrations.findOneById(integrationId); - } else if ( - hasPermission(this.userId, 'manage-own-outgoing-integrations') || - hasPermission(this.userId, 'manage-own-outgoing-integrations', 'bot') - ) { - integration = Integrations.findOne({ - '_id': integrationId, - '_createdBy._id': this.userId, - }); - } else { - throw new Meteor.Error('not_authorized', 'Unauthorized', { - method: 'deleteOutgoingIntegration', - }); - } - - if (!integration) { - throw new Meteor.Error('error-invalid-integration', 'Invalid integration', { - method: 'deleteOutgoingIntegration', - }); - } - - await Integrations.removeById(integrationId); - await IntegrationHistory.removeByIntegrationId(integrationId); - - return true; - }, -}); diff --git a/app/irc/server/irc-bridge/index.js b/app/irc/server/irc-bridge/index.js deleted file mode 100644 index 04054f027bc8..000000000000 --- a/app/irc/server/irc-bridge/index.js +++ /dev/null @@ -1,238 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import Queue from 'queue-fifo'; -import moment from 'moment'; -import _ from 'underscore'; - -import * as peerCommandHandlers from './peerHandlers'; -import * as localCommandHandlers from './localHandlers'; -import { callbacks } from '../../../../lib/callbacks'; -import * as servers from '../servers'; -import { Settings } from '../../../models/server'; -import { Logger } from '../../../logger/server'; - -const logger = new Logger('IRC Bridge'); -const queueLogger = logger.section('Queue'); - -let removed = false; -const updateLastPing = _.throttle( - Meteor.bindEnvironment(() => { - if (removed) { - return; - } - Settings.upsert( - { _id: 'IRC_Bridge_Last_Ping' }, - { - $set: { - value: new Date(), - }, - }, - ); - }), - 1000 * 10, -); - -class Bridge { - constructor(config) { - // General - this.config = config; - - // Workaround for Rocket.Chat callbacks being called multiple times - this.loggedInUsers = []; - - // Server - const Server = servers[this.config.server.protocol]; - - this.server = new Server(this.config); - - this.setupPeerHandlers(); - this.setupLocalHandlers(); - - // Command queue - this.queue = new Queue(); - this.queueTimeout = 5; - } - - init() { - this.initTime = new Date(); - removed = false; - this.loggedInUsers = []; - - const lastPing = Settings.findOneById('IRC_Bridge_Last_Ping'); - if (lastPing) { - if (Math.abs(moment(lastPing.value).diff()) < 1000 * 30) { - this.log('Not trying to connect.'); - this.remove(); - return; - } - } - - this.log('Connecting.'); - updateLastPing(); - this.server.register(); - - this.server.on('registered', () => { - this.logQueue('Starting...'); - - this.runQueue(); - }); - } - - stop() { - this.server.disconnect(); - } - - remove() { - this.log('Removing current connection.'); - removed = true; - this.server = null; - this.removeLocalHandlers(); - } - - /** - * Log helper - */ - log(message) { - // TODO logger: debug? - logger.info(message); - } - - logQueue(message) { - // TODO logger: debug? - queueLogger.info(message); - } - - /** - * - * - * Queue - * - * - */ - onMessageReceived(from, command, ...parameters) { - this.queue.enqueue({ from, command, parameters }); - } - - async runQueue() { - if (!this.server) { - return; - } - - const lastResetTime = Settings.findOneById('IRC_Bridge_Reset_Time'); - if (lastResetTime && lastResetTime.value > this.initTime) { - this.stop(); - this.remove(); - return; - } - - updateLastPing(); - - // If it is empty, skip and keep the queue going - if (this.queue.isEmpty()) { - return setTimeout(this.runQueue.bind(this), this.queueTimeout); - } - - // Get the command - const item = this.queue.dequeue(); - - this.logQueue(`Processing "${item.command}" command from "${item.from}"`); - - // Handle the command accordingly - try { - // Handle the command accordingly - switch (item.from) { - case 'local': - if (!localCommandHandlers[item.command]) { - throw new Error(`Could not find handler for local:${item.command}`); - } - - await localCommandHandlers[item.command].apply(this, item.parameters); - break; - case 'peer': - if (!peerCommandHandlers[item.command]) { - throw new Error(`Could not find handler for peer:${item.command}`); - } - - await peerCommandHandlers[item.command].apply(this, item.parameters); - break; - } - } catch (e) { - this.logQueue(e); - } - - // Keep the queue going - setTimeout(this.runQueue.bind(this), this.queueTimeout); - } - - /** - * - * - * Peer - * - * - */ - setupPeerHandlers() { - this.server.on('peerCommand', (cmd) => { - this.onMessageReceived('peer', cmd.identifier, cmd.args); - }); - } - - /** - * - * - * Local - * - * - */ - setupLocalHandlers() { - // Auth - callbacks.add('afterValidateLogin', this.onMessageReceived.bind(this, 'local', 'onLogin'), callbacks.priority.LOW, 'irc-on-login'); - callbacks.add( - 'afterCreateUser', - this.onMessageReceived.bind(this, 'local', 'onCreateUser'), - callbacks.priority.LOW, - 'irc-on-create-user', - ); - // Joining rooms or channels - callbacks.add( - 'afterCreateChannel', - this.onMessageReceived.bind(this, 'local', 'onCreateRoom'), - callbacks.priority.LOW, - 'irc-on-create-channel', - ); - callbacks.add( - 'afterCreateRoom', - this.onMessageReceived.bind(this, 'local', 'onCreateRoom'), - callbacks.priority.LOW, - 'irc-on-create-room', - ); - callbacks.add('afterJoinRoom', this.onMessageReceived.bind(this, 'local', 'onJoinRoom'), callbacks.priority.LOW, 'irc-on-join-room'); - // Leaving rooms or channels - callbacks.add('afterLeaveRoom', this.onMessageReceived.bind(this, 'local', 'onLeaveRoom'), callbacks.priority.LOW, 'irc-on-leave-room'); - // Chatting - callbacks.add( - 'afterSaveMessage', - this.onMessageReceived.bind(this, 'local', 'onSaveMessage'), - callbacks.priority.LOW, - 'irc-on-save-message', - ); - // Leaving - callbacks.add('afterLogoutCleanUp', this.onMessageReceived.bind(this, 'local', 'onLogout'), callbacks.priority.LOW, 'irc-on-logout'); - } - - removeLocalHandlers() { - callbacks.remove('afterValidateLogin', 'irc-on-login'); - callbacks.remove('afterCreateUser', 'irc-on-create-user'); - callbacks.remove('afterCreateChannel', 'irc-on-create-channel'); - callbacks.remove('afterCreateRoom', 'irc-on-create-room'); - callbacks.remove('afterJoinRoom', 'irc-on-join-room'); - callbacks.remove('afterLeaveRoom', 'irc-on-leave-room'); - callbacks.remove('afterSaveMessage', 'irc-on-save-message'); - callbacks.remove('afterLogoutCleanUp', 'irc-on-logout'); - } - - sendCommand(command, parameters) { - this.server.emit('onReceiveFromLocal', command, parameters); - } -} - -export default Bridge; diff --git a/app/irc/server/methods/resetIrcConnection.js b/app/irc/server/methods/resetIrcConnection.js deleted file mode 100644 index cef9299c84d8..000000000000 --- a/app/irc/server/methods/resetIrcConnection.js +++ /dev/null @@ -1,62 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { Settings } from '../../../models/server'; -import { settings } from '../../../settings'; -import Bridge from '../irc-bridge'; - -Meteor.methods({ - resetIrcConnection() { - const ircEnabled = Boolean(settings.get('IRC_Enabled')); - Settings.upsert( - { _id: 'IRC_Bridge_Last_Ping' }, - { - $set: { - value: new Date(0), - }, - }, - ); - Settings.upsert( - { _id: 'IRC_Bridge_Reset_Time' }, - { - $set: { - value: new Date(), - }, - }, - ); - - if (!ircEnabled) { - return { - message: 'Connection_Closed', - params: [], - }; - } - - setTimeout( - Meteor.bindEnvironment(() => { - // Normalize the config values - const config = { - server: { - protocol: settings.get('IRC_Protocol'), - host: settings.get('IRC_Host'), - port: settings.get('IRC_Port'), - name: settings.get('IRC_Name'), - description: settings.get('IRC_Description'), - }, - passwords: { - local: settings.get('IRC_Local_Password'), - peer: settings.get('IRC_Peer_Password'), - }, - }; - - Meteor.ircBridge = new Bridge(config); - Meteor.ircBridge.init(); - }), - 300, - ); - - return { - message: 'Connection_Reset', - params: [], - }; - }, -}); diff --git a/app/katex/client/index.js b/app/katex/client/index.js deleted file mode 100644 index c98a132d40da..000000000000 --- a/app/katex/client/index.js +++ /dev/null @@ -1,187 +0,0 @@ -import { Random } from 'meteor/random'; -import katex from 'katex'; -import { unescapeHTML, escapeHTML } from '@rocket.chat/string-helpers'; - -import 'katex/dist/katex.min.css'; -import './style.css'; - -class Boundary { - length() { - return this.end - this.start; - } - - extract(str) { - return str.substr(this.start, this.length()); - } -} - -class Katex { - constructor(katex, { dollarSyntax, parenthesisSyntax }) { - this.katex = katex; - this.delimitersMap = [ - { - opener: '\\[', - closer: '\\]', - displayMode: true, - enabled: () => parenthesisSyntax, - }, - { - opener: '\\(', - closer: '\\)', - displayMode: false, - enabled: () => parenthesisSyntax, - }, - { - opener: '$$', - closer: '$$', - displayMode: true, - enabled: () => dollarSyntax, - }, - { - opener: '$', - closer: '$', - displayMode: false, - enabled: () => dollarSyntax, - }, - ]; - } - - findOpeningDelimiter(str, start) { - const matches = this.delimitersMap - .filter((options) => options.enabled()) - .map((options) => ({ - options, - pos: str.indexOf(options.opener, start), - })); - - const positions = matches.filter(({ pos }) => pos >= 0).map(({ pos }) => pos); - - // No opening delimiters were found - if (positions.length === 0) { - return null; - } - - // Take the first delimiter found - const minPos = Math.min(...positions); - - const matchIndex = matches.findIndex(({ pos }) => pos === minPos); - - const match = matches[matchIndex]; - return match; - } - - getLatexBoundaries(str, { options: { closer }, pos }) { - const closerIndex = str.substr(pos + closer.length).indexOf(closer); - if (closerIndex < 0) { - return null; - } - - const inner = new Boundary(); - const outer = new Boundary(); - - inner.start = pos + closer.length; - inner.end = inner.start + closerIndex; - - outer.start = pos; - outer.end = inner.end + closer.length; - - return { - outer, - inner, - }; - } - - // Searches for the first latex block in the given string - findLatex(str) { - let start = 0; - let openingDelimiterMatch; - - while ((openingDelimiterMatch = this.findOpeningDelimiter(str, start++)) != null) { - const match = this.getLatexBoundaries(str, openingDelimiterMatch); - if (match && match.inner.extract(str).trim().length) { - match.options = openingDelimiterMatch.options; - return match; - } - } - - return null; - } - - // Breaks a message to what comes before, after and to the content of a - // matched latex block - extractLatex(str, match) { - const before = str.substr(0, match.outer.start); - const after = str.substr(match.outer.end); - let latex = match.inner.extract(str); - latex = unescapeHTML(latex); - return { - before, - latex, - after, - }; - } - - // Takes a latex math string and the desired display mode and renders it - // to HTML using the KaTeX library - renderLatex = (latex, displayMode) => { - try { - return this.katex.renderToString(latex, { - displayMode, - macros: { - '\\href': '\\@secondoftwo', - }, - }); - } catch ({ message }) { - return `
${escapeHTML(message)}
`; - } - }; - - // Takes a string and renders all latex blocks inside it - render(str, renderFunction) { - let result = ''; - while (this.findLatex(str) != null) { - // Find the first latex block in the string - const match = this.findLatex(str); - const parts = this.extractLatex(str, match); - - // Add to the reuslt what comes before the latex block as well as - // the rendered latex content - const rendered = renderFunction(parts.latex, match.options.displayMode); - result += parts.before + rendered; - // Set what comes after the latex block to be examined next - str = parts.after; - } - result += str; - return result; - } - - renderMessage = (message) => { - if (typeof message === 'string') { - return this.render(message, this.renderLatex); - } - - if (!message.html?.trim()) { - return message; - } - - if (!message.tokens) { - message.tokens = []; - } - - message.html = this.render(message.html, (latex, displayMode) => { - const token = `=!=${Random.id()}=!=`; - message.tokens.push({ - token, - text: this.renderLatex(latex, displayMode), - }); - return token; - }); - - return message; - }; -} - -export const createKatexMessageRendering = (options) => { - const instance = new Katex(katex, options); - return (message) => instance.renderMessage(message); -}; diff --git a/app/lib/README.md b/app/lib/README.md deleted file mode 100644 index 2308f1e0da4f..000000000000 --- a/app/lib/README.md +++ /dev/null @@ -1,159 +0,0 @@ -## Rocket.Chat main library - -This package contains the main libraries of Rocket.Chat. - -### APIs - -#### Settings - -This is an example to create settings: -```javascript -settingsRegistry.addGroup('Settings_Group', function() { - this.add('SettingInGroup', 'default_value', { type: 'boolean', public: true }); - - this.section('Group_Section', function() { - this.add('Setting_Inside_Section', 'default_value', { - type: 'boolean', - public: true, - enableQuery: { - _id: 'SettingInGroup', - value: true - } - }); - }); -}); -``` - -`settingsRegistry.add` type: - -* `string` - Stores a string value - * Additional options: - * `multiline`: boolean -* `int` - Stores an integer value -* `boolean` - Stores a boolean value -* `select` - Creates an ` -
-
- -
- `; - return modal.open( - { - title: t('Upload_file_question'), - text, - showCancelButton: true, - closeOnConfirm: false, - closeOnCancel: false, - confirmButtonText: t('Send'), - cancelButtonText: t('Cancel'), - html: true, - onRendered: () => $('#file-name').focus(), - }, - function (isConfirm) { - const record = { - name: document.getElementById('file-name').value || blob.name, - size: blob.size, - type: blob.type, - rid: roomId, - description: document.getElementById('file-description').value, - }; - modal.close(); - - if (!isConfirm) { - return; - } - - const upload = fileUploadHandler('Uploads', record, blob); - - let uploading = Session.get('uploading') || []; - uploading.push({ - id: upload.id, - name: upload.getFileName(), - percentage: 0, - }); - - Session.set('uploading', uploading); - - upload.onProgress = function (progress) { - uploading = Session.get('uploading'); - - const item = _.findWhere(uploading, { id: upload.id }); - if (item != null) { - item.percentage = Math.round(progress * 100) || 0; - return Session.set('uploading', uploading); - } - }; - - upload.start(function (error, file, storage) { - if (error) { - let uploading = Session.get('uploading'); - if (!Array.isArray(uploading)) { - uploading = []; - } - - const item = _.findWhere(uploading, { id: upload.id }); - - if (_.isObject(item)) { - item.error = error.message; - item.percentage = 0; - } else { - uploading.push({ - error: error.error, - percentage: 0, - }); - } - - return Session.set('uploading', uploading); - } - - if (file) { - Meteor.call('sendFileMessage', roomId, storage, file, () => { - setTimeout(() => { - const uploading = Session.get('uploading'); - if (uploading !== null) { - const item = _.findWhere(uploading, { - id: upload.id, - }); - return Session.set('uploading', _.without(uploading, item)); - } - }, 2000); - }); - } - }); - }, - ); - }, -}); - -Template.webdavFilePicker.onRendered(async function () { - this.autorun(() => { - showWebdavFileList(); - }); - - this.autorun(() => { - const { sortDirection, sortBy } = Template.instance(); - const data = sortTable(this.state.get('webdavNodes'), sortBy.get(), sortDirection.get()); - this.state.set('webdavNodes', data); - }); - - this.autorun(() => { - const loading = this.isLoading.get(); - if (loading) { - return; - } - const input = this.searchText.get(); - const regex = new RegExp(`\\b${input}`, 'i'); - const data = this.state.get('unfilteredWebdavNodes').filter(({ basename }) => basename.match(regex)); - this.state.set('webdavNodes', data); - }); -}); - -Template.webdavFilePicker.onCreated(function () { - this.state = new ReactiveDict({ - webdavCurrentFolder: '/', - webdavNodes: [], - unfilteredWebdavNodes: [], - }); - this.isLoading = new ReactiveVar(true); - this.isListMode = new ReactiveVar(true); - this.sortBy = new ReactiveVar('name'); - this.sortDirection = new ReactiveVar('asc'); - this.searchText = new ReactiveVar(''); -}); diff --git a/app/webdav/server/lib/webdavClientAdapter.ts b/app/webdav/server/lib/webdavClientAdapter.ts deleted file mode 100644 index 7ff6100cb801..000000000000 --- a/app/webdav/server/lib/webdavClientAdapter.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { createClient, WebDavClient, Stat } from 'webdav'; - -export type ServerCredentials = { - token?: string; - username?: string; - password?: string; -}; - -export class WebdavClientAdapter { - _client: WebDavClient; - - constructor(serverConfig: string, cred: ServerCredentials) { - if (cred.token) { - this._client = createClient(serverConfig, { token: cred.token }); - } else { - this._client = createClient(serverConfig, { - username: cred.username, - password: cred.password, - }); - } - } - - async stat(path: string): Promise { - try { - return await this._client.stat(path); - } catch (error) { - throw new Error( - error.response && error.response.statusText ? error.response.statusText : 'Error checking if directory exists on webdav', - ); - } - } - - async createDirectory(path: string): Promise { - try { - return await this._client.createDirectory(path); - } catch (error) { - throw new Error(error.response && error.response.statusText ? error.response.statusText : 'Error creating directory on webdav'); - } - } - - async deleteFile(path: string): Promise { - try { - return await this._client.deleteFile(path); - } catch (error) { - throw new Error(error.response && error.response.statusText ? error.response.statusText : 'Error deleting file on webdav'); - } - } - - async getFileContents(filename: string): Promise { - try { - return (await this._client.getFileContents(filename)) as Buffer; - } catch (error) { - throw new Error(error.response && error.response.statusText ? error.response.statusText : 'Error getting file contents webdav'); - } - } - - async getDirectoryContents(path: string): Promise> { - try { - return await this._client.getDirectoryContents(path); - } catch (error) { - throw new Error(error.response && error.response.statusText ? error.response.statusText : 'Error getting directory contents webdav'); - } - } - - async putFileContents(path: string, data: Buffer, options: Record = {}): Promise { - try { - return await this._client.putFileContents(path, data, options); - } catch (error) { - throw new Error(error.response?.statusText ?? 'Error updating file contents.'); - } - } - - createReadStream(path: string, options?: Record): ReadableStream { - return this._client.createReadStream(path, options); - } - - createWriteStream(path: string): WritableStream { - return this._client.createWriteStream(path); - } -} diff --git a/app/webdav/server/methods/addWebdavAccount.ts b/app/webdav/server/methods/addWebdavAccount.ts deleted file mode 100644 index b45f3fbf47ea..000000000000 --- a/app/webdav/server/methods/addWebdavAccount.ts +++ /dev/null @@ -1,130 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Match, check } from 'meteor/check'; - -import { settings } from '../../../settings/server'; -import { WebdavAccounts } from '../../../models/server/raw'; -import { WebdavClientAdapter } from '../lib/webdavClientAdapter'; -import { Notifications } from '../../../notifications/server'; - -Meteor.methods({ - async addWebdavAccount(formData) { - const userId = Meteor.userId(); - - if (!userId) { - throw new Meteor.Error('error-invalid-user', 'Invalid User', { method: 'addWebdavAccount' }); - } - - if (!settings.get('Webdav_Integration_Enabled')) { - throw new Meteor.Error('error-not-allowed', 'WebDAV Integration Not Allowed', { - method: 'addWebdavAccount', - }); - } - - check( - formData, - Match.ObjectIncluding({ - serverURL: String, - username: String, - password: String, - name: Match.Maybe(String), - }), - ); - - const duplicateAccount = await WebdavAccounts.findOneByUserIdServerUrlAndUsername( - { userId, serverURL: formData.serverURL, username: formData.username }, - {}, - ); - - if (duplicateAccount !== null) { - throw new Meteor.Error('duplicated-account', 'Account not found', { - method: 'addWebdavAccount', - }); - } - - try { - const client = new WebdavClientAdapter(formData.serverURL, { - username: formData.username, - password: formData.password, - }); - - const accountData = { - userId, - serverURL: formData.serverURL, - username: formData.username, - password: formData.password, - name: formData.name ?? '', - }; - - await client.stat('/'); - await WebdavAccounts.insertOne(accountData); - Notifications.notifyUser(userId, 'webdav', { - type: 'changed', - account: accountData, - }); - } catch (error) { - throw new Meteor.Error('could-not-access-webdav', 'Could not access webdav', { - method: 'addWebdavAccount', - }); - } - return true; - }, - - async addWebdavAccountByToken(data) { - const userId = Meteor.userId(); - - if (!userId) { - throw new Meteor.Error('error-invalid-user', 'Invalid User', { method: 'addWebdavAccount' }); - } - - if (!settings.get('Webdav_Integration_Enabled')) { - throw new Meteor.Error('error-not-allowed', 'WebDAV Integration Not Allowed', { - method: 'addWebdavAccount', - }); - } - - check( - data, - Match.ObjectIncluding({ - serverURL: String, - token: String, - name: Match.Maybe(String), - }), - ); - - try { - const client = new WebdavClientAdapter(data.serverURL, { token: data.token }); - - const accountData = { - userId, - serverURL: data.serverURL, - token: data.token, - name: data.name ?? '', - }; - - await client.stat('/'); - await WebdavAccounts.updateOne( - { - userId, - serverURL: data.serverURL, - name: data.name ?? '', - }, - { - $set: accountData, - }, - { - upsert: true, - }, - ); - Notifications.notifyUser(userId, 'webdav', { - type: 'changed', - account: accountData, - }); - } catch (error) { - throw new Meteor.Error('could-not-access-webdav', 'Could not access webdav', { - method: 'addWebdavAccount', - }); - } - - return true; - }, -}); diff --git a/app/webdav/server/methods/getFileFromWebdav.ts b/app/webdav/server/methods/getFileFromWebdav.ts deleted file mode 100644 index 1f0bf354c278..000000000000 --- a/app/webdav/server/methods/getFileFromWebdav.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { settings } from '../../../settings/server'; -import { getWebdavCredentials } from './getWebdavCredentials'; -import { WebdavAccounts } from '../../../models/server/raw'; -import { WebdavClientAdapter } from '../lib/webdavClientAdapter'; - -Meteor.methods({ - async getFileFromWebdav(accountId, file) { - const userId = Meteor.userId(); - - if (!userId) { - throw new Meteor.Error('error-invalid-user', 'Invalid User', { method: 'getFileFromWebdav' }); - } - if (!settings.get('Webdav_Integration_Enabled')) { - throw new Meteor.Error('error-not-allowed', 'WebDAV Integration Not Allowed', { - method: 'getFileFromWebdav', - }); - } - - const account = await WebdavAccounts.findOneByIdAndUserId(accountId, userId, {}); - if (!account) { - throw new Meteor.Error('error-invalid-account', 'Invalid WebDAV Account', { - method: 'getFileFromWebdav', - }); - } - - try { - const cred = getWebdavCredentials(account); - const client = new WebdavClientAdapter(account.serverURL, cred); - const fileContent = await client.getFileContents(file.filename); - const data = new Uint8Array(fileContent); - return { success: true, data }; - } catch (error) { - throw new Meteor.Error('unable-to-get-file', 'Unable to get file', { - method: 'getFileFromWebdav', - }); - } - }, -}); diff --git a/app/webdav/server/methods/getWebdavCredentials.ts b/app/webdav/server/methods/getWebdavCredentials.ts deleted file mode 100644 index 873050ccd2db..000000000000 --- a/app/webdav/server/methods/getWebdavCredentials.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ServerCredentials } from '../lib/webdavClientAdapter'; - -export function getWebdavCredentials(account: ServerCredentials): ServerCredentials { - const cred = account.token - ? { token: account.token } - : { - username: account.username, - password: account.password, - }; - return cred; -} diff --git a/app/webdav/server/methods/getWebdavFileList.ts b/app/webdav/server/methods/getWebdavFileList.ts deleted file mode 100644 index 0343f273cebb..000000000000 --- a/app/webdav/server/methods/getWebdavFileList.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { settings } from '../../../settings/server'; -import { getWebdavCredentials } from './getWebdavCredentials'; -import { WebdavAccounts } from '../../../models/server/raw'; -import { WebdavClientAdapter } from '../lib/webdavClientAdapter'; - -Meteor.methods({ - async getWebdavFileList(accountId, path) { - const userId = Meteor.userId(); - - if (!userId) { - throw new Meteor.Error('error-invalid-user', 'Invalid User', { method: 'getWebdavFileList' }); - } - - if (!settings.get('Webdav_Integration_Enabled')) { - throw new Meteor.Error('error-not-allowed', 'WebDAV Integration Not Allowed', { - method: 'getWebdavFileList', - }); - } - - const account = await WebdavAccounts.findOneByIdAndUserId(accountId, userId, {}); - if (!account) { - throw new Meteor.Error('error-invalid-account', 'Invalid WebDAV Account', { - method: 'getWebdavFileList', - }); - } - - try { - const cred = getWebdavCredentials(account); - const client = new WebdavClientAdapter(account.serverURL, cred); - const data = await client.getDirectoryContents(path); - return { success: true, data }; - } catch (error) { - throw new Meteor.Error('could-not-access-webdav', 'Could not access webdav', { - method: 'getWebdavFileList', - }); - } - }, -}); diff --git a/app/webdav/server/methods/getWebdavFilePreview.ts b/app/webdav/server/methods/getWebdavFilePreview.ts deleted file mode 100644 index f98d0a57ca20..000000000000 --- a/app/webdav/server/methods/getWebdavFilePreview.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { createClient } from 'webdav'; - -import { settings } from '../../../settings/server'; -import { getWebdavCredentials } from './getWebdavCredentials'; -import { WebdavAccounts } from '../../../models/server/raw'; - -Meteor.methods({ - async getWebdavFilePreview(accountId, path) { - const userId = Meteor.userId(); - - if (!userId) { - throw new Meteor.Error('error-invalid-user', 'Invalid User', { - method: 'getWebdavFilePreview', - }); - } - - if (!settings.get('Webdav_Integration_Enabled')) { - throw new Meteor.Error('error-not-allowed', 'WebDAV Integration Not Allowed', { - method: 'getWebdavFilePreview', - }); - } - - const account = await WebdavAccounts.findOneByIdAndUserId(accountId, userId, {}); - if (!account) { - throw new Meteor.Error('error-invalid-account', 'Invalid WebDAV Account', { - method: 'getWebdavFilePreview', - }); - } - - try { - const cred = getWebdavCredentials(account); - const client = createClient(account.serverURL, cred); - const serverURL = settings.get('Accounts_OAuth_Nextcloud_URL'); - const res = await client.customRequest(`${serverURL}/index.php/core/preview.png?file=${path}&x=64&y=64`, { - method: 'GET', - responseType: 'arraybuffer', - }); - return { success: true, data: res.data }; - } catch (error) { - // ignore error - } - }, -}); diff --git a/app/webdav/server/methods/removeWebdavAccount.ts b/app/webdav/server/methods/removeWebdavAccount.ts deleted file mode 100644 index 2cd114450803..000000000000 --- a/app/webdav/server/methods/removeWebdavAccount.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { check } from 'meteor/check'; - -import { WebdavAccounts } from '../../../models/server/raw'; -import { Notifications } from '../../../notifications/server'; - -Meteor.methods({ - async removeWebdavAccount(accountId) { - const userId = Meteor.userId(); - - if (!userId) { - throw new Meteor.Error('error-invalid-user', 'Invalid User', { - method: 'removeWebdavAccount', - }); - } - - check(accountId, String); - - const removed = await WebdavAccounts.removeByUserAndId(accountId, userId); - if (removed) { - Notifications.notifyUser(userId, 'webdav', { - type: 'removed', - account: { _id: accountId }, - }); - } - - return removed; - }, -}); diff --git a/app/webdav/server/methods/uploadFileToWebdav.ts b/app/webdav/server/methods/uploadFileToWebdav.ts deleted file mode 100644 index 1e1cc1bba953..000000000000 --- a/app/webdav/server/methods/uploadFileToWebdav.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { settings } from '../../../settings/server'; -import { Logger } from '../../../logger/server'; -import { getWebdavCredentials } from './getWebdavCredentials'; -import { WebdavAccounts } from '../../../models/server/raw'; -import { WebdavClientAdapter } from '../lib/webdavClientAdapter'; - -const logger = new Logger('WebDAV_Upload'); - -Meteor.methods({ - async uploadFileToWebdav(accountId, fileData, name) { - if (!Meteor.userId()) { - throw new Meteor.Error('error-invalid-user', 'Invalid User', { - method: 'uploadFileToWebdav', - }); - } - - if (!settings.get('Webdav_Integration_Enabled')) { - throw new Meteor.Error('error-not-allowed', 'WebDAV Integration Not Allowed', { - method: 'uploadFileToWebdav', - }); - } - - const account = await WebdavAccounts.findOneById(accountId); - if (!account) { - throw new Meteor.Error('error-invalid-account', 'Invalid WebDAV Account', { - method: 'uploadFileToWebdav', - }); - } - - const uploadFolder = 'Rocket.Chat Uploads/'; - const buffer = Buffer.from(fileData); - - try { - const cred = getWebdavCredentials(account); - const client = new WebdavClientAdapter(account.serverURL, cred); - // eslint-disable-next-line @typescript-eslint/no-empty-function - await client.createDirectory(uploadFolder).catch(() => {}); - await client.putFileContents(`${uploadFolder}/${name}`, buffer, { overwrite: false }); - return { success: true }; - } catch (error) { - // @ts-ignore - logger.error(error); - - if (error.response) { - const { status } = error.response; - if (status === 404) { - return { success: false, message: 'webdav-server-not-found' }; - } - if (status === 401) { - return { success: false, message: 'error-invalid-account' }; - } - if (status === 412) { - return { success: false, message: 'Duplicate_file_name_found' }; - } - } - return { success: false, message: 'FileUpload_Error' }; - } - }, -}); diff --git a/app/webrtc/client/actionLink.tsx b/app/webrtc/client/actionLink.tsx deleted file mode 100644 index 87de1b71b6ee..000000000000 --- a/app/webrtc/client/actionLink.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; -import toastr from 'toastr'; - -import { actionLinks } from '../../action-links/client'; -import { APIClient } from '../../utils/client'; -import { Rooms } from '../../models/client'; -import { IMessage } from '../../../definition/IMessage'; -import { Notifications } from '../../notifications/client'; - -actionLinks.register('joinLivechatWebRTCCall', (message: IMessage) => { - const { callStatus, _id } = Rooms.findOne({ _id: message.rid }); - if (callStatus === 'declined' || callStatus === 'ended') { - toastr.info(TAPi18n.__('Call_Already_Ended')); - return; - } - window.open(`/meet/${_id}`, _id); -}); - -actionLinks.register('endLivechatWebRTCCall', async (message: IMessage) => { - const { callStatus, _id } = Rooms.findOne({ _id: message.rid }); - if (callStatus === 'declined' || callStatus === 'ended') { - toastr.info(TAPi18n.__('Call_Already_Ended')); - return; - } - await APIClient.v1.put(`livechat/webrtc.call/${message._id}`, {}, { rid: _id, status: 'ended' }); - Notifications.notifyRoom(_id, 'webrtc', 'callStatus', { callStatus: 'ended' }); -}); diff --git a/app/webrtc/client/tabBar.tsx b/app/webrtc/client/tabBar.tsx deleted file mode 100644 index 15305db33070..000000000000 --- a/app/webrtc/client/tabBar.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { useMemo, useCallback } from 'react'; - -import { useSetting } from '../../../client/contexts/SettingsContext'; -import { addAction } from '../../../client/views/room/lib/Toolbox'; -import { APIClient } from '../../utils/client'; - -addAction('webRTCVideo', ({ room }) => { - const enabled = useSetting('WebRTC_Enabled') && useSetting('Omnichannel_call_provider') === 'WebRTC' && room.servedBy; - - const handleClick = useCallback(async (): Promise => { - if (!room.callStatus || room.callStatus === 'declined' || room.callStatus === 'ended') { - await APIClient.v1.get('livechat/webrtc.call', { rid: room._id }); - } - window.open(`/meet/${room._id}`, room._id); - }, [room._id, room.callStatus]); - - return useMemo( - () => - enabled - ? { - groups: ['live'], - id: 'webRTCVideo', - title: 'WebRTC_Call', - icon: 'phone', - action: handleClick, - full: true, - order: 4, - } - : null, - [enabled, handleClick], - ); -}); diff --git a/app/webrtc/server/settings.ts b/app/webrtc/server/settings.ts deleted file mode 100644 index df3ebfda7ee2..000000000000 --- a/app/webrtc/server/settings.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { settingsRegistry } from '../../settings/server'; - -settingsRegistry.addGroup('WebRTC', function () { - this.add('WebRTC_Enabled', false, { - type: 'boolean', - group: 'WebRTC', - public: true, - i18nLabel: 'Enabled', - }); - this.add('WebRTC_Enable_Channel', false, { - type: 'boolean', - group: 'WebRTC', - public: true, - enableQuery: { _id: 'WebRTC_Enabled', value: true }, - }); - this.add('WebRTC_Enable_Private', false, { - type: 'boolean', - group: 'WebRTC', - public: true, - enableQuery: { _id: 'WebRTC_Enabled', value: true }, - }); - this.add('WebRTC_Enable_Direct', false, { - type: 'boolean', - group: 'WebRTC', - public: true, - enableQuery: { _id: 'WebRTC_Enabled', value: true }, - }); - return this.add( - 'WebRTC_Servers', - 'stun:stun.l.google.com:19302, stun:23.21.150.121, team%40rocket.chat:demo@turn:numb.viagenie.ca:3478', - { - type: 'string', - group: 'WebRTC', - public: true, - enableQuery: { _id: 'WebRTC_Enabled', value: true }, - }, - ); -}); diff --git a/apps/meteor/.babelrc b/apps/meteor/.babelrc new file mode 100644 index 000000000000..a8c20b400ca5 --- /dev/null +++ b/apps/meteor/.babelrc @@ -0,0 +1,9 @@ +{ + "presets": [ + "@babel/preset-env", + "@babel/preset-react" + ], + "plugins": [ + "babel-plugin-istanbul" + ] +} diff --git a/.codeclimate.yml b/apps/meteor/.codeclimate.yml similarity index 100% rename from .codeclimate.yml rename to apps/meteor/.codeclimate.yml diff --git a/apps/meteor/.docker-mongo/Dockerfile b/apps/meteor/.docker-mongo/Dockerfile new file mode 100644 index 000000000000..f8556d971d8b --- /dev/null +++ b/apps/meteor/.docker-mongo/Dockerfile @@ -0,0 +1,66 @@ +FROM node:14.19.3-bullseye-slim + +LABEL maintainer="buildmaster@rocket.chat" + +# Install MongoDB and dependencies +ENV MONGO_MAJOR=5.0 \ + MONGO_VERSION=5.0.5 + +RUN set -x \ + && apt-get update \ + && apt-get install -y wget gnupg dirmngr pwgen \ + && wget -qO - "https://www.mongodb.org/static/pgp/server-$MONGO_MAJOR.asc" | apt-key add - \ + && echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/$MONGO_MAJOR main" | tee "/etc/apt/sources.list.d/mongodb-org-$MONGO_MAJOR.list" \ + && apt-get update \ + && apt-get install -y \ + mongodb-org=$MONGO_VERSION \ + mongodb-org-server=$MONGO_VERSION \ + mongodb-org-shell=$MONGO_VERSION \ + mongodb-org-mongos=$MONGO_VERSION \ + mongodb-org-tools=$MONGO_VERSION \ + fontconfig \ + && apt-get clean my room \ + && groupadd -g 65533 -r rocketchat \ + && useradd -u 65533 -r -g rocketchat rocketchat \ + && mkdir -p /app/uploads \ + && chown rocketchat:rocketchat /app/uploads + +# --chown requires Docker 17.12 and works only on Linux +ADD --chown=rocketchat:rocketchat . /app +ADD --chown=rocketchat:rocketchat entrypoint.sh /app/bundle/ + +RUN aptMark="$(apt-mark showmanual)" \ + && apt-get install -y --no-install-recommends g++ make python ca-certificates \ + && cd /app/bundle/programs/server \ + && npm install \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $aptMark > /dev/null \ + && find /usr/local -type f -executable -exec ldd '{}' ';' \ + | awk '/=>/ { print $(NF-1) }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -r apt-mark manual \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && npm cache clear --force + +VOLUME /app/uploads + +WORKDIR /app/bundle + +# needs a mongoinstance - defaults to container linking with alias 'mongo' +ENV DEPLOY_METHOD=docker-preview \ + NODE_ENV=production \ + MONGO_URL=mongodb://localhost:27017/rocketchat \ + MONGO_OPLOG_URL=mongodb://localhost:27017/local \ + HOME=/tmp \ + PORT=3000 \ + ROOT_URL=http://localhost:3000 \ + Accounts_AvatarStorePath=/app/uploads + +EXPOSE 3000 + +RUN chmod +x /app/bundle/entrypoint.sh + +ENTRYPOINT /app/bundle/entrypoint.sh diff --git a/.docker-mongo/entrypoint.sh b/apps/meteor/.docker-mongo/entrypoint.sh similarity index 100% rename from .docker-mongo/entrypoint.sh rename to apps/meteor/.docker-mongo/entrypoint.sh diff --git a/.docker-mongo/licenses/LICENSE b/apps/meteor/.docker-mongo/licenses/LICENSE similarity index 100% rename from .docker-mongo/licenses/LICENSE rename to apps/meteor/.docker-mongo/licenses/LICENSE diff --git a/apps/meteor/.docker/Dockerfile b/apps/meteor/.docker/Dockerfile new file mode 100644 index 000000000000..ce06aeb052eb --- /dev/null +++ b/apps/meteor/.docker/Dockerfile @@ -0,0 +1,49 @@ +FROM node:14.19.3-bullseye-slim + +LABEL maintainer="buildmaster@rocket.chat" + +# dependencies +RUN groupadd -g 65533 -r rocketchat \ + && useradd -u 65533 -r -g rocketchat rocketchat \ + && mkdir -p /app/uploads \ + && chown rocketchat:rocketchat /app/uploads \ + && apt-get update \ + && apt-get install -y --no-install-recommends fontconfig + +# --chown requires Docker 17.12 and works only on Linux +ADD --chown=rocketchat:rocketchat . /app + +RUN aptMark="$(apt-mark showmanual)" \ + && apt-get install -y --no-install-recommends g++ make python ca-certificates \ + && cd /app/bundle/programs/server \ + && npm install \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $aptMark > /dev/null \ + && find /usr/local -type f -executable -exec ldd '{}' ';' \ + | awk '/=>/ { print $(NF-1) }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -r apt-mark manual \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && npm cache clear --force + +USER rocketchat + +VOLUME /app/uploads + +WORKDIR /app/bundle + +# needs a mongoinstance - defaults to container linking with alias 'mongo' +ENV DEPLOY_METHOD=docker \ + NODE_ENV=production \ + MONGO_URL=mongodb://mongo:27017/rocketchat \ + HOME=/tmp \ + PORT=3000 \ + ROOT_URL=http://localhost:3000 \ + Accounts_AvatarStorePath=/app/uploads + +EXPOSE 3000 + +CMD ["node", "main.js"] diff --git a/apps/meteor/.docker/Dockerfile.alpine b/apps/meteor/.docker/Dockerfile.alpine new file mode 100644 index 000000000000..99aa4c2eb016 --- /dev/null +++ b/apps/meteor/.docker/Dockerfile.alpine @@ -0,0 +1,38 @@ +FROM node:14.19.3-alpine3.15 + +RUN apk add --no-cache ttf-dejavu + +ADD . /app + +LABEL maintainer="buildmaster@rocket.chat" + +RUN set -x \ + && apk add --no-cache --virtual .fetch-deps python3 make g++ libc6-compat \ + && cd /app/bundle/programs/server \ + && npm install --production \ + # Start hack for sharp... + && rm -rf npm/node_modules/sharp \ + && npm install sharp@0.30.4 \ + && mv node_modules/sharp npm/node_modules/sharp \ + # End hack for sharp + && cd npm \ + && npm rebuild bcrypt --build-from-source \ + && npm cache clear --force \ + && apk del .fetch-deps + +# needs a mongo instance - defaults to container linking with alias 'mongo' +ENV DEPLOY_METHOD=docker \ + NODE_ENV=production \ + MONGO_URL=mongodb://mongo:27017/rocketchat \ + HOME=/tmp \ + PORT=3000 \ + ROOT_URL=http://localhost:3000 \ + Accounts_AvatarStorePath=/app/uploads + +VOLUME /app/uploads + +WORKDIR /app/bundle + +EXPOSE 3000 + +CMD ["node", "main.js"] diff --git a/.docker/Dockerfile.rhel b/apps/meteor/.docker/Dockerfile.rhel similarity index 98% rename from .docker/Dockerfile.rhel rename to apps/meteor/.docker/Dockerfile.rhel index 4733db044237..60144f4ec05c 100644 --- a/.docker/Dockerfile.rhel +++ b/apps/meteor/.docker/Dockerfile.rhel @@ -1,6 +1,6 @@ FROM registry.access.redhat.com/ubi8/nodejs-12 -ENV RC_VERSION 4.4.2 +ENV RC_VERSION 5.1.0 MAINTAINER buildmaster@rocket.chat diff --git a/.docker/licenses/LICENSE b/apps/meteor/.docker/licenses/LICENSE similarity index 100% rename from .docker/licenses/LICENSE rename to apps/meteor/.docker/licenses/LICENSE diff --git a/apps/meteor/.dockerignore b/apps/meteor/.dockerignore new file mode 100644 index 000000000000..5404e285334b --- /dev/null +++ b/apps/meteor/.dockerignore @@ -0,0 +1,6 @@ +.git +.gitignore +LICENSE +README.md +docker-compose.yml +tests/e2e/test-failures/ diff --git a/apps/meteor/.eslintignore b/apps/meteor/.eslintignore new file mode 100644 index 000000000000..158360ed08eb --- /dev/null +++ b/apps/meteor/.eslintignore @@ -0,0 +1,23 @@ +node_modules +data/ +tests/e2e/test-failures/ +packages/autoupdate/ +packages/meteor-streams/ +app/emoji-emojione/generateEmojiIndex.js +packages/rocketchat-livechat/assets/rocketchat-livechat.min.js +packages/rocketchat-livechat/assets/rocket-livechat.js +app/theme/client/vendor/ +public/packages/rocketchat_videobridge/client/public/external_api.js +packages/tap-i18n/lib/tap_i18next/tap_i18next-1.7.3.js +private/moment-locales/ +public/livechat/ +public/pdf.worker.min.js +public/workers/**/* +imports/client/**/* +ee/server/services/dist/** +!/.mocharc.js +!/.mocharc.*.js +!/.scripts/ +!/.storybook/ +!/client/.eslintrc.js +!/ee/client/.eslintrc.js diff --git a/apps/meteor/.eslintrc.json b/apps/meteor/.eslintrc.json new file mode 100644 index 000000000000..e41eb46338e0 --- /dev/null +++ b/apps/meteor/.eslintrc.json @@ -0,0 +1,56 @@ +{ + "extends": ["@rocket.chat/eslint-config"], + "globals": { + "__meteor_bootstrap__": false, + "__meteor_runtime_config__": false, + "Assets": false, + "chrome": false, + "jscolor": false + }, + "plugins": ["react", "react-hooks"], + "rules": { + "react/jsx-uses-react": "error", + "react/jsx-uses-vars": "error", + "react/jsx-no-undef": "error", + "react/jsx-fragments": ["error", "syntax"], + "react-hooks/rules-of-hooks": "error", + "react-hooks/exhaustive-deps": [ + "warn", + { + "additionalHooks": "(useComponentDidUpdate)" + } + ] + }, + "settings": { + "react": { + "version": "detect" + } + }, + "overrides": [ + { + "files": ["**/*.ts", "**/*.tsx"], + "globals": { + "Atomics": "readonly", + "SharedArrayBuffer": "readonly" + }, + "plugins": ["react"], + "rules": { + "react/jsx-uses-react": "error", + "react/jsx-uses-vars": "error", + "react/jsx-no-undef": "error", + "react/jsx-fragments": ["error", "syntax"] + }, + "settings": { + "react": { + "version": "detect" + } + } + }, + { + "files": ["**/*.tests.js", "**/*.tests.ts", "**/*.spec.ts"], + "env": { + "mocha": true + } + } + ] +} diff --git a/apps/meteor/.gitignore b/apps/meteor/.gitignore new file mode 100644 index 000000000000..31e6bfee5c60 --- /dev/null +++ b/apps/meteor/.gitignore @@ -0,0 +1,88 @@ +**/bin/** +**/build/* +**/node_modules/* +**/tmp/* +**/.meteor/.id +**/.meteor/dev_bundle +**/.meteor/local* +**/.meteor/meteorite +/private/certs/* +*.bak +*.iml +*.ipr +*.iws +*.launch +*.log +*.pydevproject +*.sublime-project +*.sublime-workspace +*.swp +*.tmp +*.tokens +*.un~ +*~ +*~.nib +.*.sw[a-z] +.\#* +._* +.buildpath +.classpath +.clover +.cproject +.DS_Store +.elasticbeanstalk +.elc +.emacs.desktop +.emacs.desktop.lock +.env +.externalToolBuilders +.idea +.vscode +.loadpath +.map +.metadata +packages/rocketchat-livechat/assets/rocketchat-livechat.min.js +.mule +.pmd +.project +.sass-cache +.settings +.Spotlight-V100 +tatus +.Trashes +.wtpmodules +\#*\# +Desktop.ini +ehthumbs.db +example.css +jrat.output +jrat.xml +local.properties +meteor-vulcanize +nb-configuration.xml +nbactions.xml +nbproject +profiles.xml +Session.vim +smart.lock +temp_* +Thumbs.db +thumbs.db +tramp +ecosystem.json +pm2.json +settings.json +/public/livechat +packages/rocketchat-i18n/i18n/livechat.* +tests/end-to-end/temporary_staged_test +.screenshots +/private/livechat +/storybook-static +/tests/e2e/.playwright +coverage +.nyc_output +/data +tests/e2e/test-failures/ +out.txt +dist +*-session.json \ No newline at end of file diff --git a/.meteor/.finished-upgraders b/apps/meteor/.meteor/.finished-upgraders similarity index 100% rename from .meteor/.finished-upgraders rename to apps/meteor/.meteor/.finished-upgraders diff --git a/.meteor/.gitignore b/apps/meteor/.meteor/.gitignore similarity index 100% rename from .meteor/.gitignore rename to apps/meteor/.meteor/.gitignore diff --git a/.meteor/packages b/apps/meteor/.meteor/packages similarity index 78% rename from .meteor/packages rename to apps/meteor/.meteor/packages index 0be8da158f2a..292ef0526ba7 100644 --- a/.meteor/packages +++ b/apps/meteor/.meteor/packages @@ -1,6 +1,9 @@ # Meteor packages used by this project, one per line. + # + # 'meteor add' and 'meteor remove' will edit this file for you, + # but you can also edit it by hand. rocketchat:ddp @@ -10,22 +13,22 @@ accounts-facebook@1.3.3 accounts-github@1.5.0 accounts-google@1.4.0 accounts-meteor-developer@1.5.0 -accounts-password@2.2.0 +accounts-password@2.3.1 accounts-twitter@1.5.0 blaze-html-templates check@1.3.1 ddp-rate-limiter@1.1.0 ddp-common@1.4.0 dynamic-import@0.7.2 -ecmascript@0.16.1 -typescript@4.4.1 -ejson@1.1.1 -email@2.2.0 +ecmascript@0.16.2 +typescript@4.5.4 +ejson@1.1.2 +email@2.2.1 http@2.0.0 logging@1.3.1 meteor-base@1.5.1 mobile-experience@1.1.0 -mongo@1.13.0 +mongo@1.15.0 random@1.2.0 rate-limit@1.0.9 reactive-dict@1.3.0 @@ -38,7 +41,6 @@ spacebars standard-minifier-js@2.8.0 tracker@1.2.0 -#rocketchat:google-natural-language rocketchat:livechat rocketchat:streamer rocketchat:version @@ -47,11 +49,13 @@ konecty:multiple-instances-status konecty:user-presence dispatch:run-as-user -jalik:ufs@1.0.2 -jalik:ufs-gridfs@1.0.2 + +jalik:ufs@1.0.4 +jalik:ufs-gridfs@1.0.5 +jalik:ufs-local@1.0.4 + jparker:gravatar kadira:flow-router -mizzao:timesync mrt:reactive-store mystor:device-detection rocketchat:restivus @@ -65,26 +69,25 @@ rocketchat:tap-i18n@3.0.0 underscore@1.0.10 littledata:synced-cron -edgee:slingshot -jalik:ufs-local@1.0.2 -accounts-base@2.2.0 -accounts-oauth@1.4.0 +accounts-base@2.2.3 +accounts-oauth@1.4.1 autoupdate@1.8.0 -babel-compiler@7.8.0 -google-oauth@1.4.1 +babel-compiler@7.9.0 +google-oauth@1.4.2 htmljs less matb33:collection-hooks meteorhacks:inject-initial -oauth@2.1.0 +oauth@2.1.2 oauth2@1.3.1 routepolicy@1.1.1 sha@1.0.9 templating -webapp@1.13.0 +webapp@1.13.1 webapp-hashing@1.1.0 rocketchat:oauth2-server rocketchat:i18n -rocketchat:postcss dandv:caret-position facts-base@1.0.1 +url@1.3.2 +standard-minifier-css diff --git a/.meteor/platforms b/apps/meteor/.meteor/platforms similarity index 100% rename from .meteor/platforms rename to apps/meteor/.meteor/platforms diff --git a/apps/meteor/.meteor/release b/apps/meteor/.meteor/release new file mode 100644 index 000000000000..66dd7b664724 --- /dev/null +++ b/apps/meteor/.meteor/release @@ -0,0 +1 @@ +METEOR@2.7.3 diff --git a/apps/meteor/.meteor/versions b/apps/meteor/.meteor/versions new file mode 100644 index 000000000000..2cb41ac914aa --- /dev/null +++ b/apps/meteor/.meteor/versions @@ -0,0 +1,142 @@ +accounts-base@2.2.3 +accounts-facebook@1.3.3 +accounts-github@1.5.0 +accounts-google@1.4.0 +accounts-meteor-developer@1.5.0 +accounts-oauth@1.4.1 +accounts-password@2.3.1 +accounts-twitter@1.5.0 +aldeed:simple-schema@1.5.4 +allow-deny@1.1.1 +autoupdate@1.8.0 +babel-compiler@7.9.0 +babel-runtime@1.5.1 +base64@1.0.12 +binary-heap@1.0.11 +blaze@2.6.0 +blaze-html-templates@1.2.1 +blaze-tools@1.1.3 +boilerplate-generator@1.7.1 +caching-compiler@1.2.2 +caching-html-compiler@1.2.1 +callback-hook@1.4.0 +check@1.3.1 +coffeescript@2.4.1 +coffeescript-compiler@2.4.1 +dandv:caret-position@2.1.1 +ddp@1.4.0 +ddp-client@2.5.0 +ddp-common@1.4.0 +ddp-rate-limiter@1.1.0 +ddp-server@2.5.0 +deps@1.0.12 +diff-sequence@1.1.1 +dispatch:run-as-user@1.1.1 +dynamic-import@0.7.2 +ecmascript@0.16.2 +ecmascript-runtime@0.8.0 +ecmascript-runtime-client@0.12.1 +ecmascript-runtime-server@0.11.0 +ejson@1.1.2 +email@2.2.1 +es5-shim@4.8.0 +facebook-oauth@1.11.0 +facts-base@1.0.1 +fetch@0.1.1 +geojson-utils@1.0.10 +github-oauth@1.4.0 +google-oauth@1.4.2 +hot-code-push@1.0.4 +html-tools@1.1.3 +htmljs@1.1.1 +http@2.0.0 +id-map@1.1.1 +inter-process-messaging@0.1.1 +jalik:ufs@1.0.4 +jalik:ufs-gridfs@1.0.5 +jalik:ufs-local@1.0.4 +jparker:crypto-core@0.1.0 +jparker:crypto-md5@0.1.1 +jparker:gravatar@0.5.1 +jquery@3.0.0 +kadira:flow-router@2.12.1 +konecty:multiple-instances-status@1.1.0 +konecty:user-presence@2.6.3 +launch-screen@1.3.0 +less@3.0.2 +littledata:synced-cron@1.5.1 +localstorage@1.2.0 +logging@1.3.1 +matb33:collection-hooks@1.1.2 +mdg:validation-error@0.5.1 +meteor@1.10.0 +meteor-base@1.5.1 +meteor-developer-oauth@1.3.1 +meteorhacks:inject-initial@1.0.5 +minifier-css@1.6.0 +minifier-js@2.7.4 +minimongo@1.8.0 +mobile-experience@1.1.0 +mobile-status-bar@1.1.0 +modern-browsers@0.1.8 +modules@0.18.0 +modules-runtime@0.13.0 +mongo@1.15.0 +mongo-decimal@0.1.3 +mongo-dev-server@1.1.0 +mongo-id@1.0.8 +mrt:reactive-store@0.0.1 +mystor:device-detection@0.2.0 +nooitaf:colors@1.2.0 +npm-mongo@4.3.1 +oauth@2.1.2 +oauth1@1.5.0 +oauth2@1.3.1 +observe-sequence@1.0.20 +ordered-dict@1.1.0 +ostrio:cookies@2.7.2 +pauli:accounts-linkedin@6.0.0 +pauli:linkedin-oauth@6.0.0 +promise@0.12.0 +raix:eventemitter@1.0.0 +raix:handlebar-helpers@0.2.5 +raix:ui-dropped-event@0.0.7 +random@1.2.0 +rate-limit@1.0.9 +react-fast-refresh@0.2.3 +reactive-dict@1.3.0 +reactive-var@1.0.11 +reload@1.3.1 +retry@1.1.0 +rocketchat:ddp@0.0.1 +rocketchat:i18n@0.0.1 +rocketchat:livechat@0.0.1 +rocketchat:mongo-config@0.0.1 +rocketchat:oauth2-server@3.0.0 +rocketchat:restivus@1.0.0 +rocketchat:streamer@1.1.0 +rocketchat:tap-i18n@3.0.0 +rocketchat:version@1.0.0 +routepolicy@1.1.1 +service-configuration@1.3.0 +session@1.2.0 +sha@1.0.9 +shell-server@0.5.0 +simple:json-routes@2.3.1 +socket-stream-client@0.5.0 +spacebars@1.3.0 +spacebars-compiler@1.3.1 +standard-minifier-css@1.8.1 +standard-minifier-js@2.8.0 +templating@1.4.2 +templating-compiler@1.4.1 +templating-runtime@1.6.0 +templating-tools@1.2.2 +tracker@1.2.0 +twitter-oauth@1.3.0 +typescript@4.5.4 +ui@1.0.13 +underscore@1.0.10 +url@1.3.2 +webapp@1.13.1 +webapp-hashing@1.1.0 diff --git a/apps/meteor/.meteorignore b/apps/meteor/.meteorignore new file mode 100644 index 000000000000..7b2dc6e71c31 --- /dev/null +++ b/apps/meteor/.meteorignore @@ -0,0 +1,4 @@ +ee/server/services +coverage +data +dist diff --git a/apps/meteor/.mocharc.api.js b/apps/meteor/.mocharc.api.js new file mode 100644 index 000000000000..f6c09a541e00 --- /dev/null +++ b/apps/meteor/.mocharc.api.js @@ -0,0 +1,19 @@ +'use strict'; + +/** + * Mocha configuration for REST API integration tests. + */ + +module.exports = { + ...require('./.mocharc.base.json'), // see https://github.com/mochajs/mocha/issues/3916 + timeout: 10000, + bail: true, + file: 'tests/end-to-end/teardown.js', + spec: [ + 'tests/unit/app/api/server/v1/**/*.spec.ts', + 'tests/end-to-end/api/**/*.js', + 'tests/end-to-end/api/**/*.ts', + 'tests/end-to-end/apps/*.js', + 'tests/end-to-end/apps/*.ts', + ], +}; diff --git a/.mocharc.base.json b/apps/meteor/.mocharc.base.json similarity index 100% rename from .mocharc.base.json rename to apps/meteor/.mocharc.base.json diff --git a/apps/meteor/.mocharc.client.js b/apps/meteor/.mocharc.client.js new file mode 100644 index 000000000000..071914fe61c5 --- /dev/null +++ b/apps/meteor/.mocharc.client.js @@ -0,0 +1,39 @@ +'use strict'; + +/** + * Mocha configuration for client-side unit and integration tests. + */ + +const base = require('./.mocharc.base.json'); + +/** + * Mocha will run `ts-node` without doing type checking to speed-up the tests. It should be fine as `npm run typecheck` + * covers test files too. + */ + +Object.assign( + process.env, + { + TS_NODE_FILES: true, + TS_NODE_TRANSPILE_ONLY: true, + }, + process.env, +); + +module.exports = { + ...base, // see https://github.com/mochajs/mocha/issues/3916 + require: [ + ...base.require, + './tests/setup/registerWebApiMocks.ts', + './tests/setup/hoistedReact.ts', + './tests/setup/cleanupTestingLibrary.ts', + ], + exit: false, + slow: 200, + spec: [ + 'tests/unit/client/**/*.spec.ts', + 'tests/unit/lib/**/*.tests.ts', + 'tests/unit/client/**/*.test.ts', + 'tests/unit/client/**/*.spec.tsx', + ], +}; diff --git a/.mocharc.definition.js b/apps/meteor/.mocharc.definition.js similarity index 91% rename from .mocharc.definition.js rename to apps/meteor/.mocharc.definition.js index 32ba8d3c3a5f..eee0d51b4cbc 100644 --- a/.mocharc.definition.js +++ b/apps/meteor/.mocharc.definition.js @@ -25,5 +25,5 @@ module.exports = { require: [...base.require], exit: false, slow: 200, - spec: ['definition/**/*.spec.ts'], + spec: ['tests/unit/definition/**/*.spec.ts'], }; diff --git a/apps/meteor/.mocharc.js b/apps/meteor/.mocharc.js new file mode 100644 index 000000000000..f8118d74f7c9 --- /dev/null +++ b/apps/meteor/.mocharc.js @@ -0,0 +1,36 @@ +'use strict'; + +/** + * Mocha configuration for general unit tests. + */ + +const base = require('./.mocharc.base.json'); + +/** + * Mocha will run `ts-node` without doing type checking to speed-up the tests. It should be fine as `npm run typecheck` + * covers test files too. + */ + +Object.assign( + process.env, + { + TS_NODE_FILES: true, + TS_NODE_TRANSPILE_ONLY: true, + }, + process.env, +); + +module.exports = { + ...base, // see https://github.com/mochajs/mocha/issues/3916 + exit: true, + spec: [ + 'ee/tests/**/*.tests.ts', + 'ee/tests/**/*.spec.ts', + 'tests/unit/app/**/*.spec.ts', + 'tests/unit/app/**/*.tests.js', + 'tests/unit/app/**/*.tests.ts', + 'tests/unit/lib/**/*.tests.ts', + 'tests/unit/lib/**/*.spec.ts', + 'tests/unit/server/**/*.tests.ts', + ], +}; diff --git a/.openshift/rocket-chat-ephemeral.json b/apps/meteor/.openshift/rocket-chat-ephemeral.json similarity index 100% rename from .openshift/rocket-chat-ephemeral.json rename to apps/meteor/.openshift/rocket-chat-ephemeral.json diff --git a/.openshift/rocket-chat-persistent.json b/apps/meteor/.openshift/rocket-chat-persistent.json similarity index 100% rename from .openshift/rocket-chat-persistent.json rename to apps/meteor/.openshift/rocket-chat-persistent.json diff --git a/.postcssrc b/apps/meteor/.postcssrc similarity index 100% rename from .postcssrc rename to apps/meteor/.postcssrc diff --git a/.scripts/check-i18n.js b/apps/meteor/.scripts/check-i18n.js similarity index 100% rename from .scripts/check-i18n.js rename to apps/meteor/.scripts/check-i18n.js diff --git a/.scripts/fix-i18n.js b/apps/meteor/.scripts/fix-i18n.js similarity index 100% rename from .scripts/fix-i18n.js rename to apps/meteor/.scripts/fix-i18n.js diff --git a/.scripts/make-migration.ts b/apps/meteor/.scripts/make-migration.ts similarity index 100% rename from .scripts/make-migration.ts rename to apps/meteor/.scripts/make-migration.ts diff --git a/.scripts/migration.template b/apps/meteor/.scripts/migration.template similarity index 100% rename from .scripts/migration.template rename to apps/meteor/.scripts/migration.template diff --git a/.scripts/run-ha.ts b/apps/meteor/.scripts/run-ha.ts similarity index 95% rename from .scripts/run-ha.ts rename to apps/meteor/.scripts/run-ha.ts index ee75e77a8b83..91d37225f4be 100644 --- a/.scripts/run-ha.ts +++ b/apps/meteor/.scripts/run-ha.ts @@ -1,4 +1,5 @@ -import { spawn, SpawnOptions } from 'child_process'; +import type { SpawnOptions } from 'child_process'; +import { spawn } from 'child_process'; import * as path from 'path'; enum ModeParam { diff --git a/.scripts/translationDiff.js b/apps/meteor/.scripts/translationDiff.js similarity index 100% rename from .scripts/translationDiff.js rename to apps/meteor/.scripts/translationDiff.js diff --git a/.scripts/version.js b/apps/meteor/.scripts/version.js similarity index 100% rename from .scripts/version.js rename to apps/meteor/.scripts/version.js diff --git a/apps/meteor/.storybook/.eslintrc.json b/apps/meteor/.storybook/.eslintrc.json new file mode 100644 index 000000000000..0f030e2e46f2 --- /dev/null +++ b/apps/meteor/.storybook/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "../client/.eslintrc.json" +} diff --git a/apps/meteor/.storybook/babel.config.js b/apps/meteor/.storybook/babel.config.js new file mode 100644 index 000000000000..666946b95d78 --- /dev/null +++ b/apps/meteor/.storybook/babel.config.js @@ -0,0 +1,21 @@ +module.exports = { + presets: [ + [ + '@babel/preset-env', + { + shippedProposals: true, + useBuiltIns: 'usage', + corejs: '3', + modules: 'commonjs', + }, + ], + '@babel/preset-react', + '@babel/preset-flow', + '@babel/preset-typescript', + ], + plugins: [ + '@babel/plugin-proposal-class-properties', + '@babel/plugin-proposal-optional-chaining', + '@babel/plugin-proposal-nullish-coalescing-operator', + ], +}; diff --git a/apps/meteor/.storybook/decorators.tsx b/apps/meteor/.storybook/decorators.tsx new file mode 100644 index 000000000000..3da8357a1230 --- /dev/null +++ b/apps/meteor/.storybook/decorators.tsx @@ -0,0 +1,45 @@ +import { DecoratorFunction } from '@storybook/addons'; +import React, { ReactElement } from 'react'; + +import ModalContextMock from '../client/stories/contexts/ModalContextMock'; +import QueryClientProviderMock from '../client/stories/contexts/QueryClientProviderMock'; +import RouterContextMock from '../client/stories/contexts/RouterContextMock'; +import ServerContextMock from '../client/stories/contexts/ServerContextMock'; +import TranslationContextMock from '../client/stories/contexts/TranslationContextMock'; + +export const rocketChatDecorator: DecoratorFunction> = (fn, { parameters }) => { + const linkElement = document.getElementById('theme-styles') || document.createElement('link'); + if (linkElement.id !== 'theme-styles') { + require('../app/theme/client/main.css'); + require('../app/theme/client/vendor/fontello/css/fontello.css'); + require('../app/theme/client/rocketchat.font.css'); + linkElement.setAttribute('id', 'theme-styles'); + linkElement.setAttribute('rel', 'stylesheet'); + linkElement.setAttribute('href', 'https://open.rocket.chat/theme.css'); + document.head.appendChild(linkElement); + } + + /* eslint-disable @typescript-eslint/no-var-requires */ + /* eslint-disable-next-line */ + const { default: icons } = require('!!raw-loader!../private/public/icons.svg'); + + return ( + + + + + + +
+
{fn()}
+ + + + + + ); +}; diff --git a/.storybook/logo.svg b/apps/meteor/.storybook/logo.svg similarity index 100% rename from .storybook/logo.svg rename to apps/meteor/.storybook/logo.svg diff --git a/.storybook/logo.svg.d.ts b/apps/meteor/.storybook/logo.svg.d.ts similarity index 100% rename from .storybook/logo.svg.d.ts rename to apps/meteor/.storybook/logo.svg.d.ts diff --git a/apps/meteor/.storybook/main.js b/apps/meteor/.storybook/main.js new file mode 100644 index 000000000000..71d317a497ca --- /dev/null +++ b/apps/meteor/.storybook/main.js @@ -0,0 +1,70 @@ +const { resolve, relative, join } = require('path'); + +const webpack = require('webpack'); + +module.exports = { + stories: [ + '../client/**/*.stories.{js,tsx}', + '../app/**/*.stories.{js,tsx}', + '../ee/app/**/*.stories.{js,tsx}', + '../ee/client/**/*.stories.{js,tsx}', + ], + addons: [ + '@storybook/addon-essentials', + '@storybook/addon-interactions', + { + name: '@storybook/addon-postcss', + options: { + postcssLoaderOptions: { + implementation: require('postcss'), + }, + }, + }, + ], + webpackFinal: async (config) => { + const cssRule = config.module.rules.find(({ test }) => test.test('index.css')); + + cssRule.use[2].options = { + ...cssRule.use[2].options, + postcssOptions: { + plugins: [ + ['postcss-custom-properties', { preserve: true }], + 'postcss-media-minmax', + 'postcss-nested', + 'autoprefixer', + [ + 'postcss-url', + { + url: ({ absolutePath, relativePath, url }) => { + const absoluteDir = absolutePath.slice(0, -relativePath.length); + const relativeDir = relative(absoluteDir, resolve(__dirname, '../public')); + const newPath = join(relativeDir, url); + return newPath; + }, + }, + ], + ], + }, + }; + + config.module.rules.push({ + test: /\.info$/, + type: 'json', + }); + + config.module.rules.push({ + test: /\.html$/, + use: '@settlin/spacebars-loader', + }); + + config.plugins.push( + new webpack.NormalModuleReplacementPlugin(/^meteor/, require.resolve('./mocks/meteor.js')), + new webpack.NormalModuleReplacementPlugin(/(app)\/*.*\/(server)\/*/, require.resolve('./mocks/empty.ts')), + ); + + config.mode = 'development'; + config.optimization.usedExports = true; + + return config; + }, +}; diff --git a/.storybook/manager.ts b/apps/meteor/.storybook/manager.ts similarity index 100% rename from .storybook/manager.ts rename to apps/meteor/.storybook/manager.ts diff --git a/.storybook/mocks/empty.ts b/apps/meteor/.storybook/mocks/empty.ts similarity index 100% rename from .storybook/mocks/empty.ts rename to apps/meteor/.storybook/mocks/empty.ts diff --git a/.storybook/mocks/meteor.js b/apps/meteor/.storybook/mocks/meteor.js similarity index 98% rename from .storybook/mocks/meteor.js rename to apps/meteor/.storybook/mocks/meteor.js index ef22c95f67a7..8ec804ef826f 100644 --- a/.storybook/mocks/meteor.js +++ b/apps/meteor/.storybook/mocks/meteor.js @@ -74,6 +74,7 @@ export const Template = Object.assign( export const Blaze = { Template, registerHelper: () => {}, + renderWithData: () => {}, }; window.Blaze = Blaze; diff --git a/apps/meteor/.storybook/preview.ts b/apps/meteor/.storybook/preview.ts new file mode 100644 index 000000000000..2b1ed2526995 --- /dev/null +++ b/apps/meteor/.storybook/preview.ts @@ -0,0 +1,26 @@ +import { DocsPage, DocsContainer } from '@storybook/addon-docs'; +import { addDecorator, addParameters } from '@storybook/react'; + +import { rocketChatDecorator } from './decorators'; + +addDecorator(rocketChatDecorator); + +addParameters({ + backgrounds: { + grid: { + cellSize: 4, + cellAmount: 4, + opacity: 0.5, + }, + }, + docs: { + container: DocsContainer, + page: DocsPage, + }, + options: { + storySort: { + method: 'alphabetical', + order: ['Components', '*', 'Enterprise'], + }, + }, +}); diff --git a/.stylelintignore b/apps/meteor/.stylelintignore similarity index 100% rename from .stylelintignore rename to apps/meteor/.stylelintignore diff --git a/.stylelintrc b/apps/meteor/.stylelintrc similarity index 100% rename from .stylelintrc rename to apps/meteor/.stylelintrc diff --git a/apps/meteor/HISTORY.md b/apps/meteor/HISTORY.md new file mode 100644 index 000000000000..979db5e1decc --- /dev/null +++ b/apps/meteor/HISTORY.md @@ -0,0 +1,23093 @@ + +# 4.6.3 +`2022-04-19 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🐛 Bug fixes + + +- Desktop notification on multi-instance environments ([#25220](https://github.com/RocketChat/Rocket.Chat/pull/25220)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 4.6.2 +`2022-04-14 · 2 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🐛 Bug fixes + + +- Database indexes not being created ([#25101](https://github.com/RocketChat/Rocket.Chat/pull/25101)) + +- Deactivating user breaks if user is the only room owner ([#24933](https://github.com/RocketChat/Rocket.Chat/pull/24933) by [@sidmohanty11](https://github.com/sidmohanty11)) + + ## Before + + https://user-images.githubusercontent.com/73601258/160000871-cfc2f2a5-2a59-4d27-8049-7754d003dd48.mp4 + + + + ## After + https://user-images.githubusercontent.com/73601258/159998287-681ab475-ff33-4282-82ff-db751c59a392.mp4 + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@sidmohanty11](https://github.com/sidmohanty11) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 4.6.1 +`2022-04-07 · 6 🐛 · 5 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🐛 Bug fixes + + +- FormData uploads not working ([#25069](https://github.com/RocketChat/Rocket.Chat/pull/25069)) + +- Invitation links don't redirect to the registration form ([#25082](https://github.com/RocketChat/Rocket.Chat/pull/25082)) + +- NPS never finishing sending results ([#25067](https://github.com/RocketChat/Rocket.Chat/pull/25067)) + +- Proxy settings being ignored ([#25022](https://github.com/RocketChat/Rocket.Chat/pull/25022)) + + Modify Meteor's `HTTP.call` to add back proxy support + +- Upgrade Tab showing for a split second ([#25050](https://github.com/RocketChat/Rocket.Chat/pull/25050)) + +- UserAutoComplete not rendering UserAvatar correctly ([#25055](https://github.com/RocketChat/Rocket.Chat/pull/25055)) + + ### before + ![Screen Shot 2022-04-04 at 16 50 21](https://user-images.githubusercontent.com/27704687/161620921-800bf66a-806d-4f83-b2e1-073c34215001.png) + + ### after + ![Screen Shot 2022-04-04 at 16 49 00](https://user-images.githubusercontent.com/27704687/161620720-3e27774d-c241-46ca-b764-932a9295d709.png) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 4.6.0 +`2022-04-01 · 2 🎉 · 7 🚀 · 57 🐛 · 62 🔍 · 34 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🎉 New features + + +- Telemetry Events ([#24781](https://github.com/RocketChat/Rocket.Chat/pull/24781) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + +- Upgrade Tab ([#24835](https://github.com/RocketChat/Rocket.Chat/pull/24835)) + + ![image](https://user-images.githubusercontent.com/27704687/160172260-c656282e-a487-4092-948d-d11c9bacb598.png) + +### 🚀 Improvements + + +- **ENTERPRISE:** Don't start presence monitor when running micro services ([#24739](https://github.com/RocketChat/Rocket.Chat/pull/24739)) + +- Adding new statistics related to voip and omnichannel ([#24887](https://github.com/RocketChat/Rocket.Chat/pull/24887)) + + - Total of Canned response messages sent + - Total of tags used + - Last-Chatted Agent Preferred (enabled/disabled) + - Assign new conversations to the contact manager (enabled/disabled) + - How to handle Visitor Abandonment setting + - Amount of chats placed on hold + - VoIP Enabled + - Amount of VoIP Calls + - Amount of VoIP Extensions connected + - Amount of Calls placed on hold (1x per call) + - Fixed Session Aggregation type definitions + +- New omnichannel statistics and async statistics processing. ([#24749](https://github.com/RocketChat/Rocket.Chat/pull/24749)) + + https://app.clickup.com/t/1z4zg4e + +- Standarize queue behavior for managers and agents when subscribing ([#24837](https://github.com/RocketChat/Rocket.Chat/pull/24837)) + +- Updated links in readme ([#24028](https://github.com/RocketChat/Rocket.Chat/pull/24028) by [@aswinidev](https://github.com/aswinidev)) + +- UX - VoIP Call Component ([#24748](https://github.com/RocketChat/Rocket.Chat/pull/24748)) + +- Voip Extensions disabled state ([#24750](https://github.com/RocketChat/Rocket.Chat/pull/24750)) + +### 🐛 Bug fixes + + +- "livechat/webrtc.call" endpoint not working ([#24804](https://github.com/RocketChat/Rocket.Chat/pull/24804)) + +- "Match error" when converting a team to a channel ([#24629](https://github.com/RocketChat/Rocket.Chat/pull/24629)) + + - Fix "Match error" when trying to convert a channel to a team; + +- **ENTERPRISE:** Auto reload feature of ddp-streamer micro service ([#24793](https://github.com/RocketChat/Rocket.Chat/pull/24793)) + +- **ENTERPRISE:** DDP streamer not sending data to all clients ([#24738](https://github.com/RocketChat/Rocket.Chat/pull/24738)) + +- **ENTERPRISE:** Notifications not being sent by ddp-streamer ([#24831](https://github.com/RocketChat/Rocket.Chat/pull/24831)) + +- **ENTERPRISE:** Presence micro service logic ([#24724](https://github.com/RocketChat/Rocket.Chat/pull/24724)) + +- **VOIP:** SidebarFooter component ([#24838](https://github.com/RocketChat/Rocket.Chat/pull/24838)) + + - Improve the CallProvider code; + - Adjust the text case of the VoIP component on the FooterSidebar; + - Fix the bad behavior with the changes in queue's name. + +- `PaginatedSelectFiltered` not handling changes ([#24732](https://github.com/RocketChat/Rocket.Chat/pull/24732)) + +- API Error preventing adding an email to users without one (like bot/app users) ([#24709](https://github.com/RocketChat/Rocket.Chat/pull/24709)) + +- Apple login script being loaded even when Apple Login is disabled. ([#24760](https://github.com/RocketChat/Rocket.Chat/pull/24760)) + +- Apple OAuth ([#24879](https://github.com/RocketChat/Rocket.Chat/pull/24879)) + +- auto-join team channels not honoring user preferences ([#24779](https://github.com/RocketChat/Rocket.Chat/pull/24779) by [@ostjen](https://github.com/ostjen)) + +- Broken build caused by PRs modifying same file differently ([#24863](https://github.com/RocketChat/Rocket.Chat/pull/24863)) + +- Broken multiple OAuth integrations ([#24705](https://github.com/RocketChat/Rocket.Chat/pull/24705)) + +- Components for user search ([#24677](https://github.com/RocketChat/Rocket.Chat/pull/24677)) + +- Critical: Incorrect visitor getting assigned to a chat from apps ([#24805](https://github.com/RocketChat/Rocket.Chat/pull/24805)) + +- Custom script not being fired ([#24901](https://github.com/RocketChat/Rocket.Chat/pull/24901)) + +- Date Message Export Filter Fix ([#24542](https://github.com/RocketChat/Rocket.Chat/pull/24542) by [@eduardofcabrera](https://github.com/eduardofcabrera)) + + Fix message export filter to get all messages between "from date" and "to date", including "to date". + +- DDP Rate Limiter Translation key ([#24898](https://github.com/RocketChat/Rocket.Chat/pull/24898)) + + Before: + image + + + Now: + image + +- DDP streamer errors ([#24710](https://github.com/RocketChat/Rocket.Chat/pull/24710)) + +- Disable voip button when call is in progress ([#24864](https://github.com/RocketChat/Rocket.Chat/pull/24864)) + +- Duplicated 'name' log key ([#24590](https://github.com/RocketChat/Rocket.Chat/pull/24590)) + +- Duplicated "jump to message" button on starred messages ([#24867](https://github.com/RocketChat/Rocket.Chat/pull/24867) by [@Himanshu664](https://github.com/Himanshu664)) + +- External search providers not working ([#24860](https://github.com/RocketChat/Rocket.Chat/pull/24860) by [@tkurz](https://github.com/tkurz)) + +- German translation for Monitore ([#24785](https://github.com/RocketChat/Rocket.Chat/pull/24785) by [@JMoVS](https://github.com/JMoVS)) + +- Handle Other Formats inside Upload Avatar ([#24226](https://github.com/RocketChat/Rocket.Chat/pull/24226) by [@nishant23122000](https://github.com/nishant23122000)) + + After resolving issue #24213 : + + + https://user-images.githubusercontent.com/53515714/150325012-91413025-786e-4ce0-ae75-629f6b05b024.mp4 + +- High CPU usage caused by CallProvider ([#24994](https://github.com/RocketChat/Rocket.Chat/pull/24994)) + + Remove infinity loop inside useVoipClient hook. + + #closes #24970 + +- Ignore customClass on messages ([#24845](https://github.com/RocketChat/Rocket.Chat/pull/24845)) + +- LDAP avatars being rotated according to metadata even if the setting to rotate uploads is off ([#24320](https://github.com/RocketChat/Rocket.Chat/pull/24320)) + + - Use the `FileUpload_RotateImages` setting (**Administration > File Upload > Rotate images on upload**) to control whether avatars should be rotated automatically based on their data (XEIF); + - Display the avatar image preview (orientation) according to the `FileUpload_RotateImages` setting. + +- Missing dependency on useEffect at CallProvider ([#24882](https://github.com/RocketChat/Rocket.Chat/pull/24882)) + +- Missing username on messages imported from Slack ([#24674](https://github.com/RocketChat/Rocket.Chat/pull/24674)) + + - Fix missing sender's username on messages imported from Slack. + +- Nextcloud OAuth for incomplete token URL ([#24476](https://github.com/RocketChat/Rocket.Chat/pull/24476)) + +- no id of room closer in livechat-close message ([#24683](https://github.com/RocketChat/Rocket.Chat/pull/24683)) + +- Opening a new DM from user card ([#24623](https://github.com/RocketChat/Rocket.Chat/pull/24623)) + + A race condition on `useRoomIcon` -- delayed merge of rooms and subscriptions -- was causing a UI crash whenever someone tried to open a DM from the user card component. + +- Prevent call button toggle when user is on call ([#24758](https://github.com/RocketChat/Rocket.Chat/pull/24758)) + +- Prune Message issue ([#24424](https://github.com/RocketChat/Rocket.Chat/pull/24424) by [@nishant23122000](https://github.com/nishant23122000)) + +- Push privacy config to not show username not being respected ([#24606](https://github.com/RocketChat/Rocket.Chat/pull/24606)) + +- Register with Secret URL ([#24921](https://github.com/RocketChat/Rocket.Chat/pull/24921)) + +- Reload roomslist after successful deletion of a room from admin panel. ([#23795](https://github.com/RocketChat/Rocket.Chat/pull/23795) by [@Aman-Maheshwari](https://github.com/Aman-Maheshwari)) + + Removed the logic for calling the `rooms.adminRooms` endPoint from the `RoomsTable` Component and moved it to its parent component `RoomsPage`. + This allows to call the endPoint `rooms.adminRooms` from `EditRoomContextBar` Component which is also has `RoomPage` Component as its parent. + + Also added a succes toast message after the successful deletion of room. + +- Revert AutoComplete ([#24812](https://github.com/RocketChat/Rocket.Chat/pull/24812)) + +- Room archived/unarchived system messages aren't sent when editing room settings ([#24897](https://github.com/RocketChat/Rocket.Chat/pull/24897)) + + - Send the "Room archived" and "Room unarchived" system messages when editing room settings (and not only when rooms are archived/unarchived with the slash-command); + - Fix the "Hide System Messages" option for the "Room archived" and "Room unarchived" system messages; + +- room message not load when is a new message ([#24955](https://github.com/RocketChat/Rocket.Chat/pull/24955)) + + When the room object is searched for the first time, it does not exist on the front object yet (subscription), adding a fallback search for room list will guarantee to search the room details. + + before: + https://user-images.githubusercontent.com/9275105/160223241-d2319f3e-82c5-47d6-867f-695ab2361a17.mp4 + + after: + https://user-images.githubusercontent.com/9275105/160223244-84d0d2a1-3d95-464d-8b8a-e264b0d4d690.mp4 + +- Room's message count not being incremented on import ([#24696](https://github.com/RocketChat/Rocket.Chat/pull/24696)) + + - Fix rooms' message counter not being incremented on message import. + +- SAML Force name to string ([#24930](https://github.com/RocketChat/Rocket.Chat/pull/24930)) + +- Several issues related to custom roles ([#24052](https://github.com/RocketChat/Rocket.Chat/pull/24052)) + + - Throw an error when trying to delete a role (User or Subscription role) that are still being used; + - Fix "Invalid Role" error for custom roles in Role Editing sidebar; + - Fix "Users in Role" screen for custom roles. + +- Show call icon only when user has extension associated ([#24752](https://github.com/RocketChat/Rocket.Chat/pull/24752)) + +- Show only available agents on extension association modal ([#24680](https://github.com/RocketChat/Rocket.Chat/pull/24680)) + +- Show only enabled departments on forward ([#24829](https://github.com/RocketChat/Rocket.Chat/pull/24829)) + +- System messages are sent when adding or removing a group from a team ([#24743](https://github.com/RocketChat/Rocket.Chat/pull/24743)) + + - Do not send system messages when adding or removing a new or existing _group_ from a team. + +- Typo and placeholder on wrap up call modal ([#24737](https://github.com/RocketChat/Rocket.Chat/pull/24737)) + +- Typo in wrap-up term ([#24661](https://github.com/RocketChat/Rocket.Chat/pull/24661)) + +- VoIP button gets disabled whenever user status changes ([#24789](https://github.com/RocketChat/Rocket.Chat/pull/24789)) + +- VoIP Enable/Disable setting on CallContext/CallProvider Notifications ([#24607](https://github.com/RocketChat/Rocket.Chat/pull/24607)) + +- Voip Stream Reinitialization Error ([#24657](https://github.com/RocketChat/Rocket.Chat/pull/24657)) + +- VoipExtensionsPage component call ([#24792](https://github.com/RocketChat/Rocket.Chat/pull/24792)) + +- Wrong business hour behavior ([#24896](https://github.com/RocketChat/Rocket.Chat/pull/24896)) + +- Wrong param usage on queue summary call ([#24799](https://github.com/RocketChat/Rocket.Chat/pull/24799)) + +
+🔍 Minor changes + + +- Bump @rocket.chat/emitter from 0.31.4 to 0.31.9 in /ee/server/services ([#25021](https://github.com/RocketChat/Rocket.Chat/pull/25021) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @rocket.chat/message-parser from 0.31.4 to 0.31.9 in /ee/server/services ([#25019](https://github.com/RocketChat/Rocket.Chat/pull/25019) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @rocket.chat/string-helpers from 0.31.4 to 0.31.9 in /ee/server/services ([#25018](https://github.com/RocketChat/Rocket.Chat/pull/25018) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @rocket.chat/ui-kit from 0.31.4 to 0.31.9 in /ee/server/services ([#25020](https://github.com/RocketChat/Rocket.Chat/pull/25020) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/clipboard from 2.0.1 to 2.0.7 ([#24832](https://github.com/RocketChat/Rocket.Chat/pull/24832) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/mailparser from 3.0.2 to 3.4.0 ([#24833](https://github.com/RocketChat/Rocket.Chat/pull/24833) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/nodemailer from 6.4.2 to 6.4.4 ([#24822](https://github.com/RocketChat/Rocket.Chat/pull/24822) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/ws from 8.2.3 to 8.5.2 in /ee/server/services ([#24666](https://github.com/RocketChat/Rocket.Chat/pull/24666) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/ws from 8.5.2 to 8.5.3 in /ee/server/services ([#24820](https://github.com/RocketChat/Rocket.Chat/pull/24820) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump actions/checkout from 2 to 3 ([#24668](https://github.com/RocketChat/Rocket.Chat/pull/24668) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump actions/setup-node from 2 to 3 ([#24642](https://github.com/RocketChat/Rocket.Chat/pull/24642) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump body-parser from 1.19.0 to 1.19.2 ([#24821](https://github.com/RocketChat/Rocket.Chat/pull/24821) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump is-svg from 4.3.1 to 4.3.2 ([#24801](https://github.com/RocketChat/Rocket.Chat/pull/24801) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump jschardet from 1.6.0 to 3.0.0 ([#23121](https://github.com/RocketChat/Rocket.Chat/pull/23121) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino from 7.8.0 to 7.8.1 in /ee/server/services ([#24783](https://github.com/RocketChat/Rocket.Chat/pull/24783) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino from 7.8.1 to 7.9.1 in /ee/server/services ([#24869](https://github.com/RocketChat/Rocket.Chat/pull/24869) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino-pretty from 7.5.1 to 7.5.2 in /ee/server/services ([#24689](https://github.com/RocketChat/Rocket.Chat/pull/24689) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino-pretty from 7.5.2 to 7.5.3 in /ee/server/services ([#24698](https://github.com/RocketChat/Rocket.Chat/pull/24698) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pino-pretty from 7.5.3 to 7.5.4 in /ee/server/services ([#24870](https://github.com/RocketChat/Rocket.Chat/pull/24870) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump prometheus-gc-stats from 0.6.2 to 0.6.3 ([#24803](https://github.com/RocketChat/Rocket.Chat/pull/24803) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump ts-node from 10.5.0 to 10.6.0 in /ee/server/services ([#24667](https://github.com/RocketChat/Rocket.Chat/pull/24667) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump ts-node from 10.6.0 to 10.7.0 in /ee/server/services ([#24716](https://github.com/RocketChat/Rocket.Chat/pull/24716) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump url-parse from 1.5.7 to 1.5.10 ([#24640](https://github.com/RocketChat/Rocket.Chat/pull/24640) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore: Add E2E tests for livechat/room.close ([#24729](https://github.com/RocketChat/Rocket.Chat/pull/24729) by [@Muramatsu2602](https://github.com/Muramatsu2602)) + + * Create a new test suite file under tests/end-to-end/api/livechat + * Create tests for the following endpoint: + + ivechat/room.close + +- Chore: Add E2E tests for livechat/visitor ([#24764](https://github.com/RocketChat/Rocket.Chat/pull/24764) by [@Muramatsu2602](https://github.com/Muramatsu2602)) + + - Create a new test suite file under tests/end-to-end/api/livechat + - Create tests for the following endpoints: + + livechat/visitor (create visitor, update visitor, add custom fields to visitors) + +- Chore: add some missing REST definitions ([#24925](https://github.com/RocketChat/Rocket.Chat/pull/24925)) + + On the [mobile client](https://github.com/RocketChat/Rocket.Chat.ReactNative), we made an effort to collect more `REST API` definitions that are missing on the server side during our migration to TypeScript. Since we're both migrating to TypeScript, we thought it would be a good idea to share those so you guys can benefit from our initiative. + +- Chore: added Server Instances endpoint types ([#24507](https://github.com/RocketChat/Rocket.Chat/pull/24507)) + + Created typing for endpoint definitions on `instances.ts`. + +- Chore: added settings endpoint types ([#24506](https://github.com/RocketChat/Rocket.Chat/pull/24506)) + + Created typing for endpoint definitions on `settings.ts`. + +- Chore: APIClass types ([#24747](https://github.com/RocketChat/Rocket.Chat/pull/24747)) + + This pull request creates a new `restivus` module (.d.ts) for the `api.js` file. + +- Chore: Bump Fuselage packages ([#25015](https://github.com/RocketChat/Rocket.Chat/pull/25015)) + + It uses the last stable version of Fuselage packages. + +- Chore: Convert server functions from javascript to typescript ([#24384](https://github.com/RocketChat/Rocket.Chat/pull/24384)) + + This pull request will be used to rewrite some functions on the Chat Engine to Typescript, in order to increase security and specify variable types on the code. + +- Chore: converted more hooks to typescript ([#24628](https://github.com/RocketChat/Rocket.Chat/pull/24628)) + + Converted some functions on `client/hooks/` from JavaScript to Typescript. + +- Chore: Fix Cypress tests ([#24544](https://github.com/RocketChat/Rocket.Chat/pull/24544)) + +- Chore: Fix grammatical errors in Code of Conduct ([#24759](https://github.com/RocketChat/Rocket.Chat/pull/24759) by [@aadishJ01](https://github.com/aadishJ01)) + +- Chore: fix grammatical errors in Features ([#24771](https://github.com/RocketChat/Rocket.Chat/pull/24771) by [@aadishJ01](https://github.com/aadishJ01)) + +- Chore: Fix MongoDB versions on release notes ([#24877](https://github.com/RocketChat/Rocket.Chat/pull/24877)) + +- Chore: Get Settings Statistics ([#24397](https://github.com/RocketChat/Rocket.Chat/pull/24397)) + +- Chore: Improve logger to allow log of `unknown` values ([#24726](https://github.com/RocketChat/Rocket.Chat/pull/24726)) + +- Chore: Improvements on role syncing (ldap, oauth and saml) ([#23824](https://github.com/RocketChat/Rocket.Chat/pull/23824)) + +- Chore: Micro services fixes and cleanup ([#24753](https://github.com/RocketChat/Rocket.Chat/pull/24753)) + +- Chore: Remove old scripts ([#24911](https://github.com/RocketChat/Rocket.Chat/pull/24911)) + +- Chore: Skip local services changes when shutting down duplicated services ([#24810](https://github.com/RocketChat/Rocket.Chat/pull/24810)) + +- Chore: Storybook mocking and examples improved ([#24969](https://github.com/RocketChat/Rocket.Chat/pull/24969)) + + - Stories from `ee/` included; + - Differentiate root story kinds; + - Mocking of `ServerContext` via Storybook parameters. + +- Chore: Update Livechat ([#24754](https://github.com/RocketChat/Rocket.Chat/pull/24754)) + +- Chore: Update Livechat ([#24990](https://github.com/RocketChat/Rocket.Chat/pull/24990)) + +- Chore(deps-dev): Bump @types/mock-require from 2.0.0 to 2.0.1 ([#24574](https://github.com/RocketChat/Rocket.Chat/pull/24574) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- i18n: Language update from LingoHub 🤖 on 2022-02-28Z ([#24644](https://github.com/RocketChat/Rocket.Chat/pull/24644)) + +- i18n: Language update from LingoHub 🤖 on 2022-03-07Z ([#24717](https://github.com/RocketChat/Rocket.Chat/pull/24717)) + +- i18n: Language update from LingoHub 🤖 on 2022-03-14Z ([#24823](https://github.com/RocketChat/Rocket.Chat/pull/24823)) + +- i18n: Language update from LingoHub 🤖 on 2022-03-21Z ([#24895](https://github.com/RocketChat/Rocket.Chat/pull/24895)) + +- i18n: Language update from LingoHub 🤖 on 2022-03-28Z ([#24971](https://github.com/RocketChat/Rocket.Chat/pull/24971)) + +- Merge master into develop & Set version to 4.6.0-develop ([#24653](https://github.com/RocketChat/Rocket.Chat/pull/24653)) + +- Regression: Add createdOTR index ([#25017](https://github.com/RocketChat/Rocket.Chat/pull/25017)) + +- Regression: Call doesn't stop ringing after agent unregistration ([#24908](https://github.com/RocketChat/Rocket.Chat/pull/24908)) + +- Regression: Custom roles displaying ID instead of name on some admin screens ([#24999](https://github.com/RocketChat/Rocket.Chat/pull/24999)) + + ![image](https://user-images.githubusercontent.com/55164754/160981416-555bcaa1-c075-4260-937c-64523472da43.png) + ![image](https://user-images.githubusercontent.com/55164754/160981452-6eae4e74-8425-4073-8256-472aba72b9db.png) + +- Regression: Error is raised when there's no Asterisk queue available yet ([#24980](https://github.com/RocketChat/Rocket.Chat/pull/24980)) + +- Regression: Fix account service login expiration ([#24920](https://github.com/RocketChat/Rocket.Chat/pull/24920)) + +- Regression: Fix ParentRoomWithEndpointData in loop ([#24809](https://github.com/RocketChat/Rocket.Chat/pull/24809)) + +- Regression: Fix unexpected errors breaking ddp-streamer ([#24948](https://github.com/RocketChat/Rocket.Chat/pull/24948)) + +- Regression: Improve Sidenav open/close handling and fixed codeql configs and E2E tests ([#24756](https://github.com/RocketChat/Rocket.Chat/pull/24756)) + +- Regression: Register services right away ([#24800](https://github.com/RocketChat/Rocket.Chat/pull/24800)) + +- Regression: Role Sync not always working ([#24850](https://github.com/RocketChat/Rocket.Chat/pull/24850)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Aman-Maheshwari](https://github.com/Aman-Maheshwari) +- [@Himanshu664](https://github.com/Himanshu664) +- [@JMoVS](https://github.com/JMoVS) +- [@Muramatsu2602](https://github.com/Muramatsu2602) +- [@aadishJ01](https://github.com/aadishJ01) +- [@aswinidev](https://github.com/aswinidev) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@eduardofcabrera](https://github.com/eduardofcabrera) +- [@nishant23122000](https://github.com/nishant23122000) +- [@ostjen](https://github.com/ostjen) +- [@tkurz](https://github.com/tkurz) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@albuquerquefabio](https://github.com/albuquerquefabio) +- [@amolghode1981](https://github.com/amolghode1981) +- [@cauefcr](https://github.com/cauefcr) +- [@debdutdeb](https://github.com/debdutdeb) +- [@dougfabris](https://github.com/dougfabris) +- [@felipe-rod123](https://github.com/felipe-rod123) +- [@filipemarins](https://github.com/filipemarins) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@gerzonc](https://github.com/gerzonc) +- [@ggazzo](https://github.com/ggazzo) +- [@juliajforesti](https://github.com/juliajforesti) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@tiagoevanp](https://github.com/tiagoevanp) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 4.5.6 +`2022-04-07 · 2 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🐛 Bug fixes + + +- NPS never finishing sending results ([#25067](https://github.com/RocketChat/Rocket.Chat/pull/25067)) + +- Proxy settings being ignored ([#25022](https://github.com/RocketChat/Rocket.Chat/pull/25022)) + + Modify Meteor's `HTTP.call` to add back proxy support + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 4.5.5 +`2022-03-30 · 2 🐛 · 2 🔍 · 6 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🐛 Bug fixes + + +- High CPU usage caused by CallProvider ([#24994](https://github.com/RocketChat/Rocket.Chat/pull/24994)) + + Remove infinity loop inside useVoipClient hook. + + #closes #24970 + +- Multiple issues starting a new DM ([#24955](https://github.com/RocketChat/Rocket.Chat/pull/24955)) + + When the room object is searched for the first time, it does not exist on the front object yet (subscription), adding a fallback search for room list will guarantee to search the room details. + + before: + https://user-images.githubusercontent.com/9275105/160223241-d2319f3e-82c5-47d6-867f-695ab2361a17.mp4 + + after: + https://user-images.githubusercontent.com/9275105/160223244-84d0d2a1-3d95-464d-8b8a-e264b0d4d690.mp4 + +
+🔍 Minor changes + + +- Chore: Update Livechat ([#24990](https://github.com/RocketChat/Rocket.Chat/pull/24990)) + +- Release 4.5.5 ([#24998](https://github.com/RocketChat/Rocket.Chat/pull/24998)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@filipemarins](https://github.com/filipemarins) +- [@ggazzo](https://github.com/ggazzo) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 4.5.4 +`2022-03-24 · 1 🐛 · 1 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🐛 Bug fixes + + +- SAML Force name to string ([#24930](https://github.com/RocketChat/Rocket.Chat/pull/24930)) + +
+🔍 Minor changes + + +- Release 4.5.4 ([#24938](https://github.com/RocketChat/Rocket.Chat/pull/24938)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@AllanPazRibeiro](https://github.com/AllanPazRibeiro) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) + +# 4.5.3 +`2022-03-21 · 2 🚀 · 8 🐛 · 1 🔍 · 5 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🚀 Improvements + + +- Standarize queue behavior for managers and agents when subscribing ([#24837](https://github.com/RocketChat/Rocket.Chat/pull/24837)) + +- UX - VoIP Call Component ([#24748](https://github.com/RocketChat/Rocket.Chat/pull/24748)) + +### 🐛 Bug fixes + + +- **VOIP:** SidebarFooter component ([#24838](https://github.com/RocketChat/Rocket.Chat/pull/24838)) + + - Improve the CallProvider code; + - Adjust the text case of the VoIP component on the FooterSidebar; + - Fix the bad behavior with the changes in queue's name. + +- Broken build caused by PRs modifying same file differently ([#24863](https://github.com/RocketChat/Rocket.Chat/pull/24863)) + +- Custom script not being fired ([#24901](https://github.com/RocketChat/Rocket.Chat/pull/24901)) + +- Disable voip button when call is in progress ([#24864](https://github.com/RocketChat/Rocket.Chat/pull/24864)) + +- Show call icon only when user has extension associated ([#24752](https://github.com/RocketChat/Rocket.Chat/pull/24752)) + +- Show only enabled departments on forward ([#24829](https://github.com/RocketChat/Rocket.Chat/pull/24829)) + +- VoIP button gets disabled whenever user status changes ([#24789](https://github.com/RocketChat/Rocket.Chat/pull/24789)) + +- Wrong param usage on queue summary call ([#24799](https://github.com/RocketChat/Rocket.Chat/pull/24799)) + +
+🔍 Minor changes + + +- Chore: Fix MongoDB versions on release notes ([#24877](https://github.com/RocketChat/Rocket.Chat/pull/24877)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@amolghode1981](https://github.com/amolghode1981) +- [@ggazzo](https://github.com/ggazzo) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 4.5.2 +`2022-03-12 · 1 🚀 · 7 🐛 · 1 🔍 · 8 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🚀 Improvements + + +- Voip Extensions disabled state ([#24750](https://github.com/RocketChat/Rocket.Chat/pull/24750)) + +### 🐛 Bug fixes + + +- "livechat/webrtc.call" endpoint not working ([#24804](https://github.com/RocketChat/Rocket.Chat/pull/24804)) + +- `PaginatedSelectFiltered` not handling changes ([#24732](https://github.com/RocketChat/Rocket.Chat/pull/24732)) + +- Broken multiple OAuth integrations ([#24705](https://github.com/RocketChat/Rocket.Chat/pull/24705)) + +- Critical: Incorrect visitor getting assigned to a chat from apps ([#24805](https://github.com/RocketChat/Rocket.Chat/pull/24805)) + +- Opening a new DM from user card ([#24623](https://github.com/RocketChat/Rocket.Chat/pull/24623)) + + A race condition on `useRoomIcon` -- delayed merge of rooms and subscriptions -- was causing a UI crash whenever someone tried to open a DM from the user card component. + +- Revert AutoComplete ([#24812](https://github.com/RocketChat/Rocket.Chat/pull/24812)) + +- VoipExtensionsPage component call ([#24792](https://github.com/RocketChat/Rocket.Chat/pull/24792)) + +
+🔍 Minor changes + + +- Regression: Fix ParentRoomWithEndpointData in loop ([#24809](https://github.com/RocketChat/Rocket.Chat/pull/24809)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@debdutdeb](https://github.com/debdutdeb) +- [@ggazzo](https://github.com/ggazzo) +- [@juliajforesti](https://github.com/juliajforesti) +- [@murtaza98](https://github.com/murtaza98) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 4.5.1 +`2022-03-09 · 13 🐛 · 2 🔍 · 12 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🐛 Bug fixes + + +- Apple login script being loaded even when Apple Login is disabled. ([#24760](https://github.com/RocketChat/Rocket.Chat/pull/24760)) + +- Components for user search ([#24677](https://github.com/RocketChat/Rocket.Chat/pull/24677)) + +- Duplicated 'name' log key ([#24590](https://github.com/RocketChat/Rocket.Chat/pull/24590)) + +- Missing username on messages imported from Slack ([#24674](https://github.com/RocketChat/Rocket.Chat/pull/24674)) + + - Fix missing sender's username on messages imported from Slack. + +- no id of room closer in livechat-close message ([#24683](https://github.com/RocketChat/Rocket.Chat/pull/24683)) + +- Reload roomslist after successful deletion of a room from admin panel. ([#23795](https://github.com/RocketChat/Rocket.Chat/pull/23795) by [@Aman-Maheshwari](https://github.com/Aman-Maheshwari)) + + Removed the logic for calling the `rooms.adminRooms` endPoint from the `RoomsTable` Component and moved it to its parent component `RoomsPage`. + This allows to call the endPoint `rooms.adminRooms` from `EditRoomContextBar` Component which is also has `RoomPage` Component as its parent. + + Also added a succes toast message after the successful deletion of room. + +- Room's message count not being incremented on import ([#24696](https://github.com/RocketChat/Rocket.Chat/pull/24696)) + + - Fix rooms' message counter not being incremented on message import. + +- Show only available agents on extension association modal ([#24680](https://github.com/RocketChat/Rocket.Chat/pull/24680)) + +- System messages are sent when adding or removing a group from a team ([#24743](https://github.com/RocketChat/Rocket.Chat/pull/24743)) + + - Do not send system messages when adding or removing a new or existing _group_ from a team. + +- Typo and placeholder on wrap up call modal ([#24737](https://github.com/RocketChat/Rocket.Chat/pull/24737)) + +- Typo in wrap-up term ([#24661](https://github.com/RocketChat/Rocket.Chat/pull/24661)) + +- VoIP Enable/Disable setting on CallContext/CallProvider Notifications ([#24607](https://github.com/RocketChat/Rocket.Chat/pull/24607)) + +- Voip Stream Reinitialization Error ([#24657](https://github.com/RocketChat/Rocket.Chat/pull/24657)) + +
+🔍 Minor changes + + +- Chore: Update Livechat ([#24754](https://github.com/RocketChat/Rocket.Chat/pull/24754)) + +- Release 4.5.1 ([#24782](https://github.com/RocketChat/Rocket.Chat/pull/24782) by [@Aman-Maheshwari](https://github.com/Aman-Maheshwari) & [@cuonghuunguyen](https://github.com/cuonghuunguyen)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Aman-Maheshwari](https://github.com/Aman-Maheshwari) +- [@cuonghuunguyen](https://github.com/cuonghuunguyen) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@amolghode1981](https://github.com/amolghode1981) +- [@juliajforesti](https://github.com/juliajforesti) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 4.5.0 +`2022-02-28 · 3 🎉 · 15 🚀 · 19 🐛 · 72 🔍 · 30 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.3` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.31.0` + +### 🎉 New features + + +- E2E password generator ([#24114](https://github.com/RocketChat/Rocket.Chat/pull/24114) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + +- Marketplace sort filter ([#24567](https://github.com/RocketChat/Rocket.Chat/pull/24567)) + + Implemented a sort filter for the marketplace screen. This component sorts the marketplace apps list in 4 ways, alphabetical order(A-Z), inverse alphabetical order(Z-A), most recently updated(MRU), and least recent updated(LRU). Besides that, I've generalized some components and types to increase code reusability, renamed some helpers as well as deleted some useless ones, and inserted the necessary new translations on the English i18n dictionary. + Demo gif: + ![Marketplace sort filter](https://user-images.githubusercontent.com/43561537/155033709-e07a6306-a85a-4f7f-9624-b53ba5dd7fa9.gif) + +- VoIP Support for Omnichannel ([#23102](https://github.com/RocketChat/Rocket.Chat/pull/23102)) + + - Created VoipService to manage VoIP connections and PBX connection + - Created LivechatVoipService that will handle custom cases for livechat (creating rooms, assigning chats to queue, actions when call is finished, etc) + - Created Basic interfaces to support new services and new model + - Created Endpoints for management interfaces + - Implemented asterisk connector on VoIP service + - Created UI components to show calls incoming and to allow answering/rejecting calls + - Added new settings to control call server/management server connection values + - Added endpoints to associate Omnichannel Agents with PBX Extensions + - Added support for event listening on server side, to get metadata about calls being received/ongoing + - Created new pages to update settings & to see user-extension association + - Created new page to see ongoing calls (and past calls) + - Added support for remote hangup/hold on calls + - Implemented call metrics calculation (hold time, waiting time, talk time) + - Show a notificaiton when call is received + +### 🚀 Improvements + + +- **ENTERPRISE:** Improve how micro services are loaded ([#24388](https://github.com/RocketChat/Rocket.Chat/pull/24388)) + +- Add return button in chats opened from the list of current chats ([#24458](https://github.com/RocketChat/Rocket.Chat/pull/24458) by [@LucasFASouza](https://github.com/LucasFASouza)) + + The new return button for Omnichannel chats came out with release 3.15 but the feature was only available for chats that were opened from Omnichannel Contact Center. + Now, the same UI/UX is supported for chats opened from Current Chats list. + + ![image](https://user-images.githubusercontent.com/32396925/153283190-bd5c9748-c36b-4874-a704-6043afc7e3a1.png) + + The chat now opens in the Omnichannel settings and has the return button so the user can go back to the Current Chats list. + + ![image](https://user-images.githubusercontent.com/32396925/153285591-fad8e4a0-d2ea-4a02-8b2a-15e383b3c876.png) + +- Add tooltips on action buttons of Canned Response message composer ([#24483](https://github.com/RocketChat/Rocket.Chat/pull/24483) by [@LucasFASouza](https://github.com/LucasFASouza)) + + The tooltips were missing on the action buttons of CR message composer. + + ![image](https://user-images.githubusercontent.com/32396925/153620327-91107245-4b47-4d39-a99a-6da6d1cf5734.png) + + Users can now feel more encouraged to use these actions knowing what they are supposed to do. + +- Add user to room on "Click to Join!" button press ([#24041](https://github.com/RocketChat/Rocket.Chat/pull/24041) by [@ostjen](https://github.com/ostjen)) + + - Add user to room on "Click to Join!" button press; + - Display the "Join" button in discussions inside channels (keeping the behavior consistent with discussions inside groups). + +- Added a new "All" tab which shows all integrations in Integrations ([#24109](https://github.com/RocketChat/Rocket.Chat/pull/24109) by [@aswinidev](https://github.com/aswinidev)) + +- ChatBox Text to File Description ([#24451](https://github.com/RocketChat/Rocket.Chat/pull/24451) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + The text content from chatbox goes to the file description when drag and drop a file. + +- Close modal on esc and outside click ([#24275](https://github.com/RocketChat/Rocket.Chat/pull/24275)) + + This is a QUICK change in order to close modals pressing Esc button and clicking outside of it **intentionally**. + +- CloudLoginModal visual consistency ([#24334](https://github.com/RocketChat/Rocket.Chat/pull/24334)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/151585064-dc6a1e29-9903-4241-8fbd-dfbe6c55fbef.png) + + ### after + ![Screen Shot 2022-01-28 at 13 32 02](https://user-images.githubusercontent.com/27704687/151585101-75b98502-9aae-4198-bc3e-4956750e5d8b.png) + +- Convert tag edit with department data to tsx ([#24369](https://github.com/RocketChat/Rocket.Chat/pull/24369) by [@LucasFASouza](https://github.com/LucasFASouza)) + +- Descriptive tooltip for Encrypted Key on Room Header ([#24121](https://github.com/RocketChat/Rocket.Chat/pull/24121)) + +- OTR system messages ([#24382](https://github.com/RocketChat/Rocket.Chat/pull/24382)) + + OTR system messages to indicate key refresh and joining chat to users. + +- Purchase Type Filter for marketplace apps and Categories filter anchor refactoring ([#24454](https://github.com/RocketChat/Rocket.Chat/pull/24454)) + + Implemented a filter by purchase type(free or paid) component for the apps screen of the marketplace. Besides that, new entries on the dictionary, fixed some parts of the App type (purchaseType was typed as unknown and price as string), and created some helpers to work alongside the filter. Will be refactoring the categories filter anchor and then will open this PR for reviews. + + Demo gif: + ![purchaseTypeFIlter](https://user-images.githubusercontent.com/43561537/153101228-7b7ebdc3-2d34-420f-aa9d-f7cbc8d4b53f.gif) + + Refactored the categories filter anchor from a plain fuselage select to a select button with dynamic colors. + Demo gif: + ![New categories filter anchor(PR)](https://user-images.githubusercontent.com/43561537/153422427-28012b7d-e0ec-45f4-861d-c9368c57ad04.gif) + +- Replace AutoComplete in UserAutoComplete & UserAutoCompleteMultiple components ([#24529](https://github.com/RocketChat/Rocket.Chat/pull/24529)) + + This PR replaces a deprecated fuselage's component `AutoComplete` in favor of `Select` and `MultiSelect` which fixes some of UX/UI issues in selecting users + + ### before + ![Screen Shot 2022-02-19 at 13 33 28](https://user-images.githubusercontent.com/27704687/154809737-8181a06c-4f20-48ea-90f7-01e828b9a452.png) + + ### after + ![Screen Shot 2022-02-19 at 13 30 58](https://user-images.githubusercontent.com/27704687/154809653-a8ec9a80-c0dd-4a25-9c00-0f96147d79e9.png) + +- Skip encryption for slash commands in E2E rooms ([#24475](https://github.com/RocketChat/Rocket.Chat/pull/24475)) + + Currently Slash Commands don't work in an E2EE room, as we encrypt the message before slash command is detected by the server, So removed encryption for slash commands in e2e rooms. + +- Team system messages feedback ([#24209](https://github.com/RocketChat/Rocket.Chat/pull/24209) by [@ostjen](https://github.com/ostjen)) + + - Delete some keys that aren't being used (eg: User_left_female). + - Add new Teams' system messages: + - `added-user-to-team`: **added** @\user to this Team; + - `removed-user-from-team`: **removed** @\user from this Team; + - `user-converted-to-team`: **converted** #\room to a Team; + - `user-converted-to-channel`: **converted** #\room to a Channel; + - `user-removed-room-from-team`: **removed** @\user from this Team; + - `user-deleted-room-from-team`: **deleted** #\room from this Team; + - `user-added-room-to-team`: **deleted** #\room to this Team; + - Add the corresponding options to hide each new system message and the missing `ujt` and `ult` hide options. + +### 🐛 Bug fixes + + +- 2FA via email when logging in using OAuth ([#24572](https://github.com/RocketChat/Rocket.Chat/pull/24572)) + +- Add ?close to OAuth callback url ([#24381](https://github.com/RocketChat/Rocket.Chat/pull/24381)) + +- GDPR action to forget visitor data on request ([#24441](https://github.com/RocketChat/Rocket.Chat/pull/24441)) + +- Implement client errors on ddp-streamer ([#24310](https://github.com/RocketChat/Rocket.Chat/pull/24310)) + +- Inconsistent validation of user's access to rooms ([#24037](https://github.com/RocketChat/Rocket.Chat/pull/24037) by [@ostjen](https://github.com/ostjen)) + +- Issues on selecting users when importing CSV ([#24253](https://github.com/RocketChat/Rocket.Chat/pull/24253)) + + * Fix users selecting by fixing their _id + * Add condition to disable 'Start importing' button if `usersCount`, `channelsCount` and `messageCount` equals 0, or if messageCount is alone + * Remove `disabled={usersCount === 0}` on user Tab + +- OAuth mismatch redirect_uri error ([#24450](https://github.com/RocketChat/Rocket.Chat/pull/24450)) + +- Oembed request not respecting payload limit ([#24418](https://github.com/RocketChat/Rocket.Chat/pull/24418)) + +- Omnichannel managers can't join chats in progress ([#24553](https://github.com/RocketChat/Rocket.Chat/pull/24553)) + +- Outgoing webhook without scripts not saving messages ([#24401](https://github.com/RocketChat/Rocket.Chat/pull/24401)) + +- Prevent Apps Bridge to remove visitor status from room ([#24305](https://github.com/RocketChat/Rocket.Chat/pull/24305)) + +- Read receipts showing first messages of the room as read even if not read by everyone ([#24508](https://github.com/RocketChat/Rocket.Chat/pull/24508)) + +- respect `Accounts_Registration_Users_Default_Roles` setting ([#24173](https://github.com/RocketChat/Rocket.Chat/pull/24173)) + + - Fix `user` role being added as default regardless of the `Accounts_Registration_Users_Default_Roles` setting. + +- Room context tabs not working in Omnichannel current chats page ([#24559](https://github.com/RocketChat/Rocket.Chat/pull/24559)) + +- Skip admin info in setup wizard for servers with admin registered ([#24485](https://github.com/RocketChat/Rocket.Chat/pull/24485)) + +- Skip cloud steps for registered servers on setup wizard ([#24407](https://github.com/RocketChat/Rocket.Chat/pull/24407)) + +- Slash commands previews not working ([#24387](https://github.com/RocketChat/Rocket.Chat/pull/24387) by [@ostjen](https://github.com/ostjen)) + +- Startup errors creating indexes ([#24409](https://github.com/RocketChat/Rocket.Chat/pull/24409)) + + Fix `bio` and `prid` startup index creation errors. + +- typo on register server tooltip of setup wizard ([#24466](https://github.com/RocketChat/Rocket.Chat/pull/24466)) + +
+🔍 Minor changes + + +- Bump @types/ws from 8.2.2 to 8.2.3 in /ee/server/services ([#24556](https://github.com/RocketChat/Rocket.Chat/pull/24556) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump adm-zip from 0.4.14 to 0.5.9 ([#24538](https://github.com/RocketChat/Rocket.Chat/pull/24538) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump body-parser from 1.19.0 to 1.19.1 in /ee/server/services ([#23963](https://github.com/RocketChat/Rocket.Chat/pull/23963) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump body-parser from 1.19.1 to 1.19.2 in /ee/server/services ([#24517](https://github.com/RocketChat/Rocket.Chat/pull/24517) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump cookie from 0.4.1 to 0.4.2 in /ee/server/services ([#24472](https://github.com/RocketChat/Rocket.Chat/pull/24472) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump date-fns from 2.24.0 to 2.28.0 ([#24058](https://github.com/RocketChat/Rocket.Chat/pull/24058) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump express from 4.17.1 to 4.17.2 in /ee/server/services ([#24469](https://github.com/RocketChat/Rocket.Chat/pull/24469) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump express from 4.17.2 to 4.17.3 in /ee/server/services ([#24522](https://github.com/RocketChat/Rocket.Chat/pull/24522) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump follow-redirects from 1.14.7 to 1.14.8 in /ee/server/services ([#24491](https://github.com/RocketChat/Rocket.Chat/pull/24491) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump jaeger-client from 3.18.1 to 3.19.0 in /ee/server/services ([#23961](https://github.com/RocketChat/Rocket.Chat/pull/23961) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pm2 from 5.1.2 to 5.2.0 in /ee/server/services ([#24537](https://github.com/RocketChat/Rocket.Chat/pull/24537) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump simple-get from 4.0.0 to 4.0.1 ([#24341](https://github.com/RocketChat/Rocket.Chat/pull/24341) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump sodium-native from 3.2.1 to 3.3.0 in /ee/server/services ([#23512](https://github.com/RocketChat/Rocket.Chat/pull/23512) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump underscore.string from 3.3.5 to 3.3.6 in /ee/server/services ([#24498](https://github.com/RocketChat/Rocket.Chat/pull/24498) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump url-parse from 1.5.3 to 1.5.7 ([#24528](https://github.com/RocketChat/Rocket.Chat/pull/24528) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump vm2 from 3.9.5 to 3.9.7 in /ee/server/services ([#24509](https://github.com/RocketChat/Rocket.Chat/pull/24509) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore: `twoFactorRequired` signature ([#24518](https://github.com/RocketChat/Rocket.Chat/pull/24518)) + + Improved type checking for decorator `twoFactorRequired`. + +- Chore: Add description to global OTR setting ([#24333](https://github.com/RocketChat/Rocket.Chat/pull/24333) by [@pedrogssouza](https://github.com/pedrogssouza)) + +- Chore: Bump Fuselage packages ([#24573](https://github.com/RocketChat/Rocket.Chat/pull/24573)) + + It uses the last stable version of Fuselage packages. + +- Chore: bump fuselage version ([#24453](https://github.com/RocketChat/Rocket.Chat/pull/24453)) + +- Chore: Convert JS files to Typescript ([#24410](https://github.com/RocketChat/Rocket.Chat/pull/24410)) + + This pull request converts 26 more files from Javascript to Typescript, to check variable types and increase validation on the code. + +- Chore: Convert to typescript the me slashCommands files ([#24321](https://github.com/RocketChat/Rocket.Chat/pull/24321) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert to typescript the me slashCommands files + +- Chore: Convert to typescript the mute and unmute slash commands files ([#24325](https://github.com/RocketChat/Rocket.Chat/pull/24325) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert to typescript the mute and unmute slash commands files + +- Chore: Convert to typescript the slash commands create files ([#24306](https://github.com/RocketChat/Rocket.Chat/pull/24306) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert Slash Commands create files to typescript. + +- Chore: Convert to typescript the slash commands invite files ([#24311](https://github.com/RocketChat/Rocket.Chat/pull/24311) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert to typescript the slash commands invite files + +- Chore: Convert to typescript the unarchive slash commands files ([#24331](https://github.com/RocketChat/Rocket.Chat/pull/24331) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert to typescript the unarchive slash commands files + +- Chore: Delete unused file (NewAdminInfoPage.js) ([#24196](https://github.com/RocketChat/Rocket.Chat/pull/24196)) + + Just removing a duplicated/unused file. + +- Chore: Improve PR title validation regex ([#24467](https://github.com/RocketChat/Rocket.Chat/pull/24467)) + +- Chore: Js to ts slash commands archive ([#24304](https://github.com/RocketChat/Rocket.Chat/pull/24304) by [@eduardofcabrera](https://github.com/eduardofcabrera)) + + Convert Slash Commands archive files to typescript + +- Chore: Remove storybook build job from CI ([#24530](https://github.com/RocketChat/Rocket.Chat/pull/24530)) + +- Chore: roomTypes: Stop mixing client and server code together ([#24536](https://github.com/RocketChat/Rocket.Chat/pull/24536)) + +- Chore: Run tests using microservices deployment on CI ([#24513](https://github.com/RocketChat/Rocket.Chat/pull/24513)) + +- Chore: Set Docker image tag to latest only when really latest ([#24366](https://github.com/RocketChat/Rocket.Chat/pull/24366)) + +- Chore: Unify ILivechatAgent with ILivechatAgentRecord ([#24406](https://github.com/RocketChat/Rocket.Chat/pull/24406)) + +- Chore: Update Apps-Engine ([#24568](https://github.com/RocketChat/Rocket.Chat/pull/24568)) + +- Chore: Update Apps-Engine ([#24651](https://github.com/RocketChat/Rocket.Chat/pull/24651)) + +- Chore: Update fuselage deps to match monolith versions ([#24501](https://github.com/RocketChat/Rocket.Chat/pull/24501)) + +- Chore: Update Meteor to 2.5.6 ([#24461](https://github.com/RocketChat/Rocket.Chat/pull/24461)) + +- Chore: Update ws package ([#24477](https://github.com/RocketChat/Rocket.Chat/pull/24477)) + +- Chore(deps-dev): Bump ts-node from 10.0.0 to 10.5.0 in /ee/server/services ([#24435](https://github.com/RocketChat/Rocket.Chat/pull/24435) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore(deps): Bump node-fetch from 2.6.1 to 2.6.7 in /ee/server/services ([#24299](https://github.com/RocketChat/Rocket.Chat/pull/24299) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- i18n: Language update from LingoHub 🤖 on 2022-01-31Z ([#24357](https://github.com/RocketChat/Rocket.Chat/pull/24357)) + +- i18n: Language update from LingoHub 🤖 on 2022-02-07Z ([#24429](https://github.com/RocketChat/Rocket.Chat/pull/24429)) + +- i18n: Language update from LingoHub 🤖 on 2022-02-14Z ([#24493](https://github.com/RocketChat/Rocket.Chat/pull/24493)) + +- i18n: Language update from LingoHub 🤖 on 2022-02-21Z ([#24558](https://github.com/RocketChat/Rocket.Chat/pull/24558)) + +- Merge master into develop & Set version to 4.5.0-develop ([#24363](https://github.com/RocketChat/Rocket.Chat/pull/24363)) + +- Regression: Add support to namespace within micro services ([#24581](https://github.com/RocketChat/Rocket.Chat/pull/24581)) + +- Regression: Admin Sidebar colors inverted. ([#24609](https://github.com/RocketChat/Rocket.Chat/pull/24609)) + +- Regression: Bunch of settings fixes for VoIP ([#24594](https://github.com/RocketChat/Rocket.Chat/pull/24594)) + +- Regression: Do not show toast on incoming voip calls ([#24619](https://github.com/RocketChat/Rocket.Chat/pull/24619)) + +- Regression: Encode registration info as JWT when signing key is provided ([#24626](https://github.com/RocketChat/Rocket.Chat/pull/24626)) + +- Regression: Error setting user avatars and mentioning rooms on Slack Import ([#24585](https://github.com/RocketChat/Rocket.Chat/pull/24585)) + + - Fix `Mentioned room not found` error when importing rooms from Slack; + - Fix `Forbidden` error when setting avatars for users imported from Slack (on user import/creation); + - Fix incorrect message count on imported rooms; + - Fix missing username on messages imported from Slack; + +- Regression: Error when trying to load name of dm rooms for avatars and notifications ([#24583](https://github.com/RocketChat/Rocket.Chat/pull/24583)) + +- Regression: Extension List panel UI not aligned with designs ([#24645](https://github.com/RocketChat/Rocket.Chat/pull/24645)) + +- Regression: Fix double value on holdTime and empty msg on last message ([#24630](https://github.com/RocketChat/Rocket.Chat/pull/24630)) + +- Regression: Fix in-correct room status shown to agents ([#24592](https://github.com/RocketChat/Rocket.Chat/pull/24592)) + +- Regression: Fix incoming voip call ringtone is not ringing ([#24616](https://github.com/RocketChat/Rocket.Chat/pull/24616)) + +- Regression: Fix room not getting created due to null visitor status ([#24562](https://github.com/RocketChat/Rocket.Chat/pull/24562)) + +- Regression: Fix time fields and wrap up in Voip Room Contexual bar ([#24625](https://github.com/RocketChat/Rocket.Chat/pull/24625)) + +- Regression: Fix time format on Voip system messages ([#24603](https://github.com/RocketChat/Rocket.Chat/pull/24603)) + +- Regression: Fix translation for call started message ([#24615](https://github.com/RocketChat/Rocket.Chat/pull/24615)) + +- Regression: Fix wrong tab name for VoIP settings ([#24647](https://github.com/RocketChat/Rocket.Chat/pull/24647)) + +- Regression: Fixes in Voice Contextual Bar and Directory ([#24596](https://github.com/RocketChat/Rocket.Chat/pull/24596)) + +- Regression: If Asterisk suddenly goes down, server has no way to know. Causes server to get stuck. Needs restart ([#24624](https://github.com/RocketChat/Rocket.Chat/pull/24624)) + +- Regression: Mark all rooms as read modal closing instantly. ([#24610](https://github.com/RocketChat/Rocket.Chat/pull/24610)) + +- Regression: No audio when call comes from Skype/IP phone ([#24602](https://github.com/RocketChat/Rocket.Chat/pull/24602)) + + The audio was not rendered because of re-rendering of react element based on + queueCounter and roomInfo. queueCounter and roomInfo cause the dom to re-render when call gets accepted + because after accepting call, queueCounter changes or a room gets created. + The audio element gets recreated. But VoIP user probably holds the old one. + The behaviour is not predictable when such case happens. If everything gets cleanly setup, + even if the audio element goes headless, it still continues to play the remote audio. + But in other cases, it is unreferenced the one on dom has its srcObject as null. + This causes no audio. + + This fix provides a way to re-initialise the rendering elements in VoIP user + and calls this function on useEffect() if the re-render has happen. + +- Regression: Prevent button from losing state when rerendering ([#24648](https://github.com/RocketChat/Rocket.Chat/pull/24648)) + +- Regression: Prevent connect to asterisk when VoIP is disabled ([#24601](https://github.com/RocketChat/Rocket.Chat/pull/24601)) + +- Regression: Queue counter aggregator for incoming/hanged calls ([#24635](https://github.com/RocketChat/Rocket.Chat/pull/24635)) + +- Regression: Refresh server connection when MI server settings change ([#24649](https://github.com/RocketChat/Rocket.Chat/pull/24649)) + +- Regression: Server crashing if Voip credentials are invalid ([#24646](https://github.com/RocketChat/Rocket.Chat/pull/24646)) + +- Regression: VoIP service button displayed when VoIP is disabled ([#24598](https://github.com/RocketChat/Rocket.Chat/pull/24598)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@LucasFASouza](https://github.com/LucasFASouza) +- [@aswinidev](https://github.com/aswinidev) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@eduardofcabrera](https://github.com/eduardofcabrera) +- [@ostjen](https://github.com/ostjen) +- [@pedrogssouza](https://github.com/pedrogssouza) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@albuquerquefabio](https://github.com/albuquerquefabio) +- [@amolghode1981](https://github.com/amolghode1981) +- [@d-gubert](https://github.com/d-gubert) +- [@debdutdeb](https://github.com/debdutdeb) +- [@dougfabris](https://github.com/dougfabris) +- [@felipe-rod123](https://github.com/felipe-rod123) +- [@filipemarins](https://github.com/filipemarins) +- [@gabriellsh](https://github.com/gabriellsh) +- [@ggazzo](https://github.com/ggazzo) +- [@guijun13](https://github.com/guijun13) +- [@juliajforesti](https://github.com/juliajforesti) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rique223](https://github.com/rique223) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@tiagoevanp](https://github.com/tiagoevanp) +- [@ujorgeleite](https://github.com/ujorgeleite) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 4.4.3 +`2022-04-07 · 2 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.2` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.30.0` + +### 🐛 Bug fixes + + +- NPS never finishing sending results ([#25067](https://github.com/RocketChat/Rocket.Chat/pull/25067)) + +- Proxy settings being ignored ([#25022](https://github.com/RocketChat/Rocket.Chat/pull/25022)) + + Modify Meteor's `HTTP.call` to add back proxy support + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 4.4.2 +`2022-02-09 · 1 🐛 · 2 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.2` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.30.0` + +### 🐛 Bug fixes + + +- OAuth mismatch redirect_uri error ([#24450](https://github.com/RocketChat/Rocket.Chat/pull/24450)) + +
+🔍 Minor changes + + +- Chore: bump fuselage version ([#24453](https://github.com/RocketChat/Rocket.Chat/pull/24453)) + +- Release 4.4.2 ([#24459](https://github.com/RocketChat/Rocket.Chat/pull/24459)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@dougfabris](https://github.com/dougfabris) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 4.4.1 +`2022-02-07 · 6 🐛 · 1 🔍 · 6 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.2` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.30.0` + +### 🐛 Bug fixes + + +- Add ?close to OAuth callback url ([#24381](https://github.com/RocketChat/Rocket.Chat/pull/24381)) + +- Oembed request not respecting payload limit ([#24418](https://github.com/RocketChat/Rocket.Chat/pull/24418)) + +- Outgoing webhook without scripts not saving messages ([#24401](https://github.com/RocketChat/Rocket.Chat/pull/24401)) + +- Skip cloud steps for registered servers on setup wizard ([#24407](https://github.com/RocketChat/Rocket.Chat/pull/24407)) + +- Slash commands previews not working ([#24387](https://github.com/RocketChat/Rocket.Chat/pull/24387) by [@ostjen](https://github.com/ostjen)) + +- Startup errors creating indexes ([#24409](https://github.com/RocketChat/Rocket.Chat/pull/24409)) + + Fix `bio` and `prid` startup index creation errors. + +
+🔍 Minor changes + + +- Release 4.4.1 ([#24432](https://github.com/RocketChat/Rocket.Chat/pull/24432) by [@ostjen](https://github.com/ostjen)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@ostjen](https://github.com/ostjen) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 4.4.0 +`2022-01-28 · 4 🎉 · 13 🚀 · 29 🐛 · 44 🔍 · 34 👩‍💻👨‍💻` + +### Engine versions +- Node: `14.18.2` +- NPM: `6.14.15` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.30.0` + +### 🎉 New features + + +- **EE:** Allow to filter departments by Business Units on Livechat ([#24162](https://github.com/RocketChat/Rocket.Chat/pull/24162)) + +- App empty states component, category filter and empty states error variation implementations ([#23818](https://github.com/RocketChat/Rocket.Chat/pull/23818)) + + Created and implemented the category filters component: + Demo gif: + ![categories_filter_demo](https://user-images.githubusercontent.com/43561537/148579731-1de83bf8-91ce-47e7-b6e5-7781384fdef9.gif) + + Created and implemented the empty states(States on fuselage) component: + Demo gif: + ![empty_states_demo](https://user-images.githubusercontent.com/43561537/148579930-49c2ff69-88f4-4a57-a24a-060868d76209.gif) + + Implemented a variations system for the empty states component and created a error message for network outage: + Demo gif: + ![empty_states_variation_demo](https://user-images.githubusercontent.com/43561537/148580047-39adf8ef-2ee0-4c3e-8709-5faea4a5e335.gif) + +- Apple Login ([#24060](https://github.com/RocketChat/Rocket.Chat/pull/24060)) + +- Enabling emoji on custom status ([#24170](https://github.com/RocketChat/Rocket.Chat/pull/24170)) + +### 🚀 Improvements + + +- Add Rocket.Chat version to User-Agent header for oembed requests ([#23605](https://github.com/RocketChat/Rocket.Chat/pull/23605) by [@sidmohanty11](https://github.com/sidmohanty11)) + +- Added a Reset Button in the Account Profile Page ([#24078](https://github.com/RocketChat/Rocket.Chat/pull/24078) by [@aswinidev](https://github.com/aswinidev)) + +- Admin page header buttons consistency ([#24168](https://github.com/RocketChat/Rocket.Chat/pull/24168)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/149371746-66e5e6e4-5c8e-46d7-b230-ecbc4502b665.png) + ![image](https://user-images.githubusercontent.com/27704687/149371759-c3d948af-d877-486c-a263-da12c0b70185.png) + ![image](https://user-images.githubusercontent.com/27704687/149371769-09b0623d-a5c5-43e0-a4ef-73ba0bcf1730.png) + ![image](https://user-images.githubusercontent.com/27704687/149371782-b1b898c7-3aad-47ee-8c5c-cf9cb816d72b.png) + ![image](https://user-images.githubusercontent.com/27704687/149371796-b88514d2-3c8d-4d9d-a45b-24f48783e95c.png) + + + ### after + ![Screen Shot 2022-01-13 at 13 38 00](https://user-images.githubusercontent.com/27704687/149371084-668d5f14-e03e-4cdd-8763-058db9c2f16c.png) + ![Screen Shot 2022-01-13 at 13 38 18](https://user-images.githubusercontent.com/27704687/149371126-23a059cb-efa7-4ffb-970b-da23d8742bb1.png) + ![Screen Shot 2022-01-13 at 13 38 38](https://user-images.githubusercontent.com/27704687/149371181-c8bbbbbd-ed6d-48b4-844f-09fdce0080b6.png) + ![Screen Shot 2022-01-13 at 13 38 59](https://user-images.githubusercontent.com/27704687/149371232-3d292f5e-e8b0-41e1-b065-90a80a5f08ce.png) + ![Screen Shot 2022-01-13 at 13 39 08](https://user-images.githubusercontent.com/27704687/149371263-64fd09e4-456e-48ee-9976-83f42b90e4d9.png) + +- Importer text for CSV upload file format ([#23817](https://github.com/RocketChat/Rocket.Chat/pull/23817) by [@ostjen](https://github.com/ostjen)) + +- lib/Statistics improved and metrics collector ([#24177](https://github.com/RocketChat/Rocket.Chat/pull/24177) by [@ostjen](https://github.com/ostjen)) + + - On `statistics` object the property `get` is an async function now. + - We need to collect additional data of feature activation through the statistics collector. + - Some codes were splitted into another file just to organize. + +- Limit recent emojis to 27 ([#24210](https://github.com/RocketChat/Rocket.Chat/pull/24210)) + + Limits the recent emoji list to a maximum of 3 rows instead of listing every emoji you've used so far. + + ![image](https://user-images.githubusercontent.com/8591547/150033087-92721b76-9203-42fe-ac2e-5b9eca50edab.png) + +- Rewrite AddWebdavAccountModal to React Component ([#24070](https://github.com/RocketChat/Rocket.Chat/pull/24070)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/147777054-bf2f84e4-5226-4ebc-ab6e-287b83889b85.png) + + ### after + ![image](https://user-images.githubusercontent.com/27704687/147769132-2b938ae8-aba3-4230-876d-572e46268b9a.png) + +- Rewrite Omnichannel Queue Page to React ([#24176](https://github.com/RocketChat/Rocket.Chat/pull/24176)) + + ![image](https://user-images.githubusercontent.com/17487063/149458880-03c201ab-11cd-4c71-82aa-51bd557d3b6e.png) + +- Rewrite roomNotFound to React Component ([#24044](https://github.com/RocketChat/Rocket.Chat/pull/24044)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/147608307-468e6955-5db4-40c5-86a7-91448ac03427.png) + ![image](https://user-images.githubusercontent.com/27704687/147608377-d979adf5-615f-4180-8587-449369bf87f8.png) + + ### after + ![image](https://user-images.githubusercontent.com/27704687/149158027-e39bc0a0-4c33-465b-83e0-873e558a037b.png) + ![image](https://user-images.githubusercontent.com/27704687/149157692-3e73c0b4-1759-430c-b1c4-b521e47d774d.png) + +- Setup Wizard Registration Flow ([#23676](https://github.com/RocketChat/Rocket.Chat/pull/23676)) + + This pull request brings a few improvements in our setup wizard flow, the very first contact with a Rocket.Chat. Some of them: + - A brand new visual design; + - Form validation improves; + - Allow users to navigate back to all steps; + - Optimized steps to register your workspace or keep standalone. And many more! + + + ![Kapture 2022-01-20 at 11 19 47](https://user-images.githubusercontent.com/27704687/150356868-425666b4-511f-4690-9ce5-e61b839b1d19.gif) + +- Show Channel Icons on Room Header & Info panels ([#24239](https://github.com/RocketChat/Rocket.Chat/pull/24239)) + + Updates Omnichannel Header & room Info component to render the source info + Built on top of https://github.com/RocketChat/Rocket.Chat/pull/24237 + +- Throw 404 error in invalid endpoints ([#24053](https://github.com/RocketChat/Rocket.Chat/pull/24053)) + + - Throw 404 error when trying to call invalid endpoints. + +- Throw 404 error in invalid endpoints" ([#24118](https://github.com/RocketChat/Rocket.Chat/pull/24118)) + +### 🐛 Bug fixes + + +- **APPS:** Action buttons not removed when app is disabled or uninstalled ([#24107](https://github.com/RocketChat/Rocket.Chat/pull/24107)) + + Fixes a problem where action buttons registered by any app would not be removed if the app was disabled or uninstalled + +- **APPS:** Prevents emails from being sent when apps framework is disabled ([#24105](https://github.com/RocketChat/Rocket.Chat/pull/24105)) + + Introduction of new event `IPreEmailSent` was breaking the email function when the Apps-Engine framework was disabled in the administration + +- **EE:** Agent cannot change status to Available despite being within open business hours ([#24112](https://github.com/RocketChat/Rocket.Chat/pull/24112)) + +- **ENTERPRISE:** Leading slashes in Engagement Dashboard API requests ([#24142](https://github.com/RocketChat/Rocket.Chat/pull/24142)) + + - Remove trailing slashes from Engagement Dashboard API requests; + +- App Framework Enable hanging indefinitely ([#24158](https://github.com/RocketChat/Rocket.Chat/pull/24158)) + +- Apps Contextual Bar not carrying title and room information ([#24241](https://github.com/RocketChat/Rocket.Chat/pull/24241)) + + Fixes: + + - the app's name being rendered instead of the view's title, + - the room's information (`IRoom`) wasn't being sent to the app when a `block action` happened + + Fixed behavior with correct view title and room information included in the block action event: + + https://user-images.githubusercontent.com/733282/150420847-59bfcf8a-24a9-4dc5-8609-0d92dba38b70.mp4 + +- Avoid updating all rooms with visitor abandonment queries ([#24252](https://github.com/RocketChat/Rocket.Chat/pull/24252)) + +- Change canned response model index to match other definition ([#24235](https://github.com/RocketChat/Rocket.Chat/pull/24235)) + +- CSV Importer failing to import users ([#24090](https://github.com/RocketChat/Rocket.Chat/pull/24090)) + + - Update use of `setRealName` function to `_setRealName`. + +- Custom Emoji Image preview ([#24117](https://github.com/RocketChat/Rocket.Chat/pull/24117) by [@sidmohanty11](https://github.com/sidmohanty11)) + + Before, + + ![custom-img-preview-rc3](https://user-images.githubusercontent.com/73601258/148431936-c82d4200-69b1-484b-8be2-d72f5c28202b.png) + + After, + + ![custom-img-preview-rc1](https://user-images.githubusercontent.com/73601258/148431955-8842a2e3-b9f3-4d68-b0d8-c5444419f767.png) + + also if any error, (for example - if we upload a video mp4 file) + + ![custom-img-preview-rc2](https://user-images.githubusercontent.com/73601258/148431998-64bc1fbb-9958-495c-89c1-61df06adec75.png) + +- Discussions not loading message history if not joined ([#24316](https://github.com/RocketChat/Rocket.Chat/pull/24316)) + +- Ensure Firefox 91 ESR support ([#24096](https://github.com/RocketChat/Rocket.Chat/pull/24096)) + + It: + - Adds `Firefox ESR` to `browserslist`; + - Upgrades `@rocket.chat/fuselage-hooks` to overcome a bug related to Firefox implementation of `ResizeObserver` API. + +- Enter not working on modal's multi-line input ([#23981](https://github.com/RocketChat/Rocket.Chat/pull/23981)) + + Right now, if we try to press enter for a new line on multi-line modal input... it auto triggers the submit event. This PR fixes this behaviour by not submitting the modal in case the enter was pressed within an input text with multiline expected + +- Errors on advanced sync prevent LDAP users from logging in ([#23958](https://github.com/RocketChat/Rocket.Chat/pull/23958) by [@ostjen](https://github.com/ostjen)) + +- Filter ability for admin room checkboxes ([#23970](https://github.com/RocketChat/Rocket.Chat/pull/23970) by [@sidmohanty11](https://github.com/sidmohanty11)) + + Now, + + https://user-images.githubusercontent.com/73601258/146380812-d3aa5561-64e1-4515-a639-3b6d87432ae4.mp4 + + Before, + + https://user-images.githubusercontent.com/73601258/146385538-85a70fce-9974-40e0-8757-eda1a5d411b7.mp4 + +- Fixed broken links in setup wizard ([#24248](https://github.com/RocketChat/Rocket.Chat/pull/24248) by [@Himanshu664](https://github.com/Himanshu664)) + +- Fixing the changing custom status behavior ([#24218](https://github.com/RocketChat/Rocket.Chat/pull/24218)) + +- Integration section crashing opening in My Account ([#24068](https://github.com/RocketChat/Rocket.Chat/pull/24068)) + +- Make canned responses popup dependent on Canned_responses_enabled setting ([#23804](https://github.com/RocketChat/Rocket.Chat/pull/23804)) + +- MAU when using micro services ([#24204](https://github.com/RocketChat/Rocket.Chat/pull/24204)) + +- Message Erasure Type "Keep" Messages not working ([#24024](https://github.com/RocketChat/Rocket.Chat/pull/24024) by [@arshxyz](https://github.com/arshxyz)) + +- MongoError during startup saying "ns not found" ([#24015](https://github.com/RocketChat/Rocket.Chat/pull/24015)) + +- Omnichannel Current chats pagination not working ([#24039](https://github.com/RocketChat/Rocket.Chat/pull/24039)) + +- Omnichannel enabled setting not working when creating rooms ([#24067](https://github.com/RocketChat/Rocket.Chat/pull/24067)) + +- openUserInfo not working after changing room types ([#24098](https://github.com/RocketChat/Rocket.Chat/pull/24098) by [@grahhnt](https://github.com/grahhnt)) + +- Password error should not be shown when selecting set random password ([#21181](https://github.com/RocketChat/Rocket.Chat/pull/21181)) + + We should not keep `password` as required field when we check set random password field. In this password should not be required + +- Solved Report Message Blank ([#24262](https://github.com/RocketChat/Rocket.Chat/pull/24262) by [@nishant23122000](https://github.com/nishant23122000)) + + After resolving issue #24261 : + + https://user-images.githubusercontent.com/53515714/150629459-5f0a9cf6-9b0e-417f-8fc1-44c810bd5428.mp4 + +- Wrong german translation for 2FA-Promt ([#24126](https://github.com/RocketChat/Rocket.Chat/pull/24126) by [@mbreslein-thd](https://github.com/mbreslein-thd)) + +- wrong new userInfo during user creation ([#24051](https://github.com/RocketChat/Rocket.Chat/pull/24051) by [@Aman-Maheshwari](https://github.com/Aman-Maheshwari)) + +
+🔍 Minor changes + + +- Add: Alpine image as option for build ([#12548](https://github.com/RocketChat/Rocket.Chat/pull/12548)) + +- Bump follow-redirects from 1.14.5 to 1.14.7 in /ee/server/services ([#24182](https://github.com/RocketChat/Rocket.Chat/pull/24182) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore: add script to fix code with prettier ([#24054](https://github.com/RocketChat/Rocket.Chat/pull/24054)) + +- Chore: Apply generics to infer types of useForm hook ([#22400](https://github.com/RocketChat/Rocket.Chat/pull/22400)) + +- Chore: Bump fuselage hooks ([#24233](https://github.com/RocketChat/Rocket.Chat/pull/24233)) + +- Chore: Bump Livechat package version to 1.12.0 ([#24232](https://github.com/RocketChat/Rocket.Chat/pull/24232)) + +- Chore: Convert model LoginServiceConfiguration to raw ([#24187](https://github.com/RocketChat/Rocket.Chat/pull/24187)) + +- Chore: Fix Houston `getNodeNpmVersions` regex to correctly get Node and Npm complete versions ([#24111](https://github.com/RocketChat/Rocket.Chat/pull/24111)) + +- Chore: Include REG_TOKEN in docker-compose ([#24123](https://github.com/RocketChat/Rocket.Chat/pull/24123)) + +- Chore: Migrate useOutsideClick to fuselage-hooks ([#24133](https://github.com/RocketChat/Rocket.Chat/pull/24133)) + +- Chore: Move `callbacks` to /lib ([#23456](https://github.com/RocketChat/Rocket.Chat/pull/23456)) + + It moves to `/lib`, migrates to TypeScript, and deprecates the `callbacks` API. + +- Chore: Prettier for us all ([#24000](https://github.com/RocketChat/Rocket.Chat/pull/24000)) + +- Chore: Remove unused assets ([#24023](https://github.com/RocketChat/Rocket.Chat/pull/24023)) + +- Chore: Removing hubot from docker-compose ([#23591](https://github.com/RocketChat/Rocket.Chat/pull/23591)) + + Remove hubot from docker-compose. This is forcing everyone to spin up Hubot every time they deploy Rocket.Chat and not that many people are using it. So we are wasting resources on peoples machines by forcing it + +- Chore: Replace `isEmail` with `validateEmail` ([#24020](https://github.com/RocketChat/Rocket.Chat/pull/24020)) + + Follows #23816. + +- Chore: Replace Blaze templates ([#24165](https://github.com/RocketChat/Rocket.Chat/pull/24165)) + + It replaces some templates used by login and invitation flows with React components. It also drops `main` template, allowing `appLayout` to just handle components now. + +- Chore: Slash Commands Join to Typescript ([#24254](https://github.com/RocketChat/Rocket.Chat/pull/24254) by [@eduardofcabrera](https://github.com/eduardofcabrera) & [@ostjen](https://github.com/ostjen)) + + Convert the slash commands .js files to .ts files. + +- Chore: Update Apps-Engine to 1.29.2 ([#24171](https://github.com/RocketChat/Rocket.Chat/pull/24171)) + +- Chore: Update Apps-Engine version ([#24335](https://github.com/RocketChat/Rocket.Chat/pull/24335)) + +- Chore: Update copyright notices ([#24022](https://github.com/RocketChat/Rocket.Chat/pull/24022)) + + Update date range in copyright notices to `2015-2022`. + +- Chore: Update Livechat to 1.11.1 ([#24091](https://github.com/RocketChat/Rocket.Chat/pull/24091)) + +- Chore: Update mem to 8.1.1 ([#23954](https://github.com/RocketChat/Rocket.Chat/pull/23954)) + +- Chore: Update Meteor to 2.5.3 ([#24075](https://github.com/RocketChat/Rocket.Chat/pull/24075)) + +- Chore: Update Omnichannel widget version to 1.11.2 ([#24169](https://github.com/RocketChat/Rocket.Chat/pull/24169)) + +- Chore: Update pino and pino-pretty ([#24242](https://github.com/RocketChat/Rocket.Chat/pull/24242)) + +- i18n: Language update from LingoHub 🤖 on 2022-01-10Z ([#24127](https://github.com/RocketChat/Rocket.Chat/pull/24127)) + +- i18n: Language update from LingoHub 🤖 on 2022-01-17Z ([#24193](https://github.com/RocketChat/Rocket.Chat/pull/24193)) + +- i18n: Language update from LingoHub 🤖 on 2022-01-24Z ([#24268](https://github.com/RocketChat/Rocket.Chat/pull/24268)) + +- Merge master into develop & Set version to 4.4.0-develop ([#24049](https://github.com/RocketChat/Rocket.Chat/pull/24049)) + +- Regression: Align Omni-Source icon sizes with designs ([#24269](https://github.com/RocketChat/Rocket.Chat/pull/24269)) + +- Regression: Create migration to fix index issue at boot ([#24289](https://github.com/RocketChat/Rocket.Chat/pull/24289)) + +- Regression: Discussion room crashing ([#24272](https://github.com/RocketChat/Rocket.Chat/pull/24272)) + +- Regression: Enable custom emoji on admin custom status page ([#24186](https://github.com/RocketChat/Rocket.Chat/pull/24186)) + +- Regression: Fix Alpine release tag ([#24259](https://github.com/RocketChat/Rocket.Chat/pull/24259)) + +- Regression: Fix Default Business hour overriding other Business Hours ([#24288](https://github.com/RocketChat/Rocket.Chat/pull/24288)) + +- Regression: Fix handling of http requests in apps bridge ([#24211](https://github.com/RocketChat/Rocket.Chat/pull/24211)) + + Changes made during Meteor upgrade broke HTTP requests made in Rocket.Chat Apps + +- Regression: Fix Inactive Departments still visible on Livechat ([#24267](https://github.com/RocketChat/Rocket.Chat/pull/24267)) + +- Regression: Fix incompatibility of apps http requests ([#24276](https://github.com/RocketChat/Rocket.Chat/pull/24276)) + + HTTP GET and HEAD requests made with an empty object as `data` were breaking, as the bridge converted this to the request's body as `'{}'` but meteor's new lib doesn't allow for body content on either of this request methods. + + To maintain compatibility, we forced an empty body whenever we have a GET or HEAD request. This was probably the case previously, with the body of requests made with this methods being ignored either before being sent or in the third party server receiving the request + +- Regression: Fix OmnichannelAppSourceRoomIcon sizes ([#24322](https://github.com/RocketChat/Rocket.Chat/pull/24322)) + +- Regression: Fix pino child log levels ([#24302](https://github.com/RocketChat/Rocket.Chat/pull/24302)) + +- Regression: Remove extra call to `useOutsideClick` hook not following the function signature ([#24243](https://github.com/RocketChat/Rocket.Chat/pull/24243)) + + It migrates `client/sidebar/header/actions/Search` component to TypeScript and mitigates a invalid call to `Array.prototype.every`: + + ![image](https://user-images.githubusercontent.com/2263066/150441397-3ff403b2-10c1-4a29-b37f-892d7d4a9252.png) + +- Regression: Standalone register path failing when saving data ([#24324](https://github.com/RocketChat/Rocket.Chat/pull/24324)) + +- Regression: Update tap-i18n package ([#24298](https://github.com/RocketChat/Rocket.Chat/pull/24298)) + + Fix the issue breaking IE11. + +- Release 4.3.3 ([#24340](https://github.com/RocketChat/Rocket.Chat/pull/24340)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Aman-Maheshwari](https://github.com/Aman-Maheshwari) +- [@Himanshu664](https://github.com/Himanshu664) +- [@arshxyz](https://github.com/arshxyz) +- [@aswinidev](https://github.com/aswinidev) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@eduardofcabrera](https://github.com/eduardofcabrera) +- [@grahhnt](https://github.com/grahhnt) +- [@mbreslein-thd](https://github.com/mbreslein-thd) +- [@nishant23122000](https://github.com/nishant23122000) +- [@ostjen](https://github.com/ostjen) +- [@sidmohanty11](https://github.com/sidmohanty11) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@AllanPazRibeiro](https://github.com/AllanPazRibeiro) +- [@KevLehman](https://github.com/KevLehman) +- [@LuluGO](https://github.com/LuluGO) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@albuquerquefabio](https://github.com/albuquerquefabio) +- [@d-gubert](https://github.com/d-gubert) +- [@debdutdeb](https://github.com/debdutdeb) +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@juliajforesti](https://github.com/juliajforesti) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rique223](https://github.com/rique223) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@thassiov](https://github.com/thassiov) +- [@tiagoevanp](https://github.com/tiagoevanp) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 4.3.3 +`2022-01-28 · 1 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.12` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.29.2` + +### 🐛 Bug fixes + + +- Security Hotfix (https://docs.rocket.chat/guides/security/security-updates) + +
+🔍 Minor changes + + +- Release 4.3.3 ([#24340](https://github.com/RocketChat/Rocket.Chat/pull/24340)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@gronke](https://github.com/gronke) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 4.3.2 +`2022-01-19 · 5 🐛 · 1 🔍 · 10 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.29.2` + +### 🐛 Bug fixes + + +- **ENTERPRISE:** Leading slashes in Engagement Dashboard API requests ([#24142](https://github.com/RocketChat/Rocket.Chat/pull/24142)) + + - Remove trailing slashes from Engagement Dashboard API requests; + +- App Framework Enable hanging indefinitely ([#24158](https://github.com/RocketChat/Rocket.Chat/pull/24158)) + +- CSV Importer failing to import users ([#24090](https://github.com/RocketChat/Rocket.Chat/pull/24090)) + + - Update use of `setRealName` function to `_setRealName`. + +- Integration section crashing opening in My Account ([#24068](https://github.com/RocketChat/Rocket.Chat/pull/24068)) + +- Security Hotfix (https://docs.rocket.chat/guides/security/security-updates) + +
+🔍 Minor changes + + +- Chore: Update Apps-Engine to 1.29.2 ([#24171](https://github.com/RocketChat/Rocket.Chat/pull/24171)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@gronke](https://github.com/gronke) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 4.3.1 +`2022-01-05 · 6 🐛 · 1 🔍 · 6 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.29.1` + +### 🐛 Bug fixes + + +- **APPS:** Action buttons not removed when app is disabled or uninstalled ([#24107](https://github.com/RocketChat/Rocket.Chat/pull/24107)) + + Fixes a problem where action buttons registered by any app would not be removed if the app was disabled or uninstalled + +- **APPS:** Prevents emails from being sent when apps framework is disabled ([#24105](https://github.com/RocketChat/Rocket.Chat/pull/24105)) + + Introduction of new event `IPreEmailSent` was breaking the email function when the Apps-Engine framework was disabled in the administration + +- Ensure Firefox 91 ESR support ([#24096](https://github.com/RocketChat/Rocket.Chat/pull/24096)) + + It: + - Adds `Firefox ESR` to `browserslist`; + - Upgrades `@rocket.chat/fuselage-hooks` to overcome a bug related to Firefox implementation of `ResizeObserver` API. + +- Enter not working on modal's multi-line input ([#23981](https://github.com/RocketChat/Rocket.Chat/pull/23981)) + + Right now, if we try to press enter for a new line on multi-line modal input... it auto triggers the submit event. This PR fixes this behaviour by not submitting the modal in case the enter was pressed within an input text with multiline expected + +- Omnichannel Current chats pagination not working ([#24039](https://github.com/RocketChat/Rocket.Chat/pull/24039)) + +- Omnichannel enabled setting not working when creating rooms ([#24067](https://github.com/RocketChat/Rocket.Chat/pull/24067)) + +
+🔍 Minor changes + + +- Chore: Update Livechat to 1.11.1 ([#24091](https://github.com/RocketChat/Rocket.Chat/pull/24091)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@d-gubert](https://github.com/d-gubert) +- [@murtaza98](https://github.com/murtaza98) +- [@tassoevan](https://github.com/tassoevan) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 4.3.0 +`2021-12-28 · 7 🎉 · 5 🚀 · 26 🐛 · 37 🔍 · 28 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.29.0` + +### 🎉 New features + + +- **APPS:** Add new email event for apps ([#23925](https://github.com/RocketChat/Rocket.Chat/pull/23925)) + + Introduces a new event called before an email is sent by the Mailer. Apps can intercept and modify the email that will be sent, or even prevent it from being sent altogether. For more details, check https://github.com/RocketChat/Rocket.Chat.Apps-engine/pull/461/files#diff-301e8a58164edbf315da2a43c4923f153dbc909573de1e60aa9f730f7488ac82 + +- **APPS:** Allow apps to open contextual bar ([#23843](https://github.com/RocketChat/Rocket.Chat/pull/23843)) + + Opens a contextual bar using app ui interactions (`CONTEXTUAL_BAR_OPEN`) + + https://user-images.githubusercontent.com/733282/146704076-d2d115f2-6ca6-4ed0-b450-81be580889a4.mp4 + +- **APPS:** Allow Rocket.Chat Apps to register custom action buttons ([#23679](https://github.com/RocketChat/Rocket.Chat/pull/23679)) + + Add an action button manager that allows apps to register custom action buttons that trigger interaction callbacks in them + +- **APPS:** getUserUnreadMessageCount Bridge ([#23972](https://github.com/RocketChat/Rocket.Chat/pull/23972)) + +- **APPS:** Possibility to set room closer via Apps LivechatBridge.closeRoom ([#21025](https://github.com/RocketChat/Rocket.Chat/pull/21025)) + + Add an optional param named `closer` into `LivechatBridge.closeRoom` so that it will be possible to close the room and send a close room message with the correct room closer. + If the param is not passed, use the room visitor as the room closer. + +- **EE:** Introduce fallback department support ([#23939](https://github.com/RocketChat/Rocket.Chat/pull/23939)) + +- Show Omnichannel room icon based on source definition ([#23912](https://github.com/RocketChat/Rocket.Chat/pull/23912)) + +### 🚀 Improvements + + +- Allow e-mail channel to be used without default department. ([#23945](https://github.com/RocketChat/Rocket.Chat/pull/23945)) + + Due to a missing condition in the e-mail input processing, Rocket.Chat was unable to receive e-mails from e-mail channels that did not have a default department. + +- Omnichannel Visitor Endpoints error handling ([#23819](https://github.com/RocketChat/Rocket.Chat/pull/23819)) + +- Replace SortListItem and CreateListItem with ListItem ([#24007](https://github.com/RocketChat/Rocket.Chat/pull/24007)) + +- Update "Message Erasure Type" setting's description ([#23879](https://github.com/RocketChat/Rocket.Chat/pull/23879)) + + - Improves the "Message Erasure Type" setting's description by providing more details regarding the expected behavior of each option ("Keep Messages and User Name", "Delete All Messages" and "Remove link between user and messages"); + - Remove outdated translations (for this setting's description). + +- Webdav methods sanitization ([#23924](https://github.com/RocketChat/Rocket.Chat/pull/23924)) + + The improvement modify `server_url` and `user_id` params into `serverURL` and `userId` more suitable to our camelCase pattern. Also converts the webdav methods into .ts helping us to prevent issues in the next modal rewrites efforts. + +### 🐛 Bug fixes + + +- Add CSP to authorize auto-close of CAS login window ([#23215](https://github.com/RocketChat/Rocket.Chat/pull/23215) by [@goyome](https://github.com/goyome)) + + Add the hash of the JS inside the page that won't close ( window.close(); ) + +- Add missing .png to clipboard uploaded file name ([#23833](https://github.com/RocketChat/Rocket.Chat/pull/23833)) + +- broken `Word Placement Anywhere` and `Run on edits` toggles in integration page ([#23901](https://github.com/RocketChat/Rocket.Chat/pull/23901) by [@aswinidev](https://github.com/aswinidev)) + +- Broken links present in some languages ([#23987](https://github.com/RocketChat/Rocket.Chat/pull/23987) by [@aswinidev](https://github.com/aswinidev)) + +- Changes on department agents should mark form as dirty ([#19640](https://github.com/RocketChat/Rocket.Chat/pull/19640) by [@rafaelblink](https://github.com/rafaelblink)) + +- creating room with federated member ([#23347](https://github.com/RocketChat/Rocket.Chat/pull/23347) by [@qwertiko](https://github.com/qwertiko)) + +- Custom emoji route in admin ([#23882](https://github.com/RocketChat/Rocket.Chat/pull/23882) by [@sidmohanty11](https://github.com/sidmohanty11)) + + https://user-images.githubusercontent.com/73601258/144975689-912cfd73-da16-433c-899a-4d4ffac8e146.mp4 + +- Custom status doesn't update properly ([#23860](https://github.com/RocketChat/Rocket.Chat/pull/23860)) + +- DMs being created with username instead of user's name ([#23848](https://github.com/RocketChat/Rocket.Chat/pull/23848)) + +- Email notifications settings not being honored on new DMs ([#23574](https://github.com/RocketChat/Rocket.Chat/pull/23574) by [@ostjen](https://github.com/ostjen)) + +- Error when creating an inactive user in admin panel ([#23859](https://github.com/RocketChat/Rocket.Chat/pull/23859)) + + - Fix `usersInRole` array used to send email to activate a user. + +- Fix no message size limit for method sendMessageLivechat ([#23558](https://github.com/RocketChat/Rocket.Chat/pull/23558)) + +- Headers already sent error when user data download is disabled ([#23805](https://github.com/RocketChat/Rocket.Chat/pull/23805)) + + When using the export message tool when trying to download the file using the link sent via email if the feature "Export User Data" is disabled an error was being thrown causing the request to halt. + + This is the error shown in the logs: + ``` + === UnHandledPromiseRejection === + Error [ERR_HTTP_HEADERS_SENT] [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client + at ServerResponse.setHeader (_http_outgoing.js:530:11) + at ServerResponse.res.setHeader (/app/bundle/programs/server/npm/node_modules/meteor/simple_json-routes/node_modules/connect/lib/patch.js:134:22) + at app/user-data-download/server/exportDownload.js:14:7 + at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40 { + code: 'ERR_HTTP_HEADERS_SENT' + } + --------------------------------- + Errors like this can cause oplog processing errors. + Setting EXIT_UNHANDLEDPROMISEREJECTION will cause the process to exit allowing your service to automatically restart the process + Future node.js versions will automatically exit the process + ================================= + ``` + +- Jitsi call already ended ([#23904](https://github.com/RocketChat/Rocket.Chat/pull/23904) by [@Aman-Maheshwari](https://github.com/Aman-Maheshwari)) + + - Fix Jitsi timeout update -- which caused the "Jitsi call already ended" error when trying to join a call some time after its creation; + +- LDAP Sync doing nothing when set to only import new users. ([#23823](https://github.com/RocketChat/Rocket.Chat/pull/23823)) + +- Missing custom user status ellipsis ([#23831](https://github.com/RocketChat/Rocket.Chat/pull/23831)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/144270229-baca14f5-e168-42b7-86d1-e7217be561a9.png) + + ### after + ![image](https://user-images.githubusercontent.com/27704687/144274255-39216e69-8283-45c5-8a77-b835d284f655.png) + +- Missing edit icon in sequential thread messages ([#23948](https://github.com/RocketChat/Rocket.Chat/pull/23948)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/146083450-ca6d7197-dc55-4058-8212-943b42c82473.png) + + ### after + ![image](https://user-images.githubusercontent.com/27704687/146083055-36c9731a-33c6-483a-93a5-1355d8689e3a.png) + +- Modal keeps state if reset too fast. ([#23791](https://github.com/RocketChat/Rocket.Chat/pull/23791)) + + ~Queued updates so the Modal has a chance to close.~ + Used a random key to ensure modal doesn't keep it's state. + +- OTR not working ([#23973](https://github.com/RocketChat/Rocket.Chat/pull/23973)) + + A rule on the user notification streamer was changed recently, and the check for writing on the streamer was wrong. Changed it to allow all logged users. + +- Popover position for arabic languages ([#23888](https://github.com/RocketChat/Rocket.Chat/pull/23888)) + +- Removing Edit message from messageBox on room changed ([#23910](https://github.com/RocketChat/Rocket.Chat/pull/23910)) + + Removing edit message from messageBox and local storage on messageBox destroyed. + +- Segmentation fault on CentOS 7 due to outdated `sharp` ([#23796](https://github.com/RocketChat/Rocket.Chat/pull/23796)) + + Upgrades `sharp` to avoid a segmentation fault on CentOS 7 during startup related to `sharp.node` being loaded via `process.dlopen()`. + + Suggested as a fix for versions `4.0.x` and `4.1.x`. + +- teams.leave client usage ([#23959](https://github.com/RocketChat/Rocket.Chat/pull/23959)) + +- teams.removeMembers client usage ([#23857](https://github.com/RocketChat/Rocket.Chat/pull/23857)) + +- Translations for App Select Settings not working ([#23908](https://github.com/RocketChat/Rocket.Chat/pull/23908)) + + Derived from PR https://github.com/RocketChat/Rocket.Chat/pull/19238 + +- Wrong button for non trial apps ([#23861](https://github.com/RocketChat/Rocket.Chat/pull/23861)) + + This PR solves a bug on the marketplace that was happening with WhatsApp where it was displaying a trial button even though it didn't have a free trial period. The new verification I've added checks if the app is subscription-based and then checks if it has 0 trial days in all of its tiers. If it does, it shows a subscribe button. If it doesn't, it displays a trial button. Also, I've exposed the itsEnterpriseOnly flag as an extra measure in the case of apps like Facebook Messenger that are enterprise-only and consequently should show the subscribe button. + Before: + ![image](https://user-images.githubusercontent.com/43561537/144687716-baef06ce-7a80-42fc-8393-b0283c0f349a.png) + After: + ![image](https://user-images.githubusercontent.com/43561537/144687924-1a3eb3a7-783f-4450-abd2-1efa0de64658.png) + +
+🔍 Minor changes + + +- Bump @rocket.chat/string-helpers from 0.29.0 to 0.30.1 in /ee/server/services ([#23526](https://github.com/RocketChat/Rocket.Chat/pull/23526) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump cookie-parser from 1.4.5 to 1.4.6 in /ee/server/services ([#23921](https://github.com/RocketChat/Rocket.Chat/pull/23921) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump mailparser from 3.2.0 to 3.4.0 ([#23466](https://github.com/RocketChat/Rocket.Chat/pull/23466) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump path-parse from 1.0.6 to 1.0.7 ([#23689](https://github.com/RocketChat/Rocket.Chat/pull/23689) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pm2 from 5.1.1 to 5.1.2 in /ee/server/services ([#23289](https://github.com/RocketChat/Rocket.Chat/pull/23289) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump thehanimo/pr-title-checker from 1.2 to 1.3.4 ([#23853](https://github.com/RocketChat/Rocket.Chat/pull/23853) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore: added last login to users.list ([#23846](https://github.com/RocketChat/Rocket.Chat/pull/23846) by [@ostjen](https://github.com/ostjen)) + +- Chore: Bump fuselage 0.31.0 ([#24046](https://github.com/RocketChat/Rocket.Chat/pull/24046)) + +- Chore: Centralize email validation functionality ([#23816](https://github.com/RocketChat/Rocket.Chat/pull/23816)) + + - Create lib for validating emails + - Modify places that validate emails to use the new central function + +- Chore: Change Menu props to accept next fuselage version ([#23839](https://github.com/RocketChat/Rocket.Chat/pull/23839)) + +- Chore: Create script to add new migrations ([#23822](https://github.com/RocketChat/Rocket.Chat/pull/23822)) + + - Create NPM script to add new migrations + - TODO: Infer next migration number from file list + +- Chore: Deleted LivechatPageVisited ([#23993](https://github.com/RocketChat/Rocket.Chat/pull/23993) by [@ostjen](https://github.com/ostjen)) + +- Chore: Enable prefer-optional-chain ESLint rule for TypeScript files ([#23786](https://github.com/RocketChat/Rocket.Chat/pull/23786)) + + > Code is bad. It rots. It requires periodic maintenance. It has bugs that need to be found. New features mean old code has to be adapted. + > The more code you have, the more places there are for bugs to hide. The longer checkouts or compiles take. The longer it takes a new employee to make sense of your system. If you have to refactor there's more stuff to move around. + > Furthermore, more code often means less flexibility and functionality. This is counter-intuitive, but a lot of times a simple, elegant solution is faster and more general than the plodding mess of code produced by a programmer of lesser talent. + > Code is produced by engineers. To make more code requires more engineers. Engineers have n^2 communication costs, and all that code they add to the system, while expanding its capability, also increases a whole basket of costs. + > You should do whatever possible to increase the productivity of individual programmers in terms of the expressive power of the code they write. Less code to do the same thing (and possibly better). Less programmers to hire. Less organizational communication costs. + + — [Rich Skrenta][1] + + Mixing two problem domains in code is prone to errors. In this small example + + ```ts + declare const y: { z: unknown } | undefined; + + const x = y && y.z; + ``` + + we're (1) checking the nullity of `y` and (2) attributing `y.z` to `x`, where (2) is _clearly_ the main problem we're solving with code. The optional chaining is a good technique to handle nullity as a mere implementation detail: + + ```ts + declare const y: { z: unknown } | undefined; + + const x = y?.z; + ``` + + Attributing `y.z` to `x` is more easily readable than the nullity check of `y`. + + This PR aims to add `@typescript-eslint/prefer-optional-chain` rule to ESlint configuration at warning level. + +- Chore: Fix hasRole warning ([#23914](https://github.com/RocketChat/Rocket.Chat/pull/23914)) + +- Chore: Remove the `mobile-download-file` permission ([#23996](https://github.com/RocketChat/Rocket.Chat/pull/23996)) + + - Remove the `mobile-download-file` permission and its descriptions. + +- Chore: Replace new typography ([#23756](https://github.com/RocketChat/Rocket.Chat/pull/23756)) + +- Chore: Replace typography ([#24021](https://github.com/RocketChat/Rocket.Chat/pull/24021)) + +- Chore: Update Apps-Engine to latest ([#24045](https://github.com/RocketChat/Rocket.Chat/pull/24045)) + +- Chore: update docker image base to latest node 12 patch ([#23875](https://github.com/RocketChat/Rocket.Chat/pull/23875)) + +- Chore: Update Livechat ([#23913](https://github.com/RocketChat/Rocket.Chat/pull/23913)) + +- Chore: Update pino deps ([#23922](https://github.com/RocketChat/Rocket.Chat/pull/23922)) + +- Chore: Use only LivechatTriggerRaw model ([#23974](https://github.com/RocketChat/Rocket.Chat/pull/23974)) + +- i18n: Language update from LingoHub 🤖 on 2021-12-06Z ([#23873](https://github.com/RocketChat/Rocket.Chat/pull/23873)) + +- i18n: Language update from LingoHub 🤖 on 2021-12-13Z ([#23930](https://github.com/RocketChat/Rocket.Chat/pull/23930)) + +- i18n: Language update from LingoHub 🤖 on 2021-12-20Z ([#23991](https://github.com/RocketChat/Rocket.Chat/pull/23991)) + +- i18n: Language update from LingoHub 🤖 on 2021-12-27Z ([#24030](https://github.com/RocketChat/Rocket.Chat/pull/24030)) + +- Merge master into develop & Set version to 4.3.0-develop ([#23827](https://github.com/RocketChat/Rocket.Chat/pull/23827)) + +- Regression: Add migration for omni rooms with no source ([#24012](https://github.com/RocketChat/Rocket.Chat/pull/24012)) + + Add a migration to add source property to all the omnichannel rooms which don't have it yet. All these rooms will have source type as `other` + +- Regression: Add optional chaining to possibly undefined fields ([#24033](https://github.com/RocketChat/Rocket.Chat/pull/24033)) + +- Regression: addAction verification breaking rooms ([#24019](https://github.com/RocketChat/Rocket.Chat/pull/24019)) + +- Regression: Ensure room action buttons only appear inside menu ([#24035](https://github.com/RocketChat/Rocket.Chat/pull/24035)) + + Currently, action buttons registered by apps to appear in the ROOM_ACTION context show in the first position of the list, but since they don't have an icon they are effectively invisible in the tab bar. + + Here we change the order configuration of the button so we make sure it only shows inside the room menu + +- Regression: Fix omnichannel empty source usage ([#24008](https://github.com/RocketChat/Rocket.Chat/pull/24008)) + +- Regression: Let Meteor.absoluteUrl.defaultOptions.rootUrl as baseURI ([#24009](https://github.com/RocketChat/Rocket.Chat/pull/24009)) + +- Regression: Missing padding in popover with custom template ([#23877](https://github.com/RocketChat/Rocket.Chat/pull/23877)) + + ![Screen Shot 2021-12-06 at 14 16 40](https://user-images.githubusercontent.com/27704687/144891474-a5bf982e-56af-46df-b472-adf9d999ce02.png) + +- Regression: Remove dangling console.log ([#24034](https://github.com/RocketChat/Rocket.Chat/pull/24034)) + + A empty array have been printed to console due to a promise chained to `console.log` and `console.error` calls, probably for debugging purposes. + +- Regression: Remove self from fallback departments dropdown ([#24018](https://github.com/RocketChat/Rocket.Chat/pull/24018)) + +- Regression: Toolbox render item ([#23862](https://github.com/RocketChat/Rocket.Chat/pull/23862)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Aman-Maheshwari](https://github.com/Aman-Maheshwari) +- [@aswinidev](https://github.com/aswinidev) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@goyome](https://github.com/goyome) +- [@ostjen](https://github.com/ostjen) +- [@qwertiko](https://github.com/qwertiko) +- [@rafaelblink](https://github.com/rafaelblink) +- [@sidmohanty11](https://github.com/sidmohanty11) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@AllanPazRibeiro](https://github.com/AllanPazRibeiro) +- [@KevLehman](https://github.com/KevLehman) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@cauefcr](https://github.com/cauefcr) +- [@d-gubert](https://github.com/d-gubert) +- [@debdutdeb](https://github.com/debdutdeb) +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@ggazzo](https://github.com/ggazzo) +- [@juliajforesti](https://github.com/juliajforesti) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rique223](https://github.com/rique223) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@thassiov](https://github.com/thassiov) +- [@tiagoevanp](https://github.com/tiagoevanp) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 4.2.2 +`2021-12-14 · 1 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.28.1` + +### 🐛 Bug fixes + + +- creating room with federated member ([#23347](https://github.com/RocketChat/Rocket.Chat/pull/23347) by [@qwertiko](https://github.com/qwertiko)) + +
+🔍 Minor changes + + +- Release 4.2.2 ([#23940](https://github.com/RocketChat/Rocket.Chat/pull/23940) by [@qwertiko](https://github.com/qwertiko)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@qwertiko](https://github.com/qwertiko) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) + +# 4.2.1 +`2021-12-10 · 4 🐛 · 2 🔍 · 8 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.28.1` + +### 🐛 Bug fixes + + +- Error when creating an inactive user in admin panel ([#23859](https://github.com/RocketChat/Rocket.Chat/pull/23859)) + + - Fix `usersInRole` array used to send email to activate a user. + +- Segmentation fault on CentOS 7 due to outdated `sharp` ([#23796](https://github.com/RocketChat/Rocket.Chat/pull/23796)) + + Upgrades `sharp` to avoid a segmentation fault on CentOS 7 during startup related to `sharp.node` being loaded via `process.dlopen()`. + + Suggested as a fix for versions `4.0.x` and `4.1.x`. + +- teams.removeMembers client usage ([#23857](https://github.com/RocketChat/Rocket.Chat/pull/23857)) + +- Wrong button for non trial apps ([#23861](https://github.com/RocketChat/Rocket.Chat/pull/23861)) + + This PR solves a bug on the marketplace that was happening with WhatsApp where it was displaying a trial button even though it didn't have a free trial period. The new verification I've added checks if the app is subscription-based and then checks if it has 0 trial days in all of its tiers. If it does, it shows a subscribe button. If it doesn't, it displays a trial button. Also, I've exposed the itsEnterpriseOnly flag as an extra measure in the case of apps like Facebook Messenger that are enterprise-only and consequently should show the subscribe button. + Before: + ![image](https://user-images.githubusercontent.com/43561537/144687716-baef06ce-7a80-42fc-8393-b0283c0f349a.png) + After: + ![image](https://user-images.githubusercontent.com/43561537/144687924-1a3eb3a7-783f-4450-abd2-1efa0de64658.png) + +
+🔍 Minor changes + + +- Chore: Update Livechat ([#23913](https://github.com/RocketChat/Rocket.Chat/pull/23913)) + +- Release 4.2.1 ([#23917](https://github.com/RocketChat/Rocket.Chat/pull/23917)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@dougfabris](https://github.com/dougfabris) +- [@ggazzo](https://github.com/ggazzo) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@rique223](https://github.com/rique223) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 4.2.0 +`2021-11-30 · 9 🎉 · 7 🚀 · 26 🐛 · 27 🔍 · 24 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.28.1` + +### 🎉 New features + + +- Allow Omnichannel statistics to be collected. ([#23694](https://github.com/RocketChat/Rocket.Chat/pull/23694)) + + This PR adds the possibility for business stakeholders to see what is actually being used of the Omnichannel integrations. + +- Allow registering by REG_TOKEN environment variable ([#23737](https://github.com/RocketChat/Rocket.Chat/pull/23737)) + + You can provide the REG_TOKEN environment variable containing a registration token and it will automatically register to your cloud account. This simplifies the registration flow + +- Audio and Video calling in Livechat ([#23004](https://github.com/RocketChat/Rocket.Chat/pull/23004) by [@Deepak-learner](https://github.com/Deepak-learner) & [@dhruvjain99](https://github.com/dhruvjain99)) + +- Enable LDAP manual sync to deployments without EE license ([#23761](https://github.com/RocketChat/Rocket.Chat/pull/23761)) + + Open the Enterprise LDAP API that executes background sync to be used without any Enterprise License and enforce 2FA requirements. + +- Permission for download/uploading files on mobile ([#23686](https://github.com/RocketChat/Rocket.Chat/pull/23686) by [@ostjen](https://github.com/ostjen)) + +- Permissions for interacting with Omnichannel Contact Center ([#23389](https://github.com/RocketChat/Rocket.Chat/pull/23389)) + + Adds a new permission, one that allows for control over user access to Omnichannel Contact Center, + +- Rate limiting for user registering ([#23732](https://github.com/RocketChat/Rocket.Chat/pull/23732) by [@ostjen](https://github.com/ostjen)) + +- REST endpoints to manage Omnichannel Business Units ([#23750](https://github.com/RocketChat/Rocket.Chat/pull/23750)) + + Basic documentation about endpoints can be found at https://www.postman.com/kaleman960/workspace/rocketchat-public-api/request/3865466-71502450-8c8f-42b4-8954-1cd3d01fcb0c + +- Show on-hold metrics on analytics pages and current chats ([#23498](https://github.com/RocketChat/Rocket.Chat/pull/23498)) + +### 🚀 Improvements + + +- Allow override of default department for SMS Livechat sessions ([#23626](https://github.com/RocketChat/Rocket.Chat/pull/23626) by [@bhardwajaditya](https://github.com/bhardwajaditya)) + +- Engagement Dashboard ([#23547](https://github.com/RocketChat/Rocket.Chat/pull/23547)) + + - Adds helpers `onToggledFeature` for server and client code to handle license activation/deactivation without server restart; + - Replaces usage of `useEndpointData` with `useQuery` (from [React Query](https://react-query.tanstack.com/)); + - Introduces `view-engagement-dashboard` permission. + +- Improve the add user drop down for add a user in create channel modal for UserAutoCompleteMultiple ([#23766](https://github.com/RocketChat/Rocket.Chat/pull/23766) by [@Jeanstaquet](https://github.com/Jeanstaquet)) + + Seeing only the name of the person you are not adding is not practical in my opinion because two people can have the same name. Moreover, you can't see the username of the person you want to add in the dropdown. So I changed that and created another selection of users to show the username as well. I made this change so that it would appear in the key place for creating a room and adding a user. + + Before: + + https://user-images.githubusercontent.com/45966964/115287805-faac8d00-a150-11eb-871f-147ab011ced0.mp4 + + + After: + + https://user-images.githubusercontent.com/45966964/115287664-d2249300-a150-11eb-8cf6-0e04730b425d.mp4 + +- MKP12 - New UI - Merge Apps and Marketplace Tabs and Content ([#23542](https://github.com/RocketChat/Rocket.Chat/pull/23542)) + + Merged the Marketplace and Apps page into a single page with a tabs component that changes between Markeplace and installed apps. + ![page merging](https://user-images.githubusercontent.com/43561537/138516558-f86d62e6-1a5c-4817-a229-a1b876323960.gif) + +- Re-naming department query param for Twilio ([#23725](https://github.com/RocketChat/Rocket.Chat/pull/23725)) + + Since the endpoint supports both, department ID and department Name, so we're renaming it to reflect the same. `departmentName` -> `department` + +- Reduce complexity in some functions ([#23387](https://github.com/RocketChat/Rocket.Chat/pull/23387)) + + Overhauls all places where eslint's `complexity` rule is disabled. + +- Stricter API types ([#23735](https://github.com/RocketChat/Rocket.Chat/pull/23735)) + + It: + - Adds stricter types for `API`; + - Enables types for `urlParams`; + - Removes mandatory passage of `undefined` payload on client; + - Corrects some regressions; + - Reassures my belief in TypeScript supremacy. + +### 🐛 Bug fixes + + +- "to users" not working in export message ([#23576](https://github.com/RocketChat/Rocket.Chat/pull/23576) by [@ostjen](https://github.com/ostjen)) + +- **ENTERPRISE:** OAuth "Merge Roles" removes roles from users ([#23588](https://github.com/RocketChat/Rocket.Chat/pull/23588)) + + - Fix OAuth "Merge Roles": the "Merge Roles" option now synchronize only the roles described in the "**Roles to Sync**" setting available in each Custom OAuth settings' group (instead of replacing users' roles by their OAuth roles); + - Fix "Merge Roles" and "Channel Mapping" not being performed/updated on OAuth login. + +- **ENTERPRISE:** Private rooms and discussions can't be audited ([#23673](https://github.com/RocketChat/Rocket.Chat/pull/23673)) + + - Add Private rooms (groups) and Discussions to the Message Auditing (Channels) autocomplete; + - Update "Channels" tab name to "Rooms". + +- **ENTERPRISE:** Replace all occurrences of a placeholder on string instead of just first one ([#23703](https://github.com/RocketChat/Rocket.Chat/pull/23703)) + +- Advanced LDAP Sync Features ([#23608](https://github.com/RocketChat/Rocket.Chat/pull/23608)) + +- App update flow failing in HA setups ([#23607](https://github.com/RocketChat/Rocket.Chat/pull/23607)) + + The flow for app updates is broken in specific scenarios with HA setups. Here we change the method calls in the Apps-Engine to avoid race conditions + +- Apps scheduler "losing" jobs after server restart ([#23566](https://github.com/RocketChat/Rocket.Chat/pull/23566)) + + If a job is scheduled and the server restarted, said job won't be executed, giving the impression it's been lost. + + What happens is that the scheduler is only started when some app tries to schedule an app - if that happens, all jobs that are "late" will be executed; if that doesn't happen, no job will run. + + This PR starts the apps scheduler right after all apps have been loaded + +- Autofocus on search input in admin ([#23738](https://github.com/RocketChat/Rocket.Chat/pull/23738)) + + Removed "generic" autofocus on sidenav template. + +- Await promise to handle error when attempting to transfer a room ([#23739](https://github.com/RocketChat/Rocket.Chat/pull/23739)) + +- broken avatar preview when changing avatar ([#23659](https://github.com/RocketChat/Rocket.Chat/pull/23659) by [@Aman-Maheshwari](https://github.com/Aman-Maheshwari)) + +- Discussions created inside discussions ([#23733](https://github.com/RocketChat/Rocket.Chat/pull/23733)) + +- Fix typo in FR translation ([#23711](https://github.com/RocketChat/Rocket.Chat/pull/23711) by [@Cormoran96](https://github.com/Cormoran96)) + +- Fixed E2E default room settings not being honoured ([#23468](https://github.com/RocketChat/Rocket.Chat/pull/23468) by [@TheDigitalEagle](https://github.com/TheDigitalEagle) & [@ostjen](https://github.com/ostjen)) + +- LDAP users being disabled when an AD security policy is enabled ([#23820](https://github.com/RocketChat/Rocket.Chat/pull/23820)) + +- LDAP users not being re-activated on login ([#23627](https://github.com/RocketChat/Rocket.Chat/pull/23627)) + +- Missing user roles in edit user tab ([#23734](https://github.com/RocketChat/Rocket.Chat/pull/23734)) + +- New specific endpoint for contactChatHistoryMessages with right permissions ([#23533](https://github.com/RocketChat/Rocket.Chat/pull/23533)) + + Anyone with 'View Omnichannel Rooms' permission can see the History Messages. + +- Notifications are not being filtered ([#23487](https://github.com/RocketChat/Rocket.Chat/pull/23487)) + + - Add a migration to update the `Accounts_Default_User_Preferences_pushNotifications` setting's value to the `Accounts_Default_User_Preferences_mobileNotifications` setting's value; + - Remove the `Accounts_Default_User_Preferences_mobileNotifications` setting (replaced by `Accounts_Default_User_Preferences_pushNotifications`); + - Rename 'mobileNotifications' user's preference to 'pushNotifications'. + +- Omnichannel business hours page breaking navigation ([#23595](https://github.com/RocketChat/Rocket.Chat/pull/23595) by [@Aman-Maheshwari](https://github.com/Aman-Maheshwari)) + +- Omnichannel contact center navigation ([#23691](https://github.com/RocketChat/Rocket.Chat/pull/23691)) + + Derives from: https://github.com/RocketChat/Rocket.Chat/pull/23656 + + This PR includes a different approach to solving navigation problems following the same code structure and UI definitions of other "ActionButtons" components in Sidebar. + +- Omnichannel status being changed on page refresh ([#23587](https://github.com/RocketChat/Rocket.Chat/pull/23587)) + +- Omnichannel webhooks can't be saved ([#23641](https://github.com/RocketChat/Rocket.Chat/pull/23641) by [@Aman-Maheshwari](https://github.com/Aman-Maheshwari)) + +- Performance issues when running Omnichannel job queue dispatcher ([#23661](https://github.com/RocketChat/Rocket.Chat/pull/23661)) + +- PhotoSwipe crashing on show ([#23499](https://github.com/RocketChat/Rocket.Chat/pull/23499)) + + Waits for initial content to load before showing it. + +- Prevent UserAction.addStream without Subscription ([#23705](https://github.com/RocketChat/Rocket.Chat/pull/23705)) + + When you take an Omnichannel chat from queue, the guest's typing information will appear. + +- Registration not possible when any user is blocked for multiple failed logins ([#23565](https://github.com/RocketChat/Rocket.Chat/pull/23565) by [@ostjen](https://github.com/ostjen)) + +
+🔍 Minor changes + + +- Chore: add `no-bidi` rule ([#23695](https://github.com/RocketChat/Rocket.Chat/pull/23695)) + +- Chore: add index on appId + associations for apps_persistence collection ([#23675](https://github.com/RocketChat/Rocket.Chat/pull/23675)) + +- Chore: Api definitions ([#23701](https://github.com/RocketChat/Rocket.Chat/pull/23701)) + +- Chore: Bump Rocket.Chat@livechat to 1.10 ([#23768](https://github.com/RocketChat/Rocket.Chat/pull/23768)) + +- Chore: Convert Fiber models to async Step 1 ([#23633](https://github.com/RocketChat/Rocket.Chat/pull/23633)) + +- Chore: Generic Table ([#23745](https://github.com/RocketChat/Rocket.Chat/pull/23745)) + +- Chore: Mocha testing configuration ([#23706](https://github.com/RocketChat/Rocket.Chat/pull/23706)) + + We've been writing integration tests for the REST API quite regularly, but we can't say the same for UI-related modules. This PR is based on the assumption that _improving the developer experience on writing tests_ would increase our coverage and promote the adoption even for newcomers. + + Here as summary of the proposal: + + - Change Mocha configuration files: + - Add a base configuration (`.mocharc.base.json`); + - Rename the configuration for REST API tests (`mocha_end_to_end.opts.js -> .mocharc.api.js`); + - Add a configuration for client modules (`.mocharc.client.js`); + - Enable ESLint for them. + - Add a Mocha test command exclusive for client modules (`npm run testunit-client`); + - Enable fast watch mode: + - Configure `ts-node` to only transpile code (skip type checking); + - Define a list of files to be watched. + - Configure `mocha` environment on ESLint only for test files (required when using Mocha's globals); + - Adopt Chai as our assertion library: + - Unify the setup of Chai plugins (`chai-spies`, `chai-datetime`, `chai-dom`); + - Replace `assert` with `chai`; + - Replace `chai.expect` with `expect`. + - Enable integration tests with React components: + - Enable JSX support on our default Babel configuration; + - Adopt [testing library](https://testing-library.com/). + +- Chore: Rearrange module typings ([#23452](https://github.com/RocketChat/Rocket.Chat/pull/23452)) + + - Move all external module declarations (definitions and augmentations) to `/definition/externals`; + - ~Symlink some modules on `/definition/externals` to `/ee/server/services/definition/externals`~ Share types with `/ee/server/services`; + - Use TypeScript as server code entrypoint. + +- Chore: Remove duplicated 'name' key from rate limiter logs ([#23771](https://github.com/RocketChat/Rocket.Chat/pull/23771)) + +- Chore: Remove useCallbacks ([#23696](https://github.com/RocketChat/Rocket.Chat/pull/23696)) + +- Chore: Type omnichannel models ([#23758](https://github.com/RocketChat/Rocket.Chat/pull/23758)) + +- Chore: Update settings.ts ([#23769](https://github.com/RocketChat/Rocket.Chat/pull/23769)) + +- i18n: Language update from LingoHub 🤖 on 2021-11-01Z ([#23603](https://github.com/RocketChat/Rocket.Chat/pull/23603)) + +- i18n: Language update from LingoHub 🤖 on 2021-11-29Z ([#23812](https://github.com/RocketChat/Rocket.Chat/pull/23812)) + +- Merge master into develop & Set version to 4.2.0-develop ([#23586](https://github.com/RocketChat/Rocket.Chat/pull/23586)) + +- Regression: Units endpoint to TS ([#23757](https://github.com/RocketChat/Rocket.Chat/pull/23757)) + +- Regression: "When is the chat busier" and "Users by time of day" charts are not working ([#23815](https://github.com/RocketChat/Rocket.Chat/pull/23815)) + + - Fix "When is the chat busier" (Hours) and "Users by time of day" charts, which weren't displaying any data; + +- Regression: Add @rocket.chat/emitter to EE services ([#23802](https://github.com/RocketChat/Rocket.Chat/pull/23802)) + +- Regression: Add trash to raw models ([#23774](https://github.com/RocketChat/Rocket.Chat/pull/23774)) + +- Regression: Current Chats not Filtering ([#23803](https://github.com/RocketChat/Rocket.Chat/pull/23803)) + +- Regression: Fix incorrect API path for livechat calls ([#23778](https://github.com/RocketChat/Rocket.Chat/pull/23778)) + +- Regression: Fix LDAP sync route ([#23775](https://github.com/RocketChat/Rocket.Chat/pull/23775)) + +- Regression: Fix sendMessagesToAdmins not in Fiber ([#23770](https://github.com/RocketChat/Rocket.Chat/pull/23770)) + +- Regression: Fix sort param on omnichannel endpoints ([#23789](https://github.com/RocketChat/Rocket.Chat/pull/23789)) + +- Regression: Improve AggregationCursor types ([#23692](https://github.com/RocketChat/Rocket.Chat/pull/23692)) + +- Regression: Include files on EE services build ([#23793](https://github.com/RocketChat/Rocket.Chat/pull/23793)) + +- Regression: Mark Livechat WebRTC video calling as alpha ([#23813](https://github.com/RocketChat/Rocket.Chat/pull/23813)) + + ![image](https://user-images.githubusercontent.com/34130764/143832378-82b99a72-23e8-4115-8b28-a0d210de598b.png) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Aman-Maheshwari](https://github.com/Aman-Maheshwari) +- [@Cormoran96](https://github.com/Cormoran96) +- [@Deepak-learner](https://github.com/Deepak-learner) +- [@Jeanstaquet](https://github.com/Jeanstaquet) +- [@TheDigitalEagle](https://github.com/TheDigitalEagle) +- [@bhardwajaditya](https://github.com/bhardwajaditya) +- [@dhruvjain99](https://github.com/dhruvjain99) +- [@ostjen](https://github.com/ostjen) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@cauefcr](https://github.com/cauefcr) +- [@d-gubert](https://github.com/d-gubert) +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 4.1.2 +`2021-11-08 · 3 🐛 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.28.1` + +### 🐛 Bug fixes + + +- Notifications are not being filtered ([#23487](https://github.com/RocketChat/Rocket.Chat/pull/23487)) + + - Add a migration to update the `Accounts_Default_User_Preferences_pushNotifications` setting's value to the `Accounts_Default_User_Preferences_mobileNotifications` setting's value; + - Remove the `Accounts_Default_User_Preferences_mobileNotifications` setting (replaced by `Accounts_Default_User_Preferences_pushNotifications`); + - Rename 'mobileNotifications' user's preference to 'pushNotifications'. + +- Omnichannel status being changed on page refresh ([#23587](https://github.com/RocketChat/Rocket.Chat/pull/23587)) + +- Performance issues when running Omnichannel job queue dispatcher ([#23661](https://github.com/RocketChat/Rocket.Chat/pull/23661)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@renatobecker](https://github.com/renatobecker) + +# 4.1.1 +`2021-11-05 · 4 🐛 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.28.1` + +### 🐛 Bug fixes + + +- Advanced LDAP Sync Features ([#23608](https://github.com/RocketChat/Rocket.Chat/pull/23608)) + +- App update flow failing in HA setups ([#23607](https://github.com/RocketChat/Rocket.Chat/pull/23607)) + + The flow for app updates is broken in specific scenarios with HA setups. Here we change the method calls in the Apps-Engine to avoid race conditions + +- LDAP users not being re-activated on login ([#23627](https://github.com/RocketChat/Rocket.Chat/pull/23627)) + +- Security Hotfix (https://docs.rocket.chat/guides/security/security-updates) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 4.1.0 +`2021-10-28 · 1 🎉 · 4 🚀 · 25 🐛 · 38 🔍 · 23 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.28.0` + +### 🎉 New features + + +- Stream to get individual presence updates ([#22950](https://github.com/RocketChat/Rocket.Chat/pull/22950)) + +### 🚀 Improvements + + +- Add markdown to custom fields in user Info ([#20947](https://github.com/RocketChat/Rocket.Chat/pull/20947)) + + Added markdown to custom fields to render links + +- Allow Omnichannel to handle huge queues ([#23392](https://github.com/RocketChat/Rocket.Chat/pull/23392)) + +- Make Livechat Instructions setting multi-line ([#23515](https://github.com/RocketChat/Rocket.Chat/pull/23515)) + + Since now we're supporting markdown text on this field (via this PR - https://github.com/RocketChat/Rocket.Chat.Livechat/pull/648), it would be nice to make this setting multiline so users can have more space to edit the text + ![image](https://user-images.githubusercontent.com/34130764/138146712-13e4968b-5312-4d53-b44c-b5699c5e49c1.png) + +- optimized groups.listAll response time ([#22941](https://github.com/RocketChat/Rocket.Chat/pull/22941) by [@ostjen](https://github.com/ostjen)) + + groups.listAll endpoint was having performance issues, specially when the total number of groups was high. This happened because the endpoint was loading all objects in memory then using splice to paginate, instead of paginating beforehand. + + Considering 70k groups, this was the performance improvement: + + before + ![image](https://user-images.githubusercontent.com/28611993/129601314-bdf89337-79fa-4446-9f44-95264af4adb3.png) + + after + ![image](https://user-images.githubusercontent.com/28611993/129601358-5872e166-f923-4c1c-b21d-eb9507365ecf.png) + +### 🐛 Bug fixes + + +- **APPS:** Communication problem when updating and uninstalling apps in cluster ([#23418](https://github.com/RocketChat/Rocket.Chat/pull/23418)) + + - Make the hook responsible for receiving app update events inside a cluster fetch the app's package (zip file) in the correct place. + - Also shows a warning message on uninstalls inside a cluster. As there are many servers writing to the same place, some race conditions may occur. This prevents problems related to terminating the process in the middle due to errors being thrown and leaving the server in a faulty state. + +- **ENTERPRISE:** Omnichannel agent is not leaving the room when a forwarded chat is queued ([#23404](https://github.com/RocketChat/Rocket.Chat/pull/23404)) + +- Admins can't update or reset user avatars when the "Allow User Avatar Change" setting is off ([#23228](https://github.com/RocketChat/Rocket.Chat/pull/23228)) + + - Allow admins (or any other user with the `edit-other-user-avatar` permission) to update or reset user avatars even when the "Allow User Avatar Change" setting is off. + +- Attachment buttons overlap in mobile view ([#23377](https://github.com/RocketChat/Rocket.Chat/pull/23377) by [@Aman-Maheshwari](https://github.com/Aman-Maheshwari)) + +- Avoid last admin deactivate itself ([#22949](https://github.com/RocketChat/Rocket.Chat/pull/22949) by [@ostjen](https://github.com/ostjen)) + + Co-authored-by: @Kartik18g + +- BigBlueButton integration error due to missing file import ([#23366](https://github.com/RocketChat/Rocket.Chat/pull/23366) by [@wolbernd](https://github.com/wolbernd)) + + Fixes BigBlueButton integration + +- Delay start of email inbox ([#23521](https://github.com/RocketChat/Rocket.Chat/pull/23521)) + +- imported migration v240 ([#23374](https://github.com/RocketChat/Rocket.Chat/pull/23374) by [@ostjen](https://github.com/ostjen)) + +- LDAP not stoping after wrong password ([#23382](https://github.com/RocketChat/Rocket.Chat/pull/23382)) + +- Markdown quote message style ([#23462](https://github.com/RocketChat/Rocket.Chat/pull/23462)) + + Before: + ![image](https://user-images.githubusercontent.com/17487063/137496669-3abecab4-cf90-45cb-8b1b-d9411a5682dd.png) + + After: + ![image](https://user-images.githubusercontent.com/17487063/137496905-fd727f90-f707-4ec6-8139-ba2eb1a2146e.png) + +- MONGO_OPTIONS being ignored for oplog connection ([#23314](https://github.com/RocketChat/Rocket.Chat/pull/23314) by [@cuonghuunguyen](https://github.com/cuonghuunguyen)) + +- MongoDB deprecation link ([#23381](https://github.com/RocketChat/Rocket.Chat/pull/23381)) + +- OAuth login not working on mobile app ([#23541](https://github.com/RocketChat/Rocket.Chat/pull/23541)) + +- Omni-Webhook's retry mechanism going in infinite loop ([#23394](https://github.com/RocketChat/Rocket.Chat/pull/23394)) + +- Prevent starting Omni-Queue if Omnichannel is disabled ([#23396](https://github.com/RocketChat/Rocket.Chat/pull/23396)) + + Whenever the Routing system setting changes, and omnichannel is disabled, then we shouldn't start the queue. + +- Queue error handling and unlocking behavior ([#23522](https://github.com/RocketChat/Rocket.Chat/pull/23522)) + +- Read only description in team creation ([#23213](https://github.com/RocketChat/Rocket.Chat/pull/23213)) + + ![image](https://user-images.githubusercontent.com/27704687/133608433-8ca788a3-71a8-4d40-8c40-8156ab03c606.png) + + ![image](https://user-images.githubusercontent.com/27704687/133608400-4cdc7a67-95e5-46c6-8c65-29ab107cd314.png) + +- resumeToken not working ([#23379](https://github.com/RocketChat/Rocket.Chat/pull/23379)) + +- Rewrite missing webRTC feature ([#23172](https://github.com/RocketChat/Rocket.Chat/pull/23172)) + +- SAML Users' roles being reset to default on login ([#23411](https://github.com/RocketChat/Rocket.Chat/pull/23411)) + + - Remove `roles` field update on `insertOrUpdateSAMLUser` function; + - Add SAML `syncRoles` event; + +- Server crashing when Routing method is not available at start ([#23473](https://github.com/RocketChat/Rocket.Chat/pull/23473)) + +- unwanted toastr error message when deleting user ([#23372](https://github.com/RocketChat/Rocket.Chat/pull/23372) by [@ostjen](https://github.com/ostjen)) + +- useEndpointAction replace by useEndpointActionExperimental ([#23469](https://github.com/RocketChat/Rocket.Chat/pull/23469)) + +- user/agent upload not working via Apps Engine after 3.16.0 ([#23393](https://github.com/RocketChat/Rocket.Chat/pull/23393)) + + Fixes #22974 + +- Users' `roles` and `type` being reset to default on LDAP DataSync ([#23378](https://github.com/RocketChat/Rocket.Chat/pull/23378)) + + - Update `roles` and `type` fields only if they are specified in the data imported from LDAP (otherwise, no changes are applied). + +
+🔍 Minor changes + + +- Bump url-parse from 1.4.7 to 1.5.3 ([#23376](https://github.com/RocketChat/Rocket.Chat/pull/23376) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump: fuselage 0.30.1 ([#23391](https://github.com/RocketChat/Rocket.Chat/pull/23391)) + +- Chore: clean README ([#23342](https://github.com/RocketChat/Rocket.Chat/pull/23342) by [@AbhJ](https://github.com/AbhJ)) + +- Chore: Document REST API endpoints (banners) ([#23361](https://github.com/RocketChat/Rocket.Chat/pull/23361)) + + Describes endpoints for banners on REST API using a JSDoc annotation compatible with OpenAPI spec. + +- Chore: Document REST API endpoints (DNS) ([#23405](https://github.com/RocketChat/Rocket.Chat/pull/23405)) + + Describes endpoints for DNS on REST API using a JSDoc annotation compatible with OpenAPI spec. + +- Chore: Document REST API endpoints (E2E) ([#23430](https://github.com/RocketChat/Rocket.Chat/pull/23430)) + + Describes endpoints for end-to-end encryption on REST API using a JSDoc annotation compatible with OpenAPI spec. + +- Chore: Document REST API endpoints (Misc) ([#23428](https://github.com/RocketChat/Rocket.Chat/pull/23428)) + + Describes miscellaneous endpoints on REST API using a JSDoc annotation compatible with OpenAPI spec. + +- Chore: Ensure all permissions are created up to this point ([#23514](https://github.com/RocketChat/Rocket.Chat/pull/23514)) + +- Chore: Fix some TS warnings ([#23524](https://github.com/RocketChat/Rocket.Chat/pull/23524)) + +- Chore: Fixed a Typo in 11-admin.js test ([#23355](https://github.com/RocketChat/Rocket.Chat/pull/23355) by [@badbart](https://github.com/badbart)) + +- Chore: Improve watch OAuth settings logic ([#23505](https://github.com/RocketChat/Rocket.Chat/pull/23505)) + + Just prevent to perform 200 deletions for registers that not even exist + +- Chore: Make omnichannel settings dependent on omnichannel being enabled ([#23495](https://github.com/RocketChat/Rocket.Chat/pull/23495)) + +- Chore: Migrate some React components/hooks to TypeScript ([#23370](https://github.com/RocketChat/Rocket.Chat/pull/23370)) + + Just low-hanging fruits. + +- Chore: Move `addMinutesToADate` helper ([#23490](https://github.com/RocketChat/Rocket.Chat/pull/23490)) + +- Chore: Move `isEmail` helper ([#23489](https://github.com/RocketChat/Rocket.Chat/pull/23489)) + +- Chore: Move `isJSON` helper ([#23491](https://github.com/RocketChat/Rocket.Chat/pull/23491)) + +- Chore: Move components away from /app/ ([#23360](https://github.com/RocketChat/Rocket.Chat/pull/23360)) + + We currently do NOT recommend placing React components under `/app`. + +- Chore: Partially migrate 2FA client code to TypeScript ([#23419](https://github.com/RocketChat/Rocket.Chat/pull/23419)) + + Additionally, hides `toastr` behind an module to handle UI's toast notifications. + +- Chore: Remove dangling README file ([#23385](https://github.com/RocketChat/Rocket.Chat/pull/23385)) + + Removes the elderly `server/restapi/README.md`. + +- Chore: Replace `promises` helper ([#23488](https://github.com/RocketChat/Rocket.Chat/pull/23488)) + +- Chore: Startup Time ([#23210](https://github.com/RocketChat/Rocket.Chat/pull/23210)) + + The settings logic has been improved as a whole. + + All the logic to get the data from the env var was confusing. + + Setting default values was tricky to understand. + + Every time the server booted, all settings were updated and callbacks were called 2x or more (horrible for environments with multiple instances and generating a turbulent startup). + + `Settings.get(......, callback);` was deprecated. We now have better methods for each case. + +- Chore: Update Apps-Engine version ([#23375](https://github.com/RocketChat/Rocket.Chat/pull/23375)) + +- Chore: Update Livechat Package ([#23523](https://github.com/RocketChat/Rocket.Chat/pull/23523)) + +- Chore: Update pino and pino-pretty ([#23510](https://github.com/RocketChat/Rocket.Chat/pull/23510)) + +- Chore: Upgrade Storybook ([#23364](https://github.com/RocketChat/Rocket.Chat/pull/23364)) + +- i18n: Language update from LingoHub 🤖 on 2021-10-18Z ([#23486](https://github.com/RocketChat/Rocket.Chat/pull/23486)) + +- Merge master into develop & Set version to 4.1.0-develop ([#23362](https://github.com/RocketChat/Rocket.Chat/pull/23362)) + +- Regression: Debounce call based on params on omnichannel queue dispatch ([#23577](https://github.com/RocketChat/Rocket.Chat/pull/23577)) + +- Regression: Fix enterprise setting validation ([#23519](https://github.com/RocketChat/Rocket.Chat/pull/23519)) + +- Regression: Fix user typings style ([#23511](https://github.com/RocketChat/Rocket.Chat/pull/23511)) + +- Regression: Mail body contains `undefined` text ([#23552](https://github.com/RocketChat/Rocket.Chat/pull/23552)) + + ### Before + ![image](https://user-images.githubusercontent.com/2263066/138733018-10449892-5c2d-46fb-9355-00e98e0d6c9f.png) + + ### After + ![image](https://user-images.githubusercontent.com/2263066/138733074-a1b88a77-bf64-41c3-a6c3-ac9e1cb63de1.png) + +- Regression: Prevent settings from getting updated ([#23556](https://github.com/RocketChat/Rocket.Chat/pull/23556)) + +- Regression: Prevent Settings Unit Test Error ([#23506](https://github.com/RocketChat/Rocket.Chat/pull/23506)) + +- Regression: Routing method not available when called from listeners at startup ([#23568](https://github.com/RocketChat/Rocket.Chat/pull/23568)) + +- Regression: Settings order ([#23528](https://github.com/RocketChat/Rocket.Chat/pull/23528)) + +- Regression: Waiting_queue setting not being applied due to missing module key ([#23531](https://github.com/RocketChat/Rocket.Chat/pull/23531)) + +- Regression: watchByRegex without Fibers ([#23529](https://github.com/RocketChat/Rocket.Chat/pull/23529)) + +- Update the community open call link in README ([#23497](https://github.com/RocketChat/Rocket.Chat/pull/23497)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@AbhJ](https://github.com/AbhJ) +- [@Aman-Maheshwari](https://github.com/Aman-Maheshwari) +- [@badbart](https://github.com/badbart) +- [@cuonghuunguyen](https://github.com/cuonghuunguyen) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@ostjen](https://github.com/ostjen) +- [@wolbernd](https://github.com/wolbernd) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@Sing-Li](https://github.com/Sing-Li) +- [@d-gubert](https://github.com/d-gubert) +- [@dougfabris](https://github.com/dougfabris) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@thassiov](https://github.com/thassiov) +- [@tiagoevanp](https://github.com/tiagoevanp) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 4.0.5 +`2021-10-25 · 1 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.28.0` + +### 🐛 Bug fixes + + +- OAuth login not working on mobile app ([#23541](https://github.com/RocketChat/Rocket.Chat/pull/23541)) + +
+🔍 Minor changes + + +- Release 4.0.5 ([#23554](https://github.com/RocketChat/Rocket.Chat/pull/23554)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 4.0.4 +`2021-10-21 · 2 🐛 · 1 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.28.0` + +### 🐛 Bug fixes + + +- Queue error handling and unlocking behavior ([#23522](https://github.com/RocketChat/Rocket.Chat/pull/23522)) + +- SAML Users' roles being reset to default on login ([#23411](https://github.com/RocketChat/Rocket.Chat/pull/23411)) + + - Remove `roles` field update on `insertOrUpdateSAMLUser` function; + - Add SAML `syncRoles` event; + +
+🔍 Minor changes + + +- Release 4.0.4 ([#23532](https://github.com/RocketChat/Rocket.Chat/pull/23532)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 4.0.3 +`2021-10-18 · 2 🐛 · 1 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.28.0` + +### 🐛 Bug fixes + + +- **APPS:** Communication problem when updating and uninstalling apps in cluster ([#23418](https://github.com/RocketChat/Rocket.Chat/pull/23418)) + + - Make the hook responsible for receiving app update events inside a cluster fetch the app's package (zip file) in the correct place. + - Also shows a warning message on uninstalls inside a cluster. As there are many servers writing to the same place, some race conditions may occur. This prevents problems related to terminating the process in the middle due to errors being thrown and leaving the server in a faulty state. + +- Server crashing when Routing method is not available at start ([#23473](https://github.com/RocketChat/Rocket.Chat/pull/23473)) + +
+🔍 Minor changes + + +- Release 4.0.3 ([#23496](https://github.com/RocketChat/Rocket.Chat/pull/23496)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@thassiov](https://github.com/thassiov) + +# 4.0.2 +`2021-10-14 · 4 🐛 · 1 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.28.0` + +### 🐛 Bug fixes + + +- **ENTERPRISE:** Omnichannel agent is not leaving the room when a forwarded chat is queued ([#23404](https://github.com/RocketChat/Rocket.Chat/pull/23404)) + +- Attachment buttons overlap in mobile view ([#23377](https://github.com/RocketChat/Rocket.Chat/pull/23377) by [@Aman-Maheshwari](https://github.com/Aman-Maheshwari)) + +- Prevent starting Omni-Queue if Omnichannel is disabled ([#23396](https://github.com/RocketChat/Rocket.Chat/pull/23396)) + + Whenever the Routing system setting changes, and omnichannel is disabled, then we shouldn't start the queue. + +- user/agent upload not working via Apps Engine after 3.16.0 ([#23393](https://github.com/RocketChat/Rocket.Chat/pull/23393)) + + Fixes #22974 + +
+🔍 Minor changes + + +- Release 4.0.2 ([#23460](https://github.com/RocketChat/Rocket.Chat/pull/23460) by [@Aman-Maheshwari](https://github.com/Aman-Maheshwari)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Aman-Maheshwari](https://github.com/Aman-Maheshwari) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@murtaza98](https://github.com/murtaza98) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 4.0.1 +`2021-10-06 · 7 🐛 · 2 🔍 · 7 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.28.0` + +### 🐛 Bug fixes + + +- BigBlueButton integration error due to missing file import ([#23366](https://github.com/RocketChat/Rocket.Chat/pull/23366) by [@wolbernd](https://github.com/wolbernd)) + + Fixes BigBlueButton integration + +- imported migration v240 ([#23374](https://github.com/RocketChat/Rocket.Chat/pull/23374) by [@ostjen](https://github.com/ostjen)) + +- LDAP not stoping after wrong password ([#23382](https://github.com/RocketChat/Rocket.Chat/pull/23382)) + +- MongoDB deprecation link ([#23381](https://github.com/RocketChat/Rocket.Chat/pull/23381)) + +- resumeToken not working ([#23379](https://github.com/RocketChat/Rocket.Chat/pull/23379)) + +- unwanted toastr error message when deleting user ([#23372](https://github.com/RocketChat/Rocket.Chat/pull/23372) by [@ostjen](https://github.com/ostjen)) + +- Users' `roles` and `type` being reset to default on LDAP DataSync ([#23378](https://github.com/RocketChat/Rocket.Chat/pull/23378)) + + - Update `roles` and `type` fields only if they are specified in the data imported from LDAP (otherwise, no changes are applied). + +
+🔍 Minor changes + + +- Chore: Update Apps-Engine version ([#23375](https://github.com/RocketChat/Rocket.Chat/pull/23375)) + +- Release 4.0.1 ([#23386](https://github.com/RocketChat/Rocket.Chat/pull/23386) by [@ostjen](https://github.com/ostjen) & [@wolbernd](https://github.com/wolbernd)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@ostjen](https://github.com/ostjen) +- [@wolbernd](https://github.com/wolbernd) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 4.0.0 +`2021-10-01 · 15 ️️️⚠️ · 4 🎉 · 11 🚀 · 24 🐛 · 67 🔍 · 26 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0` +- Apps-Engine: `1.28.0-alpha.5428` + +### ⚠️ BREAKING CHANGES + + +- **ENTERPRISE:** "Download CSV" button doesn't work in the Engagement Dashboard's Active Users section ([#23013](https://github.com/RocketChat/Rocket.Chat/pull/23013)) + + - Fix "Download CSV" button in the Engagement Dashboard's Active Users section; + - Add column headers to the CSV file downloaded from the Engagement Dashboard's Active Users section; + - Split the data in multiple CSV files. + +- **ENTERPRISE:** CSV file downloaded in the Engagement Dashboard's New Users section contains undefined data ([#23014](https://github.com/RocketChat/Rocket.Chat/pull/23014)) + + - Fix CSV file downloaded in the Engagement Dashboard's New Users section; + - Add column headers to the CSV file downloaded from the Engagement Dashboard's New Users section. + +- **ENTERPRISE:** Missing headers in CSV files downloaded from the Engagement Dashboard ([#23223](https://github.com/RocketChat/Rocket.Chat/pull/23223)) + + - Add headers to all CSV files downloaded from the "Messages" and "Channels" tabs from the Engagement Dashboard; + - Add headers to the CSV file downloaded from the "Users by time of day" section (in the "Users" tab). + +- LDAP Refactoring ([#23171](https://github.com/RocketChat/Rocket.Chat/pull/23171)) + +- Moved advanced oAuth features to EE ([#23201](https://github.com/RocketChat/Rocket.Chat/pull/23201) by [@ostjen](https://github.com/ostjen)) + +- Moved role-sync and advanced SAML settings to EE ([#23107](https://github.com/RocketChat/Rocket.Chat/pull/23107) by [@ostjen](https://github.com/ostjen)) + +- Moved SAML custom field map to EE ([#23319](https://github.com/RocketChat/Rocket.Chat/pull/23319) by [@ostjen](https://github.com/ostjen)) + +- Remove cordova compatibility setting ([#23302](https://github.com/RocketChat/Rocket.Chat/pull/23302) by [@ostjen](https://github.com/ostjen)) + +- Remove deprecated endpoints ([#23162](https://github.com/RocketChat/Rocket.Chat/pull/23162)) + + The following REST endpoints were removed: + + - `/api/v1/emoji-custom` + - `/api/v1/info` + - `/api/v1/permissions` + - `/api/v1/permissions.list` + + The following Real time API Methods were removed: + + - `getFullUserData` + - `getServerInfo` + - `livechat:saveOfficeHours` + +- Remove Google Vision features ([#23160](https://github.com/RocketChat/Rocket.Chat/pull/23160)) + + Google Vision features like "block adult images" or label detection were not being maintained and totally broken. So we decided to remove its feature and maybe in the future release the same features as an app. + +- Remove old migrations up to version 2.4.14 ([#23277](https://github.com/RocketChat/Rocket.Chat/pull/23277)) + + To update to version 4.0.0 you'll need to be running at least version 3.0.0, otherwise you might loose some database migrations which might have unexpected effects. + + This aims to clean up the code, since upgrades jumping 2 major versions are too risky and hard to maintain, we'll keep only migration from that last major (in this case 3.x). + +- Remove patch info from endpoint /api/info for non-logged in users ([#16050](https://github.com/RocketChat/Rocket.Chat/pull/16050)) + +- Removed support of MongoDB 3.4; Deprecated MongoDB 3.6 and 4.0 ([#22907](https://github.com/RocketChat/Rocket.Chat/pull/22907) by [@ostjen](https://github.com/ostjen)) + +- Stop sending audio notifications via stream ([#23108](https://github.com/RocketChat/Rocket.Chat/pull/23108)) + + Remove audio preferences and make them tied to desktop notification preferences. + + TL;DR: new message sounds will play only if you receive a desktop notification. you'll still be able to chose to not play any sound though + +- Webhook will fail if user is not part of the channel ([#23310](https://github.com/RocketChat/Rocket.Chat/pull/23310)) + + Remove deprecated behavior added by https://github.com/RocketChat/Rocket.Chat/pull/18024 that accepts webhook integrations sending messages even if the user is not part of the channel. + + Starting from 4.0.0 the webhook request will fail with `error-not-allowed` error: + + ``` + {"success":false,"error":"error-not-allowed"} + ``` + +### 🎉 New features + + +- **APPS:** Get livechat's room transcript via bridge method ([#22985](https://github.com/RocketChat/Rocket.Chat/pull/22985)) + + Adds a new method for retrieving a room's transcript via a new method in the Livechat bridge + +- Add activity indicators for Uploading and Recording using new API; Support thread context; Deprecate the old typing API ([#22392](https://github.com/RocketChat/Rocket.Chat/pull/22392) by [@sumukhah](https://github.com/sumukhah)) + +- Omnichannel source identification fields ([#23090](https://github.com/RocketChat/Rocket.Chat/pull/23090)) + + This PR adds new fields to the room schema that aids in the identification of the source that created an Omnichannel room, which can be either via livechat widget, SMS, app, etc. + +- Seats Cap ([#23017](https://github.com/RocketChat/Rocket.Chat/pull/23017) by [@g-thome](https://github.com/g-thome)) + + - Adding New Members + - Awareness of seats usage while adding new members + - Seats Cap about to be reached + - Seats Cap reached + - Request more seats + - Warning Admins + - System telling admins max seats are about to exceed + - System telling admins max seats were exceed + - Metric on Info Page + - Request more seats + - Warning Members + - Invite link + - Block creating new invite links + - Block existing invite links (feedback on register process) + - Register to Workspaces + - Emails + - System telling admins max seats are about to exceed + - System telling admins max seats were exceed + +### 🚀 Improvements + + +- **APPS:** New storage strategy for Apps-Engine file packages ([#22657](https://github.com/RocketChat/Rocket.Chat/pull/22657)) + + This is an enabler for our initiative to support NPM packages in the Apps-Engine. + + Currently, the packages (zip files) for Rocket.Chat Apps are stored as a base64 encoded string in a document in the database, which constrains us due to the size limit of a document in MongoDB (16Mb). + + When we allow apps to include NPM packages, the size of the App package itself will be potentially _very large_ (I'm looking at you `node_modules`). Thus we'll be changing the strategy to store apps either with GridFS or the host's File System itself. + +- **APPS:** Return task ids when using the scheduler api ([#23023](https://github.com/RocketChat/Rocket.Chat/pull/23023)) + + In the methods that create tasks (`scheduleRecurring` and `scheduleOnce`) return the `id` of the document created in the database so the user can cancel each task individually. + +- Add missing pt-BR translations, fix typos and unify language ([#23176](https://github.com/RocketChat/Rocket.Chat/pull/23176) by [@gabrieloliverio](https://github.com/gabrieloliverio)) + +- Better text for auth banner ([#23256](https://github.com/RocketChat/Rocket.Chat/pull/23256) by [@g-thome](https://github.com/g-thome)) + + Change the text in the banner warning for auth changes + +- Canned response admin settings ([#23190](https://github.com/RocketChat/Rocket.Chat/pull/23190)) + +- Change log format to JSON ([#22975](https://github.com/RocketChat/Rocket.Chat/pull/22975)) + +- Change occurences of Livechat to Omnichannel in ES translations were applicable ([#23199](https://github.com/RocketChat/Rocket.Chat/pull/23199)) + +- Do not re-create General room on every server start ([#22957](https://github.com/RocketChat/Rocket.Chat/pull/22957)) + + - Check the `Show_Setup_Wizard` Setting's value to control whether the general room should be created. This channel will only be created if the `Show_Setup_Wizard` Setting is 'pending'. + +- Load code highlighting languages on demand and fixes on new message parser ([#23232](https://github.com/RocketChat/Rocket.Chat/pull/23232)) + + Now we have this setting called 'Code highlighting languages list' where you can define the languages that you want to be loaded by default. + +- Throw error if no appId is provided to useUIKitHandleAction ([#23221](https://github.com/RocketChat/Rocket.Chat/pull/23221)) + +- Use PaginatedSelectFiltered in department edition ([#23054](https://github.com/RocketChat/Rocket.Chat/pull/23054)) + +### 🐛 Bug fixes + + +- "Parent channel or group" search in discussions' creation throws "Unexpected end of JSON input" error ([#23076](https://github.com/RocketChat/Rocket.Chat/pull/23076)) + + - Use `encodeURIComponent()` to encode values received by `_generateQueryFromParams()`. + +- "Read Only" and "Allow Reacting" system messages are missing in rooms ([#23037](https://github.com/RocketChat/Rocket.Chat/pull/23037) by [@ostjen](https://github.com/ostjen)) + + - Add system message to notify changes on the **"Read Only"** setting; + - Add system message to notify changes on the **"Allow Reacting"** setting; + - Fix "Allow Reacting" setting's description (updated from "Only authorized users can write new messages" to "Only authorized users can react to messages"). + ![system-messages](https://user-images.githubusercontent.com/36537004/130883527-9eb47fcd-c8e5-41fb-af34-5d99bd0a6780.PNG) + +- Add check before placing chat on-hold to confirm that contact sent last message ([#23053](https://github.com/RocketChat/Rocket.Chat/pull/23053)) + +- Add missing custom fields to apps' users converter ([#21176](https://github.com/RocketChat/Rocket.Chat/pull/21176) by [@cuonghuunguyen](https://github.com/cuonghuunguyen)) + +- Avoid bots to be marked as unavailable when log off/login ([#23262](https://github.com/RocketChat/Rocket.Chat/pull/23262)) + +- Can't edit profile information if any field update setting is disabled ([#23110](https://github.com/RocketChat/Rocket.Chat/pull/23110)) + + - Check which fields have been updated before throwing errors in `validateUserEditing`. + +- Inaccurate use of 'Mobile notifications' instead of 'Push notifications' in i18n strings ([#22978](https://github.com/RocketChat/Rocket.Chat/pull/22978) by [@ostjen](https://github.com/ostjen)) + + - Fix inaccurate use of 'Mobile notifications' (which is misleading in German) by 'Push notifications'; + - Update `'Notification_Mobile_Default_For'` key to `'Notification_Push_Default_For'` (and text to 'Send Push Notifications For' for English Language); + - Update `'Accounts_Default_User_Preferences_mobileNotifications'` key to `'Accounts_Default_User_Preferences_pushNotifications'`; + - Update `'Mobile_Notifications_Default_Alert'` key to `'Mobile_Push_Notifications_Default_Alert'`; + +- Logging out from other clients ([#23276](https://github.com/RocketChat/Rocket.Chat/pull/23276)) + +- Mark agents as unavailable when they logout ([#23219](https://github.com/RocketChat/Rocket.Chat/pull/23219)) + +- Modals is cutting pixels of the content ([#23243](https://github.com/RocketChat/Rocket.Chat/pull/23243)) + + Fuselage Dependency: [543](https://github.com/RocketChat/Rocket.Chat.Fuselage/pull/543) + ![image](https://user-images.githubusercontent.com/27704687/134049227-3cd1deed-34ba-454f-a95e-e99b79a7a7b9.png) + +- Omnichannel On hold chats being forwarded to offline agents ([#23185](https://github.com/RocketChat/Rocket.Chat/pull/23185)) + +- Omnichannel transcript button without user's email ([#23150](https://github.com/RocketChat/Rocket.Chat/pull/23150)) + +- Prevent users to edit an existing role when adding a new one with the same name used before. ([#22407](https://github.com/RocketChat/Rocket.Chat/pull/22407) by [@lucassartor](https://github.com/lucassartor)) + + ### before + ![Peek 2021-07-13 16-31](https://user-images.githubusercontent.com/27704687/125513721-953d84f4-1c95-45ca-80e1-b00992b874f6.gif) + + ### after + ![Peek 2021-07-13 16-34](https://user-images.githubusercontent.com/27704687/125514098-91ee8014-51e5-4c62-9027-5538acf57d08.gif) + +- Remove doubled "Canned Responses" strings ([#23056](https://github.com/RocketChat/Rocket.Chat/pull/23056)) + + - Remove doubled canned response setting introduced in #22703 (by setting id change); + - Update "Canned Responses" keys to "Canned_Responses". + +- Remove margin from quote inside quote ([#21779](https://github.com/RocketChat/Rocket.Chat/pull/21779)) + + ![image](https://user-images.githubusercontent.com/17487063/116253926-4a89e600-a747-11eb-9172-f2ed1245fa1b.png) + +- Save department agents ([#23209](https://github.com/RocketChat/Rocket.Chat/pull/23209)) + +- Sidebar not closing when clicking in Home or Directory on mobile view ([#23218](https://github.com/RocketChat/Rocket.Chat/pull/23218)) + + ### Additional fixed + - Merge Burger menu components into a single component + - Show a badge with no-read messages in the Burger Button: + ![image](https://user-images.githubusercontent.com/27704687/133679378-20fea2c0-4ac1-4b4e-886e-45154cc6afea.png) + - remove useSidebarClose hook + +- Stop queue when Omnichannel is disabled or the routing method does not support it ([#23261](https://github.com/RocketChat/Rocket.Chat/pull/23261)) + + - Add missing key logs + - Stop queue (and logs) when livechat is disabled or when routing method does not support queue + - Stop ignoring offline bot agents from delegation (previously, if a bot was offline, even with "Assign new conversations to bot agent" enabled, bot will be ignored and chat will be left in limbo (since bot was assigned, but offline). + +- Toolbox click not working on Safari(iOS) ([#23244](https://github.com/RocketChat/Rocket.Chat/pull/23244)) + +- transfer message when tranferring room by Apps Engine ([#23074](https://github.com/RocketChat/Rocket.Chat/pull/23074) by [@cuonghuunguyen](https://github.com/cuonghuunguyen)) + +- Update bugsnag package ([#23104](https://github.com/RocketChat/Rocket.Chat/pull/23104)) + +- User list not being updated after creation/deletion of user ([#23032](https://github.com/RocketChat/Rocket.Chat/pull/23032) by [@ostjen](https://github.com/ostjen)) + +- Wrap canned-responses endpoints with ee license ([#23204](https://github.com/RocketChat/Rocket.Chat/pull/23204)) + +- Wrong docs link on Omni-Webhook page ([#23117](https://github.com/RocketChat/Rocket.Chat/pull/23117)) + +
+🔍 Minor changes + + +- Bump @rocket.chat/string-helpers from 0.27.0 to 0.29.0 in /ee/server/services ([#23138](https://github.com/RocketChat/Rocket.Chat/pull/23138) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @storybook/react from 6.3.6 to 6.3.8 ([#23165](https://github.com/RocketChat/Rocket.Chat/pull/23165) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/cookie from 0.4.0 to 0.4.1 in /ee/server/services ([#22600](https://github.com/RocketChat/Rocket.Chat/pull/22600) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/ejson from 2.1.2 to 2.1.3 in /ee/server/services ([#23126](https://github.com/RocketChat/Rocket.Chat/pull/23126) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/express from 4.17.12 to 4.17.13 in /ee/server/services ([#22598](https://github.com/RocketChat/Rocket.Chat/pull/22598) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/imap from 0.8.34 to 0.8.35 ([#23122](https://github.com/RocketChat/Rocket.Chat/pull/23122) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump @types/ws from 7.4.6 to 7.4.7 in /ee/server/services ([#23095](https://github.com/RocketChat/Rocket.Chat/pull/23095) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump actions/stale from 3.0.19 to 4 ([#22673](https://github.com/RocketChat/Rocket.Chat/pull/22673) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump csv-parse from 4.16.0 to 4.16.3 ([#23120](https://github.com/RocketChat/Rocket.Chat/pull/23120) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump ejson from 2.2.1 to 2.2.2 in /ee/server/services ([#23236](https://github.com/RocketChat/Rocket.Chat/pull/23236) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump iconv-lite from 0.4.24 to 0.6.3 ([#22527](https://github.com/RocketChat/Rocket.Chat/pull/22527) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump image-size from 0.6.3 to 1.0.0 ([#22528](https://github.com/RocketChat/Rocket.Chat/pull/22528) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump ip-range-check from 0.0.2 to 0.2.0 ([#22532](https://github.com/RocketChat/Rocket.Chat/pull/22532) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump jsrsasign from 10.3.0 to 10.4.0 ([#23163](https://github.com/RocketChat/Rocket.Chat/pull/23163) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump juice from 5.2.0 to 8.0.0 ([#22177](https://github.com/RocketChat/Rocket.Chat/pull/22177) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump object-path from 0.11.5 to 0.11.6 ([#23088](https://github.com/RocketChat/Rocket.Chat/pull/23088) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump pm2 from 5.1.0 to 5.1.1 in /ee/server/services ([#23128](https://github.com/RocketChat/Rocket.Chat/pull/23128) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump stylelint-order from 2.2.1 to 4.1.0 ([#22036](https://github.com/RocketChat/Rocket.Chat/pull/22036) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump supertest from 6.1.3 to 6.1.6 ([#23139](https://github.com/RocketChat/Rocket.Chat/pull/23139) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump tar from 6.1.0 to 6.1.11 in /ee/server/services ([#23068](https://github.com/RocketChat/Rocket.Chat/pull/23068) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump xml-crypto from 2.1.2 to 2.1.3 ([#23141](https://github.com/RocketChat/Rocket.Chat/pull/23141) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore: Change Ubuntu version to 20.04 on all GitHub Actions ([#23200](https://github.com/RocketChat/Rocket.Chat/pull/23200)) + +- Chore: client endpoints typings ([#23152](https://github.com/RocketChat/Rocket.Chat/pull/23152)) + +- Chore: Convert VerticalBar component to typescript ([#22542](https://github.com/RocketChat/Rocket.Chat/pull/22542)) + +- Chore: Environmental variable for marketplace url ([#22922](https://github.com/RocketChat/Rocket.Chat/pull/22922)) + +- Chore: Make SMTP empty on docker-compose so registration won't hang out of the box ([#23255](https://github.com/RocketChat/Rocket.Chat/pull/23255)) + +- Chore: Move client helpers ([#23178](https://github.com/RocketChat/Rocket.Chat/pull/23178)) + + Moves helper modules under `app/` to `client/lib/utils/`. + +- Chore: Re-enable session tests on local after removal of mongo-unit ([#23263](https://github.com/RocketChat/Rocket.Chat/pull/23263)) + +- Chore: Remove non-used dependencies ([#23109](https://github.com/RocketChat/Rocket.Chat/pull/23109)) + +- Chore: Remove wrong usages of `Meteor.wrapAsync` ([#23079](https://github.com/RocketChat/Rocket.Chat/pull/23079)) + +- Chore: Update Livechat widget to 1.9.4 ([#23198](https://github.com/RocketChat/Rocket.Chat/pull/23198)) + +- Chore: Update pino and pino-pretty ([#23269](https://github.com/RocketChat/Rocket.Chat/pull/23269)) + +- Chore: Update pino and pino-pretty ([#23157](https://github.com/RocketChat/Rocket.Chat/pull/23157)) + +- Chore: Upgrade limax ([#23187](https://github.com/RocketChat/Rocket.Chat/pull/23187)) + + Upgrades `limax` for faster slugify algorithm. + +- i18n: Language update from LingoHub 🤖 on 2021-08-30Z ([#23061](https://github.com/RocketChat/Rocket.Chat/pull/23061)) + +- i18n: Language update from LingoHub 🤖 on 2021-09-06Z ([#23123](https://github.com/RocketChat/Rocket.Chat/pull/23123)) + +- i18n: Language update from LingoHub 🤖 on 2021-09-13Z ([#23184](https://github.com/RocketChat/Rocket.Chat/pull/23184)) + +- Merge master into develop & Set version to 4.0.0 ([#23086](https://github.com/RocketChat/Rocket.Chat/pull/23086)) + +- Regression: "Join" button not working ([#23320](https://github.com/RocketChat/Rocket.Chat/pull/23320)) + +- Regression: `renderEmoji` helper referred as a template ([#23212](https://github.com/RocketChat/Rocket.Chat/pull/23212)) + +- Regression: Add default value when no cookies are present ([#23318](https://github.com/RocketChat/Rocket.Chat/pull/23318)) + +- Regression: Blank screen in Jitsi video calls ([#23322](https://github.com/RocketChat/Rocket.Chat/pull/23322)) + + - Fix Jitsi calls being disposed even when "Open in new window" setting is disabled; + - Fix misspelling on `CallJitsWithData.js` file name. + +- Regression: Create new loggers based on server log level ([#23297](https://github.com/RocketChat/Rocket.Chat/pull/23297)) + +- Regression: Fix app storage migration ([#23286](https://github.com/RocketChat/Rocket.Chat/pull/23286)) + + The previous version of this migration didn't take into consideration apps that were installed prior to [Rocket.Chat@3.8.0](https://github.com/RocketChat/Rocket.Chat/releases/tag/3.8.0), which [removed the typescript compiler from the server](https://github.com/RocketChat/Rocket.Chat/pull/18687) and into the CLI. As a result, the zip files inside each installed app's document in the database had typescript files in them instead of the now required javascript files. + + As the new strategy of source code storage for apps changes the way the app is loaded, those zip files containing the source code are read everytime the app is started (or [in this particular case, updated](https://github.com/RocketChat/Rocket.Chat/pull/23286/files#diff-caf9f7a22478639e58d6514be039140a42ce1ab2d999c3efe5678c38ee36d0ccR43)), and as the zips' contents were wrong, the operation was failing. + + The fix extract the data from old apps and creates new zip files with the compiled `js` already present. + +- Regression: Fix Bugsnag not started error ([#23308](https://github.com/RocketChat/Rocket.Chat/pull/23308)) + +- Regression: Fix channel icons on queue ([#23304](https://github.com/RocketChat/Rocket.Chat/pull/23304)) + +- Regression: Fix user registration stuck ([#23254](https://github.com/RocketChat/Rocket.Chat/pull/23254)) + +- Regression: Fix view logs admin screen ([#23194](https://github.com/RocketChat/Rocket.Chat/pull/23194)) + +- Regression: invalid `call` import ([#23328](https://github.com/RocketChat/Rocket.Chat/pull/23328)) + +- Regression: invalid `call` import ([#23334](https://github.com/RocketChat/Rocket.Chat/pull/23334)) + +- Regression: LDAP Channel/Role Sync not working ([#23311](https://github.com/RocketChat/Rocket.Chat/pull/23311)) + +- Regression: LDAP Issues ([#23306](https://github.com/RocketChat/Rocket.Chat/pull/23306)) + +- Regression: LDAP Refactoring ([#23231](https://github.com/RocketChat/Rocket.Chat/pull/23231)) + +- Regression: LDAP User Data Sync not always working ([#23321](https://github.com/RocketChat/Rocket.Chat/pull/23321)) + +- Regression: LDAP: Handle base authentication and prevent crash ([#23331](https://github.com/RocketChat/Rocket.Chat/pull/23331)) + + When AD requires TLS the auth crashes the server if StartTLS is not set, the error shows at the end because the code was not waiting on this operation. + +- Regression: Log Sections not respecting Log Level setting ([#23230](https://github.com/RocketChat/Rocket.Chat/pull/23230)) + +- Regression: Missing i18n key ([#23282](https://github.com/RocketChat/Rocket.Chat/pull/23282)) + +- Regression: Properly trickle-down state from UsersPage to UsersTable ([#23196](https://github.com/RocketChat/Rocket.Chat/pull/23196)) + + Spotted by @gabriellsh. + +- Regression: Removed exclusive tests statement ([#23333](https://github.com/RocketChat/Rocket.Chat/pull/23333) by [@ostjen](https://github.com/ostjen)) + +- Regression: Request seats link ([#23312](https://github.com/RocketChat/Rocket.Chat/pull/23312)) + +- Regression: Request seats url ([#23317](https://github.com/RocketChat/Rocket.Chat/pull/23317)) + +- Regression: SAML identifier mapping ([#23330](https://github.com/RocketChat/Rocket.Chat/pull/23330)) + +- Regression: Seats Cap banner not being disabled if not enterprise ([#23278](https://github.com/RocketChat/Rocket.Chat/pull/23278)) + +- Regression: View Logs administration page crashing ([#23205](https://github.com/RocketChat/Rocket.Chat/pull/23205)) + + Fixes the `stdout.queue` endpoint; makes the components type-safe. + +- Regression: wrong settings order ([#23281](https://github.com/RocketChat/Rocket.Chat/pull/23281)) + +- Release 3.18.1 ([#23135](https://github.com/RocketChat/Rocket.Chat/pull/23135) by [@g-thome](https://github.com/g-thome)) + +- Release 3.18.2 ([#23338](https://github.com/RocketChat/Rocket.Chat/pull/23338)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@cuonghuunguyen](https://github.com/cuonghuunguyen) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@g-thome](https://github.com/g-thome) +- [@gabrieloliverio](https://github.com/gabrieloliverio) +- [@lucassartor](https://github.com/lucassartor) +- [@ostjen](https://github.com/ostjen) +- [@sumukhah](https://github.com/sumukhah) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@casalsgh](https://github.com/casalsgh) +- [@d-gubert](https://github.com/d-gubert) +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@thassiov](https://github.com/thassiov) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 3.18.2 +`2021-10-01 · 2 🐛 · 2 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0, 4.2` +- Apps-Engine: `1.27.1` + +### 🐛 Bug fixes + + +- Security Hotfix (https://docs.rocket.chat/guides/security/security-updates) + +- Update visitor info on email reception based on current inbox settings ([#23280](https://github.com/RocketChat/Rocket.Chat/pull/23280)) + +
+🔍 Minor changes + + +- Regression: Change some logs to new format ([#23307](https://github.com/RocketChat/Rocket.Chat/pull/23307)) + +- Release 3.18.2 ([#23338](https://github.com/RocketChat/Rocket.Chat/pull/23338)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.18.1 +`2021-09-06 · 1 🚀 · 1 🐛 · 2 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0, 4.2` +- Apps-Engine: `1.27.1` + +### 🚀 Improvements + + +- Change HTTP and Method logs to level INFO ([#23100](https://github.com/RocketChat/Rocket.Chat/pull/23100)) + +### 🐛 Bug fixes + + +- Change way emails are validated on livechat registerGuest method ([#23089](https://github.com/RocketChat/Rocket.Chat/pull/23089)) + +
+🔍 Minor changes + + +- Regression: Auth banner for EE ([#23091](https://github.com/RocketChat/Rocket.Chat/pull/23091) by [@g-thome](https://github.com/g-thome)) + + Dimisses auth banners assigned to EE admins and prevents new ones from appearing. + +- Release 3.18.1 ([#23135](https://github.com/RocketChat/Rocket.Chat/pull/23135) by [@g-thome](https://github.com/g-thome)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@g-thome](https://github.com/g-thome) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@casalsgh](https://github.com/casalsgh) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.18.0 +`2021-08-31 · 5 🎉 · 7 🚀 · 20 🐛 · 19 🔍 · 25 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0, 4.2` +- Apps-Engine: `1.27.1` + +### 🎉 New features + + +- **ENTERPRISE:** Maximum waiting time for chats in Omnichannel queue ([#22955](https://github.com/RocketChat/Rocket.Chat/pull/22955)) + + - Add new settings to support closing chats that have been too long on waiting queue + - Moved old settings to new "Queue Management" section + - Fix issue when closing a livechat room that caused client to not to know if room was open or not + +- Banner for the updates regarding authentication services ([#23055](https://github.com/RocketChat/Rocket.Chat/pull/23055) by [@g-thome](https://github.com/g-thome)) + + Add a banner to inform admins about future authentication changes. This banner targets servers that use some sort of authentication service since they're the ones which this update concerns the most. + +- Report "Read Receipts" setting on stat collector ([#23033](https://github.com/RocketChat/Rocket.Chat/pull/23033)) + +- REST endpoint to delete a DM and allow DM for two other users ([#18022](https://github.com/RocketChat/Rocket.Chat/pull/18022) by [@abrom](https://github.com/abrom)) + + [NEW] Improve DM create/delete API management + +- Separate RegEx Settings for Channels and Usernames validation ([#21937](https://github.com/RocketChat/Rocket.Chat/pull/21937) by [@aditya-mitra](https://github.com/aditya-mitra)) + + Now, there are 2 separate settings for validating names - One for **channels** and another for **usernames**. + + This change also removes the old `UTF8_Names_Validation` setting and adds 2 new settings `UTF8_User_Names_Validation` and `UTF8_Channel_Names_Validation`. + + https://user-images.githubusercontent.com/55396651/116969904-af5bb800-acd4-11eb-9fc4-dacac60cb08f.mp4 + +### 🚀 Improvements + + +- Add default permission 'start-discussion' and 'start-discussion-other-user' to app user ([#22577](https://github.com/RocketChat/Rocket.Chat/pull/22577)) + +- Create thumbnails from uploaded images ([#20907](https://github.com/RocketChat/Rocket.Chat/pull/20907)) + +- Exclude archived rooms from unread-message count ([#22515](https://github.com/RocketChat/Rocket.Chat/pull/22515) by [@nmagedman](https://github.com/nmagedman)) + +- Increase the verbosity of Omnichannel routing system debugging outputs ([#22977](https://github.com/RocketChat/Rocket.Chat/pull/22977)) + +- Rewrite File Upload Modal ([#22750](https://github.com/RocketChat/Rocket.Chat/pull/22750)) + + Image preview: + ![image](https://user-images.githubusercontent.com/40830821/127223432-dccd2182-aec0-430f-8d70-03ac88aec791.png) + + Video preview: + ![image](https://user-images.githubusercontent.com/40830821/127225982-f8b21840-0d9c-4aff-a354-16188c7ed66e.png) + + Files larger than 10mb: + ![image](https://user-images.githubusercontent.com/40830821/127222611-5265040f-a06b-4ec5-b528-89b40e6a9072.png) + +- Types from currentChatsPage.tsx ([#22967](https://github.com/RocketChat/Rocket.Chat/pull/22967)) + +- Use tag autocomplete in more places ([#22902](https://github.com/RocketChat/Rocket.Chat/pull/22902)) + + Use the proper autocomplete component for omnichannel tags, this adds proper sorting of results and better consistency. + +### 🐛 Bug fixes + + +- "Read Only" field description is incorrect when the option is checked ([#21868](https://github.com/RocketChat/Rocket.Chat/pull/21868) by [@epif4nio](https://github.com/epif4nio)) + +- "Users By Time of the Day" chart displays incorrect data for Local Timezone ([#22836](https://github.com/RocketChat/Rocket.Chat/pull/22836)) + + - Add local timezone conversion to the "Users By Time of the Day" chart in the Engagement Dashboard; + - Simplify date creations by using `endOf` and `startOf` methods. + +- Atlassian Crowd connection not working ([#22996](https://github.com/RocketChat/Rocket.Chat/pull/22996) by [@piotrkochan](https://github.com/piotrkochan)) + +- Audio recording doesn't stop in direct messages on channel switch ([#22880](https://github.com/RocketChat/Rocket.Chat/pull/22880)) + + - Cancel audio recordings on message bar destroy event. + ![test-22372](https://user-images.githubusercontent.com/36537004/128569780-d83747b0-fb9c-4dc6-9bc5-7ae573e720c8.gif) + +- Bad words falling if message is empty ([#22930](https://github.com/RocketChat/Rocket.Chat/pull/22930)) + +- Broken download link on uploaded files ([#22848](https://github.com/RocketChat/Rocket.Chat/pull/22848) by [@ostjen](https://github.com/ostjen)) + + Uploaded files had wrong download links when the deploy had a sub directory. This misbehavior was caused by the wrong usage of the rtrim method, the 2nd parameter is a list of chars, [not a string](https://www.php.net/manual/pt_BR/function.rtrim.php) (this method was inspired by php) + +- Can't access other administration menus after opening Engagement Dashboard ([#22870](https://github.com/RocketChat/Rocket.Chat/pull/22870) by [@ostjen](https://github.com/ostjen)) + +- Go command duplicating subfolder path on iframes. ([#22796](https://github.com/RocketChat/Rocket.Chat/pull/22796) by [@ostjen](https://github.com/ostjen)) + +- Manually approve new users is not applied to SAML users ([#22823](https://github.com/RocketChat/Rocket.Chat/pull/22823) by [@ostjen](https://github.com/ostjen)) + +- Production-environment dependencies ([#22868](https://github.com/RocketChat/Rocket.Chat/pull/22868)) + + `@rocket.chat/icons` was incorrectly referred as development dependency. + +- QuickActions for mobile screen ([#23016](https://github.com/RocketChat/Rocket.Chat/pull/23016)) + +- Registration not possible with TOTP and email verification ([#22778](https://github.com/RocketChat/Rocket.Chat/pull/22778) by [@ostjen](https://github.com/ostjen)) + +- Return transcript/dashboards based on timezone settings ([#22850](https://github.com/RocketChat/Rocket.Chat/pull/22850)) + + - Added new setting to manage timezones + - Applied new setting to omnichannel dashboards (realtime, analytics) [NOTE: Other dashboards aren't using this setting actually) + - Change getAnalyticsBetweenDate query to filter out system messages instead of substracting them + +- Tab margin style ([#22851](https://github.com/RocketChat/Rocket.Chat/pull/22851)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/128103848-2a25ba7e-0e59-4502-9bcd-2569cad9379a.png) + + ### after + ![image](https://user-images.githubusercontent.com/27704687/128103633-ec7b93fc-4667-4dc9-bad3-bfffaff3974e.png) + +- Threads and discussions searches don't display proper results ([#22914](https://github.com/RocketChat/Rocket.Chat/pull/22914)) + + - _Fix_ issue in discussions search (which wasn't working after a search with no results was made); + - _Improve_ discussions and threads searches: both searches (`chat.getDiscussions` and `chat.getThreadsList`) are now case insensitive (do NOT differ capital from lower letters) and match incomplete words or terms. + +- Threads List being requested more than expected ([#22879](https://github.com/RocketChat/Rocket.Chat/pull/22879)) + +- TypeError on Callout type prop ([#22790](https://github.com/RocketChat/Rocket.Chat/pull/22790) by [@hrahul2605](https://github.com/hrahul2605)) + +- User is still asked for 2FA confirmation even if it is deactivated ([#22801](https://github.com/RocketChat/Rocket.Chat/pull/22801) by [@ostjen](https://github.com/ostjen)) + +- User presence being processes even if presence monitor was disabled ([#22927](https://github.com/RocketChat/Rocket.Chat/pull/22927)) + +- users registered via third party apps bypass custom required fields ([#22396](https://github.com/RocketChat/Rocket.Chat/pull/22396) by [@g-thome](https://github.com/g-thome)) + + moves the custom fields from the initial registration form to the "pick a username" screen so that everyone is forced to fill the custom required fields + +
+🔍 Minor changes + + +- Bump: Fuselage 0.29.0 ([#23067](https://github.com/RocketChat/Rocket.Chat/pull/23067)) + +- Chore: Enable husky pre-push hook (back again) ([#22994](https://github.com/RocketChat/Rocket.Chat/pull/22994)) + +- Chore: Fix RHEL container build issue due to gpg keyserver deprecation ([#22672](https://github.com/RocketChat/Rocket.Chat/pull/22672) by [@jsm84](https://github.com/jsm84)) + + Changed gpg keyserver in RHEL Dockerfile to openpgp.org due to deprecation of the SKS keyserver network. + +- Chore: Fix typo in rtl.css ([#22431](https://github.com/RocketChat/Rocket.Chat/pull/22431) by [@eltociear](https://github.com/eltociear)) + +- Chore: Prevent new JS files being added ([#22972](https://github.com/RocketChat/Rocket.Chat/pull/22972)) + + We are moving our code base to TS, one way to help developers remember this is create a task that will notify you every time a new file is created. + +- Chore: Script to start Rocket.Chat in HA mode during development ([#22398](https://github.com/RocketChat/Rocket.Chat/pull/22398)) + + Sometimes we need to start Rocket.Chat in High-Availability mode (cluster) during development to test how a feature behaves or hunt down a bug. Currently, this involves a lot of commands with details that might be lost if you haven't done it in a while. + + This PR intends to provide a really simple way for us to start many instances of Rocket.Chat connected in a cluster. + +- Chore: Update Livechat widget to 1.9.4 ([#22990](https://github.com/RocketChat/Rocket.Chat/pull/22990)) + +- i18n: Language update from LingoHub 🤖 on 2021-08-09Z ([#22888](https://github.com/RocketChat/Rocket.Chat/pull/22888)) + +- i18n: Language update from LingoHub 🤖 on 2021-08-16Z ([#22937](https://github.com/RocketChat/Rocket.Chat/pull/22937)) + +- i18n: Language update from LingoHub 🤖 on 2021-08-23Z ([#23007](https://github.com/RocketChat/Rocket.Chat/pull/23007)) + +- Merge master into develop & Set version to 3.18.0-develop ([#22834](https://github.com/RocketChat/Rocket.Chat/pull/22834)) + +- Regression: Attachment not rendering on message ([#23046](https://github.com/RocketChat/Rocket.Chat/pull/23046)) + +- Regression: File upload name suggestion ([#22953](https://github.com/RocketChat/Rocket.Chat/pull/22953)) + + Before: + ![image](https://user-images.githubusercontent.com/40830821/129774936-ecdbe9a1-5e3f-4a0a-ad1e-6f13eb15c60b.png) + ![image](https://user-images.githubusercontent.com/40830821/129775011-fb0df01d-74e4-41ae-bb47-dcf4cc17735e.png) + + + After: + ![image](https://user-images.githubusercontent.com/40830821/129774877-928a8aa0-c003-4e57-8b33-ea6accc32774.png) + ![image](https://user-images.githubusercontent.com/40830821/129774972-d67debaf-0ce9-44fb-93cb-d7612dd18edf.png) + +- Regression: Fix creation of self-DMs ([#23015](https://github.com/RocketChat/Rocket.Chat/pull/23015)) + +- Regression: Logs were missing from Omnichannel callback methods ([#23048](https://github.com/RocketChat/Rocket.Chat/pull/23048)) + +- Regression: no-js-action bump version ([#22997](https://github.com/RocketChat/Rocket.Chat/pull/22997)) + +- Regression: readNow blocked by a invalid condition ([#22952](https://github.com/RocketChat/Rocket.Chat/pull/22952)) + +- Release 3.17.1 ([#22942](https://github.com/RocketChat/Rocket.Chat/pull/22942)) + +- Release 3.17.2 ([#23045](https://github.com/RocketChat/Rocket.Chat/pull/23045)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@abrom](https://github.com/abrom) +- [@aditya-mitra](https://github.com/aditya-mitra) +- [@eltociear](https://github.com/eltociear) +- [@epif4nio](https://github.com/epif4nio) +- [@g-thome](https://github.com/g-thome) +- [@hrahul2605](https://github.com/hrahul2605) +- [@jsm84](https://github.com/jsm84) +- [@nmagedman](https://github.com/nmagedman) +- [@ostjen](https://github.com/ostjen) +- [@piotrkochan](https://github.com/piotrkochan) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@d-gubert](https://github.com/d-gubert) +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@ggazzo](https://github.com/ggazzo) +- [@marceloschmidt](https://github.com/marceloschmidt) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@thassiov](https://github.com/thassiov) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 3.17.2 +`2021-08-26 · 3 🐛 · 1 🔍 · 5 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0, 4.2` +- Apps-Engine: `1.27.1` + +### 🐛 Bug fixes + + +- applyChatRestictions callback not working for community version ([#22839](https://github.com/RocketChat/Rocket.Chat/pull/22839) by [@Shailesh351](https://github.com/Shailesh351)) + + Building on top of https://github.com/RocketChat/Rocket.Chat/pull/22838 + +- Error getting default agent when routing system algorithm is Auto Selection ([#22976](https://github.com/RocketChat/Rocket.Chat/pull/22976)) + +- Fix Auto Selection algorithm on community edition ([#22991](https://github.com/RocketChat/Rocket.Chat/pull/22991)) + + - When using the autoselection algo on community editions, all agents were marked as unavailable due to an unapplied filter + - Fixed an issue when both user & system setting to manange EE max number of chats allowed were set to 0 + +
+🔍 Minor changes + + +- Release 3.17.2 ([#23045](https://github.com/RocketChat/Rocket.Chat/pull/23045)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Shailesh351](https://github.com/Shailesh351) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@murtaza98](https://github.com/murtaza98) +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.17.1 +`2021-08-16 · 5 🐛 · 1 🔍 · 8 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0, 4.2` +- Apps-Engine: `1.27.1` + +### 🐛 Bug fixes + + +- "Click to Join" button is not working if there are no muted users in the room ([#22871](https://github.com/RocketChat/Rocket.Chat/pull/22871)) + + - Add check to `room.muted` array so as to cover the case in which it is `undefined`; + +- Apps-Engine's scheduler failing to update run tasks ([#22882](https://github.com/RocketChat/Rocket.Chat/pull/22882)) + + [Agenda](https://github.com/agenda/agenda), the library that manages scheduling, depended on setting a job property named `nextRunAt` as `undefined` to signal whether it should be run on schedule or not. [Rocket.Chat's current Mongo driver](https://github.com/RocketChat/Rocket.Chat/pull/22399) ignores `undefined` values when updating documents and this was causing jobs to never stop running as Agenda couldn't clear that property (set them as `undefined`). + This updates Rocket.Chat's dependency on Agenda.js to point to [a fork that fixes the problem](https://github.com/RocketChat/agenda/releases/tag/3.1.2). + +- Close omnichannel conversations when agent is deactivated ([#22917](https://github.com/RocketChat/Rocket.Chat/pull/22917)) + +- Message update not working in some cases ([#22856](https://github.com/RocketChat/Rocket.Chat/pull/22856)) + +- Use correct param on saveBusinessHour method ([#22835](https://github.com/RocketChat/Rocket.Chat/pull/22835)) + +
+🔍 Minor changes + + +- Release 3.17.1 ([#22942](https://github.com/RocketChat/Rocket.Chat/pull/22942)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@d-gubert](https://github.com/d-gubert) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@murtaza98](https://github.com/murtaza98) +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@thassiov](https://github.com/thassiov) + +# 3.17.0 +`2021-07-30 · 7 🎉 · 19 🚀 · 39 🐛 · 56 🔍 · 28 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0, 4.2` +- Apps-Engine: `1.27.1` + +### 🎉 New features + + +- `roles.delete` endpoint ([#22497](https://github.com/RocketChat/Rocket.Chat/pull/22497) by [@lucassartor](https://github.com/lucassartor)) + +- Collect data about LDAP, SAML, CAS and OAuth usage. ([#22719](https://github.com/RocketChat/Rocket.Chat/pull/22719)) + +- Convert Team to Channel ([#22476](https://github.com/RocketChat/Rocket.Chat/pull/22476)) + + ![image](https://user-images.githubusercontent.com/27704687/123525502-8558bd80-d6a7-11eb-8211-12633cb3b5c6.png) + +- Federation setup ([#22208](https://github.com/RocketChat/Rocket.Chat/pull/22208) by [@g-thome](https://github.com/g-thome)) + +- Logout other user endpoint ([#22661](https://github.com/RocketChat/Rocket.Chat/pull/22661) by [@ostjen](https://github.com/ostjen)) + +- Monitoring Track messages' round trip time ([#22676](https://github.com/RocketChat/Rocket.Chat/pull/22676)) + + Track messages' roundtrip time from backend saves time to the time when received back from the oplog allowing track of oplog slowness. + Prometheus metric: `rocketchat_messages_roundtrip_time` + +- REST endpoint to remove User from Role ([#20485](https://github.com/RocketChat/Rocket.Chat/pull/20485) by [@Cosnavel](https://github.com/Cosnavel) & [@lucassartor](https://github.com/lucassartor) & [@ostjen](https://github.com/ostjen)) + +### 🚀 Improvements + + +- Canned responses ([#22703](https://github.com/RocketChat/Rocket.Chat/pull/22703) by [@rafaelblink](https://github.com/rafaelblink)) + +- Change message deletion confirmation modal to toast ([#22544](https://github.com/RocketChat/Rocket.Chat/pull/22544)) + + Changed a timed modal for a toast message + ![image](https://user-images.githubusercontent.com/40830821/124192670-0646f900-da9c-11eb-941c-9ae35421f6ef.png) + +- Configuration for indices in Apps-Engine models ([#22705](https://github.com/RocketChat/Rocket.Chat/pull/22705)) + + * Add `appId` field to the data saved by the Scheduler + * Add `appId` index to `rocketchat_apps_persistence` model + * Skip "trash collection" when deleting records from `rocketchat_apps_persistence` + * Add a new setting to control for how long we should keep logs from the apps + + ![image](https://user-images.githubusercontent.com/1810309/126246666-907f9d98-1d84-4dfe-a80a-7dd874d36fa8.png) + + + ![image](https://user-images.githubusercontent.com/1810309/126246655-2ce3cb5f-b2f5-456e-a9c4-beccd9b3ef41.png) + +- Make `shortcut` field of canned responses unique ([#22700](https://github.com/RocketChat/Rocket.Chat/pull/22700)) + +- Paginated department select on forward chat ([#22123](https://github.com/RocketChat/Rocket.Chat/pull/22123)) + + Changes the department dropdown to use the new paginated selects, allowing for searching and displaying more than 50 departments + +- Paginated multiselect for EE tags ([#22315](https://github.com/RocketChat/Rocket.Chat/pull/22315) by [@rafaelblink](https://github.com/rafaelblink)) + + This uses the paginated multiselect for the EE tags selection, allowing more than 50 tags to be shown. + +- Preview message URLs only once ([#22516](https://github.com/RocketChat/Rocket.Chat/pull/22516) by [@nmagedman](https://github.com/nmagedman)) + +- Refactor `livechat.registerGuest` function ([#22684](https://github.com/RocketChat/Rocket.Chat/pull/22684)) + +- Replace OTR Icon on Contextual Bar & Update Icons ([#22377](https://github.com/RocketChat/Rocket.Chat/pull/22377)) + + ![image](https://user-images.githubusercontent.com/27704687/122999868-2cc2b100-d385-11eb-8f30-3f34998d0b5d.png) + +- Replace remaing discussion creation modals with React modal. ([#22448](https://github.com/RocketChat/Rocket.Chat/pull/22448)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/123840524-cbe72b80-d8e4-11eb-9ddb-23a9f9d90aac.png) + + ### after + ![image](https://user-images.githubusercontent.com/27704687/123840219-74e15680-d8e4-11eb-95aa-00a990ffe0e7.png) + +- Return open room if available for visitors ([#22742](https://github.com/RocketChat/Rocket.Chat/pull/22742)) + +- Rewrite Enter Encryption Password Modal ([#22456](https://github.com/RocketChat/Rocket.Chat/pull/22456)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/123182889-bbf3c580-d466-11eb-8d4d-9cfc3d224e33.png) + + ### after + ![image](https://user-images.githubusercontent.com/27704687/123182916-cada7800-d466-11eb-96ee-850be190d419.png) + + ### Aditional Improves: + - Added a visual validation in the password field + +- Rewrite OTR modals ([#22583](https://github.com/RocketChat/Rocket.Chat/pull/22583)) + + ![image](https://user-images.githubusercontent.com/40830821/124513267-cb510800-ddb0-11eb-8165-f103029c348f.png) + ![image](https://user-images.githubusercontent.com/40830821/124513354-04897800-ddb1-11eb-96f4-41fe906ca0d7.png) + ![image](https://user-images.githubusercontent.com/40830821/124513395-1b2fcf00-ddb1-11eb-83e4-3f8f9b4676ba.png) + +- Rewrite Save Encryption Password Modal ([#22447](https://github.com/RocketChat/Rocket.Chat/pull/22447)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/122980201-c337a800-d36e-11eb-8e2b-68534cea8e1e.png) + + ### after + ![image](https://user-images.githubusercontent.com/27704687/122980409-f8dc9100-d36e-11eb-9c15-aff779c84a91.png) + +- Rewrite sidebar footer as React Component ([#22687](https://github.com/RocketChat/Rocket.Chat/pull/22687)) + +- Rewrite URL check modal ([#22540](https://github.com/RocketChat/Rocket.Chat/pull/22540)) + + ![image](https://user-images.githubusercontent.com/40830821/124157878-a3d80380-da6f-11eb-8bd8-03dffd14c658.png) + +- Sidebar icons margins ([#22498](https://github.com/RocketChat/Rocket.Chat/pull/22498)) + +- Update README.md ([#22462](https://github.com/RocketChat/Rocket.Chat/pull/22462)) + +- Wrong error message when trying to create a blocked username ([#22452](https://github.com/RocketChat/Rocket.Chat/pull/22452) by [@lucassartor](https://github.com/lucassartor)) + + When trying to create a user with a blocked username, the UI was showing generic error message that it wasn't very detailed. + + Old error message: + ![image](https://user-images.githubusercontent.com/49413772/123120080-6d203e80-d41a-11eb-8c87-64e34334c856.png) + + New error message: + ![aaa](https://user-images.githubusercontent.com/49413772/123120251-8c1ed080-d41a-11eb-8dc2-d7484923d851.PNG) + +### 🐛 Bug fixes + + +- **ENTERPRISE:** Engagement Dashboard displaying incorrect data about active users ([#22381](https://github.com/RocketChat/Rocket.Chat/pull/22381)) + + - Fix sessions' and users' grouping in the Engagement Dashboard API endpoints; + - Fix the data displayed in the charts from the "Active users", "Users by time of day" and "When is the chat busier?" sections of the Engagement Dashboard; + - Replace label used to describe the amount of Active Users in the License section of the Info page. + +- **ENTERPRISE:** Make AutoSelect algo take current agent load in consideration ([#22611](https://github.com/RocketChat/Rocket.Chat/pull/22611)) + +- **ENTERPRISE:** Race condition on Omnichannel visitor abandoned callback ([#22413](https://github.com/RocketChat/Rocket.Chat/pull/22413)) + + As you can see [here](https://github.com/RocketChat/Rocket.Chat/blob/857791c39c97b51b5b6fd3718e0c816959a81c3b/ee/app/livechat-enterprise/server/lib/Helper.js#L127) the `predictedVisitorAbandonment` flag is not set if the room object doesn't have `v.lastMessageTs` property. So we need to always make sure the `v.lastMessageTs` is set before this method is called. + + Currently the `v.lastMessageTs` is being set in [this](https://github.com/RocketChat/Rocket.Chat/blob/857791c39c97b51b5b6fd3718e0c816959a81c3b/app/livechat/server/hooks/saveLastVisitorMessageTs.js#L4) (lets call this **hook-1**) hook which has `HIGH` priority + and the `predictedVisitorAbandonment` check is inturn performed in [this](https://github.com/RocketChat/Rocket.Chat/blob/857791c39c97b51b5b6fd3718e0c816959a81c3b/ee/app/livechat-enterprise/server/hooks/setPredictedVisitorAbandonmentTime.js#L5) (let call this **hook-2**) hook which is also `HIGH` priority. + + So ideally we'd except the **hook-1** to be called b4 **hook-2**, however currently since both of them are at same priority, there is no way to control which one is executed first. Hence in this PR, I'm making the priority of **hook-2** as `MEDIUM` to keeping the priority of **hook-1** the same as b4, i.e. `HIGH`. This should make sure that the **hook-1** is always executed b4 **hook-2** + +- Admin page crashing when commit hash is null ([#22057](https://github.com/RocketChat/Rocket.Chat/pull/22057) by [@cprice-kgi](https://github.com/cprice-kgi)) + + If the commit hash happens to be null, the administration page will still attempt to slice the value and display it. This causes the admin page to not display, and essentially crash the web app. This fixes it by checking for a null value first. + +- Blank screen in message auditing DM tab ([#22763](https://github.com/RocketChat/Rocket.Chat/pull/22763) by [@ostjen](https://github.com/ostjen)) + + The DM tab in message auditing was displaying a blank screen, instead of the actual tab. + + ![image](https://user-images.githubusercontent.com/28611993/127041404-dfca7f6a-2b8b-4c15-9cbd-c6238fac0063.png) + +- Bugs in AutoCompleteDepartment ([#22414](https://github.com/RocketChat/Rocket.Chat/pull/22414)) + +- Call button is still displayed when the user doesn't have permission to use it ([#22170](https://github.com/RocketChat/Rocket.Chat/pull/22170)) + + - Hide 'Call' buttons from the tab bar for muted users; + - Display an error when a muted user attempts to enter a call using the 'Click to Join!' button. + +- Can't see full user profile on team's room ([#22355](https://github.com/RocketChat/Rocket.Chat/pull/22355)) + + ### before + ![before](https://user-images.githubusercontent.com/27704687/121966860-bbac4980-cd45-11eb-8d48-2b0457110fc7.gif) + + ### after + ![after](https://user-images.githubusercontent.com/27704687/121966870-bea73a00-cd45-11eb-9c89-ec52ac17e20f.gif) + + ### aditional fix :rocket: + - unnecessary `TeamsMembers` component removed + +- Cannot create a discussion from top left sidebar as a user ([#22618](https://github.com/RocketChat/Rocket.Chat/pull/22618) by [@lucassartor](https://github.com/lucassartor)) + + When trying to create a discussion using the top left sidebar modal with an role that don't have the `view-other-user-channels ` permission, an empty list would be shown, which is a wrong behavior. + Also, when being able to use this modal, discussions were listed as options, which is also a wrong behavior as there can't be nested discussions. + + This PR looks to fix both these issues. + + **Old behavior:** + ![old](https://user-images.githubusercontent.com/49413772/124960017-3c333280-dff2-11eb-86cd-b2638311517e.png) + + **New behavior:** + ![image](https://user-images.githubusercontent.com/49413772/124958882-05a8e800-dff1-11eb-8203-b34a4f1c98a0.png) + +- Channel is automatically getting added to the first option in move to team feature ([#22670](https://github.com/RocketChat/Rocket.Chat/pull/22670) by [@ostjen](https://github.com/ostjen)) + +- Channels or Teams deleted are not removed from the sidebar. ([#22613](https://github.com/RocketChat/Rocket.Chat/pull/22613) by [@ostjen](https://github.com/ostjen)) + +- Checks the list of agents if at least one is online ([#22584](https://github.com/RocketChat/Rocket.Chat/pull/22584)) + +- Confirm owner change process when deleting own account ([#22609](https://github.com/RocketChat/Rocket.Chat/pull/22609)) + +- Content-Security-Policy ignoring CDN configuration ([#22791](https://github.com/RocketChat/Rocket.Chat/pull/22791) by [@nmagedman](https://github.com/nmagedman)) + +- Create discussion modal - cancel button and invite users alignment ([#22718](https://github.com/RocketChat/Rocket.Chat/pull/22718) by [@ostjen](https://github.com/ostjen)) + + Changes in "open discussion" modal + + > Added cancel button + > Fixed alignment in invite user + + + ![image](https://user-images.githubusercontent.com/28611993/126388304-6ac76574-6924-426e-843d-afd53dc1c874.png) + +- crush in the getChannelHistory method ([#22667](https://github.com/RocketChat/Rocket.Chat/pull/22667) by [@MaestroArt](https://github.com/MaestroArt)) + +- Deleting own account asks for the username in the UI instead of the password ([#22405](https://github.com/RocketChat/Rocket.Chat/pull/22405)) + +- Emoji not rendered on attachments description ([#22437](https://github.com/RocketChat/Rocket.Chat/pull/22437)) + +- Error in permission check for getLivechatDepartmentByNameOrId method in Apps ([#22545](https://github.com/RocketChat/Rocket.Chat/pull/22545)) + + Update the Apps-Engine with a fix for the permission check on the `getLivechatDepartmentByNameOrId` method + +- Livechat apps permission error ([#22511](https://github.com/RocketChat/Rocket.Chat/pull/22511)) + + Updated Apps-Engine version fixes errors with apps using livechat features. + +- Livechat config endpoint is not returning all settings ([#22686](https://github.com/RocketChat/Rocket.Chat/pull/22686)) + +- Livechat webhook request without headers ([#22589](https://github.com/RocketChat/Rocket.Chat/pull/22589)) + +- Markdown for UiKit blocks ([#22619](https://github.com/RocketChat/Rocket.Chat/pull/22619)) + +- Omnichannel - Fix issue with modals on room preview mode. ([#22541](https://github.com/RocketChat/Rocket.Chat/pull/22541)) + +- Omnichannel/Twilio - When a file is sent as first message, chat is not queued ([#22590](https://github.com/RocketChat/Rocket.Chat/pull/22590)) + +- Prune messages not applying the user filter ([#22506](https://github.com/RocketChat/Rocket.Chat/pull/22506)) + +- Put title into AutocompleteDepartment components ([#22417](https://github.com/RocketChat/Rocket.Chat/pull/22417)) + + Dependencies: https://github.com/RocketChat/Rocket.Chat.Fuselage/pull/475 + +- Quote message not working for Livechat visitors ([#22586](https://github.com/RocketChat/Rocket.Chat/pull/22586)) + + ### Before: + ![image](https://user-images.githubusercontent.com/34130764/124583613-de2b1180-de70-11eb-82aa-18564b317626.png) + ### After: + ![image](https://user-images.githubusercontent.com/34130764/124583775-12063700-de71-11eb-8ab5-b0169fac2d40.png) + +- Redirect to login after delete own account ([#22499](https://github.com/RocketChat/Rocket.Chat/pull/22499)) + + Redirect the user to login after delete own account + + ### Aditional fixes: + - Visual issue in password input on Delete Own Account Modal + + ### before + ![image](https://user-images.githubusercontent.com/27704687/123711503-f5ea1080-d846-11eb-96aa-8ed638ca665c.png) + + ### after + ![image](https://user-images.githubusercontent.com/27704687/123711336-b3c0cf00-d846-11eb-9408-a686d8668ba5.png) + +- Remove stack traces from Meteor errors when debug setting is disabled ([#22699](https://github.com/RocketChat/Rocket.Chat/pull/22699)) + + - Fix 'not iterable' errors in the `normalizeMessage` function; + - Remove stack traces from errors thrown by the `jitsi:updateTimeout` (and other `Meteor.Error`s) method. + +- Rewrite CurrentChats to TS ([#22424](https://github.com/RocketChat/Rocket.Chat/pull/22424)) + +- Sort AutocompleteDepartmentsMultiple ([#22419](https://github.com/RocketChat/Rocket.Chat/pull/22419)) + +- status message won't show up for other users ([#22110](https://github.com/RocketChat/Rocket.Chat/pull/22110) by [@g-thome](https://github.com/g-thome)) + + replace the current blaze block that queries the local session store by a react component that fetches memoized user data + +- Store department value correctly ([#22685](https://github.com/RocketChat/Rocket.Chat/pull/22685)) + +- Support ID param on createVisitor method ([#22772](https://github.com/RocketChat/Rocket.Chat/pull/22772)) + +- UIKit URL prop being ignored for buttons ([#22579](https://github.com/RocketChat/Rocket.Chat/pull/22579)) + +- Unnecessary space on members list footer ([#22514](https://github.com/RocketChat/Rocket.Chat/pull/22514)) + +- Use room's last message time when visitor did not send any message ([#22695](https://github.com/RocketChat/Rocket.Chat/pull/22695) by [@ericrosenthal](https://github.com/ericrosenthal)) + +- VisitorClientInfo not showing ([#22593](https://github.com/RocketChat/Rocket.Chat/pull/22593)) + + ![image](https://user-images.githubusercontent.com/17487063/124694887-87492a80-deb8-11eb-89a3-a0e407841a32.png) + +
+🔍 Minor changes + + +- [Fix] Omnichannel Real Time Monitoring charts not displaying all data ([#22363](https://github.com/RocketChat/Rocket.Chat/pull/22363)) + +- [Fix] Real Time Monitoring charts - chats-per-agent and chats-per-department - not visible ([#22406](https://github.com/RocketChat/Rocket.Chat/pull/22406)) + +- Bump actions/stale from 3.0.18 to 3.0.19 ([#22060](https://github.com/RocketChat/Rocket.Chat/pull/22060) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump glob-parent from 5.1.1 to 5.1.2 in /ee/server/services ([#22328](https://github.com/RocketChat/Rocket.Chat/pull/22328) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump: Fuselage 0.28.0 ([#22822](https://github.com/RocketChat/Rocket.Chat/pull/22822)) + +- Chore: [Snyk] Security upgrade node-gcm from 0.14.4 to 1.0.0 ([#22582](https://github.com/RocketChat/Rocket.Chat/pull/22582) by [@snyk-bot](https://github.com/snyk-bot)) + +- Chore: added pagination to search msg endpoint ([#22632](https://github.com/RocketChat/Rocket.Chat/pull/22632) by [@ostjen](https://github.com/ostjen)) + +- Chore: Create README.md ([#22615](https://github.com/RocketChat/Rocket.Chat/pull/22615)) + +- Chore: Enable Omnicahnnel by default ([#22697](https://github.com/RocketChat/Rocket.Chat/pull/22697) by [@ostjen](https://github.com/ostjen)) + +- Chore: Meteor 2.2 and bump dependencies ([#22399](https://github.com/RocketChat/Rocket.Chat/pull/22399)) + +- Chore: Remove JSON parse middleware ([#22454](https://github.com/RocketChat/Rocket.Chat/pull/22454)) + +- Chore: Remove Sodium from the main client ([#22459](https://github.com/RocketChat/Rocket.Chat/pull/22459)) + +- Chore: Review some dependencies ([#22522](https://github.com/RocketChat/Rocket.Chat/pull/22522)) + + Upgrade some development dependencies. + +- Chore: Support other pr titles ([#22494](https://github.com/RocketChat/Rocket.Chat/pull/22494)) + +- Chore: Upgrade Micro Services NPM dependencies ([#22561](https://github.com/RocketChat/Rocket.Chat/pull/22561)) + +- Chore: Upgrade NPM dependencies ([#22562](https://github.com/RocketChat/Rocket.Chat/pull/22562)) + +- Chore: Use projection instead of fields to avoid error log ([#22629](https://github.com/RocketChat/Rocket.Chat/pull/22629)) + +- Fix Closed chats doesn't shows who picked the call ([#22368](https://github.com/RocketChat/Rocket.Chat/pull/22368)) + +- i18n: Language update from LingoHub 🤖 on 2021-06-28Z ([#22491](https://github.com/RocketChat/Rocket.Chat/pull/22491)) + +- i18n: Language update from LingoHub 🤖 on 2021-07-05Z ([#22572](https://github.com/RocketChat/Rocket.Chat/pull/22572)) + +- Merge master into develop & Set version to 3.17.0-develop ([#22493](https://github.com/RocketChat/Rocket.Chat/pull/22493)) + +- Regression: Added missing translate keys for Federation ([#22810](https://github.com/RocketChat/Rocket.Chat/pull/22810)) + +- Regression: Allow users to search canned responses based on shortcut or content ([#22735](https://github.com/RocketChat/Rocket.Chat/pull/22735)) + +- Regression: Allow users to update canned responses scope ([#22738](https://github.com/RocketChat/Rocket.Chat/pull/22738)) + +- Regression: Change the name of called methods in Users model ([#22620](https://github.com/RocketChat/Rocket.Chat/pull/22620)) + +- Regression: Check for text before parse preview in create canned response form ([#22754](https://github.com/RocketChat/Rocket.Chat/pull/22754)) + +- Regression: Client crashing on startup ([#22610](https://github.com/RocketChat/Rocket.Chat/pull/22610)) + +- Regression: Create livechat-monitor permissions for Canned Responses ([#22781](https://github.com/RocketChat/Rocket.Chat/pull/22781)) + +- Regression: Data in the "Active Users" section is delayed in 1 day ([#22794](https://github.com/RocketChat/Rocket.Chat/pull/22794)) + + - Fix 1 day delay in the Engagement Dashboard's "Active Users" section; + - Downgrade `@nivo/line` version. + **Expected behavior:** + ![active-users-engagement-dashboard](https://user-images.githubusercontent.com/36537004/127372185-390dc42f-bc90-4841-a22b-731f0aafcafe.PNG) + +- Regression: Data in the "New Users" section is delayed in 1 day ([#22751](https://github.com/RocketChat/Rocket.Chat/pull/22751)) + + - Update nivo version (which was causing errors in the bar chart); + - Fix 1 day delay in '7 days' and '30 days' periods; + - Update tooltip theme. + +- Regression: Federation warnings on ci ([#22765](https://github.com/RocketChat/Rocket.Chat/pull/22765) by [@g-thome](https://github.com/g-thome)) + + fix some linting warnings on federation modal + +- Regression: Filter of canned responses in contextual-bar ([#22762](https://github.com/RocketChat/Rocket.Chat/pull/22762)) + +- Regression: fix canned responses filters for monitors ([#22782](https://github.com/RocketChat/Rocket.Chat/pull/22782)) + +- Regression: Fix canned responses permissions for monitors & managers ([#22793](https://github.com/RocketChat/Rocket.Chat/pull/22793)) + +- Regression: Fix ee microservices build ([#22656](https://github.com/RocketChat/Rocket.Chat/pull/22656)) + +- Regression: Fix empty canned responses table when searching ([#22743](https://github.com/RocketChat/Rocket.Chat/pull/22743)) + +- Regression: Fix empty tag field ([#22767](https://github.com/RocketChat/Rocket.Chat/pull/22767)) + +- Regression: fix non ee tag field on canned responses ([#22775](https://github.com/RocketChat/Rocket.Chat/pull/22775)) + +- Regression: fix outdated data on canned filters ([#22766](https://github.com/RocketChat/Rocket.Chat/pull/22766)) + +- Regression: Fix tooltip style in the "Busiest Chat Times" chart ([#22813](https://github.com/RocketChat/Rocket.Chat/pull/22813)) + + - Fix tooltip in the Engagement Dashboard's "Busiest Chat Times" chart (Hours). + + **Expected behavior:** + ![busiest-times-ed](https://user-images.githubusercontent.com/36537004/127527827-465397ed-f089-4fb7-9ab2-6fa8cea6abdf.PNG) + +- Regression: Fix users not being able to see the scope of the canned m… ([#22760](https://github.com/RocketChat/Rocket.Chat/pull/22760)) + +- Regression: Fixes empty department field on edit canned responses ([#22741](https://github.com/RocketChat/Rocket.Chat/pull/22741)) + + This fixes the empty department field when editing a canned response via table on omnichannel menu. this also convert some of the files to TS that were created in js initially, also created/adjusted some types + +- Regression: Internal Error when saving files using GridFS ([#22792](https://github.com/RocketChat/Rocket.Chat/pull/22792)) + +- Regression: observe-sequence version syntax broken on IE ([#22557](https://github.com/RocketChat/Rocket.Chat/pull/22557)) + +- Regression: Parse canned responses placeholders ([#22777](https://github.com/RocketChat/Rocket.Chat/pull/22777)) + +- Regression: Prevent custom status from being visible in sequential messages ([#22733](https://github.com/RocketChat/Rocket.Chat/pull/22733)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/126641946-866dae96-1983-43a5-b689-b24670473ad0.png) + + ### after + ![image](https://user-images.githubusercontent.com/27704687/126641752-3163eb95-1cd4-4d99-a61a-4d06d9e7e13e.png) + +- Regression: Properly force newline in attachment fields ([#22727](https://github.com/RocketChat/Rocket.Chat/pull/22727)) + + I've incorrectly enforcing the newline character in attachment fields, resulting in "<br />" text being rendered. + +- Regression: Remove Tags from canned response filter ([#22779](https://github.com/RocketChat/Rocket.Chat/pull/22779)) + +- Regression: Replaced manual state control with a .once event ([#22800](https://github.com/RocketChat/Rocket.Chat/pull/22800)) + +- Regression: Rocket.Chat crashes on startup if there's a Custom OAuth service configured ([#22740](https://github.com/RocketChat/Rocket.Chat/pull/22740)) + +- Regression: roles.removeUserFromRole API not working with scoped roles. ([#22799](https://github.com/RocketChat/Rocket.Chat/pull/22799)) + +- Regression: Small UI changes Federation ([#22811](https://github.com/RocketChat/Rocket.Chat/pull/22811)) + +- Regression: Text wrap in MarkdownTextEditor and PreviewText ([#22798](https://github.com/RocketChat/Rocket.Chat/pull/22798)) + +- Regression: Translate scope on canned responses dashboard ([#22773](https://github.com/RocketChat/Rocket.Chat/pull/22773)) + +- Release 3.16.4 ([#22815](https://github.com/RocketChat/Rocket.Chat/pull/22815)) + +- revert the lastMessage fix for visitor abandonment ([#22720](https://github.com/RocketChat/Rocket.Chat/pull/22720) by [@ericrosenthal](https://github.com/ericrosenthal)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Cosnavel](https://github.com/Cosnavel) +- [@MaestroArt](https://github.com/MaestroArt) +- [@cprice-kgi](https://github.com/cprice-kgi) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@ericrosenthal](https://github.com/ericrosenthal) +- [@g-thome](https://github.com/g-thome) +- [@lucassartor](https://github.com/lucassartor) +- [@nmagedman](https://github.com/nmagedman) +- [@ostjen](https://github.com/ostjen) +- [@rafaelblink](https://github.com/rafaelblink) +- [@snyk-bot](https://github.com/snyk-bot) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@Faria-TechWrite](https://github.com/Faria-TechWrite) +- [@KevLehman](https://github.com/KevLehman) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@alansikora](https://github.com/alansikora) +- [@d-gubert](https://github.com/d-gubert) +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@ggazzo](https://github.com/ggazzo) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@thassiov](https://github.com/thassiov) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 3.16.4 +`2021-07-30 · 1 🔍 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0, 4.2` +- Apps-Engine: `1.27.1` + +
+🔍 Minor changes + + +- Release 3.16.4 ([#22815](https://github.com/RocketChat/Rocket.Chat/pull/22815)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) + +# 3.16.3 +`2021-07-13 · 1 🐛 · 5 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0, 4.2` +- Apps-Engine: `1.27.1` + +### 🐛 Bug fixes + + +- Security Hotfix (https://docs.rocket.chat/guides/security/security-updates) + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@g-thome](https://github.com/g-thome) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.16.2 +`2021-07-08 · 4 🐛 · 1 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0, 4.2` +- Apps-Engine: `1.27.1` + +### 🐛 Bug fixes + + +- Checks the list of agents if at least one is online ([#22584](https://github.com/RocketChat/Rocket.Chat/pull/22584)) + +- Error in permission check for getLivechatDepartmentByNameOrId method in Apps ([#22545](https://github.com/RocketChat/Rocket.Chat/pull/22545)) + + Update the Apps-Engine with a fix for the permission check on the `getLivechatDepartmentByNameOrId` method + +- Livechat webhook request without headers ([#22589](https://github.com/RocketChat/Rocket.Chat/pull/22589)) + +- Markdown for UiKit blocks ([#22619](https://github.com/RocketChat/Rocket.Chat/pull/22619)) + +
+🔍 Minor changes + + +- Regression: Change the name of called methods in Users model ([#22620](https://github.com/RocketChat/Rocket.Chat/pull/22620)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@ggazzo](https://github.com/ggazzo) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 3.16.1 +`2021-07-01 · 2 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0, 4.2` +- Apps-Engine: `1.27.0` + +### 🐛 Bug fixes + + +- Livechat apps permission error ([#22511](https://github.com/RocketChat/Rocket.Chat/pull/22511)) + + Updated Apps-Engine version fixes errors with apps using livechat features. + +- Prune messages not applying the user filter ([#22506](https://github.com/RocketChat/Rocket.Chat/pull/22506)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.16.0 +`2021-06-28 · 5 🎉 · 13 🚀 · 44 🐛 · 26 🔍 · 23 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0, 4.2` +- Apps-Engine: `1.27.0-alpha.5237` + +### 🎉 New features + + +- Add `teams.convertToChannel` endpoint ([#22188](https://github.com/RocketChat/Rocket.Chat/pull/22188)) + + - Add new `teams.converToChannel` endpoint; + - Update `ConvertToTeam` modal text (since this action can now be reversed); + - Remove corresponding team memberships when a team is deleted or converted to a channel; + +- Add setting to configure default role for user on manual registration ([#20650](https://github.com/RocketChat/Rocket.Chat/pull/20650) by [@lucassartor](https://github.com/lucassartor)) + + Add an `admin` setting to determine the initial `role` for new users who registered manually (through the register form and via API, not using an authentication service), normally all new users are assigned to the `user` role. + + The setting can be found in `Admin`->`Accounts`->`Registration`. + + ![image](https://user-images.githubusercontent.com/49413772/107252603-47b70900-6a14-11eb-9cc6-df76720b7365.png) + The setting initial value is false, so the default behaviour stays the same while creating a new server or upgrading one. + + https://user-images.githubusercontent.com/49413772/107253220-ddeb2f00-6a14-11eb-85b4-f770dbbe4970.mp4 + + Video showing an example of the setting being used and creating an new user with the default roles via API. + +- Content-Security-Policy for inline scripts ([#20724](https://github.com/RocketChat/Rocket.Chat/pull/20724)) + + Security policies were applied for inline scripts cases. Due to the libraries and components we use it is not possible to disable inline styles and images as they would break Oembeds and other libraries. + + + basically the inline scripts were moved to a js file + + and besides that some suggars syntax like `addScript` and `addStyle` were added, this way the application already takes care of inserting the elements and providing the content automatically. + +- Open modals in side effects outside React ([#22247](https://github.com/RocketChat/Rocket.Chat/pull/22247)) + +- Remove "Game Center" setting ([#22232](https://github.com/RocketChat/Rocket.Chat/pull/22232) by [@lolimay](https://github.com/lolimay)) + +### 🚀 Improvements + + +- **APPS:** Refactor bridges ([#21253](https://github.com/RocketChat/Rocket.Chat/pull/21253)) + + Make the bridge classes extend abstract classes provided by the engine instead of just implementing an interface. The new abstract classes feature proxy methods used for permission verification in each method. This is also offers space to add more behaviors before executing the actual bridge methods. + +- Add BBB and Jitsi to Team ([#22312](https://github.com/RocketChat/Rocket.Chat/pull/22312)) + + Added 2 new settings: + - `Admin > Video Conference > Big Blue Button > Enable for teams` + - `Admin > Video Conference > Jitsi > Enable in teams` + +- Add debouncing to units selects filters ([#22097](https://github.com/RocketChat/Rocket.Chat/pull/22097)) + +- Add modal to close chats when tags/comments are not required ([#22245](https://github.com/RocketChat/Rocket.Chat/pull/22245) by [@rafaelblink](https://github.com/rafaelblink)) + + When neither tags or comments are required to close a livechat, show this modal instead: + ![Screen Shot 2021-05-20 at 7 33 19 PM](https://user-images.githubusercontent.com/20868078/119057741-6af23c80-b9a3-11eb-902f-f8a7458ad11c.png) + +- Fallback messages on contextual bar ([#22376](https://github.com/RocketChat/Rocket.Chat/pull/22376)) + + ![image](https://user-images.githubusercontent.com/27704687/122301100-9569e380-ced6-11eb-992a-e3a7fd9d0d73.png) + +- Missing tests to `fname` and `prid` in the `rooms.createDiscussion` endpoint ([#22223](https://github.com/RocketChat/Rocket.Chat/pull/22223)) + + - Add tests to the values of `fname` and `prid` in the `rooms.createDiscussion` endpoint's results. + +- New indexes for Omnichannel-related collections ([#22367](https://github.com/RocketChat/Rocket.Chat/pull/22367)) + +- Paginated department select on forward chat ([#22123](https://github.com/RocketChat/Rocket.Chat/pull/22123)) + + Changes the department dropdown to use the new paginated selects, allowing for searching and displaying more than 50 departments + +- Paginated multiselect for EE tags ([#22315](https://github.com/RocketChat/Rocket.Chat/pull/22315) by [@rafaelblink](https://github.com/rafaelblink)) + + This uses the paginated multiselect for the EE tags selection, allowing more than 50 tags to be shown. + +- Remove differentiation between public x private channels in sidebar ([#22160](https://github.com/RocketChat/Rocket.Chat/pull/22160)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/119752184-e7d55880-be72-11eb-9167-be2f305ddb3f.png) + + ### after + ![image](https://user-images.githubusercontent.com/27704687/119752125-c8d6c680-be72-11eb-8444-2e0c7cb1c600.png) + +- Rewrite create direct modal ([#22209](https://github.com/RocketChat/Rocket.Chat/pull/22209)) + + ![image](https://user-images.githubusercontent.com/27704687/120384584-bb02c480-c2fc-11eb-8e8e-c197b08b5201.png) + +- Rewrite Create Discussion Modal (only through sidebar) ([#22224](https://github.com/RocketChat/Rocket.Chat/pull/22224)) + + This is only available by creating a new discussion when clicking on the sidebar button. Other places will be implemented afterwards. + + ![image](https://user-images.githubusercontent.com/40830821/120556093-6af63180-c3d2-11eb-97ea-63c5423049dc.png) + +- Send only relevant data via WebSocket ([#22258](https://github.com/RocketChat/Rocket.Chat/pull/22258)) + + Previously when any data changed on subscriptions or rooms we were getting fresh data from database, to also remove undesired fields, but sometimes the data that changed was not relevant so we were sending the whole object everytime **without** the fields that actually changed. This change aims to reduce this overhead and also send less data to clients. + +### 🐛 Bug fixes + + +- _updatedAt attribute not being automatically updated by raw models ([#22306](https://github.com/RocketChat/Rocket.Chat/pull/22306)) + +- **EE:** Canned responses can't be deleted ([#22095](https://github.com/RocketChat/Rocket.Chat/pull/22095) by [@rafaelblink](https://github.com/rafaelblink)) + + Deletion button has been removed from the edition option. + + ## Before + ![image](https://user-images.githubusercontent.com/2493803/119059416-9f1b2c80-b9a6-11eb-933a-4efa1ac0552a.png) + + ### After + ![Rocket Chat (2)](https://user-images.githubusercontent.com/2493803/119172517-72b1ef80-ba3c-11eb-9178-04a12176f312.gif) + +- **ENTERPRISE:** Omnichannel enterprise permissions being added back to its default roles ([#22322](https://github.com/RocketChat/Rocket.Chat/pull/22322)) + + Fix omnichannel monitor permissions being added back to omnichannel monitor role on every startup. + +- **ENTERPRISE:** Prevent Visitor Abandonment after forwarding chat ([#22243](https://github.com/RocketChat/Rocket.Chat/pull/22243)) + + Currently the Visitor Abandonment timer isn't affected when the chat is forwarded. However this is affecting the UX in certain situations like eg: A bot forwarding a chat to an human agent + ![image](https://user-images.githubusercontent.com/34130764/120896383-e4925780-c63e-11eb-937e-ffd7c4836159.png) + + To solve this issue, we'll now be stoping the Visitor Abandonment timer once a chat is forwarded. + +- **IMPROVE:** Prevent creation of duplicated roles and new `roles.update` endpoint ([#22279](https://github.com/RocketChat/Rocket.Chat/pull/22279) by [@lucassartor](https://github.com/lucassartor)) + + Currently, the action of updating a role is broken: because roles have their `_id` = `name`, when updating a role there's no way to validate if the user is trying to update or create a new role with a name that already exists - which causes wrong behaviors, such as roles with the same name and not being able to update them. + + To proper fix this, this PR looks to change the creation of roles. Now, roles have a unique `_id` value and there's a endpoint to update roles: `/api/v1/roles.update`. + + Doing so, it's possible to validate on both endpoints (`roles.create` and `roles.update`) to not allow roles with duplicated names. + + **OBS:** The unique id changes only reflect new roles, the standard roles (such as admin and user) still have `_id` = `name`, but new roles now **can't** have the same name as them. + +- `channels.history`, `groups.history` and `im.history` REST endpoints not respecting hide system message config ([#22364](https://github.com/RocketChat/Rocket.Chat/pull/22364)) + +- Apps not syncing status correctly on HA setups ([#22415](https://github.com/RocketChat/Rocket.Chat/pull/22415)) + + FIxes erros where, on HA setups, instances that DID NOT originate the action of uninstalling and updating an app would maintain the wrong status of apps when they received the notification of these events via Streamer. + +- Attachments and avatars not rendered if deployed on subfolder ([#22290](https://github.com/RocketChat/Rocket.Chat/pull/22290)) + +- Auditing page not printing all messages ([#22272](https://github.com/RocketChat/Rocket.Chat/pull/22272)) + + Changed CSS so printed media from the auditing page includes all page content. + +- Can't delete file from Room's file list ([#22191](https://github.com/RocketChat/Rocket.Chat/pull/22191)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/120215931-bb239700-c20c-11eb-9494-d4bc017df390.png) + + ### after + ![image](https://user-images.githubusercontent.com/27704687/120216113-f8882480-c20c-11eb-9afb-b127e66a43da.png) + +- Cancel button and success toast at Leave Team modal ([#22373](https://github.com/RocketChat/Rocket.Chat/pull/22373)) + +- Chore: `team.addMembers` doesn't add member to main team room ([#22169](https://github.com/RocketChat/Rocket.Chat/pull/22169) by [@lucassartor](https://github.com/lucassartor)) + + Fix `team.addMembers` endpoint as it currently doesn't work properly. The API call is adding members to a team's channels but not to the main team room. + +- Convert and Move team permission ([#22350](https://github.com/RocketChat/Rocket.Chat/pull/22350)) + + ### before + https://user-images.githubusercontent.com/45966964/114909360-5c04f100-9e1d-11eb-9363-f308e5d0be68.mp4 + + ### after + https://user-images.githubusercontent.com/45966964/114909388-61fad200-9e1d-11eb-9bbe-114b55954a9f.mp4 + +- CORS error while interacting with any action button on Livechat ([#22150](https://github.com/RocketChat/Rocket.Chat/pull/22150)) + +- DeepL supported languages ([#22326](https://github.com/RocketChat/Rocket.Chat/pull/22326) by [@mrsimpson](https://github.com/mrsimpson)) + +- Error generating Jitsi Token ([#22301](https://github.com/RocketChat/Rocket.Chat/pull/22301)) + +- Game center close button ([#22353](https://github.com/RocketChat/Rocket.Chat/pull/22353)) + + ![Peek 2021-06-14 18-19](https://user-images.githubusercontent.com/27704687/121960896-155c4600-cd3d-11eb-9be9-9712f4a1087b.gif) + +- Jitsi integration sending random "join now" messages ([#22277](https://github.com/RocketChat/Rocket.Chat/pull/22277)) + +- LDAP and SAML: changed usernames are not reflected on old data ([#22304](https://github.com/RocketChat/Rocket.Chat/pull/22304)) + +- Members tab visual issues ([#22138](https://github.com/RocketChat/Rocket.Chat/pull/22138)) + + ## Before + ![image](https://user-images.githubusercontent.com/27704687/119558283-95fbd800-bd77-11eb-91b4-91821f365bf3.png) + + ## After + ![image](https://user-images.githubusercontent.com/27704687/119558120-6947c080-bd77-11eb-8ecb-7fedc07afa82.png) + +- Memory leak generated by Stream Cast usage ([#22329](https://github.com/RocketChat/Rocket.Chat/pull/22329)) + + Stream Cast uses a different approach to broadcast data to the instances, it uses the DDP subscription method that requires a collection on the other side, if no collection exists with the given name `broadcast-stream` it caches in memory waiting for the collection to be set later. The cache is cleared only when a reconnection happens. + + This PR overrides the function that processes the data for that specific connection, preventing the cache and everything else to be processed since we already have our low-level listener to process the data. + +- Message box hiding on mobile view (Safari) ([#22212](https://github.com/RocketChat/Rocket.Chat/pull/22212)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/120404256-5b1c1600-c31c-11eb-96e9-860e4132db5f.png) + + ### after + ![image](https://user-images.githubusercontent.com/27704687/120404406-acc4a080-c31c-11eb-9efb-c2ad88664fda.png) + +- Missing burger menu on direct messages ([#22211](https://github.com/RocketChat/Rocket.Chat/pull/22211)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/120403671-09bf5700-c31b-11eb-92a1-a2f589bd85fc.png) + + ### after + ![image](https://user-images.githubusercontent.com/27704687/120403693-1643af80-c31b-11eb-8027-dbdc4f560647.png) + +- Missing Throbber while thread list is loading ([#22316](https://github.com/RocketChat/Rocket.Chat/pull/22316)) + + ### before + List was starting with no results even if there's results: + + ![image](https://user-images.githubusercontent.com/27704687/121606744-1e8ba100-ca25-11eb-9b31-706fb998d05f.png) + + ### after + ![image](https://user-images.githubusercontent.com/27704687/121606635-e97f4e80-ca24-11eb-81f7-af8b0cc41c89.png) + +- Not possible to edit some messages inside threads ([#22325](https://github.com/RocketChat/Rocket.Chat/pull/22325)) + + ### Before + ![before](https://user-images.githubusercontent.com/27704687/121755733-4eeb4200-caee-11eb-9d77-1b498c38c478.gif) + + ### After + ![after](https://user-images.githubusercontent.com/27704687/121755736-514d9c00-caee-11eb-9897-78fcead172f2.gif) + +- Notifications not using user's name ([#22309](https://github.com/RocketChat/Rocket.Chat/pull/22309)) + +- OAuth login not working on electron app with temp sessions. ([#22401](https://github.com/RocketChat/Rocket.Chat/pull/22401)) + +- Omnichannel information panel is not displaying departments correctly ([#22155](https://github.com/RocketChat/Rocket.Chat/pull/22155)) + +- Permission check for teams.listRoomsOfUser ([#22313](https://github.com/RocketChat/Rocket.Chat/pull/22313)) + + If the user is trying to list his own channels, the permission check is skipped. + +- Read receipts are broken ([#22203](https://github.com/RocketChat/Rocket.Chat/pull/22203)) + +- Remove invalid check before sending notifications to Omnichannel online agents ([#22278](https://github.com/RocketChat/Rocket.Chat/pull/22278)) + +- Remove useless message options from Omnichannel Rooms ([#21549](https://github.com/RocketChat/Rocket.Chat/pull/21549) by [@rafaelblink](https://github.com/rafaelblink)) + +- Removed follow button from message box in threads ([#21019](https://github.com/RocketChat/Rocket.Chat/pull/21019) by [@Darshilp326](https://github.com/Darshilp326)) + + Removed follow button from message box as it was coinciding with audio/file message in threads. + +- Setup wizard infinite loop when on subfolder. ([#22395](https://github.com/RocketChat/Rocket.Chat/pull/22395)) + +- Sidebar not closing when clicking on a channel ([#22271](https://github.com/RocketChat/Rocket.Chat/pull/22271)) + + ### before + ![before](https://user-images.githubusercontent.com/27704687/121074843-c6e20100-c7aa-11eb-88db-76e39b57b064.gif) + + ### after + ![after](https://user-images.githubusercontent.com/27704687/121074860-cb0e1e80-c7aa-11eb-9e96-06d75044b763.gif) + +- Sound notification is not emitted when the Omnichannel chat comes from another department ([#22291](https://github.com/RocketChat/Rocket.Chat/pull/22291)) + +- Support DISABLE_PRESENCE_MONITOR env var in new DB watchers ([#22257](https://github.com/RocketChat/Rocket.Chat/pull/22257)) + +- Unable to change protected role's description ([#22402](https://github.com/RocketChat/Rocket.Chat/pull/22402) by [@lucassartor](https://github.com/lucassartor)) + +- Undefined error when forwarding chats to offline department ([#22154](https://github.com/RocketChat/Rocket.Chat/pull/22154) by [@rafaelblink](https://github.com/rafaelblink)) + + ![Screen Shot 2021-05-26 at 5 29 17 PM](https://user-images.githubusercontent.com/59577424/119727520-c495b380-be48-11eb-88a2-158017c7ad0a.png) + + Omnichannel agents are facing the error shown above when forwarding chats to offline departments. + The error usually takes place when the routing system algorithm is **Manual Selection**. + +- Unread bar in channel flash quickly and then disappear ([#22275](https://github.com/RocketChat/Rocket.Chat/pull/22275)) + + ![unread_messages](https://user-images.githubusercontent.com/27704687/121092865-960dc600-c7c2-11eb-9074-81060d826811.gif) + +- User Info displaying own user. ([#22219](https://github.com/RocketChat/Rocket.Chat/pull/22219)) + +- Visitor info screen being updated multiple times ([#22482](https://github.com/RocketChat/Rocket.Chat/pull/22482)) + +- Web navigation breaks after visiting integrations admin page ([#21983](https://github.com/RocketChat/Rocket.Chat/pull/21983) by [@rexzing](https://github.com/rexzing)) + + Fix the navigation breaks issue after visiting the integrations administration page + +- Wrong member's contextualBar on direct multiple ([#21452](https://github.com/RocketChat/Rocket.Chat/pull/21452)) + + ![image](https://user-images.githubusercontent.com/27704687/113620310-893cec80-9630-11eb-83e2-0e8b2181cc42.png) + +
+🔍 Minor changes + + +- Bump: Fuselage 0.27.0 ([#22486](https://github.com/RocketChat/Rocket.Chat/pull/22486)) + +- Chore: Attachment Definitions and UiKitDefinitions ([#22354](https://github.com/RocketChat/Rocket.Chat/pull/22354)) + +- Chore: Bump node_modules cache key ([#22250](https://github.com/RocketChat/Rocket.Chat/pull/22250)) + +- Chore: Change modals for remove user from team && leave team ([#22141](https://github.com/RocketChat/Rocket.Chat/pull/22141)) + + ![image](https://user-images.githubusercontent.com/40830821/119576154-93f14380-bd8e-11eb-8885-f889f2939bf4.png) + ![image](https://user-images.githubusercontent.com/40830821/119576219-b5eac600-bd8e-11eb-832c-ea7a17a56bdd.png) + +- Chore: Check PR Title on every submission ([#22140](https://github.com/RocketChat/Rocket.Chat/pull/22140)) + +- Chore: Enable push gateway only if the server is registered ([#22346](https://github.com/RocketChat/Rocket.Chat/pull/22346) by [@lucassartor](https://github.com/lucassartor)) + + Currently, when creating an unregistered server, the default value of the push gateway setting is set to true and is disabled (it can't be changed unless the server is registered). This is a wrong behavior as an unregistered server **can't** use the push gateway. + + This PR creates a validation to check if the server is registered when enabling the push gateway. That way, even if the push gateway setting is turned on, but the server is unregistered, the push gateway **won't** work - it will behave like it is off. + +- Chore: Enforce TypeScript on Storybook ([#22317](https://github.com/RocketChat/Rocket.Chat/pull/22317)) + + Rewrite some Storybook stories in TypeScript, as an example. + +- Chore: Move getUserRoles to service and add cache ([#22345](https://github.com/RocketChat/Rocket.Chat/pull/22345)) + +- Chore: Remove Meter.wrapAsync from upload api ([#22286](https://github.com/RocketChat/Rocket.Chat/pull/22286)) + +- Chore: Remove not used scripts and its dependencies ([#22167](https://github.com/RocketChat/Rocket.Chat/pull/22167)) + +- Chore: Remove unnecessary modals replacing to GenericModal ([#21853](https://github.com/RocketChat/Rocket.Chat/pull/21853)) + +- Chore: Update delete team modal to new design ([#22127](https://github.com/RocketChat/Rocket.Chat/pull/22127)) + + Now the modal has only 2 steps (steps 1 and 2 were merged) + ![image](https://user-images.githubusercontent.com/40830821/119414580-2e398480-bcc6-11eb-9a47-515568257974.png) + +- Language update from LingoHub 🤖 on 2021-05-31Z ([#22196](https://github.com/RocketChat/Rocket.Chat/pull/22196)) + +- Language update from LingoHub 🤖 on 2021-06-14Z ([#22340](https://github.com/RocketChat/Rocket.Chat/pull/22340)) + +- Merge master into develop & Set version to 3.16.0-develop ([#22184](https://github.com/RocketChat/Rocket.Chat/pull/22184)) + +- Refactor few methods to improve Omnichannel flow ([#22321](https://github.com/RocketChat/Rocket.Chat/pull/22321)) + +- Regression: Api tests not running ([#22369](https://github.com/RocketChat/Rocket.Chat/pull/22369)) + +- Regression: Block-size property on firefox ([#22433](https://github.com/RocketChat/Rocket.Chat/pull/22433)) + +- Regression: CSP for external Media and Frames ([#22465](https://github.com/RocketChat/Rocket.Chat/pull/22465)) + +- Regression: Enable unregistered servers to use their own push gateway ([#22391](https://github.com/RocketChat/Rocket.Chat/pull/22391) by [@lucassartor](https://github.com/lucassartor)) + + https://github.com/RocketChat/Rocket.Chat/pull/22346 prevented unregistered servers from using the RC push gateway but was still blocking this servers from using their own push gateway, this PR looks to fix that. + +- Regression: Fix CORS in uikit endpoints ([#22214](https://github.com/RocketChat/Rocket.Chat/pull/22214)) + +- Regression: Fix livechat find departments ([#22472](https://github.com/RocketChat/Rocket.Chat/pull/22472)) + +- Regression: Missing flexDirection on select field ([#22300](https://github.com/RocketChat/Rocket.Chat/pull/22300)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/121425905-532a2a80-c949-11eb-885f-e8ddaf5c8d5c.png) + + ### after + ![image](https://user-images.githubusercontent.com/27704687/121425770-283fd680-c949-11eb-8d94-86886f174599.png) + +- Regression: RoomProvider using wrong types ([#22370](https://github.com/RocketChat/Rocket.Chat/pull/22370)) + +- Release 3.15.2 ([#22483](https://github.com/RocketChat/Rocket.Chat/pull/22483)) + +- Update README.md ([#22461](https://github.com/RocketChat/Rocket.Chat/pull/22461)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Darshilp326](https://github.com/Darshilp326) +- [@lolimay](https://github.com/lolimay) +- [@lucassartor](https://github.com/lucassartor) +- [@mrsimpson](https://github.com/mrsimpson) +- [@rafaelblink](https://github.com/rafaelblink) +- [@rexzing](https://github.com/rexzing) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@Faria-TechWrite](https://github.com/Faria-TechWrite) +- [@KevLehman](https://github.com/KevLehman) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@d-gubert](https://github.com/d-gubert) +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@thassiov](https://github.com/thassiov) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 3.15.3 +`2021-07-01 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0, 4.2` +- Apps-Engine: `1.26.0` + +### 🐛 Bug fixes + + +- Prune messages not applying the user filter ([#22506](https://github.com/RocketChat/Rocket.Chat/pull/22506)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.15.2 +`2021-06-27 · 3 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0, 4.2` +- Apps-Engine: `1.26.0` + +### 🐛 Bug fixes + + +- **ENTERPRISE:** Omnichannel enterprise permissions being added back to its default roles ([#22322](https://github.com/RocketChat/Rocket.Chat/pull/22322)) + + Fix omnichannel monitor permissions being added back to omnichannel monitor role on every startup. + +- Sound notification is not emitted when the Omnichannel chat comes from another department ([#22291](https://github.com/RocketChat/Rocket.Chat/pull/22291)) + +- Visitor info screen being updated multiple times ([#22482](https://github.com/RocketChat/Rocket.Chat/pull/22482)) + +
+🔍 Minor changes + + +- Release 3.15.2 ([#22483](https://github.com/RocketChat/Rocket.Chat/pull/22483)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.15.1 +`2021-06-21 · 3 🐛 · 1 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0, 4.2` +- Apps-Engine: `1.26.0` + +### 🐛 Bug fixes + + +- Attachments and avatars not rendered if deployed on subfolder ([#22290](https://github.com/RocketChat/Rocket.Chat/pull/22290)) + +- Setup wizard infinite loop when on subfolder. ([#22395](https://github.com/RocketChat/Rocket.Chat/pull/22395)) + +- Support DISABLE_PRESENCE_MONITOR env var in new DB watchers ([#22257](https://github.com/RocketChat/Rocket.Chat/pull/22257)) + +
+🔍 Minor changes + + +- Release 3.15.1 ([#22432](https://github.com/RocketChat/Rocket.Chat/pull/22432)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@gabriellsh](https://github.com/gabriellsh) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 3.15.0 +`2021-05-28 · 8 🎉 · 12 🚀 · 62 🐛 · 47 🔍 · 34 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0, 4.2` +- Apps-Engine: `1.26.0` + +### 🎉 New features + + +- **APPS:** Ability for Rocket.Chat Apps to delete rooms ([#21875](https://github.com/RocketChat/Rocket.Chat/pull/21875) by [@lucassartor](https://github.com/lucassartor)) + + Adds a new `delete` method on the rooms bridge in order to trigger the deletion of rooms via the Apps-Engine. + +- **ENTERPRISE:** Introduce Load Rotation routing algorithm for Omnichannel ([#22090](https://github.com/RocketChat/Rocket.Chat/pull/22090) by [@rafaelblink](https://github.com/rafaelblink)) + + This PR introduces a new Auto Chat Distribution (ACD) algorithm for Omnichannel: **Load Rotation**. + The algorithm distributes chats to agents one by one, which means that when a new chat arrives, the agent with the oldest routing assignment time will be selected to serve the chat, regardless of the number of chats in progress each agent has. + + ![Screen Shot 2021-05-20 at 5 17 40 PM](https://user-images.githubusercontent.com/59577424/119043752-c61a3400-b98f-11eb-8543-f3176879af1d.png) + +- Back button for Omnichannel ([#21647](https://github.com/RocketChat/Rocket.Chat/pull/21647) by [@rafaelblink](https://github.com/rafaelblink)) + +- New Message Parser ([#21962](https://github.com/RocketChat/Rocket.Chat/pull/21962)) + + The objective is to put an end to the confusion that we face having multiple parsers, and the problems that this brings, it is still experimental then users need to choose to use it. + + The benefits are multiple. no more unexpected cases or grammatical collisions (in addition to more flexible nested cases like bold within link labels). + Besides, we no longer render raw html, instead we use components, so the xss attacks are over (the easy ones at least). Without further discoveries and at the fronted, we only reder what is delivered thus improving our performance. + This can be used in multiple places, (message, alert, sidenav and in the entire mobile application.) + +- Option to notify failed login attempts to a channel ([#21968](https://github.com/RocketChat/Rocket.Chat/pull/21968)) + +- Option to prevent users from using Invisible status ([#20084](https://github.com/RocketChat/Rocket.Chat/pull/20084) by [@lucassartor](https://github.com/lucassartor)) + + Add an `admin` option to allow/disallow the `Invisible` status option from all users. This option is available in the `Accounts` section. + + ![2021-01-06-11-55-22](https://user-images.githubusercontent.com/49413772/103782988-ebc52300-5016-11eb-8a29-dd540c21e11c.gif) + + If the option is turned off, the `users.setStatus` endpoint is also restricted from users trying to change their status to `Invisible`, throwing the following error: + ```json + { + "success": false, + "error": "Invisible status is disabled [error-not-allowed]", + "stack": "Error: Invisible status is disabled [error-not-allowed]\n at DDPCommon.MethodInvocation. (app/api/server/v1/users.js:425:13)\n at packages/dispatch_run-as-user.js:211:14\n at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)\n at Object.Meteor.runAsUser (packages/dispatch_run-as-user.js:210:33)\n at Object.post (app/api/server/v1/users.js:415:10)\n at app/api/server/api.js:394:82\n at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)\n at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39)\n at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32)\n at packages/nimble_restivus/lib/route.coffee:59:33\n at packages/simple_json-routes.js:98:9", + "errorType": "error-not-allowed", + "details": { + "method": "users.setStatus" + } + } + ``` + +- Paginated and Filtered selects on new/edit unit ([#22052](https://github.com/RocketChat/Rocket.Chat/pull/22052) by [@rafaelblink](https://github.com/rafaelblink)) + + REQUIRES https://github.com/RocketChat/Rocket.Chat.Fuselage/pull/447 + + Adds infinite scrolling selects to the units edit/create with the ability to be filtered by text as well + + ![Screen Shot 2021-05-17 at 9 24 19 AM](https://user-images.githubusercontent.com/20868078/118487999-abc32a80-b6f1-11eb-8d58-d031111ea0fb.png) + + This Affects the monitors and departments inputs + +- Remove exif metadata from uploaded files ([#22044](https://github.com/RocketChat/Rocket.Chat/pull/22044)) + +### 🚀 Improvements + + +- Add groups to the directory channels list ([#21687](https://github.com/RocketChat/Rocket.Chat/pull/21687)) + + - Add groups (private channels) to the directory channels list. Only groups in which the logged user is subscribed are shown in the list. + +- Add support to queries in `channels.members` and `groups.members` endpoints ([#21414](https://github.com/RocketChat/Rocket.Chat/pull/21414)) + + - Add support to queries (within the `query` parameter) in `channels.members` and `groups.members` endpoints. + +- Add support to queries in the `im.members` endpoint ([#21471](https://github.com/RocketChat/Rocket.Chat/pull/21471)) + + - Add support to queries within the `name`, `username` and `status` parameters. + +- Add team members to channel when set as auto join ([#22056](https://github.com/RocketChat/Rocket.Chat/pull/22056) by [@g-thome](https://github.com/g-thome)) + + Create a channels.autojoin endpoint to set a channel as autojoin. Also make it so that old team members join this channel automatically + +- CAS popup login size input type ([#21907](https://github.com/RocketChat/Rocket.Chat/pull/21907) by [@Deepak-learner](https://github.com/Deepak-learner)) + +- Inconsistent and misleading 2FA settings ([#22042](https://github.com/RocketChat/Rocket.Chat/pull/22042) by [@lucassartor](https://github.com/lucassartor)) + + Currently, there are some inconsistencies and incorrect behaviors on the 2FA settings, such as: + + - When disabling the TOTP 2FA, all 2FA are disabled; + - There are no option to disable only the TOTP 2FA; + - If 2FA are disabled, the other settings aren't blocked (the e-mail 2FA setting, for example); + - It lacks some labels to warn the user of some specific 2FA options. + + This PR looks to fix those issues. + +- LDAP port setting input type to allow only numbers ([#21912](https://github.com/RocketChat/Rocket.Chat/pull/21912) by [@Deepak-learner](https://github.com/Deepak-learner)) + +- Missing modal on deleting a role ([#22020](https://github.com/RocketChat/Rocket.Chat/pull/22020)) + + ![image](https://user-images.githubusercontent.com/27704687/118047610-613c5980-b351-11eb-96c7-6b28ae24363e.png) + +- Omnichannel Room Information panel flow when user save or close on form page. ([#21688](https://github.com/RocketChat/Rocket.Chat/pull/21688) by [@rafaelblink](https://github.com/rafaelblink)) + +- Prevent gallery to close when clicking on a non-zoomable image ([#21854](https://github.com/RocketChat/Rocket.Chat/pull/21854)) + +- Replace method to API Endpoint on Prune Messages ([#21836](https://github.com/RocketChat/Rocket.Chat/pull/21836)) + +- Support for Google OAuth for mobile app ([#22014](https://github.com/RocketChat/Rocket.Chat/pull/22014)) + +### 🐛 Bug fixes + + +- **APPS:** Scheduler duplicating recurrent tasks after server restart ([#21866](https://github.com/RocketChat/Rocket.Chat/pull/21866)) + + Reintroduces the old method for creating recurring tasks in the apps' scheduler bridge to ensure tasks won't be duplicated. + + By introducing the [`skipImmediate` property option](https://github.com/RocketChat/Rocket.Chat/pull/21353) at the [`scheduleRecurring`](https://github.com/RocketChat/Rocket.Chat/blob/f8171f464ed8a7487795651767695fb33a1c709e/app/apps/server/bridges/scheduler.js#L119) method, the `every` method from _agenda.js_, which ensured no duplicates were created, was removed in favor of a more manual procedure. The new procedure was not taking into account the management of duplicates and as a result multiple copies of the same task could be created and they would get executed at the same time. + + In the case of server restarts, every time this event happened and the app had the `startupSetting` configured to use _recurring tasks_, they would get recreated the same number of times. In the case of a server that restarts frequently (_n_ times), there would be the same (_n_) number of tasks duplicated (and running) in the system. + +- **ENTERPRISE:** Omnichannel Monitors can't forward chats to departments that they are not supervising ([#22128](https://github.com/RocketChat/Rocket.Chat/pull/22128)) + + Currently, Omnichannel Monitors just can't forward chats to a department that is part of a `Business Unit` they're not supervising. This issue is causing critical problems on customer operations since this behaviour is not by design. + The reason this issue is taking place is that, by design, Monitors just have access to departments related to the `Business Units` they're monitoring, but this restriction is designed only for Omnichannel management areas, which means in case the monitor is, also, an agent, they're supposed to be able to forward a chat to any available departments regardless the `Business Units` it's associated with. + So, initially, the restriction was implemented on the `Department Model` and, now, we're implementing the logic properly and introducing a new parameter to department endpoints, so the client will define which type of departments it needs. + +- **ENTERPRISE:** Omnichannel Monitors can't forward chats to departments that they are not supervising ([#22142](https://github.com/RocketChat/Rocket.Chat/pull/22142)) + +- Adding Custom Fields to show on user info check ([#20955](https://github.com/RocketChat/Rocket.Chat/pull/20955)) + + The setting custom fields to show under user info was not being used when rendering fields in user info. This pr adds those checks and only renders the fields mentioned under in admin -> accounts -> Custom Fields to Show in User Info. + +- Adding permission 'add-team-channel' for Team Channels Contextual bar ([#21591](https://github.com/RocketChat/Rocket.Chat/pull/21591)) + + Added 'add-team-channel' permission to the 2 buttons in team channels contextual bar, for adding channels to teams. + +- Adding retentionEnabledDefault check before showing warning message ([#20692](https://github.com/RocketChat/Rocket.Chat/pull/20692)) + + Added check for retentionEnabledDefault before showing prune warning message. + +- App crashes when downloads come from WebDAV and the server is not available ([#21985](https://github.com/RocketChat/Rocket.Chat/pull/21985)) + +- App license error detail message removed ([#22091](https://github.com/RocketChat/Rocket.Chat/pull/22091)) + + Banner in the App Detail page that showed a message explaining why the license validation had failed was removed previously, likely during the React rewrite. + + We're bringing it back. + +- Auto-join Tags misalignment ([#21980](https://github.com/RocketChat/Rocket.Chat/pull/21980)) + + Captura de Tela 2021-05-06 às 18 07 07 + +- Close stream properly at Omnichannel room when move to queue ([#22015](https://github.com/RocketChat/Rocket.Chat/pull/22015)) + +- Contact Bar not reactive ([#22016](https://github.com/RocketChat/Rocket.Chat/pull/22016) by [@rafaelblink](https://github.com/rafaelblink)) + +- Convert a channel to Team Modal Visual Issues ([#21967](https://github.com/RocketChat/Rocket.Chat/pull/21967)) + + ![image](https://user-images.githubusercontent.com/27704687/117193225-fae79200-adb8-11eb-9f09-e8d328f3228b.png) + +- Correcting a the wrong Archived label in edit room ([#21717](https://github.com/RocketChat/Rocket.Chat/pull/21717) by [@Jeanstaquet](https://github.com/Jeanstaquet)) + + ![image](https://user-images.githubusercontent.com/45966964/116584997-3cd78a80-a918-11eb-81fa-8a7eb5318ae9.png) + + A label exists for Archived, and it has not been used. So I replaced it with the existing one. the label 'Archived' does not exist. + +- Custom OAuth not being completely deleted ([#21637](https://github.com/RocketChat/Rocket.Chat/pull/21637) by [@siva2204](https://github.com/siva2204)) + +- Directory Table's Sort Function ([#21921](https://github.com/RocketChat/Rocket.Chat/pull/21921)) + + ### TableRow Margin Issue: + ![image](https://user-images.githubusercontent.com/27704687/116907348-d6a07f80-ac17-11eb-9411-edfe0906bfe1.png) + + ### Table Sort Action Issue: + ![directory](https://user-images.githubusercontent.com/27704687/116907441-f20b8a80-ac17-11eb-8790-bfce19e89a67.gif) + +- Discussion names showing a random value ([#22172](https://github.com/RocketChat/Rocket.Chat/pull/22172)) + +- Dismiss button for save your encryption password dialog Issue#13557 ([#19872](https://github.com/RocketChat/Rocket.Chat/pull/19872) by [@savish28](https://github.com/savish28)) + +- Display Modes ([#22058](https://github.com/RocketChat/Rocket.Chat/pull/22058)) + +- Emails being sent with HTML entities getting escaped multiple times ([#21994](https://github.com/RocketChat/Rocket.Chat/pull/21994) by [@bhavayAnand9](https://github.com/bhavayAnand9)) + + fixes an issue where if password contains special HTML character like &, in the email it would end up something like `&amp;` + + + password was going through multiple escapeHTML function calls + `secure&123 => secure&123 => secure&amp;123 + ` + +- Error when you look at the members list of a room in which you are not a member ([#21952](https://github.com/RocketChat/Rocket.Chat/pull/21952) by [@Jeanstaquet](https://github.com/Jeanstaquet)) + + Before, when you look at the members of a room in which you are not a member the app crashed, i corrected this problem. + Indeed, there was a check on each currentSubscription. to see if it was not undefined except on currentSubscription.blocker + + https://user-images.githubusercontent.com/45966964/117087470-d3101400-ad4f-11eb-8f44-0ebca830a4d8.mp4 + +- errors when viewing a room that you're not subscribed to ([#21984](https://github.com/RocketChat/Rocket.Chat/pull/21984)) + +- Files list will not show deleted files. ([#21732](https://github.com/RocketChat/Rocket.Chat/pull/21732) by [@Darshilp326](https://github.com/Darshilp326)) + + When you delete files from the header option, deleted files will not be shown. + + https://user-images.githubusercontent.com/55157259/115730786-38552400-a3a4-11eb-9684-7f510920db66.mp4 + +- Fixed the fact that when a team was deleted, not all channels were unlinked from the team ([#21942](https://github.com/RocketChat/Rocket.Chat/pull/21942) by [@Jeanstaquet](https://github.com/Jeanstaquet)) + + Fixed the fact that when a team was deleted, not all channels were unlinked from the team. Only the first room of the rooms list was unlinked. + + After the fix, there is nos more errors: + + + https://user-images.githubusercontent.com/45966964/117055182-2a47c180-ad1b-11eb-806f-07fb3fa7ec12.mp4 + +- Fixing Jitsi call ended Issue. ([#21808](https://github.com/RocketChat/Rocket.Chat/pull/21808)) + + The new rewrite in react of contextual call component broke the Jitsi "click to join" messages. The issue being after 10 seconds of initiating the call, the message "click to join" always returned "Call Ended" even if the call was still going on. + This was due to the fact that after closing the contextual bar, the react component gets unmounted and we are not able to keep track of ongoing call and increase jitsi room timeout. + + This PR solves this issue by using the setInterval methods on component will unmount. When the call component unmounts, we keep on checking the state of jitsi call and based on conditions increase the jitsi room timeout. After the call is ended all setInterval calls are closed. + + This PR also removes the implementation of HEARTBEAT events of JitsiBridge. This is because this is no longer needed and all logic is being taken care of by the unmount function. + +- Handle NPS errors instead of throwing them ([#21945](https://github.com/RocketChat/Rocket.Chat/pull/21945)) + +- Header Tag Visual Issues ([#21991](https://github.com/RocketChat/Rocket.Chat/pull/21991)) + + ### Normal + ![image](https://user-images.githubusercontent.com/27704687/117504793-69635600-af59-11eb-8b79-9d8f631490ee.png) + + ### Hover + ![image](https://user-images.githubusercontent.com/27704687/117504934-97489a80-af59-11eb-87c3-0a62731e9ce3.png) + +- Horizontal scrollbar not showing on tables ([#21852](https://github.com/RocketChat/Rocket.Chat/pull/21852)) + +- IE11 support ([#21893](https://github.com/RocketChat/Rocket.Chat/pull/21893)) + +- iFrame size on embedded videos ([#21992](https://github.com/RocketChat/Rocket.Chat/pull/21992)) + + ### Before + ![image](https://user-images.githubusercontent.com/27704687/117508802-8bf86d80-af5f-11eb-9eb8-29e55b73eac5.png) + + ### After + ![image](https://user-images.githubusercontent.com/27704687/117508870-a4688800-af5f-11eb-9176-7f24de5fc424.png) + +- Incorrect error message when opening channel in anonymous read ([#22066](https://github.com/RocketChat/Rocket.Chat/pull/22066) by [@lucassartor](https://github.com/lucassartor)) + + Every time you open a public channel with threads in it when using anonymous read an `Incorrect User` error will be thrown. + This is an incorrect behaviour as everything that is public should be valid for an anonymous user. + + Some files are adapted to that and have already removed this kind of incorrect error, but there are some that need some fix, this PR aims to do that. + +- Incorrect Team's Info spacing ([#22021](https://github.com/RocketChat/Rocket.Chat/pull/22021)) + + ![image](https://user-images.githubusercontent.com/27704687/118049044-9053ca80-b353-11eb-8b21-7a309ec2ba7e.png) + +- Label's disabled color on Create New Modal ([#21975](https://github.com/RocketChat/Rocket.Chat/pull/21975)) + + Captura de Tela 2021-05-06 às 13 20 06 + +- Make the FR translation consistent with the 'room' translation + typos ([#21913](https://github.com/RocketChat/Rocket.Chat/pull/21913) by [@Jeanstaquet](https://github.com/Jeanstaquet)) + + In the FR translation files, there were two terms that were used to refer to **'room'**: + - 'salon' (149 times used) + + ![image](https://user-images.githubusercontent.com/45966964/116829860-ac62a980-aba6-11eb-8212-e6f15ed0af82.png) + + - 'salle' (46 times used) + + ![image](https://user-images.githubusercontent.com/45966964/116829871-be444c80-aba6-11eb-9b42-e213fee6586a.png) + + The problem is that both were used in the same context and sometimes even in the same option list. + However, since 'salon' is a better translation and was also in the majority, I used the translation 'salon' wherever 'salle' was marked. + + For example: + ![image](https://user-images.githubusercontent.com/45966964/116830523-1da45b80-abab-11eb-81f8-5225d51cecc6.png) + +- Maximum 25 channels can be loaded in the teams' channels list ([#21708](https://github.com/RocketChat/Rocket.Chat/pull/21708) by [@Jeanstaquet](https://github.com/Jeanstaquet)) + + Before a maximum 25 of channels was able to be displayed in the teams' channels list. + +- Missing margins on select team modal ([#21965](https://github.com/RocketChat/Rocket.Chat/pull/21965)) + + ![select_team](https://user-images.githubusercontent.com/27704687/117164325-e5fc0600-ad9a-11eb-861e-a246064b78b4.png) + +- Missing proper permissions on Teams Channels ([#21946](https://github.com/RocketChat/Rocket.Chat/pull/21946)) + +- No warning message is sent when user is removed from a team's main channel ([#21949](https://github.com/RocketChat/Rocket.Chat/pull/21949)) + + - Send a warning message to a team's main channel when a user is removed from the team; + - Trigger events while removing a user from a team's main channel; + - Fix `usersCount` field in the team's main room when a user is removed from the team (`usersCount` is now decreased by 1). + +- Not possible accept video call if "Hide right sidebar with click" is enabled ([#22175](https://github.com/RocketChat/Rocket.Chat/pull/22175)) + +- Notify with sound first message in queue list ([#21969](https://github.com/RocketChat/Rocket.Chat/pull/21969)) + +- Open a new DM throwing error 404 ([#22100](https://github.com/RocketChat/Rocket.Chat/pull/22100)) + + Adapts the `openRoom` function to the new signature of `createDirectMessage`. + +- Permission's scope on Teams Channels ([#22083](https://github.com/RocketChat/Rocket.Chat/pull/22083)) + + Allow moderators and owners to add or create channels on Teams Channels + +- Presence.get method ([#22129](https://github.com/RocketChat/Rocket.Chat/pull/22129)) + + closes #21873 + +- Prevent the userInfo tab to return 'User not found' each time if a certain member of a DM group has been deleted ([#21970](https://github.com/RocketChat/Rocket.Chat/pull/21970) by [@Jeanstaquet](https://github.com/Jeanstaquet)) + + Prevent the userInfo tab to return 'User not found' if a member of a DM group has been deleted. + This happens if the user that has been deleted is the one originally displayed on the userInfo tab in a DM group with >2 users. + + https://user-images.githubusercontent.com/45966964/117221081-db785580-ae08-11eb-9b33-2314a99eb037.mp4 + +- Prune messages not cleaning up unread threads ([#21326](https://github.com/RocketChat/Rocket.Chat/pull/21326) by [@renancleyson-dev](https://github.com/renancleyson-dev)) + + Fixes permanent unread messages when admin prune at least two different thread messages in the room that were unread by some user. + ![screencapture-localhost-3000-channel-general-thread-2021-03-26-13_17_16](https://user-images.githubusercontent.com/43624243/112678973-62b9cd00-8e4a-11eb-9af9-56f17cc66baf.png) + +- Redirect on remove user from channel by user profile tab ([#21951](https://github.com/RocketChat/Rocket.Chat/pull/21951)) + + ![redirect](https://user-images.githubusercontent.com/27704687/117078454-498d2180-ad10-11eb-9df2-936552a2b3ce.gif) + +- Remove referer header when requesting attachment data ([#21987](https://github.com/RocketChat/Rocket.Chat/pull/21987)) + +- Removed fields from User Info for which the user doesn't have permissions. ([#20923](https://github.com/RocketChat/Rocket.Chat/pull/20923) by [@Darshilp326](https://github.com/Darshilp326)) + + Removed LastLogin, CreatedAt and Roles for users who don't have permission. + + https://user-images.githubusercontent.com/55157259/109381351-f2c62e80-78ff-11eb-9289-e11072bf62f8.mp4 + +- Replace `query` param by `name`, `username` and `status` on the `teams.members` endpoint ([#21539](https://github.com/RocketChat/Rocket.Chat/pull/21539)) + + - Replace `query` param by `name`, `username` and `status` on the `teams.members` endpoint. + +- Scenarios where 2FA enforcement was not working properly ([#22017](https://github.com/RocketChat/Rocket.Chat/pull/22017)) + +- Tooltip pointer is blocking Text ([#21645](https://github.com/RocketChat/Rocket.Chat/pull/21645) by [@sumukhah](https://github.com/sumukhah)) + +- Unable to edit a 'direct' room setting in the admin due to the room name ([#21636](https://github.com/RocketChat/Rocket.Chat/pull/21636) by [@Jeanstaquet](https://github.com/Jeanstaquet)) + + When you are in the admin and want to change a room 'd' setting, it doesn't work because it takes into account the name that is set automatically and therefore tries to save that name. Since the name is not valid and should not be registered, we cannot change the setting for the 'd' room. + I made sure that when you want to change a setting in a 'd' room, that you don't take the name into account + + + https://user-images.githubusercontent.com/45966964/115150919-cd85af00-a06a-11eb-9667-ef3dcfc5adb6.mp4 + + + Behind the scene, the name is not saved + +- Unable to edit a user who does not have an email via the admin or via the user's profile ([#21626](https://github.com/RocketChat/Rocket.Chat/pull/21626) by [@Jeanstaquet](https://github.com/Jeanstaquet)) + + If a user does not have an email address, they cannot change it via their profile or via the admin. I fixed this issue. I have created several profiles and there was one that didn't have an email, I don't know how I did it, I am working on it. I had not modified the db to delete his email, hence the fix + + in admin + + https://user-images.githubusercontent.com/45966964/115112617-9b9b1c80-9f86-11eb-8e3a-950c3c1a1746.mp4 + + + + in the user profile + + https://user-images.githubusercontent.com/45966964/115112620-a0f86700-9f86-11eb-97b1-56eaba42216b.mp4 + +- Unable to get channels, sort by most recent message ([#21701](https://github.com/RocketChat/Rocket.Chat/pull/21701) by [@sumukhah](https://github.com/sumukhah)) + +- Unable to update app manually ([#21215](https://github.com/RocketChat/Rocket.Chat/pull/21215)) + + It allows for update of apps using a zip file. + + When installing apps using the zip file, either by url or the file form, if the app was already installed, an error would be thrown stating the condition and forbidding the installation. Now, when sending a zip file of an app that is already installed, the user is presented with the following modal: + + ![2021-04-30-113936_627x235_scrot](https://user-images.githubusercontent.com/733282/116711383-2cbbbb80-a9a9-11eb-8c77-22d6802cb9f5.png) + + If the app also requires permissions to be reviewed, the modal that handles permission reviews will be shown after this one is accepted. + +- Unpin message reactivity ([#22029](https://github.com/RocketChat/Rocket.Chat/pull/22029)) + + ![Peek 2021-05-13 11-18](https://user-images.githubusercontent.com/27704687/118138696-03555380-b3dd-11eb-8549-730fff0b4ea8.gif) + +- Uploading files from WebDAV ([#21948](https://github.com/RocketChat/Rocket.Chat/pull/21948)) + +- User Impersonation through sendMessage API ([#20391](https://github.com/RocketChat/Rocket.Chat/pull/20391) by [@lucassartor](https://github.com/lucassartor)) + + Create a new permission: `message-impersonate`. For new installs only bot role will have the permission and for updating installs the permission will also be given to user role, so it won't break running deployments. + + If a message is being sent with `avatar` or `alias` properties, it validates if the sender has the `message-impersonate` permission, if not, an error is throwed: + ```json + { + "success": false, + "error": "Not enough permission", + "stack": "Error: Not enough permission\n ..." + } + ``` + +- Visibility of burger menu on certain width ([#20736](https://github.com/RocketChat/Rocket.Chat/pull/20736)) + + Burger was not visible on a certain width, specifically between 600 to 780. if width is more than 780px sidebar is shown, if less than 600 then burger icon was shown. But it wasn't shown between 600px to 780 px. + It was because for showing burger icon we were only checking for `isMobile` which is lenght only less than 600. So i added one more check for condition if length is less than 780 px. + +- When closing chats a comment is always required ([#21947](https://github.com/RocketChat/Rocket.Chat/pull/21947)) + + Fixes issue with the setting `Livechat_request_comment_when_closing_conversation` not working as intended + +- Workaround for Autolinker phone problem ([#21515](https://github.com/RocketChat/Rocket.Chat/pull/21515)) + +- Wrong color and size, thread list Metrics ([#21950](https://github.com/RocketChat/Rocket.Chat/pull/21950)) + + ![image](https://user-images.githubusercontent.com/40830821/117066452-1db57000-acff-11eb-9e75-956db65b2fb9.png) + +- Wrong icon on "Move to team" option in the channel info actions ([#21944](https://github.com/RocketChat/Rocket.Chat/pull/21944)) + + ![image](https://user-images.githubusercontent.com/40830821/117061659-d9bf6c80-acf8-11eb-8e29-be47e702dedd.png) + + Depends on https://github.com/RocketChat/Rocket.Chat.Fuselage/pull/444 + +
+🔍 Minor changes + + +- [EE] Improve Forwarding Department behaviour with Waiting queue feature ([#22043](https://github.com/RocketChat/Rocket.Chat/pull/22043)) + +- [EE] Omnichannel monitors not authorized to view departments ([#22048](https://github.com/RocketChat/Rocket.Chat/pull/22048)) + +- [FIXf] Parent Room Tag Overlapping ([#22009](https://github.com/RocketChat/Rocket.Chat/pull/22009)) + + ![tag](https://user-images.githubusercontent.com/27704687/117905720-069bf280-b2aa-11eb-81ed-a5b8c2152d54.gif) + +- Add two more test cases to the slash-command test suite ([#21317](https://github.com/RocketChat/Rocket.Chat/pull/21317) by [@EduardoPicolo](https://github.com/EduardoPicolo)) + + Added two more test cases to the slash-command test suite: + - 'should return an error when the command does not exist''; + - 'should return an error when no command is provided'; + +- Bump actions/stale from v3.0.8 to v3.0.18 ([#21877](https://github.com/RocketChat/Rocket.Chat/pull/21877) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump: Fuselage 0.26.0 ([#22178](https://github.com/RocketChat/Rocket.Chat/pull/22178)) + +- Chore: Add missing 'Teams' label in the i18n files for every languages ([#21751](https://github.com/RocketChat/Rocket.Chat/pull/21751) by [@Jeanstaquet](https://github.com/Jeanstaquet)) + + I added the missing Teams label in the i18n folder for EN, FR & NL + +- Chore: Add mongo 4.2 to array of mongo versions supported ([#21550](https://github.com/RocketChat/Rocket.Chat/pull/21550)) + + - MongoDB 4.2 is now supported + +- Chore: Bump message parser ([#22101](https://github.com/RocketChat/Rocket.Chat/pull/22101)) + +- Chore: Correct some spelling/typos in English for descriptions/modal ([#21832](https://github.com/RocketChat/Rocket.Chat/pull/21832) by [@Jeanstaquet](https://github.com/Jeanstaquet)) + + I found typos, spelling mistakes, I corrected them + +- Chore: Doc Client Readme ([#21588](https://github.com/RocketChat/Rocket.Chat/pull/21588) by [@umakantv](https://github.com/umakantv)) + +- Chore: fix invalid type name on TS file ([#21814](https://github.com/RocketChat/Rocket.Chat/pull/21814)) + +- Chore: Storybook organization and errors ([#21923](https://github.com/RocketChat/Rocket.Chat/pull/21923)) + +- Chore: Update Docker container references to use registry.rocket.chat endpoint ([#22080](https://github.com/RocketChat/Rocket.Chat/pull/22080) by [@aviaviavi](https://github.com/aviaviavi)) + + This change updates the Docker installation instructions to use the new registry.rocket.chat endpoint to pull the rocketchat/rocket.chat container. This is part of the rollout described here: https://rocket.chat/blog/product/docker-images-change/ + +- Chore: update fuselage && icons ([#22092](https://github.com/RocketChat/Rocket.Chat/pull/22092)) + +- i18n: Add missing translation string in account preference ([#21448](https://github.com/RocketChat/Rocket.Chat/pull/21448) by [@sumukhah](https://github.com/sumukhah)) + + "Test Desktop Notifications" was missing in translation, Added to the file. + Screenshot 2021-04-05 at 3 58 01 PM + + Screenshot 2021-04-05 at 3 58 32 PM + +- i18n: Correct a typo in German ([#21711](https://github.com/RocketChat/Rocket.Chat/pull/21711) by [@Jeanstaquet](https://github.com/Jeanstaquet)) + +- Language update from LingoHub 🤖 on 2021-04-26Z ([#21801](https://github.com/RocketChat/Rocket.Chat/pull/21801)) + +- Language update from LingoHub 🤖 on 2021-05-03Z ([#21917](https://github.com/RocketChat/Rocket.Chat/pull/21917)) + +- Language update from LingoHub 🤖 on 2021-05-10Z ([#21998](https://github.com/RocketChat/Rocket.Chat/pull/21998)) + +- Language update from LingoHub 🤖 on 2021-05-18Z ([#22065](https://github.com/RocketChat/Rocket.Chat/pull/22065)) + +- Merge master into develop & Set version to 3.15.0-develop ([#21847](https://github.com/RocketChat/Rocket.Chat/pull/21847)) + +- Regression: Add "User left team" message type ([#22109](https://github.com/RocketChat/Rocket.Chat/pull/22109)) + + - Add 'ult' system message type, which is sent when a user leaves a team ("Has left the team."). + +- Regression: Add i18n to license error messages ([#22171](https://github.com/RocketChat/Rocket.Chat/pull/22171)) + +- Regression: Add impersonate permission to app role ([#22006](https://github.com/RocketChat/Rocket.Chat/pull/22006)) + +- regression: bump Rocket.Chat.Fuselage package with paginated selects ([#22059](https://github.com/RocketChat/Rocket.Chat/pull/22059)) + +- Regression: discussions display on sidebar ([#22157](https://github.com/RocketChat/Rocket.Chat/pull/22157)) + + ### group by type active + ![image](https://user-images.githubusercontent.com/27704687/119741996-37a92500-be5d-11eb-8b36-4067a7a229f1.png) + + ### group by type inactive + ![image](https://user-images.githubusercontent.com/27704687/119742054-56a7b700-be5d-11eb-8810-e31d4216f573.png) + +- regression: fix departments with empty ancestors not being returned ([#22068](https://github.com/RocketChat/Rocket.Chat/pull/22068)) + +- Regression: Fix new 'message-impersonate' permission blocking livechat messages ([#21961](https://github.com/RocketChat/Rocket.Chat/pull/21961)) + +- Regression: Fix send message validation ([#21982](https://github.com/RocketChat/Rocket.Chat/pull/21982)) + +- regression: Fix Users list in the Administration ([#22034](https://github.com/RocketChat/Rocket.Chat/pull/22034) by [@Jeanstaquet](https://github.com/Jeanstaquet)) + + The app crashed if no custom fields for user profiles have been created by the admin. I fixed this issue. This bug was introduced by a recent commit. + + https://user-images.githubusercontent.com/45966964/118210838-5b3a9b80-b46b-11eb-9fe5-5b813848190c.mp4 + +- Regression: Improve migration 225 ([#22099](https://github.com/RocketChat/Rocket.Chat/pull/22099)) + +- Regression: Make referrer header configurable ([#22126](https://github.com/RocketChat/Rocket.Chat/pull/22126)) + +- Regression: Match `name` or `fname` when fetching room to send notification for blocked log in attemps ([#22067](https://github.com/RocketChat/Rocket.Chat/pull/22067)) + +- regression: Migration 225 setting not being fetched correctly ([#22108](https://github.com/RocketChat/Rocket.Chat/pull/22108)) + +- Regression: Missing room scope on teams channels permission ([#22137](https://github.com/RocketChat/Rocket.Chat/pull/22137)) + +- regression: Misspelled property in migration 225 ([#22093](https://github.com/RocketChat/Rocket.Chat/pull/22093)) + +- Regression: not allowed to edit roles due to a new verification ([#22159](https://github.com/RocketChat/Rocket.Chat/pull/22159)) + + introduced by https://github.com/RocketChat/Rocket.Chat/pull/21905 + ![Peek 2021-05-26 22-21](https://user-images.githubusercontent.com/27704687/119750970-b9567e00-be70-11eb-9d52-04c8595950df.gif) + +- regression: Select Team Modal margin ([#22030](https://github.com/RocketChat/Rocket.Chat/pull/22030)) + + ![image](https://user-images.githubusercontent.com/27704687/118140652-f2a5dd00-b3de-11eb-8075-d0cac4b28650.png) + +- regression: UserInfoTab Broken ([#22019](https://github.com/RocketChat/Rocket.Chat/pull/22019)) + +- Regression: Visual issue on sort list item ([#22158](https://github.com/RocketChat/Rocket.Chat/pull/22158)) + + ### before + ![image](https://user-images.githubusercontent.com/27704687/119743703-d84d1400-be60-11eb-97cc-c8256b2c8b07.png) + + ### after + ![image](https://user-images.githubusercontent.com/27704687/119743638-b18edd80-be60-11eb-828d-22cc5e1b2f5b.png) + +- Release 3.14.2 ([#22135](https://github.com/RocketChat/Rocket.Chat/pull/22135)) + +- Release 3.14.4 ([#22181](https://github.com/RocketChat/Rocket.Chat/pull/22181)) + +- Remove memory leak from userData ([#22094](https://github.com/RocketChat/Rocket.Chat/pull/22094) by [@g-thome](https://github.com/g-thome)) + +- String helpers ([#21988](https://github.com/RocketChat/Rocket.Chat/pull/21988)) + + It uses string helpers from a external package (`@rocket.chat/string-helpers`). + +- Update Apps-Engine version ([#22176](https://github.com/RocketChat/Rocket.Chat/pull/22176)) + +- Upgrade to GitHub-native Dependabot ([#21874](https://github.com/RocketChat/Rocket.Chat/pull/21874) by [@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Darshilp326](https://github.com/Darshilp326) +- [@Deepak-learner](https://github.com/Deepak-learner) +- [@EduardoPicolo](https://github.com/EduardoPicolo) +- [@Jeanstaquet](https://github.com/Jeanstaquet) +- [@aviaviavi](https://github.com/aviaviavi) +- [@bhavayAnand9](https://github.com/bhavayAnand9) +- [@dependabot-preview[bot]](https://github.com/dependabot-preview[bot]) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@g-thome](https://github.com/g-thome) +- [@lucassartor](https://github.com/lucassartor) +- [@rafaelblink](https://github.com/rafaelblink) +- [@renancleyson-dev](https://github.com/renancleyson-dev) +- [@savish28](https://github.com/savish28) +- [@siva2204](https://github.com/siva2204) +- [@sumukhah](https://github.com/sumukhah) +- [@umakantv](https://github.com/umakantv) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@d-gubert](https://github.com/d-gubert) +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@marceloschmidt](https://github.com/marceloschmidt) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@thassiov](https://github.com/thassiov) +- [@tiagoevanp](https://github.com/tiagoevanp) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 3.14.5 +`2021-06-06 · 1 🚀 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.25.0` + +### 🚀 Improvements + + +- Send only relevant data via WebSocket ([#22258](https://github.com/RocketChat/Rocket.Chat/pull/22258)) + + Previously when any data changed on subscriptions or rooms we were getting fresh data from database, to also remove undesired fields, but sometimes the data that changed was not relevant so we were sending the whole object everytime **without** the fields that actually changed. This change aims to reduce this overhead and also send less data to clients. + +### 🐛 Bug fixes + + +- Support DISABLE_PRESENCE_MONITOR env var in new DB watchers ([#22257](https://github.com/RocketChat/Rocket.Chat/pull/22257)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.14.4 +`2021-05-28 · 2 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.25.0` + +### 🐛 Bug fixes + + +- Discussion names showing a random value ([#22172](https://github.com/RocketChat/Rocket.Chat/pull/22172)) + +- Security Hotfix (https://docs.rocket.chat/guides/security/security-updates) + +
+🔍 Minor changes + + +- Release 3.14.4 ([#22181](https://github.com/RocketChat/Rocket.Chat/pull/22181)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.14.3 +`2021-05-26 · 1 🐛 · 1 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.25.0` + +### 🐛 Bug fixes + + +- **ENTERPRISE:** Omnichannel Monitors can't forward chats to departments that they are not supervising ([#22142](https://github.com/RocketChat/Rocket.Chat/pull/22142)) + +
+🔍 Minor changes + + +- Release 3.14.3 ([#22147](https://github.com/RocketChat/Rocket.Chat/pull/22147)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@murtaza98](https://github.com/murtaza98) +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.14.2 +`2021-05-25 · 1 🐛 · 1 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.25.0` + +### 🐛 Bug fixes + + +- Security Hotfix (https://docs.rocket.chat/guides/security/security-updates) + +
+🔍 Minor changes + + +- Release 3.14.2 ([#22135](https://github.com/RocketChat/Rocket.Chat/pull/22135)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@g-thome](https://github.com/g-thome) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.14.1 +`2021-05-19 · 1 🎉 · 2 🚀 · 4 🐛 · 3 🔍 · 7 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.25.0` + +### 🎉 New features + + +- Paginated and Filtered selects on new/edit unit ([#22052](https://github.com/RocketChat/Rocket.Chat/pull/22052) by [@rafaelblink](https://github.com/rafaelblink)) + + REQUIRES https://github.com/RocketChat/Rocket.Chat.Fuselage/pull/447 + + Adds infinite scrolling selects to the units edit/create with the ability to be filtered by text as well + + ![Screen Shot 2021-05-17 at 9 24 19 AM](https://user-images.githubusercontent.com/20868078/118487999-abc32a80-b6f1-11eb-8d58-d031111ea0fb.png) + + This Affects the monitors and departments inputs + +### 🚀 Improvements + + +- Forwarding Department behaviour with Waiting queue feature ([#22043](https://github.com/RocketChat/Rocket.Chat/pull/22043)) + +- Omnichannel Room Information panel flow when user save or close on form page. ([#21688](https://github.com/RocketChat/Rocket.Chat/pull/21688) by [@rafaelblink](https://github.com/rafaelblink)) + +### 🐛 Bug fixes + + +- Close stream properly at Omnichannel room when move to queue ([#22015](https://github.com/RocketChat/Rocket.Chat/pull/22015)) + +- IE11 support ([#21893](https://github.com/RocketChat/Rocket.Chat/pull/21893)) + +- Notify with sound first message in queue list ([#21969](https://github.com/RocketChat/Rocket.Chat/pull/21969)) + +- When closing chats a comment is always required ([#21947](https://github.com/RocketChat/Rocket.Chat/pull/21947)) + + Fixes issue with the setting `Livechat_request_comment_when_closing_conversation` not working as intended + +
+🔍 Minor changes + + +- [EE] Omnichannel monitors not authorized to view departments ([#22048](https://github.com/RocketChat/Rocket.Chat/pull/22048)) + +- [Patch] [EE] Improve Forwarding Department behaviour with Waiting queue feature ([#22077](https://github.com/RocketChat/Rocket.Chat/pull/22077)) + +- regression: fix departments with empty ancestors not being returned ([#22068](https://github.com/RocketChat/Rocket.Chat/pull/22068)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@rafaelblink](https://github.com/rafaelblink) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@dougfabris](https://github.com/dougfabris) +- [@ggazzo](https://github.com/ggazzo) +- [@murtaza98](https://github.com/murtaza98) +- [@renatobecker](https://github.com/renatobecker) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 3.14.0 +`2021-04-28 · 9 🎉 · 9 🚀 · 55 🐛 · 38 🔍 · 30 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.22.1` +- NPM: `6.14.1` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.25.0` + +### 🎉 New features + + +- **APPS:** Method to fetch Livechat Departments ([#21690](https://github.com/RocketChat/Rocket.Chat/pull/21690)) + + New method in the livechat bridge that allows apps to fetch departments that are enabled and have agents assigned + +- **APPS:** onInstall and onUninstall events ([#21565](https://github.com/RocketChat/Rocket.Chat/pull/21565) by [@lucassartor](https://github.com/lucassartor)) + + Adding the `user` information when installing and uninstalling an App to the Apps-Engine. + +- **ENTERPRISE:** LDAP Teams Sync ([#21658](https://github.com/RocketChat/Rocket.Chat/pull/21658)) + +- **Enterprise:** Second layer encryption for data transport (alpha) ([#21692](https://github.com/RocketChat/Rocket.Chat/pull/21692)) + + The second layer encryption for data transport works implementing the ECDH algorithm where session keys are exchanged before the rest of the communication. This feature is **enterprise only** since it requires the micro-services architecture and it's in the early stage of tests as an **alpha** feature and documentation may not be available before the beta stage. + +- New set of rules for client code ([#21318](https://github.com/RocketChat/Rocket.Chat/pull/21318)) + + This _small_ PR does the following: + + - Now **React** is the web client's first-class citizen, being **loaded before Blaze**. Thus, `BlazeLayout` calls render templates inside of a React component (`BlazeLayoutWrapper`); + - Main client startup code, including polyfills, is written in **TypeScript**; + - At the moment, routes are treated as regular startup code; it's expected that `FlowRouter` will be deprecated in favor of a new routing library; + - **React** was updated to major version **17**, deprecating the usage of `React` as namespace (e.g. use `memo()` instead of `React.memo()`); + - The `client/` and `ee/client/` directory are linted with a **custom ESLint configuration** that includes: + - **Prettier**; + - `react-hooks/*` rules for TypeScript files; + - `react/no-multi-comp`, enforcing the rule of **one single React component per module**; + - `react/display-name`, which enforces that **React components must have a name for debugging**; + - `import/named`, avoiding broken named imports. + - A bunch of components were refactored to match the new ESLint rules. + +- On Hold system messages ([#21360](https://github.com/RocketChat/Rocket.Chat/pull/21360) by [@rafaelblink](https://github.com/rafaelblink)) + + ![image](https://user-images.githubusercontent.com/34130764/115442079-3a49a680-a22f-11eb-9ee8-6c705097cd57.png) + +- Password history ([#21607](https://github.com/RocketChat/Rocket.Chat/pull/21607)) + + - Store each user's previously used passwords in a `passwordHistory` field (in the `users` record); + - Users' previously used passwords are stored in their `passwordHistory` even when the setting is disabled; + - Add "Password History" setting -- when enabled, it blocks users from reusing their most recent passwords; + - Convert `comparePassword` file to TypeScript. + + ![Password_Change](https://user-images.githubusercontent.com/36537004/115035168-ac726200-9ea2-11eb-93c6-fc8182ba5f3f.png) + ![Password_History](https://user-images.githubusercontent.com/36537004/115035175-ad0af880-9ea2-11eb-9f40-94c6327a9854.png) + +- REST endpoint `teams.update` ([#21134](https://github.com/RocketChat/Rocket.Chat/pull/21134) by [@g-thome](https://github.com/g-thome)) + + add teams.update endpoint + +- Standard Importer Structure ([#18357](https://github.com/RocketChat/Rocket.Chat/pull/18357)) + +### 🚀 Improvements + + +- **APPS:** Scheduler option to skip immediate execution of recurring jobs ([#21353](https://github.com/RocketChat/Rocket.Chat/pull/21353) by [@lolimay](https://github.com/lolimay)) + + Create and schedule a task manually at `scheduleRecurring` method so the first iteration runs after the configured interval. This is accomplished by adding the setting `skipImmediate: true` when setting up the task. + +- Add error messages to the creation of channels or usernames containing reserved words ([#21016](https://github.com/RocketChat/Rocket.Chat/pull/21016)) + + Display error messages when the user attempts to create or edit users' or channels' names with any of the following words (**case-insensitive**): + - admin; + - administrator; + - system; + - user. + ![create-channel](https://user-images.githubusercontent.com/36537004/110132223-b421ef80-7da9-11eb-82bc-f0d4e1df967f.png) + ![register-username](https://user-images.githubusercontent.com/36537004/110132234-b71ce000-7da9-11eb-904e-580233625951.png) + ![change-channel](https://user-images.githubusercontent.com/36537004/110143057-96f31e00-7db5-11eb-994a-39ae9e63392e.png) + ![change-username](https://user-images.githubusercontent.com/36537004/110143065-98244b00-7db5-11eb-9d13-afc5dc9866de.png) + +- add permission check when adding a channel to a team ([#21689](https://github.com/RocketChat/Rocket.Chat/pull/21689) by [@g-thome](https://github.com/g-thome)) + + add permission check for each room + +- Add proxy for data export ([#20998](https://github.com/RocketChat/Rocket.Chat/pull/20998)) + + Add a proxy for data export downloads (instead of just linking ufs urls) so we can have more control over its response. Also added a human readable message when the user tries to download the user-data unauthenticated. + +- Add support to range downloads on file system storage ([#21463](https://github.com/RocketChat/Rocket.Chat/pull/21463)) + +- Alert on team deletion ([#21617](https://github.com/RocketChat/Rocket.Chat/pull/21617)) + + Screen Shot 2021-04-16 at 7 03 30 PM + +- Do not require pre-configured tags in Omnichannel chats ([#21488](https://github.com/RocketChat/Rocket.Chat/pull/21488) by [@rafaelblink](https://github.com/rafaelblink)) + +- OEmbed details by requesting using the accept language header on the request ([#21686](https://github.com/RocketChat/Rocket.Chat/pull/21686)) + + - Send `Accept-Language` header on oembed requests + +- Resize custom emojis on upload instead of saving at max res ([#21593](https://github.com/RocketChat/Rocket.Chat/pull/21593)) + + - Create new MediaService (ideally, should be in charge of all media-related operations) + - Resize emojis to 128x128 + +### 🐛 Bug fixes + + +- **Enterprise:** Omnichannel simultaneous chat limit is not properly checking the limit by department ([#21839](https://github.com/RocketChat/Rocket.Chat/pull/21839)) + + The Omnichannel Concurrent Chat Limit feature is not working properly when checking the limit per department, the reason is that the algorithm that fetches the number of ongoing chats per agent wasn't considering the department of the subscriptions, hence, the number returned from DB was bigger than it should be. + +- Add tag input to Closing Chat modal ([#21462](https://github.com/RocketChat/Rocket.Chat/pull/21462) by [@rafaelblink](https://github.com/rafaelblink)) + +- Admin Users list pagination ([#21469](https://github.com/RocketChat/Rocket.Chat/pull/21469)) + + - Fix Administration/Users pagination + +- Allow deletion of own account for passwordless accounts (e.g. OAUTH) ([#21119](https://github.com/RocketChat/Rocket.Chat/pull/21119) by [@wolbernd](https://github.com/wolbernd)) + +- Allows more than 25 discussions/files to be loaded in the contextualbar ([#21511](https://github.com/RocketChat/Rocket.Chat/pull/21511) by [@Jeanstaquet](https://github.com/Jeanstaquet)) + + In some places, you could not load more than 25 threads/discussions/files on the screen when searching the lists in the contextualbar. + Threads & list are numbered for a better view of the solution + + + https://user-images.githubusercontent.com/45966964/114222225-93335800-996e-11eb-833f-568e83129aae.mp4 + +- Allows more than 25 threads to be loaded, fixes #21507 ([#21508](https://github.com/RocketChat/Rocket.Chat/pull/21508) by [@Jeanstaquet](https://github.com/Jeanstaquet)) + +- Allows to display more than 25 users maximum in the users list ([#21518](https://github.com/RocketChat/Rocket.Chat/pull/21518) by [@Jeanstaquet](https://github.com/Jeanstaquet)) + + Now when you scroll to the bottom of the users list, it shows more users. Before the fix, the limit for the query for loadMore was calculated so that no additional users could be loaded. + + Before + + https://user-images.githubusercontent.com/45966964/114249739-baece500-999b-11eb-9bb0-3a5bcee18ad8.mp4 + + After + + + https://user-images.githubusercontent.com/45966964/114249895-364e9680-999c-11eb-985c-47aedc763488.mp4 + +- App installation from marketplace not correctly displaying the permissions ([#21470](https://github.com/RocketChat/Rocket.Chat/pull/21470)) + + Fixes the marketplace app installation not correctly displaying the permissions modal. + +- Archive permissions for room moderator ([#21563](https://github.com/RocketChat/Rocket.Chat/pull/21563)) + +- Attachment files are not rendered properly on SMS channels ([#21746](https://github.com/RocketChat/Rocket.Chat/pull/21746)) + +- Audio message same pattern as image message ([#21466](https://github.com/RocketChat/Rocket.Chat/pull/21466)) + + ![image](https://user-images.githubusercontent.com/17487063/113760168-4c363000-96ec-11eb-9138-0fbcedb3fa42.png) + +- Avoid sidebar being broke ([#21490](https://github.com/RocketChat/Rocket.Chat/pull/21490)) + +- Change margin size for quote messages ([#21461](https://github.com/RocketChat/Rocket.Chat/pull/21461)) + + ![image](https://user-images.githubusercontent.com/17487063/113723723-02d3e980-96c8-11eb-9bc7-70aab5ea8091.png) + +- Change team private info text ([#21535](https://github.com/RocketChat/Rocket.Chat/pull/21535)) + +- Change the active appearance for toolbox buttons ([#21416](https://github.com/RocketChat/Rocket.Chat/pull/21416)) + + ![image](https://user-images.githubusercontent.com/17487063/113359447-2d1b5500-931e-11eb-81fa-86f60fcee3a9.png) + +- Checking 'start-discussion' Permission for MessageBox Actions ([#21564](https://github.com/RocketChat/Rocket.Chat/pull/21564)) + + Permissions 'start-discussion-other-user' and 'start-discussion' are checked everywhere before letting anyone start any discussions, this permission check was missing for message box actions, so added it. + +- Close chat button is not available for Omnichannel agents ([#21481](https://github.com/RocketChat/Rocket.Chat/pull/21481) by [@rafaelblink](https://github.com/rafaelblink)) + +- Correcting the case there are no result in admin users list ([#21556](https://github.com/RocketChat/Rocket.Chat/pull/21556) by [@Jeanstaquet](https://github.com/Jeanstaquet)) + + I added a default case to the total when there are no result to the user's query + +- Discussions not showing in Safari ([#21270](https://github.com/RocketChat/Rocket.Chat/pull/21270) by [@Kartik18g](https://github.com/Kartik18g)) + +- Don't allow whitespace on bold, italic and strike ([#21483](https://github.com/RocketChat/Rocket.Chat/pull/21483)) + + Stops the original markdown rendered from rendering empty bold, italic and strike text. Stops `_ _`, `* *` and `~ ~` + +- Don't ask again modals blinking ([#21454](https://github.com/RocketChat/Rocket.Chat/pull/21454)) + + Made the check before opening the modal. + +- Duplicated header on admin's user contextualbar ([#21810](https://github.com/RocketChat/Rocket.Chat/pull/21810)) + + ![image](https://user-images.githubusercontent.com/27704687/116125858-5ff60600-a69c-11eb-9859-41f7393b78bf.png) + +- Error when editing Omnichannel rooms without custom fields ([#21450](https://github.com/RocketChat/Rocket.Chat/pull/21450) by [@rafaelblink](https://github.com/rafaelblink)) + +- Fix the bugs opening discussions ([#21557](https://github.com/RocketChat/Rocket.Chat/pull/21557) by [@Jeanstaquet](https://github.com/Jeanstaquet)) + + I added the right row export to display the discussions list + +- Generic Attachment broken somehow ([#21657](https://github.com/RocketChat/Rocket.Chat/pull/21657)) + +- Header component breaking if user is not part of teams room. ([#21465](https://github.com/RocketChat/Rocket.Chat/pull/21465)) + +- Livechat not retrieving messages ([#21644](https://github.com/RocketChat/Rocket.Chat/pull/21644) by [@cuonghuunguyen](https://github.com/cuonghuunguyen)) + +- Make Omnichannel's closing chat button the last action in the toolbox ([#21476](https://github.com/RocketChat/Rocket.Chat/pull/21476) by [@rafaelblink](https://github.com/rafaelblink)) + +- Margins on contextual bar information ([#21457](https://github.com/RocketChat/Rocket.Chat/pull/21457)) + + ### Room + **Before** + ![image](https://user-images.githubusercontent.com/27704687/115080812-ba8fa500-9ed9-11eb-9078-3625603bf92b.png) + + **After** + ![image](https://user-images.githubusercontent.com/27704687/115080966-e9a61680-9ed9-11eb-929f-6516c1563e99.png) + + ### Livechat + ![image](https://user-images.githubusercontent.com/27704687/113640101-1859fc80-9651-11eb-88f8-09a899953988.png) + +- Message Block ordering ([#21464](https://github.com/RocketChat/Rocket.Chat/pull/21464)) + + Reactions should come before reply button. + ![image](https://user-images.githubusercontent.com/40830821/113748926-6f0e1780-96df-11eb-93a5-ddcfa891413e.png) + +- Message link null corrupts message rendering ([#21579](https://github.com/RocketChat/Rocket.Chat/pull/21579) by [@g-thome](https://github.com/g-thome)) + + Additional checks on message_link field before rendering message contents + +- Omnichannel Activity Monitor closing chats returned to the queue ([#21782](https://github.com/RocketChat/Rocket.Chat/pull/21782)) + + Fix `VisitorInactivityMonitor` is still monitoring rooms that returned to `Queue Chats` + +- Omnichannel current chats and agents grid aren't sorting by status properly ([#21616](https://github.com/RocketChat/Rocket.Chat/pull/21616) by [@rafaelblink](https://github.com/rafaelblink)) + +- Omnichannel queue manager returning outdated room object ([#21485](https://github.com/RocketChat/Rocket.Chat/pull/21485)) + + The Omnichannel Queue Manager is returning outdated room object when delegating the chat to an agent, hence, our Livechat widget is affected and the agent assigned to the chat is not displayed on the widget, only after refreshing/reloading. + +- Omnichannel room information panel breaking due to lack of data verification ([#21608](https://github.com/RocketChat/Rocket.Chat/pull/21608) by [@rafaelblink](https://github.com/rafaelblink)) + +- public teams not appearing on spotlight search results ([#21495](https://github.com/RocketChat/Rocket.Chat/pull/21495)) + +- Remove all agent subscriptions when an Omnichannel chat is closed ([#21509](https://github.com/RocketChat/Rocket.Chat/pull/21509)) + +- Remove size prop from StatusBullet component ([#21428](https://github.com/RocketChat/Rocket.Chat/pull/21428)) + +- Rename Omnichannel Rooms, Inquiries and Subscriptions when the Contact Name changes ([#21513](https://github.com/RocketChat/Rocket.Chat/pull/21513) by [@rafaelblink](https://github.com/rafaelblink)) + +- Rename team not working properly ([#21552](https://github.com/RocketChat/Rocket.Chat/pull/21552)) + +- Selected channels are not showing in Teams ([#21669](https://github.com/RocketChat/Rocket.Chat/pull/21669) by [@sumukhah](https://github.com/sumukhah)) + +- Send alternative color to unread sidebar icon ([#21432](https://github.com/RocketChat/Rocket.Chat/pull/21432)) + + ![image](https://user-images.githubusercontent.com/17487063/113469819-08f76b00-9427-11eb-942e-783c186ba7cd.png) + +- Show direct rooms as readonly when one of the users is deactivated ([#21684](https://github.com/RocketChat/Rocket.Chat/pull/21684)) + +- Tag component is no longer rendering on Chat Room Information panel ([#21429](https://github.com/RocketChat/Rocket.Chat/pull/21429) by [@rafaelblink](https://github.com/rafaelblink)) + +- Team types in admin -> rooms. ([#21612](https://github.com/RocketChat/Rocket.Chat/pull/21612)) + + ![print](https://user-images.githubusercontent.com/40830821/115068327-82339b00-9ec8-11eb-8e37-726baf9d2db0.jpg) + +- Team's channels list for teams with too many channels ([#21491](https://github.com/RocketChat/Rocket.Chat/pull/21491)) + + - Fix teams.listRooms pagination for non-admin users + +- Too many request on loadHistory method ([#21594](https://github.com/RocketChat/Rocket.Chat/pull/21594)) + +- Toolbox icons order ([#21739](https://github.com/RocketChat/Rocket.Chat/pull/21739)) + +- Typos/missing elements in the French translation ([#21525](https://github.com/RocketChat/Rocket.Chat/pull/21525) by [@Jeanstaquet](https://github.com/Jeanstaquet)) + + - I have corrected some typos in the translation + - I added a translation for missing words + - I took the opportunity to correct a mistranslated word + - Test_Desktop_Notifications was missing in the EN and FR file + ![image](https://user-images.githubusercontent.com/45966964/114290186-e7792d80-9a7d-11eb-8164-3b5e72e93703.png) + +- Updating a message causing URLs to be parsed even within markdown code ([#21489](https://github.com/RocketChat/Rocket.Chat/pull/21489)) + + - Fix `updateMessage` to avoid parsing URLs inside markdown + - Honor `parseUrls` property when updating messages + +- Use async await in TeamChannels delete channel action ([#21534](https://github.com/RocketChat/Rocket.Chat/pull/21534)) + +- User status out of sync ([#21656](https://github.com/RocketChat/Rocket.Chat/pull/21656)) + +- Wrong title on Omnichannel contact information panel ([#21682](https://github.com/RocketChat/Rocket.Chat/pull/21682) by [@rafaelblink](https://github.com/rafaelblink)) + +- Wrong useMemo on Priorities EE field. ([#21453](https://github.com/RocketChat/Rocket.Chat/pull/21453) by [@rafaelblink](https://github.com/rafaelblink)) + +- Wrong user in user info ([#21451](https://github.com/RocketChat/Rocket.Chat/pull/21451)) + + Fixed some race conditions in admin. + + Self DMs used to be created with the userId duplicated. Sometimes rooms can have 2 equal uids, but it's a self DM. Fixed a getter so this isn't a problem anymore. + +
+🔍 Minor changes + + +- Doc: Corrected links to documentation of rocket.chat README.md ([#20478](https://github.com/RocketChat/Rocket.Chat/pull/20478) by [@joshi008](https://github.com/joshi008)) + + The link for documentation in the readme was previously https://rocket.chat/docs/ while that was not working and according to the website it was https://docs.rocket.chat/ + The link for deployment methods in readme was corrected from https://rocket.chat/docs/installation/paas-deployments/ to https://docs.rocket.chat/installation/paas-deployments + Some more links to the documentations were giving 404 error which hence updated. + +- [Improve] Remove useless tabbar options from Omnichannel rooms ([#21561](https://github.com/RocketChat/Rocket.Chat/pull/21561) by [@rafaelblink](https://github.com/rafaelblink)) + +- A React-based replacement for BlazeLayout ([#21527](https://github.com/RocketChat/Rocket.Chat/pull/21527)) + + - The Meteor package **`kadira:blaze-layout` was removed**; + - A **global subscription** for the current application layout (**`appLayout`**) replaces `BlazeLayout` entirely; + - The **`#react-root` element** is rendered on server-side instead of dynamically injected into the DOM tree; + - The **"page loading" throbber** is now rendered on the React tree; + - The **`renderRouteComponent` helper was removed**; + - Some code run without any criteria on **`main` template** module was moved into **client startup modules**; + - React portals used to embed Blaze templates have their own subscription (**`blazePortals`**); + - Some **route components were refactored** to remove a URL path trap originally disabled by `renderRouteComponent`; + - A new component to embed the DOM nodes generated by **`RoomManager`** was created. + +- Add ')' after Date and Time in DB migration ([#21519](https://github.com/RocketChat/Rocket.Chat/pull/21519) by [@im-adithya](https://github.com/im-adithya)) + +- Bump Apps-Engine version ([#21840](https://github.com/RocketChat/Rocket.Chat/pull/21840)) + +- bump fuselage ([#21841](https://github.com/RocketChat/Rocket.Chat/pull/21841)) + +- Bump Livechat Version ([#21694](https://github.com/RocketChat/Rocket.Chat/pull/21694)) + +- Chore: Add tests for teams.update REST endpoint ([#21653](https://github.com/RocketChat/Rocket.Chat/pull/21653) by [@g-thome](https://github.com/g-thome)) + + add more tests to this endpoint + +- Chore: Cache EE node_modules on CI ([#21831](https://github.com/RocketChat/Rocket.Chat/pull/21831)) + +- Chore: Do not stop animations on Test Mode ([#21484](https://github.com/RocketChat/Rocket.Chat/pull/21484)) + +- Chore: Increase testing coverage on password policy class ([#21482](https://github.com/RocketChat/Rocket.Chat/pull/21482)) + +- Chore: Meteor update to 2.1.1 ([#21494](https://github.com/RocketChat/Rocket.Chat/pull/21494)) + + Basically Node update to version 12.22.1 + + Meteor change log https://github.com/meteor/meteor/blob/devel/History.md#v211-2021-04-06 + +- Chore: Remove control character from room model operation ([#21493](https://github.com/RocketChat/Rocket.Chat/pull/21493)) + +- Fix typo in app/apps/README file ([#21204](https://github.com/RocketChat/Rocket.Chat/pull/21204) by [@sauravjoshi23](https://github.com/sauravjoshi23)) + +- Fix: Missing module `eventemitter3` for micro services ([#21611](https://github.com/RocketChat/Rocket.Chat/pull/21611)) + + - Fix error when running micro services after version 3.12 + - Fix build of docker image version latest for micro services + +- Language update from LingoHub 🤖 on 2021-04-05Z ([#21446](https://github.com/RocketChat/Rocket.Chat/pull/21446)) + +- Language update from LingoHub 🤖 on 2021-04-12Z ([#21530](https://github.com/RocketChat/Rocket.Chat/pull/21530)) + +- Language update from LingoHub 🤖 on 2021-04-19Z ([#21642](https://github.com/RocketChat/Rocket.Chat/pull/21642)) + +- Merge master into develop & Set version to 3.14.0-develop ([#21441](https://github.com/RocketChat/Rocket.Chat/pull/21441)) + +- QoL improvements to add channel to team flow ([#21778](https://github.com/RocketChat/Rocket.Chat/pull/21778)) + + - Fixed canAccessRoom validation + - Added e2e tests + - Removed channels that user cannot add to the team from autocomplete suggestions + - Improved error messages + +- Regression: Bold, italic and strike render (Original markdown) ([#21747](https://github.com/RocketChat/Rocket.Chat/pull/21747)) + + Modified regex to avoid spaces between the marked text and the symbols. Also made it possible to apply the three markings at the same time, independing of order. + +- regression: Cannot enable e2e in direct room. ([#21650](https://github.com/RocketChat/Rocket.Chat/pull/21650)) + +- Regression: Change CI files hashes for caching ([#21776](https://github.com/RocketChat/Rocket.Chat/pull/21776)) + +- Regression: Edit user in admin breaking ([#21613](https://github.com/RocketChat/Rocket.Chat/pull/21613)) + +- Regression: Fix room not returning to the previous room after directory ([#21757](https://github.com/RocketChat/Rocket.Chat/pull/21757)) + +- Regression: Fix scroll to bottom ([#21731](https://github.com/RocketChat/Rocket.Chat/pull/21731)) + +- Regression: Fix services Docker image build ([#21750](https://github.com/RocketChat/Rocket.Chat/pull/21750)) + +- regression: Italic being parsed with surrounding non-whitespace text ([#21815](https://github.com/RocketChat/Rocket.Chat/pull/21815)) + +- Regression: Legacy Banner Position ([#21598](https://github.com/RocketChat/Rocket.Chat/pull/21598)) + + ### Before: + ![image](https://user-images.githubusercontent.com/27704687/114961773-dc3c4e00-9e3f-11eb-9a32-e882db3fbfbc.png) + + ### After + ![image](https://user-images.githubusercontent.com/27704687/114961673-a6976500-9e3f-11eb-9238-a12870d7db8f.png) + +- regression: Markdown broken on safari ([#21780](https://github.com/RocketChat/Rocket.Chat/pull/21780)) + +- Regression: Problem with Importer's logs ([#21812](https://github.com/RocketChat/Rocket.Chat/pull/21812)) + +- Regression: React + Blaze reconciliation ([#21567](https://github.com/RocketChat/Rocket.Chat/pull/21567)) + +- Regression: Reactivate direct conversations only if all involved users are active ([#21714](https://github.com/RocketChat/Rocket.Chat/pull/21714)) + +- Regression: Reconnection not working properly due to changes on ECHD Proxy ([#21741](https://github.com/RocketChat/Rocket.Chat/pull/21741)) + + The ECHD Proxy implements a delay on websocket connection, the first implementation lost the reference to auto reconnect functionality. + +- regression: Team Channels actions ([#21417](https://github.com/RocketChat/Rocket.Chat/pull/21417)) + +- Regression: team sync not accepting multiple teams ([#21768](https://github.com/RocketChat/Rocket.Chat/pull/21768)) + +- Regression: Unread Threads Header and List ([#21816](https://github.com/RocketChat/Rocket.Chat/pull/21816)) + +- Regression: Update fuselage for icons fix ([#21809](https://github.com/RocketChat/Rocket.Chat/pull/21809)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Jeanstaquet](https://github.com/Jeanstaquet) +- [@Kartik18g](https://github.com/Kartik18g) +- [@cuonghuunguyen](https://github.com/cuonghuunguyen) +- [@g-thome](https://github.com/g-thome) +- [@im-adithya](https://github.com/im-adithya) +- [@joshi008](https://github.com/joshi008) +- [@lolimay](https://github.com/lolimay) +- [@lucassartor](https://github.com/lucassartor) +- [@rafaelblink](https://github.com/rafaelblink) +- [@sauravjoshi23](https://github.com/sauravjoshi23) +- [@sumukhah](https://github.com/sumukhah) +- [@wolbernd](https://github.com/wolbernd) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@d-gubert](https://github.com/d-gubert) +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@r0zbot](https://github.com/r0zbot) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@thassiov](https://github.com/thassiov) +- [@tiagoevanp](https://github.com/tiagoevanp) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 3.13.5 +`2021-05-27 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.21.0` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.24.1` + +### 🐛 Bug fixes + + +- Discussion names showing a random value ([#22172](https://github.com/RocketChat/Rocket.Chat/pull/22172)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.13.3 +`2021-04-20 · 2 🐛 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.21.0` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.24.1` + +### 🐛 Bug fixes + + +- Livechat not retrieving messages ([#21644](https://github.com/RocketChat/Rocket.Chat/pull/21644) by [@cuonghuunguyen](https://github.com/cuonghuunguyen)) + +- Team's channels list for teams with too many channels ([#21491](https://github.com/RocketChat/Rocket.Chat/pull/21491)) + + - Fix teams.listRooms pagination for non-admin users + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@cuonghuunguyen](https://github.com/cuonghuunguyen) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.13.2 +`2021-04-14 · 1 🐛 · 1 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.21.0` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.24.1` + +### 🐛 Bug fixes + + +- Security Hotfix (https://docs.rocket.chat/guides/security/security-updates) + +
+🔍 Minor changes + + +- Release 3.13.2 ([#21570](https://github.com/RocketChat/Rocket.Chat/pull/21570)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.13.1 +`2021-04-08 · 9 🐛 · 1 🔍 · 8 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.21.0` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.24.1` + +### 🐛 Bug fixes + + +- Add tag input to Closing Chat modal ([#21462](https://github.com/RocketChat/Rocket.Chat/pull/21462) by [@rafaelblink](https://github.com/rafaelblink)) + +- Admin Users list pagination ([#21469](https://github.com/RocketChat/Rocket.Chat/pull/21469)) + + - Fix Administration/Users pagination + +- App installation from marketplace not correctly displaying the permissions ([#21470](https://github.com/RocketChat/Rocket.Chat/pull/21470)) + + Fixes the marketplace app installation not correctly displaying the permissions modal. + +- Close chat button is not available for Omnichannel agents ([#21481](https://github.com/RocketChat/Rocket.Chat/pull/21481) by [@rafaelblink](https://github.com/rafaelblink)) + +- Error when editing Omnichannel rooms without custom fields ([#21450](https://github.com/RocketChat/Rocket.Chat/pull/21450) by [@rafaelblink](https://github.com/rafaelblink)) + +- Header component breaking if user is not part of teams room. ([#21465](https://github.com/RocketChat/Rocket.Chat/pull/21465)) + +- Make Omnichannel's closing chat button the last action in the toolbox ([#21476](https://github.com/RocketChat/Rocket.Chat/pull/21476) by [@rafaelblink](https://github.com/rafaelblink)) + +- Omnichannel queue manager returning outdated room object ([#21485](https://github.com/RocketChat/Rocket.Chat/pull/21485)) + + The Omnichannel Queue Manager is returning outdated room object when delegating the chat to an agent, hence, our Livechat widget is affected and the agent assigned to the chat is not displayed on the widget, only after refreshing/reloading. + +- Wrong useMemo on Priorities EE field. ([#21453](https://github.com/RocketChat/Rocket.Chat/pull/21453) by [@rafaelblink](https://github.com/rafaelblink)) + +
+🔍 Minor changes + + +- Release 3.13.1 ([#21486](https://github.com/RocketChat/Rocket.Chat/pull/21486) by [@rafaelblink](https://github.com/rafaelblink)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@rafaelblink](https://github.com/rafaelblink) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@d-gubert](https://github.com/d-gubert) +- [@gabriellsh](https://github.com/gabriellsh) +- [@graywolf336](https://github.com/graywolf336) +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@thassiov](https://github.com/thassiov) + +# 3.13.0 +`2021-04-04 · 7 🎉 · 11 🚀 · 36 🐛 · 61 🔍 · 38 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.21.0` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.24.0` + +### 🎉 New features + + +- **APPS:** Map description as a room value in Apps ([#20811](https://github.com/RocketChat/Rocket.Chat/pull/20811) by [@lucassartor](https://github.com/lucassartor)) + + Add the `description` value of a `room` as a mapped value in the Apps-Engine. That way developers can get the `description` information from a `room` in their app. + +- **APPS:** New event interfaces for pre/post user leaving a room ([#20917](https://github.com/RocketChat/Rocket.Chat/pull/20917) by [@lucassartor](https://github.com/lucassartor)) + + Added events and errors that trigger when a user leaves a room. + That way it can communicate with the Apps-Engine by the `IPreRoomUserLeave` and `IPostRoomUserLeave` event interfaces. + +- **Enterprise:** Omnichannel On-Hold Queue ([#20945](https://github.com/RocketChat/Rocket.Chat/pull/20945)) + + ### About this feature + This feature has been introduced to deal with Inactive chats. A chat is considered Inactive if an Omnichannel End User (aka Visitor) has not replied back to an agent in some time. These types of inactive chats become very important when an organisation has a limit set for `Max Simultaneous Chats per agent` which is defined by the following setting :point_down: , as more number of Inactive chats would directly affect an agent's productivity. + ![image](https://user-images.githubusercontent.com/34130764/111533003-4d7ad980-878c-11eb-8c1c-2796678a07db.png) + + Before this feature, we only had one option to deal with such Inactive/Abandoned chats - which was to auto close abandoned chats via this setting :point_down: + ![image](https://user-images.githubusercontent.com/34130764/111534353-e65e2480-878d-11eb-82a5-71368064ef45.png) + + however closing a chat isn't a best option for some cases. Let me take an example to explain a scenario + + > An agent is assisting a customer for installing a very huge software which is likely to take more than 20-30 minutes to download. In such scenarios closing a chat isn't the best approach since even after the lengthy download the customer might still need some assist from the agent. + > So basically this chat is going to block the agent's queue until the customer is able to finish his time-consuming download task in which he/she doesn't require any agent's assistance. Due to the `Max Simultaneous Chats per agent` limit, the agent is also not able to use this extra time to help other customer thus affecting his overall productivity. + + **So how does the On-Hold feature solve this problem?** + With the On-Hold feature, an agent is now able to place a chat on-hold. On-Hold chats **don’t count towards the maximum number of concurrent chats** an agent can have. So in our above example, the agent can simply now place the customer on-hold for 20-30 minutes until the customer downloads the software and within this time, the agent can serve other customers - hence increasing the productivity of an agent. + + ---------------------------------------- + ### Working of the new On-Hold feature + + #### How can you place a chat on Hold ? + + A chat can be placed on-hold via 2 means + 1. Automatically place Abandoned chats On-hold + ![image](https://user-images.githubusercontent.com/34130764/111537074-06431780-8791-11eb-8d23-99f5d9f8ec45.png) + Via this :top: option you can define a timer which will get started when a customer sends a message. If we don't receive any message from the customer within this timer, the timer will get expired and the chat will be considered as Abandoned. + ![image](https://user-images.githubusercontent.com/34130764/111537346-53bf8480-8791-11eb-8dc7-260633b4e98f.png) + The via this :top: setting you can choose to automatically place this abandoned chat On Hold + 2. Manually place a chat On Hold + As an admin, you can allow an agent to manually place a chat on-hold. To do so, you'll need to turn on this :point_down: setting + ![image](https://user-images.githubusercontent.com/34130764/111537545-97b28980-8791-11eb-86fd-db45b87e9cc1.png) + Now an agent will be able to see a new `On Hold` button within their `Visitor Info Panel` like this :point_down: , provided the agent has sent the last message + ![image](https://user-images.githubusercontent.com/34130764/111537853-f24be580-8791-11eb-9561-d77ba430c625.png) + + #### How can you resume a On Hold chat ? + An On Hold chat can be resumed via 2 means + + 1. If the Customer sends a message + If the Customer / Omnichannel End User sends a message to the On Hold chat, the On Hold chat will get automatically resumed. + 2. Manually by agent + An Agent can manually resume the On Hold chat via clicking the `Resume` button in the bottom of a chat room. + ![image](https://user-images.githubusercontent.com/34130764/111538666-f88e9180-8792-11eb-8d14-01453b8e3db0.png) + + #### What would happen if the agent already reached maximum chats, and a On-Hold chat gets resumed ? + Based on how the chat was resumed, there are multiple cases are each case is dealt differently + + - If an agent manually tries to resume the On Hold chat, he/she will get an error saying `Maximum Simultaneous chat limit reached` + - If a customer replies back on an On Hold chat and the last serving agent has reached maximum capacity, then this customer will be placed on the queue again from where based on the Routing Algorithm selected, the chat will get transferred to any available agent + +- Ability to hide 'Room topic changed' system messages ([#21062](https://github.com/RocketChat/Rocket.Chat/pull/21062) by [@Tirieru](https://github.com/Tirieru)) + +- Add Omnichannel Livechat Trigger option for when user opens the chat window ([#20030](https://github.com/RocketChat/Rocket.Chat/pull/20030) by [@reda-alaoui](https://github.com/reda-alaoui)) + +- Quick action buttons for Omnichannel ([#21123](https://github.com/RocketChat/Rocket.Chat/pull/21123) by [@rafaelblink](https://github.com/rafaelblink)) + +- Teams ([#20966](https://github.com/RocketChat/Rocket.Chat/pull/20966) by [@g-thome](https://github.com/g-thome)) + + ## Teams + + + + You can easily group your users as Teams on Rocket.Chat. The feature takes the hassle out of managing multiple users one by one and allows you to handle them at the same time efficiently. + + + - Teams can be public or private and each team can have its own channels, which also can be public or private. + - It's possible to add existing channels to a Team or create new ones inside a Team. + - It's possible to invite people outside a Team to join Team's channels. + - It's possible to convert channels to Teams + - It's possible to add all team members to a channel at once + - Team members have roles + + + ![image](https://user-images.githubusercontent.com/70927132/113421955-4f56b680-93a2-11eb-80dc-9b70a3f09b3e.png) + + + + **Quickly onboard new users with Autojoin channels** + + Teams can have Auto-join channels – channels to which the team members are automatically added, so you don’t need to go through the manual process of adding users repetitively + + ![image](https://user-images.githubusercontent.com/70927132/113419284-81194e80-939d-11eb-9fff-aeb05cbc8089.png) + + **Instantly mention multiple members at once** (available in EE) + + With Teams, you don’t need to remember everyone’s name to communicate with a team quickly. Just mention a Team — @engineers, for instance — and all members will be instantly notified. + +### 🚀 Improvements + + +- Add spacing between elements in Profile Page ([#20742](https://github.com/RocketChat/Rocket.Chat/pull/20742) by [@cyberShaw](https://github.com/cyberShaw)) + +- Added modal-box for preview after recording audio. ([#20370](https://github.com/RocketChat/Rocket.Chat/pull/20370) by [@Darshilp326](https://github.com/Darshilp326)) + + A modal box will be displayed so that users can change the filename and add description. + + **Before** + + https://user-images.githubusercontent.com/55157259/105687301-4e2a8880-5f1e-11eb-873d-dc8a880a2fc8.mp4 + + **After** + + https://user-images.githubusercontent.com/55157259/105687342-597db400-5f1e-11eb-8b61-8f9d9ebad0c4.mp4 + +- Adds toast after follow/unfollow messages and following icon for followed messages without threads. ([#20025](https://github.com/RocketChat/Rocket.Chat/pull/20025) by [@RonLek](https://github.com/RonLek)) + + There was no alert on following/unfollowing a message previously. Also, it was impossible to make out a followed message with no threads from an unfollowed one. + + This PR would show an alert on following/unfollowing a message and also display a small bell icon (similar to the ones for starred and pinned messages) when a message with no thread is followed. + + https://user-images.githubusercontent.com/28918901/103813540-43e73e00-5086-11eb-8592-2877eb650f3e.mp4 + +- Back to threads list button on threads contextual bar ([#20882](https://github.com/RocketChat/Rocket.Chat/pull/20882)) + + ![image](https://user-images.githubusercontent.com/27704687/108926702-ad62e200-761d-11eb-8c18-5406246a6955.png) + +- Better new channel popover ([#21018](https://github.com/RocketChat/Rocket.Chat/pull/21018)) + +- grammatical typos in pull request template ([#21115](https://github.com/RocketChat/Rocket.Chat/pull/21115) by [@sumukhah](https://github.com/sumukhah)) + +- Improve Apps permission modal ([#21193](https://github.com/RocketChat/Rocket.Chat/pull/21193) by [@lucassartor](https://github.com/lucassartor)) + + Improve the UI of the Apps permission modal when installing an App that requires permissions. + + **New UI:** + ![after](https://user-images.githubusercontent.com/49413772/111685622-e817fe80-8806-11eb-998d-b56623560e74.PNG) + + **Old UI:** + ![before](https://user-images.githubusercontent.com/49413772/111685897-375e2f00-8807-11eb-814e-cb8060dc1830.PNG) + +- Make debug logs of Apps configurable via Log_Level setting in the Admin panel ([#21000](https://github.com/RocketChat/Rocket.Chat/pull/21000) by [@cuonghuunguyen](https://github.com/cuonghuunguyen)) + +- Re-design Omnichannel Room Info Panel ([#21199](https://github.com/RocketChat/Rocket.Chat/pull/21199) by [@rafaelblink](https://github.com/rafaelblink)) + +- Set description in create channel modal ([#21132](https://github.com/RocketChat/Rocket.Chat/pull/21132)) + +- Sort Users List In Case Insensitive Manner ([#20790](https://github.com/RocketChat/Rocket.Chat/pull/20790) by [@aditya-mitra](https://github.com/aditya-mitra)) + + The users listed in the admin panel were sorted in a case-sensitive manner , where the capitals came first and then the small letters (like - *A B C a b c*). This Change fixes this by sorting the names in a caseinsensitive manner (now - *A a B b C c*). + + ### Before + + ![before](https://user-images.githubusercontent.com/55396651/108189880-3fa74980-7137-11eb-99da-6498707b4bf8.png) + + + ### With This Change + + ![after](https://user-images.githubusercontent.com/55396651/108190177-9dd42c80-7137-11eb-8b4e-b7cef4ba512f.png) + +### 🐛 Bug fixes + + +- 'Chats in Progress' Section is not rendering when the routing algorithm is not Manual Selection ([#21324](https://github.com/RocketChat/Rocket.Chat/pull/21324)) + +- "Taken At" and "Average of Response Time" fields not rendering properly on Room Information panel ([#21365](https://github.com/RocketChat/Rocket.Chat/pull/21365) by [@rafaelblink](https://github.com/rafaelblink)) + +- **Apps:** Fix Game Center icon disappeared after the React refactor ([#21091](https://github.com/RocketChat/Rocket.Chat/pull/21091) by [@lolimay](https://github.com/lolimay)) + +- **APPS:** Warn message while installing app in air-gapped environment ([#20992](https://github.com/RocketChat/Rocket.Chat/pull/20992) by [@lucassartor](https://github.com/lucassartor)) + + Change **error** message to a **warn** message when uploading a `.zip` file app into a air-gapped environment. + + The **error** message was giving the impression for the user that the app wasn't properly being installed , which it wasn't the case: + ![error](https://user-images.githubusercontent.com/49413772/109855273-d3e4d680-7c36-11eb-824b-ad455d24710c.PNG) + + A more detailed **warn** message can fix that impression for the user: + ![warn](https://user-images.githubusercontent.com/49413772/109855383-f2e36880-7c36-11eb-8d61-c442980bd8fd.PNG) + +- Add missing `unreads` field to `users.info` REST endpoint ([#20905](https://github.com/RocketChat/Rocket.Chat/pull/20905)) + +- Added hideUnreadStatus check before showing unread messages on roomList ([#20867](https://github.com/RocketChat/Rocket.Chat/pull/20867)) + + Added hide unread counter check, if the show unread messages is turned off, now unread messages badge won't be shown to user. + +- Broken message fields attachment handling ([#21069](https://github.com/RocketChat/Rocket.Chat/pull/21069)) + + Avoids an `undefined` value to break a rendered attachment. + +- Correct direction for admin mapview text ([#20897](https://github.com/RocketChat/Rocket.Chat/pull/20897) by [@aKn1ghtOut](https://github.com/aKn1ghtOut)) + + ![Screenshot from 2021-02-25 02-49-21](https://user-images.githubusercontent.com/38764067/109068512-f8602080-7715-11eb-8e22-d610f9d046d8.png) + ![Screenshot from 2021-02-25 02-49-46](https://user-images.githubusercontent.com/38764067/109068516-fa29e400-7715-11eb-9119-1c79abce278f.png) + ![Screenshot from 2021-02-25 02-49-57](https://user-images.githubusercontent.com/38764067/109068519-fbf3a780-7715-11eb-8b3d-0dc32f898725.png) + + The text says the share button will be on the left of the messagebox once enabled. However, it actually is on the right. + +- Correct ignored message CSS ([#20928](https://github.com/RocketChat/Rocket.Chat/pull/20928) by [@aKn1ghtOut](https://github.com/aKn1ghtOut)) + + Modified the CSS to not affect the ignored sequential messages exactly like the non-ignored messages, which is what was causing the second and further ignored message o appear weirdly when unhidden one by one. + +- Correct Inline reactions behaviour ([#20743](https://github.com/RocketChat/Rocket.Chat/pull/20743) by [@aKn1ghtOut](https://github.com/aKn1ghtOut)) + + The $().data function was returning outdated values for re-assigned emoji buttons with new data. Changed that to use the .attr() function. This works perfectly. + +- Correct Typo - donwload to download ([#21096](https://github.com/RocketChat/Rocket.Chat/pull/21096) by [@aditya-mitra](https://github.com/aditya-mitra)) + + Correct the spelling of _donwload_ to _download_ in `TitleLink` of Attachments. + +- Custom emojis to override default ([#20359](https://github.com/RocketChat/Rocket.Chat/pull/20359) by [@aKn1ghtOut](https://github.com/aKn1ghtOut)) + + Due to the sequence of the imports and how the emojiRenderer prioritizes lists, the custom emojis could not override the emojione emojis. Making two small changes fixed the issue. + + With the custom emoji for `:facepalm:` added, you can check out the result below: + ### Before + ![Screenshot from 2021-01-25 02-20-04](https://user-images.githubusercontent.com/38764067/105643088-dfb0e080-5eb3-11eb-8a00-582c53fbe9a4.png) + + ### After + ![Screenshot from 2021-01-25 02-18-58](https://user-images.githubusercontent.com/38764067/105643076-cdcf3d80-5eb3-11eb-84b8-5dbc4f1135df.png) + +- Empty URL in user avatar doesn't show error and enables save ([#20440](https://github.com/RocketChat/Rocket.Chat/pull/20440) by [@im-adithya](https://github.com/im-adithya)) + + Added toast and disabled save. + +- Ensure E2E is enabled/disabled on sending message ([#21084](https://github.com/RocketChat/Rocket.Chat/pull/21084)) + + Rooms which were encrypted somewhere in the past still could encrypt messages due to a race condition due to a query over `Subscriptions` collection. + +- Fix the search list showing the last channel ([#21160](https://github.com/RocketChat/Rocket.Chat/pull/21160) by [@shrinish123](https://github.com/shrinish123)) + + The search list now also properly shows the last channel + Before : + + ![searchlist](https://user-images.githubusercontent.com/56491104/111471487-f3a7ee80-874e-11eb-9c6e-19bbf0731d60.png) + + After : + ![search_final](https://user-images.githubusercontent.com/56491104/111471521-fe628380-874e-11eb-8fa3-d1edb57587e1.png) + +- Follow thread action on threads list ([#20881](https://github.com/RocketChat/Rocket.Chat/pull/20881)) + + https://user-images.githubusercontent.com/27704687/108925036-a4bcdc80-761a-11eb-83b8-2df8960f74cb.mp4 + +- Iframe flags for audio and video on the BigBlueButton integration ([#20879](https://github.com/RocketChat/Rocket.Chat/pull/20879) by [@fcecagno](https://github.com/fcecagno)) + +- Inactivity Time field displaying wrong information ([#21363](https://github.com/RocketChat/Rocket.Chat/pull/21363) by [@rafaelblink](https://github.com/rafaelblink)) + +- Incorrect time format of the Queue Time field on the room information page ([#21394](https://github.com/RocketChat/Rocket.Chat/pull/21394) by [@rafaelblink](https://github.com/rafaelblink)) + +- Make custom emoji file required ([#19583](https://github.com/RocketChat/Rocket.Chat/pull/19583) by [@m-shreyansh](https://github.com/m-shreyansh)) + +- Missing app permissions translation ([#21066](https://github.com/RocketChat/Rocket.Chat/pull/21066)) + + Add missing translations for some app permissions + +- Missing Keywords in Permissions ([#20354](https://github.com/RocketChat/Rocket.Chat/pull/20354) by [@im-adithya](https://github.com/im-adithya)) + + The keywords were added to the i18n folder. (Default only) + +- Multi Select isn't working in Export Messages ([#21236](https://github.com/RocketChat/Rocket.Chat/pull/21236) by [@PriyaBihani](https://github.com/PriyaBihani)) + + While exporting messages, we were not able to select multiple Users like this: + + https://user-images.githubusercontent.com/69837339/111953057-169a2000-8b0c-11eb-94a4-0e1657683f96.mp4 + + Now we can select multiple users: + + + https://user-images.githubusercontent.com/69837339/111953097-274a9600-8b0c-11eb-9177-bec388b042bd.mp4 + +- New Channel popover not closing ([#21080](https://github.com/RocketChat/Rocket.Chat/pull/21080)) + + https://user-images.githubusercontent.com/17487063/110828228-92c37680-8275-11eb-9fce-fb40765935a3.mp4 + +- OEmbedURLWidget - Show Full Embedded Text Description ([#20569](https://github.com/RocketChat/Rocket.Chat/pull/20569) by [@aditya-mitra](https://github.com/aditya-mitra)) + + Embeds were cutoff when either _urls had a long description_. + This was handled by removing `overflow:hidden;text-overflow:ellipsis;` from the inline styles in [`oembedUrlWidget.html`](https://github.com/RocketChat/Rocket.Chat/blob/develop/app/oembed/client/oembedUrlWidget.html#L28). + + ### Earlier + + ![earlier](https://user-images.githubusercontent.com/55396651/107110825-00dcde00-6871-11eb-866e-13cabc5b0d05.png) + + ### Now + + ![now](https://user-images.githubusercontent.com/55396651/107110794-ca06c800-6870-11eb-9b3b-168679936612.png) + +- Reactions list showing users in reactions option of message action. ([#20753](https://github.com/RocketChat/Rocket.Chat/pull/20753) by [@Darshilp326](https://github.com/Darshilp326)) + + Reactions list shows emojis with respected users who have reacted with that emoji. + + https://user-images.githubusercontent.com/55157259/107857609-5870e000-6e55-11eb-8137-494a9f71b171.mp4 + +- Removing truncation from profile ([#20352](https://github.com/RocketChat/Rocket.Chat/pull/20352) by [@aKn1ghtOut](https://github.com/aKn1ghtOut)) + + Truncating text in profile view was making some information completely inaccessible. Removed it from the user status and the custom fields where if the information is longer, the user would actually want to see all of it. + + ### Before + ![Screenshot from 2021-01-24 20-54-44](https://user-images.githubusercontent.com/38764067/105634935-7e264d00-5e86-11eb-8a6c-9f2a363e0f6c.png) + + ### After + ![Screenshot from 2021-01-24 20-54-06](https://user-images.githubusercontent.com/38764067/105634940-82eb0100-5e86-11eb-8b90-e97a43c5e938.png) + +- Replace wrong field description on Room Information panel ([#21395](https://github.com/RocketChat/Rocket.Chat/pull/21395) by [@rafaelblink](https://github.com/rafaelblink)) + +- Reply count of message is decreased after a message from thread is deleted ([#19977](https://github.com/RocketChat/Rocket.Chat/pull/19977)) + + The reply count now is decreased if a message from a thread is deleted. + +- Set establishing to false if OTR timeouts ([#21183](https://github.com/RocketChat/Rocket.Chat/pull/21183) by [@Darshilp326](https://github.com/Darshilp326)) + + Set establishing false if OTR timeouts. + + https://user-images.githubusercontent.com/55157259/111617086-b30cab80-8808-11eb-8740-3b4ffacfc322.mp4 + +- Sidebar scroll missing full height ([#21071](https://github.com/RocketChat/Rocket.Chat/pull/21071)) + + ![image](https://user-images.githubusercontent.com/27704687/110708646-c05ae200-81d9-11eb-86da-1d6a2e99b6e5.png) + +- undefined in PruneMessages deleting DM ([#20873](https://github.com/RocketChat/Rocket.Chat/pull/20873) by [@vova-zush](https://github.com/vova-zush)) + + Fix undefined in Prune Messages in direct + +- Unexpected open or close visitor info ([#21094](https://github.com/RocketChat/Rocket.Chat/pull/21094)) + + The VisitorInfo component closes or open every time a new message was sent, this PR fix that. + +- Use the correct icons for DMs ([#21125](https://github.com/RocketChat/Rocket.Chat/pull/21125)) + +- Visitors.info endpoint being called multiple times ([#21350](https://github.com/RocketChat/Rocket.Chat/pull/21350) by [@rafaelblink](https://github.com/rafaelblink)) + +- Wrong license seats number administration info panel ([#21222](https://github.com/RocketChat/Rocket.Chat/pull/21222)) + + The administration info panel was showing the *total of users* as the number counted for the usage of the license seats. Now it's showing the correct number that is *active users*. This was not affecting the license validation on the server-side, only causing confusion for the administrators to check how the usage was being counted. + +
+🔍 Minor changes + + +- [Fix] Broken useEffect opened new BBB Tab twice ([#20770](https://github.com/RocketChat/Rocket.Chat/pull/20770) by [@Cosnavel](https://github.com/Cosnavel)) + +- Bump Livechat Widget ([#21264](https://github.com/RocketChat/Rocket.Chat/pull/21264)) + + Update Livechat version to 1.9.0 + +- Change the order of Sort Setup Wizard options ([#21073](https://github.com/RocketChat/Rocket.Chat/pull/21073)) + + Sort options in select fields of settings during Setup Wizard according to browser's locale. + +- Chore: Add tests for Meteor methods ([#20901](https://github.com/RocketChat/Rocket.Chat/pull/20901)) + + Add end-to-end tests for the following meteor methods + + - [x] public-settings:get + - [x] rooms:get + - [x] subscriptions:get + - [x] permissions:get + - [x] loadMissedMessages + - [x] loadHistory + - [x] listCustomUserStatus + - [x] getUserRoles + - [x] getRoomRoles (called by the API, already covered) + - [x] getMessages + - [x] getUsersOfRoom + - [x] loadNextMessages + - [x] getThreadMessages + +- Chore: Meteor update 2.1 ([#21061](https://github.com/RocketChat/Rocket.Chat/pull/21061)) + +- Chore: Remove `new Buffer` in favor of `Buffer.from` ([#20918](https://github.com/RocketChat/Rocket.Chat/pull/20918)) + + - Changes `new Buffer` to `Buffer.from` since the first one is deprecated. + +- EE Team Mentions ([#21418](https://github.com/RocketChat/Rocket.Chat/pull/21418)) + +- Improve: Increase testing coverage ([#21015](https://github.com/RocketChat/Rocket.Chat/pull/21015)) + + Add test for + - settings/raw + - minimongo/comparisons + +- Improve: NPS survey fetch ([#21263](https://github.com/RocketChat/Rocket.Chat/pull/21263)) + +- Regression: New chat forwarding modal is not verifying mandatory values ([#21288](https://github.com/RocketChat/Rocket.Chat/pull/21288) by [@rafaelblink](https://github.com/rafaelblink)) + +- Regression: Add BreadCrumbs tag into auto-join items ([#21294](https://github.com/RocketChat/Rocket.Chat/pull/21294)) + +- Regression: Add call to eraseRoom method ([#21392](https://github.com/RocketChat/Rocket.Chat/pull/21392)) + + - Replace `removeById` by `eraseRoom` method's call (which not only deletes the room, but also erases its subscriptions and triggers some apps-engine events). + +- Regression: Add isLastOwner property on teams.listRoomsOfUser endpoint ([#21323](https://github.com/RocketChat/Rocket.Chat/pull/21323)) + +- Regression: Add number of team members to teams.list and teams.listAll ([#21361](https://github.com/RocketChat/Rocket.Chat/pull/21361) by [@g-thome](https://github.com/g-thome)) + +- Regression: Add scope to permission checks in Team's endpoints ([#21369](https://github.com/RocketChat/Rocket.Chat/pull/21369)) + + - Include scope (team's main room ID) in the permission checks; + - Remove the `teamName` parameter from the `members`, `addMembers`, `updateMember` and `removeMembers` methods (since `teamId` will always be defined). + +- Regression: Add support to filter on `teams.listRooms` endpoint ([#21327](https://github.com/RocketChat/Rocket.Chat/pull/21327)) + + - Add support for queries (within the `query` parameter); + - Add support to pagination (`offset` and `count`) when an user doesn't have the permission to get all rooms. + +- Regression: Add teams support to directory ([#21351](https://github.com/RocketChat/Rocket.Chat/pull/21351)) + + - Change `directory.js` to reduce function complexity + - Add `teams` type of item. Directory will return all public teams & private teams the user is part of. + +- Regression: add view room action on Teams Channels ([#21295](https://github.com/RocketChat/Rocket.Chat/pull/21295)) + + ![image](https://user-images.githubusercontent.com/27704687/112379914-7e489a80-8cc7-11eb-9b0b-e454bb05755d.png) + +- Regression: Change name-error description ([#21385](https://github.com/RocketChat/Rocket.Chat/pull/21385)) + +- Regression: Channel owner can't convert it into a team. ([#21349](https://github.com/RocketChat/Rocket.Chat/pull/21349)) + +- Regression: Contact Chat History component not visible ([#21316](https://github.com/RocketChat/Rocket.Chat/pull/21316)) + +- Regression: Delete team member from related team's rooms ([#21401](https://github.com/RocketChat/Rocket.Chat/pull/21401)) + +- regression: Directory - teams tab search ([#21419](https://github.com/RocketChat/Rocket.Chat/pull/21419)) + +- Regression: directory not showing public channels of public teams ([#21400](https://github.com/RocketChat/Rocket.Chat/pull/21400)) + +- regression: Discussion room crashing if not member of parent channel ([#21310](https://github.com/RocketChat/Rocket.Chat/pull/21310)) + +- Regression: Error clicking on non joined channels on team channel list ([#21422](https://github.com/RocketChat/Rocket.Chat/pull/21422)) + +- Regression: Fix channels not being added to team on creation ([#21370](https://github.com/RocketChat/Rocket.Chat/pull/21370)) + +- Regression: Fix Members List Icon ([#21433](https://github.com/RocketChat/Rocket.Chat/pull/21433)) + +- Regression: Fix non encrypted rooms failing sending messages ([#21287](https://github.com/RocketChat/Rocket.Chat/pull/21287)) + +- Regression: Fix reactivity on teamsMembers and roomMembers ([#21366](https://github.com/RocketChat/Rocket.Chat/pull/21366)) + +- Regression: Fix TeamsChannels reactivity ([#21384](https://github.com/RocketChat/Rocket.Chat/pull/21384)) + +- Regression: General improvement to Teams ([#21402](https://github.com/RocketChat/Rocket.Chat/pull/21402)) + +- Regression: header title tag style ([#21415](https://github.com/RocketChat/Rocket.Chat/pull/21415)) + + ![image](https://user-images.githubusercontent.com/27704687/113326208-bebf9e00-92ef-11eb-97f7-91ae978fc400.png) + +- Regression: Headers icon breaking DMs ([#21412](https://github.com/RocketChat/Rocket.Chat/pull/21412)) + +- Regression: invalid teams permission check. ([#21374](https://github.com/RocketChat/Rocket.Chat/pull/21374)) + +- Regression: Modify canAccessRoom to adapt to teams specification ([#21372](https://github.com/RocketChat/Rocket.Chat/pull/21372)) + +- Regression: New endpoint to list rooms available to be added to any team ([#21373](https://github.com/RocketChat/Rocket.Chat/pull/21373)) + +- Regression: Omnichannel agents can't access new action buttons ([#21306](https://github.com/RocketChat/Rocket.Chat/pull/21306)) + +- Regression: Permissions missing on new Room Edit and Contact Edit form ([#21315](https://github.com/RocketChat/Rocket.Chat/pull/21315) by [@rafaelblink](https://github.com/rafaelblink)) + +- Regression: Quick action button missing for Omnichannel On-Hold queue ([#21285](https://github.com/RocketChat/Rocket.Chat/pull/21285)) + + - Move the Manual On Hold button to the new Omnichannel Header + ![image](https://user-images.githubusercontent.com/34130764/112291749-6ae10380-8cb6-11eb-94cd-e05efc14b1bf.png) + ![image](https://user-images.githubusercontent.com/34130764/112304146-27d95d00-8cc3-11eb-85db-dde04a110dd1.png) + + - Minor fixes + +- regression: Remove Breadcrumbs and update Tag component ([#21399](https://github.com/RocketChat/Rocket.Chat/pull/21399)) + +- Regression: Remove channel action on add channel's modal don't work ([#21356](https://github.com/RocketChat/Rocket.Chat/pull/21356)) + + ![removechannel-on-add-existing-modal](https://user-images.githubusercontent.com/27704687/112911017-eda8fa80-90ca-11eb-9c24-47a70be0c314.gif) + + ![image](https://user-images.githubusercontent.com/27704687/112911052-02858e00-90cb-11eb-85a2-0ef1f5f9ffd9.png) + +- Regression: Remove primary color from button in TeamChannels component ([#21293](https://github.com/RocketChat/Rocket.Chat/pull/21293)) + +- regression: remove user modal not showing up ([#21348](https://github.com/RocketChat/Rocket.Chat/pull/21348)) + +- Regression: Removing user from team doesn't remove them from the team's room. ([#21291](https://github.com/RocketChat/Rocket.Chat/pull/21291)) + + - Remove subscription when calling `teams.removeMembers` + +- Regression: Room Edit form not rendering priority and custom fields ([#21309](https://github.com/RocketChat/Rocket.Chat/pull/21309) by [@rafaelblink](https://github.com/rafaelblink)) + +- Regression: rooms breaking after deleting a room from a team ([#21421](https://github.com/RocketChat/Rocket.Chat/pull/21421)) + +- regression: Sidebar reactivity ([#21296](https://github.com/RocketChat/Rocket.Chat/pull/21296)) + +- Regression: Team icons in mention ([#21367](https://github.com/RocketChat/Rocket.Chat/pull/21367)) + + ![image](https://user-images.githubusercontent.com/40830821/113044232-cd814600-9173-11eb-8f17-47c2d1438b75.png) + +- regression: Team info permissions ([#21387](https://github.com/RocketChat/Rocket.Chat/pull/21387)) + +- Regression: Teams should not have same name as users ([#21371](https://github.com/RocketChat/Rocket.Chat/pull/21371)) + +- regression: Unable to add users while creating a team ([#21354](https://github.com/RocketChat/Rocket.Chat/pull/21354)) + +- Regression: Unify Contact information displayed on the Room header and Room Info ([#21312](https://github.com/RocketChat/Rocket.Chat/pull/21312) by [@rafaelblink](https://github.com/rafaelblink)) + + ![image](https://user-images.githubusercontent.com/34130764/112586659-35592900-8e22-11eb-94be-32bdff7ca883.png) + + ![image](https://user-images.githubusercontent.com/2493803/112913130-788bf400-90cf-11eb-84c6-782b203e100a.png) + + ![image](https://user-images.githubusercontent.com/2493803/112913146-817cc580-90cf-11eb-87ad-ef79766be2b3.png) + +- Regression: Unify team actions to add a room to a team ([#21386](https://github.com/RocketChat/Rocket.Chat/pull/21386)) + +- Regression: unused names for team roles ([#21376](https://github.com/RocketChat/Rocket.Chat/pull/21376)) + +- Regression: Update .invite endpoints to support multiple users at once ([#21328](https://github.com/RocketChat/Rocket.Chat/pull/21328)) + + - channels.invite now supports passing an array as a param (either with usernames or userIds) via `usernames` or `userIds` properties. + - You can still use the endpoint to invite only one user via the old params `userId`, `username` or `user`. + - Same changes apply to groups.invite + +- Regression: user actions in admin ([#21307](https://github.com/RocketChat/Rocket.Chat/pull/21307)) + +- Regression: View Channels button in Team info ([#21289](https://github.com/RocketChat/Rocket.Chat/pull/21289)) + +- Regression: When only 'teams' type is provided, show only rooms with teamMain on `rooms.adminRooms` endpoint ([#21322](https://github.com/RocketChat/Rocket.Chat/pull/21322)) + +- Release 3.13.0 ([#21437](https://github.com/RocketChat/Rocket.Chat/pull/21437) by [@PriyaBihani](https://github.com/PriyaBihani) & [@cuonghuunguyen](https://github.com/cuonghuunguyen) & [@fcecagno](https://github.com/fcecagno) & [@lucassartor](https://github.com/lucassartor) & [@shrinish123](https://github.com/shrinish123)) + +- Update Apps-Engine version ([#21398](https://github.com/RocketChat/Rocket.Chat/pull/21398)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Cosnavel](https://github.com/Cosnavel) +- [@Darshilp326](https://github.com/Darshilp326) +- [@PriyaBihani](https://github.com/PriyaBihani) +- [@RonLek](https://github.com/RonLek) +- [@Tirieru](https://github.com/Tirieru) +- [@aKn1ghtOut](https://github.com/aKn1ghtOut) +- [@aditya-mitra](https://github.com/aditya-mitra) +- [@cuonghuunguyen](https://github.com/cuonghuunguyen) +- [@cyberShaw](https://github.com/cyberShaw) +- [@fcecagno](https://github.com/fcecagno) +- [@g-thome](https://github.com/g-thome) +- [@im-adithya](https://github.com/im-adithya) +- [@lolimay](https://github.com/lolimay) +- [@lucassartor](https://github.com/lucassartor) +- [@m-shreyansh](https://github.com/m-shreyansh) +- [@rafaelblink](https://github.com/rafaelblink) +- [@reda-alaoui](https://github.com/reda-alaoui) +- [@shrinish123](https://github.com/shrinish123) +- [@sumukhah](https://github.com/sumukhah) +- [@vova-zush](https://github.com/vova-zush) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@alansikora](https://github.com/alansikora) +- [@d-gubert](https://github.com/d-gubert) +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@r0zbot](https://github.com/r0zbot) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@tiagoevanp](https://github.com/tiagoevanp) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 3.12.7 +`2021-05-27 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.23.0` + +### 🐛 Bug fixes + + +- Discussion names showing a random value ([#22172](https://github.com/RocketChat/Rocket.Chat/pull/22172)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.12.5 +`2021-04-20 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.23.0` + +### 🐛 Bug fixes + + +- Livechat not retrieving messages ([#21644](https://github.com/RocketChat/Rocket.Chat/pull/21644) by [@cuonghuunguyen](https://github.com/cuonghuunguyen)) + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@cuonghuunguyen](https://github.com/cuonghuunguyen) + +# 3.12.2 +`2021-03-26 · 2 🐛 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.23.0` + +### 🐛 Bug fixes + + +- Bump Livechat widget + +- Security Hotfix (https://docs.rocket.chat/guides/security/security-updates) + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@g-thome](https://github.com/g-thome) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.12.1 +`2021-03-08 · 1 🚀 · 2 🐛 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.23.0` + +### 🚀 Improvements + + +- Close Call contextual bar after starting jitsi call. ([#21004](https://github.com/RocketChat/Rocket.Chat/pull/21004)) + + After jitsi call is started, if the call is started in a new window then we should close contextual tab bar. + So, when 'YES' is pressed on modal, we call handleClose function if openNewWindow is true, as call doesn't starts on tab bar, it starts on new window. + +### 🐛 Bug fixes + + +- Missing spaces on attachment ([#21020](https://github.com/RocketChat/Rocket.Chat/pull/21020)) + +- Stopping Jitsi reload ([#20973](https://github.com/RocketChat/Rocket.Chat/pull/20973)) + + The Function where Jitsi call is started gets called many times due to `room.usernames` dep of useMemo, this dep triggers reloading of this function many times. + So removing this dep from useMemo dependencies + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@dougfabris](https://github.com/dougfabris) +- [@tassoevan](https://github.com/tassoevan) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 3.12.0 +`2021-02-28 · 5 🎉 · 17 🚀 · 74 🐛 · 30 🔍 · 29 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.23.0` + +### 🎉 New features + + +- Button to unset Slackbridge's importIds ([#20549](https://github.com/RocketChat/Rocket.Chat/pull/20549)) + +- Cloud Workspace bridge ([#20838](https://github.com/RocketChat/Rocket.Chat/pull/20838)) + + Adds the new CloudWorkspace functionality. + + It allows apps to request the access token for the workspace it's installed on, so it can perform actions with other Rocket.Chat services, such as the Omni Gateway. + + https://github.com/RocketChat/Rocket.Chat.Apps-engine/pull/382 + +- Header with Breadcrumbs ([#20609](https://github.com/RocketChat/Rocket.Chat/pull/20609)) + + ![image](https://user-images.githubusercontent.com/27704687/106945019-1386d400-6706-11eb-90db-c12b50f260d5.png) + +- Statistics about language usage ([#20832](https://github.com/RocketChat/Rocket.Chat/pull/20832) by [@g-thome](https://github.com/g-thome)) + + track what languages get picked the most as preferred ui language. + +- useUserData Hook ([#20584](https://github.com/RocketChat/Rocket.Chat/pull/20584)) + +### 🚀 Improvements + + +- Add symbol to indicate apps' required settings in the UI ([#20447](https://github.com/RocketChat/Rocket.Chat/pull/20447)) + + - Apps are able to define **required** settings. These settings should not be left blank by the user and an error will be thrown and shown in the interface if an user attempts to save changes in the app details page leaving any required fields blank; + ![prt_screen_required_app_settings_warning](https://user-images.githubusercontent.com/36537004/106032964-e73cd900-60af-11eb-8eab-c11fd651b593.png) + + - A sign (*) is added to the label of app settings' fields that are required so as to highlight the fields which must not be left blank. + ![prt_screen_required_app_settings](https://user-images.githubusercontent.com/36537004/106014879-ae473900-609c-11eb-9b9e-95de7bbf20a5.png) + +- Add visual validation on users admin forms ([#20308](https://github.com/RocketChat/Rocket.Chat/pull/20308)) + +- Added auto-focus for better user-experience. ([#19954](https://github.com/RocketChat/Rocket.Chat/pull/19954) by [@Darshilp326](https://github.com/Darshilp326)) + +- Added disable button check for send invite button ([#20337](https://github.com/RocketChat/Rocket.Chat/pull/20337)) + + Added Disable check for send invite button. If the text field is empty button would be disabled, and after any valid email is filled, button would get enabled + +- Added key prop, removing unwanted warnings ([#20473](https://github.com/RocketChat/Rocket.Chat/pull/20473)) + + Removes warnings listed on the issue + +- Added Markdown links to custom status. ([#20470](https://github.com/RocketChat/Rocket.Chat/pull/20470)) + + Added markdown links to user's custom status. + +- Adds tooltip for sidebar header icons ([#19934](https://github.com/RocketChat/Rocket.Chat/pull/19934) by [@RonLek](https://github.com/RonLek)) + + Previously the header icons in the sidebar didn't show a tooltip when hovered over. This PR fixes that. + + ![Screenshot from 2020-12-22 15-17-41](https://user-images.githubusercontent.com/28918901/102874804-f2756700-4468-11eb-8324-b7f3194e62fe.png) + +- Better Presentation of Blockquotes ([#20750](https://github.com/RocketChat/Rocket.Chat/pull/20750) by [@aditya-mitra](https://github.com/aditya-mitra)) + + Changed the values of `margin-top` and `margin-bottom` for *first* and *last* childs in blockquotes to increase readability. + + ### Before + + ![before](https://user-images.githubusercontent.com/55396651/107858662-3e3a0080-6e5b-11eb-8274-9bd956807235.png) + + ### Now + + ![now](https://user-images.githubusercontent.com/55396651/107858471-480f3400-6e5a-11eb-9ccb-3f1be2fed0a4.png) + +- Change header based on room type ([#20612](https://github.com/RocketChat/Rocket.Chat/pull/20612)) + + It brings more flexibility, allowing us to use different hooks and different components for each header + +- Check Livechat message length through REST API endpoint ([#20366](https://github.com/RocketChat/Rocket.Chat/pull/20366)) + + Added checks for message length for livechat message api, it shouldn't exceed specified character limit. + +- Customize announcement ([#20793](https://github.com/RocketChat/Rocket.Chat/pull/20793) by [@im-adithya](https://github.com/im-adithya)) + + Included new variables in customizable ones + +- Make message field required in Omnichannel Triggers form ([#20827](https://github.com/RocketChat/Rocket.Chat/pull/20827) by [@rafaelblink](https://github.com/rafaelblink)) + +- New chat started system message for Omnichannel conversations ([#20814](https://github.com/RocketChat/Rocket.Chat/pull/20814) by [@rafaelblink](https://github.com/rafaelblink)) + +- Replace react-window for react-virtuoso package ([#20392](https://github.com/RocketChat/Rocket.Chat/pull/20392)) + + Remove: + - react-window + - react-window-infinite-loader + - simplebar-react + + Include: + - react-virtuoso + - rc-scrollbars + +- Rewrite Call as React component ([#19778](https://github.com/RocketChat/Rocket.Chat/pull/19778)) + +- Selector for default custom oauth key field ([#20573](https://github.com/RocketChat/Rocket.Chat/pull/20573) by [@paulobernardoaf](https://github.com/paulobernardoaf)) + +- Update rc-scrollbars ([#20733](https://github.com/RocketChat/Rocket.Chat/pull/20733)) + +### 🐛 Bug fixes + + +- - Cancel button on Room Notification don't close contextualBar ([#20237](https://github.com/RocketChat/Rocket.Chat/pull/20237)) + +- Add debouncing to add users search field. ([#20297](https://github.com/RocketChat/Rocket.Chat/pull/20297) by [@Darshilp326](https://github.com/Darshilp326)) + + BEFORE + + https://user-images.githubusercontent.com/55157259/105350722-98a3c080-5c11-11eb-82f3-d9a62a4fa50b.mp4 + + + AFTER + + https://user-images.githubusercontent.com/55157259/105350757-a2c5bf00-5c11-11eb-91db-25c0b9e01a28.mp4 + +- Add tooltips to Thread header buttons ([#20456](https://github.com/RocketChat/Rocket.Chat/pull/20456) by [@aKn1ghtOut](https://github.com/aKn1ghtOut)) + + Added tooltips to "Expand" and "Follow Message"/"Unfollow Message" in ThreadView for coherency. + +- Added Bio Structure for UserCard, rendering Skeleton View on loading Instead of [Object][Object] ([#20305](https://github.com/RocketChat/Rocket.Chat/pull/20305)) + + Added Bio Structure for rendering Skeleton View on loading UserCard. + +- Added check for view admin permission page ([#20403](https://github.com/RocketChat/Rocket.Chat/pull/20403)) + + Admin Permission page was visible to all, if you add admin/permissions after the base url. This should not be visible to all user, only people with certain permissions should be able to see this page. + I am also able to see permissions page for open workspace of Rocket chat. + ![image](https://user-images.githubusercontent.com/58601732/105829728-bfd00880-5fea-11eb-9121-6c53a752f140.png) + +- Adding the accidentally deleted tag template, used by other templates ([#20772](https://github.com/RocketChat/Rocket.Chat/pull/20772)) + + Adding back accidentally deleted tag Template. + +- Admin cannot clear user details like bio or nickname ([#20785](https://github.com/RocketChat/Rocket.Chat/pull/20785)) + + When the API users.update is called to update user data, it passes data to saveUser function. Here before saving data like bio or nickname we are checking if they are available or not. If data is available then we are saving it, but we are not doing anything when data isn't available. + + So unsetting data if data isn't available to save. Will also fix bio and other fields. :) + +- Admin Panel pages not visible in Safari ([#20912](https://github.com/RocketChat/Rocket.Chat/pull/20912)) + +- Announcement with multiple lines fixed. ([#20381](https://github.com/RocketChat/Rocket.Chat/pull/20381)) + + Announcements with multiple lines used to break UI for announcements bar. Fixed it by replacing all break lines in announcement with empty space (" ") . The announcement modal would work as usual and show all break lines. + +- Atlassian Crowd login with 2FA enabled ([#20834](https://github.com/RocketChat/Rocket.Chat/pull/20834)) + +- Attachment download from title fixed ([#20585](https://github.com/RocketChat/Rocket.Chat/pull/20585)) + + Added target = '_self' to attachment link, this seems to fix the problem, without this attribute, error page is displayed. + +- Blank Personal Access Token Bug ([#20193](https://github.com/RocketChat/Rocket.Chat/pull/20193) by [@RonLek](https://github.com/RonLek)) + + Adds error when personal access token is blank thereby disallowing the creation of one. + + https://user-images.githubusercontent.com/28918901/104483631-5adde100-55ee-11eb-9938-64146bce127e.mp4 + +- CAS login failing due to TOTP requirement ([#20840](https://github.com/RocketChat/Rocket.Chat/pull/20840)) + +- Changed password input field for password access in edit room info. ([#20356](https://github.com/RocketChat/Rocket.Chat/pull/20356) by [@Darshilp326](https://github.com/Darshilp326)) + + Password field would be secured with asterisks in edit room info + + https://user-images.githubusercontent.com/55157259/105641758-cad04f00-5eab-11eb-90de-0c91263edd55.mp4 + + . + +- Channel mentions showing user subscribed channels twice ([#20484](https://github.com/RocketChat/Rocket.Chat/pull/20484) by [@Darshilp326](https://github.com/Darshilp326)) + + Channel mention shows user subscribed channels twice. + + https://user-images.githubusercontent.com/55157259/106183033-b353d780-61c5-11eb-8aab-1dbb62b02ff8.mp4 + +- CORS config not accepting multiple origins ([#20696](https://github.com/RocketChat/Rocket.Chat/pull/20696) by [@g-thome](https://github.com/g-thome)) + + always include only one value in access-control-allow-origin + +- Custom OAuth provider creation from env vars ([#20014](https://github.com/RocketChat/Rocket.Chat/pull/20014) by [@pierreozoux](https://github.com/pierreozoux)) + +- Default Attachments - Remove Extra Margin in Field Attachments ([#20618](https://github.com/RocketChat/Rocket.Chat/pull/20618) by [@aditya-mitra](https://github.com/aditya-mitra)) + + A large amount of unnecessary margin which existed in the **Field Attachments inside the `DefaultAttachments`** has been fixed. + + ### Earlier + + ![earlier](https://user-images.githubusercontent.com/55396651/107056792-ba4b9d00-67f8-11eb-9153-05281416cddb.png) + + ### Now + + ![now](https://user-images.githubusercontent.com/55396651/107057196-3219c780-67f9-11eb-84db-e4a0addfc168.png) + +- Default Attachments - Show Full Attachment.Text with Markdown ([#20606](https://github.com/RocketChat/Rocket.Chat/pull/20606) by [@aditya-mitra](https://github.com/aditya-mitra)) + + Removed truncating of text in `Attachment.Text`. + Added `Attachment.Text` to be parsed to markdown by default. + + ### Earlier + ![earlier](https://user-images.githubusercontent.com/55396651/106910781-92d8cf80-6727-11eb-82ec-818df7544ff0.png) + + ### Now + + ![now](https://user-images.githubusercontent.com/55396651/106910840-a126eb80-6727-11eb-8bd6-d86383dd9181.png) + +- Don't ask again not rendering ([#20745](https://github.com/RocketChat/Rocket.Chat/pull/20745)) + +- Download buttons on desktop app and CDN being ignored ([#20820](https://github.com/RocketChat/Rocket.Chat/pull/20820)) + +- E2E issues ([#20704](https://github.com/RocketChat/Rocket.Chat/pull/20704)) + +- ESLint Warning - react-hooks/exhaustive-deps ([#20586](https://github.com/RocketChat/Rocket.Chat/pull/20586) by [@aditya-mitra](https://github.com/aditya-mitra)) + + Added the required dep (`label`) in `useMemo` to fix eslint warning `react-hooks/exhaustive-deps`. + +- Event emitter warning ([#20663](https://github.com/RocketChat/Rocket.Chat/pull/20663)) + +- External systems not being able to change Omnichannel Inquiry priorities ([#20740](https://github.com/RocketChat/Rocket.Chat/pull/20740)) + + Due to a wrong property name, external applications were not able to change the priority of Omnichannel Inquires. + +- Feedback on bulk invite ([#20339](https://github.com/RocketChat/Rocket.Chat/pull/20339) by [@aKn1ghtOut](https://github.com/aKn1ghtOut)) + + Resolved structure where no response was being received. Changed from callback to async/await. + Added error in case of empty submission, or if no valid emails were found. + + https://user-images.githubusercontent.com/38764067/105613964-dfe5a900-5deb-11eb-80f2-21fc8dee57c0.mp4 + +- Filters are not being applied correctly in Omnichannel Current Chats list ([#20320](https://github.com/RocketChat/Rocket.Chat/pull/20320) by [@rafaelblink](https://github.com/rafaelblink)) + + ### Before + ![image](https://user-images.githubusercontent.com/2493803/105537672-082cb500-5cd1-11eb-8f1b-1726ba60420a.png) + + ### After + ![image](https://user-images.githubusercontent.com/2493803/105537773-2d212800-5cd1-11eb-8746-048deb9502d9.png) + + ![image](https://user-images.githubusercontent.com/2493803/106494728-88090b00-6499-11eb-922e-5386107e2389.png) + + ![image](https://user-images.githubusercontent.com/2493803/106494751-90f9dc80-6499-11eb-901b-5e4dbdc678ba.png) + +- Fix Empty highlighted words field ([#20329](https://github.com/RocketChat/Rocket.Chat/pull/20329)) + + Able to Empty the highlighted text field in preferences + +- Gif images aspect ratio on preview ([#20654](https://github.com/RocketChat/Rocket.Chat/pull/20654)) + +- height prop on departments agents table ([#20833](https://github.com/RocketChat/Rocket.Chat/pull/20833)) + + ![image](https://user-images.githubusercontent.com/27704687/108572412-fbf83f80-72f0-11eb-801a-5f659000325d.png) + +- Hide system messages not working on second save ([#20679](https://github.com/RocketChat/Rocket.Chat/pull/20679)) + +- Icon for OTR messages ([#20713](https://github.com/RocketChat/Rocket.Chat/pull/20713)) + +- Incorrect display of "Reply in Direct Message" in MessageAction ([#17968](https://github.com/RocketChat/Rocket.Chat/pull/17968) by [@abrom](https://github.com/abrom)) + + [FIX] Incorrect display of "Reply in Direct Message" in MessageAction + +- Increasing unread counter twice for new threads in DMs or with mentions ([#20666](https://github.com/RocketChat/Rocket.Chat/pull/20666)) + + - Unread messages count won't be incremented when the message sent is on a thread (thread count is treated different) + +- Links not opening in new tabs ([#20651](https://github.com/RocketChat/Rocket.Chat/pull/20651)) + +- List of Omnichannel triggers is not listing data ([#20624](https://github.com/RocketChat/Rocket.Chat/pull/20624) by [@rafaelblink](https://github.com/rafaelblink)) + + ### Before + ![image](https://user-images.githubusercontent.com/2493803/107095379-7308e080-67e7-11eb-8251-7e7ff891087a.png) + + + ### After + ![image](https://user-images.githubusercontent.com/2493803/107095261-3b019d80-67e7-11eb-8425-8612b03ac50a.png) + +- Livechat bridge permission checkers ([#20653](https://github.com/RocketChat/Rocket.Chat/pull/20653) by [@lolimay](https://github.com/lolimay)) + + Update to latest patch version of the Apps-Engine with a fix for the Livechat bridge, as seen in https://github.com/RocketChat/Rocket.Chat.Apps-engine/pull/379 + +- Mark messages inside a thread as unread ([#20726](https://github.com/RocketChat/Rocket.Chat/pull/20726) by [@im-adithya](https://github.com/im-adithya)) + + Added threads to mark unread action button. + +- Markdown prop variants ([#20767](https://github.com/RocketChat/Rocket.Chat/pull/20767)) + + A new prop variants on Markdown component: **inline** and **inlineWithoutBreaks** + +- Message payload from `__my_messages__` stream ([#20801](https://github.com/RocketChat/Rocket.Chat/pull/20801)) + +- Missing height on departments agents table ([#20739](https://github.com/RocketChat/Rocket.Chat/pull/20739)) + + ![image](https://user-images.githubusercontent.com/27704687/107807002-510ee100-6d46-11eb-86e9-d65da7ab4129.png) + +- Missing setting to control when to send the ReplyTo field in email notifications ([#20744](https://github.com/RocketChat/Rocket.Chat/pull/20744)) + + - Add a new setting ("Add Reply-To header") in the Email settings' page to control when the Reply-To header is used in e-mail notifications; + - The new setting is turned off (`false` value) by default. + +- New Integration page was not being displayed ([#20670](https://github.com/RocketChat/Rocket.Chat/pull/20670)) + +- Notification worker stopping on error ([#20605](https://github.com/RocketChat/Rocket.Chat/pull/20605)) + +- OAuth Login not working on Firefox ([#20722](https://github.com/RocketChat/Rocket.Chat/pull/20722)) + +- Omnichannel agents are unable to access the chat queue on the sidebar ([#20830](https://github.com/RocketChat/Rocket.Chat/pull/20830) by [@rafaelblink](https://github.com/rafaelblink)) + +- Omnichannel Routing System not assigning chats to Bot agents ([#20662](https://github.com/RocketChat/Rocket.Chat/pull/20662)) + + The `Omnichannel Routing System` is no longer assigning chats to `bot` agents when the `bot` agent is the default agent of the inquiry. + +- Open Visitor Info when omnichannel chat was open ([#20868](https://github.com/RocketChat/Rocket.Chat/pull/20868)) + +- OTR issue ([#20592](https://github.com/RocketChat/Rocket.Chat/pull/20592)) + + Since the users are not being stored at the user collection anymore (thats a good thing actually), there is no such record to to fetch and show the username. + +- Quoted messages from message links when user has no permission ([#20815](https://github.com/RocketChat/Rocket.Chat/pull/20815)) + +- Regenerate token modal on top of 2FA modal ([#20798](https://github.com/RocketChat/Rocket.Chat/pull/20798)) + +- Regular status mutating custom status ([#20613](https://github.com/RocketChat/Rocket.Chat/pull/20613)) + +- Remove duplicate getCommonRoomEvents() event binding for pinnedMessages ([#20179](https://github.com/RocketChat/Rocket.Chat/pull/20179) by [@aKn1ghtOut](https://github.com/aKn1ghtOut)) + + The getCommonRoomEvents() returned functions were bound to the pinnedMessages template twice. This was causing some bugs, as detailed in the Issue mentioned below. + +- Remove duplicate getCommonRoomEvents() event binding for starredMessages ([#20185](https://github.com/RocketChat/Rocket.Chat/pull/20185) by [@aKn1ghtOut](https://github.com/aKn1ghtOut)) + + The getCommonRoomEvents() returned functions were bound to the starredMessages template twice. This was causing some bugs, as detailed in the Issue mentioned below. + I removed the top events call that only bound the getCommonRoomEvents(). Therefore, only one call for the same is left, which is at the end of the file. Having the events bound just once removes the bugs mentioned. + +- Remove warning problems from console ([#20800](https://github.com/RocketChat/Rocket.Chat/pull/20800)) + +- Removed tooltip in kebab menu options. ([#20498](https://github.com/RocketChat/Rocket.Chat/pull/20498) by [@Darshilp326](https://github.com/Darshilp326)) + + Removed tooltip as it was not needed. + + https://user-images.githubusercontent.com/55157259/106246146-a53ca000-6233-11eb-9874-cbd1b4331bc0.mp4 + +- Retry icon comes out of the div ([#20390](https://github.com/RocketChat/Rocket.Chat/pull/20390) by [@im-adithya](https://github.com/im-adithya)) + + Changed the height of the div container. + +- Room owner not being able to override global retention policy ([#20727](https://github.com/RocketChat/Rocket.Chat/pull/20727) by [@g-thome](https://github.com/g-thome)) + + use correct permissions to check if room owner can override global retention policy + +- Room Scroll to Bottom ([#20649](https://github.com/RocketChat/Rocket.Chat/pull/20649)) + +- Room's last message's update date format on IE ([#20680](https://github.com/RocketChat/Rocket.Chat/pull/20680)) + + The proposed change fixes a bug when updates the cached records on Internet Explorer and it breaks the sidebar as shown on the screenshot below: + + ![image](https://user-images.githubusercontent.com/27704687/107578007-f2285b00-6bd1-11eb-9250-1e76ae67f9c9.png) + +- Save user password and email from My Account ([#20737](https://github.com/RocketChat/Rocket.Chat/pull/20737)) + +- Security Hotfix (https://docs.rocket.chat/guides/security/security-updates) + +- Selected hide system messages would now be viewed in vertical bar. ([#20358](https://github.com/RocketChat/Rocket.Chat/pull/20358) by [@Darshilp326](https://github.com/Darshilp326)) + + All selected hide system messages are now in vertical Bar. + + https://user-images.githubusercontent.com/55157259/105642624-d5411780-5eb0-11eb-8848-93e4b02629cb.mp4 + +- Selected messages don't get unselected ([#20408](https://github.com/RocketChat/Rocket.Chat/pull/20408) by [@im-adithya](https://github.com/im-adithya)) + + https://user-images.githubusercontent.com/64399555/105844776-c157fb80-5fff-11eb-90cc-94e9f69649b6.mp4 + +- Sending user to home after logging in from resume token query param ([#20720](https://github.com/RocketChat/Rocket.Chat/pull/20720)) + + Do not redirect to `/home` anymore after logging in with `resumeToken`. + +- Server-side marked parsing ([#20665](https://github.com/RocketChat/Rocket.Chat/pull/20665)) + +- Several Slack Importer issues ([#20216](https://github.com/RocketChat/Rocket.Chat/pull/20216)) + + - Fix: Slack Importer crashes when importing a large users.json file + - Fix: Slack importer crashes when messages have invalid mentions + - Skip listing all users on the preparation screen when the user count is too large. + - Split avatar download into a separate process. + - Update room's last message when the import is complete. + - Prevent invalid or duplicated channel names + - Improve message error handling. + - Reduce max allowed BSON size to avoid possible issues in some servers. + - Improve handling of very large channel files. + +- star icon was visible after unstarring a message ([#19645](https://github.com/RocketChat/Rocket.Chat/pull/19645) by [@bhavayAnand9](https://github.com/bhavayAnand9)) + +- Threads Issues ([#20725](https://github.com/RocketChat/Rocket.Chat/pull/20725)) + +- Typo in Message Character Limit ([#20426](https://github.com/RocketChat/Rocket.Chat/pull/20426) by [@aditya-mitra](https://github.com/aditya-mitra)) + + Changed the spelling of *Characther* to *Character* + +- Unset tshow on deleted messages ([#20444](https://github.com/RocketChat/Rocket.Chat/pull/20444) by [@aKn1ghtOut](https://github.com/aKn1ghtOut)) + + When setting 'Message_ShowDeletedStatus' is set to true, deleting a message with `tshow: true` causes a bug on the frontend. This issue should, however, never be logically possible as a 'removed' message should not have tshow anyway. Hence, this PR unsets that when the message is set to "Message Removed". + +- Update NPS banner when changing score ([#20611](https://github.com/RocketChat/Rocket.Chat/pull/20611)) + +- User statuses in admin user info panel ([#20341](https://github.com/RocketChat/Rocket.Chat/pull/20341) by [@RonLek](https://github.com/RonLek)) + + Modifies user statuses in admin info panel based on their actual status instead of their `statusConnection`. This enables correct and consistent change in user statuses. + Also, bot users having status as online were classified as offline, with this change they are now correctly classified based on their corresponding statuses. + + https://user-images.githubusercontent.com/28918901/105624438-b8bcc500-5e47-11eb-8d1e-3a4180da1304.mp4 + +- Users autocomplete showing duplicated results ([#20481](https://github.com/RocketChat/Rocket.Chat/pull/20481) by [@Darshilp326](https://github.com/Darshilp326)) + + Added new query for outside room users so that room members are not shown twice. + + https://user-images.githubusercontent.com/55157259/106174582-33c10b00-61bb-11eb-9716-377ef7bba34e.mp4 + +
+🔍 Minor changes + + +- Added toast message after deleting file. ([#20661](https://github.com/RocketChat/Rocket.Chat/pull/20661) by [@Darshilp326](https://github.com/Darshilp326)) + + https://user-images.githubusercontent.com/55157259/107410849-d1a9c380-6b33-11eb-8d10-3d225dc7a9db.mp4 + +- Added types to Emitters ([#20819](https://github.com/RocketChat/Rocket.Chat/pull/20819)) + +- Bump Livechat Widget ([#20843](https://github.com/RocketChat/Rocket.Chat/pull/20843)) + + Update Livechat version to `1.8.0` . + +- Chore: Change error message when marking empty chat as unread ([#20250](https://github.com/RocketChat/Rocket.Chat/pull/20250) by [@lucassartor](https://github.com/lucassartor)) + +- Chore: Disable Sessions Aggregates tests locally ([#20607](https://github.com/RocketChat/Rocket.Chat/pull/20607)) + + Disable Session aggregates tests in local environments + For context, refer to: #20161 + +- Chore: Improve performance of messages’ watcher ([#20519](https://github.com/RocketChat/Rocket.Chat/pull/20519)) + +- Chore: Push correct Docker tag of service images ([#20706](https://github.com/RocketChat/Rocket.Chat/pull/20706)) + +- Chore: Remove node-sprite-generator dependency ([#20545](https://github.com/RocketChat/Rocket.Chat/pull/20545)) + +- Chore: Try building micro services early on CI ([#20046](https://github.com/RocketChat/Rocket.Chat/pull/20046)) + +- Chore: update RC with the latest fuselage-polyfills ([#20709](https://github.com/RocketChat/Rocket.Chat/pull/20709)) + +- Exclude user's own password from /me endpoint ([#20735](https://github.com/RocketChat/Rocket.Chat/pull/20735)) + +- Fix: Add network observe plug to snap ([#20852](https://github.com/RocketChat/Rocket.Chat/pull/20852)) + +- Improve: Add more API tests ([#20738](https://github.com/RocketChat/Rocket.Chat/pull/20738)) + + Add end-to-end tests for untested endpoints. + +- Language update from LingoHub 🤖 on 2021-02-15Z ([#20757](https://github.com/RocketChat/Rocket.Chat/pull/20757)) + +- Language update from LingoHub 🤖 on 2021-02-22Z ([#20853](https://github.com/RocketChat/Rocket.Chat/pull/20853)) + +- Merge master into develop & Set version to 3.12.0-develop ([#20533](https://github.com/RocketChat/Rocket.Chat/pull/20533)) + +- Mixed client and server code on Storybook ([#20799](https://github.com/RocketChat/Rocket.Chat/pull/20799)) + + For Storybook to work, we've mocked all modules under `**/server/`, thus making them suitable to hold all code that refers Node.js modules. This implies some duplication, between `client/` and `server/` modules, mediated by modules under `libs/`. + +- Regression: Discussions inside direct messages not rendering ([#20652](https://github.com/RocketChat/Rocket.Chat/pull/20652)) + +- Regression: Fix loadHistory method being called multiple times ([#20826](https://github.com/RocketChat/Rocket.Chat/pull/20826)) + +- Regression: Fix notification worker not firing ([#20829](https://github.com/RocketChat/Rocket.Chat/pull/20829)) + +- Regression: Fix scopes not being provided to getWorkspaceAccessToken ([#20871](https://github.com/RocketChat/Rocket.Chat/pull/20871)) + +- Regression: Header Styles ([#20616](https://github.com/RocketChat/Rocket.Chat/pull/20616)) + +- Regression: Keep user custom status after change presence ([#20869](https://github.com/RocketChat/Rocket.Chat/pull/20869)) + +- Regression: Messages not being encrypted E2E ([#20922](https://github.com/RocketChat/Rocket.Chat/pull/20922)) + +- Regression: Prevent Message Attachment rendering ([#20860](https://github.com/RocketChat/Rocket.Chat/pull/20860)) + +- Remove `uiKitText` reference ([#20625](https://github.com/RocketChat/Rocket.Chat/pull/20625)) + +- Rewrite: CreateChannel modal component ([#20617](https://github.com/RocketChat/Rocket.Chat/pull/20617)) + + ![image](https://user-images.githubusercontent.com/17487063/107058434-5f438700-67b3-11eb-8cf2-1ad3d5008aa8.png) + +- RoomFiles hook ([#20550](https://github.com/RocketChat/Rocket.Chat/pull/20550)) + +- Update Apps-Engine version ([#20921](https://github.com/RocketChat/Rocket.Chat/pull/20921)) + + Update the Apps-Engine to latest version for the release. + +- Wrong method used while starring ([#20508](https://github.com/RocketChat/Rocket.Chat/pull/20508) by [@im-adithya](https://github.com/im-adithya)) + + Changed the method from pinMessage to starMessage + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Darshilp326](https://github.com/Darshilp326) +- [@RonLek](https://github.com/RonLek) +- [@aKn1ghtOut](https://github.com/aKn1ghtOut) +- [@abrom](https://github.com/abrom) +- [@aditya-mitra](https://github.com/aditya-mitra) +- [@bhavayAnand9](https://github.com/bhavayAnand9) +- [@g-thome](https://github.com/g-thome) +- [@im-adithya](https://github.com/im-adithya) +- [@lolimay](https://github.com/lolimay) +- [@lucassartor](https://github.com/lucassartor) +- [@paulobernardoaf](https://github.com/paulobernardoaf) +- [@pierreozoux](https://github.com/pierreozoux) +- [@rafaelblink](https://github.com/rafaelblink) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@KevLehman](https://github.com/KevLehman) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@d-gubert](https://github.com/d-gubert) +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@matheusbsilva137](https://github.com/matheusbsilva137) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@r0zbot](https://github.com/r0zbot) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@tiagoevanp](https://github.com/tiagoevanp) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 3.11.5 +`2021-04-20 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.22.2` + +### 🐛 Bug fixes + + +- Livechat not retrieving messages ([#21644](https://github.com/RocketChat/Rocket.Chat/pull/21644) by [@cuonghuunguyen](https://github.com/cuonghuunguyen)) + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@cuonghuunguyen](https://github.com/cuonghuunguyen) + +# 3.11.2 +`2021-02-28 · 3 🐛 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.22.2` + +### 🐛 Bug fixes + + +- External systems not being able to change Omnichannel Inquiry priorities ([#20740](https://github.com/RocketChat/Rocket.Chat/pull/20740)) + + Due to a wrong property name, external applications were not able to change the priority of Omnichannel Inquires. + +- Prevent Message Attachment rendering ([#20860](https://github.com/RocketChat/Rocket.Chat/pull/20860)) + +- Room owner not being able to override global retention policy ([#20727](https://github.com/RocketChat/Rocket.Chat/pull/20727) by [@g-thome](https://github.com/g-thome)) + + use correct permissions to check if room owner can override global retention policy + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@g-thome](https://github.com/g-thome) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@renatobecker](https://github.com/renatobecker) + +# 3.11.1 +`2021-02-10 · 5 🐛 · 6 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.22.2` + +### 🐛 Bug fixes + + +- Attachment download from title fixed ([#20585](https://github.com/RocketChat/Rocket.Chat/pull/20585)) + + Added target = '_self' to attachment link, this seems to fix the problem, without this attribute, error page is displayed. + +- Gif images aspect ratio on preview ([#20654](https://github.com/RocketChat/Rocket.Chat/pull/20654)) + +- Livechat bridge permission checkers ([#20653](https://github.com/RocketChat/Rocket.Chat/pull/20653) by [@lolimay](https://github.com/lolimay)) + + Update to latest patch version of the Apps-Engine with a fix for the Livechat bridge, as seen in https://github.com/RocketChat/Rocket.Chat.Apps-engine/pull/379 + +- Omnichannel Routing System not assigning chats to Bot agents ([#20662](https://github.com/RocketChat/Rocket.Chat/pull/20662)) + + The `Omnichannel Routing System` is no longer assigning chats to `bot` agents when the `bot` agent is the default agent of the inquiry. + +- Update NPS banner when changing score ([#20611](https://github.com/RocketChat/Rocket.Chat/pull/20611)) + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@lolimay](https://github.com/lolimay) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tiagoevanp](https://github.com/tiagoevanp) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 3.11.0 +`2021-01-31 · 8 🎉 · 9 🚀 · 52 🐛 · 44 🔍 · 32 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.22.1` + +### 🎉 New features + + +- **Apps:** Apps Permission System ([#20078](https://github.com/RocketChat/Rocket.Chat/pull/20078)) + +- **Apps:** IPreFileUpload event ([#20285](https://github.com/RocketChat/Rocket.Chat/pull/20285) by [@lolimay](https://github.com/lolimay)) + +- **ENTERPRISE:** Automatic transfer of unanswered conversations to another agent ([#20090](https://github.com/RocketChat/Rocket.Chat/pull/20090)) + +- **ENTERPRISE:** Omnichannel Contact Manager as preferred agent for routing ([#20244](https://github.com/RocketChat/Rocket.Chat/pull/20244)) + + If the `Contact-Manager` is assigned to a Visitor, the chat will automatically get transferred to the respective Contact-Manager, provided the Contact-Manager is online. In-case the Contact-Manager is offline, the chat will be transferred to any other online agent. + We have provided a setting to control this auto-assignment feature + ![image](https://user-images.githubusercontent.com/34130764/104880961-8104d780-5986-11eb-9d87-82b99814b028.png) + + Behavior based-on Routing method + + 1. Auto-selection, Load-Balancing, or External Service (`autoAssignAgent = true`) + This is straightforward, + - if the Contact-manager is online, the chat will be transferred to the Contact-Manger only + - if the Contact-manager is offline, the chat will be transferred to any other online-agent based on the Routing system + 2. Manual-selection (`autoAssignAgent = false`) + - If the Contact-Manager is online, the chat will appear in the Queue of Contact-Manager **ONLY** + - If the Contact-Manager is offline, the chat will appear in the Queue of all related Agents/Manager ( like it's done right now ) + +- Banner system and NPS ([#20221](https://github.com/RocketChat/Rocket.Chat/pull/20221)) + + More robust and scalable banner system for alerting users. + +- Email Inboxes for Omnichannel ([#20101](https://github.com/RocketChat/Rocket.Chat/pull/20101) by [@rafaelblink](https://github.com/rafaelblink)) + + With this new feature, email accounts will receive email messages(threads) which will be transformed into Omnichannel chats. It'll be possible to set up multiple email accounts, test the connection with email server(email provider) and define the behaviour of each account. + + https://user-images.githubusercontent.com/2493803/105430398-242d4980-5c32-11eb-835a-450c94837d23.mp4 + + ### New item on admin menu + + ![image](https://user-images.githubusercontent.com/2493803/105428723-bc293400-5c2e-11eb-8c02-e8d36ea82726.png) + + + ### Send test email tooltip + + ![image](https://user-images.githubusercontent.com/2493803/104366986-eaa16380-54f8-11eb-9ba7-831cfde2319c.png) + + + ### Inbox Info + + ![image](https://user-images.githubusercontent.com/2493803/104366796-ab731280-54f8-11eb-9941-a3cc8eb610e1.png) + + ### SMTP Info + + ![image](https://user-images.githubusercontent.com/2493803/104366868-c47bc380-54f8-11eb-969e-ccc29070957c.png) + + ### IMAP Info + + ![image](https://user-images.githubusercontent.com/2493803/104366897-cd6c9500-54f8-11eb-80c4-97d5b0c002d5.png) + + ### Messages + + ![image](https://user-images.githubusercontent.com/2493803/105428971-45d90180-5c2f-11eb-992a-022a3df94471.png) + +- Encrypted Discussions and new Encryption Permissions ([#20201](https://github.com/RocketChat/Rocket.Chat/pull/20201)) + +- Server Info page ([#19517](https://github.com/RocketChat/Rocket.Chat/pull/19517)) + +### 🚀 Improvements + + +- Add extra SAML settings to update room subs and add private room subs. ([#19489](https://github.com/RocketChat/Rocket.Chat/pull/19489) by [@tlskinneriv](https://github.com/tlskinneriv)) + + Added a SAML setting to support updating room subscriptions each time a user logs in via SAML. + Added a SAML setting to support including private rooms in SAML updated subscriptions (whether initial or on each logon). + +- Autofocus on directory ([#20509](https://github.com/RocketChat/Rocket.Chat/pull/20509)) + +- Don't use global search by default ([#19777](https://github.com/RocketChat/Rocket.Chat/pull/19777) by [@i-kychukov](https://github.com/i-kychukov) & [@ikyuchukov](https://github.com/ikyuchukov)) + + Global chat search is not set by default now. + +- Message Collection Hooks ([#20121](https://github.com/RocketChat/Rocket.Chat/pull/20121)) + + Integrating a list of messages into a React component imposes some challenges. Its content is provided by some REST API calls and live-updated by streamer events. To avoid too much coupling with React Hooks, the structures `RecordList`, `MessageList` and their derivatives are simple event emitters created and connected on components via some simple hooks, like `useThreadsList()` and `useRecordList()`. + +- Rewrite Announcement as React component ([#20172](https://github.com/RocketChat/Rocket.Chat/pull/20172)) + +- Rewrite Prune Messages as React component ([#19900](https://github.com/RocketChat/Rocket.Chat/pull/19900)) + +- Rewrite User Dropdown and Kebab menu. ([#20070](https://github.com/RocketChat/Rocket.Chat/pull/20070)) + + ![image](https://user-images.githubusercontent.com/40830821/103699786-3a74ad80-4f82-11eb-913e-2e09d5f7eac6.png) + +- Title for user avatar buttons ([#20083](https://github.com/RocketChat/Rocket.Chat/pull/20083) by [@sushant52](https://github.com/sushant52)) + + Made user avatar change buttons to be descriptive of what they do. + +- Tooltip added for Kebab menu on chat header ([#20116](https://github.com/RocketChat/Rocket.Chat/pull/20116)) + + Added the missing Tooltip for kebab menu on chat header. + ![tooltip after](https://user-images.githubusercontent.com/58601732/104031406-b07f4b80-51f2-11eb-87a4-1e8da78a254f.gif) + +### 🐛 Bug fixes + + +- "Open_thread" English tooltip correction ([#20164](https://github.com/RocketChat/Rocket.Chat/pull/20164) by [@aKn1ghtOut](https://github.com/aKn1ghtOut)) + + Remove unnecessary spaces from the translation key, and added English translation value for the key. + +- **Apps:** Don't show the "review permissions" modal when there's none to review ([#20506](https://github.com/RocketChat/Rocket.Chat/pull/20506)) + +- **ENTERPRISE:** Auditing RoomAutocomplete ([#20311](https://github.com/RocketChat/Rocket.Chat/pull/20311)) + +- **ENTERPRISE:** Omnichannel custom fields not storing additional form values ([#19953](https://github.com/RocketChat/Rocket.Chat/pull/19953) by [@rafaelblink](https://github.com/rafaelblink)) + +- Actions from User Info panel ([#20073](https://github.com/RocketChat/Rocket.Chat/pull/20073) by [@Darshilp326](https://github.com/Darshilp326)) + + Users can be removed from channels without any error message. + +- Added context check for closing active tabbar for member-list ([#20228](https://github.com/RocketChat/Rocket.Chat/pull/20228)) + + When we click on a username and then click on see user's full profile, a tab gets active and shows us the user's profile, the problem occurs when the tab is still active and we try to see another user's profile. In this case, tabbar gets closed. + To resolve this, added context check for closing action of active tabbar. + +- Added Margin between status bullet and status label ([#20199](https://github.com/RocketChat/Rocket.Chat/pull/20199)) + + Added Margins between status bullet and status label + +- Added success message on saving notification preference. ([#20220](https://github.com/RocketChat/Rocket.Chat/pull/20220) by [@Darshilp326](https://github.com/Darshilp326)) + + Added success message after saving notification preferences. + + https://user-images.githubusercontent.com/55157259/104774617-03ca3e80-579d-11eb-8fa4-990b108dd8d9.mp4 + +- Admin User Info email verified status ([#20110](https://github.com/RocketChat/Rocket.Chat/pull/20110) by [@bdelwood](https://github.com/bdelwood)) + +- Agent information panel not rendering ([#19965](https://github.com/RocketChat/Rocket.Chat/pull/19965) by [@rafaelblink](https://github.com/rafaelblink)) + +- Change header's favorite icon to filled star ([#20174](https://github.com/RocketChat/Rocket.Chat/pull/20174)) + + ### Before: + ![image](https://user-images.githubusercontent.com/27704687/104351819-a60bcd00-54e4-11eb-8b43-7d281a6e5dcb.png) + + ### After: + ![image](https://user-images.githubusercontent.com/27704687/104351632-67761280-54e4-11eb-87ba-25b940494bb5.png) + +- Changed success message for adding custom sound. ([#20272](https://github.com/RocketChat/Rocket.Chat/pull/20272) by [@Darshilp326](https://github.com/Darshilp326)) + + https://user-images.githubusercontent.com/55157259/105151351-daf2d200-5b2b-11eb-8223-eae5d60f770d.mp4 + +- Changed success message for ignoring member. ([#19996](https://github.com/RocketChat/Rocket.Chat/pull/19996) by [@Darshilp326](https://github.com/Darshilp326)) + + Different messages for ignoring/unignoring will be displayed. + + https://user-images.githubusercontent.com/55157259/103310307-4241c880-4a3d-11eb-8c6c-4c9b99d023db.mp4 + +- Creation of Omnichannel rooms not working correctly through the Apps when the agent parameter is set ([#19997](https://github.com/RocketChat/Rocket.Chat/pull/19997)) + +- Engagement dashboard graphs labels superposing each other ([#20267](https://github.com/RocketChat/Rocket.Chat/pull/20267)) + + Now after a certain breakpoint, the graphs should stack vertically, and overlapping text rotated. + + ![image](https://user-images.githubusercontent.com/40830821/105098926-93b40500-5a89-11eb-9a56-2fc3b1552914.png) + +- Fields overflowing page ([#20287](https://github.com/RocketChat/Rocket.Chat/pull/20287)) + + ### Before + ![image](https://user-images.githubusercontent.com/40830821/105246952-c1b14c00-5b52-11eb-8671-cff88edf242d.png) + + ### After + ![image](https://user-images.githubusercontent.com/40830821/105247125-0a690500-5b53-11eb-9f3c-d6a68108e336.png) + +- Fix error that occurs on changing archive status of room ([#20098](https://github.com/RocketChat/Rocket.Chat/pull/20098) by [@aKn1ghtOut](https://github.com/aKn1ghtOut)) + + This PR fixes an issue that happens when you try to edit the info of a room, and save changes after changing the value of "Archived". The archive functionality is handled separately from other room settings. The archived key is not used in the saveRoomSettings method but was still being sent over. Hence, the request was being considered invalid. I deleted the "archived" key from the data being sent in the request, making the request valid again. + +- Incorrect translations ZN ([#20245](https://github.com/RocketChat/Rocket.Chat/pull/20245) by [@moniang](https://github.com/moniang)) + +- Initial values update on Account Preferences ([#19938](https://github.com/RocketChat/Rocket.Chat/pull/19938)) + +- Invalid filters on the Omnichannel Analytics page ([#19899](https://github.com/RocketChat/Rocket.Chat/pull/19899)) + +- Jump to message ([#20265](https://github.com/RocketChat/Rocket.Chat/pull/20265)) + +- Livechat.RegisterGuest method removing unset fields ([#20124](https://github.com/RocketChat/Rocket.Chat/pull/20124) by [@rafaelblink](https://github.com/rafaelblink)) + + After changes made on https://github.com/RocketChat/Rocket.Chat/pull/19931, the `Livechat.RegisterGuest` method started removing properties from the visitor inappropriately. The properties that did not receive value were removed from the object. + Those changes were made to support the new Contact Form, but now the form has its own method to deal with Contact data so those changes are no longer necessary. + +- Markdown added for Header Room topic ([#20021](https://github.com/RocketChat/Rocket.Chat/pull/20021)) + + With the new 3.10.0 version update the Links in topic section below room name were not working, for more info refer issue #20018 + +- Messages being updated when not required after user changes his profile ([#20114](https://github.com/RocketChat/Rocket.Chat/pull/20114)) + +- Meteor errors not translating for toast messages ([#19993](https://github.com/RocketChat/Rocket.Chat/pull/19993)) + +- minWidth in FileIcon to prevent layout to broke ([#19942](https://github.com/RocketChat/Rocket.Chat/pull/19942)) + + ![image](https://user-images.githubusercontent.com/27704687/102934691-69b7f480-4483-11eb-995b-a8a9b72246aa.png) + +- Normalize messages for users in endpoint chat.getStarredMessages ([#19962](https://github.com/RocketChat/Rocket.Chat/pull/19962)) + +- OAuth users being asked to change password on second login ([#20003](https://github.com/RocketChat/Rocket.Chat/pull/20003)) + +- Omnichannel - Contact Center form is not validating custom fields properly ([#20196](https://github.com/RocketChat/Rocket.Chat/pull/20196) by [@rafaelblink](https://github.com/rafaelblink)) + + The contact form is accepting undefined values in required custom fields when creating or editing contacts, and, the errror message isn't following Rocket.chat design system. + + ### Before + ![image](https://user-images.githubusercontent.com/2493803/104522668-31688980-55dd-11eb-92c5-83f96073edc4.png) + + ### After + + #### New + ![image](https://user-images.githubusercontent.com/2493803/104770494-68f74300-574f-11eb-94a3-c8fd73365308.png) + + + #### Edit + ![image](https://user-images.githubusercontent.com/2493803/104770538-7b717c80-574f-11eb-829f-1ae304103369.png) + +- Omnichannel Agents unable to take new chats in the queue ([#20022](https://github.com/RocketChat/Rocket.Chat/pull/20022) by [@rafaelblink](https://github.com/rafaelblink)) + +- Omnichannel Business Hours form is not being rendered ([#20007](https://github.com/RocketChat/Rocket.Chat/pull/20007) by [@rafaelblink](https://github.com/rafaelblink)) + +- Omnichannel raw model importing meteor dependency ([#20093](https://github.com/RocketChat/Rocket.Chat/pull/20093)) + +- Omnichannel rooms breaking after return to queue or forward ([#20089](https://github.com/RocketChat/Rocket.Chat/pull/20089)) + +- Profile picture changing with username ([#19992](https://github.com/RocketChat/Rocket.Chat/pull/19992)) + + ![bug avatar](https://user-images.githubusercontent.com/40830821/103305935-24e40e80-49eb-11eb-9e35-9bd4c167898a.gif) + +- Remove duplicate blaze events call for EmojiActions from roomOld ([#20159](https://github.com/RocketChat/Rocket.Chat/pull/20159) by [@aKn1ghtOut](https://github.com/aKn1ghtOut)) + + A few methods concerning Emojis are bound multiple times to the DOM using the Template events() call, once in the reactions init.js and the other time after they get exported from app/ui/client/views/app/lib/getCommonRoomEvents.js to whatever page binds all the functions. The getCommonRoomEvents methods are always bound, hence negating a need to bind in a lower-level component. + +- Room special name in prompts ([#20277](https://github.com/RocketChat/Rocket.Chat/pull/20277) by [@aKn1ghtOut](https://github.com/aKn1ghtOut)) + + The "Hide room" and "Leave Room" confirmation prompts use the "name" key from the room info. When the setting " + Allow Special Characters in Room Names" is enabled, the prompts show the normalized names instead of those that contain the special characters. + + Changed the value being used from name to fname, which always has the user-set name. + + Previous: + ![Screenshot from 2021-01-20 15-52-29](https://user-images.githubusercontent.com/38764067/105161642-9b31e780-5b37-11eb-8b0c-ec4b1414c948.png) + + Updated: + ![Screenshot from 2021-01-20 15-50-19](https://user-images.githubusercontent.com/38764067/105161627-966d3380-5b37-11eb-9812-3dd9352b4f95.png) + +- Room's list showing all rooms with same name ([#20176](https://github.com/RocketChat/Rocket.Chat/pull/20176)) + + Add a migration to fix the room's list for those who ran version 3.10.1 and got it scrambled when a new user was registered. + +- RoomManager validation broken on IE ([#20490](https://github.com/RocketChat/Rocket.Chat/pull/20490)) + +- Saving with blank email in edit user ([#20259](https://github.com/RocketChat/Rocket.Chat/pull/20259) by [@RonLek](https://github.com/RonLek)) + + Disallows showing a success popup when email field is made blank in Edit User and instead shows the relevant error popup. + + + https://user-images.githubusercontent.com/28918901/104960749-dbd81680-59fa-11eb-9c7b-2b257936f894.mp4 + +- Search list filter ([#19937](https://github.com/RocketChat/Rocket.Chat/pull/19937)) + +- Sidebar palette color broken on IE ([#20457](https://github.com/RocketChat/Rocket.Chat/pull/20457)) + + ![image](https://user-images.githubusercontent.com/27704687/106056093-0a29b600-60cd-11eb-8038-eabbc0d8fb03.png) + +- Status circle in profile section ([#20016](https://github.com/RocketChat/Rocket.Chat/pull/20016)) + + The Status Circle in status message text input is now centered vertically. + +- Tabbar is opened ([#20122](https://github.com/RocketChat/Rocket.Chat/pull/20122)) + +- Translate keyword for 'Showing results of' in tables ([#20134](https://github.com/RocketChat/Rocket.Chat/pull/20134) by [@Karting06](https://github.com/Karting06)) + + Change translation keyword in order to allow the translation of `Showing results %s - %s of %s` in tables. + +- Unable to reset password by Email if upper case character is pr… ([#19643](https://github.com/RocketChat/Rocket.Chat/pull/19643) by [@bhavayAnand9](https://github.com/bhavayAnand9)) + +- User Audio notification preference not being applied ([#20061](https://github.com/RocketChat/Rocket.Chat/pull/20061)) + +- User info 'Full Name' translation keyword ([#20028](https://github.com/RocketChat/Rocket.Chat/pull/20028) by [@Karting06](https://github.com/Karting06)) + + Fix the `Full Name` translation keyword, so that it can be translated. + +- User registration updating wrong subscriptions ([#20128](https://github.com/RocketChat/Rocket.Chat/pull/20128)) + +- Video call message not translated ([#18722](https://github.com/RocketChat/Rocket.Chat/pull/18722)) + + Fixed video call message not translated. + +- ViewLogs title translation keyword ([#20029](https://github.com/RocketChat/Rocket.Chat/pull/20029) by [@Karting06](https://github.com/Karting06)) + + Fix `View Logs` title translation keyword to enable translation of the title + +- White screen after 2FA code entered ([#20225](https://github.com/RocketChat/Rocket.Chat/pull/20225) by [@wggdeveloper](https://github.com/wggdeveloper)) + +- Wrong userId when open own user profile ([#20181](https://github.com/RocketChat/Rocket.Chat/pull/20181)) + +
+🔍 Minor changes + + +- Add translation of Edit Status in all languages ([#19916](https://github.com/RocketChat/Rocket.Chat/pull/19916) by [@sushant52](https://github.com/sushant52)) + + Closes [#19915](https://github.com/RocketChat/Rocket.Chat/issues/19915) + The profile options menu is well translated in many languages. However, Edit Status is the only button which is not well translated. With this change, the whole profile options will be properly translated in a lot of languages. + +- Bump axios from 0.18.0 to 0.18.1 ([#20055](https://github.com/RocketChat/Rocket.Chat/pull/20055) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore: Add tests for the api/licenses.* endpoints ([#20041](https://github.com/RocketChat/Rocket.Chat/pull/20041) by [@lucassartor](https://github.com/lucassartor)) + + Adding api tests for the new `licenses.*` endpoints (`licenses.get` and `licenses.add`) + +- Chore: add tests to api/instances.get endpoint ([#19988](https://github.com/RocketChat/Rocket.Chat/pull/19988) by [@lucassartor](https://github.com/lucassartor)) + +- Chore: Change console.warning() to console.warn() ([#20200](https://github.com/RocketChat/Rocket.Chat/pull/20200) by [@lucassartor](https://github.com/lucassartor)) + +- chore: Change return button ([#20045](https://github.com/RocketChat/Rocket.Chat/pull/20045)) + +- Chore: Fix i18n duplicated keys ([#19998](https://github.com/RocketChat/Rocket.Chat/pull/19998)) + +- Chore: Recover and update Storybook ([#20047](https://github.com/RocketChat/Rocket.Chat/pull/20047)) + + It reenables Storybook's usage. + +- Language update from LingoHub 🤖 on 2020-12-30Z ([#20013](https://github.com/RocketChat/Rocket.Chat/pull/20013)) + +- Language update from LingoHub 🤖 on 2021-01-04Z ([#20034](https://github.com/RocketChat/Rocket.Chat/pull/20034)) + +- Language update from LingoHub 🤖 on 2021-01-11Z ([#20146](https://github.com/RocketChat/Rocket.Chat/pull/20146)) + +- Language update from LingoHub 🤖 on 2021-01-18Z ([#20246](https://github.com/RocketChat/Rocket.Chat/pull/20246)) + +- Regression: Add tests to new banners REST endpoints ([#20492](https://github.com/RocketChat/Rocket.Chat/pull/20492) by [@lucassartor](https://github.com/lucassartor)) + + Add tests for the new `banners.*` endpoints: `banners.getNew` and `banners.dismiss`. + +- Regression: Announcement bar not showing properly Markdown content ([#20290](https://github.com/RocketChat/Rocket.Chat/pull/20290)) + + **Before**: + ![image](https://user-images.githubusercontent.com/27704687/105273746-a4907380-5b7a-11eb-8121-aff665251c44.png) + + **After**: + ![image](https://user-images.githubusercontent.com/27704687/105274050-2e404100-5b7b-11eb-93b2-b6282a7bed95.png) + +- regression: Announcement link open in new tab ([#20435](https://github.com/RocketChat/Rocket.Chat/pull/20435)) + +- Regression: Apps-Engine - Convert streams to buffers on file upload ([#20523](https://github.com/RocketChat/Rocket.Chat/pull/20523)) + + This is an implementation to accommodate the changes in API for the `IPreFileUpload` hook in the Apps-Engine. Explanation on the reasoning for it is here https://github.com/RocketChat/Rocket.Chat.Apps-engine/pull/376 + +- Regression: Attachments ([#20291](https://github.com/RocketChat/Rocket.Chat/pull/20291)) + +- Regression: Bio page not rendering ([#20450](https://github.com/RocketChat/Rocket.Chat/pull/20450)) + +- Regression: Change sort icon ([#20177](https://github.com/RocketChat/Rocket.Chat/pull/20177)) + + ### Before + ![image](https://user-images.githubusercontent.com/40830821/104366414-1bcd6400-54f8-11eb-9fc7-c6f13f07a61e.png) + + ### After + ![image](https://user-images.githubusercontent.com/40830821/104366542-4cad9900-54f8-11eb-83ca-acb99899515a.png) + +- Regression: Custom field labels are not displayed properly on Omnichannel Contact Profile form ([#20393](https://github.com/RocketChat/Rocket.Chat/pull/20393) by [@rafaelblink](https://github.com/rafaelblink)) + + ### Before + ![image](https://user-images.githubusercontent.com/2493803/105780399-20116c80-5f4f-11eb-9620-0901472e453b.png) + + ![image](https://user-images.githubusercontent.com/2493803/105780420-2e5f8880-5f4f-11eb-8e93-8115ebc685be.png) + + ### After + + ![image](https://user-images.githubusercontent.com/2493803/105780832-1ccab080-5f50-11eb-8042-188dd0c41904.png) + + ![image](https://user-images.githubusercontent.com/2493803/105780911-500d3f80-5f50-11eb-96e0-7df3f179dbd5.png) + +- Regression: ESLint Warning - explicit-function-return-type ([#20434](https://github.com/RocketChat/Rocket.Chat/pull/20434) by [@aditya-mitra](https://github.com/aditya-mitra)) + + Added explicit Return Type (Promise) on the function to fix eslint warning (`explicit-function-return-type`) + +- Regression: Fix banners sync data types ([#20517](https://github.com/RocketChat/Rocket.Chat/pull/20517)) + +- Regression: Fix Cron statistics TypeError ([#20343](https://github.com/RocketChat/Rocket.Chat/pull/20343) by [@RonLek](https://github.com/RonLek)) + +- Regression: Fix duplicate email messages in multiple instances ([#20495](https://github.com/RocketChat/Rocket.Chat/pull/20495)) + +- Regression: Fix e2e paused state ([#20511](https://github.com/RocketChat/Rocket.Chat/pull/20511)) + +- Regression: Fixed update room avatar issue. ([#20433](https://github.com/RocketChat/Rocket.Chat/pull/20433) by [@Darshilp326](https://github.com/Darshilp326)) + + Users can now update their room avatar without any error. + + https://user-images.githubusercontent.com/55157259/105951602-560d3880-6096-11eb-97a5-b5eb9a28b58d.mp4 + +- Regression: Info Page Icon style and usage graph breaking ([#20180](https://github.com/RocketChat/Rocket.Chat/pull/20180)) + +- Regression: Lint warnings and some datepicker ([#20280](https://github.com/RocketChat/Rocket.Chat/pull/20280)) + +- Regression: NPS ([#20514](https://github.com/RocketChat/Rocket.Chat/pull/20514)) + +- Regression: reactAttachments cpu ([#20255](https://github.com/RocketChat/Rocket.Chat/pull/20255)) + +- Regression: Room not scrolling to bottom ([#20516](https://github.com/RocketChat/Rocket.Chat/pull/20516)) + +- Regression: Set image sizes based on rotation ([#20531](https://github.com/RocketChat/Rocket.Chat/pull/20531)) + +- Regression: Unread superposing announcement. ([#20306](https://github.com/RocketChat/Rocket.Chat/pull/20306)) + + ### Before + ![image](https://user-images.githubusercontent.com/40830821/105412619-c2f67d80-5c13-11eb-8204-5932ea880c8a.png) + + + ### After + ![image](https://user-images.githubusercontent.com/40830821/105411176-d1439a00-5c11-11eb-8d1b-ea27c8485214.png) + +- Regression: User Dropdown margin ([#20222](https://github.com/RocketChat/Rocket.Chat/pull/20222)) + +- Rewrite : Message Thread metrics ([#20051](https://github.com/RocketChat/Rocket.Chat/pull/20051)) + + ![image](https://user-images.githubusercontent.com/5263975/103585504-e904e980-4ec1-11eb-8d8c-3113ac812ead.png) + +- Rewrite Broadcast ([#20119](https://github.com/RocketChat/Rocket.Chat/pull/20119)) + + ![image](https://user-images.githubusercontent.com/5263975/104035912-7fcaf200-51b1-11eb-91df-228c23d97448.png) + +- Rewrite Discussion Metric ([#20117](https://github.com/RocketChat/Rocket.Chat/pull/20117)) + + https://user-images.githubusercontent.com/5263975/104031909-23190880-51ac-11eb-93dd-5d4b5295886d.mp4 + +- Rewrite Message action links ([#20123](https://github.com/RocketChat/Rocket.Chat/pull/20123)) + +- Rewrite: Message Attachments ([#20106](https://github.com/RocketChat/Rocket.Chat/pull/20106)) + + ![image](https://user-images.githubusercontent.com/5263975/104783709-69023d80-5765-11eb-968f-a2b93fdfb51e.png) + +- Security sync ([#20430](https://github.com/RocketChat/Rocket.Chat/pull/20430)) + +- Update "Industry" setting ([#20510](https://github.com/RocketChat/Rocket.Chat/pull/20510)) + +- Update Apps-Engine and permissions translations ([#20491](https://github.com/RocketChat/Rocket.Chat/pull/20491) by [@lolimay](https://github.com/lolimay)) + + Update Apps-Engine version and apply changes in translations for the changed permissions. Please review the texts on the translation files to make sure they're clear. + +- Update Apps-Engine version ([#20482](https://github.com/RocketChat/Rocket.Chat/pull/20482)) + + Update Apps-Engine version with some fixes for the current RC cycle. + +- Update password policy English translation ([#20118](https://github.com/RocketChat/Rocket.Chat/pull/20118) by [@zdumitru](https://github.com/zdumitru)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Darshilp326](https://github.com/Darshilp326) +- [@Karting06](https://github.com/Karting06) +- [@RonLek](https://github.com/RonLek) +- [@aKn1ghtOut](https://github.com/aKn1ghtOut) +- [@aditya-mitra](https://github.com/aditya-mitra) +- [@bdelwood](https://github.com/bdelwood) +- [@bhavayAnand9](https://github.com/bhavayAnand9) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@i-kychukov](https://github.com/i-kychukov) +- [@ikyuchukov](https://github.com/ikyuchukov) +- [@lolimay](https://github.com/lolimay) +- [@lucassartor](https://github.com/lucassartor) +- [@moniang](https://github.com/moniang) +- [@rafaelblink](https://github.com/rafaelblink) +- [@sushant52](https://github.com/sushant52) +- [@tlskinneriv](https://github.com/tlskinneriv) +- [@wggdeveloper](https://github.com/wggdeveloper) +- [@zdumitru](https://github.com/zdumitru) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@d-gubert](https://github.com/d-gubert) +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@ggazzo](https://github.com/ggazzo) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@thassiov](https://github.com/thassiov) +- [@tiagoevanp](https://github.com/tiagoevanp) +- [@yash-rajpal](https://github.com/yash-rajpal) + +# 3.10.5 +`2021-01-27 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.21.0-alpha.4235` + +### 🐛 Bug fixes + + +- Security Hotfix + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.10.4 +`2021-01-14 · 1 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.21.0-alpha.4235` + +### 🐛 Bug fixes + + +- Room's list showing all rooms with same name ([#20176](https://github.com/RocketChat/Rocket.Chat/pull/20176)) + + Add a migration to fix the room's list for those who ran version 3.10.1 and got it scrambled when a new user was registered. + +
+🔍 Minor changes + + +- Chore: Change console.warning() to console.warn() ([#20200](https://github.com/RocketChat/Rocket.Chat/pull/20200) by [@lucassartor](https://github.com/lucassartor)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@lucassartor](https://github.com/lucassartor) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.10.3 +`2021-01-09 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.21.0-alpha.4235` + +### 🐛 Bug fixes + + +- User registration updating wrong subscriptions ([#20128](https://github.com/RocketChat/Rocket.Chat/pull/20128)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.10.2 +`2021-01-08 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.21.0-alpha.4235` + +### 🐛 Bug fixes + + +- Tabbar is opened ([#20122](https://github.com/RocketChat/Rocket.Chat/pull/20122)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) + +# 3.10.1 +`2021-01-08 · 11 🐛 · 7 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.21.0-alpha.4235` + +### 🐛 Bug fixes + + +- **ENTERPRISE:** Omnichannel custom fields not storing additional form values ([#19953](https://github.com/RocketChat/Rocket.Chat/pull/19953) by [@rafaelblink](https://github.com/rafaelblink)) + +- Actions from User Info panel ([#20073](https://github.com/RocketChat/Rocket.Chat/pull/20073) by [@Darshilp326](https://github.com/Darshilp326)) + + Users can be removed from channels without any error message. + +- Agent information panel not rendering ([#19965](https://github.com/RocketChat/Rocket.Chat/pull/19965) by [@rafaelblink](https://github.com/rafaelblink)) + +- Creation of Omnichannel rooms not working correctly through the Apps when the agent parameter is set ([#19997](https://github.com/RocketChat/Rocket.Chat/pull/19997)) + +- Messages being updated when not required after user changes his profile ([#20114](https://github.com/RocketChat/Rocket.Chat/pull/20114)) + +- OAuth users being asked to change password on second login ([#20003](https://github.com/RocketChat/Rocket.Chat/pull/20003)) + +- Omnichannel Agents unable to take new chats in the queue ([#20022](https://github.com/RocketChat/Rocket.Chat/pull/20022) by [@rafaelblink](https://github.com/rafaelblink)) + +- Omnichannel Business Hours form is not being rendered ([#20007](https://github.com/RocketChat/Rocket.Chat/pull/20007) by [@rafaelblink](https://github.com/rafaelblink)) + +- Omnichannel raw model importing meteor dependency ([#20093](https://github.com/RocketChat/Rocket.Chat/pull/20093)) + +- Omnichannel rooms breaking after return to queue or forward ([#20089](https://github.com/RocketChat/Rocket.Chat/pull/20089)) + +- User Audio notification preference not being applied ([#20061](https://github.com/RocketChat/Rocket.Chat/pull/20061)) + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Darshilp326](https://github.com/Darshilp326) +- [@rafaelblink](https://github.com/rafaelblink) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@gabriellsh](https://github.com/gabriellsh) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.10.0 +`2020-12-29 · 6 🎉 · 10 🚀 · 29 🐛 · 39 🔍 · 20 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.21.0-alpha.4235` + +### 🎉 New features + + +- Custom scroll ([#19701](https://github.com/RocketChat/Rocket.Chat/pull/19701)) + +- Omnichannel Contact Center (Directory) ([#19931](https://github.com/RocketChat/Rocket.Chat/pull/19931) by [@rafaelblink](https://github.com/rafaelblink)) + +- REST Endpoint `instances.get` ([#19926](https://github.com/RocketChat/Rocket.Chat/pull/19926) by [@g-thome](https://github.com/g-thome)) + + Returns an array of instances on the cluster. + +- REST endpoints to add and retrieve Enterprise licenses ([#19925](https://github.com/RocketChat/Rocket.Chat/pull/19925) by [@g-thome](https://github.com/g-thome)) + +- Update Checker Description ([#19892](https://github.com/RocketChat/Rocket.Chat/pull/19892)) + +- User preference for audio notifications ([#19924](https://github.com/RocketChat/Rocket.Chat/pull/19924)) + + ![image](https://user-images.githubusercontent.com/40830821/102808922-dfe32b00-439f-11eb-9268-6d0cf69dc64c.png) + +### 🚀 Improvements + + +- Removed useEndpointDataExperimental hook usage ([#19496](https://github.com/RocketChat/Rocket.Chat/pull/19496)) + +- Replace useClipboard ([#19764](https://github.com/RocketChat/Rocket.Chat/pull/19764)) + +- Replace usePrefersReducedMotion ([#19759](https://github.com/RocketChat/Rocket.Chat/pull/19759)) + +- Rewrite contextualbar OTR panel ([#19674](https://github.com/RocketChat/Rocket.Chat/pull/19674)) + +- Rewrite contextualbar RoomMembers - AddUsers as React Component ([#19803](https://github.com/RocketChat/Rocket.Chat/pull/19803)) + +- Rewrite contextualbar RoomMembers - InviteUsers ([#19694](https://github.com/RocketChat/Rocket.Chat/pull/19694)) + +- Rewrite contextualbar RoomMembers as React Component ([#19841](https://github.com/RocketChat/Rocket.Chat/pull/19841)) + +- Rewrite NotificationPreferences to React component ([#19672](https://github.com/RocketChat/Rocket.Chat/pull/19672)) + +- Rewrite Room Files as React Component ([#19580](https://github.com/RocketChat/Rocket.Chat/pull/19580)) + +- Show all screen when printing screen ([#19928](https://github.com/RocketChat/Rocket.Chat/pull/19928)) + +### 🐛 Bug fixes + + +- 'Not Allowed' in message auditing ([#19762](https://github.com/RocketChat/Rocket.Chat/pull/19762)) + +- **ENTERPRISE:** Omnichannel Department form is not correctly storing the list of departments allowed for forwarding ([#19793](https://github.com/RocketChat/Rocket.Chat/pull/19793) by [@rafaelblink](https://github.com/rafaelblink)) + +- Add fallback message when show notification content is disabled ([#19516](https://github.com/RocketChat/Rocket.Chat/pull/19516) by [@youssef-md](https://github.com/youssef-md)) + +- Admin Users screen sorting showing deactivated users in wrong order ([#19898](https://github.com/RocketChat/Rocket.Chat/pull/19898)) + +- Custom Avatar ([#19805](https://github.com/RocketChat/Rocket.Chat/pull/19805)) + +- Download my data with file uploads ([#19862](https://github.com/RocketChat/Rocket.Chat/pull/19862)) + +- Emails not showing up in Admin/Users ([#19727](https://github.com/RocketChat/Rocket.Chat/pull/19727)) + +- File Tab Order ([#19729](https://github.com/RocketChat/Rocket.Chat/pull/19729)) + +- Forgot password endpoint return status ([#19842](https://github.com/RocketChat/Rocket.Chat/pull/19842) by [@g-thome](https://github.com/g-thome)) + +- Group DMs title when user changes his/her name ([#19834](https://github.com/RocketChat/Rocket.Chat/pull/19834) by [@g-thome](https://github.com/g-thome)) + +- Hightlights validation on Account Preferences page ([#19902](https://github.com/RocketChat/Rocket.Chat/pull/19902) by [@aKn1ghtOut](https://github.com/aKn1ghtOut)) + + This PR fixes two issues in the account settings "preferences" panel. + Once set, the "Highlighted Words" setting cannot be reset to an empty string. This was fixed by changing the string validation from checking the length to checking the type of variable. + Secondly, it tracks the changes to correctly identify if changes after the last "save changes" action have been made, using an "updates" state variable, instead of just comparing against the initialValue that does not change on clicking "save changes". + +- Image preview for image URLs on messages ([#19734](https://github.com/RocketChat/Rocket.Chat/pull/19734) by [@g-thome](https://github.com/g-thome)) + +- Issue with oembed ([#19923](https://github.com/RocketChat/Rocket.Chat/pull/19923)) + +- Issue with oembed ([#19886](https://github.com/RocketChat/Rocket.Chat/pull/19886)) + +- Issue with special message rendering ([#19817](https://github.com/RocketChat/Rocket.Chat/pull/19817)) + +- Omnichannel Departments Canned Responses ([#19830](https://github.com/RocketChat/Rocket.Chat/pull/19830)) + +- Problem with attachment render ([#19854](https://github.com/RocketChat/Rocket.Chat/pull/19854)) + +- Room scrolling to top after returns to a opened room ([#19945](https://github.com/RocketChat/Rocket.Chat/pull/19945)) + +- RoomForeword ([#19875](https://github.com/RocketChat/Rocket.Chat/pull/19875)) + +- Sidebar presence will now correctly update for Omnichannel rooms ([#19746](https://github.com/RocketChat/Rocket.Chat/pull/19746)) + +- Sidebar UI disappearing ([#19725](https://github.com/RocketChat/Rocket.Chat/pull/19725)) + +- Some apps were not correctly enabled during startup in HA environments ([#19763](https://github.com/RocketChat/Rocket.Chat/pull/19763)) + +- Spotify oEmbed ([#19825](https://github.com/RocketChat/Rocket.Chat/pull/19825)) + +- Startup error when using MongoDB with a password containing special characters ([#19749](https://github.com/RocketChat/Rocket.Chat/pull/19749)) + +- Status on searchlist ([#19935](https://github.com/RocketChat/Rocket.Chat/pull/19935)) + +- UIKit Modal not scrolling ([#19690](https://github.com/RocketChat/Rocket.Chat/pull/19690)) + +- Update base image in Dockerfile.rhel ([#19036](https://github.com/RocketChat/Rocket.Chat/pull/19036) by [@andykrohg](https://github.com/andykrohg)) + +- User email showing [object Object] ([#19870](https://github.com/RocketChat/Rocket.Chat/pull/19870)) + +- User Info 'Local Time' translation keyword ([#19879](https://github.com/RocketChat/Rocket.Chat/pull/19879) by [@J4r3tt](https://github.com/J4r3tt)) + +
+🔍 Minor changes + + +- bump fuselage ([#19736](https://github.com/RocketChat/Rocket.Chat/pull/19736)) + +- Bump ini from 1.3.5 to 1.3.8 in /ee/server/services ([#19844](https://github.com/RocketChat/Rocket.Chat/pull/19844) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump systeminformation from 4.30.1 to 4.33.0 in /ee/server/services ([#19929](https://github.com/RocketChat/Rocket.Chat/pull/19929) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Chore: Fix Caddy download URL in Snaps ([#19912](https://github.com/RocketChat/Rocket.Chat/pull/19912)) + +- Chore: Add watch.settings to events whitelist ([#19850](https://github.com/RocketChat/Rocket.Chat/pull/19850)) + +- Chore: Change Youtube test to verify if has an iframe with max-width ([#19863](https://github.com/RocketChat/Rocket.Chat/pull/19863)) + +- Chore: Remove extra parentheses from return type ([#19598](https://github.com/RocketChat/Rocket.Chat/pull/19598) by [@ArnoSaine](https://github.com/ArnoSaine)) + +- Chore: Update Pull Request template ([#19768](https://github.com/RocketChat/Rocket.Chat/pull/19768)) + + Improve the template of Pull Requests in order to make it clear reducing duplicated information and removing the visible checklists that were generating noise and misunderstanding with the PR progress. + - Moved the checklists to inside comments + - Merge the changelog and proposed changes sections to have a single source of description that goes to the changelog + - Remove the screenshot section, they can be added inside the description + - Changed the proposed changes title to incentivizing the usage of images and videos + +- Frontend folder structure ([#19631](https://github.com/RocketChat/Rocket.Chat/pull/19631)) + +- Improve Docker container size by adding chown to ADD command ([#19796](https://github.com/RocketChat/Rocket.Chat/pull/19796)) + +- Improve: Report Weekly Active Users to statistics ([#19843](https://github.com/RocketChat/Rocket.Chat/pull/19843)) + + Add the fields `uniqueUsersOfLastWeek`, `uniqueDevicesOfLastWeek` and `uniqueOSOfLastWeek` to the statistics report among the daily and monthly already reported. + +- Language update from LingoHub 🤖 on 2020-12-21Z ([#19922](https://github.com/RocketChat/Rocket.Chat/pull/19922)) + +- Merge EE and Community translations and LingoHub manual sync ([#19723](https://github.com/RocketChat/Rocket.Chat/pull/19723)) + +- Merge master into develop & Set version to 3.10.0-develop ([#19720](https://github.com/RocketChat/Rocket.Chat/pull/19720)) + +- Message parsing and rendering - Phase 1 ([#19654](https://github.com/RocketChat/Rocket.Chat/pull/19654)) + +- Regression: "My Account" page doesn't load ([#19753](https://github.com/RocketChat/Rocket.Chat/pull/19753) by [@g-thome](https://github.com/g-thome)) + +- Regression: Add currently running instance to instances.get endpoint ([#19955](https://github.com/RocketChat/Rocket.Chat/pull/19955) by [@g-thome](https://github.com/g-thome)) + +- Regression: Add Members showing the wrong template ([#19748](https://github.com/RocketChat/Rocket.Chat/pull/19748)) + +- Regression: Add missing translations on the Omnichannel Contact Center(Directory) ([#19968](https://github.com/RocketChat/Rocket.Chat/pull/19968) by [@rafaelblink](https://github.com/rafaelblink)) + +- Regression: Admin Sidebar Scroll ([#19944](https://github.com/RocketChat/Rocket.Chat/pull/19944)) + +- Regression: Check permissions properly when fetching rooms in Omnichannel Directory ([#19951](https://github.com/RocketChat/Rocket.Chat/pull/19951) by [@rafaelblink](https://github.com/rafaelblink)) + +- Regression: contextualBar folder structure ([#19761](https://github.com/RocketChat/Rocket.Chat/pull/19761)) + +- Regression: Double Scrollbars on tables ([#19980](https://github.com/RocketChat/Rocket.Chat/pull/19980)) + + Before: + ![image](https://user-images.githubusercontent.com/40830821/103242719-0ec84680-4936-11eb-87a7-68b6eea8de7b.png) + + + After: + ![image](https://user-images.githubusercontent.com/40830821/103242680-ee988780-4935-11eb-99e2-a95de99f78f1.png) + +- Regression: Failed autolinker and markdown rendering ([#19831](https://github.com/RocketChat/Rocket.Chat/pull/19831)) + +- Regression: fix broken members list ([#19806](https://github.com/RocketChat/Rocket.Chat/pull/19806)) + +- Regression: Fix member list Actions ([#19876](https://github.com/RocketChat/Rocket.Chat/pull/19876)) + +- Regression: Fix oembed ([#19978](https://github.com/RocketChat/Rocket.Chat/pull/19978)) + +- Regression: Fix Room Files for DMs ([#19874](https://github.com/RocketChat/Rocket.Chat/pull/19874)) + +- Regression: Fix sorting indicators on Admin Users page ([#19950](https://github.com/RocketChat/Rocket.Chat/pull/19950)) + +- Regression: Header Styles fixes ([#19946](https://github.com/RocketChat/Rocket.Chat/pull/19946)) + +- Regression: Omnichannel Custom Fields Form no longer working after refactoring ([#19948](https://github.com/RocketChat/Rocket.Chat/pull/19948)) + + The Omnichannel `Custom Fields` form is not working anymore after some refactorings on client-side. + When the user clicks on `Custom Field` in the Omnichannel menu, a blank page appears. + +- Regression: polishing licenses endpoints ([#19981](https://github.com/RocketChat/Rocket.Chat/pull/19981) by [@g-thome](https://github.com/g-thome)) + +- Regression: roomInfo folder structure ([#19787](https://github.com/RocketChat/Rocket.Chat/pull/19787)) + +- Regression: RoomMembers Permission ([#19867](https://github.com/RocketChat/Rocket.Chat/pull/19867)) + +- Regression: User Info Context bar breaking. ([#19807](https://github.com/RocketChat/Rocket.Chat/pull/19807)) + +- Regression: UserCard "See full profile" link broken ([#19941](https://github.com/RocketChat/Rocket.Chat/pull/19941)) + +- Regression: UserInfoWithData endpoint variable ([#19816](https://github.com/RocketChat/Rocket.Chat/pull/19816)) + +- Remove Heroku from readme ([#19901](https://github.com/RocketChat/Rocket.Chat/pull/19901)) + +- Rewrite: Room Header ([#19808](https://github.com/RocketChat/Rocket.Chat/pull/19808)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@ArnoSaine](https://github.com/ArnoSaine) +- [@J4r3tt](https://github.com/J4r3tt) +- [@aKn1ghtOut](https://github.com/aKn1ghtOut) +- [@andykrohg](https://github.com/andykrohg) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@g-thome](https://github.com/g-thome) +- [@rafaelblink](https://github.com/rafaelblink) +- [@youssef-md](https://github.com/youssef-md) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@alansikora](https://github.com/alansikora) +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@thassiov](https://github.com/thassiov) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 3.9.4 +`2020-12-31 · 3 🐛 · 1 🔍 · 6 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.21.0-alpha.4235` + +### 🐛 Bug fixes + + +- Omnichannel Departments Canned Responses ([#19830](https://github.com/RocketChat/Rocket.Chat/pull/19830)) + +- Room scrolling to top after returns to a opened room ([#19945](https://github.com/RocketChat/Rocket.Chat/pull/19945)) + +- Status on searchlist ([#19935](https://github.com/RocketChat/Rocket.Chat/pull/19935)) + +
+🔍 Minor changes + + +- Regression: Fix oembed ([#19978](https://github.com/RocketChat/Rocket.Chat/pull/19978)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@ggazzo](https://github.com/ggazzo) +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 3.9.3 +`2020-12-18 · 2 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.21.0-alpha.4235` + +### 🐛 Bug fixes + + +- Issue with special message rendering ([#19817](https://github.com/RocketChat/Rocket.Chat/pull/19817)) + +- Problem with attachment render ([#19854](https://github.com/RocketChat/Rocket.Chat/pull/19854)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) + +# 3.9.2 +`2020-12-17 · 5 🐛 · 6 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.21.0-alpha.4235` + +### 🐛 Bug fixes + + +- 'Not Allowed' in message auditing ([#19762](https://github.com/RocketChat/Rocket.Chat/pull/19762)) + +- **ENTERPRISE:** Omnichannel Department form is not correctly storing the list of departments allowed for forwarding ([#19793](https://github.com/RocketChat/Rocket.Chat/pull/19793) by [@rafaelblink](https://github.com/rafaelblink)) + +- Download my data with file uploads ([#19862](https://github.com/RocketChat/Rocket.Chat/pull/19862)) + +- Forgot password endpoint return status ([#19842](https://github.com/RocketChat/Rocket.Chat/pull/19842) by [@g-thome](https://github.com/g-thome)) + +- Some apps were not correctly enabled during startup in HA environments ([#19763](https://github.com/RocketChat/Rocket.Chat/pull/19763)) + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@g-thome](https://github.com/g-thome) +- [@rafaelblink](https://github.com/rafaelblink) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@thassiov](https://github.com/thassiov) + +# 3.9.1 +`2020-12-05 · 5 🐛 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.20.0` + +### 🐛 Bug fixes + + +- Exception on certain login cases including SAML + +- Image preview for image URLs on messages ([#19734](https://github.com/RocketChat/Rocket.Chat/pull/19734) by [@g-thome](https://github.com/g-thome)) + +- Sidebar presence will now correctly update for Omnichannel rooms ([#19746](https://github.com/RocketChat/Rocket.Chat/pull/19746)) + +- Sidebar UI disappearing ([#19725](https://github.com/RocketChat/Rocket.Chat/pull/19725)) + +- Startup error when using MongoDB with a password containing special characters ([#19749](https://github.com/RocketChat/Rocket.Chat/pull/19749)) + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@g-thome](https://github.com/g-thome) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@alansikora](https://github.com/alansikora) +- [@gabriellsh](https://github.com/gabriellsh) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.9.0 +`2020-11-28 · 2 🎉 · 16 🚀 · 27 🐛 · 31 🔍 · 21 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.20.0` + +### 🎉 New features + + +- 2 Factor Authentication when using OAuth and SAML ([#11726](https://github.com/RocketChat/Rocket.Chat/pull/11726) by [@Hudell](https://github.com/Hudell)) + +- Added setting to disable password changes for users who log in using SSO ([#10391](https://github.com/RocketChat/Rocket.Chat/pull/10391) by [@Hudell](https://github.com/Hudell)) + +### 🚀 Improvements + + +- **ENTERPRISE:** UI/UX enhancements in Omnichannel Monitors page ([#19495](https://github.com/RocketChat/Rocket.Chat/pull/19495) by [@rafaelblink](https://github.com/rafaelblink)) + +- **ENTERPRISE:** UI/UX enhancements in Omnichannel Priorities page ([#19512](https://github.com/RocketChat/Rocket.Chat/pull/19512) by [@rafaelblink](https://github.com/rafaelblink)) + +- **ENTERPRISE:** UI/UX enhancements in Omnichannel Tags page ([#19510](https://github.com/RocketChat/Rocket.Chat/pull/19510) by [@rafaelblink](https://github.com/rafaelblink)) + +- **ENTERPRISE:** UI/UX enhancements in Omnichannel Units page ([#19500](https://github.com/RocketChat/Rocket.Chat/pull/19500) by [@rafaelblink](https://github.com/rafaelblink)) + +- Add support to `replace` operation when using Change Stream ([#19579](https://github.com/RocketChat/Rocket.Chat/pull/19579)) + +- Bundle Size Client ([#19533](https://github.com/RocketChat/Rocket.Chat/pull/19533)) + + temporarily removes some codeblock languages + Moved some libraries to dynamic imports + Removed some shared code not used on the client side + +- Forward Omnichannel room to agent in another department ([#19576](https://github.com/RocketChat/Rocket.Chat/pull/19576) by [@mrfigueiredo](https://github.com/mrfigueiredo)) + +- KeyboardShortcuts as React component ([#19518](https://github.com/RocketChat/Rocket.Chat/pull/19518)) + +- Remove Box dependence from Tag and Badge components ([#19467](https://github.com/RocketChat/Rocket.Chat/pull/19467)) + +- Remove Box props from Avatar component ([#19491](https://github.com/RocketChat/Rocket.Chat/pull/19491)) + +- Rewrite Auto-Translate as a React component ([#19633](https://github.com/RocketChat/Rocket.Chat/pull/19633)) + +- Rewrite Room Info ([#19511](https://github.com/RocketChat/Rocket.Chat/pull/19511)) + +- SlackBridge threads performance improvement ([#19338](https://github.com/RocketChat/Rocket.Chat/pull/19338) by [@antkaz](https://github.com/antkaz)) + +- UI/UX enhancements in department pages following the design system ([#19421](https://github.com/RocketChat/Rocket.Chat/pull/19421) by [@rafaelblink](https://github.com/rafaelblink)) + +- UI/UX enhancements in Omnichannel Triggers page ([#19485](https://github.com/RocketChat/Rocket.Chat/pull/19485) by [@rafaelblink](https://github.com/rafaelblink)) + +- UI/UX enhancements in Omnichannnel Current Chats page ([#19397](https://github.com/RocketChat/Rocket.Chat/pull/19397) by [@rafaelblink](https://github.com/rafaelblink)) + +### 🐛 Bug fixes + + +- Allow username change if LDAP is enabled but their username is not linked to an LDAP field ([#19381](https://github.com/RocketChat/Rocket.Chat/pull/19381) by [@robertfromont](https://github.com/robertfromont)) + + LDAP users can change their username if the LDAP_Username_Field setting is blank. + +- Auto Translate ([#19599](https://github.com/RocketChat/Rocket.Chat/pull/19599)) + +- Channel actions not working when reduce motion is active ([#19638](https://github.com/RocketChat/Rocket.Chat/pull/19638)) + +- Column width was not following the design system in Omnichannel Departments page ([#19601](https://github.com/RocketChat/Rocket.Chat/pull/19601) by [@rafaelblink](https://github.com/rafaelblink)) + +- Engagement dashboard on old Mongo versions ([#19616](https://github.com/RocketChat/Rocket.Chat/pull/19616)) + +- Engagement dashboard: graphs adjustment ([#19450](https://github.com/RocketChat/Rocket.Chat/pull/19450)) + +- IE11 - Update ui kit and fuselage bundle ([#19561](https://github.com/RocketChat/Rocket.Chat/pull/19561)) + +- Input without label and email ordering missing on Omnichannel Agents page ([#19414](https://github.com/RocketChat/Rocket.Chat/pull/19414) by [@rafaelblink](https://github.com/rafaelblink)) + +- Issue with drag and drop ([#19593](https://github.com/RocketChat/Rocket.Chat/pull/19593)) + +- LDAP Unique Identifier Field can not use operational attributes ([#19571](https://github.com/RocketChat/Rocket.Chat/pull/19571) by [@truongtx8](https://github.com/truongtx8)) + +- Omnichannel Analytics page doesn't have field labels ([#19400](https://github.com/RocketChat/Rocket.Chat/pull/19400) by [@rafaelblink](https://github.com/rafaelblink)) + +- Outgoing integrations without trigger words or with multiple commas ([#19488](https://github.com/RocketChat/Rocket.Chat/pull/19488) by [@g-thome](https://github.com/g-thome)) + +- Prevent headerRoom's click to open room/direct info ([#19596](https://github.com/RocketChat/Rocket.Chat/pull/19596)) + +- Regex was not working properly on visitors.search endpoint ([#19577](https://github.com/RocketChat/Rocket.Chat/pull/19577) by [@rafaelblink](https://github.com/rafaelblink)) + +- Restore Message View Mode Preference ([#19458](https://github.com/RocketChat/Rocket.Chat/pull/19458)) + + [FIX] Restore Message View Mode Preference + +- Role description not updating ([#19236](https://github.com/RocketChat/Rocket.Chat/pull/19236)) + +- Save button enabled by default in Omnichannel Business Hours Form ([#19493](https://github.com/RocketChat/Rocket.Chat/pull/19493) by [@rafaelblink](https://github.com/rafaelblink)) + +- Settings may not update internal cache immediately ([#19628](https://github.com/RocketChat/Rocket.Chat/pull/19628) by [@g-thome](https://github.com/g-thome)) + +- Setup Wizard User Creation Locking up ([#19509](https://github.com/RocketChat/Rocket.Chat/pull/19509)) + + [FIX] Setup Wizard User Creation Locking up + +- Size of embed Youtube on threads for small screens ([#19514](https://github.com/RocketChat/Rocket.Chat/pull/19514)) + +- The width of list columns was not following the design system in Omnichannel Agents page ([#19625](https://github.com/RocketChat/Rocket.Chat/pull/19625) by [@rafaelblink](https://github.com/rafaelblink)) + +- The width of list columns was not following the design system in Omnichannel Managers page ([#19624](https://github.com/RocketChat/Rocket.Chat/pull/19624) by [@rafaelblink](https://github.com/rafaelblink)) + +- TOTP Being ignored when changing our own avatar ([#19475](https://github.com/RocketChat/Rocket.Chat/pull/19475)) + + [FIX] TOTP Being ignored when changing our own avatar + +- Typo in custom oauth from environment variable ([#19570](https://github.com/RocketChat/Rocket.Chat/pull/19570)) + +- UI/UX issues on Omnichannel Managers page ([#19410](https://github.com/RocketChat/Rocket.Chat/pull/19410) by [@rafaelblink](https://github.com/rafaelblink)) + +- Unread count for all messages when mentioning an user ([#16884](https://github.com/RocketChat/Rocket.Chat/pull/16884) by [@subham103](https://github.com/subham103)) + +- Wrong margin of description field in Omnichannel Webhooks page ([#19487](https://github.com/RocketChat/Rocket.Chat/pull/19487) by [@rafaelblink](https://github.com/rafaelblink)) + +
+🔍 Minor changes + + +- [IMPROVES] Omnichannel - Custom Fields pages. ([#19473](https://github.com/RocketChat/Rocket.Chat/pull/19473) by [@rafaelblink](https://github.com/rafaelblink)) + +- Bump bcrypt from 4.0.1 to 5.0.0 in /ee/server/services ([#19387](https://github.com/RocketChat/Rocket.Chat/pull/19387) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump systeminformation from 4.27.3 to 4.30.1 in /ee/server/services ([#19543](https://github.com/RocketChat/Rocket.Chat/pull/19543) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump xml-crypto from 1.5.3 to 2.0.0 ([#19383](https://github.com/RocketChat/Rocket.Chat/pull/19383) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- chore: Debounce sidebar list ([#19590](https://github.com/RocketChat/Rocket.Chat/pull/19590)) + +- Fix Docker preview image build ([#19627](https://github.com/RocketChat/Rocket.Chat/pull/19627)) + +- Fix permission duplicated error on startup causing CI to halt ([#19653](https://github.com/RocketChat/Rocket.Chat/pull/19653) by [@g-thome](https://github.com/g-thome)) + +- Improve performance of migration 211 (adding mostImportantRole to sessions) ([#19700](https://github.com/RocketChat/Rocket.Chat/pull/19700)) + +- Improve REST endpoint to log user out from other clients ([#19642](https://github.com/RocketChat/Rocket.Chat/pull/19642)) + +- LingoHub based on develop ([#19592](https://github.com/RocketChat/Rocket.Chat/pull/19592)) + +- LingoHub based on develop ([#19131](https://github.com/RocketChat/Rocket.Chat/pull/19131)) + +- Manual LingoHub update ([#19620](https://github.com/RocketChat/Rocket.Chat/pull/19620)) + +- Merge master into develop & Set version to 3.9.0-develop ([#19534](https://github.com/RocketChat/Rocket.Chat/pull/19534)) + +- React Room Container ([#19634](https://github.com/RocketChat/Rocket.Chat/pull/19634)) + +- Regression: Collapsed messages container in safari ([#19668](https://github.com/RocketChat/Rocket.Chat/pull/19668)) + +- Regression: Fix Avatar x40 ([#19564](https://github.com/RocketChat/Rocket.Chat/pull/19564)) + +- Regression: Fix Custom OAuth 2FA ([#19691](https://github.com/RocketChat/Rocket.Chat/pull/19691)) + +- Regression: Fix LDAP 2FA not working when Login Fallback is off ([#19659](https://github.com/RocketChat/Rocket.Chat/pull/19659)) + +- Regression: Fix multiple react blazed template rendering at the same time ([#19679](https://github.com/RocketChat/Rocket.Chat/pull/19679)) + +- Regression: Fix wrong template on photoswipe ([#19575](https://github.com/RocketChat/Rocket.Chat/pull/19575)) + +- Regression: Issues with Safari ([#19671](https://github.com/RocketChat/Rocket.Chat/pull/19671)) + +- Regression: object-fit for image element and Box margin in AppAvatar component ([#19698](https://github.com/RocketChat/Rocket.Chat/pull/19698)) + +- REGRESSION: Photoswipe not working ([#19569](https://github.com/RocketChat/Rocket.Chat/pull/19569)) + +- Regression: Room Info Edit action ([#19581](https://github.com/RocketChat/Rocket.Chat/pull/19581)) + +- Regression: Room Info maxAgeDefault variable ([#19582](https://github.com/RocketChat/Rocket.Chat/pull/19582)) + +- Regression: URL preview problem ([#19685](https://github.com/RocketChat/Rocket.Chat/pull/19685)) + +- Regression: Verticalbar size ([#19670](https://github.com/RocketChat/Rocket.Chat/pull/19670)) + +- Release 3.8.2 ([#19705](https://github.com/RocketChat/Rocket.Chat/pull/19705) by [@g-thome](https://github.com/g-thome)) + +- Report DAU and MAU by role ([#19657](https://github.com/RocketChat/Rocket.Chat/pull/19657)) + +- Update Apps-Engine version ([#19639](https://github.com/RocketChat/Rocket.Chat/pull/19639)) + +- Update Apps-Engine version ([#19702](https://github.com/RocketChat/Rocket.Chat/pull/19702)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) +- [@antkaz](https://github.com/antkaz) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@g-thome](https://github.com/g-thome) +- [@mrfigueiredo](https://github.com/mrfigueiredo) +- [@rafaelblink](https://github.com/rafaelblink) +- [@robertfromont](https://github.com/robertfromont) +- [@subham103](https://github.com/subham103) +- [@truongtx8](https://github.com/truongtx8) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@d-gubert](https://github.com/d-gubert) +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 3.8.5 +`2020-12-31 · 1 🔍 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.19.0` + +
+🔍 Minor changes + + +- Regression: Fix oembed ([#19978](https://github.com/RocketChat/Rocket.Chat/pull/19978)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.8.4 +`2020-12-18 · 2 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.19.0` + +### 🐛 Bug fixes + + +- Issue with special message rendering ([#19817](https://github.com/RocketChat/Rocket.Chat/pull/19817)) + +- Problem with attachment render ([#19854](https://github.com/RocketChat/Rocket.Chat/pull/19854)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) + +# 3.8.3 +`2020-12-05 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.19.0` + +### 🐛 Bug fixes + + +- Exception on certain login cases including SAML + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.8.2 +`2020-11-27 · 2 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.19.0` + +### 🐛 Bug fixes + + +- Room avatar update event doesn't properly broadcast room id ([#19684](https://github.com/RocketChat/Rocket.Chat/pull/19684) by [@g-thome](https://github.com/g-thome)) + +- Server crash while reading settings for allowed and blocked email domain lists ([#19683](https://github.com/RocketChat/Rocket.Chat/pull/19683) by [@g-thome](https://github.com/g-thome)) + +
+🔍 Minor changes + + +- Release 3.8.2 ([#19705](https://github.com/RocketChat/Rocket.Chat/pull/19705) by [@g-thome](https://github.com/g-thome)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@g-thome](https://github.com/g-thome) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.8.1 +`2020-11-19 · 3 🐛 · 1 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.19.0` + +### 🐛 Bug fixes + + +- Engagement dashboard on old Mongo versions ([#19616](https://github.com/RocketChat/Rocket.Chat/pull/19616)) + +- IE11 - Update ui kit and fuselage bundle ([#19561](https://github.com/RocketChat/Rocket.Chat/pull/19561)) + +- Typo in custom oauth from environment variable ([#19570](https://github.com/RocketChat/Rocket.Chat/pull/19570)) + +
+🔍 Minor changes + + +- Fix Docker preview image build ([#19627](https://github.com/RocketChat/Rocket.Chat/pull/19627)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.8.0 +`2020-11-14 · 14 🎉 · 4 🚀 · 40 🐛 · 54 🔍 · 30 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.19.0` + +### 🎉 New features + + +- **Apps:** Add new typing bridge method (Typing-Indicator) ([#19228](https://github.com/RocketChat/Rocket.Chat/pull/19228) by [@lolimay](https://github.com/lolimay)) + +- **APPS:** New Scheduler API ([#19290](https://github.com/RocketChat/Rocket.Chat/pull/19290)) + +- **Apps:** Remove TS compiler ([#18687](https://github.com/RocketChat/Rocket.Chat/pull/18687)) + +- **Enterprise:** Micro services ([#19000](https://github.com/RocketChat/Rocket.Chat/pull/19000)) + +- Add enterprise data to statistics ([#19363](https://github.com/RocketChat/Rocket.Chat/pull/19363)) + +- Admin option to reset users’ 2FA ([#19341](https://github.com/RocketChat/Rocket.Chat/pull/19341)) + + Admins can reset the 2FA of other users if they have the permission `edit-other-user-totp` and the `Accounts > Two Factor Authentication > Enforce password fallback` setting is enabled. + +- Apps prometheus metrics ([#19320](https://github.com/RocketChat/Rocket.Chat/pull/19320)) + +- Audits search by User ([#19275](https://github.com/RocketChat/Rocket.Chat/pull/19275)) + +- Branding updated with new logos ([#19440](https://github.com/RocketChat/Rocket.Chat/pull/19440)) + +- feat(CAS): Adding option to enable/disable user creation from CAS auth ([#17154](https://github.com/RocketChat/Rocket.Chat/pull/17154) by [@jgribonvald](https://github.com/jgribonvald)) + +- OAuth groups to channels mapping ([#18146](https://github.com/RocketChat/Rocket.Chat/pull/18146) by [@arminfelder](https://github.com/arminfelder)) + +- Reaction view ([#18272](https://github.com/RocketChat/Rocket.Chat/pull/18272)) + +- Replace client-side event emitters ([#19368](https://github.com/RocketChat/Rocket.Chat/pull/19368)) + +- Whitelisting bad words ([#17120](https://github.com/RocketChat/Rocket.Chat/pull/17120) by [@aryankoul](https://github.com/aryankoul)) + +### 🚀 Improvements + + +- **APPS:** Apps list page on servers without internet connection ([#19088](https://github.com/RocketChat/Rocket.Chat/pull/19088)) + +- Display channel avatar on the Header ([#19132](https://github.com/RocketChat/Rocket.Chat/pull/19132) by [@ba-9](https://github.com/ba-9) & [@bhavayAnand9](https://github.com/bhavayAnand9)) + +- New sidebar layout ([#19089](https://github.com/RocketChat/Rocket.Chat/pull/19089)) + +- React Avatar Provider ([#19321](https://github.com/RocketChat/Rocket.Chat/pull/19321)) + +### 🐛 Bug fixes + + +- "Export Messages" only works for global roles ([#19264](https://github.com/RocketChat/Rocket.Chat/pull/19264)) + +- **ENTERPRISE:** Race condition on Omnichannel queues ([#19352](https://github.com/RocketChat/Rocket.Chat/pull/19352)) + +- 2FA required rendering blank page ([#19364](https://github.com/RocketChat/Rocket.Chat/pull/19364)) + +- Adding missing custom fields translation in my account's profile ([#19179](https://github.com/RocketChat/Rocket.Chat/pull/19179)) + +- Admin not working on IE11 ([#19348](https://github.com/RocketChat/Rocket.Chat/pull/19348)) + +- Admin Sidebar overflowing ([#19101](https://github.com/RocketChat/Rocket.Chat/pull/19101)) + +- Agent status offline and wrong i18n key ([#19199](https://github.com/RocketChat/Rocket.Chat/pull/19199)) + +- Anonymous users are counted on the server statistics and engagement dashboard ([#19263](https://github.com/RocketChat/Rocket.Chat/pull/19263)) + +- Broken user info when a user don't have an email address ([#19339](https://github.com/RocketChat/Rocket.Chat/pull/19339)) + +- Channel creation not working on IE ([#19524](https://github.com/RocketChat/Rocket.Chat/pull/19524)) + +- Cloud Register Allowing Empty Tokens ([#19501](https://github.com/RocketChat/Rocket.Chat/pull/19501)) + +- Custom Emojis PNGs on IE11 ([#19519](https://github.com/RocketChat/Rocket.Chat/pull/19519)) + +- Don't send room name on notification ([#19247](https://github.com/RocketChat/Rocket.Chat/pull/19247)) + +- Error preventing from removing users without a role ([#19204](https://github.com/RocketChat/Rocket.Chat/pull/19204) by [@RohitKumar-200](https://github.com/RohitKumar-200)) + +- Error when editing priority and required description ([#19170](https://github.com/RocketChat/Rocket.Chat/pull/19170)) + +- Integrations history page not reacting to changes. ([#19114](https://github.com/RocketChat/Rocket.Chat/pull/19114)) + +- Invalid attachments on User Data downloads ([#19203](https://github.com/RocketChat/Rocket.Chat/pull/19203)) + +- IRC Bridge not working ([#19009](https://github.com/RocketChat/Rocket.Chat/pull/19009)) + +- LDAP Sync Error Dup Key ([#19337](https://github.com/RocketChat/Rocket.Chat/pull/19337)) + +- Livechat Appearance label and reset button ([#19171](https://github.com/RocketChat/Rocket.Chat/pull/19171)) + +- Message actions on top of text ([#19316](https://github.com/RocketChat/Rocket.Chat/pull/19316)) + +- Missing "Bio" in user's profile view (#18821) ([#19166](https://github.com/RocketChat/Rocket.Chat/pull/19166)) + +- Non admin cannot add custom avatar to group ([#18960](https://github.com/RocketChat/Rocket.Chat/pull/18960) by [@FelipeParreira](https://github.com/FelipeParreira)) + + Allow non-admins to change room avatar. + +- OAuth create via environment variable ([#19472](https://github.com/RocketChat/Rocket.Chat/pull/19472)) + +- Omnichannel - typo error label at current chats page ([#19379](https://github.com/RocketChat/Rocket.Chat/pull/19379) by [@rafaelblink](https://github.com/rafaelblink)) + +- Omnichannel auditing required field ([#19201](https://github.com/RocketChat/Rocket.Chat/pull/19201)) + +- Omnichannel: triggers page not rendering. ([#19134](https://github.com/RocketChat/Rocket.Chat/pull/19134)) + +- Performance issues when using new Oplog implementation ([#19181](https://github.com/RocketChat/Rocket.Chat/pull/19181)) + + A missing configuration was not limiting the new oplog tailing to pool the database frequently even when no data was available, leading to both node and mongodb process been consuming high CPU even with low usage. This case was happening for installations using `mmapv1` database engine or when no admin access was granted to the database user, both preventing the usage of the new [Change Streams](https://docs.mongodb.com/manual/changeStreams/) implementation and fallbacking to our custom oplog implementation in replacement to the Meteor's one what was able to be disabled and use the native implementation via the environmental variable `USE_NATIVE_OPLOG=true`. + +- Push notifications with lower priority for Android devices ([#19061](https://github.com/RocketChat/Rocket.Chat/pull/19061) by [@ceefour](https://github.com/ceefour)) + + fix(push): Set push notification priority to 'high' for FCM + +- Remove requirements to tag description and department ([#19169](https://github.com/RocketChat/Rocket.Chat/pull/19169)) + +- SAML login undefined error message ([#18649](https://github.com/RocketChat/Rocket.Chat/pull/18649) by [@galshiff](https://github.com/galshiff)) + + Fixed the SAML login undefined error message + +- Selecting the same department for multiple units ([#19168](https://github.com/RocketChat/Rocket.Chat/pull/19168)) + +- Server Errors on new Client Connections ([#19266](https://github.com/RocketChat/Rocket.Chat/pull/19266)) + +- Setting values being showed up in logs when using log level for debug ([#18239](https://github.com/RocketChat/Rocket.Chat/pull/18239)) + +- Thread List showing wrong items ([#19351](https://github.com/RocketChat/Rocket.Chat/pull/19351)) + +- Thread view in a channel user haven't joined (#19008) ([#19172](https://github.com/RocketChat/Rocket.Chat/pull/19172)) + +- Use etag on user info ([#19349](https://github.com/RocketChat/Rocket.Chat/pull/19349)) + +- UserCard Roles Description ([#19200](https://github.com/RocketChat/Rocket.Chat/pull/19200)) + +- VisitorAutoComplete component ([#19133](https://github.com/RocketChat/Rocket.Chat/pull/19133)) + +- Wrong avatar urls when using providers ([#18929](https://github.com/RocketChat/Rocket.Chat/pull/18929)) + +
+🔍 Minor changes + + +- Build micro services Docker images with correct tags ([#19418](https://github.com/RocketChat/Rocket.Chat/pull/19418)) + +- Bump Livechat widget ([#19361](https://github.com/RocketChat/Rocket.Chat/pull/19361)) + +- Bump Livechat widget ([#19478](https://github.com/RocketChat/Rocket.Chat/pull/19478)) + +- Bump object-path from 0.11.4 to 0.11.5 ([#19298](https://github.com/RocketChat/Rocket.Chat/pull/19298) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Fix Indie Hosters install image ([#19192](https://github.com/RocketChat/Rocket.Chat/pull/19192) by [@aradhya-gupta](https://github.com/aradhya-gupta)) + +- Merge master into develop & Set version to 3.8.0-develop ([#19060](https://github.com/RocketChat/Rocket.Chat/pull/19060)) + +- Micro Services: Add metrics capability to Services ([#19448](https://github.com/RocketChat/Rocket.Chat/pull/19448)) + +- Micro Services: Create internal services and allowed services list ([#19427](https://github.com/RocketChat/Rocket.Chat/pull/19427)) + +- Micro Services: Do not wait forever for a service. Fail after 10s or 10 minutes if whitelisted ([#19484](https://github.com/RocketChat/Rocket.Chat/pull/19484)) + +- Micro Services: Fix logout issue ([#19423](https://github.com/RocketChat/Rocket.Chat/pull/19423)) + +- Micro Services: Prevent duplicated events ([#19435](https://github.com/RocketChat/Rocket.Chat/pull/19435)) + +- Non-idiomatic React code ([#19303](https://github.com/RocketChat/Rocket.Chat/pull/19303)) + +- Reassessment of client helpers ([#19249](https://github.com/RocketChat/Rocket.Chat/pull/19249)) + +- Refactor some React Pages and Components ([#19202](https://github.com/RocketChat/Rocket.Chat/pull/19202)) + +- Refactor: Omnichannel departments ([#18920](https://github.com/RocketChat/Rocket.Chat/pull/18920)) + +- Regression: `Leave Room` modal not closing ([#19460](https://github.com/RocketChat/Rocket.Chat/pull/19460)) + +- Regression: Agent Status leading to broken page ([#19409](https://github.com/RocketChat/Rocket.Chat/pull/19409)) + +- Regression: Allow apps to schedule jobs along with processor register ([#19416](https://github.com/RocketChat/Rocket.Chat/pull/19416)) + +- Regression: Attachment without title or description show "sent attachment" in view mode extended ([#19443](https://github.com/RocketChat/Rocket.Chat/pull/19443)) + +- Regression: Fix broadcast events when running as monolith ([#19498](https://github.com/RocketChat/Rocket.Chat/pull/19498)) + +- Regression: Fix ephemeral message stream ([#19513](https://github.com/RocketChat/Rocket.Chat/pull/19513)) + +- Regression: Fix livechat permission validations ([#19468](https://github.com/RocketChat/Rocket.Chat/pull/19468)) + +- Regression: Fix presence request logic ([#19527](https://github.com/RocketChat/Rocket.Chat/pull/19527)) + +- Regression: Fix presence status ([#19474](https://github.com/RocketChat/Rocket.Chat/pull/19474)) + +- Regression: Fix React warnings ([#19508](https://github.com/RocketChat/Rocket.Chat/pull/19508)) + +- Regression: Fix setting value not being sent over websocket ([#19477](https://github.com/RocketChat/Rocket.Chat/pull/19477)) + +- Regression: Fix stream-room-data payload ([#19407](https://github.com/RocketChat/Rocket.Chat/pull/19407)) + +- Regression: Fix Thread List order ([#19486](https://github.com/RocketChat/Rocket.Chat/pull/19486)) + +- Regression: Fix visitor field missing on subscription payload ([#19412](https://github.com/RocketChat/Rocket.Chat/pull/19412)) + +- Regression: GenericTable.HeaderCell does not accept on click anymore ([#19358](https://github.com/RocketChat/Rocket.Chat/pull/19358)) + +- Regression: Pass `unset` parameter of updated `userData` notification ([#19380](https://github.com/RocketChat/Rocket.Chat/pull/19380)) + +- Regression: Prevent network broker from starting when not needed ([#19532](https://github.com/RocketChat/Rocket.Chat/pull/19532)) + +- Regression: Reassessment of client helpers 'XYZ key should not contain .' ([#19310](https://github.com/RocketChat/Rocket.Chat/pull/19310)) + +- Regression: Rocket.Chat Apps updates always fail ([#19411](https://github.com/RocketChat/Rocket.Chat/pull/19411)) + +- Regression: Room item menu display delay ([#19401](https://github.com/RocketChat/Rocket.Chat/pull/19401)) + +- Regression: Sidebar message preview escaping html ([#19382](https://github.com/RocketChat/Rocket.Chat/pull/19382)) + +- Regression: Sidebar reactivity when read last messages ([#19449](https://github.com/RocketChat/Rocket.Chat/pull/19449)) + +- Regression: Thread component not updating its message list ([#19390](https://github.com/RocketChat/Rocket.Chat/pull/19390)) + +- Regression: Thread list misbehaving ([#19413](https://github.com/RocketChat/Rocket.Chat/pull/19413)) + +- Regression: Thread not showing for unloaded message ([#19402](https://github.com/RocketChat/Rocket.Chat/pull/19402)) + +- Regression: unable to mark room as read ([#19419](https://github.com/RocketChat/Rocket.Chat/pull/19419)) + +- Regression: User card closing ([#19322](https://github.com/RocketChat/Rocket.Chat/pull/19322)) + +- Remove legacy modal template ([#19276](https://github.com/RocketChat/Rocket.Chat/pull/19276)) + +- Remove legacy slider ([#19255](https://github.com/RocketChat/Rocket.Chat/pull/19255)) + +- Remove unecessary return at the send code api ([#19494](https://github.com/RocketChat/Rocket.Chat/pull/19494)) + +- Remove WeDeploy from README ([#19342](https://github.com/RocketChat/Rocket.Chat/pull/19342) by [@lucas-andre](https://github.com/lucas-andre)) + +- Rewrite: Reset Login Form ([#18237](https://github.com/RocketChat/Rocket.Chat/pull/18237)) + +- Unify ephemeral message events ([#19464](https://github.com/RocketChat/Rocket.Chat/pull/19464)) + +- Update Apps-Engine to latest release ([#19499](https://github.com/RocketChat/Rocket.Chat/pull/19499)) + +- Update Apps-Engine version ([#19385](https://github.com/RocketChat/Rocket.Chat/pull/19385)) + +- Update comment of "issue-close-app" ([#19078](https://github.com/RocketChat/Rocket.Chat/pull/19078)) + +- Update feature-request opening process on README ([#19240](https://github.com/RocketChat/Rocket.Chat/pull/19240) by [@brij1999](https://github.com/brij1999)) + +- Update Fuselage Version ([#19359](https://github.com/RocketChat/Rocket.Chat/pull/19359)) + +- Use GitHub Container Registry ([#19297](https://github.com/RocketChat/Rocket.Chat/pull/19297)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@FelipeParreira](https://github.com/FelipeParreira) +- [@RohitKumar-200](https://github.com/RohitKumar-200) +- [@aradhya-gupta](https://github.com/aradhya-gupta) +- [@arminfelder](https://github.com/arminfelder) +- [@aryankoul](https://github.com/aryankoul) +- [@ba-9](https://github.com/ba-9) +- [@bhavayAnand9](https://github.com/bhavayAnand9) +- [@brij1999](https://github.com/brij1999) +- [@ceefour](https://github.com/ceefour) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@galshiff](https://github.com/galshiff) +- [@jgribonvald](https://github.com/jgribonvald) +- [@lolimay](https://github.com/lolimay) +- [@lucas-andre](https://github.com/lucas-andre) +- [@rafaelblink](https://github.com/rafaelblink) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@d-gubert](https://github.com/d-gubert) +- [@dougfabris](https://github.com/dougfabris) +- [@frdmn](https://github.com/frdmn) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@thassiov](https://github.com/thassiov) +- [@tiagoevanp](https://github.com/tiagoevanp) + +# 3.7.4 +`2020-12-18 · 2 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.18.0` + +### 🐛 Bug fixes + + +- Issue with special message rendering ([#19817](https://github.com/RocketChat/Rocket.Chat/pull/19817)) + +- Problem with attachment render ([#19854](https://github.com/RocketChat/Rocket.Chat/pull/19854)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) + +# 3.7.3 +`2020-12-05 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.18.0` + +### 🐛 Bug fixes + + +- Exception on certain login cases including SAML + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.7.2 +`2020-11-13 · 4 🐛 · 1 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.18.0` + +### 🐛 Bug fixes + + +- Admin not working on IE11 ([#19348](https://github.com/RocketChat/Rocket.Chat/pull/19348)) + +- Channel creation not working on IE ([#19524](https://github.com/RocketChat/Rocket.Chat/pull/19524)) + +- Custom Emojis PNGs on IE11 ([#19519](https://github.com/RocketChat/Rocket.Chat/pull/19519)) + +- Update Polyfills and fix directory in IE ([#19525](https://github.com/RocketChat/Rocket.Chat/pull/19525)) + +
+🔍 Minor changes + + +- Release 3.7.2 ([#19529](https://github.com/RocketChat/Rocket.Chat/pull/19529)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@dougfabris](https://github.com/dougfabris) +- [@ggazzo](https://github.com/ggazzo) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.7.1 +`2020-10-09 · 6 🐛 · 5 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.18.0` + +### 🐛 Bug fixes + + +- Adding missing custom fields translation in my account's profile ([#19179](https://github.com/RocketChat/Rocket.Chat/pull/19179)) + +- Admin Sidebar overflowing ([#19101](https://github.com/RocketChat/Rocket.Chat/pull/19101)) + +- Missing "Bio" in user's profile view (#18821) ([#19166](https://github.com/RocketChat/Rocket.Chat/pull/19166)) + +- Omnichannel: triggers page not rendering. ([#19134](https://github.com/RocketChat/Rocket.Chat/pull/19134)) + +- Performance issues when using new Oplog implementation ([#19181](https://github.com/RocketChat/Rocket.Chat/pull/19181)) + + A missing configuration was not limiting the new oplog tailing to pool the database frequently even when no data was available, leading to both node and mongodb process been consuming high CPU even with low usage. This case was happening for installations using `mmapv1` database engine or when no admin access was granted to the database user, both preventing the usage of the new [Change Streams](https://docs.mongodb.com/manual/changeStreams/) implementation and fallbacking to our custom oplog implementation in replacement to the Meteor's one what was able to be disabled and use the native implementation via the environmental variable `USE_NATIVE_OPLOG=true`. + +- VisitorAutoComplete component ([#19133](https://github.com/RocketChat/Rocket.Chat/pull/19133)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@dougfabris](https://github.com/dougfabris) +- [@gabriellsh](https://github.com/gabriellsh) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.7.0 +`2020-09-28 · 10 🎉 · 3 🚀 · 39 🐛 · 26 🔍 · 22 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.18.0` + +### 🎉 New features + + +- "Room avatar changed" system messages ([#18839](https://github.com/RocketChat/Rocket.Chat/pull/18839)) + +- **Apps:** Add a Livechat API - setCustomFields ([#18912](https://github.com/RocketChat/Rocket.Chat/pull/18912) by [@lolimay](https://github.com/lolimay)) + +- **Apps:** Add a new upload API ([#18955](https://github.com/RocketChat/Rocket.Chat/pull/18955) by [@lolimay](https://github.com/lolimay)) + +- **Apps:** Add support for new livechat guest's and room's events ([#18946](https://github.com/RocketChat/Rocket.Chat/pull/18946)) + +- **Apps:** Add support to the "encoding" option in http requests from Apps ([#19002](https://github.com/RocketChat/Rocket.Chat/pull/19002) by [@lolimay](https://github.com/lolimay)) + +- Apps-Engine v1.18.0 ([#19047](https://github.com/RocketChat/Rocket.Chat/pull/19047)) + +- Option to require settings on wizard UI via ENV variables ([#18974](https://github.com/RocketChat/Rocket.Chat/pull/18974)) + + [NEW] Option to require settings on wizard UI via ENV variables + +- Retention policy precision defined by a cron job expression ([#18975](https://github.com/RocketChat/Rocket.Chat/pull/18975)) + +- Send E2E encrypted messages’ content on push notifications ([#18882](https://github.com/RocketChat/Rocket.Chat/pull/18882)) + + Sends the content of end to end encrypted messages on Push Notifications allowing new versions of mobile apps to decrypt them and displays the content correctly. + +- UploadFS respects $TMPDIR environment variable ([#17012](https://github.com/RocketChat/Rocket.Chat/pull/17012) by [@d-sko](https://github.com/d-sko)) + +### 🚀 Improvements + + +- Add "Allow_Save_Media_to_Gallery" setting ([#18875](https://github.com/RocketChat/Rocket.Chat/pull/18875)) + + - Added a new setting to allow/disallow saving media to device's gallery on mobile client + +- Move jump to message outside menu ([#18928](https://github.com/RocketChat/Rocket.Chat/pull/18928)) + +- Stop re-sending push notifications rejected by the gateway ([#18608](https://github.com/RocketChat/Rocket.Chat/pull/18608)) + +### 🐛 Bug fixes + + +- "Download my data" popup showing HTML code. ([#18947](https://github.com/RocketChat/Rocket.Chat/pull/18947)) + +- "Save to WebDav" not working ([#18883](https://github.com/RocketChat/Rocket.Chat/pull/18883)) + +- **ENTERPRISE:** Omnichannel service status switching to unavailable ([#18835](https://github.com/RocketChat/Rocket.Chat/pull/18835)) + +- API call users.setStatus does not trigger status update of clients ([#18961](https://github.com/RocketChat/Rocket.Chat/pull/18961) by [@FelipeParreira](https://github.com/FelipeParreira)) + + Notify logged users via WebSockets message when a user changes status via REST API. + +- Block user action ([#18950](https://github.com/RocketChat/Rocket.Chat/pull/18950)) + +- Can't change password ([#18836](https://github.com/RocketChat/Rocket.Chat/pull/18836)) + +- Create Custom OAuth services from environment variables ([#17377](https://github.com/RocketChat/Rocket.Chat/pull/17377) by [@mrtndwrd](https://github.com/mrtndwrd)) + +- Custom fields required if minLength set and no text typed. ([#18838](https://github.com/RocketChat/Rocket.Chat/pull/18838)) + +- Deactivate users that are the last owner of a room using REST API ([#18864](https://github.com/RocketChat/Rocket.Chat/pull/18864) by [@FelipeParreira](https://github.com/FelipeParreira)) + + Allow for user deactivation through REST API (even if user is the last owner of a room) + +- Deactivated users show as offline ([#18767](https://github.com/RocketChat/Rocket.Chat/pull/18767)) + +- Dutch: add translations for missing variables ([#18814](https://github.com/RocketChat/Rocket.Chat/pull/18814) by [@Karting06](https://github.com/Karting06)) + +- e.sendToBottomIfNecessaryDebounced is not a function ([#18834](https://github.com/RocketChat/Rocket.Chat/pull/18834)) + +- Errors in LDAP avatar sync preventing login ([#18948](https://github.com/RocketChat/Rocket.Chat/pull/18948)) + +- Federation issues ([#18978](https://github.com/RocketChat/Rocket.Chat/pull/18978)) + +- File upload (Avatars, Emoji, Sounds) ([#18841](https://github.com/RocketChat/Rocket.Chat/pull/18841)) + +- French: Add missing __online__ var ([#18813](https://github.com/RocketChat/Rocket.Chat/pull/18813) by [@Karting06](https://github.com/Karting06)) + +- IE11 support livechat widget ([#18850](https://github.com/RocketChat/Rocket.Chat/pull/18850)) + +- If there is `ufs` somewhere in url the request to api always returns 404 ([#18874](https://github.com/RocketChat/Rocket.Chat/pull/18874) by [@FelipeParreira](https://github.com/FelipeParreira)) + +- Ignore User action from user card ([#18866](https://github.com/RocketChat/Rocket.Chat/pull/18866)) + +- invite-all-from and invite-all-to commands don't work with multibyte room names ([#18919](https://github.com/RocketChat/Rocket.Chat/pull/18919) by [@FelipeParreira](https://github.com/FelipeParreira)) + +- Jitsi call start updating subscriptions ([#18837](https://github.com/RocketChat/Rocket.Chat/pull/18837)) + +- LDAP avatar upload ([#18994](https://github.com/RocketChat/Rocket.Chat/pull/18994)) + +- Non-upload requests being passed to UFS proxy middleware ([#18931](https://github.com/RocketChat/Rocket.Chat/pull/18931) by [@FelipeParreira](https://github.com/FelipeParreira)) + + Avoid non-upload request to be caught by UFS proxy middleware. + +- Omnichannel Current Chats open status filter not working ([#18795](https://github.com/RocketChat/Rocket.Chat/pull/18795)) + +- Open room after guest registration ([#18755](https://github.com/RocketChat/Rocket.Chat/pull/18755)) + +- PDF not rendering ([#18956](https://github.com/RocketChat/Rocket.Chat/pull/18956)) + +- Purged threads still show as unread ([#18944](https://github.com/RocketChat/Rocket.Chat/pull/18944) by [@FelipeParreira](https://github.com/FelipeParreira)) + + Remove threads from subscription (and update counter) when messages are purged (or threads are disabled). + +- Reaction buttons not behaving properly ([#18832](https://github.com/RocketChat/Rocket.Chat/pull/18832)) + +- Read receipts showing blank names and not marking messages as read ([#18918](https://github.com/RocketChat/Rocket.Chat/pull/18918) by [@wreiske](https://github.com/wreiske)) + +- Scrollbar mention ticks always rendering as white ([#18979](https://github.com/RocketChat/Rocket.Chat/pull/18979)) + +- Show custom fields of invalid type ([#18794](https://github.com/RocketChat/Rocket.Chat/pull/18794)) + +- Showing alerts during setup wizard ([#18862](https://github.com/RocketChat/Rocket.Chat/pull/18862)) + +- Spurious expert role in startup data ([#18667](https://github.com/RocketChat/Rocket.Chat/pull/18667)) + +- Stop adding push messages to queue if push is disabled ([#18830](https://github.com/RocketChat/Rocket.Chat/pull/18830)) + +- User administration throwing a blank page if user has no role ([#18851](https://github.com/RocketChat/Rocket.Chat/pull/18851)) + +- User can't invite or join other Omnichannel rooms ([#18852](https://github.com/RocketChat/Rocket.Chat/pull/18852)) + +- User Info: Email and name/username display, alignment on big screens, make admin action ([#18976](https://github.com/RocketChat/Rocket.Chat/pull/18976)) + +- Users not being able to activate/deactivate E2E in DMs ([#18943](https://github.com/RocketChat/Rocket.Chat/pull/18943)) + + [FIX] Users not being able to activate/deactivate E2E in DMs + +- Version update check cron job ([#18916](https://github.com/RocketChat/Rocket.Chat/pull/18916) by [@wreiske](https://github.com/wreiske)) + +
+🔍 Minor changes + + +- Bump Livechat widget ([#18977](https://github.com/RocketChat/Rocket.Chat/pull/18977)) + +- Bump lodash.merge from 4.6.1 to 4.6.2 ([#18800](https://github.com/RocketChat/Rocket.Chat/pull/18800) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump marked from 0.6.3 to 0.7.0 ([#18801](https://github.com/RocketChat/Rocket.Chat/pull/18801) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Check i18n file for missing variables ([#18762](https://github.com/RocketChat/Rocket.Chat/pull/18762)) + +- Do not use deprecated express API ([#18686](https://github.com/RocketChat/Rocket.Chat/pull/18686)) + +- Fix french translations ([#18746](https://github.com/RocketChat/Rocket.Chat/pull/18746) by [@lsignac](https://github.com/lsignac)) + +- Fix saveRoomSettings method complexity ([#18840](https://github.com/RocketChat/Rocket.Chat/pull/18840)) + +- Fix: Missing WebDav upload errors logs ([#18849](https://github.com/RocketChat/Rocket.Chat/pull/18849)) + +- LingoHub based on develop ([#18973](https://github.com/RocketChat/Rocket.Chat/pull/18973)) + +- LingoHub based on develop ([#18828](https://github.com/RocketChat/Rocket.Chat/pull/18828)) + +- LingoHub based on develop ([#18761](https://github.com/RocketChat/Rocket.Chat/pull/18761)) + +- Merge master into develop & Set version to 3.7.0-develop ([#18752](https://github.com/RocketChat/Rocket.Chat/pull/18752) by [@thirsch](https://github.com/thirsch)) + +- New: Use database change streams when available ([#18892](https://github.com/RocketChat/Rocket.Chat/pull/18892)) + +- Obey to settings properties ([#19020](https://github.com/RocketChat/Rocket.Chat/pull/19020)) + +- Refactor: Admin permissions page ([#18932](https://github.com/RocketChat/Rocket.Chat/pull/18932)) + +- Refactor: Message Audit page & Audit logs ([#18808](https://github.com/RocketChat/Rocket.Chat/pull/18808)) + +- Refactor: Omnichannel Analytics ([#18766](https://github.com/RocketChat/Rocket.Chat/pull/18766)) + +- Refactor: Omnichannel Realtime Monitoring ([#18666](https://github.com/RocketChat/Rocket.Chat/pull/18666)) + +- Regression: Elements select & multiSelect not rendered correctly in the App Settings ([#19005](https://github.com/RocketChat/Rocket.Chat/pull/19005) by [@lolimay](https://github.com/lolimay)) + +- Regression: File upload via apps not working in some scenarios ([#18995](https://github.com/RocketChat/Rocket.Chat/pull/18995) by [@lolimay](https://github.com/lolimay)) + +- Regression: Fix login screen reactivity of external login providers ([#19033](https://github.com/RocketChat/Rocket.Chat/pull/19033)) + +- Regression: Handle MongoDB authentication issues ([#18993](https://github.com/RocketChat/Rocket.Chat/pull/18993)) + +- Replace copying assets on post-install with symlinks ([#18707](https://github.com/RocketChat/Rocket.Chat/pull/18707)) + +- Set some queries to prefer the secondary database ([#18887](https://github.com/RocketChat/Rocket.Chat/pull/18887)) + +- Update Meteor to 1.11 ([#18754](https://github.com/RocketChat/Rocket.Chat/pull/18754)) + +- Update Meteor to 1.11.1 ([#18959](https://github.com/RocketChat/Rocket.Chat/pull/18959)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@FelipeParreira](https://github.com/FelipeParreira) +- [@Karting06](https://github.com/Karting06) +- [@d-sko](https://github.com/d-sko) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@lolimay](https://github.com/lolimay) +- [@lsignac](https://github.com/lsignac) +- [@mrtndwrd](https://github.com/mrtndwrd) +- [@thirsch](https://github.com/thirsch) +- [@wreiske](https://github.com/wreiske) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@alansikora](https://github.com/alansikora) +- [@d-gubert](https://github.com/d-gubert) +- [@diegolmello](https://github.com/diegolmello) +- [@engelgabriel](https://github.com/engelgabriel) +- [@gabriellsh](https://github.com/gabriellsh) +- [@ggazzo](https://github.com/ggazzo) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@thassiov](https://github.com/thassiov) + +# 3.6.3 +`2020-09-25 · 4 🐛 · 2 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.14.0` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.17.0` + +### 🐛 Bug fixes + + +- Errors in LDAP avatar sync preventing login ([#18948](https://github.com/RocketChat/Rocket.Chat/pull/18948)) + +- Federation issues ([#18978](https://github.com/RocketChat/Rocket.Chat/pull/18978)) + +- LDAP avatar upload ([#18994](https://github.com/RocketChat/Rocket.Chat/pull/18994)) + +- PDF not rendering ([#18956](https://github.com/RocketChat/Rocket.Chat/pull/18956)) + +
+🔍 Minor changes + + +- Obey to settings properties ([#19020](https://github.com/RocketChat/Rocket.Chat/pull/19020)) + +- Release 3.6.3 ([#19022](https://github.com/RocketChat/Rocket.Chat/pull/19022)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@alansikora](https://github.com/alansikora) +- [@gabriellsh](https://github.com/gabriellsh) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.6.2 +`2020-09-18 · 7 🐛 · 6 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.14.0` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.17.0` + +### 🐛 Bug fixes + + +- Create Custom OAuth services from environment variables ([#17377](https://github.com/RocketChat/Rocket.Chat/pull/17377) by [@mrtndwrd](https://github.com/mrtndwrd)) + +- Deactivate users that are the last owner of a room using REST API ([#18864](https://github.com/RocketChat/Rocket.Chat/pull/18864) by [@FelipeParreira](https://github.com/FelipeParreira)) + + Allow for user deactivation through REST API (even if user is the last owner of a room) + +- Ignore User action from user card ([#18866](https://github.com/RocketChat/Rocket.Chat/pull/18866)) + +- invite-all-from and invite-all-to commands don't work with multibyte room names ([#18919](https://github.com/RocketChat/Rocket.Chat/pull/18919) by [@FelipeParreira](https://github.com/FelipeParreira)) + + Fix slash commands (invite-all-from and invite-all-to) to accept multi-byte room names. + +- Read receipts showing blank names and not marking messages as read ([#18918](https://github.com/RocketChat/Rocket.Chat/pull/18918) by [@wreiske](https://github.com/wreiske)) + +- Show custom fields of invalid type ([#18794](https://github.com/RocketChat/Rocket.Chat/pull/18794)) + +- Version update check cron job ([#18916](https://github.com/RocketChat/Rocket.Chat/pull/18916) by [@wreiske](https://github.com/wreiske)) + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@FelipeParreira](https://github.com/FelipeParreira) +- [@mrtndwrd](https://github.com/mrtndwrd) +- [@wreiske](https://github.com/wreiske) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@gabriellsh](https://github.com/gabriellsh) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.6.1 +`2020-09-11 · 7 🐛 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.14.0` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.17.0` + +### 🐛 Bug fixes + + +- **ENTERPRISE:** Omnichannel service status switching to unavailable ([#18835](https://github.com/RocketChat/Rocket.Chat/pull/18835)) + +- File upload (Avatars, Emoji, Sounds) ([#18841](https://github.com/RocketChat/Rocket.Chat/pull/18841)) + +- IE11 support livechat widget ([#18850](https://github.com/RocketChat/Rocket.Chat/pull/18850)) + +- Omnichannel Current Chats open status filter not working ([#18795](https://github.com/RocketChat/Rocket.Chat/pull/18795)) + +- Showing alerts during setup wizard ([#18862](https://github.com/RocketChat/Rocket.Chat/pull/18862)) + +- User administration throwing a blank page if user has no role ([#18851](https://github.com/RocketChat/Rocket.Chat/pull/18851)) + +- User can't invite or join other Omnichannel rooms ([#18852](https://github.com/RocketChat/Rocket.Chat/pull/18852)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.6.0 +`2020-08-29 · 10 🎉 · 5 🚀 · 26 🐛 · 36 🔍 · 23 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.14.0` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.17.0` + +### 🎉 New features + + +- **APPS-ENGINE:** Implement new IPostLivechatRoomTransferred event ([#18625](https://github.com/RocketChat/Rocket.Chat/pull/18625)) + +- **Jitsi:** Setting to use room's name instead of room's id to generate the URL ([#17481](https://github.com/RocketChat/Rocket.Chat/pull/17481)) + +- **Omnichannel:** Ability to set character message limit on Livechat widget ([#18261](https://github.com/RocketChat/Rocket.Chat/pull/18261) by [@oguhpereira](https://github.com/oguhpereira)) + +- **Omnichannel:** Livechat widget support for rich messages via UiKit ([#18643](https://github.com/RocketChat/Rocket.Chat/pull/18643)) + +- **Omnichannel/API:** Endpoint `livechat/room.visitor` to change Omnichannel room's visitor ([#18528](https://github.com/RocketChat/Rocket.Chat/pull/18528)) + +- **Omnichannel/API:** Endpoint `livechat/visitors.search` to search Livechat visitors ([#18514](https://github.com/RocketChat/Rocket.Chat/pull/18514)) + +- Admin option to reset other users’ E2E encryption key ([#18642](https://github.com/RocketChat/Rocket.Chat/pull/18642)) + + Requires the 2FA password fallback enforcement enabled to work + +- Banner for servers in the middle of the cloud registration process ([#18623](https://github.com/RocketChat/Rocket.Chat/pull/18623)) + +- Export room messages as file or directly via email ([#18606](https://github.com/RocketChat/Rocket.Chat/pull/18606)) + +- Support for custom avatar images in channels ([#18443](https://github.com/RocketChat/Rocket.Chat/pull/18443)) + +### 🚀 Improvements + + +- **2FA:** Password enforcement setting and 2FA protection when saving settings or resetting E2E encryption ([#18640](https://github.com/RocketChat/Rocket.Chat/pull/18640)) + + - Increase the 2FA remembering time from 5min to 30min + - Add new setting to enforce 2FA password fallback (enabled only for new installations) + - Require 2FA to save settings and reset E2E Encryption keys + +- **Omnichannel:** Allow set other agent status via method `livechat:changeLivechatStatus ` ([#18571](https://github.com/RocketChat/Rocket.Chat/pull/18571)) + +- **Security:** Admin info page requires permission `view-statistics` ([#18408](https://github.com/RocketChat/Rocket.Chat/pull/18408)) + + Users now require the `view-statistics` permission to be access the `admin/info` page + +- **Slack bridge:** Add support to sync threads ([#15992](https://github.com/RocketChat/Rocket.Chat/pull/15992) by [@antkaz](https://github.com/antkaz)) + +- New component and better look for tooltips ([#18399](https://github.com/RocketChat/Rocket.Chat/pull/18399)) + +### 🐛 Bug fixes + + +- 2FA by Email setting showing for the user even when disabled by the admin ([#18473](https://github.com/RocketChat/Rocket.Chat/pull/18473)) + + The option to disable/enable the **Two-factor authentication via Email** at `Account > Security > Two Factor Authentication + ` was visible even when the setting **Enable Two Factor Authentication via Email** at `Admin > Accounts > Two Factor Authentication` was disabled leading to misbehavior since the functionality was disabled. + +- Agents enabledDepartment attribute not set on collection ([#18614](https://github.com/RocketChat/Rocket.Chat/pull/18614) by [@paulobernardoaf](https://github.com/paulobernardoaf)) + +- Anonymous users were created as inactive if the manual approval setting was enabled ([#17427](https://github.com/RocketChat/Rocket.Chat/pull/17427)) + +- Auto complete user suggestions ([#18437](https://github.com/RocketChat/Rocket.Chat/pull/18437)) + + Fixes the issue with broken user suggestions in threads when using `@` + +- Backdrop on front of modal. ([#18596](https://github.com/RocketChat/Rocket.Chat/pull/18596)) + +- Custom fields title when no custom fields ([#18374](https://github.com/RocketChat/Rocket.Chat/pull/18374)) + +- Emojis on thread replies ([#18407](https://github.com/RocketChat/Rocket.Chat/pull/18407)) + + Users can now see the emojis on thread replies + +- Enabling Apple OAuth crashes other OAuth services ([#18563](https://github.com/RocketChat/Rocket.Chat/pull/18563)) + +- Error when reading uploads from Livechat Visitor through the Apps Engine ([#18474](https://github.com/RocketChat/Rocket.Chat/pull/18474)) + +- findOrCreateInvite REST endpoint ignoring `days` and `maxUses` params ([#18565](https://github.com/RocketChat/Rocket.Chat/pull/18565)) + +- Invalid sample JSON on admin settings ([#18595](https://github.com/RocketChat/Rocket.Chat/pull/18595)) + +- MarkdownText usage ([#18621](https://github.com/RocketChat/Rocket.Chat/pull/18621)) + +- Marking room as read with unread threads still ([#18410](https://github.com/RocketChat/Rocket.Chat/pull/18410)) + +- Random generated password not matching the Password Policy ([#18475](https://github.com/RocketChat/Rocket.Chat/pull/18475)) + + Generates a password with all the possible requirements of the Password Policy and matching the size limitations when enabled. + +- React being loaded on the main bundle ([#18597](https://github.com/RocketChat/Rocket.Chat/pull/18597)) + +- Read receipts duplicate key error ([#18560](https://github.com/RocketChat/Rocket.Chat/pull/18560) by [@galshiff](https://github.com/galshiff)) + + Fixed receipt duplicate key error bug + +- Room Mentions on Threads ([#18336](https://github.com/RocketChat/Rocket.Chat/pull/18336)) + +- Sending notifications from senders without a name ([#18479](https://github.com/RocketChat/Rocket.Chat/pull/18479)) + +- SMS integration not storing media files ([#18491](https://github.com/RocketChat/Rocket.Chat/pull/18491)) + +- Thread reply disappearing and threads result on search ([#18349](https://github.com/RocketChat/Rocket.Chat/pull/18349)) + +- UIKit Select and Multiselects not working ([#18598](https://github.com/RocketChat/Rocket.Chat/pull/18598)) + +- Uncaught (in promise) undefined ([#18393](https://github.com/RocketChat/Rocket.Chat/pull/18393)) + +- UserCard and UserInfo not respecting the setting to use real names ([#18628](https://github.com/RocketChat/Rocket.Chat/pull/18628)) + +- UserCard avatar cache (avatarETag) ([#18466](https://github.com/RocketChat/Rocket.Chat/pull/18466)) + +- Users page in admin not working for inactive user joining ([#18594](https://github.com/RocketChat/Rocket.Chat/pull/18594)) + +- Wrong rooms list order when last message date is missing ([#18639](https://github.com/RocketChat/Rocket.Chat/pull/18639)) + +
+🔍 Minor changes + + +- Add new enterprise bundle option `omnichannel-mobile-enterprise` ([#18533](https://github.com/RocketChat/Rocket.Chat/pull/18533)) + +- Add type checking to CI ([#18411](https://github.com/RocketChat/Rocket.Chat/pull/18411)) + +- Bump bcrypt from 3.0.7 to 5.0.0 ([#18622](https://github.com/RocketChat/Rocket.Chat/pull/18622) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Defer startup checks ([#18547](https://github.com/RocketChat/Rocket.Chat/pull/18547)) + +- Do not retry and log warning when push notification was not authorised ([#18562](https://github.com/RocketChat/Rocket.Chat/pull/18562)) + +- Explain why issue is closed when not using an issue template ([#18420](https://github.com/RocketChat/Rocket.Chat/pull/18420)) + +- Fix typo in setting description ([#18476](https://github.com/RocketChat/Rocket.Chat/pull/18476)) + +- Improve performance of client presence monitor ([#18645](https://github.com/RocketChat/Rocket.Chat/pull/18645)) + +- LingoHub based on develop ([#18586](https://github.com/RocketChat/Rocket.Chat/pull/18586)) + +- LingoHub based on develop ([#18516](https://github.com/RocketChat/Rocket.Chat/pull/18516)) + +- LingoHub based on develop ([#18465](https://github.com/RocketChat/Rocket.Chat/pull/18465)) + +- Merge master into develop & Set version to 3.6.0-develop ([#18401](https://github.com/RocketChat/Rocket.Chat/pull/18401) by [@densik](https://github.com/densik) & [@dudizilla](https://github.com/dudizilla) & [@omarchehab98](https://github.com/omarchehab98) & [@paulobernardoaf](https://github.com/paulobernardoaf)) + +- Missing email notification when an admin resets your E2E key ([#18673](https://github.com/RocketChat/Rocket.Chat/pull/18673)) + +- Omnichannel Admin rewritten in React (#18438) ([#18438](https://github.com/RocketChat/Rocket.Chat/pull/18438)) + +- Prevent directory API to return emails if the user has no permission ([#18478](https://github.com/RocketChat/Rocket.Chat/pull/18478)) + +- Reduce Push Notifications retry from max 31 hours to max 31 minutes ([#18558](https://github.com/RocketChat/Rocket.Chat/pull/18558)) + + Previews logic was retring in **0.1s, 1s, 11s, 2m, 18m, 3h and 31h**, now it’s retrying in **1m, 3m, 7m, 15m and 31m** + +- Regression: Accept visitors for uikit interactions ([#18706](https://github.com/RocketChat/Rocket.Chat/pull/18706)) + +- Regression: Add remove popup to omnichannel custom fields ([#18719](https://github.com/RocketChat/Rocket.Chat/pull/18719)) + +- Regression: Agents Page issues ([#18684](https://github.com/RocketChat/Rocket.Chat/pull/18684)) + +- Regression: Bundle the package `hepburn` ([#18715](https://github.com/RocketChat/Rocket.Chat/pull/18715)) + +- Regression: Fix room avatar file name ([#18544](https://github.com/RocketChat/Rocket.Chat/pull/18544)) + +- Regression: Omnichannel Business Hours Issues ([#18723](https://github.com/RocketChat/Rocket.Chat/pull/18723)) + +- Regression: Omnichannel Current Chat issues ([#18718](https://github.com/RocketChat/Rocket.Chat/pull/18718)) + +- Regression: Omnichannel Tags and Units issues ([#18705](https://github.com/RocketChat/Rocket.Chat/pull/18705)) + +- Regression: Priorities Page issues ([#18685](https://github.com/RocketChat/Rocket.Chat/pull/18685)) + +- Regression: Revert silent: true ([#18671](https://github.com/RocketChat/Rocket.Chat/pull/18671)) + +- Regression: Split date fields on export messages contextual bar ([#18724](https://github.com/RocketChat/Rocket.Chat/pull/18724)) + +- Regression: Toast Messages ([#18674](https://github.com/RocketChat/Rocket.Chat/pull/18674)) + +- Regression: UI margins on Export Messages ([#18682](https://github.com/RocketChat/Rocket.Chat/pull/18682)) + +- Regression: Update checker not being disabled properly. ([#18676](https://github.com/RocketChat/Rocket.Chat/pull/18676)) + +- Regression: Use user autocomplete on export messages ([#18726](https://github.com/RocketChat/Rocket.Chat/pull/18726)) + +- Release 3.6.0 ([#18727](https://github.com/RocketChat/Rocket.Chat/pull/18727) by [@oguhpereira](https://github.com/oguhpereira) & [@thirsch](https://github.com/thirsch)) + +- Set default timeout of 20s for HTTP calls ([#18549](https://github.com/RocketChat/Rocket.Chat/pull/18549)) + +- Update Apps-Engine version ([#18641](https://github.com/RocketChat/Rocket.Chat/pull/18641)) + +- Update dependencies ([#18593](https://github.com/RocketChat/Rocket.Chat/pull/18593)) + +- Update README.md ([#18503](https://github.com/RocketChat/Rocket.Chat/pull/18503)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@antkaz](https://github.com/antkaz) +- [@densik](https://github.com/densik) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@dudizilla](https://github.com/dudizilla) +- [@galshiff](https://github.com/galshiff) +- [@oguhpereira](https://github.com/oguhpereira) +- [@omarchehab98](https://github.com/omarchehab98) +- [@paulobernardoaf](https://github.com/paulobernardoaf) +- [@thirsch](https://github.com/thirsch) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@Sing-Li](https://github.com/Sing-Li) +- [@d-gubert](https://github.com/d-gubert) +- [@engelgabriel](https://github.com/engelgabriel) +- [@gabriellsh](https://github.com/gabriellsh) +- [@ggazzo](https://github.com/ggazzo) +- [@juliagrala](https://github.com/juliagrala) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 3.5.4 +`2020-08-24 · 1 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.14.0` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.16.0` + +### 🐛 Bug fixes + + +- MarkdownText usage ([#18621](https://github.com/RocketChat/Rocket.Chat/pull/18621)) + +
+🔍 Minor changes + + +- Release 3.5.4 ([#18665](https://github.com/RocketChat/Rocket.Chat/pull/18665)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.5.3 +`2020-08-19 · 3 🐛 · 1 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.14.0` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.16.0` + +### 🐛 Bug fixes + + +- React being loaded on the main bundle ([#18597](https://github.com/RocketChat/Rocket.Chat/pull/18597)) + +- UIKit Select and Multiselects not working ([#18598](https://github.com/RocketChat/Rocket.Chat/pull/18598)) + +- Users page in admin not working for inactive user joining ([#18594](https://github.com/RocketChat/Rocket.Chat/pull/18594)) + +
+🔍 Minor changes + + +- Release 3.5.3 ([#18610](https://github.com/RocketChat/Rocket.Chat/pull/18610)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.5.2 +`2020-08-13 · 1 🐛 · 2 🔍 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.14.0` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.16.0` + +### 🐛 Bug fixes + + +- Sending notifications from senders without a name ([#18479](https://github.com/RocketChat/Rocket.Chat/pull/18479)) + +
+🔍 Minor changes + + +- Defer startup checks ([#18547](https://github.com/RocketChat/Rocket.Chat/pull/18547)) + +- Release 3.5.2 ([#18548](https://github.com/RocketChat/Rocket.Chat/pull/18548)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.5.1 +`2020-08-03 · 8 🐛 · 1 🔍 · 6 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.14.0` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.16.0` + +### 🐛 Bug fixes + + +- Appending 'false' to Jitsi URL ([#18430](https://github.com/RocketChat/Rocket.Chat/pull/18430)) + +- Can't send long messages as attachment ([#18355](https://github.com/RocketChat/Rocket.Chat/pull/18355)) + +- Error when updating omnichannel department without agents parameter ([#18428](https://github.com/RocketChat/Rocket.Chat/pull/18428)) + +- Invalid MIME type when uploading audio files ([#18426](https://github.com/RocketChat/Rocket.Chat/pull/18426)) + +- Migration 194 ([#18457](https://github.com/RocketChat/Rocket.Chat/pull/18457) by [@thirsch](https://github.com/thirsch)) + +- Multiple push notifications sent via native drivers ([#18442](https://github.com/RocketChat/Rocket.Chat/pull/18442)) + +- Omnichannel session monitor is not starting ([#18412](https://github.com/RocketChat/Rocket.Chat/pull/18412)) + +- Omnichannel Take Inquiry endpoint checking wrong permission ([#18446](https://github.com/RocketChat/Rocket.Chat/pull/18446)) + +
+🔍 Minor changes + + +- Release 3.5.1 ([#18452](https://github.com/RocketChat/Rocket.Chat/pull/18452) by [@thirsch](https://github.com/thirsch)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@thirsch](https://github.com/thirsch) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@gabriellsh](https://github.com/gabriellsh) +- [@ggazzo](https://github.com/ggazzo) +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 3.5.0 +`2020-07-27 · 8 🎉 · 5 🚀 · 29 🐛 · 34 🔍 · 21 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.14.0` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.16.0` + +### 🎉 New features + + +- **ENTERPRISE:** Add support to license tags ([#18093](https://github.com/RocketChat/Rocket.Chat/pull/18093)) + + Enterprise installations will show tags on Admin panel with the type of the license applied. The tag will be visible on the top-left corner of the administration area as a badge helping administrators to identify which license they have. + +- **ENTERPRISE:** Push Notification Data Privacy ([#18254](https://github.com/RocketChat/Rocket.Chat/pull/18254)) + +- Added profile field to inform Nickname for users in order to be searchable ([#18260](https://github.com/RocketChat/Rocket.Chat/pull/18260)) + + Nickname is a new user field that can be used to better identify users when searching for someone to add in a channel or do a mention. Useful for large organizations or countries where name repetition is common. + +- External MP3 encoder worker for audio recording ([#18277](https://github.com/RocketChat/Rocket.Chat/pull/18277)) + +- Sign in with apple (iOS client only) ([#18258](https://github.com/RocketChat/Rocket.Chat/pull/18258) by [@djorkaeffalexandre](https://github.com/djorkaeffalexandre)) + + Add Sign in with Apple service for the iOS client-only, support for the Web and Android clients will land in future releases. + +- Update Apps-Engine version ([#18271](https://github.com/RocketChat/Rocket.Chat/pull/18271)) + +- Update Apps-Engine version ([#18212](https://github.com/RocketChat/Rocket.Chat/pull/18212)) + +- User profile and User card ([#18194](https://github.com/RocketChat/Rocket.Chat/pull/18194)) + +### 🚀 Improvements + + +- Change setting that blocks unauthenticated access to avatar to public ([#18316](https://github.com/RocketChat/Rocket.Chat/pull/18316) by [@djorkaeffalexandre](https://github.com/djorkaeffalexandre)) + +- Improve performance and remove agents when the department is removed ([#17049](https://github.com/RocketChat/Rocket.Chat/pull/17049)) + +- List dropdown ([#18081](https://github.com/RocketChat/Rocket.Chat/pull/18081)) + +- Mention autocomplete UI and performance improvements ([#18309](https://github.com/RocketChat/Rocket.Chat/pull/18309)) + + * New setting to configure the number of suggestions `Admin > Layout > User Interface > Number of users' autocomplete suggestions` (default 5) + * The UI shows whenever the user is not a member of the room + * The UI shows when the suggestion came from the last messages for quick selection/reply + * The suggestions follow this order: + * The user with the exact username and member of the room + * The user with the exact username but not a member of the room (if allowed to list non-members) + * The users containing the text in username, name or nickname and member of the room + * The users containing the text in username, name or nickname and not a member of the room (if allowed to list non-members) + +- Message action styles ([#18190](https://github.com/RocketChat/Rocket.Chat/pull/18190)) + +### 🐛 Bug fixes + + +- "Join" button on thread when room is read only ([#18314](https://github.com/RocketChat/Rocket.Chat/pull/18314)) + +- App details returns to apps table, instead of previous page. ([#18080](https://github.com/RocketChat/Rocket.Chat/pull/18080)) + +- Application not loading due to reverse proxy decoding API calls unnecessarily ([#18222](https://github.com/RocketChat/Rocket.Chat/pull/18222)) + +- Apps page loading indefinitely if no Markeplace data ([#18274](https://github.com/RocketChat/Rocket.Chat/pull/18274)) + +- Bug on entering token in connectivity services ([#18317](https://github.com/RocketChat/Rocket.Chat/pull/18317)) + +- Cannot open admin when server uses ROOT_URL with subpath (#18105) ([#18147](https://github.com/RocketChat/Rocket.Chat/pull/18147) by [@omarchehab98](https://github.com/omarchehab98)) + +- CAS login not merging users with local accounts ([#18238](https://github.com/RocketChat/Rocket.Chat/pull/18238)) + +- Clipboard not working when permalinking a pinned message ([#18047](https://github.com/RocketChat/Rocket.Chat/pull/18047)) + +- Closing the admin does not return to last opened room ([#18308](https://github.com/RocketChat/Rocket.Chat/pull/18308)) + +- Corrects Typo in Analytics section of the admin page ([#17984](https://github.com/RocketChat/Rocket.Chat/pull/17984) by [@darigovresearch](https://github.com/darigovresearch)) + +- Delete user warning message undefined ([#18310](https://github.com/RocketChat/Rocket.Chat/pull/18310)) + +- Don't show agent info in the transcript if the setting is disabled ([#18044](https://github.com/RocketChat/Rocket.Chat/pull/18044) by [@antkaz](https://github.com/antkaz)) + +- Error when fetching a nonexistent business hour from the server ([#18315](https://github.com/RocketChat/Rocket.Chat/pull/18315)) + +- Few adjustments to accept fuselage theme ([#18009](https://github.com/RocketChat/Rocket.Chat/pull/18009)) + +- File uploads for unknown file types but nothing is blocked ([#18263](https://github.com/RocketChat/Rocket.Chat/pull/18263) by [@20051231](https://github.com/20051231)) + +- Fix sticky notifications not working ([#18285](https://github.com/RocketChat/Rocket.Chat/pull/18285)) + +- Geolocation permission being asked on load ([#18030](https://github.com/RocketChat/Rocket.Chat/pull/18030)) + +- Local Account login error when both LDAP and Email 2FA are enabled ([#18318](https://github.com/RocketChat/Rocket.Chat/pull/18318)) + +- Merge user custom fields on LDAP sync ([#17339](https://github.com/RocketChat/Rocket.Chat/pull/17339) by [@tobiasge](https://github.com/tobiasge)) + +- Misleading labels in Prune Messages ([#18006](https://github.com/RocketChat/Rocket.Chat/pull/18006)) + +- Missing Privacy Terms Cloud Register warning ([#18383](https://github.com/RocketChat/Rocket.Chat/pull/18383)) + +- Old Data Migrations breaking upgrades ([#18185](https://github.com/RocketChat/Rocket.Chat/pull/18185)) + +- Push gateway and cloud integration ([#18377](https://github.com/RocketChat/Rocket.Chat/pull/18377)) + +- SAML login crashing when receiving an array of roles ([#18224](https://github.com/RocketChat/Rocket.Chat/pull/18224)) + +- SAML login saves invalid username when receiving multiple values ([#18213](https://github.com/RocketChat/Rocket.Chat/pull/18213)) + +- SlackBridge error ([#18320](https://github.com/RocketChat/Rocket.Chat/pull/18320)) + +- Update check not able to be disabled ([#18339](https://github.com/RocketChat/Rocket.Chat/pull/18339)) + + Update checker can now be disabled. + +- Update link URL at AppsWhatIsIt ([#18240](https://github.com/RocketChat/Rocket.Chat/pull/18240)) + +- View close uikit event sending wrong payload ([#18289](https://github.com/RocketChat/Rocket.Chat/pull/18289)) + +
+🔍 Minor changes + + +- Broken link on readme ([#18358](https://github.com/RocketChat/Rocket.Chat/pull/18358)) + +- LingoHub based on develop ([#18307](https://github.com/RocketChat/Rocket.Chat/pull/18307)) + +- LingoHub based on develop ([#18176](https://github.com/RocketChat/Rocket.Chat/pull/18176)) + +- Merge master into develop & Set version to 3.5.0-develop ([#18083](https://github.com/RocketChat/Rocket.Chat/pull/18083) by [@cking-vonix](https://github.com/cking-vonix) & [@lpilz](https://github.com/lpilz) & [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- Move the development guidelines to our handbook ([#18026](https://github.com/RocketChat/Rocket.Chat/pull/18026)) + +- Regression - Profile page crashing for users without password ([#18287](https://github.com/RocketChat/Rocket.Chat/pull/18287)) + +- Regression: Account Sidebar not rendering properly ([#18288](https://github.com/RocketChat/Rocket.Chat/pull/18288)) + +- Regression: Admin User password ([#18350](https://github.com/RocketChat/Rocket.Chat/pull/18350)) + +- Regression: Close UserCard if action opens a new page ([#18319](https://github.com/RocketChat/Rocket.Chat/pull/18319)) + +- Regression: Edit messages after opening thread ([#18375](https://github.com/RocketChat/Rocket.Chat/pull/18375)) + +- Regression: Fix defaultFields for null values ([#18360](https://github.com/RocketChat/Rocket.Chat/pull/18360)) + +- Regression: Fix useUserSubscription usage ([#18378](https://github.com/RocketChat/Rocket.Chat/pull/18378)) + +- Regression: Mentions in thread title ([#18369](https://github.com/RocketChat/Rocket.Chat/pull/18369)) + +- Regression: Message actions under "unread messages" warning ([#18273](https://github.com/RocketChat/Rocket.Chat/pull/18273)) + +- Regression: MP3 worker ([#18371](https://github.com/RocketChat/Rocket.Chat/pull/18371)) + +- Regression: nickname field in user profile. ([#18359](https://github.com/RocketChat/Rocket.Chat/pull/18359)) + +- Regression: Notification with id-only isn't showed by iOS devices ([#18353](https://github.com/RocketChat/Rocket.Chat/pull/18353) by [@djorkaeffalexandre](https://github.com/djorkaeffalexandre)) + +- Regression: Preferences crashing when User has no preferences set. ([#18341](https://github.com/RocketChat/Rocket.Chat/pull/18341)) + +- Regression: Provide a fallback text when push notification is idOnly ([#18373](https://github.com/RocketChat/Rocket.Chat/pull/18373) by [@djorkaeffalexandre](https://github.com/djorkaeffalexandre)) + +- Regression: Remove calls to Console API in useForm hook ([#18244](https://github.com/RocketChat/Rocket.Chat/pull/18244)) + +- Regression: Return original message on push API ([#18386](https://github.com/RocketChat/Rocket.Chat/pull/18386)) + +- Regression: Thread Title not being escaped ([#18356](https://github.com/RocketChat/Rocket.Chat/pull/18356)) + +- Regression: User Status selector ([#18343](https://github.com/RocketChat/Rocket.Chat/pull/18343)) + +- Regression: Userinfo center avatar image ([#18354](https://github.com/RocketChat/Rocket.Chat/pull/18354)) + +- Regression: useStorage ([#18370](https://github.com/RocketChat/Rocket.Chat/pull/18370)) + +- Regression: useUserContext ([#18385](https://github.com/RocketChat/Rocket.Chat/pull/18385)) + +- Regression: Wrong background in disabled inputs ([#18372](https://github.com/RocketChat/Rocket.Chat/pull/18372)) + +- Release 3.4.2 ([#18241](https://github.com/RocketChat/Rocket.Chat/pull/18241) by [@omarchehab98](https://github.com/omarchehab98)) + +- Rewrite Contextual Bar Discussion List in React ([#18127](https://github.com/RocketChat/Rocket.Chat/pull/18127)) + +- Rewrite: My Account > Integrations rewritten ([#18290](https://github.com/RocketChat/Rocket.Chat/pull/18290)) + +- Rewrite: My Account using React ([#18106](https://github.com/RocketChat/Rocket.Chat/pull/18106)) + +- Update Apps Engine ([#18389](https://github.com/RocketChat/Rocket.Chat/pull/18389)) + +- Update Apps-Engine to Beta version ([#18294](https://github.com/RocketChat/Rocket.Chat/pull/18294)) + +- Update the API of React Hooks using Meteor's reactive system ([#18226](https://github.com/RocketChat/Rocket.Chat/pull/18226)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@20051231](https://github.com/20051231) +- [@antkaz](https://github.com/antkaz) +- [@cking-vonix](https://github.com/cking-vonix) +- [@darigovresearch](https://github.com/darigovresearch) +- [@djorkaeffalexandre](https://github.com/djorkaeffalexandre) +- [@lpilz](https://github.com/lpilz) +- [@mariaeduardacunha](https://github.com/mariaeduardacunha) +- [@omarchehab98](https://github.com/omarchehab98) +- [@tobiasge](https://github.com/tobiasge) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@d-gubert](https://github.com/d-gubert) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 3.4.2 +`2020-07-10 · 6 🐛 · 1 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.14.0` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.15.0` + +### 🐛 Bug fixes + + +- App details returns to apps table, instead of previous page. ([#18080](https://github.com/RocketChat/Rocket.Chat/pull/18080)) + +- Application not loading due to reverse proxy decoding API calls unnecessarily ([#18222](https://github.com/RocketChat/Rocket.Chat/pull/18222)) + +- Cannot open admin when server uses ROOT_URL with subpath (#18105) ([#18147](https://github.com/RocketChat/Rocket.Chat/pull/18147) by [@omarchehab98](https://github.com/omarchehab98)) + +- CAS login not merging users with local accounts ([#18238](https://github.com/RocketChat/Rocket.Chat/pull/18238)) + +- Old Data Migrations breaking upgrades ([#18185](https://github.com/RocketChat/Rocket.Chat/pull/18185)) + +- SAML login crashing when receiving an array of roles ([#18224](https://github.com/RocketChat/Rocket.Chat/pull/18224)) + +
+🔍 Minor changes + + +- Release 3.4.2 ([#18241](https://github.com/RocketChat/Rocket.Chat/pull/18241) by [@omarchehab98](https://github.com/omarchehab98)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@omarchehab98](https://github.com/omarchehab98) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@gabriellsh](https://github.com/gabriellsh) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@rodrigok](https://github.com/rodrigok) + +# 3.4.1 +`2020-07-02 · 7 🐛 · 1 🔍 · 8 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.14.0` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.15.0` + +### 🐛 Bug fixes + + +- "Add reaction" icon missing when the viewport size is smaller than 500px ([#18110](https://github.com/RocketChat/Rocket.Chat/pull/18110) by [@dudizilla](https://github.com/dudizilla)) + +- Avatar ETag missing from User ([#18109](https://github.com/RocketChat/Rocket.Chat/pull/18109)) + +- Email notifications were still being sent for online users ([#18088](https://github.com/RocketChat/Rocket.Chat/pull/18088) by [@densik](https://github.com/densik)) + +- Jitsi opening twice ([#18111](https://github.com/RocketChat/Rocket.Chat/pull/18111)) + +- Not possible to read encrypted messages after disable E2E on channel level ([#18101](https://github.com/RocketChat/Rocket.Chat/pull/18101)) + +- Omnichannel close room callback returning promise ([#18102](https://github.com/RocketChat/Rocket.Chat/pull/18102)) + +- The livechat agent activity monitor wasn't being initialised because due to an internal error ([#18090](https://github.com/RocketChat/Rocket.Chat/pull/18090) by [@paulobernardoaf](https://github.com/paulobernardoaf)) + +
+🔍 Minor changes + + +- Release 3.4.1 ([#18134](https://github.com/RocketChat/Rocket.Chat/pull/18134) by [@densik](https://github.com/densik) & [@dudizilla](https://github.com/dudizilla) & [@paulobernardoaf](https://github.com/paulobernardoaf)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@densik](https://github.com/densik) +- [@dudizilla](https://github.com/dudizilla) +- [@paulobernardoaf](https://github.com/paulobernardoaf) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@gabriellsh](https://github.com/gabriellsh) +- [@ggazzo](https://github.com/ggazzo) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.4.0 +`2020-06-30 · 18 🎉 · 19 🚀 · 42 🐛 · 52 🔍 · 52 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.14.0` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.15.0` + +### 🎉 New features + + +- **API:** Add `interation.update` endpoint ([#13618](https://github.com/RocketChat/Rocket.Chat/pull/13618) by [@tonobo](https://github.com/tonobo)) + +- **API:** Endpoint `groups.setEncrypted` ([#13477](https://github.com/RocketChat/Rocket.Chat/pull/13477)) + +- **API:** Endpoint `settings.addCustomOAuth` to create Custom OAuth services ([#14912](https://github.com/RocketChat/Rocket.Chat/pull/14912) by [@g-rauhoeft](https://github.com/g-rauhoeft)) + +- **API:** New endpoints to manage User Custom Status `custom-user-status.create`, custom-user-status.delete` and `custom-user-status.update` ([#16550](https://github.com/RocketChat/Rocket.Chat/pull/16550) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- **ENTERPRISE:** Download engagement data ([#17920](https://github.com/RocketChat/Rocket.Chat/pull/17920)) + +- **ENTERPRISE:** Omnichannel multiple business hours ([#17947](https://github.com/RocketChat/Rocket.Chat/pull/17947)) + +- Ability to configure Jitsi room options via new setting `URL Suffix` ([#17950](https://github.com/RocketChat/Rocket.Chat/pull/17950) by [@fthiery](https://github.com/fthiery)) + +- Accept variable `#{userdn}` on LDAP group filter ([#16273](https://github.com/RocketChat/Rocket.Chat/pull/16273) by [@ChrissW-R1](https://github.com/ChrissW-R1)) + +- Add ability to block failed login attempts by user and IP ([#17783](https://github.com/RocketChat/Rocket.Chat/pull/17783)) + +- Allows agents to send chat transcript to omnichannel end-users ([#17774](https://github.com/RocketChat/Rocket.Chat/pull/17774)) + +- Assign oldest active user as owner when deleting last room owner ([#16088](https://github.com/RocketChat/Rocket.Chat/pull/16088)) + +- Blocked Media Types setting ([#17617](https://github.com/RocketChat/Rocket.Chat/pull/17617)) + +- Highlight matching words in message search results ([#16166](https://github.com/RocketChat/Rocket.Chat/pull/16166) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Make ldap avatar source field customizable ([#12958](https://github.com/RocketChat/Rocket.Chat/pull/12958) by [@alexbartsch](https://github.com/alexbartsch)) + +- Reply notification email to sender's email when the Direct Reply feature is disabled ([#15767](https://github.com/RocketChat/Rocket.Chat/pull/15767) by [@localguru](https://github.com/localguru)) + +- Rewrite Apps ([#17906](https://github.com/RocketChat/Rocket.Chat/pull/17906)) + +- Setting to determine if the LDAP user active state should be synced ([#17645](https://github.com/RocketChat/Rocket.Chat/pull/17645)) + +- Skip Export Operations that haven't been updated in over a day ([#16135](https://github.com/RocketChat/Rocket.Chat/pull/16135)) + +### 🚀 Improvements + + +- **Federation:** Add support for _tcp and protocol DNS entries ([#17818](https://github.com/RocketChat/Rocket.Chat/pull/17818)) + +- **Performance:** Add new database indexes to improve data query performance ([#17839](https://github.com/RocketChat/Rocket.Chat/pull/17839)) + +- Add rate limiter to UiKit endpoints ([#17859](https://github.com/RocketChat/Rocket.Chat/pull/17859)) + +- Allow webhook message to respond in thread ([#17863](https://github.com/RocketChat/Rocket.Chat/pull/17863) by [@Karting06](https://github.com/Karting06)) + +- Change default upload settings to only block SVG files ([#17933](https://github.com/RocketChat/Rocket.Chat/pull/17933)) + +- Don't send emails to online users and remove delay when away/idle ([#17907](https://github.com/RocketChat/Rocket.Chat/pull/17907)) + +- Make the implementation of custom code easier by having placeholders for a custom folder ([#15106](https://github.com/RocketChat/Rocket.Chat/pull/15106) by [@justinr1234](https://github.com/justinr1234)) + +- Performance editing Admin settings ([#17916](https://github.com/RocketChat/Rocket.Chat/pull/17916)) + +- React hooks lint rules ([#17941](https://github.com/RocketChat/Rocket.Chat/pull/17941)) + +- Refactor Omnichannel Office Hours feature ([#17824](https://github.com/RocketChat/Rocket.Chat/pull/17824)) + +- Refactor Omnichannel Past Chats List ([#17346](https://github.com/RocketChat/Rocket.Chat/pull/17346) by [@nitinkumartiwari](https://github.com/nitinkumartiwari)) + +- Rewrite admin sidebar in React ([#17801](https://github.com/RocketChat/Rocket.Chat/pull/17801)) + +- Rewrite Federation Dashboard ([#17900](https://github.com/RocketChat/Rocket.Chat/pull/17900)) + +- SAML implementation ([#17742](https://github.com/RocketChat/Rocket.Chat/pull/17742)) + +- Slack import: Parse channel and user mentions ([#17637](https://github.com/RocketChat/Rocket.Chat/pull/17637)) + +- Split NOTIFICATIONS_SCHEDULE_DELAY into three separate variables ([#17669](https://github.com/RocketChat/Rocket.Chat/pull/17669) by [@jazztickets](https://github.com/jazztickets)) + + Email notification delay can now be customized with the following environment variables: + NOTIFICATIONS_SCHEDULE_DELAY_ONLINE + NOTIFICATIONS_SCHEDULE_DELAY_AWAY + NOTIFICATIONS_SCHEDULE_DELAY_OFFLINE + Setting the value to -1 disable notifications for that type. + +- Threads ([#17416](https://github.com/RocketChat/Rocket.Chat/pull/17416)) + +- Use REST for DDP calls by default ([#17934](https://github.com/RocketChat/Rocket.Chat/pull/17934)) + +- User avatar cache invalidation ([#17925](https://github.com/RocketChat/Rocket.Chat/pull/17925)) + +### 🐛 Bug fixes + + +- Add Authorization Bearer to allowed Headers ([#8566](https://github.com/RocketChat/Rocket.Chat/pull/8566) by [@Siedlerchr](https://github.com/Siedlerchr)) + +- Add missing i18n entry for LDAP connection test success message ([#17691](https://github.com/RocketChat/Rocket.Chat/pull/17691) by [@AbhinavTalari](https://github.com/AbhinavTalari)) + +- Added explicit server oembed provider for Twitter ([#17954](https://github.com/RocketChat/Rocket.Chat/pull/17954) by [@Cleod9](https://github.com/Cleod9)) + +- Autocomplete component is not working property when searching channels in the Livechat Departments form ([#17970](https://github.com/RocketChat/Rocket.Chat/pull/17970)) + +- Cannot react while "Allow reaction" is set to true ([#17964](https://github.com/RocketChat/Rocket.Chat/pull/17964)) + +- Channel/Room inconsistency for leave and hide options ([#10165](https://github.com/RocketChat/Rocket.Chat/pull/10165) by [@c0dzilla](https://github.com/c0dzilla)) + +- Close the user info context panel does not navigate back to the user's list ([#14085](https://github.com/RocketChat/Rocket.Chat/pull/14085) by [@mohamedar97](https://github.com/mohamedar97)) + +- Disabling `Json Web Tokens protection to file uploads` disables the File Upload protection entirely ([#16262](https://github.com/RocketChat/Rocket.Chat/pull/16262) by [@antkaz](https://github.com/antkaz)) + +- Discussion List paddings ([#17955](https://github.com/RocketChat/Rocket.Chat/pull/17955)) + +- Discussion not updating rooms list and not checking right permissions ([#17959](https://github.com/RocketChat/Rocket.Chat/pull/17959)) + +- Discussion sort option even with discussions disabled ([#17963](https://github.com/RocketChat/Rocket.Chat/pull/17963)) + +- double slashes in avatar url ([#17739](https://github.com/RocketChat/Rocket.Chat/pull/17739) by [@lolimay](https://github.com/lolimay)) + +- Duplicated password placeholder ([#17898](https://github.com/RocketChat/Rocket.Chat/pull/17898) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- Encode custom oauth2 URL params ([#13373](https://github.com/RocketChat/Rocket.Chat/pull/13373) by [@InstinctBas](https://github.com/InstinctBas)) + +- Hide system message add/remove owner ([#17938](https://github.com/RocketChat/Rocket.Chat/pull/17938)) + +- Importers progress sending too much update events to clients ([#17857](https://github.com/RocketChat/Rocket.Chat/pull/17857)) + +- Link preview containing HTML encoded chars ([#16512](https://github.com/RocketChat/Rocket.Chat/pull/16512)) + +- Links being escaped twice leading to visible encoded characters ([#16481](https://github.com/RocketChat/Rocket.Chat/pull/16481)) + +- Markdown links not accepting URLs with parentheses ([#13605](https://github.com/RocketChat/Rocket.Chat/pull/13605) by [@knrt10](https://github.com/knrt10)) + +- Message action popup doesn't adjust itself on screen resize ([#16508](https://github.com/RocketChat/Rocket.Chat/pull/16508) by [@ritvikjain99](https://github.com/ritvikjain99)) + +- Missing i18n key for setting: Verify Email for External Accounts ([#18002](https://github.com/RocketChat/Rocket.Chat/pull/18002)) + +- Missing pinned icon indicator for messages pinned ([#16448](https://github.com/RocketChat/Rocket.Chat/pull/16448) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Missing User when forwarding Omnichannel conversations via Apps-Engine ([#17918](https://github.com/RocketChat/Rocket.Chat/pull/17918)) + +- New Omnichannel Past Chats list padding ([#17994](https://github.com/RocketChat/Rocket.Chat/pull/17994)) + +- No rotate option, to prevent image quality loss ([#15196](https://github.com/RocketChat/Rocket.Chat/pull/15196) by [@stleitner](https://github.com/stleitner)) + +- No Way to Display Password Policy on Password Reset Screen ([#16400](https://github.com/RocketChat/Rocket.Chat/pull/16400) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Not possible to translate the label of custom fields in user's Info ([#15595](https://github.com/RocketChat/Rocket.Chat/pull/15595) by [@antkaz](https://github.com/antkaz)) + +- Outgoing webhook: Excessive spacing between trigger words ([#17830](https://github.com/RocketChat/Rocket.Chat/pull/17830) by [@Karting06](https://github.com/Karting06)) + +- Profile save button not activates properly when changing the username field ([#16541](https://github.com/RocketChat/Rocket.Chat/pull/16541) by [@ritvikjain99](https://github.com/ritvikjain99)) + +- ReadOnly Rooms permission checks ([#17709](https://github.com/RocketChat/Rocket.Chat/pull/17709)) + +- Reorder hljs ([#17854](https://github.com/RocketChat/Rocket.Chat/pull/17854)) + +- Set `x-content-type-options: nosniff` header ([#16232](https://github.com/RocketChat/Rocket.Chat/pull/16232) by [@aviral243](https://github.com/aviral243)) + +- Some Login Buttons disappear after refreshing OAuth Services ([#17808](https://github.com/RocketChat/Rocket.Chat/pull/17808)) + +- Spotify embed link opens in same tab ([#13637](https://github.com/RocketChat/Rocket.Chat/pull/13637) by [@bhardwajaditya](https://github.com/bhardwajaditya)) + +- StreamCast stream to server only streamers ([#17942](https://github.com/RocketChat/Rocket.Chat/pull/17942)) + +- UI is not rendering when trying to edit an user ([#17972](https://github.com/RocketChat/Rocket.Chat/pull/17972)) + +- Undesirable message updates after user saving profile ([#17930](https://github.com/RocketChat/Rocket.Chat/pull/17930)) + +- Update AmazonS3 file upload with error handling and sync operation ([#10372](https://github.com/RocketChat/Rocket.Chat/pull/10372) by [@madhavmalhotra3089](https://github.com/madhavmalhotra3089)) + +- User can resend email verification if email is invalid or is empty ([#16095](https://github.com/RocketChat/Rocket.Chat/pull/16095) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- User is prompted to reset their password when logging with OAuth ([#18001](https://github.com/RocketChat/Rocket.Chat/pull/18001)) + +- Video conferences being started by users without permission ([#17948](https://github.com/RocketChat/Rocket.Chat/pull/17948)) + +- When the message is too long declining to send as an attachment does not restore the content into the composer ([#16332](https://github.com/RocketChat/Rocket.Chat/pull/16332)) + +
+🔍 Minor changes + + +- Add Apps to control GitHub issues ([#17807](https://github.com/RocketChat/Rocket.Chat/pull/17807)) + +- Add Apps-Engine to Engine Versions on History ([#17810](https://github.com/RocketChat/Rocket.Chat/pull/17810)) + +- Always initialize CIRCLE_BRANCH env var on CI ([#17874](https://github.com/RocketChat/Rocket.Chat/pull/17874)) + +- Bump websocket-extensions from 0.1.3 to 0.1.4 ([#17837](https://github.com/RocketChat/Rocket.Chat/pull/17837) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Change some components' location ([#17893](https://github.com/RocketChat/Rocket.Chat/pull/17893)) + +- Chatpal: limit results to current room ([#17718](https://github.com/RocketChat/Rocket.Chat/pull/17718) by [@mrsimpson](https://github.com/mrsimpson)) + + Adds an option to Chatpal Search to limit results to the current room searched from + +- Do not build Docker image for fork PRs ([#17370](https://github.com/RocketChat/Rocket.Chat/pull/17370)) + +- Federation performance and bug fixes ([#17504](https://github.com/RocketChat/Rocket.Chat/pull/17504) by [@hyfen](https://github.com/hyfen)) + +- Fix invalid develop payload to release service ([#17799](https://github.com/RocketChat/Rocket.Chat/pull/17799)) + +- Fix typo "coorosponding" ([#17840](https://github.com/RocketChat/Rocket.Chat/pull/17840) by [@toshokan](https://github.com/toshokan)) + + Fix typo on English LDAP page + +- Fix typo on Contributing.md ([#17769](https://github.com/RocketChat/Rocket.Chat/pull/17769) by [@onurtemiz](https://github.com/onurtemiz)) + + Typo fixes on contributing page. + +- Fixes some italian wording ([#14008](https://github.com/RocketChat/Rocket.Chat/pull/14008) by [@dadokkio](https://github.com/dadokkio)) + +- LDAP typo ([#17835](https://github.com/RocketChat/Rocket.Chat/pull/17835) by [@thomas-mc-work](https://github.com/thomas-mc-work)) + +- LingoHub based on develop ([#17796](https://github.com/RocketChat/Rocket.Chat/pull/17796)) + +- Merge master into develop & Set version to 3.4.0-develop ([#17764](https://github.com/RocketChat/Rocket.Chat/pull/17764) by [@lpilz](https://github.com/lpilz) & [@mtmr0x](https://github.com/mtmr0x)) + +- Readme: Update Raspberry Pi 2 to Pi 4 ([#17031](https://github.com/RocketChat/Rocket.Chat/pull/17031) by [@EwoutH](https://github.com/EwoutH)) + +- Refactor components and views to Storybook compatibility ([#17800](https://github.com/RocketChat/Rocket.Chat/pull/17800)) + +- Regresion: Issue with reply button on broadcast channels ([#18057](https://github.com/RocketChat/Rocket.Chat/pull/18057)) + +- Regression - Incoming WebHook messages not showing up on the channel ([#18005](https://github.com/RocketChat/Rocket.Chat/pull/18005)) + +- Regression - Unable to edit status on the Edit User panel of the admin ([#18032](https://github.com/RocketChat/Rocket.Chat/pull/18032)) + +- Regression: Admin User Edit panel is broken ([#17992](https://github.com/RocketChat/Rocket.Chat/pull/17992)) + +- Regression: App info broken ([#17979](https://github.com/RocketChat/Rocket.Chat/pull/17979) by [@lolimay](https://github.com/lolimay)) + +- Regression: Cannot save avatar change on admin ([#17999](https://github.com/RocketChat/Rocket.Chat/pull/17999)) + +- Regression: Deprecate check permission on integrations ([#18024](https://github.com/RocketChat/Rocket.Chat/pull/18024)) + +- Regression: Favorite and Featured fields not triggering changes ([#18010](https://github.com/RocketChat/Rocket.Chat/pull/18010)) + +- Regression: Fix AWS S3 file retrieval ([#17982](https://github.com/RocketChat/Rocket.Chat/pull/17982)) + +- Regression: Fix exit-room on livechat ([#18067](https://github.com/RocketChat/Rocket.Chat/pull/18067)) + +- Regression: Fix mentions on thread preview ([#18071](https://github.com/RocketChat/Rocket.Chat/pull/18071)) + +- Regression: Fix setting reply-to email header ([#18008](https://github.com/RocketChat/Rocket.Chat/pull/18008)) + +- Regression: Fix threads badge color indicators ([#18048](https://github.com/RocketChat/Rocket.Chat/pull/18048)) + +- Regression: Fix update last message on delete ([#18077](https://github.com/RocketChat/Rocket.Chat/pull/18077)) + +- Regression: Fix wrong message grouping inside threads ([#18039](https://github.com/RocketChat/Rocket.Chat/pull/18039)) + +- Regression: Grouping Thread messages ([#18042](https://github.com/RocketChat/Rocket.Chat/pull/18042)) + +- Regression: Image Upload not working ([#17993](https://github.com/RocketChat/Rocket.Chat/pull/17993)) + +- Regression: Improve Omnichannel Business Hours ([#18050](https://github.com/RocketChat/Rocket.Chat/pull/18050)) + +- Regression: Improve the logic to get request IPs ([#18033](https://github.com/RocketChat/Rocket.Chat/pull/18033)) + +- Regression: Infinite loop in CodeSettingInput ([#17949](https://github.com/RocketChat/Rocket.Chat/pull/17949)) + +- Regression: Infinite render loop on Setup Wizard ([#18074](https://github.com/RocketChat/Rocket.Chat/pull/18074)) + +- Regression: Only add reply-to if sender has emails ([#17998](https://github.com/RocketChat/Rocket.Chat/pull/17998)) + +- Regression: Repair CodeMirror component reactivity ([#18037](https://github.com/RocketChat/Rocket.Chat/pull/18037)) + +- Regression: Reset section button ([#18007](https://github.com/RocketChat/Rocket.Chat/pull/18007)) + +- Regression: Room flickering if open a thread ([#18004](https://github.com/RocketChat/Rocket.Chat/pull/18004)) + +- Regression: Wrong padding and colors on some tabs ([#18068](https://github.com/RocketChat/Rocket.Chat/pull/18068)) + +- Release 3.3.3 ([#17875](https://github.com/RocketChat/Rocket.Chat/pull/17875)) + +- Remove unused accounts-js integration ([#17921](https://github.com/RocketChat/Rocket.Chat/pull/17921)) + +- Remove useLazyRef hook usage ([#18003](https://github.com/RocketChat/Rocket.Chat/pull/18003)) + +- Revert "Regression: Fix wrong message grouping inside threads" ([#18043](https://github.com/RocketChat/Rocket.Chat/pull/18043)) + +- Submit a payload to the release service when a release happens ([#17775](https://github.com/RocketChat/Rocket.Chat/pull/17775)) + +- Update Dockerfile to not depend on custom base image ([#17802](https://github.com/RocketChat/Rocket.Chat/pull/17802)) + +- Update stale bot to v3 and run every 6 hours ([#17958](https://github.com/RocketChat/Rocket.Chat/pull/17958)) + +- Upgrade Livechat Widget version to 1.6.0 ([#18070](https://github.com/RocketChat/Rocket.Chat/pull/18070)) + +- Wrap Info Page components with React.memo ([#17899](https://github.com/RocketChat/Rocket.Chat/pull/17899)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@AbhinavTalari](https://github.com/AbhinavTalari) +- [@ChrissW-R1](https://github.com/ChrissW-R1) +- [@Cleod9](https://github.com/Cleod9) +- [@EwoutH](https://github.com/EwoutH) +- [@InstinctBas](https://github.com/InstinctBas) +- [@Karting06](https://github.com/Karting06) +- [@Siedlerchr](https://github.com/Siedlerchr) +- [@alexbartsch](https://github.com/alexbartsch) +- [@antkaz](https://github.com/antkaz) +- [@ashwaniYDV](https://github.com/ashwaniYDV) +- [@aviral243](https://github.com/aviral243) +- [@bhardwajaditya](https://github.com/bhardwajaditya) +- [@c0dzilla](https://github.com/c0dzilla) +- [@dadokkio](https://github.com/dadokkio) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@fthiery](https://github.com/fthiery) +- [@g-rauhoeft](https://github.com/g-rauhoeft) +- [@hyfen](https://github.com/hyfen) +- [@jazztickets](https://github.com/jazztickets) +- [@justinr1234](https://github.com/justinr1234) +- [@knrt10](https://github.com/knrt10) +- [@localguru](https://github.com/localguru) +- [@lolimay](https://github.com/lolimay) +- [@lpilz](https://github.com/lpilz) +- [@madhavmalhotra3089](https://github.com/madhavmalhotra3089) +- [@mariaeduardacunha](https://github.com/mariaeduardacunha) +- [@mohamedar97](https://github.com/mohamedar97) +- [@mrsimpson](https://github.com/mrsimpson) +- [@mtmr0x](https://github.com/mtmr0x) +- [@nitinkumartiwari](https://github.com/nitinkumartiwari) +- [@onurtemiz](https://github.com/onurtemiz) +- [@ritvikjain99](https://github.com/ritvikjain99) +- [@stleitner](https://github.com/stleitner) +- [@thomas-mc-work](https://github.com/thomas-mc-work) +- [@tonobo](https://github.com/tonobo) +- [@toshokan](https://github.com/toshokan) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@Sing-Li](https://github.com/Sing-Li) +- [@alansikora](https://github.com/alansikora) +- [@d-gubert](https://github.com/d-gubert) +- [@engelgabriel](https://github.com/engelgabriel) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@murtaza98](https://github.com/murtaza98) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 3.3.3 +`2020-06-11 · 2 🔍 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.14.0` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.15.0` + +
+🔍 Minor changes + + +- Always initialize CIRCLE_BRANCH env var on CI ([#17874](https://github.com/RocketChat/Rocket.Chat/pull/17874)) + +- Release 3.3.3 ([#17875](https://github.com/RocketChat/Rocket.Chat/pull/17875)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.3.2 +`2020-06-10 · 3 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.14.0` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.15.0` + +
+🔍 Minor changes + + +- Fix invalid develop payload to release service ([#17799](https://github.com/RocketChat/Rocket.Chat/pull/17799)) + +- Release 3.3.2 ([#17870](https://github.com/RocketChat/Rocket.Chat/pull/17870)) + +- Submit a payload to the release service when a release happens ([#17775](https://github.com/RocketChat/Rocket.Chat/pull/17775)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@graywolf336](https://github.com/graywolf336) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.3.1 +`2020-06-10 · 8 🐛 · 4 🔍 · 10 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.14.0` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.15.0` + +### 🐛 Bug fixes + + +- Administration User page blank opening users without email ([#17836](https://github.com/RocketChat/Rocket.Chat/pull/17836) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- Apps room events losing data ([#17827](https://github.com/RocketChat/Rocket.Chat/pull/17827)) + +- Email link "go to message" being incorrectly escaped ([#17803](https://github.com/RocketChat/Rocket.Chat/pull/17803)) + +- Error when re-installing an App ([#17789](https://github.com/RocketChat/Rocket.Chat/pull/17789)) + +- Logic for room type was inverted on Admin panel (#17851) ([#17853](https://github.com/RocketChat/Rocket.Chat/pull/17853) by [@cking-vonix](https://github.com/cking-vonix)) + + Fixed logic for public/private room types on room edit panel + +- Omnichannel message link is broken in email notifications ([#17843](https://github.com/RocketChat/Rocket.Chat/pull/17843)) + +- SAML LogoutRequest sending wrong NameID ([#17860](https://github.com/RocketChat/Rocket.Chat/pull/17860)) + +- Slack importer settings object ([#17776](https://github.com/RocketChat/Rocket.Chat/pull/17776) by [@lpilz](https://github.com/lpilz)) + +
+🔍 Minor changes + + +- [REGRESSION] Omnichannel visitor forward was applying wrong restrictions ([#17826](https://github.com/RocketChat/Rocket.Chat/pull/17826)) + +- Fix the update check not working ([#17809](https://github.com/RocketChat/Rocket.Chat/pull/17809)) + +- Release 3.3.1 ([#17865](https://github.com/RocketChat/Rocket.Chat/pull/17865) by [@cking-vonix](https://github.com/cking-vonix) & [@lpilz](https://github.com/lpilz) & [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- Update Apps-Engine version ([#17804](https://github.com/RocketChat/Rocket.Chat/pull/17804)) + + Update Apps-Engine version + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@cking-vonix](https://github.com/cking-vonix) +- [@lpilz](https://github.com/lpilz) +- [@mariaeduardacunha](https://github.com/mariaeduardacunha) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@d-gubert](https://github.com/d-gubert) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@graywolf336](https://github.com/graywolf336) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.3.0 +`2020-05-27 · 20 🎉 · 8 🚀 · 41 🐛 · 45 🔍 · 37 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.14.0` +- MongoDB: `3.4, 3.6, 4.0` + +### 🎉 New features + + +- **APPS-ENGINE:** Essentials mechanism ([#17656](https://github.com/RocketChat/Rocket.Chat/pull/17656)) + +- **Apps-Engine:** New Livechat event handlers ([#17033](https://github.com/RocketChat/Rocket.Chat/pull/17033) by [@lolimay](https://github.com/lolimay)) + +- **Apps-Engine:** New Room events ([#17487](https://github.com/RocketChat/Rocket.Chat/pull/17487)) + +- **ENTERPRISE:** Omnichannel Last-Chatted Agent Preferred option ([#17666](https://github.com/RocketChat/Rocket.Chat/pull/17666)) + + If activated, this feature will store the last agent that assisted each Omnichannel visitor when a conversation is taken. So, when a visitor returns(it works with any entry point, Livechat, Facebook, REST API, and so on) and starts a new chat, the routing system checks: + + 1 - The visitor object for any stored agent that the visitor has previously talked to; + 2 - If a previous agent is not found, the system will try to find a previous conversation of the same visitor. If a room is found, the system will get the previous agent from the room; + + After this process, if an agent has been found, the system will check the agent's availability to assist the new chat. If it's not available, then the routing system will get the next available agent in the queue. + +- **ENTERPRISE:** Support for custom Livechat registration form fields ([#17581](https://github.com/RocketChat/Rocket.Chat/pull/17581)) + +- **ENTERPRISE:** Support Omnichannel conversations auditing ([#17692](https://github.com/RocketChat/Rocket.Chat/pull/17692)) + +- Add Livechat website URL to the offline message e-mail ([#17429](https://github.com/RocketChat/Rocket.Chat/pull/17429)) + +- Add permissions to deal with Omnichannel custom fields ([#17567](https://github.com/RocketChat/Rocket.Chat/pull/17567)) + +- Add Permissions to deal with Omnichannel visitor past chats history ([#17580](https://github.com/RocketChat/Rocket.Chat/pull/17580)) + +- Add the ability to send Livechat offline messages to a channel ([#17442](https://github.com/RocketChat/Rocket.Chat/pull/17442)) + +- Added "Add custom emoji" link to emoji picker ([#16250](https://github.com/RocketChat/Rocket.Chat/pull/16250)) + +- Added custom fields to Add/Edit user ([#17681](https://github.com/RocketChat/Rocket.Chat/pull/17681)) + +- Admin refactor Second phase ([#17551](https://github.com/RocketChat/Rocket.Chat/pull/17551)) + +- Allow filtering Omnichannel analytics dashboards by department ([#17463](https://github.com/RocketChat/Rocket.Chat/pull/17463)) + +- API endpoint to fetch Omnichannel's room transfer history ([#17694](https://github.com/RocketChat/Rocket.Chat/pull/17694)) + +- Option to remove users from RocketChat if not found in Crowd ([#17619](https://github.com/RocketChat/Rocket.Chat/pull/17619) by [@ocanema](https://github.com/ocanema)) + +- Rewrite admin pages ([#17388](https://github.com/RocketChat/Rocket.Chat/pull/17388) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- Screen Lock settings - mobile client ([#17523](https://github.com/RocketChat/Rocket.Chat/pull/17523) by [@djorkaeffalexandre](https://github.com/djorkaeffalexandre)) + +- Show user's status description by the usernames in messages list ([#14892](https://github.com/RocketChat/Rocket.Chat/pull/14892) by [@wreiske](https://github.com/wreiske)) + + ![image](https://user-images.githubusercontent.com/6295044/60321979-5d191580-994c-11e9-9cd6-15f4565ff0ae.png) + +- Unread bars on sidebar (#16853) ([#16862](https://github.com/RocketChat/Rocket.Chat/pull/16862) by [@juzser](https://github.com/juzser)) + +### 🚀 Improvements + + +- **Apps-Engine:** App user as the default notifier ([#17050](https://github.com/RocketChat/Rocket.Chat/pull/17050) by [@lolimay](https://github.com/lolimay)) + +- Add env var to configure Chatpal URL and remove it from beta ([#16665](https://github.com/RocketChat/Rocket.Chat/pull/16665) by [@tkurz](https://github.com/tkurz)) + +- Add new webhooks to the Omnichannel integration feature ([#17503](https://github.com/RocketChat/Rocket.Chat/pull/17503)) + +- Added divider between tables and paginations ([#17680](https://github.com/RocketChat/Rocket.Chat/pull/17680)) + +- Always shows the exact match first on user's and room's autocomplete for mentions and on sidebar search ([#16394](https://github.com/RocketChat/Rocket.Chat/pull/16394)) + +- Display status information in the Omnichannel Agents list ([#17701](https://github.com/RocketChat/Rocket.Chat/pull/17701)) + +- Starred Messages ([#17685](https://github.com/RocketChat/Rocket.Chat/pull/17685)) + +- Unused styles ([#17554](https://github.com/RocketChat/Rocket.Chat/pull/17554)) + +### 🐛 Bug fixes + + +- Agent's custom fields being leaked through the Livechat configuration endpoint ([#17640](https://github.com/RocketChat/Rocket.Chat/pull/17640)) + +- Allow owners to react inside broadcast channels ([#17687](https://github.com/RocketChat/Rocket.Chat/pull/17687) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- Avatar url provider ignoring subfolders ([#17675](https://github.com/RocketChat/Rocket.Chat/pull/17675)) + +- Can't click on room's actions menu of sidebar list when in search mode ([#16548](https://github.com/RocketChat/Rocket.Chat/pull/16548) by [@ritvikjain99](https://github.com/ritvikjain99)) + +- Change email verification label ([#17450](https://github.com/RocketChat/Rocket.Chat/pull/17450)) + +- Default filters on Omnichannel Current Chats screen not showing on first load ([#17522](https://github.com/RocketChat/Rocket.Chat/pull/17522)) + +- Directory search user placeholder ([#17652](https://github.com/RocketChat/Rocket.Chat/pull/17652) by [@zdumitru](https://github.com/zdumitru)) + +- Do not allow passwords on private channels ([#15642](https://github.com/RocketChat/Rocket.Chat/pull/15642)) + +- Elements of "Personal Access Tokens" section out of alignment and unusable on very small screens ([#17129](https://github.com/RocketChat/Rocket.Chat/pull/17129) by [@Nikhil713](https://github.com/Nikhil713)) + +- Email configs not updating after setting changes ([#17578](https://github.com/RocketChat/Rocket.Chat/pull/17578)) + +- Emoji picker search broken ([#17570](https://github.com/RocketChat/Rocket.Chat/pull/17570)) + +- Error during data export for DMs ([#17577](https://github.com/RocketChat/Rocket.Chat/pull/17577) by [@mtmr0x](https://github.com/mtmr0x)) + +- Federation attachment URL for audio and video files ([#16430](https://github.com/RocketChat/Rocket.Chat/pull/16430) by [@qwertiko](https://github.com/qwertiko)) + +- Hyper.sh went out of business in early 2019 ([#17622](https://github.com/RocketChat/Rocket.Chat/pull/17622) by [@fbartels](https://github.com/fbartels)) + +- Increasing highlight time in 3 seconds ([#17540](https://github.com/RocketChat/Rocket.Chat/pull/17540) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- Invalid CSS syntax ([#17541](https://github.com/RocketChat/Rocket.Chat/pull/17541)) + +- LDAP login on Enteprise Version ([#17508](https://github.com/RocketChat/Rocket.Chat/pull/17508)) + +- Login Forbidden on servers that had LDAP enabled in the past ([#17579](https://github.com/RocketChat/Rocket.Chat/pull/17579)) + +- Mail Messages > Cannot mail own user ([#17625](https://github.com/RocketChat/Rocket.Chat/pull/17625)) + +- Marketplace tiered pricing plan wording ([#17644](https://github.com/RocketChat/Rocket.Chat/pull/17644)) + +- Missing dropdown to select custom status color on user's profile ([#16537](https://github.com/RocketChat/Rocket.Chat/pull/16537) by [@ritwizsinha](https://github.com/ritwizsinha)) + +- Not redirecting to `First Channel After Login` on register ([#17664](https://github.com/RocketChat/Rocket.Chat/pull/17664)) + +- Notification sounds ([#17616](https://github.com/RocketChat/Rocket.Chat/pull/17616)) + + * Global CDN config was ignored when loading the sound files + * Upload of custom sounds wasn't getting the file extension correctly + * Some translations were missing + * Edit and delete of custom sounds were not working correctly + +- Omnichannel departments are not saved when the offline channel name is not defined ([#17553](https://github.com/RocketChat/Rocket.Chat/pull/17553)) + +- Omnichannel room priorities system messages were create on every saved room info ([#17479](https://github.com/RocketChat/Rocket.Chat/pull/17479)) + +- Password reset/change accepting current password as new password ([#16331](https://github.com/RocketChat/Rocket.Chat/pull/16331) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Push settings enabled when push gateway is selected ([#17582](https://github.com/RocketChat/Rocket.Chat/pull/17582)) + +- Queued Omnichannel webhook being triggered unnecessarily ([#17661](https://github.com/RocketChat/Rocket.Chat/pull/17661)) + +- Reactions may present empty names of who reacted when using Real Names ([#17536](https://github.com/RocketChat/Rocket.Chat/pull/17536)) + + When changing usernames the reactions became outdated since it's not possible to update the usernames stored there, so when the server users Real Name setting enabled the system process all messages before return to the clients and get the names of the usernames to show since the usernames are outdated the names will not be found. Now the usernames will be displayed when the name can't be found as a temporary fix until we change the architecture of the data to fix the issue. + +- Relative image path in oembededUrlWidget ([#15902](https://github.com/RocketChat/Rocket.Chat/pull/15902) by [@machester4](https://github.com/machester4)) + +- Remove a non working setting "Notification Duration" ([#15737](https://github.com/RocketChat/Rocket.Chat/pull/15737)) + +- Remove deprecated Omnichannel Knowledge Base feature ([#17387](https://github.com/RocketChat/Rocket.Chat/pull/17387)) + +- remove multiple options from dontAskMeAgain ([#17514](https://github.com/RocketChat/Rocket.Chat/pull/17514) by [@TaimurAzhar](https://github.com/TaimurAzhar)) + +- Replace obsolete X-FRAME-OPTIONS header on Livechat route ([#17419](https://github.com/RocketChat/Rocket.Chat/pull/17419)) + +- Replace postcss Meteor package ([#15929](https://github.com/RocketChat/Rocket.Chat/pull/15929)) + +- Resolve 'app already exists' error on app update ([#17544](https://github.com/RocketChat/Rocket.Chat/pull/17544)) + +- SAML IDP initiated logout error ([#17482](https://github.com/RocketChat/Rocket.Chat/pull/17482)) + +- Secret Registration not properly validating Invite Token ([#17618](https://github.com/RocketChat/Rocket.Chat/pull/17618)) + +- Slack importer Link handling ([#17595](https://github.com/RocketChat/Rocket.Chat/pull/17595) by [@lpilz](https://github.com/lpilz)) + +- UI KIT Modal Width ([#17697](https://github.com/RocketChat/Rocket.Chat/pull/17697)) + +- Uncessary updates on Settings, Roles and Permissions on startup ([#17160](https://github.com/RocketChat/Rocket.Chat/pull/17160)) + +
+🔍 Minor changes + + +- Add engine versions for houston with templates ([#17403](https://github.com/RocketChat/Rocket.Chat/pull/17403)) + +- Add snapcraft files to be bumped with Houston ([#17611](https://github.com/RocketChat/Rocket.Chat/pull/17611)) + +- Add some missing metadata information ([#17524](https://github.com/RocketChat/Rocket.Chat/pull/17524)) + +- Bump jquery from 3.3.1 to 3.5.0 ([#17486](https://github.com/RocketChat/Rocket.Chat/pull/17486) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Deprecate compatibility cordova setting ([#17586](https://github.com/RocketChat/Rocket.Chat/pull/17586)) + +- DPlatform is deprecated and the replacement does not support rocket.chat ([#17040](https://github.com/RocketChat/Rocket.Chat/pull/17040) by [@ryjones](https://github.com/ryjones)) + +- Fix typo "You aren't part of any channel yet" ([#17498](https://github.com/RocketChat/Rocket.Chat/pull/17498) by [@huzaifahj](https://github.com/huzaifahj)) + +- Improve: New PR Template ([#16968](https://github.com/RocketChat/Rocket.Chat/pull/16968) by [@regalstreak](https://github.com/regalstreak)) + +- Improve: Remove index files from action-links, accounts and assets ([#17607](https://github.com/RocketChat/Rocket.Chat/pull/17607)) + +- Improve: Remove uncessary RegExp query by email ([#17654](https://github.com/RocketChat/Rocket.Chat/pull/17654)) + +- LingoHub based on develop ([#17693](https://github.com/RocketChat/Rocket.Chat/pull/17693)) + +- LingoHub based on develop ([#17520](https://github.com/RocketChat/Rocket.Chat/pull/17520)) + +- Livechat iframe allow microphone and camera ([#9956](https://github.com/RocketChat/Rocket.Chat/pull/9956) by [@kolorafa](https://github.com/kolorafa)) + +- Merge master into develop & Set version to 3.3.0-develop ([#17468](https://github.com/RocketChat/Rocket.Chat/pull/17468)) + +- Meteor update to version 1.10.2 ([#17533](https://github.com/RocketChat/Rocket.Chat/pull/17533)) + +- RegExp improvements suggested by LGTM ([#17500](https://github.com/RocketChat/Rocket.Chat/pull/17500)) + +- Regression: Fix error when performing Omnichannel queue checking ([#17700](https://github.com/RocketChat/Rocket.Chat/pull/17700)) + +- Regression: Add missing return to afterSaveMessage callbacks ([#17715](https://github.com/RocketChat/Rocket.Chat/pull/17715)) + +- Regression: Adjusting spaces between OAuth login buttons ([#17745](https://github.com/RocketChat/Rocket.Chat/pull/17745) by [@dudizilla](https://github.com/dudizilla)) + +- Regression: Click to join button not working ([#17705](https://github.com/RocketChat/Rocket.Chat/pull/17705)) + +- Regression: Do not show custom status inside sequential messages ([#17613](https://github.com/RocketChat/Rocket.Chat/pull/17613)) + +- Regression: Fix Avatar Url Provider when CDN_PREFIX_ALL is false ([#17542](https://github.com/RocketChat/Rocket.Chat/pull/17542)) + +- Regression: Fix error preventing creation of group DMs ([#17726](https://github.com/RocketChat/Rocket.Chat/pull/17726)) + +- Regression: Fix incorrect imports of the Apps-Engine ([#17695](https://github.com/RocketChat/Rocket.Chat/pull/17695)) + +- Regression: Fix Unread bar design ([#17750](https://github.com/RocketChat/Rocket.Chat/pull/17750) by [@dudizilla](https://github.com/dudizilla)) + +- Regression: Force unread-rooms bar to appears over the room list ([#17728](https://github.com/RocketChat/Rocket.Chat/pull/17728) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- Regression: Integrations edit/history crashing ([#17702](https://github.com/RocketChat/Rocket.Chat/pull/17702)) + +- Regression: Outgoing List ([#17667](https://github.com/RocketChat/Rocket.Chat/pull/17667)) + +- Regression: Override via env for string settings not working ([#17576](https://github.com/RocketChat/Rocket.Chat/pull/17576)) + +- Regression: Pressing enter on search reloads the page - admin pages ([#17663](https://github.com/RocketChat/Rocket.Chat/pull/17663)) + +- Regression: RegExp callbacks of settings were not being called ([#17552](https://github.com/RocketChat/Rocket.Chat/pull/17552)) + +- Regression: Removed status border on mentions list ([#17741](https://github.com/RocketChat/Rocket.Chat/pull/17741) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- Regression: Scroll on admin user info ([#17711](https://github.com/RocketChat/Rocket.Chat/pull/17711)) + +- Regression: Set retryWrites=false as default Mongo options ([#17683](https://github.com/RocketChat/Rocket.Chat/pull/17683)) + +- Regression: Status presence color ([#17707](https://github.com/RocketChat/Rocket.Chat/pull/17707) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- Regression: status-color-online ([#17684](https://github.com/RocketChat/Rocket.Chat/pull/17684)) + +- Regression: Threads list was fetching all threads ([#17716](https://github.com/RocketChat/Rocket.Chat/pull/17716)) + +- Regression: User edit form missing fields ([#17699](https://github.com/RocketChat/Rocket.Chat/pull/17699)) + +- Release 3.2.2 ([#17600](https://github.com/RocketChat/Rocket.Chat/pull/17600) by [@mtmr0x](https://github.com/mtmr0x)) + +- Remove unnecessary setting redefinition ([#17587](https://github.com/RocketChat/Rocket.Chat/pull/17587)) + +- Update Apps-Engine version ([#17706](https://github.com/RocketChat/Rocket.Chat/pull/17706)) + +- Update Contributing Guide ([#17653](https://github.com/RocketChat/Rocket.Chat/pull/17653)) + +- Update Fuselage version ([#17708](https://github.com/RocketChat/Rocket.Chat/pull/17708)) + +- Upgrade Livechat Widget version to 1.5.0 ([#17710](https://github.com/RocketChat/Rocket.Chat/pull/17710)) + +- Use Users.findOneByAppId instead of querying directly ([#16480](https://github.com/RocketChat/Rocket.Chat/pull/16480) by [@lolimay](https://github.com/lolimay)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Nikhil713](https://github.com/Nikhil713) +- [@TaimurAzhar](https://github.com/TaimurAzhar) +- [@ashwaniYDV](https://github.com/ashwaniYDV) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@djorkaeffalexandre](https://github.com/djorkaeffalexandre) +- [@dudizilla](https://github.com/dudizilla) +- [@fbartels](https://github.com/fbartels) +- [@huzaifahj](https://github.com/huzaifahj) +- [@juzser](https://github.com/juzser) +- [@kolorafa](https://github.com/kolorafa) +- [@lolimay](https://github.com/lolimay) +- [@lpilz](https://github.com/lpilz) +- [@machester4](https://github.com/machester4) +- [@mariaeduardacunha](https://github.com/mariaeduardacunha) +- [@mtmr0x](https://github.com/mtmr0x) +- [@ocanema](https://github.com/ocanema) +- [@qwertiko](https://github.com/qwertiko) +- [@regalstreak](https://github.com/regalstreak) +- [@ritvikjain99](https://github.com/ritvikjain99) +- [@ritwizsinha](https://github.com/ritwizsinha) +- [@ryjones](https://github.com/ryjones) +- [@tkurz](https://github.com/tkurz) +- [@wreiske](https://github.com/wreiske) +- [@zdumitru](https://github.com/zdumitru) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@d-gubert](https://github.com/d-gubert) +- [@engelgabriel](https://github.com/engelgabriel) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) +- [@thassiov](https://github.com/thassiov) + +# 3.2.2 +`2020-05-11 · 7 🐛 · 1 🔍 · 6 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Email configs not updating after setting changes ([#17578](https://github.com/RocketChat/Rocket.Chat/pull/17578)) + +- Emoji picker search broken ([#17570](https://github.com/RocketChat/Rocket.Chat/pull/17570)) + +- Error during data export for DMs ([#17577](https://github.com/RocketChat/Rocket.Chat/pull/17577) by [@mtmr0x](https://github.com/mtmr0x)) + +- LDAP login on Enteprise Version ([#17508](https://github.com/RocketChat/Rocket.Chat/pull/17508)) + +- Login Forbidden on servers that had LDAP enabled in the past ([#17579](https://github.com/RocketChat/Rocket.Chat/pull/17579)) + +- Push settings enabled when push gateway is selected ([#17582](https://github.com/RocketChat/Rocket.Chat/pull/17582)) + +- Reactions may present empty names of who reacted when using Real Names ([#17536](https://github.com/RocketChat/Rocket.Chat/pull/17536)) + + When changing usernames the reactions became outdated since it's not possible to update the usernames stored there, so when the server users Real Name setting enabled the system process all messages before return to the clients and get the names of the usernames to show since the usernames are outdated the names will not be found. Now the usernames will be displayed when the name can't be found as a temporary fix until we change the architecture of the data to fix the issue. + +
+🔍 Minor changes + + +- Release 3.2.2 ([#17600](https://github.com/RocketChat/Rocket.Chat/pull/17600) by [@mtmr0x](https://github.com/mtmr0x)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@mtmr0x](https://github.com/mtmr0x) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.2.1 +`2020-05-01 · 1 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- LDAP login error on Enterprise version ([#17497](https://github.com/RocketChat/Rocket.Chat/pull/17497)) + +
+🔍 Minor changes + + +- Release 3.2.1 ([#17506](https://github.com/RocketChat/Rocket.Chat/pull/17506)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.2.0 +`2020-04-27 · 19 🎉 · 10 🚀 · 34 🐛 · 19 🔍 · 34 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🎉 New features + + +- **ENTERPRISE:** Allows to set a group of departments accepted for forwarding chats ([#17335](https://github.com/RocketChat/Rocket.Chat/pull/17335)) + +- **ENTERPRISE:** Auto close abandoned Omnichannel rooms ([#17055](https://github.com/RocketChat/Rocket.Chat/pull/17055)) + +- **ENTERPRISE:** Omnichannel queue priorities ([#17141](https://github.com/RocketChat/Rocket.Chat/pull/17141)) + +- **ENTERPRISE:** Restrict the permissions configuration for guest users ([#17333](https://github.com/RocketChat/Rocket.Chat/pull/17333)) + + The **Guest** role is blocked for edition on the EE version. This will allow the EE customers to receive licenses with extra seats for Guests for free. The CE version continues to have the Guest role configurable. + +- Add ability to set tags in the Omnichannel room closing dialog ([#17254](https://github.com/RocketChat/Rocket.Chat/pull/17254)) + +- Add Color variable to left sidebar ([#16806](https://github.com/RocketChat/Rocket.Chat/pull/16806)) + +- Add MMS support to Voxtelesys ([#17217](https://github.com/RocketChat/Rocket.Chat/pull/17217) by [@john08burke](https://github.com/john08burke)) + +- Adds ability for Rocket.Chat Apps to create discussions ([#16683](https://github.com/RocketChat/Rocket.Chat/pull/16683) by [@lolimay](https://github.com/lolimay)) + +- Allow to send Agent custom fields through the Omnichannel CRM integration ([#16286](https://github.com/RocketChat/Rocket.Chat/pull/16286)) + +- Allow to set a comment when forwarding Omnichannel chats ([#17353](https://github.com/RocketChat/Rocket.Chat/pull/17353)) + +- Better Push and Email Notification logic ([#17357](https://github.com/RocketChat/Rocket.Chat/pull/17357)) + + We are still using the same logic to define which notifications every new message will generate, it takes some servers' settings, users's preferences and subscriptions' settings in consideration to determine who will receive each notification type (desktop, audio, email and mobile push), but now it doesn't check the user's status (online, away, offline) for email and mobile push notifications but send those notifications to a new queue with the following rules: + + - When the user is online the notification is scheduled to be sent in 120 seconds + - When the user is away the notification is scheduled to be sent in 120 seconds minus the amount of time he is away + - When the user is offline the notification is scheduled to be sent right away + - When the user reads a channel all the notifications for that user are removed (clear queue) + - When a notification is processed to be sent to a user and there are other scheduled notifications: + - All the scheduled notifications for that user are rescheduled to now + - The current notification goes back to the queue to be processed ordered by creation date + +- Buttons to check/uncheck all users and channels on import ([#17207](https://github.com/RocketChat/Rocket.Chat/pull/17207)) + +- Default favorite channels ([#16025](https://github.com/RocketChat/Rocket.Chat/pull/16025)) + +- Enable the IDP to choose the best authnContext ([#17222](https://github.com/RocketChat/Rocket.Chat/pull/17222) by [@felipecrp](https://github.com/felipecrp)) + +- Error page when browser is not supported ([#17372](https://github.com/RocketChat/Rocket.Chat/pull/17372)) + +- Feature/custom oauth mail field and interpolation for mapped fields ([#15690](https://github.com/RocketChat/Rocket.Chat/pull/15690) by [@benkroeger](https://github.com/benkroeger)) + +- Federation event for when users left rooms ([#17091](https://github.com/RocketChat/Rocket.Chat/pull/17091)) + +- Make the header for rooms clickable ([#16762](https://github.com/RocketChat/Rocket.Chat/pull/16762) by [@aKn1ghtOut](https://github.com/aKn1ghtOut)) + +- Support importing Slack threads ([#17130](https://github.com/RocketChat/Rocket.Chat/pull/17130) by [@lpilz](https://github.com/lpilz)) + +### 🚀 Improvements + + +- Add `file-title` and `file-desc` as new filter tag options on message search ([#16858](https://github.com/RocketChat/Rocket.Chat/pull/16858) by [@subham103](https://github.com/subham103)) + +- Add possibility to sort the Omnichannel current chats list by column ([#17347](https://github.com/RocketChat/Rocket.Chat/pull/17347)) + +- Administration -> Mailer Rewrite. ([#17191](https://github.com/RocketChat/Rocket.Chat/pull/17191)) + +- Administration Pages root rewritten ([#17209](https://github.com/RocketChat/Rocket.Chat/pull/17209)) + +- Change the SAML metadata order to conform to XSD specification ([#15488](https://github.com/RocketChat/Rocket.Chat/pull/15488) by [@fcrespo82](https://github.com/fcrespo82)) + +- Filter markdown in notifications ([#9995](https://github.com/RocketChat/Rocket.Chat/pull/9995) by [@c0dzilla](https://github.com/c0dzilla)) + +- Increase decoupling between React components and Blaze templates ([#16642](https://github.com/RocketChat/Rocket.Chat/pull/16642)) + +- Move CSS imports to `/app` modules ([#17261](https://github.com/RocketChat/Rocket.Chat/pull/17261)) + +- Redesign Administration > Import ([#17289](https://github.com/RocketChat/Rocket.Chat/pull/17289)) + +- User gets UI feedback when message is pinned or unpinned ([#16056](https://github.com/RocketChat/Rocket.Chat/pull/16056) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +### 🐛 Bug fixes + + +- "Invalid Invite" message when registration is disabled ([#17226](https://github.com/RocketChat/Rocket.Chat/pull/17226)) + +- 2FA not showing codes for Spanish translation ([#17378](https://github.com/RocketChat/Rocket.Chat/pull/17378) by [@RavenSystem](https://github.com/RavenSystem)) + +- 404 error when clicking an username ([#17275](https://github.com/RocketChat/Rocket.Chat/pull/17275)) + +- Admin panel custom sounds, multiple sound playback fix and added single play/pause button ([#16215](https://github.com/RocketChat/Rocket.Chat/pull/16215) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Allow Screensharing in BBB Iframe ([#17290](https://github.com/RocketChat/Rocket.Chat/pull/17290) by [@wolbernd](https://github.com/wolbernd)) + +- Avatar on sidebar when showing real names ([#17286](https://github.com/RocketChat/Rocket.Chat/pull/17286)) + +- Can not save Unread Tray Icon Alert user preference ([#16313](https://github.com/RocketChat/Rocket.Chat/pull/16313) by [@taiju271](https://github.com/taiju271)) + +- Change wording to start DM from info panel ([#8799](https://github.com/RocketChat/Rocket.Chat/pull/8799)) + +- CSV Importer fails when there are no users to import ([#16790](https://github.com/RocketChat/Rocket.Chat/pull/16790)) + +- Directory default tab ([#17283](https://github.com/RocketChat/Rocket.Chat/pull/17283)) + +- Discussions created from inside DMs were not working and some errors accessing recently created rooms ([#17282](https://github.com/RocketChat/Rocket.Chat/pull/17282)) + +- Email not verified message ([#16236](https://github.com/RocketChat/Rocket.Chat/pull/16236)) + +- Fixed email sort button in directory -> users ([#16606](https://github.com/RocketChat/Rocket.Chat/pull/16606) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Global event click-message-link not fired ([#16771](https://github.com/RocketChat/Rocket.Chat/pull/16771)) + +- Import slack's multiple direct messages as direct rooms instead of private groups ([#17206](https://github.com/RocketChat/Rocket.Chat/pull/17206)) + +- In Create a New Channel, input should be focused on channel name instead of invite users ([#16405](https://github.com/RocketChat/Rocket.Chat/pull/16405) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- LDAP users lose session on refresh ([#17302](https://github.com/RocketChat/Rocket.Chat/pull/17302)) + +- No maxlength(120) defined for custom user status ([#16534](https://github.com/RocketChat/Rocket.Chat/pull/16534) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Omnichannel SMS / WhatsApp integration errors due to missing location data ([#17288](https://github.com/RocketChat/Rocket.Chat/pull/17288)) + +- Popover component doesn't have scroll ([#17198](https://github.com/RocketChat/Rocket.Chat/pull/17198) by [@Nikhil713](https://github.com/Nikhil713)) + +- Prevent user from getting stuck on login, if there is some bad fname ([#17331](https://github.com/RocketChat/Rocket.Chat/pull/17331)) + +- Red color error outline is not removed after password update on profile details ([#16536](https://github.com/RocketChat/Rocket.Chat/pull/16536) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Remove properties from users.info response ([#17238](https://github.com/RocketChat/Rocket.Chat/pull/17238)) + +- SAML assertion signature enforcement ([#17278](https://github.com/RocketChat/Rocket.Chat/pull/17278)) + +- SAML Idp Initiated Logout Error ([#17324](https://github.com/RocketChat/Rocket.Chat/pull/17324)) + +- Search valid for emoji with dual name ([#16887](https://github.com/RocketChat/Rocket.Chat/pull/16887) by [@subham103](https://github.com/subham103)) + +- Show active admin and user account menu item ([#17047](https://github.com/RocketChat/Rocket.Chat/pull/17047) by [@hullen](https://github.com/hullen)) + +- Spotify embed and collapsed ([#17356](https://github.com/RocketChat/Rocket.Chat/pull/17356) by [@ffauvel](https://github.com/ffauvel)) + +- Threads: Hide Usernames hides Full names. ([#16959](https://github.com/RocketChat/Rocket.Chat/pull/16959)) + +- Translation for nl ([#16742](https://github.com/RocketChat/Rocket.Chat/pull/16742) by [@CC007](https://github.com/CC007)) + +- Unsafe React portals mount/unmount ([#17265](https://github.com/RocketChat/Rocket.Chat/pull/17265)) + +- Update ru.i18n.json ([#16869](https://github.com/RocketChat/Rocket.Chat/pull/16869) by [@1rV1N-git](https://github.com/1rV1N-git)) + +- User search on directory not working correctly ([#17299](https://github.com/RocketChat/Rocket.Chat/pull/17299)) + +- Variable rendering problem on Import recent history page ([#15997](https://github.com/RocketChat/Rocket.Chat/pull/15997) by [@ritwizsinha](https://github.com/ritwizsinha)) + +
+🔍 Minor changes + + +- [CHORE] Move polyfills to client/ ([#17266](https://github.com/RocketChat/Rocket.Chat/pull/17266)) + +- Apply $and helper to message template ([#17280](https://github.com/RocketChat/Rocket.Chat/pull/17280)) + +- Bump https-proxy-agent from 2.2.1 to 2.2.4 ([#17323](https://github.com/RocketChat/Rocket.Chat/pull/17323) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Complement Guest role restrictions for Enterprise ([#17393](https://github.com/RocketChat/Rocket.Chat/pull/17393)) + +- Fix moving-to-a-single-codebase link in README ([#17297](https://github.com/RocketChat/Rocket.Chat/pull/17297) by [@Krinkle](https://github.com/Krinkle)) + +- Improve: Better Push Notification code ([#17338](https://github.com/RocketChat/Rocket.Chat/pull/17338)) + +- LingoHub based on develop ([#17365](https://github.com/RocketChat/Rocket.Chat/pull/17365)) + +- LingoHub based on develop ([#17274](https://github.com/RocketChat/Rocket.Chat/pull/17274)) + +- Mailer Scrollbar ([#17322](https://github.com/RocketChat/Rocket.Chat/pull/17322)) + +- Merge master into develop & Set version to 3.2.0-develop ([#17241](https://github.com/RocketChat/Rocket.Chat/pull/17241) by [@1rV1N-git](https://github.com/1rV1N-git)) + +- New hooks for RouterContext ([#17305](https://github.com/RocketChat/Rocket.Chat/pull/17305)) + +- Regression: Import data pagination ([#17355](https://github.com/RocketChat/Rocket.Chat/pull/17355)) + +- Regression: Storybook ([#17321](https://github.com/RocketChat/Rocket.Chat/pull/17321)) + +- Release 3.1.2 ([#17454](https://github.com/RocketChat/Rocket.Chat/pull/17454) by [@fastrde](https://github.com/fastrde)) + +- Remove `@typescript-eslint/explicit-function-return-type` rule ([#17428](https://github.com/RocketChat/Rocket.Chat/pull/17428)) + +- Remove set as alias setting ([#16343](https://github.com/RocketChat/Rocket.Chat/pull/16343)) + +- Static props for Administration route components ([#17285](https://github.com/RocketChat/Rocket.Chat/pull/17285)) + +- Update Apps-Engine to stable version ([#17287](https://github.com/RocketChat/Rocket.Chat/pull/17287)) + +- Upgrade file storage packages ([#17107](https://github.com/RocketChat/Rocket.Chat/pull/17107)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@1rV1N-git](https://github.com/1rV1N-git) +- [@CC007](https://github.com/CC007) +- [@Krinkle](https://github.com/Krinkle) +- [@Nikhil713](https://github.com/Nikhil713) +- [@RavenSystem](https://github.com/RavenSystem) +- [@aKn1ghtOut](https://github.com/aKn1ghtOut) +- [@ashwaniYDV](https://github.com/ashwaniYDV) +- [@benkroeger](https://github.com/benkroeger) +- [@c0dzilla](https://github.com/c0dzilla) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@fastrde](https://github.com/fastrde) +- [@fcrespo82](https://github.com/fcrespo82) +- [@felipecrp](https://github.com/felipecrp) +- [@ffauvel](https://github.com/ffauvel) +- [@hullen](https://github.com/hullen) +- [@john08burke](https://github.com/john08burke) +- [@lolimay](https://github.com/lolimay) +- [@lpilz](https://github.com/lpilz) +- [@ritwizsinha](https://github.com/ritwizsinha) +- [@subham103](https://github.com/subham103) +- [@taiju271](https://github.com/taiju271) +- [@wolbernd](https://github.com/wolbernd) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@alansikora](https://github.com/alansikora) +- [@d-gubert](https://github.com/d-gubert) +- [@gabriellsh](https://github.com/gabriellsh) +- [@ggazzo](https://github.com/ggazzo) +- [@marceloschmidt](https://github.com/marceloschmidt) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 3.1.3 +`2020-05-11 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Email configs not updating after setting changes ([#17578](https://github.com/RocketChat/Rocket.Chat/pull/17578)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@rodrigok](https://github.com/rodrigok) + +# 3.1.2 +`2020-04-27 · 8 🐛 · 3 🔍 · 5 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Allowing blocking a user on channels ([#17406](https://github.com/RocketChat/Rocket.Chat/pull/17406)) + +- Bot Agents not being able to get Omnichannel Inquiries ([#17404](https://github.com/RocketChat/Rocket.Chat/pull/17404)) + +- Empty Incoming webhook script field ([#17422](https://github.com/RocketChat/Rocket.Chat/pull/17422)) + +- LDAP error when trying to add room with spaces in the name ([#17453](https://github.com/RocketChat/Rocket.Chat/pull/17453)) + +- LDAP Sync error ([#17417](https://github.com/RocketChat/Rocket.Chat/pull/17417) by [@fastrde](https://github.com/fastrde)) + +- New user added by admin doesn't receive random password email ([#17249](https://github.com/RocketChat/Rocket.Chat/pull/17249)) + +- Omnichannel room info panel opening whenever a message is sent ([#17348](https://github.com/RocketChat/Rocket.Chat/pull/17348)) + +- Web Client memory leak caused by the Emoji rendering ([#17320](https://github.com/RocketChat/Rocket.Chat/pull/17320)) + +
+🔍 Minor changes + + +- Regression: Add missing cacheKey to mem ([#17430](https://github.com/RocketChat/Rocket.Chat/pull/17430)) + +- Regression: Fix mem usage with more than one argument ([#17391](https://github.com/RocketChat/Rocket.Chat/pull/17391)) + +- Release 3.1.2 ([#17454](https://github.com/RocketChat/Rocket.Chat/pull/17454) by [@fastrde](https://github.com/fastrde)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@fastrde](https://github.com/fastrde) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.1.1 +`2020-04-14 · 8 🐛 · 1 🔍 · 6 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- 404 error when clicking an username ([#17275](https://github.com/RocketChat/Rocket.Chat/pull/17275)) + +- Avatar on sidebar when showing real names ([#17286](https://github.com/RocketChat/Rocket.Chat/pull/17286)) + +- Directory default tab ([#17283](https://github.com/RocketChat/Rocket.Chat/pull/17283)) + +- Discussions created from inside DMs were not working and some errors accessing recently created rooms ([#17282](https://github.com/RocketChat/Rocket.Chat/pull/17282)) + +- LDAP users lose session on refresh ([#17302](https://github.com/RocketChat/Rocket.Chat/pull/17302)) + +- Omnichannel SMS / WhatsApp integration errors due to missing location data ([#17288](https://github.com/RocketChat/Rocket.Chat/pull/17288)) + +- SAML assertion signature enforcement ([#17278](https://github.com/RocketChat/Rocket.Chat/pull/17278)) + +- User search on directory not working correctly ([#17299](https://github.com/RocketChat/Rocket.Chat/pull/17299)) + +
+🔍 Minor changes + + +- Update Apps-Engine to stable version ([#17287](https://github.com/RocketChat/Rocket.Chat/pull/17287)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@ggazzo](https://github.com/ggazzo) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.1.0 +`2020-04-09 · 23 🎉 · 22 🚀 · 71 🐛 · 86 🔍 · 41 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.16.1` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🎉 New features + + +- **ENTERPRISE:** Engagement Dashboard ([#16960](https://github.com/RocketChat/Rocket.Chat/pull/16960)) + +- Add default chat closing tags in Omnichannel departments ([#16859](https://github.com/RocketChat/Rocket.Chat/pull/16859)) + +- Add omnichannel external frame feature ([#17038](https://github.com/RocketChat/Rocket.Chat/pull/17038)) + +- Add update method for user bridge ([#17077](https://github.com/RocketChat/Rocket.Chat/pull/17077)) + +- Allow to set default department and location sharing on SMS / WhatsApp integration ([#16557](https://github.com/RocketChat/Rocket.Chat/pull/16557)) + +- API `users.deactivateIdle` for mass-disabling of idle users ([#16849](https://github.com/RocketChat/Rocket.Chat/pull/16849)) + +- API `users.logoutOtherClient` to logout from other locations ([#16193](https://github.com/RocketChat/Rocket.Chat/pull/16193) by [@jschirrmacher](https://github.com/jschirrmacher)) + +- Direct message between multiple users ([#16761](https://github.com/RocketChat/Rocket.Chat/pull/16761)) + +- Directory page refactored, new user's bio field ([#17043](https://github.com/RocketChat/Rocket.Chat/pull/17043)) + +- Enterprise Edition ([#16944](https://github.com/RocketChat/Rocket.Chat/pull/16944)) + +- Experimental Game Center (externalComponents implementation) ([#15123](https://github.com/RocketChat/Rocket.Chat/pull/15123) by [@lolimay](https://github.com/lolimay)) + +- Home button on sidebar ([#17052](https://github.com/RocketChat/Rocket.Chat/pull/17052)) + +- Merge Sort List and View Mode menus and improve its UI/UX ([#17103](https://github.com/RocketChat/Rocket.Chat/pull/17103)) + + ![image](https://user-images.githubusercontent.com/5263975/78036622-e8db2a80-7340-11ea-91d0-65728eabdcb6.png) + +- Open the Visitor Info panel automatically when the agent enters an Omnichannel room ([#16496](https://github.com/RocketChat/Rocket.Chat/pull/16496)) + +- Route to get updated roles after a date ([#16610](https://github.com/RocketChat/Rocket.Chat/pull/16610) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- SAML config to allow clock drift ([#16751](https://github.com/RocketChat/Rocket.Chat/pull/16751) by [@localguru](https://github.com/localguru)) + +- Save default filters in the Omnichannel Current Chats list ([#16653](https://github.com/RocketChat/Rocket.Chat/pull/16653)) + +- Settings to enable E2E encryption for Private and Direct Rooms by default ([#16928](https://github.com/RocketChat/Rocket.Chat/pull/16928)) + +- Sort channel directory listing by latest message ([#16604](https://github.com/RocketChat/Rocket.Chat/pull/16604) by [@subham103](https://github.com/subham103)) + +- Synchronize saml roles to local user (#16152) ([#16158](https://github.com/RocketChat/Rocket.Chat/pull/16158) by [@col-panic](https://github.com/col-panic)) + +- Translation via MS translate ([#16363](https://github.com/RocketChat/Rocket.Chat/pull/16363) by [@mrsimpson](https://github.com/mrsimpson)) + + Adds Microsoft's translation service (https://translator.microsoft.com/) as a provider for translation of messages. + In addition to implementing the interface (similar to google and DeepL), a small change has been done in order to display the translation provider on the UI. + +- Two Factor authentication via email ([#15949](https://github.com/RocketChat/Rocket.Chat/pull/15949)) + +- Update Meteor to 1.9.2 and Node to 12.16.1 ([#16718](https://github.com/RocketChat/Rocket.Chat/pull/16718)) + +### 🚀 Improvements + + +- Ability to change offline message button link on emails notifications ([#16784](https://github.com/RocketChat/Rocket.Chat/pull/16784)) + +- Accept open formarts of text, spreadsheet, presentation for upload by default ([#16502](https://github.com/RocketChat/Rocket.Chat/pull/16502)) + +- Add option to require authentication on user's shield endpoint ([#16845](https://github.com/RocketChat/Rocket.Chat/pull/16845)) + +- Added autofocus to Directory ([#16217](https://github.com/RocketChat/Rocket.Chat/pull/16217) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Added timer in video message recorder ([#16221](https://github.com/RocketChat/Rocket.Chat/pull/16221) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Allow login of non LDAP users when LDAP is enabled ([#16949](https://github.com/RocketChat/Rocket.Chat/pull/16949)) + +- Apps Engine: Reduce some stream calls and remove a find user from the app's status changes ([#17115](https://github.com/RocketChat/Rocket.Chat/pull/17115)) + +- Change sidebar sort mode to activity by default ([#17189](https://github.com/RocketChat/Rocket.Chat/pull/17189)) + +- Contextual bar autofocus ([#16915](https://github.com/RocketChat/Rocket.Chat/pull/16915)) + +- Displays `Nothing found` on admin sidebar when search returns nothing ([#16255](https://github.com/RocketChat/Rocket.Chat/pull/16255) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Fallback content-type as application/octet-stream for FileSystem uploads ([#16776](https://github.com/RocketChat/Rocket.Chat/pull/16776) by [@georgmu](https://github.com/georgmu)) + +- First data load from existing data on engagement dashboard ([#17035](https://github.com/RocketChat/Rocket.Chat/pull/17035)) + +- Increase the push throughput to prevent queuing ([#17194](https://github.com/RocketChat/Rocket.Chat/pull/17194)) + +- Omnichannel aggregations performance improvements ([#16755](https://github.com/RocketChat/Rocket.Chat/pull/16755)) + +- Removed the 'reply in thread' from thread replies ([#16630](https://github.com/RocketChat/Rocket.Chat/pull/16630) by [@ritwizsinha](https://github.com/ritwizsinha)) + +- Rename client-side term "Livechat" to "Omnichannel" ([#16752](https://github.com/RocketChat/Rocket.Chat/pull/16752)) + +- Repeat “Reply In Thread” and “Add Reaction” inside the message actions menu ([#17073](https://github.com/RocketChat/Rocket.Chat/pull/17073)) + +- Replace the Department select component by an Autocomplete input in Omnichannel UI ([#16669](https://github.com/RocketChat/Rocket.Chat/pull/16669)) + +- Send files over REST API ([#16617](https://github.com/RocketChat/Rocket.Chat/pull/16617)) + +- Tab Bar actions reorder ([#17072](https://github.com/RocketChat/Rocket.Chat/pull/17072)) + +- Use `rocket.cat` as default bot If `InternalHubot_Username` is undefined ([#16371](https://github.com/RocketChat/Rocket.Chat/pull/16371) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- User gets feedback when a message has been starred or unstarred ([#13860](https://github.com/RocketChat/Rocket.Chat/pull/13860) by [@fliptrail](https://github.com/fliptrail)) + +### 🐛 Bug fixes + + +- "Jump to message" is rendered twice when message is starred. ([#16170](https://github.com/RocketChat/Rocket.Chat/pull/16170) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- `users.setStatus` API was ignoring the user from params when trying to set status of other users ([#16128](https://github.com/RocketChat/Rocket.Chat/pull/16128) by [@rm-yakovenko](https://github.com/rm-yakovenko)) + +- Additional scroll when contextual bar is open ([#16667](https://github.com/RocketChat/Rocket.Chat/pull/16667)) + +- Admin height if the blue banner is opened ([#16629](https://github.com/RocketChat/Rocket.Chat/pull/16629)) + +- Admins can't sort users by email in directory view ([#15796](https://github.com/RocketChat/Rocket.Chat/pull/15796) by [@sneakson](https://github.com/sneakson)) + +- Ancestral departments were not updated when an Omnichannel room is forwarded to another department ([#16958](https://github.com/RocketChat/Rocket.Chat/pull/16958)) + +- Block user option inside admin view ([#16626](https://github.com/RocketChat/Rocket.Chat/pull/16626)) + +- Cannot edit Profile when Full Name is empty and not required ([#16744](https://github.com/RocketChat/Rocket.Chat/pull/16744)) + +- Cannot pin on direct messages ([#16759](https://github.com/RocketChat/Rocket.Chat/pull/16759) by [@ritwizsinha](https://github.com/ritwizsinha)) + +- Cannot unfollow message from thread's panel ([#16560](https://github.com/RocketChat/Rocket.Chat/pull/16560) by [@subham103](https://github.com/subham103)) + +- CAS ignores username attribute map ([#16942](https://github.com/RocketChat/Rocket.Chat/pull/16942) by [@pmayer](https://github.com/pmayer)) + +- Check agent status when starting a new conversation with an agent assigned ([#16618](https://github.com/RocketChat/Rocket.Chat/pull/16618)) + +- Clear unread red line when the ESC key is pressed ([#16668](https://github.com/RocketChat/Rocket.Chat/pull/16668)) + +- Color setting editing issues ([#16706](https://github.com/RocketChat/Rocket.Chat/pull/16706)) + +- Custom OAuth Bug ([#16811](https://github.com/RocketChat/Rocket.Chat/pull/16811)) + +- Data converters overriding fields added by apps ([#16639](https://github.com/RocketChat/Rocket.Chat/pull/16639)) + +- Deleting messages while searching causes the whole room chat to disappear ([#16568](https://github.com/RocketChat/Rocket.Chat/pull/16568) by [@karimelghazouly](https://github.com/karimelghazouly)) + +- Discussions were not inheriting the public status of parent's channel ([#17070](https://github.com/RocketChat/Rocket.Chat/pull/17070)) + +- Display user status along with icon ([#16875](https://github.com/RocketChat/Rocket.Chat/pull/16875) by [@Nikhil713](https://github.com/Nikhil713)) + +- Emit livechat events to instace only ([#17086](https://github.com/RocketChat/Rocket.Chat/pull/17086)) + +- Error when websocket received status update event ([#17089](https://github.com/RocketChat/Rocket.Chat/pull/17089)) + +- Explicitly set text of confirmation button ([#16138](https://github.com/RocketChat/Rocket.Chat/pull/16138) by [@jschirrmacher](https://github.com/jschirrmacher)) + +- Facebook integration missing visitor data after registerGuest ([#16810](https://github.com/RocketChat/Rocket.Chat/pull/16810) by [@antkaz](https://github.com/antkaz)) + +- Federation delete room event not being dispatched ([#16861](https://github.com/RocketChat/Rocket.Chat/pull/16861) by [@1rV1N-git](https://github.com/1rV1N-git)) + +- Federation Event ROOM_ADD_USER not being dispatched ([#16878](https://github.com/RocketChat/Rocket.Chat/pull/16878) by [@1rV1N-git](https://github.com/1rV1N-git)) + +- File uploads out of threads are not visible in regular message view ([#16416](https://github.com/RocketChat/Rocket.Chat/pull/16416) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Flextab information is not working when clicking on visitor or agent username in Omnichannel messages ([#16797](https://github.com/RocketChat/Rocket.Chat/pull/16797) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- ie11 support ([#16682](https://github.com/RocketChat/Rocket.Chat/pull/16682)) + +- Integrations page pagination ([#16838](https://github.com/RocketChat/Rocket.Chat/pull/16838)) + +- Invite links counting users already joined ([#16591](https://github.com/RocketChat/Rocket.Chat/pull/16591) by [@ritwizsinha](https://github.com/ritwizsinha)) + +- Keeps the agent in the room after accepting a new Omnichannel request ([#16787](https://github.com/RocketChat/Rocket.Chat/pull/16787)) + +- Language country has been ignored on translation load ([#16757](https://github.com/RocketChat/Rocket.Chat/pull/16757)) + + Languages including country variations like `pt-BR` were ignoring the country party because the user's preference has been saved in lowercase `pt-br` causing the language to not match the available languages. Now we enforce the uppercase of the country part when loading the language. + +- LDAP sync admin action was not syncing existent users ([#16671](https://github.com/RocketChat/Rocket.Chat/pull/16671)) + +- livechat/rooms endpoint not working with big amount of livechats ([#16623](https://github.com/RocketChat/Rocket.Chat/pull/16623)) + +- Login with LinkedIn not mapping name and picture correctly ([#16955](https://github.com/RocketChat/Rocket.Chat/pull/16955)) + +- Manual Register use correct state for determining registered ([#16726](https://github.com/RocketChat/Rocket.Chat/pull/16726)) + +- Member's list only filtering users already on screen ([#17110](https://github.com/RocketChat/Rocket.Chat/pull/17110)) + +- Messages doesn't send to Slack via SlackBridge after renaming channel ([#16565](https://github.com/RocketChat/Rocket.Chat/pull/16565) by [@antkaz](https://github.com/antkaz)) + +- Omnichannel endpoint `inquiries.getOne` returning only queued inquiries ([#17132](https://github.com/RocketChat/Rocket.Chat/pull/17132)) + +- Omnichannel Inquiry names not being updated when the guest name changes ([#16782](https://github.com/RocketChat/Rocket.Chat/pull/16782)) + +- Omnichannel Inquiry queues when removing chats ([#16603](https://github.com/RocketChat/Rocket.Chat/pull/16603)) + +- Option BYPASS_OPLOG_VALIDATION not working ([#17143](https://github.com/RocketChat/Rocket.Chat/pull/17143)) + +- Pinned messages wouldn't collapse ([#16188](https://github.com/RocketChat/Rocket.Chat/pull/16188)) + +- Pressing Cancel while 'deleting by edit' message blocks sending messages ([#16315](https://github.com/RocketChat/Rocket.Chat/pull/16315) by [@ritwizsinha](https://github.com/ritwizsinha)) + +- Prune message saying `files deleted` and `messages deleted` even when singular message or file in prune ([#16322](https://github.com/RocketChat/Rocket.Chat/pull/16322) by [@ritwizsinha](https://github.com/ritwizsinha)) + +- Public channel cannot be accessed via URL when 'Allow Anonymous Read' is active ([#16914](https://github.com/RocketChat/Rocket.Chat/pull/16914) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Race conditions on/before login ([#16989](https://github.com/RocketChat/Rocket.Chat/pull/16989)) + +- Random errors on SAML logout ([#17227](https://github.com/RocketChat/Rocket.Chat/pull/17227)) + +- Real-time data rendering on Omnichannel room info panel ([#16783](https://github.com/RocketChat/Rocket.Chat/pull/16783)) + +- Regression: Jitsi on external window infinite loop ([#16625](https://github.com/RocketChat/Rocket.Chat/pull/16625)) + +- Regression: New 'app' role with no permissions when updating to 3.0.0 ([#16637](https://github.com/RocketChat/Rocket.Chat/pull/16637)) + +- Remove Reply in DM from Omnichannel rooms ([#16957](https://github.com/RocketChat/Rocket.Chat/pull/16957) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Remove spaces from i18n placeholders to show Personal access token ([#16724](https://github.com/RocketChat/Rocket.Chat/pull/16724) by [@harakiwi1](https://github.com/harakiwi1)) + +- Rocket.Chat takes too long to set the username when it fails to send enrollment email ([#16723](https://github.com/RocketChat/Rocket.Chat/pull/16723)) + +- Room event emitter passing an invalid parameter when finding removed subscriptions ([#17224](https://github.com/RocketChat/Rocket.Chat/pull/17224)) + +- SAML login errors not showing on UI ([#17219](https://github.com/RocketChat/Rocket.Chat/pull/17219)) + +- Show error message if password and confirm password not equal ([#16247](https://github.com/RocketChat/Rocket.Chat/pull/16247) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Slackbridge-import command doesn't work ([#16645](https://github.com/RocketChat/Rocket.Chat/pull/16645) by [@antkaz](https://github.com/antkaz)) + +- SlackBridge: Get all channels from Slack via REST API ([#16767](https://github.com/RocketChat/Rocket.Chat/pull/16767) by [@antkaz](https://github.com/antkaz)) + +- Slash command preview: Wrong item being selected, Horizontal scroll ([#16750](https://github.com/RocketChat/Rocket.Chat/pull/16750)) + +- Text formatted to remain within button even on screen resize ([#14136](https://github.com/RocketChat/Rocket.Chat/pull/14136)) + +- There is no option to pin a thread message by admin ([#16457](https://github.com/RocketChat/Rocket.Chat/pull/16457) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- TypeError when trying to load avatar of an invalid room. ([#16699](https://github.com/RocketChat/Rocket.Chat/pull/16699)) + +- UiKit not updating new actionIds received as responses from actions ([#16624](https://github.com/RocketChat/Rocket.Chat/pull/16624)) + +- users.info endpoint not handling the error if the user does not exist ([#16495](https://github.com/RocketChat/Rocket.Chat/pull/16495)) + +- Verification email body ([#17062](https://github.com/RocketChat/Rocket.Chat/pull/17062) by [@GOVINDDIXIT](https://github.com/GOVINDDIXIT)) + +- WebRTC echo while talking ([#17145](https://github.com/RocketChat/Rocket.Chat/pull/17145) by [@1rV1N-git](https://github.com/1rV1N-git) & [@ndroo](https://github.com/ndroo)) + +- When trying to quote messages inside threads the quote would be sent to room instead to the thread ([#16925](https://github.com/RocketChat/Rocket.Chat/pull/16925)) + +- Wrong message count statistics in Admin info page ([#16680](https://github.com/RocketChat/Rocket.Chat/pull/16680) by [@subham103](https://github.com/subham103)) + +- Wrong SAML Response Signature Validation ([#16922](https://github.com/RocketChat/Rocket.Chat/pull/16922)) + +- Wrong thread messages display in contextual bar ([#16835](https://github.com/RocketChat/Rocket.Chat/pull/16835) by [@ritwizsinha](https://github.com/ritwizsinha)) + +
+🔍 Minor changes + + +- [Apps] Lazy load categories and marketplaceVersion in admin - apps page ([#16258](https://github.com/RocketChat/Rocket.Chat/pull/16258) by [@lolimay](https://github.com/lolimay)) + +- [CHORE] Changed remaining SelectInput's to Select ([#16719](https://github.com/RocketChat/Rocket.Chat/pull/16719)) + +- [CHORE] Look for Storybook stories on `app/` too ([#16595](https://github.com/RocketChat/Rocket.Chat/pull/16595)) + +- [CHORE] Update snap install instructions ([#16720](https://github.com/RocketChat/Rocket.Chat/pull/16720)) + +- [CHORE] Use REST API for sending audio messages ([#17237](https://github.com/RocketChat/Rocket.Chat/pull/17237)) + +- Add an index to the name field for omnichannel department ([#16953](https://github.com/RocketChat/Rocket.Chat/pull/16953)) + +- Add Enterprise Edition license ([#16801](https://github.com/RocketChat/Rocket.Chat/pull/16801)) + +- Add lint to `.less` files ([#16893](https://github.com/RocketChat/Rocket.Chat/pull/16893)) + +- Add methods to include room types on dashboard ([#16576](https://github.com/RocketChat/Rocket.Chat/pull/16576)) + +- Add new Omnichannel department forwarding callback ([#16779](https://github.com/RocketChat/Rocket.Chat/pull/16779)) + +- Add some missing ES translations ([#16120](https://github.com/RocketChat/Rocket.Chat/pull/16120) by [@ivanape](https://github.com/ivanape)) + +- Add statistics and metrics about push queue ([#17208](https://github.com/RocketChat/Rocket.Chat/pull/17208)) + +- Add User’s index for field `appId` ([#17075](https://github.com/RocketChat/Rocket.Chat/pull/17075)) + +- Add wrapper to make Meteor methods calls over REST ([#17092](https://github.com/RocketChat/Rocket.Chat/pull/17092)) + +- Added border to page header ([#16792](https://github.com/RocketChat/Rocket.Chat/pull/16792)) + +- Bump acorn from 6.0.7 to 6.4.1 ([#16876](https://github.com/RocketChat/Rocket.Chat/pull/16876) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Change license version requested ([#16956](https://github.com/RocketChat/Rocket.Chat/pull/16956)) + +- Changed Opt_In message, removed translations ([#16631](https://github.com/RocketChat/Rocket.Chat/pull/16631)) + +- Collect metrics about meteor facts ([#17216](https://github.com/RocketChat/Rocket.Chat/pull/17216)) + +- Fix Docker preview image ([#16736](https://github.com/RocketChat/Rocket.Chat/pull/16736)) + +- Fix self DMs created during release candidate ([#17239](https://github.com/RocketChat/Rocket.Chat/pull/17239)) + +- Fix StreamCast info ([#16995](https://github.com/RocketChat/Rocket.Chat/pull/16995)) + +- Fix: 2FA DDP method not getting code on API call that doesn’t requires 2FA ([#16998](https://github.com/RocketChat/Rocket.Chat/pull/16998)) + +- fix: add option to mount media on snap ([#13591](https://github.com/RocketChat/Rocket.Chat/pull/13591) by [@knrt10](https://github.com/knrt10)) + +- Fix: Adding margin to click to load text ([#16210](https://github.com/RocketChat/Rocket.Chat/pull/16210) by [@ritwizsinha](https://github.com/ritwizsinha)) + +- Fix: Console error on login ([#16704](https://github.com/RocketChat/Rocket.Chat/pull/16704)) + +- Fix: Correctly aligned input element of custom user status component ([#16151](https://github.com/RocketChat/Rocket.Chat/pull/16151) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Fix: Error message on startup of multiple instances related to the metrics’ server ([#17152](https://github.com/RocketChat/Rocket.Chat/pull/17152)) + +- Fix: Huge amount of hasLicense calls to the server ([#17169](https://github.com/RocketChat/Rocket.Chat/pull/17169)) + +- Fix: Last message of Group DMs not showing the sender ([#17059](https://github.com/RocketChat/Rocket.Chat/pull/17059)) + +- Fix: Make the AppLivechatBridge.createMessage works properly as a promise ([#16941](https://github.com/RocketChat/Rocket.Chat/pull/16941)) + +- Fix: Missing checks for Troubleshoot > Disable Notifications ([#17155](https://github.com/RocketChat/Rocket.Chat/pull/17155)) + +- Fix: Notifications of Group DM were not showing the room name ([#17058](https://github.com/RocketChat/Rocket.Chat/pull/17058)) + +- Fix: Padding required in the Facebook Messenger option in Livechat ([#16202](https://github.com/RocketChat/Rocket.Chat/pull/16202) by [@ritwizsinha](https://github.com/ritwizsinha)) + +- Fix: Removed some hardcoded texts ([#16304](https://github.com/RocketChat/Rocket.Chat/pull/16304) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Fix: StreamCast was not working correctly ([#16983](https://github.com/RocketChat/Rocket.Chat/pull/16983)) + +- Fixed Line break incorrectly being called apostrophe in code ([#16918](https://github.com/RocketChat/Rocket.Chat/pull/16918) by [@aKn1ghtOut](https://github.com/aKn1ghtOut)) + +- Fixed translate variable in UnarchiveRoom Modal ([#16310](https://github.com/RocketChat/Rocket.Chat/pull/16310) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Improve room types usage ([#16753](https://github.com/RocketChat/Rocket.Chat/pull/16753)) + +- Improve: Apps-engine E2E tests ([#16781](https://github.com/RocketChat/Rocket.Chat/pull/16781)) + +- LingoHub based on develop ([#16837](https://github.com/RocketChat/Rocket.Chat/pull/16837)) + +- LingoHub based on develop ([#16640](https://github.com/RocketChat/Rocket.Chat/pull/16640)) + +- Merge master into develop & Set version to 3.1.0-develop ([#16609](https://github.com/RocketChat/Rocket.Chat/pull/16609)) + +- Metrics: New metrics, performance and size improvements ([#17183](https://github.com/RocketChat/Rocket.Chat/pull/17183)) + +- New metric to track oplog queue ([#17142](https://github.com/RocketChat/Rocket.Chat/pull/17142)) + +- New Troubleshoot section for disabling features ([#17114](https://github.com/RocketChat/Rocket.Chat/pull/17114)) + +- Redirected to home when a room has been deleted instead of getting broken link(blank page) of deleted room ([#16227](https://github.com/RocketChat/Rocket.Chat/pull/16227) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Reduce notifyUser propagation ([#17088](https://github.com/RocketChat/Rocket.Chat/pull/17088)) + +- Regression: `users.setStatus` throwing an error if message is empty ([#17036](https://github.com/RocketChat/Rocket.Chat/pull/17036)) + +- Regression: Admin create user button ([#17186](https://github.com/RocketChat/Rocket.Chat/pull/17186)) + +- Regression: Block users was not possible for 1:1 DMs ([#17105](https://github.com/RocketChat/Rocket.Chat/pull/17105)) + +- Regression: Broken Search if users without DM subscriptions are listed ([#17074](https://github.com/RocketChat/Rocket.Chat/pull/17074)) + +- Regression: Can't login with 2FA over REST API when 2FA via Email is enabled ([#17128](https://github.com/RocketChat/Rocket.Chat/pull/17128) by [@djorkaeffalexandre](https://github.com/djorkaeffalexandre)) + +- Regression: Check Omnichannel routing system before emitting queue changes ([#17087](https://github.com/RocketChat/Rocket.Chat/pull/17087)) + +- Regression: Collapsible elements didn't respect attachment parameter. ([#16994](https://github.com/RocketChat/Rocket.Chat/pull/16994)) + +- Regression: Direct message creation by REST ([#17109](https://github.com/RocketChat/Rocket.Chat/pull/17109)) + +- Regression: Do not refresh statistics when opening the info panel ([#17060](https://github.com/RocketChat/Rocket.Chat/pull/17060)) + +- Regression: Files were been deleted when deleting users as last members of private rooms ([#17111](https://github.com/RocketChat/Rocket.Chat/pull/17111)) + +- Regression: Fix auditing for Multiple Direct Messages ([#17192](https://github.com/RocketChat/Rocket.Chat/pull/17192)) + +- Regression: Fix calling readmessage after mark as unread ([#17193](https://github.com/RocketChat/Rocket.Chat/pull/17193)) + +- Regression: fix design review of Directory ([#17133](https://github.com/RocketChat/Rocket.Chat/pull/17133)) + +- Regression: Fix engagement dashboard urls, fixing Flowrouter imports ([#17127](https://github.com/RocketChat/Rocket.Chat/pull/17127)) + +- Regression: fix fuselage import, remove directory css ([#17116](https://github.com/RocketChat/Rocket.Chat/pull/17116)) + +- Regression: Fix issue with opening rooms ([#17028](https://github.com/RocketChat/Rocket.Chat/pull/17028)) + +- Regression: Fix omnichannel icon missing on sidebar ([#16775](https://github.com/RocketChat/Rocket.Chat/pull/16775)) + +- Regression: Fix removing user not removing his 1-on-1 DMs ([#17057](https://github.com/RocketChat/Rocket.Chat/pull/17057)) + +- Regression: fix scroll after room loads ([#17188](https://github.com/RocketChat/Rocket.Chat/pull/17188)) + +- Regression: Fix users raw model ([#17204](https://github.com/RocketChat/Rocket.Chat/pull/17204)) + +- Regression: IE11 Support ([#17125](https://github.com/RocketChat/Rocket.Chat/pull/17125)) + +- Regression: Invite links working for group DMs ([#17056](https://github.com/RocketChat/Rocket.Chat/pull/17056)) + +- Regression: OmniChannel agent activity monitor was counting time wrongly ([#16979](https://github.com/RocketChat/Rocket.Chat/pull/16979)) + +- Regression: omnichannel manual queued sidebarlist ([#17048](https://github.com/RocketChat/Rocket.Chat/pull/17048)) + +- Regression: Omnichannel notification on new conversations displaying incorrect information ([#16346](https://github.com/RocketChat/Rocket.Chat/pull/16346)) + +- Regression: Overwrite model functions on EE only when license applied ([#17061](https://github.com/RocketChat/Rocket.Chat/pull/17061)) + +- Regression: Remove deprecated Omnichannel setting used to fetch the queue data through subscription ([#17017](https://github.com/RocketChat/Rocket.Chat/pull/17017)) + +- Regression: Remove old and closed Omnichannel inquiries ([#17113](https://github.com/RocketChat/Rocket.Chat/pull/17113)) + +- Regression: Replace the Omnichannel queue model observe with Stream ([#16999](https://github.com/RocketChat/Rocket.Chat/pull/16999)) + +- Regression: Show upload errors ([#16681](https://github.com/RocketChat/Rocket.Chat/pull/16681)) + +- Regression: Small fixes for Game Center ([#17018](https://github.com/RocketChat/Rocket.Chat/pull/17018)) + +- Regression: Wrong size of Directory search/sort icons and Sort Channels menu not showing on production build ([#17118](https://github.com/RocketChat/Rocket.Chat/pull/17118)) + +- Release 3.0.12 ([#17158](https://github.com/RocketChat/Rocket.Chat/pull/17158)) + +- Removing Trailing Space ([#16470](https://github.com/RocketChat/Rocket.Chat/pull/16470) by [@aryamanpuri](https://github.com/aryamanpuri)) + +- Single codebase announcement ([#17081](https://github.com/RocketChat/Rocket.Chat/pull/17081)) + +- Update cypress to version 4.0.2 ([#16685](https://github.com/RocketChat/Rocket.Chat/pull/16685)) + +- Update presence package ([#16786](https://github.com/RocketChat/Rocket.Chat/pull/16786)) + +- Upgrade Livechat Widget version to 1.4.0 ([#16950](https://github.com/RocketChat/Rocket.Chat/pull/16950)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@1rV1N-git](https://github.com/1rV1N-git) +- [@GOVINDDIXIT](https://github.com/GOVINDDIXIT) +- [@Nikhil713](https://github.com/Nikhil713) +- [@aKn1ghtOut](https://github.com/aKn1ghtOut) +- [@antkaz](https://github.com/antkaz) +- [@aryamanpuri](https://github.com/aryamanpuri) +- [@ashwaniYDV](https://github.com/ashwaniYDV) +- [@col-panic](https://github.com/col-panic) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@djorkaeffalexandre](https://github.com/djorkaeffalexandre) +- [@fliptrail](https://github.com/fliptrail) +- [@georgmu](https://github.com/georgmu) +- [@harakiwi1](https://github.com/harakiwi1) +- [@ivanape](https://github.com/ivanape) +- [@jschirrmacher](https://github.com/jschirrmacher) +- [@karimelghazouly](https://github.com/karimelghazouly) +- [@knrt10](https://github.com/knrt10) +- [@localguru](https://github.com/localguru) +- [@lolimay](https://github.com/lolimay) +- [@mrsimpson](https://github.com/mrsimpson) +- [@ndroo](https://github.com/ndroo) +- [@pmayer](https://github.com/pmayer) +- [@ritwizsinha](https://github.com/ritwizsinha) +- [@rm-yakovenko](https://github.com/rm-yakovenko) +- [@sneakson](https://github.com/sneakson) +- [@subham103](https://github.com/subham103) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@PrajvalRaval](https://github.com/PrajvalRaval) +- [@Rodriq](https://github.com/Rodriq) +- [@Sing-Li](https://github.com/Sing-Li) +- [@d-gubert](https://github.com/d-gubert) +- [@engelgabriel](https://github.com/engelgabriel) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@marceloschmidt](https://github.com/marceloschmidt) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 3.0.13 +`2020-05-11 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.14.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Email configs not updating after setting changes ([#17578](https://github.com/RocketChat/Rocket.Chat/pull/17578)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@rodrigok](https://github.com/rodrigok) + +# 3.0.12 +`2020-04-03 · 3 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.14.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +
+🔍 Minor changes + + +- Fix: Error message on startup of multiple instances related to the metrics’ server ([#17152](https://github.com/RocketChat/Rocket.Chat/pull/17152)) + +- Fix: Missing checks for Troubleshoot > Disable Notifications ([#17155](https://github.com/RocketChat/Rocket.Chat/pull/17155)) + +- Release 3.0.12 ([#17158](https://github.com/RocketChat/Rocket.Chat/pull/17158)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.0.11 +`2020-04-02 · 2 🐛 · 2 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.14.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Omnichannel endpoint `inquiries.getOne` returning only queued inquiries ([#17132](https://github.com/RocketChat/Rocket.Chat/pull/17132)) + +- Option BYPASS_OPLOG_VALIDATION not working ([#17143](https://github.com/RocketChat/Rocket.Chat/pull/17143)) + +
+🔍 Minor changes + + +- New metric to track oplog queue ([#17142](https://github.com/RocketChat/Rocket.Chat/pull/17142)) + +- Release 3.0.11 ([#17148](https://github.com/RocketChat/Rocket.Chat/pull/17148)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.0.10 +`2020-04-01 · 1 🚀 · 2 🐛 · 4 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.14.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🚀 Improvements + + +- Apps Engine: Reduce some stream calls and remove a find user from the app's status changes ([#17115](https://github.com/RocketChat/Rocket.Chat/pull/17115)) + +### 🐛 Bug fixes + + +- Federation delete room event not being dispatched ([#16861](https://github.com/RocketChat/Rocket.Chat/pull/16861) by [@1rV1N-git](https://github.com/1rV1N-git)) + +- Federation Event ROOM_ADD_USER not being dispatched ([#16878](https://github.com/RocketChat/Rocket.Chat/pull/16878) by [@1rV1N-git](https://github.com/1rV1N-git)) + +
+🔍 Minor changes + + +- Add User’s index for field `appId` ([#17075](https://github.com/RocketChat/Rocket.Chat/pull/17075)) + +- New Troubleshoot section for disabling features ([#17114](https://github.com/RocketChat/Rocket.Chat/pull/17114)) + +- Regression: Do not refresh statistics when opening the info panel ([#17060](https://github.com/RocketChat/Rocket.Chat/pull/17060)) + +- Release 3.0.10 ([#17126](https://github.com/RocketChat/Rocket.Chat/pull/17126) by [@1rV1N-git](https://github.com/1rV1N-git)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@1rV1N-git](https://github.com/1rV1N-git) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.0.9 +`2020-03-31 · 1 🐛 · 1 🔍 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.14.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Apps Engine notifyRoom sending notification to wrong users ([#17093](https://github.com/RocketChat/Rocket.Chat/pull/17093)) + +
+🔍 Minor changes + + +- Release 3.0.9 ([#17094](https://github.com/RocketChat/Rocket.Chat/pull/17094)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.0.8 +`2020-03-30 · 2 🐛 · 2 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.14.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Emit livechat events to instace only ([#17086](https://github.com/RocketChat/Rocket.Chat/pull/17086)) + +- Error when websocket received status update event ([#17089](https://github.com/RocketChat/Rocket.Chat/pull/17089)) + +
+🔍 Minor changes + + +- Reduce notifyUser propagation ([#17088](https://github.com/RocketChat/Rocket.Chat/pull/17088)) + +- Regression: Remove model observe that was used to control the status of the Omnichannel agents ([#17078](https://github.com/RocketChat/Rocket.Chat/pull/17078)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.0.7 +`2020-03-25 · 1 🔍 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.14.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +
+🔍 Minor changes + + +- Regression: Remove deprecated Omnichannel setting used to fetch the queue data through subscription ([#17017](https://github.com/RocketChat/Rocket.Chat/pull/17017)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@renatobecker](https://github.com/renatobecker) + +# 3.0.6 +`2020-03-25 · 1 🐛 · 1 🔍 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.14.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Keeps the agent in the room after accepting a new Omnichannel request ([#16787](https://github.com/RocketChat/Rocket.Chat/pull/16787)) + +
+🔍 Minor changes + + +- Regression: Replace the Omnichannel queue model observe with Stream ([#16999](https://github.com/RocketChat/Rocket.Chat/pull/16999)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@renatobecker](https://github.com/renatobecker) + +# 3.0.5 +`2020-03-24 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.14.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Race conditions on/before login ([#16989](https://github.com/RocketChat/Rocket.Chat/pull/16989)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.0.4 +`2020-03-16 · 1 🚀 · 2 🐛 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.14.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🚀 Improvements + + +- Send files over REST API ([#16617](https://github.com/RocketChat/Rocket.Chat/pull/16617)) + +### 🐛 Bug fixes + + +- Integrations page pagination ([#16838](https://github.com/RocketChat/Rocket.Chat/pull/16838)) + +- TypeError when trying to load avatar of an invalid room. ([#16699](https://github.com/RocketChat/Rocket.Chat/pull/16699)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.0.3 +`2020-03-02 · 5 🐛 · 5 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.14.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Check agent status when starting a new conversation with an agent assigned ([#16618](https://github.com/RocketChat/Rocket.Chat/pull/16618)) + +- Language country has been ignored on translation load ([#16757](https://github.com/RocketChat/Rocket.Chat/pull/16757)) + +- LDAP sync admin action was not syncing existent users ([#16671](https://github.com/RocketChat/Rocket.Chat/pull/16671)) + +- Manual Register use correct state for determining registered ([#16726](https://github.com/RocketChat/Rocket.Chat/pull/16726)) + +- Rocket.Chat takes too long to set the username when it fails to send enrollment email ([#16723](https://github.com/RocketChat/Rocket.Chat/pull/16723)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) + +# 3.0.2 +`2020-02-21 · 4 🐛 · 5 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.14.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Clear unread red line when the ESC key is pressed ([#16668](https://github.com/RocketChat/Rocket.Chat/pull/16668)) + +- ie11 support ([#16682](https://github.com/RocketChat/Rocket.Chat/pull/16682)) + +- Omnichannel Inquiry queues when removing chats ([#16603](https://github.com/RocketChat/Rocket.Chat/pull/16603)) + +- users.info endpoint not handling the error if the user does not exist ([#16495](https://github.com/RocketChat/Rocket.Chat/pull/16495)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@gabriellsh](https://github.com/gabriellsh) +- [@ggazzo](https://github.com/ggazzo) +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.0.1 +`2020-02-19 · 7 🐛 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.14.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Admin height if the blue banner is opened ([#16629](https://github.com/RocketChat/Rocket.Chat/pull/16629)) + +- Block user option inside admin view ([#16626](https://github.com/RocketChat/Rocket.Chat/pull/16626)) + +- Data converters overriding fields added by apps ([#16639](https://github.com/RocketChat/Rocket.Chat/pull/16639)) + +- livechat/rooms endpoint not working with big amount of livechats ([#16623](https://github.com/RocketChat/Rocket.Chat/pull/16623)) + +- Regression: Jitsi on external window infinite loop ([#16625](https://github.com/RocketChat/Rocket.Chat/pull/16625)) + +- Regression: New 'app' role with no permissions when updating to 3.0.0 ([#16637](https://github.com/RocketChat/Rocket.Chat/pull/16637)) + +- UiKit not updating new actionIds received as responses from actions ([#16624](https://github.com/RocketChat/Rocket.Chat/pull/16624)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@d-gubert](https://github.com/d-gubert) +- [@ggazzo](https://github.com/ggazzo) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 3.0.0 +`2020-02-14 · 7 ️️️⚠️ · 10 🎉 · 11 🚀 · 41 🐛 · 49 🔍 · 21 👩‍💻👨‍💻` + +### Engine versions +- Node: `12.14.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### ⚠️ BREAKING CHANGES + + +- Change apps/icon endpoint to return app's icon and use it to show on Ui Kit modal ([#16522](https://github.com/RocketChat/Rocket.Chat/pull/16522)) + +- Filter System messages per room ([#16369](https://github.com/RocketChat/Rocket.Chat/pull/16369) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- Hide system messages ([#16243](https://github.com/RocketChat/Rocket.Chat/pull/16243) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- Remove deprecated publications ([#16351](https://github.com/RocketChat/Rocket.Chat/pull/16351)) + +- Removed room counter from sidebar ([#16036](https://github.com/RocketChat/Rocket.Chat/pull/16036)) + +- TLS v1.0 and TLS v1.1 were disabled by due to NodeJS update to v12. You can still enable them by using flags like `--tls-min-v1.0` and `--tls-min-v1.1` + +- Upgrade to Meteor 1.9 and NodeJS 12 ([#16252](https://github.com/RocketChat/Rocket.Chat/pull/16252)) + +### 🎉 New features + + +- Add GUI for customFields in Omnichannel conversations ([#15840](https://github.com/RocketChat/Rocket.Chat/pull/15840) by [@antkaz](https://github.com/antkaz)) + +- Button to download admin server info ([#16059](https://github.com/RocketChat/Rocket.Chat/pull/16059)) + +- Check the Omnichannel service status per Department ([#16425](https://github.com/RocketChat/Rocket.Chat/pull/16425) by [@lolimay](https://github.com/lolimay)) + +- Create a user for the Apps during installation ([#15896](https://github.com/RocketChat/Rocket.Chat/pull/15896) by [@Cool-fire](https://github.com/Cool-fire) & [@lolimay](https://github.com/lolimay)) + +- Enforce plain text emails converting from HTML when no text version supplied ([#16063](https://github.com/RocketChat/Rocket.Chat/pull/16063)) + +- Setting to only send plain text emails ([#16065](https://github.com/RocketChat/Rocket.Chat/pull/16065)) + +- Setting Top navbar in embedded mode ([#16064](https://github.com/RocketChat/Rocket.Chat/pull/16064)) + +- Sort the Omnichannel Chat list according to the user preferences ([#16437](https://github.com/RocketChat/Rocket.Chat/pull/16437)) + +- UiKit - Interactive UI elements for Rocket.Chat Apps ([#16048](https://github.com/RocketChat/Rocket.Chat/pull/16048)) + +- update on mongo, node and caddy on snap ([#16167](https://github.com/RocketChat/Rocket.Chat/pull/16167)) + +### 🚀 Improvements + + +- Changes App user's status when the app was enabled/disabled ([#16392](https://github.com/RocketChat/Rocket.Chat/pull/16392) by [@lolimay](https://github.com/lolimay)) + +- Improve function to check if setting has changed ([#16181](https://github.com/RocketChat/Rocket.Chat/pull/16181)) + +- Log as info level when Method Rate Limiters are reached ([#16446](https://github.com/RocketChat/Rocket.Chat/pull/16446)) + +- Major overhaul on data importers ([#16279](https://github.com/RocketChat/Rocket.Chat/pull/16279)) + +- Prevent "App user" from being deleted by the admin ([#16373](https://github.com/RocketChat/Rocket.Chat/pull/16373) by [@lolimay](https://github.com/lolimay)) + +- Remove NRR ([#16071](https://github.com/RocketChat/Rocket.Chat/pull/16071)) + +- Request user presence on demand ([#16348](https://github.com/RocketChat/Rocket.Chat/pull/16348)) + +- Set the color of the cancel button on modals to #bdbebf for enhanced visibiity ([#15913](https://github.com/RocketChat/Rocket.Chat/pull/15913) by [@ritwizsinha](https://github.com/ritwizsinha)) + +- Show more information related to the Omnichannel room closing data ([#16414](https://github.com/RocketChat/Rocket.Chat/pull/16414)) + +- Status Text form validation ([#16121](https://github.com/RocketChat/Rocket.Chat/pull/16121)) + +- Update katex version ([#16393](https://github.com/RocketChat/Rocket.Chat/pull/16393)) + +### 🐛 Bug fixes + + +- "User not found" for direct messages ([#16047](https://github.com/RocketChat/Rocket.Chat/pull/16047)) + +- `stdout` streamer infinite loop ([#16452](https://github.com/RocketChat/Rocket.Chat/pull/16452)) + +- Adding 'lang' tag ([#16375](https://github.com/RocketChat/Rocket.Chat/pull/16375) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- api-bypass-rate-limiter permission was not working ([#16080](https://github.com/RocketChat/Rocket.Chat/pull/16080)) + +- App removal was moving logs to the trash collection ([#16362](https://github.com/RocketChat/Rocket.Chat/pull/16362)) + +- auto translate cache ([#15768](https://github.com/RocketChat/Rocket.Chat/pull/15768) by [@vickyokrm](https://github.com/vickyokrm)) + +- Break message-attachment text to the next line ([#16039](https://github.com/RocketChat/Rocket.Chat/pull/16039) by [@ritwizsinha](https://github.com/ritwizsinha)) + +- Bug on starting Jitsi video calls , multiple messages ([#16601](https://github.com/RocketChat/Rocket.Chat/pull/16601)) + +- Container heights ([#16388](https://github.com/RocketChat/Rocket.Chat/pull/16388)) + +- Do not stop on DM imports if one of users was not found ([#16547](https://github.com/RocketChat/Rocket.Chat/pull/16547)) + +- Drag and drop disabled when file upload is disabled ([#16049](https://github.com/RocketChat/Rocket.Chat/pull/16049) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- Embedded style when using 'go' command ([#16051](https://github.com/RocketChat/Rocket.Chat/pull/16051)) + +- Error when successfully joining room by invite link ([#16571](https://github.com/RocketChat/Rocket.Chat/pull/16571)) + +- FileUpload.getBuffer was not working through the Apps-Engine ([#16234](https://github.com/RocketChat/Rocket.Chat/pull/16234)) + +- Highlight freezing the UI ([#16378](https://github.com/RocketChat/Rocket.Chat/pull/16378)) + +- Integrations admin page ([#16183](https://github.com/RocketChat/Rocket.Chat/pull/16183)) + +- Integrations list without pagination and outgoing integration creation ([#16233](https://github.com/RocketChat/Rocket.Chat/pull/16233)) + +- Introduce AppLivechatBridge.isOnlineAsync method ([#16467](https://github.com/RocketChat/Rocket.Chat/pull/16467)) + +- Invite links proxy URLs not working when using CDN ([#16581](https://github.com/RocketChat/Rocket.Chat/pull/16581)) + +- Invite links usage by channel owners/moderators ([#16176](https://github.com/RocketChat/Rocket.Chat/pull/16176)) + +- Livechat Widget version 1.3.1 ([#16580](https://github.com/RocketChat/Rocket.Chat/pull/16580)) + +- Login change language button ([#16085](https://github.com/RocketChat/Rocket.Chat/pull/16085) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- Mail Msg Cancel button not closing the flexbar ([#16263](https://github.com/RocketChat/Rocket.Chat/pull/16263) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Missing edited icon in newly created messages ([#16484](https://github.com/RocketChat/Rocket.Chat/pull/16484)) + +- Option to make a channel default ([#16433](https://github.com/RocketChat/Rocket.Chat/pull/16433)) + +- Read Message after receive a message and the room is opened ([#16473](https://github.com/RocketChat/Rocket.Chat/pull/16473)) + +- Readme Help wanted section ([#16197](https://github.com/RocketChat/Rocket.Chat/pull/16197)) + +- Result of get avatar from url can be null ([#16123](https://github.com/RocketChat/Rocket.Chat/pull/16123)) + +- Role tags missing - Description field explanation ([#16356](https://github.com/RocketChat/Rocket.Chat/pull/16356) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- Rooms not being marked as read sometimes ([#16397](https://github.com/RocketChat/Rocket.Chat/pull/16397)) + +- SafePorts: Ports 80, 8080 & 443 linked to respective protocols (#16108) ([#16108](https://github.com/RocketChat/Rocket.Chat/pull/16108)) + +- Save password without confirmation ([#16060](https://github.com/RocketChat/Rocket.Chat/pull/16060) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Send message with pending messages ([#16474](https://github.com/RocketChat/Rocket.Chat/pull/16474)) + +- Setup Wizard inputs and Admin Settings ([#16147](https://github.com/RocketChat/Rocket.Chat/pull/16147)) + +- Slack CSV User Importer ([#16253](https://github.com/RocketChat/Rocket.Chat/pull/16253)) + +- The "click to load" text is hard-coded and not translated. ([#16142](https://github.com/RocketChat/Rocket.Chat/pull/16142) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Thread message icon overlapping text ([#16083](https://github.com/RocketChat/Rocket.Chat/pull/16083)) + +- Unknown error when sending message if 'Set a User Name to Alias in Message' setting is enabled ([#16347](https://github.com/RocketChat/Rocket.Chat/pull/16347)) + +- User stuck after reset password ([#16184](https://github.com/RocketChat/Rocket.Chat/pull/16184)) + +- Video message sent to wrong room ([#16113](https://github.com/RocketChat/Rocket.Chat/pull/16113)) + +- When copying invite links, multiple toastr messages ([#16578](https://github.com/RocketChat/Rocket.Chat/pull/16578)) + +
+🔍 Minor changes + + +- Add breaking notice regarding TLS ([#16575](https://github.com/RocketChat/Rocket.Chat/pull/16575)) + +- Add Cloud Info to translation dictionary ([#16122](https://github.com/RocketChat/Rocket.Chat/pull/16122) by [@aviral243](https://github.com/aviral243)) + +- Add missing translations ([#16150](https://github.com/RocketChat/Rocket.Chat/pull/16150) by [@ritwizsinha](https://github.com/ritwizsinha)) + +- Add Ui Kit container ([#16503](https://github.com/RocketChat/Rocket.Chat/pull/16503)) + +- Catch zip errors on import file load ([#16494](https://github.com/RocketChat/Rocket.Chat/pull/16494)) + +- Disable PR Docker image build ([#16141](https://github.com/RocketChat/Rocket.Chat/pull/16141)) + +- Exclude federated and app users from active user count ([#16489](https://github.com/RocketChat/Rocket.Chat/pull/16489)) + +- Fix assets download on CI ([#16352](https://github.com/RocketChat/Rocket.Chat/pull/16352)) + +- Fix github actions accessing the github registry ([#16521](https://github.com/RocketChat/Rocket.Chat/pull/16521) by [@mrsimpson](https://github.com/mrsimpson)) + +- Fix index creation for apps_logs collection ([#16401](https://github.com/RocketChat/Rocket.Chat/pull/16401)) + +- Fix Preview Docker image build ([#16379](https://github.com/RocketChat/Rocket.Chat/pull/16379)) + +- Fix tests ([#16469](https://github.com/RocketChat/Rocket.Chat/pull/16469)) + +- Fix: License missing from manual register handler ([#16505](https://github.com/RocketChat/Rocket.Chat/pull/16505)) + +- LingoHub based on develop ([#16450](https://github.com/RocketChat/Rocket.Chat/pull/16450)) + +- Lint: Resolve complexity warnings ([#16114](https://github.com/RocketChat/Rocket.Chat/pull/16114)) + +- Merge master into develop & Set version to 2.5.0-develop ([#16107](https://github.com/RocketChat/Rocket.Chat/pull/16107)) + +- Regression: allow private channels to hide system messages ([#16483](https://github.com/RocketChat/Rocket.Chat/pull/16483)) + +- Regression: App deletion wasn’t returning the correct information ([#16360](https://github.com/RocketChat/Rocket.Chat/pull/16360)) + +- Regression: Fix app user status change for non-existing user ([#16458](https://github.com/RocketChat/Rocket.Chat/pull/16458)) + +- Regression: fix read unread messages ([#16562](https://github.com/RocketChat/Rocket.Chat/pull/16562)) + +- Regression: Fix sending a message not scrolling to bottom ([#16451](https://github.com/RocketChat/Rocket.Chat/pull/16451)) + +- Regression: Fix sequential messages grouping ([#16386](https://github.com/RocketChat/Rocket.Chat/pull/16386)) + +- Regression: Fix status bar margins ([#16438](https://github.com/RocketChat/Rocket.Chat/pull/16438)) + +- Regression: Fix uikit modal closing on click ([#16475](https://github.com/RocketChat/Rocket.Chat/pull/16475)) + +- Regression: Fix undefined presence after reconnect ([#16477](https://github.com/RocketChat/Rocket.Chat/pull/16477)) + +- Regression: Modal onSubmit ([#16556](https://github.com/RocketChat/Rocket.Chat/pull/16556)) + +- Regression: prevent submit modal ([#16488](https://github.com/RocketChat/Rocket.Chat/pull/16488)) + +- Regression: Rate limiter was not working due to Meteor internal changes ([#16361](https://github.com/RocketChat/Rocket.Chat/pull/16361)) + +- Regression: recent opened rooms being marked as read ([#16442](https://github.com/RocketChat/Rocket.Chat/pull/16442)) + +- Regression: Send app info along with interaction payload to the UI ([#16511](https://github.com/RocketChat/Rocket.Chat/pull/16511)) + +- Regression: send file modal not working via keyboard ([#16607](https://github.com/RocketChat/Rocket.Chat/pull/16607)) + +- Regression: Ui Kit messaging issues (#16513) ([#16513](https://github.com/RocketChat/Rocket.Chat/pull/16513)) + +- Regression: UIKit - Send container info on block actions triggered on a message ([#16514](https://github.com/RocketChat/Rocket.Chat/pull/16514)) + +- Regression: UIkit input states ([#16552](https://github.com/RocketChat/Rocket.Chat/pull/16552)) + +- Regression: UIKit missing select states: error/disabled ([#16540](https://github.com/RocketChat/Rocket.Chat/pull/16540)) + +- Regression: UIKit update modal actions ([#16570](https://github.com/RocketChat/Rocket.Chat/pull/16570)) + +- Regression: update package-lock ([#16528](https://github.com/RocketChat/Rocket.Chat/pull/16528)) + +- Regression: Update Uikit ([#16515](https://github.com/RocketChat/Rocket.Chat/pull/16515)) + +- Release 2.4.7 ([#16444](https://github.com/RocketChat/Rocket.Chat/pull/16444)) + +- Release 2.4.9 ([#16544](https://github.com/RocketChat/Rocket.Chat/pull/16544)) + +- Remove users.info being called without need ([#16504](https://github.com/RocketChat/Rocket.Chat/pull/16504)) + +- Revert importer streamed uploads ([#16465](https://github.com/RocketChat/Rocket.Chat/pull/16465)) + +- Revert message properties validation ([#16395](https://github.com/RocketChat/Rocket.Chat/pull/16395)) + +- Send build artifacts to S3 ([#16237](https://github.com/RocketChat/Rocket.Chat/pull/16237)) + +- Update apps engine to 1.12.0-beta.2496 ([#16398](https://github.com/RocketChat/Rocket.Chat/pull/16398)) + +- Update Apps-Engine version ([#16584](https://github.com/RocketChat/Rocket.Chat/pull/16584)) + +- Update presence package to 2.6.1 ([#16486](https://github.com/RocketChat/Rocket.Chat/pull/16486)) + +- Use base64 for import files upload to prevent file corruption ([#16516](https://github.com/RocketChat/Rocket.Chat/pull/16516)) + +- Use GitHub Actions to store builds ([#16443](https://github.com/RocketChat/Rocket.Chat/pull/16443)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Cool-fire](https://github.com/Cool-fire) +- [@antkaz](https://github.com/antkaz) +- [@ashwaniYDV](https://github.com/ashwaniYDV) +- [@aviral243](https://github.com/aviral243) +- [@lolimay](https://github.com/lolimay) +- [@mariaeduardacunha](https://github.com/mariaeduardacunha) +- [@mrsimpson](https://github.com/mrsimpson) +- [@ritwizsinha](https://github.com/ritwizsinha) +- [@vickyokrm](https://github.com/vickyokrm) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@LuluGO](https://github.com/LuluGO) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@d-gubert](https://github.com/d-gubert) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 2.4.14 +`2020-12-18 · 2 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.17.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.11.2` + +### 🐛 Bug fixes + + +- Issue with special message rendering ([#19817](https://github.com/RocketChat/Rocket.Chat/pull/19817)) + +- Problem with attachment render ([#19854](https://github.com/RocketChat/Rocket.Chat/pull/19854)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) + +# 2.4.12 +`2020-05-11 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.17.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Email configs not updating after setting changes ([#17578](https://github.com/RocketChat/Rocket.Chat/pull/17578)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@rodrigok](https://github.com/rodrigok) + +# 2.4.10 +`2020-02-20 · 1 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.17.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- users.info endpoint not handling the error if the user does not exist ([#16495](https://github.com/RocketChat/Rocket.Chat/pull/16495)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 2.4.9 +`2020-02-10 · 1 🐛 · 1 🔍 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.17.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- `stdout` streamer infinite loop ([#16452](https://github.com/RocketChat/Rocket.Chat/pull/16452)) + +
+🔍 Minor changes + + +- Release 2.4.9 ([#16544](https://github.com/RocketChat/Rocket.Chat/pull/16544)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 2.4.8 +`2020-02-07 · 2 🔍 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.17.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +
+🔍 Minor changes + + +- Release 2.4.8 ([#16506](https://github.com/RocketChat/Rocket.Chat/pull/16506)) + +- Update presence package to 2.6.1 ([#16486](https://github.com/RocketChat/Rocket.Chat/pull/16486)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 2.4.7 +`2020-02-03 · 1 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.17.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Option to make a channel default ([#16433](https://github.com/RocketChat/Rocket.Chat/pull/16433)) + +
+🔍 Minor changes + + +- Release 2.4.7 ([#16444](https://github.com/RocketChat/Rocket.Chat/pull/16444)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@ggazzo](https://github.com/ggazzo) + +# 2.4.6 +`2020-01-31 · 3 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.17.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +
+🔍 Minor changes + + +- Fix index creation for apps_logs collection ([#16401](https://github.com/RocketChat/Rocket.Chat/pull/16401)) + +- Release 2.4.6 ([#16402](https://github.com/RocketChat/Rocket.Chat/pull/16402)) + +- Revert message properties validation ([#16395](https://github.com/RocketChat/Rocket.Chat/pull/16395)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 2.4.5 +`2020-01-29 · 1 🔍 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.17.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +
+🔍 Minor changes + + +- Release 2.4.5 ([#16380](https://github.com/RocketChat/Rocket.Chat/pull/16380)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 2.4.4 +`2020-01-29 · 1 🐛 · 2 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.17.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- App removal was moving logs to the trash collection ([#16362](https://github.com/RocketChat/Rocket.Chat/pull/16362)) + +
+🔍 Minor changes + + +- Regression: Rate limiter was not working due to Meteor internal changes ([#16361](https://github.com/RocketChat/Rocket.Chat/pull/16361)) + +- Release 2.4.4 ([#16377](https://github.com/RocketChat/Rocket.Chat/pull/16377)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 2.4.3 +`2020-01-28 · 2 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.17.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Invite links usage by channel owners/moderators ([#16176](https://github.com/RocketChat/Rocket.Chat/pull/16176)) + +- Unknown error when sending message if 'Set a User Name to Alias in Message' setting is enabled ([#16347](https://github.com/RocketChat/Rocket.Chat/pull/16347)) + +
+🔍 Minor changes + + +- Release 2.4.3 ([#16358](https://github.com/RocketChat/Rocket.Chat/pull/16358)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 2.4.2 +`2020-01-17 · 4 🐛 · 1 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.17.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Integrations list without pagination and outgoing integration creation ([#16233](https://github.com/RocketChat/Rocket.Chat/pull/16233)) + +- Setup Wizard inputs and Admin Settings ([#16147](https://github.com/RocketChat/Rocket.Chat/pull/16147)) + +- Slack CSV User Importer ([#16253](https://github.com/RocketChat/Rocket.Chat/pull/16253)) + +- User stuck after reset password ([#16184](https://github.com/RocketChat/Rocket.Chat/pull/16184)) + +
+🔍 Minor changes + + +- Release 2.4.2 ([#16274](https://github.com/RocketChat/Rocket.Chat/pull/16274)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@ggazzo](https://github.com/ggazzo) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 2.4.1 +`2020-01-10 · 3 🐛 · 1 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.17.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Add missing password field back to administration area ([#16171](https://github.com/RocketChat/Rocket.Chat/pull/16171)) + +- Enable apps change properties of the sender on the message as before ([#16189](https://github.com/RocketChat/Rocket.Chat/pull/16189)) + +- JS errors on Administration page ([#16139](https://github.com/RocketChat/Rocket.Chat/pull/16139) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +
+🔍 Minor changes + + +- Release 2.4.1 ([#16195](https://github.com/RocketChat/Rocket.Chat/pull/16195) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@mariaeduardacunha](https://github.com/mariaeduardacunha) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 2.4.0 +`2019-12-27 · 4 🎉 · 28 🚀 · 29 🐛 · 19 🔍 · 22 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.17.0` +- NPM: `6.13.4` +- MongoDB: `3.4, 3.6, 4.0` + +### 🎉 New features + + +- Apps-Engine event for when a livechat room is closed ([#15837](https://github.com/RocketChat/Rocket.Chat/pull/15837) by [@lolimay](https://github.com/lolimay)) + +- Do not print emails in console on production mode ([#15928](https://github.com/RocketChat/Rocket.Chat/pull/15928)) + +- Invite links: share a link to invite users ([#15933](https://github.com/RocketChat/Rocket.Chat/pull/15933)) + +- Logout other clients when changing password ([#15927](https://github.com/RocketChat/Rocket.Chat/pull/15927)) + +### 🚀 Improvements + + +- Add deprecate warning in some unused publications ([#15935](https://github.com/RocketChat/Rocket.Chat/pull/15935)) + +- Livechat realtime dashboard ([#15792](https://github.com/RocketChat/Rocket.Chat/pull/15792)) + +- Move 'Reply in Thread' button from menu to message actions ([#15685](https://github.com/RocketChat/Rocket.Chat/pull/15685) by [@antkaz](https://github.com/antkaz)) + +- Notify logged agents when their departments change ([#16033](https://github.com/RocketChat/Rocket.Chat/pull/16033)) + +- Replace adminRooms publication by REST ([#15948](https://github.com/RocketChat/Rocket.Chat/pull/15948)) + +- Replace customSounds publication by REST ([#15907](https://github.com/RocketChat/Rocket.Chat/pull/15907)) + +- Replace discussionsOfARoom publication by REST ([#15908](https://github.com/RocketChat/Rocket.Chat/pull/15908)) + +- Replace forgotten livechat:departmentAgents subscriptions ([#15970](https://github.com/RocketChat/Rocket.Chat/pull/15970)) + +- Replace fullEmojiData publication by REST ([#15901](https://github.com/RocketChat/Rocket.Chat/pull/15901)) + +- Replace fullUserData publication by REST ([#15650](https://github.com/RocketChat/Rocket.Chat/pull/15650)) + +- Replace fullUserStatusData publication by REST ([#15942](https://github.com/RocketChat/Rocket.Chat/pull/15942)) + +- Replace integrations and integrationHistory publications by REST ([#15885](https://github.com/RocketChat/Rocket.Chat/pull/15885)) + +- Replace livechat:customFields to REST ([#15496](https://github.com/RocketChat/Rocket.Chat/pull/15496)) + +- Replace livechat:inquiry publication by REST and Streamer ([#15977](https://github.com/RocketChat/Rocket.Chat/pull/15977)) + +- Replace livechat:managers publication by REST ([#15944](https://github.com/RocketChat/Rocket.Chat/pull/15944)) + +- Replace livechat:officeHour publication to REST ([#15503](https://github.com/RocketChat/Rocket.Chat/pull/15503)) + +- Replace livechat:queue subscription ([#15612](https://github.com/RocketChat/Rocket.Chat/pull/15612)) + +- Replace livechat:rooms publication by REST ([#15968](https://github.com/RocketChat/Rocket.Chat/pull/15968)) + +- Replace livechat:visitorHistory publication by REST ([#15943](https://github.com/RocketChat/Rocket.Chat/pull/15943)) + +- Replace oauth publications by REST ([#15878](https://github.com/RocketChat/Rocket.Chat/pull/15878)) + +- Replace roles publication by REST ([#15910](https://github.com/RocketChat/Rocket.Chat/pull/15910)) + +- Replace stdout publication by REST ([#16004](https://github.com/RocketChat/Rocket.Chat/pull/16004)) + +- Replace userAutocomplete publication by REST ([#15956](https://github.com/RocketChat/Rocket.Chat/pull/15956)) + +- Replace userData subscriptions by REST ([#15916](https://github.com/RocketChat/Rocket.Chat/pull/15916)) + +- Replace webdavAccounts publication by REST ([#15926](https://github.com/RocketChat/Rocket.Chat/pull/15926)) + +- Sorting on livechat analytics queries were wrong ([#16021](https://github.com/RocketChat/Rocket.Chat/pull/16021)) + +- Update ui for Roles field ([#15888](https://github.com/RocketChat/Rocket.Chat/pull/15888) by [@antkaz](https://github.com/antkaz)) + +- Validate user identity on send message process ([#15887](https://github.com/RocketChat/Rocket.Chat/pull/15887)) + +### 🐛 Bug fixes + + +- Add time format for latest message on the sidebar ([#15930](https://github.com/RocketChat/Rocket.Chat/pull/15930) by [@ritwizsinha](https://github.com/ritwizsinha)) + +- Added Join button to Read Only rooms. ([#16016](https://github.com/RocketChat/Rocket.Chat/pull/16016)) + +- Admin menu not showing after renamed integration permissions ([#15937](https://github.com/RocketChat/Rocket.Chat/pull/15937) by [@n-se](https://github.com/n-se)) + +- Admin Setting descriptions and Storybook ([#15994](https://github.com/RocketChat/Rocket.Chat/pull/15994)) + +- Administration UI issues ([#15934](https://github.com/RocketChat/Rocket.Chat/pull/15934)) + +- Auto load image user preference ([#15895](https://github.com/RocketChat/Rocket.Chat/pull/15895)) + +- Changed renderMessage priority, fixed Katex on/off setting ([#16012](https://github.com/RocketChat/Rocket.Chat/pull/16012)) + +- Default value of the Livechat WebhookUrl setting ([#15898](https://github.com/RocketChat/Rocket.Chat/pull/15898)) + +- Don't throw an error when a message is prevented from apps engine ([#15850](https://github.com/RocketChat/Rocket.Chat/pull/15850) by [@wreiske](https://github.com/wreiske)) + +- Dropzone being stuck when dragging to thread ([#16006](https://github.com/RocketChat/Rocket.Chat/pull/16006)) + +- Empty security section when 2fa is disabled ([#16009](https://github.com/RocketChat/Rocket.Chat/pull/16009)) + +- Error of bind environment on user data export ([#15985](https://github.com/RocketChat/Rocket.Chat/pull/15985)) + +- Fix sort livechat rooms ([#16001](https://github.com/RocketChat/Rocket.Chat/pull/16001)) + +- Guest's name field missing when forwarding livechat rooms ([#15991](https://github.com/RocketChat/Rocket.Chat/pull/15991)) + +- Importer: Variable name appearing instead of it's value ([#16010](https://github.com/RocketChat/Rocket.Chat/pull/16010) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Incorrect translation key on Livechat Appearance template ([#15975](https://github.com/RocketChat/Rocket.Chat/pull/15975) by [@ritwizsinha](https://github.com/ritwizsinha)) + +- Invalid Redirect URI on Custom OAuth ([#15957](https://github.com/RocketChat/Rocket.Chat/pull/15957)) + +- Livechat build without NodeJS installed ([#15903](https://github.com/RocketChat/Rocket.Chat/pull/15903) by [@localguru](https://github.com/localguru)) + +- Livechat permissions being overwrite on server restart ([#15915](https://github.com/RocketChat/Rocket.Chat/pull/15915)) + +- Livechat triggers not firing ([#15897](https://github.com/RocketChat/Rocket.Chat/pull/15897)) + +- Livechat Widget version 1.3.0 ([#15966](https://github.com/RocketChat/Rocket.Chat/pull/15966)) + +- Message list scrolling to bottom on reactions ([#16018](https://github.com/RocketChat/Rocket.Chat/pull/16018) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- new message popup ([#16017](https://github.com/RocketChat/Rocket.Chat/pull/16017) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- Registration form was hidden when login form was disabled ([#16062](https://github.com/RocketChat/Rocket.Chat/pull/16062)) + +- SAML logout error ([#15978](https://github.com/RocketChat/Rocket.Chat/pull/15978)) + +- Server crash on sync with no response ([#15919](https://github.com/RocketChat/Rocket.Chat/pull/15919)) + +- Thread Replies in Search ([#15841](https://github.com/RocketChat/Rocket.Chat/pull/15841)) + +- width of upload-progress-text ([#16023](https://github.com/RocketChat/Rocket.Chat/pull/16023) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- z-index of new message button ([#16013](https://github.com/RocketChat/Rocket.Chat/pull/16013) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +
+🔍 Minor changes + + +- [CHORE] Replace findOne with findOneById methods (Omnichannel) ([#15894](https://github.com/RocketChat/Rocket.Chat/pull/15894)) + +- Change migration number 169 <-> 170 ([#15940](https://github.com/RocketChat/Rocket.Chat/pull/15940)) + +- Check package-lock consistency with package.json on CI ([#15961](https://github.com/RocketChat/Rocket.Chat/pull/15961)) + +- Enable typescript lint ([#15979](https://github.com/RocketChat/Rocket.Chat/pull/15979)) + +- Fix 'How it all started' link on README ([#15962](https://github.com/RocketChat/Rocket.Chat/pull/15962) by [@zdumitru](https://github.com/zdumitru)) + +- Fix typo in Italian translation ([#15998](https://github.com/RocketChat/Rocket.Chat/pull/15998) by [@iannuzzelli](https://github.com/iannuzzelli)) + +- Fixed Grammatical Mistakes. ([#15570](https://github.com/RocketChat/Rocket.Chat/pull/15570) by [@breaking-let](https://github.com/breaking-let)) + +- GitHub CI ([#15918](https://github.com/RocketChat/Rocket.Chat/pull/15918)) + +- LingoHub based on develop ([#15988](https://github.com/RocketChat/Rocket.Chat/pull/15988)) + +- LingoHub based on develop ([#15939](https://github.com/RocketChat/Rocket.Chat/pull/15939)) + +- Merge master into develop & Set version to 3.0.0-develop ([#15872](https://github.com/RocketChat/Rocket.Chat/pull/15872)) + +- Meteor update to 1.8.2 ([#15873](https://github.com/RocketChat/Rocket.Chat/pull/15873)) + +- Regression: Missing button to copy Invite links ([#16084](https://github.com/RocketChat/Rocket.Chat/pull/16084)) + +- Regression: Update components ([#16053](https://github.com/RocketChat/Rocket.Chat/pull/16053)) + +- Remove unnecessary cron starts ([#15989](https://github.com/RocketChat/Rocket.Chat/pull/15989)) + +- Some performance improvements ([#15886](https://github.com/RocketChat/Rocket.Chat/pull/15886)) + +- Update Meteor to 1.8.3 ([#16037](https://github.com/RocketChat/Rocket.Chat/pull/16037)) + +- Update NodeJS to 8.17.0 ([#16043](https://github.com/RocketChat/Rocket.Chat/pull/16043)) + +- Upgrade limax to 2.0.0 ([#16020](https://github.com/RocketChat/Rocket.Chat/pull/16020)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@antkaz](https://github.com/antkaz) +- [@ashwaniYDV](https://github.com/ashwaniYDV) +- [@breaking-let](https://github.com/breaking-let) +- [@iannuzzelli](https://github.com/iannuzzelli) +- [@localguru](https://github.com/localguru) +- [@lolimay](https://github.com/lolimay) +- [@mariaeduardacunha](https://github.com/mariaeduardacunha) +- [@n-se](https://github.com/n-se) +- [@ritwizsinha](https://github.com/ritwizsinha) +- [@wreiske](https://github.com/wreiske) +- [@zdumitru](https://github.com/zdumitru) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@d-gubert](https://github.com/d-gubert) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 2.3.3 +`2020-01-10 · 1 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.15.1` +- NPM: `6.9.0` + +### 🐛 Bug fixes + + +- Add missing password field back to administration area ([#16171](https://github.com/RocketChat/Rocket.Chat/pull/16171)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 2.3.2 +`2019-12-12 · 2 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.15.1` +- NPM: `6.9.0` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Invalid Redirect URI on Custom OAuth ([#15957](https://github.com/RocketChat/Rocket.Chat/pull/15957)) + +- Livechat Widget version 1.3.0 ([#15966](https://github.com/RocketChat/Rocket.Chat/pull/15966)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) + +# 2.3.1 +`2019-12-09 · 6 🐛 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.15.1` +- NPM: `6.9.0` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Admin menu not showing after renamed integration permissions ([#15937](https://github.com/RocketChat/Rocket.Chat/pull/15937) by [@n-se](https://github.com/n-se)) + +- Administration UI issues ([#15934](https://github.com/RocketChat/Rocket.Chat/pull/15934)) + +- Auto load image user preference ([#15895](https://github.com/RocketChat/Rocket.Chat/pull/15895)) + +- Default value of the Livechat WebhookUrl setting ([#15898](https://github.com/RocketChat/Rocket.Chat/pull/15898)) + +- Livechat permissions being overwrite on server restart ([#15915](https://github.com/RocketChat/Rocket.Chat/pull/15915)) + +- Livechat triggers not firing ([#15897](https://github.com/RocketChat/Rocket.Chat/pull/15897)) + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@n-se](https://github.com/n-se) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@renatobecker](https://github.com/renatobecker) +- [@tassoevan](https://github.com/tassoevan) + +# 2.3.0 +`2019-11-27 · 13 🎉 · 17 🚀 · 26 🐛 · 17 🔍 · 17 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.15.1` +- NPM: `6.9.0` +- MongoDB: `3.4, 3.6, 4.0` + +### 🎉 New features + + +- Add a new stream to emit and listen room data events ([#15770](https://github.com/RocketChat/Rocket.Chat/pull/15770)) + +- Add ability to users reset their own E2E key ([#15777](https://github.com/RocketChat/Rocket.Chat/pull/15777)) + +- add delete-own-message permission ([#15512](https://github.com/RocketChat/Rocket.Chat/pull/15512)) + +- Add forms to view and edit Livechat agents info ([#15703](https://github.com/RocketChat/Rocket.Chat/pull/15703)) + +- Allow Regexes on SAML user field mapping ([#15743](https://github.com/RocketChat/Rocket.Chat/pull/15743)) + +- Livechat analytics ([#15230](https://github.com/RocketChat/Rocket.Chat/pull/15230)) + +- Livechat analytics functions ([#15666](https://github.com/RocketChat/Rocket.Chat/pull/15666)) + +- Notify users when their email address change ([#15828](https://github.com/RocketChat/Rocket.Chat/pull/15828)) + +- Option for admins to set a random password to a user ([#15818](https://github.com/RocketChat/Rocket.Chat/pull/15818)) + +- Option on livechat departments to ensure a chat has tags before closing ([#15752](https://github.com/RocketChat/Rocket.Chat/pull/15752)) + +- SAML login without popup windows ([#15836](https://github.com/RocketChat/Rocket.Chat/pull/15836)) + +- Setting to dismiss desktop notification only after interaction ([#14807](https://github.com/RocketChat/Rocket.Chat/pull/14807) by [@mpdbl](https://github.com/mpdbl)) + +- Workspace Manual Registration ([#15442](https://github.com/RocketChat/Rocket.Chat/pull/15442)) + +### 🚀 Improvements + + +- Add more fields to iframe integration event `unread-changed-by-subscription` ([#15786](https://github.com/RocketChat/Rocket.Chat/pull/15786)) + +- Administration UI - React and Fuselage components ([#15452](https://github.com/RocketChat/Rocket.Chat/pull/15452)) + +- Allow dragging of images and text from browsers ([#15691](https://github.com/RocketChat/Rocket.Chat/pull/15691)) + +- dynamic import livechat views ([#15775](https://github.com/RocketChat/Rocket.Chat/pull/15775)) + +- Lazyload Chart.js ([#15764](https://github.com/RocketChat/Rocket.Chat/pull/15764)) + +- Lazyload qrcode lib ([#15741](https://github.com/RocketChat/Rocket.Chat/pull/15741)) + +- Make push notification batchsize and interval configurable ([#15804](https://github.com/RocketChat/Rocket.Chat/pull/15804) by [@Exordian](https://github.com/Exordian)) + +- Remove "EmojiCustom" unused subscription ([#15658](https://github.com/RocketChat/Rocket.Chat/pull/15658)) + +- remove computations inside messageAttachment ([#15716](https://github.com/RocketChat/Rocket.Chat/pull/15716)) + +- Replace livechat:departmentAgents subscription to REST ([#15529](https://github.com/RocketChat/Rocket.Chat/pull/15529)) + +- Replace livechat:externalMessages publication by REST ([#15643](https://github.com/RocketChat/Rocket.Chat/pull/15643)) + +- Replace livechat:pagesvisited publication by REST ([#15629](https://github.com/RocketChat/Rocket.Chat/pull/15629)) + +- Replace livechat:visitorInfo publication by REST ([#15639](https://github.com/RocketChat/Rocket.Chat/pull/15639)) + +- Replace personalAccessTokens publication by REST ([#15644](https://github.com/RocketChat/Rocket.Chat/pull/15644)) + +- Replace snippetedMessage publication by REST ([#15679](https://github.com/RocketChat/Rocket.Chat/pull/15679)) + +- Replace snipptedMessages publication by REST ([#15678](https://github.com/RocketChat/Rocket.Chat/pull/15678)) + +- Unfollow own threads ([#15740](https://github.com/RocketChat/Rocket.Chat/pull/15740)) + +### 🐛 Bug fixes + + +- Add button to reset.css ([#15773](https://github.com/RocketChat/Rocket.Chat/pull/15773)) + +- Add livechat agents into departments ([#15732](https://github.com/RocketChat/Rocket.Chat/pull/15732)) + +- Apply server side filters on Livechat lists ([#15717](https://github.com/RocketChat/Rocket.Chat/pull/15717)) + +- Block Show_Setup_Wizard Option ([#15623](https://github.com/RocketChat/Rocket.Chat/pull/15623)) + +- Changed cmsPage Style ([#15632](https://github.com/RocketChat/Rocket.Chat/pull/15632)) + +- Channel notification audio preferences ([#15771](https://github.com/RocketChat/Rocket.Chat/pull/15771)) + +- Duplicate label 'Hide Avatars' in accounts ([#15694](https://github.com/RocketChat/Rocket.Chat/pull/15694) by [@rajvaibhavdubey](https://github.com/rajvaibhavdubey)) + +- Edit in thread ([#15640](https://github.com/RocketChat/Rocket.Chat/pull/15640)) + +- Error when exporting user data ([#15654](https://github.com/RocketChat/Rocket.Chat/pull/15654)) + +- Forward Livechat UI and the related permissions ([#15718](https://github.com/RocketChat/Rocket.Chat/pull/15718)) + +- Ignore file uploads from message box if text/plain content is being pasted ([#15631](https://github.com/RocketChat/Rocket.Chat/pull/15631)) + +- line-height to show entire letters ([#15581](https://github.com/RocketChat/Rocket.Chat/pull/15581) by [@nstseek](https://github.com/nstseek)) + +- Livechat transfer history messages ([#15780](https://github.com/RocketChat/Rocket.Chat/pull/15780)) + +- Livechat webhook broken when sending an image ([#15699](https://github.com/RocketChat/Rocket.Chat/pull/15699) by [@tatosjb](https://github.com/tatosjb)) + +- Mentions before blockquote ([#15774](https://github.com/RocketChat/Rocket.Chat/pull/15774)) + +- Missing Privacy Policy Agree on register ([#15832](https://github.com/RocketChat/Rocket.Chat/pull/15832)) + +- Not valid relative URLs on message attachments ([#15651](https://github.com/RocketChat/Rocket.Chat/pull/15651)) + +- Null value at Notifications Preferences tab ([#15638](https://github.com/RocketChat/Rocket.Chat/pull/15638)) + +- Pasting images on reply as thread ([#15811](https://github.com/RocketChat/Rocket.Chat/pull/15811)) + +- Prevent agent last message undefined ([#15809](https://github.com/RocketChat/Rocket.Chat/pull/15809)) + +- Push: fix notification priority for google (FCM) ([#15803](https://github.com/RocketChat/Rocket.Chat/pull/15803) by [@Exordian](https://github.com/Exordian)) + +- REST endpoint `chat.syncMessages` returning an error with deleted messages ([#15824](https://github.com/RocketChat/Rocket.Chat/pull/15824)) + +- Sending messages to livechat rooms without a subscription ([#15707](https://github.com/RocketChat/Rocket.Chat/pull/15707)) + +- Sidebar font color was not respecting theming ([#15745](https://github.com/RocketChat/Rocket.Chat/pull/15745) by [@mariaeduardacunha](https://github.com/mariaeduardacunha)) + +- typo on PT-BR translation ([#15645](https://github.com/RocketChat/Rocket.Chat/pull/15645)) + +- Use Media Devices API to guess if a microphone is not available ([#15636](https://github.com/RocketChat/Rocket.Chat/pull/15636)) + +
+🔍 Minor changes + + +- [CHORE] Add lingohub to readme ([#15849](https://github.com/RocketChat/Rocket.Chat/pull/15849)) + +- [REGRESSION] Add livechat room type to the room's file list ([#15795](https://github.com/RocketChat/Rocket.Chat/pull/15795)) + +- Fix Livechat duplicated templates error ([#15869](https://github.com/RocketChat/Rocket.Chat/pull/15869)) + +- Fix notification migration ([#15783](https://github.com/RocketChat/Rocket.Chat/pull/15783)) + +- Improve LDAP Login Fallback setting description in portuguese ([#15655](https://github.com/RocketChat/Rocket.Chat/pull/15655)) + +- Improvements to random password field on user edit/creation ([#15870](https://github.com/RocketChat/Rocket.Chat/pull/15870)) + +- LingoHub based on develop ([#15822](https://github.com/RocketChat/Rocket.Chat/pull/15822)) + +- LingoHub based on develop ([#15763](https://github.com/RocketChat/Rocket.Chat/pull/15763)) + +- LingoHub based on develop ([#15728](https://github.com/RocketChat/Rocket.Chat/pull/15728)) + +- LingoHub based on develop ([#15688](https://github.com/RocketChat/Rocket.Chat/pull/15688)) + +- Merge master into develop & Set version to 2.3.0-develop ([#15683](https://github.com/RocketChat/Rocket.Chat/pull/15683)) + +- Regression: fix admin instances info page ([#15772](https://github.com/RocketChat/Rocket.Chat/pull/15772)) + +- Regression: Fix hide avatars in side bar preference ([#15709](https://github.com/RocketChat/Rocket.Chat/pull/15709)) + +- Regression: messageAttachments inside messageAttachments not receiving settings ([#15733](https://github.com/RocketChat/Rocket.Chat/pull/15733)) + +- Remove unused permission to reset users' E2E key ([#15860](https://github.com/RocketChat/Rocket.Chat/pull/15860)) + +- Remove yarn.lock ([#15689](https://github.com/RocketChat/Rocket.Chat/pull/15689)) + +- Update moment-timezone ([#15729](https://github.com/RocketChat/Rocket.Chat/pull/15729)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Exordian](https://github.com/Exordian) +- [@mariaeduardacunha](https://github.com/mariaeduardacunha) +- [@mpdbl](https://github.com/mpdbl) +- [@nstseek](https://github.com/nstseek) +- [@rajvaibhavdubey](https://github.com/rajvaibhavdubey) +- [@tatosjb](https://github.com/tatosjb) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@d-gubert](https://github.com/d-gubert) +- [@gabriellsh](https://github.com/gabriellsh) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 2.2.1 +`2019-11-19 · 2 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.15.1` +- NPM: `6.9.0` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Markdown link parser ([#15794](https://github.com/RocketChat/Rocket.Chat/pull/15794)) + +- Updating an app via "Update" button errors out with "App already exists" ([#15814](https://github.com/RocketChat/Rocket.Chat/pull/15814)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@ggazzo](https://github.com/ggazzo) + +# 2.2.0 +`2019-10-27 · 14 🎉 · 16 🚀 · 24 🐛 · 28 🔍 · 27 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.15.1` +- NPM: `6.9.0` +- MongoDB: `3.4, 3.6, 4.0` + +### 🎉 New features + + +- Accept GIFs and SVGs for Avatars converting them to PNG and keep transparency of PNGs ([#11385](https://github.com/RocketChat/Rocket.Chat/pull/11385)) + +- Add new Livechat appearance setting to set the conversation finished message ([#15577](https://github.com/RocketChat/Rocket.Chat/pull/15577)) + +- Add option to enable X-Frame-options header to avoid loading inside any Iframe ([#14698](https://github.com/RocketChat/Rocket.Chat/pull/14698)) + +- Add users.requestDataDownload API endpoint ([#14428](https://github.com/RocketChat/Rocket.Chat/pull/14428) by [@Hudell](https://github.com/Hudell) & [@ubarsaiyan](https://github.com/ubarsaiyan)) + +- Added file type filter to RoomFiles ([#15289](https://github.com/RocketChat/Rocket.Chat/pull/15289) by [@juanpetterson](https://github.com/juanpetterson)) + +- Assign new Livechat conversations to bot agents first ([#15317](https://github.com/RocketChat/Rocket.Chat/pull/15317)) + +- Check if agent can receive new livechat conversations when its status is away/idle ([#15451](https://github.com/RocketChat/Rocket.Chat/pull/15451)) + +- close emoji box using Keyboard Escape key ([#13956](https://github.com/RocketChat/Rocket.Chat/pull/13956) by [@mohamedar97](https://github.com/mohamedar97)) + +- Import DMs from CSV files ([#15534](https://github.com/RocketChat/Rocket.Chat/pull/15534)) + +- Import SAML language and auto join SAML channels ([#14203](https://github.com/RocketChat/Rocket.Chat/pull/14203) by [@Hudell](https://github.com/Hudell) & [@unixtam](https://github.com/unixtam)) + +- Remove all closed Livechat chats ([#13991](https://github.com/RocketChat/Rocket.Chat/pull/13991) by [@knrt10](https://github.com/knrt10)) + +- Separate integration roles ([#13902](https://github.com/RocketChat/Rocket.Chat/pull/13902)) + +- Thread support to apps slashcommands and slashcommand previews ([#15574](https://github.com/RocketChat/Rocket.Chat/pull/15574)) + +- Update livechat widget version to 1.2.5 ([#15600](https://github.com/RocketChat/Rocket.Chat/pull/15600)) + +### 🚀 Improvements + + +- Cache hasPermissions ([#15589](https://github.com/RocketChat/Rocket.Chat/pull/15589)) + +- Detach React components from Meteor API ([#15482](https://github.com/RocketChat/Rocket.Chat/pull/15482)) + +- Disable edit visitor's phone number in SMS conversations ([#15593](https://github.com/RocketChat/Rocket.Chat/pull/15593)) + +- Lazyload Katex Package ([#15398](https://github.com/RocketChat/Rocket.Chat/pull/15398)) + +- Replace `livechat:departments` publication by REST Calls ([#15478](https://github.com/RocketChat/Rocket.Chat/pull/15478)) + +- Replace `livechat:triggers` publication by REST calls ([#15507](https://github.com/RocketChat/Rocket.Chat/pull/15507)) + +- Replace livechat:agents pub by REST calls ([#15490](https://github.com/RocketChat/Rocket.Chat/pull/15490)) + +- Replace livechat:appearance pub to REST ([#15510](https://github.com/RocketChat/Rocket.Chat/pull/15510)) + +- Replace livechat:integration publication by REST ([#15607](https://github.com/RocketChat/Rocket.Chat/pull/15607)) + +- Replace mentionedMessages publication to REST ([#15540](https://github.com/RocketChat/Rocket.Chat/pull/15540)) + +- Replace pinned messages subscription ([#15544](https://github.com/RocketChat/Rocket.Chat/pull/15544)) + +- Replace roomFilesWithSearchText subscription ([#15550](https://github.com/RocketChat/Rocket.Chat/pull/15550)) + +- Replace some livechat:rooms subscriptions ([#15532](https://github.com/RocketChat/Rocket.Chat/pull/15532)) + +- Replace starred messages subscription ([#15548](https://github.com/RocketChat/Rocket.Chat/pull/15548)) + +- Secure cookies when using HTTPS connection ([#15500](https://github.com/RocketChat/Rocket.Chat/pull/15500)) + +- Update Fuselage components on SetupWizard ([#15457](https://github.com/RocketChat/Rocket.Chat/pull/15457)) + +### 🐛 Bug fixes + + +- Add a header for the createAt column in the Directory ([#15556](https://github.com/RocketChat/Rocket.Chat/pull/15556) by [@antkaz](https://github.com/antkaz)) + +- Add permissions for slashCommands ([#15525](https://github.com/RocketChat/Rocket.Chat/pull/15525) by [@antkaz](https://github.com/antkaz)) + +- Adding "Promise.await" in "livechat/message" endpoint ([#15541](https://github.com/RocketChat/Rocket.Chat/pull/15541) by [@rodrigokamada](https://github.com/rodrigokamada)) + +- adjustments for tooltips to show room name instead of id ([#14084](https://github.com/RocketChat/Rocket.Chat/pull/14084) by [@mohamedar97](https://github.com/mohamedar97)) + +- Compact view ([#15416](https://github.com/RocketChat/Rocket.Chat/pull/15416)) + +- Deny editing visitor's phone number in SMS conversations ([#15602](https://github.com/RocketChat/Rocket.Chat/pull/15602)) + +- Dynamic import of JS files were not working correctly ([#15598](https://github.com/RocketChat/Rocket.Chat/pull/15598)) + +- Emoji are rendered in URL ([#15516](https://github.com/RocketChat/Rocket.Chat/pull/15516) by [@oguhpereira](https://github.com/oguhpereira)) + +- Exposing some fields on server logs at debug level ([#15514](https://github.com/RocketChat/Rocket.Chat/pull/15514)) + +- Fix a typo on Alpha API `e2e.setUserPublicAndPivateKeys` renaming to `e2e.setUserPublicAndPrivateKeys` ([#13334](https://github.com/RocketChat/Rocket.Chat/pull/13334)) + +- Incorrect display of the button "Invite users" ([#15594](https://github.com/RocketChat/Rocket.Chat/pull/15594)) + +- Issues saving audio notifications ([#15428](https://github.com/RocketChat/Rocket.Chat/pull/15428) by [@scrivna](https://github.com/scrivna)) + +- Japanese translation for run import ([#15515](https://github.com/RocketChat/Rocket.Chat/pull/15515) by [@yusukeh0710](https://github.com/yusukeh0710)) + +- leak on stdout listeners ([#15586](https://github.com/RocketChat/Rocket.Chat/pull/15586)) + +- Method saveUser is not using password policy ([#15445](https://github.com/RocketChat/Rocket.Chat/pull/15445)) + +- Missing ending slash on publicFilePath of fileUpload ([#15506](https://github.com/RocketChat/Rocket.Chat/pull/15506)) + +- Promise await for sendMessage in livechat/messages endpoint ([#15460](https://github.com/RocketChat/Rocket.Chat/pull/15460) by [@hmagarotto](https://github.com/hmagarotto)) + +- Read Recepts was not working ([#15603](https://github.com/RocketChat/Rocket.Chat/pull/15603)) + +- Registration/login page now mobile friendly (#15422) ([#15520](https://github.com/RocketChat/Rocket.Chat/pull/15520) by [@nstseek](https://github.com/nstseek)) + +- Reset password was allowing empty values leading to an impossibility to login ([#15444](https://github.com/RocketChat/Rocket.Chat/pull/15444)) + +- Self-XSS in validation functionality ([#15564](https://github.com/RocketChat/Rocket.Chat/pull/15564)) + +- Showing announcement back ([#15615](https://github.com/RocketChat/Rocket.Chat/pull/15615)) + +- Typo in autotranslate method ([#15344](https://github.com/RocketChat/Rocket.Chat/pull/15344) by [@Montel](https://github.com/Montel)) + +- Update apps engine rooms converter to use transformMappedData ([#15546](https://github.com/RocketChat/Rocket.Chat/pull/15546)) + +
+🔍 Minor changes + + +- [CHORE] remove 'bulk-create-c' permission ([#15517](https://github.com/RocketChat/Rocket.Chat/pull/15517) by [@antkaz](https://github.com/antkaz)) + +- [CHORE] Split logger classes to avoid cyclic dependencies ([#15559](https://github.com/RocketChat/Rocket.Chat/pull/15559)) + +- [CHORE] Update latest Livechat widget version to 1.2.2 ([#15592](https://github.com/RocketChat/Rocket.Chat/pull/15592)) + +- [CHORE] Update latest Livechat widget version to 1.2.4 ([#15596](https://github.com/RocketChat/Rocket.Chat/pull/15596)) + +- [FEATURE] Rest API upload file returns message object ([#13821](https://github.com/RocketChat/Rocket.Chat/pull/13821) by [@knrt10](https://github.com/knrt10)) + +- [REGRESSION] Fix remove department from list ([#15591](https://github.com/RocketChat/Rocket.Chat/pull/15591)) + +- Chore: Add Client Setup Information to Issue Template ([#15625](https://github.com/RocketChat/Rocket.Chat/pull/15625)) + +- docs: remove rocket chat launcher link ([#15477](https://github.com/RocketChat/Rocket.Chat/pull/15477) by [@RafaelGSS](https://github.com/RafaelGSS)) + +- LingoHub based on develop ([#15487](https://github.com/RocketChat/Rocket.Chat/pull/15487)) + +- Livechat Issues ([#15473](https://github.com/RocketChat/Rocket.Chat/pull/15473)) + +- Merge master into develop ([#15680](https://github.com/RocketChat/Rocket.Chat/pull/15680) by [@knrt10](https://github.com/knrt10)) + +- Merge master into develop & Set version to 2.2.0-develop ([#15622](https://github.com/RocketChat/Rocket.Chat/pull/15622)) + +- Merge master into develop & Set version to 2.2.0-develop ([#15469](https://github.com/RocketChat/Rocket.Chat/pull/15469)) + +- Move publication deprecation warnings ([#15676](https://github.com/RocketChat/Rocket.Chat/pull/15676)) + +- New: Add dev dependency david badge to README ([#9058](https://github.com/RocketChat/Rocket.Chat/pull/9058) by [@robbyoconnor](https://github.com/robbyoconnor)) + +- Regression: add stdout publication back ([#15614](https://github.com/RocketChat/Rocket.Chat/pull/15614)) + +- Regression: AppRoomsConverter on Livechat rooms ([#15646](https://github.com/RocketChat/Rocket.Chat/pull/15646)) + +- Regression: Fix broken message formatting box ([#15599](https://github.com/RocketChat/Rocket.Chat/pull/15599)) + +- Regression: Fix package-lock.json ([#15561](https://github.com/RocketChat/Rocket.Chat/pull/15561)) + +- Regression: fix unknown role breaking hasPermission ([#15641](https://github.com/RocketChat/Rocket.Chat/pull/15641)) + +- Regression: hasPermission ignoring subscription roles ([#15652](https://github.com/RocketChat/Rocket.Chat/pull/15652)) + +- Regression: Move import to avoid circular dependencies ([#15628](https://github.com/RocketChat/Rocket.Chat/pull/15628)) + +- Regression: Remove reference to obsolete template helper ([#15675](https://github.com/RocketChat/Rocket.Chat/pull/15675)) + +- Release 2.1.2 ([#15667](https://github.com/RocketChat/Rocket.Chat/pull/15667) by [@knrt10](https://github.com/knrt10)) + +- Remove unneeded nginx file ([#15483](https://github.com/RocketChat/Rocket.Chat/pull/15483)) + +- Reply HTTP requests with `X-XSS-Protection: 1` header ([#15498](https://github.com/RocketChat/Rocket.Chat/pull/15498)) + +- Revert fix package-lock.json ([#15563](https://github.com/RocketChat/Rocket.Chat/pull/15563)) + +- Updating license term ([#15476](https://github.com/RocketChat/Rocket.Chat/pull/15476)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) +- [@Montel](https://github.com/Montel) +- [@RafaelGSS](https://github.com/RafaelGSS) +- [@antkaz](https://github.com/antkaz) +- [@hmagarotto](https://github.com/hmagarotto) +- [@juanpetterson](https://github.com/juanpetterson) +- [@knrt10](https://github.com/knrt10) +- [@mohamedar97](https://github.com/mohamedar97) +- [@nstseek](https://github.com/nstseek) +- [@oguhpereira](https://github.com/oguhpereira) +- [@robbyoconnor](https://github.com/robbyoconnor) +- [@rodrigokamada](https://github.com/rodrigokamada) +- [@scrivna](https://github.com/scrivna) +- [@ubarsaiyan](https://github.com/ubarsaiyan) +- [@unixtam](https://github.com/unixtam) +- [@yusukeh0710](https://github.com/yusukeh0710) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@d-gubert](https://github.com/d-gubert) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@mar-v](https://github.com/mar-v) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 2.1.3 +`2019-11-19 · 2 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.15.1` +- NPM: `6.9.0` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Markdown link parser ([#15794](https://github.com/RocketChat/Rocket.Chat/pull/15794)) + +- Updating an app via "Update" button errors out with "App already exists" ([#15814](https://github.com/RocketChat/Rocket.Chat/pull/15814)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@ggazzo](https://github.com/ggazzo) + +# 2.1.2 +`2019-10-25 · 3 🐛 · 1 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.15.1` +- NPM: `6.9.0` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Channel Announcements not working ([#14635](https://github.com/RocketChat/Rocket.Chat/pull/14635) by [@knrt10](https://github.com/knrt10)) + +- Exception when sending email of messages attachments undefined ([#15657](https://github.com/RocketChat/Rocket.Chat/pull/15657)) + +- Read Receipts were not working properly with subscriptions without ls ([#15656](https://github.com/RocketChat/Rocket.Chat/pull/15656)) + +
+🔍 Minor changes + + +- Release 2.1.2 ([#15667](https://github.com/RocketChat/Rocket.Chat/pull/15667) by [@knrt10](https://github.com/knrt10)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@knrt10](https://github.com/knrt10) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@rodrigok](https://github.com/rodrigok) +- [@tassoevan](https://github.com/tassoevan) + +# 2.1.1 +`2019-10-17 · 2 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.15.1` +- NPM: `6.9.0` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Dynamic import of JS files were not working correctly ([#15598](https://github.com/RocketChat/Rocket.Chat/pull/15598)) + +- Read Recepts was not working ([#15603](https://github.com/RocketChat/Rocket.Chat/pull/15603)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@rodrigok](https://github.com/rodrigok) + +# 2.1.0 +`2019-09-27 · 1 ️️️⚠️ · 13 🎉 · 12 🚀 · 22 🐛 · 22 🔍 · 20 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.15.1` +- NPM: `6.9.0` +- MongoDB: `3.4, 3.6, 4.0` + +### ⚠️ BREAKING CHANGES + + +- Deprecate old CORS API access for Cordova mobile app ([#15322](https://github.com/RocketChat/Rocket.Chat/pull/15322)) + +### 🎉 New features + + +- Add ability to disable email notifications globally ([#9667](https://github.com/RocketChat/Rocket.Chat/pull/9667) by [@ferdifly](https://github.com/ferdifly)) + +- Add JWT to uploaded files urls ([#15297](https://github.com/RocketChat/Rocket.Chat/pull/15297)) + +- Allow file sharing through Twilio(WhatsApp) integration ([#15415](https://github.com/RocketChat/Rocket.Chat/pull/15415)) + +- Apps engine Livechat ([#14626](https://github.com/RocketChat/Rocket.Chat/pull/14626)) + +- Expand SAML Users Role Settings ([#15277](https://github.com/RocketChat/Rocket.Chat/pull/15277) by [@Hudell](https://github.com/Hudell)) + +- Guess a user's name from SAML credentials ([#15240](https://github.com/RocketChat/Rocket.Chat/pull/15240) by [@mrsimpson](https://github.com/mrsimpson)) + +- Livechat setting to show/hide Agent Information on the widget ([#15216](https://github.com/RocketChat/Rocket.Chat/pull/15216)) + +- Only Load CodeMirror code when it is needed ([#15351](https://github.com/RocketChat/Rocket.Chat/pull/15351)) + +- Provide site-url to outgoing integrations ([#15238](https://github.com/RocketChat/Rocket.Chat/pull/15238) by [@mrsimpson](https://github.com/mrsimpson)) + +- SAML User Data Mapping ([#15404](https://github.com/RocketChat/Rocket.Chat/pull/15404)) + +- Setting to configure SAML context comparison ([#15229](https://github.com/RocketChat/Rocket.Chat/pull/15229)) + +- Setting to remove message contents from email notifications ([#15406](https://github.com/RocketChat/Rocket.Chat/pull/15406)) + +- Validate NotBefore and NotOnOrAfter SAML assertions ([#15226](https://github.com/RocketChat/Rocket.Chat/pull/15226)) + +### 🚀 Improvements + + +- A11y: Buttons, Images, Popups ([#15405](https://github.com/RocketChat/Rocket.Chat/pull/15405)) + +- Add CustomSounds.play() helper ([#15256](https://github.com/RocketChat/Rocket.Chat/pull/15256)) + +- Add missing indices used by read receipts ([#15316](https://github.com/RocketChat/Rocket.Chat/pull/15316)) + +- Add possibility of renaming a discussion ([#15122](https://github.com/RocketChat/Rocket.Chat/pull/15122)) + +- Administration UI ([#15401](https://github.com/RocketChat/Rocket.Chat/pull/15401)) + +- AvatarBlockUnauthenticatedAccess do not call user.find if you dont have to ([#15355](https://github.com/RocketChat/Rocket.Chat/pull/15355)) + +- Change default user's preference for notifications to 'All messages' ([#15420](https://github.com/RocketChat/Rocket.Chat/pull/15420)) + +- improve autolinker flow ([#15340](https://github.com/RocketChat/Rocket.Chat/pull/15340)) + +- Make the agents field optional when updating Livechat departments ([#15400](https://github.com/RocketChat/Rocket.Chat/pull/15400)) + +- Remove global Blaze helpers ([#15414](https://github.com/RocketChat/Rocket.Chat/pull/15414)) + +- Replace LESS autoprefixer plugin ([#15260](https://github.com/RocketChat/Rocket.Chat/pull/15260)) + +- User data export ([#15294](https://github.com/RocketChat/Rocket.Chat/pull/15294) by [@Hudell](https://github.com/Hudell)) + +### 🐛 Bug fixes + + +- Add ENV VAR to enable users create token feature ([#15334](https://github.com/RocketChat/Rocket.Chat/pull/15334)) + +- CAS users can take control of Rocket.Chat accounts ([#15346](https://github.com/RocketChat/Rocket.Chat/pull/15346)) + +- Delivering real-time messages to users that left a room ([#15389](https://github.com/RocketChat/Rocket.Chat/pull/15389)) + +- Don't allow email violating whitelist addresses ([#15339](https://github.com/RocketChat/Rocket.Chat/pull/15339)) + +- Double send bug on message box ([#15409](https://github.com/RocketChat/Rocket.Chat/pull/15409)) + +- Duplicate Channels in Search-bar ([#15056](https://github.com/RocketChat/Rocket.Chat/pull/15056)) + +- Empty custom emojis on emoji picker ([#15392](https://github.com/RocketChat/Rocket.Chat/pull/15392)) + +- Federation messages notifications ([#15418](https://github.com/RocketChat/Rocket.Chat/pull/15418)) + +- Fix file uploads JWT ([#15412](https://github.com/RocketChat/Rocket.Chat/pull/15412)) + +- Grammatical error in Not Found page ([#15382](https://github.com/RocketChat/Rocket.Chat/pull/15382)) + +- LDAP usernames get additional '.' if they contain numbers ([#14644](https://github.com/RocketChat/Rocket.Chat/pull/14644) by [@Hudell](https://github.com/Hudell)) + +- Limit exposed fields on some users. endpoints ([#15327](https://github.com/RocketChat/Rocket.Chat/pull/15327)) + +- Message box not centered ([#15367](https://github.com/RocketChat/Rocket.Chat/pull/15367)) + +- Notify admin was generating errors when Rocket.Cat user was edited or deleted ([#15387](https://github.com/RocketChat/Rocket.Chat/pull/15387)) + +- Property "permission" in slash commands of custom apps (#14739) ([#14741](https://github.com/RocketChat/Rocket.Chat/pull/14741) by [@ifantom](https://github.com/ifantom)) + +- Prune messages by cron if room not updated ([#15252](https://github.com/RocketChat/Rocket.Chat/pull/15252)) + +- Reduce Message cache time to 500ms ([#15295](https://github.com/RocketChat/Rocket.Chat/pull/15295) by [@vickyokrm](https://github.com/vickyokrm)) + +- REST API to return only public custom fields ([#15292](https://github.com/RocketChat/Rocket.Chat/pull/15292)) + +- REST endpoint `users.setPreferences` to not override all user's preferences ([#15288](https://github.com/RocketChat/Rocket.Chat/pull/15288)) + +- Set the DEFAULT_ECDH_CURVE to auto (#15245) ([#15365](https://github.com/RocketChat/Rocket.Chat/pull/15365) by [@dlundgren](https://github.com/dlundgren)) + +- Subscription record not having the `ls` field ([#14544](https://github.com/RocketChat/Rocket.Chat/pull/14544)) + +- User Profile Time Format ([#15385](https://github.com/RocketChat/Rocket.Chat/pull/15385)) + +
+🔍 Minor changes + + +- [CHORE] Move pathFor helper to templateHelpers directory ([#15255](https://github.com/RocketChat/Rocket.Chat/pull/15255)) + +- [CHORE] Remove obsolete modal template ([#15257](https://github.com/RocketChat/Rocket.Chat/pull/15257)) + +- [Fix] Missing space between last username & 'and' word in react notification ([#15384](https://github.com/RocketChat/Rocket.Chat/pull/15384) by [@zdumitru](https://github.com/zdumitru)) + +- Add a missing 'Discussion' translation key ([#14029](https://github.com/RocketChat/Rocket.Chat/pull/14029) by [@ura14h](https://github.com/ura14h)) + +- Fix typo in LDAP User Search setting description ([#15228](https://github.com/RocketChat/Rocket.Chat/pull/15228)) + +- Improve Polish translation ([#14060](https://github.com/RocketChat/Rocket.Chat/pull/14060) by [@stepek](https://github.com/stepek)) + +- Improve text of the search bar description ([#15353](https://github.com/RocketChat/Rocket.Chat/pull/15353)) + +- LingoHub based on develop ([#15377](https://github.com/RocketChat/Rocket.Chat/pull/15377)) + +- Merge master into develop & Set version to 2.1.0-develop ([#15357](https://github.com/RocketChat/Rocket.Chat/pull/15357)) + +- Regression: API CORS not working after Cordova being disabled by default ([#15443](https://github.com/RocketChat/Rocket.Chat/pull/15443)) + +- Regression: Favorite room button ([#15426](https://github.com/RocketChat/Rocket.Chat/pull/15426)) + +- Regression: Fix Commit Section when there is no commit info ([#15436](https://github.com/RocketChat/Rocket.Chat/pull/15436)) + +- Regression: Fix DDP metrics ([#15368](https://github.com/RocketChat/Rocket.Chat/pull/15368)) + +- Regression: Fix invalid version string error on marketplace screen ([#15437](https://github.com/RocketChat/Rocket.Chat/pull/15437)) + +- Regression: Messagebox height changing when typing ([#15380](https://github.com/RocketChat/Rocket.Chat/pull/15380)) + +- Regression: Prevent parsing empty custom field setting ([#15413](https://github.com/RocketChat/Rocket.Chat/pull/15413)) + +- Regression: setup wizard dynamic import using relative url ([#15432](https://github.com/RocketChat/Rocket.Chat/pull/15432)) + +- Remove GraphQL dependencies left ([#15356](https://github.com/RocketChat/Rocket.Chat/pull/15356)) + +- Remove log ADMIN_PASS environment variable ([#15307](https://github.com/RocketChat/Rocket.Chat/pull/15307)) + +- Update Apps-Engine version to final version ([#15458](https://github.com/RocketChat/Rocket.Chat/pull/15458)) + +- Update Meteor to 1.8.1 ([#15358](https://github.com/RocketChat/Rocket.Chat/pull/15358)) + +- Use version 2 of the DeepL API ([#15364](https://github.com/RocketChat/Rocket.Chat/pull/15364) by [@vickyokrm](https://github.com/vickyokrm)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) +- [@dlundgren](https://github.com/dlundgren) +- [@ferdifly](https://github.com/ferdifly) +- [@ifantom](https://github.com/ifantom) +- [@mrsimpson](https://github.com/mrsimpson) +- [@stepek](https://github.com/stepek) +- [@ura14h](https://github.com/ura14h) +- [@vickyokrm](https://github.com/vickyokrm) +- [@zdumitru](https://github.com/zdumitru) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@alansikora](https://github.com/alansikora) +- [@d-gubert](https://github.com/d-gubert) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 2.0.1 +`2019-11-19 · 2 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Markdown link parser ([#15794](https://github.com/RocketChat/Rocket.Chat/pull/15794)) + +- Updating an app via "Update" button errors out with "App already exists" ([#15814](https://github.com/RocketChat/Rocket.Chat/pull/15814)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@ggazzo](https://github.com/ggazzo) + +# 2.0.0 +`2019-09-12 · 7 ️️️⚠️ · 14 🎉 · 6 🚀 · 19 🐛 · 39 🔍 · 26 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.4, 3.6, 4.0` + +### ⚠️ BREAKING CHANGES + + +- Federation refactor with addition of chained events ([#15206](https://github.com/RocketChat/Rocket.Chat/pull/15206)) + +- Remove GraphQL and grant packages ([#15192](https://github.com/RocketChat/Rocket.Chat/pull/15192)) + +- Remove old livechat client ([#15133](https://github.com/RocketChat/Rocket.Chat/pull/15133)) + +- Remove publication `roomSubscriptionsByRole` ([#15193](https://github.com/RocketChat/Rocket.Chat/pull/15193)) + +- Remove publication `usersInRole` ([#15194](https://github.com/RocketChat/Rocket.Chat/pull/15194)) + +- Remove support of MongoDB 3.2 and deprecate MongoDB 3.4 ([#15199](https://github.com/RocketChat/Rocket.Chat/pull/15199)) + +- Replace tap:i18n to add support to 3-digit locales ([#15109](https://github.com/RocketChat/Rocket.Chat/pull/15109)) + +### 🎉 New features + + +- Add autotranslate Rest endpoints ([#14885](https://github.com/RocketChat/Rocket.Chat/pull/14885)) + +- Add Mobex to the list of SMS service providers ([#14655](https://github.com/RocketChat/Rocket.Chat/pull/14655) by [@zolbayars](https://github.com/zolbayars)) + +- Assume that Rocket.Chat runs behind one proxy by default (HTTP_FORWARDED_COUNT=1) ([#15214](https://github.com/RocketChat/Rocket.Chat/pull/15214)) + +- Custom message popups ([#15117](https://github.com/RocketChat/Rocket.Chat/pull/15117) by [@Hudell](https://github.com/Hudell)) + +- Endpoint to fetch livechat rooms with several filters ([#15155](https://github.com/RocketChat/Rocket.Chat/pull/15155)) + +- Granular permissions for settings ([#8942](https://github.com/RocketChat/Rocket.Chat/pull/8942) by [@mrsimpson](https://github.com/mrsimpson)) + +- Integrate DEEPL translation service to RC core ([#12174](https://github.com/RocketChat/Rocket.Chat/pull/12174) by [@mrsimpson](https://github.com/mrsimpson) & [@vickyokrm](https://github.com/vickyokrm)) + +- Jitsi meet room access via a token ([#12259](https://github.com/RocketChat/Rocket.Chat/pull/12259) by [@rrzharikov](https://github.com/rrzharikov)) + +- LDAP User Groups, Roles, and Channel Synchronization ([#14278](https://github.com/RocketChat/Rocket.Chat/pull/14278) by [@Hudell](https://github.com/Hudell) & [@wreiske](https://github.com/wreiske)) + +- Option to hide the button of Custom OAuth on login screen ([#15053](https://github.com/RocketChat/Rocket.Chat/pull/15053)) + +- Options for SAML auth for individual organizations needs ([#14275](https://github.com/RocketChat/Rocket.Chat/pull/14275) by [@Deltachaos](https://github.com/Deltachaos) & [@Hudell](https://github.com/Hudell)) + +- Rest API Endpoint to get pinned messages from a room ([#13864](https://github.com/RocketChat/Rocket.Chat/pull/13864) by [@thayannevls](https://github.com/thayannevls)) + +- Setup Wizard and Page not found, using React components ([#15204](https://github.com/RocketChat/Rocket.Chat/pull/15204)) + +- Support multiple push gateways ([#14902](https://github.com/RocketChat/Rocket.Chat/pull/14902) by [@cardoso](https://github.com/cardoso)) + +### 🚀 Improvements + + +- Add asset extension validation ([#15088](https://github.com/RocketChat/Rocket.Chat/pull/15088)) + +- Add limit of 50 user's resume tokens ([#15102](https://github.com/RocketChat/Rocket.Chat/pull/15102)) + +- Add possibility to use commands inside threads through Rest API ([#15167](https://github.com/RocketChat/Rocket.Chat/pull/15167)) + +- Livechat User Management Improvements ([#14736](https://github.com/RocketChat/Rocket.Chat/pull/14736) by [@Hudell](https://github.com/Hudell)) + +- Message tooltips as everyone else ([#15135](https://github.com/RocketChat/Rocket.Chat/pull/15135)) + +- Refactoring the queuing and routing processes of new livechats ([#15003](https://github.com/RocketChat/Rocket.Chat/pull/15003)) + +### 🐛 Bug fixes + + +- "Discussion" label in Sidebar not hidden, when Discussions are disabled (#14660) ([#14682](https://github.com/RocketChat/Rocket.Chat/pull/14682) by [@ifantom](https://github.com/ifantom)) + +- Attachment download button behavior ([#15172](https://github.com/RocketChat/Rocket.Chat/pull/15172)) + +- cachedcollection calling multiple times SYNC ([#15104](https://github.com/RocketChat/Rocket.Chat/pull/15104)) + +- Forget user session on window close ([#15205](https://github.com/RocketChat/Rocket.Chat/pull/15205)) + +- IE11 - callback createTreeWalker doesnt accept acceptNode ([#15157](https://github.com/RocketChat/Rocket.Chat/pull/15157)) + +- IE11 baseURI ([#15319](https://github.com/RocketChat/Rocket.Chat/pull/15319)) + +- IE11 modal, menu action and edit user page ([#15201](https://github.com/RocketChat/Rocket.Chat/pull/15201)) + +- Mark room as read logic ([#15174](https://github.com/RocketChat/Rocket.Chat/pull/15174)) + +- Messages search scroll ([#15175](https://github.com/RocketChat/Rocket.Chat/pull/15175)) + +- Prevent to create discussion with empty name ([#14507](https://github.com/RocketChat/Rocket.Chat/pull/14507)) + +- Rate limit incoming integrations (webhooks) ([#15038](https://github.com/RocketChat/Rocket.Chat/pull/15038) by [@mrsimpson](https://github.com/mrsimpson)) + +- Redirect on app manual install ([#15306](https://github.com/RocketChat/Rocket.Chat/pull/15306)) + +- Remove new hidden file and fix for .env files for Snap ([#15120](https://github.com/RocketChat/Rocket.Chat/pull/15120)) + +- Search message wrongly grouping messages ([#15094](https://github.com/RocketChat/Rocket.Chat/pull/15094)) + +- TabBar not loading template titles ([#15177](https://github.com/RocketChat/Rocket.Chat/pull/15177) by [@Hudell](https://github.com/Hudell)) + +- Threads contextual bar button visible even with threads disabled ([#14956](https://github.com/RocketChat/Rocket.Chat/pull/14956) by [@cesarmal](https://github.com/cesarmal)) + +- Typo in 'access-permissions_description' ja translation ([#15162](https://github.com/RocketChat/Rocket.Chat/pull/15162) by [@NatsumiKubo](https://github.com/NatsumiKubo)) + +- User's auto complete showing everyone on the server ([#15212](https://github.com/RocketChat/Rocket.Chat/pull/15212)) + +- Webdav crash ([#14918](https://github.com/RocketChat/Rocket.Chat/pull/14918)) + +
+🔍 Minor changes + + +- Add new step to build Docker image from PRs for production again ([#15124](https://github.com/RocketChat/Rocket.Chat/pull/15124)) + +- Add oplog events metrics ([#15249](https://github.com/RocketChat/Rocket.Chat/pull/15249)) + +- Add wreiske to authorized users in catbot ([#15147](https://github.com/RocketChat/Rocket.Chat/pull/15147)) + +- Allow file upload paths on attachments URLs ([#15121](https://github.com/RocketChat/Rocket.Chat/pull/15121)) + +- Change notifications file imports to server ([#15184](https://github.com/RocketChat/Rocket.Chat/pull/15184)) + +- Federation improvements ([#15234](https://github.com/RocketChat/Rocket.Chat/pull/15234)) + +- Federation migration and additional improvements ([#15336](https://github.com/RocketChat/Rocket.Chat/pull/15336)) + +- Fix apps list error ([#15258](https://github.com/RocketChat/Rocket.Chat/pull/15258)) + +- Fix automated test for manual user activation ([#14978](https://github.com/RocketChat/Rocket.Chat/pull/14978) by [@mrsimpson](https://github.com/mrsimpson)) + +- Fix get IP for rate limiter ([#15262](https://github.com/RocketChat/Rocket.Chat/pull/15262)) + +- Fix v148 migration ([#15285](https://github.com/RocketChat/Rocket.Chat/pull/15285)) + +- Improve url validation inside message object ([#15074](https://github.com/RocketChat/Rocket.Chat/pull/15074)) + +- LingoHub based on develop ([#15218](https://github.com/RocketChat/Rocket.Chat/pull/15218)) + +- LingoHub based on develop ([#15166](https://github.com/RocketChat/Rocket.Chat/pull/15166)) + +- LingoHub based on develop ([#15115](https://github.com/RocketChat/Rocket.Chat/pull/15115)) + +- Merge master into develop & Set version to 1.4.0-develop ([#15097](https://github.com/RocketChat/Rocket.Chat/pull/15097)) + +- NEW: Apps enable after app installed ([#15202](https://github.com/RocketChat/Rocket.Chat/pull/15202)) + +- Regression: addPermissionToRole argument as string ([#15267](https://github.com/RocketChat/Rocket.Chat/pull/15267)) + +- Regression: cachedCollection wrong callback parameters ([#15136](https://github.com/RocketChat/Rocket.Chat/pull/15136)) + +- Regression: Double error toast on Setup Wizard ([#15268](https://github.com/RocketChat/Rocket.Chat/pull/15268)) + +- Regression: Errors on the console preventing some settings to be saved ([#15310](https://github.com/RocketChat/Rocket.Chat/pull/15310)) + +- Regression: Fix assets extension detection ([#15231](https://github.com/RocketChat/Rocket.Chat/pull/15231)) + +- Regression: fix typo permisson to permission ([#15217](https://github.com/RocketChat/Rocket.Chat/pull/15217)) + +- Regression: Fix wrong import and minor code improvements ([#15352](https://github.com/RocketChat/Rocket.Chat/pull/15352)) + +- Regression: last message doesn't update after reconnect ([#15329](https://github.com/RocketChat/Rocket.Chat/pull/15329)) + +- Regression: New Livechat methods and processes ([#15242](https://github.com/RocketChat/Rocket.Chat/pull/15242)) + +- Regression: Remove duplicated permission changes emitter ([#15321](https://github.com/RocketChat/Rocket.Chat/pull/15321)) + +- Regression: remove livechat cache from circle ci ([#15183](https://github.com/RocketChat/Rocket.Chat/pull/15183)) + +- Regression: Remove old scripts of Setup Wizard ([#15263](https://github.com/RocketChat/Rocket.Chat/pull/15263)) + +- Release 1.3.2 ([#15176](https://github.com/RocketChat/Rocket.Chat/pull/15176)) + +- Remove GPG file ([#15146](https://github.com/RocketChat/Rocket.Chat/pull/15146)) + +- removed unwanted code ([#15078](https://github.com/RocketChat/Rocket.Chat/pull/15078) by [@httpsOmkar](https://github.com/httpsOmkar)) + +- Switch outdated roadmap to point to milestones ([#15156](https://github.com/RocketChat/Rocket.Chat/pull/15156)) + +- Update latest Livechat widget version to 1.1.4 ([#15173](https://github.com/RocketChat/Rocket.Chat/pull/15173)) + +- Update latest Livechat widget version(1.1.3) ([#15154](https://github.com/RocketChat/Rocket.Chat/pull/15154)) + +- Update Livechat to 1.1.6 ([#15186](https://github.com/RocketChat/Rocket.Chat/pull/15186)) + +- Update presence package ([#15178](https://github.com/RocketChat/Rocket.Chat/pull/15178)) + +- Update pt-BR.i18n.json ([#15083](https://github.com/RocketChat/Rocket.Chat/pull/15083) by [@lucassmacedo](https://github.com/lucassmacedo)) + +- Update to version 2.0.0-develop ([#15142](https://github.com/RocketChat/Rocket.Chat/pull/15142)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Deltachaos](https://github.com/Deltachaos) +- [@Hudell](https://github.com/Hudell) +- [@NatsumiKubo](https://github.com/NatsumiKubo) +- [@cardoso](https://github.com/cardoso) +- [@cesarmal](https://github.com/cesarmal) +- [@httpsOmkar](https://github.com/httpsOmkar) +- [@ifantom](https://github.com/ifantom) +- [@lucassmacedo](https://github.com/lucassmacedo) +- [@mrsimpson](https://github.com/mrsimpson) +- [@rrzharikov](https://github.com/rrzharikov) +- [@thayannevls](https://github.com/thayannevls) +- [@vickyokrm](https://github.com/vickyokrm) +- [@wreiske](https://github.com/wreiske) +- [@zolbayars](https://github.com/zolbayars) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@LuluGO](https://github.com/LuluGO) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@alansikora](https://github.com/alansikora) +- [@d-gubert](https://github.com/d-gubert) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 1.3.5 +`2020-12-18 · 2 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- Apps-Engine: `1.5.1` + +### 🐛 Bug fixes + + +- Issue with special message rendering ([#19817](https://github.com/RocketChat/Rocket.Chat/pull/19817)) + +- Problem with attachment render ([#19854](https://github.com/RocketChat/Rocket.Chat/pull/19854)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) + +# 1.3.3 +`2019-11-19 · 2 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Markdown link parser ([#15794](https://github.com/RocketChat/Rocket.Chat/pull/15794)) + +- Updating an app via "Update" button errors out with "App already exists" ([#15814](https://github.com/RocketChat/Rocket.Chat/pull/15814)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@ggazzo](https://github.com/ggazzo) + +# 1.3.2 +`2019-08-14 · 3 🐛 · 3 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Attachment download button behavior ([#15172](https://github.com/RocketChat/Rocket.Chat/pull/15172)) + +- IE11 - callback createTreeWalker doesnt accept acceptNode ([#15157](https://github.com/RocketChat/Rocket.Chat/pull/15157)) + +- Messages search scroll ([#15175](https://github.com/RocketChat/Rocket.Chat/pull/15175)) + +
+🔍 Minor changes + + +- Release 1.3.2 ([#15176](https://github.com/RocketChat/Rocket.Chat/pull/15176)) + +- Update latest Livechat widget version to 1.1.4 ([#15173](https://github.com/RocketChat/Rocket.Chat/pull/15173)) + +- Update latest Livechat widget version(1.1.3) ([#15154](https://github.com/RocketChat/Rocket.Chat/pull/15154)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 1.3.1 +`2019-08-08 · 2 🐛 · 2 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Custom emoji table scroll ([#15119](https://github.com/RocketChat/Rocket.Chat/pull/15119)) + +- Direct Message names not visible on Admin panel ([#15114](https://github.com/RocketChat/Rocket.Chat/pull/15114)) + +
+🔍 Minor changes + + +- Fix custom auth ([#15141](https://github.com/RocketChat/Rocket.Chat/pull/15141)) + +- Release 1.3.1 ([#15148](https://github.com/RocketChat/Rocket.Chat/pull/15148)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@ggazzo](https://github.com/ggazzo) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 1.3.0 +`2019-08-02 · 9 🎉 · 6 🚀 · 32 🐛 · 32 🔍 · 29 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🎉 New features + + +- Accept multiple redirect URIs on OAuth Apps ([#14935](https://github.com/RocketChat/Rocket.Chat/pull/14935) by [@Hudell](https://github.com/Hudell)) + +- Deprecate MongoDB version 3.2 ([#15025](https://github.com/RocketChat/Rocket.Chat/pull/15025)) + +- Options to filter discussion and livechat on Admin > Rooms ([#15019](https://github.com/RocketChat/Rocket.Chat/pull/15019)) + +- Setting to configure custom authn context on SAML requests ([#14675](https://github.com/RocketChat/Rocket.Chat/pull/14675) by [@Hudell](https://github.com/Hudell)) + +- Setting to prevent Livechat agents online when Office Hours are closed ([#14921](https://github.com/RocketChat/Rocket.Chat/pull/14921)) + +- Settings to further customize GitLab OAuth ([#15014](https://github.com/RocketChat/Rocket.Chat/pull/15014) by [@Hudell](https://github.com/Hudell)) + +- Show helpful error when oplog is missing ([#14954](https://github.com/RocketChat/Rocket.Chat/pull/14954) by [@justinr1234](https://github.com/justinr1234)) + +- Subscription enabled marketplace ([#14948](https://github.com/RocketChat/Rocket.Chat/pull/14948)) + +- Webdav File Picker ([#14879](https://github.com/RocketChat/Rocket.Chat/pull/14879) by [@ubarsaiyan](https://github.com/ubarsaiyan)) + +### 🚀 Improvements + + +- Add descriptions on user data download buttons and popup info ([#14852](https://github.com/RocketChat/Rocket.Chat/pull/14852)) + +- Add flag to identify remote federation users ([#15004](https://github.com/RocketChat/Rocket.Chat/pull/15004)) + +- Connectivity Services License Sync ([#15022](https://github.com/RocketChat/Rocket.Chat/pull/15022)) + +- Extract federation config to its own file ([#14992](https://github.com/RocketChat/Rocket.Chat/pull/14992)) + +- Remove too specific helpers isFirefox() and isChrome() ([#14963](https://github.com/RocketChat/Rocket.Chat/pull/14963)) + +- Update tabs markup ([#14964](https://github.com/RocketChat/Rocket.Chat/pull/14964)) + +### 🐛 Bug fixes + + +- 50 custom emoji limit ([#14951](https://github.com/RocketChat/Rocket.Chat/pull/14951)) + +- Allow storing the navigation history of unregistered Livechat visitors ([#14970](https://github.com/RocketChat/Rocket.Chat/pull/14970)) + +- Always displaying jumbomojis when using "marked" markdown ([#14861](https://github.com/RocketChat/Rocket.Chat/pull/14861) by [@brakhane](https://github.com/brakhane)) + +- Chrome doesn't load additional search results when bottom is reached ([#14965](https://github.com/RocketChat/Rocket.Chat/pull/14965)) + +- Custom User Status throttled by rate limiter ([#15001](https://github.com/RocketChat/Rocket.Chat/pull/15001) by [@Hudell](https://github.com/Hudell)) + +- CustomOauth Identity Step errors displayed in HTML format ([#15000](https://github.com/RocketChat/Rocket.Chat/pull/15000) by [@Hudell](https://github.com/Hudell)) + +- Edit message with arrow up key if not last message ([#15021](https://github.com/RocketChat/Rocket.Chat/pull/15021)) + +- Edit permissions screen ([#14950](https://github.com/RocketChat/Rocket.Chat/pull/14950)) + +- eternal loading file list ([#14952](https://github.com/RocketChat/Rocket.Chat/pull/14952)) + +- Invite users auto complete cropping results ([#15020](https://github.com/RocketChat/Rocket.Chat/pull/15020)) + +- Jump to message missing in Starred Messages ([#14949](https://github.com/RocketChat/Rocket.Chat/pull/14949)) + +- LDAP login with customField sync ([#14808](https://github.com/RocketChat/Rocket.Chat/pull/14808) by [@magicbelette](https://github.com/magicbelette)) + +- Livechat dashboard average and reaction time labels ([#14845](https://github.com/RocketChat/Rocket.Chat/pull/14845) by [@anandpathak](https://github.com/anandpathak)) + +- load more messages ([#14967](https://github.com/RocketChat/Rocket.Chat/pull/14967)) + +- Loading indicator positioning ([#14968](https://github.com/RocketChat/Rocket.Chat/pull/14968)) + +- Message attachments not allowing float numbers ([#14412](https://github.com/RocketChat/Rocket.Chat/pull/14412)) + +- Method `getUsersOfRoom` not returning offline users if limit is not defined ([#14753](https://github.com/RocketChat/Rocket.Chat/pull/14753)) + +- Not being able to mention users with "all" and "here" usernames - do not allow users register that usernames ([#14468](https://github.com/RocketChat/Rocket.Chat/pull/14468) by [@hamidrezabstn](https://github.com/hamidrezabstn)) + +- Not sanitized message types ([#15054](https://github.com/RocketChat/Rocket.Chat/pull/15054)) + +- Opening Livechat messages on mobile apps ([#14785](https://github.com/RocketChat/Rocket.Chat/pull/14785) by [@zolbayars](https://github.com/zolbayars)) + +- OTR key icon missing on messages ([#14953](https://github.com/RocketChat/Rocket.Chat/pull/14953)) + +- Prevent error on trying insert message with duplicated id ([#14945](https://github.com/RocketChat/Rocket.Chat/pull/14945)) + +- Russian grammatical errors ([#14622](https://github.com/RocketChat/Rocket.Chat/pull/14622) by [@BehindLoader](https://github.com/BehindLoader)) + +- SAML login by giving displayName priority over userName for fullName ([#14880](https://github.com/RocketChat/Rocket.Chat/pull/14880) by [@pkolmann](https://github.com/pkolmann)) + +- setupWizard calling multiple getSetupWizardParameters ([#15060](https://github.com/RocketChat/Rocket.Chat/pull/15060)) + +- SVG uploads crashing process ([#15006](https://github.com/RocketChat/Rocket.Chat/pull/15006) by [@snoopotic](https://github.com/snoopotic)) + +- Typo in german translation ([#14833](https://github.com/RocketChat/Rocket.Chat/pull/14833) by [@Le-onardo](https://github.com/Le-onardo)) + +- Users staying online after logout ([#14966](https://github.com/RocketChat/Rocket.Chat/pull/14966)) + +- users.setStatus REST endpoint not allowing reset status message ([#14916](https://github.com/RocketChat/Rocket.Chat/pull/14916) by [@cardoso](https://github.com/cardoso)) + +- Video recorder message echo ([#14671](https://github.com/RocketChat/Rocket.Chat/pull/14671) by [@vova-zush](https://github.com/vova-zush)) + +- Wrong custom status displayed on room leader panel ([#14958](https://github.com/RocketChat/Rocket.Chat/pull/14958) by [@Hudell](https://github.com/Hudell)) + +- Wrong label order on room settings ([#14960](https://github.com/RocketChat/Rocket.Chat/pull/14960) by [@Hudell](https://github.com/Hudell)) + +
+🔍 Minor changes + + +- [IMPROVEMENT] patch to improve emoji render ([#14722](https://github.com/RocketChat/Rocket.Chat/pull/14722)) + +- Add missing French translation ([#15013](https://github.com/RocketChat/Rocket.Chat/pull/15013) by [@commiaI](https://github.com/commiaI)) + +- Always convert the sha256 password to lowercase on checking ([#14941](https://github.com/RocketChat/Rocket.Chat/pull/14941)) + +- Bump jquery from 3.3.1 to 3.4.0 in /packages/rocketchat-livechat/.app ([#14922](https://github.com/RocketChat/Rocket.Chat/pull/14922) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump juice version to 5.2.0 ([#14974](https://github.com/RocketChat/Rocket.Chat/pull/14974)) + +- Bump marked from 0.5.2 to 0.6.1 ([#14969](https://github.com/RocketChat/Rocket.Chat/pull/14969) by [@dependabot[bot]](https://github.com/dependabot[bot])) + +- Bump node-rsa version to 1.0.5 ([#14976](https://github.com/RocketChat/Rocket.Chat/pull/14976)) + +- Bump photoswipe version to 4.1.3 ([#14977](https://github.com/RocketChat/Rocket.Chat/pull/14977)) + +- Callbacks perf ([#14915](https://github.com/RocketChat/Rocket.Chat/pull/14915)) + +- Extract canSendMessage function ([#14909](https://github.com/RocketChat/Rocket.Chat/pull/14909)) + +- Fix statistics error for apps on first load ([#15026](https://github.com/RocketChat/Rocket.Chat/pull/15026)) + +- Improve Docker compose readability ([#14457](https://github.com/RocketChat/Rocket.Chat/pull/14457) by [@NateScarlet](https://github.com/NateScarlet)) + +- Improve: Get public key for marketplace ([#14851](https://github.com/RocketChat/Rocket.Chat/pull/14851)) + +- improve: relocate some of wizard info to register ([#14884](https://github.com/RocketChat/Rocket.Chat/pull/14884)) + +- Merge master into develop & Set version to 1.3.0-develop ([#14889](https://github.com/RocketChat/Rocket.Chat/pull/14889) by [@Hudell](https://github.com/Hudell)) + +- New: Apps and integrations statistics ([#14878](https://github.com/RocketChat/Rocket.Chat/pull/14878)) + +- Regression: Apps and Marketplace UI issues ([#15045](https://github.com/RocketChat/Rocket.Chat/pull/15045)) + +- Regression: displaying errors for apps not installed from Marketplace ([#15075](https://github.com/RocketChat/Rocket.Chat/pull/15075)) + +- Regression: fix code style, setup wizard error and profile page header ([#15041](https://github.com/RocketChat/Rocket.Chat/pull/15041)) + +- Regression: Framework version being attached to a request that doesn't require it ([#15039](https://github.com/RocketChat/Rocket.Chat/pull/15039)) + +- Regression: getSetupWizardParameters ([#15067](https://github.com/RocketChat/Rocket.Chat/pull/15067)) + +- Regression: Improve apps bridges for HA setup ([#15080](https://github.com/RocketChat/Rocket.Chat/pull/15080)) + +- Regression: Marketplace app pricing plan description ([#15076](https://github.com/RocketChat/Rocket.Chat/pull/15076)) + +- Regression: patch to improve emoji render ([#14980](https://github.com/RocketChat/Rocket.Chat/pull/14980)) + +- Regression: uninstall subscribed app modal ([#15077](https://github.com/RocketChat/Rocket.Chat/pull/15077)) + +- Regression: Webdav File Picker search and fixed overflows ([#15027](https://github.com/RocketChat/Rocket.Chat/pull/15027) by [@ubarsaiyan](https://github.com/ubarsaiyan)) + +- Release 1.2.1 ([#14898](https://github.com/RocketChat/Rocket.Chat/pull/14898)) + +- Remove unused dependency (lokijs) ([#14973](https://github.com/RocketChat/Rocket.Chat/pull/14973)) + +- Remove unused Meteor dependency (yasinuslu:blaze-meta) ([#14971](https://github.com/RocketChat/Rocket.Chat/pull/14971)) + +- Split oplog emitters in files ([#14917](https://github.com/RocketChat/Rocket.Chat/pull/14917)) + +- Update Livechat widget ([#15046](https://github.com/RocketChat/Rocket.Chat/pull/15046)) + +- Wrong text when reporting a message ([#14515](https://github.com/RocketChat/Rocket.Chat/pull/14515) by [@zdumitru](https://github.com/zdumitru)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@BehindLoader](https://github.com/BehindLoader) +- [@Hudell](https://github.com/Hudell) +- [@Le-onardo](https://github.com/Le-onardo) +- [@NateScarlet](https://github.com/NateScarlet) +- [@anandpathak](https://github.com/anandpathak) +- [@brakhane](https://github.com/brakhane) +- [@cardoso](https://github.com/cardoso) +- [@commiaI](https://github.com/commiaI) +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@hamidrezabstn](https://github.com/hamidrezabstn) +- [@justinr1234](https://github.com/justinr1234) +- [@magicbelette](https://github.com/magicbelette) +- [@pkolmann](https://github.com/pkolmann) +- [@snoopotic](https://github.com/snoopotic) +- [@ubarsaiyan](https://github.com/ubarsaiyan) +- [@vova-zush](https://github.com/vova-zush) +- [@zdumitru](https://github.com/zdumitru) +- [@zolbayars](https://github.com/zolbayars) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@alansikora](https://github.com/alansikora) +- [@d-gubert](https://github.com/d-gubert) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 1.2.4 +`2019-08-08 · 1 🔍 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +
+🔍 Minor changes + + +- Fix custom auth ([#15141](https://github.com/RocketChat/Rocket.Chat/pull/15141)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) + +# 1.2.2 +`2019-07-29 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Not sanitized message types ([#15054](https://github.com/RocketChat/Rocket.Chat/pull/15054)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) + +# 1.2.1 +`2019-06-28 · 1 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Not showing local app on App Details ([#14894](https://github.com/RocketChat/Rocket.Chat/pull/14894)) + +
+🔍 Minor changes + + +- Release 1.2.1 ([#14898](https://github.com/RocketChat/Rocket.Chat/pull/14898)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 1.2.0 +`2019-06-27 · 8 🎉 · 4 🚀 · 13 🐛 · 9 🔍 · 21 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🎉 New features + + +- Add Livechat inquiries endpoints ([#14779](https://github.com/RocketChat/Rocket.Chat/pull/14779)) + +- Add loading animation to webdav file picker ([#14759](https://github.com/RocketChat/Rocket.Chat/pull/14759) by [@ubarsaiyan](https://github.com/ubarsaiyan)) + +- Add tmid property to outgoing integration ([#14699](https://github.com/RocketChat/Rocket.Chat/pull/14699)) + +- changed mongo version for snap from 3.2.7 to 3.4.20 ([#14838](https://github.com/RocketChat/Rocket.Chat/pull/14838)) + +- Configuration to limit amount of livechat inquiries displayed ([#14690](https://github.com/RocketChat/Rocket.Chat/pull/14690)) + +- Custom User Status ([#13933](https://github.com/RocketChat/Rocket.Chat/pull/13933) by [@Hudell](https://github.com/Hudell) & [@wreiske](https://github.com/wreiske)) + +- Endpoint to anonymously read channel's messages ([#14714](https://github.com/RocketChat/Rocket.Chat/pull/14714)) + +- Show App bundles and its apps ([#14886](https://github.com/RocketChat/Rocket.Chat/pull/14886)) + +### 🚀 Improvements + + +- Add an optional rocketchat-protocol DNS entry for Federation ([#14589](https://github.com/RocketChat/Rocket.Chat/pull/14589)) + +- Adds link to download generated user data file ([#14175](https://github.com/RocketChat/Rocket.Chat/pull/14175) by [@Hudell](https://github.com/Hudell)) + +- Layout of livechat manager pages to new style ([#13900](https://github.com/RocketChat/Rocket.Chat/pull/13900)) + +- Use configurable colors on sidebar items ([#14624](https://github.com/RocketChat/Rocket.Chat/pull/14624)) + +### 🐛 Bug fixes + + +- Assume microphone is available ([#14710](https://github.com/RocketChat/Rocket.Chat/pull/14710)) + +- Custom status fixes ([#14853](https://github.com/RocketChat/Rocket.Chat/pull/14853) by [@Hudell](https://github.com/Hudell) & [@wreiske](https://github.com/wreiske)) + +- Direct reply delete config and description ([#14493](https://github.com/RocketChat/Rocket.Chat/pull/14493) by [@ruKurz](https://github.com/ruKurz)) + +- Error when using Download My Data or Export My Data ([#14645](https://github.com/RocketChat/Rocket.Chat/pull/14645) by [@Hudell](https://github.com/Hudell)) + +- Gap of messages when loading history when using threads ([#14837](https://github.com/RocketChat/Rocket.Chat/pull/14837)) + +- Import Chart.js error ([#14471](https://github.com/RocketChat/Rocket.Chat/pull/14471) by [@Hudell](https://github.com/Hudell) & [@sonbn0](https://github.com/sonbn0)) + +- Increasing time to rate limit in shield.svg endpoint and add a setting to disable API rate limiter ([#14709](https://github.com/RocketChat/Rocket.Chat/pull/14709)) + +- LinkedIn OAuth login ([#14887](https://github.com/RocketChat/Rocket.Chat/pull/14887) by [@Hudell](https://github.com/Hudell)) + +- Move the set Avatar call on user creation to make sure the user has username ([#14665](https://github.com/RocketChat/Rocket.Chat/pull/14665)) + +- Name is undefined in some emails ([#14533](https://github.com/RocketChat/Rocket.Chat/pull/14533)) + +- Removes E2E action button, icon and banner when E2E is disabled. ([#14810](https://github.com/RocketChat/Rocket.Chat/pull/14810)) + +- users typing forever ([#14724](https://github.com/RocketChat/Rocket.Chat/pull/14724)) + +- Wrong filter field when filtering current Livechats ([#14569](https://github.com/RocketChat/Rocket.Chat/pull/14569)) + +
+🔍 Minor changes + + +- Add custom fileupload whitelist property ([#14754](https://github.com/RocketChat/Rocket.Chat/pull/14754)) + +- Allow debugging of cached collections by name ([#14859](https://github.com/RocketChat/Rocket.Chat/pull/14859)) + +- Extract permissions functions ([#14777](https://github.com/RocketChat/Rocket.Chat/pull/14777)) + +- Fix not fully extracted pieces ([#14805](https://github.com/RocketChat/Rocket.Chat/pull/14805)) + +- Merge master into develop & Set version to 1.2.0-develop ([#14656](https://github.com/RocketChat/Rocket.Chat/pull/14656) by [@AnBo83](https://github.com/AnBo83) & [@knrt10](https://github.com/knrt10) & [@lolimay](https://github.com/lolimay) & [@mohamedar97](https://github.com/mohamedar97) & [@thaiphv](https://github.com/thaiphv)) + +- Regression: Allow debugging of cached collections by name ([#14862](https://github.com/RocketChat/Rocket.Chat/pull/14862)) + +- Regression: Fix desktop notifications not being sent ([#14860](https://github.com/RocketChat/Rocket.Chat/pull/14860)) + +- Regression: Fix file upload ([#14804](https://github.com/RocketChat/Rocket.Chat/pull/14804)) + +- Regression: thread loading parent msg if is not loaded ([#14839](https://github.com/RocketChat/Rocket.Chat/pull/14839)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@AnBo83](https://github.com/AnBo83) +- [@Hudell](https://github.com/Hudell) +- [@knrt10](https://github.com/knrt10) +- [@lolimay](https://github.com/lolimay) +- [@mohamedar97](https://github.com/mohamedar97) +- [@ruKurz](https://github.com/ruKurz) +- [@sonbn0](https://github.com/sonbn0) +- [@thaiphv](https://github.com/thaiphv) +- [@ubarsaiyan](https://github.com/ubarsaiyan) +- [@wreiske](https://github.com/wreiske) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@LuluGO](https://github.com/LuluGO) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@PrajvalRaval](https://github.com/PrajvalRaval) +- [@alansikora](https://github.com/alansikora) +- [@engelgabriel](https://github.com/engelgabriel) +- [@ggazzo](https://github.com/ggazzo) +- [@marceloschmidt](https://github.com/marceloschmidt) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 1.1.5 +`2019-08-08 · 1 🔍 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +
+🔍 Minor changes + + +- Fix custom auth ([#15141](https://github.com/RocketChat/Rocket.Chat/pull/15141)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) + +# 1.1.4 +`2019-07-29 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Not sanitized message types ([#15054](https://github.com/RocketChat/Rocket.Chat/pull/15054)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) + +# 1.1.3 +`2019-06-21 · 1 🐛 · 2 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Gap of messages when loading history when using threads ([#14837](https://github.com/RocketChat/Rocket.Chat/pull/14837)) + +
+🔍 Minor changes + + +- Regression: thread loading parent msg if is not loaded ([#14839](https://github.com/RocketChat/Rocket.Chat/pull/14839)) + +- Release 1.1.3 ([#14850](https://github.com/RocketChat/Rocket.Chat/pull/14850)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 1.1.2 +`2019-06-17 · 3 🐛 · 1 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Anonymous chat read ([#14717](https://github.com/RocketChat/Rocket.Chat/pull/14717)) + +- User Real Name being erased when not modified ([#14711](https://github.com/RocketChat/Rocket.Chat/pull/14711) by [@Hudell](https://github.com/Hudell)) + +- User status information on User Info panel ([#14763](https://github.com/RocketChat/Rocket.Chat/pull/14763)) + +
+🔍 Minor changes + + +- Release 1.1.2 ([#14823](https://github.com/RocketChat/Rocket.Chat/pull/14823) by [@Hudell](https://github.com/Hudell)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@ggazzo](https://github.com/ggazzo) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 1.1.1 +`2019-05-30 · 2 🐛 · 1 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Load messages after disconnect and message box scroll missing ([#14668](https://github.com/RocketChat/Rocket.Chat/pull/14668)) + +- SAML login error. ([#14686](https://github.com/RocketChat/Rocket.Chat/pull/14686) by [@Hudell](https://github.com/Hudell)) + +
+🔍 Minor changes + + +- Removing unnecesary federation configs ([#14674](https://github.com/RocketChat/Rocket.Chat/pull/14674)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@alansikora](https://github.com/alansikora) +- [@ggazzo](https://github.com/ggazzo) + +# 1.1.0 +`2019-05-27 · 5 🎉 · 10 🚀 · 59 🐛 · 35 🔍 · 28 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🎉 New features + + +- Add pause and reset button when adding custom sound ([#13615](https://github.com/RocketChat/Rocket.Chat/pull/13615) by [@knrt10](https://github.com/knrt10)) + +- Custom user name field from Custom OAuth ([#14381](https://github.com/RocketChat/Rocket.Chat/pull/14381) by [@mjovanovic0](https://github.com/mjovanovic0)) + +- Missing "view-outside-room_description" translation key ([#13680](https://github.com/RocketChat/Rocket.Chat/pull/13680) by [@bhardwajaditya](https://github.com/bhardwajaditya)) + +- Returns custom emojis through the Livechat REST API ([#14370](https://github.com/RocketChat/Rocket.Chat/pull/14370)) + +- Setting option to mark as containing a secret/password ([#10273](https://github.com/RocketChat/Rocket.Chat/pull/10273)) + +### 🚀 Improvements + + +- Added flag `skipActiveUsersToBeReady` to not wait the load of `active users` to present the Web interface ([#14431](https://github.com/RocketChat/Rocket.Chat/pull/14431)) + +- Allow change Discussion's properties ([#14389](https://github.com/RocketChat/Rocket.Chat/pull/14389)) + +- Change user presence events to Meteor Streams ([#14488](https://github.com/RocketChat/Rocket.Chat/pull/14488)) + +- Don't show unread count badge in burger menu if it is from the opened room ([#12971](https://github.com/RocketChat/Rocket.Chat/pull/12971)) + +- Don't use regex to find users ([#14397](https://github.com/RocketChat/Rocket.Chat/pull/14397)) + +- jump to selected message on open thread ([#14460](https://github.com/RocketChat/Rocket.Chat/pull/14460)) + +- Livechat CRM secret token optional ([#14022](https://github.com/RocketChat/Rocket.Chat/pull/14022)) + +- Message rendering time ([#14252](https://github.com/RocketChat/Rocket.Chat/pull/14252)) + +- SAML login process refactoring ([#12891](https://github.com/RocketChat/Rocket.Chat/pull/12891) by [@kukkjanos](https://github.com/kukkjanos)) + +- Upgrade EmojiOne to JoyPixels 4.5.0 ([#13807](https://github.com/RocketChat/Rocket.Chat/pull/13807) by [@wreiske](https://github.com/wreiske)) + +### 🐛 Bug fixes + + +- "Blank page" on safari 10.x ([#14651](https://github.com/RocketChat/Rocket.Chat/pull/14651)) + +- `Alphabetical` translation in DE ([#14490](https://github.com/RocketChat/Rocket.Chat/pull/14490) by [@AnBo83](https://github.com/AnBo83)) + +- Allow data URLs in isURL/getURL helpers ([#14464](https://github.com/RocketChat/Rocket.Chat/pull/14464)) + +- Avatar images on old Livechat client ([#14590](https://github.com/RocketChat/Rocket.Chat/pull/14590) by [@arminfelder](https://github.com/arminfelder)) + +- Bell was too small on threads ([#14394](https://github.com/RocketChat/Rocket.Chat/pull/14394)) + +- Broken layout when sidebar is open on IE/Edge ([#14567](https://github.com/RocketChat/Rocket.Chat/pull/14567)) + +- Channel Leader Bar is in the way of Thread Header ([#14443](https://github.com/RocketChat/Rocket.Chat/pull/14443)) + +- Channel names on Directory got cut on small screens ([#14542](https://github.com/RocketChat/Rocket.Chat/pull/14542)) + +- Channel settings form to textarea for Topic and Description ([#13328](https://github.com/RocketChat/Rocket.Chat/pull/13328) by [@supra08](https://github.com/supra08)) + +- Custom scripts descriptions were not clear enough ([#14516](https://github.com/RocketChat/Rocket.Chat/pull/14516)) + +- Discussion name being invalid ([#14442](https://github.com/RocketChat/Rocket.Chat/pull/14442)) + +- Downloading files when running in sub directory ([#14485](https://github.com/RocketChat/Rocket.Chat/pull/14485) by [@miolane](https://github.com/miolane)) + +- Duplicated link to jump to message ([#14505](https://github.com/RocketChat/Rocket.Chat/pull/14505)) + +- E2E messages not decrypting in message threads ([#14580](https://github.com/RocketChat/Rocket.Chat/pull/14580)) + +- Edit Message when down arrow is pressed. ([#14369](https://github.com/RocketChat/Rocket.Chat/pull/14369) by [@Kailash0311](https://github.com/Kailash0311)) + +- Elements in User Info require some padding ([#13640](https://github.com/RocketChat/Rocket.Chat/pull/13640) by [@mushroomgenie](https://github.com/mushroomgenie)) + +- Error 400 on send a reply to an old thread ([#14402](https://github.com/RocketChat/Rocket.Chat/pull/14402)) + +- Error when accessing an invalid file upload url ([#14282](https://github.com/RocketChat/Rocket.Chat/pull/14282) by [@wreiske](https://github.com/wreiske)) + +- Error when accessing avatar with no token ([#14293](https://github.com/RocketChat/Rocket.Chat/pull/14293)) + +- Escape unrecognized slash command message ([#14432](https://github.com/RocketChat/Rocket.Chat/pull/14432)) + +- Exception on crowd sync due to a wrong logging method ([#14405](https://github.com/RocketChat/Rocket.Chat/pull/14405)) + +- Fallback to mongo version that doesn't require clusterMonitor role ([#14403](https://github.com/RocketChat/Rocket.Chat/pull/14403)) + +- Fix redirect to First channel after login ([#14434](https://github.com/RocketChat/Rocket.Chat/pull/14434)) + +- IE11 support ([#14422](https://github.com/RocketChat/Rocket.Chat/pull/14422)) + +- Ignored messages ([#14465](https://github.com/RocketChat/Rocket.Chat/pull/14465)) + +- Inject code at the end of tag ([#14623](https://github.com/RocketChat/Rocket.Chat/pull/14623)) + +- Mailer breaking if user doesn't have an email address ([#14614](https://github.com/RocketChat/Rocket.Chat/pull/14614)) + +- Main thread title on replies ([#14372](https://github.com/RocketChat/Rocket.Chat/pull/14372)) + +- Mentions message missing 'jump to message' action ([#14430](https://github.com/RocketChat/Rocket.Chat/pull/14430)) + +- Messages on thread panel were receiving wrong context/subscription ([#14404](https://github.com/RocketChat/Rocket.Chat/pull/14404)) + +- Messages on threads disappearing ([#14393](https://github.com/RocketChat/Rocket.Chat/pull/14393)) + +- more message actions to threads context(follow, unfollow, copy, delete) ([#14387](https://github.com/RocketChat/Rocket.Chat/pull/14387)) + +- Multiple Slack Importer Bugs ([#12084](https://github.com/RocketChat/Rocket.Chat/pull/12084) by [@Hudell](https://github.com/Hudell)) + +- New day separator overlapping above system message ([#14362](https://github.com/RocketChat/Rocket.Chat/pull/14362)) + +- No feedback when adding users that already exists in a room ([#14534](https://github.com/RocketChat/Rocket.Chat/pull/14534) by [@gsunit](https://github.com/gsunit)) + +- Optional exit on Unhandled Promise Rejection ([#14291](https://github.com/RocketChat/Rocket.Chat/pull/14291)) + +- Popup cloud console in new window ([#14296](https://github.com/RocketChat/Rocket.Chat/pull/14296)) + +- Pressing Enter in User Search field at channel causes reload ([#14388](https://github.com/RocketChat/Rocket.Chat/pull/14388)) + +- preview pdf its not working ([#14419](https://github.com/RocketChat/Rocket.Chat/pull/14419)) + +- Remove Livechat guest data was removing more rooms than expected ([#14509](https://github.com/RocketChat/Rocket.Chat/pull/14509)) + +- RocketChat client sending out video call requests unnecessarily ([#14496](https://github.com/RocketChat/Rocket.Chat/pull/14496)) + +- Role `user` has being added after email verification even for non anonymous users ([#14263](https://github.com/RocketChat/Rocket.Chat/pull/14263)) + +- Role name spacing on Permissions page ([#14625](https://github.com/RocketChat/Rocket.Chat/pull/14625)) + +- Room name was undefined in some info dialogs ([#14415](https://github.com/RocketChat/Rocket.Chat/pull/14415)) + +- SAML credentialToken removal was preventing mobile from being able to authenticate ([#14345](https://github.com/RocketChat/Rocket.Chat/pull/14345)) + +- Save custom emoji with special characters causes some errors ([#14456](https://github.com/RocketChat/Rocket.Chat/pull/14456)) + +- Send replyTo for livechat offline messages ([#14568](https://github.com/RocketChat/Rocket.Chat/pull/14568)) + +- Several problems with read-only rooms and muted users ([#11311](https://github.com/RocketChat/Rocket.Chat/pull/11311) by [@Hudell](https://github.com/Hudell)) + +- Showing the id instead of the name of custom notification sound ([#13660](https://github.com/RocketChat/Rocket.Chat/pull/13660) by [@knrt10](https://github.com/knrt10)) + +- Startup error in registration check ([#14286](https://github.com/RocketChat/Rocket.Chat/pull/14286)) + +- Stream not connecting connect when using subdir and multi-instance ([#14376](https://github.com/RocketChat/Rocket.Chat/pull/14376)) + +- Switch oplog required doc link to more accurate link ([#14288](https://github.com/RocketChat/Rocket.Chat/pull/14288)) + +- Unnecessary meteor.defer on openRoom ([#14396](https://github.com/RocketChat/Rocket.Chat/pull/14396)) + +- Unread property of the room's lastMessage object was being wrong some times ([#13919](https://github.com/RocketChat/Rocket.Chat/pull/13919)) + +- Users actions in administration were returning error ([#14400](https://github.com/RocketChat/Rocket.Chat/pull/14400)) + +- Verify if the user is requesting your own information in users.info ([#14242](https://github.com/RocketChat/Rocket.Chat/pull/14242)) + +- Wrong header at Apps admin section ([#14290](https://github.com/RocketChat/Rocket.Chat/pull/14290)) + +- Wrong token name was generating error on Gitlab OAuth login ([#14379](https://github.com/RocketChat/Rocket.Chat/pull/14379)) + +- You must join to view messages in this channel ([#14461](https://github.com/RocketChat/Rocket.Chat/pull/14461)) + +
+🔍 Minor changes + + +- [Fix] broken logo url in app.json ([#14572](https://github.com/RocketChat/Rocket.Chat/pull/14572) by [@jaredmoody](https://github.com/jaredmoody)) + +- [IMPROVEMENT] Add tooltip to to notify user the purpose of back button in discussion ([#13872](https://github.com/RocketChat/Rocket.Chat/pull/13872) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- [IMPROVEMENT] Don't group messages with different alias ([#14257](https://github.com/RocketChat/Rocket.Chat/pull/14257) by [@jungeonkim](https://github.com/jungeonkim)) + +- [REGRESSION] Fix Slack bridge channel owner on channel creation ([#14565](https://github.com/RocketChat/Rocket.Chat/pull/14565)) + +- Add digitalocean button to readme ([#14583](https://github.com/RocketChat/Rocket.Chat/pull/14583)) + +- Add missing german translations ([#14386](https://github.com/RocketChat/Rocket.Chat/pull/14386) by [@mrsimpson](https://github.com/mrsimpson)) + +- Allow removing description, topic and annoucement of rooms(set as empty string) ([#13682](https://github.com/RocketChat/Rocket.Chat/pull/13682)) + +- Ci improvements ([#14600](https://github.com/RocketChat/Rocket.Chat/pull/14600)) + +- eslint errors currently on develop ([#14518](https://github.com/RocketChat/Rocket.Chat/pull/14518) by [@Hudell](https://github.com/Hudell)) + +- Federation i18n message changes ([#14595](https://github.com/RocketChat/Rocket.Chat/pull/14595)) + +- fix discussions: remove restriction for editing room info, server side ([#14039](https://github.com/RocketChat/Rocket.Chat/pull/14039) by [@mrsimpson](https://github.com/mrsimpson)) + +- Fix emoji replacing some chars ([#14570](https://github.com/RocketChat/Rocket.Chat/pull/14570)) + +- Fix i18n files keys sort ([#14433](https://github.com/RocketChat/Rocket.Chat/pull/14433)) + +- Fix thumbs up emoji shortname ([#14581](https://github.com/RocketChat/Rocket.Chat/pull/14581)) + +- Fix: Add emoji shortnames to emoji's list ([#14576](https://github.com/RocketChat/Rocket.Chat/pull/14576)) + +- Fix: emoji render performance for alias ([#14593](https://github.com/RocketChat/Rocket.Chat/pull/14593)) + +- Fix: Message body was not being updated when user disabled nrr message ([#14390](https://github.com/RocketChat/Rocket.Chat/pull/14390)) + +- Fixes on DAU and MAU aggregations ([#14418](https://github.com/RocketChat/Rocket.Chat/pull/14418)) + +- Google Plus account is no longer accessible ([#14503](https://github.com/RocketChat/Rocket.Chat/pull/14503) by [@zdumitru](https://github.com/zdumitru)) + +- Improve German translations ([#14351](https://github.com/RocketChat/Rocket.Chat/pull/14351) by [@mrsimpson](https://github.com/mrsimpson)) + +- Improvement: Permissions table ([#14646](https://github.com/RocketChat/Rocket.Chat/pull/14646)) + +- LingoHub based on develop ([#14561](https://github.com/RocketChat/Rocket.Chat/pull/14561)) + +- LingoHub based on develop ([#14478](https://github.com/RocketChat/Rocket.Chat/pull/14478)) + +- LingoHub based on develop ([#14426](https://github.com/RocketChat/Rocket.Chat/pull/14426)) + +- LingoHub based on develop ([#14643](https://github.com/RocketChat/Rocket.Chat/pull/14643)) + +- Merge master into develop & Set version to 1.1.0-develop ([#14317](https://github.com/RocketChat/Rocket.Chat/pull/14317) by [@wreiske](https://github.com/wreiske)) + +- Merge master into develop & Set version to 1.1.0-develop ([#14294](https://github.com/RocketChat/Rocket.Chat/pull/14294)) + +- MsgTyping refactor ([#14495](https://github.com/RocketChat/Rocket.Chat/pull/14495)) + +- New eslint rules ([#14332](https://github.com/RocketChat/Rocket.Chat/pull/14332)) + +- Refactor WebRTC class ([#13736](https://github.com/RocketChat/Rocket.Chat/pull/13736)) + +- Regression: Handle missing emojis ([#14641](https://github.com/RocketChat/Rocket.Chat/pull/14641)) + +- Regression: unit tests were being skipped ([#14543](https://github.com/RocketChat/Rocket.Chat/pull/14543)) + +- Remove specific eslint rules ([#14459](https://github.com/RocketChat/Rocket.Chat/pull/14459)) + +- Removed unnecessary DDP unblocks ([#13641](https://github.com/RocketChat/Rocket.Chat/pull/13641)) + +- Update Meteor Streamer package ([#14551](https://github.com/RocketChat/Rocket.Chat/pull/14551)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@AnBo83](https://github.com/AnBo83) +- [@Hudell](https://github.com/Hudell) +- [@Kailash0311](https://github.com/Kailash0311) +- [@arminfelder](https://github.com/arminfelder) +- [@ashwaniYDV](https://github.com/ashwaniYDV) +- [@bhardwajaditya](https://github.com/bhardwajaditya) +- [@gsunit](https://github.com/gsunit) +- [@jaredmoody](https://github.com/jaredmoody) +- [@jungeonkim](https://github.com/jungeonkim) +- [@knrt10](https://github.com/knrt10) +- [@kukkjanos](https://github.com/kukkjanos) +- [@miolane](https://github.com/miolane) +- [@mjovanovic0](https://github.com/mjovanovic0) +- [@mrsimpson](https://github.com/mrsimpson) +- [@mushroomgenie](https://github.com/mushroomgenie) +- [@supra08](https://github.com/supra08) +- [@wreiske](https://github.com/wreiske) +- [@zdumitru](https://github.com/zdumitru) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@alansikora](https://github.com/alansikora) +- [@d-gubert](https://github.com/d-gubert) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 1.0.5 +`2019-08-08 · 1 🔍 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +
+🔍 Minor changes + + +- Fix custom auth ([#15141](https://github.com/RocketChat/Rocket.Chat/pull/15141)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) + +# 1.0.4 +`2019-07-29 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Not sanitized message types ([#15054](https://github.com/RocketChat/Rocket.Chat/pull/15054)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) + +# 1.0.3 +`2019-05-09 · 1 🔍 · 8 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +
+🔍 Minor changes + + +- Release 1.0.3 ([#14446](https://github.com/RocketChat/Rocket.Chat/pull/14446) by [@mrsimpson](https://github.com/mrsimpson)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@mrsimpson](https://github.com/mrsimpson) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 1.0.2 +`2019-04-30 · 2 🚀 · 8 🐛 · 6 🔍 · 10 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🚀 Improvements + + +- Better error message when not able to get MongoDB Version ([#14320](https://github.com/RocketChat/Rocket.Chat/pull/14320)) + +- i18n of threads and discussion buttons ([#14334](https://github.com/RocketChat/Rocket.Chat/pull/14334)) + +### 🐛 Bug fixes + + +- Audio notification for messages on DM ([#14336](https://github.com/RocketChat/Rocket.Chat/pull/14336)) + +- Duplicate thread message after editing ([#14330](https://github.com/RocketChat/Rocket.Chat/pull/14330)) + +- Missing i18n for some new Permissions ([#14011](https://github.com/RocketChat/Rocket.Chat/pull/14011) by [@lolimay](https://github.com/lolimay)) + +- New day separator rendered over thread reply ([#14328](https://github.com/RocketChat/Rocket.Chat/pull/14328)) + +- Remove reference to inexistent field when deleting message in thread ([#14311](https://github.com/RocketChat/Rocket.Chat/pull/14311)) + +- show roles on message ([#14313](https://github.com/RocketChat/Rocket.Chat/pull/14313)) + +- Unread line and new day separator were not aligned ([#14338](https://github.com/RocketChat/Rocket.Chat/pull/14338)) + +- View Logs admin page was broken and not rendering color logs ([#14316](https://github.com/RocketChat/Rocket.Chat/pull/14316)) + +
+🔍 Minor changes + + +- [Fix] group name appears instead of the room id ([#14075](https://github.com/RocketChat/Rocket.Chat/pull/14075) by [@mohamedar97](https://github.com/mohamedar97)) + +- [Regression] Anonymous user fix ([#14301](https://github.com/RocketChat/Rocket.Chat/pull/14301) by [@knrt10](https://github.com/knrt10)) + +- Add cross-browser select arrow positioning ([#14318](https://github.com/RocketChat/Rocket.Chat/pull/14318)) + +- Coerces the MongoDB version string ([#14299](https://github.com/RocketChat/Rocket.Chat/pull/14299) by [@thaiphv](https://github.com/thaiphv)) + +- i18n: Update German strings ([#14182](https://github.com/RocketChat/Rocket.Chat/pull/14182) by [@AnBo83](https://github.com/AnBo83)) + +- Release 1.0.2 ([#14339](https://github.com/RocketChat/Rocket.Chat/pull/14339) by [@AnBo83](https://github.com/AnBo83) & [@knrt10](https://github.com/knrt10) & [@lolimay](https://github.com/lolimay) & [@mohamedar97](https://github.com/mohamedar97) & [@thaiphv](https://github.com/thaiphv)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@AnBo83](https://github.com/AnBo83) +- [@knrt10](https://github.com/knrt10) +- [@lolimay](https://github.com/lolimay) +- [@mohamedar97](https://github.com/mohamedar97) +- [@thaiphv](https://github.com/thaiphv) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@ggazzo](https://github.com/ggazzo) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 1.0.1 +`2019-04-28 · 7 🐛 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Error when accessing an invalid file upload url ([#14282](https://github.com/RocketChat/Rocket.Chat/pull/14282) by [@wreiske](https://github.com/wreiske)) + +- Error when accessing avatar with no token ([#14293](https://github.com/RocketChat/Rocket.Chat/pull/14293)) + +- Optional exit on Unhandled Promise Rejection ([#14291](https://github.com/RocketChat/Rocket.Chat/pull/14291)) + +- Popup cloud console in new window ([#14296](https://github.com/RocketChat/Rocket.Chat/pull/14296)) + +- Startup error in registration check ([#14286](https://github.com/RocketChat/Rocket.Chat/pull/14286)) + +- Switch oplog required doc link to more accurate link ([#14288](https://github.com/RocketChat/Rocket.Chat/pull/14288)) + +- Wrong header at Apps admin section ([#14290](https://github.com/RocketChat/Rocket.Chat/pull/14290)) + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@wreiske](https://github.com/wreiske) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@rodrigok](https://github.com/rodrigok) + +# 1.0.0 +`2019-04-28 · 4 ️️️⚠️ · 34 🎉 · 33 🚀 · 107 🐛 · 174 🔍 · 60 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### ⚠️ BREAKING CHANGES + + +- Prevent start if incompatible mongo version ([#13927](https://github.com/RocketChat/Rocket.Chat/pull/13927)) + +- Remove deprecated file upload engine Slingshot ([#13724](https://github.com/RocketChat/Rocket.Chat/pull/13724)) + +- Remove internal hubot package ([#13522](https://github.com/RocketChat/Rocket.Chat/pull/13522)) + +- Require OPLOG/REPLICASET to run Rocket.Chat ([#14227](https://github.com/RocketChat/Rocket.Chat/pull/14227)) + +### 🎉 New features + + +- - Add setting to request a comment when closing Livechat room ([#13983](https://github.com/RocketChat/Rocket.Chat/pull/13983) by [@knrt10](https://github.com/knrt10)) + +- Add an option to delete file in files list ([#13815](https://github.com/RocketChat/Rocket.Chat/pull/13815)) + +- Add e-mail field on Livechat Departments ([#13775](https://github.com/RocketChat/Rocket.Chat/pull/13775)) + +- Add GET method to fetch Livechat message through REST API ([#14147](https://github.com/RocketChat/Rocket.Chat/pull/14147)) + +- Add message action to copy message to input as reply ([#12626](https://github.com/RocketChat/Rocket.Chat/pull/12626) by [@mrsimpson](https://github.com/mrsimpson)) + +- Add missing remove add leader channel ([#13315](https://github.com/RocketChat/Rocket.Chat/pull/13315) by [@Montel](https://github.com/Montel)) + +- Add offset parameter to channels.history, groups.history, dm.history ([#13310](https://github.com/RocketChat/Rocket.Chat/pull/13310) by [@xbolshe](https://github.com/xbolshe)) + +- Add parseUrls field to the apps message converter ([#13248](https://github.com/RocketChat/Rocket.Chat/pull/13248)) + +- Add support to updatedSince parameter in emoji-custom.list and deprecated old endpoint ([#13510](https://github.com/RocketChat/Rocket.Chat/pull/13510)) + +- Add Voxtelesys to list of SMS providers ([#13697](https://github.com/RocketChat/Rocket.Chat/pull/13697) by [@jhnburke8](https://github.com/jhnburke8) & [@john08burke](https://github.com/john08burke)) + +- allow drop files on thread ([#14214](https://github.com/RocketChat/Rocket.Chat/pull/14214)) + +- Allow sending long messages as attachments ([#13819](https://github.com/RocketChat/Rocket.Chat/pull/13819)) + +- Bosnian lang (BS) ([#13635](https://github.com/RocketChat/Rocket.Chat/pull/13635) by [@fliptrail](https://github.com/fliptrail)) + +- Chatpal: Enable custom search parameters ([#13829](https://github.com/RocketChat/Rocket.Chat/pull/13829) by [@Peym4n](https://github.com/Peym4n)) + +- Collect data for Monthly/Daily Active Users for a future dashboard ([#11525](https://github.com/RocketChat/Rocket.Chat/pull/11525)) + +- Discussions ([#13541](https://github.com/RocketChat/Rocket.Chat/pull/13541) by [@mrsimpson](https://github.com/mrsimpson) & [@vickyokrm](https://github.com/vickyokrm)) + +- Federation ([#12370](https://github.com/RocketChat/Rocket.Chat/pull/12370)) + +- legal notice page ([#12472](https://github.com/RocketChat/Rocket.Chat/pull/12472) by [@localguru](https://github.com/localguru)) + +- Limit all DDP/Websocket requests (configurable via admin panel) ([#13311](https://github.com/RocketChat/Rocket.Chat/pull/13311)) + +- Marketplace integration with Rocket.Chat Cloud ([#13809](https://github.com/RocketChat/Rocket.Chat/pull/13809)) + +- Multiple slackbridges ([#11346](https://github.com/RocketChat/Rocket.Chat/pull/11346) by [@Hudell](https://github.com/Hudell) & [@kable-wilmoth](https://github.com/kable-wilmoth)) + +- option to not use nrr (experimental) ([#14224](https://github.com/RocketChat/Rocket.Chat/pull/14224)) + +- Permission to assign roles ([#13597](https://github.com/RocketChat/Rocket.Chat/pull/13597)) + +- Provide new Livechat client as community feature ([#13723](https://github.com/RocketChat/Rocket.Chat/pull/13723)) + +- reply with a file ([#12095](https://github.com/RocketChat/Rocket.Chat/pull/12095) by [@rssilva](https://github.com/rssilva)) + +- REST endpoint to forward livechat rooms ([#13308](https://github.com/RocketChat/Rocket.Chat/pull/13308)) + +- Rest endpoints of discussions ([#13987](https://github.com/RocketChat/Rocket.Chat/pull/13987)) + +- Rest threads ([#14045](https://github.com/RocketChat/Rocket.Chat/pull/14045)) + +- Set up livechat connections created from new client ([#14236](https://github.com/RocketChat/Rocket.Chat/pull/14236)) + +- Show department field on Livechat visitor panel ([#13530](https://github.com/RocketChat/Rocket.Chat/pull/13530)) + +- Threads V 1.0 ([#13996](https://github.com/RocketChat/Rocket.Chat/pull/13996)) + +- Update message actions ([#14268](https://github.com/RocketChat/Rocket.Chat/pull/14268)) + +- User avatars from external source ([#7929](https://github.com/RocketChat/Rocket.Chat/pull/7929) by [@mjovanovic0](https://github.com/mjovanovic0)) + +- users.setActiveStatus endpoint in rest api ([#13443](https://github.com/RocketChat/Rocket.Chat/pull/13443) by [@thayannevls](https://github.com/thayannevls)) + +### 🚀 Improvements + + +- Add decoding for commonName (cn) and displayName attributes for SAML ([#12347](https://github.com/RocketChat/Rocket.Chat/pull/12347) by [@pkolmann](https://github.com/pkolmann)) + +- Add department field on find guest method ([#13491](https://github.com/RocketChat/Rocket.Chat/pull/13491)) + +- Add index for room's ts ([#13726](https://github.com/RocketChat/Rocket.Chat/pull/13726)) + +- Add permission to change other user profile avatar ([#13884](https://github.com/RocketChat/Rocket.Chat/pull/13884) by [@knrt10](https://github.com/knrt10)) + +- Admin ui ([#13393](https://github.com/RocketChat/Rocket.Chat/pull/13393)) + +- Allow custom rocketchat username for crowd users and enable login via email/crowd_username ([#12981](https://github.com/RocketChat/Rocket.Chat/pull/12981) by [@steerben](https://github.com/steerben)) + +- Attachment download caching ([#14137](https://github.com/RocketChat/Rocket.Chat/pull/14137) by [@wreiske](https://github.com/wreiske)) + +- Deprecate fixCordova helper ([#13598](https://github.com/RocketChat/Rocket.Chat/pull/13598)) + +- Disable X-Powered-By header in all known express middlewares ([#13388](https://github.com/RocketChat/Rocket.Chat/pull/13388)) + +- End to end tests ([#13401](https://github.com/RocketChat/Rocket.Chat/pull/13401)) + +- Filter agents with autocomplete input instead of select element ([#13730](https://github.com/RocketChat/Rocket.Chat/pull/13730)) + +- Get avatar from oauth ([#14131](https://github.com/RocketChat/Rocket.Chat/pull/14131)) + +- Ignore agent status when queuing incoming livechats via Guest Pool ([#13818](https://github.com/RocketChat/Rocket.Chat/pull/13818)) + +- Include more information to help with bug reports and debugging ([#14047](https://github.com/RocketChat/Rocket.Chat/pull/14047)) + +- Join channels by sending a message or join button (#13752) ([#13752](https://github.com/RocketChat/Rocket.Chat/pull/13752) by [@bhardwajaditya](https://github.com/bhardwajaditya)) + +- KaTeX and Autolinker message rendering ([#11698](https://github.com/RocketChat/Rocket.Chat/pull/11698)) + +- Line height on static content pages ([#11673](https://github.com/RocketChat/Rocket.Chat/pull/11673) by [@timkinnane](https://github.com/timkinnane)) + +- new icons ([#13289](https://github.com/RocketChat/Rocket.Chat/pull/13289)) + +- New sidebar item badges, mention links, and ticks ([#14030](https://github.com/RocketChat/Rocket.Chat/pull/14030)) + +- OAuth Role Sync ([#13761](https://github.com/RocketChat/Rocket.Chat/pull/13761) by [@hypery2k](https://github.com/hypery2k)) + +- Remove dangling side-nav styles ([#13584](https://github.com/RocketChat/Rocket.Chat/pull/13584)) + +- Remove setting to show a livechat is waiting ([#13992](https://github.com/RocketChat/Rocket.Chat/pull/13992)) + +- Remove unnecessary "File Upload". ([#13743](https://github.com/RocketChat/Rocket.Chat/pull/13743) by [@knrt10](https://github.com/knrt10)) + +- Replace livechat inquiry dialog with preview room ([#13986](https://github.com/RocketChat/Rocket.Chat/pull/13986)) + +- Replaces color #13679A to #1d74f5 ([#13796](https://github.com/RocketChat/Rocket.Chat/pull/13796) by [@fliptrail](https://github.com/fliptrail)) + +- Send `uniqueID` to all clients so Jitsi rooms can be created correctly ([#13342](https://github.com/RocketChat/Rocket.Chat/pull/13342)) + +- Show rooms with mentions on unread category even with hide counter ([#13948](https://github.com/RocketChat/Rocket.Chat/pull/13948)) + +- UI of page not found ([#13757](https://github.com/RocketChat/Rocket.Chat/pull/13757) by [@fliptrail](https://github.com/fliptrail)) + +- UI of Permissions page ([#13732](https://github.com/RocketChat/Rocket.Chat/pull/13732) by [@fliptrail](https://github.com/fliptrail)) + +- Update deleteUser errors to be more semantic ([#12380](https://github.com/RocketChat/Rocket.Chat/pull/12380) by [@timkinnane](https://github.com/timkinnane)) + +- Update the Apps Engine version to v1.4.1 ([#14072](https://github.com/RocketChat/Rocket.Chat/pull/14072)) + +- Update to MongoDB 4.0 in docker-compose file ([#13396](https://github.com/RocketChat/Rocket.Chat/pull/13396) by [@ngulden](https://github.com/ngulden)) + +- Use SessionId for credential token in SAML request ([#13791](https://github.com/RocketChat/Rocket.Chat/pull/13791) by [@MohammedEssehemy](https://github.com/MohammedEssehemy)) + +### 🐛 Bug fixes + + +- .bin extension added to attached file names ([#13468](https://github.com/RocketChat/Rocket.Chat/pull/13468) by [@Hudell](https://github.com/Hudell)) + +- Ability to activate an app installed by zip even offline ([#13563](https://github.com/RocketChat/Rocket.Chat/pull/13563)) + +- Add custom MIME types for *.ico extension ([#13969](https://github.com/RocketChat/Rocket.Chat/pull/13969)) + +- Add retries to docker-compose.yml, to wait for MongoDB to be ready ([#13199](https://github.com/RocketChat/Rocket.Chat/pull/13199) by [@tiangolo](https://github.com/tiangolo)) + +- Adds Proper Language display name for many languages ([#13714](https://github.com/RocketChat/Rocket.Chat/pull/13714) by [@fliptrail](https://github.com/fliptrail)) + +- Align burger menu in header with content matching room header ([#14265](https://github.com/RocketChat/Rocket.Chat/pull/14265)) + +- allow user to logout before set username ([#13439](https://github.com/RocketChat/Rocket.Chat/pull/13439)) + +- Apps converters delete fields on message attachments ([#14028](https://github.com/RocketChat/Rocket.Chat/pull/14028)) + +- Attachments without dates were showing December 31, 1970 ([#13428](https://github.com/RocketChat/Rocket.Chat/pull/13428) by [@wreiske](https://github.com/wreiske)) + +- Audio message recording ([#13727](https://github.com/RocketChat/Rocket.Chat/pull/13727)) + +- Audio message recording issues ([#13486](https://github.com/RocketChat/Rocket.Chat/pull/13486)) + +- Auto hide Livechat room from sidebar on close ([#13824](https://github.com/RocketChat/Rocket.Chat/pull/13824) by [@knrt10](https://github.com/knrt10)) + +- Auto-translate toggle not updating rendered messages ([#14262](https://github.com/RocketChat/Rocket.Chat/pull/14262)) + +- Autogrow not working properly for many message boxes ([#14163](https://github.com/RocketChat/Rocket.Chat/pull/14163)) + +- Avatar fonts for PNG and JPG ([#13681](https://github.com/RocketChat/Rocket.Chat/pull/13681)) + +- Avatar image being shrinked on autocomplete ([#13914](https://github.com/RocketChat/Rocket.Chat/pull/13914)) + +- Block User Icon ([#13630](https://github.com/RocketChat/Rocket.Chat/pull/13630) by [@knrt10](https://github.com/knrt10)) + +- Bugfix markdown Marked link new tab ([#13245](https://github.com/RocketChat/Rocket.Chat/pull/13245) by [@DeviaVir](https://github.com/DeviaVir)) + +- Change localStorage keys to work when server is running in a subdir ([#13968](https://github.com/RocketChat/Rocket.Chat/pull/13968)) + +- Change userId of rate limiter, change to logged user ([#13442](https://github.com/RocketChat/Rocket.Chat/pull/13442)) + +- Changing Room name updates the webhook ([#13672](https://github.com/RocketChat/Rocket.Chat/pull/13672) by [@knrt10](https://github.com/knrt10)) + +- Check settings for name requirement before validating ([#14021](https://github.com/RocketChat/Rocket.Chat/pull/14021)) + +- Closing sidebar when room menu is clicked. ([#13842](https://github.com/RocketChat/Rocket.Chat/pull/13842) by [@Kailash0311](https://github.com/Kailash0311)) + +- Corrects UI background of forced F2A Authentication ([#13670](https://github.com/RocketChat/Rocket.Chat/pull/13670) by [@fliptrail](https://github.com/fliptrail)) + +- Custom Oauth login not working with accessToken ([#14113](https://github.com/RocketChat/Rocket.Chat/pull/14113) by [@knrt10](https://github.com/knrt10)) + +- Custom Oauth store refresh and id tokens with expiresIn ([#14121](https://github.com/RocketChat/Rocket.Chat/pull/14121) by [@ralfbecker](https://github.com/ralfbecker)) + +- Directory and Apps logs page ([#13938](https://github.com/RocketChat/Rocket.Chat/pull/13938)) + +- Display first message when taking Livechat inquiry ([#13896](https://github.com/RocketChat/Rocket.Chat/pull/13896)) + +- Do not allow change avatars of another users without permission ([#13629](https://github.com/RocketChat/Rocket.Chat/pull/13629)) + +- Emoji detection at line breaks ([#13447](https://github.com/RocketChat/Rocket.Chat/pull/13447) by [@savish28](https://github.com/savish28)) + +- Empty result when getting badge count notification ([#14244](https://github.com/RocketChat/Rocket.Chat/pull/14244)) + +- Error when recording data into the connection object ([#13553](https://github.com/RocketChat/Rocket.Chat/pull/13553)) + +- Fix bug when user try recreate channel or group with same name and remove room from cache when user leaves room ([#12341](https://github.com/RocketChat/Rocket.Chat/pull/12341)) + +- Fix issue cannot filter channels by name ([#12952](https://github.com/RocketChat/Rocket.Chat/pull/12952) by [@huydang284](https://github.com/huydang284)) + +- Fix rendering of links in the announcement modal ([#13250](https://github.com/RocketChat/Rocket.Chat/pull/13250) by [@supra08](https://github.com/supra08)) + +- Fix snap refresh hook ([#13702](https://github.com/RocketChat/Rocket.Chat/pull/13702)) + +- Fix wrong this scope in Notifications ([#13515](https://github.com/RocketChat/Rocket.Chat/pull/13515)) + +- Fixed grammatical error. ([#13559](https://github.com/RocketChat/Rocket.Chat/pull/13559) by [@gsunit](https://github.com/gsunit)) + +- Fixed rocketchat-oembed meta fragment pulling ([#13056](https://github.com/RocketChat/Rocket.Chat/pull/13056) by [@wreiske](https://github.com/wreiske)) + +- Fixed text for "bulk-register-user" ([#11558](https://github.com/RocketChat/Rocket.Chat/pull/11558) by [@the4ndy](https://github.com/the4ndy)) + +- Fixing rooms find by type and name ([#11451](https://github.com/RocketChat/Rocket.Chat/pull/11451) by [@hmagarotto](https://github.com/hmagarotto)) + +- Focus on input when emoji picker box is open was not working ([#13981](https://github.com/RocketChat/Rocket.Chat/pull/13981)) + +- Forwarded Livechat visitor name is not getting updated on the sidebar ([#13783](https://github.com/RocketChat/Rocket.Chat/pull/13783) by [@zolbayars](https://github.com/zolbayars)) + +- Get next Livechat agent endpoint ([#13485](https://github.com/RocketChat/Rocket.Chat/pull/13485)) + +- Groups endpoints permission validations ([#13994](https://github.com/RocketChat/Rocket.Chat/pull/13994)) + +- Handle showing/hiding input in messageBox ([#13564](https://github.com/RocketChat/Rocket.Chat/pull/13564)) + +- HipChat Enterprise importer fails when importing a large amount of messages (millions) ([#13221](https://github.com/RocketChat/Rocket.Chat/pull/13221) by [@Hudell](https://github.com/Hudell)) + +- Hipchat Enterprise Importer not generating subscriptions ([#13293](https://github.com/RocketChat/Rocket.Chat/pull/13293) by [@Hudell](https://github.com/Hudell)) + +- Image attachment re-renders on message update ([#14207](https://github.com/RocketChat/Rocket.Chat/pull/14207) by [@Kailash0311](https://github.com/Kailash0311)) + +- Improve cloud section ([#13820](https://github.com/RocketChat/Rocket.Chat/pull/13820)) + +- In home screen Rocket.Chat+ is dispalyed as Rocket.Chat ([#13784](https://github.com/RocketChat/Rocket.Chat/pull/13784) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Legal pages' style ([#13677](https://github.com/RocketChat/Rocket.Chat/pull/13677)) + +- Limit App’s HTTP calls to 500ms ([#13949](https://github.com/RocketChat/Rocket.Chat/pull/13949)) + +- linear-gradient background on safari ([#13363](https://github.com/RocketChat/Rocket.Chat/pull/13363)) + +- link of k8s deploy ([#13612](https://github.com/RocketChat/Rocket.Chat/pull/13612) by [@Mr-Linus](https://github.com/Mr-Linus)) + +- Links and upload paths when running in a subdir ([#13982](https://github.com/RocketChat/Rocket.Chat/pull/13982)) + +- Livechat office hours ([#14031](https://github.com/RocketChat/Rocket.Chat/pull/14031)) + +- Livechat user registration in another department ([#10695](https://github.com/RocketChat/Rocket.Chat/pull/10695)) + +- Loading theme CSS on first server startup ([#13953](https://github.com/RocketChat/Rocket.Chat/pull/13953)) + +- Loading user list from room messages ([#13769](https://github.com/RocketChat/Rocket.Chat/pull/13769)) + +- mention-links not being always resolved ([#11745](https://github.com/RocketChat/Rocket.Chat/pull/11745) by [@mrsimpson](https://github.com/mrsimpson)) + +- Message updating by Apps ([#13294](https://github.com/RocketChat/Rocket.Chat/pull/13294)) + +- Minor issues detected after testing the new Livechat client ([#13521](https://github.com/RocketChat/Rocket.Chat/pull/13521)) + +- Missing connection headers on Livechat REST API ([#14130](https://github.com/RocketChat/Rocket.Chat/pull/14130)) + +- Mobile view and re-enable E2E tests ([#13322](https://github.com/RocketChat/Rocket.Chat/pull/13322)) + +- No new room created when conversation is closed ([#13753](https://github.com/RocketChat/Rocket.Chat/pull/13753) by [@knrt10](https://github.com/knrt10)) + +- Non-latin room names and other slugifications ([#13467](https://github.com/RocketChat/Rocket.Chat/pull/13467)) + +- Normalize TAPi18n language string on Livechat widget ([#14012](https://github.com/RocketChat/Rocket.Chat/pull/14012)) + +- Obey audio notification preferences ([#14188](https://github.com/RocketChat/Rocket.Chat/pull/14188)) + +- Opening a Livechat room from another agent ([#13951](https://github.com/RocketChat/Rocket.Chat/pull/13951)) + +- OTR dialog issue ([#13755](https://github.com/RocketChat/Rocket.Chat/pull/13755) by [@knrt10](https://github.com/knrt10)) + +- Partially messaging formatting for bold letters ([#13599](https://github.com/RocketChat/Rocket.Chat/pull/13599) by [@knrt10](https://github.com/knrt10)) + +- Pass token for cloud register ([#13350](https://github.com/RocketChat/Rocket.Chat/pull/13350)) + +- Preview of image uploads were not working when apps framework is enable ([#13303](https://github.com/RocketChat/Rocket.Chat/pull/13303)) + +- Race condition on the loading of Apps on the admin page ([#13587](https://github.com/RocketChat/Rocket.Chat/pull/13587)) + +- Rate Limiter was limiting communication between instances ([#13326](https://github.com/RocketChat/Rocket.Chat/pull/13326)) + +- Read Receipt for Livechat Messages fixed ([#13832](https://github.com/RocketChat/Rocket.Chat/pull/13832) by [@knrt10](https://github.com/knrt10)) + +- Real names were not displayed in the reactions (API/UI) ([#13495](https://github.com/RocketChat/Rocket.Chat/pull/13495)) + +- Receiving agent for new livechats from REST API ([#14103](https://github.com/RocketChat/Rocket.Chat/pull/14103)) + +- Remove Room info for Direct Messages (#9383) ([#12429](https://github.com/RocketChat/Rocket.Chat/pull/12429) by [@vinade](https://github.com/vinade)) + +- Remove spaces in some i18n files ([#13801](https://github.com/RocketChat/Rocket.Chat/pull/13801)) + +- renderField template to correct short property usage ([#14148](https://github.com/RocketChat/Rocket.Chat/pull/14148)) + +- REST endpoint for creating custom emojis ([#13306](https://github.com/RocketChat/Rocket.Chat/pull/13306)) + +- Restart required to apply changes in API Rate Limiter settings ([#13451](https://github.com/RocketChat/Rocket.Chat/pull/13451)) + +- Right arrows in default HTML content ([#13502](https://github.com/RocketChat/Rocket.Chat/pull/13502)) + +- SAML certificate settings don't follow a pattern ([#14179](https://github.com/RocketChat/Rocket.Chat/pull/14179) by [@Hudell](https://github.com/Hudell)) + +- Setup wizard calling 'saveSetting' for each field/setting ([#13349](https://github.com/RocketChat/Rocket.Chat/pull/13349)) + +- Sidenav does not open on some admin pages ([#14010](https://github.com/RocketChat/Rocket.Chat/pull/14010)) + +- Sidenav mouse hover was slow ([#13482](https://github.com/RocketChat/Rocket.Chat/pull/13482)) + +- Slackbridge private channels ([#14273](https://github.com/RocketChat/Rocket.Chat/pull/14273) by [@Hudell](https://github.com/Hudell) & [@nylen](https://github.com/nylen)) + +- Small improvements on message box ([#13444](https://github.com/RocketChat/Rocket.Chat/pull/13444)) + +- Some Safari bugs ([#13895](https://github.com/RocketChat/Rocket.Chat/pull/13895)) + +- Stop livestream ([#13676](https://github.com/RocketChat/Rocket.Chat/pull/13676)) + +- Support for handling SAML LogoutRequest SLO ([#14074](https://github.com/RocketChat/Rocket.Chat/pull/14074)) + +- Theme CSS loading in subdir env ([#14015](https://github.com/RocketChat/Rocket.Chat/pull/14015)) + +- Translation interpolations for many languages ([#13751](https://github.com/RocketChat/Rocket.Chat/pull/13751) by [@fliptrail](https://github.com/fliptrail)) + +- Typo in a referrer header in inject.js file ([#13469](https://github.com/RocketChat/Rocket.Chat/pull/13469) by [@algomaster99](https://github.com/algomaster99)) + +- Update bad-words to 3.0.2 ([#13705](https://github.com/RocketChat/Rocket.Chat/pull/13705) by [@trivoallan](https://github.com/trivoallan)) + +- Updating a message from apps if keep history is on ([#14129](https://github.com/RocketChat/Rocket.Chat/pull/14129)) + +- User is unable to enter multiple emojis by clicking on the emoji icon ([#13744](https://github.com/RocketChat/Rocket.Chat/pull/13744) by [@Kailash0311](https://github.com/Kailash0311)) + +- users.getPreferences when the user doesn't have any preferences ([#13532](https://github.com/RocketChat/Rocket.Chat/pull/13532) by [@thayannevls](https://github.com/thayannevls)) + +- VIDEO/JITSI multiple calls before video call ([#13855](https://github.com/RocketChat/Rocket.Chat/pull/13855)) + +- View All members button now not in direct room ([#14081](https://github.com/RocketChat/Rocket.Chat/pull/14081) by [@knrt10](https://github.com/knrt10)) + +- WebRTC wasn't working duo to design and browser's APIs changes ([#13675](https://github.com/RocketChat/Rocket.Chat/pull/13675)) + +- wrong importing of e2e ([#13863](https://github.com/RocketChat/Rocket.Chat/pull/13863)) + +- Wrong permalink when running in subdir ([#13746](https://github.com/RocketChat/Rocket.Chat/pull/13746) by [@ura14h](https://github.com/ura14h)) + +- wrong width/height for tile_70 (mstile 70x70 (png)) ([#13851](https://github.com/RocketChat/Rocket.Chat/pull/13851) by [@ulf-f](https://github.com/ulf-f)) + +
+🔍 Minor changes + + +- Convert rocketchat-apps to main module structure ([#13409](https://github.com/RocketChat/Rocket.Chat/pull/13409)) + +- Convert rocketchat-lib to main module structure ([#13415](https://github.com/RocketChat/Rocket.Chat/pull/13415)) + +- Fix some imports from wrong packages, remove exports and files unused in rc-ui ([#13422](https://github.com/RocketChat/Rocket.Chat/pull/13422)) + +- Import missed functions to remove dependency of RC namespace ([#13414](https://github.com/RocketChat/Rocket.Chat/pull/13414)) + +- Remove dependency of RC namespace in livechat/client ([#13370](https://github.com/RocketChat/Rocket.Chat/pull/13370)) + +- Remove dependency of RC namespace in rc-integrations and importer-hipchat-enterprise ([#13386](https://github.com/RocketChat/Rocket.Chat/pull/13386)) + +- Remove dependency of RC namespace in rc-livechat/server/publications ([#13383](https://github.com/RocketChat/Rocket.Chat/pull/13383)) + +- Remove dependency of RC namespace in rc-message-pin and message-snippet ([#13343](https://github.com/RocketChat/Rocket.Chat/pull/13343)) + +- Remove dependency of RC namespace in rc-oembed and rc-otr ([#13345](https://github.com/RocketChat/Rocket.Chat/pull/13345)) + +- Remove dependency of RC namespace in rc-reactions, retention-policy and search ([#13347](https://github.com/RocketChat/Rocket.Chat/pull/13347)) + +- Remove dependency of RC namespace in rc-slash-archiveroom, create, help, hide, invite, inviteall and join ([#13356](https://github.com/RocketChat/Rocket.Chat/pull/13356)) + +- Remove dependency of RC namespace in rc-smarsh-connector, sms and spotify ([#13358](https://github.com/RocketChat/Rocket.Chat/pull/13358)) + +- Remove dependency of RC namespace in rc-statistics and tokenpass ([#13359](https://github.com/RocketChat/Rocket.Chat/pull/13359)) + +- Remove dependency of RC namespace in rc-ui-master, ui-message- user-data-download and version-check ([#13365](https://github.com/RocketChat/Rocket.Chat/pull/13365)) + +- Remove dependency of RC namespace in rc-ui, ui-account and ui-admin ([#13361](https://github.com/RocketChat/Rocket.Chat/pull/13361)) + +- Remove dependency of RC namespace in rc-videobridge and webdav ([#13366](https://github.com/RocketChat/Rocket.Chat/pull/13366)) + +- Remove dependency of RC namespace in root client folder, imports/message-read-receipt and imports/personal-access-tokens ([#13389](https://github.com/RocketChat/Rocket.Chat/pull/13389)) + +- Remove dependency of RC namespace in root server folder - step 1 ([#13390](https://github.com/RocketChat/Rocket.Chat/pull/13390)) + +- Remove dependency of RC namespace in root server folder - step 4 ([#13400](https://github.com/RocketChat/Rocket.Chat/pull/13400)) + +- Remove functions from globals ([#13421](https://github.com/RocketChat/Rocket.Chat/pull/13421)) + +- Remove LIvechat global variable from RC namespace ([#13378](https://github.com/RocketChat/Rocket.Chat/pull/13378)) + +- Remove unused files and code in rc-lib - step 1 ([#13416](https://github.com/RocketChat/Rocket.Chat/pull/13416)) + +- Remove unused files and code in rc-lib - step 3 ([#13420](https://github.com/RocketChat/Rocket.Chat/pull/13420)) + +- Remove unused files in rc-lib - step 2 ([#13419](https://github.com/RocketChat/Rocket.Chat/pull/13419)) + +- [BUG] Icon Fixed for Knowledge base on Livechat ([#13806](https://github.com/RocketChat/Rocket.Chat/pull/13806) by [@knrt10](https://github.com/knrt10)) + +- [New] Reply privately to group messages ([#14150](https://github.com/RocketChat/Rocket.Chat/pull/14150) by [@bhardwajaditya](https://github.com/bhardwajaditya)) + +- [Regression] Fix integrations message example ([#14111](https://github.com/RocketChat/Rocket.Chat/pull/14111)) + +- [REGRESSION] Fix variable name references in message template ([#14184](https://github.com/RocketChat/Rocket.Chat/pull/14184)) + +- [REGRESSION] Messages sent by livechat's guests are losing sender info ([#14174](https://github.com/RocketChat/Rocket.Chat/pull/14174)) + +- [Regression] Personal Access Token list fixed ([#14216](https://github.com/RocketChat/Rocket.Chat/pull/14216) by [@knrt10](https://github.com/knrt10)) + +- Add better positioning for tooltips on edges ([#13472](https://github.com/RocketChat/Rocket.Chat/pull/13472)) + +- Add Houston config ([#13707](https://github.com/RocketChat/Rocket.Chat/pull/13707)) + +- Add pagination to getUsersOfRoom ([#12834](https://github.com/RocketChat/Rocket.Chat/pull/12834) by [@Hudell](https://github.com/Hudell)) + +- Add support to search for all users in directory ([#13803](https://github.com/RocketChat/Rocket.Chat/pull/13803)) + +- Added federation ping, loopback and dashboard ([#14007](https://github.com/RocketChat/Rocket.Chat/pull/14007)) + +- Adds French translation of Personal Access Token ([#13779](https://github.com/RocketChat/Rocket.Chat/pull/13779) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Allow set env var METEOR_OPLOG_TOO_FAR_BEHIND ([#14017](https://github.com/RocketChat/Rocket.Chat/pull/14017)) + +- Broken styles in Administration's contextual bar ([#14222](https://github.com/RocketChat/Rocket.Chat/pull/14222)) + +- Change dynamic dependency of FileUpload in Messages models ([#13776](https://github.com/RocketChat/Rocket.Chat/pull/13776)) + +- Change the way to resolve DNS for Federation ([#13695](https://github.com/RocketChat/Rocket.Chat/pull/13695)) + +- Convert imports to relative paths ([#13740](https://github.com/RocketChat/Rocket.Chat/pull/13740)) + +- Convert rc-nrr and slashcommands open to main module structure ([#13520](https://github.com/RocketChat/Rocket.Chat/pull/13520)) + +- created function to allow change default values, fix loading search users ([#14177](https://github.com/RocketChat/Rocket.Chat/pull/14177)) + +- Depack: Use mainModule for root files ([#13508](https://github.com/RocketChat/Rocket.Chat/pull/13508)) + +- Depackaging ([#13483](https://github.com/RocketChat/Rocket.Chat/pull/13483)) + +- Deprecate /api/v1/info in favor of /api/info ([#13798](https://github.com/RocketChat/Rocket.Chat/pull/13798)) + +- ESLint: Add more import rules ([#14226](https://github.com/RocketChat/Rocket.Chat/pull/14226)) + +- Exit process on unhandled rejection ([#14220](https://github.com/RocketChat/Rocket.Chat/pull/14220)) + +- Faster CI build for PR ([#14171](https://github.com/RocketChat/Rocket.Chat/pull/14171)) + +- Fix debug logging not being enabled by the setting ([#13979](https://github.com/RocketChat/Rocket.Chat/pull/13979)) + +- Fix discussions issues after room deletion and translation actions not being shown ([#14018](https://github.com/RocketChat/Rocket.Chat/pull/14018)) + +- Fix messages losing thread titles on editing or reaction and improve message actions ([#14051](https://github.com/RocketChat/Rocket.Chat/pull/14051)) + +- Fix missing dependencies on stretch CI image ([#13910](https://github.com/RocketChat/Rocket.Chat/pull/13910)) + +- Fix modal scroll ([#14052](https://github.com/RocketChat/Rocket.Chat/pull/14052)) + +- Fix race condition of lastMessage set ([#14041](https://github.com/RocketChat/Rocket.Chat/pull/14041)) + +- Fix room re-rendering ([#14044](https://github.com/RocketChat/Rocket.Chat/pull/14044)) + +- Fix sending message from action buttons in messages ([#14101](https://github.com/RocketChat/Rocket.Chat/pull/14101)) + +- Fix sending notifications to mentions on threads and discussion email sender ([#14043](https://github.com/RocketChat/Rocket.Chat/pull/14043)) + +- Fix shield indentation ([#14048](https://github.com/RocketChat/Rocket.Chat/pull/14048)) + +- Fix threads rendering performance ([#14059](https://github.com/RocketChat/Rocket.Chat/pull/14059)) + +- Fix threads tests ([#14180](https://github.com/RocketChat/Rocket.Chat/pull/14180)) + +- Fix top bar unread message counter ([#14102](https://github.com/RocketChat/Rocket.Chat/pull/14102)) + +- Fix update apps capability of updating messages ([#14118](https://github.com/RocketChat/Rocket.Chat/pull/14118)) + +- Fix wrong imports ([#13601](https://github.com/RocketChat/Rocket.Chat/pull/13601)) + +- Fix: addRoomAccessValidator method created for Threads ([#13789](https://github.com/RocketChat/Rocket.Chat/pull/13789)) + +- Fix: Error when version check endpoint was returning invalid data ([#14089](https://github.com/RocketChat/Rocket.Chat/pull/14089)) + +- Fix: Missing export in cloud package ([#13282](https://github.com/RocketChat/Rocket.Chat/pull/13282)) + +- Fix: Mongo.setConnectionOptions was not being set correctly ([#13586](https://github.com/RocketChat/Rocket.Chat/pull/13586)) + +- Fix: Remove message class `sequential` if `new-day` is present ([#14116](https://github.com/RocketChat/Rocket.Chat/pull/14116)) + +- Fix: Skip thread notifications on message edit ([#14100](https://github.com/RocketChat/Rocket.Chat/pull/14100)) + +- Fix: Some german translations ([#13299](https://github.com/RocketChat/Rocket.Chat/pull/13299) by [@soenkef](https://github.com/soenkef)) + +- Fix: Tests were not exiting RC instances ([#14054](https://github.com/RocketChat/Rocket.Chat/pull/14054)) + +- Force some words to translate in other languages ([#13367](https://github.com/RocketChat/Rocket.Chat/pull/13367) by [@soltanabadiyan](https://github.com/soltanabadiyan)) + +- Force unstyling of blockquote under .message-body--unstyled ([#14274](https://github.com/RocketChat/Rocket.Chat/pull/14274)) + +- Improve message validation ([#14266](https://github.com/RocketChat/Rocket.Chat/pull/14266)) + +- Improve: Decrease padding for app buy modal ([#13984](https://github.com/RocketChat/Rocket.Chat/pull/13984)) + +- Improve: Marketplace auth inside Rocket.Chat instead of inside the iframe. ([#14258](https://github.com/RocketChat/Rocket.Chat/pull/14258)) + +- Improve: Send cloud token to Federation Hub ([#13651](https://github.com/RocketChat/Rocket.Chat/pull/13651)) + +- Improve: Support search and adding federated users through regular endpoints ([#13936](https://github.com/RocketChat/Rocket.Chat/pull/13936)) + +- Increment user counter on DMs ([#14185](https://github.com/RocketChat/Rocket.Chat/pull/14185)) + +- LingoHub based on develop ([#13964](https://github.com/RocketChat/Rocket.Chat/pull/13964)) + +- LingoHub based on develop ([#13891](https://github.com/RocketChat/Rocket.Chat/pull/13891)) + +- LingoHub based on develop ([#13839](https://github.com/RocketChat/Rocket.Chat/pull/13839)) + +- LingoHub based on develop ([#13623](https://github.com/RocketChat/Rocket.Chat/pull/13623)) + +- LingoHub based on develop ([#14046](https://github.com/RocketChat/Rocket.Chat/pull/14046)) + +- LingoHub based on develop ([#14178](https://github.com/RocketChat/Rocket.Chat/pull/14178)) + +- Lingohub sync and additional fixes ([#13825](https://github.com/RocketChat/Rocket.Chat/pull/13825)) + +- Merge master into develop & Set version to 1.0.0-develop ([#13435](https://github.com/RocketChat/Rocket.Chat/pull/13435) by [@Hudell](https://github.com/Hudell) & [@TkTech](https://github.com/TkTech) & [@theundefined](https://github.com/theundefined)) + +- Move LDAP Escape to login handler ([#14234](https://github.com/RocketChat/Rocket.Chat/pull/14234)) + +- Move mongo config away from cors package ([#13531](https://github.com/RocketChat/Rocket.Chat/pull/13531)) + +- Move rc-livechat server models to rc-models ([#13384](https://github.com/RocketChat/Rocket.Chat/pull/13384)) + +- New threads layout ([#14269](https://github.com/RocketChat/Rocket.Chat/pull/14269)) + +- OpenShift custom OAuth support ([#13925](https://github.com/RocketChat/Rocket.Chat/pull/13925) by [@bsharrow](https://github.com/bsharrow)) + +- Prevent click on reply thread to trigger flex tab closing ([#14215](https://github.com/RocketChat/Rocket.Chat/pull/14215)) + +- Prevent error for ldap login with invalid characters ([#14160](https://github.com/RocketChat/Rocket.Chat/pull/14160)) + +- Prevent error on normalize thread message for preview ([#14170](https://github.com/RocketChat/Rocket.Chat/pull/14170)) + +- Prioritize user-mentions badge ([#14057](https://github.com/RocketChat/Rocket.Chat/pull/14057)) + +- Proper thread quote, clear message box on send, and other nice things to have ([#14049](https://github.com/RocketChat/Rocket.Chat/pull/14049)) + +- Regression: Active room was not being marked ([#14276](https://github.com/RocketChat/Rocket.Chat/pull/14276)) + +- Regression: Add debounce on admin users search to avoid blocking by DDP Rate Limiter ([#13529](https://github.com/RocketChat/Rocket.Chat/pull/13529)) + +- Regression: Add missing translations used in Apps pages ([#13674](https://github.com/RocketChat/Rocket.Chat/pull/13674)) + +- Regression: Admin embedded layout ([#14229](https://github.com/RocketChat/Rocket.Chat/pull/14229)) + +- Regression: Broken UI for messages ([#14223](https://github.com/RocketChat/Rocket.Chat/pull/14223)) + +- Regression: Cursor position set to beginning when editing a message ([#14245](https://github.com/RocketChat/Rocket.Chat/pull/14245)) + +- Regression: Discussions - Invite users and DM ([#13646](https://github.com/RocketChat/Rocket.Chat/pull/13646)) + +- Regression: Discussions were not showing on Tab Bar ([#14050](https://github.com/RocketChat/Rocket.Chat/pull/14050) by [@knrt10](https://github.com/knrt10)) + +- Regression: Exception on notification when adding someone in room via mention ([#14251](https://github.com/RocketChat/Rocket.Chat/pull/14251)) + +- Regression: fix app pages styles ([#13567](https://github.com/RocketChat/Rocket.Chat/pull/13567)) + +- Regression: Fix autolinker that was not parsing urls correctly ([#13497](https://github.com/RocketChat/Rocket.Chat/pull/13497)) + +- Regression: fix drop file ([#14225](https://github.com/RocketChat/Rocket.Chat/pull/14225)) + +- Regression: Fix embedded layout ([#13574](https://github.com/RocketChat/Rocket.Chat/pull/13574)) + +- Regression: fix grouping for reactive message ([#14246](https://github.com/RocketChat/Rocket.Chat/pull/14246)) + +- Regression: Fix icon for DMs ([#13679](https://github.com/RocketChat/Rocket.Chat/pull/13679)) + +- Regression: Fix wrong imports in rc-models ([#13516](https://github.com/RocketChat/Rocket.Chat/pull/13516)) + +- Regression: grouping messages on threads ([#14238](https://github.com/RocketChat/Rocket.Chat/pull/14238)) + +- Regression: Message box does not go back to initial state after sending a message ([#14161](https://github.com/RocketChat/Rocket.Chat/pull/14161)) + +- Regression: Message box geolocation was throwing error ([#13496](https://github.com/RocketChat/Rocket.Chat/pull/13496)) + +- Regression: Missing settings import at `packages/rocketchat-livechat/server/methods/saveAppearance.js` ([#13573](https://github.com/RocketChat/Rocket.Chat/pull/13573)) + +- Regression: Not updating subscriptions and not showing desktop notifcations ([#13509](https://github.com/RocketChat/Rocket.Chat/pull/13509)) + +- Regression: Prevent startup errors for mentions parsing ([#14219](https://github.com/RocketChat/Rocket.Chat/pull/14219)) + +- Regression: Prune Threads ([#13683](https://github.com/RocketChat/Rocket.Chat/pull/13683)) + +- Regression: Remove border from unstyled message body ([#14235](https://github.com/RocketChat/Rocket.Chat/pull/14235)) + +- Regression: removed backup files ([#13729](https://github.com/RocketChat/Rocket.Chat/pull/13729)) + +- Regression: Role creation and deletion error fixed ([#14097](https://github.com/RocketChat/Rocket.Chat/pull/14097) by [@knrt10](https://github.com/knrt10)) + +- Regression: Sidebar create new channel hover text ([#13658](https://github.com/RocketChat/Rocket.Chat/pull/13658) by [@bhardwajaditya](https://github.com/bhardwajaditya)) + +- Regression: System messages styling ([#14189](https://github.com/RocketChat/Rocket.Chat/pull/14189)) + +- Regression: Table admin pages ([#13411](https://github.com/RocketChat/Rocket.Chat/pull/13411)) + +- Regression: Template error ([#13410](https://github.com/RocketChat/Rocket.Chat/pull/13410)) + +- Regression: Threads styles improvement ([#13741](https://github.com/RocketChat/Rocket.Chat/pull/13741)) + +- Regression: User autocomplete was not listing users from correct room ([#14125](https://github.com/RocketChat/Rocket.Chat/pull/14125)) + +- Regression: User Discussions join message ([#13656](https://github.com/RocketChat/Rocket.Chat/pull/13656) by [@bhardwajaditya](https://github.com/bhardwajaditya)) + +- Regression: wrong expression at messageBox.actions.remove() ([#14192](https://github.com/RocketChat/Rocket.Chat/pull/14192)) + +- Remove bitcoin link in Readme.md since the link is broken ([#13935](https://github.com/RocketChat/Rocket.Chat/pull/13935) by [@ashwaniYDV](https://github.com/ashwaniYDV)) + +- Remove dependency of RC namespace in rc-livechat/imports, lib, server/api, server/hooks and server/lib ([#13379](https://github.com/RocketChat/Rocket.Chat/pull/13379)) + +- Remove dependency of RC namespace in rc-livechat/server/methods ([#13382](https://github.com/RocketChat/Rocket.Chat/pull/13382)) + +- Remove dependency of RC namespace in rc-livechat/server/models ([#13377](https://github.com/RocketChat/Rocket.Chat/pull/13377)) + +- Remove dependency of RC namespace in rc-oauth2-server and message-star ([#13344](https://github.com/RocketChat/Rocket.Chat/pull/13344)) + +- Remove dependency of RC namespace in rc-setup-wizard, slackbridge and asciiarts ([#13348](https://github.com/RocketChat/Rocket.Chat/pull/13348)) + +- Remove dependency of RC namespace in rc-slash-kick, leave, me, msg, mute, open, topic and unarchiveroom ([#13357](https://github.com/RocketChat/Rocket.Chat/pull/13357)) + +- Remove dependency of RC namespace in rc-ui-clean-history, ui-admin and ui-login ([#13362](https://github.com/RocketChat/Rocket.Chat/pull/13362)) + +- Remove dependency of RC namespace in rc-wordpress, chatpal-search and irc ([#13492](https://github.com/RocketChat/Rocket.Chat/pull/13492)) + +- Remove dependency of RC namespace in root server folder - step 2 ([#13397](https://github.com/RocketChat/Rocket.Chat/pull/13397)) + +- Remove dependency of RC namespace in root server folder - step 3 ([#13398](https://github.com/RocketChat/Rocket.Chat/pull/13398)) + +- Remove dependency of RC namespace in root server folder - step 5 ([#13402](https://github.com/RocketChat/Rocket.Chat/pull/13402)) + +- Remove dependency of RC namespace in root server folder - step 6 ([#13405](https://github.com/RocketChat/Rocket.Chat/pull/13405)) + +- Remove Npm.depends and Npm.require except those that are inside package.js ([#13518](https://github.com/RocketChat/Rocket.Chat/pull/13518)) + +- Remove Package references ([#13523](https://github.com/RocketChat/Rocket.Chat/pull/13523)) + +- Remove Sandstorm support ([#13773](https://github.com/RocketChat/Rocket.Chat/pull/13773)) + +- Remove some bad references to messageBox ([#13954](https://github.com/RocketChat/Rocket.Chat/pull/13954)) + +- Remove some index.js files routing for server/client files ([#13772](https://github.com/RocketChat/Rocket.Chat/pull/13772)) + +- Remove unused files ([#13833](https://github.com/RocketChat/Rocket.Chat/pull/13833)) + +- Remove unused files ([#13725](https://github.com/RocketChat/Rocket.Chat/pull/13725)) + +- Remove unused style ([#13834](https://github.com/RocketChat/Rocket.Chat/pull/13834)) + +- Removed old templates ([#13406](https://github.com/RocketChat/Rocket.Chat/pull/13406)) + +- Removing (almost) every dynamic imports ([#13767](https://github.com/RocketChat/Rocket.Chat/pull/13767)) + +- Rename Cloud to Connectivity Services & split Apps in Apps and Marketplace ([#14211](https://github.com/RocketChat/Rocket.Chat/pull/14211)) + +- Rename Threads to Discussion ([#13782](https://github.com/RocketChat/Rocket.Chat/pull/13782)) + +- Settings: disable reset button ([#14026](https://github.com/RocketChat/Rocket.Chat/pull/14026)) + +- Settings: hiding reset button for readonly fields ([#14025](https://github.com/RocketChat/Rocket.Chat/pull/14025)) + +- Show discussion avatar ([#14053](https://github.com/RocketChat/Rocket.Chat/pull/14053)) + +- Small improvements to federation callbacks/hooks ([#13946](https://github.com/RocketChat/Rocket.Chat/pull/13946)) + +- Smaller thread replies and system messages ([#14099](https://github.com/RocketChat/Rocket.Chat/pull/14099)) + +- Unify mime-type package configuration ([#14217](https://github.com/RocketChat/Rocket.Chat/pull/14217)) + +- Unstuck observers every minute ([#14076](https://github.com/RocketChat/Rocket.Chat/pull/14076)) + +- Update badges and mention links colors ([#14071](https://github.com/RocketChat/Rocket.Chat/pull/14071)) + +- Update eslint config ([#13966](https://github.com/RocketChat/Rocket.Chat/pull/13966)) + +- Update husky config ([#13687](https://github.com/RocketChat/Rocket.Chat/pull/13687)) + +- Update Meteor 1.8.0.2 ([#13519](https://github.com/RocketChat/Rocket.Chat/pull/13519)) + +- Update preview Dockerfile to use Stretch dependencies ([#13947](https://github.com/RocketChat/Rocket.Chat/pull/13947)) + +- Use CircleCI Debian Stretch images ([#13906](https://github.com/RocketChat/Rocket.Chat/pull/13906)) + +- Use main message as thread tab title ([#14213](https://github.com/RocketChat/Rocket.Chat/pull/14213)) + +- Use own logic to get thread infos via REST ([#14210](https://github.com/RocketChat/Rocket.Chat/pull/14210)) + +- User remove role dialog fixed ([#13874](https://github.com/RocketChat/Rocket.Chat/pull/13874) by [@bhardwajaditya](https://github.com/bhardwajaditya)) + +- Wait port release to finish tests ([#14066](https://github.com/RocketChat/Rocket.Chat/pull/14066)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@DeviaVir](https://github.com/DeviaVir) +- [@Hudell](https://github.com/Hudell) +- [@Kailash0311](https://github.com/Kailash0311) +- [@MohammedEssehemy](https://github.com/MohammedEssehemy) +- [@Montel](https://github.com/Montel) +- [@Mr-Linus](https://github.com/Mr-Linus) +- [@Peym4n](https://github.com/Peym4n) +- [@TkTech](https://github.com/TkTech) +- [@algomaster99](https://github.com/algomaster99) +- [@ashwaniYDV](https://github.com/ashwaniYDV) +- [@bhardwajaditya](https://github.com/bhardwajaditya) +- [@bsharrow](https://github.com/bsharrow) +- [@fliptrail](https://github.com/fliptrail) +- [@gsunit](https://github.com/gsunit) +- [@hmagarotto](https://github.com/hmagarotto) +- [@huydang284](https://github.com/huydang284) +- [@hypery2k](https://github.com/hypery2k) +- [@jhnburke8](https://github.com/jhnburke8) +- [@john08burke](https://github.com/john08burke) +- [@kable-wilmoth](https://github.com/kable-wilmoth) +- [@knrt10](https://github.com/knrt10) +- [@localguru](https://github.com/localguru) +- [@mjovanovic0](https://github.com/mjovanovic0) +- [@mrsimpson](https://github.com/mrsimpson) +- [@ngulden](https://github.com/ngulden) +- [@nylen](https://github.com/nylen) +- [@pkolmann](https://github.com/pkolmann) +- [@ralfbecker](https://github.com/ralfbecker) +- [@rssilva](https://github.com/rssilva) +- [@savish28](https://github.com/savish28) +- [@soenkef](https://github.com/soenkef) +- [@soltanabadiyan](https://github.com/soltanabadiyan) +- [@steerben](https://github.com/steerben) +- [@supra08](https://github.com/supra08) +- [@thayannevls](https://github.com/thayannevls) +- [@the4ndy](https://github.com/the4ndy) +- [@theundefined](https://github.com/theundefined) +- [@tiangolo](https://github.com/tiangolo) +- [@timkinnane](https://github.com/timkinnane) +- [@trivoallan](https://github.com/trivoallan) +- [@ulf-f](https://github.com/ulf-f) +- [@ura14h](https://github.com/ura14h) +- [@vickyokrm](https://github.com/vickyokrm) +- [@vinade](https://github.com/vinade) +- [@wreiske](https://github.com/wreiske) +- [@xbolshe](https://github.com/xbolshe) +- [@zolbayars](https://github.com/zolbayars) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@LuluGO](https://github.com/LuluGO) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@alansikora](https://github.com/alansikora) +- [@d-gubert](https://github.com/d-gubert) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@marceloschmidt](https://github.com/marceloschmidt) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 0.74.3 +`2019-02-13 · 3 🚀 · 11 🐛 · 3 🔍 · 9 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🚀 Improvements + + +- Add API option "permissionsRequired" ([#13430](https://github.com/RocketChat/Rocket.Chat/pull/13430)) + +- Allow configure Prometheus port per process via Environment Variable ([#13436](https://github.com/RocketChat/Rocket.Chat/pull/13436)) + +- Open rooms quicker ([#13417](https://github.com/RocketChat/Rocket.Chat/pull/13417)) + +### 🐛 Bug fixes + + +- "Test Desktop Notifications" not triggering a notification ([#13457](https://github.com/RocketChat/Rocket.Chat/pull/13457)) + +- Invalid condition on getting next livechat agent over REST API endpoint ([#13360](https://github.com/RocketChat/Rocket.Chat/pull/13360)) + +- Invalid push gateway configuration, requires the uniqueId ([#13423](https://github.com/RocketChat/Rocket.Chat/pull/13423)) + +- Misaligned upload progress bar "cancel" button ([#13407](https://github.com/RocketChat/Rocket.Chat/pull/13407)) + +- Not translated emails ([#13452](https://github.com/RocketChat/Rocket.Chat/pull/13452)) + +- Notify private settings changes even on public settings changed ([#13369](https://github.com/RocketChat/Rocket.Chat/pull/13369)) + +- Properly escape custom emoji names for pattern matching ([#13408](https://github.com/RocketChat/Rocket.Chat/pull/13408)) + +- Several Problems on HipChat Importer ([#13336](https://github.com/RocketChat/Rocket.Chat/pull/13336) by [@Hudell](https://github.com/Hudell)) + +- Translated and incorrect i18n variables ([#13463](https://github.com/RocketChat/Rocket.Chat/pull/13463) by [@leonboot](https://github.com/leonboot)) + +- Update Russian localization ([#13244](https://github.com/RocketChat/Rocket.Chat/pull/13244) by [@BehindLoader](https://github.com/BehindLoader)) + +- XML-decryption module not found ([#13437](https://github.com/RocketChat/Rocket.Chat/pull/13437) by [@Hudell](https://github.com/Hudell)) + +
+🔍 Minor changes + + +- Regression: Remove console.log on email translations ([#13456](https://github.com/RocketChat/Rocket.Chat/pull/13456)) + +- Release 0.74.3 ([#13474](https://github.com/RocketChat/Rocket.Chat/pull/13474) by [@BehindLoader](https://github.com/BehindLoader) & [@Hudell](https://github.com/Hudell) & [@leonboot](https://github.com/leonboot)) + +- Room loading improvements ([#13471](https://github.com/RocketChat/Rocket.Chat/pull/13471)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@BehindLoader](https://github.com/BehindLoader) +- [@Hudell](https://github.com/Hudell) +- [@leonboot](https://github.com/leonboot) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@d-gubert](https://github.com/d-gubert) +- [@graywolf336](https://github.com/graywolf336) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 0.74.2 +`2019-02-05 · 1 🚀 · 3 🐛 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🚀 Improvements + + +- Send `uniqueID` to all clients so Jitsi rooms can be created correctly ([#13342](https://github.com/RocketChat/Rocket.Chat/pull/13342)) + +### 🐛 Bug fixes + + +- Pass token for cloud register ([#13350](https://github.com/RocketChat/Rocket.Chat/pull/13350)) + +- Rate Limiter was limiting communication between instances ([#13326](https://github.com/RocketChat/Rocket.Chat/pull/13326)) + +- Setup wizard calling 'saveSetting' for each field/setting ([#13349](https://github.com/RocketChat/Rocket.Chat/pull/13349)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.74.1 +`2019-02-01 · 4 🎉 · 7 🐛 · 1 🔍 · 8 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🎉 New features + + +- Add parseUrls field to the apps message converter ([#13248](https://github.com/RocketChat/Rocket.Chat/pull/13248)) + +- Collect data for Monthly/Daily Active Users for a future dashboard ([#11525](https://github.com/RocketChat/Rocket.Chat/pull/11525)) + +- Limit all DDP/Websocket requests (configurable via admin panel) ([#13311](https://github.com/RocketChat/Rocket.Chat/pull/13311)) + +- REST endpoint to forward livechat rooms ([#13308](https://github.com/RocketChat/Rocket.Chat/pull/13308)) + +### 🐛 Bug fixes + + +- Fix bug when user try recreate channel or group with same name and remove room from cache when user leaves room ([#12341](https://github.com/RocketChat/Rocket.Chat/pull/12341)) + +- HipChat Enterprise importer fails when importing a large amount of messages (millions) ([#13221](https://github.com/RocketChat/Rocket.Chat/pull/13221) by [@Hudell](https://github.com/Hudell)) + +- Hipchat Enterprise Importer not generating subscriptions ([#13293](https://github.com/RocketChat/Rocket.Chat/pull/13293) by [@Hudell](https://github.com/Hudell)) + +- Message updating by Apps ([#13294](https://github.com/RocketChat/Rocket.Chat/pull/13294)) + +- Mobile view and re-enable E2E tests ([#13322](https://github.com/RocketChat/Rocket.Chat/pull/13322)) + +- Preview of image uploads were not working when apps framework is enable ([#13303](https://github.com/RocketChat/Rocket.Chat/pull/13303)) + +- REST endpoint for creating custom emojis ([#13306](https://github.com/RocketChat/Rocket.Chat/pull/13306)) + +
+🔍 Minor changes + + +- Fix: Missing export in cloud package ([#13282](https://github.com/RocketChat/Rocket.Chat/pull/13282)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@d-gubert](https://github.com/d-gubert) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 0.74.0 +`2019-01-28 · 11 🎉 · 11 🚀 · 15 🐛 · 36 🔍 · 22 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🎉 New features + + +- Add Allow Methods directive to CORS ([#13073](https://github.com/RocketChat/Rocket.Chat/pull/13073)) + +- Add create, update and delete endpoint for custom emojis ([#13160](https://github.com/RocketChat/Rocket.Chat/pull/13160)) + +- Add new Livechat REST endpoint to update the visitor's status ([#13108](https://github.com/RocketChat/Rocket.Chat/pull/13108)) + +- Add rate limiter to REST endpoints ([#11251](https://github.com/RocketChat/Rocket.Chat/pull/11251)) + +- Added an option to disable email when activate and deactivate users ([#13183](https://github.com/RocketChat/Rocket.Chat/pull/13183)) + +- Added endpoint to update timeout of the jitsi video conference ([#13167](https://github.com/RocketChat/Rocket.Chat/pull/13167)) + +- Added stream to notify when agent status change ([#13076](https://github.com/RocketChat/Rocket.Chat/pull/13076)) + +- Cloud Integration ([#13013](https://github.com/RocketChat/Rocket.Chat/pull/13013)) + +- Display total number of files and total upload size in admin ([#13184](https://github.com/RocketChat/Rocket.Chat/pull/13184)) + +- Livechat GDPR compliance ([#12982](https://github.com/RocketChat/Rocket.Chat/pull/12982)) + +- SAML: Adds possibility to decrypt encrypted assertions ([#12153](https://github.com/RocketChat/Rocket.Chat/pull/12153) by [@gerbsen](https://github.com/gerbsen)) + +### 🚀 Improvements + + +- Add "Apps Engine Version" to Administration > Info ([#13169](https://github.com/RocketChat/Rocket.Chat/pull/13169)) + +- Adds history log for all Importers and improves HipChat import performance ([#13083](https://github.com/RocketChat/Rocket.Chat/pull/13083) by [@Hudell](https://github.com/Hudell)) + +- Adds the "showConnecting" property to Livechat Config payload ([#13158](https://github.com/RocketChat/Rocket.Chat/pull/13158)) + +- Change the way the app detail screen shows support link when it's an email ([#13129](https://github.com/RocketChat/Rocket.Chat/pull/13129)) + +- Dutch translations ([#12294](https://github.com/RocketChat/Rocket.Chat/pull/12294) by [@Jeroeny](https://github.com/Jeroeny)) + +- Inject metrics on callbacks ([#13266](https://github.com/RocketChat/Rocket.Chat/pull/13266)) + +- New Livechat statistics added to statistics collector ([#13168](https://github.com/RocketChat/Rocket.Chat/pull/13168)) + +- Persian translations ([#13114](https://github.com/RocketChat/Rocket.Chat/pull/13114) by [@behnejad](https://github.com/behnejad)) + +- Process alerts from update checking ([#13194](https://github.com/RocketChat/Rocket.Chat/pull/13194)) + +- Return room type field on Livechat findRoom method ([#13078](https://github.com/RocketChat/Rocket.Chat/pull/13078)) + +- Return visitorEmails field on Livechat findGuest method ([#13097](https://github.com/RocketChat/Rocket.Chat/pull/13097)) + +### 🐛 Bug fixes + + +- #11692 - Suppress error when drop collection in migration to suit to … ([#13091](https://github.com/RocketChat/Rocket.Chat/pull/13091) by [@Xuhao](https://github.com/Xuhao)) + +- Avatars with transparency were being converted to black ([#13181](https://github.com/RocketChat/Rocket.Chat/pull/13181)) + +- Change input type of e2e to password ([#13077](https://github.com/RocketChat/Rocket.Chat/pull/13077) by [@supra08](https://github.com/supra08)) + +- Change webdav creation, due to changes in the npm lib after last update ([#13170](https://github.com/RocketChat/Rocket.Chat/pull/13170)) + +- Emoticons not displayed in room topic ([#12858](https://github.com/RocketChat/Rocket.Chat/pull/12858) by [@alexbartsch](https://github.com/alexbartsch)) + +- Invite command was not accpeting @ in username ([#12927](https://github.com/RocketChat/Rocket.Chat/pull/12927) by [@piotrkochan](https://github.com/piotrkochan)) + +- LDAP login of new users overwriting `fname` from all subscriptions ([#13203](https://github.com/RocketChat/Rocket.Chat/pull/13203)) + +- Notifications for mentions not working on large rooms and don't emit desktop notifications for offline users ([#13067](https://github.com/RocketChat/Rocket.Chat/pull/13067)) + +- Remove ES6 code from Livechat widget script ([#13105](https://github.com/RocketChat/Rocket.Chat/pull/13105)) + +- Remove unused code for Cordova ([#13188](https://github.com/RocketChat/Rocket.Chat/pull/13188)) + +- REST api client base url on subdir ([#13180](https://github.com/RocketChat/Rocket.Chat/pull/13180)) + +- REST API endpoint `users.getPersonalAccessTokens` error when user has no access tokens ([#13150](https://github.com/RocketChat/Rocket.Chat/pull/13150)) + +- Snap upgrade add post-refresh hook ([#13153](https://github.com/RocketChat/Rocket.Chat/pull/13153)) + +- Update Message: Does not show edited when message was not edited. ([#13053](https://github.com/RocketChat/Rocket.Chat/pull/13053) by [@Kailash0311](https://github.com/Kailash0311)) + +- User status on header and user info are not translated ([#13096](https://github.com/RocketChat/Rocket.Chat/pull/13096)) + +
+🔍 Minor changes + + +- Remove dependency of RocketChat namespace and push-notifications ([#13137](https://github.com/RocketChat/Rocket.Chat/pull/13137)) + +- Change apps engine persistence bridge method to updateByAssociations ([#13239](https://github.com/RocketChat/Rocket.Chat/pull/13239)) + +- Convert rocketchat-file-upload to main module structure ([#13094](https://github.com/RocketChat/Rocket.Chat/pull/13094)) + +- Convert rocketchat-ui-master to main module structure ([#13107](https://github.com/RocketChat/Rocket.Chat/pull/13107)) + +- Convert rocketchat-ui-sidenav to main module structure ([#13098](https://github.com/RocketChat/Rocket.Chat/pull/13098)) + +- Convert rocketchat-webrtc to main module structure ([#13117](https://github.com/RocketChat/Rocket.Chat/pull/13117)) + +- Convert rocketchat:ui to main module structure ([#13132](https://github.com/RocketChat/Rocket.Chat/pull/13132)) + +- Globals/main module custom oauth ([#13037](https://github.com/RocketChat/Rocket.Chat/pull/13037)) + +- Globals/move rocketchat notifications ([#13035](https://github.com/RocketChat/Rocket.Chat/pull/13035)) + +- Language: Edit typo "Обновлить" ([#13177](https://github.com/RocketChat/Rocket.Chat/pull/13177) by [@zpavlig](https://github.com/zpavlig)) + +- LingoHub based on develop ([#13201](https://github.com/RocketChat/Rocket.Chat/pull/13201)) + +- Merge master into develop & Set version to 0.74.0-develop ([#13050](https://github.com/RocketChat/Rocket.Chat/pull/13050) by [@Hudell](https://github.com/Hudell) & [@ohmonster](https://github.com/ohmonster) & [@piotrkochan](https://github.com/piotrkochan)) + +- Move rocketchat models ([#13027](https://github.com/RocketChat/Rocket.Chat/pull/13027)) + +- Move rocketchat promises ([#13039](https://github.com/RocketChat/Rocket.Chat/pull/13039)) + +- Move rocketchat settings to specific package ([#13026](https://github.com/RocketChat/Rocket.Chat/pull/13026)) + +- Move some function to utils ([#13122](https://github.com/RocketChat/Rocket.Chat/pull/13122)) + +- Move some ui function to ui-utils ([#13123](https://github.com/RocketChat/Rocket.Chat/pull/13123)) + +- Move UI Collections to rocketchat:models ([#13064](https://github.com/RocketChat/Rocket.Chat/pull/13064)) + +- Move/create rocketchat callbacks ([#13034](https://github.com/RocketChat/Rocket.Chat/pull/13034)) + +- Move/create rocketchat metrics ([#13032](https://github.com/RocketChat/Rocket.Chat/pull/13032)) + +- Regression: Fix audio message upload ([#13224](https://github.com/RocketChat/Rocket.Chat/pull/13224)) + +- Regression: Fix emoji search ([#13207](https://github.com/RocketChat/Rocket.Chat/pull/13207)) + +- Regression: Fix export AudioRecorder ([#13192](https://github.com/RocketChat/Rocket.Chat/pull/13192)) + +- Regression: fix rooms model's collection name ([#13146](https://github.com/RocketChat/Rocket.Chat/pull/13146)) + +- Regression: fix upload permissions ([#13157](https://github.com/RocketChat/Rocket.Chat/pull/13157)) + +- Release 0.74.0 ([#13270](https://github.com/RocketChat/Rocket.Chat/pull/13270) by [@Xuhao](https://github.com/Xuhao) & [@supra08](https://github.com/supra08)) + +- Remove dependency between lib and authz ([#13066](https://github.com/RocketChat/Rocket.Chat/pull/13066)) + +- Remove dependency between RocketChat namespace and migrations ([#13133](https://github.com/RocketChat/Rocket.Chat/pull/13133)) + +- Remove dependency of RocketChat namespace and custom-sounds ([#13136](https://github.com/RocketChat/Rocket.Chat/pull/13136)) + +- Remove dependency of RocketChat namespace and logger ([#13135](https://github.com/RocketChat/Rocket.Chat/pull/13135)) + +- Remove dependency of RocketChat namespace inside rocketchat:ui ([#13131](https://github.com/RocketChat/Rocket.Chat/pull/13131)) + +- Remove directly dependency between lib and e2e ([#13115](https://github.com/RocketChat/Rocket.Chat/pull/13115)) + +- Remove directly dependency between rocketchat:lib and emoji ([#13118](https://github.com/RocketChat/Rocket.Chat/pull/13118)) + +- Remove incorrect pt-BR translation ([#13074](https://github.com/RocketChat/Rocket.Chat/pull/13074)) + +- Rocketchat mailer ([#13036](https://github.com/RocketChat/Rocket.Chat/pull/13036)) + +- Test only MongoDB with oplog versions 3.2 and 4.0 for PRs ([#13119](https://github.com/RocketChat/Rocket.Chat/pull/13119)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) +- [@Jeroeny](https://github.com/Jeroeny) +- [@Kailash0311](https://github.com/Kailash0311) +- [@Xuhao](https://github.com/Xuhao) +- [@alexbartsch](https://github.com/alexbartsch) +- [@behnejad](https://github.com/behnejad) +- [@gerbsen](https://github.com/gerbsen) +- [@ohmonster](https://github.com/ohmonster) +- [@piotrkochan](https://github.com/piotrkochan) +- [@supra08](https://github.com/supra08) +- [@zpavlig](https://github.com/zpavlig) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@LuluGO](https://github.com/LuluGO) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@d-gubert](https://github.com/d-gubert) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@marceloschmidt](https://github.com/marceloschmidt) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 0.73.2 +`2019-01-07 · 1 🎉 · 1 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🎉 New features + + +- Cloud Integration ([#13013](https://github.com/RocketChat/Rocket.Chat/pull/13013)) + +
+🔍 Minor changes + + +- Release 0.73.2 ([#13086](https://github.com/RocketChat/Rocket.Chat/pull/13086)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@graywolf336](https://github.com/graywolf336) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.73.1 +`2018-12-28 · 1 🐛 · 3 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🐛 Bug fixes + + +- Default importer path ([#13045](https://github.com/RocketChat/Rocket.Chat/pull/13045)) + +
+🔍 Minor changes + + +- Execute tests with versions 3.2, 3.4, 3.6 and 4.0 of MongoDB ([#13049](https://github.com/RocketChat/Rocket.Chat/pull/13049)) + +- Regression: Get room's members list not working on MongoDB 3.2 ([#13051](https://github.com/RocketChat/Rocket.Chat/pull/13051)) + +- Release 0.73.1 ([#13052](https://github.com/RocketChat/Rocket.Chat/pull/13052)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.73.0 +`2018-12-28 · 1 ️️️⚠️ · 16 🎉 · 25 🚀 · 60 🐛 · 165 🔍 · 39 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` + +### ⚠️ BREAKING CHANGES + + +- Update to Meteor to 1.8 ([#12468](https://github.com/RocketChat/Rocket.Chat/pull/12468)) + +### 🎉 New features + + +- /api/v1/spotlight: return joinCodeRequired field for rooms ([#12651](https://github.com/RocketChat/Rocket.Chat/pull/12651) by [@cardoso](https://github.com/cardoso)) + +- Add permission to enable personal access token to specific roles ([#12309](https://github.com/RocketChat/Rocket.Chat/pull/12309)) + +- Add query parameter support to emoji-custom endpoint ([#12754](https://github.com/RocketChat/Rocket.Chat/pull/12754)) + +- Added a link to contributing.md ([#12856](https://github.com/RocketChat/Rocket.Chat/pull/12856) by [@sanketsingh24](https://github.com/sanketsingh24)) + +- Added chat.getDeletedMessages since specific date ([#13010](https://github.com/RocketChat/Rocket.Chat/pull/13010)) + +- Config hooks for snap ([#12351](https://github.com/RocketChat/Rocket.Chat/pull/12351)) + +- Create new permission.listAll endpoint to be able to use updatedSince parameter ([#12748](https://github.com/RocketChat/Rocket.Chat/pull/12748)) + +- Download button for each file in fileslist ([#12874](https://github.com/RocketChat/Rocket.Chat/pull/12874) by [@alexbartsch](https://github.com/alexbartsch)) + +- Include message type & id in push notification payload ([#12771](https://github.com/RocketChat/Rocket.Chat/pull/12771) by [@cardoso](https://github.com/cardoso)) + +- Livechat registration form message ([#12597](https://github.com/RocketChat/Rocket.Chat/pull/12597)) + +- Make Livechat's widget draggable ([#12378](https://github.com/RocketChat/Rocket.Chat/pull/12378)) + +- Mandatory 2fa for role ([#9748](https://github.com/RocketChat/Rocket.Chat/pull/9748) by [@Hudell](https://github.com/Hudell) & [@karlprieb](https://github.com/karlprieb)) + +- New API Endpoints for the new version of JS SDK ([#12623](https://github.com/RocketChat/Rocket.Chat/pull/12623)) + +- Option to reset e2e key ([#12483](https://github.com/RocketChat/Rocket.Chat/pull/12483) by [@Hudell](https://github.com/Hudell)) + +- Setting to configure robots.txt content ([#12547](https://github.com/RocketChat/Rocket.Chat/pull/12547) by [@Hudell](https://github.com/Hudell)) + +- Syncloud deploy option ([#12867](https://github.com/RocketChat/Rocket.Chat/pull/12867) by [@cyberb](https://github.com/cyberb)) + +### 🚀 Improvements + + +- Accept Slash Commands via Action Buttons when `msg_in_chat_window: true` ([#13009](https://github.com/RocketChat/Rocket.Chat/pull/13009)) + +- Add CTRL modifier for keyboard shortcut ([#12525](https://github.com/RocketChat/Rocket.Chat/pull/12525) by [@nicolasbock](https://github.com/nicolasbock)) + +- Add missing translation keys. ([#12722](https://github.com/RocketChat/Rocket.Chat/pull/12722) by [@ura14h](https://github.com/ura14h)) + +- Add more methods to deal with rooms via Rocket.Chat.Apps ([#12680](https://github.com/RocketChat/Rocket.Chat/pull/12680)) + +- Add new acceptable header for Livechat REST requests ([#12561](https://github.com/RocketChat/Rocket.Chat/pull/12561)) + +- Add rooms property in user object, if the user has the permission, with rooms roles ([#12105](https://github.com/RocketChat/Rocket.Chat/pull/12105)) + +- Adding debugging instructions in README ([#12989](https://github.com/RocketChat/Rocket.Chat/pull/12989) by [@hypery2k](https://github.com/hypery2k)) + +- Allow apps to update persistence by association ([#12714](https://github.com/RocketChat/Rocket.Chat/pull/12714)) + +- Allow transfer Livechats to online agents only ([#13008](https://github.com/RocketChat/Rocket.Chat/pull/13008)) + +- Atlassian Crowd settings and option to sync user data ([#12616](https://github.com/RocketChat/Rocket.Chat/pull/12616)) + +- Better query for finding subscriptions that need a new E2E Key ([#12692](https://github.com/RocketChat/Rocket.Chat/pull/12692) by [@Hudell](https://github.com/Hudell)) + +- border-radius to use --border-radius ([#12675](https://github.com/RocketChat/Rocket.Chat/pull/12675)) + +- CircleCI to use MongoDB 4.0 for testing ([#12618](https://github.com/RocketChat/Rocket.Chat/pull/12618)) + +- Do not emit settings if there are no changes ([#12904](https://github.com/RocketChat/Rocket.Chat/pull/12904)) + +- Emoji search on messageBox behaving like emojiPicker's search (#9607) ([#12452](https://github.com/RocketChat/Rocket.Chat/pull/12452) by [@vinade](https://github.com/vinade)) + +- German translations ([#12471](https://github.com/RocketChat/Rocket.Chat/pull/12471) by [@mrsimpson](https://github.com/mrsimpson)) + +- Hipchat Enterprise Importer ([#12985](https://github.com/RocketChat/Rocket.Chat/pull/12985) by [@Hudell](https://github.com/Hudell)) + +- Ignore non-existent Livechat custom fields on Livechat API ([#12522](https://github.com/RocketChat/Rocket.Chat/pull/12522)) + +- Improve unreads and unreadsFrom response, prevent it to be equal null ([#12563](https://github.com/RocketChat/Rocket.Chat/pull/12563)) + +- Japanese translations ([#12382](https://github.com/RocketChat/Rocket.Chat/pull/12382) by [@ura14h](https://github.com/ura14h)) + +- Limit the number of typing users shown (#8722) ([#12400](https://github.com/RocketChat/Rocket.Chat/pull/12400) by [@vinade](https://github.com/vinade)) + +- Returning an open room object in the Livechat config endpoint ([#12865](https://github.com/RocketChat/Rocket.Chat/pull/12865)) + +- Update the 'keyboard shortcuts' documentation ([#12564](https://github.com/RocketChat/Rocket.Chat/pull/12564) by [@nicolasbock](https://github.com/nicolasbock)) + +- Use MongoBD aggregation to get users from a room ([#12566](https://github.com/RocketChat/Rocket.Chat/pull/12566)) + +- Username suggestion logic ([#12779](https://github.com/RocketChat/Rocket.Chat/pull/12779)) + +### 🐛 Bug fixes + + +- `Disabled` word translation to Chinese ([#12260](https://github.com/RocketChat/Rocket.Chat/pull/12260) by [@AndreamApp](https://github.com/AndreamApp)) + +- `Disabled` word translation to Spanish ([#12406](https://github.com/RocketChat/Rocket.Chat/pull/12406) by [@Ismaw34](https://github.com/Ismaw34)) + +- Admin styles ([#12614](https://github.com/RocketChat/Rocket.Chat/pull/12614)) + +- Admin styles ([#12602](https://github.com/RocketChat/Rocket.Chat/pull/12602)) + +- Autotranslate icon on message action menu ([#12585](https://github.com/RocketChat/Rocket.Chat/pull/12585)) + +- Avoiding links with highlighted words ([#12123](https://github.com/RocketChat/Rocket.Chat/pull/12123) by [@rssilva](https://github.com/rssilva)) + +- cannot reset password ([#12903](https://github.com/RocketChat/Rocket.Chat/pull/12903) by [@Hudell](https://github.com/Hudell)) + +- CAS Login not working with renamed users ([#12860](https://github.com/RocketChat/Rocket.Chat/pull/12860) by [@Hudell](https://github.com/Hudell)) + +- Change field checks in RocketChat.saveStreamingOptions ([#12973](https://github.com/RocketChat/Rocket.Chat/pull/12973)) + +- Change JSON to EJSON.parse query to support type Date ([#12706](https://github.com/RocketChat/Rocket.Chat/pull/12706)) + +- Change registration message when user need to confirm email ([#9336](https://github.com/RocketChat/Rocket.Chat/pull/9336) by [@karlprieb](https://github.com/karlprieb)) + +- Check for object falsehood before referencing properties in saveRoomSettings ([#12972](https://github.com/RocketChat/Rocket.Chat/pull/12972)) + +- Condition to not render PDF preview ([#12632](https://github.com/RocketChat/Rocket.Chat/pull/12632)) + +- Correct roomName value in Mail Messages (#12363) ([#12453](https://github.com/RocketChat/Rocket.Chat/pull/12453) by [@vinade](https://github.com/vinade)) + +- Crowd sync was being stopped when a user was not found ([#12930](https://github.com/RocketChat/Rocket.Chat/pull/12930) by [@piotrkochan](https://github.com/piotrkochan)) + +- Data Import not working ([#12866](https://github.com/RocketChat/Rocket.Chat/pull/12866) by [@Hudell](https://github.com/Hudell)) + +- DE translation for idle-time-limit ([#12637](https://github.com/RocketChat/Rocket.Chat/pull/12637) by [@pfuender](https://github.com/pfuender)) + +- Download files without extension wasn't possible ([#13033](https://github.com/RocketChat/Rocket.Chat/pull/13033)) + +- E2E`s password reaveal text is always `>%S` when language is zh ([#12795](https://github.com/RocketChat/Rocket.Chat/pull/12795) by [@lvyue](https://github.com/lvyue)) + +- Email sending with GDPR user data ([#12487](https://github.com/RocketChat/Rocket.Chat/pull/12487)) + +- Emoji picker is not in viewport on small screens ([#12457](https://github.com/RocketChat/Rocket.Chat/pull/12457) by [@ramrami](https://github.com/ramrami)) + +- Exception in getSingleMessage ([#12970](https://github.com/RocketChat/Rocket.Chat/pull/12970) by [@tsukiRep](https://github.com/tsukiRep)) + +- Fix favico error ([#12643](https://github.com/RocketChat/Rocket.Chat/pull/12643)) + +- Fix set avatar http call, to avoid SSL errors ([#12790](https://github.com/RocketChat/Rocket.Chat/pull/12790)) + +- Fix users.setPreferences endpoint, set language correctly ([#12734](https://github.com/RocketChat/Rocket.Chat/pull/12734)) + +- Fix wrong parameter in chat.delete endpoint and add some test cases ([#12408](https://github.com/RocketChat/Rocket.Chat/pull/12408)) + +- Fixed Anonymous Registration ([#12633](https://github.com/RocketChat/Rocket.Chat/pull/12633) by [@wreiske](https://github.com/wreiske)) + +- German translation for for API_EmbedIgnoredHosts label ([#12518](https://github.com/RocketChat/Rocket.Chat/pull/12518) by [@mbrodala](https://github.com/mbrodala)) + +- Google Cloud Storage storage provider ([#12843](https://github.com/RocketChat/Rocket.Chat/pull/12843)) + +- Handle all events for enter key in message box ([#12507](https://github.com/RocketChat/Rocket.Chat/pull/12507)) + +- high cpu usage ~ svg icon ([#12677](https://github.com/RocketChat/Rocket.Chat/pull/12677) by [@ph1p](https://github.com/ph1p)) + +- Import missed file in rocketchat-authorization ([#12570](https://github.com/RocketChat/Rocket.Chat/pull/12570)) + +- Incorrect parameter name in Livechat stream ([#12851](https://github.com/RocketChat/Rocket.Chat/pull/12851)) + +- Inherit font family in message user card ([#13004](https://github.com/RocketChat/Rocket.Chat/pull/13004)) + +- line-height for unread bar buttons (jump to first and mark as read) ([#12900](https://github.com/RocketChat/Rocket.Chat/pull/12900)) + +- Manage own integrations permissions check ([#12397](https://github.com/RocketChat/Rocket.Chat/pull/12397)) + +- multiple rooms-changed ([#12940](https://github.com/RocketChat/Rocket.Chat/pull/12940)) + +- Nested Markdown blocks not parsed properly ([#12998](https://github.com/RocketChat/Rocket.Chat/pull/12998) by [@Hudell](https://github.com/Hudell)) + +- Padding for message box in embedded layout ([#12556](https://github.com/RocketChat/Rocket.Chat/pull/12556)) + +- PDF view loading indicator ([#12882](https://github.com/RocketChat/Rocket.Chat/pull/12882)) + +- Pin and unpin message were not checking permissions ([#12739](https://github.com/RocketChat/Rocket.Chat/pull/12739)) + +- Prevent subscriptions and calls to rooms events that the user is not participating ([#12558](https://github.com/RocketChat/Rocket.Chat/pull/12558)) + +- Provide better Dutch translations 🇳🇱 ([#12792](https://github.com/RocketChat/Rocket.Chat/pull/12792) by [@mathysie](https://github.com/mathysie)) + +- Readable validation on the apps engine environment bridge ([#12994](https://github.com/RocketChat/Rocket.Chat/pull/12994)) + +- Remove sharp's deprecation warnings on image upload ([#12980](https://github.com/RocketChat/Rocket.Chat/pull/12980)) + +- Reset password email ([#12898](https://github.com/RocketChat/Rocket.Chat/pull/12898)) + +- Revert Jitsi external API to an asset ([#12954](https://github.com/RocketChat/Rocket.Chat/pull/12954)) + +- Some deprecation issues for media recording ([#12948](https://github.com/RocketChat/Rocket.Chat/pull/12948)) + +- Some icons were missing ([#12913](https://github.com/RocketChat/Rocket.Chat/pull/12913)) + +- Spotlight being called while in background ([#12957](https://github.com/RocketChat/Rocket.Chat/pull/12957)) + +- Spotlight method being called multiple times ([#12536](https://github.com/RocketChat/Rocket.Chat/pull/12536)) + +- Stop click event propagation on mention link or user card ([#12983](https://github.com/RocketChat/Rocket.Chat/pull/12983)) + +- Stream of my_message wasn't sending the room information ([#12914](https://github.com/RocketChat/Rocket.Chat/pull/12914)) + +- stream room-changed ([#12411](https://github.com/RocketChat/Rocket.Chat/pull/12411)) + +- Update caret position on insert a new line in message box ([#12713](https://github.com/RocketChat/Rocket.Chat/pull/12713)) + +- Use web.browser.legacy bundle for Livechat script ([#12975](https://github.com/RocketChat/Rocket.Chat/pull/12975)) + +- User data download fails when a room has been deleted. ([#12829](https://github.com/RocketChat/Rocket.Chat/pull/12829) by [@Hudell](https://github.com/Hudell)) + +- Version check update notification ([#12905](https://github.com/RocketChat/Rocket.Chat/pull/12905)) + +- Webdav integration account settings were being shown even when Webdav was disabled ([#12569](https://github.com/RocketChat/Rocket.Chat/pull/12569) by [@karakayasemi](https://github.com/karakayasemi)) + +- Wrong test case for `users.setAvatar` endpoint ([#12539](https://github.com/RocketChat/Rocket.Chat/pull/12539)) + +
+🔍 Minor changes + + +- Convert rocketchat-channel-settings to main module structure ([#12594](https://github.com/RocketChat/Rocket.Chat/pull/12594)) + +- Convert rocketchat-emoji-custom to main module structure ([#12604](https://github.com/RocketChat/Rocket.Chat/pull/12604)) + +- Convert rocketchat-importer-slack to main module structure ([#12666](https://github.com/RocketChat/Rocket.Chat/pull/12666)) + +- Convert rocketchat-livestream to main module structure ([#12679](https://github.com/RocketChat/Rocket.Chat/pull/12679)) + +- Convert rocketchat-mentions-flextab to main module structure ([#12757](https://github.com/RocketChat/Rocket.Chat/pull/12757)) + +- Convert rocketchat-reactions to main module structure ([#12888](https://github.com/RocketChat/Rocket.Chat/pull/12888)) + +- Convert rocketchat-ui-account to main module structure ([#12842](https://github.com/RocketChat/Rocket.Chat/pull/12842)) + +- Convert rocketchat-ui-flextab to main module structure ([#12859](https://github.com/RocketChat/Rocket.Chat/pull/12859)) + +- [DOCS] Remove Cordova links, include F-Droid download button and few other adjustments ([#12583](https://github.com/RocketChat/Rocket.Chat/pull/12583) by [@rafaelks](https://github.com/rafaelks)) + +- Add check to make sure releases was updated ([#12791](https://github.com/RocketChat/Rocket.Chat/pull/12791)) + +- Added "npm install" to quick start for developers ([#12374](https://github.com/RocketChat/Rocket.Chat/pull/12374) by [@wreiske](https://github.com/wreiske)) + +- Added imports for global variables in rocketchat-google-natural-language package ([#12647](https://github.com/RocketChat/Rocket.Chat/pull/12647)) + +- Bump Apps Engine to 1.3.0 ([#12705](https://github.com/RocketChat/Rocket.Chat/pull/12705)) + +- Change `chat.getDeletedMessages` to get messages after informed date and return only message's _id ([#13021](https://github.com/RocketChat/Rocket.Chat/pull/13021)) + +- changed maxRoomsOpen ([#12949](https://github.com/RocketChat/Rocket.Chat/pull/12949)) + +- Convert chatpal search package to modular structure ([#12485](https://github.com/RocketChat/Rocket.Chat/pull/12485)) + +- Convert emoji-emojione to main module structure ([#12605](https://github.com/RocketChat/Rocket.Chat/pull/12605)) + +- Convert meteor-accounts-saml to main module structure ([#12486](https://github.com/RocketChat/Rocket.Chat/pull/12486)) + +- Convert meteor-autocomplete package to main module structure ([#12491](https://github.com/RocketChat/Rocket.Chat/pull/12491)) + +- Convert meteor-timesync to main module structure ([#12495](https://github.com/RocketChat/Rocket.Chat/pull/12495)) + +- Convert rocketchat-2fa to main module structure ([#12501](https://github.com/RocketChat/Rocket.Chat/pull/12501)) + +- Convert rocketchat-action-links to main module structure ([#12503](https://github.com/RocketChat/Rocket.Chat/pull/12503)) + +- Convert rocketchat-analytics to main module structure ([#12506](https://github.com/RocketChat/Rocket.Chat/pull/12506)) + +- Convert rocketchat-api to main module structure ([#12510](https://github.com/RocketChat/Rocket.Chat/pull/12510)) + +- Convert rocketchat-assets to main module structure ([#12521](https://github.com/RocketChat/Rocket.Chat/pull/12521)) + +- Convert rocketchat-authorization to main module structure ([#12523](https://github.com/RocketChat/Rocket.Chat/pull/12523)) + +- Convert rocketchat-autolinker to main module structure ([#12529](https://github.com/RocketChat/Rocket.Chat/pull/12529)) + +- Convert rocketchat-autotranslate to main module structure ([#12530](https://github.com/RocketChat/Rocket.Chat/pull/12530)) + +- Convert rocketchat-bot-helpers to main module structure ([#12531](https://github.com/RocketChat/Rocket.Chat/pull/12531)) + +- Convert rocketchat-cas to main module structure ([#12532](https://github.com/RocketChat/Rocket.Chat/pull/12532)) + +- Convert rocketchat-channel-settings-mail-messages to main module structure ([#12537](https://github.com/RocketChat/Rocket.Chat/pull/12537)) + +- Convert rocketchat-colors to main module structure ([#12538](https://github.com/RocketChat/Rocket.Chat/pull/12538)) + +- Convert rocketchat-cors to main module structure ([#12595](https://github.com/RocketChat/Rocket.Chat/pull/12595)) + +- Convert rocketchat-crowd to main module structure ([#12596](https://github.com/RocketChat/Rocket.Chat/pull/12596)) + +- Convert rocketchat-custom-sounds to main module structure ([#12599](https://github.com/RocketChat/Rocket.Chat/pull/12599)) + +- Convert rocketchat-dolphin to main module structure ([#12600](https://github.com/RocketChat/Rocket.Chat/pull/12600)) + +- Convert rocketchat-drupal to main module structure ([#12601](https://github.com/RocketChat/Rocket.Chat/pull/12601)) + +- Convert rocketchat-emoji to main module structure ([#12603](https://github.com/RocketChat/Rocket.Chat/pull/12603)) + +- Convert rocketchat-error-handler to main module structure ([#12606](https://github.com/RocketChat/Rocket.Chat/pull/12606)) + +- Convert rocketchat-favico to main module structure ([#12607](https://github.com/RocketChat/Rocket.Chat/pull/12607)) + +- Convert rocketchat-file to main module structure ([#12644](https://github.com/RocketChat/Rocket.Chat/pull/12644)) + +- Convert rocketchat-github-enterprise to main module structure ([#12642](https://github.com/RocketChat/Rocket.Chat/pull/12642)) + +- Convert rocketchat-gitlab to main module structure ([#12646](https://github.com/RocketChat/Rocket.Chat/pull/12646)) + +- Convert rocketchat-google-vision to main module structure ([#12649](https://github.com/RocketChat/Rocket.Chat/pull/12649)) + +- Convert rocketchat-grant to main module structure ([#12657](https://github.com/RocketChat/Rocket.Chat/pull/12657)) + +- Convert rocketchat-graphql to main module structure ([#12658](https://github.com/RocketChat/Rocket.Chat/pull/12658)) + +- Convert rocketchat-highlight-words to main module structure ([#12659](https://github.com/RocketChat/Rocket.Chat/pull/12659)) + +- Convert rocketchat-iframe-login to main module structure ([#12661](https://github.com/RocketChat/Rocket.Chat/pull/12661)) + +- Convert rocketchat-importer to main module structure ([#12662](https://github.com/RocketChat/Rocket.Chat/pull/12662)) + +- Convert rocketchat-importer-csv to main module structure ([#12663](https://github.com/RocketChat/Rocket.Chat/pull/12663)) + +- Convert rocketchat-importer-hipchat to main module structure ([#12664](https://github.com/RocketChat/Rocket.Chat/pull/12664)) + +- Convert rocketchat-importer-hipchat-enterprise to main module structure ([#12665](https://github.com/RocketChat/Rocket.Chat/pull/12665)) + +- Convert rocketchat-importer-slack-users to main module structure ([#12669](https://github.com/RocketChat/Rocket.Chat/pull/12669)) + +- Convert rocketchat-integrations to main module structure ([#12670](https://github.com/RocketChat/Rocket.Chat/pull/12670)) + +- Convert rocketchat-internal-hubot to main module structure ([#12671](https://github.com/RocketChat/Rocket.Chat/pull/12671)) + +- Convert rocketchat-irc to main module structure ([#12672](https://github.com/RocketChat/Rocket.Chat/pull/12672)) + +- Convert rocketchat-issuelinks to main module structure ([#12674](https://github.com/RocketChat/Rocket.Chat/pull/12674)) + +- Convert rocketchat-katex to main module structure ([#12895](https://github.com/RocketChat/Rocket.Chat/pull/12895)) + +- Convert rocketchat-ldap to main module structure ([#12678](https://github.com/RocketChat/Rocket.Chat/pull/12678)) + +- Convert rocketchat-livechat to main module structure ([#12942](https://github.com/RocketChat/Rocket.Chat/pull/12942)) + +- Convert rocketchat-logger to main module structure and remove Logger from eslintrc ([#12995](https://github.com/RocketChat/Rocket.Chat/pull/12995)) + +- Convert rocketchat-mail-messages to main module structure ([#12682](https://github.com/RocketChat/Rocket.Chat/pull/12682)) + +- Convert rocketchat-mapview to main module structure ([#12701](https://github.com/RocketChat/Rocket.Chat/pull/12701)) + +- Convert rocketchat-markdown to main module structure ([#12755](https://github.com/RocketChat/Rocket.Chat/pull/12755)) + +- Convert rocketchat-mentions to main module structure ([#12756](https://github.com/RocketChat/Rocket.Chat/pull/12756)) + +- Convert rocketchat-message-action to main module structure ([#12759](https://github.com/RocketChat/Rocket.Chat/pull/12759)) + +- Convert rocketchat-message-attachments to main module structure ([#12760](https://github.com/RocketChat/Rocket.Chat/pull/12760)) + +- Convert rocketchat-message-mark-as-unread to main module structure ([#12766](https://github.com/RocketChat/Rocket.Chat/pull/12766)) + +- Convert rocketchat-message-pin to main module structure ([#12767](https://github.com/RocketChat/Rocket.Chat/pull/12767)) + +- Convert rocketchat-message-snippet to main module structure ([#12768](https://github.com/RocketChat/Rocket.Chat/pull/12768)) + +- Convert rocketchat-message-star to main module structure ([#12770](https://github.com/RocketChat/Rocket.Chat/pull/12770)) + +- Convert rocketchat-migrations to main-module structure ([#12772](https://github.com/RocketChat/Rocket.Chat/pull/12772)) + +- Convert rocketchat-oauth2-server-config to main module structure ([#12773](https://github.com/RocketChat/Rocket.Chat/pull/12773)) + +- Convert rocketchat-oembed to main module structure ([#12775](https://github.com/RocketChat/Rocket.Chat/pull/12775)) + +- Convert rocketchat-otr to main module structure ([#12777](https://github.com/RocketChat/Rocket.Chat/pull/12777)) + +- Convert rocketchat-push-notifications to main module structure ([#12778](https://github.com/RocketChat/Rocket.Chat/pull/12778)) + +- Convert rocketchat-retention-policy to main module structure ([#12797](https://github.com/RocketChat/Rocket.Chat/pull/12797)) + +- Convert rocketchat-sandstorm to main module structure ([#12799](https://github.com/RocketChat/Rocket.Chat/pull/12799)) + +- Convert rocketchat-search to main module structure ([#12801](https://github.com/RocketChat/Rocket.Chat/pull/12801)) + +- Convert rocketchat-setup-wizard to main module structure ([#12806](https://github.com/RocketChat/Rocket.Chat/pull/12806)) + +- Convert rocketchat-slackbridge to main module structure ([#12807](https://github.com/RocketChat/Rocket.Chat/pull/12807)) + +- Convert rocketchat-slashcomands-archiveroom to main module structure ([#12810](https://github.com/RocketChat/Rocket.Chat/pull/12810)) + +- Convert rocketchat-slashcommands-asciiarts to main module structure ([#12808](https://github.com/RocketChat/Rocket.Chat/pull/12808)) + +- Convert rocketchat-slashcommands-create to main module structure ([#12811](https://github.com/RocketChat/Rocket.Chat/pull/12811)) + +- Convert rocketchat-slashcommands-help to main module structure ([#12812](https://github.com/RocketChat/Rocket.Chat/pull/12812)) + +- Convert rocketchat-slashcommands-hide to main module structure ([#12813](https://github.com/RocketChat/Rocket.Chat/pull/12813)) + +- Convert rocketchat-slashcommands-invite to main module structure ([#12814](https://github.com/RocketChat/Rocket.Chat/pull/12814)) + +- Convert rocketchat-slashcommands-inviteall to main module structure ([#12815](https://github.com/RocketChat/Rocket.Chat/pull/12815)) + +- Convert rocketchat-slashcommands-join to main module structure ([#12816](https://github.com/RocketChat/Rocket.Chat/pull/12816)) + +- Convert rocketchat-slashcommands-kick to main module structure ([#12817](https://github.com/RocketChat/Rocket.Chat/pull/12817)) + +- Convert rocketchat-slashcommands-leave to main module structure ([#12821](https://github.com/RocketChat/Rocket.Chat/pull/12821)) + +- Convert rocketchat-slashcommands-me to main module structure ([#12822](https://github.com/RocketChat/Rocket.Chat/pull/12822)) + +- Convert rocketchat-slashcommands-msg to main module structure ([#12823](https://github.com/RocketChat/Rocket.Chat/pull/12823)) + +- Convert rocketchat-slashcommands-mute to main module structure ([#12824](https://github.com/RocketChat/Rocket.Chat/pull/12824)) + +- Convert rocketchat-slashcommands-open to main module structure ([#12825](https://github.com/RocketChat/Rocket.Chat/pull/12825)) + +- Convert rocketchat-slashcommands-topic to main module structure ([#12826](https://github.com/RocketChat/Rocket.Chat/pull/12826)) + +- Convert rocketchat-slashcommands-unarchiveroom to main module structure ([#12827](https://github.com/RocketChat/Rocket.Chat/pull/12827)) + +- Convert rocketchat-slider to main module structure ([#12828](https://github.com/RocketChat/Rocket.Chat/pull/12828)) + +- Convert rocketchat-smarsh-connector to main module structure ([#12830](https://github.com/RocketChat/Rocket.Chat/pull/12830)) + +- Convert rocketchat-sms to main module structure ([#12831](https://github.com/RocketChat/Rocket.Chat/pull/12831)) + +- Convert rocketchat-spotify to main module structure ([#12832](https://github.com/RocketChat/Rocket.Chat/pull/12832)) + +- Convert rocketchat-statistics to main module structure ([#12833](https://github.com/RocketChat/Rocket.Chat/pull/12833)) + +- Convert rocketchat-theme to main module structure ([#12896](https://github.com/RocketChat/Rocket.Chat/pull/12896)) + +- Convert rocketchat-token-login to main module structure ([#12837](https://github.com/RocketChat/Rocket.Chat/pull/12837)) + +- Convert rocketchat-tokenpass to main module structure ([#12838](https://github.com/RocketChat/Rocket.Chat/pull/12838)) + +- Convert rocketchat-tooltip to main module structure ([#12839](https://github.com/RocketChat/Rocket.Chat/pull/12839)) + +- Convert rocketchat-ui-admin to main module structure ([#12844](https://github.com/RocketChat/Rocket.Chat/pull/12844)) + +- Convert rocketchat-ui-clean-history to main module structure ([#12846](https://github.com/RocketChat/Rocket.Chat/pull/12846)) + +- Convert rocketchat-ui-login to main module structure ([#12861](https://github.com/RocketChat/Rocket.Chat/pull/12861)) + +- Convert rocketchat-ui-message to main module structure ([#12871](https://github.com/RocketChat/Rocket.Chat/pull/12871)) + +- Convert rocketchat-ui-vrecord to main module structure ([#12875](https://github.com/RocketChat/Rocket.Chat/pull/12875)) + +- Convert rocketchat-user-data-dowload to main module structure ([#12877](https://github.com/RocketChat/Rocket.Chat/pull/12877)) + +- Convert rocketchat-version-check to main module structure ([#12879](https://github.com/RocketChat/Rocket.Chat/pull/12879)) + +- Convert rocketchat-videobridge to main module structure ([#12881](https://github.com/RocketChat/Rocket.Chat/pull/12881)) + +- Convert rocketchat-webdav to main module structure ([#12886](https://github.com/RocketChat/Rocket.Chat/pull/12886)) + +- Convert rocketchat-wordpress to main module structure ([#12887](https://github.com/RocketChat/Rocket.Chat/pull/12887)) + +- Dependencies update ([#12624](https://github.com/RocketChat/Rocket.Chat/pull/12624)) + +- Fix CI deploy job ([#12803](https://github.com/RocketChat/Rocket.Chat/pull/12803)) + +- Fix crowd error with import of SyncedCron ([#12641](https://github.com/RocketChat/Rocket.Chat/pull/12641)) + +- Fix CSS import order ([#12524](https://github.com/RocketChat/Rocket.Chat/pull/12524)) + +- Fix ES translation ([#12509](https://github.com/RocketChat/Rocket.Chat/pull/12509)) + +- Fix punctuation, spelling, and grammar ([#12451](https://github.com/RocketChat/Rocket.Chat/pull/12451) by [@imronras](https://github.com/imronras)) + +- Fix some Ukrainian translations ([#12712](https://github.com/RocketChat/Rocket.Chat/pull/12712) by [@zdumitru](https://github.com/zdumitru)) + +- Fix users.setAvatar endpoint tests and logic ([#12625](https://github.com/RocketChat/Rocket.Chat/pull/12625)) + +- Fix: Add email dependency in package.js ([#12645](https://github.com/RocketChat/Rocket.Chat/pull/12645)) + +- Fix: Developers not being able to debug root files in VSCode ([#12440](https://github.com/RocketChat/Rocket.Chat/pull/12440) by [@mrsimpson](https://github.com/mrsimpson)) + +- Fix: Exception when registering a user with gravatar ([#12699](https://github.com/RocketChat/Rocket.Chat/pull/12699)) + +- Fix: Fix tests by increasing window size ([#12707](https://github.com/RocketChat/Rocket.Chat/pull/12707)) + +- Fix: snap push from ci ([#12883](https://github.com/RocketChat/Rocket.Chat/pull/12883)) + +- German translation typo fix for Reacted_with ([#12761](https://github.com/RocketChat/Rocket.Chat/pull/12761) by [@localguru](https://github.com/localguru)) + +- Improve Importer code quality ([#13020](https://github.com/RocketChat/Rocket.Chat/pull/13020) by [@Hudell](https://github.com/Hudell)) + +- Improve: Add missing translation keys. ([#12708](https://github.com/RocketChat/Rocket.Chat/pull/12708) by [@ura14h](https://github.com/ura14h)) + +- LingoHub based on develop ([#13014](https://github.com/RocketChat/Rocket.Chat/pull/13014)) + +- LingoHub based on develop ([#12684](https://github.com/RocketChat/Rocket.Chat/pull/12684)) + +- LingoHub based on develop ([#12470](https://github.com/RocketChat/Rocket.Chat/pull/12470)) + +- Merge master into develop & Set version to 0.72.0-develop ([#12460](https://github.com/RocketChat/Rocket.Chat/pull/12460) by [@Hudell](https://github.com/Hudell)) + +- Merge master into develop & Set version to 0.73.0-develop ([#12776](https://github.com/RocketChat/Rocket.Chat/pull/12776)) + +- Move globals of test to a specific eslintrc file ([#12959](https://github.com/RocketChat/Rocket.Chat/pull/12959)) + +- Move isFirefox and isChrome functions to rocketchat-utils ([#13011](https://github.com/RocketChat/Rocket.Chat/pull/13011)) + +- Move tapi18n t and isRtl functions from ui to utils ([#13005](https://github.com/RocketChat/Rocket.Chat/pull/13005)) + +- Regression: Account pages layout ([#12735](https://github.com/RocketChat/Rocket.Chat/pull/12735)) + +- Regression: Expand Administration sections by toggling section title ([#12736](https://github.com/RocketChat/Rocket.Chat/pull/12736)) + +- Regression: Fix Safari detection in PDF previewing ([#12737](https://github.com/RocketChat/Rocket.Chat/pull/12737)) + +- Regression: Inherit font-family for message box ([#12729](https://github.com/RocketChat/Rocket.Chat/pull/12729)) + +- Regression: List of custom emojis wasn't working ([#13031](https://github.com/RocketChat/Rocket.Chat/pull/13031)) + +- Release 0.72.2 ([#12901](https://github.com/RocketChat/Rocket.Chat/pull/12901)) + +- Release 0.72.3 ([#12932](https://github.com/RocketChat/Rocket.Chat/pull/12932) by [@Hudell](https://github.com/Hudell) & [@piotrkochan](https://github.com/piotrkochan)) + +- Removal of EJSON, Accounts, Email, HTTP, Random, ReactiveDict, ReactiveVar, SHA256 and WebApp global variables ([#12377](https://github.com/RocketChat/Rocket.Chat/pull/12377)) + +- Removal of Match, check, moment, Tracker and Mongo global variables ([#12410](https://github.com/RocketChat/Rocket.Chat/pull/12410)) + +- Removal of Meteor global variable ([#12371](https://github.com/RocketChat/Rocket.Chat/pull/12371)) + +- Removal of TAPi18n and TAPi18next global variables ([#12467](https://github.com/RocketChat/Rocket.Chat/pull/12467)) + +- Removal of Template, Blaze, BlazeLayout, FlowRouter, DDPRateLimiter, Session, UAParser, Promise, Reload and CryptoJS global variables ([#12433](https://github.com/RocketChat/Rocket.Chat/pull/12433)) + +- Remove /* globals */ from files wave-1 ([#12984](https://github.com/RocketChat/Rocket.Chat/pull/12984)) + +- Remove /* globals */ wave 2 ([#12988](https://github.com/RocketChat/Rocket.Chat/pull/12988)) + +- Remove /* globals */ wave 3 ([#12997](https://github.com/RocketChat/Rocket.Chat/pull/12997)) + +- Remove /* globals */ wave 4 ([#12999](https://github.com/RocketChat/Rocket.Chat/pull/12999)) + +- Remove conventional changelog cli, we are using our own cli now (Houston) ([#12798](https://github.com/RocketChat/Rocket.Chat/pull/12798)) + +- Remove global ServiceConfiguration ([#12960](https://github.com/RocketChat/Rocket.Chat/pull/12960)) + +- Remove global toastr ([#12961](https://github.com/RocketChat/Rocket.Chat/pull/12961)) + +- Remove rocketchat-tutum package ([#12840](https://github.com/RocketChat/Rocket.Chat/pull/12840)) + +- Remove template for feature requests as issues ([#12426](https://github.com/RocketChat/Rocket.Chat/pull/12426)) + +- Removed RocketChatFile from globals ([#12650](https://github.com/RocketChat/Rocket.Chat/pull/12650)) + +- Revert imports of css, reAdd them to the addFiles function ([#12934](https://github.com/RocketChat/Rocket.Chat/pull/12934)) + +- Update Apps Engine to 1.3.1 ([#12741](https://github.com/RocketChat/Rocket.Chat/pull/12741)) + +- Update npm dependencies ([#12465](https://github.com/RocketChat/Rocket.Chat/pull/12465)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@AndreamApp](https://github.com/AndreamApp) +- [@Hudell](https://github.com/Hudell) +- [@Ismaw34](https://github.com/Ismaw34) +- [@alexbartsch](https://github.com/alexbartsch) +- [@cardoso](https://github.com/cardoso) +- [@cyberb](https://github.com/cyberb) +- [@hypery2k](https://github.com/hypery2k) +- [@imronras](https://github.com/imronras) +- [@karakayasemi](https://github.com/karakayasemi) +- [@karlprieb](https://github.com/karlprieb) +- [@localguru](https://github.com/localguru) +- [@lvyue](https://github.com/lvyue) +- [@mathysie](https://github.com/mathysie) +- [@mbrodala](https://github.com/mbrodala) +- [@mrsimpson](https://github.com/mrsimpson) +- [@nicolasbock](https://github.com/nicolasbock) +- [@pfuender](https://github.com/pfuender) +- [@ph1p](https://github.com/ph1p) +- [@piotrkochan](https://github.com/piotrkochan) +- [@rafaelks](https://github.com/rafaelks) +- [@ramrami](https://github.com/ramrami) +- [@rssilva](https://github.com/rssilva) +- [@sanketsingh24](https://github.com/sanketsingh24) +- [@tsukiRep](https://github.com/tsukiRep) +- [@ura14h](https://github.com/ura14h) +- [@vinade](https://github.com/vinade) +- [@wreiske](https://github.com/wreiske) +- [@zdumitru](https://github.com/zdumitru) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@LuluGO](https://github.com/LuluGO) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@d-gubert](https://github.com/d-gubert) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@marceloschmidt](https://github.com/marceloschmidt) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 0.72.3 +`2018-12-12 · 1 🔍 · 5 👩‍💻👨‍💻` + +
+🔍 Minor changes + + +- Release 0.72.3 ([#12932](https://github.com/RocketChat/Rocket.Chat/pull/12932) by [@Hudell](https://github.com/Hudell) & [@piotrkochan](https://github.com/piotrkochan)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) +- [@piotrkochan](https://github.com/piotrkochan) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@rodrigok](https://github.com/rodrigok) +- [@tassoevan](https://github.com/tassoevan) + +# 0.72.2 +`2018-12-10 · 3 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` + +### 🐛 Bug fixes + + +- line-height for unread bar buttons (jump to first and mark as read) ([#12900](https://github.com/RocketChat/Rocket.Chat/pull/12900)) + +- PDF view loading indicator ([#12882](https://github.com/RocketChat/Rocket.Chat/pull/12882)) + +- Reset password email ([#12898](https://github.com/RocketChat/Rocket.Chat/pull/12898)) + +
+🔍 Minor changes + + +- Release 0.72.2 ([#12901](https://github.com/RocketChat/Rocket.Chat/pull/12901)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 0.72.1 +`2018-12-05 · 4 🐛 · 3 🔍 · 8 👩‍💻👨‍💻` + +### 🐛 Bug fixes + + +- API users.info returns caller rooms and not requested user ones ([#12727](https://github.com/RocketChat/Rocket.Chat/pull/12727) by [@piotrkochan](https://github.com/piotrkochan)) + +- Change spread operator to Array.from for Edge browser ([#12818](https://github.com/RocketChat/Rocket.Chat/pull/12818) by [@ohmonster](https://github.com/ohmonster)) + +- Emoji as avatar ([#12805](https://github.com/RocketChat/Rocket.Chat/pull/12805)) + +- Missing HipChat Enterprise Importer ([#12847](https://github.com/RocketChat/Rocket.Chat/pull/12847) by [@Hudell](https://github.com/Hudell)) + +
+🔍 Minor changes + + +- Bump Apps-Engine version ([#12848](https://github.com/RocketChat/Rocket.Chat/pull/12848)) + +- Change file order in rocketchat-cors ([#12804](https://github.com/RocketChat/Rocket.Chat/pull/12804)) + +- Release 0.72.1 ([#12850](https://github.com/RocketChat/Rocket.Chat/pull/12850) by [@Hudell](https://github.com/Hudell) & [@ohmonster](https://github.com/ohmonster) & [@piotrkochan](https://github.com/piotrkochan)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) +- [@ohmonster](https://github.com/ohmonster) +- [@piotrkochan](https://github.com/piotrkochan) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@d-gubert](https://github.com/d-gubert) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 0.72.0 +`2018-11-28 · 2 ️️️⚠️ · 6 🎉 · 16 🚀 · 22 🐛 · 79 🔍 · 25 👩‍💻👨‍💻` + +### ⚠️ BREAKING CHANGES + + +- Support for Cordova (Rocket.Chat Legacy app) has reached End-of-life, support has been discontinued + +- Update to Meteor to 1.8 ([#12468](https://github.com/RocketChat/Rocket.Chat/pull/12468)) + +### 🎉 New features + + +- /api/v1/spotlight: return joinCodeRequired field for rooms ([#12651](https://github.com/RocketChat/Rocket.Chat/pull/12651) by [@cardoso](https://github.com/cardoso)) + +- Add permission to enable personal access token to specific roles ([#12309](https://github.com/RocketChat/Rocket.Chat/pull/12309)) + +- Make Livechat's widget draggable ([#12378](https://github.com/RocketChat/Rocket.Chat/pull/12378)) + +- New API Endpoints for the new version of JS SDK ([#12623](https://github.com/RocketChat/Rocket.Chat/pull/12623)) + +- Option to reset e2e key ([#12483](https://github.com/RocketChat/Rocket.Chat/pull/12483) by [@Hudell](https://github.com/Hudell)) + +- Setting to configure robots.txt content ([#12547](https://github.com/RocketChat/Rocket.Chat/pull/12547) by [@Hudell](https://github.com/Hudell)) + +### 🚀 Improvements + + +- Add CTRL modifier for keyboard shortcut ([#12525](https://github.com/RocketChat/Rocket.Chat/pull/12525) by [@nicolasbock](https://github.com/nicolasbock)) + +- Add more methods to deal with rooms via Rocket.Chat.Apps ([#12680](https://github.com/RocketChat/Rocket.Chat/pull/12680)) + +- Add new acceptable header for Livechat REST requests ([#12561](https://github.com/RocketChat/Rocket.Chat/pull/12561)) + +- Add rooms property in user object, if the user has the permission, with rooms roles ([#12105](https://github.com/RocketChat/Rocket.Chat/pull/12105)) + +- Allow apps to update persistence by association ([#12714](https://github.com/RocketChat/Rocket.Chat/pull/12714)) + +- Atlassian Crowd settings and option to sync user data ([#12616](https://github.com/RocketChat/Rocket.Chat/pull/12616)) + +- Better query for finding subscriptions that need a new E2E Key ([#12692](https://github.com/RocketChat/Rocket.Chat/pull/12692) by [@Hudell](https://github.com/Hudell)) + +- border-radius to use --border-radius ([#12675](https://github.com/RocketChat/Rocket.Chat/pull/12675)) + +- CircleCI to use MongoDB 4.0 for testing ([#12618](https://github.com/RocketChat/Rocket.Chat/pull/12618)) + +- Emoji search on messageBox behaving like emojiPicker's search (#9607) ([#12452](https://github.com/RocketChat/Rocket.Chat/pull/12452) by [@vinade](https://github.com/vinade)) + +- German translations ([#12471](https://github.com/RocketChat/Rocket.Chat/pull/12471) by [@mrsimpson](https://github.com/mrsimpson)) + +- Ignore non-existent Livechat custom fields on Livechat API ([#12522](https://github.com/RocketChat/Rocket.Chat/pull/12522)) + +- Improve unreads and unreadsFrom response, prevent it to be equal null ([#12563](https://github.com/RocketChat/Rocket.Chat/pull/12563)) + +- Japanese translations ([#12382](https://github.com/RocketChat/Rocket.Chat/pull/12382) by [@ura14h](https://github.com/ura14h)) + +- Limit the number of typing users shown (#8722) ([#12400](https://github.com/RocketChat/Rocket.Chat/pull/12400) by [@vinade](https://github.com/vinade)) + +- Update the 'keyboard shortcuts' documentation ([#12564](https://github.com/RocketChat/Rocket.Chat/pull/12564) by [@nicolasbock](https://github.com/nicolasbock)) + +### 🐛 Bug fixes + + +- `Disabled` word translation to Chinese ([#12260](https://github.com/RocketChat/Rocket.Chat/pull/12260) by [@AndreamApp](https://github.com/AndreamApp)) + +- `Disabled` word translation to Spanish ([#12406](https://github.com/RocketChat/Rocket.Chat/pull/12406) by [@Ismaw34](https://github.com/Ismaw34)) + +- Admin styles ([#12614](https://github.com/RocketChat/Rocket.Chat/pull/12614)) + +- Admin styles ([#12602](https://github.com/RocketChat/Rocket.Chat/pull/12602)) + +- Change registration message when user need to confirm email ([#9336](https://github.com/RocketChat/Rocket.Chat/pull/9336) by [@karlprieb](https://github.com/karlprieb)) + +- Condition to not render PDF preview ([#12632](https://github.com/RocketChat/Rocket.Chat/pull/12632)) + +- Correct roomName value in Mail Messages (#12363) ([#12453](https://github.com/RocketChat/Rocket.Chat/pull/12453) by [@vinade](https://github.com/vinade)) + +- DE translation for idle-time-limit ([#12637](https://github.com/RocketChat/Rocket.Chat/pull/12637) by [@pfuender](https://github.com/pfuender)) + +- Emoji picker is not in viewport on small screens ([#12457](https://github.com/RocketChat/Rocket.Chat/pull/12457) by [@ramrami](https://github.com/ramrami)) + +- Fix favico error ([#12643](https://github.com/RocketChat/Rocket.Chat/pull/12643)) + +- Fix wrong parameter in chat.delete endpoint and add some test cases ([#12408](https://github.com/RocketChat/Rocket.Chat/pull/12408)) + +- Fixed Anonymous Registration ([#12633](https://github.com/RocketChat/Rocket.Chat/pull/12633) by [@wreiske](https://github.com/wreiske)) + +- German translation for for API_EmbedIgnoredHosts label ([#12518](https://github.com/RocketChat/Rocket.Chat/pull/12518) by [@mbrodala](https://github.com/mbrodala)) + +- Handle all events for enter key in message box ([#12507](https://github.com/RocketChat/Rocket.Chat/pull/12507)) + +- high cpu usage ~ svg icon ([#12677](https://github.com/RocketChat/Rocket.Chat/pull/12677) by [@ph1p](https://github.com/ph1p)) + +- Import missed file in rocketchat-authorization ([#12570](https://github.com/RocketChat/Rocket.Chat/pull/12570)) + +- Manage own integrations permissions check ([#12397](https://github.com/RocketChat/Rocket.Chat/pull/12397)) + +- Prevent subscriptions and calls to rooms events that the user is not participating ([#12558](https://github.com/RocketChat/Rocket.Chat/pull/12558)) + +- Spotlight method being called multiple times ([#12536](https://github.com/RocketChat/Rocket.Chat/pull/12536)) + +- stream room-changed ([#12411](https://github.com/RocketChat/Rocket.Chat/pull/12411)) + +- Update caret position on insert a new line in message box ([#12713](https://github.com/RocketChat/Rocket.Chat/pull/12713)) + +- Wrong test case for `users.setAvatar` endpoint ([#12539](https://github.com/RocketChat/Rocket.Chat/pull/12539)) + +
+🔍 Minor changes + + +- Convert rocketchat-channel-settings to main module structure ([#12594](https://github.com/RocketChat/Rocket.Chat/pull/12594)) + +- Convert rocketchat-emoji-custom to main module structure ([#12604](https://github.com/RocketChat/Rocket.Chat/pull/12604)) + +- Convert rocketchat-importer-slack to main module structure ([#12666](https://github.com/RocketChat/Rocket.Chat/pull/12666)) + +- Convert rocketchat-livestream to main module structure ([#12679](https://github.com/RocketChat/Rocket.Chat/pull/12679)) + +- [DOCS] Remove Cordova links, include F-Droid download button and few other adjustments ([#12583](https://github.com/RocketChat/Rocket.Chat/pull/12583) by [@rafaelks](https://github.com/rafaelks)) + +- Added "npm install" to quick start for developers ([#12374](https://github.com/RocketChat/Rocket.Chat/pull/12374) by [@wreiske](https://github.com/wreiske)) + +- Added imports for global variables in rocketchat-google-natural-language package ([#12647](https://github.com/RocketChat/Rocket.Chat/pull/12647)) + +- Bump Apps Engine to 1.3.0 ([#12705](https://github.com/RocketChat/Rocket.Chat/pull/12705)) + +- Convert chatpal search package to modular structure ([#12485](https://github.com/RocketChat/Rocket.Chat/pull/12485)) + +- Convert emoji-emojione to main module structure ([#12605](https://github.com/RocketChat/Rocket.Chat/pull/12605)) + +- Convert meteor-accounts-saml to main module structure ([#12486](https://github.com/RocketChat/Rocket.Chat/pull/12486)) + +- Convert meteor-autocomplete package to main module structure ([#12491](https://github.com/RocketChat/Rocket.Chat/pull/12491)) + +- Convert meteor-timesync to main module structure ([#12495](https://github.com/RocketChat/Rocket.Chat/pull/12495)) + +- Convert rocketchat-2fa to main module structure ([#12501](https://github.com/RocketChat/Rocket.Chat/pull/12501)) + +- Convert rocketchat-action-links to main module structure ([#12503](https://github.com/RocketChat/Rocket.Chat/pull/12503)) + +- Convert rocketchat-analytics to main module structure ([#12506](https://github.com/RocketChat/Rocket.Chat/pull/12506)) + +- Convert rocketchat-api to main module structure ([#12510](https://github.com/RocketChat/Rocket.Chat/pull/12510)) + +- Convert rocketchat-assets to main module structure ([#12521](https://github.com/RocketChat/Rocket.Chat/pull/12521)) + +- Convert rocketchat-authorization to main module structure ([#12523](https://github.com/RocketChat/Rocket.Chat/pull/12523)) + +- Convert rocketchat-autolinker to main module structure ([#12529](https://github.com/RocketChat/Rocket.Chat/pull/12529)) + +- Convert rocketchat-autotranslate to main module structure ([#12530](https://github.com/RocketChat/Rocket.Chat/pull/12530)) + +- Convert rocketchat-bot-helpers to main module structure ([#12531](https://github.com/RocketChat/Rocket.Chat/pull/12531)) + +- Convert rocketchat-cas to main module structure ([#12532](https://github.com/RocketChat/Rocket.Chat/pull/12532)) + +- Convert rocketchat-channel-settings-mail-messages to main module structure ([#12537](https://github.com/RocketChat/Rocket.Chat/pull/12537)) + +- Convert rocketchat-colors to main module structure ([#12538](https://github.com/RocketChat/Rocket.Chat/pull/12538)) + +- Convert rocketchat-cors to main module structure ([#12595](https://github.com/RocketChat/Rocket.Chat/pull/12595)) + +- Convert rocketchat-crowd to main module structure ([#12596](https://github.com/RocketChat/Rocket.Chat/pull/12596)) + +- Convert rocketchat-custom-sounds to main module structure ([#12599](https://github.com/RocketChat/Rocket.Chat/pull/12599)) + +- Convert rocketchat-dolphin to main module structure ([#12600](https://github.com/RocketChat/Rocket.Chat/pull/12600)) + +- Convert rocketchat-drupal to main module structure ([#12601](https://github.com/RocketChat/Rocket.Chat/pull/12601)) + +- Convert rocketchat-emoji to main module structure ([#12603](https://github.com/RocketChat/Rocket.Chat/pull/12603)) + +- Convert rocketchat-error-handler to main module structure ([#12606](https://github.com/RocketChat/Rocket.Chat/pull/12606)) + +- Convert rocketchat-favico to main module structure ([#12607](https://github.com/RocketChat/Rocket.Chat/pull/12607)) + +- Convert rocketchat-file to main module structure ([#12644](https://github.com/RocketChat/Rocket.Chat/pull/12644)) + +- Convert rocketchat-github-enterprise to main module structure ([#12642](https://github.com/RocketChat/Rocket.Chat/pull/12642)) + +- Convert rocketchat-gitlab to main module structure ([#12646](https://github.com/RocketChat/Rocket.Chat/pull/12646)) + +- Convert rocketchat-google-vision to main module structure ([#12649](https://github.com/RocketChat/Rocket.Chat/pull/12649)) + +- Convert rocketchat-grant to main module structure ([#12657](https://github.com/RocketChat/Rocket.Chat/pull/12657)) + +- Convert rocketchat-graphql to main module structure ([#12658](https://github.com/RocketChat/Rocket.Chat/pull/12658)) + +- Convert rocketchat-highlight-words to main module structure ([#12659](https://github.com/RocketChat/Rocket.Chat/pull/12659)) + +- Convert rocketchat-iframe-login to main module structure ([#12661](https://github.com/RocketChat/Rocket.Chat/pull/12661)) + +- Convert rocketchat-importer to main module structure ([#12662](https://github.com/RocketChat/Rocket.Chat/pull/12662)) + +- Convert rocketchat-importer-csv to main module structure ([#12663](https://github.com/RocketChat/Rocket.Chat/pull/12663)) + +- Convert rocketchat-importer-hipchat to main module structure ([#12664](https://github.com/RocketChat/Rocket.Chat/pull/12664)) + +- Convert rocketchat-importer-hipchat-enterprise to main module structure ([#12665](https://github.com/RocketChat/Rocket.Chat/pull/12665)) + +- Convert rocketchat-importer-slack-users to main module structure ([#12669](https://github.com/RocketChat/Rocket.Chat/pull/12669)) + +- Convert rocketchat-integrations to main module structure ([#12670](https://github.com/RocketChat/Rocket.Chat/pull/12670)) + +- Convert rocketchat-internal-hubot to main module structure ([#12671](https://github.com/RocketChat/Rocket.Chat/pull/12671)) + +- Convert rocketchat-irc to main module structure ([#12672](https://github.com/RocketChat/Rocket.Chat/pull/12672)) + +- Convert rocketchat-issuelinks to main module structure ([#12674](https://github.com/RocketChat/Rocket.Chat/pull/12674)) + +- Convert rocketchat-ldap to main module structure ([#12678](https://github.com/RocketChat/Rocket.Chat/pull/12678)) + +- Convert rocketchat-mail-messages to main module structure ([#12682](https://github.com/RocketChat/Rocket.Chat/pull/12682)) + +- Fix crowd error with import of SyncedCron ([#12641](https://github.com/RocketChat/Rocket.Chat/pull/12641)) + +- Fix CSS import order ([#12524](https://github.com/RocketChat/Rocket.Chat/pull/12524)) + +- Fix ES translation ([#12509](https://github.com/RocketChat/Rocket.Chat/pull/12509)) + +- Fix punctuation, spelling, and grammar ([#12451](https://github.com/RocketChat/Rocket.Chat/pull/12451) by [@imronras](https://github.com/imronras)) + +- Fix some Ukrainian translations ([#12712](https://github.com/RocketChat/Rocket.Chat/pull/12712) by [@zdumitru](https://github.com/zdumitru)) + +- Fix users.setAvatar endpoint tests and logic ([#12625](https://github.com/RocketChat/Rocket.Chat/pull/12625)) + +- Fix: Add email dependency in package.js ([#12645](https://github.com/RocketChat/Rocket.Chat/pull/12645)) + +- Fix: Developers not being able to debug root files in VSCode ([#12440](https://github.com/RocketChat/Rocket.Chat/pull/12440) by [@mrsimpson](https://github.com/mrsimpson)) + +- Fix: Exception when registering a user with gravatar ([#12699](https://github.com/RocketChat/Rocket.Chat/pull/12699)) + +- Fix: Fix tests by increasing window size ([#12707](https://github.com/RocketChat/Rocket.Chat/pull/12707)) + +- Improve: Add missing translation keys. ([#12708](https://github.com/RocketChat/Rocket.Chat/pull/12708) by [@ura14h](https://github.com/ura14h)) + +- LingoHub based on develop ([#12684](https://github.com/RocketChat/Rocket.Chat/pull/12684)) + +- LingoHub based on develop ([#12470](https://github.com/RocketChat/Rocket.Chat/pull/12470)) + +- Merge master into develop & Set version to 0.72.0-develop ([#12460](https://github.com/RocketChat/Rocket.Chat/pull/12460) by [@Hudell](https://github.com/Hudell)) + +- Regression: Account pages layout ([#12735](https://github.com/RocketChat/Rocket.Chat/pull/12735)) + +- Regression: Expand Administration sections by toggling section title ([#12736](https://github.com/RocketChat/Rocket.Chat/pull/12736)) + +- Regression: Fix Safari detection in PDF previewing ([#12737](https://github.com/RocketChat/Rocket.Chat/pull/12737)) + +- Regression: Inherit font-family for message box ([#12729](https://github.com/RocketChat/Rocket.Chat/pull/12729)) + +- Removal of EJSON, Accounts, Email, HTTP, Random, ReactiveDict, ReactiveVar, SHA256 and WebApp global variables ([#12377](https://github.com/RocketChat/Rocket.Chat/pull/12377)) + +- Removal of Match, check, moment, Tracker and Mongo global variables ([#12410](https://github.com/RocketChat/Rocket.Chat/pull/12410)) + +- Removal of Meteor global variable ([#12371](https://github.com/RocketChat/Rocket.Chat/pull/12371)) + +- Removal of TAPi18n and TAPi18next global variables ([#12467](https://github.com/RocketChat/Rocket.Chat/pull/12467)) + +- Removal of Template, Blaze, BlazeLayout, FlowRouter, DDPRateLimiter, Session, UAParser, Promise, Reload and CryptoJS global variables ([#12433](https://github.com/RocketChat/Rocket.Chat/pull/12433)) + +- Remove template for feature requests as issues ([#12426](https://github.com/RocketChat/Rocket.Chat/pull/12426)) + +- Removed RocketChatFile from globals ([#12650](https://github.com/RocketChat/Rocket.Chat/pull/12650)) + +- Update Apps Engine to 1.3.1 ([#12741](https://github.com/RocketChat/Rocket.Chat/pull/12741)) + +- Update npm dependencies ([#12465](https://github.com/RocketChat/Rocket.Chat/pull/12465)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@AndreamApp](https://github.com/AndreamApp) +- [@Hudell](https://github.com/Hudell) +- [@Ismaw34](https://github.com/Ismaw34) +- [@cardoso](https://github.com/cardoso) +- [@imronras](https://github.com/imronras) +- [@karlprieb](https://github.com/karlprieb) +- [@mbrodala](https://github.com/mbrodala) +- [@mrsimpson](https://github.com/mrsimpson) +- [@nicolasbock](https://github.com/nicolasbock) +- [@pfuender](https://github.com/pfuender) +- [@ph1p](https://github.com/ph1p) +- [@rafaelks](https://github.com/rafaelks) +- [@ramrami](https://github.com/ramrami) +- [@ura14h](https://github.com/ura14h) +- [@vinade](https://github.com/vinade) +- [@wreiske](https://github.com/wreiske) +- [@zdumitru](https://github.com/zdumitru) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@engelgabriel](https://github.com/engelgabriel) +- [@ggazzo](https://github.com/ggazzo) +- [@marceloschmidt](https://github.com/marceloschmidt) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 0.71.2 +`2018-12-10 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### 🐛 Bug fixes + + +- Reset password email ([#12898](https://github.com/RocketChat/Rocket.Chat/pull/12898)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.71.1 +`2018-10-31 · 1 🐛 · 1 🔍 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### 🐛 Bug fixes + + +- Email sending with GDPR user data ([#12487](https://github.com/RocketChat/Rocket.Chat/pull/12487)) + +
+🔍 Minor changes + + +- Release 0.71.1 ([#12499](https://github.com/RocketChat/Rocket.Chat/pull/12499)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.71.0 +`2018-10-27 · 2 ️️️⚠️ · 5 🎉 · 5 🚀 · 23 🐛 · 9 🔍 · 20 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### ⚠️ BREAKING CHANGES + + +- Add expiration to API login tokens and fix duplicate login tokens created by LDAP ([#12186](https://github.com/RocketChat/Rocket.Chat/pull/12186)) + +- Update `lastMessage` rooms property and convert the "starred" property, to the same format ([#12266](https://github.com/RocketChat/Rocket.Chat/pull/12266)) + +### 🎉 New features + + +- Ability to disable user presence monitor ([#12353](https://github.com/RocketChat/Rocket.Chat/pull/12353)) + +- Add "help wanted" section to Readme ([#12432](https://github.com/RocketChat/Rocket.Chat/pull/12432) by [@isabellarussell](https://github.com/isabellarussell)) + +- Add delete channel mutation to GraphQL API ([#11860](https://github.com/RocketChat/Rocket.Chat/pull/11860)) + +- PDF message attachment preview (client side rendering) ([#10519](https://github.com/RocketChat/Rocket.Chat/pull/10519) by [@kb0304](https://github.com/kb0304)) + +- sidenav size on large screens ([#12372](https://github.com/RocketChat/Rocket.Chat/pull/12372)) + +### 🚀 Improvements + + +- Add missing livechat i18n keys ([#12330](https://github.com/RocketChat/Rocket.Chat/pull/12330) by [@MarcosEllys](https://github.com/MarcosEllys)) + +- Allow the imports to accept any file type ([#12425](https://github.com/RocketChat/Rocket.Chat/pull/12425)) + +- Avoid unnecessary calls to Meteor.user() on client ([#11212](https://github.com/RocketChat/Rocket.Chat/pull/11212)) + +- Livechat room closure endpoints ([#12360](https://github.com/RocketChat/Rocket.Chat/pull/12360)) + +- Set Livechat department before register guest ([#12161](https://github.com/RocketChat/Rocket.Chat/pull/12161)) + +### 🐛 Bug fixes + + +- Add image dimensions to attachment even when no reorientation is required ([#11521](https://github.com/RocketChat/Rocket.Chat/pull/11521)) + +- Apps not being able to state how the action buttons are aligned ([#12391](https://github.com/RocketChat/Rocket.Chat/pull/12391)) + +- Attachment actions not being collapsable ([#12436](https://github.com/RocketChat/Rocket.Chat/pull/12436)) + +- Attachment timestamp from and to Apps system not working ([#12445](https://github.com/RocketChat/Rocket.Chat/pull/12445)) + +- avatar?_dc=undefined ([#12365](https://github.com/RocketChat/Rocket.Chat/pull/12365)) + +- Blockstack errors in IE 11 ([#12338](https://github.com/RocketChat/Rocket.Chat/pull/12338)) + +- Cast env var setting to int based on option type ([#12194](https://github.com/RocketChat/Rocket.Chat/pull/12194) by [@crazy-max](https://github.com/crazy-max)) + +- Custom OAuth Configuration can't be removed ([#12256](https://github.com/RocketChat/Rocket.Chat/pull/12256) by [@Hudell](https://github.com/Hudell)) + +- Date range check on livechat analytics ([#12345](https://github.com/RocketChat/Rocket.Chat/pull/12345) by [@teresy](https://github.com/teresy)) + +- E2E alert shows up when encryption is disabled ([#12272](https://github.com/RocketChat/Rocket.Chat/pull/12272) by [@Hudell](https://github.com/Hudell)) + +- E2E: Decrypting UTF-8 encoded messages ([#12398](https://github.com/RocketChat/Rocket.Chat/pull/12398) by [@pmmaga](https://github.com/pmmaga)) + +- Edit room name with uppercase letters ([#12235](https://github.com/RocketChat/Rocket.Chat/pull/12235) by [@nikeee](https://github.com/nikeee)) + +- email api TAPi18n is undefined ([#12373](https://github.com/RocketChat/Rocket.Chat/pull/12373)) + +- iframe login token not checked ([#12158](https://github.com/RocketChat/Rocket.Chat/pull/12158) by [@nimetu](https://github.com/nimetu)) + +- Ignore errors when creating image preview for uploads ([#12424](https://github.com/RocketChat/Rocket.Chat/pull/12424)) + +- Invalid destructuring on Livechat API endpoint ([#12354](https://github.com/RocketChat/Rocket.Chat/pull/12354)) + +- Last message not updating after message delete if show deleted status is on ([#12350](https://github.com/RocketChat/Rocket.Chat/pull/12350)) + +- Links in home layout ([#12355](https://github.com/RocketChat/Rocket.Chat/pull/12355) by [@upiksaleh](https://github.com/upiksaleh)) + +- Modal confirm on enter ([#12283](https://github.com/RocketChat/Rocket.Chat/pull/12283)) + +- Remove e2e from users endpoint responses ([#12344](https://github.com/RocketChat/Rocket.Chat/pull/12344)) + +- REST `users.setAvatar` endpoint wasn't allowing update the avatar of other users even with correct permissions ([#11431](https://github.com/RocketChat/Rocket.Chat/pull/11431)) + +- Slack importer: image previews not showing ([#11875](https://github.com/RocketChat/Rocket.Chat/pull/11875) by [@Hudell](https://github.com/Hudell) & [@madguy02](https://github.com/madguy02)) + +- users.register endpoint to not create an user if username already being used ([#12297](https://github.com/RocketChat/Rocket.Chat/pull/12297)) + +
+🔍 Minor changes + + +- Apps: Room’s usernames was not working ([#12409](https://github.com/RocketChat/Rocket.Chat/pull/12409)) + +- Fix: Add wizard opt-in fields ([#12298](https://github.com/RocketChat/Rocket.Chat/pull/12298)) + +- Fix: update check on err.details ([#12346](https://github.com/RocketChat/Rocket.Chat/pull/12346) by [@teresy](https://github.com/teresy)) + +- Fix: wrong saveUser permission validations ([#12384](https://github.com/RocketChat/Rocket.Chat/pull/12384)) + +- Improve: Drop database between running tests on CI ([#12358](https://github.com/RocketChat/Rocket.Chat/pull/12358)) + +- Regression: Change `starred` message property from object to array ([#12405](https://github.com/RocketChat/Rocket.Chat/pull/12405)) + +- Regression: do not render pdf preview on safari <= 12 ([#12375](https://github.com/RocketChat/Rocket.Chat/pull/12375)) + +- Regression: Fix email headers not being used ([#12392](https://github.com/RocketChat/Rocket.Chat/pull/12392)) + +- Update Apps Framework to version 1.2.1 ([#12442](https://github.com/RocketChat/Rocket.Chat/pull/12442)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) +- [@MarcosEllys](https://github.com/MarcosEllys) +- [@crazy-max](https://github.com/crazy-max) +- [@isabellarussell](https://github.com/isabellarussell) +- [@kb0304](https://github.com/kb0304) +- [@madguy02](https://github.com/madguy02) +- [@nikeee](https://github.com/nikeee) +- [@nimetu](https://github.com/nimetu) +- [@pmmaga](https://github.com/pmmaga) +- [@teresy](https://github.com/teresy) +- [@upiksaleh](https://github.com/upiksaleh) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@Sing-Li](https://github.com/Sing-Li) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 0.70.5 +`2018-12-10 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### 🐛 Bug fixes + + +- Reset password email ([#12898](https://github.com/RocketChat/Rocket.Chat/pull/12898)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.70.4 +`2018-10-09 · 1 🐛 · 2 🔍 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### 🐛 Bug fixes + + +- Modal confirm on enter ([#12283](https://github.com/RocketChat/Rocket.Chat/pull/12283)) + +
+🔍 Minor changes + + +- Fix: Add wizard opt-in fields ([#12298](https://github.com/RocketChat/Rocket.Chat/pull/12298)) + +- Release 0.70.4 ([#12299](https://github.com/RocketChat/Rocket.Chat/pull/12299)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.70.3 +`2018-10-08 · 1 🐛 · 2 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### 🐛 Bug fixes + + +- E2E alert shows up when encryption is disabled ([#12272](https://github.com/RocketChat/Rocket.Chat/pull/12272) by [@Hudell](https://github.com/Hudell)) + +
+🔍 Minor changes + + +- Release 0.70.2 ([#12276](https://github.com/RocketChat/Rocket.Chat/pull/12276) by [@Hudell](https://github.com/Hudell)) + +- Release 0.70.3 ([#12281](https://github.com/RocketChat/Rocket.Chat/pull/12281)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.70.1 +`2018-10-05 · 8 🐛 · 5 🔍 · 11 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### 🐛 Bug fixes + + +- E2E data not cleared on logout ([#12254](https://github.com/RocketChat/Rocket.Chat/pull/12254) by [@Hudell](https://github.com/Hudell)) + +- E2E password request not closing after entering password ([#12232](https://github.com/RocketChat/Rocket.Chat/pull/12232) by [@Hudell](https://github.com/Hudell)) + +- Emails' logo and links ([#12241](https://github.com/RocketChat/Rocket.Chat/pull/12241)) + +- Livechat CRM integration running when disabled ([#12242](https://github.com/RocketChat/Rocket.Chat/pull/12242)) + +- Livechat integration with RDStation ([#12257](https://github.com/RocketChat/Rocket.Chat/pull/12257)) + +- Livechat triggers being registered twice after setting department via API ([#12255](https://github.com/RocketChat/Rocket.Chat/pull/12255) by [@edzluhan](https://github.com/edzluhan)) + +- Message editing was duplicating reply quotes ([#12263](https://github.com/RocketChat/Rocket.Chat/pull/12263)) + +- Set default action for Setup Wizard form submit ([#12240](https://github.com/RocketChat/Rocket.Chat/pull/12240)) + +
+🔍 Minor changes + + +- Add reetp to the issues' bot whitelist ([#12227](https://github.com/RocketChat/Rocket.Chat/pull/12227) by [@theorenck](https://github.com/theorenck)) + +- Fix: Remove semver satisfies from Apps details that is already done my marketplace ([#12268](https://github.com/RocketChat/Rocket.Chat/pull/12268)) + +- Merge master into develop & Set version to 0.71.0-develop ([#12264](https://github.com/RocketChat/Rocket.Chat/pull/12264) by [@cardoso](https://github.com/cardoso) & [@kaiiiiiiiii](https://github.com/kaiiiiiiiii) & [@timkinnane](https://github.com/timkinnane)) + +- Regression: fix modal submit ([#12233](https://github.com/RocketChat/Rocket.Chat/pull/12233)) + +- Release 0.70.1 ([#12270](https://github.com/RocketChat/Rocket.Chat/pull/12270) by [@Hudell](https://github.com/Hudell) & [@edzluhan](https://github.com/edzluhan) & [@theorenck](https://github.com/theorenck)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) +- [@cardoso](https://github.com/cardoso) +- [@edzluhan](https://github.com/edzluhan) +- [@kaiiiiiiiii](https://github.com/kaiiiiiiiii) +- [@theorenck](https://github.com/theorenck) +- [@timkinnane](https://github.com/timkinnane) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 0.70.0 +`2018-09-28 · 2 ️️️⚠️ · 18 🎉 · 3 🚀 · 35 🐛 · 19 🔍 · 32 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### ⚠️ BREAKING CHANGES + + +- **IMPROVE:** New emails design ([#12009](https://github.com/RocketChat/Rocket.Chat/pull/12009)) + +- Update the default port of the Prometheus exporter ([#11351](https://github.com/RocketChat/Rocket.Chat/pull/11351) by [@thaiphv](https://github.com/thaiphv)) + +### 🎉 New features + + +- Add Livechat Analytics permission ([#12184](https://github.com/RocketChat/Rocket.Chat/pull/12184)) + +- Allow multiple subcommands in MIGRATION_VERSION env variable ([#11184](https://github.com/RocketChat/Rocket.Chat/pull/11184) by [@arch119](https://github.com/arch119)) + +- Apps are enabled by default now ([#12189](https://github.com/RocketChat/Rocket.Chat/pull/12189)) + +- Apps: Add handlers for message updates ([#11993](https://github.com/RocketChat/Rocket.Chat/pull/11993) by [@cardoso](https://github.com/cardoso)) + +- Apps: API provider ([#11938](https://github.com/RocketChat/Rocket.Chat/pull/11938)) + +- Blockstack as decentralized auth provider ([#12047](https://github.com/RocketChat/Rocket.Chat/pull/12047) by [@timkinnane](https://github.com/timkinnane)) + +- Customizable default directory view ([#11965](https://github.com/RocketChat/Rocket.Chat/pull/11965) by [@ohmonster](https://github.com/ohmonster)) + +- Informal German translations ([#9984](https://github.com/RocketChat/Rocket.Chat/pull/9984) by [@mrsimpson](https://github.com/mrsimpson)) + +- Livechat Analytics and Reports ([#11238](https://github.com/RocketChat/Rocket.Chat/pull/11238) by [@pkgodara](https://github.com/pkgodara)) + +- Livechat notifications on new incoming inquiries for guest-pool ([#10588](https://github.com/RocketChat/Rocket.Chat/pull/10588) by [@mrsimpson](https://github.com/mrsimpson)) + +- Livechat REST endpoints ([#11900](https://github.com/RocketChat/Rocket.Chat/pull/11900)) + +- Livechat trigger option to run only once ([#12068](https://github.com/RocketChat/Rocket.Chat/pull/12068) by [@edzluhan](https://github.com/edzluhan)) + +- REST endpoint to set groups' announcement ([#11905](https://github.com/RocketChat/Rocket.Chat/pull/11905)) + +- REST endpoints to create roles and assign roles to users ([#11855](https://github.com/RocketChat/Rocket.Chat/pull/11855) by [@aferreira44](https://github.com/aferreira44)) + +- REST endpoints to get moderators from groups and channels ([#11909](https://github.com/RocketChat/Rocket.Chat/pull/11909)) + +- Support for end to end encryption ([#10094](https://github.com/RocketChat/Rocket.Chat/pull/10094) by [@mrinaldhar](https://github.com/mrinaldhar)) + +- User preference for 24- or 12-hour clock ([#11169](https://github.com/RocketChat/Rocket.Chat/pull/11169) by [@vynmera](https://github.com/vynmera)) + +- WebDAV Integration (User file provider) ([#11679](https://github.com/RocketChat/Rocket.Chat/pull/11679) by [@karakayasemi](https://github.com/karakayasemi)) + +### 🚀 Improvements + + +- BigBlueButton joinViaHtml5 and video icon on sidebar ([#12107](https://github.com/RocketChat/Rocket.Chat/pull/12107)) + +- Cache livechat get agent trigger call ([#12083](https://github.com/RocketChat/Rocket.Chat/pull/12083)) + +- Use eslint-config package ([#12044](https://github.com/RocketChat/Rocket.Chat/pull/12044)) + +### 🐛 Bug fixes + + +- Adding scroll bar to read receipts modal ([#11919](https://github.com/RocketChat/Rocket.Chat/pull/11919) by [@rssilva](https://github.com/rssilva)) + +- Allow user with "bulk-register-user" permission to send invitations ([#12112](https://github.com/RocketChat/Rocket.Chat/pull/12112) by [@mrsimpson](https://github.com/mrsimpson)) + +- app engine verbose log typo ([#12126](https://github.com/RocketChat/Rocket.Chat/pull/12126) by [@williamriancho](https://github.com/williamriancho)) + +- App updates were not being shown correctly ([#11893](https://github.com/RocketChat/Rocket.Chat/pull/11893)) + +- Apps being able to see hidden settings ([#12159](https://github.com/RocketChat/Rocket.Chat/pull/12159)) + +- Apps: Add missing reactions and actions properties to app message object ([#11780](https://github.com/RocketChat/Rocket.Chat/pull/11780)) + +- Broken slack compatible webhook ([#11742](https://github.com/RocketChat/Rocket.Chat/pull/11742)) + +- Changing Mentions.userMentionRegex pattern to include
tag ([#12043](https://github.com/RocketChat/Rocket.Chat/pull/12043) by [@rssilva](https://github.com/rssilva)) + +- Close popover on shortcuts and writing ([#11562](https://github.com/RocketChat/Rocket.Chat/pull/11562)) + +- Direct messages leaking into logs ([#11863](https://github.com/RocketChat/Rocket.Chat/pull/11863) by [@Hudell](https://github.com/Hudell)) + +- Double output of message actions ([#11902](https://github.com/RocketChat/Rocket.Chat/pull/11902) by [@timkinnane](https://github.com/timkinnane)) + +- Duplicate email and auto-join on mentions ([#12168](https://github.com/RocketChat/Rocket.Chat/pull/12168)) + +- Duplicated message buttons ([#11853](https://github.com/RocketChat/Rocket.Chat/pull/11853) by [@ubarsaiyan](https://github.com/ubarsaiyan)) + +- Files list missing from popover menu when owner of room ([#11565](https://github.com/RocketChat/Rocket.Chat/pull/11565)) + +- Fixing spacement between tags and words on some labels ([#12018](https://github.com/RocketChat/Rocket.Chat/pull/12018) by [@rssilva](https://github.com/rssilva)) + +- Fixing translation on 'yesterday' word when calling timeAgo function ([#11946](https://github.com/RocketChat/Rocket.Chat/pull/11946) by [@rssilva](https://github.com/rssilva)) + +- Hipchat import was failing when importing messages from a non existent user ([#11892](https://github.com/RocketChat/Rocket.Chat/pull/11892)) + +- Hipchat importer was not importing users without emails and uploaded files ([#11910](https://github.com/RocketChat/Rocket.Chat/pull/11910)) + +- Horizontal scroll on user info tab ([#12102](https://github.com/RocketChat/Rocket.Chat/pull/12102) by [@rssilva](https://github.com/rssilva)) + +- Internal error when cross-origin with CORS is disabled ([#11953](https://github.com/RocketChat/Rocket.Chat/pull/11953)) + +- IRC Federation no longer working ([#11906](https://github.com/RocketChat/Rocket.Chat/pull/11906) by [@Hudell](https://github.com/Hudell)) + +- Livechat agent joining on pick from guest pool ([#12097](https://github.com/RocketChat/Rocket.Chat/pull/12097) by [@mrsimpson](https://github.com/mrsimpson)) + +- Login error message not obvious if user not activated ([#11785](https://github.com/RocketChat/Rocket.Chat/pull/11785) by [@crazy-max](https://github.com/crazy-max)) + +- Markdown ampersand escape on links ([#12140](https://github.com/RocketChat/Rocket.Chat/pull/12140) by [@rssilva](https://github.com/rssilva)) + +- Message reaction in GraphQL API ([#11967](https://github.com/RocketChat/Rocket.Chat/pull/11967)) + +- Not able to set per-channel retention policies if no global policy is set for this channel type ([#11927](https://github.com/RocketChat/Rocket.Chat/pull/11927) by [@vynmera](https://github.com/vynmera)) + +- Permission check on joinRoom for private room ([#11857](https://github.com/RocketChat/Rocket.Chat/pull/11857) by [@timkinnane](https://github.com/timkinnane)) + +- Position of popover component on mobile ([#12038](https://github.com/RocketChat/Rocket.Chat/pull/12038)) + +- Prevent form submission in Files List search ([#11999](https://github.com/RocketChat/Rocket.Chat/pull/11999)) + +- Re-add the eye-off icon ([#12079](https://github.com/RocketChat/Rocket.Chat/pull/12079) by [@MIKI785](https://github.com/MIKI785)) + +- Real Name on Direct Messages ([#12154](https://github.com/RocketChat/Rocket.Chat/pull/12154)) + +- Saving user preferences ([#12170](https://github.com/RocketChat/Rocket.Chat/pull/12170)) + +- Typo in a configuration key for SlackBridge excluded bot names ([#11872](https://github.com/RocketChat/Rocket.Chat/pull/11872) by [@TobiasKappe](https://github.com/TobiasKappe)) + +- video message recording, issue #11651 ([#12031](https://github.com/RocketChat/Rocket.Chat/pull/12031) by [@flaviogrossi](https://github.com/flaviogrossi)) + +- Wrong build path in install.sh ([#11879](https://github.com/RocketChat/Rocket.Chat/pull/11879)) + +
+🔍 Minor changes + + +- Better organize package.json ([#12115](https://github.com/RocketChat/Rocket.Chat/pull/12115)) + +- Fix the style lint ([#11991](https://github.com/RocketChat/Rocket.Chat/pull/11991)) + +- Fix using wrong variable ([#12114](https://github.com/RocketChat/Rocket.Chat/pull/12114)) + +- Fix: Add e2e doc to the alert ([#12187](https://github.com/RocketChat/Rocket.Chat/pull/12187)) + +- Fix: Change wording on e2e to make a little more clear ([#12124](https://github.com/RocketChat/Rocket.Chat/pull/12124)) + +- Fix: e2e password visible on always-on alert message. ([#12139](https://github.com/RocketChat/Rocket.Chat/pull/12139) by [@Hudell](https://github.com/Hudell)) + +- Fix: Message changing order when been edited with apps enabled ([#12188](https://github.com/RocketChat/Rocket.Chat/pull/12188)) + +- Improve: Decrypt last message ([#12173](https://github.com/RocketChat/Rocket.Chat/pull/12173)) + +- Improve: Do not start E2E Encryption when accessing admin as embedded ([#12192](https://github.com/RocketChat/Rocket.Chat/pull/12192)) + +- Improve: E2E setting description and alert ([#12191](https://github.com/RocketChat/Rocket.Chat/pull/12191)) + +- Improve: Expose apps enable setting at `General > Apps` ([#12196](https://github.com/RocketChat/Rocket.Chat/pull/12196)) + +- Improve: Moved the e2e password request to an alert instead of a popup ([#12172](https://github.com/RocketChat/Rocket.Chat/pull/12172) by [@Hudell](https://github.com/Hudell)) + +- Improve: Rename E2E methods ([#12175](https://github.com/RocketChat/Rocket.Chat/pull/12175) by [@Hudell](https://github.com/Hudell)) + +- Improve: Switch e2e doc to target _blank ([#12195](https://github.com/RocketChat/Rocket.Chat/pull/12195)) + +- LingoHub based on develop ([#11936](https://github.com/RocketChat/Rocket.Chat/pull/11936)) + +- Merge master into develop & Set version to 0.70.0-develop ([#11921](https://github.com/RocketChat/Rocket.Chat/pull/11921) by [@Hudell](https://github.com/Hudell) & [@c0dzilla](https://github.com/c0dzilla) & [@rndmh3ro](https://github.com/rndmh3ro) & [@ubarsaiyan](https://github.com/ubarsaiyan) & [@vynmera](https://github.com/vynmera)) + +- New: Option to change E2E key ([#12169](https://github.com/RocketChat/Rocket.Chat/pull/12169) by [@Hudell](https://github.com/Hudell)) + +- Regression: fix message box autogrow ([#12138](https://github.com/RocketChat/Rocket.Chat/pull/12138)) + +- Regression: Modal height ([#12122](https://github.com/RocketChat/Rocket.Chat/pull/12122)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) +- [@MIKI785](https://github.com/MIKI785) +- [@TobiasKappe](https://github.com/TobiasKappe) +- [@aferreira44](https://github.com/aferreira44) +- [@arch119](https://github.com/arch119) +- [@c0dzilla](https://github.com/c0dzilla) +- [@cardoso](https://github.com/cardoso) +- [@crazy-max](https://github.com/crazy-max) +- [@edzluhan](https://github.com/edzluhan) +- [@flaviogrossi](https://github.com/flaviogrossi) +- [@karakayasemi](https://github.com/karakayasemi) +- [@mrinaldhar](https://github.com/mrinaldhar) +- [@mrsimpson](https://github.com/mrsimpson) +- [@ohmonster](https://github.com/ohmonster) +- [@pkgodara](https://github.com/pkgodara) +- [@rndmh3ro](https://github.com/rndmh3ro) +- [@rssilva](https://github.com/rssilva) +- [@thaiphv](https://github.com/thaiphv) +- [@timkinnane](https://github.com/timkinnane) +- [@ubarsaiyan](https://github.com/ubarsaiyan) +- [@vynmera](https://github.com/vynmera) +- [@williamriancho](https://github.com/williamriancho) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 0.69.2 +`2018-09-11 · 1 🎉 · 4 🐛 · 6 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### 🎉 New features + + +- Include room name in stream for bots ([#11812](https://github.com/RocketChat/Rocket.Chat/pull/11812) by [@timkinnane](https://github.com/timkinnane)) + +### 🐛 Bug fixes + + +- Apps: setting with 'code' type only saving last line ([#11992](https://github.com/RocketChat/Rocket.Chat/pull/11992) by [@cardoso](https://github.com/cardoso)) + +- Hidden admin sidenav on embedded layout ([#12025](https://github.com/RocketChat/Rocket.Chat/pull/12025)) + +- Reset password link error if already logged in ([#12022](https://github.com/RocketChat/Rocket.Chat/pull/12022)) + +- Update user information not possible by admin if disabled to users ([#11955](https://github.com/RocketChat/Rocket.Chat/pull/11955) by [@kaiiiiiiiii](https://github.com/kaiiiiiiiii)) + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@cardoso](https://github.com/cardoso) +- [@kaiiiiiiiii](https://github.com/kaiiiiiiiii) +- [@timkinnane](https://github.com/timkinnane) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.69.1 +`2018-08-31 · 4 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### 🐛 Bug fixes + + +- App updates were not being shown correctly ([#11893](https://github.com/RocketChat/Rocket.Chat/pull/11893)) + +- Duplicated message buttons ([#11853](https://github.com/RocketChat/Rocket.Chat/pull/11853) by [@ubarsaiyan](https://github.com/ubarsaiyan)) + +- Hipchat import was failing when importing messages from a non existent user ([#11892](https://github.com/RocketChat/Rocket.Chat/pull/11892)) + +- Hipchat importer was not importing users without emails and uploaded files ([#11910](https://github.com/RocketChat/Rocket.Chat/pull/11910)) + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@ubarsaiyan](https://github.com/ubarsaiyan) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@rodrigok](https://github.com/rodrigok) + +# 0.69.0 +`2018-08-28 · 10 🎉 · 8 🚀 · 45 🐛 · 12 🔍 · 27 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### 🎉 New features + + +- Beta support for Big Blue Button video conferencing system ([#11837](https://github.com/RocketChat/Rocket.Chat/pull/11837)) + +- Internal marketplace for apps ([#11864](https://github.com/RocketChat/Rocket.Chat/pull/11864) by [@gdelavald](https://github.com/gdelavald) & [@rssilva](https://github.com/rssilva)) + +- Make font of unread items bolder for better contrast ([#8602](https://github.com/RocketChat/Rocket.Chat/pull/8602) by [@ausminternet](https://github.com/ausminternet)) + +- Personal access tokens for users to create API tokens ([#11638](https://github.com/RocketChat/Rocket.Chat/pull/11638)) + +- REST endpoint to manage server assets ([#11697](https://github.com/RocketChat/Rocket.Chat/pull/11697)) + +- Rich message text and image buttons ([#11473](https://github.com/RocketChat/Rocket.Chat/pull/11473) by [@ubarsaiyan](https://github.com/ubarsaiyan)) + +- Setting to block unauthenticated access to avatars ([#9749](https://github.com/RocketChat/Rocket.Chat/pull/9749) by [@Hudell](https://github.com/Hudell)) + +- Setting to enable/disable slack bridge reactions ([#10217](https://github.com/RocketChat/Rocket.Chat/pull/10217) by [@Hudell](https://github.com/Hudell) & [@kable-wilmoth](https://github.com/kable-wilmoth)) + +- Setting to set a JS/CSS CDN ([#11779](https://github.com/RocketChat/Rocket.Chat/pull/11779)) + +- Slackbridge: send attachment notifications ([#10269](https://github.com/RocketChat/Rocket.Chat/pull/10269) by [@Hudell](https://github.com/Hudell) & [@kable-wilmoth](https://github.com/kable-wilmoth)) + +### 🚀 Improvements + + +- Add nyan rocket on Rocket.Chat preview Docker image ([#11684](https://github.com/RocketChat/Rocket.Chat/pull/11684)) + +- Add template tag #{userdn} to filter LDAP group member format ([#11662](https://github.com/RocketChat/Rocket.Chat/pull/11662) by [@crazy-max](https://github.com/crazy-max)) + +- Escape parameters before send them to email template ([#11644](https://github.com/RocketChat/Rocket.Chat/pull/11644)) + +- Messagebox fix performance ([#11686](https://github.com/RocketChat/Rocket.Chat/pull/11686)) + +- Reducing `saveUser` code complexity ([#11645](https://github.com/RocketChat/Rocket.Chat/pull/11645) by [@Hudell](https://github.com/Hudell)) + +- Role tag UI ([#11674](https://github.com/RocketChat/Rocket.Chat/pull/11674) by [@timkinnane](https://github.com/timkinnane)) + +- Start storing Livechat department within rooms ([#11733](https://github.com/RocketChat/Rocket.Chat/pull/11733)) + +- Warn about push settings that need server restart ([#11784](https://github.com/RocketChat/Rocket.Chat/pull/11784)) + +### 🐛 Bug fixes + + +- "User is typing" not working in new Livechat session ([#11670](https://github.com/RocketChat/Rocket.Chat/pull/11670)) + +- App's i18nAlert is only being displayed as "i18nAlert" ([#11802](https://github.com/RocketChat/Rocket.Chat/pull/11802)) + +- Apply Cordova fix in lazy-loaded images sources ([#11807](https://github.com/RocketChat/Rocket.Chat/pull/11807)) + +- Broken logo on setup wizard ([#11708](https://github.com/RocketChat/Rocket.Chat/pull/11708)) + +- Cannot set property 'input' of undefined ([#11775](https://github.com/RocketChat/Rocket.Chat/pull/11775)) + +- Closed connections being storing on db ([#11709](https://github.com/RocketChat/Rocket.Chat/pull/11709)) + +- Code tag duplicating characters ([#11467](https://github.com/RocketChat/Rocket.Chat/pull/11467) by [@vynmera](https://github.com/vynmera)) + +- Custom sound uploader not working in Firefox and IE ([#11139](https://github.com/RocketChat/Rocket.Chat/pull/11139) by [@vynmera](https://github.com/vynmera)) + +- Default server language not being applied ([#11719](https://github.com/RocketChat/Rocket.Chat/pull/11719)) + +- Delete removed user's subscriptions ([#10700](https://github.com/RocketChat/Rocket.Chat/pull/10700) by [@Hudell](https://github.com/Hudell)) + +- directory search table not clickable lines ([#11809](https://github.com/RocketChat/Rocket.Chat/pull/11809)) + +- Escape meta data before inject in head tag ([#11730](https://github.com/RocketChat/Rocket.Chat/pull/11730)) + +- Fix links in `onTableItemClick` of the directroy page ([#11543](https://github.com/RocketChat/Rocket.Chat/pull/11543) by [@ura14h](https://github.com/ura14h)) + +- Fix permalink of message when running system with subdir ([#11781](https://github.com/RocketChat/Rocket.Chat/pull/11781) by [@ura14h](https://github.com/ura14h)) + +- Fixing timeAgo function on directory ([#11728](https://github.com/RocketChat/Rocket.Chat/pull/11728) by [@rssilva](https://github.com/rssilva)) + +- Incorrect migration version in v130.js ([#11544](https://github.com/RocketChat/Rocket.Chat/pull/11544) by [@c0dzilla](https://github.com/c0dzilla)) + +- Livechat open room method ([#11830](https://github.com/RocketChat/Rocket.Chat/pull/11830)) + +- Livechat rooms starting with two unread message counter ([#11834](https://github.com/RocketChat/Rocket.Chat/pull/11834)) + +- LiveChat switch department not working ([#11011](https://github.com/RocketChat/Rocket.Chat/pull/11011)) + +- Login logo now centered on small screens ([#11626](https://github.com/RocketChat/Rocket.Chat/pull/11626) by [@wreiske](https://github.com/wreiske)) + +- Message attachments was not respecting sort and lost spacing ([#11740](https://github.com/RocketChat/Rocket.Chat/pull/11740)) + +- minor fixes in hungarian i18n ([#11797](https://github.com/RocketChat/Rocket.Chat/pull/11797) by [@Atisom](https://github.com/Atisom)) + +- minor fixes in i18n ([#11761](https://github.com/RocketChat/Rocket.Chat/pull/11761) by [@Atisom](https://github.com/Atisom)) + +- Missing chat history for users without permission `preview-c-room` ([#11639](https://github.com/RocketChat/Rocket.Chat/pull/11639) by [@Hudell](https://github.com/Hudell)) + +- Missing twitter:image and og:image tags ([#11687](https://github.com/RocketChat/Rocket.Chat/pull/11687)) + +- permissions name no break ([#11836](https://github.com/RocketChat/Rocket.Chat/pull/11836)) + +- Prune translation on room info panel ([#11635](https://github.com/RocketChat/Rocket.Chat/pull/11635)) + +- Prune translations in German ([#11631](https://github.com/RocketChat/Rocket.Chat/pull/11631) by [@rndmh3ro](https://github.com/rndmh3ro)) + +- Push notifications stuck after db failure ([#11667](https://github.com/RocketChat/Rocket.Chat/pull/11667)) + +- re-adding margin to menu icon on header ([#11778](https://github.com/RocketChat/Rocket.Chat/pull/11778) by [@rssilva](https://github.com/rssilva)) + +- Regression in prune by user, and update lastMessage ([#11646](https://github.com/RocketChat/Rocket.Chat/pull/11646) by [@vynmera](https://github.com/vynmera)) + +- Removed hardcoded values. ([#11627](https://github.com/RocketChat/Rocket.Chat/pull/11627) by [@Hudell](https://github.com/Hudell)) + +- Render Attachment Pretext When Markdown Specified ([#11578](https://github.com/RocketChat/Rocket.Chat/pull/11578) by [@glstewart17](https://github.com/glstewart17)) + +- REST `im.members` endpoint not working without sort parameter ([#11821](https://github.com/RocketChat/Rocket.Chat/pull/11821)) + +- REST endpoints to update user not respecting some settings ([#11474](https://github.com/RocketChat/Rocket.Chat/pull/11474)) + +- Results pagination on /directory REST endpoint ([#11551](https://github.com/RocketChat/Rocket.Chat/pull/11551)) + +- Return room ID for groups where user joined ([#11703](https://github.com/RocketChat/Rocket.Chat/pull/11703) by [@timkinnane](https://github.com/timkinnane)) + +- Revoked `view-d-room` permission logics ([#11522](https://github.com/RocketChat/Rocket.Chat/pull/11522) by [@Hudell](https://github.com/Hudell)) + +- SAML is flooding logfile ([#11643](https://github.com/RocketChat/Rocket.Chat/pull/11643) by [@Hudell](https://github.com/Hudell)) + +- SAML login not working when user has multiple emails ([#11642](https://github.com/RocketChat/Rocket.Chat/pull/11642) by [@Hudell](https://github.com/Hudell)) + +- Searching by `undefined` via REST when using `query` param ([#11657](https://github.com/RocketChat/Rocket.Chat/pull/11657)) + +- Some assets were pointing to nonexistent path ([#11796](https://github.com/RocketChat/Rocket.Chat/pull/11796)) + +- Translations were not unique per app allowing conflicts among apps ([#11878](https://github.com/RocketChat/Rocket.Chat/pull/11878)) + +- User info APIs not returning customFields correctly ([#11625](https://github.com/RocketChat/Rocket.Chat/pull/11625)) + +- wrong create date of channels and users on directory view ([#11682](https://github.com/RocketChat/Rocket.Chat/pull/11682) by [@gsperezb](https://github.com/gsperezb)) + +
+🔍 Minor changes + + +- Add new eslint rules (automatically fixed) ([#11800](https://github.com/RocketChat/Rocket.Chat/pull/11800)) + +- Additional eslint rules ([#11804](https://github.com/RocketChat/Rocket.Chat/pull/11804)) + +- App engine merge ([#11835](https://github.com/RocketChat/Rocket.Chat/pull/11835)) + +- Do not remove package-lock.json of livechat package ([#11816](https://github.com/RocketChat/Rocket.Chat/pull/11816)) + +- Fixed deutsch message pruning translations ([#11691](https://github.com/RocketChat/Rocket.Chat/pull/11691) by [@TheReal1604](https://github.com/TheReal1604)) + +- Fixed the Finnish translation and removed some profanities ([#11794](https://github.com/RocketChat/Rocket.Chat/pull/11794) by [@jukper](https://github.com/jukper)) + +- LingoHub based on develop ([#11838](https://github.com/RocketChat/Rocket.Chat/pull/11838)) + +- Merge master into develop & Set version to 0.69.0-develop ([#11606](https://github.com/RocketChat/Rocket.Chat/pull/11606)) + +- Regression: Fix livechat code issues after new lint rules ([#11814](https://github.com/RocketChat/Rocket.Chat/pull/11814)) + +- Regression: Fix purge message's translations ([#11590](https://github.com/RocketChat/Rocket.Chat/pull/11590)) + +- Regression: role tag background, unread item font and message box autogrow ([#11861](https://github.com/RocketChat/Rocket.Chat/pull/11861)) + +- Run eslint and unit tests on pre-push hook ([#11815](https://github.com/RocketChat/Rocket.Chat/pull/11815)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Atisom](https://github.com/Atisom) +- [@Hudell](https://github.com/Hudell) +- [@TheReal1604](https://github.com/TheReal1604) +- [@ausminternet](https://github.com/ausminternet) +- [@c0dzilla](https://github.com/c0dzilla) +- [@crazy-max](https://github.com/crazy-max) +- [@gdelavald](https://github.com/gdelavald) +- [@glstewart17](https://github.com/glstewart17) +- [@gsperezb](https://github.com/gsperezb) +- [@jukper](https://github.com/jukper) +- [@kable-wilmoth](https://github.com/kable-wilmoth) +- [@rndmh3ro](https://github.com/rndmh3ro) +- [@rssilva](https://github.com/rssilva) +- [@timkinnane](https://github.com/timkinnane) +- [@ubarsaiyan](https://github.com/ubarsaiyan) +- [@ura14h](https://github.com/ura14h) +- [@vynmera](https://github.com/vynmera) +- [@wreiske](https://github.com/wreiske) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 0.68.5 +`2018-08-23 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### 🐛 Bug fixes + + +- Livechat open room method ([#11830](https://github.com/RocketChat/Rocket.Chat/pull/11830)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@renatobecker](https://github.com/renatobecker) + +# 0.68.4 +`2018-08-10 · 3 🐛 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### 🐛 Bug fixes + + +- Broken logo on setup wizard ([#11708](https://github.com/RocketChat/Rocket.Chat/pull/11708)) + +- Default server language not being applied ([#11719](https://github.com/RocketChat/Rocket.Chat/pull/11719)) + +- Regression in prune by user, and update lastMessage ([#11646](https://github.com/RocketChat/Rocket.Chat/pull/11646) by [@vynmera](https://github.com/vynmera)) + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@vynmera](https://github.com/vynmera) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.68.3 +`2018-08-01 · 5 🐛 · 1 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### 🐛 Bug fixes + + +- Missing chat history for users without permission `preview-c-room` ([#11639](https://github.com/RocketChat/Rocket.Chat/pull/11639) by [@Hudell](https://github.com/Hudell)) + +- Prune translation on room info panel ([#11635](https://github.com/RocketChat/Rocket.Chat/pull/11635)) + +- Prune translations in German ([#11631](https://github.com/RocketChat/Rocket.Chat/pull/11631) by [@rndmh3ro](https://github.com/rndmh3ro)) + +- SAML login not working when user has multiple emails ([#11642](https://github.com/RocketChat/Rocket.Chat/pull/11642) by [@Hudell](https://github.com/Hudell)) + +- User info APIs not returning customFields correctly ([#11625](https://github.com/RocketChat/Rocket.Chat/pull/11625)) + +
+🔍 Minor changes + + +- Release 0.68.3 ([#11650](https://github.com/RocketChat/Rocket.Chat/pull/11650) by [@Hudell](https://github.com/Hudell) & [@rndmh3ro](https://github.com/rndmh3ro)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) +- [@rndmh3ro](https://github.com/rndmh3ro) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.68.2 +`2018-07-31 · 1 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### 🐛 Bug fixes + + +- Incorrect migration version in v130.js ([#11544](https://github.com/RocketChat/Rocket.Chat/pull/11544) by [@c0dzilla](https://github.com/c0dzilla)) + +
+🔍 Minor changes + + +- Release 0.68.2 ([#11630](https://github.com/RocketChat/Rocket.Chat/pull/11630) by [@c0dzilla](https://github.com/c0dzilla)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@c0dzilla](https://github.com/c0dzilla) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.68.1 +`2018-07-31 · 2 🐛 · 1 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### 🐛 Bug fixes + + +- `Jump to message` search result action ([#11613](https://github.com/RocketChat/Rocket.Chat/pull/11613)) + +- HipChat importer wasn’t compatible with latest exports ([#11597](https://github.com/RocketChat/Rocket.Chat/pull/11597)) + +
+🔍 Minor changes + + +- Release 0.68.1 ([#11616](https://github.com/RocketChat/Rocket.Chat/pull/11616)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@engelgabriel](https://github.com/engelgabriel) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 0.68.0 +`2018-07-27 · 2 ️️️⚠️ · 13 🎉 · 3 🚀 · 23 🐛 · 10 🔍 · 21 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### ⚠️ BREAKING CHANGES + + +- Remove deprecated /user.roles endpoint ([#11493](https://github.com/RocketChat/Rocket.Chat/pull/11493)) + +- Update GraphQL dependencies ([#11430](https://github.com/RocketChat/Rocket.Chat/pull/11430)) + +### 🎉 New features + + +- Accept resumeToken as query param to log in ([#11443](https://github.com/RocketChat/Rocket.Chat/pull/11443)) + +- Add /roles.list REST endpoint to retrieve all server roles ([#11500](https://github.com/RocketChat/Rocket.Chat/pull/11500)) + +- Add /users.deleteOwnAccount REST endpoint to an user delete his own account ([#11488](https://github.com/RocketChat/Rocket.Chat/pull/11488)) + +- Livechat File Upload ([#10514](https://github.com/RocketChat/Rocket.Chat/pull/10514)) + +- Make WebRTC not enabled by default ([#11489](https://github.com/RocketChat/Rocket.Chat/pull/11489)) + +- Message retention policy and pruning ([#11236](https://github.com/RocketChat/Rocket.Chat/pull/11236) by [@vynmera](https://github.com/vynmera)) + +- Privacy for custom user fields ([#11332](https://github.com/RocketChat/Rocket.Chat/pull/11332) by [@vynmera](https://github.com/vynmera)) + +- Replaced old logo with the new ones ([#11491](https://github.com/RocketChat/Rocket.Chat/pull/11491) by [@brunosquadros](https://github.com/brunosquadros)) + +- Room files search form ([#11486](https://github.com/RocketChat/Rocket.Chat/pull/11486)) + +- search only default tone emoji Popup search ([#10017](https://github.com/RocketChat/Rocket.Chat/pull/10017) by [@Joe-mcgee](https://github.com/Joe-mcgee)) + +- Send user status to client ([#11303](https://github.com/RocketChat/Rocket.Chat/pull/11303) by [@HappyTobi](https://github.com/HappyTobi)) + +- Setting to disable 2FA globally ([#11328](https://github.com/RocketChat/Rocket.Chat/pull/11328) by [@Hudell](https://github.com/Hudell)) + +- Sorting channels by number of users in directory ([#9972](https://github.com/RocketChat/Rocket.Chat/pull/9972) by [@arungalva](https://github.com/arungalva)) + +### 🚀 Improvements + + +- Allow markdown in room topic, announcement, and description including single quotes ([#11408](https://github.com/RocketChat/Rocket.Chat/pull/11408)) + +- Set default max upload size to 100mb ([#11327](https://github.com/RocketChat/Rocket.Chat/pull/11327) by [@cardoso](https://github.com/cardoso)) + +- Typing indicators now use Real Names ([#11164](https://github.com/RocketChat/Rocket.Chat/pull/11164) by [@vynmera](https://github.com/vynmera)) + +### 🐛 Bug fixes + + +- Add customFields property to /me REST endpoint response ([#11496](https://github.com/RocketChat/Rocket.Chat/pull/11496)) + +- broadcast channel reply ([#11462](https://github.com/RocketChat/Rocket.Chat/pull/11462)) + +- Check for channels property on message object before parsing mentions ([#11527](https://github.com/RocketChat/Rocket.Chat/pull/11527)) + +- Decrease room leader bar z-index ([#11450](https://github.com/RocketChat/Rocket.Chat/pull/11450)) + +- empty blockquote ([#11526](https://github.com/RocketChat/Rocket.Chat/pull/11526)) + +- Fixed svg for older chrome browsers bug #11414 ([#11416](https://github.com/RocketChat/Rocket.Chat/pull/11416) by [@tpDBL](https://github.com/tpDBL)) + +- Invalid permalink URLs for Direct Messages ([#11507](https://github.com/RocketChat/Rocket.Chat/pull/11507) by [@Hudell](https://github.com/Hudell)) + +- Loading and setting fixes for i18n and RTL ([#11363](https://github.com/RocketChat/Rocket.Chat/pull/11363)) + +- Marked parser breaking announcements and mentions at the start of messages ([#11357](https://github.com/RocketChat/Rocket.Chat/pull/11357) by [@vynmera](https://github.com/vynmera)) + +- Mixed case channel slugs ([#9449](https://github.com/RocketChat/Rocket.Chat/pull/9449) by [@soundstorm](https://github.com/soundstorm)) + +- New favicons size too small ([#11524](https://github.com/RocketChat/Rocket.Chat/pull/11524) by [@brunosquadros](https://github.com/brunosquadros)) + +- Only escape HTML from details in toast error messages ([#11459](https://github.com/RocketChat/Rocket.Chat/pull/11459)) + +- Record popup ([#11349](https://github.com/RocketChat/Rocket.Chat/pull/11349)) + +- Refinements in message popup mentions ([#11441](https://github.com/RocketChat/Rocket.Chat/pull/11441)) + +- Remove title attribute from sidebar items ([#11298](https://github.com/RocketChat/Rocket.Chat/pull/11298)) + +- Render reply preview with message as a common message ([#11534](https://github.com/RocketChat/Rocket.Chat/pull/11534)) + +- RocketChat.settings.get causing memory leak (sometimes) ([#11487](https://github.com/RocketChat/Rocket.Chat/pull/11487)) + +- SAML issues ([#11135](https://github.com/RocketChat/Rocket.Chat/pull/11135) by [@Hudell](https://github.com/Hudell) & [@arminfelder](https://github.com/arminfelder)) + +- Send Livechat back to Guest Pool ([#10731](https://github.com/RocketChat/Rocket.Chat/pull/10731)) + +- Snap font issue for sharp ([#11514](https://github.com/RocketChat/Rocket.Chat/pull/11514)) + +- Unlimited upload file size not working ([#11471](https://github.com/RocketChat/Rocket.Chat/pull/11471) by [@Hudell](https://github.com/Hudell)) + +- Unreads counter for new rooms on /channels.counters REST endpoint ([#11531](https://github.com/RocketChat/Rocket.Chat/pull/11531)) + +- Wrap custom fields in user profile to new line ([#10119](https://github.com/RocketChat/Rocket.Chat/pull/10119) by [@PhpXp](https://github.com/PhpXp) & [@karlprieb](https://github.com/karlprieb)) + +
+🔍 Minor changes + + +- LingoHub based on develop ([#11587](https://github.com/RocketChat/Rocket.Chat/pull/11587)) + +- Merge master into develop & Set version to 0.68.0-develop ([#11536](https://github.com/RocketChat/Rocket.Chat/pull/11536)) + +- Regression: Add missing LiveChat permission to allow removing closed rooms ([#11423](https://github.com/RocketChat/Rocket.Chat/pull/11423)) + +- Regression: Fix purge message's translations ([#11590](https://github.com/RocketChat/Rocket.Chat/pull/11590)) + +- Regression: Make message popup user mentions reactive again ([#11567](https://github.com/RocketChat/Rocket.Chat/pull/11567)) + +- Regression: nonReactive to nonreactive ([#11550](https://github.com/RocketChat/Rocket.Chat/pull/11550)) + +- Regression: Remove safe area margins from logos ([#11508](https://github.com/RocketChat/Rocket.Chat/pull/11508) by [@brunosquadros](https://github.com/brunosquadros)) + +- Regression: Update cachedCollection version ([#11561](https://github.com/RocketChat/Rocket.Chat/pull/11561)) + +- Revert: Mixed case channel slugs #9449 ([#11537](https://github.com/RocketChat/Rocket.Chat/pull/11537)) + +- Update release issue template to use Houston CLI ([#11499](https://github.com/RocketChat/Rocket.Chat/pull/11499)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@HappyTobi](https://github.com/HappyTobi) +- [@Hudell](https://github.com/Hudell) +- [@Joe-mcgee](https://github.com/Joe-mcgee) +- [@PhpXp](https://github.com/PhpXp) +- [@arminfelder](https://github.com/arminfelder) +- [@arungalva](https://github.com/arungalva) +- [@brunosquadros](https://github.com/brunosquadros) +- [@cardoso](https://github.com/cardoso) +- [@karlprieb](https://github.com/karlprieb) +- [@soundstorm](https://github.com/soundstorm) +- [@tpDBL](https://github.com/tpDBL) +- [@vynmera](https://github.com/vynmera) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 0.67.0 +`2018-07-20 · 1 ️️️⚠️ · 1 🎉 · 2 🚀 · 15 🐛 · 7 🔍 · 11 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### ⚠️ BREAKING CHANGES + + +- Remove cache layer and internal calculated property `room.usernames` ([#10749](https://github.com/RocketChat/Rocket.Chat/pull/10749)) + +### 🎉 New features + + +- Additional Livechat iFrame API's ([#10918](https://github.com/RocketChat/Rocket.Chat/pull/10918)) + +### 🚀 Improvements + + +- Setup Wizard username validation, step progress and optin/optout ([#11254](https://github.com/RocketChat/Rocket.Chat/pull/11254)) + +- Stop sort callbacks on run ([#11330](https://github.com/RocketChat/Rocket.Chat/pull/11330)) + +### 🐛 Bug fixes + + +- All messages notifications via email were sent as mention alert ([#11398](https://github.com/RocketChat/Rocket.Chat/pull/11398)) + +- Livechat not sending desktop notifications ([#11266](https://github.com/RocketChat/Rocket.Chat/pull/11266)) + +- Livechat taking inquiry leading to 404 page ([#11406](https://github.com/RocketChat/Rocket.Chat/pull/11406)) + +- Livestream muted when audio only option was enabled ([#11267](https://github.com/RocketChat/Rocket.Chat/pull/11267) by [@gdelavald](https://github.com/gdelavald)) + +- Message attachment's fields with different sizes ([#11342](https://github.com/RocketChat/Rocket.Chat/pull/11342)) + +- Message popup responsiveness in slash commands ([#11313](https://github.com/RocketChat/Rocket.Chat/pull/11313)) + +- Notification preferences being lost when switching view mode ([#11295](https://github.com/RocketChat/Rocket.Chat/pull/11295)) + +- Outgoing integrations were stopping the oplog tailing sometimes ([#11333](https://github.com/RocketChat/Rocket.Chat/pull/11333)) + +- Parse inline code without space before initial backtick ([#9754](https://github.com/RocketChat/Rocket.Chat/pull/9754) by [@c0dzilla](https://github.com/c0dzilla) & [@gdelavald](https://github.com/gdelavald)) + +- Remove file snap store doesn't like ([#11365](https://github.com/RocketChat/Rocket.Chat/pull/11365)) + +- SAML attributes with periods are not properly read. ([#11315](https://github.com/RocketChat/Rocket.Chat/pull/11315) by [@Hudell](https://github.com/Hudell)) + +- Some updates were returning errors when based on queries with position operators ([#11335](https://github.com/RocketChat/Rocket.Chat/pull/11335)) + +- sort fname sidenav ([#11358](https://github.com/RocketChat/Rocket.Chat/pull/11358)) + +- SVG icons code ([#11319](https://github.com/RocketChat/Rocket.Chat/pull/11319)) + +- web app manifest errors as reported by Chrome DevTools ([#9991](https://github.com/RocketChat/Rocket.Chat/pull/9991) by [@justinribeiro](https://github.com/justinribeiro)) + +
+🔍 Minor changes + + +- Fix dependency issue in redhat image ([#11497](https://github.com/RocketChat/Rocket.Chat/pull/11497)) + +- Merge master into develop & Set version to 0.67.0-develop ([#11417](https://github.com/RocketChat/Rocket.Chat/pull/11417)) + +- Merge master into develop & Set version to 0.67.0-develop ([#11399](https://github.com/RocketChat/Rocket.Chat/pull/11399)) + +- Merge master into develop & Set version to 0.67.0-develop ([#11348](https://github.com/RocketChat/Rocket.Chat/pull/11348) by [@Hudell](https://github.com/Hudell) & [@gdelavald](https://github.com/gdelavald)) + +- Merge master into develop & Set version to 0.67.0-develop ([#11290](https://github.com/RocketChat/Rocket.Chat/pull/11290)) + +- Regression: Fix migration 125 checking for settings field ([#11364](https://github.com/RocketChat/Rocket.Chat/pull/11364)) + +- Send setting Allow_Marketing_Emails to statistics collector ([#11359](https://github.com/RocketChat/Rocket.Chat/pull/11359)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) +- [@c0dzilla](https://github.com/c0dzilla) +- [@gdelavald](https://github.com/gdelavald) +- [@justinribeiro](https://github.com/justinribeiro) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 0.66.3 +`2018-07-09 · 2 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### 🐛 Bug fixes + + +- All messages notifications via email were sent as mention alert ([#11398](https://github.com/RocketChat/Rocket.Chat/pull/11398)) + +- Livechat taking inquiry leading to 404 page ([#11406](https://github.com/RocketChat/Rocket.Chat/pull/11406)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) + +# 0.66.2 +`2018-07-06 · 2 🐛 · 2 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### 🐛 Bug fixes + + +- Livechat not sending desktop notifications ([#11266](https://github.com/RocketChat/Rocket.Chat/pull/11266)) + +- Remove file snap store doesn't like ([#11365](https://github.com/RocketChat/Rocket.Chat/pull/11365)) + +
+🔍 Minor changes + + +- Regression: Fix migration 125 checking for settings field ([#11364](https://github.com/RocketChat/Rocket.Chat/pull/11364)) + +- Send setting Allow_Marketing_Emails to statistics collector ([#11359](https://github.com/RocketChat/Rocket.Chat/pull/11359)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.66.1 +`2018-07-04 · 1 🚀 · 5 🐛 · 6 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### 🚀 Improvements + + +- Setup Wizard username validation, step progress and optin/optout ([#11254](https://github.com/RocketChat/Rocket.Chat/pull/11254)) + +### 🐛 Bug fixes + + +- Livestream muted when audio only option was enabled ([#11267](https://github.com/RocketChat/Rocket.Chat/pull/11267) by [@gdelavald](https://github.com/gdelavald)) + +- Notification preferences being lost when switching view mode ([#11295](https://github.com/RocketChat/Rocket.Chat/pull/11295)) + +- Outgoing integrations were stopping the oplog tailing sometimes ([#11333](https://github.com/RocketChat/Rocket.Chat/pull/11333)) + +- SAML attributes with periods are not properly read. ([#11315](https://github.com/RocketChat/Rocket.Chat/pull/11315) by [@Hudell](https://github.com/Hudell)) + +- Some updates were returning errors when based on queries with position operators ([#11335](https://github.com/RocketChat/Rocket.Chat/pull/11335)) + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) +- [@gdelavald](https://github.com/gdelavald) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 0.66.0 +`2018-06-27 · 1 ️️️⚠️ · 23 🎉 · 3 🚀 · 59 🐛 · 47 🔍 · 45 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.3` +- NPM: `5.6.0` + +### ⚠️ BREAKING CHANGES + + +- Always remove the field `services` from user data responses in REST API ([#10799](https://github.com/RocketChat/Rocket.Chat/pull/10799)) + +### 🎉 New features + + +- Add input to set time for avatar cache control ([#10958](https://github.com/RocketChat/Rocket.Chat/pull/10958)) + +- Add prometheus port config ([#11115](https://github.com/RocketChat/Rocket.Chat/pull/11115) by [@brylie](https://github.com/brylie) & [@stuartpb](https://github.com/stuartpb) & [@thaiphv](https://github.com/thaiphv)) + +- Button to remove closed LiveChat rooms ([#10301](https://github.com/RocketChat/Rocket.Chat/pull/10301)) + +- Changes all 'mergeChannels' to 'groupByType'. ([#10055](https://github.com/RocketChat/Rocket.Chat/pull/10055) by [@mikaelmello](https://github.com/mikaelmello)) + +- Command /hide to hide channels ([#10727](https://github.com/RocketChat/Rocket.Chat/pull/10727) by [@mikaelmello](https://github.com/mikaelmello)) + +- Custom login wallpapers ([#11025](https://github.com/RocketChat/Rocket.Chat/pull/11025) by [@vynmera](https://github.com/vynmera)) + +- Direct Reply: separate Reply-To email from account username field ([#10988](https://github.com/RocketChat/Rocket.Chat/pull/10988) by [@pkgodara](https://github.com/pkgodara)) + +- Disconnect users from websocket when away from the login screen for 10min ([#11086](https://github.com/RocketChat/Rocket.Chat/pull/11086)) + +- Do not wait method calls response on websocket before next method call ([#11087](https://github.com/RocketChat/Rocket.Chat/pull/11087)) + +- Don't ask me again checkbox on hide room modal ([#10973](https://github.com/RocketChat/Rocket.Chat/pull/10973) by [@karlprieb](https://github.com/karlprieb)) + +- Make supplying an AWS access key and secret optional for S3 uploads ([#10673](https://github.com/RocketChat/Rocket.Chat/pull/10673) by [@saplla](https://github.com/saplla)) + +- Option to trace Methods and Subscription calls ([#11085](https://github.com/RocketChat/Rocket.Chat/pull/11085)) + +- Reduce the amount of DDP API calls on login screen ([#11083](https://github.com/RocketChat/Rocket.Chat/pull/11083)) + +- Replace variable 'mergeChannels' with 'groupByType'. ([#10954](https://github.com/RocketChat/Rocket.Chat/pull/10954) by [@mikaelmello](https://github.com/mikaelmello)) + +- REST API endpoint `channels.setDefault` ([#10941](https://github.com/RocketChat/Rocket.Chat/pull/10941) by [@vynmera](https://github.com/vynmera)) + +- REST API endpoints `permissions.list` and `permissions.update`. Deprecated endpoint `permissions` ([#10975](https://github.com/RocketChat/Rocket.Chat/pull/10975) by [@vynmera](https://github.com/vynmera)) + +- Send LiveChat visitor navigation history as messages ([#10091](https://github.com/RocketChat/Rocket.Chat/pull/10091)) + +- Set Document Domain property in IFrame ([#9751](https://github.com/RocketChat/Rocket.Chat/pull/9751) by [@kb0304](https://github.com/kb0304)) + +- Support for dynamic slack and rocket.chat channels ([#10205](https://github.com/RocketChat/Rocket.Chat/pull/10205) by [@Hudell](https://github.com/Hudell) & [@kable-wilmoth](https://github.com/kable-wilmoth)) + +- Update katex to v0.9.0 ([#8402](https://github.com/RocketChat/Rocket.Chat/pull/8402) by [@pitamar](https://github.com/pitamar)) + +- Update WeDeploy deployment ([#10841](https://github.com/RocketChat/Rocket.Chat/pull/10841) by [@jonnilundy](https://github.com/jonnilundy)) + +- WebDAV(Nextcloud/ownCloud) Storage Server Option ([#11027](https://github.com/RocketChat/Rocket.Chat/pull/11027) by [@karakayasemi](https://github.com/karakayasemi)) + +- Youtube Broadcasting ([#10127](https://github.com/RocketChat/Rocket.Chat/pull/10127) by [@gdelavald](https://github.com/gdelavald)) + +### 🚀 Improvements + + +- Listing of apps in the admin page ([#11166](https://github.com/RocketChat/Rocket.Chat/pull/11166) by [@gdelavald](https://github.com/gdelavald) & [@karlprieb](https://github.com/karlprieb)) + +- UI design for Tables and tabs component on Directory ([#11026](https://github.com/RocketChat/Rocket.Chat/pull/11026) by [@karlprieb](https://github.com/karlprieb)) + +- User mentions ([#11001](https://github.com/RocketChat/Rocket.Chat/pull/11001) by [@vynmera](https://github.com/vynmera)) + +### 🐛 Bug fixes + + +- "blank messages" on iOS < 11 ([#11221](https://github.com/RocketChat/Rocket.Chat/pull/11221)) + +- "blank" screen on iOS < 11 ([#11199](https://github.com/RocketChat/Rocket.Chat/pull/11199)) + +- /groups.invite not allow a user to invite even with permission ([#11010](https://github.com/RocketChat/Rocket.Chat/pull/11010) by [@Hudell](https://github.com/Hudell)) + +- Add parameter to REST chat.react endpoint, to make it work like a setter ([#10447](https://github.com/RocketChat/Rocket.Chat/pull/10447)) + +- Allow inviting livechat managers to the same LiveChat room ([#10956](https://github.com/RocketChat/Rocket.Chat/pull/10956)) + +- Application crashing on startup when trying to log errors to `exceptions` channel ([#10934](https://github.com/RocketChat/Rocket.Chat/pull/10934)) + +- Armhf snap build ([#11268](https://github.com/RocketChat/Rocket.Chat/pull/11268)) + +- avoid send presence without login ([#11074](https://github.com/RocketChat/Rocket.Chat/pull/11074)) + +- Build for Sandstorm missing dependence for capnp ([#11056](https://github.com/RocketChat/Rocket.Chat/pull/11056) by [@peterlee0127](https://github.com/peterlee0127)) + +- Can't access the `/account/profile` ([#11089](https://github.com/RocketChat/Rocket.Chat/pull/11089)) + +- Cannot read property 'debug' of undefined when trying to use REST API ([#10805](https://github.com/RocketChat/Rocket.Chat/pull/10805) by [@haffla](https://github.com/haffla)) + +- Confirm password on set new password user profile ([#11095](https://github.com/RocketChat/Rocket.Chat/pull/11095)) + +- Default selected language ([#11150](https://github.com/RocketChat/Rocket.Chat/pull/11150)) + +- Exception in metrics generation ([#11072](https://github.com/RocketChat/Rocket.Chat/pull/11072)) + +- Exception thrown on avatar validation ([#11009](https://github.com/RocketChat/Rocket.Chat/pull/11009) by [@Hudell](https://github.com/Hudell)) + +- Failure to download user data ([#11190](https://github.com/RocketChat/Rocket.Chat/pull/11190) by [@Hudell](https://github.com/Hudell)) + +- flex-tab icons missing ([#11049](https://github.com/RocketChat/Rocket.Chat/pull/11049)) + +- Generated random password visible to the user ([#11096](https://github.com/RocketChat/Rocket.Chat/pull/11096)) + +- HipChat Cloud import fails to import rooms ([#11188](https://github.com/RocketChat/Rocket.Chat/pull/11188) by [@Hudell](https://github.com/Hudell)) + +- Icons svg xml structure ([#10771](https://github.com/RocketChat/Rocket.Chat/pull/10771) by [@timkinnane](https://github.com/timkinnane)) + +- Idle time limit wasn’t working as expected ([#11084](https://github.com/RocketChat/Rocket.Chat/pull/11084)) + +- Image lazy load was breaking attachments ([#10904](https://github.com/RocketChat/Rocket.Chat/pull/10904)) + +- Incomplete email notification link ([#10928](https://github.com/RocketChat/Rocket.Chat/pull/10928)) + +- Internal Server Error on first login with CAS integration ([#11257](https://github.com/RocketChat/Rocket.Chat/pull/11257) by [@Hudell](https://github.com/Hudell)) + +- LDAP was accepting login with empty passwords for certain AD configurations ([#11264](https://github.com/RocketChat/Rocket.Chat/pull/11264)) + +- Leave room wasn't working as expected ([#10851](https://github.com/RocketChat/Rocket.Chat/pull/10851)) + +- Link previews not being removed from messages after removed on editing ([#11063](https://github.com/RocketChat/Rocket.Chat/pull/11063)) + +- LiveChat appearance changes not being saved ([#11111](https://github.com/RocketChat/Rocket.Chat/pull/11111)) + +- Livechat icon with status ([#11177](https://github.com/RocketChat/Rocket.Chat/pull/11177)) + +- Livechat visitor not being prompted for transcript when himself is closing the chat ([#10767](https://github.com/RocketChat/Rocket.Chat/pull/10767)) + +- Message_AllowedMaxSize fails for emoji sequences ([#10431](https://github.com/RocketChat/Rocket.Chat/pull/10431) by [@c0dzilla](https://github.com/c0dzilla)) + +- Missing language constants ([#11173](https://github.com/RocketChat/Rocket.Chat/pull/11173) by [@rw4lll](https://github.com/rw4lll)) + +- Notification not working for group mentions and not respecting ignored users ([#11024](https://github.com/RocketChat/Rocket.Chat/pull/11024)) + +- open conversation from room info ([#11050](https://github.com/RocketChat/Rocket.Chat/pull/11050)) + +- Overlapping of search text and cancel search icon (X) ([#10294](https://github.com/RocketChat/Rocket.Chat/pull/10294) by [@taeven](https://github.com/taeven)) + +- Popover position ([#11113](https://github.com/RocketChat/Rocket.Chat/pull/11113)) + +- Preview of large images not resizing to fit the area and having scrollbars ([#10998](https://github.com/RocketChat/Rocket.Chat/pull/10998) by [@vynmera](https://github.com/vynmera)) + +- Reaction Toggle was not working when omitting the last parameter from the API (DDP and REST) ([#11276](https://github.com/RocketChat/Rocket.Chat/pull/11276) by [@Hudell](https://github.com/Hudell)) + +- Remove failed upload messages when switching rooms ([#11132](https://github.com/RocketChat/Rocket.Chat/pull/11132)) + +- Remove outdated 2FA warning for mobile clients ([#10916](https://github.com/RocketChat/Rocket.Chat/pull/10916) by [@cardoso](https://github.com/cardoso)) + +- remove sidebar on embedded view ([#11183](https://github.com/RocketChat/Rocket.Chat/pull/11183)) + +- Rendering of emails and mentions in messages ([#11165](https://github.com/RocketChat/Rocket.Chat/pull/11165)) + +- REST API: Add more test cases for `/login` ([#10999](https://github.com/RocketChat/Rocket.Chat/pull/10999)) + +- REST endpoint `users.updateOwnBasicInfo` was not returning errors for invalid names and trying to save custom fields when empty ([#11204](https://github.com/RocketChat/Rocket.Chat/pull/11204)) + +- Room creation error due absence of subscriptions ([#11178](https://github.com/RocketChat/Rocket.Chat/pull/11178)) + +- Rooms list sorting by activity multiple re-renders and case sensitive sorting alphabetically ([#9959](https://github.com/RocketChat/Rocket.Chat/pull/9959) by [@JoseRenan](https://github.com/JoseRenan) & [@karlprieb](https://github.com/karlprieb)) + +- set-toolbar-items postMessage ([#11109](https://github.com/RocketChat/Rocket.Chat/pull/11109)) + +- Some typos in the error message names ([#11136](https://github.com/RocketChat/Rocket.Chat/pull/11136) by [@vynmera](https://github.com/vynmera)) + +- Strange msg when setting room announcement, topic or description to be empty ([#11012](https://github.com/RocketChat/Rocket.Chat/pull/11012) by [@vynmera](https://github.com/vynmera)) + +- The process was freezing in some cases when HTTP calls exceeds timeout on integrations ([#11253](https://github.com/RocketChat/Rocket.Chat/pull/11253)) + +- title and value attachments are optionals on sendMessage method ([#11021](https://github.com/RocketChat/Rocket.Chat/pull/11021)) + +- Update capnproto dependence for Sandstorm Build ([#11263](https://github.com/RocketChat/Rocket.Chat/pull/11263) by [@peterlee0127](https://github.com/peterlee0127)) + +- Update ja.i18n.json ([#11020](https://github.com/RocketChat/Rocket.Chat/pull/11020) by [@Hudell](https://github.com/Hudell) & [@noobbbbb](https://github.com/noobbbbb)) + +- Update Sandstorm build config ([#10867](https://github.com/RocketChat/Rocket.Chat/pull/10867) by [@ocdtrekkie](https://github.com/ocdtrekkie)) + +- Users model was not receiving options ([#11129](https://github.com/RocketChat/Rocket.Chat/pull/11129)) + +- Various lang fixes [RU] ([#10095](https://github.com/RocketChat/Rocket.Chat/pull/10095) by [@rw4lll](https://github.com/rw4lll)) + +- Wordpress oauth configuration not loading properly ([#11187](https://github.com/RocketChat/Rocket.Chat/pull/11187) by [@Hudell](https://github.com/Hudell)) + +- Wordpress OAuth not providing enough info to log in ([#11152](https://github.com/RocketChat/Rocket.Chat/pull/11152) by [@Hudell](https://github.com/Hudell)) + +- Wrong font-family order ([#11191](https://github.com/RocketChat/Rocket.Chat/pull/11191) by [@Hudell](https://github.com/Hudell) & [@myfonj](https://github.com/myfonj)) + +
+🔍 Minor changes + + +- [FIX Readme] Nodejs + Python version spicifications ([#11181](https://github.com/RocketChat/Rocket.Chat/pull/11181) by [@mahdiyari](https://github.com/mahdiyari)) + +- Add Dockerfile with MongoDB ([#10971](https://github.com/RocketChat/Rocket.Chat/pull/10971)) + +- Add verification to make sure the user exists in REST insert object helper ([#11008](https://github.com/RocketChat/Rocket.Chat/pull/11008)) + +- Build Docker image on CI ([#11076](https://github.com/RocketChat/Rocket.Chat/pull/11076)) + +- Changed 'confirm password' placeholder text on user registration form ([#9969](https://github.com/RocketChat/Rocket.Chat/pull/9969) by [@kumarnitj](https://github.com/kumarnitj)) + +- Develop sync commits ([#10909](https://github.com/RocketChat/Rocket.Chat/pull/10909) by [@nsuchy](https://github.com/nsuchy) & [@rafaelks](https://github.com/rafaelks)) + +- Develop sync2 ([#10908](https://github.com/RocketChat/Rocket.Chat/pull/10908) by [@nsuchy](https://github.com/nsuchy) & [@rafaelks](https://github.com/rafaelks)) + +- Fix Docker image build on tags ([#11271](https://github.com/RocketChat/Rocket.Chat/pull/11271)) + +- Fix Docker image for develop commits ([#11093](https://github.com/RocketChat/Rocket.Chat/pull/11093)) + +- Fix PR Docker image creation by splitting in two build jobs ([#11107](https://github.com/RocketChat/Rocket.Chat/pull/11107)) + +- Fix readme typo ([#5](https://github.com/RocketChat/Rocket.Chat/pull/5) by [@filipealva](https://github.com/filipealva)) + +- IRC Federation: RFC2813 implementation (ngIRCd) ([#10113](https://github.com/RocketChat/Rocket.Chat/pull/10113) by [@Hudell](https://github.com/Hudell) & [@cpitman](https://github.com/cpitman) & [@lindoelio](https://github.com/lindoelio)) + +- LingoHub based on develop ([#11208](https://github.com/RocketChat/Rocket.Chat/pull/11208)) + +- LingoHub based on develop ([#11062](https://github.com/RocketChat/Rocket.Chat/pull/11062)) + +- LingoHub based on develop ([#11054](https://github.com/RocketChat/Rocket.Chat/pull/11054)) + +- LingoHub based on develop ([#11053](https://github.com/RocketChat/Rocket.Chat/pull/11053)) + +- LingoHub based on develop ([#11051](https://github.com/RocketChat/Rocket.Chat/pull/11051)) + +- LingoHub based on develop ([#11045](https://github.com/RocketChat/Rocket.Chat/pull/11045)) + +- LingoHub based on develop ([#11044](https://github.com/RocketChat/Rocket.Chat/pull/11044)) + +- LingoHub based on develop ([#11043](https://github.com/RocketChat/Rocket.Chat/pull/11043)) + +- LingoHub based on develop ([#11042](https://github.com/RocketChat/Rocket.Chat/pull/11042)) + +- LingoHub based on develop ([#11039](https://github.com/RocketChat/Rocket.Chat/pull/11039)) + +- LingoHub based on develop ([#11035](https://github.com/RocketChat/Rocket.Chat/pull/11035)) + +- LingoHub based on develop ([#11246](https://github.com/RocketChat/Rocket.Chat/pull/11246)) + +- Merge master into develop & Set version to 0.66.0-develop ([#11277](https://github.com/RocketChat/Rocket.Chat/pull/11277) by [@Hudell](https://github.com/Hudell) & [@brylie](https://github.com/brylie) & [@stuartpb](https://github.com/stuartpb)) + +- Merge master into develop & Set version to 0.66.0-develop ([#10903](https://github.com/RocketChat/Rocket.Chat/pull/10903) by [@nsuchy](https://github.com/nsuchy) & [@rafaelks](https://github.com/rafaelks)) + +- New history source format & add Node and NPM versions ([#11237](https://github.com/RocketChat/Rocket.Chat/pull/11237)) + +- NPM Dependencies Update ([#10913](https://github.com/RocketChat/Rocket.Chat/pull/10913)) + +- Regression: check username or usersCount on browseChannels ([#11216](https://github.com/RocketChat/Rocket.Chat/pull/11216)) + +- Regression: Directory css ([#11206](https://github.com/RocketChat/Rocket.Chat/pull/11206) by [@karlprieb](https://github.com/karlprieb)) + +- Regression: Directory sort users, fix null results, text for empty results ([#11224](https://github.com/RocketChat/Rocket.Chat/pull/11224)) + +- Regression: Directory user table infinite scroll doesn't working ([#11200](https://github.com/RocketChat/Rocket.Chat/pull/11200) by [@karlprieb](https://github.com/karlprieb)) + +- Regression: Fix directory table loading ([#11223](https://github.com/RocketChat/Rocket.Chat/pull/11223) by [@karlprieb](https://github.com/karlprieb)) + +- Regression: Fix latest and release-candidate docker images building ([#11215](https://github.com/RocketChat/Rocket.Chat/pull/11215)) + +- Regression: Prometheus was not being enabled in some cases ([#11249](https://github.com/RocketChat/Rocket.Chat/pull/11249)) + +- Regression: Sending message with a mention is not showing to sender ([#11211](https://github.com/RocketChat/Rocket.Chat/pull/11211)) + +- Regression: sidebar sorting was being wrong in some cases where the rooms records were returned before the subscriptions ([#11273](https://github.com/RocketChat/Rocket.Chat/pull/11273)) + +- Regression: Skip operations if no actions on livechat migration ([#11232](https://github.com/RocketChat/Rocket.Chat/pull/11232)) + +- Regression: sorting direct message by asc on favorites group ([#11090](https://github.com/RocketChat/Rocket.Chat/pull/11090)) + +- Remove wrong and not needed time unit ([#10807](https://github.com/RocketChat/Rocket.Chat/pull/10807) by [@cliffparnitzky](https://github.com/cliffparnitzky)) + +- Renaming username.username to username.value for clarity ([#10986](https://github.com/RocketChat/Rocket.Chat/pull/10986)) + +- Speed up the build time by removing JSON Minify from i18n package ([#11097](https://github.com/RocketChat/Rocket.Chat/pull/11097)) + +- Update Documentation: README.md ([#10207](https://github.com/RocketChat/Rocket.Chat/pull/10207) by [@rakhi2104](https://github.com/rakhi2104)) + +- Update issue templates ([#11070](https://github.com/RocketChat/Rocket.Chat/pull/11070)) + +- update meteor to 1.6.1 for sandstorm build ([#10131](https://github.com/RocketChat/Rocket.Chat/pull/10131) by [@peterlee0127](https://github.com/peterlee0127)) + +- Update Meteor to 1.6.1.3 ([#11247](https://github.com/RocketChat/Rocket.Chat/pull/11247)) + +- Update v126.js ([#11103](https://github.com/RocketChat/Rocket.Chat/pull/11103)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) +- [@JoseRenan](https://github.com/JoseRenan) +- [@brylie](https://github.com/brylie) +- [@c0dzilla](https://github.com/c0dzilla) +- [@cardoso](https://github.com/cardoso) +- [@cliffparnitzky](https://github.com/cliffparnitzky) +- [@cpitman](https://github.com/cpitman) +- [@filipealva](https://github.com/filipealva) +- [@gdelavald](https://github.com/gdelavald) +- [@haffla](https://github.com/haffla) +- [@jonnilundy](https://github.com/jonnilundy) +- [@kable-wilmoth](https://github.com/kable-wilmoth) +- [@karakayasemi](https://github.com/karakayasemi) +- [@karlprieb](https://github.com/karlprieb) +- [@kb0304](https://github.com/kb0304) +- [@kumarnitj](https://github.com/kumarnitj) +- [@lindoelio](https://github.com/lindoelio) +- [@mahdiyari](https://github.com/mahdiyari) +- [@mikaelmello](https://github.com/mikaelmello) +- [@myfonj](https://github.com/myfonj) +- [@noobbbbb](https://github.com/noobbbbb) +- [@nsuchy](https://github.com/nsuchy) +- [@ocdtrekkie](https://github.com/ocdtrekkie) +- [@peterlee0127](https://github.com/peterlee0127) +- [@pitamar](https://github.com/pitamar) +- [@pkgodara](https://github.com/pkgodara) +- [@rafaelks](https://github.com/rafaelks) +- [@rakhi2104](https://github.com/rakhi2104) +- [@rw4lll](https://github.com/rw4lll) +- [@saplla](https://github.com/saplla) +- [@stuartpb](https://github.com/stuartpb) +- [@taeven](https://github.com/taeven) +- [@thaiphv](https://github.com/thaiphv) +- [@timkinnane](https://github.com/timkinnane) +- [@vynmera](https://github.com/vynmera) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@alansikora](https://github.com/alansikora) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + +# 0.65.2 +`2018-06-16 · 1 🐛 · 1 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.1` +- NPM: `5.6.0` + +### 🐛 Bug fixes + + +- i18n - add semantic markup ([#9534](https://github.com/RocketChat/Rocket.Chat/pull/9534) by [@brylie](https://github.com/brylie)) + +
+🔍 Minor changes + + +- Release 0.65.1 ([#10947](https://github.com/RocketChat/Rocket.Chat/pull/10947)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@brylie](https://github.com/brylie) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@engelgabriel](https://github.com/engelgabriel) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.65.1 +`2018-05-30 · 5 🐛 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.1` +- NPM: `5.6.0` + +### 🐛 Bug fixes + + +- Application crashing on startup when trying to log errors to `exceptions` channel ([#10934](https://github.com/RocketChat/Rocket.Chat/pull/10934)) + +- Image lazy load was breaking attachments ([#10904](https://github.com/RocketChat/Rocket.Chat/pull/10904)) + +- Incomplete email notification link ([#10928](https://github.com/RocketChat/Rocket.Chat/pull/10928)) + +- Leave room wasn't working as expected ([#10851](https://github.com/RocketChat/Rocket.Chat/pull/10851)) + +- Livechat not loading ([#10940](https://github.com/RocketChat/Rocket.Chat/pull/10940)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.65.0 +`2018-05-28 · 17 🎉 · 24 🐛 · 30 🔍 · 25 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.1` +- NPM: `5.6.0` + +### 🎉 New features + + +- Add more options for Wordpress OAuth configuration ([#10724](https://github.com/RocketChat/Rocket.Chat/pull/10724) by [@Hudell](https://github.com/Hudell)) + +- Add permission `view-broadcast-member-list` ([#10753](https://github.com/RocketChat/Rocket.Chat/pull/10753) by [@cardoso](https://github.com/cardoso)) + +- Add REST API endpoint `users.getUsernameSuggestion` to get username suggestion ([#10702](https://github.com/RocketChat/Rocket.Chat/pull/10702)) + +- Add REST API endpoints `channels.counters`, `groups.counters and `im.counters` ([#9679](https://github.com/RocketChat/Rocket.Chat/pull/9679) by [@xbolshe](https://github.com/xbolshe)) + +- Add REST API endpoints `channels.setCustomFields` and `groups.setCustomFields` ([#9733](https://github.com/RocketChat/Rocket.Chat/pull/9733) by [@xbolshe](https://github.com/xbolshe)) + +- Add REST endpoint `subscriptions.unread` to mark messages as unread ([#10778](https://github.com/RocketChat/Rocket.Chat/pull/10778)) + +- Add REST endpoints `channels.roles` & `groups.roles` ([#10607](https://github.com/RocketChat/Rocket.Chat/pull/10607) by [@cardoso](https://github.com/cardoso) & [@rafaelks](https://github.com/rafaelks)) + +- Implement a local password policy ([#9857](https://github.com/RocketChat/Rocket.Chat/pull/9857)) + +- Improvements to notifications logic ([#10686](https://github.com/RocketChat/Rocket.Chat/pull/10686)) + +- Lazy load image attachments ([#10608](https://github.com/RocketChat/Rocket.Chat/pull/10608) by [@karlprieb](https://github.com/karlprieb)) + +- Now is possible to access files using header authorization (`x-user-id` and `x-auth-token`) ([#10741](https://github.com/RocketChat/Rocket.Chat/pull/10741)) + +- Options to enable/disable each Livechat registration form field ([#10584](https://github.com/RocketChat/Rocket.Chat/pull/10584)) + +- REST API endpoint `/me` now returns all the settings, including the default values ([#10662](https://github.com/RocketChat/Rocket.Chat/pull/10662)) + +- REST API endpoint `settings` now allow set colors and trigger actions ([#10488](https://github.com/RocketChat/Rocket.Chat/pull/10488) by [@ThomasRoehl](https://github.com/ThomasRoehl)) + +- Return the result of the `/me` endpoint within the result of the `/login` endpoint ([#10677](https://github.com/RocketChat/Rocket.Chat/pull/10677)) + +- Setup Wizard ([#10523](https://github.com/RocketChat/Rocket.Chat/pull/10523) by [@karlprieb](https://github.com/karlprieb)) + +- View pinned message's attachment ([#10214](https://github.com/RocketChat/Rocket.Chat/pull/10214) by [@c0dzilla](https://github.com/c0dzilla) & [@karlprieb](https://github.com/karlprieb)) + +### 🐛 Bug fixes + + +- Broadcast channels were showing reply button for deleted messages and generating wrong reply links some times ([#10835](https://github.com/RocketChat/Rocket.Chat/pull/10835)) + +- Cancel button wasn't working while uploading file ([#10715](https://github.com/RocketChat/Rocket.Chat/pull/10715) by [@Mr-Gryphon](https://github.com/Mr-Gryphon) & [@karlprieb](https://github.com/karlprieb)) + +- Channel owner was being set as muted when creating a read-only channel ([#10665](https://github.com/RocketChat/Rocket.Chat/pull/10665)) + +- Enabling `Collapse Embedded Media by Default` was hiding replies and quotes ([#10427](https://github.com/RocketChat/Rocket.Chat/pull/10427) by [@c0dzilla](https://github.com/c0dzilla)) + +- Horizontally align items in preview message ([#10883](https://github.com/RocketChat/Rocket.Chat/pull/10883) by [@gdelavald](https://github.com/gdelavald)) + +- Improve desktop notification formatting ([#10445](https://github.com/RocketChat/Rocket.Chat/pull/10445) by [@Sameesunkaria](https://github.com/Sameesunkaria)) + +- Internal Error when requesting user data download ([#10837](https://github.com/RocketChat/Rocket.Chat/pull/10837) by [@Hudell](https://github.com/Hudell)) + +- Layout badge cutting on unread messages for long names ([#10846](https://github.com/RocketChat/Rocket.Chat/pull/10846) by [@kos4live](https://github.com/kos4live)) + +- Livechat managers were not being able to send messages in some cases ([#10663](https://github.com/RocketChat/Rocket.Chat/pull/10663)) + +- Livechat settings not appearing correctly ([#10612](https://github.com/RocketChat/Rocket.Chat/pull/10612)) + +- Message box emoji icon was flickering when typing a text ([#10678](https://github.com/RocketChat/Rocket.Chat/pull/10678) by [@gdelavald](https://github.com/gdelavald)) + +- Missing attachment description when Rocket.Chat Apps were enabled ([#10705](https://github.com/RocketChat/Rocket.Chat/pull/10705) by [@Hudell](https://github.com/Hudell)) + +- Missing option to disable/enable System Messages ([#10704](https://github.com/RocketChat/Rocket.Chat/pull/10704)) + +- Missing pagination fields in the response of REST /directory endpoint ([#10840](https://github.com/RocketChat/Rocket.Chat/pull/10840)) + +- Not escaping special chars on mentions ([#10793](https://github.com/RocketChat/Rocket.Chat/pull/10793) by [@erhan-](https://github.com/erhan-)) + +- Private settings were not being cleared from client cache in some cases ([#10625](https://github.com/RocketChat/Rocket.Chat/pull/10625) by [@Hudell](https://github.com/Hudell)) + +- Regression: Empty content on announcement modal ([#10733](https://github.com/RocketChat/Rocket.Chat/pull/10733) by [@gdelavald](https://github.com/gdelavald)) + +- Remove outdated translations of Internal Hubot's description of Scripts to Load that were pointing to a non existent address ([#10448](https://github.com/RocketChat/Rocket.Chat/pull/10448) by [@Hudell](https://github.com/Hudell)) + +- SAML wasn't working correctly when running multiple instances ([#10681](https://github.com/RocketChat/Rocket.Chat/pull/10681) by [@Hudell](https://github.com/Hudell)) + +- Send a message when muted returns inconsistent result in chat.sendMessage ([#10720](https://github.com/RocketChat/Rocket.Chat/pull/10720)) + +- Slack-Bridge bug when migrating to 0.64.1 ([#10875](https://github.com/RocketChat/Rocket.Chat/pull/10875)) + +- The first users was not set as admin some times ([#10878](https://github.com/RocketChat/Rocket.Chat/pull/10878)) + +- UI was not disabling the actions when users has had no permissions to create channels or add users to rooms ([#10564](https://github.com/RocketChat/Rocket.Chat/pull/10564) by [@cfunkles](https://github.com/cfunkles) & [@chuckAtCataworx](https://github.com/chuckAtCataworx)) + +- User's preference `Unread on Top` wasn't working for LiveChat rooms ([#10734](https://github.com/RocketChat/Rocket.Chat/pull/10734)) + +
+🔍 Minor changes + + +- Add `npm run postinstall` into example build script ([#10524](https://github.com/RocketChat/Rocket.Chat/pull/10524) by [@peccu](https://github.com/peccu)) + +- Add badge back to push notifications ([#10779](https://github.com/RocketChat/Rocket.Chat/pull/10779)) + +- Add setting and expose prometheus on port 9100 ([#10766](https://github.com/RocketChat/Rocket.Chat/pull/10766)) + +- Apps: Command previews are clickable & Apps Framework is controlled via a setting ([#10853](https://github.com/RocketChat/Rocket.Chat/pull/10853)) + +- Apps: Command Previews, Message and Room Removal Events ([#10822](https://github.com/RocketChat/Rocket.Chat/pull/10822)) + +- Better metric for notifications ([#10786](https://github.com/RocketChat/Rocket.Chat/pull/10786)) + +- Correct links in README file ([#10674](https://github.com/RocketChat/Rocket.Chat/pull/10674) by [@winterstefan](https://github.com/winterstefan)) + +- Develop sync ([#10815](https://github.com/RocketChat/Rocket.Chat/pull/10815) by [@nsuchy](https://github.com/nsuchy) & [@rafaelks](https://github.com/rafaelks)) + +- Fix: Clarify the wording of the release issue template ([#10520](https://github.com/RocketChat/Rocket.Chat/pull/10520)) + +- Fix: Manage apps layout was a bit confuse ([#10882](https://github.com/RocketChat/Rocket.Chat/pull/10882) by [@gdelavald](https://github.com/gdelavald)) + +- Fix: Regression in REST API endpoint `/me` ([#10833](https://github.com/RocketChat/Rocket.Chat/pull/10833)) + +- Fix: Regression Lazyload fix shuffle avatars ([#10887](https://github.com/RocketChat/Rocket.Chat/pull/10887)) + +- Fix: Regression on users avatar in admin pages ([#10836](https://github.com/RocketChat/Rocket.Chat/pull/10836)) + +- Fix: typo on error message for push token API ([#10857](https://github.com/RocketChat/Rocket.Chat/pull/10857) by [@rafaelks](https://github.com/rafaelks)) + +- Improvement to push notifications on direct messages ([#10788](https://github.com/RocketChat/Rocket.Chat/pull/10788)) + +- LingoHub based on develop ([#10691](https://github.com/RocketChat/Rocket.Chat/pull/10691)) + +- LingoHub based on develop ([#10886](https://github.com/RocketChat/Rocket.Chat/pull/10886)) + +- Major dependencies update ([#10661](https://github.com/RocketChat/Rocket.Chat/pull/10661)) + +- More improvements on send notifications logic ([#10736](https://github.com/RocketChat/Rocket.Chat/pull/10736)) + +- Prevent setup wizard redirects ([#10811](https://github.com/RocketChat/Rocket.Chat/pull/10811)) + +- Prometheus: Add metric to track hooks time ([#10798](https://github.com/RocketChat/Rocket.Chat/pull/10798)) + +- Prometheus: Fix notification metric ([#10803](https://github.com/RocketChat/Rocket.Chat/pull/10803)) + +- Prometheus: Improve metric names ([#10789](https://github.com/RocketChat/Rocket.Chat/pull/10789)) + +- Regression: Autorun of wizard was not destroyed after completion ([#10802](https://github.com/RocketChat/Rocket.Chat/pull/10802)) + +- Regression: Fix email notification preference not showing correct selected value ([#10847](https://github.com/RocketChat/Rocket.Chat/pull/10847)) + +- Regression: Fix notifications for direct messages ([#10760](https://github.com/RocketChat/Rocket.Chat/pull/10760)) + +- Regression: Fix wrong wizard field name ([#10804](https://github.com/RocketChat/Rocket.Chat/pull/10804)) + +- Regression: Make settings `Site_Name` and `Language` public again ([#10848](https://github.com/RocketChat/Rocket.Chat/pull/10848)) + +- Release 0.65.0 ([#10893](https://github.com/RocketChat/Rocket.Chat/pull/10893) by [@Hudell](https://github.com/Hudell) & [@Sameesunkaria](https://github.com/Sameesunkaria) & [@cardoso](https://github.com/cardoso) & [@erhan-](https://github.com/erhan-) & [@gdelavald](https://github.com/gdelavald) & [@karlprieb](https://github.com/karlprieb) & [@peccu](https://github.com/peccu) & [@winterstefan](https://github.com/winterstefan)) + +- Wizard improvements ([#10776](https://github.com/RocketChat/Rocket.Chat/pull/10776)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) +- [@Mr-Gryphon](https://github.com/Mr-Gryphon) +- [@Sameesunkaria](https://github.com/Sameesunkaria) +- [@ThomasRoehl](https://github.com/ThomasRoehl) +- [@c0dzilla](https://github.com/c0dzilla) +- [@cardoso](https://github.com/cardoso) +- [@cfunkles](https://github.com/cfunkles) +- [@chuckAtCataworx](https://github.com/chuckAtCataworx) +- [@erhan-](https://github.com/erhan-) +- [@gdelavald](https://github.com/gdelavald) +- [@karlprieb](https://github.com/karlprieb) +- [@kos4live](https://github.com/kos4live) +- [@nsuchy](https://github.com/nsuchy) +- [@peccu](https://github.com/peccu) +- [@rafaelks](https://github.com/rafaelks) +- [@winterstefan](https://github.com/winterstefan) +- [@xbolshe](https://github.com/xbolshe) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.64.2 +`2018-05-18 · 1 🔍 · 12 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.1` +- NPM: `5.6.0` + +
+🔍 Minor changes + + +- Release 0.64.2 ([#10812](https://github.com/RocketChat/Rocket.Chat/pull/10812) by [@Hudell](https://github.com/Hudell) & [@Sameesunkaria](https://github.com/Sameesunkaria) & [@cardoso](https://github.com/cardoso) & [@erhan-](https://github.com/erhan-) & [@gdelavald](https://github.com/gdelavald) & [@karlprieb](https://github.com/karlprieb) & [@peccu](https://github.com/peccu) & [@winterstefan](https://github.com/winterstefan)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) +- [@Sameesunkaria](https://github.com/Sameesunkaria) +- [@cardoso](https://github.com/cardoso) +- [@erhan-](https://github.com/erhan-) +- [@gdelavald](https://github.com/gdelavald) +- [@karlprieb](https://github.com/karlprieb) +- [@peccu](https://github.com/peccu) +- [@winterstefan](https://github.com/winterstefan) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@engelgabriel](https://github.com/engelgabriel) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.64.1 +`2018-05-03 · 1 🎉 · 2 🐛 · 4 🔍 · 5 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.1` +- NPM: `5.6.0` + +### 🎉 New features + + +- Store the last sent message to show bellow the room's name by default ([#10597](https://github.com/RocketChat/Rocket.Chat/pull/10597)) + +### 🐛 Bug fixes + + +- E-mails were hidden some information ([#10615](https://github.com/RocketChat/Rocket.Chat/pull/10615)) + +- Regression on 0.64.0 was freezing the application when posting some URLs ([#10627](https://github.com/RocketChat/Rocket.Chat/pull/10627)) + +
+🔍 Minor changes + + +- Dependencies update ([#10648](https://github.com/RocketChat/Rocket.Chat/pull/10648)) + +- Regression: Updating an App on multi-instance servers wasn't working ([#10611](https://github.com/RocketChat/Rocket.Chat/pull/10611)) + +- Release 0.64.1 ([#10660](https://github.com/RocketChat/Rocket.Chat/pull/10660) by [@saplla](https://github.com/saplla)) + +- Support passing extra connection options to the Mongo driver ([#10529](https://github.com/RocketChat/Rocket.Chat/pull/10529) by [@saplla](https://github.com/saplla)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@saplla](https://github.com/saplla) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@engelgabriel](https://github.com/engelgabriel) +- [@graywolf336](https://github.com/graywolf336) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.64.0 +`2018-04-28 · 2 ️️️⚠️ · 18 🎉 · 44 🐛 · 31 🔍 · 30 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.1` +- NPM: `5.6.0` + +### ⚠️ BREAKING CHANGES + + +- The property "settings" is no longer available to regular users via rest api ([#10411](https://github.com/RocketChat/Rocket.Chat/pull/10411)) + +- Validate incoming message schema ([#9922](https://github.com/RocketChat/Rocket.Chat/pull/9922)) + +### 🎉 New features + + +- Add information regarding Zapier and Bots to the integrations page ([#10574](https://github.com/RocketChat/Rocket.Chat/pull/10574)) + +- Add internal API to handle room announcements ([#10396](https://github.com/RocketChat/Rocket.Chat/pull/10396) by [@gdelavald](https://github.com/gdelavald)) + +- Add message preview when quoting another message ([#10437](https://github.com/RocketChat/Rocket.Chat/pull/10437) by [@gdelavald](https://github.com/gdelavald)) + +- Automatically trigger Redhat registry build when tagging new release ([#10414](https://github.com/RocketChat/Rocket.Chat/pull/10414)) + +- Body of the payload on an incoming webhook is included on the request object ([#10259](https://github.com/RocketChat/Rocket.Chat/pull/10259) by [@Hudell](https://github.com/Hudell)) + +- Broadcast Channels ([#9950](https://github.com/RocketChat/Rocket.Chat/pull/9950)) + +- GDPR - Right to access and Data Portability ([#9906](https://github.com/RocketChat/Rocket.Chat/pull/9906) by [@Hudell](https://github.com/Hudell)) + +- Livechat setting to customize ended conversation message ([#10108](https://github.com/RocketChat/Rocket.Chat/pull/10108)) + +- Option to ignore users on channels ([#10517](https://github.com/RocketChat/Rocket.Chat/pull/10517) by [@gdelavald](https://github.com/gdelavald) & [@karlprieb](https://github.com/karlprieb)) + +- Option to mute group mentions (@all and @here) ([#10502](https://github.com/RocketChat/Rocket.Chat/pull/10502) by [@Hudell](https://github.com/Hudell)) + +- Prevent the browser to autocomplete some setting fields ([#10439](https://github.com/RocketChat/Rocket.Chat/pull/10439) by [@gdelavald](https://github.com/gdelavald)) + +- REST API endpoint `/directory` ([#10442](https://github.com/RocketChat/Rocket.Chat/pull/10442)) + +- REST API endpoint `rooms.favorite` to favorite and unfavorite rooms ([#10342](https://github.com/RocketChat/Rocket.Chat/pull/10342)) + +- REST endpoint to recover forgotten password ([#10371](https://github.com/RocketChat/Rocket.Chat/pull/10371)) + +- REST endpoint to report messages ([#10354](https://github.com/RocketChat/Rocket.Chat/pull/10354)) + +- Search Provider Framework ([#10110](https://github.com/RocketChat/Rocket.Chat/pull/10110) by [@tkurz](https://github.com/tkurz)) + +- Shows user's real name on autocomplete popup ([#10444](https://github.com/RocketChat/Rocket.Chat/pull/10444) by [@gdelavald](https://github.com/gdelavald)) + +- Twilio MMS support for LiveChat integration ([#7964](https://github.com/RocketChat/Rocket.Chat/pull/7964) by [@t3hchipmunk](https://github.com/t3hchipmunk)) + +### 🐛 Bug fixes + + +- "Highlight Words" wasn't working with more than one word ([#10083](https://github.com/RocketChat/Rocket.Chat/pull/10083) by [@gdelavald](https://github.com/gdelavald) & [@nemaniarjun](https://github.com/nemaniarjun)) + +- "Idle Time Limit" using milliseconds instead of seconds ([#9824](https://github.com/RocketChat/Rocket.Chat/pull/9824) by [@kaiiiiiiiii](https://github.com/kaiiiiiiiii)) + +- Add user object to responses in /*.files Rest endpoints ([#10480](https://github.com/RocketChat/Rocket.Chat/pull/10480)) + +- Autocomplete list when inviting a user was partial hidden ([#10409](https://github.com/RocketChat/Rocket.Chat/pull/10409) by [@karlprieb](https://github.com/karlprieb)) + +- Button on user info contextual bar scrolling with the content ([#10358](https://github.com/RocketChat/Rocket.Chat/pull/10358) by [@karlprieb](https://github.com/karlprieb) & [@okaybroda](https://github.com/okaybroda)) + +- Button to delete rooms by the owners wasn't appearing ([#10438](https://github.com/RocketChat/Rocket.Chat/pull/10438) by [@karlprieb](https://github.com/karlprieb)) + +- Custom fields was misaligned in registration form ([#10463](https://github.com/RocketChat/Rocket.Chat/pull/10463) by [@dschuan](https://github.com/dschuan)) + +- Directory sort and column sizes were wrong ([#10403](https://github.com/RocketChat/Rocket.Chat/pull/10403) by [@karlprieb](https://github.com/karlprieb)) + +- Dropdown elements were using old styles ([#10482](https://github.com/RocketChat/Rocket.Chat/pull/10482) by [@kaiiiiiiiii](https://github.com/kaiiiiiiiii)) + +- Empty panel after changing a user's username ([#10404](https://github.com/RocketChat/Rocket.Chat/pull/10404) by [@Hudell](https://github.com/Hudell)) + +- Error messages weren't been displayed when email verification fails ([#10446](https://github.com/RocketChat/Rocket.Chat/pull/10446) by [@Hudell](https://github.com/Hudell) & [@karlprieb](https://github.com/karlprieb)) + +- GitLab authentication scope was too open, reduced to read only access ([#10225](https://github.com/RocketChat/Rocket.Chat/pull/10225) by [@rafaelks](https://github.com/rafaelks)) + +- Incoming integrations being able to trigger an empty message with a GET ([#9576](https://github.com/RocketChat/Rocket.Chat/pull/9576)) + +- Integrations with room data not having the usernames filled in ([#10576](https://github.com/RocketChat/Rocket.Chat/pull/10576)) + +- Links being embedded inside of blockquotes ([#10496](https://github.com/RocketChat/Rocket.Chat/pull/10496) by [@gdelavald](https://github.com/gdelavald)) + +- Livechat desktop notifications not being displayed ([#10221](https://github.com/RocketChat/Rocket.Chat/pull/10221)) + +- Livechat translation files being ignored ([#10369](https://github.com/RocketChat/Rocket.Chat/pull/10369)) + +- Member list search with no results ([#10599](https://github.com/RocketChat/Rocket.Chat/pull/10599)) + +- Message view mode setting was missing at user's preferences ([#10395](https://github.com/RocketChat/Rocket.Chat/pull/10395) by [@kaiiiiiiiii](https://github.com/kaiiiiiiiii) & [@karlprieb](https://github.com/karlprieb)) + +- Messages was grouping wrong some times when server is slow ([#10472](https://github.com/RocketChat/Rocket.Chat/pull/10472) by [@gdelavald](https://github.com/gdelavald) & [@karlprieb](https://github.com/karlprieb)) + +- Missing "Administration" menu for user with manage-emoji permission ([#10171](https://github.com/RocketChat/Rocket.Chat/pull/10171) by [@c0dzilla](https://github.com/c0dzilla) & [@karlprieb](https://github.com/karlprieb)) + +- Missing "Administration" menu for users with some administration permissions ([#10551](https://github.com/RocketChat/Rocket.Chat/pull/10551) by [@kaiiiiiiiii](https://github.com/kaiiiiiiiii)) + +- Missing i18n translation key for "Unread" ([#10387](https://github.com/RocketChat/Rocket.Chat/pull/10387) by [@Hudell](https://github.com/Hudell)) + +- Missing page "not found" ([#6673](https://github.com/RocketChat/Rocket.Chat/pull/6673) by [@Prakharsvnit](https://github.com/Prakharsvnit) & [@karlprieb](https://github.com/karlprieb)) + +- Missing RocketApps input types ([#10394](https://github.com/RocketChat/Rocket.Chat/pull/10394) by [@karlprieb](https://github.com/karlprieb)) + +- Missing user data on files uploaded through the API ([#10473](https://github.com/RocketChat/Rocket.Chat/pull/10473) by [@Hudell](https://github.com/Hudell)) + +- Owner unable to delete channel or group from APIs ([#9729](https://github.com/RocketChat/Rocket.Chat/pull/9729) by [@c0dzilla](https://github.com/c0dzilla)) + +- Profile image was not being shown in user's directory search ([#10399](https://github.com/RocketChat/Rocket.Chat/pull/10399) by [@karlprieb](https://github.com/karlprieb) & [@lunaticmonk](https://github.com/lunaticmonk)) + +- Remove a user from the user's list when creating a new channel removes the wrong user ([#10423](https://github.com/RocketChat/Rocket.Chat/pull/10423) by [@gdelavald](https://github.com/gdelavald) & [@karlprieb](https://github.com/karlprieb)) + +- Rename method to clean history of messages ([#10498](https://github.com/RocketChat/Rocket.Chat/pull/10498)) + +- Renaming agent's username within Livechat's department ([#10344](https://github.com/RocketChat/Rocket.Chat/pull/10344)) + +- REST API OAuth services endpoint were missing fields and flag to indicate custom services ([#10299](https://github.com/RocketChat/Rocket.Chat/pull/10299)) + +- REST spotlight API wasn't allowing searches with # and @ ([#10410](https://github.com/RocketChat/Rocket.Chat/pull/10410)) + +- Room's name was cutting instead of having ellipses on sidebar ([#10430](https://github.com/RocketChat/Rocket.Chat/pull/10430)) + +- Russian translation of "False" ([#10418](https://github.com/RocketChat/Rocket.Chat/pull/10418) by [@strangerintheq](https://github.com/strangerintheq)) + +- Snaps installations are breaking on avatar requests ([#10390](https://github.com/RocketChat/Rocket.Chat/pull/10390)) + +- Stop Firefox announcement overflowing viewport ([#10503](https://github.com/RocketChat/Rocket.Chat/pull/10503) by [@brendangadd](https://github.com/brendangadd)) + +- Switch buttons were cutting in RTL mode ([#10558](https://github.com/RocketChat/Rocket.Chat/pull/10558)) + +- The 'channel.messages' REST API Endpoint error ([#10485](https://github.com/RocketChat/Rocket.Chat/pull/10485) by [@rafaelks](https://github.com/rafaelks)) + +- Unique identifier file not really being unique ([#10341](https://github.com/RocketChat/Rocket.Chat/pull/10341) by [@abernix](https://github.com/abernix)) + +- Updated OpenShift Template to take an Image as a Param ([#9946](https://github.com/RocketChat/Rocket.Chat/pull/9946) by [@christianh814](https://github.com/christianh814)) + +- Wordpress oAuth authentication wasn't behaving correctly ([#10550](https://github.com/RocketChat/Rocket.Chat/pull/10550) by [@kaiiiiiiiii](https://github.com/kaiiiiiiiii)) + +- Wrong column positions in the directory search for users ([#10454](https://github.com/RocketChat/Rocket.Chat/pull/10454) by [@karlprieb](https://github.com/karlprieb) & [@lunaticmonk](https://github.com/lunaticmonk)) + +- Wrong positioning of popover when using RTL languages ([#10428](https://github.com/RocketChat/Rocket.Chat/pull/10428) by [@karlprieb](https://github.com/karlprieb)) + +
+🔍 Minor changes + + +- [OTHER] Develop sync ([#10487](https://github.com/RocketChat/Rocket.Chat/pull/10487)) + +- [OTHER] More Listeners for Apps & Utilize Promises inside Apps ([#10335](https://github.com/RocketChat/Rocket.Chat/pull/10335)) + +- [OTHER] Removed the developer warning on the rest api ([#10441](https://github.com/RocketChat/Rocket.Chat/pull/10441)) + +- Add some missing translations ([#10435](https://github.com/RocketChat/Rocket.Chat/pull/10435) by [@gdelavald](https://github.com/gdelavald)) + +- Change Docker-Compose to use mmapv1 storage engine for mongo ([#10336](https://github.com/RocketChat/Rocket.Chat/pull/10336)) + +- Deps update ([#10549](https://github.com/RocketChat/Rocket.Chat/pull/10549)) + +- Develop sync ([#10505](https://github.com/RocketChat/Rocket.Chat/pull/10505) by [@nsuchy](https://github.com/nsuchy) & [@rafaelks](https://github.com/rafaelks)) + +- Development: Add Visual Studio Code debugging configuration ([#10586](https://github.com/RocketChat/Rocket.Chat/pull/10586)) + +- Fix and improve vietnamese translation ([#10397](https://github.com/RocketChat/Rocket.Chat/pull/10397) by [@TDiNguyen](https://github.com/TDiNguyen) & [@tttt-conan](https://github.com/tttt-conan)) + +- Fix: Remove "secret" from REST endpoint /settings.oauth response ([#10513](https://github.com/RocketChat/Rocket.Chat/pull/10513)) + +- Included missing lib for migrations ([#10532](https://github.com/RocketChat/Rocket.Chat/pull/10532) by [@Hudell](https://github.com/Hudell)) + +- LingoHub based on develop ([#10545](https://github.com/RocketChat/Rocket.Chat/pull/10545)) + +- Master into Develop Branch Sync ([#10376](https://github.com/RocketChat/Rocket.Chat/pull/10376)) + +- New issue template for *Release Process* ([#10234](https://github.com/RocketChat/Rocket.Chat/pull/10234)) + +- Regression: /api/v1/settings.oauth not returning clientId for Twitter ([#10560](https://github.com/RocketChat/Rocket.Chat/pull/10560) by [@cardoso](https://github.com/cardoso)) + +- Regression: /api/v1/settings.oauth not sending needed info for SAML & CAS ([#10596](https://github.com/RocketChat/Rocket.Chat/pull/10596) by [@cardoso](https://github.com/cardoso)) + +- Regression: Apps and Livechats not getting along well with each other ([#10598](https://github.com/RocketChat/Rocket.Chat/pull/10598)) + +- Regression: Attachments and fields incorrectly failing on validation ([#10573](https://github.com/RocketChat/Rocket.Chat/pull/10573)) + +- Regression: Fix announcement bar being displayed without content ([#10554](https://github.com/RocketChat/Rocket.Chat/pull/10554) by [@gdelavald](https://github.com/gdelavald)) + +- Regression: Inconsistent response of settings.oauth endpoint ([#10553](https://github.com/RocketChat/Rocket.Chat/pull/10553)) + +- Regression: Remove added mentions on quote/reply ([#10571](https://github.com/RocketChat/Rocket.Chat/pull/10571) by [@gdelavald](https://github.com/gdelavald)) + +- Regression: Revert announcement structure ([#10544](https://github.com/RocketChat/Rocket.Chat/pull/10544) by [@gdelavald](https://github.com/gdelavald)) + +- Regression: Rocket.Chat App author link opens in same window ([#10575](https://github.com/RocketChat/Rocket.Chat/pull/10575) by [@kaiiiiiiiii](https://github.com/kaiiiiiiiii)) + +- Regression: Rooms and Apps weren't playing nice with each other ([#10559](https://github.com/RocketChat/Rocket.Chat/pull/10559)) + +- Regression: Upload was not working ([#10543](https://github.com/RocketChat/Rocket.Chat/pull/10543)) + +- Regression: Various search provider fixes ([#10591](https://github.com/RocketChat/Rocket.Chat/pull/10591) by [@tkurz](https://github.com/tkurz)) + +- Regression: Webhooks breaking due to restricted test ([#10555](https://github.com/RocketChat/Rocket.Chat/pull/10555)) + +- Release 0.64.0 ([#10613](https://github.com/RocketChat/Rocket.Chat/pull/10613) by [@TwizzyDizzy](https://github.com/TwizzyDizzy) & [@christianh814](https://github.com/christianh814) & [@gdelavald](https://github.com/gdelavald) & [@tttt-conan](https://github.com/tttt-conan)) + +- Remove @core team mention from Pull Request template ([#10384](https://github.com/RocketChat/Rocket.Chat/pull/10384)) + +- Update allowed labels for bot ([#10360](https://github.com/RocketChat/Rocket.Chat/pull/10360) by [@TwizzyDizzy](https://github.com/TwizzyDizzy)) + +- Use Node 8.9 for CI build ([#10405](https://github.com/RocketChat/Rocket.Chat/pull/10405)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) +- [@Prakharsvnit](https://github.com/Prakharsvnit) +- [@TDiNguyen](https://github.com/TDiNguyen) +- [@TwizzyDizzy](https://github.com/TwizzyDizzy) +- [@abernix](https://github.com/abernix) +- [@brendangadd](https://github.com/brendangadd) +- [@c0dzilla](https://github.com/c0dzilla) +- [@cardoso](https://github.com/cardoso) +- [@christianh814](https://github.com/christianh814) +- [@dschuan](https://github.com/dschuan) +- [@gdelavald](https://github.com/gdelavald) +- [@kaiiiiiiiii](https://github.com/kaiiiiiiiii) +- [@karlprieb](https://github.com/karlprieb) +- [@lunaticmonk](https://github.com/lunaticmonk) +- [@nemaniarjun](https://github.com/nemaniarjun) +- [@nsuchy](https://github.com/nsuchy) +- [@okaybroda](https://github.com/okaybroda) +- [@rafaelks](https://github.com/rafaelks) +- [@strangerintheq](https://github.com/strangerintheq) +- [@t3hchipmunk](https://github.com/t3hchipmunk) +- [@tkurz](https://github.com/tkurz) +- [@tttt-conan](https://github.com/tttt-conan) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.63.3 +`2018-04-18 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.1` +- NPM: `5.6.0` + +
+🔍 Minor changes + + +- Release 0.63.3 ([#10504](https://github.com/RocketChat/Rocket.Chat/pull/10504) by [@rafaelks](https://github.com/rafaelks)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@rafaelks](https://github.com/rafaelks) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@graywolf336](https://github.com/graywolf336) + +# 0.63.2 +`2018-04-17 · 2 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.1` +- NPM: `5.6.0` + +
+🔍 Minor changes + + +- add redhat dockerfile to master ([#10408](https://github.com/RocketChat/Rocket.Chat/pull/10408)) + +- Release 0.63.2 ([#10476](https://github.com/RocketChat/Rocket.Chat/pull/10476)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@graywolf336](https://github.com/graywolf336) + +# 0.63.1 +`2018-04-07 · 1 🔍 · 7 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.1` +- NPM: `5.6.0` + +
+🔍 Minor changes + + +- Release 0.63.1 ([#10374](https://github.com/RocketChat/Rocket.Chat/pull/10374) by [@TechyPeople](https://github.com/TechyPeople) & [@kaiiiiiiiii](https://github.com/kaiiiiiiiii) & [@tttt-conan](https://github.com/tttt-conan)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@TechyPeople](https://github.com/TechyPeople) +- [@kaiiiiiiiii](https://github.com/kaiiiiiiiii) +- [@tttt-conan](https://github.com/tttt-conan) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@graywolf336](https://github.com/graywolf336) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.63.0 +`2018-04-04 · 1 ️️️⚠️ · 18 🎉 · 36 🐛 · 20 🔍 · 25 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.1` +- NPM: `5.6.0` + +### ⚠️ BREAKING CHANGES + + +- Removed Private History Route ([#10103](https://github.com/RocketChat/Rocket.Chat/pull/10103) by [@Hudell](https://github.com/Hudell)) + +### 🎉 New features + + +- Add leave public channel & leave private channel permissions ([#9584](https://github.com/RocketChat/Rocket.Chat/pull/9584) by [@kb0304](https://github.com/kb0304)) + +- Add option to login via REST using Facebook and Twitter tokens ([#9816](https://github.com/RocketChat/Rocket.Chat/pull/9816)) + +- Add REST endpoint to get the list of custom emojis ([#9629](https://github.com/RocketChat/Rocket.Chat/pull/9629)) + +- Added endpoint to get the list of available oauth services ([#10144](https://github.com/RocketChat/Rocket.Chat/pull/10144)) + +- Added endpoint to retrieve mentions of a channel ([#10105](https://github.com/RocketChat/Rocket.Chat/pull/10105)) + +- Added GET/POST channels.notifications ([#10128](https://github.com/RocketChat/Rocket.Chat/pull/10128)) + +- Announcement bar color wasn't using color from theming variables ([#9367](https://github.com/RocketChat/Rocket.Chat/pull/9367) by [@cyclops24](https://github.com/cyclops24) & [@karlprieb](https://github.com/karlprieb)) + +- Audio recording as mp3 and better ui for recording ([#9726](https://github.com/RocketChat/Rocket.Chat/pull/9726) by [@kb0304](https://github.com/kb0304)) + +- Endpoint to retrieve message read receipts ([#9907](https://github.com/RocketChat/Rocket.Chat/pull/9907)) + +- GDPR Right to be forgotten/erased ([#9947](https://github.com/RocketChat/Rocket.Chat/pull/9947) by [@Hudell](https://github.com/Hudell)) + +- Improve history generation ([#10319](https://github.com/RocketChat/Rocket.Chat/pull/10319)) + +- Interface to install and manage RocketChat Apps (alpha) ([#10246](https://github.com/RocketChat/Rocket.Chat/pull/10246)) + +- Livechat messages rest APIs ([#10054](https://github.com/RocketChat/Rocket.Chat/pull/10054) by [@hmagarotto](https://github.com/hmagarotto)) + +- Livechat webhook request on message ([#9870](https://github.com/RocketChat/Rocket.Chat/pull/9870) by [@hmagarotto](https://github.com/hmagarotto)) + +- Reply preview ([#10086](https://github.com/RocketChat/Rocket.Chat/pull/10086) by [@ubarsaiyan](https://github.com/ubarsaiyan)) + +- REST API method to set room's announcement (channels.setAnnouncement) ([#9742](https://github.com/RocketChat/Rocket.Chat/pull/9742) by [@TopHattedCat](https://github.com/TopHattedCat)) + +- Setting to configure max delta for 2fa ([#9732](https://github.com/RocketChat/Rocket.Chat/pull/9732) by [@Hudell](https://github.com/Hudell)) + +- Support for agent's phone field ([#10123](https://github.com/RocketChat/Rocket.Chat/pull/10123)) + +### 🐛 Bug fixes + + +- "View All Members" button inside channel's "User Info" is over sized ([#10012](https://github.com/RocketChat/Rocket.Chat/pull/10012) by [@karlprieb](https://github.com/karlprieb)) + +- /me REST endpoint was missing user roles and preferences ([#10240](https://github.com/RocketChat/Rocket.Chat/pull/10240)) + +- Able to react with invalid emoji ([#8667](https://github.com/RocketChat/Rocket.Chat/pull/8667) by [@mutdmour](https://github.com/mutdmour)) + +- Apostrophe-containing URL misparsed ([#9739](https://github.com/RocketChat/Rocket.Chat/pull/9739) by [@lunaticmonk](https://github.com/lunaticmonk)) + +- Apostrophe-containing URL misparsed" ([#10242](https://github.com/RocketChat/Rocket.Chat/pull/10242)) + +- Audio Message UI fixes ([#10303](https://github.com/RocketChat/Rocket.Chat/pull/10303) by [@kb0304](https://github.com/kb0304)) + +- Avatar input was accepting not supported image types ([#10011](https://github.com/RocketChat/Rocket.Chat/pull/10011) by [@karlprieb](https://github.com/karlprieb)) + +- Broken video call accept dialog ([#9872](https://github.com/RocketChat/Rocket.Chat/pull/9872) by [@ramrami](https://github.com/ramrami)) + +- Browser was auto-filling values when editing another user profile ([#9932](https://github.com/RocketChat/Rocket.Chat/pull/9932) by [@kaiiiiiiiii](https://github.com/kaiiiiiiiii)) + +- Cannot answer to a livechat as a manager if agent has not answered yet ([#10082](https://github.com/RocketChat/Rocket.Chat/pull/10082) by [@kb0304](https://github.com/kb0304)) + +- Download links was duplicating Sub Paths ([#10029](https://github.com/RocketChat/Rocket.Chat/pull/10029)) + +- Dynamic CSS script isn't working on older browsers ([#10152](https://github.com/RocketChat/Rocket.Chat/pull/10152) by [@karlprieb](https://github.com/karlprieb)) + +- Extended view mode on sidebar ([#10160](https://github.com/RocketChat/Rocket.Chat/pull/10160) by [@karlprieb](https://github.com/karlprieb)) + +- File had redirect delay when using external storage services and no option to proxy only avatars ([#10272](https://github.com/RocketChat/Rocket.Chat/pull/10272)) + +- Incoming Webhooks were missing the raw content ([#10258](https://github.com/RocketChat/Rocket.Chat/pull/10258) by [@Hudell](https://github.com/Hudell)) + +- Initial loading feedback was missing ([#10028](https://github.com/RocketChat/Rocket.Chat/pull/10028) by [@karlprieb](https://github.com/karlprieb)) + +- Inline code following a url leads to autolinking of code with url ([#10163](https://github.com/RocketChat/Rocket.Chat/pull/10163) by [@c0dzilla](https://github.com/c0dzilla)) + +- Message editing is crashing the server when read receipts are enabled ([#10061](https://github.com/RocketChat/Rocket.Chat/pull/10061)) + +- Missing pt-BR translations ([#10262](https://github.com/RocketChat/Rocket.Chat/pull/10262)) + +- Missing sidebar default options on admin ([#10016](https://github.com/RocketChat/Rocket.Chat/pull/10016) by [@karlprieb](https://github.com/karlprieb)) + +- Missing Translation Key on Reactions ([#10270](https://github.com/RocketChat/Rocket.Chat/pull/10270) by [@bernardoetrevisan](https://github.com/bernardoetrevisan)) + +- Name of files in file upload list cuts down at bottom due to overflow ([#9672](https://github.com/RocketChat/Rocket.Chat/pull/9672) by [@lunaticmonk](https://github.com/lunaticmonk)) + +- Nextcloud as custom oauth provider wasn't mapping data correctly ([#10090](https://github.com/RocketChat/Rocket.Chat/pull/10090) by [@pierreozoux](https://github.com/pierreozoux)) + +- No pattern for user's status text capitalization ([#9783](https://github.com/RocketChat/Rocket.Chat/pull/9783) by [@lunaticmonk](https://github.com/lunaticmonk)) + +- Popover divs don't scroll if they overflow the viewport ([#9860](https://github.com/RocketChat/Rocket.Chat/pull/9860) by [@Joe-mcgee](https://github.com/Joe-mcgee)) + +- Reactions not working on mobile ([#10104](https://github.com/RocketChat/Rocket.Chat/pull/10104)) + +- REST API: Can't list all public channels when user has permission `view-joined-room` ([#10009](https://github.com/RocketChat/Rocket.Chat/pull/10009)) + +- Slack Import reports `invalid import file type` due to a call to BSON.native() which is now doesn't exist ([#10071](https://github.com/RocketChat/Rocket.Chat/pull/10071) by [@trongthanh](https://github.com/trongthanh)) + +- Unable to mention after newline in message ([#10078](https://github.com/RocketChat/Rocket.Chat/pull/10078) by [@c0dzilla](https://github.com/c0dzilla)) + +- Update preferences of users with settings: null was crashing the server ([#10076](https://github.com/RocketChat/Rocket.Chat/pull/10076)) + +- User preferences can't be saved when roles are hidden in admin settings ([#10051](https://github.com/RocketChat/Rocket.Chat/pull/10051) by [@Hudell](https://github.com/Hudell)) + +- User status missing on user info ([#9866](https://github.com/RocketChat/Rocket.Chat/pull/9866) by [@lunaticmonk](https://github.com/lunaticmonk)) + +- user status on sidenav ([#10222](https://github.com/RocketChat/Rocket.Chat/pull/10222)) + +- Verified property of user is always set to false if not supplied ([#9719](https://github.com/RocketChat/Rocket.Chat/pull/9719)) + +- Wrong pagination information on /api/v1/channels.members ([#10224](https://github.com/RocketChat/Rocket.Chat/pull/10224)) + +- Wrong switch button border color ([#10081](https://github.com/RocketChat/Rocket.Chat/pull/10081) by [@kb0304](https://github.com/kb0304)) + +
+🔍 Minor changes + + +- [OTHER] Reactivate all tests ([#10036](https://github.com/RocketChat/Rocket.Chat/pull/10036)) + +- [OTHER] Reactivate API tests ([#9844](https://github.com/RocketChat/Rocket.Chat/pull/9844) by [@karlprieb](https://github.com/karlprieb)) + +- Add a few listener supports for the Rocket.Chat Apps ([#10154](https://github.com/RocketChat/Rocket.Chat/pull/10154)) + +- Add forums as a place to suggest, discuss and upvote features ([#10148](https://github.com/RocketChat/Rocket.Chat/pull/10148) by [@SeanPackham](https://github.com/SeanPackham)) + +- Bump snap version to include security fix ([#10313](https://github.com/RocketChat/Rocket.Chat/pull/10313)) + +- Fix caddy download link to pull from github ([#10260](https://github.com/RocketChat/Rocket.Chat/pull/10260)) + +- Fix snap install. Remove execstack from sharp, and bypass grpc error ([#10015](https://github.com/RocketChat/Rocket.Chat/pull/10015)) + +- Fix tests breaking randomly ([#10065](https://github.com/RocketChat/Rocket.Chat/pull/10065)) + +- Fix typo for Nextcloud login ([#10159](https://github.com/RocketChat/Rocket.Chat/pull/10159) by [@pierreozoux](https://github.com/pierreozoux)) + +- Fix: chat.react api not accepting previous emojis ([#10290](https://github.com/RocketChat/Rocket.Chat/pull/10290)) + +- Fix: inputs for rocketchat apps ([#10274](https://github.com/RocketChat/Rocket.Chat/pull/10274)) + +- Fix: possible errors on rocket.chat side of the apps ([#10252](https://github.com/RocketChat/Rocket.Chat/pull/10252)) + +- Fix: Reaction endpoint/api only working with regular emojis ([#10323](https://github.com/RocketChat/Rocket.Chat/pull/10323)) + +- Fix: Renaming channels.notifications Get/Post endpoints ([#10257](https://github.com/RocketChat/Rocket.Chat/pull/10257)) + +- Fix: Scroll on content page ([#10300](https://github.com/RocketChat/Rocket.Chat/pull/10300)) + +- LingoHub based on develop ([#10243](https://github.com/RocketChat/Rocket.Chat/pull/10243)) + +- Release 0.63.0 ([#10324](https://github.com/RocketChat/Rocket.Chat/pull/10324) by [@Hudell](https://github.com/Hudell) & [@Joe-mcgee](https://github.com/Joe-mcgee) & [@TopHattedCat](https://github.com/TopHattedCat) & [@hmagarotto](https://github.com/hmagarotto) & [@kaiiiiiiiii](https://github.com/kaiiiiiiiii) & [@karlprieb](https://github.com/karlprieb) & [@kb0304](https://github.com/kb0304) & [@lunaticmonk](https://github.com/lunaticmonk) & [@ramrami](https://github.com/ramrami)) + +- Rename migration name on 108 to match file name ([#10237](https://github.com/RocketChat/Rocket.Chat/pull/10237)) + +- Start 0.63.0-develop / develop sync from master ([#9985](https://github.com/RocketChat/Rocket.Chat/pull/9985)) + +- Update Meteor to 1.6.1.1 ([#10314](https://github.com/RocketChat/Rocket.Chat/pull/10314)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Hudell](https://github.com/Hudell) +- [@Joe-mcgee](https://github.com/Joe-mcgee) +- [@SeanPackham](https://github.com/SeanPackham) +- [@TopHattedCat](https://github.com/TopHattedCat) +- [@bernardoetrevisan](https://github.com/bernardoetrevisan) +- [@c0dzilla](https://github.com/c0dzilla) +- [@cyclops24](https://github.com/cyclops24) +- [@hmagarotto](https://github.com/hmagarotto) +- [@kaiiiiiiiii](https://github.com/kaiiiiiiiii) +- [@karlprieb](https://github.com/karlprieb) +- [@kb0304](https://github.com/kb0304) +- [@lunaticmonk](https://github.com/lunaticmonk) +- [@mutdmour](https://github.com/mutdmour) +- [@pierreozoux](https://github.com/pierreozoux) +- [@ramrami](https://github.com/ramrami) +- [@trongthanh](https://github.com/trongthanh) +- [@ubarsaiyan](https://github.com/ubarsaiyan) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.62.2 +`2018-03-09 · 6 🐛 · 1 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.9.4` +- NPM: `5.6.0` + +### 🐛 Bug fixes + + +- Download links was duplicating Sub Paths ([#10029](https://github.com/RocketChat/Rocket.Chat/pull/10029)) + +- Message editing is crashing the server when read receipts are enabled ([#10061](https://github.com/RocketChat/Rocket.Chat/pull/10061)) + +- REST API: Can't list all public channels when user has permission `view-joined-room` ([#10009](https://github.com/RocketChat/Rocket.Chat/pull/10009)) + +- Slack Import reports `invalid import file type` due to a call to BSON.native() which is now doesn't exist ([#10071](https://github.com/RocketChat/Rocket.Chat/pull/10071) by [@trongthanh](https://github.com/trongthanh)) + +- Update preferences of users with settings: null was crashing the server ([#10076](https://github.com/RocketChat/Rocket.Chat/pull/10076)) + +- Verified property of user is always set to false if not supplied ([#9719](https://github.com/RocketChat/Rocket.Chat/pull/9719)) + +
+🔍 Minor changes + + +- Release 0.62.2 ([#10087](https://github.com/RocketChat/Rocket.Chat/pull/10087)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@trongthanh](https://github.com/trongthanh) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.62.1 +`2018-03-03 · 4 🐛 · 1 🔍 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.9.4` +- NPM: `5.6.0` + +### 🐛 Bug fixes + + +- Delete user without username was removing direct rooms of all users ([#9986](https://github.com/RocketChat/Rocket.Chat/pull/9986)) + +- Empty sidenav when sorting by activity and there is a subscription without room ([#9960](https://github.com/RocketChat/Rocket.Chat/pull/9960)) + +- New channel page on medium size screens ([#9988](https://github.com/RocketChat/Rocket.Chat/pull/9988) by [@karlprieb](https://github.com/karlprieb)) + +- Two factor authentication modal was not showing ([#9982](https://github.com/RocketChat/Rocket.Chat/pull/9982)) + +
+🔍 Minor changes + + +- Release 0.62.1 ([#9989](https://github.com/RocketChat/Rocket.Chat/pull/9989)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@karlprieb](https://github.com/karlprieb) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.62.0 +`2018-02-27 · 1 ️️️⚠️ · 24 🎉 · 32 🐛 · 26 🔍 · 39 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.9.4` +- NPM: `5.6.0` + +### ⚠️ BREAKING CHANGES + + +- Remove Graphics/Image Magick support ([#9711](https://github.com/RocketChat/Rocket.Chat/pull/9711)) + +### 🎉 New features + + +- Add documentation requirement to PRs ([#9658](https://github.com/RocketChat/Rocket.Chat/pull/9658) by [@SeanPackham](https://github.com/SeanPackham)) + +- Add route to get user shield/badge ([#9549](https://github.com/RocketChat/Rocket.Chat/pull/9549) by [@kb0304](https://github.com/kb0304)) + +- Add user settings / preferences API endpoint ([#9457](https://github.com/RocketChat/Rocket.Chat/pull/9457) by [@jgtoriginal](https://github.com/jgtoriginal)) + +- Alert admins when user requires approval & alert users when the account is approved/activated/deactivated ([#7098](https://github.com/RocketChat/Rocket.Chat/pull/7098) by [@luisfn](https://github.com/luisfn)) + +- Allow configuration of SAML logout behavior ([#9527](https://github.com/RocketChat/Rocket.Chat/pull/9527) by [@mrsimpson](https://github.com/mrsimpson)) + +- Allow request avatar placeholders as PNG or JPG instead of SVG ([#8193](https://github.com/RocketChat/Rocket.Chat/pull/8193) by [@lindoelio](https://github.com/lindoelio)) + +- Allow sounds when conversation is focused ([#9312](https://github.com/RocketChat/Rocket.Chat/pull/9312) by [@RationalCoding](https://github.com/RationalCoding)) + +- API to fetch permissions & user roles ([#9519](https://github.com/RocketChat/Rocket.Chat/pull/9519) by [@rafaelks](https://github.com/rafaelks)) + +- Browse more channels / Directory ([#9642](https://github.com/RocketChat/Rocket.Chat/pull/9642) by [@karlprieb](https://github.com/karlprieb)) + +- General alert banner ([#9778](https://github.com/RocketChat/Rocket.Chat/pull/9778)) + +- Global message search (beta: disabled by default) ([#9687](https://github.com/RocketChat/Rocket.Chat/pull/9687) by [@cyberhck](https://github.com/cyberhck) & [@savikko](https://github.com/savikko)) + +- GraphQL API ([#8158](https://github.com/RocketChat/Rocket.Chat/pull/8158) by [@kamilkisiela](https://github.com/kamilkisiela)) + +- Image preview as 32x32 base64 jpeg ([#9218](https://github.com/RocketChat/Rocket.Chat/pull/9218) by [@jorgeluisrezende](https://github.com/jorgeluisrezende)) + +- Improved default welcome message ([#9298](https://github.com/RocketChat/Rocket.Chat/pull/9298) by [@HammyHavoc](https://github.com/HammyHavoc)) + +- Internal hubot support for Direct Messages and Private Groups ([#8933](https://github.com/RocketChat/Rocket.Chat/pull/8933) by [@ramrami](https://github.com/ramrami)) + +- Livestream tab ([#9255](https://github.com/RocketChat/Rocket.Chat/pull/9255) by [@gdelavald](https://github.com/gdelavald)) + +- Makes shield icon configurable ([#9746](https://github.com/RocketChat/Rocket.Chat/pull/9746) by [@c0dzilla](https://github.com/c0dzilla)) + +- Message read receipts ([#9717](https://github.com/RocketChat/Rocket.Chat/pull/9717)) + +- New REST API to mark channel as read ([#9507](https://github.com/RocketChat/Rocket.Chat/pull/9507) by [@rafaelks](https://github.com/rafaelks)) + +- New sidebar layout ([#9608](https://github.com/RocketChat/Rocket.Chat/pull/9608) by [@karlprieb](https://github.com/karlprieb)) + +- Option to proxy files and avatars through the server ([#9699](https://github.com/RocketChat/Rocket.Chat/pull/9699)) + +- Request mongoDB version in github issue template ([#9807](https://github.com/RocketChat/Rocket.Chat/pull/9807) by [@TwizzyDizzy](https://github.com/TwizzyDizzy)) + +- REST API to use Spotlight ([#9509](https://github.com/RocketChat/Rocket.Chat/pull/9509) by [@rafaelks](https://github.com/rafaelks)) + +- Version update check ([#9793](https://github.com/RocketChat/Rocket.Chat/pull/9793)) + +### 🐛 Bug fixes + + +- 'Query' support for channels.list.joined, groups.list, groups.listAll, im.list ([#9424](https://github.com/RocketChat/Rocket.Chat/pull/9424) by [@xbolshe](https://github.com/xbolshe)) + +- API to retrive rooms was returning empty objects ([#9737](https://github.com/RocketChat/Rocket.Chat/pull/9737)) + +- Chat Message Reactions REST API End Point ([#9487](https://github.com/RocketChat/Rocket.Chat/pull/9487) by [@jgtoriginal](https://github.com/jgtoriginal)) + +- Chrome 64 breaks jitsi-meet iframe ([#9560](https://github.com/RocketChat/Rocket.Chat/pull/9560) by [@speedy01](https://github.com/speedy01)) + +- Close button on file upload bar was not working ([#9662](https://github.com/RocketChat/Rocket.Chat/pull/9662) by [@karlprieb](https://github.com/karlprieb)) + +- Close Livechat conversation by visitor not working in version 0.61.0 ([#9714](https://github.com/RocketChat/Rocket.Chat/pull/9714)) + +- Custom emoji was cropping sometimes ([#9676](https://github.com/RocketChat/Rocket.Chat/pull/9676) by [@anu-007](https://github.com/anu-007)) + +- DeprecationWarning: prom-client ... when starting Rocket Chat server ([#9747](https://github.com/RocketChat/Rocket.Chat/pull/9747) by [@jgtoriginal](https://github.com/jgtoriginal)) + +- Desktop notification not showing when avatar came from external storage service ([#9639](https://github.com/RocketChat/Rocket.Chat/pull/9639)) + +- Emoji rendering on last message ([#9776](https://github.com/RocketChat/Rocket.Chat/pull/9776)) + +- Facebook integration in livechat not working on version 0.61.0 ([#9640](https://github.com/RocketChat/Rocket.Chat/pull/9640)) + +- Formal pronouns and some small mistakes in German texts ([#9067](https://github.com/RocketChat/Rocket.Chat/pull/9067) by [@AmShaegar13](https://github.com/AmShaegar13)) + +- GitLab OAuth does not work when GitLab’s URL ends with slash ([#9716](https://github.com/RocketChat/Rocket.Chat/pull/9716)) + +- Harmonize channel-related actions ([#9697](https://github.com/RocketChat/Rocket.Chat/pull/9697) by [@mrsimpson](https://github.com/mrsimpson)) + +- Importers no longer working due to the FileUpload changes ([#9850](https://github.com/RocketChat/Rocket.Chat/pull/9850)) + +- Livechat conversation not receiving messages when start without form ([#9772](https://github.com/RocketChat/Rocket.Chat/pull/9772)) + +- Livechat is not working when running in a sub path ([#9599](https://github.com/RocketChat/Rocket.Chat/pull/9599)) + +- Livechat issues on external queue and lead capture ([#9750](https://github.com/RocketChat/Rocket.Chat/pull/9750)) + +- Messages can't be quoted sometimes ([#9720](https://github.com/RocketChat/Rocket.Chat/pull/9720)) + +- Misplaced "Save Changes" button in user account panel ([#9888](https://github.com/RocketChat/Rocket.Chat/pull/9888) by [@kaiiiiiiiii](https://github.com/kaiiiiiiiii)) + +- Missing link Site URLs in enrollment e-mails ([#9454](https://github.com/RocketChat/Rocket.Chat/pull/9454) by [@kemitchell](https://github.com/kemitchell)) + +- Missing string 'Username_already_exist' on the accountProfile page ([#9610](https://github.com/RocketChat/Rocket.Chat/pull/9610) by [@lunaticmonk](https://github.com/lunaticmonk)) + +- Not receiving sound notifications in rooms created by new LiveChats ([#9802](https://github.com/RocketChat/Rocket.Chat/pull/9802)) + +- Parsing messages with multiple markdown matches ignore some tokens ([#9884](https://github.com/RocketChat/Rocket.Chat/pull/9884) by [@c0dzilla](https://github.com/c0dzilla)) + +- Rest API helpers only applying to v1 ([#9520](https://github.com/RocketChat/Rocket.Chat/pull/9520)) + +- Show custom room types icon in channel header ([#9696](https://github.com/RocketChat/Rocket.Chat/pull/9696) by [@mrsimpson](https://github.com/mrsimpson)) + +- Silence the update check error message ([#9858](https://github.com/RocketChat/Rocket.Chat/pull/9858)) + +- Snap build was failing ([#9879](https://github.com/RocketChat/Rocket.Chat/pull/9879)) + +- SVG avatars are not been displayed correctly when load in non HTML containers ([#9570](https://github.com/RocketChat/Rocket.Chat/pull/9570) by [@filipedelimabrito](https://github.com/filipedelimabrito)) + +- Typo on french translation for "Open" ([#9934](https://github.com/RocketChat/Rocket.Chat/pull/9934) by [@sizrar](https://github.com/sizrar)) + +- Weird rendering of emojis at sidebar when `last message` is activated ([#9623](https://github.com/RocketChat/Rocket.Chat/pull/9623)) + +- Wrong behavior of rooms info's *Read Only* and *Collaborative* buttons ([#9665](https://github.com/RocketChat/Rocket.Chat/pull/9665) by [@karlprieb](https://github.com/karlprieb)) + +
+🔍 Minor changes + + +- [Fix] Not Translated Phrases ([#9877](https://github.com/RocketChat/Rocket.Chat/pull/9877) by [@bernardoetrevisan](https://github.com/bernardoetrevisan)) + +- [OTHER] Fix Apps not working on multi-instance deployments ([#9902](https://github.com/RocketChat/Rocket.Chat/pull/9902)) + +- [OTHER] Rocket.Chat Apps ([#9666](https://github.com/RocketChat/Rocket.Chat/pull/9666)) + +- Dependencies update ([#9811](https://github.com/RocketChat/Rocket.Chat/pull/9811)) + +- Develop fix sync from master ([#9797](https://github.com/RocketChat/Rocket.Chat/pull/9797)) + +- Fix RHCC image path for OpenShift and default to the current namespace. ([#9901](https://github.com/RocketChat/Rocket.Chat/pull/9901) by [@jsm84](https://github.com/jsm84)) + +- Fix: Custom fields not showing on user info panel ([#9821](https://github.com/RocketChat/Rocket.Chat/pull/9821)) + +- Improve link handling for attachments ([#9908](https://github.com/RocketChat/Rocket.Chat/pull/9908)) + +- Move NRR package to inside the project and convert from CoffeeScript ([#9753](https://github.com/RocketChat/Rocket.Chat/pull/9753)) + +- Regression: Avatar now open account related options ([#9843](https://github.com/RocketChat/Rocket.Chat/pull/9843) by [@karlprieb](https://github.com/karlprieb)) + +- Regression: Change create channel icon ([#9851](https://github.com/RocketChat/Rocket.Chat/pull/9851) by [@karlprieb](https://github.com/karlprieb)) + +- Regression: Directory now list default channel ([#9931](https://github.com/RocketChat/Rocket.Chat/pull/9931) by [@karlprieb](https://github.com/karlprieb)) + +- Regression: Fix admin/user settings item text ([#9845](https://github.com/RocketChat/Rocket.Chat/pull/9845) by [@karlprieb](https://github.com/karlprieb)) + +- Regression: Fix channel icons on safari ([#9852](https://github.com/RocketChat/Rocket.Chat/pull/9852) by [@karlprieb](https://github.com/karlprieb)) + +- Regression: Fix livechat queue link ([#9928](https://github.com/RocketChat/Rocket.Chat/pull/9928) by [@karlprieb](https://github.com/karlprieb)) + +- Regression: Improve sidebar filter ([#9905](https://github.com/RocketChat/Rocket.Chat/pull/9905) by [@karlprieb](https://github.com/karlprieb)) + +- Regression: Misplaced language dropdown in user preferences panel ([#9883](https://github.com/RocketChat/Rocket.Chat/pull/9883) by [@kaiiiiiiiii](https://github.com/kaiiiiiiiii)) + +- Regression: Open search using ctrl/cmd + p and ctrl/cmd + k ([#9837](https://github.com/RocketChat/Rocket.Chat/pull/9837) by [@karlprieb](https://github.com/karlprieb)) + +- Regression: Overlapping header in user profile panel ([#9889](https://github.com/RocketChat/Rocket.Chat/pull/9889) by [@kaiiiiiiiii](https://github.com/kaiiiiiiiii)) + +- Regression: Page was not respecting the window height on Firefox ([#9804](https://github.com/RocketChat/Rocket.Chat/pull/9804)) + +- Regression: Search bar is now full width ([#9839](https://github.com/RocketChat/Rocket.Chat/pull/9839) by [@karlprieb](https://github.com/karlprieb)) + +- Regression: sort on room's list not working correctly ([#9897](https://github.com/RocketChat/Rocket.Chat/pull/9897)) + +- Release 0.62.0 ([#9935](https://github.com/RocketChat/Rocket.Chat/pull/9935)) + +- Sync from Master ([#9796](https://github.com/RocketChat/Rocket.Chat/pull/9796) by [@HammyHavoc](https://github.com/HammyHavoc)) + +- Update bot-config.yml ([#9784](https://github.com/RocketChat/Rocket.Chat/pull/9784) by [@JSzaszvari](https://github.com/JSzaszvari)) + +- Update to meteor 1.6.1 ([#9546](https://github.com/RocketChat/Rocket.Chat/pull/9546)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@AmShaegar13](https://github.com/AmShaegar13) +- [@HammyHavoc](https://github.com/HammyHavoc) +- [@JSzaszvari](https://github.com/JSzaszvari) +- [@RationalCoding](https://github.com/RationalCoding) +- [@SeanPackham](https://github.com/SeanPackham) +- [@TwizzyDizzy](https://github.com/TwizzyDizzy) +- [@anu-007](https://github.com/anu-007) +- [@bernardoetrevisan](https://github.com/bernardoetrevisan) +- [@c0dzilla](https://github.com/c0dzilla) +- [@cyberhck](https://github.com/cyberhck) +- [@filipedelimabrito](https://github.com/filipedelimabrito) +- [@gdelavald](https://github.com/gdelavald) +- [@jgtoriginal](https://github.com/jgtoriginal) +- [@jorgeluisrezende](https://github.com/jorgeluisrezende) +- [@jsm84](https://github.com/jsm84) +- [@kaiiiiiiiii](https://github.com/kaiiiiiiiii) +- [@kamilkisiela](https://github.com/kamilkisiela) +- [@karlprieb](https://github.com/karlprieb) +- [@kb0304](https://github.com/kb0304) +- [@kemitchell](https://github.com/kemitchell) +- [@lindoelio](https://github.com/lindoelio) +- [@luisfn](https://github.com/luisfn) +- [@lunaticmonk](https://github.com/lunaticmonk) +- [@mrsimpson](https://github.com/mrsimpson) +- [@rafaelks](https://github.com/rafaelks) +- [@ramrami](https://github.com/ramrami) +- [@savikko](https://github.com/savikko) +- [@sizrar](https://github.com/sizrar) +- [@speedy01](https://github.com/speedy01) +- [@xbolshe](https://github.com/xbolshe) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@renatobecker](https://github.com/renatobecker) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.61.2 +`2018-02-20 · 3 🐛 · 1 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.9.3` +- NPM: `5.5.1` + +### 🐛 Bug fixes + + +- Emoji rendering on last message ([#9776](https://github.com/RocketChat/Rocket.Chat/pull/9776)) + +- Livechat conversation not receiving messages when start without form ([#9772](https://github.com/RocketChat/Rocket.Chat/pull/9772)) + +- Livechat issues on external queue and lead capture ([#9750](https://github.com/RocketChat/Rocket.Chat/pull/9750)) + +
+🔍 Minor changes + + +- Release 0.61.2 ([#9786](https://github.com/RocketChat/Rocket.Chat/pull/9786)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@ggazzo](https://github.com/ggazzo) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.61.1 +`2018-02-14 · 1 🔍 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.9.3` +- NPM: `5.5.1` + +
+🔍 Minor changes + + +- Release 0.61.1 ([#9721](https://github.com/RocketChat/Rocket.Chat/pull/9721)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@rodrigok](https://github.com/rodrigok) + +# 0.61.0 +`2018-01-27 · 1 ️️️⚠️ · 12 🎉 · 44 🐛 · 39 🔍 · 23 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.9.3` +- NPM: `5.5.1` + +### ⚠️ BREAKING CHANGES + + +- Decouple livechat visitors from regular users ([#9048](https://github.com/RocketChat/Rocket.Chat/pull/9048)) + +### 🎉 New features + + +- add /home link to sidenav footer logo ([#9366](https://github.com/RocketChat/Rocket.Chat/pull/9366) by [@cyclops24](https://github.com/cyclops24)) + +- Add impersonate option for livechat triggers ([#9107](https://github.com/RocketChat/Rocket.Chat/pull/9107)) + +- Add mention-here permission #7631 ([#9228](https://github.com/RocketChat/Rocket.Chat/pull/9228) by [@ryjones](https://github.com/ryjones)) + +- Add support to external livechat queue service provider ([#9053](https://github.com/RocketChat/Rocket.Chat/pull/9053)) + +- Contextual bar mail messages ([#9510](https://github.com/RocketChat/Rocket.Chat/pull/9510) by [@karlprieb](https://github.com/karlprieb)) + +- Contextual Bar Redesign ([#8411](https://github.com/RocketChat/Rocket.Chat/pull/8411) by [@karlprieb](https://github.com/karlprieb)) + +- Indicate the Self DM room ([#9234](https://github.com/RocketChat/Rocket.Chat/pull/9234)) + +- Livechat extract lead data from message ([#9135](https://github.com/RocketChat/Rocket.Chat/pull/9135)) + +- Make Custom oauth accept nested usernameField ([#9066](https://github.com/RocketChat/Rocket.Chat/pull/9066) by [@pierreozoux](https://github.com/pierreozoux)) + +- new layout for emojipicker ([#9245](https://github.com/RocketChat/Rocket.Chat/pull/9245) by [@karlprieb](https://github.com/karlprieb)) + +- Sidebar menu option to mark room as unread ([#9216](https://github.com/RocketChat/Rocket.Chat/pull/9216) by [@karlprieb](https://github.com/karlprieb)) + +- Update documentation: provide example for multiple basedn ([#9442](https://github.com/RocketChat/Rocket.Chat/pull/9442) by [@rndmh3ro](https://github.com/rndmh3ro)) + +### 🐛 Bug fixes + + +- "Enter usernames" placeholder is cutting in "create channel" view ([#9194](https://github.com/RocketChat/Rocket.Chat/pull/9194) by [@TheReal1604](https://github.com/TheReal1604)) + +- "Use Emoji" preference not working ([#9182](https://github.com/RocketChat/Rocket.Chat/pull/9182) by [@karlprieb](https://github.com/karlprieb)) + +- **i18n:** add room type translation support for room-changed-privacy message ([#9369](https://github.com/RocketChat/Rocket.Chat/pull/9369) by [@cyclops24](https://github.com/cyclops24)) + +- announcement hyperlink color ([#9330](https://github.com/RocketChat/Rocket.Chat/pull/9330) by [@karlprieb](https://github.com/karlprieb)) + +- channel create scroll on small screens ([#9168](https://github.com/RocketChat/Rocket.Chat/pull/9168) by [@karlprieb](https://github.com/karlprieb)) + +- Channel page error ([#9091](https://github.com/RocketChat/Rocket.Chat/pull/9091) by [@ggrish](https://github.com/ggrish)) + +- Contextual bar redesign ([#9481](https://github.com/RocketChat/Rocket.Chat/pull/9481) by [@gdelavald](https://github.com/gdelavald) & [@karlprieb](https://github.com/karlprieb)) + +- Cursor position when reply on safari ([#9185](https://github.com/RocketChat/Rocket.Chat/pull/9185) by [@karlprieb](https://github.com/karlprieb)) + +- custom emoji size on sidebar item ([#9314](https://github.com/RocketChat/Rocket.Chat/pull/9314) by [@karlprieb](https://github.com/karlprieb)) + +- Deleting message with store last message not removing ([#9335](https://github.com/RocketChat/Rocket.Chat/pull/9335)) + +- Do not block room while loading history ([#9121](https://github.com/RocketChat/Rocket.Chat/pull/9121)) + +- Emoji size on last message preview ([#9186](https://github.com/RocketChat/Rocket.Chat/pull/9186) by [@karlprieb](https://github.com/karlprieb)) + +- English Typos ([#9285](https://github.com/RocketChat/Rocket.Chat/pull/9285) by [@HammyHavoc](https://github.com/HammyHavoc)) + +- Error when user roles is missing or is invalid ([#9040](https://github.com/RocketChat/Rocket.Chat/pull/9040) by [@paulovitin](https://github.com/paulovitin)) + +- File access not working when passing credentials via querystring ([#9264](https://github.com/RocketChat/Rocket.Chat/pull/9264)) + +- File upload not working on IE and weird on Chrome ([#9206](https://github.com/RocketChat/Rocket.Chat/pull/9206) by [@karlprieb](https://github.com/karlprieb)) + +- Fix closing livechat inquiry ([#9164](https://github.com/RocketChat/Rocket.Chat/pull/9164)) + +- Fix livechat build ([#9451](https://github.com/RocketChat/Rocket.Chat/pull/9451)) + +- Fix livechat register form ([#9452](https://github.com/RocketChat/Rocket.Chat/pull/9452)) + +- Fix livechat visitor edit ([#9506](https://github.com/RocketChat/Rocket.Chat/pull/9506)) + +- go to replied message ([#9172](https://github.com/RocketChat/Rocket.Chat/pull/9172) by [@karlprieb](https://github.com/karlprieb)) + +- Highlight setting not working correctly ([#9364](https://github.com/RocketChat/Rocket.Chat/pull/9364) by [@cyclops24](https://github.com/cyclops24)) + +- Importers not recovering when an error occurs ([#9134](https://github.com/RocketChat/Rocket.Chat/pull/9134)) + +- large names on userinfo, and admin user bug on users with no usernames ([#9493](https://github.com/RocketChat/Rocket.Chat/pull/9493) by [@gdelavald](https://github.com/gdelavald)) + +- last message cutting on bottom ([#9345](https://github.com/RocketChat/Rocket.Chat/pull/9345) by [@karlprieb](https://github.com/karlprieb)) + +- Last sent message reoccurs in textbox ([#9169](https://github.com/RocketChat/Rocket.Chat/pull/9169)) + +- LDAP/AD is not importing all users ([#9309](https://github.com/RocketChat/Rocket.Chat/pull/9309)) + +- Made welcome emails more readable ([#9193](https://github.com/RocketChat/Rocket.Chat/pull/9193) by [@HammyHavoc](https://github.com/HammyHavoc)) + +- Make mentions and menu icons color darker ([#8922](https://github.com/RocketChat/Rocket.Chat/pull/8922) by [@karlprieb](https://github.com/karlprieb)) + +- make the cross icon on user selection at channel creation page work ([#9176](https://github.com/RocketChat/Rocket.Chat/pull/9176) by [@karlprieb](https://github.com/karlprieb) & [@vitor-nagao](https://github.com/vitor-nagao)) + +- mention-here is missing i18n text #9455 ([#9456](https://github.com/RocketChat/Rocket.Chat/pull/9456) by [@ryjones](https://github.com/ryjones)) + +- modal data on enter and modal style for file preview ([#9171](https://github.com/RocketChat/Rocket.Chat/pull/9171) by [@karlprieb](https://github.com/karlprieb)) + +- Move emojipicker css to theme package ([#9243](https://github.com/RocketChat/Rocket.Chat/pull/9243) by [@karlprieb](https://github.com/karlprieb)) + +- popover on safari for iOS ([#9328](https://github.com/RocketChat/Rocket.Chat/pull/9328) by [@karlprieb](https://github.com/karlprieb)) + +- Show modal with announcement ([#9241](https://github.com/RocketChat/Rocket.Chat/pull/9241) by [@karlprieb](https://github.com/karlprieb)) + +- show oauth logins when adblock is used ([#9170](https://github.com/RocketChat/Rocket.Chat/pull/9170) by [@karlprieb](https://github.com/karlprieb)) + +- sidebar footer padding ([#9249](https://github.com/RocketChat/Rocket.Chat/pull/9249) by [@karlprieb](https://github.com/karlprieb)) + +- Slash command 'archive' throws exception if the channel does not exist ([#9428](https://github.com/RocketChat/Rocket.Chat/pull/9428) by [@ramrami](https://github.com/ramrami)) + +- Slash command 'unarchive' throws exception if the channel does not exist ([#9435](https://github.com/RocketChat/Rocket.Chat/pull/9435) by [@ramrami](https://github.com/ramrami)) + +- Subscriptions not removed when removing user ([#9432](https://github.com/RocketChat/Rocket.Chat/pull/9432)) + +- svg render on firefox ([#9311](https://github.com/RocketChat/Rocket.Chat/pull/9311) by [@karlprieb](https://github.com/karlprieb)) + +- Unread bar position when room have announcement ([#9188](https://github.com/RocketChat/Rocket.Chat/pull/9188) by [@karlprieb](https://github.com/karlprieb)) + +- Update Rocket.Chat for sandstorm ([#9062](https://github.com/RocketChat/Rocket.Chat/pull/9062) by [@peterlee0127](https://github.com/peterlee0127)) + +- Wrong position of notifications alert in accounts preference page ([#9289](https://github.com/RocketChat/Rocket.Chat/pull/9289) by [@HammyHavoc](https://github.com/HammyHavoc)) + +
+🔍 Minor changes + + +- [DOCS] Update the links of our Mobile Apps in Features topic ([#9469](https://github.com/RocketChat/Rocket.Chat/pull/9469) by [@rafaelks](https://github.com/rafaelks)) + +- [Fix] oauth not working because of email array ([#9173](https://github.com/RocketChat/Rocket.Chat/pull/9173)) + +- Add community bot ([#9439](https://github.com/RocketChat/Rocket.Chat/pull/9439)) + +- Add curl, its missing on worker nodes so has to be explicitly added ([#9248](https://github.com/RocketChat/Rocket.Chat/pull/9248)) + +- Dependencies Update ([#9197](https://github.com/RocketChat/Rocket.Chat/pull/9197)) + +- Develop sync - Bump version to 0.61.0-develop ([#9260](https://github.com/RocketChat/Rocket.Chat/pull/9260) by [@cpitman](https://github.com/cpitman) & [@karlprieb](https://github.com/karlprieb)) + +- Do not change room icon color when room is unread ([#9257](https://github.com/RocketChat/Rocket.Chat/pull/9257)) + +- Fix test without oplog by waiting a successful login on changing users ([#9146](https://github.com/RocketChat/Rocket.Chat/pull/9146)) + +- Fix: Can’t login using LDAP via REST ([#9162](https://github.com/RocketChat/Rocket.Chat/pull/9162)) + +- Fix: Change 'Wordpress' to 'WordPress ([#9291](https://github.com/RocketChat/Rocket.Chat/pull/9291) by [@HammyHavoc](https://github.com/HammyHavoc)) + +- Fix: Clear all unreads modal not closing after confirming ([#9137](https://github.com/RocketChat/Rocket.Chat/pull/9137)) + +- Fix: Click on channel name - hover area bigger than link area ([#9165](https://github.com/RocketChat/Rocket.Chat/pull/9165)) + +- Fix: Confirmation modals showing `Send` button ([#9136](https://github.com/RocketChat/Rocket.Chat/pull/9136)) + +- Fix: English language improvements ([#9299](https://github.com/RocketChat/Rocket.Chat/pull/9299) by [@HammyHavoc](https://github.com/HammyHavoc)) + +- Fix: Improved README.md ([#9290](https://github.com/RocketChat/Rocket.Chat/pull/9290) by [@HammyHavoc](https://github.com/HammyHavoc)) + +- Fix: Message action quick buttons drops if "new message" divider is being shown ([#9138](https://github.com/RocketChat/Rocket.Chat/pull/9138)) + +- Fix: Messages being displayed in reverse order ([#9144](https://github.com/RocketChat/Rocket.Chat/pull/9144)) + +- Fix: Missing option to set user's avatar from a url ([#9229](https://github.com/RocketChat/Rocket.Chat/pull/9229)) + +- Fix: Multiple unread indicators ([#9120](https://github.com/RocketChat/Rocket.Chat/pull/9120)) + +- Fix: README typo ([#9286](https://github.com/RocketChat/Rocket.Chat/pull/9286) by [@HammyHavoc](https://github.com/HammyHavoc)) + +- Fix: Rooms and users are using different avatar style ([#9196](https://github.com/RocketChat/Rocket.Chat/pull/9196)) + +- Fix: Sidebar item on rtl and small devices ([#9247](https://github.com/RocketChat/Rocket.Chat/pull/9247) by [@karlprieb](https://github.com/karlprieb)) + +- Fix: Snippet name to not showing in snippet list ([#9184](https://github.com/RocketChat/Rocket.Chat/pull/9184) by [@karlprieb](https://github.com/karlprieb)) + +- Fix: UI: Descenders of glyphs are cut off ([#9181](https://github.com/RocketChat/Rocket.Chat/pull/9181)) + +- Fix: UI: Descenders of glyphs are cut off ([#9166](https://github.com/RocketChat/Rocket.Chat/pull/9166)) + +- Fix: Unneeded warning in payload of REST API calls ([#9240](https://github.com/RocketChat/Rocket.Chat/pull/9240)) + +- Fix: Unread line ([#9149](https://github.com/RocketChat/Rocket.Chat/pull/9149)) + +- Fix: updating last message on message edit or delete ([#9227](https://github.com/RocketChat/Rocket.Chat/pull/9227)) + +- Fix: Upload access control too distributed ([#9215](https://github.com/RocketChat/Rocket.Chat/pull/9215)) + +- Fix: Username find is matching partially ([#9217](https://github.com/RocketChat/Rocket.Chat/pull/9217)) + +- Fix/api me only return verified ([#9183](https://github.com/RocketChat/Rocket.Chat/pull/9183)) + +- LingoHub based on develop ([#9256](https://github.com/RocketChat/Rocket.Chat/pull/9256)) + +- Prevent NPM package-lock inside livechat ([#9504](https://github.com/RocketChat/Rocket.Chat/pull/9504)) + +- Release 0.61.0 ([#9533](https://github.com/RocketChat/Rocket.Chat/pull/9533) by [@karlprieb](https://github.com/karlprieb) & [@ryjones](https://github.com/ryjones)) + +- Replace postcss-nesting with postcss-nested ([#9200](https://github.com/RocketChat/Rocket.Chat/pull/9200)) + +- Typo: German language file ([#9190](https://github.com/RocketChat/Rocket.Chat/pull/9190) by [@TheReal1604](https://github.com/TheReal1604)) + +- Update license ([#9490](https://github.com/RocketChat/Rocket.Chat/pull/9490)) + +- Update Marked dependecy to 0.3.9 ([#9346](https://github.com/RocketChat/Rocket.Chat/pull/9346)) + +- Use correct version of Mailparser module ([#9356](https://github.com/RocketChat/Rocket.Chat/pull/9356)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@HammyHavoc](https://github.com/HammyHavoc) +- [@TheReal1604](https://github.com/TheReal1604) +- [@cpitman](https://github.com/cpitman) +- [@cyclops24](https://github.com/cyclops24) +- [@gdelavald](https://github.com/gdelavald) +- [@ggrish](https://github.com/ggrish) +- [@karlprieb](https://github.com/karlprieb) +- [@paulovitin](https://github.com/paulovitin) +- [@peterlee0127](https://github.com/peterlee0127) +- [@pierreozoux](https://github.com/pierreozoux) +- [@rafaelks](https://github.com/rafaelks) +- [@ramrami](https://github.com/ramrami) +- [@rndmh3ro](https://github.com/rndmh3ro) +- [@ryjones](https://github.com/ryjones) +- [@vitor-nagao](https://github.com/vitor-nagao) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@engelgabriel](https://github.com/engelgabriel) +- [@frdmn](https://github.com/frdmn) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.60.4 +`2018-01-10 · 5 🐛 · 2 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.9.3` +- NPM: `5.5.1` + +### 🐛 Bug fixes + + +- announcement hyperlink color ([#9330](https://github.com/RocketChat/Rocket.Chat/pull/9330) by [@karlprieb](https://github.com/karlprieb)) + +- Deleting message with store last message not removing ([#9335](https://github.com/RocketChat/Rocket.Chat/pull/9335)) + +- last message cutting on bottom ([#9345](https://github.com/RocketChat/Rocket.Chat/pull/9345) by [@karlprieb](https://github.com/karlprieb)) + +- LDAP TLS not working in some cases ([#9343](https://github.com/RocketChat/Rocket.Chat/pull/9343)) + +- popover on safari for iOS ([#9328](https://github.com/RocketChat/Rocket.Chat/pull/9328) by [@karlprieb](https://github.com/karlprieb)) + +
+🔍 Minor changes + + +- Release 0.60.4 ([#9377](https://github.com/RocketChat/Rocket.Chat/pull/9377)) + +- Update Marked dependecy to 0.3.9 ([#9346](https://github.com/RocketChat/Rocket.Chat/pull/9346)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@karlprieb](https://github.com/karlprieb) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.60.3 +`2018-01-03 · 6 🐛 · 5 🔍 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.9.3` +- NPM: `5.5.1` + +### 🐛 Bug fixes + + +- custom emoji size on sidebar item ([#9314](https://github.com/RocketChat/Rocket.Chat/pull/9314) by [@karlprieb](https://github.com/karlprieb)) + +- English Typos ([#9285](https://github.com/RocketChat/Rocket.Chat/pull/9285) by [@HammyHavoc](https://github.com/HammyHavoc)) + +- LDAP/AD is not importing all users ([#9309](https://github.com/RocketChat/Rocket.Chat/pull/9309)) + +- sidebar footer padding ([#9249](https://github.com/RocketChat/Rocket.Chat/pull/9249) by [@karlprieb](https://github.com/karlprieb)) + +- svg render on firefox ([#9311](https://github.com/RocketChat/Rocket.Chat/pull/9311) by [@karlprieb](https://github.com/karlprieb)) + +- Wrong position of notifications alert in accounts preference page ([#9289](https://github.com/RocketChat/Rocket.Chat/pull/9289) by [@HammyHavoc](https://github.com/HammyHavoc)) + +
+🔍 Minor changes + + +- Fix: Change 'Wordpress' to 'WordPress ([#9291](https://github.com/RocketChat/Rocket.Chat/pull/9291) by [@HammyHavoc](https://github.com/HammyHavoc)) + +- Fix: English language improvements ([#9299](https://github.com/RocketChat/Rocket.Chat/pull/9299) by [@HammyHavoc](https://github.com/HammyHavoc)) + +- Fix: Improved README.md ([#9290](https://github.com/RocketChat/Rocket.Chat/pull/9290) by [@HammyHavoc](https://github.com/HammyHavoc)) + +- Fix: README typo ([#9286](https://github.com/RocketChat/Rocket.Chat/pull/9286) by [@HammyHavoc](https://github.com/HammyHavoc)) + +- Release 0.60.3 ([#9320](https://github.com/RocketChat/Rocket.Chat/pull/9320) by [@HammyHavoc](https://github.com/HammyHavoc)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@HammyHavoc](https://github.com/HammyHavoc) +- [@karlprieb](https://github.com/karlprieb) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@rodrigok](https://github.com/rodrigok) + +# 0.60.2 +`2017-12-29 · 3 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.9.3` +- NPM: `5.5.1` + +### 🐛 Bug fixes + + +- Missing translations ([#9272](https://github.com/RocketChat/Rocket.Chat/pull/9272)) + +- Remove sweetalert from livechat facebook integration page ([#9274](https://github.com/RocketChat/Rocket.Chat/pull/9274)) + +- Restore translations from other languages ([#9277](https://github.com/RocketChat/Rocket.Chat/pull/9277)) + +
+🔍 Minor changes + + +- Release 0.60.2 ([#9280](https://github.com/RocketChat/Rocket.Chat/pull/9280)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.60.1 +`2017-12-27 · 1 🐛 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.9.3` +- NPM: `5.5.1` + +### 🐛 Bug fixes + + +- File access not working when passing credentials via querystring ([#9262](https://github.com/RocketChat/Rocket.Chat/pull/9262)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@rodrigok](https://github.com/rodrigok) + +# 0.60.0 +`2017-12-27 · 33 🎉 · 171 🐛 · 99 🔍 · 71 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.9.3` +- NPM: `5.5.1` + +### 🎉 New features + + +- Add "Favorites" and "Mark as read" options to the room list ([#8915](https://github.com/RocketChat/Rocket.Chat/pull/8915) by [@karlprieb](https://github.com/karlprieb)) + +- Add "real name change" setting ([#8739](https://github.com/RocketChat/Rocket.Chat/pull/8739) by [@AmShaegar13](https://github.com/AmShaegar13)) + +- Add new API endpoints ([#8947](https://github.com/RocketChat/Rocket.Chat/pull/8947)) + +- Add RD Station integration to livechat ([#8304](https://github.com/RocketChat/Rocket.Chat/pull/8304)) + +- Add settings for allow user direct messages to yourself ([#8066](https://github.com/RocketChat/Rocket.Chat/pull/8066) by [@lindoelio](https://github.com/lindoelio)) + +- Add sweet alert to video call tab ([#8108](https://github.com/RocketChat/Rocket.Chat/pull/8108)) + +- Add yunohost.org installation method to Readme.md ([#8037](https://github.com/RocketChat/Rocket.Chat/pull/8037) by [@selamanse](https://github.com/selamanse)) + +- Added support for Dataporten's userid-feide scope ([#8902](https://github.com/RocketChat/Rocket.Chat/pull/8902) by [@torgeirl](https://github.com/torgeirl)) + +- Adds admin option to globally set mobile devices to always be notified regardless of presence status. ([#7641](https://github.com/RocketChat/Rocket.Chat/pull/7641) by [@stalley](https://github.com/stalley)) + +- Allow user's default preferences configuration ([#7285](https://github.com/RocketChat/Rocket.Chat/pull/7285) by [@goiaba](https://github.com/goiaba)) + +- code to get the updated messages ([#8857](https://github.com/RocketChat/Rocket.Chat/pull/8857)) + +- Describe file uploads when notifying by email ([#8924](https://github.com/RocketChat/Rocket.Chat/pull/8924)) + +- Displays QR code for manually entering when enabling 2fa ([#8143](https://github.com/RocketChat/Rocket.Chat/pull/8143)) + +- Facebook livechat integration ([#8807](https://github.com/RocketChat/Rocket.Chat/pull/8807)) + +- Feature/livechat hide email ([#8149](https://github.com/RocketChat/Rocket.Chat/pull/8149) by [@icosamuel](https://github.com/icosamuel) & [@sarbasamuel](https://github.com/sarbasamuel)) + +- Improve room types API and usages ([#9009](https://github.com/RocketChat/Rocket.Chat/pull/9009) by [@mrsimpson](https://github.com/mrsimpson)) + +- Make Custom oauth accept nested usernameField ([#9066](https://github.com/RocketChat/Rocket.Chat/pull/9066) by [@pierreozoux](https://github.com/pierreozoux)) + +- make sidebar item width 100% ([#8362](https://github.com/RocketChat/Rocket.Chat/pull/8362) by [@karlprieb](https://github.com/karlprieb)) + +- Modal ([#9092](https://github.com/RocketChat/Rocket.Chat/pull/9092) by [@karlprieb](https://github.com/karlprieb)) + +- New Modal component ([#8882](https://github.com/RocketChat/Rocket.Chat/pull/8882) by [@karlprieb](https://github.com/karlprieb)) + +- Option to enable/disable auto away and configure timer ([#8029](https://github.com/RocketChat/Rocket.Chat/pull/8029) by [@armand1m](https://github.com/armand1m)) + +- Rest API endpoints to list, get, and run commands ([#8531](https://github.com/RocketChat/Rocket.Chat/pull/8531)) + +- Room counter sidebar preference ([#8866](https://github.com/RocketChat/Rocket.Chat/pull/8866) by [@karlprieb](https://github.com/karlprieb)) + +- Save room's last message ([#8979](https://github.com/RocketChat/Rocket.Chat/pull/8979) by [@karlprieb](https://github.com/karlprieb)) + +- Send category and title fields to iOS push notification ([#8905](https://github.com/RocketChat/Rocket.Chat/pull/8905)) + +- Sender's name in email notifications. ([#7999](https://github.com/RocketChat/Rocket.Chat/pull/7999) by [@pkgodara](https://github.com/pkgodara)) + +- Setting to disable MarkDown and enable AutoLinker ([#8459](https://github.com/RocketChat/Rocket.Chat/pull/8459)) + +- Smaller accountBox ([#8360](https://github.com/RocketChat/Rocket.Chat/pull/8360) by [@karlprieb](https://github.com/karlprieb)) + +- Token Controlled Access channels ([#8060](https://github.com/RocketChat/Rocket.Chat/pull/8060) by [@karlprieb](https://github.com/karlprieb) & [@lindoelio](https://github.com/lindoelio)) + +- Unify unread and mentions badge ([#8361](https://github.com/RocketChat/Rocket.Chat/pull/8361) by [@karlprieb](https://github.com/karlprieb)) + +- Upgrade Meteor to 1.6 ([#8715](https://github.com/RocketChat/Rocket.Chat/pull/8715) by [@karlprieb](https://github.com/karlprieb)) + +- Upgrade to meteor 1.5.2 ([#8073](https://github.com/RocketChat/Rocket.Chat/pull/8073)) + +- Use enter separator rather than comma in highlight preferences + Auto refresh after change highlighted words ([#8433](https://github.com/RocketChat/Rocket.Chat/pull/8433) by [@cyclops24](https://github.com/cyclops24)) + +### 🐛 Bug fixes + + +- "*.members" rest api being useless and only returning usernames ([#8147](https://github.com/RocketChat/Rocket.Chat/pull/8147)) + +- "Cancel button" on modal in RTL in Firefox 55 ([#8278](https://github.com/RocketChat/Rocket.Chat/pull/8278) by [@cyclops24](https://github.com/cyclops24)) + +- "Enter usernames" placeholder is cutting in "create channel" view ([#9194](https://github.com/RocketChat/Rocket.Chat/pull/9194) by [@TheReal1604](https://github.com/TheReal1604)) + +- "Use Emoji" preference not working ([#9182](https://github.com/RocketChat/Rocket.Chat/pull/9182) by [@karlprieb](https://github.com/karlprieb)) + +- **i18n:** My Profile & README.md links ([#8270](https://github.com/RocketChat/Rocket.Chat/pull/8270) by [@Rzeszow](https://github.com/Rzeszow)) + +- **PL:** Polish translation ([#7989](https://github.com/RocketChat/Rocket.Chat/pull/7989) by [@Rzeszow](https://github.com/Rzeszow)) + +- Add admin audio preferences translations ([#8094](https://github.com/RocketChat/Rocket.Chat/pull/8094)) + +- Add historic chats icon in Livechat ([#8708](https://github.com/RocketChat/Rocket.Chat/pull/8708) by [@mrsimpson](https://github.com/mrsimpson)) + +- Add needed dependency for snaps ([#8389](https://github.com/RocketChat/Rocket.Chat/pull/8389)) + +- Add padding on messages to allow space to the action buttons ([#7971](https://github.com/RocketChat/Rocket.Chat/pull/7971)) + +- Added afterUserCreated trigger after first CAS login ([#9022](https://github.com/RocketChat/Rocket.Chat/pull/9022) by [@AmShaegar13](https://github.com/AmShaegar13)) + +- Adds default search text padding for emoji search ([#7878](https://github.com/RocketChat/Rocket.Chat/pull/7878) by [@gdelavald](https://github.com/gdelavald)) + +- After deleting the room, cache is not synchronizing ([#8314](https://github.com/RocketChat/Rocket.Chat/pull/8314) by [@szluohua](https://github.com/szluohua)) + +- AmazonS3: Quote file.name for ContentDisposition for files with commas ([#8593](https://github.com/RocketChat/Rocket.Chat/pull/8593) by [@xenithorb](https://github.com/xenithorb)) + +- Amin menu not showing all items & File list breaking line ([#8299](https://github.com/RocketChat/Rocket.Chat/pull/8299) by [@karlprieb](https://github.com/karlprieb)) + +- API channel/group.members not sorting ([#8635](https://github.com/RocketChat/Rocket.Chat/pull/8635)) + +- Attachment icons alignment in LTR and RTL ([#8271](https://github.com/RocketChat/Rocket.Chat/pull/8271) by [@cyclops24](https://github.com/cyclops24)) + +- Audio message icon ([#8648](https://github.com/RocketChat/Rocket.Chat/pull/8648) by [@karlprieb](https://github.com/karlprieb)) + +- Autoupdate of CSS does not work when using a prefix ([#8107](https://github.com/RocketChat/Rocket.Chat/pull/8107) by [@Darkneon](https://github.com/Darkneon)) + +- Broken embedded view layout ([#7944](https://github.com/RocketChat/Rocket.Chat/pull/7944) by [@karlprieb](https://github.com/karlprieb)) + +- Broken emoji picker on firefox ([#7943](https://github.com/RocketChat/Rocket.Chat/pull/7943) by [@karlprieb](https://github.com/karlprieb)) + +- Call buttons with wrong margin on RTL ([#8307](https://github.com/RocketChat/Rocket.Chat/pull/8307) by [@karlprieb](https://github.com/karlprieb)) + +- Can't react on Read Only rooms even when enabled ([#8925](https://github.com/RocketChat/Rocket.Chat/pull/8925) by [@karlprieb](https://github.com/karlprieb)) + +- Can't use OAuth login against a Rocket.Chat OAuth server ([#9044](https://github.com/RocketChat/Rocket.Chat/pull/9044)) + +- Cannot edit or delete custom sounds ([#8889](https://github.com/RocketChat/Rocket.Chat/pull/8889) by [@ccfang](https://github.com/ccfang)) + +- CAS does not share secrets when operating multiple server instances ([#8654](https://github.com/RocketChat/Rocket.Chat/pull/8654) by [@AmShaegar13](https://github.com/AmShaegar13)) + +- Change old 'rocketbot' username to 'InternalHubot_Username' setting ([#8928](https://github.com/RocketChat/Rocket.Chat/pull/8928) by [@ramrami](https://github.com/ramrami)) + +- Change the unread messages style ([#8883](https://github.com/RocketChat/Rocket.Chat/pull/8883) by [@karlprieb](https://github.com/karlprieb)) + +- Changed all rocket.chat/docs/ to docs.rocket.chat/ ([#8588](https://github.com/RocketChat/Rocket.Chat/pull/8588) by [@RekkyRek](https://github.com/RekkyRek)) + +- Changed oembedUrlWidget to prefer og:image and twitter:image over msapplication-TileImage ([#9012](https://github.com/RocketChat/Rocket.Chat/pull/9012) by [@wferris722](https://github.com/wferris722)) + +- channel create scroll on small screens ([#9168](https://github.com/RocketChat/Rocket.Chat/pull/9168) by [@karlprieb](https://github.com/karlprieb)) + +- Channel page error ([#9091](https://github.com/RocketChat/Rocket.Chat/pull/9091) by [@ggrish](https://github.com/ggrish)) + +- Chat box no longer auto-focuses when typing ([#7984](https://github.com/RocketChat/Rocket.Chat/pull/7984)) + +- Check attachments is defined before accessing first element ([#8295](https://github.com/RocketChat/Rocket.Chat/pull/8295) by [@Darkneon](https://github.com/Darkneon)) + +- Check for mention-all permission in room scope ([#8931](https://github.com/RocketChat/Rocket.Chat/pull/8931)) + +- Color reset when default value editor is different ([#8543](https://github.com/RocketChat/Rocket.Chat/pull/8543)) + +- Contextual errors for this and RegExp declarations in IRC module ([#8656](https://github.com/RocketChat/Rocket.Chat/pull/8656) by [@Pharserror](https://github.com/Pharserror)) + +- copy to clipboard and update clipboard.js library ([#8039](https://github.com/RocketChat/Rocket.Chat/pull/8039) by [@karlprieb](https://github.com/karlprieb)) + +- Creating channels on Firefox ([#9109](https://github.com/RocketChat/Rocket.Chat/pull/9109) by [@karlprieb](https://github.com/karlprieb)) + +- Cursor position when reply on safari ([#9185](https://github.com/RocketChat/Rocket.Chat/pull/9185) by [@karlprieb](https://github.com/karlprieb)) + +- Custom OAuth: Not able to set different token place for routes ([#9034](https://github.com/RocketChat/Rocket.Chat/pull/9034)) + +- disabled katex tooltip on messageBox ([#8386](https://github.com/RocketChat/Rocket.Chat/pull/8386)) + +- DM email notifications always being sent regardless of account setting ([#8917](https://github.com/RocketChat/Rocket.Chat/pull/8917) by [@ashward](https://github.com/ashward)) + +- Do not block room while loading history ([#9121](https://github.com/RocketChat/Rocket.Chat/pull/9121)) + +- Do not send joinCode field to clients ([#8527](https://github.com/RocketChat/Rocket.Chat/pull/8527)) + +- Document README.md. Drupal repo out of date ([#7948](https://github.com/RocketChat/Rocket.Chat/pull/7948) by [@Lawri-van-Buel](https://github.com/Lawri-van-Buel)) + +- Don't strip trailing slash on autolinker urls ([#8812](https://github.com/RocketChat/Rocket.Chat/pull/8812) by [@jwilkins](https://github.com/jwilkins)) + +- Double scroll on 'keyboard shortcuts' menu in sidepanel ([#7927](https://github.com/RocketChat/Rocket.Chat/pull/7927) by [@aditya19496](https://github.com/aditya19496)) + +- Duplicate code in rest api letting in a few bugs with the rest api ([#8408](https://github.com/RocketChat/Rocket.Chat/pull/8408)) + +- Dynamic popover ([#8101](https://github.com/RocketChat/Rocket.Chat/pull/8101) by [@karlprieb](https://github.com/karlprieb)) + +- Email Subjects not being sent ([#8317](https://github.com/RocketChat/Rocket.Chat/pull/8317)) + +- Email verification indicator added ([#7923](https://github.com/RocketChat/Rocket.Chat/pull/7923) by [@aditya19496](https://github.com/aditya19496)) + +- Emoji Picker hidden for reactions in RTL ([#8300](https://github.com/RocketChat/Rocket.Chat/pull/8300) by [@karlprieb](https://github.com/karlprieb)) + +- Emoji size on last message preview ([#9186](https://github.com/RocketChat/Rocket.Chat/pull/9186) by [@karlprieb](https://github.com/karlprieb)) + +- Enable CORS for Restivus ([#8671](https://github.com/RocketChat/Rocket.Chat/pull/8671) by [@mrsimpson](https://github.com/mrsimpson)) + +- encode filename in url to prevent links breaking ([#8551](https://github.com/RocketChat/Rocket.Chat/pull/8551) by [@joesitton](https://github.com/joesitton)) + +- Error when saving integration with symbol as only trigger ([#9023](https://github.com/RocketChat/Rocket.Chat/pull/9023)) + +- Error when user roles is missing or is invalid ([#9040](https://github.com/RocketChat/Rocket.Chat/pull/9040) by [@paulovitin](https://github.com/paulovitin)) + +- Execute meteor reset on TRAVIS_TAG builds ([#8310](https://github.com/RocketChat/Rocket.Chat/pull/8310)) + +- File upload not working on IE and weird on Chrome ([#9206](https://github.com/RocketChat/Rocket.Chat/pull/9206) by [@karlprieb](https://github.com/karlprieb)) + +- fix color on unread messages ([#8282](https://github.com/RocketChat/Rocket.Chat/pull/8282)) + +- Fix e-mail message forward ([#8645](https://github.com/RocketChat/Rocket.Chat/pull/8645)) + +- Fix email on mention ([#7754](https://github.com/RocketChat/Rocket.Chat/pull/7754)) + +- fix emoji package path so they show up correctly in browser ([#8822](https://github.com/RocketChat/Rocket.Chat/pull/8822) by [@ryoshimizu](https://github.com/ryoshimizu)) + +- Fix google play logo on repo README ([#7912](https://github.com/RocketChat/Rocket.Chat/pull/7912) by [@luizbills](https://github.com/luizbills)) + +- Fix guest pool inquiry taking ([#8577](https://github.com/RocketChat/Rocket.Chat/pull/8577)) + +- Fix iframe login API response (issue #8145) ([#8146](https://github.com/RocketChat/Rocket.Chat/pull/8146) by [@astax-t](https://github.com/astax-t)) + +- Fix livechat toggle UI issue ([#7904](https://github.com/RocketChat/Rocket.Chat/pull/7904)) + +- Fix placeholders in account profile ([#7945](https://github.com/RocketChat/Rocket.Chat/pull/7945) by [@josiasds](https://github.com/josiasds)) + +- Fix setting user avatar on LDAP login ([#8099](https://github.com/RocketChat/Rocket.Chat/pull/8099)) + +- Fix the status on the members list ([#7963](https://github.com/RocketChat/Rocket.Chat/pull/7963)) + +- Fix typos ([#8679](https://github.com/RocketChat/Rocket.Chat/pull/8679)) + +- fixed some typos ([#8787](https://github.com/RocketChat/Rocket.Chat/pull/8787) by [@TheReal1604](https://github.com/TheReal1604)) + +- flextab height on smaller screens ([#8994](https://github.com/RocketChat/Rocket.Chat/pull/8994) by [@karlprieb](https://github.com/karlprieb)) + +- go to replied message ([#9172](https://github.com/RocketChat/Rocket.Chat/pull/9172) by [@karlprieb](https://github.com/karlprieb)) + +- Highlighted color height issue ([#8431](https://github.com/RocketChat/Rocket.Chat/pull/8431) by [@cyclops24](https://github.com/cyclops24)) + +- hyperlink style on sidebar footer ([#7882](https://github.com/RocketChat/Rocket.Chat/pull/7882) by [@karlprieb](https://github.com/karlprieb)) + +- i18n'd Resend_verification_mail, username_initials, upload avatar ([#8721](https://github.com/RocketChat/Rocket.Chat/pull/8721) by [@arungalva](https://github.com/arungalva)) + +- if ogImage exists use it over image in oembedUrlWidget ([#9000](https://github.com/RocketChat/Rocket.Chat/pull/9000) by [@satyapramodh](https://github.com/satyapramodh)) + +- Importers failing when usernames exists but cases don't match and improve the importer framework's performance ([#8966](https://github.com/RocketChat/Rocket.Chat/pull/8966)) + +- Importers not recovering when an error occurs ([#9134](https://github.com/RocketChat/Rocket.Chat/pull/9134)) + +- Improved grammar and made it clearer to the user ([#8795](https://github.com/RocketChat/Rocket.Chat/pull/8795) by [@HammyHavoc](https://github.com/HammyHavoc)) + +- Improving consistency of UX ([#8796](https://github.com/RocketChat/Rocket.Chat/pull/8796) by [@HammyHavoc](https://github.com/HammyHavoc)) + +- Incorrect URL for login terms when using prefix ([#8211](https://github.com/RocketChat/Rocket.Chat/pull/8211) by [@Darkneon](https://github.com/Darkneon)) + +- Invalid Code message for password protected channel ([#8491](https://github.com/RocketChat/Rocket.Chat/pull/8491)) + +- Invisible leader bar on hover ([#8048](https://github.com/RocketChat/Rocket.Chat/pull/8048)) + +- Issue #8166 where empty analytics setting breaks to load Piwik script ([#8167](https://github.com/RocketChat/Rocket.Chat/pull/8167) by [@ruKurz](https://github.com/ruKurz)) + +- Katex markdown link changed ([#8948](https://github.com/RocketChat/Rocket.Chat/pull/8948) by [@mritunjaygoutam12](https://github.com/mritunjaygoutam12)) + +- Last sent message reoccurs in textbox ([#9169](https://github.com/RocketChat/Rocket.Chat/pull/9169)) + +- LDAP login error regression at 0.59.0 ([#8541](https://github.com/RocketChat/Rocket.Chat/pull/8541)) + +- LDAP memory issues when pagination is not available ([#8457](https://github.com/RocketChat/Rocket.Chat/pull/8457)) + +- LDAP not merging existent users && Wrong id link generation ([#8613](https://github.com/RocketChat/Rocket.Chat/pull/8613)) + +- LDAP not respecting UTF8 characters & Sync Interval not working ([#8691](https://github.com/RocketChat/Rocket.Chat/pull/8691)) + +- Link for channels are not rendering correctly ([#8985](https://github.com/RocketChat/Rocket.Chat/pull/8985) by [@karlprieb](https://github.com/karlprieb)) + +- livechat icon ([#7886](https://github.com/RocketChat/Rocket.Chat/pull/7886) by [@karlprieb](https://github.com/karlprieb)) + +- long filename overlaps cancel button in progress bar ([#8868](https://github.com/RocketChat/Rocket.Chat/pull/8868) by [@joesitton](https://github.com/joesitton)) + +- Long room announcement cut off ([#8907](https://github.com/RocketChat/Rocket.Chat/pull/8907) by [@karlprieb](https://github.com/karlprieb)) + +- Made welcome emails more readable ([#9193](https://github.com/RocketChat/Rocket.Chat/pull/9193) by [@HammyHavoc](https://github.com/HammyHavoc)) + +- Make mentions and menu icons color darker ([#8922](https://github.com/RocketChat/Rocket.Chat/pull/8922) by [@karlprieb](https://github.com/karlprieb)) + +- make the cross icon on user selection at channel creation page work ([#9176](https://github.com/RocketChat/Rocket.Chat/pull/9176) by [@karlprieb](https://github.com/karlprieb) & [@vitor-nagao](https://github.com/vitor-nagao)) + +- Makes text action menu width based on content size ([#7887](https://github.com/RocketChat/Rocket.Chat/pull/7887) by [@gdelavald](https://github.com/gdelavald)) + +- Markdown being rendered in code tags ([#7965](https://github.com/RocketChat/Rocket.Chat/pull/7965)) + +- Mention unread indicator was removed ([#8316](https://github.com/RocketChat/Rocket.Chat/pull/8316)) + +- message actions over unread bar ([#7885](https://github.com/RocketChat/Rocket.Chat/pull/7885) by [@karlprieb](https://github.com/karlprieb)) + +- Message popup menu on mobile/cordova ([#8634](https://github.com/RocketChat/Rocket.Chat/pull/8634) by [@karlprieb](https://github.com/karlprieb)) + +- message-box autogrow ([#8019](https://github.com/RocketChat/Rocket.Chat/pull/8019) by [@karlprieb](https://github.com/karlprieb)) + +- Message-box autogrow flick ([#8932](https://github.com/RocketChat/Rocket.Chat/pull/8932) by [@karlprieb](https://github.com/karlprieb)) + +- Migration 103 wrong converting primrary colors ([#8544](https://github.com/RocketChat/Rocket.Chat/pull/8544)) + +- Missing i18n translations ([#8357](https://github.com/RocketChat/Rocket.Chat/pull/8357)) + +- Missing placeholder translations ([#8286](https://github.com/RocketChat/Rocket.Chat/pull/8286)) + +- Missing scroll at create channel page ([#8637](https://github.com/RocketChat/Rocket.Chat/pull/8637) by [@karlprieb](https://github.com/karlprieb)) + +- Missing sidebar footer padding ([#8884](https://github.com/RocketChat/Rocket.Chat/pull/8884) by [@karlprieb](https://github.com/karlprieb)) + +- modal data on enter and modal style for file preview ([#9171](https://github.com/RocketChat/Rocket.Chat/pull/9171) by [@karlprieb](https://github.com/karlprieb)) + +- Move emojipicker css to theme package ([#9243](https://github.com/RocketChat/Rocket.Chat/pull/9243) by [@karlprieb](https://github.com/karlprieb)) + +- Not sending email to mentioned users with unchanged preference ([#8059](https://github.com/RocketChat/Rocket.Chat/pull/8059)) + +- Notification is not sent when a video conference start ([#8828](https://github.com/RocketChat/Rocket.Chat/pull/8828) by [@deepseainside75](https://github.com/deepseainside75) & [@stefanoverducci](https://github.com/stefanoverducci)) + +- Notification sound is not disabling when busy ([#9042](https://github.com/RocketChat/Rocket.Chat/pull/9042)) + +- OTR buttons padding ([#7954](https://github.com/RocketChat/Rocket.Chat/pull/7954) by [@karlprieb](https://github.com/karlprieb)) + +- popover position on mobile ([#7883](https://github.com/RocketChat/Rocket.Chat/pull/7883) by [@karlprieb](https://github.com/karlprieb)) + +- Prevent autotranslate tokens race condition ([#8046](https://github.com/RocketChat/Rocket.Chat/pull/8046)) + +- Put delete action on another popover group ([#8315](https://github.com/RocketChat/Rocket.Chat/pull/8315) by [@karlprieb](https://github.com/karlprieb)) + +- Range Slider Value label has bug in RTL ([#8441](https://github.com/RocketChat/Rocket.Chat/pull/8441) by [@cyclops24](https://github.com/cyclops24)) + +- Recent emojis not updated when adding via text ([#7998](https://github.com/RocketChat/Rocket.Chat/pull/7998)) + +- remove accountBox from admin menu ([#8358](https://github.com/RocketChat/Rocket.Chat/pull/8358) by [@karlprieb](https://github.com/karlprieb)) + +- Remove break change in Realtime API ([#7895](https://github.com/RocketChat/Rocket.Chat/pull/7895)) + +- Remove sidebar header on admin embedded version ([#8334](https://github.com/RocketChat/Rocket.Chat/pull/8334) by [@karlprieb](https://github.com/karlprieb)) + +- REST API file upload not respecting size limit ([#9108](https://github.com/RocketChat/Rocket.Chat/pull/9108)) + +- RTL ([#8112](https://github.com/RocketChat/Rocket.Chat/pull/8112)) + +- Scroll on messagebox ([#8047](https://github.com/RocketChat/Rocket.Chat/pull/8047)) + +- Scrollbar not using new style ([#8190](https://github.com/RocketChat/Rocket.Chat/pull/8190)) + +- search results position on sidebar ([#7881](https://github.com/RocketChat/Rocket.Chat/pull/7881) by [@karlprieb](https://github.com/karlprieb)) + +- Set correct Twitter link ([#8830](https://github.com/RocketChat/Rocket.Chat/pull/8830) by [@jotafeldmann](https://github.com/jotafeldmann)) + +- Settings description not showing ([#8122](https://github.com/RocketChat/Rocket.Chat/pull/8122)) + +- Show leader on first load ([#7712](https://github.com/RocketChat/Rocket.Chat/pull/7712) by [@danischreiber](https://github.com/danischreiber)) + +- Show modal with announcement ([#9241](https://github.com/RocketChat/Rocket.Chat/pull/9241) by [@karlprieb](https://github.com/karlprieb)) + +- show oauth logins when adblock is used ([#9170](https://github.com/RocketChat/Rocket.Chat/pull/9170) by [@karlprieb](https://github.com/karlprieb)) + +- Show real name of current user at top of side nav if setting enabled ([#8718](https://github.com/RocketChat/Rocket.Chat/pull/8718) by [@alexbrazier](https://github.com/alexbrazier)) + +- Sidebar and RTL alignments ([#8154](https://github.com/RocketChat/Rocket.Chat/pull/8154) by [@karlprieb](https://github.com/karlprieb)) + +- sidebar buttons and badge paddings ([#7888](https://github.com/RocketChat/Rocket.Chat/pull/7888) by [@karlprieb](https://github.com/karlprieb)) + +- Sidebar item menu position in RTL ([#8397](https://github.com/RocketChat/Rocket.Chat/pull/8397) by [@cyclops24](https://github.com/cyclops24)) + +- sidebar paddings ([#7880](https://github.com/RocketChat/Rocket.Chat/pull/7880) by [@karlprieb](https://github.com/karlprieb)) + +- Slack import failing and not being able to be restarted ([#8390](https://github.com/RocketChat/Rocket.Chat/pull/8390)) + +- Small alignment fixes ([#7970](https://github.com/RocketChat/Rocket.Chat/pull/7970)) + +- snap install by setting grpc package used by google/vision to 1.6.6 ([#9029](https://github.com/RocketChat/Rocket.Chat/pull/9029)) + +- Snippetted messages not working ([#8937](https://github.com/RocketChat/Rocket.Chat/pull/8937) by [@karlprieb](https://github.com/karlprieb)) + +- Some UI problems on 0.60 ([#9095](https://github.com/RocketChat/Rocket.Chat/pull/9095) by [@karlprieb](https://github.com/karlprieb)) + +- Sort direct messages by full name if show real names setting enabled ([#8717](https://github.com/RocketChat/Rocket.Chat/pull/8717) by [@alexbrazier](https://github.com/alexbrazier)) + +- status and active room colors on sidebar ([#7960](https://github.com/RocketChat/Rocket.Chat/pull/7960) by [@karlprieb](https://github.com/karlprieb)) + +- Sync of non existent field throws exception ([#8006](https://github.com/RocketChat/Rocket.Chat/pull/8006) by [@goiaba](https://github.com/goiaba)) + +- Text area lost text when page reloads ([#8159](https://github.com/RocketChat/Rocket.Chat/pull/8159)) + +- TypeError: Cannot read property 't' of undefined ([#8298](https://github.com/RocketChat/Rocket.Chat/pull/8298)) + +- Typo Fix ([#8938](https://github.com/RocketChat/Rocket.Chat/pull/8938) by [@seangeleno](https://github.com/seangeleno)) + +- Uncessary route reload break some routes ([#8514](https://github.com/RocketChat/Rocket.Chat/pull/8514)) + +- Unread bar position when room have announcement ([#9188](https://github.com/RocketChat/Rocket.Chat/pull/9188) by [@karlprieb](https://github.com/karlprieb)) + +- Update insecure moment.js dependency ([#9046](https://github.com/RocketChat/Rocket.Chat/pull/9046) by [@robbyoconnor](https://github.com/robbyoconnor)) + +- Update pt-BR translation ([#8655](https://github.com/RocketChat/Rocket.Chat/pull/8655) by [@rodorgas](https://github.com/rodorgas)) + +- Update Rocket.Chat for sandstorm ([#9062](https://github.com/RocketChat/Rocket.Chat/pull/9062) by [@peterlee0127](https://github.com/peterlee0127)) + +- Update rocketchat:streamer to be compatible with previous version ([#9094](https://github.com/RocketChat/Rocket.Chat/pull/9094)) + +- Use encodeURI in AmazonS3 contentDisposition file.name to prevent fail ([#9024](https://github.com/RocketChat/Rocket.Chat/pull/9024) by [@paulovitin](https://github.com/paulovitin)) + +- User avatar in DM list. ([#8210](https://github.com/RocketChat/Rocket.Chat/pull/8210)) + +- User email settings on DM ([#8810](https://github.com/RocketChat/Rocket.Chat/pull/8810) by [@karlprieb](https://github.com/karlprieb)) + +- Username clipping on firefox ([#8716](https://github.com/RocketChat/Rocket.Chat/pull/8716) by [@karlprieb](https://github.com/karlprieb)) + +- username ellipsis on firefox ([#7953](https://github.com/RocketChat/Rocket.Chat/pull/7953) by [@karlprieb](https://github.com/karlprieb)) + +- Various LDAP issues & Missing pagination ([#8372](https://github.com/RocketChat/Rocket.Chat/pull/8372)) + +- Vertical menu on flex-tab ([#7988](https://github.com/RocketChat/Rocket.Chat/pull/7988) by [@karlprieb](https://github.com/karlprieb)) + +- Window exception when parsing Markdown on server ([#7893](https://github.com/RocketChat/Rocket.Chat/pull/7893)) + +- Wrong colors after migration 103 ([#8547](https://github.com/RocketChat/Rocket.Chat/pull/8547)) + +- Wrong file name when upload to AWS S3 ([#8296](https://github.com/RocketChat/Rocket.Chat/pull/8296)) + +- Wrong message when reseting password and 2FA is enabled ([#8489](https://github.com/RocketChat/Rocket.Chat/pull/8489)) + +- Wrong room counter name ([#9013](https://github.com/RocketChat/Rocket.Chat/pull/9013) by [@karlprieb](https://github.com/karlprieb)) + +- Xenforo [BD]API for 'user.user_id; instead of 'id' ([#8968](https://github.com/RocketChat/Rocket.Chat/pull/8968) by [@wesnspace](https://github.com/wesnspace)) + +
+🔍 Minor changes + + +- [DOCS] Add native mobile app links into README and update button images ([#7909](https://github.com/RocketChat/Rocket.Chat/pull/7909) by [@rafaelks](https://github.com/rafaelks)) + +- [FIX-RC] Mobile file upload not working ([#8331](https://github.com/RocketChat/Rocket.Chat/pull/8331) by [@karlprieb](https://github.com/karlprieb)) + +- [Fix] Store Outgoing Integration Result as String in Mongo ([#8413](https://github.com/RocketChat/Rocket.Chat/pull/8413) by [@cpitman](https://github.com/cpitman)) + +- [MOVE] Move archiveroom command to client/server folders ([#8140](https://github.com/RocketChat/Rocket.Chat/pull/8140) by [@vcapretz](https://github.com/vcapretz)) + +- [MOVE] Move create command to client/server folder ([#8139](https://github.com/RocketChat/Rocket.Chat/pull/8139) by [@vcapretz](https://github.com/vcapretz)) + +- [MOVE] Move favico to client folder ([#8077](https://github.com/RocketChat/Rocket.Chat/pull/8077) by [@vcapretz](https://github.com/vcapretz)) + +- [MOVE] Move files from emojione to client/server folders ([#8078](https://github.com/RocketChat/Rocket.Chat/pull/8078) by [@vcapretz](https://github.com/vcapretz)) + +- [MOVE] Move files from slashcommands-unarchive to client/server folders ([#8084](https://github.com/RocketChat/Rocket.Chat/pull/8084) by [@vcapretz](https://github.com/vcapretz)) + +- [MOVE] Move invite command to client/server folder ([#8138](https://github.com/RocketChat/Rocket.Chat/pull/8138) by [@vcapretz](https://github.com/vcapretz)) + +- [MOVE] Move inviteall command to client/server folder ([#8137](https://github.com/RocketChat/Rocket.Chat/pull/8137) by [@vcapretz](https://github.com/vcapretz)) + +- [MOVE] Move join command to client/server folder ([#8136](https://github.com/RocketChat/Rocket.Chat/pull/8136) by [@vcapretz](https://github.com/vcapretz)) + +- [MOVE] Move kick command to client/server folders ([#8135](https://github.com/RocketChat/Rocket.Chat/pull/8135) by [@vcapretz](https://github.com/vcapretz)) + +- [MOVE] Move logger files to client/server folders ([#8150](https://github.com/RocketChat/Rocket.Chat/pull/8150) by [@vcapretz](https://github.com/vcapretz)) + +- [MOVE] Move mentions files to client/server ([#8142](https://github.com/RocketChat/Rocket.Chat/pull/8142) by [@vcapretz](https://github.com/vcapretz)) + +- [MOVE] Move slackbridge to client/server folders ([#8141](https://github.com/RocketChat/Rocket.Chat/pull/8141) by [@vcapretz](https://github.com/vcapretz)) + +- [MOVE] Move slashcommands-open to client folder ([#8132](https://github.com/RocketChat/Rocket.Chat/pull/8132) by [@vcapretz](https://github.com/vcapretz)) + +- [MOVE] Move timesync files to client/server folders ([#8152](https://github.com/RocketChat/Rocket.Chat/pull/8152) by [@vcapretz](https://github.com/vcapretz)) + +- Add a few dots in readme.md ([#8906](https://github.com/RocketChat/Rocket.Chat/pull/8906) by [@dusta](https://github.com/dusta)) + +- Add curl, its missing on worker nodes so has to be explicitly added ([#9248](https://github.com/RocketChat/Rocket.Chat/pull/9248)) + +- Add i18n Title to snippet messages ([#8394](https://github.com/RocketChat/Rocket.Chat/pull/8394)) + +- Added d2c.io to deployment ([#8975](https://github.com/RocketChat/Rocket.Chat/pull/8975) by [@mastappl](https://github.com/mastappl)) + +- Added RocketChatLauncher (SaaS) ([#6606](https://github.com/RocketChat/Rocket.Chat/pull/6606) by [@designgurudotorg](https://github.com/designgurudotorg)) + +- Adding: How to Install in WeDeploy ([#8036](https://github.com/RocketChat/Rocket.Chat/pull/8036) by [@thompsonemerson](https://github.com/thompsonemerson)) + +- Bump version to 0.60.0-develop ([#8820](https://github.com/RocketChat/Rocket.Chat/pull/8820) by [@gdelavald](https://github.com/gdelavald) & [@karlprieb](https://github.com/karlprieb)) + +- Change artifact path ([#8515](https://github.com/RocketChat/Rocket.Chat/pull/8515)) + +- Changed wording for "Maximum Allowed Message Size" ([#8872](https://github.com/RocketChat/Rocket.Chat/pull/8872) by [@HammyHavoc](https://github.com/HammyHavoc)) + +- Color variables migration ([#8463](https://github.com/RocketChat/Rocket.Chat/pull/8463) by [@karlprieb](https://github.com/karlprieb)) + +- Dependencies Update ([#9197](https://github.com/RocketChat/Rocket.Chat/pull/9197)) + +- Deps update ([#8273](https://github.com/RocketChat/Rocket.Chat/pull/8273)) + +- Develop sync ([#7866](https://github.com/RocketChat/Rocket.Chat/pull/7866)) + +- Do not change room icon color when room is unread ([#9257](https://github.com/RocketChat/Rocket.Chat/pull/9257)) + +- Enable AutoLinker back ([#8490](https://github.com/RocketChat/Rocket.Chat/pull/8490)) + +- Fix api regression (exception when deleting user) ([#9049](https://github.com/RocketChat/Rocket.Chat/pull/9049)) + +- Fix community links in readme ([#8589](https://github.com/RocketChat/Rocket.Chat/pull/8589)) + +- Fix Docker image build ([#8862](https://github.com/RocketChat/Rocket.Chat/pull/8862)) + +- Fix high CPU load when sending messages on large rooms (regression) ([#8520](https://github.com/RocketChat/Rocket.Chat/pull/8520)) + +- Fix link to .asc file on S3 ([#8829](https://github.com/RocketChat/Rocket.Chat/pull/8829)) + +- Fix more rtl issues ([#8194](https://github.com/RocketChat/Rocket.Chat/pull/8194) by [@karlprieb](https://github.com/karlprieb)) + +- Fix regression in api channels.members ([#9110](https://github.com/RocketChat/Rocket.Chat/pull/9110)) + +- Fix snap download url ([#8981](https://github.com/RocketChat/Rocket.Chat/pull/8981)) + +- Fix tag build ([#9084](https://github.com/RocketChat/Rocket.Chat/pull/9084)) + +- Fix test without oplog by waiting a successful login on changing users ([#9146](https://github.com/RocketChat/Rocket.Chat/pull/9146)) + +- Fix Travis CI build ([#8750](https://github.com/RocketChat/Rocket.Chat/pull/8750)) + +- Fix typo ([#8705](https://github.com/RocketChat/Rocket.Chat/pull/8705) by [@rmetzler](https://github.com/rmetzler)) + +- Fix: Account menu position on RTL ([#8416](https://github.com/RocketChat/Rocket.Chat/pull/8416) by [@karlprieb](https://github.com/karlprieb)) + +- Fix: Can’t login using LDAP via REST ([#9162](https://github.com/RocketChat/Rocket.Chat/pull/9162)) + +- Fix: Change password not working in new UI ([#8516](https://github.com/RocketChat/Rocket.Chat/pull/8516)) + +- Fix: Clear all unreads modal not closing after confirming ([#9137](https://github.com/RocketChat/Rocket.Chat/pull/9137)) + +- Fix: Click on channel name - hover area bigger than link area ([#9165](https://github.com/RocketChat/Rocket.Chat/pull/9165)) + +- Fix: Confirmation modals showing `Send` button ([#9136](https://github.com/RocketChat/Rocket.Chat/pull/9136)) + +- Fix: Message action quick buttons drops if "new message" divider is being shown ([#9138](https://github.com/RocketChat/Rocket.Chat/pull/9138)) + +- Fix: Messages being displayed in reverse order ([#9144](https://github.com/RocketChat/Rocket.Chat/pull/9144)) + +- Fix: Missing LDAP option to show internal logs ([#8417](https://github.com/RocketChat/Rocket.Chat/pull/8417)) + +- Fix: Missing LDAP reconnect setting ([#8414](https://github.com/RocketChat/Rocket.Chat/pull/8414)) + +- Fix: Missing option to set user's avatar from a url ([#9229](https://github.com/RocketChat/Rocket.Chat/pull/9229)) + +- Fix: Missing settings to configure LDAP size and page limits ([#8398](https://github.com/RocketChat/Rocket.Chat/pull/8398)) + +- Fix: Multiple unread indicators ([#9120](https://github.com/RocketChat/Rocket.Chat/pull/9120)) + +- Fix: Rooms and users are using different avatar style ([#9196](https://github.com/RocketChat/Rocket.Chat/pull/9196)) + +- Fix: Sidebar item on rtl and small devices ([#9247](https://github.com/RocketChat/Rocket.Chat/pull/9247) by [@karlprieb](https://github.com/karlprieb)) + +- Fix: Snippet name to not showing in snippet list ([#9184](https://github.com/RocketChat/Rocket.Chat/pull/9184) by [@karlprieb](https://github.com/karlprieb)) + +- Fix: UI: Descenders of glyphs are cut off ([#9166](https://github.com/RocketChat/Rocket.Chat/pull/9166)) + +- Fix: UI: Descenders of glyphs are cut off ([#9181](https://github.com/RocketChat/Rocket.Chat/pull/9181)) + +- Fix: Unneeded warning in payload of REST API calls ([#9240](https://github.com/RocketChat/Rocket.Chat/pull/9240)) + +- Fix: Unread line ([#9149](https://github.com/RocketChat/Rocket.Chat/pull/9149)) + +- Fix: updating last message on message edit or delete ([#9227](https://github.com/RocketChat/Rocket.Chat/pull/9227)) + +- Fix: Upload access control too distributed ([#9215](https://github.com/RocketChat/Rocket.Chat/pull/9215)) + +- Fix: Username find is matching partially ([#9217](https://github.com/RocketChat/Rocket.Chat/pull/9217)) + +- Fix: users listed as online after API login ([#9111](https://github.com/RocketChat/Rocket.Chat/pull/9111)) + +- Fix/api me only return verified ([#9183](https://github.com/RocketChat/Rocket.Chat/pull/9183)) + +- Hide flex-tab close button ([#7894](https://github.com/RocketChat/Rocket.Chat/pull/7894) by [@karlprieb](https://github.com/karlprieb)) + +- Improve markdown parser code ([#8451](https://github.com/RocketChat/Rocket.Chat/pull/8451)) + +- Improve room sync speed ([#8529](https://github.com/RocketChat/Rocket.Chat/pull/8529)) + +- install grpc package manually to fix snap armhf build ([#8653](https://github.com/RocketChat/Rocket.Chat/pull/8653)) + +- LingoHub based on develop ([#8831](https://github.com/RocketChat/Rocket.Chat/pull/8831)) + +- LingoHub based on develop ([#8375](https://github.com/RocketChat/Rocket.Chat/pull/8375)) + +- LingoHub based on develop ([#9256](https://github.com/RocketChat/Rocket.Chat/pull/9256)) + +- npm deps update ([#8197](https://github.com/RocketChat/Rocket.Chat/pull/8197)) + +- npm deps update ([#7969](https://github.com/RocketChat/Rocket.Chat/pull/7969)) + +- Release 0.60.0 ([#9259](https://github.com/RocketChat/Rocket.Chat/pull/9259)) + +- Remove chatops package ([#8742](https://github.com/RocketChat/Rocket.Chat/pull/8742)) + +- Remove field `lastActivity` from subscription data ([#8345](https://github.com/RocketChat/Rocket.Chat/pull/8345)) + +- Remove unnecessary returns in cors common ([#8054](https://github.com/RocketChat/Rocket.Chat/pull/8054) by [@Kiran-Rao](https://github.com/Kiran-Rao)) + +- Removed tmeasday:crypto-md5 ([#8743](https://github.com/RocketChat/Rocket.Chat/pull/8743)) + +- removing a duplicate line ([#8434](https://github.com/RocketChat/Rocket.Chat/pull/8434) by [@vikaskedia](https://github.com/vikaskedia)) + +- Replace postcss-nesting with postcss-nested ([#9200](https://github.com/RocketChat/Rocket.Chat/pull/9200)) + +- Revert "npm deps update" ([#7983](https://github.com/RocketChat/Rocket.Chat/pull/7983)) + +- Sync translations from LingoHub ([#8363](https://github.com/RocketChat/Rocket.Chat/pull/8363)) + +- Turn off prettyJson if the node environment isn't development ([#9068](https://github.com/RocketChat/Rocket.Chat/pull/9068)) + +- Typo: German language file ([#9190](https://github.com/RocketChat/Rocket.Chat/pull/9190) by [@TheReal1604](https://github.com/TheReal1604)) + +- Update BlackDuck URL ([#7941](https://github.com/RocketChat/Rocket.Chat/pull/7941)) + +- Update DEMO to OPEN links ([#8793](https://github.com/RocketChat/Rocket.Chat/pull/8793)) + +- Update meteor package to 1.8.1 ([#8802](https://github.com/RocketChat/Rocket.Chat/pull/8802)) + +- Update Meteor to 1.5.2.2 ([#8364](https://github.com/RocketChat/Rocket.Chat/pull/8364)) + +- Update meteor to 1.5.2.2-rc.0 ([#8355](https://github.com/RocketChat/Rocket.Chat/pull/8355)) + +- Update multiple-instance-status package ([#9018](https://github.com/RocketChat/Rocket.Chat/pull/9018)) + +- Update path for s3 redirect in circle ci ([#8819](https://github.com/RocketChat/Rocket.Chat/pull/8819)) + +- Updated comments. ([#8719](https://github.com/RocketChat/Rocket.Chat/pull/8719) by [@jasonjyu](https://github.com/jasonjyu)) + +- Use real names for user and room in emails ([#7922](https://github.com/RocketChat/Rocket.Chat/pull/7922) by [@danischreiber](https://github.com/danischreiber)) + +- Use redhat official image with openshift ([#9007](https://github.com/RocketChat/Rocket.Chat/pull/9007)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@AmShaegar13](https://github.com/AmShaegar13) +- [@Darkneon](https://github.com/Darkneon) +- [@HammyHavoc](https://github.com/HammyHavoc) +- [@Kiran-Rao](https://github.com/Kiran-Rao) +- [@Lawri-van-Buel](https://github.com/Lawri-van-Buel) +- [@Pharserror](https://github.com/Pharserror) +- [@RekkyRek](https://github.com/RekkyRek) +- [@Rzeszow](https://github.com/Rzeszow) +- [@TheReal1604](https://github.com/TheReal1604) +- [@aditya19496](https://github.com/aditya19496) +- [@alexbrazier](https://github.com/alexbrazier) +- [@armand1m](https://github.com/armand1m) +- [@arungalva](https://github.com/arungalva) +- [@ashward](https://github.com/ashward) +- [@astax-t](https://github.com/astax-t) +- [@ccfang](https://github.com/ccfang) +- [@cpitman](https://github.com/cpitman) +- [@cyclops24](https://github.com/cyclops24) +- [@danischreiber](https://github.com/danischreiber) +- [@deepseainside75](https://github.com/deepseainside75) +- [@designgurudotorg](https://github.com/designgurudotorg) +- [@dusta](https://github.com/dusta) +- [@gdelavald](https://github.com/gdelavald) +- [@ggrish](https://github.com/ggrish) +- [@goiaba](https://github.com/goiaba) +- [@icosamuel](https://github.com/icosamuel) +- [@jasonjyu](https://github.com/jasonjyu) +- [@joesitton](https://github.com/joesitton) +- [@josiasds](https://github.com/josiasds) +- [@jotafeldmann](https://github.com/jotafeldmann) +- [@jwilkins](https://github.com/jwilkins) +- [@karlprieb](https://github.com/karlprieb) +- [@lindoelio](https://github.com/lindoelio) +- [@luizbills](https://github.com/luizbills) +- [@mastappl](https://github.com/mastappl) +- [@mritunjaygoutam12](https://github.com/mritunjaygoutam12) +- [@mrsimpson](https://github.com/mrsimpson) +- [@paulovitin](https://github.com/paulovitin) +- [@peterlee0127](https://github.com/peterlee0127) +- [@pierreozoux](https://github.com/pierreozoux) +- [@pkgodara](https://github.com/pkgodara) +- [@rafaelks](https://github.com/rafaelks) +- [@ramrami](https://github.com/ramrami) +- [@rmetzler](https://github.com/rmetzler) +- [@robbyoconnor](https://github.com/robbyoconnor) +- [@rodorgas](https://github.com/rodorgas) +- [@ruKurz](https://github.com/ruKurz) +- [@ryoshimizu](https://github.com/ryoshimizu) +- [@sarbasamuel](https://github.com/sarbasamuel) +- [@satyapramodh](https://github.com/satyapramodh) +- [@seangeleno](https://github.com/seangeleno) +- [@selamanse](https://github.com/selamanse) +- [@stalley](https://github.com/stalley) +- [@stefanoverducci](https://github.com/stefanoverducci) +- [@szluohua](https://github.com/szluohua) +- [@thompsonemerson](https://github.com/thompsonemerson) +- [@torgeirl](https://github.com/torgeirl) +- [@vcapretz](https://github.com/vcapretz) +- [@vikaskedia](https://github.com/vikaskedia) +- [@vitor-nagao](https://github.com/vitor-nagao) +- [@wesnspace](https://github.com/wesnspace) +- [@wferris722](https://github.com/wferris722) +- [@xenithorb](https://github.com/xenithorb) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@marceloschmidt](https://github.com/marceloschmidt) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.59.6 +`2017-11-29 · 1 🔍 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `4.8.4` +- NPM: `4.6.1` + +
+🔍 Minor changes + + +- Fix tag build ([#8973](https://github.com/RocketChat/Rocket.Chat/pull/8973)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.59.5 +`2017-11-29 · 1 🔍 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `4.8.4` +- NPM: `4.6.1` + +
+🔍 Minor changes + + +- Fix CircleCI deploy filter ([#8972](https://github.com/RocketChat/Rocket.Chat/pull/8972)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.59.4 +`2017-11-29 · 1 🐛 · 2 🔍 · 5 👩‍💻👨‍💻` + +### Engine versions +- Node: `4.8.4` +- NPM: `4.6.1` + +### 🐛 Bug fixes + + +- Channel settings buttons ([#8753](https://github.com/RocketChat/Rocket.Chat/pull/8753) by [@karlprieb](https://github.com/karlprieb)) + +
+🔍 Minor changes + + +- Add CircleCI ([#8685](https://github.com/RocketChat/Rocket.Chat/pull/8685)) + +- Release/0.59.4 ([#8967](https://github.com/RocketChat/Rocket.Chat/pull/8967) by [@cpitman](https://github.com/cpitman) & [@karlprieb](https://github.com/karlprieb)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@cpitman](https://github.com/cpitman) +- [@karlprieb](https://github.com/karlprieb) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.59.3 +`2017-10-29 · 7 🐛 · 2 🔍 · 8 👩‍💻👨‍💻` + +### Engine versions +- Node: `4.8.4` +- NPM: `4.6.1` + +### 🐛 Bug fixes + + +- AmazonS3: Quote file.name for ContentDisposition for files with commas ([#8593](https://github.com/RocketChat/Rocket.Chat/pull/8593) by [@xenithorb](https://github.com/xenithorb)) + +- Audio message icon ([#8648](https://github.com/RocketChat/Rocket.Chat/pull/8648) by [@karlprieb](https://github.com/karlprieb)) + +- Fix e-mail message forward ([#8645](https://github.com/RocketChat/Rocket.Chat/pull/8645)) + +- Fix typos ([#8679](https://github.com/RocketChat/Rocket.Chat/pull/8679)) + +- Highlighted color height issue ([#8431](https://github.com/RocketChat/Rocket.Chat/pull/8431) by [@cyclops24](https://github.com/cyclops24)) + +- LDAP not respecting UTF8 characters & Sync Interval not working ([#8691](https://github.com/RocketChat/Rocket.Chat/pull/8691)) + +- Update pt-BR translation ([#8655](https://github.com/RocketChat/Rocket.Chat/pull/8655) by [@rodorgas](https://github.com/rodorgas)) + +
+🔍 Minor changes + + +- install grpc package manually to fix snap armhf build ([#8653](https://github.com/RocketChat/Rocket.Chat/pull/8653)) + +- removing a duplicate line ([#8434](https://github.com/RocketChat/Rocket.Chat/pull/8434) by [@vikaskedia](https://github.com/vikaskedia)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@cyclops24](https://github.com/cyclops24) +- [@karlprieb](https://github.com/karlprieb) +- [@rodorgas](https://github.com/rodorgas) +- [@vikaskedia](https://github.com/vikaskedia) +- [@xenithorb](https://github.com/xenithorb) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.59.2 +`2017-10-25 · 6 🐛 · 4 👩‍💻👨‍💻` + +### Engine versions +- Node: `4.8.4` +- NPM: `4.6.1` + +### 🐛 Bug fixes + + +- API channel/group.members not sorting ([#8635](https://github.com/RocketChat/Rocket.Chat/pull/8635)) + +- encode filename in url to prevent links breaking ([#8551](https://github.com/RocketChat/Rocket.Chat/pull/8551) by [@joesitton](https://github.com/joesitton)) + +- Fix guest pool inquiry taking ([#8577](https://github.com/RocketChat/Rocket.Chat/pull/8577)) + +- LDAP not merging existent users && Wrong id link generation ([#8613](https://github.com/RocketChat/Rocket.Chat/pull/8613)) + +- Message popup menu on mobile/cordova ([#8634](https://github.com/RocketChat/Rocket.Chat/pull/8634) by [@karlprieb](https://github.com/karlprieb)) + +- Missing scroll at create channel page ([#8637](https://github.com/RocketChat/Rocket.Chat/pull/8637) by [@karlprieb](https://github.com/karlprieb)) + +### 👩‍💻👨‍💻 Contributors 😍 + +- [@joesitton](https://github.com/joesitton) +- [@karlprieb](https://github.com/karlprieb) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.59.1 +`2017-10-19 · 4 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `4.8.4` +- NPM: `4.6.1` + +### 🐛 Bug fixes + + +- Color reset when default value editor is different ([#8543](https://github.com/RocketChat/Rocket.Chat/pull/8543)) + +- LDAP login error regression at 0.59.0 ([#8541](https://github.com/RocketChat/Rocket.Chat/pull/8541)) + +- Migration 103 wrong converting primrary colors ([#8544](https://github.com/RocketChat/Rocket.Chat/pull/8544)) + +- Wrong colors after migration 103 ([#8547](https://github.com/RocketChat/Rocket.Chat/pull/8547)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.59.0 +`2017-10-18 · 25 🎉 · 122 🐛 · 51 🔍 · 46 👩‍💻👨‍💻` + +### Engine versions +- Node: `4.8.4` +- NPM: `4.6.1` + +### 🎉 New features + + +- Add classes to notification menu so they can be hidden in css ([#7636](https://github.com/RocketChat/Rocket.Chat/pull/7636) by [@danischreiber](https://github.com/danischreiber)) + +- Add markdown parser "marked" ([#7852](https://github.com/RocketChat/Rocket.Chat/pull/7852) by [@nishimaki10](https://github.com/nishimaki10)) + +- Add RD Station integration to livechat ([#8304](https://github.com/RocketChat/Rocket.Chat/pull/8304)) + +- Add room type as a class to the ul-group of rooms ([#7711](https://github.com/RocketChat/Rocket.Chat/pull/7711) by [@danischreiber](https://github.com/danischreiber)) + +- Add tags to uploaded images using Google Cloud Vision API ([#6301](https://github.com/RocketChat/Rocket.Chat/pull/6301) by [@karlprieb](https://github.com/karlprieb)) + +- Add unread options for direct messages ([#7658](https://github.com/RocketChat/Rocket.Chat/pull/7658)) + +- Adds a Keyboard Shortcut option to the flextab ([#5902](https://github.com/RocketChat/Rocket.Chat/pull/5902) by [@cnash](https://github.com/cnash) & [@karlprieb](https://github.com/karlprieb)) + +- Allow ldap mapping of customFields ([#7614](https://github.com/RocketChat/Rocket.Chat/pull/7614) by [@goiaba](https://github.com/goiaba)) + +- Allows admin to list all groups with API ([#7565](https://github.com/RocketChat/Rocket.Chat/pull/7565) by [@mboudet](https://github.com/mboudet)) + +- Audio Notification updated in sidebar ([#7817](https://github.com/RocketChat/Rocket.Chat/pull/7817) by [@aditya19496](https://github.com/aditya19496) & [@maarten-v](https://github.com/maarten-v)) + +- Automatically select the first channel ([#7350](https://github.com/RocketChat/Rocket.Chat/pull/7350) by [@antaryami-sahoo](https://github.com/antaryami-sahoo)) + +- block users to mention unknow users ([#7830](https://github.com/RocketChat/Rocket.Chat/pull/7830)) + +- Create a standard for our svg icons ([#7853](https://github.com/RocketChat/Rocket.Chat/pull/7853) by [@karlprieb](https://github.com/karlprieb)) + +- Enable read only channel creation ([#8260](https://github.com/RocketChat/Rocket.Chat/pull/8260) by [@karlprieb](https://github.com/karlprieb)) + +- Integrated personal email gateway (GSoC'17) ([#7342](https://github.com/RocketChat/Rocket.Chat/pull/7342) by [@pkgodara](https://github.com/pkgodara)) + +- make sidebar item width 100% ([#8362](https://github.com/RocketChat/Rocket.Chat/pull/8362) by [@karlprieb](https://github.com/karlprieb)) + +- Package to render issue numbers into links to an issue tracker. ([#6700](https://github.com/RocketChat/Rocket.Chat/pull/6700) by [@TAdeJong](https://github.com/TAdeJong) & [@TobiasKappe](https://github.com/TobiasKappe)) + +- Replace message cog for vertical menu ([#7864](https://github.com/RocketChat/Rocket.Chat/pull/7864) by [@karlprieb](https://github.com/karlprieb)) + +- Rocket.Chat UI Redesign ([#7643](https://github.com/RocketChat/Rocket.Chat/pull/7643)) + +- Search users by fields defined by admin ([#7612](https://github.com/RocketChat/Rocket.Chat/pull/7612) by [@goiaba](https://github.com/goiaba)) + +- Setting to disable MarkDown and enable AutoLinker ([#8459](https://github.com/RocketChat/Rocket.Chat/pull/8459)) + +- Smaller accountBox ([#8360](https://github.com/RocketChat/Rocket.Chat/pull/8360) by [@karlprieb](https://github.com/karlprieb)) + +- Template to show Custom Fields in user info view ([#7688](https://github.com/RocketChat/Rocket.Chat/pull/7688) by [@goiaba](https://github.com/goiaba)) + +- Unify unread and mentions badge ([#8361](https://github.com/RocketChat/Rocket.Chat/pull/8361) by [@karlprieb](https://github.com/karlprieb)) + +- Upgrade to meteor 1.5.2 ([#8073](https://github.com/RocketChat/Rocket.Chat/pull/8073)) + +### 🐛 Bug fixes + + +- "*.members" rest api being useless and only returning usernames ([#8147](https://github.com/RocketChat/Rocket.Chat/pull/8147)) + +- "Cancel button" on modal in RTL in Firefox 55 ([#8278](https://github.com/RocketChat/Rocket.Chat/pull/8278) by [@cyclops24](https://github.com/cyclops24)) + +- "Channel Setting" buttons alignment in RTL ([#8266](https://github.com/RocketChat/Rocket.Chat/pull/8266) by [@cyclops24](https://github.com/cyclops24)) + +- **i18n:** My Profile & README.md links ([#8270](https://github.com/RocketChat/Rocket.Chat/pull/8270) by [@Rzeszow](https://github.com/Rzeszow)) + +- **PL:** Polish translation ([#7989](https://github.com/RocketChat/Rocket.Chat/pull/7989) by [@Rzeszow](https://github.com/Rzeszow)) + +- Add admin audio preferences translations ([#8094](https://github.com/RocketChat/Rocket.Chat/pull/8094)) + +- Add CSS support for Safari versions > 7 ([#7854](https://github.com/RocketChat/Rocket.Chat/pull/7854)) + +- Add padding on messages to allow space to the action buttons ([#7971](https://github.com/RocketChat/Rocket.Chat/pull/7971)) + +- Adds default search text padding for emoji search ([#7878](https://github.com/RocketChat/Rocket.Chat/pull/7878) by [@gdelavald](https://github.com/gdelavald)) + +- After deleting the room, cache is not synchronizing ([#8314](https://github.com/RocketChat/Rocket.Chat/pull/8314) by [@szluohua](https://github.com/szluohua)) + +- Allow unknown file types if no allowed whitelist has been set (#7074) ([#8172](https://github.com/RocketChat/Rocket.Chat/pull/8172) by [@TriPhoenix](https://github.com/TriPhoenix)) + +- Amin menu not showing all items & File list breaking line ([#8299](https://github.com/RocketChat/Rocket.Chat/pull/8299) by [@karlprieb](https://github.com/karlprieb)) + +- Api groups.files is always returning empty ([#8241](https://github.com/RocketChat/Rocket.Chat/pull/8241)) + +- Attachment icons alignment in LTR and RTL ([#8271](https://github.com/RocketChat/Rocket.Chat/pull/8271) by [@cyclops24](https://github.com/cyclops24)) + +- Broken embedded view layout ([#7944](https://github.com/RocketChat/Rocket.Chat/pull/7944) by [@karlprieb](https://github.com/karlprieb)) + +- Broken emoji picker on firefox ([#7943](https://github.com/RocketChat/Rocket.Chat/pull/7943) by [@karlprieb](https://github.com/karlprieb)) + +- Call buttons with wrong margin on RTL ([#8307](https://github.com/RocketChat/Rocket.Chat/pull/8307) by [@karlprieb](https://github.com/karlprieb)) + +- Case insensitive SAML email check ([#8216](https://github.com/RocketChat/Rocket.Chat/pull/8216) by [@arminfelder](https://github.com/arminfelder)) + +- Chat box no longer auto-focuses when typing ([#7984](https://github.com/RocketChat/Rocket.Chat/pull/7984)) + +- Check attachments is defined before accessing first element ([#8295](https://github.com/RocketChat/Rocket.Chat/pull/8295) by [@Darkneon](https://github.com/Darkneon)) + +- clipboard and permalink on new popover ([#8259](https://github.com/RocketChat/Rocket.Chat/pull/8259) by [@karlprieb](https://github.com/karlprieb)) + +- copy to clipboard and update clipboard.js library ([#8039](https://github.com/RocketChat/Rocket.Chat/pull/8039) by [@karlprieb](https://github.com/karlprieb)) + +- Create channel button on Firefox ([#7942](https://github.com/RocketChat/Rocket.Chat/pull/7942) by [@karlprieb](https://github.com/karlprieb)) + +- Csv importer: work with more problematic data ([#7456](https://github.com/RocketChat/Rocket.Chat/pull/7456) by [@reist](https://github.com/reist)) + +- disabled katex tooltip on messageBox ([#8386](https://github.com/RocketChat/Rocket.Chat/pull/8386)) + +- Do not send joinCode field to clients ([#8527](https://github.com/RocketChat/Rocket.Chat/pull/8527)) + +- Document README.md. Drupal repo out of date ([#7948](https://github.com/RocketChat/Rocket.Chat/pull/7948) by [@Lawri-van-Buel](https://github.com/Lawri-van-Buel)) + +- Double scroll on 'keyboard shortcuts' menu in sidepanel ([#7927](https://github.com/RocketChat/Rocket.Chat/pull/7927) by [@aditya19496](https://github.com/aditya19496)) + +- Dutch translations ([#7815](https://github.com/RocketChat/Rocket.Chat/pull/7815) by [@maarten-v](https://github.com/maarten-v)) + +- Dynamic popover ([#8101](https://github.com/RocketChat/Rocket.Chat/pull/8101) by [@karlprieb](https://github.com/karlprieb)) + +- Email message forward error ([#7846](https://github.com/RocketChat/Rocket.Chat/pull/7846)) + +- Email Subjects not being sent ([#8317](https://github.com/RocketChat/Rocket.Chat/pull/8317)) + +- Emoji Picker hidden for reactions in RTL ([#8300](https://github.com/RocketChat/Rocket.Chat/pull/8300) by [@karlprieb](https://github.com/karlprieb)) + +- Error when translating message ([#8001](https://github.com/RocketChat/Rocket.Chat/pull/8001)) + +- Example usage of unsubscribe.js ([#7673](https://github.com/RocketChat/Rocket.Chat/pull/7673) by [@Kiran-Rao](https://github.com/Kiran-Rao)) + +- Execute meteor reset on TRAVIS_TAG builds ([#8310](https://github.com/RocketChat/Rocket.Chat/pull/8310)) + +- File upload on multi-instances using a path prefix ([#7855](https://github.com/RocketChat/Rocket.Chat/pull/7855) by [@Darkneon](https://github.com/Darkneon)) + +- Fix avatar upload fail on Cordova app ([#7656](https://github.com/RocketChat/Rocket.Chat/pull/7656) by [@ccfang](https://github.com/ccfang)) + +- Fix black background on transparent avatars ([#7168](https://github.com/RocketChat/Rocket.Chat/pull/7168)) + +- fix color on unread messages ([#8282](https://github.com/RocketChat/Rocket.Chat/pull/8282)) + +- Fix Dutch translation ([#7814](https://github.com/RocketChat/Rocket.Chat/pull/7814) by [@maarten-v](https://github.com/maarten-v)) + +- Fix email on mention ([#7754](https://github.com/RocketChat/Rocket.Chat/pull/7754)) + +- Fix google play logo on repo README ([#7912](https://github.com/RocketChat/Rocket.Chat/pull/7912) by [@luizbills](https://github.com/luizbills)) + +- Fix iframe login API response (issue #8145) ([#8146](https://github.com/RocketChat/Rocket.Chat/pull/8146) by [@astax-t](https://github.com/astax-t)) + +- Fix livechat toggle UI issue ([#7904](https://github.com/RocketChat/Rocket.Chat/pull/7904)) + +- Fix messagebox growth ([#7629](https://github.com/RocketChat/Rocket.Chat/pull/7629)) + +- Fix migration 100 ([#7863](https://github.com/RocketChat/Rocket.Chat/pull/7863)) + +- Fix new room sound being played too much ([#8144](https://github.com/RocketChat/Rocket.Chat/pull/8144)) + +- Fix new-message button showing on search ([#7823](https://github.com/RocketChat/Rocket.Chat/pull/7823)) + +- Fix placeholders in account profile ([#7945](https://github.com/RocketChat/Rocket.Chat/pull/7945) by [@josiasds](https://github.com/josiasds)) + +- Fix room load on first hit ([#7687](https://github.com/RocketChat/Rocket.Chat/pull/7687)) + +- Fix setting user avatar on LDAP login ([#8099](https://github.com/RocketChat/Rocket.Chat/pull/8099)) + +- Fix the status on the members list ([#7963](https://github.com/RocketChat/Rocket.Chat/pull/7963)) + +- Fixed function closure syntax allowing validation emails to be sent. ([#7758](https://github.com/RocketChat/Rocket.Chat/pull/7758) by [@snoozan](https://github.com/snoozan)) + +- Google vision NSFW tag ([#7825](https://github.com/RocketChat/Rocket.Chat/pull/7825)) + +- Hide scrollbar on login page if not necessary ([#8014](https://github.com/RocketChat/Rocket.Chat/pull/8014) by [@alexbrazier](https://github.com/alexbrazier)) + +- hyperlink style on sidebar footer ([#7882](https://github.com/RocketChat/Rocket.Chat/pull/7882) by [@karlprieb](https://github.com/karlprieb)) + +- Incorrect URL for login terms when using prefix ([#8211](https://github.com/RocketChat/Rocket.Chat/pull/8211) by [@Darkneon](https://github.com/Darkneon)) + +- Invalid Code message for password protected channel ([#8491](https://github.com/RocketChat/Rocket.Chat/pull/8491)) + +- Invisible leader bar on hover ([#8048](https://github.com/RocketChat/Rocket.Chat/pull/8048)) + +- Issue #8166 where empty analytics setting breaks to load Piwik script ([#8167](https://github.com/RocketChat/Rocket.Chat/pull/8167) by [@ruKurz](https://github.com/ruKurz)) + +- LDAP memory issues when pagination is not available ([#8457](https://github.com/RocketChat/Rocket.Chat/pull/8457)) + +- Leave and hide buttons was removed ([#8213](https://github.com/RocketChat/Rocket.Chat/pull/8213) by [@karlprieb](https://github.com/karlprieb)) + +- livechat icon ([#7886](https://github.com/RocketChat/Rocket.Chat/pull/7886) by [@karlprieb](https://github.com/karlprieb)) + +- Make link inside YouTube preview open in new tab ([#7679](https://github.com/RocketChat/Rocket.Chat/pull/7679) by [@1lann](https://github.com/1lann)) + +- make sidebar item animation fast ([#8262](https://github.com/RocketChat/Rocket.Chat/pull/8262) by [@karlprieb](https://github.com/karlprieb)) + +- Makes text action menu width based on content size ([#7887](https://github.com/RocketChat/Rocket.Chat/pull/7887) by [@gdelavald](https://github.com/gdelavald)) + +- Markdown being rendered in code tags ([#7965](https://github.com/RocketChat/Rocket.Chat/pull/7965)) + +- Markdown noopener/noreferrer: use correct HTML attribute ([#7644](https://github.com/RocketChat/Rocket.Chat/pull/7644) by [@jangmarker](https://github.com/jangmarker)) + +- Mention unread indicator was removed ([#8316](https://github.com/RocketChat/Rocket.Chat/pull/8316)) + +- message actions over unread bar ([#7885](https://github.com/RocketChat/Rocket.Chat/pull/7885) by [@karlprieb](https://github.com/karlprieb)) + +- message-box autogrow ([#8019](https://github.com/RocketChat/Rocket.Chat/pull/8019) by [@karlprieb](https://github.com/karlprieb)) + +- meteor-accounts-saml issue with ns0,ns1 namespaces, makes it compatible with pysaml2 lib ([#7721](https://github.com/RocketChat/Rocket.Chat/pull/7721) by [@arminfelder](https://github.com/arminfelder)) + +- Missing i18n translations ([#8357](https://github.com/RocketChat/Rocket.Chat/pull/8357)) + +- Missing placeholder translations ([#8286](https://github.com/RocketChat/Rocket.Chat/pull/8286)) + +- Not sending email to mentioned users with unchanged preference ([#8059](https://github.com/RocketChat/Rocket.Chat/pull/8059)) + +- OTR buttons padding ([#7954](https://github.com/RocketChat/Rocket.Chat/pull/7954) by [@karlprieb](https://github.com/karlprieb)) + +- popover position on mobile ([#7883](https://github.com/RocketChat/Rocket.Chat/pull/7883) by [@karlprieb](https://github.com/karlprieb)) + +- Prevent autotranslate tokens race condition ([#8046](https://github.com/RocketChat/Rocket.Chat/pull/8046)) + +- Put delete action on another popover group ([#8315](https://github.com/RocketChat/Rocket.Chat/pull/8315) by [@karlprieb](https://github.com/karlprieb)) + +- Recent emojis not updated when adding via text ([#7998](https://github.com/RocketChat/Rocket.Chat/pull/7998)) + +- remove accountBox from admin menu ([#8358](https://github.com/RocketChat/Rocket.Chat/pull/8358) by [@karlprieb](https://github.com/karlprieb)) + +- Remove break change in Realtime API ([#7895](https://github.com/RocketChat/Rocket.Chat/pull/7895)) + +- Remove redundant "do" in "Are you sure ...?" messages. ([#7809](https://github.com/RocketChat/Rocket.Chat/pull/7809) by [@xurizaemon](https://github.com/xurizaemon)) + +- Remove references to non-existent tests ([#7672](https://github.com/RocketChat/Rocket.Chat/pull/7672) by [@Kiran-Rao](https://github.com/Kiran-Rao)) + +- Remove sidebar header on admin embedded version ([#8334](https://github.com/RocketChat/Rocket.Chat/pull/8334) by [@karlprieb](https://github.com/karlprieb)) + +- Removing pipe and commas from custom emojis (#8168) ([#8237](https://github.com/RocketChat/Rocket.Chat/pull/8237) by [@matheusml](https://github.com/matheusml)) + +- room icon on header ([#8017](https://github.com/RocketChat/Rocket.Chat/pull/8017) by [@karlprieb](https://github.com/karlprieb)) + +- RTL ([#8112](https://github.com/RocketChat/Rocket.Chat/pull/8112)) + +- RTL on reply ([#8261](https://github.com/RocketChat/Rocket.Chat/pull/8261) by [@karlprieb](https://github.com/karlprieb)) + +- scroll on flex-tab ([#7748](https://github.com/RocketChat/Rocket.Chat/pull/7748)) + +- Scroll on messagebox ([#8047](https://github.com/RocketChat/Rocket.Chat/pull/8047)) + +- Scrollbar not using new style ([#8190](https://github.com/RocketChat/Rocket.Chat/pull/8190)) + +- search results height ([#8018](https://github.com/RocketChat/Rocket.Chat/pull/8018) by [@gdelavald](https://github.com/gdelavald) & [@karlprieb](https://github.com/karlprieb)) + +- search results position on sidebar ([#7881](https://github.com/RocketChat/Rocket.Chat/pull/7881) by [@karlprieb](https://github.com/karlprieb)) + +- Settings description not showing ([#8122](https://github.com/RocketChat/Rocket.Chat/pull/8122)) + +- Settings not getting applied from Meteor.settings and process.env ([#7779](https://github.com/RocketChat/Rocket.Chat/pull/7779) by [@Darkneon](https://github.com/Darkneon)) + +- Show leader on first load ([#7712](https://github.com/RocketChat/Rocket.Chat/pull/7712) by [@danischreiber](https://github.com/danischreiber)) + +- Sidebar and RTL alignments ([#8154](https://github.com/RocketChat/Rocket.Chat/pull/8154) by [@karlprieb](https://github.com/karlprieb)) + +- sidebar buttons and badge paddings ([#7888](https://github.com/RocketChat/Rocket.Chat/pull/7888) by [@karlprieb](https://github.com/karlprieb)) + +- Sidebar item menu position in RTL ([#8397](https://github.com/RocketChat/Rocket.Chat/pull/8397) by [@cyclops24](https://github.com/cyclops24)) + +- sidebar paddings ([#7880](https://github.com/RocketChat/Rocket.Chat/pull/7880) by [@karlprieb](https://github.com/karlprieb)) + +- sidenav colors, hide and leave, create channel on safari ([#8257](https://github.com/RocketChat/Rocket.Chat/pull/8257) by [@karlprieb](https://github.com/karlprieb)) + +- sidenav mentions on hover ([#8252](https://github.com/RocketChat/Rocket.Chat/pull/8252) by [@karlprieb](https://github.com/karlprieb)) + +- Small alignment fixes ([#7970](https://github.com/RocketChat/Rocket.Chat/pull/7970)) + +- some placeholder and phrase traslation fix ([#8269](https://github.com/RocketChat/Rocket.Chat/pull/8269) by [@cyclops24](https://github.com/cyclops24)) + +- status and active room colors on sidebar ([#7960](https://github.com/RocketChat/Rocket.Chat/pull/7960) by [@karlprieb](https://github.com/karlprieb)) + +- Text area buttons and layout on mobile ([#7985](https://github.com/RocketChat/Rocket.Chat/pull/7985)) + +- Text area lost text when page reloads ([#8159](https://github.com/RocketChat/Rocket.Chat/pull/8159)) + +- Textarea on firefox ([#7986](https://github.com/RocketChat/Rocket.Chat/pull/7986)) + +- TypeError: Cannot read property 't' of undefined ([#8298](https://github.com/RocketChat/Rocket.Chat/pull/8298)) + +- Uncessary route reload break some routes ([#8514](https://github.com/RocketChat/Rocket.Chat/pull/8514)) + +- Update Snap links ([#7778](https://github.com/RocketChat/Rocket.Chat/pull/7778) by [@MichaelGooden](https://github.com/MichaelGooden)) + +- User avatar in DM list. ([#8210](https://github.com/RocketChat/Rocket.Chat/pull/8210)) + +- username ellipsis on firefox ([#7953](https://github.com/RocketChat/Rocket.Chat/pull/7953) by [@karlprieb](https://github.com/karlprieb)) + +- Various LDAP issues & Missing pagination ([#8372](https://github.com/RocketChat/Rocket.Chat/pull/8372)) + +- Vertical menu on flex-tab ([#7988](https://github.com/RocketChat/Rocket.Chat/pull/7988) by [@karlprieb](https://github.com/karlprieb)) + +- Window exception when parsing Markdown on server ([#7893](https://github.com/RocketChat/Rocket.Chat/pull/7893)) + +- Wrong email subject when "All Messages" setting enabled ([#7639](https://github.com/RocketChat/Rocket.Chat/pull/7639)) + +- Wrong file name when upload to AWS S3 ([#8296](https://github.com/RocketChat/Rocket.Chat/pull/8296)) + +- Wrong message when reseting password and 2FA is enabled ([#8489](https://github.com/RocketChat/Rocket.Chat/pull/8489)) + +- Wrong render of snippet’s name ([#7630](https://github.com/RocketChat/Rocket.Chat/pull/7630)) + +
+🔍 Minor changes + + +- [DOCS] Add native mobile app links into README and update button images ([#7909](https://github.com/RocketChat/Rocket.Chat/pull/7909) by [@rafaelks](https://github.com/rafaelks)) + +- [FIX-RC] Mobile file upload not working ([#8331](https://github.com/RocketChat/Rocket.Chat/pull/8331) by [@karlprieb](https://github.com/karlprieb)) + +- [MOVE] Client folder rocketchat-autolinker ([#7667](https://github.com/RocketChat/Rocket.Chat/pull/7667) by [@Kiran-Rao](https://github.com/Kiran-Rao)) + +- [MOVE] Client folder rocketchat-cas ([#7668](https://github.com/RocketChat/Rocket.Chat/pull/7668) by [@Kiran-Rao](https://github.com/Kiran-Rao)) + +- [MOVE] Client folder rocketchat-colors ([#7664](https://github.com/RocketChat/Rocket.Chat/pull/7664) by [@Kiran-Rao](https://github.com/Kiran-Rao)) + +- [MOVE] Client folder rocketchat-custom-oauth ([#7665](https://github.com/RocketChat/Rocket.Chat/pull/7665) by [@Kiran-Rao](https://github.com/Kiran-Rao)) + +- [MOVE] Client folder rocketchat-custom-sounds ([#7670](https://github.com/RocketChat/Rocket.Chat/pull/7670) by [@Kiran-Rao](https://github.com/Kiran-Rao)) + +- [MOVE] Client folder rocketchat-emoji ([#7671](https://github.com/RocketChat/Rocket.Chat/pull/7671) by [@Kiran-Rao](https://github.com/Kiran-Rao)) + +- [MOVE] Client folder rocketchat-highlight-words ([#7669](https://github.com/RocketChat/Rocket.Chat/pull/7669) by [@Kiran-Rao](https://github.com/Kiran-Rao)) + +- [MOVE] Client folder rocketchat-tooltip ([#7666](https://github.com/RocketChat/Rocket.Chat/pull/7666) by [@Kiran-Rao](https://github.com/Kiran-Rao)) + +- 0.58.3 ([#8335](https://github.com/RocketChat/Rocket.Chat/pull/8335)) + +- Add i18n Title to snippet messages ([#8394](https://github.com/RocketChat/Rocket.Chat/pull/8394)) + +- Additions to the REST API ([#7793](https://github.com/RocketChat/Rocket.Chat/pull/7793)) + +- Bump version to 0.59.0-develop ([#7625](https://github.com/RocketChat/Rocket.Chat/pull/7625)) + +- Change artifact path ([#8515](https://github.com/RocketChat/Rocket.Chat/pull/8515)) + +- Color variables migration ([#8463](https://github.com/RocketChat/Rocket.Chat/pull/8463) by [@karlprieb](https://github.com/karlprieb)) + +- Deps update ([#8273](https://github.com/RocketChat/Rocket.Chat/pull/8273)) + +- Disable perfect scrollbar ([#8244](https://github.com/RocketChat/Rocket.Chat/pull/8244)) + +- Enable AutoLinker back ([#8490](https://github.com/RocketChat/Rocket.Chat/pull/8490)) + +- Fix `leave and hide` click, color and position ([#8243](https://github.com/RocketChat/Rocket.Chat/pull/8243) by [@karlprieb](https://github.com/karlprieb)) + +- Fix artifact path ([#8518](https://github.com/RocketChat/Rocket.Chat/pull/8518)) + +- Fix high CPU load when sending messages on large rooms (regression) ([#8520](https://github.com/RocketChat/Rocket.Chat/pull/8520)) + +- Fix more rtl issues ([#8194](https://github.com/RocketChat/Rocket.Chat/pull/8194) by [@karlprieb](https://github.com/karlprieb)) + +- Fix typo in generated URI ([#7661](https://github.com/RocketChat/Rocket.Chat/pull/7661) by [@Rohlik](https://github.com/Rohlik)) + +- Fix: Account menu position on RTL ([#8416](https://github.com/RocketChat/Rocket.Chat/pull/8416) by [@karlprieb](https://github.com/karlprieb)) + +- Fix: Change password not working in new UI ([#8516](https://github.com/RocketChat/Rocket.Chat/pull/8516)) + +- FIX: Error when starting local development environment ([#7728](https://github.com/RocketChat/Rocket.Chat/pull/7728) by [@rdebeasi](https://github.com/rdebeasi)) + +- Fix: Missing LDAP option to show internal logs ([#8417](https://github.com/RocketChat/Rocket.Chat/pull/8417)) + +- Fix: Missing LDAP reconnect setting ([#8414](https://github.com/RocketChat/Rocket.Chat/pull/8414)) + +- Fix: Missing settings to configure LDAP size and page limits ([#8398](https://github.com/RocketChat/Rocket.Chat/pull/8398)) + +- Hide flex-tab close button ([#7894](https://github.com/RocketChat/Rocket.Chat/pull/7894) by [@karlprieb](https://github.com/karlprieb)) + +- implemented new page-loader animated icon ([#2](https://github.com/RocketChat/Rocket.Chat/pull/2)) + +- Improve markdown parser code ([#8451](https://github.com/RocketChat/Rocket.Chat/pull/8451)) + +- Improve room sync speed ([#8529](https://github.com/RocketChat/Rocket.Chat/pull/8529)) + +- LingoHub based on develop ([#7803](https://github.com/RocketChat/Rocket.Chat/pull/7803)) + +- LingoHub based on develop ([#8375](https://github.com/RocketChat/Rocket.Chat/pull/8375)) + +- Merge 0.58.4 to master ([#8420](https://github.com/RocketChat/Rocket.Chat/pull/8420)) + +- Meteor packages and npm dependencies update ([#7677](https://github.com/RocketChat/Rocket.Chat/pull/7677)) + +- Mobile sidenav ([#7865](https://github.com/RocketChat/Rocket.Chat/pull/7865)) + +- npm deps update ([#7842](https://github.com/RocketChat/Rocket.Chat/pull/7842)) + +- npm deps update ([#7755](https://github.com/RocketChat/Rocket.Chat/pull/7755)) + +- npm deps update ([#8197](https://github.com/RocketChat/Rocket.Chat/pull/8197)) + +- Only use "File Uploaded" prefix on files ([#7652](https://github.com/RocketChat/Rocket.Chat/pull/7652)) + +- readme-file: fix broken link ([#8253](https://github.com/RocketChat/Rocket.Chat/pull/8253) by [@vcapretz](https://github.com/vcapretz)) + +- Remove CircleCI ([#7739](https://github.com/RocketChat/Rocket.Chat/pull/7739)) + +- Remove field `lastActivity` from subscription data ([#8345](https://github.com/RocketChat/Rocket.Chat/pull/8345)) + +- Remove unnecessary returns in cors common ([#8054](https://github.com/RocketChat/Rocket.Chat/pull/8054) by [@Kiran-Rao](https://github.com/Kiran-Rao)) + +- Sync translations from LingoHub ([#8363](https://github.com/RocketChat/Rocket.Chat/pull/8363)) + +- Update BlackDuck URL ([#7941](https://github.com/RocketChat/Rocket.Chat/pull/7941)) + +- Update Meteor to 1.5.2.2 ([#8364](https://github.com/RocketChat/Rocket.Chat/pull/8364)) + +- Update meteor to 1.5.2.2-rc.0 ([#8355](https://github.com/RocketChat/Rocket.Chat/pull/8355)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@1lann](https://github.com/1lann) +- [@Darkneon](https://github.com/Darkneon) +- [@Kiran-Rao](https://github.com/Kiran-Rao) +- [@Lawri-van-Buel](https://github.com/Lawri-van-Buel) +- [@MichaelGooden](https://github.com/MichaelGooden) +- [@Rohlik](https://github.com/Rohlik) +- [@Rzeszow](https://github.com/Rzeszow) +- [@TAdeJong](https://github.com/TAdeJong) +- [@TobiasKappe](https://github.com/TobiasKappe) +- [@TriPhoenix](https://github.com/TriPhoenix) +- [@aditya19496](https://github.com/aditya19496) +- [@alexbrazier](https://github.com/alexbrazier) +- [@antaryami-sahoo](https://github.com/antaryami-sahoo) +- [@arminfelder](https://github.com/arminfelder) +- [@astax-t](https://github.com/astax-t) +- [@ccfang](https://github.com/ccfang) +- [@cnash](https://github.com/cnash) +- [@cyclops24](https://github.com/cyclops24) +- [@danischreiber](https://github.com/danischreiber) +- [@gdelavald](https://github.com/gdelavald) +- [@goiaba](https://github.com/goiaba) +- [@jangmarker](https://github.com/jangmarker) +- [@josiasds](https://github.com/josiasds) +- [@karlprieb](https://github.com/karlprieb) +- [@luizbills](https://github.com/luizbills) +- [@maarten-v](https://github.com/maarten-v) +- [@matheusml](https://github.com/matheusml) +- [@mboudet](https://github.com/mboudet) +- [@nishimaki10](https://github.com/nishimaki10) +- [@pkgodara](https://github.com/pkgodara) +- [@rafaelks](https://github.com/rafaelks) +- [@rdebeasi](https://github.com/rdebeasi) +- [@reist](https://github.com/reist) +- [@ruKurz](https://github.com/ruKurz) +- [@snoozan](https://github.com/snoozan) +- [@szluohua](https://github.com/szluohua) +- [@vcapretz](https://github.com/vcapretz) +- [@xurizaemon](https://github.com/xurizaemon) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@marceloschmidt](https://github.com/marceloschmidt) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.58.4 +`2017-10-05 · 3 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `4.8.4` +- NPM: `4.6.1` + +### 🐛 Bug fixes + + +- Add needed dependency for snaps ([#8389](https://github.com/RocketChat/Rocket.Chat/pull/8389)) + +- Duplicate code in rest api letting in a few bugs with the rest api ([#8408](https://github.com/RocketChat/Rocket.Chat/pull/8408)) + +- Slack import failing and not being able to be restarted ([#8390](https://github.com/RocketChat/Rocket.Chat/pull/8390)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@graywolf336](https://github.com/graywolf336) + +# 0.58.2 +`2017-08-22 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `4.8.4` +- NPM: `4.6.1` + +
+🔍 Minor changes + + +- Release 0.58.2 ([#7841](https://github.com/RocketChat/Rocket.Chat/pull/7841) by [@snoozan](https://github.com/snoozan)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@snoozan](https://github.com/snoozan) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@geekgonecrazy](https://github.com/geekgonecrazy) + +# 0.58.1 +`2017-08-17 · 1 🐛 · 1 🔍 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `4.8.4` +- NPM: `4.6.1` + +### 🐛 Bug fixes + + +- Fix flex tab not opening and getting offscreen ([#7781](https://github.com/RocketChat/Rocket.Chat/pull/7781)) + +
+🔍 Minor changes + + +- Release 0.58.1 ([#7782](https://github.com/RocketChat/Rocket.Chat/pull/7782)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@rodrigok](https://github.com/rodrigok) + +# 0.58.0 +`2017-08-16 · 1 ️️️⚠️ · 27 🎉 · 48 🐛 · 19 🔍 · 32 👩‍💻👨‍💻` + +### Engine versions +- Node: `4.8.4` +- NPM: `4.6.1` + +### ⚠️ BREAKING CHANGES + + +- Remove Sandstorm login method ([#7556](https://github.com/RocketChat/Rocket.Chat/pull/7556)) + +### 🎉 New features + + +- Add admin and user setting for notifications #4339 ([#7479](https://github.com/RocketChat/Rocket.Chat/pull/7479) by [@stalley](https://github.com/stalley)) + +- Add close button to flex tabs ([#7529](https://github.com/RocketChat/Rocket.Chat/pull/7529)) + +- Add customFields in rooms/get method ([#6564](https://github.com/RocketChat/Rocket.Chat/pull/6564) by [@borsden](https://github.com/borsden)) + +- Add healthchecks in OpenShift templates ([#7184](https://github.com/RocketChat/Rocket.Chat/pull/7184) by [@jfchevrette](https://github.com/jfchevrette)) + +- Add reaction to the last message when get the shortcut +: ([#7569](https://github.com/RocketChat/Rocket.Chat/pull/7569) by [@danilomiranda](https://github.com/danilomiranda)) + +- Add room type identifier to room list header ([#7520](https://github.com/RocketChat/Rocket.Chat/pull/7520) by [@danischreiber](https://github.com/danischreiber)) + +- Add setting to change User Agent of OEmbed calls ([#6753](https://github.com/RocketChat/Rocket.Chat/pull/6753) by [@AhmetS](https://github.com/AhmetS)) + +- Add toolbar buttons for iframe API ([#7525](https://github.com/RocketChat/Rocket.Chat/pull/7525)) + +- Add unread options for direct messages ([#7658](https://github.com/RocketChat/Rocket.Chat/pull/7658)) + +- Adding support for piwik sub domain settings ([#7324](https://github.com/RocketChat/Rocket.Chat/pull/7324) by [@ruKurz](https://github.com/ruKurz)) + +- Adds preference to one-click-to-direct-message and basic functionality ([#7564](https://github.com/RocketChat/Rocket.Chat/pull/7564) by [@gdelavald](https://github.com/gdelavald)) + +- Allow channel property in the integrations returned content ([#7214](https://github.com/RocketChat/Rocket.Chat/pull/7214)) + +- Allow special chars on room names ([#7595](https://github.com/RocketChat/Rocket.Chat/pull/7595)) + +- Closes tab bar on mobile when leaving room ([#7561](https://github.com/RocketChat/Rocket.Chat/pull/7561) by [@gdelavald](https://github.com/gdelavald)) + +- Configurable Volume for Notifications #6087 ([#7517](https://github.com/RocketChat/Rocket.Chat/pull/7517) by [@lindoelio](https://github.com/lindoelio)) + +- Do not rate limit bots on createDirectMessage ([#7326](https://github.com/RocketChat/Rocket.Chat/pull/7326) by [@jangmarker](https://github.com/jangmarker)) + +- Edit user permissions ([#7309](https://github.com/RocketChat/Rocket.Chat/pull/7309)) + +- flex-tab now is side by side with message list ([#7448](https://github.com/RocketChat/Rocket.Chat/pull/7448) by [@karlprieb](https://github.com/karlprieb)) + +- Force use of MongoDB for spotlight queries ([#7311](https://github.com/RocketChat/Rocket.Chat/pull/7311)) + +- Option to select unread count behavior ([#7477](https://github.com/RocketChat/Rocket.Chat/pull/7477)) + +- Option to select unread count style ([#7589](https://github.com/RocketChat/Rocket.Chat/pull/7589)) + +- Room type and recipient data for global event ([#7523](https://github.com/RocketChat/Rocket.Chat/pull/7523) by [@danischreiber](https://github.com/danischreiber)) + +- Search users also by email in toolbar ([#7334](https://github.com/RocketChat/Rocket.Chat/pull/7334) by [@shahar3012](https://github.com/shahar3012)) + +- Show different shape for alert numbers when have mentions ([#7580](https://github.com/RocketChat/Rocket.Chat/pull/7580)) + +- Show emojis and file uploads on notifications ([#7559](https://github.com/RocketChat/Rocket.Chat/pull/7559)) + +- Show room leader at top of chat when user scrolls down. Set and unset leader as admin. ([#7526](https://github.com/RocketChat/Rocket.Chat/pull/7526) by [@danischreiber](https://github.com/danischreiber)) + +- Update meteor to 1.5.1 ([#7496](https://github.com/RocketChat/Rocket.Chat/pull/7496)) + +### 🐛 Bug fixes + + +- "requirePasswordChange" property not being saved when set to false ([#7209](https://github.com/RocketChat/Rocket.Chat/pull/7209)) + +- Add needed dependency for snaps ([#8389](https://github.com/RocketChat/Rocket.Chat/pull/8389)) + +- Always set LDAP properties on login ([#7472](https://github.com/RocketChat/Rocket.Chat/pull/7472)) + +- Csv importer: work with more problematic data ([#7456](https://github.com/RocketChat/Rocket.Chat/pull/7456) by [@reist](https://github.com/reist)) + +- Duplicate code in rest api letting in a few bugs with the rest api ([#8408](https://github.com/RocketChat/Rocket.Chat/pull/8408)) + +- Error when acessing settings before ready ([#7622](https://github.com/RocketChat/Rocket.Chat/pull/7622)) + +- Error when updating message with an empty attachment array ([#7624](https://github.com/RocketChat/Rocket.Chat/pull/7624)) + +- Fix admin room list show the correct i18n type ([#7582](https://github.com/RocketChat/Rocket.Chat/pull/7582) by [@ccfang](https://github.com/ccfang)) + +- Fix Block Delete Message After (n) Minutes ([#7207](https://github.com/RocketChat/Rocket.Chat/pull/7207)) + +- Fix Custom Fields Crashing on Register ([#7617](https://github.com/RocketChat/Rocket.Chat/pull/7617)) + +- Fix editing others messages ([#7200](https://github.com/RocketChat/Rocket.Chat/pull/7200)) + +- Fix Emails in User Admin View ([#7431](https://github.com/RocketChat/Rocket.Chat/pull/7431)) + +- Fix emoji picker translations ([#7195](https://github.com/RocketChat/Rocket.Chat/pull/7195)) + +- Fix error on image preview due to undefined description|title ([#7187](https://github.com/RocketChat/Rocket.Chat/pull/7187)) + +- Fix file upload on Slack import ([#7469](https://github.com/RocketChat/Rocket.Chat/pull/7469)) + +- Fix geolocation button ([#7322](https://github.com/RocketChat/Rocket.Chat/pull/7322)) + +- Fix hiding flex-tab on embedded view ([#7486](https://github.com/RocketChat/Rocket.Chat/pull/7486)) + +- Fix jump to unread button ([#7320](https://github.com/RocketChat/Rocket.Chat/pull/7320)) + +- Fix messagebox growth ([#7629](https://github.com/RocketChat/Rocket.Chat/pull/7629)) + +- Fix migration of avatars from version 0.57.0 ([#7428](https://github.com/RocketChat/Rocket.Chat/pull/7428)) + +- Fix oembed previews not being shown ([#7208](https://github.com/RocketChat/Rocket.Chat/pull/7208)) + +- Fix Private Channel List Submit ([#7432](https://github.com/RocketChat/Rocket.Chat/pull/7432)) + +- Fix room load on first hit ([#7687](https://github.com/RocketChat/Rocket.Chat/pull/7687)) + +- Fix Secret Url ([#7321](https://github.com/RocketChat/Rocket.Chat/pull/7321)) + +- Fix Unread Bar Disappearing ([#7403](https://github.com/RocketChat/Rocket.Chat/pull/7403)) + +- Fix Word Placement Anywhere on WebHooks ([#7392](https://github.com/RocketChat/Rocket.Chat/pull/7392)) + +- Issue #7365: added check for the existence of a parameter in the CAS URL ([#7471](https://github.com/RocketChat/Rocket.Chat/pull/7471) by [@wsw70](https://github.com/wsw70)) + +- Look for livechat visitor IP address on X-Forwarded-For header ([#7554](https://github.com/RocketChat/Rocket.Chat/pull/7554)) + +- make flex-tab visible again when reduced width ([#7738](https://github.com/RocketChat/Rocket.Chat/pull/7738)) + +- Markdown noopener/noreferrer: use correct HTML attribute ([#7644](https://github.com/RocketChat/Rocket.Chat/pull/7644) by [@jangmarker](https://github.com/jangmarker)) + +- Message box on safari ([#7621](https://github.com/RocketChat/Rocket.Chat/pull/7621)) + +- Prevent new room status from playing when user status changes ([#7487](https://github.com/RocketChat/Rocket.Chat/pull/7487)) + +- Remove warning about 2FA support being unavailable in mobile apps ([#7354](https://github.com/RocketChat/Rocket.Chat/pull/7354) by [@al3x](https://github.com/al3x)) + +- Revert emojione package version upgrade ([#7557](https://github.com/RocketChat/Rocket.Chat/pull/7557)) + +- S3 uploads not working for custom URLs ([#7443](https://github.com/RocketChat/Rocket.Chat/pull/7443)) + +- Slack import failing and not being able to be restarted ([#8390](https://github.com/RocketChat/Rocket.Chat/pull/8390)) + +- Stop logging mentions object to console ([#7562](https://github.com/RocketChat/Rocket.Chat/pull/7562) by [@gdelavald](https://github.com/gdelavald)) + +- Sweet-Alert modal popup position on mobile devices ([#7376](https://github.com/RocketChat/Rocket.Chat/pull/7376) by [@Oliver84](https://github.com/Oliver84)) + +- sweetalert alignment on mobile ([#7404](https://github.com/RocketChat/Rocket.Chat/pull/7404) by [@karlprieb](https://github.com/karlprieb)) + +- The username not being allowed to be passed into the user.setAvatar ([#7620](https://github.com/RocketChat/Rocket.Chat/pull/7620)) + +- Update node-engine in Snap to latest v4 LTS relase: 4.8.3 ([#7355](https://github.com/RocketChat/Rocket.Chat/pull/7355) by [@al3x](https://github.com/al3x)) + +- Uploading an unknown file type erroring out ([#7623](https://github.com/RocketChat/Rocket.Chat/pull/7623)) + +- url click events in the cordova app open in external browser or not at all ([#7205](https://github.com/RocketChat/Rocket.Chat/pull/7205) by [@flaviogrossi](https://github.com/flaviogrossi)) + +- URL parse error fix for issue #7169 ([#7538](https://github.com/RocketChat/Rocket.Chat/pull/7538) by [@satyapramodh](https://github.com/satyapramodh)) + +- Use I18n on "File Uploaded" ([#7199](https://github.com/RocketChat/Rocket.Chat/pull/7199)) + +- User avatar image background ([#7572](https://github.com/RocketChat/Rocket.Chat/pull/7572) by [@filipedelimabrito](https://github.com/filipedelimabrito)) + +- Wrong email subject when "All Messages" setting enabled ([#7639](https://github.com/RocketChat/Rocket.Chat/pull/7639)) + +- Wrong render of snippet’s name ([#7630](https://github.com/RocketChat/Rocket.Chat/pull/7630)) + +
+🔍 Minor changes + + +- [Fix] Don't save user to DB when a custom field is invalid ([#7513](https://github.com/RocketChat/Rocket.Chat/pull/7513) by [@Darkneon](https://github.com/Darkneon)) + +- [New] Add instance id to response headers ([#7211](https://github.com/RocketChat/Rocket.Chat/pull/7211)) + +- Add helm chart kubernetes deployment ([#6340](https://github.com/RocketChat/Rocket.Chat/pull/6340) by [@pierreozoux](https://github.com/pierreozoux)) + +- Add missing parts of `one click to direct message` ([#7608](https://github.com/RocketChat/Rocket.Chat/pull/7608)) + +- Better Issue Template ([#7492](https://github.com/RocketChat/Rocket.Chat/pull/7492)) + +- Develop sync ([#7590](https://github.com/RocketChat/Rocket.Chat/pull/7590)) + +- Develop sync ([#7500](https://github.com/RocketChat/Rocket.Chat/pull/7500) by [@thinkeridea](https://github.com/thinkeridea)) + +- Develop sync ([#7363](https://github.com/RocketChat/Rocket.Chat/pull/7363) by [@JSzaszvari](https://github.com/JSzaszvari)) + +- Escape error messages ([#7308](https://github.com/RocketChat/Rocket.Chat/pull/7308)) + +- Fix the Zapier oAuth return url to the new one ([#7215](https://github.com/RocketChat/Rocket.Chat/pull/7215)) + +- Improve link parser using tokens ([#7615](https://github.com/RocketChat/Rocket.Chat/pull/7615)) + +- Improve login error messages ([#7616](https://github.com/RocketChat/Rocket.Chat/pull/7616)) + +- Improve room leader ([#7578](https://github.com/RocketChat/Rocket.Chat/pull/7578)) + +- LingoHub based on develop ([#7613](https://github.com/RocketChat/Rocket.Chat/pull/7613)) + +- LingoHub based on develop ([#7594](https://github.com/RocketChat/Rocket.Chat/pull/7594)) + +- Only use "File Uploaded" prefix on files ([#7652](https://github.com/RocketChat/Rocket.Chat/pull/7652)) + +- Release 0.58.0 ([#7752](https://github.com/RocketChat/Rocket.Chat/pull/7752) by [@flaviogrossi](https://github.com/flaviogrossi) & [@jangmarker](https://github.com/jangmarker) & [@karlprieb](https://github.com/karlprieb) & [@pierreozoux](https://github.com/pierreozoux) & [@ryoshimizu](https://github.com/ryoshimizu)) + +- Sync Master with 0.57.3 ([#7690](https://github.com/RocketChat/Rocket.Chat/pull/7690)) + +- update meteor to 1.5.0 ([#7287](https://github.com/RocketChat/Rocket.Chat/pull/7287)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@AhmetS](https://github.com/AhmetS) +- [@Darkneon](https://github.com/Darkneon) +- [@JSzaszvari](https://github.com/JSzaszvari) +- [@Oliver84](https://github.com/Oliver84) +- [@al3x](https://github.com/al3x) +- [@borsden](https://github.com/borsden) +- [@ccfang](https://github.com/ccfang) +- [@danilomiranda](https://github.com/danilomiranda) +- [@danischreiber](https://github.com/danischreiber) +- [@filipedelimabrito](https://github.com/filipedelimabrito) +- [@flaviogrossi](https://github.com/flaviogrossi) +- [@gdelavald](https://github.com/gdelavald) +- [@jangmarker](https://github.com/jangmarker) +- [@jfchevrette](https://github.com/jfchevrette) +- [@karlprieb](https://github.com/karlprieb) +- [@lindoelio](https://github.com/lindoelio) +- [@pierreozoux](https://github.com/pierreozoux) +- [@reist](https://github.com/reist) +- [@ruKurz](https://github.com/ruKurz) +- [@ryoshimizu](https://github.com/ryoshimizu) +- [@satyapramodh](https://github.com/satyapramodh) +- [@shahar3012](https://github.com/shahar3012) +- [@stalley](https://github.com/stalley) +- [@thinkeridea](https://github.com/thinkeridea) +- [@wsw70](https://github.com/wsw70) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.57.4 +`2017-10-05 · 3 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `4.8.2` +- NPM: `4.5.0` + +### 🐛 Bug fixes + + +- Add needed dependency for snaps ([#8389](https://github.com/RocketChat/Rocket.Chat/pull/8389)) + +- Duplicate code in rest api letting in a few bugs with the rest api ([#8408](https://github.com/RocketChat/Rocket.Chat/pull/8408)) + +- Slack import failing and not being able to be restarted ([#8390](https://github.com/RocketChat/Rocket.Chat/pull/8390)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@graywolf336](https://github.com/graywolf336) + +# 0.57.3 +`2017-08-08 · 8 🐛 · 1 🔍 · 7 👩‍💻👨‍💻` + +### Engine versions +- Node: `4.8.2` +- NPM: `4.5.0` + +### 🐛 Bug fixes + + +- custom soundEdit.html ([#7390](https://github.com/RocketChat/Rocket.Chat/pull/7390) by [@rasos](https://github.com/rasos)) + +- file upload broken when running in subdirectory https://github.com… ([#7395](https://github.com/RocketChat/Rocket.Chat/pull/7395) by [@ryoshimizu](https://github.com/ryoshimizu)) + +- Fix Anonymous User ([#7444](https://github.com/RocketChat/Rocket.Chat/pull/7444)) + +- Fix Join Channel Without Preview Room Permission ([#7535](https://github.com/RocketChat/Rocket.Chat/pull/7535)) + +- Improve build script example ([#7555](https://github.com/RocketChat/Rocket.Chat/pull/7555)) + +- Missing eventName in unUser ([#7533](https://github.com/RocketChat/Rocket.Chat/pull/7533) by [@Darkneon](https://github.com/Darkneon)) + +- Modernize rate limiting of sendMessage ([#7325](https://github.com/RocketChat/Rocket.Chat/pull/7325) by [@jangmarker](https://github.com/jangmarker)) + +- Use UTF8 setting for /create command ([#7394](https://github.com/RocketChat/Rocket.Chat/pull/7394)) + +
+🔍 Minor changes + + +- [Fix] Users and Channels list not respecting permissions ([#7212](https://github.com/RocketChat/Rocket.Chat/pull/7212)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Darkneon](https://github.com/Darkneon) +- [@jangmarker](https://github.com/jangmarker) +- [@rasos](https://github.com/rasos) +- [@ryoshimizu](https://github.com/ryoshimizu) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@graywolf336](https://github.com/graywolf336) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.57.2 +`2017-07-14 · 6 🐛 · 3 👩‍💻👨‍💻` + +### Engine versions +- Node: `4.8.2` +- NPM: `4.5.0` + +### 🐛 Bug fixes + + +- Always set LDAP properties on login ([#7472](https://github.com/RocketChat/Rocket.Chat/pull/7472)) + +- Fix Emails in User Admin View ([#7431](https://github.com/RocketChat/Rocket.Chat/pull/7431)) + +- Fix file upload on Slack import ([#7469](https://github.com/RocketChat/Rocket.Chat/pull/7469)) + +- Fix Private Channel List Submit ([#7432](https://github.com/RocketChat/Rocket.Chat/pull/7432)) + +- Fix Unread Bar Disappearing ([#7403](https://github.com/RocketChat/Rocket.Chat/pull/7403)) + +- S3 uploads not working for custom URLs ([#7443](https://github.com/RocketChat/Rocket.Chat/pull/7443)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.57.1 +`2017-07-05 · 1 🐛 · 2 👩‍💻👨‍💻` + +### Engine versions +- Node: `4.8.2` +- NPM: `4.5.0` + +### 🐛 Bug fixes + + +- Fix migration of avatars from version 0.57.0 ([#7428](https://github.com/RocketChat/Rocket.Chat/pull/7428)) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.57.0 +`2017-07-03 · 1 ️️️⚠️ · 12 🎉 · 45 🐛 · 29 🔍 · 25 👩‍💻👨‍💻` + +### Engine versions +- Node: `4.8.2` +- NPM: `4.5.0` + +### ⚠️ BREAKING CHANGES + + +- Internal hubot does not load hubot-scripts anymore, it loads scripts from custom folders ([#7095](https://github.com/RocketChat/Rocket.Chat/pull/7095)) + +### 🎉 New features + + +- API method and REST Endpoint for getting a single message by id ([#7085](https://github.com/RocketChat/Rocket.Chat/pull/7085)) + +- Feature/delete any message permission ([#6919](https://github.com/RocketChat/Rocket.Chat/pull/6919) by [@phutchins](https://github.com/phutchins)) + +- Force use of MongoDB for spotlight queries ([#7311](https://github.com/RocketChat/Rocket.Chat/pull/7311)) + +- Improve CI/Docker build/release ([#6938](https://github.com/RocketChat/Rocket.Chat/pull/6938)) + +- Increase unread message count on @here mention ([#7059](https://github.com/RocketChat/Rocket.Chat/pull/7059)) + +- Make channel/group delete call answer to roomName ([#6857](https://github.com/RocketChat/Rocket.Chat/pull/6857) by [@reist](https://github.com/reist)) + +- Migration to add tags to email header and footer ([#7080](https://github.com/RocketChat/Rocket.Chat/pull/7080)) + +- New avatar storage types ([#6788](https://github.com/RocketChat/Rocket.Chat/pull/6788)) + +- postcss parser and cssnext implementation ([#6982](https://github.com/RocketChat/Rocket.Chat/pull/6982)) + +- Show full name in mentions if use full name setting enabled ([#6690](https://github.com/RocketChat/Rocket.Chat/pull/6690) by [@alexbrazier](https://github.com/alexbrazier)) + +- Show info about multiple instances at admin page ([#6953](https://github.com/RocketChat/Rocket.Chat/pull/6953)) + +- Start running unit tests ([#6605](https://github.com/RocketChat/Rocket.Chat/pull/6605)) + +### 🐛 Bug fixes + + +- "requirePasswordChange" property not being saved when set to false ([#7209](https://github.com/RocketChat/Rocket.Chat/pull/7209)) + +- Add and to header and footer ([#7025](https://github.com/RocketChat/Rocket.Chat/pull/7025) by [@ExTechOp](https://github.com/ExTechOp)) + +- Add option to ignore TLS in SMTP server settings ([#7084](https://github.com/RocketChat/Rocket.Chat/pull/7084) by [@colin-campbell](https://github.com/colin-campbell)) + +- Add support for carriage return in markdown code blocks ([#7072](https://github.com/RocketChat/Rocket.Chat/pull/7072) by [@jm-factorin](https://github.com/jm-factorin)) + +- Allow image insert from slack through slackbridge ([#6910](https://github.com/RocketChat/Rocket.Chat/pull/6910)) + +- Bugs in `isUserFromParams` helper ([#6904](https://github.com/RocketChat/Rocket.Chat/pull/6904) by [@abrom](https://github.com/abrom)) + +- Check that username is not in the room when being muted / unmuted ([#6840](https://github.com/RocketChat/Rocket.Chat/pull/6840) by [@matthewshirley](https://github.com/matthewshirley)) + +- click on image in a message ([#7345](https://github.com/RocketChat/Rocket.Chat/pull/7345)) + +- clipboard (permalink, copy, pin, star buttons) ([#7103](https://github.com/RocketChat/Rocket.Chat/pull/7103)) + +- do only store password if LDAP_Login_Fallback is on ([#7030](https://github.com/RocketChat/Rocket.Chat/pull/7030) by [@pmb0](https://github.com/pmb0)) + +- edit button on firefox ([#7105](https://github.com/RocketChat/Rocket.Chat/pull/7105)) + +- Fix all reactions having the same username ([#7157](https://github.com/RocketChat/Rocket.Chat/pull/7157)) + +- Fix avatar upload via users.setAvatar REST endpoint ([#7045](https://github.com/RocketChat/Rocket.Chat/pull/7045)) + +- Fix badge counter on iOS push notifications ([#6950](https://github.com/RocketChat/Rocket.Chat/pull/6950)) + +- fix bug in preview image ([#7121](https://github.com/RocketChat/Rocket.Chat/pull/7121)) + +- Fix editing others messages ([#7200](https://github.com/RocketChat/Rocket.Chat/pull/7200)) + +- Fix error handling for non-valid avatar URL ([#6972](https://github.com/RocketChat/Rocket.Chat/pull/6972)) + +- Fix highlightjs bug ([#6991](https://github.com/RocketChat/Rocket.Chat/pull/6991)) + +- Fix jump to unread button ([#7320](https://github.com/RocketChat/Rocket.Chat/pull/7320)) + +- Fix login with Meteor saving an object as email address ([#6974](https://github.com/RocketChat/Rocket.Chat/pull/6974)) + +- Fix missing CSS files on production builds ([#7104](https://github.com/RocketChat/Rocket.Chat/pull/7104)) + +- Fix oembed previews not being shown ([#7208](https://github.com/RocketChat/Rocket.Chat/pull/7208)) + +- Fix Secret Url ([#7321](https://github.com/RocketChat/Rocket.Chat/pull/7321)) + +- Fix the failing tests ([#7094](https://github.com/RocketChat/Rocket.Chat/pull/7094)) + +- Fix the other tests failing due chimp update ([#6986](https://github.com/RocketChat/Rocket.Chat/pull/6986)) + +- Fix user's customFields not being saved correctly ([#7358](https://github.com/RocketChat/Rocket.Chat/pull/7358)) + +- Fixed typo hmtl -> html ([#7092](https://github.com/RocketChat/Rocket.Chat/pull/7092) by [@jautero](https://github.com/jautero)) + +- Improve avatar migration ([#7352](https://github.com/RocketChat/Rocket.Chat/pull/7352)) + +- Improve Tests ([#7049](https://github.com/RocketChat/Rocket.Chat/pull/7049)) + +- make channels.create API check for create-c ([#6968](https://github.com/RocketChat/Rocket.Chat/pull/6968) by [@reist](https://github.com/reist)) + +- Message being displayed unescaped ([#7379](https://github.com/RocketChat/Rocket.Chat/pull/7379) by [@gdelavald](https://github.com/gdelavald)) + +- New screen sharing Chrome extension checking method ([#7044](https://github.com/RocketChat/Rocket.Chat/pull/7044)) + +- overlapping text for users-typing-message ([#6999](https://github.com/RocketChat/Rocket.Chat/pull/6999) by [@darkv](https://github.com/darkv)) + +- Parse HTML on admin setting's descriptions ([#7014](https://github.com/RocketChat/Rocket.Chat/pull/7014)) + +- Parse markdown links last ([#6997](https://github.com/RocketChat/Rocket.Chat/pull/6997)) + +- Prevent Ctrl key on message field from reloading messages list ([#7033](https://github.com/RocketChat/Rocket.Chat/pull/7033)) + +- Proxy upload to correct instance ([#7304](https://github.com/RocketChat/Rocket.Chat/pull/7304)) + +- Remove room from roomPick setting ([#6912](https://github.com/RocketChat/Rocket.Chat/pull/6912)) + +- Removing the kadira package install from example build script. ([#7160](https://github.com/RocketChat/Rocket.Chat/pull/7160) by [@JSzaszvari](https://github.com/JSzaszvari)) + +- SAML: Only set KeyDescriptor when non empty ([#6961](https://github.com/RocketChat/Rocket.Chat/pull/6961) by [@sathieu](https://github.com/sathieu)) + +- Sidenav roomlist ([#7023](https://github.com/RocketChat/Rocket.Chat/pull/7023)) + +- Slackbridge text replacements ([#6913](https://github.com/RocketChat/Rocket.Chat/pull/6913)) + +- Updating Incoming Integration Post As Field Not Allowed ([#6903](https://github.com/RocketChat/Rocket.Chat/pull/6903)) + +- Use AWS Signature Version 4 signed URLs for uploads ([#6947](https://github.com/RocketChat/Rocket.Chat/pull/6947)) + +- video message recording dialog is shown in an incorrect position ([#7012](https://github.com/RocketChat/Rocket.Chat/pull/7012) by [@flaviogrossi](https://github.com/flaviogrossi)) + +
+🔍 Minor changes + + +- [Fix] Error when trying to show preview of undefined filetype ([#6935](https://github.com/RocketChat/Rocket.Chat/pull/6935)) + +- [New] LDAP: Use variables in User_Data_FieldMap for name mapping ([#6921](https://github.com/RocketChat/Rocket.Chat/pull/6921) by [@bbrauns](https://github.com/bbrauns)) + +- add server methods getRoomNameById ([#7102](https://github.com/RocketChat/Rocket.Chat/pull/7102) by [@thinkeridea](https://github.com/thinkeridea)) + +- Convert file unsubscribe.coffee to js ([#7145](https://github.com/RocketChat/Rocket.Chat/pull/7145)) + +- Convert hipchat importer to js ([#7146](https://github.com/RocketChat/Rocket.Chat/pull/7146)) + +- Convert irc package to js ([#7022](https://github.com/RocketChat/Rocket.Chat/pull/7022)) + +- Convert Livechat from Coffeescript to JavaScript ([#7096](https://github.com/RocketChat/Rocket.Chat/pull/7096)) + +- Convert meteor-autocomplete package to js ([#6936](https://github.com/RocketChat/Rocket.Chat/pull/6936)) + +- Convert oauth2-server-config package to js ([#7017](https://github.com/RocketChat/Rocket.Chat/pull/7017)) + +- Convert Ui Account Package to Js ([#6795](https://github.com/RocketChat/Rocket.Chat/pull/6795)) + +- Convert ui-admin package to js ([#6911](https://github.com/RocketChat/Rocket.Chat/pull/6911)) + +- Convert WebRTC Package to Js ([#6775](https://github.com/RocketChat/Rocket.Chat/pull/6775)) + +- converted rocketchat-importer ([#7018](https://github.com/RocketChat/Rocket.Chat/pull/7018)) + +- converted rocketchat-ui coffee to js part 2 ([#6836](https://github.com/RocketChat/Rocket.Chat/pull/6836)) + +- Fix forbidden error on setAvatar REST endpoint ([#7159](https://github.com/RocketChat/Rocket.Chat/pull/7159)) + +- Fix mobile avatars ([#7177](https://github.com/RocketChat/Rocket.Chat/pull/7177)) + +- fix the crashing tests ([#6976](https://github.com/RocketChat/Rocket.Chat/pull/6976)) + +- Fix the Zapier oAuth return url to the new one ([#7215](https://github.com/RocketChat/Rocket.Chat/pull/7215)) + +- Ldap: User_Data_FieldMap description ([#7055](https://github.com/RocketChat/Rocket.Chat/pull/7055) by [@bbrauns](https://github.com/bbrauns)) + +- LingoHub based on develop ([#7114](https://github.com/RocketChat/Rocket.Chat/pull/7114)) + +- LingoHub based on develop ([#7005](https://github.com/RocketChat/Rocket.Chat/pull/7005)) + +- LingoHub based on develop ([#6978](https://github.com/RocketChat/Rocket.Chat/pull/6978)) + +- Remove missing CoffeeScript dependencies ([#7154](https://github.com/RocketChat/Rocket.Chat/pull/7154)) + +- Remove Useless Jasmine Tests ([#7062](https://github.com/RocketChat/Rocket.Chat/pull/7062)) + +- Rocketchat ui message ([#6914](https://github.com/RocketChat/Rocket.Chat/pull/6914)) + +- Rocketchat ui3 ([#7006](https://github.com/RocketChat/Rocket.Chat/pull/7006)) + +- rocketchat-importer-slack coffee to js ([#6987](https://github.com/RocketChat/Rocket.Chat/pull/6987)) + +- rocketchat-lib[4] coffee to js ([#6735](https://github.com/RocketChat/Rocket.Chat/pull/6735)) + +- Switch logic of artifact name ([#7158](https://github.com/RocketChat/Rocket.Chat/pull/7158)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@ExTechOp](https://github.com/ExTechOp) +- [@JSzaszvari](https://github.com/JSzaszvari) +- [@abrom](https://github.com/abrom) +- [@alexbrazier](https://github.com/alexbrazier) +- [@bbrauns](https://github.com/bbrauns) +- [@colin-campbell](https://github.com/colin-campbell) +- [@darkv](https://github.com/darkv) +- [@flaviogrossi](https://github.com/flaviogrossi) +- [@gdelavald](https://github.com/gdelavald) +- [@jautero](https://github.com/jautero) +- [@jm-factorin](https://github.com/jm-factorin) +- [@matthewshirley](https://github.com/matthewshirley) +- [@phutchins](https://github.com/phutchins) +- [@pmb0](https://github.com/pmb0) +- [@reist](https://github.com/reist) +- [@sathieu](https://github.com/sathieu) +- [@thinkeridea](https://github.com/thinkeridea) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@marceloschmidt](https://github.com/marceloschmidt) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.56.0 +`2017-05-15 · 11 🎉 · 21 🐛 · 19 🔍 · 19 👩‍💻👨‍💻` + +### Engine versions +- Node: `4.8.2` +- NPM: `4.5.0` + +### 🎉 New features + + +- Add a pointer cursor to message images ([#6881](https://github.com/RocketChat/Rocket.Chat/pull/6881)) + +- Add a setting to not run outgoing integrations on message edits ([#6615](https://github.com/RocketChat/Rocket.Chat/pull/6615)) + +- Add option on Channel Settings: Hide Notifications and Hide Unread Room Status (#2707, #2143) ([#5373](https://github.com/RocketChat/Rocket.Chat/pull/5373)) + +- Add SMTP settings for Protocol and Pool ([#6940](https://github.com/RocketChat/Rocket.Chat/pull/6940)) + +- create a method 'create token' ([#6807](https://github.com/RocketChat/Rocket.Chat/pull/6807)) + +- Improve CI/Docker build/release ([#6938](https://github.com/RocketChat/Rocket.Chat/pull/6938)) + +- Make channels.info accept roomName, just like groups.info ([#6827](https://github.com/RocketChat/Rocket.Chat/pull/6827) by [@reist](https://github.com/reist)) + +- Option to allow to signup as anonymous ([#6797](https://github.com/RocketChat/Rocket.Chat/pull/6797)) + +- Remove lesshat ([#6722](https://github.com/RocketChat/Rocket.Chat/pull/6722) by [@karlprieb](https://github.com/karlprieb)) + +- Show info about multiple instances at admin page ([#6953](https://github.com/RocketChat/Rocket.Chat/pull/6953)) + +- Use tokenSentVia parameter for clientid/secret to token endpoint ([#6692](https://github.com/RocketChat/Rocket.Chat/pull/6692) by [@intelradoux](https://github.com/intelradoux)) + +### 🐛 Bug fixes + + +- Added helper for testing if the current user matches the params ([#6845](https://github.com/RocketChat/Rocket.Chat/pull/6845) by [@abrom](https://github.com/abrom)) + +- Archiving Direct Messages ([#6737](https://github.com/RocketChat/Rocket.Chat/pull/6737)) + +- Compile CSS color variables ([#6939](https://github.com/RocketChat/Rocket.Chat/pull/6939)) + +- CSV importer: require that there is some data in the zip, not ALL data ([#6768](https://github.com/RocketChat/Rocket.Chat/pull/6768) by [@reist](https://github.com/reist)) + +- emoji picker exception ([#6709](https://github.com/RocketChat/Rocket.Chat/pull/6709) by [@gdelavald](https://github.com/gdelavald)) + +- Fix Caddy by forcing go 1.7 as needed by one of caddy's dependencies ([#6721](https://github.com/RocketChat/Rocket.Chat/pull/6721)) + +- fix german translation ([#6790](https://github.com/RocketChat/Rocket.Chat/pull/6790) by [@sscholl](https://github.com/sscholl)) + +- Fix iframe wise issues ([#6798](https://github.com/RocketChat/Rocket.Chat/pull/6798)) + +- Fix message types ([#6704](https://github.com/RocketChat/Rocket.Chat/pull/6704)) + +- Hides nav buttons when selecting own profile ([#6760](https://github.com/RocketChat/Rocket.Chat/pull/6760) by [@gdelavald](https://github.com/gdelavald)) + +- Improve and correct Iframe Integration help text ([#6793](https://github.com/RocketChat/Rocket.Chat/pull/6793)) + +- Incorrect error message when creating channel ([#6747](https://github.com/RocketChat/Rocket.Chat/pull/6747) by [@gdelavald](https://github.com/gdelavald)) + +- make channels.create API check for create-c ([#6968](https://github.com/RocketChat/Rocket.Chat/pull/6968) by [@reist](https://github.com/reist)) + +- Not showing unread count on electron app’s icon ([#6923](https://github.com/RocketChat/Rocket.Chat/pull/6923)) + +- Quoted and replied messages not retaining the original message's alias ([#6800](https://github.com/RocketChat/Rocket.Chat/pull/6800)) + +- Remove spaces from env PORT and INSTANCE_IP ([#6955](https://github.com/RocketChat/Rocket.Chat/pull/6955)) + +- REST API user.update throwing error due to rate limiting ([#6796](https://github.com/RocketChat/Rocket.Chat/pull/6796)) + +- Search full name on client side ([#6767](https://github.com/RocketChat/Rocket.Chat/pull/6767) by [@alexbrazier](https://github.com/alexbrazier)) + +- Sort by real name if use real name setting is enabled ([#6758](https://github.com/RocketChat/Rocket.Chat/pull/6758) by [@alexbrazier](https://github.com/alexbrazier)) + +- start/unstar message ([#6861](https://github.com/RocketChat/Rocket.Chat/pull/6861)) + +- Users status on main menu always offline ([#6896](https://github.com/RocketChat/Rocket.Chat/pull/6896)) + +
+🔍 Minor changes + + +- [Fix] Error when trying to show preview of undefined filetype ([#6935](https://github.com/RocketChat/Rocket.Chat/pull/6935)) + +- [New] Snap arm support ([#6842](https://github.com/RocketChat/Rocket.Chat/pull/6842)) + +- Anonymous use ([#5986](https://github.com/RocketChat/Rocket.Chat/pull/5986)) + +- Breaking long URLS to prevent overflow ([#6368](https://github.com/RocketChat/Rocket.Chat/pull/6368) by [@robertdown](https://github.com/robertdown)) + +- Convert Katex Package to Js ([#6671](https://github.com/RocketChat/Rocket.Chat/pull/6671)) + +- Convert Mailer Package to Js ([#6780](https://github.com/RocketChat/Rocket.Chat/pull/6780)) + +- Convert markdown to js ([#6694](https://github.com/RocketChat/Rocket.Chat/pull/6694) by [@ehkasper](https://github.com/ehkasper)) + +- Convert Mentions-Flextab Package to Js ([#6689](https://github.com/RocketChat/Rocket.Chat/pull/6689)) + +- Convert Message-Star Package to js ([#6781](https://github.com/RocketChat/Rocket.Chat/pull/6781)) + +- Convert Oembed Package to Js ([#6688](https://github.com/RocketChat/Rocket.Chat/pull/6688)) + +- Converted rocketchat-lib 3 ([#6672](https://github.com/RocketChat/Rocket.Chat/pull/6672)) + +- disable proxy configuration ([#6654](https://github.com/RocketChat/Rocket.Chat/pull/6654) by [@glehmann](https://github.com/glehmann)) + +- LingoHub based on develop ([#6816](https://github.com/RocketChat/Rocket.Chat/pull/6816)) + +- LingoHub based on develop ([#6715](https://github.com/RocketChat/Rocket.Chat/pull/6715)) + +- LingoHub based on develop ([#6703](https://github.com/RocketChat/Rocket.Chat/pull/6703)) + +- Meteor update ([#6858](https://github.com/RocketChat/Rocket.Chat/pull/6858)) + +- meteor update to 1.4.4 ([#6706](https://github.com/RocketChat/Rocket.Chat/pull/6706)) + +- Missing useful fields in admin user list #5110 ([#6804](https://github.com/RocketChat/Rocket.Chat/pull/6804) by [@vlogic](https://github.com/vlogic)) + +- Rocketchat lib2 ([#6593](https://github.com/RocketChat/Rocket.Chat/pull/6593)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@abrom](https://github.com/abrom) +- [@alexbrazier](https://github.com/alexbrazier) +- [@ehkasper](https://github.com/ehkasper) +- [@gdelavald](https://github.com/gdelavald) +- [@glehmann](https://github.com/glehmann) +- [@intelradoux](https://github.com/intelradoux) +- [@karlprieb](https://github.com/karlprieb) +- [@reist](https://github.com/reist) +- [@robertdown](https://github.com/robertdown) +- [@sscholl](https://github.com/sscholl) +- [@vlogic](https://github.com/vlogic) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@marceloschmidt](https://github.com/marceloschmidt) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) + +# 0.55.1 +`2017-04-19 · 1 🔍 · 1 👩‍💻👨‍💻` + +### Engine versions +- Node: `4.8.0` +- NPM: `4.3.0` + +
+🔍 Minor changes + + +- [Fix] Bug with incoming integration (0.55.1) ([#6734](https://github.com/RocketChat/Rocket.Chat/pull/6734)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@rodrigok](https://github.com/rodrigok) + +# 0.55.0 +`2017-04-18 · 1 ️️️⚠️ · 9 🎉 · 25 🐛 · 87 🔍 · 23 👩‍💻👨‍💻` + +### Engine versions +- Node: `4.8.0` +- NPM: `4.3.0` + +### ⚠️ BREAKING CHANGES + + +- `getUsersOfRoom` API to return array of objects with user and username, instead of array of strings + +### 🎉 New features + + +- 'users.resetAvatar' rest api endpoint ([#6616](https://github.com/RocketChat/Rocket.Chat/pull/6616)) + +- Add monitoring package ([#6634](https://github.com/RocketChat/Rocket.Chat/pull/6634)) + +- Add shield.svg api route to generate custom shields/badges ([#6565](https://github.com/RocketChat/Rocket.Chat/pull/6565) by [@alexbrazier](https://github.com/alexbrazier)) + +- Drupal oAuth Integration for Rocketchat ([#6632](https://github.com/RocketChat/Rocket.Chat/pull/6632) by [@Lawri-van-Buel](https://github.com/Lawri-van-Buel)) + +- Expose Livechat to Incoming Integrations and allow response ([#6681](https://github.com/RocketChat/Rocket.Chat/pull/6681)) + +- Integrations, both incoming and outgoing, now have access to the models. Example: `Users.findOneById(id)` ([#6420](https://github.com/RocketChat/Rocket.Chat/pull/6420)) + +- Permission `join-without-join-code` assigned to admins and bots by default ([#6430](https://github.com/RocketChat/Rocket.Chat/pull/6430)) + +- resolve merge share function ([#6577](https://github.com/RocketChat/Rocket.Chat/pull/6577) by [@karlprieb](https://github.com/karlprieb) & [@tgxn](https://github.com/tgxn)) + +- Two Factor Auth ([#6476](https://github.com/RocketChat/Rocket.Chat/pull/6476)) + +### 🐛 Bug fixes + + +- Accounts from LinkedIn OAuth without name ([#6590](https://github.com/RocketChat/Rocket.Chat/pull/6590)) + +- Administrators being rate limited when editing users data ([#6659](https://github.com/RocketChat/Rocket.Chat/pull/6659)) + +- Allow question on OAuth token path ([#6684](https://github.com/RocketChat/Rocket.Chat/pull/6684)) + +- arguments logger ([#6617](https://github.com/RocketChat/Rocket.Chat/pull/6617)) + +- can not get access_token when using custom oauth ([#6531](https://github.com/RocketChat/Rocket.Chat/pull/6531) by [@fengt](https://github.com/fengt)) + +- Do not add default roles for users without services field ([#6594](https://github.com/RocketChat/Rocket.Chat/pull/6594)) + +- Do not escaping markdown on message attachments ([#6648](https://github.com/RocketChat/Rocket.Chat/pull/6648)) + +- Downgrade email package to from 1.2.0 to 1.1.18 ([#6680](https://github.com/RocketChat/Rocket.Chat/pull/6680)) + +- emoji picker exception ([#6709](https://github.com/RocketChat/Rocket.Chat/pull/6709) by [@gdelavald](https://github.com/gdelavald)) + +- Encode avatar url to prevent CSS injection ([#6651](https://github.com/RocketChat/Rocket.Chat/pull/6651)) + +- Error when returning undefined from incoming intergation’s script ([#6683](https://github.com/RocketChat/Rocket.Chat/pull/6683)) + +- Fix Logger stdout publication ([#6682](https://github.com/RocketChat/Rocket.Chat/pull/6682)) + +- Fix message types ([#6704](https://github.com/RocketChat/Rocket.Chat/pull/6704)) + +- Improve markdown code ([#6650](https://github.com/RocketChat/Rocket.Chat/pull/6650)) + +- Incoming integrations would break when trying to use the `Store` feature.` + +- Incorrect curl command being generated on incoming integrations ([#6620](https://github.com/RocketChat/Rocket.Chat/pull/6620)) + +- Large files crashed browser when trying to show preview ([#6598](https://github.com/RocketChat/Rocket.Chat/pull/6598)) + +- Make sure username exists in findByActiveUsersExcept ([#6674](https://github.com/RocketChat/Rocket.Chat/pull/6674)) + +- messageBox: put "joinCodeRequired" back ([#6600](https://github.com/RocketChat/Rocket.Chat/pull/6600) by [@karlprieb](https://github.com/karlprieb)) + +- Outgoing webhooks which have an error and they're retrying would still retry even if the integration was disabled` ([#6478](https://github.com/RocketChat/Rocket.Chat/pull/6478)) + +- Removed Deprecated Package rocketchat:sharedsecret` + +- Revert unwanted UI changes ([#6658](https://github.com/RocketChat/Rocket.Chat/pull/6658)) + +- Update server cache indexes on record updates ([#6686](https://github.com/RocketChat/Rocket.Chat/pull/6686)) + +- Usage of subtagged languages ([#6575](https://github.com/RocketChat/Rocket.Chat/pull/6575)) + +- UTC offset missing UTC text when positive ([#6562](https://github.com/RocketChat/Rocket.Chat/pull/6562) by [@alexbrazier](https://github.com/alexbrazier)) + +
+🔍 Minor changes + + +- 'allow reacting' should be a toggle option.otherwise, the style will display an error ([#6522](https://github.com/RocketChat/Rocket.Chat/pull/6522) by [@szluohua](https://github.com/szluohua)) + +- [New] Added oauth2 userinfo endpoint ([#6554](https://github.com/RocketChat/Rocket.Chat/pull/6554)) + +- [New] Switch Snaps to use oplog ([#6608](https://github.com/RocketChat/Rocket.Chat/pull/6608)) + +- Add `fname` to subscriptions in memory ([#6597](https://github.com/RocketChat/Rocket.Chat/pull/6597)) + +- Add candidate snap channel ([#6614](https://github.com/RocketChat/Rocket.Chat/pull/6614)) + +- Add ESLint rule `object-shorthand` ([#6457](https://github.com/RocketChat/Rocket.Chat/pull/6457)) + +- Add ESLint rule `one-var` ([#6458](https://github.com/RocketChat/Rocket.Chat/pull/6458)) + +- Add ESLint rules `one-var` and `no-var` ([#6459](https://github.com/RocketChat/Rocket.Chat/pull/6459)) + +- Add ESLint rules `prefer-template` and `template-curly-spacing` ([#6456](https://github.com/RocketChat/Rocket.Chat/pull/6456)) + +- Add permission check to the import methods and not just the UI ([#6400](https://github.com/RocketChat/Rocket.Chat/pull/6400)) + +- Added Deploy method and platform to stats ([#6649](https://github.com/RocketChat/Rocket.Chat/pull/6649)) + +- Allow livechat managers to transfer chats ([#6180](https://github.com/RocketChat/Rocket.Chat/pull/6180) by [@drallgood](https://github.com/drallgood)) + +- Allow Livechat visitors to switch the department ([#6035](https://github.com/RocketChat/Rocket.Chat/pull/6035) by [@drallgood](https://github.com/drallgood)) + +- Change all instances of Meteor.Collection for Mongo.Collection ([#6410](https://github.com/RocketChat/Rocket.Chat/pull/6410)) + +- Clipboard [Firefox version < 50] ([#6280](https://github.com/RocketChat/Rocket.Chat/pull/6280)) + +- Convert ChatOps Package to JavaScript ([#6425](https://github.com/RocketChat/Rocket.Chat/pull/6425)) + +- Convert Dolphin Package to JavaScript ([#6427](https://github.com/RocketChat/Rocket.Chat/pull/6427)) + +- Convert File Package to js ([#6503](https://github.com/RocketChat/Rocket.Chat/pull/6503)) + +- convert mapview package to js ([#6471](https://github.com/RocketChat/Rocket.Chat/pull/6471)) + +- Convert Message Pin Package to JS ([#6576](https://github.com/RocketChat/Rocket.Chat/pull/6576)) + +- convert rocketchat-ui part 2 ([#6539](https://github.com/RocketChat/Rocket.Chat/pull/6539)) + +- Convert Spotify Package to JS ([#6449](https://github.com/RocketChat/Rocket.Chat/pull/6449)) + +- Convert Statistics Package to JS ([#6447](https://github.com/RocketChat/Rocket.Chat/pull/6447)) + +- Convert Theme Package to JS ([#6491](https://github.com/RocketChat/Rocket.Chat/pull/6491)) + +- Convert Tutum Package to JS ([#6446](https://github.com/RocketChat/Rocket.Chat/pull/6446)) + +- Convert Ui-Login Package to Js ([#6561](https://github.com/RocketChat/Rocket.Chat/pull/6561)) + +- Convert Ui-Master Package to Js ([#6498](https://github.com/RocketChat/Rocket.Chat/pull/6498)) + +- Convert ui-vrecord Package to JS ([#6473](https://github.com/RocketChat/Rocket.Chat/pull/6473)) + +- Convert Version Package to JS ([#6494](https://github.com/RocketChat/Rocket.Chat/pull/6494)) + +- Convert Wordpress Package to js ([#6499](https://github.com/RocketChat/Rocket.Chat/pull/6499)) + +- converted getAvatarUrlFromUsername ([#6496](https://github.com/RocketChat/Rocket.Chat/pull/6496)) + +- converted messageAttachment coffee to js ([#6500](https://github.com/RocketChat/Rocket.Chat/pull/6500)) + +- converted meteor-accounts-saml coffee to js ([#6450](https://github.com/RocketChat/Rocket.Chat/pull/6450)) + +- converted Rocketchat logger coffee to js ([#6495](https://github.com/RocketChat/Rocket.Chat/pull/6495)) + +- converted rocketchat-integrations coffee to js ([#6502](https://github.com/RocketChat/Rocket.Chat/pull/6502)) + +- converted rocketchat-mentions coffee to js ([#6467](https://github.com/RocketChat/Rocket.Chat/pull/6467)) + +- converted rocketchat-message-mark-as-unread coffee/js ([#6445](https://github.com/RocketChat/Rocket.Chat/pull/6445)) + +- converted rocketchat-slashcommands-kick coffee to js ([#6453](https://github.com/RocketChat/Rocket.Chat/pull/6453)) + +- converted slashcommand-invite coffee to js ([#6497](https://github.com/RocketChat/Rocket.Chat/pull/6497)) + +- converted slashcommand-join coffee to js ([#6469](https://github.com/RocketChat/Rocket.Chat/pull/6469)) + +- converted slashcommand-leave coffee to js ([#6470](https://github.com/RocketChat/Rocket.Chat/pull/6470)) + +- converted slashcommand-me coffee to js ([#6468](https://github.com/RocketChat/Rocket.Chat/pull/6468)) + +- converted slashcommand-msg coffee to js ([#6501](https://github.com/RocketChat/Rocket.Chat/pull/6501)) + +- converted slashcommands-mute coffee to js ([#6474](https://github.com/RocketChat/Rocket.Chat/pull/6474)) + +- Create groups.addAll endpoint and add activeUsersOnly param. ([#6505](https://github.com/RocketChat/Rocket.Chat/pull/6505) by [@nathanmarcos](https://github.com/nathanmarcos)) + +- dependencies upgrade ([#6584](https://github.com/RocketChat/Rocket.Chat/pull/6584)) + +- Do not show reset button for hidden settings ([#6432](https://github.com/RocketChat/Rocket.Chat/pull/6432)) + +- Env override initial setting ([#6163](https://github.com/RocketChat/Rocket.Chat/pull/6163) by [@mrsimpson](https://github.com/mrsimpson)) + +- ESLint add rule `no-void` ([#6479](https://github.com/RocketChat/Rocket.Chat/pull/6479)) + +- fix channel merge option of user preferences ([#6493](https://github.com/RocketChat/Rocket.Chat/pull/6493) by [@billtt](https://github.com/billtt)) + +- Fix livechat permissions ([#6466](https://github.com/RocketChat/Rocket.Chat/pull/6466)) + +- fix livechat widget on small screens ([#6122](https://github.com/RocketChat/Rocket.Chat/pull/6122) by [@karlprieb](https://github.com/karlprieb)) + +- Fix recently introduced bug: OnePassword not defined ([#6591](https://github.com/RocketChat/Rocket.Chat/pull/6591)) + +- Fix typo of the safari pinned tab label ([#6487](https://github.com/RocketChat/Rocket.Chat/pull/6487) by [@qge](https://github.com/qge)) + +- Fix visitor ending livechat if multiples still open ([#6419](https://github.com/RocketChat/Rocket.Chat/pull/6419)) + +- fixed typo in readme.md ([#6580](https://github.com/RocketChat/Rocket.Chat/pull/6580) by [@sezinkarli](https://github.com/sezinkarli)) + +- Flex-Tab CoffeeScript to JavaScript I ([#6276](https://github.com/RocketChat/Rocket.Chat/pull/6276)) + +- Flex-Tab CoffeeScript to JavaScript II ([#6277](https://github.com/RocketChat/Rocket.Chat/pull/6277)) + +- Flex-Tab CoffeeScript to JavaScript III ([#6278](https://github.com/RocketChat/Rocket.Chat/pull/6278)) + +- focus first textbox element ([#6257](https://github.com/RocketChat/Rocket.Chat/pull/6257) by [@a5his](https://github.com/a5his)) + +- Hide email settings on Sandstorm ([#6429](https://github.com/RocketChat/Rocket.Chat/pull/6429)) + +- Join command ([#6268](https://github.com/RocketChat/Rocket.Chat/pull/6268)) + +- Just admins can change a Default Channel to Private (the channel will be a non default channel) ([#6426](https://github.com/RocketChat/Rocket.Chat/pull/6426)) + +- LingoHub based on develop ([#6574](https://github.com/RocketChat/Rocket.Chat/pull/6574)) + +- LingoHub based on develop ([#6567](https://github.com/RocketChat/Rocket.Chat/pull/6567)) + +- LingoHub based on develop ([#6647](https://github.com/RocketChat/Rocket.Chat/pull/6647)) + +- Livechat fix office hours order ([#6413](https://github.com/RocketChat/Rocket.Chat/pull/6413)) + +- Make favicon package easier to read. ([#6422](https://github.com/RocketChat/Rocket.Chat/pull/6422) by [@Kiran-Rao](https://github.com/Kiran-Rao)) + +- Max textarea height ([#6409](https://github.com/RocketChat/Rocket.Chat/pull/6409)) + +- meteor update ([#6631](https://github.com/RocketChat/Rocket.Chat/pull/6631)) + +- Move room display name logic to roomType definition ([#6585](https://github.com/RocketChat/Rocket.Chat/pull/6585)) + +- Move wordpress packages client files to client folder ([#6571](https://github.com/RocketChat/Rocket.Chat/pull/6571)) + +- New feature: Room announcement ([#6351](https://github.com/RocketChat/Rocket.Chat/pull/6351) by [@billtt](https://github.com/billtt)) + +- Only configure LoggerManager on server ([#6596](https://github.com/RocketChat/Rocket.Chat/pull/6596)) + +- Password reset Cleaner text ([#6319](https://github.com/RocketChat/Rocket.Chat/pull/6319)) + +- POC Google Natural Language integration ([#6298](https://github.com/RocketChat/Rocket.Chat/pull/6298)) + +- Remove coffeescript package from ui-flextab ([#6543](https://github.com/RocketChat/Rocket.Chat/pull/6543) by [@Kiran-Rao](https://github.com/Kiran-Rao)) + +- Remove coffeescript package from ui-sidenav ([#6542](https://github.com/RocketChat/Rocket.Chat/pull/6542) by [@Kiran-Rao](https://github.com/Kiran-Rao)) + +- Remove Deprecated Shared Secret Package ([#6540](https://github.com/RocketChat/Rocket.Chat/pull/6540)) + +- rocketchat-channel-settings coffee to js ([#6551](https://github.com/RocketChat/Rocket.Chat/pull/6551)) + +- rocketchat-channel-settings-mail-messages coffee to js ([#6541](https://github.com/RocketChat/Rocket.Chat/pull/6541)) + +- rocketchat-lib part1 ([#6553](https://github.com/RocketChat/Rocket.Chat/pull/6553)) + +- rocketchat-ui coffee to js part1 ([#6504](https://github.com/RocketChat/Rocket.Chat/pull/6504)) + +- Side-nav CoffeeScript to JavaScript ([#6264](https://github.com/RocketChat/Rocket.Chat/pull/6264)) + +- Side-nav CoffeeScript to JavaScript II ([#6266](https://github.com/RocketChat/Rocket.Chat/pull/6266)) + +- Side-nav CoffeeScript to JavaScript III ([#6274](https://github.com/RocketChat/Rocket.Chat/pull/6274)) + +- Use real name instead of username for messages and direct messages list ([#3851](https://github.com/RocketChat/Rocket.Chat/pull/3851) by [@alexbrazier](https://github.com/alexbrazier)) + +
+ +### 👩‍💻👨‍💻 Contributors 😍 + +- [@Kiran-Rao](https://github.com/Kiran-Rao) +- [@Lawri-van-Buel](https://github.com/Lawri-van-Buel) +- [@a5his](https://github.com/a5his) +- [@alexbrazier](https://github.com/alexbrazier) +- [@billtt](https://github.com/billtt) +- [@drallgood](https://github.com/drallgood) +- [@fengt](https://github.com/fengt) +- [@gdelavald](https://github.com/gdelavald) +- [@karlprieb](https://github.com/karlprieb) +- [@mrsimpson](https://github.com/mrsimpson) +- [@nathanmarcos](https://github.com/nathanmarcos) +- [@qge](https://github.com/qge) +- [@sezinkarli](https://github.com/sezinkarli) +- [@szluohua](https://github.com/szluohua) +- [@tgxn](https://github.com/tgxn) + +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@engelgabriel](https://github.com/engelgabriel) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@graywolf336](https://github.com/graywolf336) +- [@marceloschmidt](https://github.com/marceloschmidt) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) \ No newline at end of file diff --git a/app.json b/apps/meteor/app.json similarity index 100% rename from app.json rename to apps/meteor/app.json diff --git a/app/2fa/client/TOTPCrowd.js b/apps/meteor/app/2fa/client/TOTPCrowd.js similarity index 100% rename from app/2fa/client/TOTPCrowd.js rename to apps/meteor/app/2fa/client/TOTPCrowd.js diff --git a/app/2fa/client/TOTPGoogle.js b/apps/meteor/app/2fa/client/TOTPGoogle.js similarity index 100% rename from app/2fa/client/TOTPGoogle.js rename to apps/meteor/app/2fa/client/TOTPGoogle.js diff --git a/app/2fa/client/TOTPLDAP.js b/apps/meteor/app/2fa/client/TOTPLDAP.js similarity index 100% rename from app/2fa/client/TOTPLDAP.js rename to apps/meteor/app/2fa/client/TOTPLDAP.js diff --git a/app/2fa/client/TOTPOAuth.js b/apps/meteor/app/2fa/client/TOTPOAuth.js similarity index 100% rename from app/2fa/client/TOTPOAuth.js rename to apps/meteor/app/2fa/client/TOTPOAuth.js diff --git a/app/2fa/client/TOTPPassword.js b/apps/meteor/app/2fa/client/TOTPPassword.js similarity index 100% rename from app/2fa/client/TOTPPassword.js rename to apps/meteor/app/2fa/client/TOTPPassword.js diff --git a/app/2fa/client/TOTPSaml.js b/apps/meteor/app/2fa/client/TOTPSaml.js similarity index 100% rename from app/2fa/client/TOTPSaml.js rename to apps/meteor/app/2fa/client/TOTPSaml.js diff --git a/app/2fa/client/index.ts b/apps/meteor/app/2fa/client/index.ts similarity index 100% rename from app/2fa/client/index.ts rename to apps/meteor/app/2fa/client/index.ts diff --git a/app/2fa/client/overrideMeteorCall.ts b/apps/meteor/app/2fa/client/overrideMeteorCall.ts similarity index 84% rename from app/2fa/client/overrideMeteorCall.ts rename to apps/meteor/app/2fa/client/overrideMeteorCall.ts index 489532120b07..ac19a24219fc 100644 --- a/app/2fa/client/overrideMeteorCall.ts +++ b/apps/meteor/app/2fa/client/overrideMeteorCall.ts @@ -3,7 +3,6 @@ import { Meteor } from 'meteor/meteor'; import { t } from '../../utils/client'; import { process2faReturn } from '../../../client/lib/2fa/process2faReturn'; import { isTotpInvalidError } from '../../../client/lib/2fa/utils'; -import { dispatchToastMessage } from '../../../client/lib/toast'; const { call } = Meteor; @@ -17,12 +16,7 @@ const callWithTotp = (twoFactorCode: string, twoFactorMethod: string): unknown => call(methodName, ...args, { twoFactorCode, twoFactorMethod }, (error: unknown, result: unknown): void => { if (isTotpInvalidError(error)) { - (error as { toastrShowed?: true }).toastrShowed = true; - dispatchToastMessage({ - type: 'error', - message: t('Invalid_two_factor_code'), - }); - callback(error); + callback(new Error(twoFactorMethod === 'password' ? t('Invalid_password') : t('Invalid_two_factor_code'))); return; } diff --git a/app/2fa/server/MethodInvocationOverride.js b/apps/meteor/app/2fa/server/MethodInvocationOverride.js similarity index 100% rename from app/2fa/server/MethodInvocationOverride.js rename to apps/meteor/app/2fa/server/MethodInvocationOverride.js diff --git a/app/2fa/server/code/EmailCheck.ts b/apps/meteor/app/2fa/server/code/EmailCheck.ts similarity index 92% rename from app/2fa/server/code/EmailCheck.ts rename to apps/meteor/app/2fa/server/code/EmailCheck.ts index 8ef050637340..1b890eb42196 100644 --- a/app/2fa/server/code/EmailCheck.ts +++ b/apps/meteor/app/2fa/server/code/EmailCheck.ts @@ -2,12 +2,12 @@ import { Random } from 'meteor/random'; import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; import { Accounts } from 'meteor/accounts-base'; import bcrypt from 'bcrypt'; +import type { IUser } from '@rocket.chat/core-typings'; import { settings } from '../../../settings/server'; import * as Mailer from '../../../mailer'; import { Users } from '../../../models/server'; -import { ICodeCheck, IProcessInvalidCodeResult } from './ICodeCheck'; -import { IUser } from '../../../../definition/IUser'; +import type { ICodeCheck, IProcessInvalidCodeResult } from './ICodeCheck'; export class EmailCheck implements ICodeCheck { public readonly name = 'email'; @@ -117,10 +117,14 @@ ${t('If_you_didnt_try_to_login_in_your_account_please_ignore_this_email')} const expireWithDelta = new Date(); expireWithDelta.setMinutes(expireWithDelta.getMinutes() - 5); - const hasValidCode = user.services?.emailCode?.filter(({ expire }) => expire > expireWithDelta); + const emails = this.getUserVerifiedEmails(user); + const emailOrUsername = user.username || emails[0]; + + const hasValidCode = user.services?.emailCode?.filter(({ expire }) => expire > expireWithDelta); if (hasValidCode?.length) { return { + emailOrUsername, codeGenerated: false, codeCount: hasValidCode.length, codeExpires: hasValidCode.map((i) => i.expire), @@ -131,6 +135,7 @@ ${t('If_you_didnt_try_to_login_in_your_account_please_ignore_this_email')} return { codeGenerated: true, + emailOrUsername, }; } } diff --git a/app/2fa/server/code/ICodeCheck.ts b/apps/meteor/app/2fa/server/code/ICodeCheck.ts similarity index 80% rename from app/2fa/server/code/ICodeCheck.ts rename to apps/meteor/app/2fa/server/code/ICodeCheck.ts index 3cdd9fb6f4e7..9d3318c1f8ad 100644 --- a/app/2fa/server/code/ICodeCheck.ts +++ b/apps/meteor/app/2fa/server/code/ICodeCheck.ts @@ -1,9 +1,10 @@ -import { IUser } from '../../../../definition/IUser'; +import type { IUser } from '@rocket.chat/core-typings'; export interface IProcessInvalidCodeResult { codeGenerated: boolean; codeCount?: number; codeExpires?: Date[]; + emailOrUsername?: string; } export interface ICodeCheck { diff --git a/app/2fa/server/code/PasswordCheckFallback.ts b/apps/meteor/app/2fa/server/code/PasswordCheckFallback.ts similarity index 82% rename from app/2fa/server/code/PasswordCheckFallback.ts rename to apps/meteor/app/2fa/server/code/PasswordCheckFallback.ts index ed6a3898d9a8..7094779e5e18 100644 --- a/app/2fa/server/code/PasswordCheckFallback.ts +++ b/apps/meteor/app/2fa/server/code/PasswordCheckFallback.ts @@ -1,8 +1,8 @@ import { Accounts } from 'meteor/accounts-base'; +import type { IUser } from '@rocket.chat/core-typings'; import { settings } from '../../../settings/server'; -import { ICodeCheck, IProcessInvalidCodeResult } from './ICodeCheck'; -import { IUser } from '../../../../definition/IUser'; +import type { ICodeCheck, IProcessInvalidCodeResult } from './ICodeCheck'; export class PasswordCheckFallback implements ICodeCheck { public readonly name = 'password'; @@ -24,7 +24,7 @@ export class PasswordCheckFallback implements ICodeCheck { return false; } - const passCheck = Accounts._checkPassword(user, { + const passCheck = Accounts._checkPassword(user as Meteor.User, { digest: code.toLowerCase(), algorithm: 'sha-256', }); diff --git a/app/2fa/server/code/TOTPCheck.ts b/apps/meteor/app/2fa/server/code/TOTPCheck.ts similarity index 79% rename from app/2fa/server/code/TOTPCheck.ts rename to apps/meteor/app/2fa/server/code/TOTPCheck.ts index cfdb533b193d..08016449c419 100644 --- a/app/2fa/server/code/TOTPCheck.ts +++ b/apps/meteor/app/2fa/server/code/TOTPCheck.ts @@ -1,7 +1,8 @@ +import type { IUser } from '@rocket.chat/core-typings'; + import { TOTP } from '../lib/totp'; -import { IUser } from '../../../../definition/IUser'; import { settings } from '../../../settings/server'; -import { ICodeCheck, IProcessInvalidCodeResult } from './ICodeCheck'; +import type { ICodeCheck, IProcessInvalidCodeResult } from './ICodeCheck'; export class TOTPCheck implements ICodeCheck { public readonly name = 'totp'; @@ -19,6 +20,10 @@ export class TOTPCheck implements ICodeCheck { return false; } + if (!user.services?.totp?.secret) { + return false; + } + return TOTP.verify({ secret: user.services?.totp?.secret, token: code, diff --git a/apps/meteor/app/2fa/server/code/index.ts b/apps/meteor/app/2fa/server/code/index.ts new file mode 100644 index 000000000000..878f817fb409 --- /dev/null +++ b/apps/meteor/app/2fa/server/code/index.ts @@ -0,0 +1,214 @@ +import crypto from 'crypto'; + +import { Meteor } from 'meteor/meteor'; +import { Accounts } from 'meteor/accounts-base'; +import type { IUser, IMethodConnection } from '@rocket.chat/core-typings'; + +import { settings } from '../../../settings/server'; +import { TOTPCheck } from './TOTPCheck'; +import { EmailCheck } from './EmailCheck'; +import { PasswordCheckFallback } from './PasswordCheckFallback'; +import type { ICodeCheck } from './ICodeCheck'; +import { Users } from '../../../models/server'; + +export interface ITwoFactorOptions { + disablePasswordFallback?: boolean; + disableRememberMe?: boolean; + requireSecondFactor?: boolean; // whether any two factor should be required +} + +export const totpCheck = new TOTPCheck(); +export const emailCheck = new EmailCheck(); +export const passwordCheckFallback = new PasswordCheckFallback(); + +export const checkMethods = new Map(); + +checkMethods.set(totpCheck.name, totpCheck); +checkMethods.set(emailCheck.name, emailCheck); + +export function getMethodByNameOrFirstActiveForUser(user: IUser, name?: string): ICodeCheck | undefined { + if (name && checkMethods.has(name)) { + return checkMethods.get(name); + } + + return Array.from(checkMethods.values()).find((method) => method.isEnabled(user)); +} + +export function getAvailableMethodNames(user: IUser): string[] | [] { + return ( + Array.from(checkMethods) + .filter(([, method]) => method.isEnabled(user)) + .map(([name]) => name) || [] + ); +} + +export function getUserForCheck(userId: string): IUser { + return Users.findOneById(userId, { + fields: { + 'emails': 1, + 'language': 1, + 'createdAt': 1, + 'services.totp': 1, + 'services.email2fa': 1, + 'services.emailCode': 1, + 'services.password': 1, + 'services.resume.loginTokens': 1, + }, + }); +} + +export function getFingerprintFromConnection(connection: IMethodConnection): string { + const data = JSON.stringify({ + userAgent: connection.httpHeaders['user-agent'], + clientAddress: connection.clientAddress, + }); + + return crypto.createHash('md5').update(data).digest('hex'); +} + +function getRememberDate(from: Date = new Date()): Date | undefined { + const rememberFor = parseInt(settings.get('Accounts_TwoFactorAuthentication_RememberFor') as string, 10); + + if (rememberFor <= 0) { + return; + } + + const expires = new Date(from); + expires.setSeconds(expires.getSeconds() + rememberFor); + + return expires; +} + +export function isAuthorizedForToken(connection: IMethodConnection, user: IUser, options: ITwoFactorOptions): boolean { + const currentToken = Accounts._getLoginToken(connection.id); + const tokenObject = user.services?.resume?.loginTokens?.find((i) => i.hashedToken === currentToken); + + if (!tokenObject) { + return false; + } + + // if any two factor is required, early abort + if (options.requireSecondFactor) { + return false; + } + + if (tokenObject.bypassTwoFactor === true) { + return true; + } + + if (options.disableRememberMe === true) { + return false; + } + + // remember user right after their registration + const rememberAfterRegistration = user.createdAt && getRememberDate(user.createdAt); + if (rememberAfterRegistration && rememberAfterRegistration >= new Date()) { + return true; + } + + if (!tokenObject.twoFactorAuthorizedUntil || !tokenObject.twoFactorAuthorizedHash) { + return false; + } + + if (tokenObject.twoFactorAuthorizedUntil < new Date()) { + return false; + } + + if (tokenObject.twoFactorAuthorizedHash !== getFingerprintFromConnection(connection)) { + return false; + } + + return true; +} + +export function rememberAuthorization(connection: IMethodConnection, user: IUser): void { + const currentToken = Accounts._getLoginToken(connection.id); + + const expires = getRememberDate(); + if (!expires) { + return; + } + + Users.setTwoFactorAuthorizationHashAndUntilForUserIdAndToken(user._id, currentToken, getFingerprintFromConnection(connection), expires); +} + +interface ICheckCodeForUser { + user: IUser | string; + code?: string; + method?: string; + options?: ITwoFactorOptions; + connection?: IMethodConnection; +} + +const getSecondFactorMethod = (user: IUser, method: string | undefined, options: ITwoFactorOptions): ICodeCheck | undefined => { + // try first getting one of the available methods or the one that was already provided + const selectedMethod = getMethodByNameOrFirstActiveForUser(user, method); + if (selectedMethod) { + return selectedMethod; + } + + // if none found but a second factor is required, chose the password check + if (options.requireSecondFactor) { + return passwordCheckFallback; + } + + // check if password fallback is enabled + if (!options.disablePasswordFallback && passwordCheckFallback.isEnabled(user, !!options.requireSecondFactor)) { + return passwordCheckFallback; + } +}; + +export function checkCodeForUser({ user, code, method, options = {}, connection }: ICheckCodeForUser): boolean { + if (process.env.TEST_MODE && !options.requireSecondFactor) { + return true; + } + + if (!settings.get('Accounts_TwoFactorAuthentication_Enabled')) { + return true; + } + + if (typeof user === 'string') { + user = getUserForCheck(user); + } + + if (!code && !method && connection?.httpHeaders?.['x-2fa-code'] && connection.httpHeaders['x-2fa-method']) { + code = connection.httpHeaders['x-2fa-code']; + method = connection.httpHeaders['x-2fa-method']; + } + + if (connection && isAuthorizedForToken(connection, user, options)) { + return true; + } + + // select a second factor method or return if none is found/available + const selectedMethod = getSecondFactorMethod(user, method, options); + if (!selectedMethod) { + return true; + } + + const data = selectedMethod.processInvalidCode(user); + + if (!code) { + const availableMethods = getAvailableMethodNames(user); + + throw new Meteor.Error('totp-required', 'TOTP Required', { + method: selectedMethod.name, + ...data, + availableMethods, + }); + } + + const valid = selectedMethod.verify(user, code, options.requireSecondFactor); + if (!valid) { + throw new Meteor.Error('totp-invalid', 'TOTP Invalid', { + method: selectedMethod.name, + ...data, + }); + } + + if (options.disableRememberMe !== true && connection) { + rememberAuthorization(connection, user); + } + + return true; +} diff --git a/app/2fa/server/functions/resetTOTP.ts b/apps/meteor/app/2fa/server/functions/resetTOTP.ts similarity index 82% rename from app/2fa/server/functions/resetTOTP.ts rename to apps/meteor/app/2fa/server/functions/resetTOTP.ts index d0b17778976d..decce3432be5 100644 --- a/app/2fa/server/functions/resetTOTP.ts +++ b/apps/meteor/app/2fa/server/functions/resetTOTP.ts @@ -1,10 +1,10 @@ import { Meteor } from 'meteor/meteor'; import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; +import type { IUser } from '@rocket.chat/core-typings'; +import { Users } from '@rocket.chat/models'; import { settings } from '../../../settings/server'; import * as Mailer from '../../../mailer'; -import { Users } from '../../../models/server/raw/index'; -import { IUser } from '../../../../definition/IUser'; const sendResetNotification = async function (uid: string): Promise { const user = await Users.findOneById>(uid, { @@ -15,7 +15,7 @@ const sendResetNotification = async function (uid: string): Promise { } const language = user.language || settings.get('Language') || 'en'; - const addresses = user.emails?.filter(({ verified }: { verified: boolean }) => verified).map((e) => e.address); + const addresses = user.emails?.filter(({ verified }) => Boolean(verified)).map((e) => e.address); if (!addresses?.length) { return; } @@ -45,9 +45,10 @@ const sendResetNotification = async function (uid: string): Promise { html, } as any); } catch (error) { - throw new Meteor.Error('error-email-send-failed', `Error trying to send email: ${error.message}`, { + const message = error instanceof Error ? error.message : String(error); + throw new Meteor.Error('error-email-send-failed', `Error trying to send email: ${message}`, { function: 'resetUserTOTP', - message: error.message, + message, }); } }); diff --git a/app/2fa/server/index.js b/apps/meteor/app/2fa/server/index.ts similarity index 100% rename from app/2fa/server/index.js rename to apps/meteor/app/2fa/server/index.ts diff --git a/apps/meteor/app/2fa/server/lib/totp.ts b/apps/meteor/app/2fa/server/lib/totp.ts new file mode 100644 index 000000000000..c06a1ffc9b17 --- /dev/null +++ b/apps/meteor/app/2fa/server/lib/totp.ts @@ -0,0 +1,68 @@ +import { SHA256 } from 'meteor/sha'; +import { Random } from 'meteor/random'; +import speakeasy from 'speakeasy'; + +import { Users } from '../../../models/server'; +import { settings } from '../../../settings/server'; + +export const TOTP = { + generateSecret(): speakeasy.GeneratedSecret { + return speakeasy.generateSecret(); + }, + + generateOtpauthURL(secret: speakeasy.GeneratedSecret, username: string): string { + return speakeasy.otpauthURL({ + secret: secret.ascii, + label: `Rocket.Chat:${username}`, + }); + }, + + verify({ secret, token, backupTokens, userId }: { secret: string; token: string; backupTokens?: string[]; userId?: string }): boolean { + // validates a backup code + if (token.length === 8 && backupTokens) { + const hashedCode = SHA256(token); + const usedCode = backupTokens.indexOf(hashedCode); + + if (usedCode !== -1) { + backupTokens.splice(usedCode, 1); + + // mark the code as used (remove it from the list) + Users.update2FABackupCodesByUserId(userId, backupTokens); + return true; + } + + return false; + } + + const maxDelta = settings.get('Accounts_TwoFactorAuthentication_MaxDelta'); + if (maxDelta) { + const verifiedDelta = speakeasy.totp.verifyDelta({ + secret, + encoding: 'base32', + token, + window: maxDelta, + }); + + return verifiedDelta !== undefined; + } + + return speakeasy.totp.verify({ + secret, + encoding: 'base32', + token, + }); + }, + + generateCodes(): { codes: string[]; hashedCodes: string[] } { + // generate 12 backup codes + const codes = []; + const hashedCodes = []; + for (let i = 0; i < 12; i++) { + const code = Random.id(8); + codes.push(code); + hashedCodes.push(SHA256(code)); + } + + return { codes, hashedCodes }; + }, +}; diff --git a/apps/meteor/app/2fa/server/loginHandler.ts b/apps/meteor/app/2fa/server/loginHandler.ts new file mode 100644 index 000000000000..8535dfa4f3d2 --- /dev/null +++ b/apps/meteor/app/2fa/server/loginHandler.ts @@ -0,0 +1,111 @@ +import { Meteor } from 'meteor/meteor'; +import { Accounts } from 'meteor/accounts-base'; +import { OAuth } from 'meteor/oauth'; +import { check } from 'meteor/check'; + +import { callbacks } from '../../../lib/callbacks'; +import { checkCodeForUser } from './code/index'; + +const isMeteorError = (error: any): error is Meteor.Error => { + return error?.meteorError !== undefined; +}; + +const isCredentialWithError = (credential: any): credential is { error: Error } => { + return credential?.error !== undefined; +}; + +Accounts.registerLoginHandler('totp', function (options) { + if (!options.totp || !options.totp.code) { + return; + } + + // @ts-expect-error - not sure how to type this yet + return Accounts._runLoginHandlers(this, options.totp.login); +}); + +callbacks.add( + 'onValidateLogin', + (login) => { + if (login.type === 'resume' || login.type === 'proxy' || login.methodName === 'verifyEmail') { + return login; + } + // CAS login doesn't yet support 2FA. + if (login.type === 'cas') { + return login; + } + + if (!login.user) { + return login; + } + + const [loginArgs] = login.methodArguments; + const { totp } = loginArgs; + + checkCodeForUser({ + user: login.user, + code: totp?.code, + options: { disablePasswordFallback: true }, + }); + + return login; + }, + callbacks.priority.MEDIUM, + '2fa', +); + +const copyTo = (from: T, to: T): T => { + Object.getOwnPropertyNames(to).forEach((key) => { + const idx: keyof T = key as keyof T; + to[idx] = from[idx]; + }); + + return to; +}; + +const recreateError = (errorDoc: Error | Meteor.Error): Error | Meteor.Error => { + if (isMeteorError(errorDoc)) { + const error = new Meteor.Error(''); + return copyTo(errorDoc, error); + } + + const error = new Error(); + return copyTo(errorDoc, error); +}; + +OAuth._retrievePendingCredential = function (key, ...args): string | Error | void { + const credentialSecret = args.length > 0 && args[0] !== undefined ? args[0] : undefined; + check(key, String); + + const pendingCredential = OAuth._pendingCredentials.findOne({ + key, + credentialSecret, + }); + + if (!pendingCredential) { + return; + } + + if (isCredentialWithError(pendingCredential.credential)) { + OAuth._pendingCredentials.remove({ + _id: pendingCredential._id, + }); + return recreateError(pendingCredential.credential.error); + } + + // Work-around to make the credentials reusable for 2FA + const future = new Date(); + future.setMinutes(future.getMinutes() + 2); + + OAuth._pendingCredentials.update( + { + _id: pendingCredential._id, + }, + { + $set: { + createdAt: future, + }, + }, + ); + + return OAuth.openSecret(pendingCredential.credential); +}; diff --git a/apps/meteor/app/2fa/server/methods/checkCodesRemaining.ts b/apps/meteor/app/2fa/server/methods/checkCodesRemaining.ts new file mode 100644 index 000000000000..b320b51751a1 --- /dev/null +++ b/apps/meteor/app/2fa/server/methods/checkCodesRemaining.ts @@ -0,0 +1,25 @@ +import { Meteor } from 'meteor/meteor'; + +Meteor.methods({ + '2fa:checkCodesRemaining'() { + if (!Meteor.userId()) { + throw new Meteor.Error('not-authorized'); + } + + const user = Meteor.user(); + + if (!user) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', { + method: '2fa:checkCodesRemaining', + }); + } + + if (!user.services || !user.services.totp || !user.services.totp.enabled) { + throw new Meteor.Error('invalid-totp'); + } + + return { + remaining: user.services.totp.hashedBackup.length, + }; + }, +}); diff --git a/apps/meteor/app/2fa/server/methods/disable.ts b/apps/meteor/app/2fa/server/methods/disable.ts new file mode 100644 index 000000000000..ab0f39753b4b --- /dev/null +++ b/apps/meteor/app/2fa/server/methods/disable.ts @@ -0,0 +1,34 @@ +import { Meteor } from 'meteor/meteor'; + +import { Users } from '../../../models/server'; +import { TOTP } from '../lib/totp'; + +Meteor.methods({ + '2fa:disable'(code) { + const userId = Meteor.userId(); + if (!userId) { + throw new Meteor.Error('not-authorized'); + } + + const user = Meteor.user(); + + if (!user) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', { + method: '2fa:disable', + }); + } + + const verified = TOTP.verify({ + secret: user.services.totp.secret, + token: code, + userId, + backupTokens: user.services.totp.hashedBackup, + }); + + if (!verified) { + return false; + } + + return Users.disable2FAByUserId(userId); + }, +}); diff --git a/apps/meteor/app/2fa/server/methods/enable.ts b/apps/meteor/app/2fa/server/methods/enable.ts new file mode 100644 index 000000000000..3c26effb3805 --- /dev/null +++ b/apps/meteor/app/2fa/server/methods/enable.ts @@ -0,0 +1,30 @@ +import { Meteor } from 'meteor/meteor'; + +import { Users } from '../../../models/server'; +import { TOTP } from '../lib/totp'; + +Meteor.methods({ + '2fa:enable'() { + const userId = Meteor.userId(); + if (!userId) { + throw new Meteor.Error('not-authorized'); + } + + const user = Meteor.user(); + + if (!user || !user.username) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', { + method: '2fa:enable', + }); + } + + const secret = TOTP.generateSecret(); + + Users.disable2FAAndSetTempSecretByUserId(userId, secret.base32); + + return { + secret: secret.base32, + url: TOTP.generateOtpauthURL(secret, user.username), + }; + }, +}); diff --git a/apps/meteor/app/2fa/server/methods/regenerateCodes.ts b/apps/meteor/app/2fa/server/methods/regenerateCodes.ts new file mode 100644 index 000000000000..c3a376575294 --- /dev/null +++ b/apps/meteor/app/2fa/server/methods/regenerateCodes.ts @@ -0,0 +1,38 @@ +import { Meteor } from 'meteor/meteor'; + +import { Users } from '../../../models/server'; +import { TOTP } from '../lib/totp'; + +Meteor.methods({ + '2fa:regenerateCodes'(userToken) { + const userId = Meteor.userId(); + if (!userId) { + throw new Meteor.Error('not-authorized'); + } + + const user = Meteor.user(); + if (!user) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', { + method: '2fa:regenerateCodes', + }); + } + + if (!user.services || !user.services.totp || !user.services.totp.enabled) { + throw new Meteor.Error('invalid-totp'); + } + + const verified = TOTP.verify({ + secret: user.services.totp.secret, + token: userToken, + userId, + backupTokens: user.services.totp.hashedBackup, + }); + + if (verified) { + const { codes, hashedCodes } = TOTP.generateCodes(); + + Users.update2FABackupCodesByUserId(Meteor.userId(), hashedCodes); + return { codes }; + } + }, +}); diff --git a/apps/meteor/app/2fa/server/methods/validateTempToken.ts b/apps/meteor/app/2fa/server/methods/validateTempToken.ts new file mode 100644 index 000000000000..13429ca5d5b4 --- /dev/null +++ b/apps/meteor/app/2fa/server/methods/validateTempToken.ts @@ -0,0 +1,36 @@ +import { Meteor } from 'meteor/meteor'; + +import { Users } from '../../../models/server'; +import { TOTP } from '../lib/totp'; + +Meteor.methods({ + '2fa:validateTempToken'(userToken) { + const userId = Meteor.userId(); + if (!userId) { + throw new Meteor.Error('not-authorized'); + } + + const user = Meteor.user(); + if (!user) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', { + method: '2fa:validateTempToken', + }); + } + + if (!user.services || !user.services.totp || !user.services.totp.tempSecret) { + throw new Meteor.Error('invalid-totp'); + } + + const verified = TOTP.verify({ + secret: user.services.totp.tempSecret, + token: userToken, + }); + + if (verified) { + const { codes, hashedCodes } = TOTP.generateCodes(); + + Users.enable2FAAndSetSecretAndCodesByUserId(Meteor.userId(), user.services.totp.tempSecret, hashedCodes); + return { codes }; + } + }, +}); diff --git a/app/2fa/server/startup/settings.ts b/apps/meteor/app/2fa/server/startup/settings.ts similarity index 100% rename from app/2fa/server/startup/settings.ts rename to apps/meteor/app/2fa/server/startup/settings.ts diff --git a/apps/meteor/app/2fa/server/twoFactorRequired.ts b/apps/meteor/app/2fa/server/twoFactorRequired.ts new file mode 100644 index 000000000000..61a483da1132 --- /dev/null +++ b/apps/meteor/app/2fa/server/twoFactorRequired.ts @@ -0,0 +1,39 @@ +import { Meteor } from 'meteor/meteor'; + +import type { ITwoFactorOptions } from './code/index'; +import { checkCodeForUser } from './code/index'; + +export function twoFactorRequired any>( + fn: TFunction, + options?: ITwoFactorOptions, +): (this: Meteor.MethodThisType, ...args: Parameters) => ReturnType { + return function (this: Meteor.MethodThisType, ...args: Parameters): ReturnType { + if (!this.userId) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'twoFactorRequired' }); + } + + // get two factor options from last item of args and remove it + const twoFactor = args.pop(); + if (twoFactor) { + if (twoFactor.twoFactorCode && twoFactor.twoFactorMethod) { + checkCodeForUser({ + user: this.userId, + connection: this.connection || undefined, + code: twoFactor.twoFactorCode, + method: twoFactor.twoFactorMethod, + options, + }); + this.twoFactorChecked = true; + } else { + // if it was not two factor options, put it back + args.push(twoFactor); + } + } + + if (!this.twoFactorChecked) { + checkCodeForUser({ user: this.userId, connection: this.connection || undefined, options }); + } + + return fn.apply(this, args); + }; +} diff --git a/app/action-links/README.md b/apps/meteor/app/action-links/README.md similarity index 100% rename from app/action-links/README.md rename to apps/meteor/app/action-links/README.md diff --git a/app/action-links/client/index.js b/apps/meteor/app/action-links/client/index.ts similarity index 100% rename from app/action-links/client/index.js rename to apps/meteor/app/action-links/client/index.ts diff --git a/apps/meteor/app/action-links/client/lib/actionLinks.ts b/apps/meteor/app/action-links/client/lib/actionLinks.ts new file mode 100644 index 000000000000..057592a2f789 --- /dev/null +++ b/apps/meteor/app/action-links/client/lib/actionLinks.ts @@ -0,0 +1,80 @@ +import { Meteor } from 'meteor/meteor'; +import type { IMessage } from '@rocket.chat/core-typings'; + +import { dispatchToastMessage } from '../../../../client/lib/toast'; + +// Action Links namespace creation. +export const actionLinks = { + actions: new Map< + string, + (message: IMessage, params: string, instance?: Blaze.TemplateInstance | ((actionId: string, context: string) => void)) => void + >(), + register( + name: string, + fn: (message: IMessage, params: string, instance?: Blaze.TemplateInstance | ((actionId: string, context: string) => void)) => void, + ): void { + actionLinks.actions.set(name, fn); + }, + // getMessage(name, messageId) { + // const userId = Meteor.userId(); + // if (!userId) { + // throw new Meteor.Error('error-invalid-user', 'Invalid user', { + // function: 'actionLinks.getMessage', + // }); + // } + + // const message = Messages.findOne({ _id: messageId }); + // if (!message) { + // throw new Meteor.Error('error-invalid-message', 'Invalid message', { + // function: 'actionLinks.getMessage', + // }); + // } + + // const subscription = Subscriptions.findOne({ + // 'rid': message.rid, + // 'u._id': userId, + // }); + // if (!subscription) { + // throw new Meteor.Error('error-not-allowed', 'Not allowed', { + // function: 'actionLinks.getMessage', + // }); + // } + + // if (!message.actionLinks || !message.actionLinks[name]) { + // throw new Meteor.Error('error-invalid-actionlink', 'Invalid action link', { + // function: 'actionLinks.getMessage', + // }); + // } + + // return message; + // }, + run(method: string, message: IMessage, instance?: Blaze.TemplateInstance | ((actionId: string, context: string) => void)): void { + const actionLink = message.actionLinks?.find((action) => action.method_id === method); + + if (!actionLink) { + throw new Meteor.Error('error-invalid-actionlink', 'Invalid action link'); + } + + if (!actionLinks.actions.has(actionLink.method_id)) { + throw new Meteor.Error('error-invalid-actionlink', 'Invalid action link'); + } + + const fn = actionLinks.actions.get(actionLink.method_id); + + let ranClient = false; + + if (fn) { + // run just on client side + fn(message, actionLink.params, instance); + + ranClient = true; + } + + // and run on server side + Meteor.call('actionLinkHandler', name, message._id, (error: unknown) => { + if (error && !ranClient) { + dispatchToastMessage({ type: 'error', message: error }); + } + }); + }, +}; diff --git a/apps/meteor/app/action-links/server/actionLinkHandler.ts b/apps/meteor/app/action-links/server/actionLinkHandler.ts new file mode 100644 index 000000000000..51c196ffb3b7 --- /dev/null +++ b/apps/meteor/app/action-links/server/actionLinkHandler.ts @@ -0,0 +1,31 @@ +import { Meteor } from 'meteor/meteor'; +import { check } from 'meteor/check'; + +import { actionLinks } from './lib/actionLinks'; +// Action Links Handler. This method will be called off the client. + +Meteor.methods({ + actionLinkHandler(name, messageId) { + check(messageId, String); + check(name, String); + + if (!Meteor.userId()) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'actionLinkHandler' }); + } + + const message = actionLinks.getMessage(name, messageId); + + if (!message) { + throw new Meteor.Error('error-invalid-message', 'Invalid message', { method: 'actionLinkHandler' }); + } + + // NOTE: based on types (and how FE uses it) this should be the way of doing it + const actionLink = message.actionLinks?.find((action) => action.method_id === name); + + if (!actionLink) { + throw new Meteor.Error('error-invalid-actionlink', 'Invalid action link', { method: 'actionLinkHandler' }); + } + + actionLinks.actions[actionLink.method_id](message, actionLink.params); + }, +}); diff --git a/app/action-links/server/index.js b/apps/meteor/app/action-links/server/index.ts similarity index 100% rename from app/action-links/server/index.js rename to apps/meteor/app/action-links/server/index.ts diff --git a/apps/meteor/app/action-links/server/lib/actionLinks.ts b/apps/meteor/app/action-links/server/lib/actionLinks.ts new file mode 100644 index 000000000000..58b8fa950b03 --- /dev/null +++ b/apps/meteor/app/action-links/server/lib/actionLinks.ts @@ -0,0 +1,45 @@ +import type { IMessage } from '@rocket.chat/core-typings'; +import { Meteor } from 'meteor/meteor'; + +import { getMessageForUser } from '../../../../server/lib/messages/getMessageForUser'; + +function getMessageById(messageId: IMessage['_id']): IMessage | undefined { + try { + const user = Meteor.userId(); + if (!user) { + return; + } + return Promise.await(getMessageForUser(messageId, user)); + } catch (e) { + throw new Meteor.Error(e instanceof Error ? e.message : String(e), 'Invalid message', { + function: 'actionLinks.getMessage', + }); + } +} + +type ActionLinkHandler = (message: IMessage, params?: string, instance?: undefined) => void; + +// Action Links namespace creation. +export const actionLinks = { + actions: {} as { [key: string]: ActionLinkHandler }, + register(name: string, funct: ActionLinkHandler): void { + actionLinks.actions[name] = funct; + }, + getMessage(name: string, messageId: IMessage['_id']): IMessage | undefined { + const message = getMessageById(messageId); + + if (!message) { + throw new Meteor.Error('error-invalid-message', 'Invalid message', { + function: 'actionLinks.getMessage', + }); + } + + if (!message.actionLinks?.some((action) => action.method_id === name)) { + throw new Meteor.Error('error-invalid-actionlink', 'Invalid action link', { + function: 'actionLinks.getMessage', + }); + } + + return message; + }, +}; diff --git a/app/analytics/README.md b/apps/meteor/app/analytics/README.md similarity index 100% rename from app/analytics/README.md rename to apps/meteor/app/analytics/README.md diff --git a/app/analytics/client/index.js b/apps/meteor/app/analytics/client/index.js similarity index 100% rename from app/analytics/client/index.js rename to apps/meteor/app/analytics/client/index.js diff --git a/app/analytics/client/loadScript.js b/apps/meteor/app/analytics/client/loadScript.js similarity index 100% rename from app/analytics/client/loadScript.js rename to apps/meteor/app/analytics/client/loadScript.js diff --git a/app/analytics/client/trackEvents.js b/apps/meteor/app/analytics/client/trackEvents.js similarity index 99% rename from app/analytics/client/trackEvents.js rename to apps/meteor/app/analytics/client/trackEvents.js index 28c3987dc1b9..86cd69ea95a4 100644 --- a/app/analytics/client/trackEvents.js +++ b/apps/meteor/app/analytics/client/trackEvents.js @@ -4,7 +4,7 @@ import { Tracker } from 'meteor/tracker'; import { settings } from '../../settings'; import { callbacks } from '../../../lib/callbacks'; -import { ChatRoom } from '../../models'; +import { ChatRoom } from '../../models/client'; function trackEvent(category, action, label) { if (window._paq) { diff --git a/app/analytics/server/index.js b/apps/meteor/app/analytics/server/index.js similarity index 100% rename from app/analytics/server/index.js rename to apps/meteor/app/analytics/server/index.js diff --git a/apps/meteor/app/analytics/server/settings.ts b/apps/meteor/app/analytics/server/settings.ts new file mode 100644 index 000000000000..ef1f6b5f073c --- /dev/null +++ b/apps/meteor/app/analytics/server/settings.ts @@ -0,0 +1,91 @@ +import { settingsRegistry } from '../../settings/server'; + +settingsRegistry.addGroup('Analytics', function addSettings() { + this.section('Piwik', function () { + const enableQuery = { _id: 'PiwikAnalytics_enabled', value: true }; + this.add('PiwikAnalytics_enabled', false, { + type: 'boolean', + public: true, + i18nLabel: 'Enable', + }); + this.add('PiwikAnalytics_url', '', { + type: 'string', + public: true, + i18nLabel: 'URL', + enableQuery, + }); + this.add('PiwikAnalytics_siteId', '', { + type: 'string', + public: true, + i18nLabel: 'Client_ID', + enableQuery, + }); + this.add('PiwikAdditionalTrackers', '', { + type: 'string', + multiline: true, + public: true, + i18nLabel: 'PiwikAdditionalTrackers', + enableQuery, + }); + this.add('PiwikAnalytics_prependDomain', false, { + type: 'boolean', + public: true, + i18nLabel: 'PiwikAnalytics_prependDomain', + enableQuery, + }); + this.add('PiwikAnalytics_cookieDomain', false, { + type: 'boolean', + public: true, + i18nLabel: 'PiwikAnalytics_cookieDomain', + enableQuery, + }); + this.add('PiwikAnalytics_domains', '', { + type: 'string', + multiline: true, + public: true, + i18nLabel: 'PiwikAnalytics_domains', + enableQuery, + }); + }); + + this.section('Analytics_Google', function () { + const enableQuery = { _id: 'GoogleAnalytics_enabled', value: true }; + this.add('GoogleAnalytics_enabled', false, { + type: 'boolean', + public: true, + i18nLabel: 'Enable', + }); + + this.add('GoogleAnalytics_ID', '', { + type: 'string', + public: true, + i18nLabel: 'Analytics_Google_id', + enableQuery, + }); + }); + + this.section('Analytics_features_enabled', function addFeaturesEnabledSettings() { + this.add('Analytics_features_messages', true, { + type: 'boolean', + public: true, + i18nLabel: 'Messages', + i18nDescription: 'Analytics_features_messages_Description', + }); + this.add('Analytics_features_rooms', true, { + type: 'boolean', + public: true, + i18nLabel: 'Rooms', + i18nDescription: 'Analytics_features_rooms_Description', + }); + this.add('Analytics_features_users', true, { + type: 'boolean', + public: true, + i18nLabel: 'Users', + i18nDescription: 'Analytics_features_users_Description', + }); + this.add('Engagement_Dashboard_Load_Count', 0, { + type: 'int', + hidden: true, + }); + }); +}); diff --git a/apps/meteor/app/api/server/api.d.ts b/apps/meteor/app/api/server/api.d.ts new file mode 100644 index 000000000000..8ddc27f0457c --- /dev/null +++ b/apps/meteor/app/api/server/api.d.ts @@ -0,0 +1,267 @@ +import type { + JoinPathPattern, + Method, + MethodOf, + OperationParams, + OperationResult, + PathPattern, + UrlParams, +} from '@rocket.chat/rest-typings'; +import type { IUser, IMethodConnection, IRoom } from '@rocket.chat/core-typings'; +import type { ValidateFunction } from 'ajv'; +import type { Request, Response } from 'express'; + +import type { ITwoFactorOptions } from '../../2fa/server/code'; + +type SuccessResult = { + statusCode: 200; + body: T extends object ? { success: true } & T : T; +}; + +type FailureResult = { + statusCode: 400; + body: T extends object + ? { success: false } & T + : { + success: false; + error: T; + stack: TStack; + errorType: TErrorType; + details: TErrorDetails; + } & (undefined extends TErrorType ? object : { errorType: TErrorType }) & + (undefined extends TErrorDetails ? object : { details: TErrorDetails extends string ? unknown : TErrorDetails }); +}; + +type UnauthorizedResult = { + statusCode: 403; + body: { + success: false; + error: T | 'unauthorized'; + }; +}; + +type NotFoundResult = { + statusCode: 404; + body: { + success: false; + error: string; + }; +}; + +export type TOperation = 'hasAll' | 'hasAny'; +export type NonEnterpriseTwoFactorOptions = { + authRequired: true; + forceTwoFactorAuthenticationForNonEnterprise: true; + twoFactorRequired: true; + permissionsRequired?: string[] | { [key in Method]: string[] } | { [key in Method]: { operation: TOperation; permissions: string[] } }; + twoFactorOptions: ITwoFactorOptions; +}; + +type Options = ( + | { + permissionsRequired?: + | string[] + | ({ [key in Method]?: string[] } & { '*'?: string[] }) + | ({ [key in Method]?: { operation: TOperation; permissions: string[] } } & { + '*'?: { operation: TOperation; permissions: string[] }; + }); + authRequired?: boolean; + forceTwoFactorAuthenticationForNonEnterprise?: boolean; + } + | { + authRequired: true; + twoFactorRequired: true; + twoFactorOptions?: ITwoFactorOptions; + } +) & { + validateParams?: ValidateFunction | { [key in Method]?: ValidateFunction }; + authOrAnonRequired?: true; +}; + +type PartialThis = { + readonly request: Request & { query: Record }; + readonly response: Response; +}; + +type UserInfo = IUser & { + email?: string; + settings: { + profile: object; + preferences: unknown; + }; + avatarUrl: string; +}; + +type ActionThis = { + readonly requestIp: string; + urlParams: UrlParams; + readonly response: Response; + // TODO make it unsafe + readonly queryParams: TMethod extends 'GET' + ? TOptions extends { validateParams: ValidateFunction } + ? T + : TOptions extends { validateParams: { GET: ValidateFunction } } + ? T + : Partial> + : Record; + // TODO make it unsafe + readonly bodyParams: TMethod extends 'GET' + ? Record + : TOptions extends { validateParams: ValidateFunction } + ? T + : TOptions extends { validateParams: infer V } + ? V extends { [key in TMethod]: ValidateFunction } + ? T + : Partial> + : Partial>; + readonly request: Request; + + readonly queryOperations: TOptions extends { queryOperations: infer T } ? T : never; + + /* @deprecated */ + requestParams(): OperationParams; + getLoggedInUser(): TOptions extends { authRequired: true } ? IUser : IUser | undefined; + getPaginationItems(): { + readonly offset: number; + readonly count: number; + }; + parseJsonQuery(): { + sort: Record; + fields: Record; + query: Record; + }; + /* @deprecated */ + getUserFromParams(): IUser; + /* @deprecated */ + isUserFromParams(): boolean; + /* @deprecated */ + getUserInfo( + me: IUser, + ): TOptions extends { authRequired: true } ? UserInfo : TOptions extends { authOrAnonRequired: true } ? UserInfo | undefined : undefined; + composeRoomWithLastMessage(room: IRoom, userId: string): IRoom; +} & (TOptions extends { authRequired: true } + ? { + readonly user: IUser; + readonly userId: string; + readonly token: string; + } + : TOptions extends { authOrAnonRequired: true } + ? { + readonly user?: IUser; + readonly userId?: string; + readonly token?: string; + } + : { + readonly user: null; + readonly userId: undefined; + readonly token?: string; + }); + +export type ResultFor = + | SuccessResult> + | FailureResult + | UnauthorizedResult + | NotFoundResult; + +type Action = + | ((this: ActionThis) => Promise>) + | ((this: ActionThis) => ResultFor); + +type Operation = + | Action + | ({ + action: Action; + } & { twoFactorRequired: boolean }); + +type Operations = { + [M in MethodOf as Lowercase]: Operation, TPathPattern, TOptions>; +}; + +declare class APIClass { + fieldSeparator: string; + + updateRateLimiterDictionaryForRoute(route: string, rateLimiterDictionary: number): void; + + limitedUserFieldsToExclude(fields: { [x: string]: unknown }, limitedUserFieldsToExclude: unknown): { [x: string]: unknown }; + + limitedUserFieldsToExcludeIfIsPrivilegedUser( + fields: { [x: string]: unknown }, + limitedUserFieldsToExcludeIfIsPrivilegedUser: unknown, + ): { [x: string]: unknown }; + + processTwoFactor({ + userId, + request, + invocation, + options, + connection, + }: { + userId: string; + request: Request; + invocation: { twoFactorChecked: boolean }; + options?: Options; + connection: IMethodConnection; + }): void; + + addRoute( + subpath: TSubPathPattern, + operations: Operations>, + ): void; + + addRoute>( + subpaths: TSubPathPattern[], + operations: Operations, + ): void; + + addRoute( + subpath: TSubPathPattern, + options: TOptions, + operations: Operations, TOptions>, + ): void; + + addRoute, TOptions extends Options>( + subpaths: TSubPathPattern[], + options: TOptions, + operations: Operations, + ): void; + + addAuthMethod(func: (this: PartialThis, ...args: any[]) => any): void; + + success(result: T): SuccessResult; + + success(): SuccessResult; + + failure( + result: T, + errorType?: TErrorType, + stack?: TStack, + error?: { details: TErrorDetails }, + ): FailureResult; + + failure(result: T): FailureResult; + + failure(): FailureResult; + + notFound(msg?: string): NotFoundResult; + + unauthorized(msg?: T): UnauthorizedResult; + + defaultFieldsToExclude: { + joinCode: 0; + members: 0; + importIds: 0; + e2e: 0; + }; +} + +export declare const API: { + v1: APIClass<'/v1'>; + default: APIClass; + helperMethods: Map unknown>; + ApiClass: APIClass; +}; + +export declare const defaultRateLimiterOptions: { + numRequestsAllowed: number; + intervalTimeInMS: number; +}; diff --git a/apps/meteor/app/api/server/api.helpers.ts b/apps/meteor/app/api/server/api.helpers.ts new file mode 100644 index 000000000000..a7ccea4e846b --- /dev/null +++ b/apps/meteor/app/api/server/api.helpers.ts @@ -0,0 +1,103 @@ +import type { IUser } from '@rocket.chat/core-typings'; + +import { hasAllPermissionAsync, hasAtLeastOnePermissionAsync } from '../../authorization/server/functions/hasPermission'; + +type RequestMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | '*'; +export type PermissionsPayload = { + [key in RequestMethod]?: { + operation: 'hasAll' | 'hasAny'; + permissions: string[]; + }; +}; + +export type PermissionsPayloadLight = { + [key in RequestMethod]?: string[]; +}; + +export type PermissionsRequiredKey = string[] | PermissionsPayload | PermissionsPayloadLight; + +const isLegacyPermissionsPayload = (permissionsPayload: PermissionsRequiredKey): permissionsPayload is string[] => { + return Array.isArray(permissionsPayload); +}; + +const isLightPermissionsPayload = (permissionsPayload: PermissionsRequiredKey): permissionsPayload is PermissionsPayloadLight => { + return ( + typeof permissionsPayload === 'object' && + Object.keys(permissionsPayload).some((key) => ['GET', 'POST', 'PUT', 'DELETE', '*'].includes(key.toUpperCase())) && + Object.values(permissionsPayload).every((value) => Array.isArray(value)) + ); +}; + +const isPermissionsPayload = (permissionsPayload: PermissionsRequiredKey): permissionsPayload is PermissionsPayload => { + return ( + typeof permissionsPayload === 'object' && + Object.keys(permissionsPayload).some((key) => ['GET', 'POST', 'PUT', 'DELETE', '*'].includes(key.toUpperCase())) && + Object.values(permissionsPayload).every((value) => typeof value === 'object' && value.operation && value.permissions) + ); +}; + +export async function checkPermissionsForInvocation( + userId: IUser['_id'], + permissionsPayload: PermissionsPayload, + requestMethod: RequestMethod, +): Promise { + const permissions = permissionsPayload[requestMethod] || permissionsPayload['*']; + + if (!permissions) { + // how we reached here in the first place? + return false; + } + + if (permissions.permissions.length === 0) { + // You can pass an empty array of permissions to allow access to the method + return true; + } + + if (permissions.operation === 'hasAll') { + return hasAllPermissionAsync(userId, permissions.permissions); + } + + if (permissions.operation === 'hasAny') { + return hasAtLeastOnePermissionAsync(userId, permissions.permissions); + } + + return false; +} + +// We'll assume options only contains permissionsRequired, as we don't care of the other elements +export function checkPermissions(options: { permissionsRequired: PermissionsRequiredKey }) { + if (!options.permissionsRequired) { + return false; + } + + if (isPermissionsPayload(options.permissionsRequired)) { + // No modifications needed + return true; + } + + if (isLegacyPermissionsPayload(options.permissionsRequired)) { + options.permissionsRequired = { + '*': { + operation: 'hasAll', + permissions: options.permissionsRequired, + }, + }; + return true; + } + + if (isLightPermissionsPayload(options.permissionsRequired)) { + Object.keys(options.permissionsRequired).forEach((method) => { + const methodKey = method as RequestMethod; + // @ts-expect-error -- we know the type of the value but ts refuses to infer it + options.permissionsRequired[methodKey] = { + operation: 'hasAll', + // @ts-expect-error -- we know the type of the value but ts refuses to infer it + permissions: options.permissionsRequired[methodKey], + }; + }); + return true; + } + + // If reached here, options.permissionsRequired contained an invalid payload + return false; +} diff --git a/apps/meteor/app/api/server/api.js b/apps/meteor/app/api/server/api.js new file mode 100644 index 000000000000..bbe6ba837557 --- /dev/null +++ b/apps/meteor/app/api/server/api.js @@ -0,0 +1,859 @@ +import { Meteor } from 'meteor/meteor'; +import { Random } from 'meteor/random'; +import { DDPCommon } from 'meteor/ddp-common'; +import { DDP } from 'meteor/ddp'; +import { Accounts } from 'meteor/accounts-base'; +import { Restivus } from 'meteor/rocketchat:restivus'; +import _ from 'underscore'; +import { RateLimiter } from 'meteor/rate-limit'; + +import { Logger } from '../../../server/lib/logger/Logger'; +import { getRestPayload } from '../../../server/lib/logger/logPayloads'; +import { settings } from '../../settings/server'; +import { metrics } from '../../metrics/server'; +import { hasPermission } from '../../authorization/server'; +import { getDefaultUserFields } from '../../utils/server/functions/getDefaultUserFields'; +import { checkCodeForUser } from '../../2fa/server/code'; +import { checkPermissionsForInvocation, checkPermissions } from './api.helpers'; + +const logger = new Logger('API'); + +const rateLimiterDictionary = {}; +export const defaultRateLimiterOptions = { + numRequestsAllowed: settings.get('API_Enable_Rate_Limiter_Limit_Calls_Default'), + intervalTimeInMS: settings.get('API_Enable_Rate_Limiter_Limit_Time_Default'), +}; +let prometheusAPIUserAgent = false; + +export let API = {}; + +const getRequestIP = (req) => { + const socket = req.socket || req.connection?.socket; + const remoteAddress = req.headers['x-real-ip'] || socket?.remoteAddress || req.connection?.remoteAddress || null; + let forwardedFor = req.headers['x-forwarded-for']; + + if (!socket) { + return remoteAddress || forwardedFor || null; + } + + const httpForwardedCount = parseInt(process.env.HTTP_FORWARDED_COUNT) || 0; + if (httpForwardedCount <= 0) { + return remoteAddress; + } + + if (!_.isString(forwardedFor)) { + return remoteAddress; + } + + forwardedFor = forwardedFor.trim().split(/\s*,\s*/); + if (httpForwardedCount > forwardedFor.length) { + return remoteAddress; + } + + return forwardedFor[forwardedFor.length - httpForwardedCount]; +}; + +export class APIClass extends Restivus { + constructor(properties) { + super(properties); + this.apiPath = properties.apiPath; + this.authMethods = []; + this.fieldSeparator = '.'; + this.defaultFieldsToExclude = { + joinCode: 0, + members: 0, + importIds: 0, + e2e: 0, + }; + this.defaultLimitedUserFieldsToExclude = { + avatarOrigin: 0, + emails: 0, + phone: 0, + statusConnection: 0, + createdAt: 0, + lastLogin: 0, + services: 0, + requirePasswordChange: 0, + requirePasswordChangeReason: 0, + roles: 0, + statusDefault: 0, + _updatedAt: 0, + settings: 0, + }; + this.limitedUserFieldsToExclude = this.defaultLimitedUserFieldsToExclude; + this.limitedUserFieldsToExcludeIfIsPrivilegedUser = { + services: 0, + }; + } + + setLimitedCustomFields(customFields) { + const nonPublicFieds = customFields.reduce((acc, customField) => { + acc[`customFields.${customField}`] = 0; + return acc; + }, {}); + this.limitedUserFieldsToExclude = { + ...this.defaultLimitedUserFieldsToExclude, + ...nonPublicFieds, + }; + } + + hasHelperMethods() { + return API.helperMethods.size !== 0; + } + + getHelperMethods() { + return API.helperMethods; + } + + getHelperMethod(name) { + return API.helperMethods.get(name); + } + + addAuthMethod(method) { + this.authMethods.push(method); + } + + shouldAddRateLimitToRoute(options) { + const { version } = this._config; + const { rateLimiterOptions } = options; + return ( + (typeof rateLimiterOptions === 'object' || rateLimiterOptions === undefined) && + Boolean(version) && + !process.env.TEST_MODE && + Boolean(defaultRateLimiterOptions.numRequestsAllowed && defaultRateLimiterOptions.intervalTimeInMS) + ); + } + + success(result = {}) { + if (_.isObject(result)) { + result.success = true; + } + + result = { + statusCode: 200, + body: result, + }; + + return result; + } + + failure(result, errorType, stack, error) { + if (_.isObject(result)) { + result.success = false; + } else { + result = { + success: false, + error: result, + stack, + }; + + if (errorType) { + result.errorType = errorType; + } + + if (error && error.details) { + try { + result.details = JSON.parse(error.details); + } catch (e) { + result.details = error.details; + } + } + } + + result = { + statusCode: 400, + body: result, + }; + + return result; + } + + notFound(msg) { + return { + statusCode: 404, + body: { + success: false, + error: msg || 'Resource not found', + }, + }; + } + + internalError(msg) { + return { + statusCode: 500, + body: { + success: false, + error: msg || 'Internal error occured', + }, + }; + } + + unauthorized(msg) { + return { + statusCode: 403, + body: { + success: false, + error: msg || 'unauthorized', + }, + }; + } + + tooManyRequests(msg) { + return { + statusCode: 429, + body: { + success: false, + error: msg || 'Too many requests', + }, + }; + } + + getRateLimiter(route) { + return rateLimiterDictionary[route]; + } + + shouldVerifyRateLimit(route, userId) { + return ( + rateLimiterDictionary.hasOwnProperty(route) && + settings.get('API_Enable_Rate_Limiter') === true && + (process.env.NODE_ENV !== 'development' || settings.get('API_Enable_Rate_Limiter_Dev') === true) && + !(userId && hasPermission(userId, 'api-bypass-rate-limit')) + ); + } + + enforceRateLimit(objectForRateLimitMatch, request, response, userId) { + if (!this.shouldVerifyRateLimit(objectForRateLimitMatch.route, userId)) { + return; + } + + rateLimiterDictionary[objectForRateLimitMatch.route].rateLimiter.increment(objectForRateLimitMatch); + const attemptResult = rateLimiterDictionary[objectForRateLimitMatch.route].rateLimiter.check(objectForRateLimitMatch); + const timeToResetAttempsInSeconds = Math.ceil(attemptResult.timeToReset / 1000); + response.setHeader('X-RateLimit-Limit', rateLimiterDictionary[objectForRateLimitMatch.route].options.numRequestsAllowed); + response.setHeader('X-RateLimit-Remaining', attemptResult.numInvocationsLeft); + response.setHeader('X-RateLimit-Reset', new Date().getTime() + attemptResult.timeToReset); + + if (!attemptResult.allowed) { + throw new Meteor.Error( + 'error-too-many-requests', + `Error, too many requests. Please slow down. You must wait ${timeToResetAttempsInSeconds} seconds before trying this endpoint again.`, + { + timeToReset: attemptResult.timeToReset, + seconds: timeToResetAttempsInSeconds, + }, + ); + } + } + + reloadRoutesToRefreshRateLimiter() { + const { version } = this._config; + this._routes.forEach((route) => { + if (this.shouldAddRateLimitToRoute(route.options)) { + this.addRateLimiterRuleForRoutes({ + routes: [route.path], + rateLimiterOptions: route.options.rateLimiterOptions || defaultRateLimiterOptions, + endpoints: Object.keys(route.endpoints).filter((endpoint) => endpoint !== 'options'), + apiVersion: version, + }); + } + }); + } + + addRateLimiterRuleForRoutes({ routes, rateLimiterOptions, endpoints, apiVersion }) { + if (!rateLimiterOptions.numRequestsAllowed) { + throw new Meteor.Error('You must set "numRequestsAllowed" property in rateLimiter for REST API endpoint'); + } + if (!rateLimiterOptions.intervalTimeInMS) { + throw new Meteor.Error('You must set "intervalTimeInMS" property in rateLimiter for REST API endpoint'); + } + const addRateLimitRuleToEveryRoute = (routes) => { + routes.forEach((route) => { + rateLimiterDictionary[route] = { + rateLimiter: new RateLimiter(), + options: rateLimiterOptions, + }; + const rateLimitRule = { + IPAddr: (input) => input, + route, + }; + rateLimiterDictionary[route].rateLimiter.addRule( + rateLimitRule, + rateLimiterOptions.numRequestsAllowed, + rateLimiterOptions.intervalTimeInMS, + ); + }); + }; + routes.map((route) => this.namedRoutes(route, endpoints, apiVersion)).map(addRateLimitRuleToEveryRoute); + } + + processTwoFactor({ userId, request, invocation, options, connection }) { + if (!options.twoFactorRequired) { + return; + } + const code = request.headers['x-2fa-code']; + const method = request.headers['x-2fa-method']; + + checkCodeForUser({ user: userId, code, method, options: options.twoFactorOptions, connection }); + + invocation.twoFactorChecked = true; + } + + getFullRouteName(route, method, apiVersion = null) { + let prefix = `/${this.apiPath || ''}`; + if (apiVersion) { + prefix += `${apiVersion}/`; + } + return `${prefix}${route}${method}`; + } + + namedRoutes(route, endpoints, apiVersion) { + const routeActions = Array.isArray(endpoints) ? endpoints : Object.keys(endpoints); + + return routeActions.map((action) => this.getFullRouteName(route, action, apiVersion)); + } + + addRoute(routes, options, endpoints) { + // Note: required if the developer didn't provide options + if (typeof endpoints === 'undefined') { + endpoints = options; + options = {}; + } + + const shouldVerifyPermissions = checkPermissions(options); + + // Allow for more than one route using the same option and endpoints + if (!_.isArray(routes)) { + routes = [routes]; + } + const { version } = this._config; + if (this.shouldAddRateLimitToRoute(options)) { + this.addRateLimiterRuleForRoutes({ + routes, + rateLimiterOptions: options.rateLimiterOptions || defaultRateLimiterOptions, + endpoints, + apiVersion: version, + }); + } + routes.forEach((route) => { + // Note: This is required due to Restivus calling `addRoute` in the constructor of itself + Object.keys(endpoints).forEach((method) => { + const _options = { ...options }; + + if (typeof endpoints[method] === 'function') { + endpoints[method] = { action: endpoints[method] }; + } else { + const extraOptions = { ...endpoints[method] }; + delete extraOptions.action; + Object.assign(_options, extraOptions); + } + // Add a try/catch for each endpoint + const originalAction = endpoints[method].action; + const api = this; + endpoints[method].action = function _internalRouteActionHandler() { + const rocketchatRestApiEnd = metrics.rocketchatRestApi.startTimer({ + method, + version, + ...(prometheusAPIUserAgent && { user_agent: this.request.headers['user-agent'] }), + entrypoint: route.startsWith('method.call') ? decodeURIComponent(this.request._parsedUrl.pathname.slice(8)) : route, + }); + + this.requestIp = getRequestIP(this.request); + + const startTime = Date.now(); + + const log = logger.logger.child({ + method: this.request.method, + url: this.request.url, + userId: this.request.headers['x-user-id'], + userAgent: this.request.headers['user-agent'], + length: this.request.headers['content-length'], + host: this.request.headers.host, + referer: this.request.headers.referer, + remoteIP: this.requestIp, + ...getRestPayload(this.request.body), + }); + + // If the endpoint requires authentication only if anonymous read is disabled, load the user info if it was provided + if (!options.authRequired && options.authOrAnonRequired) { + const { 'x-user-id': userId, 'x-auth-token': userToken } = this.request.headers; + if (userId && userToken) { + this.user = Meteor.users.findOne( + { + 'services.resume.loginTokens.hashedToken': Accounts._hashLoginToken(userToken), + '_id': userId, + }, + { + fields: getDefaultUserFields(), + }, + ); + + this.userId = this.user?._id; + } + + if (!this.user && !settings.get('Accounts_AllowAnonymousRead')) { + return { + statusCode: 401, + body: { + status: 'error', + message: 'You must be logged in to do this.', + }, + }; + } + } + + const objectForRateLimitMatch = { + IPAddr: this.requestIp, + route: `${this.request.route}${this.request.method.toLowerCase()}`, + }; + + let result; + + const connection = { + id: Random.id(), + close() {}, + token: this.token, + httpHeaders: this.request.headers, + clientAddress: this.requestIp, + }; + + try { + api.enforceRateLimit(objectForRateLimitMatch, this.request, this.response, this.userId); + + if (_options.validateParams) { + const requestMethod = this.request.method; + const validatorFunc = + typeof _options.validateParams === 'function' ? _options.validateParams : _options.validateParams[requestMethod]; + + if (validatorFunc && !validatorFunc(requestMethod === 'GET' ? this.queryParams : this.bodyParams)) { + throw new Meteor.Error('invalid-params', validatorFunc.errors?.map((error) => error.message).join('\n ')); + } + } + if ( + shouldVerifyPermissions && + (!this.userId || + !Promise.await(checkPermissionsForInvocation(this.userId, _options.permissionsRequired, this.request.method))) + ) { + throw new Meteor.Error('error-unauthorized', 'User does not have the permissions required for this action', { + permissions: _options.permissionsRequired, + }); + } + + const invocation = new DDPCommon.MethodInvocation({ + connection, + isSimulation: false, + userId: this.userId, + }); + + Accounts._accountData[connection.id] = { + connection, + }; + Accounts._setAccountData(connection.id, 'loginToken', this.token); + + api.processTwoFactor({ + userId: this.userId, + request: this.request, + invocation, + options: _options, + connection, + }); + + this.queryOperations = options.queryOperations; + this.queryFields = options.queryFields; + + result = DDP._CurrentInvocation.withValue(invocation, () => Promise.await(originalAction.apply(this))) || API.v1.success(); + + log.http({ + status: result.statusCode, + responseTime: Date.now() - startTime, + }); + } catch (e) { + const apiMethod = + { + 'error-too-many-requests': 'tooManyRequests', + 'error-unauthorized': 'unauthorized', + }[e.error] || 'failure'; + + result = API.v1[apiMethod](typeof e === 'string' ? e : e.message, e.error, process.env.TEST_MODE ? e.stack : undefined, e); + + log.http({ + err: e, + status: result.statusCode, + responseTime: Date.now() - startTime, + }); + } finally { + delete Accounts._accountData[connection.id]; + } + + rocketchatRestApiEnd({ + status: result.statusCode, + }); + + return result; + }; + + for (const [name, helperMethod] of this.getHelperMethods()) { + endpoints[method][name] = helperMethod; + } + + // Allow the endpoints to make usage of the logger which respects the user's settings + endpoints[method].logger = logger; + }); + + super.addRoute(route, options, endpoints); + }); + } + + updateRateLimiterDictionaryForRoute(route, numRequestsAllowed, intervalTimeInMS) { + if (rateLimiterDictionary[route]) { + rateLimiterDictionary[route].options.numRequestsAllowed = + numRequestsAllowed ?? rateLimiterDictionary[route].options.numRequestsAllowed; + rateLimiterDictionary[route].options.intervalTimeInMS = intervalTimeInMS ?? rateLimiterDictionary[route].options.intervalTimeInMS; + API.v1.reloadRoutesToRefreshRateLimiter(); + } + } + + _initAuth() { + const loginCompatibility = (bodyParams, request) => { + // Grab the username or email that the user is logging in with + const { user, username, email, password, code: bodyCode } = bodyParams; + let usernameToLDAPLogin = ''; + + if (password == null) { + return bodyParams; + } + + if (_.without(Object.keys(bodyParams), 'user', 'username', 'email', 'password', 'code').length > 0) { + return bodyParams; + } + + const code = bodyCode || request.headers['x-2fa-code']; + + const auth = { + password, + }; + + if (typeof user === 'string') { + auth.user = user.includes('@') ? { email: user } : { username: user }; + usernameToLDAPLogin = user; + } else if (username) { + auth.user = { username }; + usernameToLDAPLogin = username; + } else if (email) { + auth.user = { email }; + usernameToLDAPLogin = email; + } + + if (auth.user == null) { + return bodyParams; + } + + if (auth.password.hashed) { + auth.password = { + digest: auth.password, + algorithm: 'sha-256', + }; + } + + const objectToLDAPLogin = { + ldap: true, + username: usernameToLDAPLogin, + ldapPass: auth.password, + ldapOptions: {}, + }; + if (settings.get('LDAP_Enable') && !code) { + return objectToLDAPLogin; + } + + if (code) { + return { + totp: { + code, + login: settings.get('LDAP_Enable') ? objectToLDAPLogin : auth, + }, + }; + } + + return auth; + }; + + const self = this; + + this.addRoute( + 'login', + { authRequired: false }, + { + post() { + const args = loginCompatibility(this.bodyParams, this.request); + const getUserInfo = self.getHelperMethod('getUserInfo'); + + const invocation = new DDPCommon.MethodInvocation({ + connection: { + close() {}, + httpHeaders: this.request.headers, + clientAddress: getRequestIP(this.request), + }, + }); + + let auth; + try { + auth = DDP._CurrentInvocation.withValue(invocation, () => Meteor.call('login', args)); + } catch (error) { + let e = error; + if (error.reason === 'User not found') { + e = { + error: 'Unauthorized', + reason: 'Unauthorized', + }; + } + + return { + statusCode: 401, + body: { + status: 'error', + error: e.error, + details: e.details, + message: e.reason || e.message, + }, + }; + } + + this.user = Meteor.users.findOne( + { + _id: auth.id, + }, + { + fields: getDefaultUserFields(), + }, + ); + + this.userId = this.user._id; + + const response = { + status: 'success', + data: { + userId: this.userId, + authToken: auth.token, + me: getUserInfo(this.user), + }, + }; + + const extraData = self._config.onLoggedIn && self._config.onLoggedIn.call(this); + + if (extraData != null) { + _.extend(response.data, { + extra: extraData, + }); + } + + return response; + }, + }, + ); + + const logout = function () { + // Remove the given auth token from the user's account + const authToken = this.request.headers['x-auth-token']; + const hashedToken = Accounts._hashLoginToken(authToken); + const tokenLocation = self._config.auth.token; + const index = tokenLocation.lastIndexOf('.'); + const tokenPath = tokenLocation.substring(0, index); + const tokenFieldName = tokenLocation.substring(index + 1); + const tokenToRemove = {}; + tokenToRemove[tokenFieldName] = hashedToken; + const tokenRemovalQuery = {}; + tokenRemovalQuery[tokenPath] = tokenToRemove; + + Meteor.users.update(this.user._id, { + $pull: tokenRemovalQuery, + }); + + const response = { + status: 'success', + data: { + message: "You've been logged out!", + }, + }; + + // Call the logout hook with the authenticated user attached + const extraData = self._config.onLoggedOut && self._config.onLoggedOut.call(this); + if (extraData != null) { + _.extend(response.data, { + extra: extraData, + }); + } + return response; + }; + + /* + Add a logout endpoint to the API + After the user is logged out, the onLoggedOut hook is called (see Restfully.configure() for + adding hook). + */ + return this.addRoute( + 'logout', + { + authRequired: true, + }, + { + get() { + console.warn('Warning: Default logout via GET will be removed in Restivus v1.0. Use POST instead.'); + console.warn(' See https://github.com/kahmali/meteor-restivus/issues/100'); + return logout.call(this); + }, + post: logout, + }, + ); + } +} + +const getUserAuth = function _getUserAuth(...args) { + const invalidResults = [undefined, null, false]; + return { + token: 'services.resume.loginTokens.hashedToken', + user() { + if (this.bodyParams && this.bodyParams.payload) { + this.bodyParams = JSON.parse(this.bodyParams.payload); + } + + for (let i = 0; i < API.v1.authMethods.length; i++) { + const method = API.v1.authMethods[i]; + + if (typeof method === 'function') { + const result = method.apply(this, args); + if (!invalidResults.includes(result)) { + return result; + } + } + } + + let token; + if (this.request.headers['x-auth-token']) { + token = Accounts._hashLoginToken(this.request.headers['x-auth-token']); + } + + this.token = token; + + return { + userId: this.request.headers['x-user-id'], + token, + }; + }, + }; +}; + +API = { + helperMethods: new Map(), + getUserAuth, + ApiClass: APIClass, +}; + +const defaultOptionsEndpoint = function _defaultOptionsEndpoint() { + // check if a pre-flight request + if (!this.request.headers['access-control-request-method'] && !this.request.headers.origin) { + this.done(); + return; + } + + if (!settings.get('API_Enable_CORS')) { + this.response.writeHead(405); + this.response.write('CORS not enabled. Go to "Admin > General > REST Api" to enable it.'); + this.done(); + return; + } + + const CORSOriginSetting = String(settings.get('API_CORS_Origin')); + + const defaultHeaders = { + 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, HEAD, PATCH', + 'Access-Control-Allow-Headers': + 'Origin, X-Requested-With, Content-Type, Accept, X-User-Id, X-Auth-Token, x-visitor-token, Authorization', + }; + + if (CORSOriginSetting === '*') { + this.response.writeHead(200, { + 'Access-Control-Allow-Origin': '*', + ...defaultHeaders, + }); + this.done(); + return; + } + + const origins = CORSOriginSetting.trim() + .split(',') + .map((origin) => String(origin).trim().toLocaleLowerCase()); + + // if invalid origin reply without required CORS headers + if (!origins.includes(this.request.headers.origin)) { + this.done(); + return; + } + + this.response.writeHead(200, { + 'Access-Control-Allow-Origin': this.request.headers.origin, + 'Vary': 'Origin', + ...defaultHeaders, + }); + this.done(); +}; + +const createApi = function _createApi(_api, options = {}) { + _api = + _api || + new APIClass( + Object.assign( + { + apiPath: 'api/', + useDefaultAuth: true, + prettyJson: process.env.NODE_ENV === 'development', + defaultOptionsEndpoint, + auth: getUserAuth(), + }, + options, + ), + ); + + return _api; +}; + +const createApis = function _createApis() { + API.v1 = createApi(API.v1, { + version: 'v1', + }); + + API.default = createApi(API.default); +}; + +// also create the API immediately +createApis(); + +// register the API to be re-created once the CORS-setting changes. +settings.watchMultiple(['API_Enable_CORS', 'API_CORS_Origin'], () => { + createApis(); +}); + +settings.watch('Accounts_CustomFields', (value) => { + if (!value) { + return API.v1.setLimitedCustomFields([]); + } + try { + const customFields = JSON.parse(value); + const nonPublicCustomFields = Object.keys(customFields).filter((customFieldKey) => customFields[customFieldKey].public !== true); + API.v1.setLimitedCustomFields(nonPublicCustomFields); + } catch (error) { + console.warn('Invalid Custom Fields', error); + } +}); + +settings.watch('API_Enable_Rate_Limiter_Limit_Time_Default', (value) => { + defaultRateLimiterOptions.intervalTimeInMS = value; + API.v1.reloadRoutesToRefreshRateLimiter(); +}); + +settings.watch('API_Enable_Rate_Limiter_Limit_Calls_Default', (value) => { + defaultRateLimiterOptions.numRequestsAllowed = value; + API.v1.reloadRoutesToRefreshRateLimiter(); +}); + +settings.watch('Prometheus_API_User_Agent', (value) => { + prometheusAPIUserAgent = value; +}); diff --git a/app/api/server/default/info.js b/apps/meteor/app/api/server/default/info.ts similarity index 100% rename from app/api/server/default/info.js rename to apps/meteor/app/api/server/default/info.ts diff --git a/app/api/server/helpers/README.md b/apps/meteor/app/api/server/helpers/README.md similarity index 100% rename from app/api/server/helpers/README.md rename to apps/meteor/app/api/server/helpers/README.md diff --git a/apps/meteor/app/api/server/helpers/addUserToFileObj.ts b/apps/meteor/app/api/server/helpers/addUserToFileObj.ts new file mode 100644 index 000000000000..4c46192b5322 --- /dev/null +++ b/apps/meteor/app/api/server/helpers/addUserToFileObj.ts @@ -0,0 +1,19 @@ +import type { IUpload, IUser } from '@rocket.chat/core-typings'; +import { Users } from '@rocket.chat/models'; + +export async function addUserToFileObj(files: IUpload[]): Promise<(IUpload & { user?: Pick })[]> { + const uids = files.map(({ userId }) => userId).filter(Boolean); + + const users = await Users.findByIds(uids, { projection: { name: 1, username: 1 } }).toArray(); + + return files.map((file) => { + const user = users.find(({ _id: userId }) => file.userId && userId === file.userId); + if (!user) { + return file; + } + return { + ...file, + user, + }; + }); +} diff --git a/apps/meteor/app/api/server/helpers/composeRoomWithLastMessage.ts b/apps/meteor/app/api/server/helpers/composeRoomWithLastMessage.ts new file mode 100644 index 000000000000..f3bdcf2516bb --- /dev/null +++ b/apps/meteor/app/api/server/helpers/composeRoomWithLastMessage.ts @@ -0,0 +1,12 @@ +import type { IRoom } from '@rocket.chat/core-typings'; + +import { normalizeMessagesForUser } from '../../../utils/server/lib/normalizeMessagesForUser'; +import { API } from '../api'; + +API.helperMethods.set('composeRoomWithLastMessage', function _composeRoomWithLastMessage(room: IRoom, userId: string) { + if (room.lastMessage) { + const [lastMessage] = normalizeMessagesForUser([room.lastMessage], userId); + room.lastMessage = lastMessage; + } + return room; +}); diff --git a/app/api/server/helpers/deprecationWarning.ts b/apps/meteor/app/api/server/helpers/deprecationWarning.ts similarity index 88% rename from app/api/server/helpers/deprecationWarning.ts rename to apps/meteor/app/api/server/helpers/deprecationWarning.ts index f1dbb562f1d6..5487d97d54d2 100644 --- a/app/api/server/helpers/deprecationWarning.ts +++ b/apps/meteor/app/api/server/helpers/deprecationWarning.ts @@ -22,4 +22,4 @@ export function deprecationWarning({ return response; } -(API as any).helperMethods.set('deprecationWarning', deprecationWarning); +API.helperMethods.set('deprecationWarning', deprecationWarning); diff --git a/apps/meteor/app/api/server/helpers/getLoggedInUser.ts b/apps/meteor/app/api/server/helpers/getLoggedInUser.ts new file mode 100644 index 000000000000..6da949a29178 --- /dev/null +++ b/apps/meteor/app/api/server/helpers/getLoggedInUser.ts @@ -0,0 +1,13 @@ +import { Accounts } from 'meteor/accounts-base'; + +import { Users } from '../../../models/server'; +import { API } from '../api'; + +API.helperMethods.set('getLoggedInUser', function _getLoggedInUser(this: any) { + if (this.request.headers['x-auth-token'] && this.request.headers['x-user-id']) { + return Users.findOne({ + '_id': this.request.headers['x-user-id'], + 'services.resume.loginTokens.hashedToken': Accounts._hashLoginToken(this.request.headers['x-auth-token']), + }); + } +}); diff --git a/apps/meteor/app/api/server/helpers/getPaginationItems.ts b/apps/meteor/app/api/server/helpers/getPaginationItems.ts new file mode 100644 index 000000000000..30b5fff786f1 --- /dev/null +++ b/apps/meteor/app/api/server/helpers/getPaginationItems.ts @@ -0,0 +1,35 @@ +// If the count query param is higher than the "API_Upper_Count_Limit" setting, then we limit that +// If the count query param isn't defined, then we set it to the "API_Default_Count" setting +// If the count is zero, then that means unlimited and is only allowed if the setting "API_Allow_Infinite_Count" is true +import { settings } from '../../../settings/server'; +import { API } from '../api'; + +API.helperMethods.set('getPaginationItems', function _getPaginationItems(this: any) { + const hardUpperLimitTest = settings.get('API_Upper_Count_Limit'); + const defaultCountTest = settings.get('API_Default_Count'); + + const hardUpperLimit = hardUpperLimitTest && hardUpperLimitTest <= 0 ? 100 : settings.get('API_Upper_Count_Limit'); + const defaultCount = defaultCountTest && defaultCountTest <= 0 ? 50 : settings.get('API_Default_Count'); + const offset = this.queryParams.offset ? parseInt(this.queryParams.offset) : 0; + let count = defaultCount; + + // Ensure count is an appropriate amount + if (typeof this.queryParams.count !== 'undefined') { + count = parseInt(this.queryParams.count); + } else { + count = defaultCount; + } + + if (count > hardUpperLimit) { + count = hardUpperLimit; + } + + if (count === 0 && !settings.get('API_Allow_Infinite_Count')) { + count = defaultCount; + } + + return { + offset, + count, + }; +}); diff --git a/apps/meteor/app/api/server/helpers/getUserFromParams.ts b/apps/meteor/app/api/server/helpers/getUserFromParams.ts new file mode 100644 index 000000000000..8378fb67d220 --- /dev/null +++ b/apps/meteor/app/api/server/helpers/getUserFromParams.ts @@ -0,0 +1,52 @@ +// Convenience method, almost need to turn it into a middleware of sorts +import { Meteor } from 'meteor/meteor'; + +import { Users } from '../../../models/server'; +import { API } from '../api'; + +API.helperMethods.set('getUserFromParams', function _getUserFromParams(this: any) { + const doesntExist = { _doesntExist: true }; + let user; + const params = this.requestParams(); + + if (params.userId?.trim()) { + user = Users.findOneById(params.userId) || doesntExist; + } else if (params.username?.trim()) { + user = Users.findOneByUsernameIgnoringCase(params.username) || doesntExist; + } else if (params.user?.trim()) { + user = Users.findOneByUsernameIgnoringCase(params.user) || doesntExist; + } else { + throw new Meteor.Error('error-user-param-not-provided', 'The required "userId" or "username" param was not provided'); + } + + if (user._doesntExist) { + throw new Meteor.Error('error-invalid-user', 'The required "userId" or "username" param provided does not match any users'); + } + + return user; +}); + +API.helperMethods.set('getUserListFromParams', function _getUserListFromParams(this: any) { + let users; + const params = this.requestParams(); + // if params.userId is provided, include it as well + const soleUser = params.userId || params.username || params.user; + let userListParam = params.userIds || params.usernames || []; + userListParam.push(soleUser); + userListParam = userListParam.filter(Boolean); + + // deduplicate to avoid errors + userListParam = [...new Set(userListParam)]; + + if (!userListParam.length) { + throw new Meteor.Error('error-users-params-not-provided', 'Please provide "userId" or "username" or "userIds" or "usernames" as param'); + } + + if (params.userIds || params.userId) { + users = Users.findByIds(userListParam); + } else { + users = Users.findByUsernamesIgnoringCase(userListParam); + } + + return users.fetch(); +}); diff --git a/apps/meteor/app/api/server/helpers/getUserInfo.ts b/apps/meteor/app/api/server/helpers/getUserInfo.ts new file mode 100644 index 000000000000..ed0ed362a3ed --- /dev/null +++ b/apps/meteor/app/api/server/helpers/getUserInfo.ts @@ -0,0 +1,42 @@ +import type { IUser, IUserEmail } from '@rocket.chat/core-typings'; + +import { settings } from '../../../settings/server'; +import { getUserPreference, getURL } from '../../../utils/server'; +import { API } from '../api'; + +const isVerifiedEmail = (me: IUser): false | IUserEmail | undefined => { + if (!me || !Array.isArray(me.emails)) { + return false; + } + + return me.emails.find((email) => email.verified); +}; + +const getUserPreferences = (me: IUser): Record => { + const defaultUserSettingPrefix = 'Accounts_Default_User_Preferences_'; + const allDefaultUserSettings = settings.getByRegexp(new RegExp(`^${defaultUserSettingPrefix}.*$`)); + + return allDefaultUserSettings.reduce((accumulator: { [key: string]: unknown }, [key]) => { + const settingWithoutPrefix = key.replace(defaultUserSettingPrefix, ' ').trim(); + accumulator[settingWithoutPrefix] = getUserPreference(me, settingWithoutPrefix); + return accumulator; + }, {}); +}; +API.helperMethods.set('getUserInfo', function _getUserInfo(me: IUser) { + const verifiedEmail = isVerifiedEmail(me); + + const userPreferences = me.settings?.preferences ?? {}; + + return { + ...me, + email: verifiedEmail ? verifiedEmail.address : undefined, + settings: { + profile: {}, + preferences: { + ...getUserPreferences(me), + ...userPreferences, + }, + }, + avatarUrl: getURL(`/avatar/${me.username}`, { cdn: false, full: true }), + }; +}); diff --git a/apps/meteor/app/api/server/helpers/isUserFromParams.ts b/apps/meteor/app/api/server/helpers/isUserFromParams.ts new file mode 100644 index 000000000000..d32abe05c4e7 --- /dev/null +++ b/apps/meteor/app/api/server/helpers/isUserFromParams.ts @@ -0,0 +1,12 @@ +import { API } from '../api'; + +API.helperMethods.set('isUserFromParams', function _isUserFromParams(this: any) { + const params = this.requestParams(); + + return ( + (!params.userId && !params.username && !params.user) || + (params.userId && this.userId === params.userId) || + (params.username && this.user.username === params.username) || + (params.user && this.user.username === params.user) + ); +}); diff --git a/apps/meteor/app/api/server/helpers/isWidget.ts b/apps/meteor/app/api/server/helpers/isWidget.ts new file mode 100644 index 000000000000..9a080cf5d569 --- /dev/null +++ b/apps/meteor/app/api/server/helpers/isWidget.ts @@ -0,0 +1,13 @@ +import { parse } from 'cookie'; + +import { API } from '../api'; + +API.helperMethods.set('isWidget', function _isWidget() { + // @ts-expect-error 'this' implicitly has type 'any' because it does not have a type annotation. + const { headers } = this.request; + + const { rc_room_type: roomType, rc_is_widget: isWidget } = parse(headers.cookie || ''); + + const isLivechatRoom = roomType && roomType === 'l'; + return !!(isLivechatRoom && isWidget === 't'); +}); diff --git a/apps/meteor/app/api/server/helpers/parseJsonQuery.ts b/apps/meteor/app/api/server/helpers/parseJsonQuery.ts new file mode 100644 index 000000000000..25371d232e19 --- /dev/null +++ b/apps/meteor/app/api/server/helpers/parseJsonQuery.ts @@ -0,0 +1,151 @@ +import { Meteor } from 'meteor/meteor'; +import { EJSON } from 'meteor/ejson'; + +import { hasPermission } from '../../../authorization/server'; +import { isValidQuery } from '../lib/isValidQuery'; +import { clean } from '../lib/cleanQuery'; +import { API } from '../api'; + +const pathAllowConf = { + '/api/v1/users.list': ['$or', '$regex', '$and'], + 'def': ['$or', '$and', '$regex'], +}; + +const warnFields = + process.env.NODE_ENV !== 'production' || process.env.SHOW_WARNINGS === 'true' + ? (...rest: any): void => { + console.warn(...rest, new Error().stack); + } + : new Function(); + +API.helperMethods.set( + 'parseJsonQuery', + function _parseJsonQuery(this: { + request: { + route: string; + }; + queryParams: { + query?: string; + sort?: string; + fields?: string; + }; + logger: any; + userId: string; + queryFields: string[]; + queryOperations: string[]; + }) { + let sort; + if (this.queryParams.sort) { + try { + sort = JSON.parse(this.queryParams.sort); + Object.entries(sort).forEach(([key, value]) => { + if (value !== 1 && value !== -1) { + throw new Meteor.Error('error-invalid-sort-parameter', `Invalid sort parameter: ${key}`, { + helperMethod: 'parseJsonQuery', + }); + } + }); + } catch (e) { + this.logger.warn(`Invalid sort parameter provided "${this.queryParams.sort}":`, e); + throw new Meteor.Error('error-invalid-sort', `Invalid sort parameter provided: "${this.queryParams.sort}"`, { + helperMethod: 'parseJsonQuery', + }); + } + } + + let fields: Record | undefined; + if (this.queryParams.fields) { + warnFields('attribute fields is deprecated'); + try { + fields = JSON.parse(this.queryParams.fields) as Record; + + Object.entries(fields).forEach(([key, value]) => { + if (value !== 1 && value !== 0) { + throw new Meteor.Error('error-invalid-sort-parameter', `Invalid fields parameter: ${key}`, { + helperMethod: 'parseJsonQuery', + }); + } + }); + } catch (e) { + this.logger.warn(`Invalid fields parameter provided "${this.queryParams.fields}":`, e); + throw new Meteor.Error('error-invalid-fields', `Invalid fields parameter provided: "${this.queryParams.fields}"`, { + helperMethod: 'parseJsonQuery', + }); + } + } + + // Verify the user's selected fields only contains ones which their role allows + if (typeof fields === 'object') { + let nonSelectableFields = Object.keys(API.v1.defaultFieldsToExclude); + if (this.request.route.includes('/v1/users.')) { + const getFields = (): string[] => + Object.keys( + hasPermission(this.userId, 'view-full-other-user-info') + ? API.v1.limitedUserFieldsToExcludeIfIsPrivilegedUser + : API.v1.limitedUserFieldsToExclude, + ); + nonSelectableFields = nonSelectableFields.concat(getFields()); + } + + Object.keys(fields).forEach((k) => { + if (nonSelectableFields.includes(k) || nonSelectableFields.includes(k.split(API.v1.fieldSeparator)[0])) { + fields && delete fields[k as keyof typeof fields]; + } + }); + } + + // Limit the fields by default + fields = Object.assign({}, fields, API.v1.defaultFieldsToExclude); + if (this.request.route.includes('/v1/users.')) { + if (hasPermission(this.userId, 'view-full-other-user-info')) { + fields = Object.assign(fields, API.v1.limitedUserFieldsToExcludeIfIsPrivilegedUser); + } else { + fields = Object.assign(fields, API.v1.limitedUserFieldsToExclude); + } + } + + let query: Record = {}; + if (this.queryParams.query) { + warnFields('attribute query is deprecated'); + + try { + query = EJSON.parse(this.queryParams.query); + query = clean(query, pathAllowConf.def); + } catch (e) { + this.logger.warn(`Invalid query parameter provided "${this.queryParams.query}":`, e); + throw new Meteor.Error('error-invalid-query', `Invalid query parameter provided: "${this.queryParams.query}"`, { + helperMethod: 'parseJsonQuery', + }); + } + } + + // Verify the user has permission to query the fields they are + if (typeof query === 'object') { + let nonQueryableFields = Object.keys(API.v1.defaultFieldsToExclude); + + if (this.request.route.includes('/v1/users.')) { + if (hasPermission(this.userId, 'view-full-other-user-info')) { + nonQueryableFields = nonQueryableFields.concat(Object.keys(API.v1.limitedUserFieldsToExcludeIfIsPrivilegedUser)); + } else { + nonQueryableFields = nonQueryableFields.concat(Object.keys(API.v1.limitedUserFieldsToExclude)); + } + } + + if (this.queryFields && !isValidQuery(query, this.queryFields || ['*'], this.queryOperations ?? pathAllowConf.def)) { + throw new Meteor.Error('error-invalid-query', isValidQuery.errors.join('\n')); + } + + Object.keys(query).forEach((k) => { + if (nonQueryableFields.includes(k) || nonQueryableFields.includes(k.split(API.v1.fieldSeparator)[0])) { + query && delete query[k]; + } + }); + } + + return { + sort, + fields, + query, + }; + }, +); diff --git a/apps/meteor/app/api/server/helpers/requestParams.ts b/apps/meteor/app/api/server/helpers/requestParams.ts new file mode 100644 index 000000000000..a68205ab09ed --- /dev/null +++ b/apps/meteor/app/api/server/helpers/requestParams.ts @@ -0,0 +1,5 @@ +import { API } from '../api'; + +API.helperMethods.set('requestParams', function _requestParams(this: any) { + return ['POST', 'PUT'].includes(this.request.method) ? this.bodyParams : this.queryParams; +}); diff --git a/apps/meteor/app/api/server/index.ts b/apps/meteor/app/api/server/index.ts new file mode 100644 index 000000000000..921e55449252 --- /dev/null +++ b/apps/meteor/app/api/server/index.ts @@ -0,0 +1,53 @@ +import './settings'; +import './helpers/composeRoomWithLastMessage'; +import './helpers/deprecationWarning'; +import './helpers/getLoggedInUser'; +import './helpers/getPaginationItems'; +import './helpers/getUserFromParams'; +import './helpers/getUserInfo'; +import './helpers/isUserFromParams'; +import './helpers/parseJsonQuery'; +import './helpers/requestParams'; +import './helpers/isWidget'; +import './default/info'; +import './v1/assets'; +import './v1/channels.js'; +import './v1/channels.ts'; +import './v1/chat'; +import './v1/cloud'; +import './v1/commands'; +import './v1/dns'; +import './v1/e2e'; +import './v1/emoji-custom'; +import './v1/groups'; +import './v1/im'; +import './v1/integrations'; +import './v1/invites'; +import './v1/import'; +import './v1/ldap'; +import './v1/misc'; +import './v1/permissions'; +import './v1/push'; +import './v1/roles'; +import './v1/rooms.js'; +import './v1/rooms.ts'; +import './v1/settings'; +import './v1/stats'; +import './v1/subscriptions'; +import './v1/users'; +import './v1/videoConference'; +import './v1/autotranslate'; +import './v1/webdav'; +import './v1/oauthapps'; +import './v1/custom-sounds'; +import './v1/custom-user-status'; +import './v1/instances'; +import './v1/banners'; +import './v1/email-inbox'; +import './v1/teams'; +import './v1/voip/extensions'; +import './v1/voip/queues'; +import './v1/voip/omnichannel'; +import './v1/voip'; + +export { API, APIClass, defaultRateLimiterOptions } from './api'; diff --git a/app/api/server/lib/cleanQuery.ts b/apps/meteor/app/api/server/lib/cleanQuery.ts similarity index 89% rename from app/api/server/lib/cleanQuery.ts rename to apps/meteor/app/api/server/lib/cleanQuery.ts index 1fe250e94609..0b4d1d9952ee 100644 --- a/app/api/server/lib/cleanQuery.ts +++ b/apps/meteor/app/api/server/lib/cleanQuery.ts @@ -2,7 +2,7 @@ type Query = { [k: string]: any }; const denyList = ['constructor', '__proto__', 'prototype']; -const removeDangerousProps = (v: Query): Query => { +export const removeDangerousProps = (v: Query): Query => { const query = Object.create(null); for (const key in v) { if (v.hasOwnProperty(key) && !denyList.includes(key)) { @@ -12,7 +12,7 @@ const removeDangerousProps = (v: Query): Query => { return query; }; - +/* @deprecated */ export function clean(v: Query, allowList: string[] = []): Query { const typedParam = removeDangerousProps(v); if (v instanceof Object) { diff --git a/apps/meteor/app/api/server/lib/emailInbox.ts b/apps/meteor/app/api/server/lib/emailInbox.ts new file mode 100644 index 000000000000..1e6e1db36196 --- /dev/null +++ b/apps/meteor/app/api/server/lib/emailInbox.ts @@ -0,0 +1,99 @@ +import type { IEmailInbox } from '@rocket.chat/core-typings'; +import type { Filter, InsertOneResult, Sort, UpdateResult, WithId } from 'mongodb'; +import { EmailInbox } from '@rocket.chat/models'; + +import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission'; +import { Users } from '../../../models/server'; + +export const findEmailInboxes = async ({ + userId, + query = {}, + pagination: { offset, count, sort }, +}: { + userId: string; + query?: Filter; + pagination: { + offset: number; + count: number; + sort?: Sort; + }; +}): Promise<{ + emailInboxes: IEmailInbox[]; + total: number; + count: number; + offset: number; +}> => { + if (!(await hasPermissionAsync(userId, 'manage-email-inbox'))) { + throw new Error('error-not-allowed'); + } + const { cursor, totalCount } = EmailInbox.findPaginated(query, { + sort: sort || { name: 1 }, + skip: offset, + limit: count, + }); + + const [emailInboxes, total] = await Promise.all([cursor.toArray(), totalCount]); + + return { + emailInboxes, + count: emailInboxes.length, + offset, + total, + }; +}; + +export const findOneEmailInbox = async ({ userId, _id }: { userId: string; _id: string }): Promise => { + if (!(await hasPermissionAsync(userId, 'manage-email-inbox'))) { + throw new Error('error-not-allowed'); + } + return EmailInbox.findOneById(_id); +}; +export const insertOneEmailInbox = async ( + userId: string, + emailInboxParams: Pick, +): Promise>> => { + const obj = { + ...emailInboxParams, + _createdAt: new Date(), + _updatedAt: new Date(), + _createdBy: Users.findOne(userId, { fields: { username: 1 } }), + }; + return EmailInbox.insertOne(obj); +}; + +export const updateEmailInbox = async ( + userId: string, + emailInboxParams: Pick, +): Promise> | UpdateResult> => { + const { _id, active, name, email, description, senderInfo, department, smtp, imap } = emailInboxParams; + + const emailInbox = await findOneEmailInbox({ userId, _id }); + + if (!emailInbox) { + throw new Error('error-invalid-email-inbox'); + } + + const updateEmailInbox = { + $set: { + active, + name, + email, + description, + senderInfo, + smtp, + imap, + _updatedAt: new Date(), + ...(department !== 'All' && { department }), + }, + ...(department === 'All' && { $unset: { department: 1 as const } }), + }; + + return EmailInbox.updateOne({ _id }, updateEmailInbox); +}; + +export const findOneEmailInboxByEmail = async ({ userId, email }: { userId: string; email: string }): Promise => { + if (!(await hasPermissionAsync(userId, 'manage-email-inbox'))) { + throw new Error('error-not-allowed'); + } + return EmailInbox.findOne({ email }); +}; diff --git a/apps/meteor/app/api/server/lib/emoji-custom.ts b/apps/meteor/app/api/server/lib/emoji-custom.ts new file mode 100644 index 000000000000..c94139c82db0 --- /dev/null +++ b/apps/meteor/app/api/server/lib/emoji-custom.ts @@ -0,0 +1,31 @@ +import type { IEmojiCustom } from '@rocket.chat/core-typings'; +import type { Filter, FindOptions } from 'mongodb'; +import { EmojiCustom } from '@rocket.chat/models'; + +export async function findEmojisCustom({ + query = {}, + pagination: { offset, count, sort }, +}: { + query: Filter; + pagination: { offset: number; count: number; sort: FindOptions['sort'] }; +}): Promise<{ + emojis: IEmojiCustom[]; + count: number; + offset: any; + total: number; +}> { + const { cursor, totalCount } = EmojiCustom.findPaginated(query, { + sort: sort || { name: 1 }, + skip: offset, + limit: count, + }); + + const [emojis, total] = await Promise.all([cursor.toArray(), totalCount]); + + return { + emojis, + count: emojis.length, + offset, + total, + }; +} diff --git a/apps/meteor/app/api/server/lib/getServerInfo.ts b/apps/meteor/app/api/server/lib/getServerInfo.ts new file mode 100644 index 000000000000..a4f9f953b8bd --- /dev/null +++ b/apps/meteor/app/api/server/lib/getServerInfo.ts @@ -0,0 +1,23 @@ +import { Info } from '../../../utils/server'; +import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission'; + +type ServerInfo = + | { + info: typeof Info; + } + | { + version: string | undefined; + }; + +const removePatchInfo = (version: string): string => version.replace(/(\d+\.\d+).*/, '$1'); + +export async function getServerInfo(userId?: string): Promise { + if (userId && (await hasPermissionAsync(userId, 'get-server-info'))) { + return { + info: Info, + }; + } + return { + version: removePatchInfo(Info.version), + }; +} diff --git a/apps/meteor/app/api/server/lib/getUploadFormData.ts b/apps/meteor/app/api/server/lib/getUploadFormData.ts new file mode 100644 index 000000000000..15a433a21413 --- /dev/null +++ b/apps/meteor/app/api/server/lib/getUploadFormData.ts @@ -0,0 +1,84 @@ +import type { Readable } from 'stream'; + +import { Meteor } from 'meteor/meteor'; +import type { Request } from 'express'; +import busboy from 'busboy'; +import type { ValidateFunction } from 'ajv'; + +type UploadResult = { + file: Readable; + filename: string; + encoding: string; + mimetype: string; + fileBuffer: Buffer; +}; + +export const getUploadFormData = async < + T extends string, + K extends Record = Record, + V extends ValidateFunction = ValidateFunction, +>( + { request }: { request: Request }, + options: { + field?: T; + validate?: V; + } = {}, +): Promise<[UploadResult, K, T]> => + new Promise((resolve, reject) => { + const bb = busboy({ headers: request.headers, defParamCharset: 'utf8' }); + const fields = Object.create(null) as K; + + let uploadedFile: UploadResult | undefined; + + let assetName: T | undefined; + + bb.on( + 'file', + ( + fieldname: string, + file: Readable, + { filename, encoding, mimeType: mimetype }: { filename: string; encoding: string; mimeType: string }, + ) => { + const fileData: Uint8Array[] = []; + + file.on('data', (data: any) => fileData.push(data)); + + file.on('end', () => { + if (uploadedFile) { + return reject('Just 1 file is allowed'); + } + if (options.field && fieldname !== options.field) { + return reject(new Meteor.Error('invalid-field')); + } + uploadedFile = { + file, + filename, + encoding, + mimetype, + fileBuffer: Buffer.concat(fileData), + }; + + assetName = fieldname as T; + }); + }, + ); + + bb.on('field', (fieldname: keyof K, value: K[keyof K]) => { + fields[fieldname] = value; + }); + + bb.on('finish', () => { + if (!uploadedFile || !assetName) { + return reject('No file uploaded'); + } + if (options.validate === undefined) { + return resolve([uploadedFile, fields, assetName]); + } + if (!options.validate(fields)) { + return reject(`Invalid fields${options.validate.errors?.join(', ')}`); + } + return resolve([uploadedFile, fields, assetName]); + }); + + request.pipe(bb); + }); diff --git a/apps/meteor/app/api/server/lib/integrations.ts b/apps/meteor/app/api/server/lib/integrations.ts new file mode 100644 index 000000000000..517b64ad3440 --- /dev/null +++ b/apps/meteor/app/api/server/lib/integrations.ts @@ -0,0 +1,40 @@ +import type { IIntegration, IUser } from '@rocket.chat/core-typings'; +import { Integrations } from '@rocket.chat/models'; + +import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission'; + +const hasIntegrationsPermission = async (userId: string, integration: IIntegration): Promise => { + const type = integration.type === 'webhook-incoming' ? 'incoming' : 'outgoing'; + + if (await hasPermissionAsync(userId, `manage-${type}-integrations`)) { + return true; + } + + if (userId === integration._createdBy._id) { + return hasPermissionAsync(userId, `manage-own-${type}-integrations`); + } + + return false; +}; + +export const findOneIntegration = async ({ + userId, + integrationId, + createdBy, +}: { + userId: string; + integrationId: string; + createdBy?: IUser['_id']; +}): Promise => { + const integration = await Integrations.findOneByIdAndCreatedByIfExists({ + _id: integrationId, + createdBy, + }); + if (!integration) { + throw new Error('The integration does not exists.'); + } + if (!(await hasIntegrationsPermission(userId, integration))) { + throw new Error('not-authorized'); + } + return integration; +}; diff --git a/apps/meteor/app/api/server/lib/isValidQuery.ts b/apps/meteor/app/api/server/lib/isValidQuery.ts new file mode 100644 index 000000000000..361e49966f6b --- /dev/null +++ b/apps/meteor/app/api/server/lib/isValidQuery.ts @@ -0,0 +1,58 @@ +import { removeDangerousProps } from './cleanQuery'; + +type Query = { [k: string]: any }; + +export const isValidQuery: { + (query: Query, allowedAttributes: string[], allowedOperations: string[]): boolean; + errors: string[]; +} = Object.assign( + (query: Query, allowedAttributes: string[], allowedOperations: string[]): boolean => { + isValidQuery.errors = []; + if (!(query instanceof Object)) { + throw new Error('query must be an object'); + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + return verifyQuery(query, allowedAttributes, allowedOperations); + }, + { + errors: [], + }, +); + +export const verifyQuery = (query: Query, allowedAttributes: string[], allowedOperations: string[], parent = ''): boolean => { + return Object.entries(removeDangerousProps(query)).every(([key, value]) => { + const path = parent ? `${parent}.${key}` : key; + if (parent === '' && path.startsWith('$')) { + if (!allowedOperations.includes(path)) { + isValidQuery.errors.push(`Invalid operation: ${path}`); + return false; + } + if (!Array.isArray(value)) { + isValidQuery.errors.push(`Invalid parameter for operation: ${path} : ${value}`); + return false; + } + return value.every((v) => verifyQuery(v, allowedAttributes, allowedOperations)); + } + + if ( + !allowedAttributes.some((allowedAttribute) => { + if (allowedAttribute.endsWith('.*')) { + return path.startsWith(allowedAttribute.replace('.*', '')); + } + if (allowedAttribute.endsWith('*') && !allowedAttribute.endsWith('.*')) { + return true; + } + return path === allowedAttribute; + }) + ) { + isValidQuery.errors.push(`Invalid attribute: ${path}`); + return false; + } + + if (value instanceof Object) { + return verifyQuery(value, allowedAttributes, allowedOperations, path); + } + return true; + }); +}; diff --git a/apps/meteor/app/api/server/lib/messages.ts b/apps/meteor/app/api/server/lib/messages.ts new file mode 100644 index 000000000000..d6955ce7b933 --- /dev/null +++ b/apps/meteor/app/api/server/lib/messages.ts @@ -0,0 +1,189 @@ +import type { FindOptions } from 'mongodb'; +import type { IMessage, IUser } from '@rocket.chat/core-typings'; +import { Rooms, Messages, Users } from '@rocket.chat/models'; + +import { canAccessRoomAsync } from '../../../authorization/server/functions/canAccessRoom'; +import { getValue } from '../../../settings/server/raw'; + +export async function findMentionedMessages({ + uid, + roomId, + pagination: { offset, count, sort }, +}: { + uid: string; + roomId: string; + pagination: { offset: number; count: number; sort: FindOptions['sort'] }; +}): Promise<{ + messages: IMessage[]; + count: number; + offset: number; + total: number; +}> { + const room = await Rooms.findOneById(roomId); + if (!room || !(await canAccessRoomAsync(room, { _id: uid }))) { + throw new Error('error-not-allowed'); + } + const user = await Users.findOneById>(uid, { projection: { username: 1 } }); + if (!user) { + throw new Error('invalid-user'); + } + + const { cursor, totalCount } = Messages.findVisibleByMentionAndRoomId(user.username, roomId, { + sort: sort || { ts: -1 }, + skip: offset, + limit: count, + }); + + const [messages, total] = await Promise.all([cursor.toArray(), totalCount]); + + return { + messages, + count: messages.length, + offset, + total, + }; +} + +export async function findStarredMessages({ + uid, + roomId, + pagination: { offset, count, sort }, +}: { + uid: string; + roomId: string; + pagination: { offset: number; count: number; sort: FindOptions['sort'] }; +}): Promise<{ + messages: IMessage[]; + count: number; + offset: any; + total: number; +}> { + const room = await Rooms.findOneById(roomId); + if (!room || !(await canAccessRoomAsync(room, { _id: uid }))) { + throw new Error('error-not-allowed'); + } + const user = await Users.findOneById>(uid, { projection: { username: 1 } }); + if (!user) { + throw new Error('invalid-user'); + } + + const { cursor, totalCount } = Messages.findStarredByUserAtRoom(uid, roomId, { + sort: sort || { ts: -1 }, + skip: offset, + limit: count, + }); + + const [messages, total] = await Promise.all([cursor.toArray(), totalCount]); + + return { + messages, + count: messages.length, + offset, + total, + }; +} + +export async function findSnippetedMessageById({ uid, messageId }: { uid: string; messageId: string }): Promise { + if (!(await getValue('Message_AllowSnippeting'))) { + throw new Error('error-not-allowed'); + } + + if (!uid) { + throw new Error('invalid-user'); + } + + const snippet = await Messages.findOne({ _id: messageId, snippeted: true }); + + if (!snippet) { + throw new Error('invalid-message'); + } + + const room = await Rooms.findOneById(snippet.rid); + + if (!room) { + throw new Error('invalid-message'); + } + + if (!(await canAccessRoomAsync(room, { _id: uid }))) { + throw new Error('error-not-allowed'); + } + + return snippet; +} + +export async function findSnippetedMessages({ + uid, + roomId, + pagination: { offset, count, sort }, +}: { + uid: string; + roomId: string; + pagination: { offset: number; count: number; sort: FindOptions['sort'] }; +}): Promise<{ + messages: IMessage[]; + count: number; + offset: number; + total: number; +}> { + if (!(await getValue('Message_AllowSnippeting'))) { + throw new Error('error-not-allowed'); + } + const room = await Rooms.findOneById(roomId); + + if (!room || !(await canAccessRoomAsync(room, { _id: uid }))) { + throw new Error('error-not-allowed'); + } + + const { cursor, totalCount } = Messages.findSnippetedByRoom(roomId, { + sort: sort || { ts: -1 }, + skip: offset, + limit: count, + }); + + const [messages, total] = await Promise.all([cursor.toArray(), totalCount]); + + return { + messages, + count: messages.length, + offset, + total, + }; +} + +export async function findDiscussionsFromRoom({ + uid, + roomId, + text, + pagination: { offset, count, sort }, +}: { + uid: string; + roomId: string; + text: string; + pagination: { offset: number; count: number; sort: FindOptions['sort'] }; +}): Promise<{ + messages: IMessage[]; + count: number; + offset: number; + total: number; +}> { + const room = await Rooms.findOneById(roomId); + + if (!room || !(await canAccessRoomAsync(room, { _id: uid }))) { + throw new Error('error-not-allowed'); + } + + const { cursor, totalCount } = await Messages.findDiscussionsByRoomAndText(roomId, text, { + sort: sort || { ts: -1 }, + skip: offset, + limit: count, + }); + + const [messages, total] = await Promise.all([cursor.toArray(), totalCount]); + + return { + messages, + count: messages.length, + offset, + total, + }; +} diff --git a/apps/meteor/app/api/server/lib/rooms.ts b/apps/meteor/app/api/server/lib/rooms.ts new file mode 100644 index 000000000000..32908c185441 --- /dev/null +++ b/apps/meteor/app/api/server/lib/rooms.ts @@ -0,0 +1,189 @@ +import type { IRoom, ISubscription } from '@rocket.chat/core-typings'; +import { Rooms } from '@rocket.chat/models'; + +import { hasPermissionAsync, hasAtLeastOnePermissionAsync } from '../../../authorization/server/functions/hasPermission'; +import { Subscriptions } from '../../../models/server'; +import { adminFields } from '../../../../lib/rooms/adminFields'; + +export async function findAdminRooms({ + uid, + filter, + types = [], + pagination: { offset, count, sort }, +}: { + uid: string; + filter: string; + types: string[]; + pagination: { offset: number; count: number; sort: [string, number][] }; +}): Promise<{ + rooms: IRoom[]; + count: number; + offset: number; + total: number; +}> { + if (!(await hasPermissionAsync(uid, 'view-room-administration'))) { + throw new Error('error-not-authorized'); + } + const name = filter?.trim(); + const discussion = types?.includes('discussions'); + const includeTeams = types?.includes('teams'); + const showOnlyTeams = types.length === 1 && types.includes('teams'); + const typesToRemove = ['discussions', 'teams']; + const showTypes = Array.isArray(types) ? types.filter((type) => !typesToRemove.includes(type)) : []; + const options = { + projection: adminFields, + sort: sort || { default: -1, name: 1 }, + skip: offset, + limit: count, + }; + + let result; + if (name && showTypes.length) { + result = Rooms.findByNameContainingAndTypes(name, showTypes, discussion, includeTeams, showOnlyTeams, options); + } else if (showTypes.length) { + result = Rooms.findByTypes(showTypes, discussion, includeTeams, showOnlyTeams, options); + } else { + result = Rooms.findByNameContaining(name, discussion, includeTeams, showOnlyTeams, options); + } + + const { cursor, totalCount } = result; + + const [rooms, total] = await Promise.all([cursor.toArray(), totalCount]); + + return { + rooms, + count: rooms.length, + offset, + total, + }; +} + +export async function findAdminRoom({ uid, rid }: { uid: string; rid: string }): Promise { + if (!(await hasPermissionAsync(uid, 'view-room-administration'))) { + throw new Error('error-not-authorized'); + } + + return Rooms.findOneById(rid, { projection: adminFields }); +} + +export async function findChannelAndPrivateAutocomplete({ uid, selector }: { uid: string; selector: { name: string } }): Promise<{ + items: IRoom[]; +}> { + const options = { + projection: { + _id: 1, + fname: 1, + name: 1, + t: 1, + avatarETag: 1, + }, + limit: 10, + sort: { + name: 1, + }, + }; + + const userRoomsIds = Subscriptions.cachedFindByUserId(uid, { fields: { rid: 1 } }) + .fetch() + .map((item: Pick) => item.rid); + + const rooms = await Rooms.findRoomsWithoutDiscussionsByRoomIds(selector.name, userRoomsIds, options).toArray(); + + return { + items: rooms, + }; +} + +export async function findAdminRoomsAutocomplete({ uid, selector }: { uid: string; selector: { name: string } }): Promise<{ + items: IRoom[]; +}> { + if (!(await hasAtLeastOnePermissionAsync(uid, ['view-room-administration', 'can-audit']))) { + throw new Error('error-not-authorized'); + } + const options = { + projection: { + _id: 1, + fname: 1, + name: 1, + t: 1, + avatarETag: 1, + }, + limit: 10, + sort: { + name: 1, + }, + }; + + const rooms = await Rooms.findRoomsByNameOrFnameStarting(selector.name, options).toArray(); + + return { + items: rooms, + }; +} + +export async function findChannelAndPrivateAutocompleteWithPagination({ + uid, + selector, + pagination: { offset, count, sort }, +}: { + uid: string; + selector: { name: string }; + pagination: { offset: number; count: number; sort: [string, number][] }; +}): Promise<{ + items: IRoom[]; + total: number; +}> { + const userRoomsIds = Subscriptions.cachedFindByUserId(uid, { fields: { rid: 1 } }) + .fetch() + .map((item: Pick) => item.rid); + + const options = { + projection: { + _id: 1, + fname: 1, + name: 1, + t: 1, + avatarETag: 1, + }, + sort: sort || { name: 1 }, + skip: offset, + limit: count, + }; + + const { cursor, totalCount } = Rooms.findPaginatedRoomsWithoutDiscussionsByRoomIds(selector.name, userRoomsIds, options); + + const [rooms, total] = await Promise.all([cursor.toArray(), totalCount]); + + return { + items: rooms, + total, + }; +} + +export async function findRoomsAvailableForTeams({ uid, name }: { uid: string; name: string }): Promise<{ + items: IRoom[]; +}> { + const options = { + projection: { + _id: 1, + fname: 1, + name: 1, + t: 1, + avatarETag: 1, + }, + limit: 10, + sort: { + name: 1, + }, + }; + + const userRooms = ( + Subscriptions.findByUserIdAndRoles(uid, ['owner'], { fields: { rid: 1 } }).fetch() as Pick[] + ).map((item) => item.rid); + + const rooms = await Rooms.findChannelAndGroupListWithoutTeamsByNameStartingByOwner(uid, name, userRooms, options).toArray(); + + return { + items: rooms, + }; +} diff --git a/apps/meteor/app/api/server/lib/users.ts b/apps/meteor/app/api/server/lib/users.ts new file mode 100644 index 000000000000..38edb4fa5cd4 --- /dev/null +++ b/apps/meteor/app/api/server/lib/users.ts @@ -0,0 +1,111 @@ +import { escapeRegExp } from '@rocket.chat/string-helpers'; +import type { IUser } from '@rocket.chat/core-typings'; +import type { Filter } from 'mongodb'; +import { Users } from '@rocket.chat/models'; +import type { Mongo } from 'meteor/mongo'; + +import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission'; + +type UserAutoComplete = Required>; +export async function findUsersToAutocomplete({ + uid, + selector, +}: { + uid: string; + selector: { + exceptions: string[]; + conditions: Filter; + term: string; + }; +}): Promise<{ + items: UserAutoComplete[]; +}> { + if (!(await hasPermissionAsync(uid, 'view-outside-room'))) { + return { items: [] }; + } + const exceptions = selector.exceptions || []; + const conditions = selector.conditions || {}; + const options = { + projection: { + name: 1, + username: 1, + nickname: 1, + status: 1, + avatarETag: 1, + }, + sort: { + username: 1, + }, + limit: 10, + }; + + const users = await Users.findActiveByUsernameOrNameRegexWithExceptionsAndConditions( + new RegExp(escapeRegExp(selector.term), 'i'), + exceptions, + conditions, + options, + ).toArray(); + + return { + items: users, + }; +} + +/** + * Returns a new query object with the inclusive fields only + */ +export function getInclusiveFields(query: Record): Record { + const newQuery = Object.create(null); + + for (const [key, value] of Object.entries(query)) { + if (value === 1) { + newQuery[key] = value; + } + } + + return newQuery; +} + +/** + * get the default fields if **fields** are empty (`{}`) or `undefined`/`null` + * @param fields the fields from parsed jsonQuery + */ +export function getNonEmptyFields(fields: Record): Record { + const defaultFields = { + name: 1, + username: 1, + emails: 1, + roles: 1, + status: 1, + active: 1, + avatarETag: 1, + lastLogin: 1, + type: 1, + } as const; + + if (!fields || Object.keys(fields).length === 0) { + return defaultFields; + } + + return { ...defaultFields, ...fields }; +} + +/** + * get the default query if **query** is empty (`{}`) or `undefined`/`null` + * @param query the query from parsed jsonQuery + */ +export function getNonEmptyQuery(query: Mongo.Query | undefined | null, canSeeAllUserInfo?: boolean): Mongo.Query { + const defaultQuery: Mongo.Query = { + $or: [{ username: { $regex: '', $options: 'i' } }, { name: { $regex: '', $options: 'i' } }], + }; + + if (canSeeAllUserInfo) { + defaultQuery.$or?.push({ 'emails.address': { $regex: '', $options: 'i' } }); + } + + if (!query || Object.keys(query).length === 0) { + return defaultQuery; + } + + return { ...defaultQuery, ...query }; +} diff --git a/apps/meteor/app/api/server/lib/webdav.ts b/apps/meteor/app/api/server/lib/webdav.ts new file mode 100644 index 000000000000..db0c47a64e2d --- /dev/null +++ b/apps/meteor/app/api/server/lib/webdav.ts @@ -0,0 +1,13 @@ +import type { IWebdavAccount } from '@rocket.chat/core-typings'; +import { WebdavAccounts } from '@rocket.chat/models'; + +export async function findWebdavAccountsByUserId({ uid }: { uid: string }): Promise { + return WebdavAccounts.findWithUserId(uid, { + projection: { + _id: 1, + username: 1, + serverURL: 1, + name: 1, + }, + }).toArray(); +} diff --git a/apps/meteor/app/api/server/middlewares/authentication.ts b/apps/meteor/app/api/server/middlewares/authentication.ts new file mode 100644 index 000000000000..b378f21de845 --- /dev/null +++ b/apps/meteor/app/api/server/middlewares/authentication.ts @@ -0,0 +1,33 @@ +import type { Request, Response, NextFunction } from 'express'; + +import { Users } from '../../../models/server'; +import { oAuth2ServerAuth } from '../../../oauth2-server-config/server/oauth/oauth2-server'; + +export type AuthenticationMiddlewareConfig = { + rejectUnauthorized: boolean; +}; + +export const defaultAuthenticationMiddlewareConfig = { + rejectUnauthorized: true, +}; + +export function authenticationMiddleware(config: AuthenticationMiddlewareConfig = defaultAuthenticationMiddlewareConfig) { + return (req: Request, res: Response, next: NextFunction): void => { + const { 'x-user-id': userId, 'x-auth-token': authToken } = req.headers; + + if (userId && authToken) { + req.user = Users.findOneByIdAndLoginToken(userId, authToken); + } else { + req.user = oAuth2ServerAuth(req)?.user; + } + + if (config.rejectUnauthorized && !req.user) { + res.status(401).send('Unauthorized'); + return; + } + + req.userId = req?.user?._id; + + next(); + }; +} diff --git a/app/api/server/settings.ts b/apps/meteor/app/api/server/settings.ts similarity index 100% rename from app/api/server/settings.ts rename to apps/meteor/app/api/server/settings.ts diff --git a/apps/meteor/app/api/server/v1/assets.ts b/apps/meteor/app/api/server/v1/assets.ts new file mode 100644 index 000000000000..db3d63827535 --- /dev/null +++ b/apps/meteor/app/api/server/v1/assets.ts @@ -0,0 +1,58 @@ +import { Meteor } from 'meteor/meteor'; +import { isAssetsUnsetAssetProps } from '@rocket.chat/rest-typings'; + +import { RocketChatAssets } from '../../../assets/server'; +import { API } from '../api'; +import { getUploadFormData } from '../lib/getUploadFormData'; + +API.v1.addRoute( + 'assets.setAsset', + { authRequired: true }, + { + async post() { + const [asset, { refreshAllClients, assetName: customName }, fileName] = await getUploadFormData( + { + request: this.request, + }, + { field: 'asset' }, + ); + + const assetName = customName || fileName; + const assetsKeys = Object.keys(RocketChatAssets.assets); + + const isValidAsset = assetsKeys.includes(assetName); + if (!isValidAsset) { + throw new Meteor.Error('error-invalid-asset', 'Invalid asset'); + } + + Meteor.call('setAsset', asset.fileBuffer, asset.mimetype, assetName); + if (refreshAllClients) { + Meteor.call('refreshClients'); + } + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'assets.unsetAsset', + { + authRequired: true, + validateParams: isAssetsUnsetAssetProps, + }, + { + post() { + const { assetName, refreshAllClients } = this.bodyParams; + const isValidAsset = Object.keys(RocketChatAssets.assets).includes(assetName); + if (!isValidAsset) { + throw new Meteor.Error('error-invalid-asset', 'Invalid asset'); + } + Meteor.call('unsetAsset', assetName); + if (refreshAllClients) { + Meteor.call('refreshClients'); + } + return API.v1.success(); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/autotranslate.ts b/apps/meteor/app/api/server/v1/autotranslate.ts new file mode 100644 index 000000000000..826ed2ee2968 --- /dev/null +++ b/apps/meteor/app/api/server/v1/autotranslate.ts @@ -0,0 +1,93 @@ +import { Meteor } from 'meteor/meteor'; +import { + isAutotranslateSaveSettingsParamsPOST, + isAutotranslateTranslateMessageParamsPOST, + isAutotranslateGetSupportedLanguagesParamsGET, +} from '@rocket.chat/rest-typings'; + +import { API } from '../api'; +import { settings } from '../../../settings/server'; +import { Messages } from '../../../models/server'; + +API.v1.addRoute( + 'autotranslate.getSupportedLanguages', + { + authRequired: true, + validateParams: isAutotranslateGetSupportedLanguagesParamsGET, + }, + { + get() { + if (!settings.get('AutoTranslate_Enabled')) { + return API.v1.failure('AutoTranslate is disabled.'); + } + const { targetLanguage } = this.queryParams; + const languages = Meteor.call('autoTranslate.getSupportedLanguages', targetLanguage); + + return API.v1.success({ languages: languages || [] }); + }, + }, +); + +API.v1.addRoute( + 'autotranslate.saveSettings', + { + authRequired: true, + validateParams: isAutotranslateSaveSettingsParamsPOST, + }, + { + post() { + const { roomId, field, value, defaultLanguage } = this.bodyParams; + if (!settings.get('AutoTranslate_Enabled')) { + return API.v1.failure('AutoTranslate is disabled.'); + } + + if (!roomId) { + return API.v1.failure('The bodyParam "roomId" is required.'); + } + if (!field) { + return API.v1.failure('The bodyParam "field" is required.'); + } + if (value === undefined) { + return API.v1.failure('The bodyParam "value" is required.'); + } + if (field === 'autoTranslate' && typeof value !== 'boolean') { + return API.v1.failure('The bodyParam "autoTranslate" must be a boolean.'); + } + + if (field === 'autoTranslateLanguage' && (typeof value !== 'string' || !Number.isNaN(Number.parseInt(value)))) { + return API.v1.failure('The bodyParam "autoTranslateLanguage" must be a string.'); + } + + Meteor.call('autoTranslate.saveSettings', roomId, field, value === true ? '1' : String(value).valueOf(), { defaultLanguage }); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'autotranslate.translateMessage', + { + authRequired: true, + validateParams: isAutotranslateTranslateMessageParamsPOST, + }, + { + post() { + const { messageId, targetLanguage } = this.bodyParams; + if (!settings.get('AutoTranslate_Enabled')) { + return API.v1.failure('AutoTranslate is disabled.'); + } + if (!messageId) { + return API.v1.failure('The bodyParam "messageId" is required.'); + } + const message = Messages.findOneById(messageId); + if (!message) { + return API.v1.failure('Message not found.'); + } + + const translatedMessage = Meteor.call('autoTranslate.translateMessage', message, targetLanguage); + + return API.v1.success({ message: translatedMessage }); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/banners.ts b/apps/meteor/app/api/server/v1/banners.ts new file mode 100644 index 000000000000..4b979b376d94 --- /dev/null +++ b/apps/meteor/app/api/server/v1/banners.ts @@ -0,0 +1,260 @@ +import { Match, check } from 'meteor/check'; +import { BannerPlatform } from '@rocket.chat/core-typings'; + +import { API } from '../api'; +import { Banner } from '../../../../server/sdk'; + +/** + * @deprecated + * @openapi + * /api/v1/banners.getNew: + * get: + * description: Gets the banners to be shown to the authenticated user + * deprecated: true + * security: + * $ref: '#/security/authenticated' + * parameters: + * - name: platform + * in: query + * description: The platform rendering the banner + * required: true + * schema: + * type: string + * enum: [web, mobile] + * example: web + * - name: bid + * in: query + * description: The id of a single banner + * required: false + * schema: + * type: string + * example: ByehQjC44FwMeiLbX + * responses: + * 200: + * description: The banners matching the criteria + * content: + * application/json: + * schema: + * allOf: + * - $ref: '#/components/schemas/ApiSuccessV1' + * - type: object + * properties: + * banners: + * type: array + * items: + * $ref: '#/components/schemas/IBanner' + * default: + * description: Unexpected error + * content: + * application/json: + * schema: + * $ref: '#/components/schemas/ApiFailureV1' + */ +API.v1.addRoute( + 'banners.getNew', + { authRequired: true }, + { + // deprecated + async get() { + check( + this.queryParams, + Match.ObjectIncluding({ + platform: Match.OneOf(...Object.values(BannerPlatform)), + bid: Match.Maybe(String), + }), + ); + + const { platform, bid: bannerId } = this.queryParams; + + const banners = await Banner.getBannersForUser(this.userId, platform, bannerId ?? undefined); + + return API.v1.success({ banners }); + }, + }, +); + +/** + * @openapi + * /api/v1/banners/{id}: + * get: + * description: Gets the banner to be shown to the authenticated user + * security: + * $ref: '#/security/authenticated' + * parameters: + * - name: platform + * in: query + * description: The platform rendering the banner + * required: true + * schema: + * type: string + * enum: [web, mobile] + * example: web + * - name: id + * in: path + * description: The id of the banner + * required: true + * schema: + * type: string + * example: ByehQjC44FwMeiLbX + * responses: + * 200: + * description: | + * A collection with a single banner matching the criteria; an empty + * collection otherwise + * content: + * application/json: + * schema: + * allOf: + * - $ref: '#/components/schemas/ApiSuccessV1' + * - type: object + * properties: + * banners: + * type: array + * items: + * $ref: '#/components/schemas/IBanner' + * default: + * description: Unexpected error + * content: + * application/json: + * schema: + * $ref: '#/components/schemas/ApiFailureV1' + */ +API.v1.addRoute( + 'banners/:id', + { authRequired: true }, + { + // TODO: move to users/:id/banners + async get() { + check( + this.urlParams, + Match.ObjectIncluding({ + id: Match.Where((id: unknown): id is string => typeof id === 'string' && Boolean(id.trim())), + }), + ); + check( + this.queryParams, + Match.ObjectIncluding({ + platform: Match.OneOf(...Object.values(BannerPlatform)), + }), + ); + + const { platform } = this.queryParams; + const { id } = this.urlParams; + + const banners = await Banner.getBannersForUser(this.userId, platform, id); + + return API.v1.success({ banners }); + }, + }, +); + +/** + * @openapi + * /api/v1/banners: + * get: + * description: Gets the banners to be shown to the authenticated user + * security: + * $ref: '#/security/authenticated' + * parameters: + * - name: platform + * in: query + * description: The platform rendering the banner + * required: true + * schema: + * type: string + * enum: [web, mobile] + * example: web + * responses: + * 200: + * description: The banners matching the criteria + * content: + * application/json: + * schema: + * allOf: + * - $ref: '#/components/schemas/ApiSuccessV1' + * - type: object + * properties: + * banners: + * type: array + * items: + * $ref: '#/components/schemas/IBanner' + * default: + * description: Unexpected error + * content: + * application/json: + * schema: + * $ref: '#/components/schemas/ApiFailureV1' + */ +API.v1.addRoute( + 'banners', + { authRequired: true }, + { + async get() { + check( + this.queryParams, + Match.ObjectIncluding({ + platform: Match.OneOf(...Object.values(BannerPlatform)), + }), + ); + + const { platform } = this.queryParams; + + const banners = await Banner.getBannersForUser(this.userId, platform); + + return API.v1.success({ banners }); + }, + }, +); + +/** + * @openapi + * /api/v1/banners.dismiss: + * post: + * description: Dismisses a banner + * security: + * $ref: '#/security/authenticated' + * requestBody: + * content: + * application/json: + * schema: + * type: object + * properties: + * bannerId: + * type: string + * example: | + * { + * "bannerId": "ByehQjC44FwMeiLbX" + * } + * responses: + * 200: + * description: The banners matching the criteria + * content: + * application/json: + * schema: + * $ref: '#/components/schemas/ApiSuccessV1' + * default: + * description: Unexpected error + * content: + * application/json: + * schema: + * $ref: '#/components/schemas/ApiFailureV1' + */ +API.v1.addRoute( + 'banners.dismiss', + { authRequired: true }, + { + async post() { + check( + this.bodyParams, + Match.ObjectIncluding({ + bannerId: Match.Where((id: unknown): id is string => typeof id === 'string' && Boolean(id.trim())), + }), + ); + + const { bannerId } = this.bodyParams; + + await Banner.dismiss(this.userId, bannerId); + return API.v1.success(); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/channels.js b/apps/meteor/app/api/server/v1/channels.js new file mode 100644 index 000000000000..2b02a1f86079 --- /dev/null +++ b/apps/meteor/app/api/server/v1/channels.js @@ -0,0 +1,947 @@ +import { Meteor } from 'meteor/meteor'; +import { Match, check } from 'meteor/check'; +import _ from 'underscore'; +import { Integrations, Uploads, Messages as MessagesRaw, Rooms as RoomsRaw, Subscriptions as SubscriptionsRaw } from '@rocket.chat/models'; + +import { Rooms, Subscriptions, Messages, Users } from '../../../models/server'; +import { canAccessRoom, hasPermission, hasAtLeastOnePermission } from '../../../authorization/server'; +import { mountIntegrationQueryBasedOnPermissions } from '../../../integrations/server/lib/mountQueriesBasedOnPermission'; +import { normalizeMessagesForUser } from '../../../utils/server/lib/normalizeMessagesForUser'; +import { API } from '../api'; +import { settings } from '../../../settings/server'; +import { Team } from '../../../../server/sdk'; +import { findUsersOfRoom } from '../../../../server/lib/findUsersOfRoom'; +import { addUserToFileObj } from '../helpers/addUserToFileObj'; + +// Returns the channel IF found otherwise it will return the failure of why it didn't. Check the `statusCode` property +function findChannelByIdOrName({ params, checkedArchived = true, userId }) { + if ((!params.roomId || !params.roomId.trim()) && (!params.roomName || !params.roomName.trim())) { + throw new Meteor.Error('error-roomid-param-not-provided', 'The parameter "roomId" or "roomName" is required'); + } + + const fields = { ...API.v1.defaultFieldsToExclude }; + + let room; + if (params.roomId) { + room = Rooms.findOneById(params.roomId, { fields }); + } else if (params.roomName) { + room = Rooms.findOneByName(params.roomName, { fields }); + } + + if (!room || (room.t !== 'c' && room.t !== 'l')) { + throw new Meteor.Error('error-room-not-found', 'The required "roomId" or "roomName" param provided does not match any channel'); + } + + if (checkedArchived && room.archived) { + throw new Meteor.Error('error-room-archived', `The channel, ${room.name}, is archived`); + } + if (userId && room.lastMessage) { + const [lastMessage] = normalizeMessagesForUser([room.lastMessage], userId); + room.lastMessage = lastMessage; + } + + return room; +} + +API.v1.addRoute( + 'channels.addModerator', + { authRequired: true }, + { + post() { + const findResult = findChannelByIdOrName({ params: this.requestParams() }); + + const user = this.getUserFromParams(); + + Meteor.runAsUser(this.userId, () => { + Meteor.call('addRoomModerator', findResult._id, user._id); + }); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'channels.addOwner', + { authRequired: true }, + { + post() { + const findResult = findChannelByIdOrName({ params: this.requestParams() }); + + const user = this.getUserFromParams(); + + Meteor.runAsUser(this.userId, () => { + Meteor.call('addRoomOwner', findResult._id, user._id); + }); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'channels.close', + { authRequired: true }, + { + post() { + const findResult = findChannelByIdOrName({ + params: this.requestParams(), + checkedArchived: false, + }); + + const sub = Subscriptions.findOneByRoomIdAndUserId(findResult._id, this.userId); + + if (!sub) { + return API.v1.failure(`The user/callee is not in the channel "${findResult.name}.`); + } + + if (!sub.open) { + return API.v1.failure(`The channel, ${findResult.name}, is already closed to the sender`); + } + + Meteor.runAsUser(this.userId, () => { + Meteor.call('hideRoom', findResult._id); + }); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'channels.counters', + { authRequired: true }, + { + get() { + const access = hasPermission(this.userId, 'view-room-administration'); + const { userId } = this.requestParams(); + let user = this.userId; + let unreads = null; + let userMentions = null; + let unreadsFrom = null; + let joined = false; + let msgs = null; + let latest = null; + let members = null; + + if (userId) { + if (!access) { + return API.v1.unauthorized(); + } + user = userId; + } + const room = findChannelByIdOrName({ + params: this.requestParams(), + returnUsernames: true, + }); + const subscription = Subscriptions.findOneByRoomIdAndUserId(room._id, user); + const lm = room.lm ? room.lm : room._updatedAt; + + if (typeof subscription !== 'undefined' && subscription.open) { + unreads = Messages.countVisibleByRoomIdBetweenTimestampsInclusive(subscription.rid, subscription.ls, lm); + unreadsFrom = subscription.ls || subscription.ts; + userMentions = subscription.userMentions; + joined = true; + } + + if (access || joined) { + msgs = room.msgs; + latest = lm; + members = room.usersCount; + } + + return API.v1.success({ + joined, + members, + unreads, + unreadsFrom, + msgs, + latest, + userMentions, + }); + }, + }, +); + +// Channel -> create + +function createChannelValidator(params) { + if (!hasPermission(params.user.value, 'create-c')) { + throw new Error('unauthorized'); + } + + if (!params.name || !params.name.value) { + throw new Error(`Param "${params.name.key}" is required`); + } + + if (params.members && params.members.value && !_.isArray(params.members.value)) { + throw new Error(`Param "${params.members.key}" must be an array if provided`); + } + + if (params.customFields && params.customFields.value && !(typeof params.customFields.value === 'object')) { + throw new Error(`Param "${params.customFields.key}" must be an object if provided`); + } + + if (params.teams.value && !Array.isArray(params.teams.value)) { + throw new Error(`Param ${params.teams.key} must be an array`); + } +} + +function createChannel(userId, params) { + const readOnly = typeof params.readOnly !== 'undefined' ? params.readOnly : false; + const id = Meteor.runAsUser(userId, () => + Meteor.call('createChannel', params.name, params.members ? params.members : [], readOnly, params.customFields, params.extraData), + ); + + return { + channel: findChannelByIdOrName({ params: { roomId: id.rid }, userId: this.userId }), + }; +} + +API.channels = {}; +API.channels.create = { + validate: createChannelValidator, + execute: createChannel, +}; + +API.v1.addRoute( + 'channels.create', + { authRequired: true }, + { + post() { + const { userId, bodyParams } = this; + + let error; + + try { + API.channels.create.validate({ + user: { + value: userId, + }, + name: { + value: bodyParams.name, + key: 'name', + }, + members: { + value: bodyParams.members, + key: 'members', + }, + teams: { + value: bodyParams.teams, + key: 'teams', + }, + }); + } catch (e) { + if (e.message === 'unauthorized') { + error = API.v1.unauthorized(); + } else { + error = API.v1.failure(e.message); + } + } + + if (error) { + return error; + } + + if (bodyParams.teams) { + const canSeeAllTeams = hasPermission(this.userId, 'view-all-teams'); + const teams = Promise.await(Team.listByNames(bodyParams.teams, { projection: { _id: 1 } })); + const teamMembers = []; + + for (const team of teams) { + const { records: members } = Promise.await( + Team.members(this.userId, team._id, canSeeAllTeams, { + offset: 0, + count: Number.MAX_SAFE_INTEGER, + }), + ); + const uids = members.map((member) => member.user.username); + teamMembers.push(...uids); + } + + const membersToAdd = new Set([...teamMembers, ...bodyParams.members]); + bodyParams.members = [...membersToAdd]; + } + + return API.v1.success(API.channels.create.execute(userId, bodyParams)); + }, + }, +); + +API.v1.addRoute( + 'channels.files', + { authRequired: true }, + { + async get() { + const findResult = findChannelByIdOrName({ + params: this.requestParams(), + checkedArchived: false, + }); + + if (!canAccessRoom(findResult, { _id: this.userId })) { + return API.v1.unauthorized(); + } + + const { offset, count } = this.getPaginationItems(); + const { sort, fields, query } = this.parseJsonQuery(); + + const ourQuery = Object.assign({}, query, { rid: findResult._id }); + + const { cursor, totalCount } = Uploads.findPaginated(ourQuery, { + sort: sort || { name: 1 }, + skip: offset, + limit: count, + projection: fields, + }); + + const [files, total] = await Promise.all([cursor.toArray(), totalCount]); + + return API.v1.success({ + files: await addUserToFileObj(files), + count: files.length, + offset, + total, + }); + }, + }, +); + +API.v1.addRoute( + 'channels.getIntegrations', + { authRequired: true }, + { + async get() { + if ( + !hasAtLeastOnePermission(this.userId, [ + 'manage-outgoing-integrations', + 'manage-own-outgoing-integrations', + 'manage-incoming-integrations', + 'manage-own-incoming-integrations', + ]) + ) { + return API.v1.unauthorized(); + } + + const findResult = findChannelByIdOrName({ + params: this.requestParams(), + checkedArchived: false, + }); + + let includeAllPublicChannels = true; + if (typeof this.queryParams.includeAllPublicChannels !== 'undefined') { + includeAllPublicChannels = this.queryParams.includeAllPublicChannels === 'true'; + } + + let ourQuery = { + channel: `#${findResult.name}`, + }; + + if (includeAllPublicChannels) { + ourQuery.channel = { + $in: [ourQuery.channel, 'all_public_channels'], + }; + } + + const { offset, count } = this.getPaginationItems(); + const { sort, fields: projection, query } = this.parseJsonQuery(); + + ourQuery = Object.assign(mountIntegrationQueryBasedOnPermissions(this.userId), query, ourQuery); + + const { cursor, totalCount } = Integrations.findPaginated(ourQuery, { + sort: sort || { _createdAt: 1 }, + skip: offset, + limit: count, + projection, + }); + + const [integrations, total] = await Promise.all([cursor.toArray(), totalCount]); + + return API.v1.success({ + integrations, + count: integrations.length, + offset, + total, + }); + }, + }, +); + +API.v1.addRoute( + 'channels.info', + { authRequired: true }, + { + get() { + return API.v1.success({ + channel: findChannelByIdOrName({ + params: this.requestParams(), + checkedArchived: false, + userId: this.userId, + }), + }); + }, + }, +); + +API.v1.addRoute( + 'channels.invite', + { authRequired: true }, + { + post() { + const findResult = findChannelByIdOrName({ params: this.requestParams() }); + + const users = this.getUserListFromParams(); + + if (!users.length) { + return API.v1.failure('invalid-user-invite-list', 'Cannot invite if no users are provided'); + } + + Meteor.call('addUsersToRoom', { rid: findResult._id, users: users.map((u) => u.username) }); + + return API.v1.success({ + channel: findChannelByIdOrName({ params: this.requestParams(), userId: this.userId }), + }); + }, + }, +); + +API.v1.addRoute( + 'channels.list', + { authRequired: true }, + { + async get() { + const { offset, count } = this.getPaginationItems(); + const { sort, fields, query } = this.parseJsonQuery(); + const hasPermissionToSeeAllPublicChannels = hasPermission(this.userId, 'view-c-room'); + + const ourQuery = { ...query, t: 'c' }; + + if (!hasPermissionToSeeAllPublicChannels) { + if (!hasPermission(this.userId, 'view-joined-room')) { + return API.v1.unauthorized(); + } + const roomIds = Subscriptions.findByUserIdAndType(this.userId, 'c', { + fields: { rid: 1 }, + }) + .fetch() + .map((s) => s.rid); + ourQuery._id = { $in: roomIds }; + } + + // teams filter - I would love to have a way to apply this filter @ db level :( + const ids = Subscriptions.cachedFindByUserId(this.userId, { fields: { rid: 1 } }) + .fetch() + .map((item) => item.rid); + + ourQuery.$or = [ + { + teamId: { + $exists: false, + }, + }, + { + teamId: { + $exists: true, + }, + _id: { + $in: ids, + }, + }, + ]; + + const { cursor, totalCount } = RoomsRaw.findPaginated(ourQuery, { + sort: sort || { name: 1 }, + skip: offset, + limit: count, + projection: fields, + }); + + const [channels, total] = await Promise.all([cursor.toArray(), totalCount]); + + return API.v1.success({ + channels: channels.map((room) => this.composeRoomWithLastMessage(room, this.userId)), + count: channels.length, + offset, + total, + }); + }, + }, +); + +API.v1.addRoute( + 'channels.list.joined', + { authRequired: true }, + { + async get() { + const { offset, count } = this.getPaginationItems(); + const { sort, fields } = this.parseJsonQuery(); + + const subs = await SubscriptionsRaw.findByUserIdAndTypes(this.userId, ['c'], { projection: { rid: 1 } }).toArray(); + const rids = subs.map(({ rid }) => rid).filter(Boolean); + + if (rids.length === 0) { + return API.v1.notFound(); + } + + const { cursor, totalCount } = RoomsRaw.findPaginatedByTypeAndIds('c', rids, { + sort: sort || { name: 1 }, + skip: offset, + limit: count, + projection: fields, + }); + + const [channels, total] = await Promise.all([cursor.toArray(), totalCount]); + + return API.v1.success({ + channels: channels.map((room) => this.composeRoomWithLastMessage(room, this.userId)), + offset, + count: channels.length, + total, + }); + }, + }, +); + +API.v1.addRoute( + 'channels.members', + { authRequired: true }, + { + async get() { + const findResult = findChannelByIdOrName({ + params: this.requestParams(), + checkedArchived: false, + }); + + if (findResult.broadcast && !hasPermission(this.userId, 'view-broadcast-member-list', findResult._id)) { + return API.v1.unauthorized(); + } + + const { offset: skip, count: limit } = this.getPaginationItems(); + const { sort = {} } = this.parseJsonQuery(); + + check( + this.queryParams, + Match.ObjectIncluding({ + status: Match.Maybe([String]), + filter: Match.Maybe(String), + }), + ); + const { status, filter } = this.queryParams; + + const { cursor, totalCount } = findUsersOfRoom({ + rid: findResult._id, + ...(status && { status: { $in: status } }), + skip, + limit, + filter, + ...(sort?.username && { sort: { username: sort.username } }), + }); + + const [members, total] = await Promise.all([cursor.toArray(), totalCount]); + + return API.v1.success({ + members, + count: members.length, + offset: skip, + total, + }); + }, + }, +); + +// TODO: CACHE: I dont like this method( functionality and how we implemented ) its very expensive +// TODO check if this code is better or not +// RocketChat.API.v1.addRoute('channels.online', { authRequired: true }, { +// get() { +// const { query } = this.parseJsonQuery(); +// const ourQuery = Object.assign({}, query, { t: 'c' }); + +// const room = RocketChat.models.Rooms.findOne(ourQuery); + +// if (room == null) { +// return RocketChat.API.v1.failure('Channel does not exists'); +// } + +// const ids = RocketChat.models.Subscriptions.find({ rid: room._id }, { fields: { 'u._id': 1 } }).fetch().map(sub => sub.u._id); + +// const online = RocketChat.models.Users.find({ +// username: { $exists: 1 }, +// _id: { $in: ids }, +// status: { $in: ['online', 'away', 'busy'] } +// }, { +// fields: { username: 1 } +// }).fetch(); + +// return RocketChat.API.v1.success({ +// online +// }); +// } +// }); + +API.v1.addRoute( + 'channels.online', + { authRequired: true }, + { + get() { + const { query } = this.parseJsonQuery(); + if (!query || Object.keys(query).length === 0) { + return API.v1.failure('Invalid query'); + } + + const ourQuery = Object.assign({}, query, { t: 'c' }); + + const room = Rooms.findOne(ourQuery); + if (room == null) { + return API.v1.failure('Channel does not exists'); + } + + const user = this.getLoggedInUser(); + + if (!canAccessRoom(room, user)) { + throw new Meteor.Error('error-not-allowed', 'Not Allowed'); + } + + const online = Users.findUsersNotOffline({ + fields: { username: 1 }, + }).fetch(); + + const onlineInRoom = []; + online.forEach((user) => { + const subscription = Subscriptions.findOneByRoomIdAndUserId(room._id, user._id, { + fields: { _id: 1 }, + }); + if (subscription) { + onlineInRoom.push({ + _id: user._id, + username: user.username, + }); + } + }); + + return API.v1.success({ + online: onlineInRoom, + }); + }, + }, +); + +API.v1.addRoute( + 'channels.removeModerator', + { authRequired: true }, + { + post() { + const findResult = findChannelByIdOrName({ params: this.requestParams() }); + + const user = this.getUserFromParams(); + + Meteor.runAsUser(this.userId, () => { + Meteor.call('removeRoomModerator', findResult._id, user._id); + }); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'channels.removeOwner', + { authRequired: true }, + { + post() { + const findResult = findChannelByIdOrName({ params: this.requestParams() }); + + const user = this.getUserFromParams(); + + Meteor.runAsUser(this.userId, () => { + Meteor.call('removeRoomOwner', findResult._id, user._id); + }); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'channels.rename', + { authRequired: true }, + { + post() { + if (!this.bodyParams.name || !this.bodyParams.name.trim()) { + return API.v1.failure('The bodyParam "name" is required'); + } + + const findResult = findChannelByIdOrName({ params: { roomId: this.bodyParams.roomId } }); + + if (findResult.name === this.bodyParams.name) { + return API.v1.failure('The channel name is the same as what it would be renamed to.'); + } + + Meteor.runAsUser(this.userId, () => { + Meteor.call('saveRoomSettings', findResult._id, 'roomName', this.bodyParams.name); + }); + + return API.v1.success({ + channel: findChannelByIdOrName({ + params: { roomId: this.bodyParams.roomId }, + userId: this.userId, + }), + }); + }, + }, +); + +API.v1.addRoute( + 'channels.setCustomFields', + { authRequired: true }, + { + post() { + if (!this.bodyParams.customFields || !(typeof this.bodyParams.customFields === 'object')) { + return API.v1.failure('The bodyParam "customFields" is required with a type like object.'); + } + + const findResult = findChannelByIdOrName({ params: this.requestParams() }); + + Meteor.runAsUser(this.userId, () => { + Meteor.call('saveRoomSettings', findResult._id, 'roomCustomFields', this.bodyParams.customFields); + }); + + return API.v1.success({ + channel: findChannelByIdOrName({ params: this.requestParams(), userId: this.userId }), + }); + }, + }, +); + +API.v1.addRoute( + 'channels.setDefault', + { authRequired: true }, + { + post() { + if (typeof this.bodyParams.default === 'undefined') { + return API.v1.failure('The bodyParam "default" is required', 'error-channels-setdefault-is-same'); + } + + const findResult = findChannelByIdOrName({ params: this.requestParams() }); + + if (findResult.default === this.bodyParams.default) { + return API.v1.failure( + 'The channel default setting is the same as what it would be changed to.', + 'error-channels-setdefault-missing-default-param', + ); + } + + Meteor.runAsUser(this.userId, () => { + Meteor.call( + 'saveRoomSettings', + findResult._id, + 'default', + ['true', '1'].includes(this.bodyParams.default.toString().toLowerCase()), + ); + }); + + return API.v1.success({ + channel: findChannelByIdOrName({ params: this.requestParams(), userId: this.userId }), + }); + }, + }, +); + +API.v1.addRoute( + 'channels.setDescription', + { authRequired: true }, + { + post() { + if (!this.bodyParams.hasOwnProperty('description')) { + return API.v1.failure('The bodyParam "description" is required'); + } + + const findResult = findChannelByIdOrName({ params: this.requestParams() }); + + if (findResult.description === this.bodyParams.description) { + return API.v1.failure('The channel description is the same as what it would be changed to.'); + } + + Meteor.runAsUser(this.userId, () => { + Meteor.call('saveRoomSettings', findResult._id, 'roomDescription', this.bodyParams.description); + }); + + return API.v1.success({ + description: this.bodyParams.description, + }); + }, + }, +); + +API.v1.addRoute( + 'channels.setJoinCode', + { authRequired: true }, + { + post() { + if (!this.bodyParams.joinCode || !this.bodyParams.joinCode.trim()) { + return API.v1.failure('The bodyParam "joinCode" is required'); + } + + const findResult = findChannelByIdOrName({ params: this.requestParams() }); + + Meteor.runAsUser(this.userId, () => { + Meteor.call('saveRoomSettings', findResult._id, 'joinCode', this.bodyParams.joinCode); + }); + + return API.v1.success({ + channel: findChannelByIdOrName({ params: this.requestParams(), userId: this.userId }), + }); + }, + }, +); + +API.v1.addRoute( + 'channels.setPurpose', + { authRequired: true }, + { + post() { + if (!this.bodyParams.hasOwnProperty('purpose')) { + return API.v1.failure('The bodyParam "purpose" is required'); + } + + const findResult = findChannelByIdOrName({ params: this.requestParams() }); + + if (findResult.description === this.bodyParams.purpose) { + return API.v1.failure('The channel purpose (description) is the same as what it would be changed to.'); + } + + Meteor.runAsUser(this.userId, () => { + Meteor.call('saveRoomSettings', findResult._id, 'roomDescription', this.bodyParams.purpose); + }); + + return API.v1.success({ + purpose: this.bodyParams.purpose, + }); + }, + }, +); + +API.v1.addRoute( + 'channels.setTopic', + { authRequired: true }, + { + post() { + if (!this.bodyParams.hasOwnProperty('topic')) { + return API.v1.failure('The bodyParam "topic" is required'); + } + + const findResult = findChannelByIdOrName({ params: this.requestParams() }); + + if (findResult.topic === this.bodyParams.topic) { + return API.v1.failure('The channel topic is the same as what it would be changed to.'); + } + + Meteor.runAsUser(this.userId, () => { + Meteor.call('saveRoomSettings', findResult._id, 'roomTopic', this.bodyParams.topic); + }); + + return API.v1.success({ + topic: this.bodyParams.topic, + }); + }, + }, +); + +API.v1.addRoute( + 'channels.setType', + { authRequired: true }, + { + post() { + if (!this.bodyParams.type || !this.bodyParams.type.trim()) { + return API.v1.failure('The bodyParam "type" is required'); + } + + const findResult = findChannelByIdOrName({ params: this.requestParams() }); + + if (findResult.t === this.bodyParams.type) { + return API.v1.failure('The channel type is the same as what it would be changed to.'); + } + + Meteor.runAsUser(this.userId, () => { + Meteor.call('saveRoomSettings', findResult._id, 'roomType', this.bodyParams.type); + }); + + return API.v1.success({ + channel: this.composeRoomWithLastMessage(Rooms.findOneById(findResult._id, { fields: API.v1.defaultFieldsToExclude }), this.userId), + }); + }, + }, +); + +API.v1.addRoute( + 'channels.addLeader', + { authRequired: true }, + { + post() { + const findResult = findChannelByIdOrName({ params: this.requestParams() }); + + const user = this.getUserFromParams(); + + Meteor.runAsUser(this.userId, () => { + Meteor.call('addRoomLeader', findResult._id, user._id); + }); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'channels.removeLeader', + { authRequired: true }, + { + post() { + const findResult = findChannelByIdOrName({ params: this.requestParams() }); + + const user = this.getUserFromParams(); + + Meteor.runAsUser(this.userId, () => { + Meteor.call('removeRoomLeader', findResult._id, user._id); + }); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'channels.anonymousread', + { authRequired: false }, + { + async get() { + const findResult = findChannelByIdOrName({ + params: this.requestParams(), + checkedArchived: false, + }); + const { offset, count } = this.getPaginationItems(); + const { sort, fields, query } = this.parseJsonQuery(); + + const ourQuery = Object.assign({}, query, { rid: findResult._id }); + + if (!settings.get('Accounts_AllowAnonymousRead')) { + throw new Meteor.Error('error-not-allowed', 'Enable "Allow Anonymous Read"', { + method: 'channels.anonymousread', + }); + } + + const { cursor, totalCount } = MessagesRaw.findPaginated(ourQuery, { + sort: sort || { ts: -1 }, + skip: offset, + limit: count, + projection: fields, + }); + + const [messages, total] = await Promise.all([cursor.toArray(), totalCount]); + + return API.v1.success({ + messages: normalizeMessagesForUser(messages, this.userId), + count: messages.length, + offset, + total, + }); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/channels.ts b/apps/meteor/app/api/server/v1/channels.ts new file mode 100644 index 000000000000..9816a262d10e --- /dev/null +++ b/apps/meteor/app/api/server/v1/channels.ts @@ -0,0 +1,507 @@ +import { Meteor } from 'meteor/meteor'; +import type { IRoom, ISubscription } from '@rocket.chat/core-typings'; +import { + isChannelsAddAllProps, + isChannelsArchiveProps, + isChannelsHistoryProps, + isChannelsUnarchiveProps, + isChannelsRolesProps, + isChannelsJoinProps, + isChannelsKickProps, + isChannelsLeaveProps, + isChannelsMessagesProps, + isChannelsOpenProps, + isChannelsSetAnnouncementProps, + isChannelsGetAllUserMentionsByChannelProps, + isChannelsModeratorsProps, + isChannelsConvertToTeamProps, + isChannelsSetReadOnlyProps, + isChannelsDeleteProps, +} from '@rocket.chat/rest-typings'; +import { Messages } from '@rocket.chat/models'; + +import { Rooms, Subscriptions } from '../../../models/server'; +import { hasPermission } from '../../../authorization/server'; +import { normalizeMessagesForUser } from '../../../utils/server/lib/normalizeMessagesForUser'; +import { API } from '../api'; +import { Team } from '../../../../server/sdk'; + +// Returns the channel IF found otherwise it will return the failure of why it didn't. Check the `statusCode` property +function findChannelByIdOrName({ + params, + checkedArchived = true, + userId, +}: { + params: + | { + roomId: string; + } + | { + roomName: string; + }; + userId?: string; + checkedArchived?: boolean; +}): IRoom { + const fields = { ...API.v1.defaultFieldsToExclude }; + + const room: IRoom = 'roomId' in params ? Rooms.findOneById(params.roomId, { fields }) : Rooms.findOneByName(params.roomName, { fields }); + + if (!room || (room.t !== 'c' && room.t !== 'l')) { + throw new Meteor.Error('error-room-not-found', 'The required "roomId" or "roomName" param provided does not match any channel'); + } + + if (checkedArchived && room.archived) { + throw new Meteor.Error('error-room-archived', `The channel, ${room.name}, is archived`); + } + if (userId && room.lastMessage) { + const [lastMessage] = normalizeMessagesForUser([room.lastMessage], userId); + room.lastMessage = lastMessage; + } + + return room; +} + +API.v1.addRoute( + 'channels.addAll', + { + authRequired: true, + validateParams: isChannelsAddAllProps, + }, + { + post() { + const { activeUsersOnly, ...params } = this.bodyParams; + const findResult = findChannelByIdOrName({ params, userId: this.userId }); + + Meteor.call('addAllUserToRoom', findResult._id, activeUsersOnly); + + return API.v1.success({ + channel: findChannelByIdOrName({ params, userId: this.userId }), + }); + }, + }, +); + +API.v1.addRoute( + 'channels.archive', + { + authRequired: true, + validateParams: isChannelsArchiveProps, + }, + { + post() { + const findResult = findChannelByIdOrName({ params: this.bodyParams }); + + Meteor.call('archiveRoom', findResult._id); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'channels.unarchive', + { + authRequired: true, + validateParams: isChannelsUnarchiveProps, + }, + { + post() { + const findResult = findChannelByIdOrName({ + params: this.bodyParams, + checkedArchived: false, + }); + + if (!findResult.archived) { + return API.v1.failure(`The channel, ${findResult.name}, is not archived`); + } + + Meteor.call('unarchiveRoom', findResult._id); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'channels.history', + { + authRequired: true, + validateParams: isChannelsHistoryProps, + }, + { + get() { + const { unreads, oldest, latest, showThreadMessages, inclusive, ...params } = this.queryParams; + const findResult = findChannelByIdOrName({ + params, + checkedArchived: false, + }); + + const { count = 20, offset = 0 } = this.getPaginationItems(); + + const result = Meteor.call('getChannelHistory', { + rid: findResult._id, + latest: latest ? new Date(latest) : new Date(), + oldest: oldest && new Date(oldest), + inclusive: inclusive === 'true', + offset, + count, + unreads: unreads === 'true', + showThreadMessages: showThreadMessages === 'true', + }); + + if (!result) { + return API.v1.unauthorized(); + } + + return API.v1.success(result); + }, + }, +); + +API.v1.addRoute( + 'channels.roles', + { + authRequired: true, + validateParams: isChannelsRolesProps, + }, + { + get() { + const findResult = findChannelByIdOrName({ params: this.queryParams }); + + const roles = Meteor.call('getRoomRoles', findResult._id); + + return API.v1.success({ + roles, + }); + }, + }, +); + +API.v1.addRoute( + 'channels.join', + { + authRequired: true, + validateParams: isChannelsJoinProps, + }, + { + post() { + const { joinCode, ...params } = this.bodyParams; + const findResult = findChannelByIdOrName({ params }); + + Meteor.call('joinRoom', findResult._id, joinCode); + + return API.v1.success({ + channel: findChannelByIdOrName({ params, userId: this.userId }), + }); + }, + }, +); + +API.v1.addRoute( + 'channels.kick', + { + authRequired: true, + validateParams: isChannelsKickProps, + }, + { + post() { + const { ...params /* userId */ } = this.bodyParams; + const findResult = findChannelByIdOrName({ params }); + + const user = this.getUserFromParams(); + + Meteor.call('removeUserFromRoom', { rid: findResult._id, username: user.username }); + + return API.v1.success({ + channel: findChannelByIdOrName({ params, userId: this.userId }), + }); + }, + }, +); + +API.v1.addRoute( + 'channels.leave', + { + authRequired: true, + validateParams: isChannelsLeaveProps, + }, + { + post() { + const { ...params } = this.bodyParams; + const findResult = findChannelByIdOrName({ params }); + + Meteor.runAsUser(this.userId, () => { + Meteor.call('leaveRoom', findResult._id); + }); + + return API.v1.success({ + channel: findChannelByIdOrName({ params, userId: this.userId }), + }); + }, + }, +); + +API.v1.addRoute( + 'channels.messages', + { + authRequired: true, + validateParams: isChannelsMessagesProps, + }, + { + async get() { + const { roomId } = this.queryParams; + const findResult = findChannelByIdOrName({ + params: { roomId }, + checkedArchived: false, + }); + const { offset, count } = this.getPaginationItems(); + const { sort, fields, query } = this.parseJsonQuery(); + + const ourQuery = { ...query, rid: findResult._id }; + + // Special check for the permissions + if ( + hasPermission(this.userId, 'view-joined-room') && + !Subscriptions.findOneByRoomIdAndUserId(findResult._id, this.userId, { fields: { _id: 1 } }) + ) { + return API.v1.unauthorized(); + } + if (!hasPermission(this.userId, 'view-c-room')) { + return API.v1.unauthorized(); + } + + // @ts-expect-error recursive types are causing issues here + const { cursor, totalCount } = Messages.findPaginated(ourQuery, { + sort: sort || { ts: -1 }, + skip: offset, + limit: count, + projection: fields, + }); + + const [messages, total] = await Promise.all([cursor.toArray(), totalCount]); + + return API.v1.success({ + messages: normalizeMessagesForUser(messages, this.userId), + count: messages.length, + offset, + total, + }); + }, + }, +); + +API.v1.addRoute( + 'channels.open', + { + authRequired: true, + validateParams: isChannelsOpenProps, + }, + { + post() { + const { ...params } = this.bodyParams; + + const findResult = findChannelByIdOrName({ + params, + checkedArchived: false, + }); + + const sub = Subscriptions.findOneByRoomIdAndUserId(findResult._id, this.userId); + + if (!sub) { + return API.v1.failure(`The user/callee is not in the channel "${findResult.name}".`); + } + + if (sub.open) { + return API.v1.failure(`The channel, ${findResult.name}, is already open to the sender`); + } + + Meteor.call('openRoom', findResult._id); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'channels.setReadOnly', + { + authRequired: true, + validateParams: isChannelsSetReadOnlyProps, + }, + { + post() { + const findResult = findChannelByIdOrName({ params: this.bodyParams }); + + if (findResult.ro === this.bodyParams.readOnly) { + return API.v1.failure('The channel read only setting is the same as what it would be changed to.'); + } + + Meteor.call('saveRoomSettings', findResult._id, 'readOnly', this.bodyParams.readOnly); + + return API.v1.success({ + channel: findChannelByIdOrName({ params: this.bodyParams, userId: this.userId }), + }); + }, + }, +); + +API.v1.addRoute( + 'channels.setAnnouncement', + { + authRequired: true, + validateParams: isChannelsSetAnnouncementProps, + }, + { + post() { + const { announcement, ...params } = this.bodyParams; + + const findResult = findChannelByIdOrName({ params }); + + Meteor.call('saveRoomSettings', findResult._id, 'roomAnnouncement', announcement); + + return API.v1.success({ + announcement: this.bodyParams.announcement, + }); + }, + }, +); + +API.v1.addRoute( + 'channels.getAllUserMentionsByChannel', + { + authRequired: true, + validateParams: isChannelsGetAllUserMentionsByChannelProps, + }, + { + get() { + const { roomId } = this.queryParams; + const { offset, count } = this.getPaginationItems(); + const { sort } = this.parseJsonQuery(); + + const mentions = Meteor.call('getUserMentionsByChannel', { + roomId, + options: { + sort: sort || { ts: 1 }, + skip: offset, + limit: count, + }, + }); + + const allMentions = Meteor.call('getUserMentionsByChannel', { + roomId, + options: {}, + }); + + return API.v1.success({ + mentions, + count: mentions.length, + offset, + total: allMentions.length, + }); + }, + }, +); + +API.v1.addRoute( + 'channels.moderators', + { + authRequired: true, + validateParams: isChannelsModeratorsProps, + }, + { + get() { + const { ...params } = this.queryParams; + + const findResult = findChannelByIdOrName({ params }); + + const moderators = Subscriptions.findByRoomIdAndRoles(findResult._id, ['moderator'], { + fields: { u: 1 }, + }) + .fetch() + .map((sub: ISubscription) => sub.u); + + return API.v1.success({ + moderators, + }); + }, + }, +); + +API.v1.addRoute( + 'channels.delete', + { + authRequired: true, + validateParams: isChannelsDeleteProps, + }, + { + post() { + const room = findChannelByIdOrName({ + params: this.bodyParams, + checkedArchived: false, + }); + + Meteor.call('eraseRoom', room._id); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'channels.convertToTeam', + { + authRequired: true, + validateParams: isChannelsConvertToTeamProps, + }, + { + async post() { + if (!hasPermission(this.userId, 'create-team')) { + return API.v1.unauthorized(); + } + + const { channelId, channelName } = this.bodyParams; + + if (!channelId && !channelName) { + return API.v1.failure('The parameter "channelId" or "channelName" is required'); + } + + if (!hasPermission(this.userId, 'edit-room', channelId)) { + return API.v1.unauthorized(); + } + + const room = findChannelByIdOrName({ + params: { + roomId: channelId, + roomName: channelName, + }, + userId: this.userId, + }); + + if (!room) { + return API.v1.failure('Channel not found'); + } + + const subscriptions = Subscriptions.findByRoomId(room._id, { + fields: { 'u._id': 1 }, + }); + + const members = subscriptions.fetch().map((s: ISubscription) => s.u?._id); + + const teamData = { + team: { + name: room.name ?? '', + type: room.t === 'c' ? 0 : 1, + }, + members, + room: { + name: room.name, + id: room._id, + }, + }; + + const team = await Team.create(this.userId, teamData); + + return API.v1.success({ team }); + }, + }, +); diff --git a/app/api/server/v1/chat.js b/apps/meteor/app/api/server/v1/chat.js similarity index 91% rename from app/api/server/v1/chat.js rename to apps/meteor/app/api/server/v1/chat.js index 8371db7d06b1..73f4b6931ddc 100644 --- a/app/api/server/v1/chat.js +++ b/apps/meteor/app/api/server/v1/chat.js @@ -1,9 +1,10 @@ import { escapeRegExp } from '@rocket.chat/string-helpers'; import { Meteor } from 'meteor/meteor'; import { Match, check } from 'meteor/check'; +import { Messages as MessagesRaw } from '@rocket.chat/models'; -import { Messages } from '../../../models'; -import { canAccessRoom, hasPermission } from '../../../authorization/server'; +import { Messages } from '../../../models/server'; +import { canAccessRoom, canAccessRoomId, roomAccessAttributes, hasPermission } from '../../../authorization/server'; import { normalizeMessagesForUser } from '../../../utils/server/lib/normalizeMessagesForUser'; import { processWebhookMessage } from '../../../lib/server'; import { executeSendMessage } from '../../../lib/server/methods/sendMessage'; @@ -375,7 +376,7 @@ API.v1.addRoute( 'chat.getMessageReadReceipts', { authRequired: true }, { - get() { + async get() { const { messageId } = this.queryParams; if (!messageId) { return API.v1.failure({ @@ -384,9 +385,8 @@ API.v1.addRoute( } try { - const messageReadReceipts = Meteor.runAsUser(this.userId, () => Meteor.call('getReadReceipts', { messageId })); return API.v1.success({ - receipts: messageReadReceipts, + receipts: await Meteor.call('getReadReceipts', { messageId }), }); } catch (error) { return API.v1.failure({ @@ -411,7 +411,7 @@ API.v1.addRoute( return API.v1.failure('The required "description" param is missing.'); } - Meteor.runAsUser(this.userId, () => Meteor.call('reportMessage', messageId, description)); + Meteor.call('reportMessage', messageId, description); return API.v1.success(); }, @@ -447,7 +447,7 @@ API.v1.addRoute( 'chat.getDeletedMessages', { authRequired: true }, { - get() { + async get() { const { roomId, since } = this.queryParams; const { offset, count } = this.getPaginationItems(); @@ -460,19 +460,18 @@ API.v1.addRoute( } else if (isNaN(Date.parse(since))) { throw new Meteor.Error('The "since" query parameter must be a valid date.'); } - const cursor = Messages.trashFindDeletedAfter( + + const { cursor, totalCount } = MessagesRaw.trashFindPaginatedDeletedAfter( new Date(since), { rid: roomId }, { skip: offset, limit: count, - fields: { _id: 1 }, + projection: { _id: 1 }, }, ); - const total = cursor.count(); - - const messages = cursor.fetch(); + const [messages, total] = await Promise.all([cursor.toArray(), totalCount]); return API.v1.success({ messages, @@ -488,7 +487,7 @@ API.v1.addRoute( 'chat.getPinnedMessages', { authRequired: true }, { - get() { + async get() { const { roomId } = this.queryParams; const { offset, count } = this.getPaginationItems(); @@ -496,21 +495,19 @@ API.v1.addRoute( throw new Meteor.Error('error-roomId-param-not-provided', 'The required "roomId" query param is missing.'); } - if (!canAccessRoom({ _id: roomId }, { _id: this.userId })) { + if (!canAccessRoomId(roomId, this.userId)) { throw new Meteor.Error('error-not-allowed', 'Not allowed'); } - const cursor = Messages.findPinnedByRoom(roomId, { + const { cursor, totalCount } = MessagesRaw.findPaginatedPinnedByRoom(roomId, { skip: offset, limit: count, }); - const total = cursor.count(); - - const messages = cursor.fetch(); + const [messages, total] = await Promise.all([cursor.toArray(), totalCount]); return API.v1.success({ - messages, + messages: normalizeMessagesForUser(messages, this.userId), count: messages.length, offset, total, @@ -523,19 +520,21 @@ API.v1.addRoute( 'chat.getThreadsList', { authRequired: true }, { - get() { + async get() { const { rid, type, text } = this.queryParams; + check(rid, String); + check(type, Match.Maybe(String)); + check(text, Match.Maybe(String)); + const { offset, count } = this.getPaginationItems(); const { sort, fields, query } = this.parseJsonQuery(); - if (!rid) { - throw new Meteor.Error('The required "rid" query param is missing.'); - } if (!settings.get('Threads_enabled')) { throw new Meteor.Error('error-not-allowed', 'Threads Disabled'); } const user = Users.findOneById(this.userId, { fields: { _id: 1 } }); - const room = Rooms.findOneById(rid, { fields: { t: 1, _id: 1 } }); + const room = Rooms.findOneById(rid, { fields: { ...roomAccessAttributes, t: 1, _id: 1 } }); + if (!canAccessRoom(room, user)) { throw new Meteor.Error('error-not-allowed', 'Not Allowed'); } @@ -543,26 +542,22 @@ API.v1.addRoute( const typeThread = { _hidden: { $ne: true }, ...(type === 'following' && { replies: { $in: [this.userId] } }), - ...(type === 'unread' && { - _id: { $in: Subscriptions.findOneByRoomIdAndUserId(room._id, user._id).tunread }, - }), + ...(type === 'unread' && { _id: { $in: Subscriptions.findOneByRoomIdAndUserId(room._id, user._id).tunread } }), msg: new RegExp(escapeRegExp(text), 'i'), }; - const threadQuery = { ...query, ...typeThread, rid, tcount: { $exists: true } }; - const cursor = Messages.find(threadQuery, { + const threadQuery = { ...query, ...typeThread, rid: room._id, tcount: { $exists: true } }; + const { cursor, totalCount } = MessagesRaw.findPaginated(threadQuery, { sort: sort || { tlm: -1 }, skip: offset, limit: count, - fields, + projection: fields, }); - const total = cursor.count(); - - const threads = cursor.fetch(); + const [threads, total] = await Promise.all([cursor.toArray(), totalCount]); return API.v1.success({ - threads, + threads: normalizeMessagesForUser(threads, this.userId), count: threads.length, offset, total, @@ -595,7 +590,8 @@ API.v1.addRoute( updatedSinceDate = new Date(updatedSince); } const user = Users.findOneById(this.userId, { fields: { _id: 1 } }); - const room = Rooms.findOneById(rid, { fields: { t: 1, _id: 1 } }); + const room = Rooms.findOneById(rid, { fields: { ...roomAccessAttributes, t: 1, _id: 1 } }); + if (!canAccessRoom(room, user)) { throw new Meteor.Error('error-not-allowed', 'Not Allowed'); } @@ -603,10 +599,7 @@ API.v1.addRoute( return API.v1.success({ threads: { update: Messages.find({ ...threadQuery, _updatedAt: { $gt: updatedSinceDate } }, { fields, sort }).fetch(), - remove: Messages.trashFindDeletedAfter(updatedSinceDate, threadQuery, { - fields, - sort, - }).fetch(), + remove: Messages.trashFindDeletedAfter(updatedSinceDate, threadQuery, { fields, sort }).fetch(), }, }); }, @@ -617,7 +610,7 @@ API.v1.addRoute( 'chat.getThreadMessages', { authRequired: true }, { - get() { + async get() { const { tmid } = this.queryParams; const { query, fields, sort } = this.parseJsonQuery(); const { offset, count } = this.getPaginationItems(); @@ -633,24 +626,22 @@ API.v1.addRoute( throw new Meteor.Error('error-invalid-message', 'Invalid Message'); } const user = Users.findOneById(this.userId, { fields: { _id: 1 } }); - const room = Rooms.findOneById(thread.rid, { fields: { t: 1, _id: 1 } }); + const room = Rooms.findOneById(thread.rid, { fields: { ...roomAccessAttributes, t: 1, _id: 1 } }); if (!canAccessRoom(room, user)) { throw new Meteor.Error('error-not-allowed', 'Not Allowed'); } - const cursor = Messages.find( + const { cursor, totalCount } = MessagesRaw.findPaginated( { ...query, tmid }, { sort: sort || { ts: 1 }, skip: offset, limit: count, - fields, + projection: fields, }, ); - const total = cursor.count(); - - const messages = cursor.fetch(); + const [messages, total] = await Promise.all([cursor.toArray(), totalCount]); return API.v1.success({ messages, @@ -690,7 +681,7 @@ API.v1.addRoute( throw new Meteor.Error('error-invalid-message', 'Invalid Message'); } const user = Users.findOneById(this.userId, { fields: { _id: 1 } }); - const room = Rooms.findOneById(thread.rid, { fields: { t: 1, _id: 1 } }); + const room = Rooms.findOneById(thread.rid, { fields: { ...roomAccessAttributes, t: 1, _id: 1 } }); if (!canAccessRoom(room, user)) { throw new Meteor.Error('error-not-allowed', 'Not Allowed'); diff --git a/apps/meteor/app/api/server/v1/cloud.ts b/apps/meteor/app/api/server/v1/cloud.ts new file mode 100644 index 000000000000..d7e108a7b034 --- /dev/null +++ b/apps/meteor/app/api/server/v1/cloud.ts @@ -0,0 +1,108 @@ +import { check } from 'meteor/check'; + +import { API } from '../api'; +import { hasPermission, hasRole } from '../../../authorization/server'; +import { saveRegistrationData } from '../../../cloud/server/functions/saveRegistrationData'; +import { retrieveRegistrationStatus } from '../../../cloud/server/functions/retrieveRegistrationStatus'; +import { startRegisterWorkspaceSetupWizard } from '../../../cloud/server/functions/startRegisterWorkspaceSetupWizard'; +import { getConfirmationPoll } from '../../../cloud/server/functions/getConfirmationPoll'; + +API.v1.addRoute( + 'cloud.manualRegister', + { authRequired: true }, + { + async post() { + check(this.bodyParams, { + cloudBlob: String, + }); + + if (!hasPermission(this.userId, 'register-on-cloud')) { + return API.v1.unauthorized(); + } + + const registrationInfo = retrieveRegistrationStatus(); + + if (registrationInfo.workspaceRegistered) { + return API.v1.failure('Workspace is already registered'); + } + + const settingsData = JSON.parse(Buffer.from(this.bodyParams.cloudBlob, 'base64').toString()); + + await saveRegistrationData(settingsData); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'cloud.createRegistrationIntent', + { authRequired: true }, + { + async post() { + check(this.bodyParams, { + resend: Boolean, + email: String, + }); + + if (!hasPermission(this.userId, 'manage-cloud')) { + return API.v1.unauthorized(); + } + + const intentData = await startRegisterWorkspaceSetupWizard(this.bodyParams.resend, this.bodyParams.email); + + if (intentData) { + return API.v1.success({ intentData }); + } + + return API.v1.failure('Invalid query'); + }, + }, +); + +API.v1.addRoute( + 'cloud.confirmationPoll', + { authRequired: true }, + { + async get() { + const { deviceCode } = this.queryParams; + check(this.queryParams, { + deviceCode: String, + }); + + if (!hasPermission(this.userId, 'manage-cloud')) { + return API.v1.unauthorized(); + } + + if (!deviceCode) { + return API.v1.failure('Invalid query'); + } + + const pollData = await getConfirmationPoll(deviceCode); + if (pollData) { + if ('successful' in pollData && pollData.successful) { + Promise.await(saveRegistrationData(pollData.payload)); + } + return API.v1.success({ pollData }); + } + + return API.v1.failure('Invalid query'); + }, + }, +); + +API.v1.addRoute( + 'cloud.registrationStatus', + { authRequired: true }, + { + async get() { + if (!hasRole(this.userId, 'admin')) { + return API.v1.unauthorized(); + } + + const registrationStatus = retrieveRegistrationStatus(); + + return API.v1.success({ registrationStatus }); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/commands.ts b/apps/meteor/app/api/server/v1/commands.ts new file mode 100644 index 000000000000..e2659e17ac3d --- /dev/null +++ b/apps/meteor/app/api/server/v1/commands.ts @@ -0,0 +1,334 @@ +import { Meteor } from 'meteor/meteor'; +import { Random } from 'meteor/random'; +import objectPath from 'object-path'; + +import { slashCommands } from '../../../utils/server'; +import { Messages } from '../../../models/server'; +import { canAccessRoomId } from '../../../authorization/server'; +import { API } from '../api'; + +API.v1.addRoute( + 'commands.get', + { authRequired: true }, + { + get() { + const params = this.queryParams; + + if (typeof params.command !== 'string') { + return API.v1.failure('The query param "command" must be provided.'); + } + + const cmd = slashCommands.commands[params.command.toLowerCase()]; + + if (!cmd) { + return API.v1.failure(`There is no command in the system by the name of: ${params.command}`); + } + + return API.v1.success({ command: cmd }); + }, + }, +); + +/* @deprecated */ +const processQueryOptionsOnResult = , F extends keyof T>( + result: T[], + options: { + fields?: { + [key in F]?: 1 | 0; + }; + sort?: { + [key: string]: 1 | -1; + }; + limit?: number; + skip?: number; + } = {}, +): Pick[] => { + if (result === undefined || result === null) { + return []; + } + + if (Array.isArray(result)) { + if (options.sort) { + result = result.sort((a, b) => { + let r = 0; + for (const field in options.sort) { + if (options.sort.hasOwnProperty(field)) { + const direction = options.sort[field]; + let valueA; + let valueB; + if (field.indexOf('.') > -1) { + valueA = objectPath.get(a, field); + valueB = objectPath.get(b, field); + } else { + valueA = a[field]; + valueB = b[field]; + } + if (valueA > valueB) { + r = direction; + break; + } + if (valueA < valueB) { + r = -direction; + break; + } + } + } + return r; + }); + } + + if (typeof options.skip === 'number') { + result.splice(0, options.skip); + } + + if (typeof options.limit === 'number' && options.limit !== 0) { + result.splice(options.limit); + } + } + + const fieldsToRemove: F[] = []; + const fieldsToGet: F[] = []; + + if (options.fields) { + for (const field in Object.keys(options.fields)) { + if (options.fields.hasOwnProperty(field as F)) { + if (options.fields[field as F] === 0) { + fieldsToRemove.push(field as F); + } else if (options.fields[field as F] === 1) { + fieldsToGet.push(field as F); + } + } + } + } + + if (fieldsToGet.length > 0 && fieldsToGet.indexOf('_id' as F) === -1) { + fieldsToGet.push('_id' as F); + } + + const pickFields = (obj: T, fields: F[]): Pick => { + const picked: Partial = {}; + fields.forEach((field: F) => { + if (String(field).indexOf('.') !== -1) { + objectPath.set(picked, String(field), objectPath.get(obj, String(field))); + } else { + picked[field] = obj[field]; + } + }); + return picked as Pick; + }; + + if (fieldsToRemove.length > 0 && fieldsToGet.length > 0) { + console.warn("Can't mix remove and get fields"); + fieldsToRemove.splice(0, fieldsToRemove.length); + } + + if (fieldsToRemove.length > 0 || fieldsToGet.length > 0) { + return result.map((record) => { + if (fieldsToRemove.length > 0) { + return Object.fromEntries(Object.entries(record).filter(([key]) => !fieldsToRemove.includes(key as F))) as Pick; + } + + return pickFields(record, fieldsToGet); + }); + } + + return result; +}; + +API.v1.addRoute( + 'commands.list', + { authRequired: true }, + { + get() { + const { offset, count } = this.getPaginationItems(); + const { sort, query } = this.parseJsonQuery(); + + let commands = Object.values(slashCommands.commands); + + if (query?.command) { + commands = commands.filter((command) => command.command === query.command); + } + + const totalCount = commands.length; + + return API.v1.success({ + commands: processQueryOptionsOnResult(commands, { + sort: sort || { name: 1 }, + skip: offset, + limit: count, + }), + offset, + count: commands.length, + total: totalCount, + }); + }, + }, +); + +// Expects a body of: { command: 'gimme', params: 'any string value', roomId: 'value', triggerId: 'value' } +API.v1.addRoute( + 'commands.run', + { authRequired: true }, + { + post() { + const body = this.bodyParams; + + if (typeof body.command !== 'string') { + return API.v1.failure('You must provide a command to run.'); + } + + if (body.params && typeof body.params !== 'string') { + return API.v1.failure('The parameters for the command must be a single string.'); + } + + if (typeof body.roomId !== 'string') { + return API.v1.failure("The room's id where to execute this command must be provided and be a string."); + } + + if (body.tmid && typeof body.tmid !== 'string') { + return API.v1.failure('The tmid parameter when provided must be a string.'); + } + + const cmd = body.command.toLowerCase(); + if (!slashCommands.commands[cmd]) { + return API.v1.failure('The command provided does not exist (or is disabled).'); + } + + if (!canAccessRoomId(body.roomId, this.userId)) { + return API.v1.unauthorized(); + } + + const params = body.params ? body.params : ''; + if (typeof body.tmid === 'string') { + const thread = Messages.findOneById(body.tmid); + if (!thread || thread.rid !== body.roomId) { + return API.v1.failure('Invalid thread.'); + } + } + + const message = { + _id: Random.id(), + rid: body.roomId, + msg: `/${cmd} ${params}`, + ...(body.tmid && { tmid: body.tmid }), + }; + + const { triggerId } = body; + + const result = slashCommands.run(cmd, params, message, triggerId); + + return API.v1.success({ result }); + }, + }, +); + +API.v1.addRoute( + 'commands.preview', + { authRequired: true }, + { + // Expects these query params: command: 'giphy', params: 'mine', roomId: 'value' + async get() { + const query = this.queryParams; + const user = this.getLoggedInUser(); + + if (typeof query.command !== 'string') { + return API.v1.failure('You must provide a command to get the previews from.'); + } + + if (query.params && typeof query.params !== 'string') { + return API.v1.failure('The parameters for the command must be a single string.'); + } + + if (typeof query.roomId !== 'string') { + return API.v1.failure("The room's id where the previews are being displayed must be provided and be a string."); + } + + const cmd = query.command.toLowerCase(); + if (!slashCommands.commands[cmd]) { + return API.v1.failure('The command provided does not exist (or is disabled).'); + } + + if (!canAccessRoomId(query.roomId, user._id)) { + return API.v1.unauthorized(); + } + + const params = query.params ? query.params : ''; + + const preview = Meteor.call('getSlashCommandPreviews', { + cmd, + params, + msg: { rid: query.roomId }, + }); + + return API.v1.success({ preview }); + }, + + // Expects a body format of: { command: 'giphy', params: 'mine', roomId: 'value', tmid: 'value', triggerId: 'value', previewItem: { id: 'sadf8' type: 'image', value: 'https://dev.null/gif' } } + post() { + const body = this.bodyParams; + + if (typeof body.command !== 'string') { + return API.v1.failure('You must provide a command to run the preview item on.'); + } + + if (body.params && typeof body.params !== 'string') { + return API.v1.failure('The parameters for the command must be a single string.'); + } + + if (typeof body.roomId !== 'string') { + return API.v1.failure("The room's id where the preview is being executed in must be provided and be a string."); + } + + if (typeof body.previewItem === 'undefined') { + return API.v1.failure('The preview item being executed must be provided.'); + } + + if (!body.previewItem.id || !body.previewItem.type || typeof body.previewItem.value === 'undefined') { + return API.v1.failure('The preview item being executed is in the wrong format.'); + } + + if (body.tmid && typeof body.tmid !== 'string') { + return API.v1.failure('The tmid parameter when provided must be a string.'); + } + + if (body.triggerId && typeof body.triggerId !== 'string') { + return API.v1.failure('The triggerId parameter when provided must be a string.'); + } + + const cmd = body.command.toLowerCase(); + if (!slashCommands.commands[cmd]) { + return API.v1.failure('The command provided does not exist (or is disabled).'); + } + + if (!canAccessRoomId(body.roomId, this.userId)) { + return API.v1.unauthorized(); + } + + const { params = '' } = body; + if (body.tmid) { + const thread = Messages.findOneById(body.tmid); + if (!thread || thread.rid !== body.roomId) { + return API.v1.failure('Invalid thread.'); + } + } + + const msg = { + rid: body.roomId, + ...(body.tmid && { tmid: body.tmid }), + }; + + Meteor.call( + 'executeSlashCommandPreview', + { + cmd, + params, + msg, + }, + body.previewItem, + body.triggerId, + ); + + return API.v1.success(); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/connection.d.ts b/apps/meteor/app/api/server/v1/connection.d.ts new file mode 100644 index 000000000000..03685f624a2a --- /dev/null +++ b/apps/meteor/app/api/server/v1/connection.d.ts @@ -0,0 +1,13 @@ +import type { IInstanceStatus } from '@rocket.chat/core-typings'; + +export declare const connection: + | { + _id: string; + address: string; + currentStatus: IInstanceStatus['currentStatus']; + instanceRecord: IInstanceStatus['instanceRecord']; + broadcastAuth: boolean; + } + | undefined; + +export as namespace connection; diff --git a/apps/meteor/app/api/server/v1/custom-sounds.ts b/apps/meteor/app/api/server/v1/custom-sounds.ts new file mode 100644 index 000000000000..d68a1fa5b24f --- /dev/null +++ b/apps/meteor/app/api/server/v1/custom-sounds.ts @@ -0,0 +1,28 @@ +import { CustomSounds } from '@rocket.chat/models'; + +import { API } from '../api'; + +API.v1.addRoute( + 'custom-sounds.list', + { authRequired: true }, + { + async get() { + const { offset, count } = this.getPaginationItems(); + const { sort, query } = this.parseJsonQuery(); + const { cursor, totalCount } = CustomSounds.findPaginated(query, { + sort: sort || { name: 1 }, + skip: offset, + limit: count, + }); + + const [sounds, total] = await Promise.all([cursor.toArray(), totalCount]); + + return API.v1.success({ + sounds, + count: sounds.length, + offset, + total, + }); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/custom-user-status.ts b/apps/meteor/app/api/server/v1/custom-user-status.ts new file mode 100644 index 000000000000..0a2b086f5e2b --- /dev/null +++ b/apps/meteor/app/api/server/v1/custom-user-status.ts @@ -0,0 +1,116 @@ +import { Meteor } from 'meteor/meteor'; +import { Match, check } from 'meteor/check'; +import { CustomUserStatus } from '@rocket.chat/models'; + +import { API } from '../api'; + +API.v1.addRoute( + 'custom-user-status.list', + { authRequired: true }, + { + async get() { + const { offset, count } = this.getPaginationItems(); + const { sort, query } = this.parseJsonQuery(); + + const { cursor, totalCount } = CustomUserStatus.findPaginated(query, { + sort: sort || { name: 1 }, + skip: offset, + limit: count, + }); + + const [statuses, total] = await Promise.all([cursor.toArray(), totalCount]); + + return API.v1.success({ + statuses, + count: statuses.length, + offset, + total, + }); + }, + }, +); + +API.v1.addRoute( + 'custom-user-status.create', + { authRequired: true }, + { + async post() { + check(this.bodyParams, { + name: String, + statusType: Match.Maybe(String), + }); + + const userStatusData = { + name: this.bodyParams.name, + statusType: this.bodyParams.statusType, + }; + + Meteor.call('insertOrUpdateUserStatus', userStatusData); + + const customUserStatus = await CustomUserStatus.findOneByName(userStatusData.name); + if (!customUserStatus) { + throw new Meteor.Error('error-creating-custom-user-status', 'Error creating custom user status'); + } + + return API.v1.success({ + customUserStatus, + }); + }, + }, +); + +API.v1.addRoute( + 'custom-user-status.delete', + { authRequired: true }, + { + post() { + const { customUserStatusId } = this.bodyParams; + if (!customUserStatusId) { + return API.v1.failure('The "customUserStatusId" params is required!'); + } + + Meteor.call('deleteCustomUserStatus', customUserStatusId); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'custom-user-status.update', + { authRequired: true }, + { + async post() { + check(this.bodyParams, { + _id: String, + name: String, + statusType: Match.Maybe(String), + }); + + const userStatusData = { + _id: this.bodyParams._id, + name: this.bodyParams.name, + statusType: this.bodyParams.statusType, + }; + + const customUserStatusToUpdate = await CustomUserStatus.findOneById(userStatusData._id); + + // Ensure the message exists + if (!customUserStatusToUpdate) { + return API.v1.failure(`No custom user status found with the id of "${userStatusData._id}".`); + } + + Meteor.call('insertOrUpdateUserStatus', userStatusData); + + const customUserStatus = await CustomUserStatus.findOneById(userStatusData._id); + + if (!customUserStatus) { + throw new Meteor.Error('error-updating-custom-user-status', 'Error updating custom user status'); + } + + return API.v1.success({ + customUserStatus, + }); + }, + }, +); diff --git a/app/api/server/v1/dns.ts b/apps/meteor/app/api/server/v1/dns.ts similarity index 100% rename from app/api/server/v1/dns.ts rename to apps/meteor/app/api/server/v1/dns.ts diff --git a/apps/meteor/app/api/server/v1/e2e.ts b/apps/meteor/app/api/server/v1/e2e.ts new file mode 100644 index 000000000000..47420ab2f62d --- /dev/null +++ b/apps/meteor/app/api/server/v1/e2e.ts @@ -0,0 +1,197 @@ +import { Meteor } from 'meteor/meteor'; +import { + ise2eGetUsersOfRoomWithoutKeyParamsGET, + ise2eSetRoomKeyIDParamsPOST, + ise2eSetUserPublicAndPrivateKeysParamsPOST, + ise2eUpdateGroupKeyParamsPOST, +} from '@rocket.chat/rest-typings'; +import type { IUser } from '@rocket.chat/core-typings'; + +import { API } from '../api'; + +API.v1.addRoute( + 'e2e.fetchMyKeys', + { + authRequired: true, + }, + { + get() { + const result: { + public_key: string; + private_key: string; + } = Meteor.call('e2e.fetchMyKeys'); + + return API.v1.success(result); + }, + }, +); + +API.v1.addRoute( + 'e2e.getUsersOfRoomWithoutKey', + { + authRequired: true, + validateParams: ise2eGetUsersOfRoomWithoutKeyParamsGET, + }, + { + get() { + const { rid } = this.queryParams; + + const result: { + users: IUser[]; + } = Meteor.call('e2e.getUsersOfRoomWithoutKey', rid); + + return API.v1.success(result); + }, + }, +); + +/** + * @openapi + * /api/v1/e2e.setRoomKeyID: + * post: + * description: Sets the end-to-end encryption key ID for a room + * security: + * - autenticated: {} + * requestBody: + * description: A tuple containing the room ID and the key ID + * content: + * application/json: + * schema: + * type: object + * properties: + * rid: + * type: string + * keyID: + * type: string + * responses: + * 200: + * content: + * application/json: + * schema: + * $ref: '#/components/schemas/ApiSuccessV1' + * default: + * description: Unexpected error + * content: + * application/json: + * schema: + * $ref: '#/components/schemas/ApiFailureV1' + */ + +API.v1.addRoute( + 'e2e.setRoomKeyID', + { + authRequired: true, + validateParams: ise2eSetRoomKeyIDParamsPOST, + }, + { + post() { + const { rid, keyID } = this.bodyParams; + + Meteor.call('e2e.setRoomKeyID', rid, keyID); + + return API.v1.success(); + }, + }, +); + +/** + * @openapi + * /api/v1/e2e.setUserPublicAndPrivateKeys: + * post: + * description: Sets the end-to-end encryption keys for the authenticated user + * security: + * - autenticated: {} + * requestBody: + * description: A tuple containing the public and the private keys + * content: + * application/json: + * schema: + * type: object + * properties: + * public_key: + * type: string + * private_key: + * type: string + * responses: + * 200: + * content: + * application/json: + * schema: + * $ref: '#/components/schemas/ApiSuccessV1' + * default: + * description: Unexpected error + * content: + * application/json: + * schema: + * $ref: '#/components/schemas/ApiFailureV1' + */ +API.v1.addRoute( + 'e2e.setUserPublicAndPrivateKeys', + { + authRequired: true, + validateParams: ise2eSetUserPublicAndPrivateKeysParamsPOST, + }, + { + post() { + // eslint-disable-next-line @typescript-eslint/naming-convention + const { public_key, private_key } = this.bodyParams; + + Meteor.call('e2e.setUserPublicAndPrivateKeys', { + public_key, + private_key, + }); + + return API.v1.success(); + }, + }, +); + +/** + * @openapi + * /api/v1/e2e.updateGroupKey: + * post: + * description: Updates the end-to-end encryption key for a user on a room + * security: + * - autenticated: {} + * requestBody: + * description: A tuple containing the user ID, the room ID, and the key + * content: + * application/json: + * schema: + * type: object + * properties: + * uid: + * type: string + * rid: + * type: string + * key: + * type: string + * responses: + * 200: + * content: + * application/json: + * schema: + * $ref: '#/components/schemas/ApiSuccessV1' + * default: + * description: Unexpected error + * content: + * application/json: + * schema: + * $ref: '#/components/schemas/ApiFailureV1' + */ +API.v1.addRoute( + 'e2e.updateGroupKey', + { + authRequired: true, + validateParams: ise2eUpdateGroupKeyParamsPOST, + }, + { + post() { + const { uid, rid, key } = this.bodyParams; + + Meteor.call('e2e.updateGroupKey', rid, uid, key); + + return API.v1.success(); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/email-inbox.ts b/apps/meteor/app/api/server/v1/email-inbox.ts new file mode 100644 index 000000000000..293ae2e6b8aa --- /dev/null +++ b/apps/meteor/app/api/server/v1/email-inbox.ts @@ -0,0 +1,168 @@ +import { check, Match } from 'meteor/check'; +import { EmailInbox } from '@rocket.chat/models'; + +import { API } from '../api'; +import { insertOneEmailInbox, findEmailInboxes, findOneEmailInbox, updateEmailInbox } from '../lib/emailInbox'; +import { hasPermission } from '../../../authorization/server/functions/hasPermission'; +import Users from '../../../models/server/models/Users'; +import { sendTestEmailToInbox } from '../../../../server/features/EmailInbox/EmailInbox_Outgoing'; + +API.v1.addRoute( + 'email-inbox.list', + { authRequired: true }, + { + async get() { + const { offset, count } = this.getPaginationItems(); + const { sort, query } = this.parseJsonQuery(); + const emailInboxes = await findEmailInboxes({ userId: this.userId, query, pagination: { offset, count, sort } }); + + return API.v1.success(emailInboxes); + }, + }, +); + +API.v1.addRoute( + 'email-inbox', + { authRequired: true }, + { + async post() { + if (!hasPermission(this.userId, 'manage-email-inbox')) { + throw new Error('error-not-allowed'); + } + + check(this.bodyParams, { + _id: Match.Maybe(String), + active: Boolean, + name: String, + email: String, + description: String, + senderInfo: String, + department: String, + smtp: Match.ObjectIncluding({ + server: String, + port: Number, + username: String, + password: String, + secure: Boolean, + }), + imap: Match.ObjectIncluding({ + server: String, + port: Number, + username: String, + password: String, + secure: Boolean, + maxRetries: Number, + }), + }); + + const emailInboxParams = this.bodyParams; + + let _id: string; + + if (!emailInboxParams?._id) { + const emailInbox = await insertOneEmailInbox(this.userId, emailInboxParams); + _id = emailInbox.insertedId.toString(); + } else { + _id = emailInboxParams._id; + await updateEmailInbox(this.userId, { ...emailInboxParams, _id }); + } + return API.v1.success({ _id }); + }, + }, +); + +API.v1.addRoute( + 'email-inbox/:_id', + { authRequired: true }, + { + async get() { + check(this.urlParams, { + _id: String, + }); + + const { _id } = this.urlParams; + if (!_id) { + throw new Error('error-invalid-param'); + } + // TODO: Chapter day backend - check if user has permission to view this email inbox instead of null values + const emailInboxes = await findOneEmailInbox({ userId: this.userId, _id }); + + return API.v1.success(emailInboxes); + }, + async delete() { + if (!hasPermission(this.userId, 'manage-email-inbox')) { + throw new Error('error-not-allowed'); + } + check(this.urlParams, { + _id: String, + }); + + const { _id } = this.urlParams; + if (!_id) { + throw new Error('error-invalid-param'); + } + + const emailInboxes = await EmailInbox.findOneById(_id); + + if (!emailInboxes) { + return API.v1.notFound(); + } + await EmailInbox.removeById(_id); + return API.v1.success({ _id }); + }, + }, +); + +API.v1.addRoute( + 'email-inbox.search', + { authRequired: true }, + { + async get() { + if (!hasPermission(this.userId, 'manage-email-inbox')) { + throw new Error('error-not-allowed'); + } + check(this.queryParams, { + email: String, + }); + + const { email } = this.queryParams; + + // TODO: Chapter day backend - check if user has permission to view this email inbox instead of null values + // TODO: Chapter day: Remove this endpoint and move search to GET /email-inbox + const emailInbox = await EmailInbox.findOne({ email }); + + return API.v1.success({ emailInbox }); + }, + }, +); + +API.v1.addRoute( + 'email-inbox.send-test/:_id', + { authRequired: true }, + { + async post() { + if (!hasPermission(this.userId, 'manage-email-inbox')) { + throw new Error('error-not-allowed'); + } + check(this.urlParams, { + _id: String, + }); + + const { _id } = this.urlParams; + if (!_id) { + throw new Error('error-invalid-param'); + } + const emailInbox = await findOneEmailInbox({ userId: this.userId, _id }); + + if (!emailInbox) { + return API.v1.notFound(); + } + + const user = Users.findOneById(this.userId); + + await sendTestEmailToInbox(emailInbox, user); + + return API.v1.success({ _id }); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/emoji-custom.ts b/apps/meteor/app/api/server/v1/emoji-custom.ts new file mode 100644 index 000000000000..e0027765352e --- /dev/null +++ b/apps/meteor/app/api/server/v1/emoji-custom.ts @@ -0,0 +1,169 @@ +import { Meteor } from 'meteor/meteor'; +import { EmojiCustom } from '@rocket.chat/models'; + +import { API } from '../api'; +import { getUploadFormData } from '../lib/getUploadFormData'; +import { findEmojisCustom } from '../lib/emoji-custom'; +import { Media } from '../../../../server/sdk'; +import { SystemLogger } from '../../../../server/lib/logger/system'; + +API.v1.addRoute( + 'emoji-custom.list', + { authRequired: true }, + { + async get() { + const { query } = this.parseJsonQuery(); + const { updatedSince } = this.queryParams; + if (updatedSince) { + const updatedSinceDate = new Date(updatedSince); + if (isNaN(Date.parse(updatedSince))) { + throw new Meteor.Error('error-roomId-param-invalid', 'The "updatedSince" query parameter must be a valid date.'); + } + const [update, remove] = await Promise.all([ + EmojiCustom.find({ ...query, _updatedAt: { $gt: updatedSinceDate } }).toArray(), + EmojiCustom.trashFindDeletedAfter(updatedSinceDate).toArray(), + ]); + return API.v1.success({ + emojis: { + update, + remove, + }, + }); + } + + return API.v1.success({ + emojis: { + update: await EmojiCustom.find(query).toArray(), + remove: [], + }, + }); + }, + }, +); + +API.v1.addRoute( + 'emoji-custom.all', + { authRequired: true }, + { + async get() { + const { offset, count } = this.getPaginationItems(); + const { sort, query } = this.parseJsonQuery(); + + return API.v1.success( + await findEmojisCustom({ + query, + pagination: { + offset, + count, + sort, + }, + }), + ); + }, + }, +); + +API.v1.addRoute( + 'emoji-custom.create', + { authRequired: true }, + { + async post() { + const [emoji, fields] = await getUploadFormData( + { + request: this.request, + }, + { field: 'emoji' }, + ); + + const isUploadable = await Media.isImage(emoji.fileBuffer); + if (!isUploadable) { + throw new Meteor.Error('emoji-is-not-image', "Emoji file provided cannot be uploaded since it's not an image"); + } + + const [, extension] = emoji.mimetype.split('/'); + fields.extension = extension; + + try { + Meteor.call('insertOrUpdateEmoji', { + ...fields, + newFile: true, + aliases: fields.aliases || '', + }); + Meteor.call('uploadEmojiCustom', emoji.fileBuffer, emoji.mimetype, { + ...fields, + newFile: true, + aliases: fields.aliases || '', + }); + } catch (e) { + SystemLogger.error(e); + return API.v1.failure(); + } + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'emoji-custom.update', + { authRequired: true }, + { + async post() { + const [emoji, fields] = await getUploadFormData( + { + request: this.request, + }, + { field: 'emoji' }, + ); + + if (!fields._id) { + throw new Meteor.Error('The required "_id" query param is missing.'); + } + + const emojiToUpdate = await EmojiCustom.findOneById(fields._id); + if (!emojiToUpdate) { + throw new Meteor.Error('Emoji not found.'); + } + + fields.previousName = emojiToUpdate.name; + fields.previousExtension = emojiToUpdate.extension; + fields.aliases = fields.aliases || ''; + const newFile = Boolean(emoji?.fileBuffer.length); + + if (fields.newFile) { + const isUploadable = await Media.isImage(emoji.fileBuffer); + if (!isUploadable) { + throw new Meteor.Error('emoji-is-not-image', "Emoji file provided cannot be uploaded since it's not an image"); + } + + const [, extension] = emoji.mimetype.split('/'); + fields.extension = extension; + } else { + fields.extension = emojiToUpdate.extension; + } + + Meteor.call('insertOrUpdateEmoji', { ...fields, newFile }); + if (fields.newFile) { + Meteor.call('uploadEmojiCustom', emoji.fileBuffer, emoji.mimetype, { ...fields, newFile }); + } + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'emoji-custom.delete', + { authRequired: true }, + { + post() { + const { emojiId } = this.bodyParams; + if (!emojiId) { + return API.v1.failure('The "emojiId" params is required!'); + } + + Meteor.call('deleteEmojiCustom', emojiId); + + return API.v1.success(); + }, + }, +); diff --git a/app/api/server/v1/groups.js b/apps/meteor/app/api/server/v1/groups.js similarity index 92% rename from app/api/server/v1/groups.js rename to apps/meteor/app/api/server/v1/groups.js index a82edb596e67..6593effe5b72 100644 --- a/app/api/server/v1/groups.js +++ b/apps/meteor/app/api/server/v1/groups.js @@ -1,15 +1,22 @@ import _ from 'underscore'; import { Meteor } from 'meteor/meteor'; import { Match, check } from 'meteor/check'; +import { Integrations, Messages as MessagesRaw, Uploads, Rooms as RoomsRaw, Subscriptions as SubscriptionsRaw } from '@rocket.chat/models'; import { mountIntegrationQueryBasedOnPermissions } from '../../../integrations/server/lib/mountQueriesBasedOnPermission'; import { Subscriptions, Rooms, Messages, Users } from '../../../models/server'; -import { Integrations, Uploads } from '../../../models/server/raw'; -import { hasPermission, hasAtLeastOnePermission, canAccessRoom, hasAllPermission } from '../../../authorization/server'; +import { + hasPermission, + hasAtLeastOnePermission, + canAccessRoom, + hasAllPermission, + roomAccessAttributes, +} from '../../../authorization/server'; import { normalizeMessagesForUser } from '../../../utils/server/lib/normalizeMessagesForUser'; import { API } from '../api'; import { Team } from '../../../../server/sdk'; import { findUsersOfRoom } from '../../../../server/lib/findUsersOfRoom'; +import { addUserToFileObj } from '../helpers/addUserToFileObj'; // Returns the private group subscription IF found otherwise it will return the failure of why it didn't. Check the `statusCode` property export function findPrivateGroupByIdOrName({ params, userId, checkedArchived = true }) { @@ -19,6 +26,7 @@ export function findPrivateGroupByIdOrName({ params, userId, checkedArchived = t const roomOptions = { fields: { + ...roomAccessAttributes, t: 1, ro: 1, name: 1, @@ -326,38 +334,32 @@ API.v1.addRoute( 'groups.files', { authRequired: true }, { - get() { + async get() { const findResult = findPrivateGroupByIdOrName({ params: this.requestParams(), userId: this.userId, checkedArchived: false, }); - const addUserObjectToEveryObject = (file) => { - if (file.userId) { - file = this.insertUserObject({ object: file, userId: file.userId }); - } - return file; - }; const { offset, count } = this.getPaginationItems(); const { sort, fields, query } = this.parseJsonQuery(); const ourQuery = Object.assign({}, query, { rid: findResult.rid }); - const files = Promise.await( - Uploads.find(ourQuery, { - sort: sort || { name: 1 }, - skip: offset, - limit: count, - fields, - }).toArray(), - ); + const { cursor, totalCount } = Uploads.findPaginated(ourQuery, { + sort: sort || { name: 1 }, + skip: offset, + limit: count, + projection: fields, + }); + + const [files, total] = await Promise.all([cursor.toArray(), totalCount]); return API.v1.success({ - files: files.map(addUserObjectToEveryObject), + files: await addUserToFileObj(files), count: files.length, offset, - total: Promise.await(Uploads.find(ourQuery).count()), + total, }); }, }, @@ -367,7 +369,7 @@ API.v1.addRoute( 'groups.getIntegrations', { authRequired: true }, { - get() { + async get() { if ( !hasAtLeastOnePermission(this.userId, [ 'manage-outgoing-integrations', @@ -401,15 +403,14 @@ API.v1.addRoute( const ourQuery = Object.assign(mountIntegrationQueryBasedOnPermissions(this.userId), query, { channel: { $in: channelsToSearch }, }); - const cursor = Integrations.find(ourQuery, { + const { cursor, totalCount } = Integrations.findPaginated(ourQuery, { sort: sort || { _createdAt: 1 }, skip: offset, limit: count, projection, }); - const integrations = Promise.await(cursor.toArray()); - const total = Promise.await(cursor.count()); + const [integrations, total] = await Promise.all([cursor.toArray(), totalCount]); return API.v1.success({ integrations, @@ -573,26 +574,31 @@ API.v1.addRoute( 'groups.list', { authRequired: true }, { - get() { + async get() { const { offset, count } = this.getPaginationItems(); const { sort, fields } = this.parseJsonQuery(); - // TODO: CACHE: Add Breacking notice since we removed the query param - const cursor = Rooms.findBySubscriptionTypeAndUserId('p', this.userId, { + const subs = await SubscriptionsRaw.findByUserIdAndTypes(this.userId, ['p'], { projection: { rid: 1 } }).toArray(); + const rids = subs.map(({ rid }) => rid).filter(Boolean); + + if (rids.length === 0) { + return API.v1.notFound(); + } + + const { cursor, totalCount } = RoomsRaw.findPaginatedByTypeAndIds('p', rids, { sort: sort || { name: 1 }, skip: offset, limit: count, - fields, + projection: fields, }); - const totalCount = cursor.count(); - const rooms = cursor.fetch(); + const [groups, total] = await Promise.all([cursor.toArray(), totalCount]); return API.v1.success({ - groups: rooms.map((room) => this.composeRoomWithLastMessage(room, this.userId)), + groups: groups.map((room) => this.composeRoomWithLastMessage(room, this.userId)), offset, - count: rooms.length, - total: totalCount, + count: groups.length, + total, }); }, }, @@ -602,7 +608,7 @@ API.v1.addRoute( 'groups.listAll', { authRequired: true }, { - get() { + async get() { if (!hasPermission(this.userId, 'view-room-administration')) { return API.v1.unauthorized(); } @@ -610,21 +616,20 @@ API.v1.addRoute( const { sort, fields, query } = this.parseJsonQuery(); const ourQuery = Object.assign({}, query, { t: 'p' }); - const cursor = Rooms.find(ourQuery, { + const { cursor, totalCount } = RoomsRaw.findPaginated(ourQuery, { sort: sort || { name: 1 }, skip: offset, limit: count, - fields, + projection: fields, }); - const totalCount = cursor.count(); - const rooms = cursor.fetch(); + const [rooms, total] = await Promise.all([cursor.toArray(), totalCount]); return API.v1.success({ groups: rooms.map((room) => this.composeRoomWithLastMessage(room, this.userId)), offset, count: rooms.length, - total: totalCount, + total, }); }, }, @@ -634,13 +639,13 @@ API.v1.addRoute( 'groups.members', { authRequired: true }, { - get() { + async get() { const findResult = findPrivateGroupByIdOrName({ params: this.requestParams(), userId: this.userId, }); - if (findResult.broadcast && !hasPermission(this.userId, 'view-broadcast-member-list')) { + if (findResult.broadcast && !hasPermission(this.userId, 'view-broadcast-member-list', findResult.rid)) { return API.v1.unauthorized(); } @@ -656,7 +661,7 @@ API.v1.addRoute( ); const { status, filter } = this.queryParams; - const cursor = findUsersOfRoom({ + const { cursor, totalCount } = findUsersOfRoom({ rid: findResult.rid, ...(status && { status: { $in: status } }), skip, @@ -665,8 +670,7 @@ API.v1.addRoute( ...(sort?.username && { sort: { username: sort.username } }), }); - const total = cursor.count(); - const members = cursor.fetch(); + const [members, total] = await Promise.all([cursor.toArray(), totalCount]); return API.v1.success({ members, @@ -682,7 +686,7 @@ API.v1.addRoute( 'groups.messages', { authRequired: true }, { - get() { + async get() { const findResult = findPrivateGroupByIdOrName({ params: this.requestParams(), userId: this.userId, @@ -692,18 +696,20 @@ API.v1.addRoute( const ourQuery = Object.assign({}, query, { rid: findResult.rid }); - const messages = Messages.find(ourQuery, { + const { cursor, totalCount } = MessagesRaw.findPaginated(ourQuery, { sort: sort || { ts: -1 }, skip: offset, limit: count, - fields, - }).fetch(); + projection: fields, + }); + + const [messages, total] = await Promise.all([cursor.toArray(), totalCount]); return API.v1.success({ messages: normalizeMessagesForUser(messages, this.userId), count: messages.length, offset, - total: Messages.find(ourQuery).count(), + total, }); }, }, diff --git a/apps/meteor/app/api/server/v1/im.ts b/apps/meteor/app/api/server/v1/im.ts new file mode 100644 index 000000000000..eb66fefd6723 --- /dev/null +++ b/apps/meteor/app/api/server/v1/im.ts @@ -0,0 +1,543 @@ +/** + * Docs: https://github.com/RocketChat/developer-docs/blob/master/reference/api/rest-api/endpoints/team-collaboration-endpoints/im-endpoints + */ +import type { IMessage, IRoom, ISubscription, IUpload } from '@rocket.chat/core-typings'; +import { + isDmDeleteProps, + isDmFileProps, + isDmMemberProps, + isDmMessagesProps, + isDmCreateProps, + isDmHistoryProps, +} from '@rocket.chat/rest-typings'; +import { Meteor } from 'meteor/meteor'; +import { Match, check } from 'meteor/check'; +import { Subscriptions, Uploads, Messages, Rooms, Users } from '@rocket.chat/models'; + +import { canAccessRoomIdAsync } from '../../../authorization/server/functions/canAccessRoom'; +import { hasPermission } from '../../../authorization/server'; +import { normalizeMessagesForUser } from '../../../utils/server/lib/normalizeMessagesForUser'; +import { API } from '../api'; +import { getRoomByNameOrIdWithOptionToJoin } from '../../../lib/server/functions/getRoomByNameOrIdWithOptionToJoin'; +import { createDirectMessage } from '../../../../server/methods/createDirectMessage'; +import { addUserToFileObj } from '../helpers/addUserToFileObj'; +import { settings } from '../../../settings/server'; + +interface IImFilesObject extends IUpload { + userId: string; +} +// TODO: Refact or remove + +type findDirectMessageRoomProps = + | { + roomId: string; + } + | { + username: string; + }; + +const findDirectMessageRoom = async ( + keys: findDirectMessageRoomProps, + uid: string, +): Promise<{ room: IRoom; subscription: ISubscription | null }> => { + if (!('roomId' in keys) && !('username' in keys)) { + throw new Meteor.Error('error-room-param-not-provided', 'Query param "roomId" or "username" is required'); + } + + const room = getRoomByNameOrIdWithOptionToJoin({ + currentUserId: uid, + nameOrId: 'roomId' in keys ? keys.roomId : keys.username, + type: 'd', + }); + + if (!room || room?.t !== 'd') { + throw new Meteor.Error('error-room-not-found', 'The required "roomId" param provided does not match any direct message'); + } + + const subscription = await Subscriptions.findOne({ 'rid': room._id, 'u._id': uid }); + + return { + room, + subscription, + }; +}; + +API.v1.addRoute( + ['dm.create', 'im.create'], + { + authRequired: true, + validateParams: isDmCreateProps, + }, + { + post() { + const users = + 'username' in this.bodyParams + ? [this.bodyParams.username] + : this.bodyParams.usernames.split(',').map((username: string) => username.trim()); + + const room = createDirectMessage(users, this.userId, this.bodyParams.excludeSelf); + + return API.v1.success({ + room: { ...room, _id: room.rid }, + }); + }, + }, +); + +API.v1.addRoute( + ['dm.delete', 'im.delete'], + { + authRequired: true, + validateParams: isDmDeleteProps, + }, + { + async post() { + const { room } = await findDirectMessageRoom(this.bodyParams, this.userId); + + const canAccess = (await canAccessRoomIdAsync(room._id, this.userId)) || hasPermission(this.userId, 'view-room-administration'); + if (!canAccess) { + throw new Meteor.Error('error-not-allowed', 'Not allowed'); + } + + Meteor.call('eraseRoom', room._id); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + ['dm.close', 'im.close'], + { authRequired: true }, + { + async post() { + const { roomId } = this.bodyParams; + if (!roomId) { + throw new Meteor.Error('error-room-param-not-provided', 'Body param "roomId" is required'); + } + const canAccess = await canAccessRoomIdAsync(roomId, this.userId); + if (!canAccess) { + return API.v1.unauthorized(); + } + + const { room, subscription } = await findDirectMessageRoom({ roomId }, this.userId); + + if (!subscription?.open) { + return API.v1.failure(`The direct message room, is already closed to the sender`); + } + + Meteor.call('hideRoom', room._id); + + return API.v1.success(); + }, + }, +); + +// https://github.com/RocketChat/Rocket.Chat/pull/9679 as reference +API.v1.addRoute( + ['dm.counters', 'im.counters'], + { authRequired: true }, + { + async get() { + const access = hasPermission(this.userId, 'view-room-administration'); + const { roomId, userId: ruserId } = this.requestParams(); + if (!roomId) { + throw new Meteor.Error('error-room-param-not-provided', 'Query param "roomId" is required'); + } + let user = this.userId; + let unreads = null; + let userMentions = null; + let unreadsFrom = null; + let joined = false; + let msgs = null; + let latest = null; + let members = null; + let lm = null; + + if (ruserId) { + if (!access) { + return API.v1.unauthorized(); + } + user = ruserId; + } + const canAccess = await canAccessRoomIdAsync(roomId, user); + + if (!canAccess) { + return API.v1.unauthorized(); + } + + const { room, subscription } = await findDirectMessageRoom({ roomId }, user); + + lm = room?.lm ? new Date(room.lm).toISOString() : new Date(room._updatedAt).toISOString(); // lm is the last message timestamp + + if (subscription?.open) { + if (subscription.ls && room.msgs) { + unreads = subscription.unread; + unreadsFrom = new Date(subscription.ls).toISOString(); // last read timestamp + } + userMentions = subscription.userMentions; + joined = true; + } + + if (access || joined) { + msgs = room.msgs; + latest = lm; + members = room.usersCount; + } + + return API.v1.success({ + joined, + members, + unreads, + unreadsFrom, + msgs, + latest, + userMentions, + }); + }, + }, +); + +API.v1.addRoute( + ['dm.files', 'im.files'], + { + authRequired: true, + validateParams: isDmFileProps, + }, + { + async get() { + const { offset, count } = this.getPaginationItems(); + const { sort, fields, query } = this.parseJsonQuery(); + + const { room } = await findDirectMessageRoom(this.queryParams, this.userId); + + const canAccess = await canAccessRoomIdAsync(room._id, this.userId); + if (!canAccess) { + return API.v1.unauthorized(); + } + + const ourQuery = query ? { rid: room._id, ...query } : { rid: room._id }; + + const { cursor, totalCount } = Uploads.findPaginated(ourQuery, { + sort: sort || { name: 1 }, + skip: offset, + limit: count, + projection: fields, + }); + + const [files, total] = await Promise.all([cursor.toArray(), totalCount]); + + return API.v1.success({ + files: await addUserToFileObj(files), + count: files.length, + offset, + total, + }); + }, + }, +); + +API.v1.addRoute( + ['dm.history', 'im.history'], + { authRequired: true, validateParams: isDmHistoryProps }, + { + async get() { + const { offset = 0, count = 20 } = this.getPaginationItems(); + const { roomId, latest, oldest, inclusive, unreads, showThreadMessages } = this.queryParams; + + if (!roomId) { + throw new Meteor.Error('error-room-param-not-provided', 'Query param "roomId" is required'); + } + const { room } = await findDirectMessageRoom({ roomId }, this.userId); + + const objectParams = { + rid: room._id, + latest: latest ? new Date(latest) : new Date(), + oldest: oldest && new Date(oldest), + inclusive: inclusive === 'true', + offset, + count, + unreads: unreads === 'true', + showThreadMessages: showThreadMessages === 'true', + }; + + const result = Meteor.call('getChannelHistory', objectParams); + + if (!result) { + return API.v1.unauthorized(); + } + + return API.v1.success(result); + }, + }, +); + +API.v1.addRoute( + ['dm.members', 'im.members'], + { + authRequired: true, + validateParams: isDmMemberProps, + }, + { + async get() { + const { room } = await findDirectMessageRoom(this.queryParams, this.userId); + + const canAccess = await canAccessRoomIdAsync(room._id, this.userId); + if (!canAccess) { + return API.v1.unauthorized(); + } + + const { offset, count } = this.getPaginationItems(); + const { sort } = this.parseJsonQuery(); + + check( + this.queryParams, + Match.ObjectIncluding({ + status: Match.Maybe([String]), + filter: Match.Maybe(String), + }), + ); + const { status, filter } = this.queryParams; + + const extraQuery = { + _id: { $in: room.uids }, + ...(status && { status: { $in: status } }), + }; + + const options = { + sort: { username: sort?.username ? sort.username : 1 }, + projection: { _id: 1, username: 1, name: 1, status: 1, statusText: 1, utcOffset: 1, federated: 1 }, + skip: offset, + limit: count, + }; + + const searchFields = settings.get('Accounts_SearchFields').trim().split(','); + + const { cursor, totalCount } = Users.findPaginatedByActiveUsersExcept(filter, [], options, searchFields, [extraQuery]); + + const [members, total] = await Promise.all([cursor.toArray(), totalCount]); + + return API.v1.success({ + members, + count: members.length, + offset, + total, + }); + }, + }, +); + +API.v1.addRoute( + ['dm.messages', 'im.messages'], + { + authRequired: true, + validateParams: isDmMessagesProps, + }, + { + async get() { + const { room } = await findDirectMessageRoom(this.queryParams, this.userId); + + const canAccess = await canAccessRoomIdAsync(room._id, this.userId); + if (!canAccess) { + return API.v1.unauthorized(); + } + + const { offset, count } = this.getPaginationItems(); + const { sort, fields, query } = this.parseJsonQuery(); + + const ourQuery = { rid: room._id, ...query }; + const sortObj = { ts: sort?.ts ?? -1 }; + + const { cursor, totalCount } = Messages.findPaginated(ourQuery, { + sort: sortObj, + skip: offset, + limit: count, + ...(fields && { projection: fields }), + }); + + const [messages, total] = await Promise.all([cursor.toArray(), totalCount]); + + return API.v1.success({ + messages: normalizeMessagesForUser(messages, this.userId), + count: messages.length, + offset, + total, + }); + }, + }, +); + +API.v1.addRoute( + ['dm.messages.others', 'im.messages.others'], + { authRequired: true }, + { + async get() { + if (settings.get('API_Enable_Direct_Message_History_EndPoint') !== true) { + throw new Meteor.Error('error-endpoint-disabled', 'This endpoint is disabled', { + route: '/api/v1/im.messages.others', + }); + } + + if (!hasPermission(this.userId, 'view-room-administration')) { + return API.v1.unauthorized(); + } + + const { roomId } = this.requestParams(); + if (!roomId) { + throw new Meteor.Error('error-roomid-param-not-provided', 'The parameter "roomId" is required'); + } + + const room = await Rooms.findOneById>(roomId, { projection: { _id: 1, t: 1 } }); + if (!room || room?.t !== 'd') { + throw new Meteor.Error('error-room-not-found', `No direct message room found by the id of: ${roomId}`); + } + + const { offset, count } = this.getPaginationItems(); + const { sort, fields, query } = this.parseJsonQuery(); + const ourQuery = Object.assign({}, query, { rid: room._id }); + + const { cursor, totalCount } = Messages.findPaginated(ourQuery, { + sort: sort || { ts: -1 }, + skip: offset, + limit: count, + projection: fields, + }); + + const [msgs, total] = await Promise.all([cursor.toArray(), totalCount]); + + if (!msgs) { + throw new Meteor.Error('error-no-messages', 'No messages found'); + } + + return API.v1.success({ + messages: normalizeMessagesForUser(msgs, this.userId), + offset, + count: msgs.length, + total, + }); + }, + }, +); + +API.v1.addRoute( + ['dm.list', 'im.list'], + { authRequired: true }, + { + async get() { + const { offset, count } = this.getPaginationItems(); + const { sort = { name: 1 }, fields } = this.parseJsonQuery(); + + // TODO: CACHE: Add Breaking notice since we removed the query param + + const subscriptions = await Subscriptions.find({ 'u._id': this.userId, 't': 'd' }, { projection: { rid: 1 } }) + .map((item) => item.rid) + .toArray(); + + const { cursor, totalCount } = Rooms.findPaginated( + { t: 'd', _id: { $in: subscriptions } }, + { + sort, + skip: offset, + limit: count, + projection: fields, + }, + ); + + const [ims, total] = await Promise.all([cursor.toArray(), totalCount]); + + return API.v1.success({ + ims: ims.map((room: IRoom) => this.composeRoomWithLastMessage(room, this.userId)), + offset, + count: ims.length, + total, + }); + }, + }, +); + +API.v1.addRoute( + ['dm.list.everyone', 'im.list.everyone'], + { authRequired: true }, + { + async get() { + if (!hasPermission(this.userId, 'view-room-administration')) { + return API.v1.unauthorized(); + } + + const { offset, count }: { offset: number; count: number } = this.getPaginationItems(); + const { sort, fields, query } = this.parseJsonQuery(); + + const { cursor, totalCount } = Rooms.findPaginated( + { ...query, t: 'd' }, + { + sort: sort || { name: 1 }, + skip: offset, + limit: count, + projection: fields, + }, + ); + + const [rooms, total] = await Promise.all([cursor.toArray(), totalCount]); + + return API.v1.success({ + ims: rooms.map((room: IRoom) => this.composeRoomWithLastMessage(room, this.userId)), + offset, + count: rooms.length, + total, + }); + }, + }, +); + +API.v1.addRoute( + ['dm.open', 'im.open'], + { authRequired: true }, + { + async post() { + const { roomId } = this.requestParams(); + + if (!roomId) { + throw new Meteor.Error('error-room-param-not-provided', 'Body param "roomId" is required'); + } + const canAccess = await canAccessRoomIdAsync(roomId, this.userId); + if (!canAccess) { + return API.v1.unauthorized(); + } + + const { room, subscription } = await findDirectMessageRoom({ roomId }, this.userId); + + if (!subscription?.open) { + Meteor.call('openRoom', room._id); + } + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + ['dm.setTopic', 'im.setTopic'], + { authRequired: true }, + { + async post() { + const { roomId, topic } = this.requestParams(); + + if (!roomId) { + throw new Meteor.Error('error-room-param-not-provided', 'Body param "roomId" is required'); + } + + const canAccess = await canAccessRoomIdAsync(roomId, this.userId); + if (!canAccess) { + return API.v1.unauthorized(); + } + + const { room } = await findDirectMessageRoom({ roomId }, this.userId); + + Meteor.call('saveRoomSettings', room._id, 'roomTopic', topic); + + return API.v1.success({ + topic, + }); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/import.ts b/apps/meteor/app/api/server/v1/import.ts new file mode 100644 index 000000000000..22e4180a85a4 --- /dev/null +++ b/apps/meteor/app/api/server/v1/import.ts @@ -0,0 +1,185 @@ +import { Meteor } from 'meteor/meteor'; +import { + isUploadImportFileParamsPOST, + isDownloadPublicImportFileParamsPOST, + isStartImportParamsPOST, + isGetImportFileDataParamsGET, + isGetImportProgressParamsGET, + isGetLatestImportOperationsParamsGET, + isDownloadPendingFilesParamsPOST, + isDownloadPendingAvatarsParamsPOST, + isGetCurrentImportOperationParamsGET, +} from '@rocket.chat/rest-typings'; + +import { API } from '../api'; +import { Imports } from '../../../models/server'; +import { Importers } from '../../../importer/server'; +import { + executeUploadImportFile, + executeDownloadPublicImportFile, + executeGetImportProgress, + executeGetImportFileData, + executeStartImport, + executeGetLatestImportOperations, +} from '../../../importer/server/methods'; + +API.v1.addRoute( + 'uploadImportFile', + { + authRequired: true, + validateParams: isUploadImportFileParamsPOST, + }, + { + post() { + const { binaryContent, contentType, fileName, importerKey } = this.bodyParams; + + return API.v1.success(executeUploadImportFile(this.userId, binaryContent, contentType, fileName, importerKey)); + }, + }, +); + +API.v1.addRoute( + 'downloadPublicImportFile', + { + authRequired: true, + validateParams: isDownloadPublicImportFileParamsPOST, + permissionsRequired: ['run-import'], + }, + { + post() { + const { fileUrl, importerKey } = this.bodyParams; + executeDownloadPublicImportFile(this.userId, fileUrl, importerKey); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'startImport', + { + authRequired: true, + validateParams: isStartImportParamsPOST, + permissionsRequired: ['run-import'], + }, + { + post() { + const { input } = this.bodyParams; + + executeStartImport({ input }); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'getImportFileData', + { + authRequired: true, + validateParams: isGetImportFileDataParamsGET, + permissionsRequired: ['run-import'], + }, + { + async get() { + const result = await executeGetImportFileData(); + + return API.v1.success(result); + }, + }, +); + +API.v1.addRoute( + 'getImportProgress', + { + authRequired: true, + validateParams: isGetImportProgressParamsGET, + permissionsRequired: ['run-import'], + }, + { + get() { + const result = executeGetImportProgress(); + return API.v1.success(result); + }, + }, +); + +API.v1.addRoute( + 'getLatestImportOperations', + { + authRequired: true, + validateParams: isGetLatestImportOperationsParamsGET, + permissionsRequired: ['view-import-operations'], + }, + { + get() { + const result = executeGetLatestImportOperations(); + return API.v1.success(result); + }, + }, +); + +API.v1.addRoute( + 'downloadPendingFiles', + { + authRequired: true, + validateParams: isDownloadPendingFilesParamsPOST, + permissionsRequired: ['run-import'], + }, + { + post() { + const importer = Importers.get('pending-files'); + if (!importer) { + throw new Meteor.Error('error-importer-not-defined', 'The Pending File Importer was not found.', 'downloadPendingFiles'); + } + + importer.instance = new importer.importer(importer); // eslint-disable-line new-cap + const count = importer.instance.prepareFileCount(); + + return API.v1.success({ + count, + }); + }, + }, +); + +API.v1.addRoute( + 'downloadPendingAvatars', + { + authRequired: true, + validateParams: isDownloadPendingAvatarsParamsPOST, + permissionsRequired: ['run-import'], + }, + { + post() { + const importer = Importers.get('pending-avatars'); + if (!importer) { + throw new Meteor.Error('error-importer-not-defined', 'The Pending File Importer was not found.', 'downloadPendingAvatars'); + } + + importer.instance = new importer.importer(importer); // eslint-disable-line new-cap + const count = importer.instance.prepareFileCount(); + + return API.v1.success({ + count, + }); + }, + }, +); + +API.v1.addRoute( + 'getCurrentImportOperation', + { + authRequired: true, + validateParams: isGetCurrentImportOperationParamsGET, + permissionsRequired: ['run-import'], + }, + { + get() { + const operation = Imports.findLastImport(); + return API.v1.success({ + operation, + }); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/instances.ts b/apps/meteor/app/api/server/v1/instances.ts new file mode 100644 index 000000000000..204f1ceb9440 --- /dev/null +++ b/apps/meteor/app/api/server/v1/instances.ts @@ -0,0 +1,34 @@ +import type { IInstanceStatus } from '@rocket.chat/core-typings'; +import { InstanceStatus } from '@rocket.chat/models'; + +import { getInstanceConnection } from '../../../../server/stream/streamBroadcast'; +import { hasPermission } from '../../../authorization/server'; +import { API } from '../api'; + +API.v1.addRoute( + 'instances.get', + { authRequired: true }, + { + async get() { + if (!hasPermission(this.userId, 'view-statistics')) { + return API.v1.unauthorized(); + } + + const instances = await InstanceStatus.find().toArray(); + + return API.v1.success({ + instances: instances.map((instance: IInstanceStatus) => { + const connection = getInstanceConnection(instance); + + if (connection) { + delete connection.instanceRecord; + } + return { + ...instance, + connection, + }; + }), + }); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/integrations.ts b/apps/meteor/app/api/server/v1/integrations.ts new file mode 100644 index 000000000000..0aae30959bc1 --- /dev/null +++ b/apps/meteor/app/api/server/v1/integrations.ts @@ -0,0 +1,258 @@ +import { Meteor } from 'meteor/meteor'; +import { Match, check } from 'meteor/check'; +import type { IIntegration } from '@rocket.chat/core-typings'; +import { + isIntegrationsCreateProps, + isIntegrationsHistoryProps, + isIntegrationsRemoveProps, + isIntegrationsGetProps, + isIntegrationsUpdateProps, +} from '@rocket.chat/rest-typings'; +import { Integrations, IntegrationHistory } from '@rocket.chat/models'; +import type { Filter } from 'mongodb'; + +import { hasAtLeastOnePermission } from '../../../authorization/server'; +import { API } from '../api'; +import { + mountIntegrationHistoryQueryBasedOnPermissions, + mountIntegrationQueryBasedOnPermissions, +} from '../../../integrations/server/lib/mountQueriesBasedOnPermission'; +import { findOneIntegration } from '../lib/integrations'; + +API.v1.addRoute( + 'integrations.create', + { authRequired: true, validateParams: isIntegrationsCreateProps }, + { + async post() { + switch (this.bodyParams.type) { + case 'webhook-outgoing': + return API.v1.success({ integration: await Meteor.call('addOutgoingIntegration', this.bodyParams) }); + case 'webhook-incoming': + return API.v1.success({ integration: await Meteor.call('addIncomingIntegration', this.bodyParams) }); + } + + return API.v1.failure('Invalid integration type.'); + }, + }, +); + +API.v1.addRoute( + 'integrations.history', + { authRequired: true, validateParams: isIntegrationsHistoryProps }, + { + async get() { + const { userId, queryParams } = this; + + if (!hasAtLeastOnePermission(userId, ['manage-outgoing-integrations', 'manage-own-outgoing-integrations'])) { + return API.v1.unauthorized(); + } + + if (!queryParams.id || queryParams.id.trim() === '') { + return API.v1.failure('Invalid integration id.'); + } + + const { id } = queryParams; + const { offset, count } = this.getPaginationItems(); + const { sort, fields: projection, query } = this.parseJsonQuery(); + const ourQuery = Object.assign(mountIntegrationHistoryQueryBasedOnPermissions(userId, id), query); + + const { cursor, totalCount } = IntegrationHistory.findPaginated(ourQuery, { + sort: sort || { _updatedAt: -1 }, + skip: offset, + limit: count, + projection, + }); + + const [history, total] = await Promise.all([cursor.toArray(), totalCount]); + + return API.v1.success({ + history, + offset, + items: history.length, + count: history.length, + total, + }); + }, + }, +); + +API.v1.addRoute( + 'integrations.list', + { authRequired: true }, + { + async get() { + if ( + !hasAtLeastOnePermission(this.userId, [ + 'manage-outgoing-integrations', + 'manage-own-outgoing-integrations', + 'manage-incoming-integrations', + 'manage-own-incoming-integrations', + ]) + ) { + return API.v1.unauthorized(); + } + + const { offset, count } = this.getPaginationItems(); + const { sort, fields: projection, query } = this.parseJsonQuery(); + + const ourQuery = Object.assign(mountIntegrationQueryBasedOnPermissions(this.userId), query) as Filter; + + const { cursor, totalCount } = Integrations.findPaginated(ourQuery, { + sort: sort || { ts: -1 }, + skip: offset, + limit: count, + projection, + }); + + const [integrations, total] = await Promise.all([cursor.toArray(), totalCount]); + + return API.v1.success({ + integrations, + offset, + items: integrations.length, + count: integrations.length, + total, + }); + }, + }, +); + +API.v1.addRoute( + 'integrations.remove', + { authRequired: true, validateParams: isIntegrationsRemoveProps }, + { + post() { + if ( + !hasAtLeastOnePermission(this.userId, [ + 'manage-outgoing-integrations', + 'manage-own-outgoing-integrations', + 'manage-incoming-integrations', + 'manage-own-incoming-integrations', + ]) + ) { + return API.v1.unauthorized(); + } + + const { bodyParams } = this; + + let integration: IIntegration | null = null; + switch (bodyParams.type) { + case 'webhook-outgoing': + if (!bodyParams.target_url && !bodyParams.integrationId) { + return API.v1.failure('An integrationId or target_url needs to be provided.'); + } + + if (bodyParams.target_url) { + integration = Promise.await(Integrations.findOne({ urls: bodyParams.target_url })); + } else if (bodyParams.integrationId) { + integration = Promise.await(Integrations.findOne({ _id: bodyParams.integrationId })); + } + + if (!integration) { + return API.v1.failure('No integration found.'); + } + + const outgoingId = integration._id; + + Meteor.runAsUser(this.userId, () => { + Meteor.call('deleteOutgoingIntegration', outgoingId); + }); + + return API.v1.success({ + integration, + }); + case 'webhook-incoming': + check( + bodyParams, + Match.ObjectIncluding({ + integrationId: String, + }), + ); + + integration = Promise.await(Integrations.findOne({ _id: bodyParams.integrationId })); + + if (!integration) { + return API.v1.failure('No integration found.'); + } + + const incomingId = integration._id; + Meteor.runAsUser(this.userId, () => { + Meteor.call('deleteIncomingIntegration', incomingId); + }); + + return API.v1.success({ + integration, + }); + default: + return API.v1.failure('Invalid integration type.'); + } + }, + }, +); + +API.v1.addRoute( + 'integrations.get', + { authRequired: true, validateParams: isIntegrationsGetProps }, + { + get() { + const { integrationId, createdBy } = this.queryParams; + if (!integrationId) { + return API.v1.failure('The query parameter "integrationId" is required.'); + } + + return API.v1.success({ + integration: Promise.await( + findOneIntegration({ + userId: this.userId, + integrationId, + createdBy, + }), + ), + }); + }, + }, +); + +API.v1.addRoute( + 'integrations.update', + { authRequired: true, validateParams: isIntegrationsUpdateProps }, + { + put() { + const { bodyParams } = this; + + let integration; + switch (bodyParams.type) { + case 'webhook-outgoing': + if (bodyParams.target_url) { + integration = Promise.await(Integrations.findOne({ urls: bodyParams.target_url })); + } else if (bodyParams.integrationId) { + integration = Promise.await(Integrations.findOne({ _id: bodyParams.integrationId })); + } + + if (!integration) { + return API.v1.failure('No integration found.'); + } + + Meteor.call('updateOutgoingIntegration', integration._id, bodyParams); + + return API.v1.success({ + integration: Promise.await(Integrations.findOne({ _id: integration._id })), + }); + case 'webhook-incoming': + integration = Promise.await(Integrations.findOne({ _id: bodyParams.integrationId })); + + if (!integration) { + return API.v1.failure('No integration found.'); + } + + Meteor.call('updateIncomingIntegration', integration._id, bodyParams); + + return API.v1.success({ + integration: Promise.await(Integrations.findOne({ _id: integration._id })), + }); + default: + return API.v1.failure('Invalid integration type.'); + } + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/invites.ts b/apps/meteor/app/api/server/v1/invites.ts new file mode 100644 index 000000000000..bf4f64be32b7 --- /dev/null +++ b/apps/meteor/app/api/server/v1/invites.ts @@ -0,0 +1,84 @@ +/* eslint-disable react-hooks/rules-of-hooks */ +import type { IInvite } from '@rocket.chat/core-typings'; +import { isFindOrCreateInviteParams, isUseInviteTokenProps, isValidateInviteTokenProps } from '@rocket.chat/rest-typings'; + +import { API } from '../api'; +import { findOrCreateInvite } from '../../../invites/server/functions/findOrCreateInvite'; +import { removeInvite } from '../../../invites/server/functions/removeInvite'; +import { listInvites } from '../../../invites/server/functions/listInvites'; +import { useInviteToken } from '../../../invites/server/functions/useInviteToken'; +import { validateInviteToken } from '../../../invites/server/functions/validateInviteToken'; + +API.v1.addRoute( + 'listInvites', + { + authRequired: true, + }, + { + async get() { + const result = await listInvites(this.userId); + return API.v1.success(result); + }, + }, +); + +API.v1.addRoute( + 'findOrCreateInvite', + { + authRequired: true, + validateParams: isFindOrCreateInviteParams, + }, + { + async post() { + const { rid, days, maxUses } = this.bodyParams; + + return API.v1.success((await findOrCreateInvite(this.userId, { rid, days, maxUses })) as IInvite); + }, + }, +); + +API.v1.addRoute( + 'removeInvite/:_id', + { authRequired: true }, + { + async delete() { + const { _id } = this.urlParams; + + return API.v1.success(await removeInvite(this.userId, { _id })); + }, + }, +); + +API.v1.addRoute( + 'useInviteToken', + { + authRequired: true, + validateParams: isUseInviteTokenProps, + }, + { + async post() { + const { token } = this.bodyParams; + // eslint-disable-next-line react-hooks/rules-of-hooks + + return API.v1.success(await useInviteToken(this.userId, token)); + }, + }, +); + +API.v1.addRoute( + 'validateInviteToken', + { + authRequired: false, + validateParams: isValidateInviteTokenProps, + }, + { + async post() { + const { token } = this.bodyParams; + try { + return API.v1.success({ valid: Boolean(await validateInviteToken(token)) }); + } catch (_) { + return API.v1.success({ valid: false }); + } + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/ldap.ts b/apps/meteor/app/api/server/v1/ldap.ts new file mode 100644 index 000000000000..aa4db389d848 --- /dev/null +++ b/apps/meteor/app/api/server/v1/ldap.ts @@ -0,0 +1,71 @@ +import { Match, check } from 'meteor/check'; + +import { hasPermission } from '../../../authorization/server'; +import { settings } from '../../../settings/server'; +import { API } from '../api'; +import { SystemLogger } from '../../../../server/lib/logger/system'; +import { LDAP } from '../../../../server/sdk'; + +API.v1.addRoute( + 'ldap.testConnection', + { authRequired: true }, + { + async post() { + if (!this.userId) { + throw new Error('error-invalid-user'); + } + + if (!hasPermission(this.userId, 'test-admin-options')) { + throw new Error('error-not-authorized'); + } + + if (settings.get('LDAP_Enable') !== true) { + throw new Error('LDAP_disabled'); + } + + try { + await LDAP.testConnection(); + } catch (error) { + SystemLogger.error(error); + throw new Error('Connection_failed'); + } + + return API.v1.success({ + message: 'Connection_success' as const, + }); + }, + }, +); + +API.v1.addRoute( + 'ldap.testSearch', + { authRequired: true }, + { + async post() { + check( + this.bodyParams, + Match.ObjectIncluding({ + username: String, + }), + ); + + if (!this.userId) { + throw new Error('error-invalid-user'); + } + + if (!hasPermission(this.userId, 'test-admin-options')) { + throw new Error('error-not-authorized'); + } + + if (settings.get('LDAP_Enable') !== true) { + throw new Error('LDAP_disabled'); + } + + await LDAP.testSearch(this.bodyParams.username); + + return API.v1.success({ + message: 'LDAP_User_Found' as const, + }); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/misc.ts b/apps/meteor/app/api/server/v1/misc.ts new file mode 100644 index 000000000000..5c7cf193f3a8 --- /dev/null +++ b/apps/meteor/app/api/server/v1/misc.ts @@ -0,0 +1,626 @@ +import crypto from 'crypto'; + +import { Meteor } from 'meteor/meteor'; +import { check } from 'meteor/check'; +import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; +import { EJSON } from 'meteor/ejson'; +import { DDPRateLimiter } from 'meteor/ddp-rate-limiter'; +import { escapeHTML } from '@rocket.chat/string-helpers'; +import { + isShieldSvgProps, + isSpotlightProps, + isDirectoryProps, + isMethodCallProps, + isMethodCallAnonProps, + isMeteorCall, + validateParamsPwGetPolicyRest, +} from '@rocket.chat/rest-typings'; +import type { IUser } from '@rocket.chat/core-typings'; +import { Users as UsersRaw } from '@rocket.chat/models'; + +import { hasPermission } from '../../../authorization/server'; +import { Users } from '../../../models/server'; +import { settings } from '../../../settings/server'; +import { API } from '../api'; +import { getDefaultUserFields } from '../../../utils/server/functions/getDefaultUserFields'; +import { getURL } from '../../../utils/lib/getURL'; +import { getLogs } from '../../../../server/stream/stdout'; +import { SystemLogger } from '../../../../server/lib/logger/system'; +import { passwordPolicy } from '../../../lib/server'; + +/** + * @openapi + * /api/v1/me: + * get: + * description: Gets user data of the authenticated user + * security: + * - authenticated: [] + * responses: + * 200: + * description: The user data of the authenticated user + * content: + * application/json: + * schema: + * allOf: + * - $ref: '#/components/schemas/ApiSuccessV1' + * - type: object + * properties: + * name: + * type: string + * username: + * type: string + * nickname: + * type: string + * emails: + * type: array + * items: + * type: object + * properties: + * address: + * type: string + * verified: + * type: boolean + * email: + * type: string + * status: + * $ref: '#/components/schemas/UserStatus' + * statusDefault: + * $ref: '#/components/schemas/UserStatus' + * statusText: + * $ref: '#/components/schemas/UserStatus' + * statusConnection: + * $ref: '#/components/schemas/UserStatus' + * bio: + * type: string + * avatarOrigin: + * type: string + * enum: [none, local, upload, url] + * utcOffset: + * type: number + * language: + * type: string + * settings: + * type: object + * properties: + * preferences: + * type: object + * enableAutoAway: + * type: boolean + * idleTimeLimit: + * type: number + * roles: + * type: array + * active: + * type: boolean + * defaultRoom: + * type: string + * customFields: + * type: array + * requirePasswordChange: + * type: boolean + * requirePasswordChangeReason: + * type: string + * services: + * type: object + * properties: + * github: + * type: object + * gitlab: + * type: object + * password: + * type: object + * properties: + * exists: + * type: boolean + * totp: + * type: object + * properties: + * enabled: + * type: boolean + * email2fa: + * type: object + * properties: + * enabled: + * type: boolean + * statusLivechat: + * type: string + * enum: [available, 'not-available'] + * banners: + * type: array + * items: + * type: object + * properties: + * id: + * type: string + * title: + * type: string + * text: + * type: string + * textArguments: + * type: array + * items: {} + * modifiers: + * type: array + * items: + * type: string + * infoUrl: + * type: string + * oauth: + * type: object + * properties: + * authorizedClients: + * type: array + * items: + * type: string + * _updatedAt: + * type: string + * format: date-time + * avatarETag: + * type: string + * default: + * description: Unexpected error + * content: + * application/json: + * schema: + * $ref: '#/components/schemas/ApiFailureV1' + */ +API.v1.addRoute( + 'me', + { authRequired: true }, + { + async get() { + const fields = getDefaultUserFields(); + const { services, ...user } = Users.findOneById(this.userId, { fields }) as IUser; + + return API.v1.success( + this.getUserInfo({ + ...user, + ...(services && { + services: { + ...services, + password: { + // The password hash shouldn't be leaked but the client may need to know if it exists. + exists: Boolean(services?.password?.bcrypt), + } as any, + }, + }), + }), + ); + }, + }, +); + +let onlineCache = 0; +let onlineCacheDate = 0; +const cacheInvalid = 60000; // 1 minute + +API.v1.addRoute( + 'shield.svg', + { + authRequired: false, + rateLimiterOptions: { + numRequestsAllowed: 60, + intervalTimeInMS: 60000, + }, + validateParams: isShieldSvgProps, + }, + { + get() { + const { type, icon } = this.queryParams; + let { channel, name } = this.queryParams; + if (!settings.get('API_Enable_Shields')) { + throw new Meteor.Error('error-endpoint-disabled', 'This endpoint is disabled', { + route: '/api/v1/shield.svg', + }); + } + + const types = settings.get('API_Shield_Types'); + if ( + type && + types !== '*' && + !types + .split(',') + .map((t: string) => t.trim()) + .includes(type) + ) { + throw new Meteor.Error('error-shield-disabled', 'This shield type is disabled', { + route: '/api/v1/shield.svg', + }); + } + const hideIcon = icon === 'false'; + if (hideIcon && (!name || !name.trim())) { + return API.v1.failure('Name cannot be empty when icon is hidden'); + } + + let text; + let backgroundColor = '#4c1'; + switch (type) { + case 'online': + if (Date.now() - onlineCacheDate > cacheInvalid) { + onlineCache = Users.findUsersNotOffline().count(); + onlineCacheDate = Date.now(); + } + + text = `${onlineCache} ${TAPi18n.__('Online')}`; + break; + case 'channel': + if (!channel) { + return API.v1.failure('Shield channel is required for type "channel"'); + } + + text = `#${channel}`; + break; + case 'user': + if (settings.get('API_Shield_user_require_auth') && !this.getLoggedInUser()) { + return API.v1.failure('You must be logged in to do this.'); + } + const user = this.getUserFromParams(); + + // Respect the server's choice for using their real names or not + if (user.name && settings.get('UI_Use_Real_Name')) { + text = `${user.name}`; + } else { + text = `@${user.username}`; + } + + switch (user.status) { + case 'online': + backgroundColor = '#1fb31f'; + break; + case 'away': + backgroundColor = '#dc9b01'; + break; + case 'busy': + backgroundColor = '#bc2031'; + break; + case 'offline': + backgroundColor = '#a5a1a1'; + } + break; + default: + text = TAPi18n.__('Join_Chat').toUpperCase(); + } + + const iconSize = hideIcon ? 7 : 24; + const leftSize = name ? name.length * 6 + 7 + iconSize : iconSize; + const rightSize = text.length * 6 + 20; + const width = leftSize + rightSize; + const height = 20; + + channel = escapeHTML(channel); + text = escapeHTML(text); + name = escapeHTML(name); + + return { + headers: { 'Content-Type': 'image/svg+xml;charset=utf-8' }, + body: ` + + + + + + + + + + + + + + ${hideIcon ? '' : ``} + + ${ + name + ? `${name} + ${name}` + : '' + } + ${text} + ${text} + + + ` + .trim() + .replace(/\>[\s]+\<'), + } as any; + }, + }, +); + +API.v1.addRoute( + 'spotlight', + { + authRequired: true, + validateParams: isSpotlightProps, + }, + { + get() { + const { query } = this.queryParams; + + const result = Meteor.call('spotlight', query); + + return API.v1.success(result); + }, + }, +); + +API.v1.addRoute( + 'directory', + { + authRequired: true, + validateParams: isDirectoryProps, + }, + { + get() { + const { offset, count } = this.getPaginationItems(); + const { sort, query } = this.parseJsonQuery(); + + const { text, type, workspace = 'local' } = query; + + if (sort && Object.keys(sort).length > 1) { + return API.v1.failure('This method support only one "sort" parameter'); + } + const sortBy = sort ? Object.keys(sort)[0] : undefined; + const sortDirection = sort && Object.values(sort)[0] === 1 ? 'asc' : 'desc'; + + const result = Meteor.call('browseChannels', { + text, + type, + workspace, + sortBy, + sortDirection, + offset: Math.max(0, offset), + limit: Math.max(0, count), + }); + + if (!result) { + return API.v1.failure('Please verify the parameters'); + } + return API.v1.success({ + result: result.results, + count: result.results.length, + offset, + total: result.total, + }); + }, + }, +); + +API.v1.addRoute( + 'pw.getPolicy', + { + authRequired: true, + }, + { + get() { + return API.v1.success(passwordPolicy.getPasswordPolicy()); + }, + }, +); + +API.v1.addRoute( + 'pw.getPolicyReset', + { + authRequired: false, + validateParams: validateParamsPwGetPolicyRest, + }, + { + async get() { + check( + this.queryParams, + Match.ObjectIncluding({ + token: String, + }), + ); + const { token } = this.queryParams; + + const user = await UsersRaw.findOneByResetToken(token, { projection: { _id: 1 } }); + if (!user) { + return API.v1.unauthorized(); + } + + return API.v1.success(passwordPolicy.getPasswordPolicy()); + }, + }, +); + +/** + * @openapi + * /api/v1/stdout.queue: + * get: + * description: Retrieves last 1000 lines of server logs + * security: + * - authenticated: ['view-logs'] + * responses: + * 200: + * description: The user data of the authenticated user + * content: + * application/json: + * schema: + * allOf: + * - $ref: '#/components/schemas/ApiSuccessV1' + * - type: object + * properties: + * queue: + * type: array + * items: + * type: object + * properties: + * id: + * type: string + * string: + * type: string + * ts: + * type: string + * format: date-time + * default: + * description: Unexpected error + * content: + * application/json: + * schema: + * $ref: '#/components/schemas/ApiFailureV1' + */ +API.v1.addRoute( + 'stdout.queue', + { authRequired: true }, + { + get() { + if (!hasPermission(this.userId, 'view-logs')) { + return API.v1.unauthorized(); + } + return API.v1.success({ queue: getLogs() }); + }, + }, +); + +declare module '@rocket.chat/rest-typings' { + // eslint-disable-next-line @typescript-eslint/naming-convention + interface Endpoints { + 'method.call/:method': { + POST: (params: { method: string; args: any[] }) => any; + }; + 'method.callAnon/:method': { + POST: (params: { method: string; args: any[] }) => any; + }; + } +} + +const mountResult = ({ + id, + error, + result, +}: { + id: string; + error?: unknown; + result?: unknown; +}): { + message: string; +} => ({ + message: EJSON.stringify({ + msg: 'result', + id, + error: error as any, + result: result as any, + }), +}); + +// had to create two different endpoints for authenticated and non-authenticated calls +// because restivus does not provide 'this.userId' if 'authRequired: false' +API.v1.addRoute( + 'method.call/:method', + { + authRequired: true, + rateLimiterOptions: false, + validateParams: isMeteorCall, + }, + { + post() { + check(this.bodyParams, { + message: String, + }); + + const data = EJSON.parse(this.bodyParams.message); + + if (!isMethodCallProps(data)) { + return API.v1.failure('Invalid method call'); + } + + const { method, params, id } = data; + + const connectionId = + this.token || + crypto + .createHash('md5') + .update(this.requestIp + this.request.headers['user-agent']) + .digest('hex'); + + const rateLimiterInput = { + userId: this.userId, + clientAddress: this.requestIp, + type: 'method', + name: method, + connectionId, + }; + + try { + DDPRateLimiter._increment(rateLimiterInput); + const rateLimitResult = DDPRateLimiter._check(rateLimiterInput); + if (!rateLimitResult.allowed) { + throw new Meteor.Error('too-many-requests', DDPRateLimiter.getErrorMessage(rateLimitResult), { + timeToReset: rateLimitResult.timeToReset, + }); + } + + const result = Meteor.call(method, ...params); + return API.v1.success(mountResult({ id, result })); + } catch (error) { + if (error instanceof Error) SystemLogger.error(`Exception while invoking method ${method}`, error.message); + else SystemLogger.error(`Exception while invoking method ${method}`, error); + + if (settings.get('Log_Level') === '2') { + Meteor._debug(`Exception while invoking method ${method}`, error); + } + return API.v1.success(mountResult({ id, error })); + } + }, + }, +); +API.v1.addRoute( + 'method.callAnon/:method', + { + authRequired: false, + rateLimiterOptions: false, + validateParams: isMeteorCall, + }, + { + post() { + check(this.bodyParams, { + message: String, + }); + + const data = EJSON.parse(this.bodyParams.message); + + if (!isMethodCallAnonProps(data)) { + return API.v1.failure('Invalid method call'); + } + + const { method, params, id } = data; + + const connectionId = + this.token || + crypto + .createHash('md5') + .update(this.requestIp + this.request.headers['user-agent']) + .digest('hex'); + + const rateLimiterInput = { + userId: this.userId || undefined, + clientAddress: this.requestIp, + type: 'method', + name: method, + connectionId, + }; + + try { + DDPRateLimiter._increment(rateLimiterInput); + const rateLimitResult = DDPRateLimiter._check(rateLimiterInput); + if (!rateLimitResult.allowed) { + throw new Meteor.Error('too-many-requests', DDPRateLimiter.getErrorMessage(rateLimitResult), { + timeToReset: rateLimitResult.timeToReset, + }); + } + + const result = Meteor.call(method, ...params); + return API.v1.success(mountResult({ id, result })); + } catch (error) { + if (error instanceof Error) SystemLogger.error(`Exception while invoking method ${method}`, error.message); + else SystemLogger.error(`Exception while invoking method ${method}`, error); + + if (settings.get('Log_Level') === '2') { + Meteor._debug(`Exception while invoking method ${method}`, error); + } + return API.v1.success(mountResult({ id, error })); + } + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/oauthapps.ts b/apps/meteor/app/api/server/v1/oauthapps.ts new file mode 100644 index 000000000000..a9d48884595d --- /dev/null +++ b/apps/meteor/app/api/server/v1/oauthapps.ts @@ -0,0 +1,43 @@ +import { isOauthAppsGetParams } from '@rocket.chat/rest-typings'; +import { OAuthApps } from '@rocket.chat/models'; + +import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission'; +import { API } from '../api'; + +API.v1.addRoute( + 'oauth-apps.list', + { authRequired: true }, + { + async get() { + if (!(await hasPermissionAsync(this.userId, 'manage-oauth-apps'))) { + throw new Error('error-not-allowed'); + } + + return API.v1.success({ + oauthApps: await OAuthApps.find().toArray(), + }); + }, + }, +); + +API.v1.addRoute( + 'oauth-apps.get', + { authRequired: true }, + { + async get() { + if (!isOauthAppsGetParams(this.queryParams)) { + return API.v1.failure('At least one of the query parameters "clientId" or "appId" is required.'); + } + + const oauthApp = await OAuthApps.findOneAuthAppByIdOrClientId(this.queryParams); + + if (!oauthApp) { + return API.v1.failure('OAuth app not found.'); + } + + return API.v1.success({ + oauthApp, + }); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/permissions.ts b/apps/meteor/app/api/server/v1/permissions.ts new file mode 100644 index 000000000000..d03fab78e7fb --- /dev/null +++ b/apps/meteor/app/api/server/v1/permissions.ts @@ -0,0 +1,82 @@ +import { Meteor } from 'meteor/meteor'; +import type { IPermission } from '@rocket.chat/core-typings'; +import { isBodyParamsValidPermissionUpdate } from '@rocket.chat/rest-typings'; +import { Permissions, Roles } from '@rocket.chat/models'; + +import { hasPermission } from '../../../authorization/server'; +import { API } from '../api'; + +API.v1.addRoute( + 'permissions.listAll', + { authRequired: true }, + { + async get() { + const { updatedSince } = this.queryParams; + + let updatedSinceDate: Date | undefined; + if (updatedSince) { + if (isNaN(Date.parse(updatedSince))) { + throw new Meteor.Error('error-roomId-param-invalid', 'The "updatedSince" query parameter must be a valid date.'); + } + updatedSinceDate = new Date(updatedSince); + } + + const result = (await Meteor.call('permissions/get', updatedSinceDate)) as { + update: IPermission[]; + remove: IPermission[]; + }; + + if (Array.isArray(result)) { + return API.v1.success({ + update: result, + remove: [], + }); + } + + return API.v1.success(result); + }, + }, +); + +API.v1.addRoute( + 'permissions.update', + { authRequired: true }, + { + async post() { + if (!hasPermission(this.userId, 'access-permissions')) { + return API.v1.failure('Editing permissions is not allowed', 'error-edit-permissions-not-allowed'); + } + + const { bodyParams } = this; + + if (!isBodyParamsValidPermissionUpdate(bodyParams)) { + return API.v1.failure('Invalid body params', 'error-invalid-body-params'); + } + + const permissionKeys = bodyParams.permissions.map(({ _id }) => _id); + const permissions = await Permissions.find({ _id: { $in: permissionKeys } }).toArray(); + + if (permissions.length !== bodyParams.permissions.length) { + return API.v1.failure('Invalid permission', 'error-invalid-permission'); + } + + const roleKeys = [...new Set(bodyParams.permissions.flatMap((p) => p.roles))]; + + const roles = await Roles.find({ _id: { $in: roleKeys } }).toArray(); + + if (roles.length !== roleKeys.length) { + return API.v1.failure('Invalid role', 'error-invalid-role'); + } + + for await (const permission of bodyParams.permissions) { + await Permissions.setRoles(permission._id, permission.roles); + } + + const result = (await Meteor.call('permissions/get')) as IPermission[]; + + return API.v1.success({ + permissions: result, + }); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/push.ts b/apps/meteor/app/api/server/v1/push.ts new file mode 100644 index 000000000000..9ed60260d422 --- /dev/null +++ b/apps/meteor/app/api/server/v1/push.ts @@ -0,0 +1,114 @@ +import { Meteor } from 'meteor/meteor'; +import { Random } from 'meteor/random'; +import { Match, check } from 'meteor/check'; +import { Messages } from '@rocket.chat/models'; + +import { appTokensCollection } from '../../../push/server'; +import { API } from '../api'; +import PushNotification from '../../../push-notifications/server/lib/PushNotification'; +import { canAccessRoom } from '../../../authorization/server/functions/canAccessRoom'; +import { Users, Rooms } from '../../../models/server'; + +API.v1.addRoute( + 'push.token', + { authRequired: true }, + { + post() { + const { id, type, value, appName } = this.bodyParams; + + if (id && typeof id !== 'string') { + throw new Meteor.Error('error-id-param-not-valid', 'The required "id" body param is invalid.'); + } + + const deviceId = id || Random.id(); + + if (!type || (type !== 'apn' && type !== 'gcm')) { + throw new Meteor.Error('error-type-param-not-valid', 'The required "type" body param is missing or invalid.'); + } + + if (!value || typeof value !== 'string') { + throw new Meteor.Error('error-token-param-not-valid', 'The required "value" body param is missing or invalid.'); + } + + if (!appName || typeof appName !== 'string') { + throw new Meteor.Error('error-appName-param-not-valid', 'The required "appName" body param is missing or invalid.'); + } + + const result = Meteor.runAsUser(this.userId, () => + Meteor.call('raix:push-update', { + id: deviceId, + token: { [type]: value }, + authToken: this.request.headers['x-auth-token'], + appName, + userId: this.userId, + }), + ); + + return API.v1.success({ result }); + }, + delete() { + const { token } = this.bodyParams; + + if (!token || typeof token !== 'string') { + throw new Meteor.Error('error-token-param-not-valid', 'The required "token" body param is missing or invalid.'); + } + + const affectedRecords = appTokensCollection.remove({ + $or: [ + { + 'token.apn': token, + }, + { + 'token.gcm': token, + }, + ], + userId: this.userId, + }); + + if (affectedRecords === 0) { + return API.v1.notFound(); + } + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'push.get', + { authRequired: true }, + { + async get() { + const params = this.requestParams(); + check( + params, + Match.ObjectIncluding({ + id: String, + }), + ); + + const receiver = Users.findOneById(this.userId); + if (!receiver) { + throw new Error('error-user-not-found'); + } + + const message = await Messages.findOneById(params.id); + if (!message) { + throw new Error('error-message-not-found'); + } + + const room = Rooms.findOneById(message.rid); + if (!room) { + throw new Error('error-room-not-found'); + } + + if (!canAccessRoom(room, receiver)) { + throw new Error('error-not-allowed'); + } + + const data = await PushNotification.getNotificationForMessageId({ receiver, room, message }); + + return API.v1.success({ data }); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/roles.ts b/apps/meteor/app/api/server/v1/roles.ts new file mode 100644 index 000000000000..252421d1a9b6 --- /dev/null +++ b/apps/meteor/app/api/server/v1/roles.ts @@ -0,0 +1,332 @@ +import { Meteor } from 'meteor/meteor'; +import { check, Match } from 'meteor/check'; +import { + isRoleAddUserToRoleProps, + isRoleCreateProps, + isRoleDeleteProps, + isRoleRemoveUserFromRoleProps, + isRoleUpdateProps, +} from '@rocket.chat/rest-typings'; +import type { IRole } from '@rocket.chat/core-typings'; +import { Roles } from '@rocket.chat/models'; + +import { Users } from '../../../models/server'; +import { API } from '../api'; +import { hasRole } from '../../../authorization/server'; +import { getUsersInRolePaginated } from '../../../authorization/server/functions/getUsersInRole'; +import { settings } from '../../../settings/server/index'; +import { api } from '../../../../server/sdk/api'; +import { apiDeprecationLogger } from '../../../lib/server/lib/deprecationWarningLogger'; +import { hasAnyRoleAsync } from '../../../authorization/server/functions/hasRole'; +import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission'; +import { updateRole } from '../../../../server/lib/roles/updateRole'; +import { insertRole } from '../../../../server/lib/roles/insertRole'; + +API.v1.addRoute( + 'roles.list', + { authRequired: true }, + { + async get() { + const roles = await Roles.find({}, { projection: { _updatedAt: 0 } }).toArray(); + + return API.v1.success({ roles }); + }, + }, +); + +API.v1.addRoute( + 'roles.sync', + { authRequired: true }, + { + async get() { + check( + this.queryParams, + Match.ObjectIncluding({ + updatedSince: Match.Where((value: unknown): value is string => typeof value === 'string' && !Number.isNaN(Date.parse(value))), + }), + ); + + const { updatedSince } = this.queryParams; + + return API.v1.success({ + roles: { + update: await Roles.findByUpdatedDate(new Date(updatedSince)).toArray(), + remove: await Roles.trashFindDeletedAfter(new Date(updatedSince)).toArray(), + }, + }); + }, + }, +); + +API.v1.addRoute( + 'roles.create', + { authRequired: true }, + { + async post() { + if (!isRoleCreateProps(this.bodyParams)) { + throw new Meteor.Error('error-invalid-role-properties', 'The role properties are invalid.'); + } + + const userId = Meteor.userId(); + + if (!userId || !(await hasPermissionAsync(userId, 'access-permissions'))) { + throw new Meteor.Error('error-action-not-allowed', 'Accessing permissions is not allowed'); + } + + const { name, scope, description, mandatory2fa } = this.bodyParams; + + if (await Roles.findOneByIdOrName(name)) { + throw new Meteor.Error('error-duplicate-role-names-not-allowed', 'Role name already exists'); + } + + const roleData = { + description: description || '', + ...(mandatory2fa !== undefined && { mandatory2fa }), + name, + scope: scope || 'Users', + protected: false, + }; + + const options = { + broadcastUpdate: settings.get('UI_DisplayRoles'), + }; + + const role = insertRole(roleData, options); + + return API.v1.success({ + role, + }); + }, + }, +); + +API.v1.addRoute( + 'roles.addUserToRole', + { authRequired: true }, + { + async post() { + if (!isRoleAddUserToRoleProps(this.bodyParams)) { + throw new Meteor.Error('error-invalid-role-properties', isRoleAddUserToRoleProps.errors?.map((error) => error.message).join('\n')); + } + + const user = this.getUserFromParams(); + const { roleId, roleName, roomId } = this.bodyParams; + + if (!roleId) { + if (!roleName) { + return API.v1.failure('error-invalid-role-properties'); + } + + apiDeprecationLogger.warn(`Assigning roles by name is deprecated and will be removed on the next major release of Rocket.Chat`); + } + + const role = roleId ? await Roles.findOneById(roleId) : await Roles.findOneByIdOrName(roleName as string); + if (!role) { + return API.v1.failure('error-role-not-found', 'Role not found'); + } + + if (hasRole(user._id, role._id, roomId)) { + throw new Meteor.Error('error-user-already-in-role', 'User already in role'); + } + + await Meteor.call('authorization:addUserToRole', role._id, user.username, roomId); + + return API.v1.success({ + role, + }); + }, + }, +); + +API.v1.addRoute( + 'roles.getUsersInRole', + { authRequired: true }, + { + async get() { + const { roomId, role } = this.queryParams; + const { offset, count = 50 } = this.getPaginationItems(); + + const projection = { + name: 1, + username: 1, + emails: 1, + avatarETag: 1, + createdAt: 1, + _updatedAt: 1, + }; + + if (!role) { + throw new Meteor.Error('error-param-not-provided', 'Query param "role" is required'); + } + if (!(await hasPermissionAsync(this.userId, 'access-permissions'))) { + throw new Meteor.Error('error-not-allowed', 'Not allowed'); + } + if (roomId && !(await hasPermissionAsync(this.userId, 'view-other-user-channels'))) { + throw new Meteor.Error('error-not-allowed', 'Not allowed'); + } + + const options = { projection: { _id: 1 } }; + let roleData = await Roles.findOneById>(role, options); + if (!roleData) { + roleData = await Roles.findOneByName>(role, options); + if (!roleData) { + throw new Meteor.Error('error-invalid-roleId'); + } + + apiDeprecationLogger.warn(`Querying roles by name is deprecated and will be removed on the next major release of Rocket.Chat`); + } + + const { cursor, totalCount } = await getUsersInRolePaginated(roleData._id, roomId, { + limit: count as number, + sort: { username: 1 }, + skip: offset as number, + projection, + }); + + const [users, total] = await Promise.all([cursor.toArray(), totalCount]); + + return API.v1.success({ users, total }); + }, + }, +); + +API.v1.addRoute( + 'roles.update', + { authRequired: true }, + { + async post() { + if (!isRoleUpdateProps(this.bodyParams)) { + throw new Meteor.Error('error-invalid-role-properties', 'The role properties are invalid.'); + } + + if (!(await hasPermissionAsync(this.userId, 'access-permissions'))) { + throw new Meteor.Error('error-action-not-allowed', 'Accessing permissions is not allowed'); + } + + const { roleId, name, scope, description, mandatory2fa } = this.bodyParams; + + const roleData = { + description: description || '', + ...(mandatory2fa !== undefined && { mandatory2fa }), + name, + scope: scope || 'Users', + protected: false, + }; + + const options = { + broadcastUpdate: settings.get('UI_DisplayRoles'), + }; + + const role = updateRole(roleId, roleData, options); + + return API.v1.success({ + role, + }); + }, + }, +); + +API.v1.addRoute( + 'roles.delete', + { authRequired: true }, + { + async post() { + const { bodyParams } = this; + if (!isRoleDeleteProps(bodyParams)) { + throw new Meteor.Error('error-invalid-role-properties', 'The role properties are invalid.'); + } + + if (!(await hasPermissionAsync(this.userId, 'access-permissions'))) { + throw new Meteor.Error('error-action-not-allowed', 'Accessing permissions is not allowed'); + } + + const role = await Roles.findOneByIdOrName(bodyParams.roleId); + + if (!role) { + throw new Meteor.Error('error-invalid-roleId', 'This role does not exist'); + } + + if (role.protected) { + throw new Meteor.Error('error-role-protected', 'Cannot delete a protected role'); + } + + const existingUsers = await Roles.findUsersInRole(role._id); + + if (existingUsers && (await existingUsers.count()) > 0) { + throw new Meteor.Error('error-role-in-use', "Cannot delete role because it's in use"); + } + + await Roles.removeById(role._id); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'roles.removeUserFromRole', + { authRequired: true }, + { + async post() { + const { bodyParams } = this; + if (!isRoleRemoveUserFromRoleProps(bodyParams)) { + throw new Meteor.Error('error-invalid-role-properties', 'The role properties are invalid.'); + } + + const { roleId, roleName, username, scope } = bodyParams; + + if (!(await hasPermissionAsync(this.userId, 'access-permissions'))) { + throw new Meteor.Error('error-not-allowed', 'Accessing permissions is not allowed'); + } + + if (!roleId) { + if (!roleName) { + return API.v1.failure('error-invalid-role-properties'); + } + + apiDeprecationLogger.warn(`Unassigning roles by name is deprecated and will be removed on the next major release of Rocket.Chat`); + } + + const user = Users.findOneByUsername(username); + + if (!user) { + throw new Meteor.Error('error-invalid-user', 'There is no user with this username'); + } + + const role = roleId ? await Roles.findOneById(roleId) : await Roles.findOneByIdOrName(roleName as string); + + if (!role) { + throw new Meteor.Error('error-invalid-roleId', 'This role does not exist'); + } + + if (!(await hasAnyRoleAsync(user._id, [role._id], scope))) { + throw new Meteor.Error('error-user-not-in-role', 'User is not in this role'); + } + + if (role._id === 'admin') { + const adminCount = await (await Roles.findUsersInRole('admin')).count(); + if (adminCount === 1) { + throw new Meteor.Error('error-admin-required', 'You need to have at least one admin'); + } + } + + await Roles.removeUserRoles(user._id, [role._id], scope); + + if (settings.get('UI_DisplayRoles')) { + api.broadcast('user.roleUpdate', { + type: 'removed', + _id: role._id, + u: { + _id: user._id, + username: user.username, + }, + scope, + }); + } + + return API.v1.success({ + role, + }); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/rooms.js b/apps/meteor/app/api/server/v1/rooms.js new file mode 100644 index 000000000000..ee059908eda0 --- /dev/null +++ b/apps/meteor/app/api/server/v1/rooms.js @@ -0,0 +1,583 @@ +import { Meteor } from 'meteor/meteor'; +import { Rooms as RoomsRaw } from '@rocket.chat/models'; + +import { FileUpload } from '../../../file-upload'; +import { Rooms, Messages } from '../../../models/server'; +import { API } from '../api'; +import { + findAdminRooms, + findChannelAndPrivateAutocomplete, + findAdminRoom, + findAdminRoomsAutocomplete, + findRoomsAvailableForTeams, + findChannelAndPrivateAutocompleteWithPagination, +} from '../lib/rooms'; +import { sendFile, sendViaEmail } from '../../../../server/lib/channelExport'; +import { canAccessRoom, canAccessRoomId, hasPermission } from '../../../authorization/server'; +import { Media } from '../../../../server/sdk'; +import { settings } from '../../../settings/server/index'; +import { getUploadFormData } from '../lib/getUploadFormData'; + +function findRoomByIdOrName({ params, checkedArchived = true }) { + if ((!params.roomId || !params.roomId.trim()) && (!params.roomName || !params.roomName.trim())) { + throw new Meteor.Error('error-roomid-param-not-provided', 'The parameter "roomId" or "roomName" is required'); + } + + const fields = { ...API.v1.defaultFieldsToExclude }; + + let room; + if (params.roomId) { + room = Rooms.findOneById(params.roomId, { fields }); + } else if (params.roomName) { + room = Rooms.findOneByName(params.roomName, { fields }); + } + if (!room) { + throw new Meteor.Error('error-room-not-found', 'The required "roomId" or "roomName" param provided does not match any channel'); + } + if (checkedArchived && room.archived) { + throw new Meteor.Error('error-room-archived', `The channel, ${room.name}, is archived`); + } + + return room; +} + +API.v1.addRoute( + 'rooms.get', + { authRequired: true }, + { + get() { + const { updatedSince } = this.queryParams; + + let updatedSinceDate; + if (updatedSince) { + if (isNaN(Date.parse(updatedSince))) { + throw new Meteor.Error('error-updatedSince-param-invalid', 'The "updatedSince" query parameter must be a valid date.'); + } else { + updatedSinceDate = new Date(updatedSince); + } + } + + let result; + Meteor.runAsUser(this.userId, () => { + result = Meteor.call('rooms/get', updatedSinceDate); + }); + + if (Array.isArray(result)) { + result = { + update: result, + remove: [], + }; + } + + return API.v1.success({ + update: result.update.map((room) => this.composeRoomWithLastMessage(room, this.userId)), + remove: result.remove.map((room) => this.composeRoomWithLastMessage(room, this.userId)), + }); + }, + }, +); + +API.v1.addRoute( + 'rooms.upload/:rid', + { authRequired: true }, + { + post() { + if (!canAccessRoomId(this.urlParams.rid, this.userId)) { + return API.v1.unauthorized(); + } + + const [file, fields] = Promise.await( + getUploadFormData( + { + request: this.request, + }, + { field: 'file' }, + ), + ); + + if (!file) { + throw new Meteor.Error('invalid-field'); + } + + const details = { + name: file.filename, + size: file.fileBuffer.length, + type: file.mimetype, + rid: this.urlParams.rid, + userId: this.userId, + }; + + const stripExif = settings.get('Message_Attachments_Strip_Exif'); + const fileStore = FileUpload.getStore('Uploads'); + if (stripExif) { + // No need to check mime. Library will ignore any files without exif/xmp tags (like BMP, ico, PDF, etc) + file.fileBuffer = Promise.await(Media.stripExifFromBuffer(file.fileBuffer)); + } + const uploadedFile = fileStore.insertSync(details, file.fileBuffer); + + uploadedFile.description = fields.description; + + delete fields.description; + + Meteor.call('sendFileMessage', this.urlParams.rid, null, uploadedFile, fields); + + return API.v1.success({ + message: Messages.getMessageByFileIdAndUsername(uploadedFile._id, this.userId), + }); + }, + }, +); + +API.v1.addRoute( + 'rooms.saveNotification', + { authRequired: true }, + { + post() { + const saveNotifications = (notifications, roomId) => { + Object.keys(notifications).forEach((notificationKey) => + Meteor.runAsUser(this.userId, () => + Meteor.call('saveNotificationSettings', roomId, notificationKey, notifications[notificationKey]), + ), + ); + }; + const { roomId, notifications } = this.bodyParams; + + if (!roomId) { + return API.v1.failure("The 'roomId' param is required"); + } + + if (!notifications || Object.keys(notifications).length === 0) { + return API.v1.failure("The 'notifications' param is required"); + } + + saveNotifications(notifications, roomId); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'rooms.favorite', + { authRequired: true }, + { + post() { + const { favorite } = this.bodyParams; + + if (!this.bodyParams.hasOwnProperty('favorite')) { + return API.v1.failure("The 'favorite' param is required"); + } + + const room = findRoomByIdOrName({ params: this.bodyParams }); + + Meteor.runAsUser(this.userId, () => Meteor.call('toggleFavorite', room._id, favorite)); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'rooms.cleanHistory', + { authRequired: true }, + { + async post() { + const { _id } = findRoomByIdOrName({ params: this.bodyParams }); + + const { + latest, + oldest, + inclusive = false, + limit, + excludePinned, + filesOnly, + ignoreThreads, + ignoreDiscussion, + users, + } = this.bodyParams; + + if (!latest) { + return API.v1.failure('Body parameter "latest" is required.'); + } + + if (!oldest) { + return API.v1.failure('Body parameter "oldest" is required.'); + } + + const count = await Meteor.call('cleanRoomHistory', { + roomId: _id, + latest: new Date(latest), + oldest: new Date(oldest), + inclusive, + limit, + excludePinned: [true, 'true', 1, '1'].includes(excludePinned), + filesOnly: [true, 'true', 1, '1'].includes(filesOnly), + ignoreThreads: [true, 'true', 1, '1'].includes(ignoreThreads), + ignoreDiscussion: [true, 'true', 1, '1'].includes(ignoreDiscussion), + fromUsers: users, + }); + + return API.v1.success({ _id, count }); + }, + }, +); + +API.v1.addRoute( + 'rooms.info', + { authRequired: true }, + { + get() { + const room = findRoomByIdOrName({ params: this.requestParams() }); + const { fields } = this.parseJsonQuery(); + + if (!room || !canAccessRoom(room, { _id: this.userId })) { + return API.v1.failure('not-allowed', 'Not Allowed'); + } + + return API.v1.success({ room: Rooms.findOneByIdOrName(room._id, { fields }) }); + }, + }, +); + +API.v1.addRoute( + 'rooms.leave', + { authRequired: true }, + { + post() { + const room = findRoomByIdOrName({ params: this.bodyParams }); + Meteor.runAsUser(this.userId, () => { + Meteor.call('leaveRoom', room._id); + }); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'rooms.createDiscussion', + { authRequired: true }, + { + post() { + const { prid, pmid, reply, t_name, users, encrypted } = this.bodyParams; + if (!prid) { + return API.v1.failure('Body parameter "prid" is required.'); + } + if (!t_name) { + return API.v1.failure('Body parameter "t_name" is required.'); + } + if (users && !Array.isArray(users)) { + return API.v1.failure('Body parameter "users" must be an array.'); + } + + if (encrypted !== undefined && typeof encrypted !== 'boolean') { + return API.v1.failure('Body parameter "encrypted" must be a boolean when included.'); + } + + const discussion = Meteor.runAsUser(this.userId, () => + Meteor.call('createDiscussion', { + prid, + pmid, + t_name, + reply, + users: users || [], + encrypted, + }), + ); + + return API.v1.success({ discussion }); + }, + }, +); + +API.v1.addRoute( + 'rooms.getDiscussions', + { authRequired: true }, + { + async get() { + const room = findRoomByIdOrName({ params: this.requestParams() }); + const { offset, count } = this.getPaginationItems(); + const { sort, fields, query } = this.parseJsonQuery(); + + if (!room || !canAccessRoom(room, { _id: this.userId })) { + return API.v1.failure('not-allowed', 'Not Allowed'); + } + + const ourQuery = Object.assign(query, { prid: room._id }); + + const { cursor, totalCount } = RoomsRaw.findPaginated(ourQuery, { + sort: sort || { fname: 1 }, + skip: offset, + limit: count, + projection: fields, + }); + + const [discussions, total] = await Promise.all([cursor.toArray(), totalCount]); + + return API.v1.success({ + discussions, + count: discussions.length, + offset, + total, + }); + }, + }, +); + +API.v1.addRoute( + 'rooms.adminRooms', + { authRequired: true }, + { + get() { + const { offset, count } = this.getPaginationItems(); + const { sort } = this.parseJsonQuery(); + const { types, filter } = this.requestParams(); + + return API.v1.success( + Promise.await( + findAdminRooms({ + uid: this.userId, + filter, + types, + pagination: { + offset, + count, + sort, + }, + }), + ), + ); + }, + }, +); + +API.v1.addRoute( + 'rooms.autocomplete.adminRooms', + { authRequired: true }, + { + get() { + const { selector } = this.queryParams; + if (!selector) { + return API.v1.failure("The 'selector' param is required"); + } + + return API.v1.success( + Promise.await( + findAdminRoomsAutocomplete({ + uid: this.userId, + selector: JSON.parse(selector), + }), + ), + ); + }, + }, +); + +API.v1.addRoute( + 'rooms.adminRooms.getRoom', + { authRequired: true }, + { + get() { + const { rid } = this.requestParams(); + const room = Promise.await( + findAdminRoom({ + uid: this.userId, + rid, + }), + ); + + if (!room) { + return API.v1.failure('not-allowed', 'Not Allowed'); + } + return API.v1.success(room); + }, + }, +); + +API.v1.addRoute( + 'rooms.autocomplete.channelAndPrivate', + { authRequired: true }, + { + get() { + const { selector } = this.queryParams; + if (!selector) { + return API.v1.failure("The 'selector' param is required"); + } + + return API.v1.success( + Promise.await( + findChannelAndPrivateAutocomplete({ + uid: this.userId, + selector: JSON.parse(selector), + }), + ), + ); + }, + }, +); + +API.v1.addRoute( + 'rooms.autocomplete.channelAndPrivate.withPagination', + { authRequired: true }, + { + get() { + const { selector } = this.queryParams; + const { offset, count } = this.getPaginationItems(); + const { sort } = this.parseJsonQuery(); + + if (!selector) { + return API.v1.failure("The 'selector' param is required"); + } + + return API.v1.success( + Promise.await( + findChannelAndPrivateAutocompleteWithPagination({ + uid: this.userId, + selector: JSON.parse(selector), + pagination: { + offset, + count, + sort, + }, + }), + ), + ); + }, + }, +); + +API.v1.addRoute( + 'rooms.autocomplete.availableForTeams', + { authRequired: true }, + { + get() { + const { name } = this.queryParams; + + if (name && typeof name !== 'string') { + return API.v1.failure("The 'name' param is invalid"); + } + + return API.v1.success( + Promise.await( + findRoomsAvailableForTeams({ + uid: this.userId, + name, + }), + ), + ); + }, + }, +); + +API.v1.addRoute( + 'rooms.saveRoomSettings', + { authRequired: true }, + { + post() { + const { rid, ...params } = this.bodyParams; + + const result = Meteor.runAsUser(this.userId, () => Meteor.call('saveRoomSettings', rid, params)); + + return API.v1.success({ rid: result.rid }); + }, + }, +); + +API.v1.addRoute( + 'rooms.changeArchivationState', + { authRequired: true }, + { + post() { + const { rid, action } = this.bodyParams; + + let result; + if (action === 'archive') { + result = Meteor.runAsUser(this.userId, () => Meteor.call('archiveRoom', rid)); + } else { + result = Meteor.runAsUser(this.userId, () => Meteor.call('unarchiveRoom', rid)); + } + + return API.v1.success({ result }); + }, + }, +); + +API.v1.addRoute( + 'rooms.export', + { authRequired: true }, + { + post() { + const { rid, type } = this.bodyParams; + + if (!rid || !type || !['email', 'file'].includes(type)) { + throw new Meteor.Error('error-invalid-params'); + } + + if (!hasPermission(this.userId, 'mail-messages', rid)) { + throw new Meteor.Error('error-action-not-allowed', 'Mailing is not allowed'); + } + + const room = Rooms.findOneById(rid); + if (!room) { + throw new Meteor.Error('error-invalid-room'); + } + + const user = Meteor.users.findOne({ _id: this.userId }); + + if (!canAccessRoom(room, user)) { + throw new Meteor.Error('error-not-allowed', 'Not Allowed'); + } + + if (type === 'file') { + let { dateFrom, dateTo } = this.bodyParams; + const { format } = this.bodyParams; + + if (!['html', 'json'].includes(format)) { + throw new Meteor.Error('error-invalid-format'); + } + + dateFrom = new Date(dateFrom); + dateTo = new Date(dateTo); + dateTo.setDate(dateTo.getDate() + 1); + + sendFile( + { + rid, + format, + dateFrom, + dateTo, + }, + user, + ); + return API.v1.success(); + } + + if (type === 'email') { + const { toUsers, toEmails, subject, messages } = this.bodyParams; + + if ((!toUsers || toUsers.length === 0) && (!toEmails || toEmails.length === 0)) { + throw new Meteor.Error('error-invalid-recipient'); + } + + if (messages.length === 0) { + throw new Meteor.Error('error-invalid-messages'); + } + + const result = sendViaEmail( + { + rid, + toUsers, + toEmails, + subject, + messages, + }, + user, + ); + + return API.v1.success(result); + } + + return API.v1.error(); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/rooms.ts b/apps/meteor/app/api/server/v1/rooms.ts new file mode 100644 index 000000000000..586a139dc36c --- /dev/null +++ b/apps/meteor/app/api/server/v1/rooms.ts @@ -0,0 +1,39 @@ +import { Meteor } from 'meteor/meteor'; +import Ajv from 'ajv'; + +import { API } from '../api'; + +// TO-DO: Replace this instance by only one Ajv import +const ajv = new Ajv({ coerceTypes: true }); + +type GETRoomsNameExists = { + roomName: string; +}; + +const GETRoomsNameExistsSchema = { + type: 'object', + properties: { + roomName: { + type: 'string', + }, + }, + required: ['roomName'], + additionalProperties: false, +}; + +export const isGETRoomsNameExists = ajv.compile(GETRoomsNameExistsSchema); + +API.v1.addRoute( + 'rooms.nameExists', + { + authRequired: true, + validateParams: isGETRoomsNameExists, + }, + { + get() { + const { roomName } = this.queryParams; + + return API.v1.success({ exists: Meteor.call('roomNameExists', roomName) }); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/settings.ts b/apps/meteor/app/api/server/v1/settings.ts new file mode 100644 index 000000000000..7e88bf321dfd --- /dev/null +++ b/apps/meteor/app/api/server/v1/settings.ts @@ -0,0 +1,221 @@ +import { Meteor } from 'meteor/meteor'; +import { ServiceConfiguration } from 'meteor/service-configuration'; +import _ from 'underscore'; +import type { ISetting, ISettingColor } from '@rocket.chat/core-typings'; +import { isSettingAction, isSettingColor } from '@rocket.chat/core-typings'; +import { + isOauthCustomConfiguration, + isSettingsUpdatePropDefault, + isSettingsUpdatePropsActions, + isSettingsUpdatePropsColor, +} from '@rocket.chat/rest-typings'; +import { Settings } from '@rocket.chat/models'; +import type { FindOptions } from 'mongodb'; + +import { hasPermission } from '../../../authorization/server'; +import type { ResultFor } from '../api'; +import { API } from '../api'; +import { SettingsEvents, settings } from '../../../settings/server'; +import { setValue } from '../../../settings/server/raw'; + +async function fetchSettings( + query: Parameters[0], + sort: FindOptions['sort'], + offset: FindOptions['skip'], + count: FindOptions['limit'], + fields: FindOptions['projection'], +): Promise<{ settings: ISetting[]; totalCount: number }> { + const { cursor, totalCount } = Settings.findPaginated(query || {}, { + sort: sort || { _id: 1 }, + skip: offset, + limit: count, + projection: { _id: 1, value: 1, enterprise: 1, invalidValue: 1, modules: 1, ...fields }, + }); + + const [settings, total] = await Promise.all([cursor.toArray(), totalCount]); + + SettingsEvents.emit('fetch-settings', settings); + return { settings, totalCount: total }; +} + +// settings endpoints +API.v1.addRoute( + 'settings.public', + { authRequired: false }, + { + async get() { + const { offset, count } = this.getPaginationItems(); + const { sort, fields, query } = this.parseJsonQuery(); + + const ourQuery = { + ...query, + hidden: { $ne: true }, + public: true, + }; + + const { settings, totalCount: total } = await fetchSettings(ourQuery, sort, offset, count, fields); + + return API.v1.success({ + settings, + count: settings.length, + offset, + total, + }); + }, + }, +); + +API.v1.addRoute( + 'settings.oauth', + { authRequired: false }, + { + get() { + const oAuthServicesEnabled = ServiceConfiguration.configurations.find({}, { fields: { secret: 0 } }).fetch(); + + return API.v1.success({ + services: oAuthServicesEnabled.map((service) => { + if (!isOauthCustomConfiguration(service)) { + return service; + } + + if (service.custom || (service.service && ['saml', 'cas', 'wordpress'].includes(service.service))) { + return { ...service }; + } + + return { + _id: service._id, + name: service.service, + clientId: service.appId || service.clientId || service.consumerKey, + buttonLabelText: service.buttonLabelText || '', + buttonColor: service.buttonColor || '', + buttonLabelColor: service.buttonLabelColor || '', + custom: false, + }; + }), + }); + }, + }, +); + +API.v1.addRoute( + 'settings.addCustomOAuth', + { authRequired: true, twoFactorRequired: true }, + { + async post() { + if (!this.bodyParams.name || !this.bodyParams.name.trim()) { + throw new Meteor.Error('error-name-param-not-provided', 'The parameter "name" is required'); + } + + await Meteor.call('addOAuthService', this.bodyParams.name, this.userId); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'settings', + { authRequired: true }, + { + async get() { + const { offset, count } = this.getPaginationItems(); + const { sort, fields, query } = this.parseJsonQuery(); + + let ourQuery: Parameters[0] = { + hidden: { $ne: true }, + }; + + if (!hasPermission(this.userId, 'view-privileged-setting')) { + ourQuery.public = true; + } + + ourQuery = Object.assign({}, query, ourQuery); + + const { settings, totalCount: total } = await fetchSettings(ourQuery, sort, offset, count, fields); + + return API.v1.success({ + settings, + count: settings.length, + offset, + total, + }); + }, + }, +); + +API.v1.addRoute( + 'settings/:_id', + { authRequired: true }, + { + async get() { + if (!hasPermission(this.userId, 'view-privileged-setting')) { + return API.v1.unauthorized(); + } + const setting = await Settings.findOneNotHiddenById(this.urlParams._id); + if (!setting) { + return API.v1.failure(); + } + return API.v1.success(_.pick(setting, '_id', 'value')); + }, + post: { + twoFactorRequired: true, + async action(): Promise> { + if (!hasPermission(this.userId, 'edit-privileged-setting')) { + return API.v1.unauthorized(); + } + + if (typeof this.urlParams._id !== 'string') { + throw new Meteor.Error('error-id-param-not-provided', 'The parameter "id" is required'); + } + + // allow special handling of particular setting types + const setting = await Settings.findOneNotHiddenById(this.urlParams._id); + + if (!setting) { + return API.v1.failure(); + } + + if (isSettingAction(setting) && isSettingsUpdatePropsActions(this.bodyParams) && this.bodyParams.execute) { + // execute the configured method + Meteor.call(setting.value); + return API.v1.success(); + } + + if (isSettingColor(setting) && isSettingsUpdatePropsColor(this.bodyParams)) { + Settings.updateOptionsById(this.urlParams._id, { + editor: this.bodyParams.editor, + }); + Settings.updateValueNotHiddenById(this.urlParams._id, this.bodyParams.value); + return API.v1.success(); + } + + if ( + isSettingsUpdatePropDefault(this.bodyParams) && + (await Settings.updateValueNotHiddenById(this.urlParams._id, this.bodyParams.value)) + ) { + const s = await Settings.findOneNotHiddenById(this.urlParams._id); + if (!s) { + return API.v1.failure(); + } + settings.set(s); + setValue(this.urlParams._id, this.bodyParams.value); + return API.v1.success(); + } + + return API.v1.failure(); + }, + }, + }, +); + +API.v1.addRoute( + 'service.configurations', + { authRequired: false }, + { + get() { + return API.v1.success({ + configurations: ServiceConfiguration.configurations.find({}, { fields: { secret: 0 } }).fetch(), + }); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/stats.ts b/apps/meteor/app/api/server/v1/stats.ts new file mode 100644 index 000000000000..4f1f74383b8a --- /dev/null +++ b/apps/meteor/app/api/server/v1/stats.ts @@ -0,0 +1,61 @@ +import { API } from '../api'; +import { getStatistics, getLastStatistics } from '../../../statistics/server'; +import telemetryEvent from '../../../statistics/server/lib/telemetryEvents'; + +API.v1.addRoute( + 'statistics', + { authRequired: true }, + { + async get() { + const { refresh = 'false' } = this.requestParams(); + + return API.v1.success( + await getLastStatistics({ + userId: this.userId, + refresh: refresh === 'true', + }), + ); + }, + }, +); + +API.v1.addRoute( + 'statistics.list', + { authRequired: true }, + { + async get() { + const { offset, count } = this.getPaginationItems(); + const { sort, fields, query } = this.parseJsonQuery(); + + return API.v1.success( + await getStatistics({ + userId: this.userId, + query, + pagination: { + offset, + count, + sort, + fields, + }, + }), + ); + }, + }, +); + +API.v1.addRoute( + 'statistics.telemetry', + { authRequired: true }, + { + post() { + const events = this.requestParams(); + + events.params.forEach((event) => { + const { eventName, ...params } = event; + telemetryEvent.call(eventName, params); + }); + + return API.v1.success(); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/subscriptions.ts b/apps/meteor/app/api/server/v1/subscriptions.ts new file mode 100644 index 000000000000..b86c97f95ddd --- /dev/null +++ b/apps/meteor/app/api/server/v1/subscriptions.ts @@ -0,0 +1,101 @@ +import { Meteor } from 'meteor/meteor'; +import { + isSubscriptionsGetProps, + isSubscriptionsGetOneProps, + isSubscriptionsReadProps, + isSubscriptionsUnreadProps, +} from '@rocket.chat/rest-typings'; +import { Subscriptions } from '@rocket.chat/models'; + +import { API } from '../api'; + +API.v1.addRoute( + 'subscriptions.get', + { + authRequired: true, + validateParams: isSubscriptionsGetProps, + }, + { + async get() { + const { updatedSince } = this.queryParams; + + let updatedSinceDate: Date | undefined; + if (updatedSince) { + if (isNaN(Date.parse(updatedSince as string))) { + throw new Meteor.Error('error-roomId-param-invalid', 'The "lastUpdate" query parameter must be a valid date.'); + } + updatedSinceDate = new Date(updatedSince as string); + } + + const result = await Meteor.call('subscriptions/get', updatedSinceDate); + + return API.v1.success( + Array.isArray(result) + ? { + update: result, + remove: [], + } + : result, + ); + }, + }, +); + +API.v1.addRoute( + 'subscriptions.getOne', + { + authRequired: true, + validateParams: isSubscriptionsGetOneProps, + }, + { + async get() { + const { roomId } = this.queryParams; + + if (!roomId) { + return API.v1.failure("The 'roomId' param is required"); + } + + return API.v1.success({ + subscription: await Subscriptions.findOneByRoomIdAndUserId(roomId, this.userId), + }); + }, + }, +); + +/** + This API is suppose to mark any room as read. + + Method: POST + Route: api/v1/subscriptions.read + Params: + - rid: The rid of the room to be marked as read. + */ +API.v1.addRoute( + 'subscriptions.read', + { + authRequired: true, + validateParams: isSubscriptionsReadProps, + }, + { + post() { + Meteor.call('readMessages', this.bodyParams.rid); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'subscriptions.unread', + { + authRequired: true, + validateParams: isSubscriptionsUnreadProps, + }, + { + post() { + Meteor.call('unreadMessages', (this.bodyParams as any).firstUnreadMessage, (this.bodyParams as any).roomId); + + return API.v1.success(); + }, + }, +); diff --git a/app/api/server/v1/teams.ts b/apps/meteor/app/api/server/v1/teams.ts similarity index 80% rename from app/api/server/v1/teams.ts rename to apps/meteor/app/api/server/v1/teams.ts index 4407071d31cc..6d570ae49b0f 100644 --- a/app/api/server/v1/teams.ts +++ b/apps/meteor/app/api/server/v1/teams.ts @@ -1,23 +1,24 @@ -import { FilterQuery } from 'mongodb'; import { Meteor } from 'meteor/meteor'; import { Match, check } from 'meteor/check'; import { escapeRegExp } from '@rocket.chat/string-helpers'; +import { + isTeamsConvertToChannelProps, + isTeamsRemoveRoomProps, + isTeamsUpdateMemberProps, + isTeamsRemoveMemberProps, + isTeamsAddMembersProps, + isTeamsDeleteProps, + isTeamsLeaveProps, + isTeamsUpdateProps, +} from '@rocket.chat/rest-typings'; +import type { ITeam } from '@rocket.chat/core-typings'; +import { TEAM_TYPE } from '@rocket.chat/core-typings'; -import { API } from '../api'; -import { Team } from '../../../../server/sdk'; -import { hasAtLeastOnePermission, hasPermission } from '../../../authorization/server'; -import { Users } from '../../../models/server'; import { removeUserFromRoom } from '../../../lib/server/functions/removeUserFromRoom'; -import { IUser } from '../../../../definition/IUser'; -import { isTeamsConvertToChannelProps } from '../../../../definition/rest/v1/teams/TeamsConvertToChannelProps'; -import { isTeamsRemoveRoomProps } from '../../../../definition/rest/v1/teams/TeamsRemoveRoomProps'; -import { isTeamsUpdateMemberProps } from '../../../../definition/rest/v1/teams/TeamsUpdateMemberProps'; -import { isTeamsRemoveMemberProps } from '../../../../definition/rest/v1/teams/TeamsRemoveMemberProps'; -import { isTeamsAddMembersProps } from '../../../../definition/rest/v1/teams/TeamsAddMembersProps'; -import { isTeamsDeleteProps } from '../../../../definition/rest/v1/teams/TeamsDeleteProps'; -import { isTeamsLeaveProps } from '../../../../definition/rest/v1/teams/TeamsLeaveProps'; -import { isTeamsUpdateProps } from '../../../../definition/rest/v1/teams/TeamsUpdateProps'; -import { ITeam, TEAM_TYPE } from '../../../../definition/ITeam'; +import { Rooms, Users } from '../../../models/server'; +import { canAccessRoom, hasAtLeastOnePermission, hasPermission } from '../../../authorization/server'; +import { Team } from '../../../../server/sdk'; +import { API } from '../api'; API.v1.addRoute( 'teams.list', @@ -113,13 +114,12 @@ const getTeamByIdOrName = async (params: { teamId: string } | { teamName: string API.v1.addRoute( 'teams.convertToChannel', - { authRequired: true }, + { + authRequired: true, + validateParams: isTeamsConvertToChannelProps, + }, { async post() { - if (!isTeamsConvertToChannelProps(this.bodyParams)) { - return API.v1.failure('invalid-body-params', isTeamsConvertToChannelProps.errors?.map((e) => e.message).join('\n ')); - } - const { roomsToRemove = [] } = this.bodyParams; const team = await getTeamByIdOrName(this.bodyParams); @@ -140,7 +140,9 @@ API.v1.addRoute( }); } - await Promise.all([Team.unsetTeamIdOfRooms(team._id), Team.removeAllMembersFromTeam(team._id), Team.deleteById(team._id)]); + await Promise.all([Team.unsetTeamIdOfRooms(this.userId, team._id), Team.removeAllMembersFromTeam(team._id)]); + + await Team.deleteById(team._id); return API.v1.success(); }, @@ -191,13 +193,12 @@ API.v1.addRoute( API.v1.addRoute( 'teams.removeRoom', - { authRequired: true }, + { + authRequired: true, + validateParams: isTeamsRemoveRoomProps, + }, { async post() { - if (!isTeamsRemoveRoomProps(this.bodyParams)) { - return API.v1.failure('body-params-invalid', isTeamsRemoveRoomProps.errors?.map((error) => error.message).join('\n ')); - } - const team = await getTeamByIdOrName(this.bodyParams); if (!team) { return API.v1.failure('team-does-not-exist'); @@ -333,7 +334,7 @@ API.v1.addRoute( this.queryParams, Match.ObjectIncluding({ userId: String, - canUserDelete: Match.Maybe(Boolean), + canUserDelete: Match.Maybe(String), }), ); @@ -352,7 +353,8 @@ API.v1.addRoute( return API.v1.unauthorized(); } - const { records, total } = await Team.listRoomsOfUser(this.userId, team._id, userId, allowPrivateTeam, canUserDelete ?? false, { + const booleanCanUserDelete = canUserDelete === 'true'; + const { records, total } = await Team.listRoomsOfUser(this.userId, team._id, userId, allowPrivateTeam, booleanCanUserDelete, { offset, count, }); @@ -408,7 +410,7 @@ API.v1.addRoute( username: username ? new RegExp(escapeRegExp(username), 'i') : undefined, name: name ? new RegExp(escapeRegExp(name), 'i') : undefined, status: status ? { $in: status } : undefined, - } as FilterQuery; + }; const { records, total } = await Team.members(this.userId, team._id, canSeeAllMembers, { offset, count }, query); @@ -424,13 +426,12 @@ API.v1.addRoute( API.v1.addRoute( 'teams.addMembers', - { authRequired: true }, + { + authRequired: true, + validateParams: isTeamsAddMembersProps, + }, { async post() { - if (!isTeamsAddMembersProps(this.bodyParams)) { - return API.v1.failure('invalid-params'); - } - const { bodyParams } = this; const { members } = bodyParams; @@ -452,13 +453,12 @@ API.v1.addRoute( API.v1.addRoute( 'teams.updateMember', - { authRequired: true }, + { + authRequired: true, + validateParams: isTeamsUpdateMemberProps, + }, { async post() { - if (!isTeamsUpdateMemberProps(this.bodyParams)) { - return API.v1.failure('invalid-params', isTeamsUpdateMemberProps.errors?.map((e) => e.message).join('\n ')); - } - const { bodyParams } = this; const { member } = bodyParams; @@ -480,13 +480,12 @@ API.v1.addRoute( API.v1.addRoute( 'teams.removeMember', - { authRequired: true }, + { + authRequired: true, + validateParams: isTeamsRemoveMemberProps, + }, { async post() { - if (!isTeamsRemoveMemberProps(this.bodyParams)) { - return API.v1.failure('invalid-params', isTeamsRemoveMemberProps.errors?.map((e) => e.message).join('\n ')); - } - const { bodyParams } = this; const { userId, rooms } = bodyParams; @@ -511,11 +510,13 @@ API.v1.addRoute( if (rooms?.length) { const roomsFromTeam: string[] = await Team.getMatchingTeamRooms(team._id, rooms); - roomsFromTeam.forEach((rid) => { - removeUserFromRoom(rid, user, { - byUser: this.user, - }); - }); + await Promise.all( + roomsFromTeam.map((rid) => + removeUserFromRoom(rid, user, { + byUser: this.user, + }), + ), + ); } return API.v1.success(); }, @@ -524,13 +525,12 @@ API.v1.addRoute( API.v1.addRoute( 'teams.leave', - { authRequired: true }, + { + authRequired: true, + validateParams: isTeamsLeaveProps, + }, { async post() { - if (!isTeamsLeaveProps(this.bodyParams)) { - return API.v1.failure('invalid-params', isTeamsLeaveProps.errors?.map((e) => e.message).join('\n ')); - } - const { rooms = [] } = this.bodyParams; const team = await getTeamByIdOrName(this.bodyParams); @@ -546,10 +546,7 @@ API.v1.addRoute( if (rooms.length) { const roomsFromTeam: string[] = await Team.getMatchingTeamRooms(team._id, rooms); - - roomsFromTeam.forEach((rid) => { - removeUserFromRoom(rid, this.user); - }); + await Promise.all(roomsFromTeam.map((rid) => removeUserFromRoom(rid, this.user))); } return API.v1.success(); @@ -579,6 +576,18 @@ API.v1.addRoute( return API.v1.failure('Team not found'); } + const room = Rooms.findOneById(teamInfo.roomId); + + if (!room) { + return API.v1.failure('Room not found'); + } + + const canViewInfo = canAccessRoom(room, { _id: this.userId }) || hasPermission(this.userId, 'view-all-teams'); + + if (!canViewInfo) { + return API.v1.unauthorized(); + } + return API.v1.success({ teamInfo }); }, }, @@ -586,15 +595,14 @@ API.v1.addRoute( API.v1.addRoute( 'teams.delete', - { authRequired: true }, + { + authRequired: true, + validateParams: isTeamsDeleteProps, + }, { async post() { const { roomsToRemove = [] } = this.bodyParams; - if (!isTeamsDeleteProps(this.bodyParams)) { - return API.v1.failure('invalid-params', isTeamsDeleteProps.errors?.map((e) => e.message).join('\n ')); - } - const team = await getTeamByIdOrName(this.bodyParams); if (!team) { return API.v1.failure('team-does-not-exist'); @@ -606,9 +614,6 @@ API.v1.addRoute( const rooms: string[] = await Team.getMatchingTeamRooms(team._id, roomsToRemove); - // Remove the team's main room - Meteor.call('eraseRoom', team.roomId); - // If we got a list of rooms to delete along with the team, remove them first if (rooms.length) { rooms.forEach((room) => { @@ -617,7 +622,10 @@ API.v1.addRoute( } // Move every other room back to the workspace - await Team.unsetTeamIdOfRooms(team._id); + await Team.unsetTeamIdOfRooms(this.userId, team._id); + + // Remove the team's main room + Meteor.call('eraseRoom', team.roomId); // Delete all team memberships Team.removeAllMembersFromTeam(team._id); @@ -653,13 +661,12 @@ API.v1.addRoute( API.v1.addRoute( 'teams.update', - { authRequired: true }, + { + authRequired: true, + validateParams: isTeamsUpdateProps, + }, { async post() { - if (!isTeamsUpdateProps(this.bodyParams)) { - return API.v1.failure('invalid-params', isTeamsUpdateProps.errors?.map((e) => e.message).join('\n ')); - } - const { data } = this.bodyParams; const team = await getTeamByIdOrName(this.bodyParams); diff --git a/apps/meteor/app/api/server/v1/users.ts b/apps/meteor/app/api/server/v1/users.ts new file mode 100644 index 000000000000..2d902ac1ce1d --- /dev/null +++ b/apps/meteor/app/api/server/v1/users.ts @@ -0,0 +1,1084 @@ +import { + isUserCreateParamsPOST, + isUserSetActiveStatusParamsPOST, + isUserDeactivateIdleParamsPOST, + isUsersInfoParamsGetProps, + isUserRegisterParamsPOST, + isUserLogoutParamsPOST, + isUsersListTeamsProps, + isUsersAutocompleteProps, + isUsersSetAvatarProps, + isUsersUpdateParamsPOST, + isUsersUpdateOwnBasicInfoParamsPOST, + isUsersSetPreferencesParamsPOST, +} from '@rocket.chat/rest-typings'; +import { Meteor } from 'meteor/meteor'; +import { Accounts } from 'meteor/accounts-base'; +import { Match, check } from 'meteor/check'; +import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; +import type { IExportOperation, IPersonalAccessToken, IUser } from '@rocket.chat/core-typings'; +import { Users as UsersRaw } from '@rocket.chat/models'; + +import { Users, Subscriptions } from '../../../models/server'; +import { hasPermission } from '../../../authorization/server'; +import { settings } from '../../../settings/server'; +import { + validateCustomFields, + saveUser, + saveCustomFieldsWithoutValidation, + checkUsernameAvailability, + setStatusText, + setUserAvatar, + saveCustomFields, +} from '../../../lib/server'; +import { getFullUserDataByIdOrUsername } from '../../../lib/server/functions/getFullUserData'; +import { API } from '../api'; +import { findUsersToAutocomplete, getInclusiveFields, getNonEmptyFields, getNonEmptyQuery } from '../lib/users'; +import { getUserForCheck, emailCheck } from '../../../2fa/server/code'; +import { resetUserE2EEncriptionKey } from '../../../../server/lib/resetUserE2EKey'; +import { resetTOTP } from '../../../2fa/server/functions/resetTOTP'; +import { Team } from '../../../../server/sdk'; +import { isValidQuery } from '../lib/isValidQuery'; +import { setUserStatus } from '../../../../imports/users-presence/server/activeUsers'; +import { getURL } from '../../../utils/server'; +import { getUploadFormData } from '../lib/getUploadFormData'; + +API.v1.addRoute( + 'users.getAvatar', + { authRequired: false }, + { + get() { + const user = this.getUserFromParams(); + + const url = getURL(`/avatar/${user.username}`, { cdn: false, full: true }); + this.response.setHeader('Location', url); + + return { + statusCode: 307, + body: url, + }; + }, + }, +); + +API.v1.addRoute( + 'users.update', + { authRequired: true, twoFactorRequired: true, validateParams: isUsersUpdateParamsPOST }, + { + post() { + const userData = { _id: this.bodyParams.userId, ...this.bodyParams.data }; + + Meteor.runAsUser(this.userId, () => saveUser(this.userId, userData)); + + if (this.bodyParams.data.customFields) { + saveCustomFields(this.bodyParams.userId, this.bodyParams.data.customFields); + } + + if (typeof this.bodyParams.data.active !== 'undefined') { + const { + userId, + data: { active }, + confirmRelinquish, + } = this.bodyParams; + + Meteor.call('setUserActiveStatus', userId, active, Boolean(confirmRelinquish)); + } + const { fields } = this.parseJsonQuery(); + + return API.v1.success({ user: Users.findOneById(this.bodyParams.userId, { fields }) }); + }, + }, +); + +API.v1.addRoute( + 'users.updateOwnBasicInfo', + { authRequired: true, validateParams: isUsersUpdateOwnBasicInfoParamsPOST }, + { + post() { + const userData = { + email: this.bodyParams.data.email, + realname: this.bodyParams.data.name, + username: this.bodyParams.data.username, + nickname: this.bodyParams.data.nickname, + statusText: this.bodyParams.data.statusText, + newPassword: this.bodyParams.data.newPassword, + typedPassword: this.bodyParams.data.currentPassword, + }; + + // saveUserProfile now uses the default two factor authentication procedures, so we need to provide that + const twoFactorOptions = !userData.typedPassword + ? null + : { + twoFactorCode: userData.typedPassword, + twoFactorMethod: 'password', + }; + + Meteor.call('saveUserProfile', userData, this.bodyParams.customFields, twoFactorOptions); + + return API.v1.success({ + user: Users.findOneById(this.userId, { fields: API.v1.defaultFieldsToExclude }), + }); + }, + }, +); + +API.v1.addRoute( + 'users.setPreferences', + { authRequired: true, validateParams: isUsersSetPreferencesParamsPOST }, + { + post() { + if (this.bodyParams.userId && this.bodyParams.userId !== this.userId && !hasPermission(this.userId, 'edit-other-user-info')) { + throw new Meteor.Error('error-action-not-allowed', 'Editing user is not allowed'); + } + const userId = this.bodyParams.userId ? this.bodyParams.userId : this.userId; + if (!Users.findOneById(userId)) { + throw new Meteor.Error('error-invalid-user', 'The optional "userId" param provided does not match any users'); + } + + Meteor.runAsUser(userId, () => Meteor.call('saveUserPreferences', this.bodyParams.data)); + const user = Users.findOneById(userId, { + fields: { + 'settings.preferences': 1, + 'language': 1, + }, + }); + return API.v1.success({ + user: { + _id: user._id, + settings: { + preferences: { + ...user.settings.preferences, + language: user.language, + }, + }, + }, + }); + }, + }, +); + +API.v1.addRoute( + 'users.setAvatar', + { authRequired: true, validateParams: isUsersSetAvatarProps }, + { + async post() { + const canEditOtherUserAvatar = hasPermission(this.userId, 'edit-other-user-avatar'); + + if (!settings.get('Accounts_AllowUserAvatarChange') && !canEditOtherUserAvatar) { + throw new Meteor.Error('error-not-allowed', 'Change avatar is not allowed', { + method: 'users.setAvatar', + }); + } + + let user = ((): IUser | undefined => { + if (this.isUserFromParams()) { + return Meteor.users.findOne(this.userId) as IUser | undefined; + } + if (canEditOtherUserAvatar) { + return this.getUserFromParams(); + } + })(); + + if (!user) { + return API.v1.unauthorized(); + } + + if (this.bodyParams.avatarUrl) { + setUserAvatar(user, this.bodyParams.avatarUrl, '', 'url'); + return API.v1.success(); + } + + const [image, fields] = await getUploadFormData( + { + request: this.request, + }, + { + field: 'image', + }, + ); + + if (!image) { + return API.v1.failure("The 'image' param is required"); + } + + const sentTheUserByFormData = fields.userId || fields.username; + if (sentTheUserByFormData) { + if (fields.userId) { + user = Users.findOneById(fields.userId, { fields: { username: 1 } }); + } else if (fields.username) { + user = Users.findOneByUsernameIgnoringCase(fields.username, { fields: { username: 1 } }); + } + + if (!user) { + throw new Meteor.Error('error-invalid-user', 'The optional "userId" or "username" param provided does not match any users'); + } + + const isAnotherUser = this.userId !== user._id; + if (isAnotherUser && !hasPermission(this.userId, 'edit-other-user-avatar')) { + throw new Meteor.Error('error-not-allowed', 'Not allowed'); + } + } + + setUserAvatar(user, image.fileBuffer, image.mimetype, 'rest'); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'users.create', + { authRequired: true, validateParams: isUserCreateParamsPOST }, + { + post() { + // New change made by pull request #5152 + if (typeof this.bodyParams.joinDefaultChannels === 'undefined') { + this.bodyParams.joinDefaultChannels = true; + } + + if (this.bodyParams.customFields) { + validateCustomFields(this.bodyParams.customFields); + } + + const newUserId = saveUser(this.userId, this.bodyParams); + + if (this.bodyParams.customFields) { + saveCustomFieldsWithoutValidation(newUserId, this.bodyParams.customFields); + } + + if (typeof this.bodyParams.active !== 'undefined') { + Meteor.call('setUserActiveStatus', newUserId, this.bodyParams.active); + } + + const { fields } = this.parseJsonQuery(); + + return API.v1.success({ user: Users.findOneById(newUserId, { fields }) }); + }, + }, +); + +API.v1.addRoute( + 'users.delete', + { authRequired: true }, + { + post() { + if (!hasPermission(this.userId, 'delete-user')) { + return API.v1.unauthorized(); + } + + const user = this.getUserFromParams(); + const { confirmRelinquish = false } = this.requestParams(); + + Meteor.call('deleteUser', user._id, confirmRelinquish); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'users.deleteOwnAccount', + { authRequired: true }, + { + post() { + const { password } = this.bodyParams; + if (!password) { + return API.v1.failure('Body parameter "password" is required.'); + } + if (!settings.get('Accounts_AllowDeleteOwnAccount')) { + throw new Meteor.Error('error-not-allowed', 'Not allowed'); + } + + const { confirmRelinquish = false } = this.requestParams(); + + Meteor.call('deleteUserOwnAccount', password, confirmRelinquish); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'users.setActiveStatus', + { authRequired: true, validateParams: isUserSetActiveStatusParamsPOST }, + { + post() { + if (!hasPermission(this.userId, 'edit-other-user-active-status')) { + return API.v1.unauthorized(); + } + + const { userId, activeStatus, confirmRelinquish = false } = this.bodyParams; + Meteor.call('setUserActiveStatus', userId, activeStatus, confirmRelinquish); + return API.v1.success({ + user: Users.findOneById(this.bodyParams.userId, { fields: { active: 1 } }), + }); + }, + }, +); + +API.v1.addRoute( + 'users.deactivateIdle', + { authRequired: true, validateParams: isUserDeactivateIdleParamsPOST }, + { + post() { + if (!hasPermission(this.userId, 'edit-other-user-active-status')) { + return API.v1.unauthorized(); + } + + const { daysIdle, role = 'user' } = this.bodyParams; + + const lastLoggedIn = new Date(); + lastLoggedIn.setDate(lastLoggedIn.getDate() - daysIdle); + + const count = Users.setActiveNotLoggedInAfterWithRole(lastLoggedIn, role, false); + + return API.v1.success({ + count, + }); + }, + }, +); + +API.v1.addRoute( + 'users.info', + { authRequired: true, validateParams: isUsersInfoParamsGetProps }, + { + async get() { + const { fields } = this.parseJsonQuery(); + + const user = await getFullUserDataByIdOrUsername(this.userId, { + filterId: (this.queryParams as any).userId, + filterUsername: (this.queryParams as any).username, + }); + + if (!user) { + return API.v1.failure('User not found.'); + } + const myself = user._id === this.userId; + if (fields.userRooms === 1 && (myself || hasPermission(this.userId, 'view-other-user-channels'))) { + return API.v1.success({ + user: { + ...user, + rooms: Subscriptions.findByUserId(user._id, { + projection: { + rid: 1, + name: 1, + t: 1, + roles: 1, + unread: 1, + federated: 1, + }, + sort: { + t: 1, + name: 1, + }, + }).fetch(), + }, + }); + } + + return API.v1.success({ + user, + }); + }, + }, +); + +API.v1.addRoute( + 'users.list', + { + authRequired: true, + queryOperations: ['$or', '$and'], + }, + { + async get() { + if (!hasPermission(this.userId, 'view-d-room')) { + return API.v1.unauthorized(); + } + + const { offset, count } = this.getPaginationItems(); + const { sort, fields, query } = this.parseJsonQuery(); + + const nonEmptyQuery = getNonEmptyQuery(query, hasPermission(this.userId, 'view-full-other-user-info')); + const nonEmptyFields = getNonEmptyFields(fields); + + const inclusiveFields = getInclusiveFields(nonEmptyFields); + + const inclusiveFieldsKeys = Object.keys(inclusiveFields); + + if ( + !isValidQuery( + nonEmptyQuery, + [ + ...inclusiveFieldsKeys, + inclusiveFieldsKeys.includes('emails') && 'emails.address.*', + inclusiveFieldsKeys.includes('username') && 'username.*', + inclusiveFieldsKeys.includes('name') && 'name.*', + inclusiveFieldsKeys.includes('type') && 'type.*', + ].filter(Boolean) as string[], + this.queryOperations, + ) + ) { + throw new Meteor.Error('error-invalid-query', isValidQuery.errors.join('\n')); + } + + const actualSort = sort?.name ? { nameInsensitive: sort.name, ...sort } : sort || { username: 1 }; + + const limit = + count !== 0 + ? [ + { + $limit: count, + }, + ] + : []; + + const result = await UsersRaw.col + .aggregate<{ sortedResults: IUser[]; totalCount: { total: number }[] }>([ + { + $match: nonEmptyQuery, + }, + { + $project: inclusiveFields, + }, + { + $addFields: { + nameInsensitive: { + $toLower: '$name', + }, + }, + }, + { + $facet: { + sortedResults: [ + { + $sort: actualSort, + }, + { + $skip: offset, + }, + ...limit, + ], + totalCount: [{ $group: { _id: null, total: { $sum: 1 } } }], + }, + }, + ]) + .toArray(); + + const { + sortedResults: users, + totalCount: [{ total } = { total: 0 }], + } = result[0]; + + return API.v1.success({ + users, + count: users.length, + offset, + total, + }); + }, + }, +); + +API.v1.addRoute( + 'users.register', + { + authRequired: false, + rateLimiterOptions: { + numRequestsAllowed: settings.get('Rate_Limiter_Limit_RegisterUser') ?? 1, + intervalTimeInMS: settings.get('API_Enable_Rate_Limiter_Limit_Time_Default'), + }, + validateParams: isUserRegisterParamsPOST, + }, + { + post() { + if (this.userId) { + return API.v1.failure('Logged in users can not register again.'); + } + + if (!checkUsernameAvailability(this.bodyParams.username)) { + return API.v1.failure('Username is already in use'); + } + + // Register the user + const userId = Meteor.call('registerUser', this.bodyParams); + + // Now set their username + Meteor.runAsUser(userId, () => Meteor.call('setUsername', this.bodyParams.username)); + const { fields } = this.parseJsonQuery(); + + return API.v1.success({ user: Users.findOneById(userId, { fields }) }); + }, + }, +); + +API.v1.addRoute( + 'users.resetAvatar', + { authRequired: true }, + { + post() { + const user = this.getUserFromParams(); + + if (settings.get('Accounts_AllowUserAvatarChange') && user._id === this.userId) { + Meteor.runAsUser(this.userId, () => Meteor.call('resetAvatar')); + } else if (hasPermission(this.userId, 'edit-other-user-avatar')) { + Meteor.runAsUser(this.userId, () => Meteor.call('resetAvatar', user._id)); + } else { + throw new Meteor.Error('error-not-allowed', 'Reset avatar is not allowed', { + method: 'users.resetAvatar', + }); + } + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'users.createToken', + { authRequired: true }, + { + post() { + const user = this.getUserFromParams(); + const data = Meteor.call('createToken', user._id); + return data ? API.v1.success({ data }) : API.v1.unauthorized(); + }, + }, +); + +API.v1.addRoute( + 'users.getPreferences', + { authRequired: true }, + { + get() { + const user = Users.findOneById(this.userId); + if (user.settings) { + const { preferences = {} } = user.settings; + preferences.language = user.language; + + return API.v1.success({ + preferences, + }); + } + return API.v1.failure(TAPi18n.__('Accounts_Default_User_Preferences_not_available').toUpperCase()); + }, + }, +); + +API.v1.addRoute( + 'users.forgotPassword', + { authRequired: false }, + { + post() { + const { email } = this.bodyParams; + if (!email) { + return API.v1.failure("The 'email' param is required"); + } + + Meteor.call('sendForgotPasswordEmail', email); + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'users.getUsernameSuggestion', + { authRequired: true }, + { + get() { + const result = Meteor.call('getUsernameSuggestion'); + + return API.v1.success({ result }); + }, + }, +); + +API.v1.addRoute( + 'users.generatePersonalAccessToken', + { authRequired: true, twoFactorRequired: true }, + { + post() { + const { tokenName, bypassTwoFactor } = this.bodyParams; + if (!tokenName) { + return API.v1.failure("The 'tokenName' param is required"); + } + const token = Meteor.call('personalAccessTokens:generateToken', { tokenName, bypassTwoFactor }); + + return API.v1.success({ token }); + }, + }, +); + +API.v1.addRoute( + 'users.regeneratePersonalAccessToken', + { authRequired: true, twoFactorRequired: true }, + { + post() { + const { tokenName } = this.bodyParams; + if (!tokenName) { + return API.v1.failure("The 'tokenName' param is required"); + } + const token = Meteor.call('personalAccessTokens:regenerateToken', { tokenName }); + + return API.v1.success({ token }); + }, + }, +); + +API.v1.addRoute( + 'users.getPersonalAccessTokens', + { authRequired: true }, + { + get() { + if (!hasPermission(this.userId, 'create-personal-access-tokens')) { + throw new Meteor.Error('not-authorized', 'Not Authorized'); + } + + const user = Users.getLoginTokensByUserId(this.userId).fetch()[0] as IUser | undefined; + + return API.v1.success({ + tokens: + user?.services?.resume?.loginTokens + ?.filter((loginToken: any) => loginToken.type === 'personalAccessToken') + .map((loginToken: IPersonalAccessToken) => ({ + name: loginToken.name, + createdAt: loginToken.createdAt.toISOString(), + lastTokenPart: loginToken.lastTokenPart, + bypassTwoFactor: Boolean(loginToken.bypassTwoFactor), + })) || [], + }); + }, + }, +); + +API.v1.addRoute( + 'users.removePersonalAccessToken', + { authRequired: true, twoFactorRequired: true }, + { + post() { + const { tokenName } = this.bodyParams; + if (!tokenName) { + return API.v1.failure("The 'tokenName' param is required"); + } + Meteor.call('personalAccessTokens:removeToken', { + tokenName, + }); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'users.2fa.enableEmail', + { authRequired: true }, + { + post() { + Users.enableEmail2FAByUserId(this.userId); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'users.2fa.disableEmail', + { authRequired: true, twoFactorRequired: true, twoFactorOptions: { disableRememberMe: true } }, + { + post() { + Users.disableEmail2FAByUserId(this.userId); + + return API.v1.success(); + }, + }, +); + +API.v1.addRoute('users.2fa.sendEmailCode', { + post() { + const { emailOrUsername } = this.bodyParams; + + if (!emailOrUsername) { + throw new Meteor.Error('error-parameter-required', 'emailOrUsername is required'); + } + + const method = emailOrUsername.includes('@') ? 'findOneByEmailAddress' : 'findOneByUsername'; + const userId = this.userId || Users[method](emailOrUsername, { fields: { _id: 1 } })?._id; + + if (!userId) { + // this.logger.error('[2fa] User was not found when requesting 2fa email code'); + return API.v1.success(); + } + + emailCheck.sendEmailCode(getUserForCheck(userId)); + + return API.v1.success(); + }, +}); + +API.v1.addRoute( + 'users.presence', + { authRequired: true }, + { + get() { + const { from, ids } = this.queryParams; + + const options = { + fields: { + username: 1, + name: 1, + status: 1, + utcOffset: 1, + statusText: 1, + avatarETag: 1, + }, + }; + + if (ids) { + return API.v1.success({ + users: Users.findNotOfflineByIds(Array.isArray(ids) ? ids : ids.split(','), options).fetch(), + full: false, + }); + } + + if (from) { + const ts = new Date(from); + const diff = (Date.now() - Number(ts)) / 1000 / 60; + + if (diff < 10) { + return API.v1.success({ + users: Users.findNotIdUpdatedFrom(this.userId, ts, options).fetch(), + full: false, + }); + } + } + + return API.v1.success({ + users: Users.findUsersNotOffline(options).fetch(), + full: true, + }); + }, + }, +); + +API.v1.addRoute( + 'users.requestDataDownload', + { authRequired: true }, + { + get() { + const { fullExport = false } = this.queryParams; + const result = Meteor.call('requestDataDownload', { fullExport: fullExport === 'true' }) as { + requested: boolean; + exportOperation: IExportOperation; + }; + + return API.v1.success({ + requested: Boolean(result.requested), + exportOperation: result.exportOperation, + }); + }, + }, +); + +API.v1.addRoute( + 'users.logoutOtherClients', + { authRequired: true }, + { + async post() { + const xAuthToken = this.request.headers['x-auth-token'] as string; + + if (!xAuthToken) { + throw new Meteor.Error('error-parameter-required', 'x-auth-token is required'); + } + const hashedToken = Accounts._hashLoginToken(xAuthToken); + + if (!(await UsersRaw.removeNonPATLoginTokensExcept(this.userId, hashedToken))) { + throw new Meteor.Error('error-invalid-user-id', 'Invalid user id'); + } + + const me = (await UsersRaw.findOneById(this.userId, { projection: { 'services.resume.loginTokens': 1 } })) as Pick; + + const token = me.services?.resume?.loginTokens?.find((token) => token.hashedToken === hashedToken); + + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const tokenExpires = new Date(token!.when.getTime() + settings.get('Accounts_LoginExpiration') * 1000); + + return API.v1.success({ + token: xAuthToken, + tokenExpires: tokenExpires.toISOString() || '', + }); + }, + }, +); + +API.v1.addRoute( + 'users.autocomplete', + { authRequired: true, validateParams: isUsersAutocompleteProps }, + { + async get() { + const { selector } = this.queryParams; + return API.v1.success( + await findUsersToAutocomplete({ + uid: this.userId, + selector: JSON.parse(selector), + }), + ); + }, + }, +); + +API.v1.addRoute( + 'users.removeOtherTokens', + { authRequired: true }, + { + post() { + return API.v1.success(Meteor.call('removeOtherTokens')); + }, + }, +); + +API.v1.addRoute( + 'users.resetE2EKey', + { authRequired: true, twoFactorRequired: true, twoFactorOptions: { disableRememberMe: true } }, + { + post() { + if ('userId' in this.bodyParams || 'username' in this.bodyParams || 'user' in this.bodyParams) { + // reset other user keys + const user = this.getUserFromParams(); + if (!user) { + throw new Meteor.Error('error-invalid-user-id', 'Invalid user id'); + } + + if (!settings.get('Accounts_TwoFactorAuthentication_Enforce_Password_Fallback')) { + throw new Meteor.Error('error-not-allowed', 'Not allowed'); + } + + if (!hasPermission(this.userId, 'edit-other-user-e2ee')) { + throw new Meteor.Error('error-not-allowed', 'Not allowed'); + } + + if (!resetUserE2EEncriptionKey(user._id, true)) { + return API.v1.failure(); + } + + return API.v1.success(); + } + resetUserE2EEncriptionKey(this.userId, false); + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'users.resetTOTP', + { authRequired: true, twoFactorRequired: true, twoFactorOptions: { disableRememberMe: true } }, + { + async post() { + // // reset own keys + if ('userId' in this.bodyParams || 'username' in this.bodyParams || 'user' in this.bodyParams) { + // reset other user keys + if (!hasPermission(this.userId, 'edit-other-user-totp')) { + throw new Meteor.Error('error-not-allowed', 'Not allowed'); + } + + if (!settings.get('Accounts_TwoFactorAuthentication_Enforce_Password_Fallback')) { + throw new Meteor.Error('error-not-allowed', 'Not allowed'); + } + + const user = this.getUserFromParams(); + if (!user) { + throw new Meteor.Error('error-invalid-user-id', 'Invalid user id'); + } + + await resetTOTP(user._id, true); + + return API.v1.success(); + } + await resetTOTP(this.userId, false); + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'users.listTeams', + { authRequired: true, validateParams: isUsersListTeamsProps }, + { + async get() { + check( + this.queryParams, + Match.ObjectIncluding({ + userId: Match.Maybe(String), + }), + ); + + const { userId } = this.queryParams; + + // If the caller has permission to view all teams, there's no need to filter the teams + const adminId = hasPermission(this.userId, 'view-all-teams') ? undefined : this.userId; + + const teams = await Team.findBySubscribedUserIds(userId, adminId); + + return API.v1.success({ + teams, + }); + }, + }, +); + +API.v1.addRoute( + 'users.logout', + { authRequired: true, validateParams: isUserLogoutParamsPOST }, + { + post() { + const userId = this.bodyParams.userId || this.userId; + + if (userId !== this.userId && !hasPermission(this.userId, 'logout-other-user')) { + return API.v1.unauthorized(); + } + + // this method logs the user out automatically, if successful returns 1, otherwise 0 + if (!Users.unsetLoginTokens(userId)) { + throw new Meteor.Error('error-invalid-user-id', 'Invalid user id'); + } + + return API.v1.success({ + message: `User ${userId} has been logged out!`, + }); + }, + }, +); + +API.v1.addRoute( + 'users.getPresence', + { authRequired: true }, + { + get() { + if (this.isUserFromParams()) { + const user = Users.findOneById(this.userId); + return API.v1.success({ + presence: user.status || 'offline', + connectionStatus: user.statusConnection || 'offline', + ...(user.lastLogin && { lastLogin: user.lastLogin }), + }); + } + + const user = this.getUserFromParams(); + + return API.v1.success({ + presence: user.status || 'offline', + }); + }, + }, +); + +API.v1.addRoute( + 'users.setStatus', + { authRequired: true }, + { + post() { + check( + this.bodyParams, + Match.OneOf( + Match.ObjectIncluding({ + status: Match.Maybe(String), + message: String, + }), + Match.ObjectIncluding({ + status: String, + message: Match.Maybe(String), + }), + ), + ); + + if (!settings.get('Accounts_AllowUserStatusMessageChange')) { + throw new Meteor.Error('error-not-allowed', 'Change status is not allowed', { + method: 'users.setStatus', + }); + } + + const user = ((): IUser | undefined => { + if (this.isUserFromParams()) { + return Meteor.users.findOne(this.userId) as IUser; + } + if (hasPermission(this.userId, 'edit-other-user-info')) { + return this.getUserFromParams(); + } + })(); + + if (user === undefined) { + return API.v1.unauthorized(); + } + + Meteor.runAsUser(user._id, () => { + if (this.bodyParams.message || this.bodyParams.message === '') { + setStatusText(user._id, this.bodyParams.message); + } + if (this.bodyParams.status) { + const validStatus = ['online', 'away', 'offline', 'busy']; + if (validStatus.includes(this.bodyParams.status)) { + const { status } = this.bodyParams; + + if (status === 'offline' && !settings.get('Accounts_AllowInvisibleStatusOption')) { + throw new Meteor.Error('error-status-not-allowed', 'Invisible status is disabled', { + method: 'users.setStatus', + }); + } + + Meteor.users.update(user._id, { + $set: { + status, + statusDefault: status, + }, + }); + + setUserStatus(user, status); + } else { + throw new Meteor.Error('error-invalid-status', 'Valid status types include online, away, offline, and busy.', { + method: 'users.setStatus', + }); + } + } + }); + + return API.v1.success(); + }, + }, +); + +// status: 'online' | 'offline' | 'away' | 'busy'; +// message?: string; +// _id: string; +// connectionStatus?: 'online' | 'offline' | 'away' | 'busy'; +// }; + +API.v1.addRoute( + 'users.getStatus', + { authRequired: true }, + { + get() { + if (this.isUserFromParams()) { + const user = Users.findOneById(this.userId); + return API.v1.success({ + _id: user._id, + // message: user.statusText, + connectionStatus: (user.statusConnection || 'offline') as 'online' | 'offline' | 'away' | 'busy', + status: (user.status || 'offline') as 'online' | 'offline' | 'away' | 'busy', + }); + } + + const user = this.getUserFromParams(); + + return API.v1.success({ + _id: user._id, + // message: user.statusText, + status: (user.status || 'offline') as 'online' | 'offline' | 'away' | 'busy', + }); + }, + }, +); + +settings.watch('Rate_Limiter_Limit_RegisterUser', (value) => { + const userRegisterRoute = '/api/v1/users.registerpost'; + + API.v1.updateRateLimiterDictionaryForRoute(userRegisterRoute, value); +}); diff --git a/apps/meteor/app/api/server/v1/videoConference.ts b/apps/meteor/app/api/server/v1/videoConference.ts new file mode 100644 index 000000000000..f471fcaebe40 --- /dev/null +++ b/apps/meteor/app/api/server/v1/videoConference.ts @@ -0,0 +1,185 @@ +import type { VideoConference } from '@rocket.chat/core-typings'; +import { + isVideoConfStartProps, + isVideoConfJoinProps, + isVideoConfCancelProps, + isVideoConfInfoProps, + isVideoConfListProps, +} from '@rocket.chat/rest-typings'; + +import { API } from '../api'; +import { canAccessRoomIdAsync } from '../../../authorization/server/functions/canAccessRoom'; +import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission'; +import { VideoConf } from '../../../../server/sdk'; +import { videoConfProviders } from '../../../../server/lib/videoConfProviders'; +import { availabilityErrors } from '../../../../lib/videoConference/constants'; + +API.v1.addRoute( + 'video-conference.start', + { authRequired: true, validateParams: isVideoConfStartProps, rateLimiterOptions: { numRequestsAllowed: 3, intervalTimeInMS: 60000 } }, + { + async post() { + const { roomId, title, allowRinging: requestRinging } = this.bodyParams; + const { userId } = this; + if (!userId || !(await canAccessRoomIdAsync(roomId, userId))) { + return API.v1.failure('invalid-params'); + } + + try { + const providerName = videoConfProviders.getActiveProvider(); + + if (!providerName) { + throw new Error(availabilityErrors.NOT_ACTIVE); + } + + const allowRinging = Boolean(requestRinging) && (await hasPermissionAsync(userId, 'videoconf-ring-users')); + + return API.v1.success({ + data: { + ...(await VideoConf.start(userId, roomId, { title, allowRinging })), + providerName, + }, + }); + } catch (e) { + return API.v1.failure(await VideoConf.diagnoseProvider(userId, roomId)); + } + }, + }, +); + +API.v1.addRoute( + 'video-conference.join', + { authOrAnonRequired: true, validateParams: isVideoConfJoinProps, rateLimiterOptions: { numRequestsAllowed: 2, intervalTimeInMS: 5000 } }, + { + async post() { + const { callId, state } = this.bodyParams; + const { userId } = this; + + const call = await VideoConf.get(callId); + if (!call) { + return API.v1.failure('invalid-params'); + } + + if (!(await canAccessRoomIdAsync(call.rid, userId))) { + return API.v1.failure('invalid-params'); + } + + let url: string | undefined; + + try { + url = await VideoConf.join(userId, callId, { + ...(state?.cam !== undefined ? { cam: state.cam } : {}), + ...(state?.mic !== undefined ? { mic: state.mic } : {}), + }); + } catch (e) { + if (userId) { + return API.v1.failure(await VideoConf.diagnoseProvider(userId, call.rid, call.providerName)); + } + } + + if (!url) { + return API.v1.failure('failed-to-get-url'); + } + + return API.v1.success({ + url, + providerName: call.providerName, + }); + }, + }, +); + +API.v1.addRoute( + 'video-conference.cancel', + { authRequired: true, validateParams: isVideoConfCancelProps, rateLimiterOptions: { numRequestsAllowed: 3, intervalTimeInMS: 60000 } }, + { + async post() { + const { callId } = this.bodyParams; + const { userId } = this; + + const call = await VideoConf.get(callId); + if (!call) { + return API.v1.failure('invalid-params'); + } + + if (!userId || !(await canAccessRoomIdAsync(call.rid, userId))) { + return API.v1.failure('invalid-params'); + } + + await VideoConf.cancel(userId, callId); + return API.v1.success(); + }, + }, +); + +API.v1.addRoute( + 'video-conference.info', + { authRequired: true, validateParams: isVideoConfInfoProps, rateLimiterOptions: { numRequestsAllowed: 3, intervalTimeInMS: 1000 } }, + { + async get() { + const { callId } = this.queryParams; + const { userId } = this; + + const call = await VideoConf.get(callId); + if (!call) { + return API.v1.failure('invalid-params'); + } + + if (!userId || !(await canAccessRoomIdAsync(call.rid, userId))) { + return API.v1.failure('invalid-params'); + } + + const capabilities = await VideoConf.listProviderCapabilities(call.providerName); + + return API.v1.success({ + ...(call as VideoConference), + capabilities, + }); + }, + }, +); + +API.v1.addRoute( + 'video-conference.list', + { authRequired: true, validateParams: isVideoConfListProps, rateLimiterOptions: { numRequestsAllowed: 3, intervalTimeInMS: 1000 } }, + { + async get() { + const { roomId } = this.queryParams; + const { userId } = this; + + const { offset, count } = this.getPaginationItems(); + + if (!userId || !(await canAccessRoomIdAsync(roomId, userId))) { + return API.v1.failure('invalid-params'); + } + + const data = await VideoConf.list(roomId, { offset, count }); + + return API.v1.success(data); + }, + }, +); + +API.v1.addRoute( + 'video-conference.providers', + { authRequired: true, rateLimiterOptions: { numRequestsAllowed: 3, intervalTimeInMS: 1000 } }, + { + async get() { + const data = await VideoConf.listProviders(); + + return API.v1.success({ data }); + }, + }, +); + +API.v1.addRoute( + 'video-conference.capabilities', + { authRequired: true, rateLimiterOptions: { numRequestsAllowed: 3, intervalTimeInMS: 1000 } }, + { + async get() { + const data = await VideoConf.listCapabilities(); + + return API.v1.success(data); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/voip/events.ts b/apps/meteor/app/api/server/v1/voip/events.ts new file mode 100644 index 000000000000..5b3d61a46f6d --- /dev/null +++ b/apps/meteor/app/api/server/v1/voip/events.ts @@ -0,0 +1,35 @@ +import { Match, check } from 'meteor/check'; +import { VoipClientEvents } from '@rocket.chat/core-typings'; +import { VoipRoom } from '@rocket.chat/models'; + +import { API } from '../../api'; +import { LivechatVoip } from '../../../../../server/sdk'; +import { canAccessRoom } from '../../../../authorization/server'; + +API.v1.addRoute( + 'voip/events', + { authRequired: true }, + { + async post() { + check(this.requestParams(), { + event: Match.Where((v: string) => { + return Object.values(VoipClientEvents).includes(v); + }), + rid: String, + comment: Match.Maybe(String), + }); + + const { rid, event, comment } = this.requestParams(); + + const room = await VoipRoom.findOneVoipRoomById(rid); + if (!room) { + return API.v1.notFound(); + } + if (!canAccessRoom(room, this.user)) { + return API.v1.unauthorized(); + } + + return API.v1.success(await LivechatVoip.handleEvent(event, room, this.user, comment)); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/voip/extensions.ts b/apps/meteor/app/api/server/v1/voip/extensions.ts new file mode 100644 index 000000000000..598a8bce662e --- /dev/null +++ b/apps/meteor/app/api/server/v1/voip/extensions.ts @@ -0,0 +1,125 @@ +import { Match, check } from 'meteor/check'; +import type { IVoipExtensionBase } from '@rocket.chat/core-typings'; +import { Users } from '@rocket.chat/models'; + +import { API } from '../../api'; +import { Voip } from '../../../../../server/sdk'; +import { generateJWT } from '../../../../utils/server/lib/JWTHelper'; +import { settings } from '../../../../settings/server'; +import { logger } from './logger'; + +// Get the connector version and type +API.v1.addRoute( + 'connector.getVersion', + { authRequired: true, permissionsRequired: ['manage-voip-call-settings'] }, + { + async get() { + const version = await Voip.getConnectorVersion(); + return API.v1.success(version); + }, + }, +); + +// Get the extensions available on the call server +API.v1.addRoute( + 'connector.extension.list', + { authRequired: true, permissionsRequired: ['manage-voip-call-settings'] }, + { + async get() { + const list = await Voip.getExtensionList(); + const result = list.result as IVoipExtensionBase[]; + return API.v1.success({ extensions: result }); + }, + }, +); + +/* Get the details of a single extension. + * Note : This API will either be called by the endpoint + * or will be consumed internally. + */ +API.v1.addRoute( + 'connector.extension.getDetails', + { authRequired: true, permissionsRequired: ['manage-voip-call-settings'] }, + { + async get() { + check( + this.requestParams(), + Match.ObjectIncluding({ + extension: String, + }), + ); + const endpointDetails = await Voip.getExtensionDetails(this.requestParams()); + return API.v1.success({ ...endpointDetails.result }); + }, + }, +); + +/* Get the details for registration extension. + */ + +API.v1.addRoute( + 'connector.extension.getRegistrationInfoByExtension', + { authRequired: true, permissionsRequired: ['manage-voip-call-settings'] }, + { + async get() { + check( + this.requestParams(), + Match.ObjectIncluding({ + extension: String, + }), + ); + const endpointDetails = await Voip.getRegistrationInfo(this.requestParams()); + const encKey = settings.get('VoIP_JWT_Secret'); + if (!encKey) { + logger.warn('No JWT keys set. Sending registration info as plain text'); + return API.v1.success({ ...endpointDetails.result }); + } + + const result = generateJWT(endpointDetails.result, encKey); + return API.v1.success({ result }); + }, + }, +); + +API.v1.addRoute( + 'connector.extension.getRegistrationInfoByUserId', + { authRequired: true, permissionsRequired: ['view-agent-extension-association'] }, + { + async get() { + check( + this.requestParams(), + Match.ObjectIncluding({ + id: String, + }), + ); + const { id } = this.requestParams(); + + if (id !== this.userId) { + return API.v1.unauthorized(); + } + + const { extension } = + (await Users.getVoipExtensionByUserId(id, { + projection: { + _id: 1, + username: 1, + extension: 1, + }, + })) || {}; + + if (!extension) { + return API.v1.notFound('Extension not found'); + } + + const endpointDetails = await Voip.getRegistrationInfo({ extension }); + const encKey = settings.get('VoIP_JWT_Secret'); + if (!encKey) { + logger.warn('No JWT keys set. Sending registration info as plain text'); + return API.v1.success({ ...endpointDetails.result }); + } + + const result = generateJWT(endpointDetails.result, encKey); + return API.v1.success({ result }); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/voip/index.ts b/apps/meteor/app/api/server/v1/voip/index.ts new file mode 100644 index 000000000000..95b8dd15a938 --- /dev/null +++ b/apps/meteor/app/api/server/v1/voip/index.ts @@ -0,0 +1,5 @@ +import './extensions'; +import './queues'; +import './events'; +import './rooms'; +import './server-connection'; diff --git a/apps/meteor/app/api/server/v1/voip/logger.ts b/apps/meteor/app/api/server/v1/voip/logger.ts new file mode 100644 index 000000000000..792cf79427ea --- /dev/null +++ b/apps/meteor/app/api/server/v1/voip/logger.ts @@ -0,0 +1,3 @@ +import { Logger } from '../../../../logger/server'; + +export const logger = new Logger('VoIP'); diff --git a/apps/meteor/app/api/server/v1/voip/omnichannel.ts b/apps/meteor/app/api/server/v1/voip/omnichannel.ts new file mode 100644 index 000000000000..9e7fe2e00663 --- /dev/null +++ b/apps/meteor/app/api/server/v1/voip/omnichannel.ts @@ -0,0 +1,267 @@ +import { Match, check } from 'meteor/check'; +import type { IUser, IVoipExtensionWithAgentInfo } from '@rocket.chat/core-typings'; +import { Users } from '@rocket.chat/models'; + +import { API } from '../../api'; +import { hasPermission } from '../../../../authorization/server/index'; +import { LivechatVoip } from '../../../../../server/sdk'; +import { logger } from './logger'; + +function filter( + array: IVoipExtensionWithAgentInfo[], + { queues, extension, agentId, status }: { queues?: string[]; extension?: string; agentId?: string; status?: string }, +): IVoipExtensionWithAgentInfo[] { + const defaultFunc = (): boolean => true; + return array.filter((item) => { + const queuesCond = queues && Array.isArray(queues) ? (): boolean => item.queues?.some((q) => queues.includes(q)) || false : defaultFunc; + const extensionCond = extension?.trim() ? (): boolean => item?.extension === extension : defaultFunc; + const agentIdCond = agentId?.trim() ? (): boolean => item?.userId === agentId : defaultFunc; + const statusCond = status?.trim() ? (): boolean => item?.state === status : defaultFunc; + + return queuesCond() && extensionCond() && agentIdCond() && statusCond(); + }); +} + +function paginate(array: T[], count = 10, offset = 0): T[] { + return array.slice(offset, offset + count); +} + +const isUserAndExtensionParams = (p: any): p is { userId: string; extension: string } => p.userId && p.extension; +const isUserIdndTypeParams = (p: any): p is { userId: string; type: 'free' | 'allocated' | 'available' } => p.userId && p.type; + +API.v1.addRoute( + 'omnichannel/agent/extension', + { authRequired: true }, + { + async post() { + if (!hasPermission(this.userId, 'manage-agent-extension-association')) { + return API.v1.unauthorized(); + } + check( + this.bodyParams, + Match.OneOf( + Match.ObjectIncluding({ + username: String, + extension: String, + }), + Match.ObjectIncluding({ + userId: String, + extension: String, + }), + ), + ); + + const { extension } = this.bodyParams; + let user: IUser | null = null; + + if (!isUserAndExtensionParams(this.bodyParams)) { + if (!this.bodyParams.username) { + return API.v1.notFound(); + } + user = await Users.findOneByAgentUsername(this.bodyParams.username, { + projection: { + _id: 1, + username: 1, + }, + }); + } else { + if (!this.bodyParams.userId) { + return API.v1.notFound(); + } + user = await Users.findOneAgentById(this.bodyParams.userId, { + projection: { + _id: 1, + username: 1, + }, + }); + } + + if (!user) { + return API.v1.notFound('User not found or does not have livechat-agent role'); + } + + try { + logger.debug(`Setting extension ${extension} for agent with id ${user._id}`); + await Users.setExtension(user._id, extension); + return API.v1.success(); + } catch (e) { + logger.error({ msg: 'Extension already in use' }); + return API.v1.failure(`extension already in use ${extension}`); + } + }, + }, +); + +API.v1.addRoute( + 'omnichannel/agent/extension/:username', + { authRequired: true }, + { + // Get the extensions associated with the agent passed as request params. + async get() { + if (!hasPermission(this.userId, 'view-agent-extension-association')) { + return API.v1.unauthorized(); + } + check( + this.urlParams, + Match.ObjectIncluding({ + username: String, + }), + ); + const { username } = this.urlParams; + const user = await Users.findOneByAgentUsername(username, { + projection: { _id: 1 }, + }); + if (!user) { + return API.v1.notFound('User not found'); + } + const extension = await Users.getVoipExtensionByUserId(user._id, { + projection: { + _id: 1, + username: 1, + extension: 1, + }, + }); + if (!extension) { + return API.v1.notFound('Extension not found'); + } + return API.v1.success({ extension }); + }, + + async delete() { + if (!hasPermission(this.userId, 'manage-agent-extension-association')) { + return API.v1.unauthorized(); + } + check( + this.urlParams, + Match.ObjectIncluding({ + username: String, + }), + ); + const { username } = this.urlParams; + const user = await Users.findOneByAgentUsername(username, { + projection: { + _id: 1, + username: 1, + extension: 1, + }, + }); + if (!user) { + return API.v1.notFound(); + } + if (!user.extension) { + logger.debug(`User ${user._id} is not associated with any extension. Skipping`); + return API.v1.success(); + } + + logger.debug(`Removing extension association for user ${user._id} (extension was ${user.extension})`); + await Users.unsetExtension(user._id); + return API.v1.success(); + }, + }, +); + +// Get free extensions +API.v1.addRoute( + 'omnichannel/extension', + { authRequired: true, permissionsRequired: ['manage-agent-extension-association'] }, + { + async get() { + check( + this.queryParams, + Match.OneOf( + Match.ObjectIncluding({ + type: Match.OneOf('free', 'allocated', 'available'), + userId: String, + }), + Match.ObjectIncluding({ + type: Match.OneOf('free', 'allocated', 'available'), + username: String, + }), + ), + ); + const { type } = this.queryParams; + switch ((type as string).toLowerCase()) { + case 'free': { + const extensions = await LivechatVoip.getFreeExtensions(); + if (!extensions) { + return API.v1.failure('Error in finding free extensons'); + } + return API.v1.success({ extensions }); + } + case 'allocated': { + const extensions = await LivechatVoip.getExtensionAllocationDetails(); + if (!extensions) { + return API.v1.failure('Error in allocated extensions'); + } + return API.v1.success({ extensions: extensions.map((e) => e.extension) }); + } + case 'available': { + let user: IUser | null = null; + if (!isUserIdndTypeParams(this.queryParams)) { + user = await Users.findOneByAgentUsername(this.queryParams.username, { + projection: { _id: 1, extension: 1 }, + }); + } else { + user = await Users.findOneAgentById(this.queryParams.userId, { + projection: { _id: 1, extension: 1 }, + }); + } + + const freeExt = await LivechatVoip.getFreeExtensions(); + const extensions = user?.extension ? [user.extension, ...freeExt] : freeExt; + return API.v1.success({ extensions }); + } + default: + return API.v1.notFound(`${type} not found `); + } + }, + }, +); + +API.v1.addRoute( + 'omnichannel/extensions', + { authRequired: true, permissionsRequired: ['manage-agent-extension-association'] }, + { + async get() { + const { offset, count } = this.getPaginationItems(); + const { status, agentId, queues, extension } = this.requestParams(); + + check(status, Match.Maybe(String)); + check(agentId, Match.Maybe(String)); + check(queues, Match.Maybe([String])); + check(extension, Match.Maybe(String)); + + const extensions = await LivechatVoip.getExtensionListWithAgentData(); + const filteredExts = filter(extensions, { status, agentId, queues, extension }); + + // paginating in memory as Asterisk doesn't provide pagination for commands + return API.v1.success({ + extensions: paginate(filteredExts, count, offset), + offset, + count, + total: filteredExts.length, + }); + }, + }, +); + +API.v1.addRoute( + 'omnichannel/agents/available', + { authRequired: true, permissionsRequired: ['manage-agent-extension-association'] }, + { + async get() { + const { offset, count } = this.getPaginationItems(); + const { sort } = this.parseJsonQuery(); + const { text, includeExtension = '' } = this.queryParams; + + const { agents, total } = await LivechatVoip.getAvailableAgents(includeExtension, text, count, offset, sort); + + return API.v1.success({ + agents, + offset, + count, + total, + }); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/voip/queues.ts b/apps/meteor/app/api/server/v1/voip/queues.ts new file mode 100644 index 000000000000..803418f06c09 --- /dev/null +++ b/apps/meteor/app/api/server/v1/voip/queues.ts @@ -0,0 +1,50 @@ +import { Match, check } from 'meteor/check'; +import type { IVoipConnectorResult, IQueueSummary, IQueueMembershipDetails, IQueueMembershipSubscription } from '@rocket.chat/core-typings'; + +import { Voip } from '../../../../../server/sdk'; +import { API } from '../../api'; + +API.v1.addRoute( + 'voip/queues.getSummary', + { authRequired: true }, + { + async get() { + const queueSummary = await Voip.getQueueSummary(); + return API.v1.success({ summary: queueSummary.result as IQueueSummary[] }); + }, + }, +); + +API.v1.addRoute( + 'voip/queues.getQueuedCallsForThisExtension', + { authRequired: true }, + { + async get() { + check( + this.requestParams(), + Match.ObjectIncluding({ + extension: String, + }), + ); + const membershipDetails: IVoipConnectorResult = await Voip.getQueuedCallsForThisExtension(this.requestParams()); + return API.v1.success(membershipDetails.result as IQueueMembershipDetails); + }, + }, +); + +API.v1.addRoute( + 'voip/queues.getMembershipSubscription', + { authRequired: true }, + { + async get() { + check( + this.requestParams(), + Match.ObjectIncluding({ + extension: String, + }), + ); + const membershipDetails: IVoipConnectorResult = await Voip.getQueueMembership(this.requestParams()); + return API.v1.success(membershipDetails.result as IQueueMembershipSubscription); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/voip/rooms.ts b/apps/meteor/app/api/server/v1/voip/rooms.ts new file mode 100644 index 000000000000..1798591f57db --- /dev/null +++ b/apps/meteor/app/api/server/v1/voip/rooms.ts @@ -0,0 +1,262 @@ +import { Random } from 'meteor/random'; +import type { ILivechatAgent, IVoipRoom } from '@rocket.chat/core-typings'; +import { isVoipRoomProps, isVoipRoomsProps, isVoipRoomCloseProps } from '@rocket.chat/rest-typings'; +import { VoipRoom, LivechatVisitors, Users } from '@rocket.chat/models'; + +import { API } from '../../api'; +import { LivechatVoip } from '../../../../../server/sdk'; +import { hasPermission } from '../../../../authorization/server'; +import { typedJsonParse } from '../../../../../lib/typedJSONParse'; + +type DateParam = { start?: string; end?: string }; +const parseDateParams = (date?: string): DateParam => { + return date && typeof date === 'string' ? typedJsonParse(date) : {}; +}; +const validateDateParams = (property: string, date: DateParam = {}): DateParam => { + if (date?.start && isNaN(Date.parse(date.start))) { + throw new Error(`The "${property}.start" query parameter must be a valid date.`); + } + if (date?.end && isNaN(Date.parse(date.end))) { + throw new Error(`The "${property}.end" query parameter must be a valid date.`); + } + return date; +}; +const parseAndValidate = (property: string, date?: string): DateParam => { + return validateDateParams(property, parseDateParams(date)); +}; + +/** + * @openapi + * /voip/server/api/v1/voip/room + * get: + * description: Creates a new room if rid is not passed, else gets an existing room + * based on rid and token . This configures the rate limit. An average call volume in a contact + * center is 600 calls a day + * considering 8 hour shift. Which comes to 1.25 calls per minute. + * we will keep the safe limit which is 5 calls a minute. + * security: + * parameters: + * - name: token + * in: query + * description: The visitor token + * required: true + * schema: + * type: string + * example: ByehQjC44FwMeiLbX + * - name: rid + * in: query + * description: The room id + * required: false + * schema: + * type: string + * example: ByehQjC44FwMeiLbX + * - name: agentId + * in: query + * description: Agent Id + * required: false + * schema: + * type: string + * example: ByehQjC44FwMeiLbX + * responses: + * 200: + * description: Room object and flag indicating whether a new room is created. + * content: + * application/json: + * schema: + * allOf: + * - $ref: '#/components/schemas/ApiSuccessV1' + * - type: object + * properties: + * room: + * type: object + * items: + * $ref: '#/components/schemas/IRoom' + * newRoom: + * type: boolean + * default: + * description: Unexpected error + * content: + * application/json: + * schema: + * $ref: '#/components/schemas/ApiFailureV1' + */ + +const isRoomSearchProps = (props: any): props is { rid: string; token: string } => { + return 'rid' in props && 'token' in props; +}; + +const isRoomCreationProps = (props: any): props is { agentId: string; direction: IVoipRoom['direction'] } => { + return 'agentId' in props && 'direction' in props; +}; + +API.v1.addRoute( + 'voip/room', + { + authRequired: true, + rateLimiterOptions: { numRequestsAllowed: 5, intervalTimeInMS: 60000 }, + permissionsRequired: ['inbound-voip-calls'], + validateParams: isVoipRoomProps, + }, + { + async get() { + const { token } = this.queryParams; + let agentId: string | undefined = undefined; + let direction: IVoipRoom['direction'] = 'inbound'; + let rid: string | undefined = undefined; + + if (isRoomCreationProps(this.queryParams)) { + agentId = this.queryParams.agentId; + direction = this.queryParams.direction; + } + + if (isRoomSearchProps(this.queryParams)) { + rid = this.queryParams.rid; + } + + const guest = await LivechatVisitors.getVisitorByToken(token, {}); + if (!guest) { + return API.v1.failure('invalid-token'); + } + + if (!rid) { + const room = await VoipRoom.findOneOpenByVisitorToken(token, { projection: API.v1.defaultFieldsToExclude }); + if (room) { + return API.v1.success({ room, newRoom: false }); + } + if (!agentId) { + return API.v1.failure('agent-not-found'); + } + + const agentObj: ILivechatAgent = await Users.findOneAgentById(agentId, { + projection: { username: 1 }, + }); + if (!agentObj?.username) { + return API.v1.failure('agent-not-found'); + } + + const { username, _id } = agentObj; + const agent = { agentId: _id, username }; + const rid = Random.id(); + + return API.v1.success( + await LivechatVoip.getNewRoom(guest, agent, rid, direction, { + projection: API.v1.defaultFieldsToExclude, + }), + ); + } + + const room = await VoipRoom.findOneByIdAndVisitorToken(rid, token, { projection: API.v1.defaultFieldsToExclude }); + if (!room) { + return API.v1.failure('invalid-room'); + } + return API.v1.success({ room, newRoom: false }); + }, + }, +); + +API.v1.addRoute( + 'voip/rooms', + { authRequired: true, validateParams: isVoipRoomsProps }, + { + async get() { + const { offset, count } = this.getPaginationItems(); + + const { sort, fields } = this.parseJsonQuery(); + const { agents, open, tags, queue, visitorId, direction, roomName } = this.requestParams(); + const { createdAt: createdAtParam, closedAt: closedAtParam } = this.requestParams(); + + // Reusing same L room permissions for simplicity + const hasAdminAccess = hasPermission(this.userId, 'view-livechat-rooms'); + const hasAgentAccess = hasPermission(this.userId, 'view-l-room') && agents?.includes(this.userId) && agents?.length === 1; + if (!hasAdminAccess && !hasAgentAccess) { + return API.v1.unauthorized(); + } + + const createdAt = parseAndValidate('createdAt', createdAtParam); + const closedAt = parseAndValidate('closedAt', closedAtParam); + + return API.v1.success( + await LivechatVoip.findVoipRooms({ + agents, + open: open === 'true', + tags, + queue, + visitorId, + createdAt, + closedAt, + direction, + roomName, + options: { sort, offset, count, fields }, + }), + ); + }, + }, +); + +/** + * @openapi + * /voip/server/api/v1/voip/room.close + * post: + * description: Closes an open room + * based on rid and token. Setting rate limit for this too + * Because room creation happens 5/minute, rate limit for this api + * is also set to 5/minute. + * security: + * requestBody: + * required: true + * content: + * application/json: + * schema: + * type: object + * properties: + * rid: + * type: string + * token: + * type: string + * responses: + * 200: + * description: rid of closed room and a comment for closing room + * content: + * application/json: + * schema: + * allOf: + * - $ref: '#/components/schemas/ApiSuccessV1' + * - type: object + * properties: + * rid: + * type: string + * comment: + * type: string + * default: + * description: Unexpected error + * content: + * application/json: + * schema: + * $ref: '#/components/schemas/ApiFailureV1' + */ +API.v1.addRoute( + 'voip/room.close', + { authRequired: true, validateParams: isVoipRoomCloseProps, permissionsRequired: ['inbound-voip-calls'] }, + { + async post() { + const { rid, token, options } = this.bodyParams; + + const visitor = await LivechatVisitors.getVisitorByToken(token, {}); + if (!visitor) { + return API.v1.failure('invalid-token'); + } + const room = await LivechatVoip.findRoom(token, rid); + if (!room) { + return API.v1.failure('invalid-room'); + } + if (!room.open) { + return API.v1.failure('room-closed'); + } + const closeResult = await LivechatVoip.closeRoom(visitor, room, this.user, 'voip-call-wrapup', options); + if (!closeResult) { + return API.v1.failure(); + } + return API.v1.success({ rid }); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/voip/server-connection.ts b/apps/meteor/app/api/server/v1/voip/server-connection.ts new file mode 100644 index 000000000000..d784a87e95f1 --- /dev/null +++ b/apps/meteor/app/api/server/v1/voip/server-connection.ts @@ -0,0 +1,59 @@ +import { Match, check } from 'meteor/check'; + +import { API } from '../../api'; +import { Voip } from '../../../../../server/sdk'; + +API.v1.addRoute( + 'voip/managementServer/checkConnection', + { authRequired: true, permissionsRequired: ['manage-voip-contact-center-settings'] }, + { + async get() { + check( + this.requestParams(), + Match.ObjectIncluding({ + host: String, + port: String, + username: String, + password: String, + }), + ); + const { host, port, username, password } = this.requestParams(); + return API.v1.success(await Voip.checkManagementConnection(host, port, username, password)); + }, + }, +); + +API.v1.addRoute( + 'voip/callServer/checkConnection', + { authRequired: true, permissionsRequired: ['manage-voip-contact-center-settings'] }, + { + async get() { + check( + this.requestParams(), + Match.ObjectIncluding({ + websocketUrl: Match.Maybe(String), + host: Match.Maybe(String), + port: Match.Maybe(String), + path: Match.Maybe(String), + }), + ); + const { websocketUrl, host, port, path } = this.requestParams(); + if (!websocketUrl && !(host && port && path)) { + return API.v1.failure('Incorrect / Insufficient Parameters'); + } + let socketUrl = websocketUrl as string; + if (!socketUrl) { + // We will assume that it is always secure. + // This is because you can not have webRTC working with non-secure server. + // It works on non-secure server if it is tested on localhost. + if (parseInt(port as string) !== 443) { + socketUrl = `wss://${host}:${port}/${(path as string).replace('/', '')}`; + } else { + socketUrl = `wss://${host}/${(path as string).replace('/', '')}`; + } + } + + return API.v1.success(await Voip.checkCallserverConnection(socketUrl)); + }, + }, +); diff --git a/apps/meteor/app/api/server/v1/webdav.ts b/apps/meteor/app/api/server/v1/webdav.ts new file mode 100644 index 000000000000..babf3b7889ec --- /dev/null +++ b/apps/meteor/app/api/server/v1/webdav.ts @@ -0,0 +1,53 @@ +import Ajv from 'ajv'; + +import { API } from '../api'; +import { findWebdavAccountsByUserId } from '../lib/webdav'; + +// TO-DO: remove this AJV instance and import one from the core-typings +const ajv = new Ajv({ coerceTypes: true }); + +type POSTRemoveWebdavAccount = { + accountId: string; +}; + +const POSTRemoveWebdavAccountSchema = { + type: 'object', + properties: { + accountId: { + type: 'string', + }, + }, + required: ['accountId'], + additionalProperties: false, +}; + +export const isPOSTRemoveWebdavAccount = ajv.compile(POSTRemoveWebdavAccountSchema); + +API.v1.addRoute( + 'webdav.getMyAccounts', + { authRequired: true }, + { + async get() { + return API.v1.success({ + accounts: await findWebdavAccountsByUserId({ uid: this.userId }), + }); + }, + }, +); + +API.v1.addRoute( + 'webdav.removeWebdavAccount', + { + authRequired: true, + validateParams: isPOSTRemoveWebdavAccount, + }, + { + async post() { + const { accountId } = this.bodyParams; + + const result = Meteor.call('removeWebdavAccount', accountId); + + return API.v1.success({ result }); + }, + }, +); diff --git a/apps/meteor/app/apple/client/index.ts b/apps/meteor/app/apple/client/index.ts new file mode 100644 index 000000000000..3e4d15a67fe1 --- /dev/null +++ b/apps/meteor/app/apple/client/index.ts @@ -0,0 +1,4 @@ +import { CustomOAuth } from '../../custom-oauth/client/custom_oauth_client'; +import { config } from '../lib/config'; + +new CustomOAuth('apple', config); diff --git a/apps/meteor/app/apple/lib/config.ts b/apps/meteor/app/apple/lib/config.ts new file mode 100644 index 000000000000..14f746b19a09 --- /dev/null +++ b/apps/meteor/app/apple/lib/config.ts @@ -0,0 +1,10 @@ +export const config = { + serverURL: 'https://appleid.apple.com', + authorizePath: '/auth/authorize?response_mode=form_post', + responseType: 'code id_token', + tokenPath: '/auth/token', + scope: 'name email', + mergeUsers: true, + accessTokenParam: 'access_token', + loginStyle: 'popup', +}; diff --git a/apps/meteor/app/apple/server/AppleCustomOAuth.ts b/apps/meteor/app/apple/server/AppleCustomOAuth.ts new file mode 100644 index 000000000000..01c5027a44fb --- /dev/null +++ b/apps/meteor/app/apple/server/AppleCustomOAuth.ts @@ -0,0 +1,72 @@ +import { Accounts } from 'meteor/accounts-base'; +import { HTTP } from 'meteor/http'; +import NodeRSA from 'node-rsa'; +import { KJUR } from 'jsrsasign'; + +import { CustomOAuth } from '../../custom-oauth/server/custom_oauth_server'; +import { MeteorError } from '../../../server/sdk/errors'; + +const isValidAppleJWT = (identityToken: string, header: any): any => { + const applePublicKeys = HTTP.get('https://appleid.apple.com/auth/keys').data.keys as any; + const { kid } = header; + + const key = applePublicKeys.find((k: any) => k.kid === kid); + + const pubKey = new NodeRSA(); + pubKey.importKey({ n: Buffer.from(key.n, 'base64'), e: Buffer.from(key.e, 'base64') }, 'components-public'); + const userKey = pubKey.exportKey('public'); + + try { + return KJUR.jws.JWS.verify(identityToken, userKey, ['RS256']); + } catch { + return false; + } +}; + +export class AppleCustomOAuth extends CustomOAuth { + getIdentity(_accessToken: string, query: Record): any { + const { id_token: identityToken, user: userStr = '' } = query; + + let user = {} as any; + try { + user = JSON.parse(userStr); + } catch (e) { + // ignore + } + + const decodedToken = KJUR.jws.JWS.parse(identityToken); + + if (!isValidAppleJWT(identityToken, decodedToken.headerObj)) { + return { + type: 'apple', + error: new MeteorError(Accounts.LoginCancelledError.numericError, 'identityToken is a invalid JWT'), + }; + } + + const { iss, sub, email } = decodedToken.payloadObj as any; + if (!iss) { + return { + type: 'apple', + error: new MeteorError(Accounts.LoginCancelledError.numericError, 'Insufficient data in auth response token'), + }; + } + + const serviceData = { + id: sub, + email, + name: '', + }; + + if (email) { + serviceData.email = email; + } + + if (user?.name) { + serviceData.name = `${user.name.firstName}${user.name.middleName ? ` ${user.name.middleName}` : ''}${ + user.name.lastName ? ` ${user.name.lastName}` : '' + }`; + } + + return serviceData; + } +} diff --git a/apps/meteor/app/apple/server/appleOauthRegisterService.ts b/apps/meteor/app/apple/server/appleOauthRegisterService.ts new file mode 100644 index 000000000000..c7f01a680917 --- /dev/null +++ b/apps/meteor/app/apple/server/appleOauthRegisterService.ts @@ -0,0 +1,77 @@ +import { KJUR } from 'jsrsasign'; +import { ServiceConfiguration } from 'meteor/service-configuration'; + +import { settings, settingsRegistry } from '../../settings/server'; +import { config } from '../lib/config'; +import { AppleCustomOAuth } from './AppleCustomOAuth'; + +export const AppleOAuth = new AppleCustomOAuth('apple', config); + +settingsRegistry.addGroup('OAuth', function () { + this.section('Apple', function () { + this.add('Accounts_OAuth_Apple', false, { type: 'boolean', public: true }); + + this.add('Accounts_OAuth_Apple_id', '', { type: 'string', public: true }); + this.add('Accounts_OAuth_Apple_secretKey', '', { type: 'string', multiline: true }); + + this.add('Accounts_OAuth_Apple_iss', '', { type: 'string' }); + this.add('Accounts_OAuth_Apple_kid', '', { type: 'string' }); + }); +}); + +settings.watchMultiple( + [ + 'Accounts_OAuth_Apple', + 'Accounts_OAuth_Apple_id', + 'Accounts_OAuth_Apple_secretKey', + 'Accounts_OAuth_Apple_iss', + 'Accounts_OAuth_Apple_kid', + ], + ([enabled, clientId, serverSecret, iss, kid]) => { + if (!enabled) { + return ServiceConfiguration.configurations.remove({ + service: 'apple', + }); + } + + const HEADER = { + kid, + alg: 'ES256', + }; + + const now = new Date(); + const exp = new Date(); + exp.setMonth(exp.getMonth() + 5); // from Apple docs expiration time must no be greater than 6 months + + const secret = KJUR.jws.JWS.sign( + null, + HEADER, + { + iss, + iat: Math.floor(now.getTime() / 1000), + exp: Math.floor(exp.getTime() / 1000), + aud: 'https://appleid.apple.com', + sub: clientId, + }, + serverSecret as string, + ); + + ServiceConfiguration.configurations.upsert( + { + service: 'apple', + }, + { + $set: { + showButton: true, + secret, + enabled: settings.get('Accounts_OAuth_Apple'), + loginStyle: 'popup', + clientId, + buttonLabelText: 'Sign in with Apple', + buttonColor: '#000', + buttonLabelColor: '#FFF', + }, + }, + ); + }, +); diff --git a/app/apple/server/startup.ts b/apps/meteor/app/apple/server/index.ts similarity index 100% rename from app/apple/server/startup.ts rename to apps/meteor/app/apple/server/index.ts diff --git a/app/apps/.gitignore b/apps/meteor/app/apps/.gitignore similarity index 100% rename from app/apps/.gitignore rename to apps/meteor/app/apps/.gitignore diff --git a/app/apps/README.md b/apps/meteor/app/apps/README.md similarity index 100% rename from app/apps/README.md rename to apps/meteor/app/apps/README.md diff --git a/apps/meteor/app/apps/client/@types/IOrchestrator.ts b/apps/meteor/app/apps/client/@types/IOrchestrator.ts new file mode 100644 index 000000000000..7ac37be4df84 --- /dev/null +++ b/apps/meteor/app/apps/client/@types/IOrchestrator.ts @@ -0,0 +1,174 @@ +import type { ISetting } from '@rocket.chat/apps-engine/definition/settings/ISetting'; +import type { App } from '@rocket.chat/core-typings'; + +export interface IDetailedDescription { + raw: string; + rendered: string; +} + +export interface IDetailedChangelog { + raw: string; + rendered: string; +} + +export interface IAuthor { + name: string; + support: string; + homepage: string; +} + +export interface ILicense { + license: string; + version: number; + expireDate: Date; +} + +export interface ISubscriptionInfo { + typeOf: string; + status: string; + statusFromBilling: boolean; + isSeatBased: boolean; + seats: number; + maxSeats: number; + license: ILicense; + startDate: Date; + periodEnd: Date; + endDate: Date; + externallyManaged: boolean; + isSubscribedViaBundle: boolean; +} + +export interface IPermission { + name: string; + scopes: string[]; +} + +export interface ILatest { + internalId: string; + id: string; + name: string; + nameSlug: string; + version: string; + categories: string[]; + description: string; + detailedDescription: IDetailedDescription; + detailedChangelog: IDetailedChangelog; + requiredApiVersion: string; + author: IAuthor; + classFile: string; + iconFile: string; + iconFileData: string; + status: string; + isVisible: boolean; + createdDate: Date; + modifiedDate: Date; + isPurchased: boolean; + isSubscribed: boolean; + subscriptionInfo: ISubscriptionInfo; + compiled: boolean; + compileJobId: string; + changesNote: string; + languages: string[]; + privacyPolicySummary: string; + internalChangesNote: string; + permissions: IPermission[]; +} + +export interface IBundledIn { + bundleId: string; + bundleName: string; + addonTierId: string; +} + +export interface IILicense { + license: string; + version: number; + expireDate: Date; +} + +export interface ITier { + perUnit: boolean; + minimum: number; + maximum: number; + price: number; + refId: string; +} + +export interface IPricingPlan { + id: string; + enabled: boolean; + price: number; + trialDays: number; + strategy: string; + isPerSeat: boolean; + tiers: ITier[]; +} + +export enum EAppPurchaseType { + PurchaseTypeEmpty = '', + PurchaseTypeBuy = 'buy', + PurchaseTypeSubscription = 'subscription', +} + +export interface ILanguageInfo { + Params: string; + Description: string; + Setting_Name: string; + Setting_Description: string; +} + +export interface ILanguages { + [key: string]: ILanguageInfo; +} + +export interface IAppLanguage { + id: string; + languages: ILanguages; +} + +export interface IAppExternalURL { + url: string; +} + +export interface ICategory { + createdDate: Date; + description: string; + id: string; + modifiedDate: Date; + title: string; +} + +// export interface IDeletedInstalledApp { +// app: IAppInfo; +// success: boolean; +// } + +export interface IAppSynced { + app: App; + success: boolean; +} + +export interface IScreenshot { + id: string; + appId: string; + fileName: string; + altText: string; + accessUrl: string; + thumbnailUrl: string; + createdAt: Date; + modifiedAt: Date; +} + +export interface IAppScreenshots { + screenshots: IScreenshot[]; + success: boolean; +} + +export interface ISettings { + [key: string]: ISetting; +} + +export interface ISettingsReturn { + settings: ISettings; + success: boolean; +} diff --git a/app/apps/client/RealAppsEngineUIHost.js b/apps/meteor/app/apps/client/RealAppsEngineUIHost.js similarity index 94% rename from app/apps/client/RealAppsEngineUIHost.js rename to apps/meteor/app/apps/client/RealAppsEngineUIHost.js index c7d15fd467ef..6a73e7f38a7e 100644 --- a/app/apps/client/RealAppsEngineUIHost.js +++ b/apps/meteor/app/apps/client/RealAppsEngineUIHost.js @@ -29,7 +29,7 @@ export class RealAppsEngineUIHost extends AppsEngineUIHost { let cachedMembers = []; try { - const { members } = await APIClient.get('v1/groups.members', { roomId: id }); + const { members } = await APIClient.get('/v1/groups.members', { roomId: id }); cachedMembers = members.map(({ _id, username }) => ({ id: _id, diff --git a/app/apps/client/communication/index.js b/apps/meteor/app/apps/client/communication/index.js similarity index 100% rename from app/apps/client/communication/index.js rename to apps/meteor/app/apps/client/communication/index.js diff --git a/apps/meteor/app/apps/client/communication/websockets.js b/apps/meteor/app/apps/client/communication/websockets.js new file mode 100644 index 000000000000..67f03e0df1ee --- /dev/null +++ b/apps/meteor/app/apps/client/communication/websockets.js @@ -0,0 +1,63 @@ +import { Meteor } from 'meteor/meteor'; +import { Emitter } from '@rocket.chat/emitter'; + +import { slashCommands, APIClient } from '../../../utils'; +import { CachedCollectionManager } from '../../../ui-cached-collection'; +import { loadButtons } from '../../../ui-message/client/ActionButtonSyncer'; + +export const AppEvents = Object.freeze({ + APP_ADDED: 'app/added', + APP_REMOVED: 'app/removed', + APP_UPDATED: 'app/updated', + APP_STATUS_CHANGE: 'app/statusUpdate', + APP_SETTING_UPDATED: 'app/settingUpdated', + COMMAND_ADDED: 'command/added', + COMMAND_DISABLED: 'command/disabled', + COMMAND_UPDATED: 'command/updated', + COMMAND_REMOVED: 'command/removed', + ACTIONS_CHANGED: 'actions/changed', +}); + +export class AppWebsocketReceiver extends Emitter { + constructor() { + super(); + + this.streamer = new Meteor.Streamer('apps'); + + CachedCollectionManager.onLogin(() => { + this.listenStreamerEvents(); + }); + } + + listenStreamerEvents() { + Object.values(AppEvents).forEach((eventName) => { + this.streamer.on(eventName, this.emit.bind(this, eventName)); + }); + + this.streamer.on(AppEvents.COMMAND_ADDED, this.onCommandAddedOrUpdated); + this.streamer.on(AppEvents.COMMAND_UPDATED, this.onCommandAddedOrUpdated); + this.streamer.on(AppEvents.COMMAND_REMOVED, this.onCommandRemovedOrDisabled); + this.streamer.on(AppEvents.COMMAND_DISABLED, this.onCommandRemovedOrDisabled); + this.streamer.on(AppEvents.ACTIONS_CHANGED, this.onActionsChanged); + } + + registerListener(event, listener) { + this.on(event, listener); + } + + unregisterListener(event, listener) { + this.off(event, listener); + } + + onCommandAddedOrUpdated = (command) => { + APIClient.get('/v1/commands.get', { command }).then((result) => { + slashCommands.add(result.command); + }); + }; + + onCommandRemovedOrDisabled = (command) => { + delete slashCommands.commands[command]; + }; + + onActionsChanged = () => loadButtons(); +} diff --git a/app/apps/client/gameCenter/gameCenter.html b/apps/meteor/app/apps/client/gameCenter/gameCenter.html similarity index 100% rename from app/apps/client/gameCenter/gameCenter.html rename to apps/meteor/app/apps/client/gameCenter/gameCenter.html diff --git a/app/apps/client/gameCenter/gameCenter.js b/apps/meteor/app/apps/client/gameCenter/gameCenter.js similarity index 91% rename from app/apps/client/gameCenter/gameCenter.js rename to apps/meteor/app/apps/client/gameCenter/gameCenter.js index bd3e19669302..787f315de39e 100644 --- a/app/apps/client/gameCenter/gameCenter.js +++ b/apps/meteor/app/apps/client/gameCenter/gameCenter.js @@ -3,15 +3,15 @@ import { ReactiveVar } from 'meteor/reactive-var'; import { modal } from '../../../ui-utils/client'; import { APIClient, t } from '../../../utils/client'; +import { dispatchToastMessage } from '../../../../client/lib/toast'; import './gameCenter.html'; -import { handleError } from '../../../../client/lib/utils/handleError'; const getExternalComponents = async (instance) => { try { - const { externalComponents } = await APIClient.get('apps/externalComponents'); + const { externalComponents } = await APIClient.get('/apps/externalComponents'); instance.games.set(externalComponents); - } catch (e) { - handleError(e); + } catch (error) { + dispatchToastMessage({ type: 'error', message: error }); } instance.isLoading.set(false); diff --git a/app/apps/client/gameCenter/gameContainer.html b/apps/meteor/app/apps/client/gameCenter/gameContainer.html similarity index 100% rename from app/apps/client/gameCenter/gameContainer.html rename to apps/meteor/app/apps/client/gameCenter/gameContainer.html diff --git a/app/apps/client/gameCenter/gameContainer.js b/apps/meteor/app/apps/client/gameCenter/gameContainer.js similarity index 94% rename from app/apps/client/gameCenter/gameContainer.js rename to apps/meteor/app/apps/client/gameCenter/gameContainer.js index 7ee2285ee901..d954c06d1c25 100644 --- a/app/apps/client/gameCenter/gameContainer.js +++ b/apps/meteor/app/apps/client/gameCenter/gameContainer.js @@ -62,7 +62,7 @@ Template.GameContainer.events({ Template.GameContainer.onCreated(async () => { const externalComponent = await getExternalComponent(); - APIClient.post('apps/externalComponentEvent', { + APIClient.post('/apps/externalComponentEvent', { event: 'IPostExternalComponentOpened', externalComponent, }); @@ -71,7 +71,7 @@ Template.GameContainer.onCreated(async () => { Template.GameContainer.onDestroyed(async () => { const externalComponent = await getExternalComponent(); - APIClient.post('apps/externalComponentEvent', { + APIClient.post('/apps/externalComponentEvent', { event: 'IPostExternalComponentClosed', externalComponent, }); diff --git a/app/apps/client/gameCenter/invitePlayers.html b/apps/meteor/app/apps/client/gameCenter/invitePlayers.html similarity index 100% rename from app/apps/client/gameCenter/invitePlayers.html rename to apps/meteor/app/apps/client/gameCenter/invitePlayers.html diff --git a/app/apps/client/gameCenter/invitePlayers.js b/apps/meteor/app/apps/client/gameCenter/invitePlayers.js similarity index 97% rename from app/apps/client/gameCenter/invitePlayers.js rename to apps/meteor/app/apps/client/gameCenter/invitePlayers.js index 9257bda6cfad..a6e0e1ac6110 100644 --- a/app/apps/client/gameCenter/invitePlayers.js +++ b/apps/meteor/app/apps/client/gameCenter/invitePlayers.js @@ -8,7 +8,7 @@ import { Tracker } from 'meteor/tracker'; import { Session } from 'meteor/session'; import { AutoComplete } from '../../../meteor-autocomplete/client'; -import { roomTypes } from '../../../utils/client'; +import { roomCoordinator } from '../../../../client/lib/rooms/roomCoordinator'; import { ChatRoom } from '../../../models/client'; import { modal } from '../../../ui-utils/client'; import { callWithErrorHandling } from '../../../../client/lib/utils/callWithErrorHandling'; @@ -84,7 +84,7 @@ Template.InvitePlayers.events({ try { const result = await callWithErrorHandling('createPrivateGroup', privateGroupName, users); - roomTypes.openRouteLink(result.t, result); + roomCoordinator.openRouteLink(result.t, result); // This ensures the message is only sent after the // user has been redirected to the new room, preventing a diff --git a/apps/meteor/app/apps/client/gameCenter/tabBar.ts b/apps/meteor/app/apps/client/gameCenter/tabBar.ts new file mode 100644 index 000000000000..6ca358e43b57 --- /dev/null +++ b/apps/meteor/app/apps/client/gameCenter/tabBar.ts @@ -0,0 +1,27 @@ +import { useMemo } from 'react'; +import { useEndpoint } from '@rocket.chat/ui-contexts'; +import { useQuery } from '@tanstack/react-query'; + +import { addAction } from '../../../../client/views/room/lib/Toolbox'; + +addAction('game-center', () => { + const getExternalComponents = useEndpoint('GET', '/apps/externalComponents'); + const result = useQuery(['apps/external-components'], () => getExternalComponents(), { + staleTime: 10_000, + }); + + return useMemo( + () => + result.isSuccess && result.data.externalComponents.length > 0 + ? { + groups: ['channel', 'group', 'direct', 'direct_multiple', 'team'], + id: 'game-center', + title: 'Apps_Game_Center', + icon: 'game', + template: 'GameCenter', + order: -1, + } + : null, + [result.data?.externalComponents.length, result.isSuccess], + ); +}); diff --git a/app/apps/client/i18n.js b/apps/meteor/app/apps/client/i18n.js similarity index 100% rename from app/apps/client/i18n.js rename to apps/meteor/app/apps/client/i18n.js diff --git a/app/apps/client/index.js b/apps/meteor/app/apps/client/index.js similarity index 100% rename from app/apps/client/index.js rename to apps/meteor/app/apps/client/index.js diff --git a/apps/meteor/app/apps/client/orchestrator.ts b/apps/meteor/app/apps/client/orchestrator.ts new file mode 100644 index 000000000000..3bc2cf8bc028 --- /dev/null +++ b/apps/meteor/app/apps/client/orchestrator.ts @@ -0,0 +1,256 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +import type { ISetting } from '@rocket.chat/apps-engine/definition/settings'; +import { AppClientManager } from '@rocket.chat/apps-engine/client/AppClientManager'; +import type { IApiEndpointMetadata } from '@rocket.chat/apps-engine/definition/api'; +import { AppStatus } from '@rocket.chat/apps-engine/definition/AppStatus'; +import type { IPermission } from '@rocket.chat/apps-engine/definition/permissions/IPermission'; +import type { IAppStorageItem } from '@rocket.chat/apps-engine/server/storage/IAppStorageItem'; +import { Meteor } from 'meteor/meteor'; +import { Tracker } from 'meteor/tracker'; +import type { AppScreenshot, Serialized } from '@rocket.chat/core-typings'; + +import type { App } from '../../../client/views/admin/apps/types'; +import { dispatchToastMessage } from '../../../client/lib/toast'; +import { settings } from '../../settings/client'; +import { CachedCollectionManager } from '../../ui-cached-collection'; +import { createDeferredValue } from '../lib/misc/DeferredValue'; +import type { + // IAppFromMarketplace, + IAppLanguage, + IAppExternalURL, + ICategory, + // IAppSynced, + // IAppScreenshots, + // IScreenshot, +} from './@types/IOrchestrator'; +import { AppWebsocketReceiver } from './communication'; +import { handleI18nResources } from './i18n'; +import { RealAppsEngineUIHost } from './RealAppsEngineUIHost'; +import { APIClient } from '../../utils/client'; +import { hasAtLeastOnePermission } from '../../authorization/client'; + +class AppClientOrchestrator { + private _appClientUIHost: RealAppsEngineUIHost; + + private _manager: AppClientManager; + + private isLoaded: boolean; + + private ws: AppWebsocketReceiver; + + private setEnabled: (value: boolean | PromiseLike) => void; + + private deferredIsEnabled: Promise | undefined; + + constructor() { + this._appClientUIHost = new RealAppsEngineUIHost(); + this._manager = new AppClientManager(this._appClientUIHost); + this.isLoaded = false; + const { promise, resolve } = createDeferredValue(); + this.deferredIsEnabled = promise; + this.setEnabled = resolve; + } + + public async load(isEnabled: boolean): Promise { + if (!this.isLoaded) { + this.ws = new AppWebsocketReceiver(); + this.isLoaded = true; + } + + await handleI18nResources(); + + this.setEnabled(isEnabled); + } + + public getWsListener(): AppWebsocketReceiver { + return this.ws; + } + + public getAppClientManager(): AppClientManager { + return this._manager; + } + + public handleError(error: unknown): void { + if (hasAtLeastOnePermission(['manage-apps'])) { + dispatchToastMessage({ + type: 'error', + message: error, + }); + } + } + + public async screenshots(appId: string): Promise { + const { screenshots } = await APIClient.get(`/apps/${appId}/screenshots`); + return screenshots; + } + + public isEnabled(): Promise | undefined { + return this.deferredIsEnabled; + } + + public async getApps(): Promise { + const result = await APIClient.get<'/apps'>('/apps'); + + if ('apps' in result) { + // TODO: chapter day: multiple results are returned, but we only need one + return result.apps as App[]; + } + throw new Error('Invalid response from API'); + } + + public async getAppsFromMarketplace(): Promise { + const result = await APIClient.get('/apps', { marketplace: 'true' }); + + if (!Array.isArray(result)) { + // TODO: chapter day: multiple results are returned, but we only need one + throw new Error('Invalid response from API'); + } + + return (result as App[]).map((app: App) => { + const { latest, price, pricingPlans, purchaseType, isEnterpriseOnly, modifiedAt, bundledIn } = app; + return { + ...latest, + price, + pricingPlans, + purchaseType, + isEnterpriseOnly, + modifiedAt, + bundledIn, + }; + }); + } + + public async getAppsOnBundle(bundleId: string): Promise { + const { apps } = await APIClient.get(`/apps/bundles/${bundleId}/apps`); + return apps; + } + + public async getAppsLanguages(): Promise { + const { apps } = await APIClient.get('/apps/languages'); + return apps; + } + + public async getApp(appId: string): Promise { + const { app } = await APIClient.get(`/apps/${appId}` as any); + return app; + } + + public async getAppFromMarketplace(appId: string, version: string): Promise<{ app: App; success: boolean }> { + const result = await APIClient.get( + `/apps/${appId}` as any, + { + marketplace: 'true', + version, + } as any, + ); + return result; + } + + public async getLatestAppFromMarketplace(appId: string, version: string): Promise { + const { app } = await APIClient.get( + `/apps/${appId}` as any, + { + marketplace: 'true', + update: 'true', + appVersion: version, + } as any, + ); + return app; + } + + public async setAppSettings(appId: string, settings: ISetting[]): Promise { + await APIClient.post(`/apps/${appId}/settings`, { settings }); + } + + public async getAppApis(appId: string): Promise { + const { apis } = await APIClient.get(`/apps/${appId}/apis`); + return apis; + } + + public async getAppLanguages(appId: string): Promise { + const { languages } = await APIClient.get(`/apps/${appId}/languages`); + return languages; + } + + public async installApp(appId: string, version: string, permissionsGranted: IPermission[]): Promise { + const { app } = await APIClient.post('/apps', { + appId, + marketplace: true, + version, + permissionsGranted, + }); + return app; + } + + public async updateApp(appId: string, version: string, permissionsGranted: IPermission[]): Promise { + const result = (await (APIClient.post as any)(`/apps/${appId}` as any, { + appId, + marketplace: true, + version, + permissionsGranted, + })) as any; + + if ('app' in result) { + return result; + } + throw new Error('App not found'); + } + + public async setAppStatus(appId: string, status: AppStatus): Promise { + const { status: effectiveStatus } = await APIClient.post(`/apps/${appId}/status`, { status }); + return effectiveStatus; + } + + public disableApp(appId: string): Promise { + return this.setAppStatus(appId, AppStatus.MANUALLY_ENABLED); + } + + public async buildExternalUrl(appId: string, purchaseType: 'buy' | 'subscription' = 'buy', details = false): Promise { + const result = await APIClient.get('/apps', { + buildExternalUrl: 'true', + appId, + purchaseType, + details: `${details}`, + }); + + if ('url' in result) { + return result; + } + throw new Error('Failed to build external url'); + } + + public async getCategories(): Promise> { + const result = await APIClient.get('/apps', { categories: 'true' }); + + if (Array.isArray(result)) { + // TODO: chapter day: multiple results are returned, but we only need one + return result as Serialized[]; + } + throw new Error('Failed to get categories'); + } + + public getUIHost(): RealAppsEngineUIHost { + return this._appClientUIHost; + } +} + +export const Apps = new AppClientOrchestrator(); + +Meteor.startup(() => { + CachedCollectionManager.onLogin(() => { + Meteor.call('apps/is-enabled', (error: Error, isEnabled: boolean) => { + if (error) { + Apps.handleError(error); + return; + } + + Apps.getAppClientManager().initialize(); + Apps.load(isEnabled); + }); + }); + + Tracker.autorun(() => { + const isEnabled = settings.get('/Apps_Framework_enabled'); + Apps.load(isEnabled); + }); +}); diff --git a/apps/meteor/app/apps/lib/misc/DeferredValue.ts b/apps/meteor/app/apps/lib/misc/DeferredValue.ts new file mode 100644 index 000000000000..6089920024c1 --- /dev/null +++ b/apps/meteor/app/apps/lib/misc/DeferredValue.ts @@ -0,0 +1,33 @@ +export type ResolveHandler = (value: T | PromiseLike) => void; +export type RejectHandler = (reason: unknown) => void; + +class Deferred { + promise: Promise; + + resolve!: ResolveHandler; + + reject!: RejectHandler; + + constructor() { + this.promise = new Promise((_resolve, _reject) => { + this.resolve = _resolve; + this.reject = _reject; + }); + } + + get computedPromise(): Promise { + return this.promise; + } + + get computedResolve(): ResolveHandler { + return this.resolve; + } + + get computedReject(): RejectHandler { + return this.reject; + } +} + +const createDeferredValue = (): Deferred => new Deferred(); + +export { createDeferredValue }; diff --git a/app/apps/lib/misc/Utilities.js b/apps/meteor/app/apps/lib/misc/Utilities.js similarity index 100% rename from app/apps/lib/misc/Utilities.js rename to apps/meteor/app/apps/lib/misc/Utilities.js diff --git a/app/apps/lib/misc/determineFileType.js b/apps/meteor/app/apps/lib/misc/determineFileType.js similarity index 100% rename from app/apps/lib/misc/determineFileType.js rename to apps/meteor/app/apps/lib/misc/determineFileType.js diff --git a/apps/meteor/app/apps/lib/misc/formatAppInstanceForRest.ts b/apps/meteor/app/apps/lib/misc/formatAppInstanceForRest.ts new file mode 100644 index 000000000000..bb17a78b24b3 --- /dev/null +++ b/apps/meteor/app/apps/lib/misc/formatAppInstanceForRest.ts @@ -0,0 +1,27 @@ +import type { AppStatus } from '@rocket.chat/apps-engine/definition/AppStatus'; +import type { IAppInfo } from '@rocket.chat/apps-engine/definition/metadata'; +import type { AppLicenseValidationResult } from '@rocket.chat/apps-engine/server/marketplace/license'; +import type { ProxiedApp } from '@rocket.chat/apps-engine/server/ProxiedApp'; +import type { IAppStorageItem } from '@rocket.chat/apps-engine/server/storage'; + +export interface IAppInfoRest extends IAppInfo { + status: AppStatus; + languages: IAppStorageItem['languageContent']; + licenseValidation?: AppLicenseValidationResult; +} + +export function formatAppInstanceForRest(app: ProxiedApp): IAppInfoRest { + const appRest: IAppInfoRest = { + ...app.getInfo(), + status: app.getStatus(), + languages: app.getStorageItem().languageContent, + }; + + const licenseValidation = app.getLatestLicenseValidationResult(); + + if (licenseValidation.hasErrors || licenseValidation.hasWarnings) { + appRest.licenseValidation = licenseValidation; + } + + return appRest; +} diff --git a/app/apps/lib/misc/transformMappedData.js b/apps/meteor/app/apps/lib/misc/transformMappedData.js similarity index 100% rename from app/apps/lib/misc/transformMappedData.js rename to apps/meteor/app/apps/lib/misc/transformMappedData.js diff --git a/app/apps/server/bridges/activation.ts b/apps/meteor/app/apps/server/bridges/activation.ts similarity index 80% rename from app/apps/server/bridges/activation.ts rename to apps/meteor/app/apps/server/bridges/activation.ts index ac0a2654cae8..511d3136dceb 100644 --- a/app/apps/server/bridges/activation.ts +++ b/apps/meteor/app/apps/server/bridges/activation.ts @@ -1,9 +1,9 @@ import { AppActivationBridge as ActivationBridge } from '@rocket.chat/apps-engine/server/bridges/AppActivationBridge'; -import { ProxiedApp } from '@rocket.chat/apps-engine/server/ProxiedApp'; -import { AppStatus } from '@rocket.chat/apps-engine/definition/AppStatus'; +import type { ProxiedApp } from '@rocket.chat/apps-engine/server/ProxiedApp'; +import type { AppStatus } from '@rocket.chat/apps-engine/definition/AppStatus'; +import { Users } from '@rocket.chat/models'; -import { Users } from '../../../models/server/raw'; -import { AppServerOrchestrator } from '../orchestrator'; +import type { AppServerOrchestrator } from '../orchestrator'; export class AppActivationBridge extends ActivationBridge { // eslint-disable-next-line no-empty-function diff --git a/apps/meteor/app/apps/server/bridges/api.ts b/apps/meteor/app/apps/server/bridges/api.ts new file mode 100644 index 000000000000..d60a120dcfbb --- /dev/null +++ b/apps/meteor/app/apps/server/bridges/api.ts @@ -0,0 +1,132 @@ +import { Meteor } from 'meteor/meteor'; +import type { Response, Request, IRouter, RequestHandler } from 'express'; +import express from 'express'; +import { WebApp } from 'meteor/webapp'; +import { ApiBridge } from '@rocket.chat/apps-engine/server/bridges/ApiBridge'; +import type { IApiRequest, IApiEndpoint, IApi } from '@rocket.chat/apps-engine/definition/api'; +import type { AppApi } from '@rocket.chat/apps-engine/server/managers/AppApi'; +import type { RequestMethod } from '@rocket.chat/apps-engine/definition/accessors'; + +import type { AppServerOrchestrator } from '../orchestrator'; +import { authenticationMiddleware } from '../../../api/server/middlewares/authentication'; + +const apiServer = express(); + +apiServer.disable('x-powered-by'); + +WebApp.connectHandlers.use(apiServer); + +interface IRequestWithPrivateHash extends Request { + _privateHash?: string; + content?: any; +} + +export class AppApisBridge extends ApiBridge { + appRouters: Map; + + // eslint-disable-next-line no-empty-function + constructor(private readonly orch: AppServerOrchestrator) { + super(); + this.appRouters = new Map(); + + apiServer.use('/api/apps/private/:appId/:hash', (req: IRequestWithPrivateHash, res: Response) => { + const notFound = (): Response => res.sendStatus(404); + + const router = this.appRouters.get(req.params.appId); + + if (router) { + req._privateHash = req.params.hash; + return router(req, res, notFound); + } + + notFound(); + }); + + apiServer.use('/api/apps/public/:appId', (req: Request, res: Response) => { + const notFound = (): Response => res.sendStatus(404); + + const router = this.appRouters.get(req.params.appId); + + if (router) { + return router(req, res, notFound); + } + + notFound(); + }); + } + + public registerApi({ api, computedPath, endpoint }: AppApi, appId: string): void { + this.orch.debugLog(`The App ${appId} is registering the api: "${endpoint.path}" (${computedPath})`); + + this._verifyApi(api, endpoint); + + let router = this.appRouters.get(appId); + + if (!router) { + router = express.Router(); // eslint-disable-line new-cap + this.appRouters.set(appId, router); + } + + const method = 'all'; + + let routePath = endpoint.path.trim(); + if (!routePath.startsWith('/')) { + routePath = `/${routePath}`; + } + + if (router[method] instanceof Function) { + router[method](routePath, this._authMiddleware(endpoint, appId), Meteor.bindEnvironment(this._appApiExecutor(endpoint, appId))); + } + } + + public unregisterApis(appId: string): void { + this.orch.debugLog(`The App ${appId} is unregistering all apis`); + + if (this.appRouters.get(appId)) { + this.appRouters.delete(appId); + } + } + + private _authMiddleware(endpoint: IApiEndpoint, _appId: string): RequestHandler { + const authFunction = authenticationMiddleware({ rejectUnauthorized: !!endpoint.authRequired }); + return Meteor.bindEnvironment(authFunction); + } + + private _verifyApi(api: IApi, endpoint: IApiEndpoint): void { + if (typeof api !== 'object') { + throw new Error('Invalid Api parameter provided, it must be a valid IApi object.'); + } + + if (typeof endpoint.path !== 'string') { + throw new Error('Invalid Api parameter provided, it must be a valid IApi object.'); + } + } + + private _appApiExecutor(endpoint: IApiEndpoint, appId: string): RequestHandler { + return (req: IRequestWithPrivateHash, res: Response): void => { + const request: IApiRequest = { + method: req.method.toLowerCase() as RequestMethod, + headers: req.headers as { [key: string]: string }, + query: (req.query as { [key: string]: string }) || {}, + params: req.params || {}, + content: req.body, + privateHash: req._privateHash, + user: req.user && this.orch.getConverters()?.get('users')?.convertToApp(req.user), + }; + + this.orch + .getManager() + ?.getApiManager() + .executeApi(appId, endpoint.path, request) + .then(({ status, headers = {}, content }) => { + res.set(headers); + res.status(status); + res.send(content); + }) + .catch((reason) => { + // Should we handle this as an error? + res.status(500).send(reason.message); + }); + }; + } +} diff --git a/app/apps/server/bridges/bridges.js b/apps/meteor/app/apps/server/bridges/bridges.js similarity index 89% rename from app/apps/server/bridges/bridges.js rename to apps/meteor/app/apps/server/bridges/bridges.js index d03160e02d0f..67d067496ce9 100644 --- a/app/apps/server/bridges/bridges.js +++ b/apps/meteor/app/apps/server/bridges/bridges.js @@ -18,6 +18,8 @@ import { AppLivechatBridge } from './livechat'; import { AppUploadBridge } from './uploads'; import { UiInteractionBridge } from './uiInteraction'; import { AppSchedulerBridge } from './scheduler'; +import { AppVideoConferenceBridge } from './videoConferences'; +import { AppOAuthAppsBridge } from './oauthApps'; export class RealAppBridges extends AppBridges { constructor(orch) { @@ -41,6 +43,8 @@ export class RealAppBridges extends AppBridges { this._uiInteractionBridge = new UiInteractionBridge(orch); this._schedulerBridge = new AppSchedulerBridge(orch); this._cloudWorkspaceBridge = new AppCloudBridge(orch); + this._videoConfBridge = new AppVideoConferenceBridge(orch); + this._oAuthBridge = new AppOAuthAppsBridge(orch); } getCommandBridge() { @@ -114,4 +118,12 @@ export class RealAppBridges extends AppBridges { getCloudWorkspaceBridge() { return this._cloudWorkspaceBridge; } + + getVideoConferenceBridge() { + return this._videoConfBridge; + } + + getOAuthAppsBridge() { + return this._oAuthBridge; + } } diff --git a/apps/meteor/app/apps/server/bridges/cloud.ts b/apps/meteor/app/apps/server/bridges/cloud.ts new file mode 100644 index 000000000000..6f3569af0579 --- /dev/null +++ b/apps/meteor/app/apps/server/bridges/cloud.ts @@ -0,0 +1,23 @@ +import { Meteor } from 'meteor/meteor'; +import { CloudWorkspaceBridge } from '@rocket.chat/apps-engine/server/bridges/CloudWorkspaceBridge'; +import type { IWorkspaceToken } from '@rocket.chat/apps-engine/definition/cloud/IWorkspaceToken'; + +import { getWorkspaceAccessTokenWithScope } from '../../../cloud/server'; +import type { AppServerOrchestrator } from '../orchestrator'; + +const boundGetWorkspaceAccessToken = Meteor.bindEnvironment(getWorkspaceAccessTokenWithScope); + +export class AppCloudBridge extends CloudWorkspaceBridge { + // eslint-disable-next-line no-empty-function + constructor(private readonly orch: AppServerOrchestrator) { + super(); + } + + public async getWorkspaceToken(scope: string, appId: string): Promise { + this.orch.debugLog(`App ${appId} is getting the workspace's token`); + + const token = boundGetWorkspaceAccessToken(scope); + + return token; + } +} diff --git a/apps/meteor/app/apps/server/bridges/commands.ts b/apps/meteor/app/apps/server/bridges/commands.ts new file mode 100644 index 000000000000..42735ec762ae --- /dev/null +++ b/apps/meteor/app/apps/server/bridges/commands.ts @@ -0,0 +1,219 @@ +import { Meteor } from 'meteor/meteor'; +import type { ISlashCommand, ISlashCommandPreviewItem } from '@rocket.chat/apps-engine/definition/slashcommands'; +import { SlashCommandContext } from '@rocket.chat/apps-engine/definition/slashcommands'; +import { CommandBridge } from '@rocket.chat/apps-engine/server/bridges/CommandBridge'; +import type { IMessage, RequiredField, SlashCommand } from '@rocket.chat/core-typings'; + +import { slashCommands } from '../../../utils/server'; +import { Utilities } from '../../lib/misc/Utilities'; +import type { AppServerOrchestrator } from '../orchestrator'; +import { parseParameters } from '../../../../lib/utils/parseParameters'; + +export class AppCommandsBridge extends CommandBridge { + disabledCommands: Map; + + // eslint-disable-next-line no-empty-function + constructor(private readonly orch: AppServerOrchestrator) { + super(); + this.disabledCommands = new Map(); + } + + protected doesCommandExist(command: string, appId: string): boolean { + this.orch.debugLog(`The App ${appId} is checking if "${command}" command exists.`); + + if (typeof command !== 'string' || command.length === 0) { + return false; + } + + const cmd = command.toLowerCase(); + + return typeof slashCommands.commands[cmd] === 'object' || this.disabledCommands.has(cmd); + } + + protected enableCommand(command: string, appId: string): void { + this.orch.debugLog(`The App ${appId} is attempting to enable the command: "${command}"`); + + if (typeof command !== 'string' || command.trim().length === 0) { + throw new Error('Invalid command parameter provided, must be a string.'); + } + + const cmd = command.toLowerCase(); + if (!this.disabledCommands.has(cmd)) { + throw new Error(`The command is not currently disabled: "${cmd}"`); + } + + slashCommands.commands[cmd] = this.disabledCommands.get(cmd) as typeof slashCommands.commands[string]; + this.disabledCommands.delete(cmd); + + this.orch.getNotifier().commandUpdated(cmd); + } + + protected disableCommand(command: string, appId: string): void { + this.orch.debugLog(`The App ${appId} is attempting to disable the command: "${command}"`); + + if (typeof command !== 'string' || command.trim().length === 0) { + throw new Error('Invalid command parameter provided, must be a string.'); + } + + const cmd = command.toLowerCase(); + if (this.disabledCommands.has(cmd)) { + // The command is already disabled, no need to disable it yet again + return; + } + + const commandObj = slashCommands.commands[cmd]; + + if (typeof commandObj === 'undefined') { + throw new Error(`Command does not exist in the system currently: "${cmd}"`); + } + + this.disabledCommands.set(cmd, commandObj); + delete slashCommands.commands[cmd]; + + this.orch.getNotifier().commandDisabled(cmd); + } + + // command: { command, paramsExample, i18nDescription, executor: function } + protected modifyCommand(command: ISlashCommand, appId: string): void { + this.orch.debugLog(`The App ${appId} is attempting to modify the command: "${command}"`); + + this._verifyCommand(command); + + const cmd = command.command.toLowerCase(); + if (typeof slashCommands.commands[cmd] === 'undefined') { + throw new Error(`Command does not exist in the system currently (or it is disabled): "${cmd}"`); + } + + const item = slashCommands.commands[cmd]; + + item.params = command.i18nParamsExample ? command.i18nParamsExample : item.params; + item.description = command.i18nDescription ? command.i18nDescription : item.params; + item.callback = this._appCommandExecutor.bind(this); + item.providesPreview = command.providesPreview; + item.previewer = command.previewer ? this._appCommandPreviewer.bind(this) : item.previewer; + item.previewCallback = ( + command.executePreviewItem ? this._appCommandPreviewExecutor.bind(this) : item.previewCallback + ) as typeof slashCommands.commands[string]['previewCallback']; + + slashCommands.commands[cmd] = item; + this.orch.getNotifier().commandUpdated(cmd); + } + + protected registerCommand(command: ISlashCommand, appId: string): void { + this.orch.debugLog(`The App ${appId} is registering the command: "${command.command}"`); + + this._verifyCommand(command); + + const item = { + appId, + command: command.command.toLowerCase(), + params: Utilities.getI18nKeyForApp(command.i18nParamsExample, appId), + description: Utilities.getI18nKeyForApp(command.i18nDescription, appId), + permission: command.permission, + callback: this._appCommandExecutor.bind(this), + providesPreview: command.providesPreview, + previewer: !command.previewer ? undefined : this._appCommandPreviewer.bind(this), + previewCallback: (!command.executePreviewItem ? undefined : this._appCommandPreviewExecutor.bind(this)) as + | typeof slashCommands.commands[string]['previewCallback'] + | undefined, + } as SlashCommand; + + slashCommands.commands[command.command.toLowerCase()] = item; + this.orch.getNotifier().commandAdded(command.command.toLowerCase()); + } + + protected unregisterCommand(command: string, appId: string): void { + this.orch.debugLog(`The App ${appId} is unregistering the command: "${command}"`); + + if (typeof command !== 'string' || command.trim().length === 0) { + throw new Error('Invalid command parameter provided, must be a string.'); + } + + const cmd = command.toLowerCase(); + this.disabledCommands.delete(cmd); + delete slashCommands.commands[cmd]; + + this.orch.getNotifier().commandRemoved(cmd); + } + + private _verifyCommand(command: ISlashCommand): void { + if (typeof command !== 'object') { + throw new Error('Invalid Slash Command parameter provided, it must be a valid ISlashCommand object.'); + } + + if (typeof command.command !== 'string') { + throw new Error('Invalid Slash Command parameter provided, it must be a valid ISlashCommand object.'); + } + + if (command.i18nParamsExample && typeof command.i18nParamsExample !== 'string') { + throw new Error('Invalid Slash Command parameter provided, it must be a valid ISlashCommand object.'); + } + + if (command.i18nDescription && typeof command.i18nDescription !== 'string') { + throw new Error('Invalid Slash Command parameter provided, it must be a valid ISlashCommand object.'); + } + + if (typeof command.providesPreview !== 'boolean') { + throw new Error('Invalid Slash Command parameter provided, it must be a valid ISlashCommand object.'); + } + + if (typeof command.executor !== 'function') { + throw new Error('Invalid Slash Command parameter provided, it must be a valid ISlashCommand object.'); + } + } + + private _appCommandExecutor( + command: string, + parameters: any, + message: RequiredField, 'rid'>, + triggerId?: string, + ): void { + const user = this.orch.getConverters()?.get('users').convertById(Meteor.userId()); + const room = this.orch.getConverters()?.get('rooms').convertById(message.rid); + const threadId = message.tmid; + const params = parseParameters(parameters); + + const context = new SlashCommandContext( + Object.freeze(user), + Object.freeze(room), + Object.freeze(params) as string[], + threadId, + triggerId, + ); + + Promise.await(this.orch.getManager()?.getCommandManager().executeCommand(command, context)); + } + + private _appCommandPreviewer(command: string, parameters: any, message: IMessage): any { + const user = this.orch.getConverters()?.get('users').convertById(Meteor.userId()); + const room = this.orch.getConverters()?.get('rooms').convertById(message.rid); + const threadId = message.tmid; + const params = parseParameters(parameters); + + const context = new SlashCommandContext(Object.freeze(user), Object.freeze(room), Object.freeze(params) as string[], threadId); + return Promise.await(this.orch.getManager()?.getCommandManager().getPreviews(command, context)); + } + + private async _appCommandPreviewExecutor( + command: string, + parameters: any, + message: IMessage, + preview: ISlashCommandPreviewItem, + triggerId: string, + ): Promise { + const user = this.orch.getConverters()?.get('users').convertById(Meteor.userId()); + const room = this.orch.getConverters()?.get('rooms').convertById(message.rid); + const threadId = message.tmid; + const params = parseParameters(parameters); + + const context = new SlashCommandContext( + Object.freeze(user), + Object.freeze(room), + Object.freeze(params) as string[], + threadId, + triggerId, + ); + + await this.orch.getManager()?.getCommandManager().executePreview(command, preview, context); + } +} diff --git a/app/apps/server/bridges/details.ts b/apps/meteor/app/apps/server/bridges/details.ts similarity index 79% rename from app/apps/server/bridges/details.ts rename to apps/meteor/app/apps/server/bridges/details.ts index a6c4c1b05e32..1cea999fd3c8 100644 --- a/app/apps/server/bridges/details.ts +++ b/apps/meteor/app/apps/server/bridges/details.ts @@ -1,7 +1,7 @@ -import { ISetting } from '@rocket.chat/apps-engine/definition/settings'; +import type { ISetting } from '@rocket.chat/apps-engine/definition/settings'; import { AppDetailChangesBridge as DetailChangesBridge } from '@rocket.chat/apps-engine/server/bridges/AppDetailChangesBridge'; -import { AppServerOrchestrator } from '../orchestrator'; +import type { AppServerOrchestrator } from '../orchestrator'; export class AppDetailChangesBridge extends DetailChangesBridge { // eslint-disable-next-line no-empty-function diff --git a/apps/meteor/app/apps/server/bridges/environmental.ts b/apps/meteor/app/apps/server/bridges/environmental.ts new file mode 100644 index 000000000000..2f7a46ae7934 --- /dev/null +++ b/apps/meteor/app/apps/server/bridges/environmental.ts @@ -0,0 +1,47 @@ +import { EnvironmentalVariableBridge } from '@rocket.chat/apps-engine/server/bridges/EnvironmentalVariableBridge'; + +import type { AppServerOrchestrator } from '../orchestrator'; + +export class AppEnvironmentalVariableBridge extends EnvironmentalVariableBridge { + allowed: Array; + + // eslint-disable-next-line no-empty-function + constructor(private readonly orch: AppServerOrchestrator) { + super(); + this.allowed = ['NODE_ENV', 'ROOT_URL', 'INSTANCE_IP']; + } + + protected async getValueByName(envVarName: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is getting the environmental variable value ${envVarName}.`); + + if (!(await this.isReadable(envVarName, appId))) { + throw new Error(`The environmental variable "${envVarName}" is not readable.`); + } + + return process.env[envVarName]; + } + + protected async isReadable(envVarName: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is checking if the environmental variable is readable ${envVarName}.`); + + return this.allowed.includes(envVarName.toUpperCase()) || this.isAppsOwnVariable(envVarName, appId); + } + + protected isAppsOwnVariable(envVarName: string, appId: string): boolean { + /** + * Replace the letter `-` with `_` since environment variable name doesn't support it + */ + const appVariablePrefix = `RC_APPS_${appId.toUpperCase().replace(/-/g, '_')}`; + return envVarName.toUpperCase().startsWith(appVariablePrefix); + } + + protected async isSet(envVarName: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is checking if the environmental variable is set ${envVarName}.`); + + if (!(await this.isReadable(envVarName, appId))) { + throw new Error(`The environmental variable "${envVarName}" is not readable.`); + } + + return typeof process.env[envVarName] !== 'undefined'; + } +} diff --git a/apps/meteor/app/apps/server/bridges/http.ts b/apps/meteor/app/apps/server/bridges/http.ts new file mode 100644 index 000000000000..c67a1b48470c --- /dev/null +++ b/apps/meteor/app/apps/server/bridges/http.ts @@ -0,0 +1,121 @@ +import { HttpBridge } from '@rocket.chat/apps-engine/server/bridges/HttpBridge'; +import type { IHttpResponse } from '@rocket.chat/apps-engine/definition/accessors'; +import type { IHttpBridgeRequestInfo } from '@rocket.chat/apps-engine/server/bridges'; + +import type { AppServerOrchestrator } from '../orchestrator'; +import { fetch } from '../../../../server/lib/http/fetch'; + +const isGetOrHead = (method: string): boolean => ['GET', 'HEAD'].includes(method.toUpperCase()); + +export class AppHttpBridge extends HttpBridge { + // eslint-disable-next-line no-empty-function + constructor(private readonly orch: AppServerOrchestrator) { + super(); + } + + protected async call(info: IHttpBridgeRequestInfo): Promise { + // begin comptability with old HTTP.call API + const url = new URL(info.url); + + const { request, method } = info; + + const { headers = {} } = request; + + let { content } = request; + + if (!content && typeof request.data === 'object') { + content = JSON.stringify(request.data); + headers['Content-Type'] = 'application/json'; + } + + if (request.auth) { + if (request.auth.indexOf(':') < 0) { + throw new Error('auth option should be of the form "username:password"'); + } + + const base64 = Buffer.from(request.auth, 'ascii').toString('base64'); + headers.Authorization = `Basic ${base64}`; + } + + let paramsForBody; + + if (content || isGetOrHead(method)) { + if (request.params) { + Object.keys(request.params).forEach((key) => { + if (request.params?.[key]) { + url.searchParams.append(key, request.params?.[key]); + } + }); + } + } else { + paramsForBody = request.params; + } + + if (paramsForBody) { + const data = new URLSearchParams(); + Object.entries(paramsForBody).forEach(([key, value]) => { + data.append(key, value); + }); + content = data.toString(); + headers['Content-Type'] = 'application/x-www-form-urlencoded'; + } + + if (isGetOrHead(method)) { + content = undefined; + } + + // end comptability with old HTTP.call API + + this.orch.debugLog(`The App ${info.appId} is requesting from the outter webs:`, info); + + try { + const response = await fetch( + url.href, + { + method, + body: content, + headers, + }, + (request.hasOwnProperty('strictSSL') && !request.strictSSL) || + (request.hasOwnProperty('rejectUnauthorized') && request.rejectUnauthorized), + ); + + const result: IHttpResponse = { + url: info.url, + method: info.method, + statusCode: response.status, + headers: Object.fromEntries(response.headers as unknown as any), + }; + + const body = Buffer.from(await response.arrayBuffer()); + + if (request.encoding === null) { + /** + * The property `content` is not appropriately typed in the + * Apps-engine definition, and we can't simply change it there + * as it would be a breaking change. Thus, we're left with this + * type assertion. + */ + result.content = body as any; + } else { + result.content = body.toString(request.encoding as BufferEncoding); + result.data = ((): any => { + const contentType = (response.headers.get('content-type') || '').split(';')[0]; + if (!['application/json', 'text/javascript', 'application/javascript', 'application/x-javascript'].includes(contentType)) { + return null; + } + + try { + return JSON.parse(result.content); + } catch { + return null; + } + })(); + } + + return result; + } catch (e: any) { + return e.response; + } + } +} diff --git a/apps/meteor/app/apps/server/bridges/index.js b/apps/meteor/app/apps/server/bridges/index.js new file mode 100644 index 000000000000..3fec586f8869 --- /dev/null +++ b/apps/meteor/app/apps/server/bridges/index.js @@ -0,0 +1,31 @@ +import { RealAppBridges } from './bridges'; +import { AppActivationBridge } from './activation'; +import { AppCommandsBridge } from './commands'; +import { AppEnvironmentalVariableBridge } from './environmental'; +import { AppHttpBridge } from './http'; +import { AppListenerBridge } from './listeners'; +import { AppMessageBridge } from './messages'; +import { AppPersistenceBridge } from './persistence'; +import { AppRoomBridge } from './rooms'; +import { AppInternalBridge } from './internal'; +import { AppSettingBridge } from './settings'; +import { AppUserBridge } from './users'; +import { AppSchedulerBridge } from './scheduler'; +import { AppOAuthAppsBridge } from './oauthApps'; + +export { + RealAppBridges, + AppActivationBridge, + AppCommandsBridge, + AppEnvironmentalVariableBridge, + AppHttpBridge, + AppListenerBridge, + AppMessageBridge, + AppPersistenceBridge, + AppRoomBridge, + AppSettingBridge, + AppUserBridge, + AppInternalBridge, + AppSchedulerBridge, + AppOAuthAppsBridge, +}; diff --git a/app/apps/server/bridges/internal.ts b/apps/meteor/app/apps/server/bridges/internal.ts similarity index 78% rename from app/apps/server/bridges/internal.ts rename to apps/meteor/app/apps/server/bridges/internal.ts index 154adbdeb104..8355ec817d64 100644 --- a/app/apps/server/bridges/internal.ts +++ b/apps/meteor/app/apps/server/bridges/internal.ts @@ -1,10 +1,10 @@ import { InternalBridge } from '@rocket.chat/apps-engine/server/bridges/InternalBridge'; -import { ISetting } from '@rocket.chat/apps-engine/definition/settings'; +import type { ISetting } from '@rocket.chat/apps-engine/definition/settings'; +import type { ISubscription } from '@rocket.chat/core-typings'; +import { Settings } from '@rocket.chat/models'; -import { AppServerOrchestrator } from '../orchestrator'; +import type { AppServerOrchestrator } from '../orchestrator'; import { Subscriptions } from '../../../models/server'; -import { ISubscription } from '../../../../definition/ISubscription'; -import { Settings } from '../../../models/server/raw'; export class AppInternalBridge extends InternalBridge { // eslint-disable-next-line no-empty-function diff --git a/apps/meteor/app/apps/server/bridges/listeners.js b/apps/meteor/app/apps/server/bridges/listeners.js new file mode 100644 index 000000000000..ced6e1aea31b --- /dev/null +++ b/apps/meteor/app/apps/server/bridges/listeners.js @@ -0,0 +1,230 @@ +import { AppInterface } from '@rocket.chat/apps-engine/definition/metadata'; +import { LivechatTransferEventType } from '@rocket.chat/apps-engine/definition/livechat'; + +export class AppListenerBridge { + constructor(orch) { + this.orch = orch; + } + + async handleEvent(event, ...payload) { + // eslint-disable-next-line complexity + const method = (() => { + switch (event) { + case AppInterface.IPreMessageSentPrevent: + case AppInterface.IPreMessageSentExtend: + case AppInterface.IPreMessageSentModify: + case AppInterface.IPostMessageSent: + case AppInterface.IPreMessageDeletePrevent: + case AppInterface.IPostMessageDeleted: + case AppInterface.IPreMessageUpdatedPrevent: + case AppInterface.IPreMessageUpdatedExtend: + case AppInterface.IPreMessageUpdatedModify: + case AppInterface.IPostMessageUpdated: + case AppInterface.IPostMessageReacted: + case AppInterface.IPostMessageFollowed: + case AppInterface.IPostMessagePinned: + case AppInterface.IPostMessageStarred: + case AppInterface.IPostMessageReported: + return 'messageEvent'; + case AppInterface.IPreRoomCreatePrevent: + case AppInterface.IPreRoomCreateExtend: + case AppInterface.IPreRoomCreateModify: + case AppInterface.IPostRoomCreate: + case AppInterface.IPreRoomDeletePrevent: + case AppInterface.IPostRoomDeleted: + case AppInterface.IPreRoomUserJoined: + case AppInterface.IPostRoomUserJoined: + case AppInterface.IPreRoomUserLeave: + case AppInterface.IPostRoomUserLeave: + return 'roomEvent'; + /** + * @deprecated please prefer the AppInterface.IPostLivechatRoomClosed event + */ + case AppInterface.ILivechatRoomClosedHandler: + case AppInterface.IPostLivechatRoomStarted: + case AppInterface.IPostLivechatRoomClosed: + case AppInterface.IPostLivechatAgentAssigned: + case AppInterface.IPostLivechatAgentUnassigned: + case AppInterface.IPostLivechatRoomTransferred: + case AppInterface.IPostLivechatGuestSaved: + case AppInterface.IPostLivechatRoomSaved: + return 'livechatEvent'; + case AppInterface.IPostUserCreated: + case AppInterface.IPostUserUpdated: + case AppInterface.IPostUserDeleted: + case AppInterface.IPostUserLogin: + case AppInterface.IPostUserLogout: + case AppInterface.IPostUserStatusChanged: + return 'userEvent'; + default: + return 'defaultEvent'; + } + })(); + + return this[method](event, ...payload); + } + + async defaultEvent(inte, payload) { + return this.orch.getManager().getListenerManager().executeListener(inte, payload); + } + + async messageEvent(inte, message, ...payload) { + const msg = this.orch.getConverters().get('messages').convertMessage(message); + + const params = (() => { + switch (inte) { + case AppInterface.IPostMessageDeleted: + const [userDeleted] = payload; + return { + message: msg, + user: this.orch.getConverters().get('users').convertToApp(userDeleted), + }; + case AppInterface.IPostMessageReacted: + const [userReacted, reaction, isRemoved] = payload; + return { + message: msg, + user: this.orch.getConverters().get('users').convertToApp(userReacted), + reaction, + isRemoved, + }; + case AppInterface.IPostMessageFollowed: + const [userFollowed, isUnfollow] = payload; + return { + message: msg, + user: this.orch.getConverters().get('users').convertToApp(userFollowed), + isUnfollow, + }; + case AppInterface.IPostMessagePinned: + const [userPinned, isUnpinned] = payload; + return { + message: msg, + user: this.orch.getConverters().get('users').convertToApp(userPinned), + isUnpinned, + }; + case AppInterface.IPostMessageStarred: + const [userStarred, isStarred] = payload; + return { + message: msg, + user: this.orch.getConverters().get('users').convertToApp(userStarred), + isStarred, + }; + case AppInterface.IPostMessageReported: + const [userReported, reason] = payload; + return { + message: msg, + user: this.orch.getConverters().get('users').convertToApp(userReported), + reason, + }; + default: + return msg; + } + })(); + + const result = await this.orch.getManager().getListenerManager().executeListener(inte, params); + + if (typeof result === 'boolean') { + return result; + } + return this.orch.getConverters().get('messages').convertAppMessage(result); + } + + async roomEvent(inte, room, ...payload) { + const rm = this.orch.getConverters().get('rooms').convertRoom(room); + + const params = (() => { + switch (inte) { + case AppInterface.IPreRoomUserJoined: + case AppInterface.IPostRoomUserJoined: + const [joiningUser, invitingUser] = payload; + return { + room: rm, + joiningUser: this.orch.getConverters().get('users').convertToApp(joiningUser), + invitingUser: this.orch.getConverters().get('users').convertToApp(invitingUser), + }; + case AppInterface.IPreRoomUserLeave: + case AppInterface.IPostRoomUserLeave: + const [leavingUser] = payload; + return { + room: rm, + leavingUser: this.orch.getConverters().get('users').convertToApp(leavingUser), + }; + default: + return rm; + } + })(); + + const result = await this.orch.getManager().getListenerManager().executeListener(inte, params); + + if (typeof result === 'boolean') { + return result; + } + return this.orch.getConverters().get('rooms').convertAppRoom(result); + } + + async livechatEvent(inte, data) { + switch (inte) { + case AppInterface.IPostLivechatAgentAssigned: + case AppInterface.IPostLivechatAgentUnassigned: + return this.orch + .getManager() + .getListenerManager() + .executeListener(inte, { + room: this.orch.getConverters().get('rooms').convertRoom(data.room), + agent: this.orch.getConverters().get('users').convertToApp(data.user), + }); + case AppInterface.IPostLivechatRoomTransferred: + const converter = data.type === LivechatTransferEventType.AGENT ? 'users' : 'departments'; + + return this.orch + .getManager() + .getListenerManager() + .executeListener(inte, { + type: data.type, + room: this.orch.getConverters().get('rooms').convertById(data.room), + from: this.orch.getConverters().get(converter).convertById(data.from), + to: this.orch.getConverters().get(converter).convertById(data.to), + }); + case AppInterface.IPostLivechatGuestSaved: + return this.orch + .getManager() + .getListenerManager() + .executeListener(inte, this.orch.getConverters().get('visitors').convertById(data)); + case AppInterface.IPostLivechatRoomSaved: + return this.orch.getManager().getListenerManager().executeListener(inte, this.orch.getConverters().get('rooms').convertById(data)); + default: + const room = this.orch.getConverters().get('rooms').convertRoom(data); + + return this.orch.getManager().getListenerManager().executeListener(inte, room); + } + } + + async userEvent(inte, data) { + let context; + switch (inte) { + case AppInterface.IPostUserLoggedIn: + case AppInterface.IPostUserLogout: + context = this.orch.getConverters().get('users').convertToApp(data.user); + return this.orch.getManager().getListenerManager().executeListener(inte, context); + case AppInterface.IPostUserStatusChanged: + const { currentStatus, previousStatus } = data; + context = { + user: this.orch.getConverters().get('users').convertToApp(data.user), + currentStatus, + previousStatus, + }; + + return this.orch.getManager().getListenerManager().executeListener(inte, context); + case AppInterface.IPostUserCreated: + case AppInterface.IPostUserUpdated: + case AppInterface.IPostUserDeleted: + context = { + user: this.orch.getConverters().get('users').convertToApp(data.user), + performedBy: this.orch.getConverters().get('users').convertToApp(data.performedBy), + }; + if (inte === AppInterface.IPostUserUpdated) { + context.previousData = this.orch.getConverters().get('users').convertToApp(data.previousUser); + } + return this.orch.getManager().getListenerManager().executeListener(inte, context); + } + } +} diff --git a/apps/meteor/app/apps/server/bridges/livechat.ts b/apps/meteor/app/apps/server/bridges/livechat.ts new file mode 100644 index 000000000000..73a391c7126f --- /dev/null +++ b/apps/meteor/app/apps/server/bridges/livechat.ts @@ -0,0 +1,294 @@ +import { Random } from 'meteor/random'; +import { LivechatBridge } from '@rocket.chat/apps-engine/server/bridges/LivechatBridge'; +import type { + ILivechatMessage, + IVisitor, + ILivechatRoom, + ILivechatTransferData, + IDepartment, +} from '@rocket.chat/apps-engine/definition/livechat'; +import type { IUser } from '@rocket.chat/apps-engine/definition/users'; +import type { IMessage } from '@rocket.chat/apps-engine/definition/messages'; +import type { IExtraRoomParams } from '@rocket.chat/apps-engine/definition/accessors/ILivechatCreator'; +import { OmnichannelSourceType } from '@rocket.chat/core-typings'; +import { LivechatVisitors } from '@rocket.chat/models'; + +import { getRoom } from '../../../livechat/server/api/lib/livechat'; +import { Livechat } from '../../../livechat/server/lib/Livechat'; +import { Users, LivechatDepartment, LivechatRooms } from '../../../models/server'; +import type { AppServerOrchestrator } from '../orchestrator'; + +export class AppLivechatBridge extends LivechatBridge { + // eslint-disable-next-line no-empty-function + constructor(private readonly orch: AppServerOrchestrator) { + super(); + } + + protected isOnline(departmentId?: string): boolean { + return Livechat.online(departmentId); + } + + protected async isOnlineAsync(departmentId?: string): Promise { + return Livechat.online(departmentId); + } + + protected async createMessage(message: ILivechatMessage, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is creating a new message.`); + + if (!message.token) { + throw new Error('Invalid token for livechat message'); + } + + const msg = await Livechat.sendMessage({ + guest: this.orch.getConverters()?.get('visitors').convertAppVisitor(message.visitor), + message: this.orch.getConverters()?.get('messages').convertAppMessage(message), + agent: undefined, + roomInfo: { + source: { + type: OmnichannelSourceType.APP, + id: appId, + alias: this.orch.getManager()?.getOneById(appId)?.getNameSlug(), + }, + }, + }); + + return msg._id; + } + + protected async getMessageById(messageId: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is getting the message: "${messageId}"`); + + return this.orch.getConverters()?.get('messages').convertById(messageId); + } + + protected async updateMessage(message: ILivechatMessage, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is updating a message.`); + + const data = { + guest: message.visitor, + message: this.orch.getConverters()?.get('messages').convertAppMessage(message), + }; + + Livechat.updateMessage(data); + } + + protected async createRoom(visitor: IVisitor, agent: IUser, appId: string, extraParams?: IExtraRoomParams): Promise { + this.orch.debugLog(`The App ${appId} is creating a livechat room.`); + + const { source } = extraParams || {}; + // `source` will likely have the properties below, so we tell TS it's alright + const { sidebarIcon, defaultIcon, label } = (source || {}) as { + sidebarIcon?: string; + defaultIcon?: string; + label?: string; + }; + + let agentRoom; + if (agent?.id) { + const user = Users.getAgentInfo(agent.id); + agentRoom = Object.assign({}, { agentId: user._id, username: user.username }); + } + + const result = await getRoom({ + guest: this.orch.getConverters()?.get('visitors').convertAppVisitor(visitor), + agent: agentRoom, + rid: Random.id(), + roomInfo: { + source: { + type: OmnichannelSourceType.APP, + id: appId, + alias: this.orch.getManager()?.getOneById(appId)?.getName(), + label, + sidebarIcon, + defaultIcon, + }, + }, + extraParams: undefined, + }); + + return this.orch.getConverters()?.get('rooms').convertRoom(result.room); + } + + protected async closeRoom(room: ILivechatRoom, comment: string, closer: IUser | undefined, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is closing a livechat room.`); + + const user = closer && this.orch.getConverters()?.get('users').convertToRocketChat(closer); + const visitor = this.orch.getConverters()?.get('visitors').convertAppVisitor(room.visitor); + + const closeData: any = { + room: this.orch.getConverters()?.get('rooms').convertAppRoom(room), + comment, + ...(user && { user }), + ...(visitor && { visitor }), + }; + + return Livechat.closeRoom(closeData); + } + + protected async findRooms(visitor: IVisitor, departmentId: string | null, appId: string): Promise> { + this.orch.debugLog(`The App ${appId} is looking for livechat visitors.`); + + if (!visitor) { + return []; + } + + let result; + + if (departmentId) { + result = LivechatRooms.findOpenByVisitorTokenAndDepartmentId(visitor.token, departmentId, {}).fetch(); + } else { + result = LivechatRooms.findOpenByVisitorToken(visitor.token, {}).fetch(); + } + + return result.map((room: ILivechatRoom) => this.orch.getConverters()?.get('rooms').convertRoom(room)); + } + + protected async createVisitor(visitor: IVisitor, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is creating a livechat visitor.`); + + const registerData = { + department: visitor.department, + username: visitor.username, + name: visitor.name, + token: visitor.token, + email: '', + connectionData: undefined, + phone: {}, + id: visitor.id, + }; + + if (visitor.visitorEmails?.length) { + registerData.email = visitor.visitorEmails[0].address; + } + + if (visitor.phone?.length) { + (registerData as any).phone = { number: visitor.phone[0].phoneNumber }; + } + + return Livechat.registerGuest(registerData); + } + + protected async transferVisitor(visitor: IVisitor, transferData: ILivechatTransferData, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is transfering a livechat.`); + + if (!visitor) { + throw new Error('Invalid visitor, cannot transfer'); + } + + const { targetAgent, targetDepartment: departmentId, currentRoom } = transferData; + + const appUser = Users.findOneByAppId(appId, {}); + if (!appUser) { + throw new Error('Invalid app user, cannot transfer'); + } + const { _id, username, name, type } = appUser; + const transferredBy = { + _id, + username, + name, + type, + }; + + let userId; + let transferredTo; + + if (targetAgent?.id) { + transferredTo = Users.findOneAgentById(targetAgent.id, { + fields: { _id: 1, username: 1, name: 1 }, + }); + if (!transferredTo) { + throw new Error('Invalid target agent, cannot transfer'); + } + + userId = transferredTo._id; + } + + return Livechat.transfer( + this.orch.getConverters()?.get('rooms').convertAppRoom(currentRoom), + this.orch.getConverters()?.get('visitors').convertAppVisitor(visitor), + { userId, departmentId, transferredBy, transferredTo }, + ); + } + + protected async findVisitors(query: object, appId: string): Promise> { + this.orch.debugLog(`The App ${appId} is looking for livechat visitors.`); + + if (this.orch.isDebugging()) { + console.warn('The method AppLivechatBridge.findVisitors is deprecated. Please consider using its alternatives'); + } + + return (await LivechatVisitors.find(query).toArray()).map( + (visitor) => visitor && this.orch.getConverters()?.get('visitors').convertVisitor(visitor), + ); + } + + protected async findVisitorById(id: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is looking for livechat visitors.`); + + return this.orch.getConverters()?.get('visitors').convertById(id); + } + + protected async findVisitorByEmail(email: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is looking for livechat visitors.`); + + return this.orch + .getConverters() + ?.get('visitors') + .convertVisitor(await LivechatVisitors.findOneGuestByEmailAddress(email)); + } + + protected async findVisitorByToken(token: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is looking for livechat visitors.`); + + return this.orch + .getConverters() + ?.get('visitors') + .convertVisitor(await LivechatVisitors.getVisitorByToken(token, {})); + } + + protected async findVisitorByPhoneNumber(phoneNumber: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is looking for livechat visitors.`); + + return this.orch + .getConverters() + ?.get('visitors') + .convertVisitor(await LivechatVisitors.findOneVisitorByPhone(phoneNumber)); + } + + protected async findDepartmentByIdOrName(value: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is looking for livechat departments.`); + + return this.orch.getConverters()?.get('departments').convertDepartment(LivechatDepartment.findOneByIdOrName(value, {})); + } + + protected async findDepartmentsEnabledWithAgents(appId: string): Promise> { + this.orch.debugLog(`The App ${appId} is looking for livechat departments.`); + + const converter = this.orch.getConverters()?.get('departments'); + const boundConverter = converter.convertDepartment.bind(converter); + + return LivechatDepartment.findEnabledWithAgents().map(boundConverter); + } + + protected async _fetchLivechatRoomMessages(appId: string, roomId: string): Promise> { + this.orch.debugLog(`The App ${appId} is getting the transcript for livechat room ${roomId}.`); + const messageConverter = this.orch.getConverters()?.get('messages'); + + if (!messageConverter) { + throw new Error('Could not get the message converter to process livechat room messages'); + } + + const boundMessageConverter = messageConverter.convertMessage.bind(messageConverter); + + return Livechat.getRoomMessages({ rid: roomId }).map(boundMessageConverter); + } + + protected async setCustomFields( + data: { token: IVisitor['token']; key: string; value: string; overwrite: boolean }, + appId: string, + ): Promise { + this.orch.debugLog(`The App ${appId} is setting livechat visitor's custom fields.`); + + return Livechat.setCustomFields(data); + } +} diff --git a/apps/meteor/app/apps/server/bridges/messages.ts b/apps/meteor/app/apps/server/bridges/messages.ts new file mode 100644 index 000000000000..935a10efbc11 --- /dev/null +++ b/apps/meteor/app/apps/server/bridges/messages.ts @@ -0,0 +1,99 @@ +import type { ITypingDescriptor } from '@rocket.chat/apps-engine/server/bridges/MessageBridge'; +import { MessageBridge } from '@rocket.chat/apps-engine/server/bridges/MessageBridge'; +import type { IMessage } from '@rocket.chat/apps-engine/definition/messages'; +import type { IUser } from '@rocket.chat/apps-engine/definition/users'; +import type { IRoom } from '@rocket.chat/apps-engine/definition/rooms'; +import type { ISubscription } from '@rocket.chat/core-typings'; + +import { Messages, Users, Subscriptions } from '../../../models/server'; +import { updateMessage } from '../../../lib/server/functions/updateMessage'; +import { executeSendMessage } from '../../../lib/server/methods/sendMessage'; +import { api } from '../../../../server/sdk/api'; +import notifications from '../../../notifications/server/lib/Notifications'; +import type { AppServerOrchestrator } from '../orchestrator'; + +export class AppMessageBridge extends MessageBridge { + // eslint-disable-next-line no-empty-function + constructor(private readonly orch: AppServerOrchestrator) { + super(); + } + + protected async create(message: IMessage, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is creating a new message.`); + + const convertedMessage = this.orch.getConverters()?.get('messages').convertAppMessage(message); + + const sentMessage = executeSendMessage(convertedMessage.u._id, convertedMessage); + + return sentMessage._id; + } + + protected async getById(messageId: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is getting the message: "${messageId}"`); + + return this.orch.getConverters()?.get('messages').convertById(messageId); + } + + protected async update(message: IMessage, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is updating a message.`); + + if (!message.editor) { + throw new Error('Invalid editor assigned to the message for the update.'); + } + + if (!message.id || !Messages.findOneById(message.id)) { + throw new Error('A message must exist to update.'); + } + + const msg = this.orch.getConverters()?.get('messages').convertAppMessage(message); + const editor = Users.findOneById(message.editor.id); + + updateMessage(msg, editor); + } + + protected async notifyUser(user: IUser, message: IMessage, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is notifying a user.`); + + const msg = this.orch.getConverters()?.get('messages').convertAppMessage(message); + + if (!msg) { + return; + } + + api.broadcast('notify.ephemeralMessage', user.id, msg.rid, { + ...msg, + }); + } + + protected async notifyRoom(room: IRoom, message: IMessage, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is notifying a room's users.`); + + if (!room || !room.id) { + return; + } + + const msg = this.orch.getConverters()?.get('messages').convertAppMessage(message); + + const users = Subscriptions.findByRoomIdWhenUserIdExists(room.id, { fields: { 'u._id': 1 } }) + .fetch() + .map((s: ISubscription) => s.u._id); + + Users.findByIds(users, { fields: { _id: 1 } }) + .fetch() + .forEach(({ _id }: { _id: string }) => + api.broadcast('notify.ephemeralMessage', _id, room.id, { + ...msg, + }), + ); + } + + protected async typing({ scope, id, username, isTyping }: ITypingDescriptor): Promise { + switch (scope) { + case 'room': + notifications.notifyRoom(id, 'typing', username, isTyping); + return; + default: + throw new Error('Unrecognized typing scope provided'); + } + } +} diff --git a/apps/meteor/app/apps/server/bridges/oauthApps.ts b/apps/meteor/app/apps/server/bridges/oauthApps.ts new file mode 100644 index 000000000000..e29443d8cc49 --- /dev/null +++ b/apps/meteor/app/apps/server/bridges/oauthApps.ts @@ -0,0 +1,81 @@ +import type { IOAuthApp, IOAuthAppParams } from '@rocket.chat/apps-engine/definition/accessors/IOAuthApp'; +import { OAuthAppsBridge } from '@rocket.chat/apps-engine/server/bridges/OAuthAppsBridge'; +import type { IOAuthApps } from '@rocket.chat/core-typings'; +import { OAuthApps, Users } from '@rocket.chat/models'; +import { Random } from 'meteor/random'; +import { v4 as uuidv4 } from 'uuid'; + +import type { AppServerOrchestrator } from '../orchestrator'; + +export class AppOAuthAppsBridge extends OAuthAppsBridge { + constructor(private readonly orch: AppServerOrchestrator) { + super(); + } + + protected async create(oAuthApp: IOAuthAppParams, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is creating a new OAuth app.`); + const { clientId, clientSecret } = oAuthApp; + const botUser = await Users.findOne({ appId }); + + if (!botUser) { + throw new Error(`The user for app ${appId} is not registered.`); + } + + const { _id, username } = botUser; + + return ( + await OAuthApps.insertOne({ + ...oAuthApp, + _id: uuidv4(), + appId, + clientId: clientId ?? Random.id(), + clientSecret: clientSecret ?? Random.secret(), + _createdAt: new Date(), + _createdBy: { + _id, + username, + }, + } as unknown as IOAuthApps) + ).insertedId; + } + + protected async getById(id: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is getting the OAuth app by ID ${id}.`); + const data = await OAuthApps.findOne({ _id: id, appId }); + if (data) { + const { _id, _createdAt, _createdBy, _updatedAt, ...rest } = data as any; + return { + ...rest, + id: _id, + createdAt: _createdAt.toDateString(), + createdBy: { + id: _createdBy._id, + username: _createdBy.username, + }, + updatedAt: _updatedAt, + }; + } + + return null; + } + + protected async getByName(name: string, appId: string): Promise> { + this.orch.debugLog(`The App ${appId} is getting the OAuth apps by name.`); + return OAuthApps.find({ name, appId }).toArray() as unknown as Array; + } + + protected async update(oAuthApp: IOAuthAppParams, id: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is updating the OAuth app ${id}.`); + await OAuthApps.updateOne({ _id: id, appId }, { $set: oAuthApp }, { upsert: true }); + } + + protected async delete(id: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is deleting the OAuth app ${id}.`); + await OAuthApps.deleteOne({ _id: id, appId }); + } + + protected async purge(appId: string): Promise { + this.orch.debugLog(`The App ${appId} is deleting an OAuth app.`); + await OAuthApps.deleteMany({ appId }); + } +} diff --git a/app/apps/server/bridges/persistence.ts b/apps/meteor/app/apps/server/bridges/persistence.ts similarity index 96% rename from app/apps/server/bridges/persistence.ts rename to apps/meteor/app/apps/server/bridges/persistence.ts index ff78d72d0192..b14aef68eb3f 100644 --- a/app/apps/server/bridges/persistence.ts +++ b/apps/meteor/app/apps/server/bridges/persistence.ts @@ -1,7 +1,7 @@ import { PersistenceBridge } from '@rocket.chat/apps-engine/server/bridges/PersistenceBridge'; -import { RocketChatAssociationRecord } from '@rocket.chat/apps-engine/definition/metadata'; +import type { RocketChatAssociationRecord } from '@rocket.chat/apps-engine/definition/metadata'; -import { AppServerOrchestrator } from '../orchestrator'; +import type { AppServerOrchestrator } from '../orchestrator'; export class AppPersistenceBridge extends PersistenceBridge { // eslint-disable-next-line no-empty-function diff --git a/apps/meteor/app/apps/server/bridges/rooms.ts b/apps/meteor/app/apps/server/bridges/rooms.ts new file mode 100644 index 000000000000..401b04599709 --- /dev/null +++ b/apps/meteor/app/apps/server/bridges/rooms.ts @@ -0,0 +1,172 @@ +import type { IRoom } from '@rocket.chat/apps-engine/definition/rooms'; +import { RoomType } from '@rocket.chat/apps-engine/definition/rooms'; +import { RoomBridge } from '@rocket.chat/apps-engine/server/bridges/RoomBridge'; +import type { IUser } from '@rocket.chat/apps-engine/definition/users'; +import type { IMessage } from '@rocket.chat/apps-engine/definition/messages'; +import { Meteor } from 'meteor/meteor'; +import type { ISubscription } from '@rocket.chat/core-typings'; + +import type { AppServerOrchestrator } from '../orchestrator'; +import { Rooms, Subscriptions, Users } from '../../../models/server'; +import { addUserToRoom } from '../../../lib/server/functions/addUserToRoom'; + +export class AppRoomBridge extends RoomBridge { + // eslint-disable-next-line no-empty-function + constructor(private readonly orch: AppServerOrchestrator) { + super(); + } + + protected async create(room: IRoom, members: Array, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is creating a new room.`, room); + + const rcRoom = this.orch.getConverters()?.get('rooms').convertAppRoom(room); + let method: string; + + switch (room.type) { + case RoomType.CHANNEL: + method = 'createChannel'; + break; + case RoomType.PRIVATE_GROUP: + method = 'createPrivateGroup'; + break; + case RoomType.DIRECT_MESSAGE: + method = 'createDirectMessage'; + break; + default: + throw new Error('Only channels, private groups and direct messages can be created.'); + } + + let rid = ''; + Meteor.runAsUser(room.creator.id, () => { + const extraData = Object.assign({}, rcRoom); + delete extraData.name; + delete extraData.t; + delete extraData.ro; + delete extraData.customFields; + let info; + if (room.type === RoomType.DIRECT_MESSAGE) { + info = Meteor.call(method, ...members); + } else { + info = Meteor.call(method, rcRoom.name, members, rcRoom.ro, rcRoom.customFields, extraData); + } + rid = info.rid; + }); + + return rid; + } + + protected async getById(roomId: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is getting the roomById: "${roomId}"`); + + return this.orch.getConverters()?.get('rooms').convertById(roomId); + } + + protected async getByName(roomName: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is getting the roomByName: "${roomName}"`); + + return this.orch.getConverters()?.get('rooms').convertByName(roomName); + } + + protected async getCreatorById(roomId: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is getting the room's creator by id: "${roomId}"`); + + const room = Rooms.findOneById(roomId); + + if (!room || !room.u || !room.u._id) { + return undefined; + } + + return this.orch.getConverters()?.get('users').convertById(room.u._id); + } + + protected async getCreatorByName(roomName: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is getting the room's creator by name: "${roomName}"`); + + const room = Rooms.findOneByName(roomName, {}); + + if (!room || !room.u || !room.u._id) { + return undefined; + } + + return this.orch.getConverters()?.get('users').convertById(room.u._id); + } + + protected async getMembers(roomId: string, appId: string): Promise> { + this.orch.debugLog(`The App ${appId} is getting the room's members by room id: "${roomId}"`); + const subscriptions = await Subscriptions.findByRoomId(roomId, {}); + return subscriptions.map((sub: ISubscription) => this.orch.getConverters()?.get('users').convertById(sub.u?._id)); + } + + protected async getDirectByUsernames(usernames: Array, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is getting direct room by usernames: "${usernames}"`); + const room = await Rooms.findDirectRoomContainingAllUsernames(usernames, {}); + if (!room) { + return undefined; + } + return this.orch.getConverters()?.get('rooms').convertRoom(room); + } + + protected async update(room: IRoom, members: Array = [], appId: string): Promise { + this.orch.debugLog(`The App ${appId} is updating a room.`); + + if (!room.id || !Rooms.findOneById(room.id)) { + throw new Error('A room must exist to update.'); + } + + const rm = this.orch.getConverters()?.get('rooms').convertAppRoom(room); + + Rooms.update(rm._id, rm); + + for (const username of members) { + const member = Users.findOneByUsername(username, {}); + + if (!member) { + continue; + } + + addUserToRoom(rm._id, member); + } + } + + protected async delete(roomId: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is deleting a room.`); + Rooms.removeById(roomId); + } + + protected async createDiscussion( + room: IRoom, + parentMessage: IMessage | undefined = undefined, + reply: string | undefined = '', + members: Array = [], + appId: string, + ): Promise { + this.orch.debugLog(`The App ${appId} is creating a new discussion.`, room); + + const rcRoom = this.orch.getConverters()?.get('rooms').convertAppRoom(room); + + let rcMessage; + if (parentMessage) { + rcMessage = this.orch.getConverters()?.get('messages').convertAppMessage(parentMessage); + } + + if (!rcRoom.prid || !Rooms.findOneById(rcRoom.prid)) { + throw new Error('There must be a parent room to create a discussion.'); + } + + const discussion = { + prid: rcRoom.prid, + t_name: rcRoom.fname, + pmid: rcMessage ? rcMessage._id : undefined, + reply: reply && reply.trim() !== '' ? reply : undefined, + users: members.length > 0 ? members : [], + }; + + let rid = ''; + Meteor.runAsUser(room.creator.id, () => { + const info = Meteor.call('createDiscussion', discussion); + rid = info.rid; + }); + + return rid; + } +} diff --git a/app/apps/server/bridges/scheduler.ts b/apps/meteor/app/apps/server/bridges/scheduler.ts similarity index 76% rename from app/apps/server/bridges/scheduler.ts rename to apps/meteor/app/apps/server/bridges/scheduler.ts index 0bb388c21ee5..dfc3ddcdbc68 100644 --- a/app/apps/server/bridges/scheduler.ts +++ b/apps/meteor/app/apps/server/bridges/scheduler.ts @@ -1,13 +1,15 @@ -import Agenda from 'agenda'; +import type { Job } from '@rocket.chat/agenda'; +import { Agenda } from '@rocket.chat/agenda'; import { ObjectID } from 'bson'; import { MongoInternals } from 'meteor/mongo'; -import { StartupType, IProcessor, IOnetimeSchedule, IRecurringSchedule } from '@rocket.chat/apps-engine/definition/scheduler'; +import type { IProcessor, IOnetimeSchedule, IRecurringSchedule, IJobContext } from '@rocket.chat/apps-engine/definition/scheduler'; +import { StartupType } from '@rocket.chat/apps-engine/definition/scheduler'; import { SchedulerBridge } from '@rocket.chat/apps-engine/server/bridges/SchedulerBridge'; -import { AppServerOrchestrator } from '../orchestrator'; +import type { AppServerOrchestrator } from '../orchestrator'; -function _callProcessor(processor: Function): (job: Agenda.Job) => void { - return (job): void => { +function _callProcessor(processor: IProcessor['processor']): (job: Job) => Promise { + return (job) => { const data = job?.attrs?.data || {}; // This field is for internal use, no need to leak to app processor @@ -15,7 +17,7 @@ function _callProcessor(processor: Function): (job: Agenda.Job) => void { data.jobId = job.attrs._id.toString(); - return processor(data); + return (processor as (jobContext: IJobContext) => Promise)(data); }; } @@ -40,33 +42,13 @@ export class AppSchedulerBridge extends SchedulerBridge { this.isConnected = false; } - /** - * Entity that will be run in a job. - * @typedef {Object} Processor - * @property {string} id The processor's identifier - * @property {function} processor The function that will be run on a given schedule - * @property {IOnetimeStartup|IRecurrentStartup} [startupSetting] If provided, the processor will be configured with the setting as soon as it gets registered - - * Processor setting for running once after being registered - * @typedef {Object} IOnetimeStartup - * @property {string} type=onetime - * @property {string} when When the processor will be executed - * @property {Object} [data] An optional object that is passed to the processor - * - * Processor setting for running recurringly after being registered - * @typedef {Object} IRecurrentStartup - * @property {string} type=recurring - * @property {string} interval When the processor will be re executed - * @property {Object} [data] An optional object that is passed to the processor - */ - /** * Register processors that can be scheduled to run * - * @param {Array.} processors An array of processors - * @param {string} appId + * @param processors An array of processors + * @param appId * - * @returns {string[]} List of task ids run at startup, or void no startup run is set + * @returns List of task ids run at startup, or void no startup run is set */ protected async registerProcessors(processors: Array = [], appId: string): Promise> { const runAfterRegister: Promise[] = []; @@ -112,14 +94,6 @@ export class AppSchedulerBridge extends SchedulerBridge { /** * Schedules a registered processor to run _once_. - * - * @param {Object} job - * @param {string} job.id The processor's id - * @param {string} job.when When the processor will be executed - * @param {Object} [job.data] An optional object that is passed to the processor - * @param {string} appId - * - * @returns {string} taskid */ protected async scheduleOnce({ id, when, data }: IOnetimeSchedule, appId: string): Promise { this.orch.debugLog(`The App ${appId} is scheduling an onetime job (processor ${id})`); diff --git a/apps/meteor/app/apps/server/bridges/settings.ts b/apps/meteor/app/apps/server/bridges/settings.ts new file mode 100644 index 000000000000..7be7a888043d --- /dev/null +++ b/apps/meteor/app/apps/server/bridges/settings.ts @@ -0,0 +1,71 @@ +import type { ISetting } from '@rocket.chat/apps-engine/definition/settings'; +import { ServerSettingBridge } from '@rocket.chat/apps-engine/server/bridges/ServerSettingBridge'; +import { Settings } from '@rocket.chat/models'; + +import type { AppServerOrchestrator } from '../orchestrator'; + +export class AppSettingBridge extends ServerSettingBridge { + // eslint-disable-next-line no-empty-function + constructor(private readonly orch: AppServerOrchestrator) { + super(); + } + + protected async getAll(appId: string): Promise> { + this.orch.debugLog(`The App ${appId} is getting all the settings.`); + + const settings = await Settings.find({ secret: false }).toArray(); + return settings.map((s) => this.orch.getConverters()?.get('settings').convertToApp(s)); + } + + protected async getOneById(id: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is getting the setting by id ${id}.`); + + if (!(await this.isReadableById(id, appId))) { + throw new Error(`The setting "${id}" is not readable.`); + } + + return this.orch.getConverters()?.get('settings').convertById(id); + } + + protected async hideGroup(name: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is hidding the group ${name}.`); + + throw new Error('Method not implemented.'); + } + + protected async hideSetting(id: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is hidding the setting ${id}.`); + + if (!(await this.isReadableById(id, appId))) { + throw new Error(`The setting "${id}" is not readable.`); + } + + throw new Error('Method not implemented.'); + } + + protected async isReadableById(id: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is checking if they can read the setting ${id}.`); + const setting = await Settings.findOneById(id); + return Boolean(setting && !setting.secret); + } + + protected async updateOne(setting: ISetting & { id: string }, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is updating the setting ${setting.id} .`); + + if (!(await this.isReadableById(setting.id, appId))) { + throw new Error(`The setting "${setting.id}" is not readable.`); + } + + await Settings.updateValueById(setting.id, setting.value); + } + + protected async incrementValue(id: string, value: number, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is incrementing the value of the setting ${id}.`); + + if (!(await this.isReadableById(id, appId))) { + throw new Error(`The setting "${id}" is not readable.`); + } + + await Settings.incrementValueById(id, value); + } +} diff --git a/apps/meteor/app/apps/server/bridges/uiInteraction.ts b/apps/meteor/app/apps/server/bridges/uiInteraction.ts new file mode 100644 index 000000000000..15788ce4684d --- /dev/null +++ b/apps/meteor/app/apps/server/bridges/uiInteraction.ts @@ -0,0 +1,25 @@ +import { UiInteractionBridge as UiIntBridge } from '@rocket.chat/apps-engine/server/bridges/UiInteractionBridge'; +import type { IUIKitInteraction } from '@rocket.chat/apps-engine/definition/uikit'; +import type { IUser } from '@rocket.chat/apps-engine/definition/users'; + +import { api } from '../../../../server/sdk/api'; +import type { AppServerOrchestrator } from '../orchestrator'; + +export class UiInteractionBridge extends UiIntBridge { + // eslint-disable-next-line no-empty-function + constructor(private readonly orch: AppServerOrchestrator) { + super(); + } + + protected async notifyUser(user: IUser, interaction: IUIKitInteraction, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is sending an interaction to user.`); + + const app = this.orch.getManager()?.getOneById(appId); + + if (!app) { + throw new Error('Invalid app provided'); + } + + api.broadcast('notify.uiInteraction', user.id, interaction); + } +} diff --git a/app/apps/server/bridges/uploads.ts b/apps/meteor/app/apps/server/bridges/uploads.ts similarity index 91% rename from app/apps/server/bridges/uploads.ts rename to apps/meteor/app/apps/server/bridges/uploads.ts index 38075e624241..21de997be2f6 100644 --- a/app/apps/server/bridges/uploads.ts +++ b/apps/meteor/app/apps/server/bridges/uploads.ts @@ -1,11 +1,11 @@ import { Meteor } from 'meteor/meteor'; import { UploadBridge } from '@rocket.chat/apps-engine/server/bridges/UploadBridge'; -import { IUpload } from '@rocket.chat/apps-engine/definition/uploads'; -import { IUploadDetails } from '@rocket.chat/apps-engine/definition/uploads/IUploadDetails'; +import type { IUpload } from '@rocket.chat/apps-engine/definition/uploads'; +import type { IUploadDetails } from '@rocket.chat/apps-engine/definition/uploads/IUploadDetails'; import { FileUpload } from '../../../file-upload/server'; import { determineFileType } from '../../lib/misc/determineFileType'; -import { AppServerOrchestrator } from '../orchestrator'; +import type { AppServerOrchestrator } from '../orchestrator'; const getUploadDetails = (details: IUploadDetails): Partial => { if (details.visitorToken) { diff --git a/apps/meteor/app/apps/server/bridges/users.ts b/apps/meteor/app/apps/server/bridges/users.ts new file mode 100644 index 000000000000..af00a8be2cd4 --- /dev/null +++ b/apps/meteor/app/apps/server/bridges/users.ts @@ -0,0 +1,117 @@ +import { Random } from 'meteor/random'; +import { UserPresence } from 'meteor/konecty:user-presence'; +import { UserBridge } from '@rocket.chat/apps-engine/server/bridges/UserBridge'; +import type { IUserCreationOptions, IUser } from '@rocket.chat/apps-engine/definition/users'; +import { Subscriptions, Users as UsersRaw } from '@rocket.chat/models'; + +import { setUserAvatar, checkUsernameAvailability, deleteUser } from '../../../lib/server/functions'; +import { Users } from '../../../models/server'; +import type { AppServerOrchestrator } from '../orchestrator'; + +export class AppUserBridge extends UserBridge { + // eslint-disable-next-line no-empty-function + constructor(private readonly orch: AppServerOrchestrator) { + super(); + } + + protected async getById(userId: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is getting the userId: "${userId}"`); + + return this.orch.getConverters()?.get('users').convertById(userId); + } + + protected async getByUsername(username: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is getting the username: "${username}"`); + + return this.orch.getConverters()?.get('users').convertByUsername(username); + } + + protected async getAppUser(appId?: string): Promise { + this.orch.debugLog(`The App ${appId} is getting its assigned user`); + + const user = Users.findOneByAppId(appId, {}); + + return this.orch.getConverters()?.get('users').convertToApp(user); + } + + protected async create(userDescriptor: Partial, appId: string, options?: IUserCreationOptions): Promise { + this.orch.debugLog(`The App ${appId} is requesting to create a new user.`); + const user = this.orch.getConverters()?.get('users').convertToRocketChat(userDescriptor); + + if (!user._id) { + user._id = Random.id(); + } + + if (!user.createdAt) { + user.createdAt = new Date(); + } + + switch (user.type) { + case 'app': + if (!checkUsernameAvailability(user.username)) { + throw new Error(`The username "${user.username}" is already being used. Rename or remove the user using it to install this App`); + } + + Users.insert(user); + + if (options?.avatarUrl) { + setUserAvatar(user, options.avatarUrl, '', 'local'); + } + + break; + + default: + throw new Error('Creating normal users is currently not supported'); + } + + return user._id; + } + + protected async remove(user: IUser & { id: string }, appId: string): Promise { + this.orch.debugLog(`The App's user is being removed: ${appId}`); + + // It's actually not a problem if there is no App user to delete - just means we don't need to do anything more. + if (!user) { + return true; + } + + try { + deleteUser(user.id); + } catch (err) { + throw new Error(`Errors occurred while deleting an app user: ${err}`); + } + + return true; + } + + protected async update(user: IUser & { id: string }, fields: Partial, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is updating a user`); + + if (!user) { + throw new Error('User not provided'); + } + + if (!Object.keys(fields).length) { + return true; + } + + const { status } = fields; + delete fields.status; + + await UsersRaw.update({ _id: user.id }, { $set: fields as any }); + + if (status) { + UserPresence.setDefaultStatus(user.id, status); + } + + return true; + } + + protected async getActiveUserCount(): Promise { + return Users.getActiveLocalUserCount(); + } + + protected async getUserUnreadMessageCount(uid: string): Promise { + return Subscriptions.getBadgeCount(uid); + } +} diff --git a/apps/meteor/app/apps/server/bridges/videoConferences.ts b/apps/meteor/app/apps/server/bridges/videoConferences.ts new file mode 100644 index 000000000000..d6ac7b62fb2a --- /dev/null +++ b/apps/meteor/app/apps/server/bridges/videoConferences.ts @@ -0,0 +1,71 @@ +import { VideoConferenceBridge } from '@rocket.chat/apps-engine/server/bridges/VideoConferenceBridge'; +import type { AppVideoConference, VideoConference } from '@rocket.chat/apps-engine/definition/videoConferences'; +import type { IVideoConfProvider } from '@rocket.chat/apps-engine/definition/videoConfProviders'; + +import { VideoConf } from '../../../../server/sdk'; +import type { AppServerOrchestrator } from '../orchestrator'; +import { videoConfProviders } from '../../../../server/lib/videoConfProviders'; +import type { AppVideoConferencesConverter } from '../converters/videoConferences'; + +export class AppVideoConferenceBridge extends VideoConferenceBridge { + // eslint-disable-next-line no-empty-function + constructor(private readonly orch: AppServerOrchestrator) { + super(); + } + + protected async getById(callId: string, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is getting the video conference byId: "${callId}"`); + + return this.orch.getConverters()?.get('videoConferences').convertById(callId); + } + + protected async create(call: AppVideoConference, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is creating a video conference.`); + + return ( + await VideoConf.create({ + type: 'videoconference', + ...call, + }) + ).callId; + } + + protected async update(call: VideoConference, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is updating a video conference.`); + + const oldData = call._id && (await VideoConf.getUnfiltered(call._id)); + if (!oldData) { + throw new Error('A video conference must exist to update.'); + } + + const data = (this.orch.getConverters()?.get('videoConferences') as AppVideoConferencesConverter).convertAppVideoConference(call); + await VideoConf.setProviderData(call._id, data.providerData); + + for (const { _id, ts } of data.users) { + if (oldData.users.find((user) => user._id === _id)) { + continue; + } + + VideoConf.addUser(call._id, _id, ts); + } + + if (data.endedBy && data.endedBy._id !== oldData.endedBy?._id) { + await VideoConf.setEndedBy(call._id, data.endedBy._id); + } else if (data.endedAt) { + await VideoConf.setEndedAt(call._id, data.endedAt); + } + + if (data.status > oldData.status) { + await VideoConf.setStatus(call._id, data.status); + } + } + + protected async registerProvider(info: IVideoConfProvider, appId: string): Promise { + this.orch.debugLog(`The App ${appId} is registering a video conference provider.`); + videoConfProviders.registerProvider(info.name, info.capabilities || {}, appId); + } + + protected async unRegisterProvider(info: IVideoConfProvider): Promise { + videoConfProviders.unRegisterProvider(info.name); + } +} diff --git a/apps/meteor/app/apps/server/communication/endpoints/actionButtonsHandler.ts b/apps/meteor/app/apps/server/communication/endpoints/actionButtonsHandler.ts new file mode 100644 index 000000000000..c2d5126366e4 --- /dev/null +++ b/apps/meteor/app/apps/server/communication/endpoints/actionButtonsHandler.ts @@ -0,0 +1,20 @@ +import type { AppManager } from '@rocket.chat/apps-engine/server/AppManager'; + +import { API } from '../../../../api/server'; +import type { AppsRestApi } from '../rest'; + +export const actionButtonsHandler = (apiManager: AppsRestApi) => + [ + { + authRequired: false, + }, + { + get(): any { + const manager = apiManager._manager as AppManager; + + const buttons = manager.getUIActionButtonManager().getAllActionButtons(); + + return API.v1.success(buttons); + }, + }, + ] as const; diff --git a/app/apps/server/communication/index.js b/apps/meteor/app/apps/server/communication/index.ts similarity index 100% rename from app/apps/server/communication/index.js rename to apps/meteor/app/apps/server/communication/index.ts diff --git a/apps/meteor/app/apps/server/communication/methods.ts b/apps/meteor/app/apps/server/communication/methods.ts new file mode 100644 index 000000000000..3757314cf387 --- /dev/null +++ b/apps/meteor/app/apps/server/communication/methods.ts @@ -0,0 +1,100 @@ +import { Meteor } from 'meteor/meteor'; +import type { SettingValue } from '@rocket.chat/core-typings'; +import { Settings } from '@rocket.chat/models'; + +import { hasPermission } from '../../../authorization/server'; +import { twoFactorRequired } from '../../../2fa/server/twoFactorRequired'; +import type { AppServerOrchestrator } from '../orchestrator'; + +const waitToLoad = function (orch: AppServerOrchestrator): unknown { + return new Promise((resolve) => { + const id = setInterval(() => { + if (orch.isEnabled() && orch.isLoaded()) { + clearInterval(id); + resolve(); + } + }, 100); + }); +}; + +const waitToUnload = function (orch: AppServerOrchestrator): unknown { + return new Promise((resolve) => { + const id = setInterval(() => { + if (!orch.isEnabled() && !orch.isLoaded()) { + clearInterval(id); + resolve(); + } + }, 100); + }); +}; + +export class AppMethods { + private orch: AppServerOrchestrator; + + constructor(orch: AppServerOrchestrator) { + this.orch = orch; + + this.addMethods(); + } + + isEnabled(): SettingValue { + return typeof this.orch !== 'undefined' && this.orch.isEnabled(); + } + + isLoaded(): boolean { + return Boolean(typeof this.orch !== 'undefined' && this.orch.isEnabled() && this.orch.isLoaded()); + } + + private addMethods(): void { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const instance = this; + + Meteor.methods({ + 'apps/is-enabled'() { + return instance.isEnabled(); + }, + + 'apps/is-loaded'() { + return instance.isLoaded(); + }, + + 'apps/go-enable': twoFactorRequired(function _appsGoEnable() { + const uid = Meteor.userId(); + if (!uid) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', { + method: 'apps/go-enable', + }); + } + + if (!hasPermission(uid, 'manage-apps')) { + throw new Meteor.Error('error-action-not-allowed', 'Not allowed', { + method: 'apps/go-enable', + }); + } + + Settings.updateValueById('Apps_Framework_enabled', true); + + Promise.await(waitToLoad(instance.orch)); + }), + + 'apps/go-disable': twoFactorRequired(function _appsGoDisable() { + const uid = Meteor.userId(); + if (!uid) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', { + method: 'apps/go-enable', + }); + } + + if (!hasPermission(uid, 'manage-apps')) { + throw new Meteor.Error('error-action-not-allowed', 'Not allowed', { + method: 'apps/go-enable', + }); + } + + Settings.updateValueById('Apps_Framework_enabled', false); + + Promise.await(waitToUnload(instance.orch)); + }), + }); + } +} diff --git a/apps/meteor/app/apps/server/communication/rest.js b/apps/meteor/app/apps/server/communication/rest.js new file mode 100644 index 000000000000..79276a15a8b1 --- /dev/null +++ b/apps/meteor/app/apps/server/communication/rest.js @@ -0,0 +1,866 @@ +import { Meteor } from 'meteor/meteor'; +import { HTTP } from 'meteor/http'; +import { Settings } from '@rocket.chat/models'; + +import { API } from '../../../api/server'; +import { getUploadFormData } from '../../../api/server/lib/getUploadFormData'; +import { getWorkspaceAccessToken, getUserCloudAccessToken } from '../../../cloud/server'; +import { settings } from '../../../settings/server'; +import { Info } from '../../../utils'; +import { Users } from '../../../models/server'; +import { Apps } from '../orchestrator'; +import { formatAppInstanceForRest } from '../../lib/misc/formatAppInstanceForRest'; +import { actionButtonsHandler } from './endpoints/actionButtonsHandler'; +import { fetch } from '../../../../server/lib/http/fetch'; + +const appsEngineVersionForMarketplace = Info.marketplaceApiVersion.replace(/-.*/g, ''); +const getDefaultHeaders = () => ({ + 'X-Apps-Engine-Version': appsEngineVersionForMarketplace, +}); + +const purchaseTypes = new Set(['buy', 'subscription']); + +export class AppsRestApi { + constructor(orch, manager) { + this._orch = orch; + this._manager = manager; + this.loadAPI(); + } + + async loadAPI() { + this.api = new API.ApiClass({ + version: 'apps', + useDefaultAuth: true, + prettyJson: false, + enableCors: false, + auth: API.getUserAuth(), + }); + this.addManagementRoutes(); + } + + addManagementRoutes() { + const orchestrator = this._orch; + const manager = this._manager; + + const handleError = (message, e) => { + // when there is no `response` field in the error, it means the request + // couldn't even make it to the server + if (!e.hasOwnProperty('response')) { + orchestrator.getRocketChatLogger().warn(message, e.message); + return API.v1.internalError('Could not reach the Marketplace'); + } + + orchestrator.getRocketChatLogger().error(message, e.response.data); + + if (e.response.statusCode >= 500 && e.response.statusCode <= 599) { + return API.v1.internalError(); + } + + if (e.response.statusCode === 404) { + return API.v1.notFound(); + } + + return API.v1.failure(); + }; + + this.api.addRoute('actionButtons', ...actionButtonsHandler(this)); + + // WE NEED TO MOVE EACH ENDPOINT HANDLER TO IT'S OWN FILE + this.api.addRoute( + '', + { authRequired: true, permissionsRequired: ['manage-apps'] }, + { + async get() { + const baseUrl = orchestrator.getMarketplaceUrl(); + + // Gets the Apps from the marketplace + if (this.queryParams.marketplace) { + const headers = getDefaultHeaders(); + const token = await getWorkspaceAccessToken(); + if (token) { + headers.Authorization = `Bearer ${token}`; + } + + let result; + try { + result = HTTP.get(`${baseUrl}/v1/apps`, { + headers, + }); + } catch (e) { + return handleError('Unable to access Marketplace. Does the server has access to the internet?', e); + } + + if (!result || result.statusCode !== 200) { + orchestrator.getRocketChatLogger().error('Error getting the Apps:', result.data); + return API.v1.failure(); + } + + return API.v1.success(result.data); + } + + if (this.queryParams.categories) { + const headers = getDefaultHeaders(); + const token = await getWorkspaceAccessToken(); + if (token) { + headers.Authorization = `Bearer ${token}`; + } + + let result; + try { + result = HTTP.get(`${baseUrl}/v1/categories`, { + headers, + }); + } catch (e) { + orchestrator.getRocketChatLogger().error('Error getting the categories from the Marketplace:', e.response.data); + return API.v1.internalError(); + } + + if (!result || result.statusCode !== 200) { + orchestrator.getRocketChatLogger().error('Error getting the categories from the Marketplace:', result.data); + return API.v1.failure(); + } + + return API.v1.success(result.data); + } + + if (this.queryParams.buildExternalUrl && this.queryParams.appId) { + const workspaceId = settings.get('Cloud_Workspace_Id'); + + if (!this.queryParams.purchaseType || !purchaseTypes.has(this.queryParams.purchaseType)) { + return API.v1.failure({ error: 'Invalid purchase type' }); + } + + const token = getUserCloudAccessToken(this.getLoggedInUser()._id, true, 'marketplace:purchase', false); + if (!token) { + return API.v1.failure({ error: 'Unauthorized' }); + } + + const subscribeRoute = this.queryParams.details === 'true' ? 'subscribe/details' : 'subscribe'; + + const seats = Users.getActiveLocalUserCount(); + + return API.v1.success({ + url: `${baseUrl}/apps/${this.queryParams.appId}/${ + this.queryParams.purchaseType === 'buy' ? this.queryParams.purchaseType : subscribeRoute + }?workspaceId=${workspaceId}&token=${token}&seats=${seats}`, + }); + } + + const apps = manager.get().map(formatAppInstanceForRest); + + return API.v1.success({ apps }); + }, + async post() { + let buff; + let marketplaceInfo; + let permissionsGranted; + + if (this.bodyParams.url) { + if (settings.get('Apps_Framework_Development_Mode') !== true) { + return API.v1.failure({ error: 'Installation from url is disabled.' }); + } + + try { + const response = await fetch(this.bodyParams.url); + + if (response.status !== 200 || response.headers.get('content-type') !== 'application/zip') { + return API.v1.failure({ + error: 'Invalid url. It doesn\'t exist or is not "application/zip".', + }); + } + + buff = Buffer.from(await response.arrayBuffer()); + } catch (e) { + orchestrator.getRocketChatLogger().error('Error getting the app from url:', e.response.data); + return API.v1.internalError(); + } + + if (this.bodyParams.downloadOnly) { + return API.v1.success({ buff }); + } + } else if (this.bodyParams.appId && this.bodyParams.marketplace && this.bodyParams.version) { + const baseUrl = orchestrator.getMarketplaceUrl(); + + const headers = getDefaultHeaders(); + try { + const downloadToken = await getWorkspaceAccessToken(true, 'marketplace:download', false); + const marketplaceToken = await getWorkspaceAccessToken(); + + const [downloadResponse, marketplaceResponse] = await Promise.all([ + fetch(`${baseUrl}/v2/apps/${this.bodyParams.appId}/download/${this.bodyParams.version}?token=${downloadToken}`, { + headers, + }), + fetch(`${baseUrl}/v1/apps/${this.bodyParams.appId}?appVersion=${this.bodyParams.version}`, { + headers: { + Authorization: `Bearer ${marketplaceToken}`, + ...headers, + }, + }), + ]); + + if (downloadResponse.headers.get('content-type') !== 'application/zip') { + throw new Error('Invalid url. It doesn\'t exist or is not "application/zip".'); + } + + buff = Buffer.from(await downloadResponse.arrayBuffer()); + marketplaceInfo = await marketplaceResponse.json(); + permissionsGranted = this.bodyParams.permissionsGranted; + } catch (err) { + return API.v1.failure(err.message); + } + } else { + if (settings.get('Apps_Framework_Development_Mode') !== true) { + return API.v1.failure({ error: 'Direct installation of an App is disabled.' }); + } + + const [app, formData] = await getUploadFormData( + { + request: this.request, + }, + { field: 'app' }, + ); + buff = app?.fileBuffer; + permissionsGranted = (() => { + try { + const permissions = JSON.parse(formData?.permissions || ''); + return permissions.length ? permissions : undefined; + } catch { + return undefined; + } + })(); + } + + if (!buff) { + return API.v1.failure({ error: 'Failed to get a file to install for the App. ' }); + } + + const user = orchestrator.getConverters().get('users').convertToApp(Meteor.user()); + + const aff = await manager.add(buff, { marketplaceInfo, permissionsGranted, enable: true, user }); + const info = aff.getAppInfo(); + + if (aff.hasStorageError()) { + return API.v1.failure({ status: 'storage_error', messages: [aff.getStorageError()] }); + } + + if (aff.hasAppUserError()) { + return API.v1.failure({ + status: 'app_user_error', + messages: [aff.getAppUserError().message], + payload: { username: aff.getAppUserError().username }, + }); + } + + info.status = aff.getApp().getStatus(); + + return API.v1.success({ + app: info, + implemented: aff.getImplementedInferfaces(), + licenseValidation: aff.getLicenseValidationResult(), + }); + }, + }, + ); + + this.api.addRoute( + 'externalComponents', + { authRequired: false }, + { + get() { + const externalComponents = orchestrator.getProvidedComponents(); + + return API.v1.success({ externalComponents }); + }, + }, + ); + + this.api.addRoute( + 'languages', + { authRequired: false }, + { + get() { + const apps = manager.get().map((prl) => ({ + id: prl.getID(), + languages: prl.getStorageItem().languageContent, + })); + + return API.v1.success({ apps }); + }, + }, + ); + + this.api.addRoute( + 'externalComponentEvent', + { authRequired: true }, + { + post() { + if ( + !this.bodyParams.externalComponent || + !['IPostExternalComponentOpened', 'IPostExternalComponentClosed'].includes(this.bodyParams.event) + ) { + return API.v1.failure({ error: 'Event and externalComponent must be provided.' }); + } + + try { + const { event, externalComponent } = this.bodyParams; + const result = Apps.getBridges().getListenerBridge().externalComponentEvent(event, externalComponent); + + return API.v1.success({ result }); + } catch (e) { + orchestrator.getRocketChatLogger().error(`Error triggering external components' events ${e.response.data}`); + return API.v1.internalError(); + } + }, + }, + ); + + this.api.addRoute( + 'bundles/:id/apps', + { authRequired: true, permissionsRequired: ['manage-apps'] }, + { + async get() { + const baseUrl = orchestrator.getMarketplaceUrl(); + + const headers = {}; + const token = await getWorkspaceAccessToken(); + if (token) { + headers.Authorization = `Bearer ${token}`; + } + + let result; + try { + result = HTTP.get(`${baseUrl}/v1/bundles/${this.urlParams.id}/apps`, { + headers, + }); + } catch (e) { + orchestrator.getRocketChatLogger().error("Error getting the Bundle's Apps from the Marketplace:", e.response.data); + return API.v1.internalError(); + } + + if (!result || result.statusCode !== 200 || result.data.length === 0) { + orchestrator.getRocketChatLogger().error("Error getting the Bundle's Apps from the Marketplace:", result.data); + return API.v1.failure(); + } + + return API.v1.success({ apps: result.data }); + }, + }, + ); + + this.api.addRoute( + 'featured', + { authRequired: true }, + { + async get() { + const baseUrl = orchestrator.getMarketplaceUrl(); + + const headers = getDefaultHeaders(); + const token = await getWorkspaceAccessToken(); + if (token) { + headers.Authorization = `Bearer ${token}`; + } + + let result; + try { + result = HTTP.get(`${baseUrl}/v1/apps/featured`, { + headers, + }); + } catch (e) { + return handleError('Unable to access Marketplace. Does the server has access to the internet?', e); + } + + if (!result || result.statusCode !== 200) { + orchestrator.getRocketChatLogger().error('Error getting the Featured Apps from the Marketplace:', result.data); + return API.v1.failure(); + } + + return API.v1.success(result.data); + }, + }, + ); + + this.api.addRoute( + ':id', + { authRequired: true, permissionsRequired: ['manage-apps'] }, + { + async get() { + if (this.queryParams.marketplace && this.queryParams.version) { + const baseUrl = orchestrator.getMarketplaceUrl(); + + const headers = {}; // DO NOT ATTACH THE FRAMEWORK/ENGINE VERSION HERE. + const token = await getWorkspaceAccessToken(); + if (token) { + headers.Authorization = `Bearer ${token}`; + } + + let result; + try { + result = HTTP.get(`${baseUrl}/v1/apps/${this.urlParams.id}?appVersion=${this.queryParams.version}`, { + headers, + }); + } catch (e) { + return handleError('Unable to access Marketplace. Does the server has access to the internet?', e); + } + + if (!result || result.statusCode !== 200 || result.data.length === 0) { + orchestrator.getRocketChatLogger().error('Error getting the App information from the Marketplace:', result.data); + return API.v1.failure(); + } + + return API.v1.success({ app: result.data[0] }); + } + + if (this.queryParams.marketplace && this.queryParams.update && this.queryParams.appVersion) { + const baseUrl = orchestrator.getMarketplaceUrl(); + + const headers = getDefaultHeaders(); + const token = await getWorkspaceAccessToken(); + if (token) { + headers.Authorization = `Bearer ${token}`; + } + + let result; + try { + result = HTTP.get(`${baseUrl}/v1/apps/${this.urlParams.id}/latest?frameworkVersion=${appsEngineVersionForMarketplace}`, { + headers, + }); + } catch (e) { + return handleError('Unable to access Marketplace. Does the server has access to the internet?', e); + } + + if (result.statusCode !== 200 || result.data.length === 0) { + orchestrator.getRocketChatLogger().error('Error getting the App update info from the Marketplace:', result.data); + return API.v1.failure(); + } + + return API.v1.success({ app: result.data }); + } + const app = manager.getOneById(this.urlParams.id); + if (!app) { + return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); + } + + return API.v1.success({ + app: formatAppInstanceForRest(app), + }); + }, + async post() { + let buff; + let permissionsGranted; + + if (this.bodyParams.url) { + if (settings.get('Apps_Framework_Development_Mode') !== true) { + return API.v1.failure({ error: 'Updating an App from a url is disabled.' }); + } + + const response = await fetch(this.bodyParams.url); + + if (response.status !== 200 || response.headers.get('content-type') !== 'application/zip') { + return API.v1.failure({ + error: 'Invalid url. It doesn\'t exist or is not "application/zip".', + }); + } + + buff = Buffer.from(await response.arrayBuffer()); + } else if (this.bodyParams.appId && this.bodyParams.marketplace && this.bodyParams.version) { + const baseUrl = orchestrator.getMarketplaceUrl(); + + const headers = getDefaultHeaders(); + const token = await getWorkspaceAccessToken(true, 'marketplace:download', false); + + try { + const response = await fetch( + `${baseUrl}/v2/apps/${this.bodyParams.appId}/download/${this.bodyParams.version}?token=${token}`, + { + headers, + }, + ); + + if (response.status !== 200) { + orchestrator.getRocketChatLogger().error('Error getting the App from the Marketplace:', await response.text()); + return API.v1.failure(); + } + + if (response.headers.get('content-type') !== 'application/zip') { + return API.v1.failure({ + error: 'Invalid url. It doesn\'t exist or is not "application/zip".', + }); + } + + buff = Buffer.from(await response.arrayBuffer()); + } catch (e) { + orchestrator.getRocketChatLogger().error('Error getting the App from the Marketplace:', e.response.data); + return API.v1.internalError(); + } + } else { + if (settings.get('Apps_Framework_Development_Mode') !== true) { + return API.v1.failure({ error: 'Direct updating of an App is disabled.' }); + } + + const [app, formData] = await getUploadFormData( + { + request: this.request, + }, + { field: 'app' }, + ); + buff = app?.fileBuffer; + permissionsGranted = (() => { + try { + const permissions = JSON.parse(formData?.permissions || ''); + return permissions.length ? permissions : undefined; + } catch { + return undefined; + } + })(); + } + + if (!buff) { + return API.v1.failure({ error: 'Failed to get a file to install for the App. ' }); + } + + const aff = await manager.update(buff, permissionsGranted); + const info = aff.getAppInfo(); + + if (aff.hasStorageError()) { + return API.v1.failure({ status: 'storage_error', messages: [aff.getStorageError()] }); + } + + if (aff.hasAppUserError()) { + return API.v1.failure({ + status: 'app_user_error', + messages: [aff.getAppUserError().message], + payload: { username: aff.getAppUserError().username }, + }); + } + + info.status = aff.getApp().getStatus(); + + return API.v1.success({ + app: info, + implemented: aff.getImplementedInferfaces(), + licenseValidation: aff.getLicenseValidationResult(), + }); + }, + delete() { + const prl = manager.getOneById(this.urlParams.id); + + if (!prl) { + return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); + } + + const user = orchestrator.getConverters().get('users').convertToApp(Meteor.user()); + + Promise.await(manager.remove(prl.getID(), { user })); + + const info = prl.getInfo(); + info.status = prl.getStatus(); + + return API.v1.success({ app: info }); + }, + }, + ); + + this.api.addRoute( + ':id/versions', + { authRequired: true, permissionsRequired: ['manage-apps'] }, + { + async get() { + const baseUrl = orchestrator.getMarketplaceUrl(); + + const headers = {}; // DO NOT ATTACH THE FRAMEWORK/ENGINE VERSION HERE. + const token = await getWorkspaceAccessToken(); + if (token) { + headers.Authorization = `Bearer ${token}`; + } + + let result; + try { + result = HTTP.get(`${baseUrl}/v1/apps/${this.urlParams.id}`, { + headers, + }); + } catch (e) { + return handleError('Unable to access Marketplace. Does the server has access to the internet?', e); + } + + if (!result || result.statusCode !== 200) { + orchestrator.getRocketChatLogger().error('Error getting the App versions from the Marketplace:', result.data); + return API.v1.failure(); + } + + return API.v1.success({ apps: result.data }); + }, + }, + ); + + this.api.addRoute( + ':id/sync', + { authRequired: true, permissionsRequired: ['manage-apps'] }, + { + async post() { + const baseUrl = orchestrator.getMarketplaceUrl(); + + const headers = getDefaultHeaders(); + const token = await getWorkspaceAccessToken(); + if (token) { + headers.Authorization = `Bearer ${token}`; + } + + const workspaceIdSetting = await Settings.findOneById('Cloud_Workspace_Id'); + + let result; + try { + result = HTTP.get(`${baseUrl}/v1/workspaces/${workspaceIdSetting.value}/apps/${this.urlParams.id}`, { + headers, + }); + } catch (e) { + orchestrator.getRocketChatLogger().error('Error syncing the App from the Marketplace:', e.response.data); + return API.v1.internalError(); + } + + if (result.statusCode !== 200) { + orchestrator.getRocketChatLogger().error('Error syncing the App from the Marketplace:', result.data); + return API.v1.failure(); + } + + await Apps.updateAppsMarketplaceInfo([result.data]); + + return API.v1.success({ app: result.data }); + }, + }, + ); + + this.api.addRoute( + ':id/icon', + { authRequired: false }, + { + get() { + const prl = manager.getOneById(this.urlParams.id); + if (!prl) { + return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); + } + + const info = prl.getInfo(); + if (!info || !info.iconFileContent) { + return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); + } + + const imageData = info.iconFileContent.split(';base64,'); + + const buf = Buffer.from(imageData[1], 'base64'); + + return { + statusCode: 200, + headers: { + 'Content-Length': buf.length, + 'Content-Type': imageData[0].replace('data:', ''), + }, + body: buf, + }; + }, + }, + ); + + this.api.addRoute( + ':id/screenshots', + { authRequired: false }, + { + get() { + const baseUrl = orchestrator.getMarketplaceUrl(); + const appId = this.urlParams.id; + const headers = getDefaultHeaders(); + + try { + const { data } = HTTP.get(`${baseUrl}/v1/apps/${appId}/screenshots`, { headers }); + + return API.v1.success({ + screenshots: data, + }); + } catch (e) { + orchestrator.getRocketChatLogger().error('Error getting the screenshots from the Marketplace:', e.message); + return API.v1.failure(e.message); + } + }, + }, + ); + + this.api.addRoute( + ':id/languages', + { authRequired: false }, + { + get() { + const prl = manager.getOneById(this.urlParams.id); + + if (prl) { + const languages = prl.getStorageItem().languageContent || {}; + + return API.v1.success({ languages }); + } + return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); + }, + }, + ); + + this.api.addRoute( + ':id/logs', + { authRequired: true, permissionsRequired: ['manage-apps'] }, + { + get() { + const prl = manager.getOneById(this.urlParams.id); + + if (prl) { + const { offset, count } = this.getPaginationItems(); + const { sort, fields, query } = this.parseJsonQuery(); + + const ourQuery = Object.assign({}, query, { appId: prl.getID() }); + const options = { + sort: sort || { _updatedAt: -1 }, + skip: offset, + limit: count, + fields, + }; + + const logs = Promise.await(orchestrator.getLogStorage().find(ourQuery, options)); + + return API.v1.success({ logs }); + } + return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); + }, + }, + ); + + this.api.addRoute( + ':id/settings', + { authRequired: true, permissionsRequired: ['manage-apps'] }, + { + get() { + const prl = manager.getOneById(this.urlParams.id); + + if (prl) { + const settings = Object.assign({}, prl.getStorageItem().settings); + + Object.keys(settings).forEach((k) => { + if (settings[k].hidden) { + delete settings[k]; + } + }); + + return API.v1.success({ settings }); + } + return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); + }, + post() { + if (!this.bodyParams || !this.bodyParams.settings) { + return API.v1.failure('The settings to update must be present.'); + } + + const prl = manager.getOneById(this.urlParams.id); + + if (!prl) { + return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); + } + + const { settings } = prl.getStorageItem(); + + const updated = []; + this.bodyParams.settings.forEach((s) => { + if (settings[s.id]) { + Promise.await(manager.getSettingsManager().updateAppSetting(this.urlParams.id, s)); + // Updating? + updated.push(s); + } + }); + + return API.v1.success({ updated }); + }, + }, + ); + + this.api.addRoute( + ':id/settings/:settingId', + { authRequired: true, permissionsRequired: ['manage-apps'] }, + { + get() { + try { + const setting = manager.getSettingsManager().getAppSetting(this.urlParams.id, this.urlParams.settingId); + + API.v1.success({ setting }); + } catch (e) { + if (e.message.includes('No setting found')) { + return API.v1.notFound(`No Setting found on the App by the id of: "${this.urlParams.settingId}"`); + } + if (e.message.includes('No App found')) { + return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); + } + return API.v1.failure(e.message); + } + }, + post() { + if (!this.bodyParams.setting) { + return API.v1.failure('Setting to update to must be present on the posted body.'); + } + + try { + Promise.await(manager.getSettingsManager().updateAppSetting(this.urlParams.id, this.bodyParams.setting)); + + return API.v1.success(); + } catch (e) { + if (e.message.includes('No setting found')) { + return API.v1.notFound(`No Setting found on the App by the id of: "${this.urlParams.settingId}"`); + } + if (e.message.includes('No App found')) { + return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); + } + return API.v1.failure(e.message); + } + }, + }, + ); + + this.api.addRoute( + ':id/apis', + { authRequired: true, permissionsRequired: ['manage-apps'] }, + { + get() { + const prl = manager.getOneById(this.urlParams.id); + + if (prl) { + return API.v1.success({ + apis: manager.apiManager.listApis(this.urlParams.id), + }); + } + return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); + }, + }, + ); + + this.api.addRoute( + ':id/status', + { authRequired: true, permissionsRequired: ['manage-apps'] }, + { + get() { + const prl = manager.getOneById(this.urlParams.id); + + if (prl) { + return API.v1.success({ status: prl.getStatus() }); + } + return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); + }, + post() { + if (!this.bodyParams.status || typeof this.bodyParams.status !== 'string') { + return API.v1.failure('Invalid status provided, it must be "status" field and a string.'); + } + + const prl = manager.getOneById(this.urlParams.id); + + if (!prl) { + return API.v1.notFound(`No App found by the id of: ${this.urlParams.id}`); + } + + const result = Promise.await(manager.changeStatus(prl.getID(), this.bodyParams.status)); + + return API.v1.success({ status: result.getStatus() }); + }, + }, + ); + } +} diff --git a/apps/meteor/app/apps/server/communication/uikit.ts b/apps/meteor/app/apps/server/communication/uikit.ts new file mode 100644 index 000000000000..933eb4c918c8 --- /dev/null +++ b/apps/meteor/app/apps/server/communication/uikit.ts @@ -0,0 +1,328 @@ +import type { Request, Response } from 'express'; +import express from 'express'; +import cors from 'cors'; +import rateLimit from 'express-rate-limit'; +import { Meteor } from 'meteor/meteor'; +import { WebApp } from 'meteor/webapp'; +import { UIKitIncomingInteractionType } from '@rocket.chat/apps-engine/definition/uikit'; +import { AppInterface } from '@rocket.chat/apps-engine/definition/metadata'; + +import { settings } from '../../../settings/server'; +import type { AppServerOrchestrator } from '../orchestrator'; +import { Apps } from '../orchestrator'; +import { UiKitCoreApp } from '../../../../server/sdk'; +import { authenticationMiddleware } from '../../../api/server/middlewares/authentication'; + +const apiServer = express(); + +apiServer.disable('x-powered-by'); + +let corsEnabled = false; +let allowListOrigins: string[] = []; + +settings.watch('API_Enable_CORS', (value: boolean) => { + corsEnabled = value; +}); + +settings.watch('API_CORS_Origin', (value: string) => { + allowListOrigins = value + ? value + .trim() + .split(',') + .map((origin) => String(origin).trim().toLocaleLowerCase()) + : []; +}); + +WebApp.connectHandlers.use(apiServer); + +// eslint-disable-next-line new-cap +const router = express.Router(); + +const unauthorized = (res: Response): unknown => + res.status(401).send({ + status: 'error', + message: 'You must be logged in to do this.', + }); + +Meteor.startup(() => { + // use specific rate limit of 600 (which is 60 times the default limits) requests per minute (around 10/second) + const apiLimiter = rateLimit({ + windowMs: settings.get('API_Enable_Rate_Limiter_Limit_Time_Default'), + max: (settings.get('API_Enable_Rate_Limiter_Limit_Calls_Default') as number) * 60, + skip: () => + settings.get('API_Enable_Rate_Limiter') !== true || + (process.env.NODE_ENV === 'development' && settings.get('API_Enable_Rate_Limiter_Dev') !== true), + }); + + router.use(apiLimiter); +}); + +router.use(authenticationMiddleware({ rejectUnauthorized: false })); + +router.use((req: Request, res, next) => { + const { 'x-visitor-token': visitorToken } = req.headers; + + if (visitorToken) { + req.body.visitor = Apps.getConverters()?.get('visitors').convertByToken(visitorToken); + } + + if (!req.user && !req.body.visitor) { + return unauthorized(res); + } + + next(); +}); + +const corsOptions: cors.CorsOptions = { + origin: (origin, callback) => { + if ( + !origin || + !corsEnabled || + allowListOrigins.includes('*') || + allowListOrigins.includes(origin) || + origin === settings.get('Site_Url') + ) { + callback(null, true); + } else { + callback(new Error('Not allowed by CORS'), false); + } + }, +}; + +apiServer.use('/api/apps/ui.interaction/', cors(corsOptions), router); // didn't have the rateLimiter option + +const getPayloadForType = (type: UIKitIncomingInteractionType, req: Request) => { + if (type === UIKitIncomingInteractionType.BLOCK) { + const { type, actionId, triggerId, mid, rid, payload, container } = req.body; + + const { visitor } = req.body; + const { user } = req; + + const room = rid; // orch.getConverters().get('rooms').convertById(rid); + const message = mid; + + return { + type, + container, + actionId, + message, + triggerId, + payload, + user, + visitor, + room, + } as const; + } + + if (type === UIKitIncomingInteractionType.VIEW_CLOSED) { + const { + type, + actionId, + payload: { view, isCleared }, + } = req.body; + + const { user } = req; + + return { + type, + actionId, + user, + payload: { + view, + isCleared, + }, + }; + } + + if (type === UIKitIncomingInteractionType.VIEW_SUBMIT) { + const { type, actionId, triggerId, payload } = req.body; + + const { user } = req; + + return { + type, + actionId, + triggerId, + payload, + user, + }; + } + + throw new Error('Type not supported'); +}; + +router.post('/:appId', async (req, res, next) => { + const { appId } = req.params; + + const isCore = await UiKitCoreApp.isRegistered(appId); + if (!isCore) { + return next(); + } + + // eslint-disable-next-line prefer-destructuring + const type: UIKitIncomingInteractionType = req.body.type; + + try { + const payload = { + ...getPayloadForType(type, req), + appId, + }; + + const result = await (UiKitCoreApp as any)[type](payload); // TO-DO: fix type + + res.send(result); + } catch (e) { + if (e instanceof Error) res.status(500).send({ error: e.message }); + else res.status(500).send({ error: e }); + } +}); + +const appsRoutes = + (orch: AppServerOrchestrator) => + (req: Request, res: Response): void => { + const { appId } = req.params; + + const { type } = req.body; + + switch (type) { + case UIKitIncomingInteractionType.BLOCK: { + const { type, actionId, triggerId, mid, rid, payload, container } = req.body; + + const { visitor } = req.body; + const room = orch.getConverters()?.get('rooms').convertById(rid); + const user = orch.getConverters()?.get('users').convertToApp(req.user); + const message = mid && orch.getConverters()?.get('messages').convertById(mid); + + const action = { + type, + container, + appId, + actionId, + message, + triggerId, + payload, + user, + visitor, + room, + }; + + try { + const eventInterface = !visitor ? AppInterface.IUIKitInteractionHandler : AppInterface.IUIKitLivechatInteractionHandler; + + const result = Promise.await(orch.triggerEvent(eventInterface, action)); + + res.send(result); + } catch (e) { + res.status(500).send(e); // e.message + } + break; + } + + case UIKitIncomingInteractionType.VIEW_CLOSED: { + const { + type, + actionId, + payload: { view, isCleared }, + } = req.body; + + const user = orch.getConverters()?.get('users').convertToApp(req.user); + + const action = { + type, + appId, + actionId, + user, + payload: { + view, + isCleared, + }, + }; + + try { + const result = Promise.await(orch.triggerEvent('IUIKitInteractionHandler', action)); + + res.send(result); + } catch (e) { + res.status(500).send(e); // e.message + } + break; + } + + case UIKitIncomingInteractionType.VIEW_SUBMIT: { + const { type, actionId, triggerId, payload } = req.body; + + const user = orch.getConverters()?.get('users').convertToApp(req.user); + + const action = { + type, + appId, + actionId, + triggerId, + payload, + user, + }; + + try { + const result = Promise.await(orch.triggerEvent('IUIKitInteractionHandler', action)); + + res.send(result); + } catch (e) { + res.status(500).send(e); // e.message + } + break; + } + + case UIKitIncomingInteractionType.ACTION_BUTTON: { + const { + type, + actionId, + triggerId, + rid, + mid, + payload: { context }, + } = req.body; + + const room = orch.getConverters()?.get('rooms').convertById(rid); + const user = orch.getConverters()?.get('users').convertToApp(req.user); + const message = mid && orch.getConverters()?.get('messages').convertById(mid); + + const action = { + type, + appId, + actionId, + triggerId, + user, + room, + message, + payload: { + context, + }, + }; + + try { + const result = Promise.await(orch.triggerEvent('IUIKitInteractionHandler', action)); + + res.send(result); + } catch (e) { + res.status(500).send(e); // e.message + } + break; + } + + default: { + res.status(400).send({ error: 'Unknown action' }); + } + } + + // TODO: validate payloads per type + }; + +export class AppUIKitInteractionApi { + orch: AppServerOrchestrator; + + constructor(orch: AppServerOrchestrator) { + this.orch = orch; + + router.post('/:appId', appsRoutes(orch)); + } +} diff --git a/apps/meteor/app/apps/server/communication/websockets.ts b/apps/meteor/app/apps/server/communication/websockets.ts new file mode 100644 index 000000000000..71cf29f68ded --- /dev/null +++ b/apps/meteor/app/apps/server/communication/websockets.ts @@ -0,0 +1,221 @@ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ +import type { AppStatus } from '@rocket.chat/apps-engine/definition/AppStatus'; +import { AppStatusUtils } from '@rocket.chat/apps-engine/definition/AppStatus'; +import type { ISetting } from '@rocket.chat/core-typings'; +import type { IStreamer } from 'meteor/rocketchat:streamer'; + +import { SystemLogger } from '../../../../server/lib/logger/system'; +import notifications from '../../../notifications/server/lib/Notifications'; +import type { AppServerOrchestrator } from '../orchestrator'; + +export enum AppEvents { + APP_ADDED = 'app/added', + APP_REMOVED = 'app/removed', + APP_UPDATED = 'app/updated', + APP_STATUS_CHANGE = 'app/statusUpdate', + APP_SETTING_UPDATED = 'app/settingUpdated', + COMMAND_ADDED = 'command/added', + COMMAND_DISABLED = 'command/disabled', + COMMAND_UPDATED = 'command/updated', + COMMAND_REMOVED = 'command/removed', + ACTIONS_CHANGED = 'actions/changed', +} + +export class AppServerListener { + private orch: AppServerOrchestrator; + + engineStreamer: IStreamer; + + clientStreamer: IStreamer; + + received; + + constructor(orch: AppServerOrchestrator, engineStreamer: IStreamer, clientStreamer: IStreamer, received: Map) { + this.orch = orch; + this.engineStreamer = engineStreamer; + this.clientStreamer = clientStreamer; + this.received = received; + + this.engineStreamer.on(AppEvents.APP_STATUS_CHANGE, this.onAppStatusUpdated.bind(this)); + this.engineStreamer.on(AppEvents.APP_REMOVED, this.onAppRemoved.bind(this)); + this.engineStreamer.on(AppEvents.APP_UPDATED, this.onAppUpdated.bind(this)); + this.engineStreamer.on(AppEvents.APP_ADDED, this.onAppAdded.bind(this)); + this.engineStreamer.on(AppEvents.ACTIONS_CHANGED, this.onActionsChanged.bind(this)); + + this.engineStreamer.on(AppEvents.APP_SETTING_UPDATED, this.onAppSettingUpdated.bind(this)); + this.engineStreamer.on(AppEvents.COMMAND_ADDED, this.onCommandAdded.bind(this)); + this.engineStreamer.on(AppEvents.COMMAND_DISABLED, this.onCommandDisabled.bind(this)); + this.engineStreamer.on(AppEvents.COMMAND_UPDATED, this.onCommandUpdated.bind(this)); + this.engineStreamer.on(AppEvents.COMMAND_REMOVED, this.onCommandRemoved.bind(this)); + } + + async onAppAdded(appId: string): Promise { + await (this.orch.getManager()! as any).loadOne(appId); // TO-DO: fix type + this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_ADDED, appId); + } + + async onAppStatusUpdated({ appId, status }: { appId: string; status: AppStatus }): Promise { + const app = this.orch.getManager()?.getOneById(appId); + + if (!app || app.getStatus() === status) { + return; + } + + this.received.set(`${AppEvents.APP_STATUS_CHANGE}_${appId}`, { + appId, + status, + when: new Date(), + }); + + if (AppStatusUtils.isEnabled(status)) { + await this.orch.getManager()?.enable(appId).catch(SystemLogger.error); + this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_STATUS_CHANGE, { appId, status }); + } else if (AppStatusUtils.isDisabled(status)) { + await this.orch.getManager()?.disable(appId, status, true).catch(SystemLogger.error); + this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_STATUS_CHANGE, { appId, status }); + } + } + + async onAppSettingUpdated({ appId, setting }: { appId: string; setting: ISetting }): Promise { + this.received.set(`${AppEvents.APP_SETTING_UPDATED}_${appId}_${setting._id}`, { + appId, + setting, + when: new Date(), + }); + await this.orch + .getManager()! + .getSettingsManager() + .updateAppSetting(appId, setting as any); // TO-DO: fix type of `setting` + this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_SETTING_UPDATED, { appId }); + } + + async onAppUpdated(appId: string): Promise { + this.received.set(`${AppEvents.APP_UPDATED}_${appId}`, { appId, when: new Date() }); + + const storageItem = await this.orch.getStorage()!.retrieveOne(appId); + + const appPackage = await this.orch.getAppSourceStorage()!.fetch(storageItem); + + await this.orch.getManager()!.updateLocal(storageItem, appPackage); + + this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_UPDATED, appId); + } + + async onAppRemoved(appId: string): Promise { + const app = this.orch.getManager()!.getOneById(appId); + + if (!app) { + return; + } + + await this.orch.getManager()!.removeLocal(appId); + this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_REMOVED, appId); + } + + async onCommandAdded(command: string): Promise { + this.clientStreamer.emitWithoutBroadcast(AppEvents.COMMAND_ADDED, command); + } + + async onCommandDisabled(command: string): Promise { + this.clientStreamer.emitWithoutBroadcast(AppEvents.COMMAND_DISABLED, command); + } + + async onCommandUpdated(command: string): Promise { + this.clientStreamer.emitWithoutBroadcast(AppEvents.COMMAND_UPDATED, command); + } + + async onCommandRemoved(command: string): Promise { + this.clientStreamer.emitWithoutBroadcast(AppEvents.COMMAND_REMOVED, command); + } + + async onActionsChanged(): Promise { + this.clientStreamer.emitWithoutBroadcast(AppEvents.ACTIONS_CHANGED); + } +} + +export class AppServerNotifier { + engineStreamer: IStreamer; + + clientStreamer: IStreamer; + + received: Map; + + listener: AppServerListener; + + constructor(orch: AppServerOrchestrator) { + this.engineStreamer = notifications.streamAppsEngine; + + // This is used to broadcast to the web clients + this.clientStreamer = notifications.streamApps; + + this.received = new Map(); + this.listener = new AppServerListener(orch, this.engineStreamer, this.clientStreamer, this.received); + } + + async appAdded(appId: string): Promise { + this.engineStreamer.emit(AppEvents.APP_ADDED, appId); + this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_ADDED, appId); + } + + async appRemoved(appId: string): Promise { + this.engineStreamer.emit(AppEvents.APP_REMOVED, appId); + this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_REMOVED, appId); + } + + async appUpdated(appId: string): Promise { + if (this.received.has(`${AppEvents.APP_UPDATED}_${appId}`)) { + this.received.delete(`${AppEvents.APP_UPDATED}_${appId}`); + return; + } + + this.engineStreamer.emit(AppEvents.APP_UPDATED, appId); + this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_UPDATED, appId); + } + + async appStatusUpdated(appId: string, status: AppStatus): Promise { + if (this.received.has(`${AppEvents.APP_STATUS_CHANGE}_${appId}`)) { + const details = this.received.get(`${AppEvents.APP_STATUS_CHANGE}_${appId}`); + if (details.status === status) { + this.received.delete(`${AppEvents.APP_STATUS_CHANGE}_${appId}`); + return; + } + } + + this.engineStreamer.emit(AppEvents.APP_STATUS_CHANGE, { appId, status }); + this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_STATUS_CHANGE, { appId, status }); + } + + async appSettingsChange(appId: string, setting: ISetting): Promise { + if (this.received.has(`${AppEvents.APP_SETTING_UPDATED}_${appId}_${setting._id}`)) { + this.received.delete(`${AppEvents.APP_SETTING_UPDATED}_${appId}_${setting._id}`); + return; + } + + this.engineStreamer.emit(AppEvents.APP_SETTING_UPDATED, { appId, setting }); + this.clientStreamer.emitWithoutBroadcast(AppEvents.APP_SETTING_UPDATED, { appId }); + } + + async commandAdded(command: string): Promise { + this.engineStreamer.emit(AppEvents.COMMAND_ADDED, command); + this.clientStreamer.emitWithoutBroadcast(AppEvents.COMMAND_ADDED, command); + } + + async commandDisabled(command: string): Promise { + this.engineStreamer.emit(AppEvents.COMMAND_DISABLED, command); + this.clientStreamer.emitWithoutBroadcast(AppEvents.COMMAND_DISABLED, command); + } + + async commandUpdated(command: string): Promise { + this.engineStreamer.emit(AppEvents.COMMAND_UPDATED, command); + this.clientStreamer.emitWithoutBroadcast(AppEvents.COMMAND_UPDATED, command); + } + + async commandRemoved(command: string): Promise { + this.engineStreamer.emit(AppEvents.COMMAND_REMOVED, command); + this.clientStreamer.emitWithoutBroadcast(AppEvents.COMMAND_REMOVED, command); + } + + async actionsChanged(): Promise { + this.clientStreamer.emitWithoutBroadcast(AppEvents.ACTIONS_CHANGED); + } +} diff --git a/app/apps/server/converters/departments.js b/apps/meteor/app/apps/server/converters/departments.js similarity index 100% rename from app/apps/server/converters/departments.js rename to apps/meteor/app/apps/server/converters/departments.js diff --git a/apps/meteor/app/apps/server/converters/index.js b/apps/meteor/app/apps/server/converters/index.js new file mode 100644 index 000000000000..d5fe67636dc0 --- /dev/null +++ b/apps/meteor/app/apps/server/converters/index.js @@ -0,0 +1,7 @@ +import { AppMessagesConverter } from './messages'; +import { AppRoomsConverter } from './rooms'; +import { AppSettingsConverter } from './settings'; +import { AppUsersConverter } from './users'; +import { AppVideoConferencesConverter } from './videoConferences'; + +export { AppMessagesConverter, AppRoomsConverter, AppSettingsConverter, AppUsersConverter, AppVideoConferencesConverter }; diff --git a/apps/meteor/app/apps/server/converters/messages.js b/apps/meteor/app/apps/server/converters/messages.js new file mode 100644 index 000000000000..25931452edd0 --- /dev/null +++ b/apps/meteor/app/apps/server/converters/messages.js @@ -0,0 +1,242 @@ +import { Random } from 'meteor/random'; + +import { Messages, Rooms, Users } from '../../../models/server'; +import { transformMappedData } from '../../lib/misc/transformMappedData'; + +export class AppMessagesConverter { + constructor(orch) { + this.orch = orch; + } + + convertById(msgId) { + const msg = Messages.findOneById(msgId); + + return this.convertMessage(msg); + } + + convertMessage(msgObj) { + if (!msgObj) { + return undefined; + } + + const map = { + id: '_id', + threadId: 'tmid', + reactions: 'reactions', + parseUrls: 'parseUrls', + text: 'msg', + createdAt: 'ts', + updatedAt: '_updatedAt', + editedAt: 'editedAt', + emoji: 'emoji', + avatarUrl: 'avatar', + alias: 'alias', + file: 'file', + customFields: 'customFields', + groupable: 'groupable', + token: 'token', + blocks: 'blocks', + room: (message) => { + const result = this.orch.getConverters().get('rooms').convertById(message.rid); + delete message.rid; + return result; + }, + editor: (message) => { + const { editedBy } = message; + delete message.editedBy; + + if (!editedBy) { + return undefined; + } + + return this.orch.getConverters().get('users').convertById(editedBy._id); + }, + attachments: (message) => { + const result = this._convertAttachmentsToApp(message.attachments); + delete message.attachments; + return result; + }, + sender: (message) => { + if (!message.u || !message.u._id) { + return undefined; + } + + let user = this.orch.getConverters().get('users').convertById(message.u._id); + + // When the sender of the message is a Guest (livechat) and not a user + if (!user) { + user = this.orch.getConverters().get('users').convertToApp(message.u); + } + + delete message.u; + + return user; + }, + }; + + return transformMappedData(msgObj, map); + } + + convertAppMessage(message) { + if (!message || !message.room) { + return undefined; + } + + const room = Rooms.findOneById(message.room.id); + + if (!room) { + throw new Error('Invalid room provided on the message.'); + } + + let u; + if (message.sender && message.sender.id) { + const user = Users.findOneById(message.sender.id); + + if (user) { + u = { + _id: user._id, + username: user.username, + name: user.name, + }; + } else { + u = { + _id: message.sender.id, + username: message.sender.username, + name: message.sender.name, + }; + } + } + + let editedBy; + if (message.editor) { + const editor = Users.findOneById(message.editor.id); + editedBy = { + _id: editor._id, + username: editor.username, + }; + } + + const attachments = this._convertAppAttachments(message.attachments); + + const newMessage = { + _id: message.id || Random.id(), + ...('threadId' in message && { tmid: message.threadId }), + rid: room._id, + u, + msg: message.text, + ts: message.createdAt || new Date(), + _updatedAt: message.updatedAt || new Date(), + ...(editedBy && { editedBy }), + ...('editedAt' in message && { editedAt: message.editedAt }), + ...('emoji' in message && { emoji: message.emoji }), + ...('avatarUrl' in message && { avatar: message.avatarUrl }), + ...('alias' in message && { alias: message.alias }), + ...('customFields' in message && { customFields: message.customFields }), + ...('groupable' in message && { groupable: message.groupable }), + ...(attachments && { attachments }), + ...('reactions' in message && { reactions: message.reactions }), + ...('parseUrls' in message && { parseUrls: message.parseUrls }), + ...('blocks' in message && { blocks: message.blocks }), + ...('token' in message && { token: message.token }), + }; + + return Object.assign(newMessage, message._unmappedProperties_); + } + + _convertAppAttachments(attachments) { + if (typeof attachments === 'undefined' || !Array.isArray(attachments)) { + return undefined; + } + + return attachments.map((attachment) => + Object.assign( + { + collapsed: attachment.collapsed, + color: attachment.color, + text: attachment.text, + ts: attachment.timestamp ? attachment.timestamp.toJSON() : attachment.timestamp, + message_link: attachment.timestampLink, + thumb_url: attachment.thumbnailUrl, + author_name: attachment.author ? attachment.author.name : undefined, + author_link: attachment.author ? attachment.author.link : undefined, + author_icon: attachment.author ? attachment.author.icon : undefined, + title: attachment.title ? attachment.title.value : undefined, + title_link: attachment.title ? attachment.title.link : undefined, + title_link_download: attachment.title ? attachment.title.displayDownloadLink : undefined, + image_dimensions: attachment.imageDimensions, + image_preview: attachment.imagePreview, + image_url: attachment.imageUrl, + image_type: attachment.imageType, + image_size: attachment.imageSize, + audio_url: attachment.audioUrl, + audio_type: attachment.audioType, + audio_size: attachment.audioSize, + video_url: attachment.videoUrl, + video_type: attachment.videoType, + video_size: attachment.videoSize, + fields: attachment.fields, + button_alignment: attachment.actionButtonsAlignment, + actions: attachment.actions, + type: attachment.type, + description: attachment.description, + }, + attachment._unmappedProperties_, + ), + ); + } + + _convertAttachmentsToApp(attachments) { + if (typeof attachments === 'undefined' || !Array.isArray(attachments)) { + return undefined; + } + + const map = { + collapsed: 'collapsed', + color: 'color', + text: 'text', + timestampLink: 'message_link', + thumbnailUrl: 'thumb_url', + imageDimensions: 'image_dimensions', + imagePreview: 'image_preview', + imageUrl: 'image_url', + imageType: 'image_type', + imageSize: 'image_size', + audioUrl: 'audio_url', + audioType: 'audio_type', + audioSize: 'audio_size', + videoUrl: 'video_url', + videoType: 'video_type', + videoSize: 'video_size', + fields: 'fields', + actionButtonsAlignment: 'button_alignment', + actions: 'actions', + type: 'type', + description: 'description', + author: (attachment) => { + const { author_name: name, author_link: link, author_icon: icon } = attachment; + + delete attachment.author_name; + delete attachment.author_link; + delete attachment.author_icon; + + return { name, link, icon }; + }, + title: (attachment) => { + const { title: value, title_link: link, title_link_download: displayDownloadLink } = attachment; + + delete attachment.title; + delete attachment.title_link; + delete attachment.title_link_download; + + return { value, link, displayDownloadLink }; + }, + timestamp: (attachment) => { + const result = new Date(attachment.ts); + delete attachment.ts; + return result; + }, + }; + + return attachments.map((attachment) => transformMappedData(attachment, map)); + } +} diff --git a/apps/meteor/app/apps/server/converters/rooms.js b/apps/meteor/app/apps/server/converters/rooms.js new file mode 100644 index 000000000000..4a9f6225af15 --- /dev/null +++ b/apps/meteor/app/apps/server/converters/rooms.js @@ -0,0 +1,242 @@ +import { RoomType } from '@rocket.chat/apps-engine/definition/rooms'; +import { LivechatVisitors } from '@rocket.chat/models'; + +import { Rooms, Users, LivechatDepartment } from '../../../models/server'; +import { transformMappedData } from '../../lib/misc/transformMappedData'; + +export class AppRoomsConverter { + constructor(orch) { + this.orch = orch; + } + + convertById(roomId) { + const room = Rooms.findOneById(roomId); + + return this.convertRoom(room); + } + + convertByName(roomName) { + const room = Rooms.findOneByName(roomName); + + return this.convertRoom(room); + } + + convertAppRoom(room) { + if (!room) { + return undefined; + } + + let u; + if (room.creator) { + const creator = Users.findOneById(room.creator.id); + u = { + _id: creator._id, + username: creator.username, + }; + } + + let v; + if (room.visitor) { + const visitor = Promise.await(LivechatVisitors.findOneById(room.visitor.id)); + v = { + _id: visitor._id, + username: visitor.username, + token: visitor.token, + status: visitor.status || 'online', + }; + } + + let departmentId; + if (room.department) { + const department = LivechatDepartment.findOneById(room.department.id); + departmentId = department._id; + } + + let servedBy; + if (room.servedBy) { + const user = Users.findOneById(room.servedBy.id); + servedBy = { + _id: user._id, + username: user.username, + }; + } + + let closedBy; + if (room.closedBy) { + const user = Users.findOneById(room.closedBy.id); + closedBy = { + _id: user._id, + username: user.username, + }; + } + + const newRoom = { + ...(room.id && { _id: room.id }), + fname: room.displayName, + name: room.slugifiedName, + t: room.type, + u, + v, + departmentId, + servedBy, + closedBy, + members: room.members, + uids: room.userIds, + default: typeof room.isDefault === 'undefined' ? false : room.isDefault, + ro: typeof room.isReadOnly === 'undefined' ? false : room.isReadOnly, + sysMes: typeof room.displaySystemMessages === 'undefined' ? true : room.displaySystemMessages, + waitingResponse: typeof room.isWaitingResponse === 'undefined' ? undefined : !!room.isWaitingResponse, + open: typeof room.isOpen === 'undefined' ? undefined : !!room.isOpen, + msgs: room.messageCount || 0, + ts: room.createdAt, + _updatedAt: room.updatedAt, + closedAt: room.closedAt, + lm: room.lastModifiedAt, + customFields: room.customFields, + livechatData: room.livechatData, + prid: typeof room.parentRoom === 'undefined' ? undefined : room.parentRoom.id, + ...(room._USERNAMES && { _USERNAMES: room._USERNAMES }), + ...(room.source && { + source: { + ...room.source, + }, + }), + }; + + return Object.assign(newRoom, room._unmappedProperties_); + } + + convertRoom(room) { + if (!room) { + return undefined; + } + + const map = { + id: '_id', + displayName: 'fname', + slugifiedName: 'name', + members: 'members', + userIds: 'uids', + messageCount: 'msgs', + createdAt: 'ts', + updatedAt: '_updatedAt', + closedAt: 'closedAt', + lastModifiedAt: 'lm', + customFields: 'customFields', + livechatData: 'livechatData', + isWaitingResponse: 'waitingResponse', + isOpen: 'open', + _USERNAMES: '_USERNAMES', + description: 'description', + source: 'source', + isDefault: (room) => { + const result = !!room.default; + delete room.default; + return result; + }, + isReadOnly: (room) => { + const result = !!room.ro; + delete room.ro; + return result; + }, + displaySystemMessages: (room) => { + const { sysMes } = room; + + if (typeof sysMes === 'undefined') { + return true; + } + + delete room.sysMes; + return sysMes; + }, + type: (room) => { + const result = this._convertTypeToApp(room.t); + delete room.t; + return result; + }, + creator: (room) => { + const { u } = room; + + if (!u) { + return undefined; + } + + delete room.u; + + return this.orch.getConverters().get('users').convertById(u._id); + }, + visitor: (room) => { + const { v } = room; + + if (!v) { + return undefined; + } + + delete room.v; + + return this.orch.getConverters().get('visitors').convertById(v._id); + }, + department: (room) => { + const { departmentId } = room; + + if (!departmentId) { + return undefined; + } + + delete room.departmentId; + + return this.orch.getConverters().get('departments').convertById(departmentId); + }, + servedBy: (room) => { + const { servedBy } = room; + + if (!servedBy) { + return undefined; + } + + delete room.servedBy; + + return this.orch.getConverters().get('users').convertById(servedBy._id); + }, + responseBy: (room) => { + const { responseBy } = room; + + if (!responseBy) { + return undefined; + } + + delete room.responseBy; + + return this.orch.getConverters().get('users').convertById(responseBy._id); + }, + parentRoom: (room) => { + const { prid } = room; + + if (!prid) { + return undefined; + } + + delete room.prid; + + return this.orch.getConverters().get('rooms').convertById(prid); + }, + }; + + return transformMappedData(room, map); + } + + _convertTypeToApp(typeChar) { + switch (typeChar) { + case 'c': + return RoomType.CHANNEL; + case 'p': + return RoomType.PRIVATE_GROUP; + case 'd': + return RoomType.DIRECT_MESSAGE; + case 'l': + return RoomType.LIVE_CHAT; + default: + return typeChar; + } + } +} diff --git a/apps/meteor/app/apps/server/converters/settings.js b/apps/meteor/app/apps/server/converters/settings.js new file mode 100644 index 000000000000..da3e075deb67 --- /dev/null +++ b/apps/meteor/app/apps/server/converters/settings.js @@ -0,0 +1,52 @@ +import { SettingType } from '@rocket.chat/apps-engine/definition/settings'; +import { Settings } from '@rocket.chat/models'; + +export class AppSettingsConverter { + constructor(orch) { + this.orch = orch; + } + + async convertById(settingId) { + const setting = await Settings.findOneNotHiddenById(settingId); + + return this.convertToApp(setting); + } + + convertToApp(setting) { + return { + id: setting._id, + type: this._convertTypeToApp(setting.type), + packageValue: setting.packageValue, + values: setting.values, + value: setting.value, + public: setting.public, + hidden: setting.hidden, + group: setting.group, + i18nLabel: setting.i18nLabel, + i18nDescription: setting.i18nDescription, + createdAt: setting.ts, + updatedAt: setting._updatedAt, + }; + } + + _convertTypeToApp(type) { + switch (type) { + case 'boolean': + return SettingType.BOOLEAN; + case 'code': + return SettingType.CODE; + case 'color': + return SettingType.COLOR; + case 'font': + return SettingType.FONT; + case 'int': + return SettingType.NUMBER; + case 'select': + return SettingType.SELECT; + case 'string': + return SettingType.STRING; + default: + return type; + } + } +} diff --git a/apps/meteor/app/apps/server/converters/uploads.js b/apps/meteor/app/apps/server/converters/uploads.js new file mode 100644 index 000000000000..d386e52fdcac --- /dev/null +++ b/apps/meteor/app/apps/server/converters/uploads.js @@ -0,0 +1,98 @@ +import { Uploads } from '@rocket.chat/models'; + +import { transformMappedData } from '../../lib/misc/transformMappedData'; + +export class AppUploadsConverter { + constructor(orch) { + this.orch = orch; + } + + convertById(id) { + const upload = Promise.await(Uploads.findOneById(id)); + + return this.convertToApp(upload); + } + + convertToApp(upload) { + if (!upload) { + return undefined; + } + + const map = { + id: '_id', + name: 'name', + size: 'size', + type: 'type', + store: 'store', + description: 'description', + complete: 'complete', + uploading: 'uploading', + extension: 'extension', + progress: 'progress', + etag: 'etag', + path: 'path', + token: 'token', + url: 'url', + updatedAt: '_updatedAt', + uploadedAt: 'uploadedAt', + room: (upload) => { + const result = this.orch.getConverters().get('rooms').convertById(upload.rid); + delete upload.rid; + return result; + }, + user: (upload) => { + if (!upload.userId) { + return undefined; + } + + const result = this.orch.getConverters().get('users').convertById(upload.userId); + delete upload.userId; + return result; + }, + visitor: (upload) => { + if (!upload.visitorToken) { + return undefined; + } + + const result = this.orch.getConverters().get('visitors').convertByToken(upload.visitorToken); + delete upload.visitorToken; + return result; + }, + }; + + return transformMappedData(upload, map); + } + + convertToRocketChat(upload) { + if (!upload) { + return undefined; + } + + const { id: userId } = upload.user || {}; + const { token: visitorToken } = upload.visitor || {}; + const { id: rid } = upload.room; + + const newUpload = { + _id: upload.id, + name: upload.name, + size: upload.size, + type: upload.type, + extension: upload.extension, + description: upload.description, + store: upload.store, + etag: upload.etag, + complete: upload.complete, + uploading: upload.uploading, + progress: upload.progress, + token: upload.token, + url: upload.url, + _updatedAt: upload.updatedAt, + uploadedAt: upload.uploadedAt, + rid, + userId, + visitorToken, + }; + + return Object.assign(newUpload, upload._unmappedProperties_); + } +} diff --git a/apps/meteor/app/apps/server/converters/users.js b/apps/meteor/app/apps/server/converters/users.js new file mode 100644 index 000000000000..8c84f598934e --- /dev/null +++ b/apps/meteor/app/apps/server/converters/users.js @@ -0,0 +1,114 @@ +import { UserStatusConnection, UserType } from '@rocket.chat/apps-engine/definition/users'; + +import { Users } from '../../../models/server'; + +export class AppUsersConverter { + constructor(orch) { + this.orch = orch; + } + + convertById(userId) { + const user = Users.findOneById(userId); + + return this.convertToApp(user); + } + + convertByUsername(username) { + const user = Users.findOneByUsername(username); + + return this.convertToApp(user); + } + + convertToApp(user) { + if (!user) { + return undefined; + } + + const type = this._convertUserTypeToEnum(user.type); + const statusConnection = this._convertStatusConnectionToEnum(user.username, user._id, user.statusConnection); + + return { + id: user._id, + username: user.username, + emails: user.emails, + type, + isEnabled: user.active, + name: user.name, + roles: user.roles, + status: user.status, + statusConnection, + utcOffset: user.utcOffset, + createdAt: user.createdAt, + updatedAt: user._updatedAt, + lastLoginAt: user.lastLogin, + appId: user.appId, + customFields: user.customFields, + settings: { + preferences: { + ...(user?.settings?.preferences?.language && { language: user.settings.preferences.language }), + }, + }, + }; + } + + convertToRocketChat(user) { + if (!user) { + return undefined; + } + + return { + _id: user.id, + username: user.username, + emails: user.emails, + type: user.type, + active: user.isEnabled, + name: user.name, + roles: user.roles, + status: user.status, + statusConnection: user.statusConnection, + utcOffset: user.utfOffset, + createdAt: user.createdAt, + _updatedAt: user.updatedAt, + lastLogin: user.lastLoginAt, + appId: user.appId, + }; + } + + _convertUserTypeToEnum(type) { + switch (type) { + case 'user': + return UserType.USER; + case 'bot': + return UserType.BOT; + case 'app': + return UserType.APP; + case '': + case undefined: + return UserType.UNKNOWN; + default: + console.warn(`A new user type has been added that the Apps don't know about? "${type}"`); + return type.toUpperCase(); + } + } + + _convertStatusConnectionToEnum(username, userId, status) { + switch (status) { + case 'offline': + return UserStatusConnection.OFFLINE; + case 'online': + return UserStatusConnection.ONLINE; + case 'away': + return UserStatusConnection.AWAY; + case 'busy': + return UserStatusConnection.BUSY; + case undefined: + // This is needed for Livechat guests and Rocket.Cat user. + return UserStatusConnection.UNDEFINED; + default: + console.warn( + `The user ${username} (${userId}) does not have a valid status (offline, online, away, or busy). It is currently: "${status}"`, + ); + return !status ? UserStatusConnection.OFFLINE : status.toUpperCase(); + } + } +} diff --git a/apps/meteor/app/apps/server/converters/videoConferences.ts b/apps/meteor/app/apps/server/converters/videoConferences.ts new file mode 100644 index 000000000000..77bc25e4cbe7 --- /dev/null +++ b/apps/meteor/app/apps/server/converters/videoConferences.ts @@ -0,0 +1,28 @@ +import type { VideoConference } from '@rocket.chat/apps-engine/definition/videoConferences'; +import type { IVideoConference } from '@rocket.chat/core-typings'; + +import { VideoConf } from '../../../../server/sdk'; + +export class AppVideoConferencesConverter { + async convertById(callId: string): Promise { + const call = await VideoConf.getUnfiltered(callId); + + return this.convertVideoConference(call); + } + + convertVideoConference(call: IVideoConference | null): VideoConference | undefined { + if (!call) { + return; + } + + return { + ...call, + } as VideoConference; + } + + convertAppVideoConference(call: VideoConference): IVideoConference { + return { + ...call, + } as IVideoConference; + } +} diff --git a/apps/meteor/app/apps/server/converters/visitors.js b/apps/meteor/app/apps/server/converters/visitors.js new file mode 100644 index 000000000000..361aa3758c6a --- /dev/null +++ b/apps/meteor/app/apps/server/converters/visitors.js @@ -0,0 +1,63 @@ +import { LivechatVisitors } from '@rocket.chat/models'; + +import { transformMappedData } from '../../lib/misc/transformMappedData'; + +// TODO: check if functions from this converter can be async +export class AppVisitorsConverter { + constructor(orch) { + this.orch = orch; + } + + convertById(id) { + const visitor = Promise.await(LivechatVisitors.findOneById(id)); + + return this.convertVisitor(visitor); + } + + convertByToken(token) { + const visitor = Promise.await(LivechatVisitors.getVisitorByToken(token)); + + return this.convertVisitor(visitor); + } + + convertVisitor(visitor) { + if (!visitor) { + return undefined; + } + + const map = { + id: '_id', + username: 'username', + name: 'name', + department: 'department', + updatedAt: '_updatedAt', + token: 'token', + phone: 'phone', + visitorEmails: 'visitorEmails', + livechatData: 'livechatData', + status: 'status', + }; + + return transformMappedData(visitor, map); + } + + convertAppVisitor(visitor) { + if (!visitor) { + return undefined; + } + + const newVisitor = { + _id: visitor.id, + username: visitor.username, + name: visitor.name, + token: visitor.token, + phone: visitor.phone, + livechatData: visitor.livechatData, + status: visitor.status || 'online', + ...(visitor.visitorEmails && { visitorEmails: visitor.visitorEmails }), + ...(visitor.department && { department: visitor.department }), + }; + + return Object.assign(newVisitor, visitor._unmappedProperties_); + } +} diff --git a/apps/meteor/app/apps/server/cron.js b/apps/meteor/app/apps/server/cron.js new file mode 100644 index 000000000000..86a0e74b937e --- /dev/null +++ b/apps/meteor/app/apps/server/cron.js @@ -0,0 +1,112 @@ +import { Meteor } from 'meteor/meteor'; +import { HTTP } from 'meteor/http'; +import { SyncedCron } from 'meteor/littledata:synced-cron'; +import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; +import { AppStatus } from '@rocket.chat/apps-engine/definition/AppStatus'; +import { Settings } from '@rocket.chat/models'; + +import { Apps } from './orchestrator'; +import { getWorkspaceAccessToken } from '../../cloud/server'; +import { Users } from '../../models/server'; +import { sendMessagesToAdmins } from '../../../server/lib/sendMessagesToAdmins'; + +const notifyAdminsAboutInvalidApps = Meteor.bindEnvironment(function _notifyAdminsAboutInvalidApps(apps) { + if (!apps) { + return; + } + + const hasInvalidApps = !!apps.find((app) => app.getLatestLicenseValidationResult().hasErrors); + + if (!hasInvalidApps) { + return; + } + + const id = 'someAppInInvalidState'; + const title = 'Warning'; + const text = 'There is one or more apps in an invalid state. Click here to review.'; + const rocketCatMessage = 'There is one or more apps in an invalid state. Go to Administration > Apps to review.'; + const link = '/admin/apps'; + + Promise.await( + sendMessagesToAdmins({ + msgs: ({ adminUser }) => ({ + msg: `*${TAPi18n.__(title, adminUser.language)}*\n${TAPi18n.__(rocketCatMessage, adminUser.language)}`, + }), + banners: ({ adminUser }) => { + Users.removeBannerById(adminUser._id, { id }); + + return [ + { + id, + priority: 10, + title, + text, + modifiers: ['danger'], + link, + }, + ]; + }, + }), + ); + + return apps; +}); + +const notifyAdminsAboutRenewedApps = Meteor.bindEnvironment(function _notifyAdminsAboutRenewedApps(apps) { + if (!apps) { + return; + } + + const renewedApps = apps.filter( + (app) => app.getStatus() === AppStatus.DISABLED && app.getPreviousStatus() === AppStatus.INVALID_LICENSE_DISABLED, + ); + + if (renewedApps.length === 0) { + return; + } + + const rocketCatMessage = 'There is one or more disabled apps with valid licenses. Go to Administration > Apps to review.'; + + Promise.await( + sendMessagesToAdmins({ + msgs: ({ adminUser }) => ({ msg: `${TAPi18n.__(rocketCatMessage, adminUser.language)}` }), + }), + ); +}); + +export const appsUpdateMarketplaceInfo = Meteor.bindEnvironment(function _appsUpdateMarketplaceInfo() { + const token = Promise.await(getWorkspaceAccessToken()); + const baseUrl = Apps.getMarketplaceUrl(); + const workspaceIdSetting = Promise.await(Settings.getValueById('Cloud_Workspace_Id')); + + const currentSeats = Users.getActiveLocalUserCount(); + + const fullUrl = `${baseUrl}/v1/workspaces/${workspaceIdSetting}/apps?seats=${currentSeats}`; + const options = { + headers: { + Authorization: `Bearer ${token}`, + }, + }; + + let data = []; + + try { + const result = HTTP.get(fullUrl, options); + + if (Array.isArray(result.data)) { + data = result.data; + } + } catch (err) { + Apps.debugLog(err); + } + + Promise.await(Apps.updateAppsMarketplaceInfo(data).then(notifyAdminsAboutInvalidApps).then(notifyAdminsAboutRenewedApps)); +}); + +SyncedCron.add({ + name: 'Apps-Engine:check', + schedule: (parser) => parser.text('at 4:00 am'), + job() { + appsUpdateMarketplaceInfo(); + }, +}); diff --git a/apps/meteor/app/apps/server/index.js b/apps/meteor/app/apps/server/index.js new file mode 100644 index 000000000000..753a21c4fbab --- /dev/null +++ b/apps/meteor/app/apps/server/index.js @@ -0,0 +1,4 @@ +import './cron'; +import './status.ts'; + +export { Apps, AppEvents } from './orchestrator'; diff --git a/apps/meteor/app/apps/server/orchestrator.js b/apps/meteor/app/apps/server/orchestrator.js new file mode 100644 index 000000000000..de3d950025b8 --- /dev/null +++ b/apps/meteor/app/apps/server/orchestrator.js @@ -0,0 +1,345 @@ +import { EssentialAppDisabledException } from '@rocket.chat/apps-engine/definition/exceptions'; +import { AppInterface } from '@rocket.chat/apps-engine/definition/metadata'; +import { AppManager } from '@rocket.chat/apps-engine/server/AppManager'; +import { Meteor } from 'meteor/meteor'; + +import { Logger } from '../../../server/lib/logger/Logger'; +import { AppsLogsModel, AppsModel, AppsPersistenceModel } from '../../models/server'; +import { settings, settingsRegistry } from '../../settings/server'; +import { RealAppBridges } from './bridges'; +import { AppMethods, AppServerNotifier, AppsRestApi, AppUIKitInteractionApi } from './communication'; +import { + AppMessagesConverter, + AppRoomsConverter, + AppSettingsConverter, + AppUsersConverter, + AppVideoConferencesConverter, +} from './converters'; +import { AppDepartmentsConverter } from './converters/departments'; +import { AppUploadsConverter } from './converters/uploads'; +import { AppVisitorsConverter } from './converters/visitors'; +import { AppRealLogsStorage, AppRealStorage, ConfigurableAppSourceStorage } from './storage'; + +function isTesting() { + return process.env.TEST_MODE === 'true'; +} + +let appsSourceStorageType; +let appsSourceStorageFilesystemPath; + +export class AppServerOrchestrator { + constructor() { + this._isInitialized = false; + } + + initialize() { + if (this._isInitialized) { + return; + } + + this._rocketchatLogger = new Logger('Rocket.Chat Apps'); + + if (typeof process.env.OVERWRITE_INTERNAL_MARKETPLACE_URL === 'string' && process.env.OVERWRITE_INTERNAL_MARKETPLACE_URL !== '') { + this._marketplaceUrl = process.env.OVERWRITE_INTERNAL_MARKETPLACE_URL; + } else { + this._marketplaceUrl = 'https://marketplace.rocket.chat'; + } + + this._model = new AppsModel(); + this._logModel = new AppsLogsModel(); + this._persistModel = new AppsPersistenceModel(); + this._storage = new AppRealStorage(this._model); + this._logStorage = new AppRealLogsStorage(this._logModel); + this._appSourceStorage = new ConfigurableAppSourceStorage(appsSourceStorageType, appsSourceStorageFilesystemPath); + + this._converters = new Map(); + this._converters.set('messages', new AppMessagesConverter(this)); + this._converters.set('rooms', new AppRoomsConverter(this)); + this._converters.set('settings', new AppSettingsConverter(this)); + this._converters.set('users', new AppUsersConverter(this)); + this._converters.set('visitors', new AppVisitorsConverter(this)); + this._converters.set('departments', new AppDepartmentsConverter(this)); + this._converters.set('uploads', new AppUploadsConverter(this)); + this._converters.set('videoConferences', new AppVideoConferencesConverter()); + + this._bridges = new RealAppBridges(this); + + this._manager = new AppManager({ + metadataStorage: this._storage, + logStorage: this._logStorage, + bridges: this._bridges, + sourceStorage: this._appSourceStorage, + }); + + this._communicators = new Map(); + this._communicators.set('methods', new AppMethods(this)); + this._communicators.set('notifier', new AppServerNotifier(this)); + this._communicators.set('restapi', new AppsRestApi(this, this._manager)); + this._communicators.set('uikit', new AppUIKitInteractionApi(this)); + + this._isInitialized = true; + } + + getModel() { + return this._model; + } + + /** + * @returns {AppsPersistenceModel} + */ + getPersistenceModel() { + return this._persistModel; + } + + getStorage() { + return this._storage; + } + + getLogStorage() { + return this._logStorage; + } + + getConverters() { + return this._converters; + } + + getBridges() { + return this._bridges; + } + + getNotifier() { + return this._communicators.get('notifier'); + } + + getManager() { + return this._manager; + } + + getProvidedComponents() { + return this._manager.getExternalComponentManager().getProvidedComponents(); + } + + getAppSourceStorage() { + return this._appSourceStorage; + } + + isInitialized() { + return this._isInitialized; + } + + isEnabled() { + return settings.get('Apps_Framework_enabled'); + } + + isLoaded() { + return this.getManager().areAppsLoaded(); + } + + isDebugging() { + return settings.get('Apps_Framework_Development_Mode') && !isTesting(); + } + + /** + * @returns {Logger} + */ + getRocketChatLogger() { + return this._rocketchatLogger; + } + + debugLog(...args) { + if (this.isDebugging()) { + this.getRocketChatLogger().debug(...args); + } + } + + getMarketplaceUrl() { + return this._marketplaceUrl; + } + + async load() { + // Don't try to load it again if it has + // already been loaded + if (this.isLoaded()) { + return; + } + + return this._manager + .load() + .then((affs) => console.log(`Loaded the Apps Framework and loaded a total of ${affs.length} Apps!`)) + .catch((err) => console.warn('Failed to load the Apps Framework and Apps!', err)) + .then(() => this.getBridges().getSchedulerBridge().startScheduler()); + } + + async unload() { + // Don't try to unload it if it's already been + // unlaoded or wasn't unloaded to start with + if (!this.isLoaded()) { + return; + } + + return this._manager + .unload() + .then(() => console.log('Unloaded the Apps Framework.')) + .catch((err) => console.warn('Failed to unload the Apps Framework!', err)); + } + + async updateAppsMarketplaceInfo(apps = []) { + if (!this.isLoaded()) { + return; + } + + return this._manager.updateAppsMarketplaceInfo(apps).then(() => this._manager.get()); + } + + async triggerEvent(event, ...payload) { + if (!this.isLoaded()) { + return; + } + + return this.getBridges() + .getListenerBridge() + .handleEvent(event, ...payload) + .catch((error) => { + if (error instanceof EssentialAppDisabledException) { + throw new Meteor.Error('error-essential-app-disabled'); + } + + throw error; + }); + } +} + +export const AppEvents = AppInterface; +export const Apps = new AppServerOrchestrator(); + +settingsRegistry.addGroup('General', function () { + this.section('Apps', function () { + this.add('Apps_Logs_TTL', '30_days', { + type: 'select', + values: [ + { + key: '7_days', + i18nLabel: 'Apps_Logs_TTL_7days', + }, + { + key: '14_days', + i18nLabel: 'Apps_Logs_TTL_14days', + }, + { + key: '30_days', + i18nLabel: 'Apps_Logs_TTL_30days', + }, + ], + public: true, + hidden: false, + alert: 'Apps_Logs_TTL_Alert', + }); + + this.add('Apps_Framework_enabled', true, { + type: 'boolean', + hidden: false, + }); + + this.add('Apps_Framework_Development_Mode', false, { + type: 'boolean', + enableQuery: { + _id: 'Apps_Framework_enabled', + value: true, + }, + public: true, + hidden: false, + }); + + this.add('Apps_Framework_Source_Package_Storage_Type', 'gridfs', { + type: 'select', + values: [ + { + key: 'gridfs', + i18nLabel: 'GridFS', + }, + { + key: 'filesystem', + i18nLabel: 'FileSystem', + }, + ], + public: true, + hidden: false, + alert: 'Apps_Framework_Source_Package_Storage_Type_Alert', + }); + + this.add('Apps_Framework_Source_Package_Storage_FileSystem_Path', '', { + type: 'string', + public: true, + enableQuery: { + _id: 'Apps_Framework_Source_Package_Storage_Type', + value: 'filesystem', + }, + alert: 'Apps_Framework_Source_Package_Storage_FileSystem_Alert', + }); + }); +}); + +settings.watch('Apps_Framework_Source_Package_Storage_Type', (value) => { + if (!Apps.isInitialized()) { + appsSourceStorageType = value; + } else { + Apps.getAppSourceStorage().setStorage(value); + } +}); + +settings.watch('Apps_Framework_Source_Package_Storage_FileSystem_Path', (value) => { + if (!Apps.isInitialized()) { + appsSourceStorageFilesystemPath = value; + } else { + Apps.getAppSourceStorage().setFileSystemStoragePath(value); + } +}); + +settings.watch('Apps_Framework_enabled', (isEnabled) => { + // In case this gets called before `Meteor.startup` + if (!Apps.isInitialized()) { + return; + } + + if (isEnabled) { + Apps.load(); + } else { + Apps.unload(); + } +}); + +settings.watch('Apps_Logs_TTL', (value) => { + if (!Apps.isInitialized()) { + return; + } + + let expireAfterSeconds = 0; + + switch (value) { + case '7_days': + expireAfterSeconds = 604800; + break; + case '14_days': + expireAfterSeconds = 1209600; + break; + case '30_days': + expireAfterSeconds = 2592000; + break; + } + + if (!expireAfterSeconds) { + return; + } + + const model = Apps._logModel; + + model.resetTTLIndex(expireAfterSeconds); +}); + +Meteor.startup(function _appServerOrchestrator() { + Apps.initialize(); + + if (Apps.isEnabled()) { + Apps.load(); + } +}); diff --git a/apps/meteor/app/apps/server/status.ts b/apps/meteor/app/apps/server/status.ts new file mode 100644 index 000000000000..3dd020df92ef --- /dev/null +++ b/apps/meteor/app/apps/server/status.ts @@ -0,0 +1,16 @@ +import { UserPresenceMonitor } from 'meteor/konecty:user-presence'; + +import { AppEvents, Apps } from './orchestrator'; + +UserPresenceMonitor.onSetUserStatus((...args: any) => { + const [user, status] = args; + + // App IPostUserStatusChanged event hook + Promise.await( + Apps.triggerEvent(AppEvents.IPostUserStatusChanged, { + user, + currentStatus: status, + previousStatus: user.status, + }), + ); +}); diff --git a/app/apps/server/storage/AppFileSystemSourceStorage.ts b/apps/meteor/app/apps/server/storage/AppFileSystemSourceStorage.ts similarity index 90% rename from app/apps/server/storage/AppFileSystemSourceStorage.ts rename to apps/meteor/app/apps/server/storage/AppFileSystemSourceStorage.ts index 7c0c053ebbc2..54e83a11df5d 100644 --- a/app/apps/server/storage/AppFileSystemSourceStorage.ts +++ b/apps/meteor/app/apps/server/storage/AppFileSystemSourceStorage.ts @@ -1,7 +1,8 @@ import { promises as fs } from 'fs'; import { join, normalize } from 'path'; -import { AppSourceStorage, IAppStorageItem } from '@rocket.chat/apps-engine/server/storage'; +import type { IAppStorageItem } from '@rocket.chat/apps-engine/server/storage'; +import { AppSourceStorage } from '@rocket.chat/apps-engine/server/storage'; export class AppFileSystemSourceStorage extends AppSourceStorage { private pathPrefix = 'fs:/'; diff --git a/app/apps/server/storage/AppGridFSSourceStorage.ts b/apps/meteor/app/apps/server/storage/AppGridFSSourceStorage.ts similarity index 91% rename from app/apps/server/storage/AppGridFSSourceStorage.ts rename to apps/meteor/app/apps/server/storage/AppGridFSSourceStorage.ts index 1775fca4be8a..aa0831e30649 100644 --- a/app/apps/server/storage/AppGridFSSourceStorage.ts +++ b/apps/meteor/app/apps/server/storage/AppGridFSSourceStorage.ts @@ -1,6 +1,8 @@ import { MongoInternals } from 'meteor/mongo'; -import { GridFSBucket, GridFSBucketWriteStream, ObjectId } from 'mongodb'; -import { AppSourceStorage, IAppStorageItem } from '@rocket.chat/apps-engine/server/storage'; +import type { GridFSBucket, GridFSBucketWriteStream } from 'mongodb'; +import { ObjectId } from 'mongodb'; +import type { IAppStorageItem } from '@rocket.chat/apps-engine/server/storage'; +import { AppSourceStorage } from '@rocket.chat/apps-engine/server/storage'; import { streamToBuffer } from '../../../file-upload/server/lib/streamToBuffer'; diff --git a/app/apps/server/storage/AppRealStorage.ts b/apps/meteor/app/apps/server/storage/AppRealStorage.ts similarity index 88% rename from app/apps/server/storage/AppRealStorage.ts rename to apps/meteor/app/apps/server/storage/AppRealStorage.ts index b90e5890edfa..1d3cd8793e1f 100644 --- a/app/apps/server/storage/AppRealStorage.ts +++ b/apps/meteor/app/apps/server/storage/AppRealStorage.ts @@ -1,6 +1,7 @@ -import { AppMetadataStorage, IAppStorageItem } from '@rocket.chat/apps-engine/server/storage'; +import type { IAppStorageItem } from '@rocket.chat/apps-engine/server/storage'; +import { AppMetadataStorage } from '@rocket.chat/apps-engine/server/storage'; -import { AppsModel } from '../../../models/server/models/apps-model'; +import type { AppsModel } from '../../../models/server/models/apps-model'; export class AppRealStorage extends AppMetadataStorage { constructor(private db: AppsModel) { diff --git a/app/apps/server/storage/ConfigurableAppSourceStorage.ts b/apps/meteor/app/apps/server/storage/ConfigurableAppSourceStorage.ts similarity index 89% rename from app/apps/server/storage/ConfigurableAppSourceStorage.ts rename to apps/meteor/app/apps/server/storage/ConfigurableAppSourceStorage.ts index 2f0118b18cf3..42a0b5d3e40c 100644 --- a/app/apps/server/storage/ConfigurableAppSourceStorage.ts +++ b/apps/meteor/app/apps/server/storage/ConfigurableAppSourceStorage.ts @@ -1,4 +1,5 @@ -import { AppSourceStorage, IAppStorageItem } from '@rocket.chat/apps-engine/server/storage'; +import type { IAppStorageItem } from '@rocket.chat/apps-engine/server/storage'; +import { AppSourceStorage } from '@rocket.chat/apps-engine/server/storage'; import { AppFileSystemSourceStorage } from './AppFileSystemSourceStorage'; import { AppGridFSSourceStorage } from './AppGridFSSourceStorage'; diff --git a/app/apps/server/storage/index.js b/apps/meteor/app/apps/server/storage/index.js similarity index 100% rename from app/apps/server/storage/index.js rename to apps/meteor/app/apps/server/storage/index.js diff --git a/app/apps/server/storage/logs-storage.js b/apps/meteor/app/apps/server/storage/logs-storage.js similarity index 100% rename from app/apps/server/storage/logs-storage.js rename to apps/meteor/app/apps/server/storage/logs-storage.js diff --git a/apps/meteor/app/assets/server/assets.ts b/apps/meteor/app/assets/server/assets.ts new file mode 100644 index 000000000000..b4d14cf652a6 --- /dev/null +++ b/apps/meteor/app/assets/server/assets.ts @@ -0,0 +1,532 @@ +import crypto from 'crypto'; +import type { ServerResponse, IncomingMessage } from 'http'; + +import { Meteor } from 'meteor/meteor'; +import { WebApp, WebAppInternals } from 'meteor/webapp'; +import { WebAppHashing } from 'meteor/webapp-hashing'; +import _ from 'underscore'; +import sizeOf from 'image-size'; +import sharp from 'sharp'; +import type { NextHandleFunction } from 'connect'; +import type { IRocketChatAssets, IRocketChatAsset, IRocketChatAssetCache } from '@rocket.chat/core-typings'; +import { Settings } from '@rocket.chat/models'; + +import { settings, settingsRegistry } from '../../settings/server'; +import { getURL } from '../../utils/lib/getURL'; +import { getExtension } from '../../utils/lib/mimeTypes'; +import { hasPermission } from '../../authorization/server'; +import { RocketChatFile } from '../../file'; + +const RocketChatAssetsInstance = new RocketChatFile.GridFS({ + name: 'assets', +}); +const assets: IRocketChatAssets = { + logo: { + label: 'logo (svg, png, jpg)', + defaultUrl: 'images/logo/logo.svg', + constraints: { + type: 'image', + extensions: ['svg', 'png', 'jpg', 'jpeg'], + }, + wizard: { + step: 3, + order: 2, + }, + }, + background: { + label: 'login background (svg, png, jpg)', + constraints: { + type: 'image', + extensions: ['svg', 'png', 'jpg', 'jpeg'], + }, + }, + favicon_ico: { + label: 'favicon (ico)', + defaultUrl: 'favicon.ico', + constraints: { + type: 'image', + extensions: ['ico'], + }, + }, + favicon: { + label: 'favicon (svg)', + defaultUrl: 'images/logo/icon.svg', + constraints: { + type: 'image', + extensions: ['svg'], + }, + }, + favicon_16: { + label: 'favicon 16x16 (png)', + defaultUrl: 'images/logo/favicon-16x16.png', + constraints: { + type: 'image', + extensions: ['png'], + width: 16, + height: 16, + }, + }, + favicon_32: { + label: 'favicon 32x32 (png)', + defaultUrl: 'images/logo/favicon-32x32.png', + constraints: { + type: 'image', + extensions: ['png'], + width: 32, + height: 32, + }, + }, + favicon_192: { + label: 'android-chrome 192x192 (png)', + defaultUrl: 'images/logo/android-chrome-192x192.png', + constraints: { + type: 'image', + extensions: ['png'], + width: 192, + height: 192, + }, + }, + favicon_512: { + label: 'android-chrome 512x512 (png)', + defaultUrl: 'images/logo/android-chrome-512x512.png', + constraints: { + type: 'image', + extensions: ['png'], + width: 512, + height: 512, + }, + }, + touchicon_180: { + label: 'apple-touch-icon 180x180 (png)', + defaultUrl: 'images/logo/apple-touch-icon.png', + constraints: { + type: 'image', + extensions: ['png'], + width: 180, + height: 180, + }, + }, + touchicon_180_pre: { + label: 'apple-touch-icon-precomposed 180x180 (png)', + defaultUrl: 'images/logo/apple-touch-icon-precomposed.png', + constraints: { + type: 'image', + extensions: ['png'], + width: 180, + height: 180, + }, + }, + tile_70: { + label: 'mstile 70x70 (png)', + defaultUrl: 'images/logo/mstile-70x70.png', + constraints: { + type: 'image', + extensions: ['png'], + width: 70, + height: 70, + }, + }, + tile_144: { + label: 'mstile 144x144 (png)', + defaultUrl: 'images/logo/mstile-144x144.png', + constraints: { + type: 'image', + extensions: ['png'], + width: 144, + height: 144, + }, + }, + tile_150: { + label: 'mstile 150x150 (png)', + defaultUrl: 'images/logo/mstile-150x150.png', + constraints: { + type: 'image', + extensions: ['png'], + width: 150, + height: 150, + }, + }, + tile_310_square: { + label: 'mstile 310x310 (png)', + defaultUrl: 'images/logo/mstile-310x310.png', + constraints: { + type: 'image', + extensions: ['png'], + width: 310, + height: 310, + }, + }, + tile_310_wide: { + label: 'mstile 310x150 (png)', + defaultUrl: 'images/logo/mstile-310x150.png', + constraints: { + type: 'image', + extensions: ['png'], + width: 310, + height: 150, + }, + }, + safari_pinned: { + label: 'safari pinned tab (svg)', + defaultUrl: 'images/logo/safari-pinned-tab.svg', + constraints: { + type: 'image', + extensions: ['svg'], + }, + }, +}; + +function getAssetByKey(key: string): IRocketChatAsset { + return assets[key as keyof IRocketChatAssets]; +} + +class RocketChatAssetsClass { + get assets(): IRocketChatAssets { + return assets; + } + + public setAsset(binaryContent: BufferEncoding, contentType: string, asset: string): void { + const assetInstance = getAssetByKey(asset); + if (!assetInstance) { + throw new Meteor.Error('error-invalid-asset', 'Invalid asset', { + function: 'RocketChat.Assets.setAsset', + }); + } + + const extension = getExtension(contentType); + if (assetInstance.constraints.extensions.includes(extension) === false) { + throw new Meteor.Error('error-invalid-file-type', `Invalid file type: ${contentType}`, { + function: 'RocketChat.Assets.setAsset', + }); + } + + const file = Buffer.from(binaryContent, 'binary'); + if (assetInstance.constraints.width || assetInstance.constraints.height) { + const dimensions = sizeOf(file); + if (assetInstance.constraints.width && assetInstance.constraints.width !== dimensions.width) { + throw new Meteor.Error('error-invalid-file-width', 'Invalid file width', { + function: 'Invalid file width', + }); + } + if (assetInstance.constraints.height && assetInstance.constraints.height !== dimensions.height) { + throw new Meteor.Error('error-invalid-file-height'); + } + } + + const rs = RocketChatFile.bufferToStream(file); + RocketChatAssetsInstance.deleteFile(asset); + + const ws = RocketChatAssetsInstance.createWriteStream(asset, contentType); + ws.on( + 'end', + Meteor.bindEnvironment(function () { + return Meteor.setTimeout(function () { + const key = `Assets_${asset}`; + const value = { + url: `assets/${asset}.${extension}`, + defaultUrl: assetInstance.defaultUrl, + }; + + Settings.updateValueById(key, value); + // eslint-disable-next-line @typescript-eslint/no-use-before-define + return RocketChatAssets.processAsset(key, value); + }, 200); + }), + ); + + rs.pipe(ws); + } + + public unsetAsset(asset: string): void { + if (!getAssetByKey(asset)) { + throw new Meteor.Error('error-invalid-asset', 'Invalid asset', { + function: 'RocketChat.Assets.unsetAsset', + }); + } + + RocketChatAssetsInstance.deleteFile(asset); + const key = `Assets_${asset}`; + const value = { + defaultUrl: getAssetByKey(asset).defaultUrl, + }; + + Settings.updateValueById(key, value); + // eslint-disable-next-line @typescript-eslint/no-use-before-define + RocketChatAssets.processAsset(key, value); + } + + public refreshClients(): boolean { + return process.emit('message', { + refresh: 'client', + }); + } + + public processAsset(settingKey: string, settingValue: any): Record | undefined { + if (settingKey.indexOf('Assets_') !== 0) { + return; + } + + const assetKey = settingKey.replace(/^Assets_/, ''); + const assetValue = getAssetByKey(assetKey); + + if (!assetValue) { + return; + } + + if (!settingValue || !settingValue.url) { + assetValue.cache = undefined; + return; + } + + const file = RocketChatAssetsInstance.getFileSync(assetKey); + if (!file) { + assetValue.cache = undefined; + return; + } + + const hash = crypto.createHash('sha1').update(file.buffer).digest('hex'); + const extension = settingValue.url.split('.').pop(); + + assetValue.cache = { + path: `assets/${assetKey}.${extension}`, + cacheable: false, + sourceMapUrl: undefined, + where: 'client', + type: 'asset', + content: file.buffer, + extension, + url: `/assets/${assetKey}.${extension}?${hash}`, + size: file.length, + uploadDate: file.uploadDate, + contentType: file.contentType, + hash, + }; + + return assetValue.cache; + } + + public getURL(assetName: string, options = { cdn: false, full: true }): string { + const asset = settings.get(assetName); + const url = asset.url || asset.defaultUrl; + + return getURL(url, options); + } +} + +export const RocketChatAssets = new RocketChatAssetsClass(); + +settingsRegistry.addGroup('Assets', function () { + this.add('Assets_SvgFavicon_Enable', true, { + type: 'boolean', + group: 'Assets', + i18nLabel: 'Enable_Svg_Favicon', + }); +}); + +function addAssetToSetting(asset: string, value: IRocketChatAsset): void { + const key = `Assets_${asset}`; + + settingsRegistry.add( + key, + { + defaultUrl: value.defaultUrl, + }, + { + type: 'asset', + group: 'Assets', + fileConstraints: value.constraints, + i18nLabel: value.label, + asset, + public: true, + wizard: value.wizard, + }, + ); + + const currentValue = settings.get(key); + + if (typeof currentValue === 'object' && currentValue.defaultUrl !== getAssetByKey(asset).defaultUrl) { + currentValue.defaultUrl = getAssetByKey(asset).defaultUrl; + Promise.await(Settings.updateValueById(key, currentValue)); + } +} + +for (const key of Object.keys(assets)) { + const value = getAssetByKey(key); + addAssetToSetting(key, value); +} + +settings.watchByRegex(/^Assets_/, (key, value) => RocketChatAssets.processAsset(key, value)); + +Meteor.startup(() => { + Meteor.setTimeout(() => { + process.emit('message', { + refresh: 'client', + }); + }, 200); +}); + +const { calculateClientHash } = WebAppHashing; + +WebAppHashing.calculateClientHash = function (manifest, includeFilter, runtimeConfigOverride): string { + for (const key of Object.keys(assets)) { + const value = getAssetByKey(key); + if (!value.cache && !value.defaultUrl) { + continue; + } + + let cache: IRocketChatAssetCache; + if (value.cache) { + cache = { + path: value.cache.path, + cacheable: value.cache.cacheable, + sourceMapUrl: value.cache.sourceMapUrl, + where: value.cache.where, + type: value.cache.type, + url: value.cache.url, + size: value.cache.size, + hash: value.cache.hash, + }; + } else { + const extension = value.defaultUrl?.split('.').pop(); + cache = { + path: `assets/${key}.${extension}`, + cacheable: false, + sourceMapUrl: undefined, + where: 'client', + type: 'asset', + url: `/assets/${key}.${extension}?v3`, + hash: 'v3', + }; + } + + const manifestItem = _.findWhere(manifest, { + path: key, + }); + + if (manifestItem) { + const index = manifest.indexOf(manifestItem); + manifest[index] = cache; + } else { + manifest.push(cache); + } + } + + return calculateClientHash.call(this, manifest, includeFilter, runtimeConfigOverride); +}; + +Meteor.methods({ + refreshClients() { + if (!Meteor.userId()) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', { + method: 'refreshClients', + }); + } + + const _hasPermission = hasPermission(Meteor.userId() as string, 'manage-assets'); + if (!_hasPermission) { + throw new Meteor.Error('error-action-not-allowed', 'Managing assets not allowed', { + method: 'refreshClients', + action: 'Managing_assets', + }); + } + + return RocketChatAssets.refreshClients(); + }, + + unsetAsset(asset) { + if (!Meteor.userId()) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', { + method: 'unsetAsset', + }); + } + + const _hasPermission = hasPermission(Meteor.userId() as string, 'manage-assets'); + if (!_hasPermission) { + throw new Meteor.Error('error-action-not-allowed', 'Managing assets not allowed', { + method: 'unsetAsset', + action: 'Managing_assets', + }); + } + + return RocketChatAssets.unsetAsset(asset); + }, + + setAsset(binaryContent, contentType, asset) { + if (!Meteor.userId()) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', { + method: 'setAsset', + }); + } + + const _hasPermission = hasPermission(Meteor.userId() as string, 'manage-assets'); + if (!_hasPermission) { + throw new Meteor.Error('error-action-not-allowed', 'Managing assets not allowed', { + method: 'setAsset', + action: 'Managing_assets', + }); + } + + RocketChatAssets.setAsset(binaryContent, contentType, asset); + }, +}); + +const listener = Meteor.bindEnvironment((req: IncomingMessage, res: ServerResponse, next: NextHandleFunction) => { + if (!req.url) { + return; + } + const params = { + asset: decodeURIComponent(req.url.replace(/^\//, '').replace(/\?.*$/, '')).replace(/\.[^.]*$/, ''), + }; + + const asset = getAssetByKey(params.asset); + const file = asset?.cache; + + const format = req.url.replace(/.*\.([a-z]+)(?:$|\?.*)/i, '$1'); + + if (asset && Array.isArray(asset.constraints.extensions) && !asset.constraints.extensions.includes(format)) { + res.writeHead(403); + return res.end(); + } + if (!file) { + const defaultUrl = asset?.defaultUrl; + if (defaultUrl) { + const assetUrl = format && ['png', 'svg'].includes(format) ? defaultUrl.replace(/(svg|png)$/, format) : defaultUrl; + req.url = `/${assetUrl}`; + WebAppInternals.staticFilesMiddleware((WebAppInternals as Record).staticFilesByArch, req, res, next); + } else { + res.writeHead(404); + res.end(); + } + + return; + } + + const reqModifiedHeader = req.headers['if-modified-since']; + if (reqModifiedHeader) { + if (reqModifiedHeader === file.uploadDate?.toUTCString()) { + res.setHeader('Last-Modified', reqModifiedHeader); + res.writeHead(304); + res.end(); + return; + } + } + + res.setHeader('Cache-Control', 'public, max-age=0'); + res.setHeader('Expires', '-1'); + + if (format && format !== file.extension && ['png', 'jpg', 'jpeg'].includes(format)) { + res.setHeader('Content-Type', `image/${format}`); + sharp(file.content) + .toFormat(format as any) + .pipe(res); + return; + } + + res.setHeader('Last-Modified', file.uploadDate?.toUTCString() || new Date().toUTCString()); + if (file.contentType) res.setHeader('Content-Type', file.contentType); + if (file.size) res.setHeader('Content-Length', file.size); + res.writeHead(200); + res.end(file.content); +}); + +WebApp.connectHandlers.use('/assets/', listener); diff --git a/app/assets/server/index.js b/apps/meteor/app/assets/server/index.ts similarity index 100% rename from app/assets/server/index.js rename to apps/meteor/app/assets/server/index.ts diff --git a/apps/meteor/app/authentication/server/ILoginAttempt.ts b/apps/meteor/app/authentication/server/ILoginAttempt.ts new file mode 100644 index 000000000000..f48aeba7d073 --- /dev/null +++ b/apps/meteor/app/authentication/server/ILoginAttempt.ts @@ -0,0 +1,25 @@ +import type { IUser, IMethodConnection } from '@rocket.chat/core-typings'; + +interface IMethodArgument { + user?: { username: string }; + password?: { + digest: string; + algorithm: string; + }; + resume?: string; + + cas?: boolean; + + totp?: { + code: string; + }; +} + +export interface ILoginAttempt { + type: string; + allowed: boolean; + methodName: string; + methodArguments: IMethodArgument[]; + connection: IMethodConnection; + user?: IUser; +} diff --git a/app/authentication/server/hooks/login.ts b/apps/meteor/app/authentication/server/hooks/login.ts similarity index 92% rename from app/authentication/server/hooks/login.ts rename to apps/meteor/app/authentication/server/hooks/login.ts index 7c7ec0c874a8..270a2dada60e 100644 --- a/app/authentication/server/hooks/login.ts +++ b/apps/meteor/app/authentication/server/hooks/login.ts @@ -1,6 +1,6 @@ import { Accounts } from 'meteor/accounts-base'; -import { ILoginAttempt } from '../ILoginAttempt'; +import type { ILoginAttempt } from '../ILoginAttempt'; import { saveFailedLoginAttempts, saveSuccessfulLogin } from '../lib/restrictLoginAttempts'; import { logFailedLoginAttempts } from '../lib/logLoginAttempts'; import { callbacks } from '../../../../lib/callbacks'; diff --git a/app/authentication/server/index.ts b/apps/meteor/app/authentication/server/index.ts similarity index 100% rename from app/authentication/server/index.ts rename to apps/meteor/app/authentication/server/index.ts diff --git a/app/authentication/server/lib/logLoginAttempts.ts b/apps/meteor/app/authentication/server/lib/logLoginAttempts.ts similarity index 75% rename from app/authentication/server/lib/logLoginAttempts.ts rename to apps/meteor/app/authentication/server/lib/logLoginAttempts.ts index aa0ec9c12e49..806b4f93b80c 100644 --- a/app/authentication/server/lib/logLoginAttempts.ts +++ b/apps/meteor/app/authentication/server/lib/logLoginAttempts.ts @@ -1,4 +1,4 @@ -import { ILoginAttempt } from '../ILoginAttempt'; +import type { ILoginAttempt } from '../ILoginAttempt'; import { settings } from '../../../settings/server'; import { SystemLogger } from '../../../../server/lib/logger/system'; @@ -16,13 +16,13 @@ export const logFailedLoginAttempts = (login: ILoginAttempt): void => { if (!settings.get('Login_Logs_ClientIp')) { clientAddress = '-'; } - let forwardedFor = connection.httpHeaders && connection.httpHeaders['x-forwarded-for']; - let realIp = connection.httpHeaders && connection.httpHeaders['x-real-ip']; + let forwardedFor = connection.httpHeaders?.['x-forwarded-for']; + let realIp = connection.httpHeaders?.['x-real-ip']; if (!settings.get('Login_Logs_ForwardedForIp')) { forwardedFor = '-'; realIp = '-'; } - let userAgent = connection.httpHeaders && connection.httpHeaders['user-agent']; + let userAgent = connection.httpHeaders?.['user-agent']; if (!settings.get('Login_Logs_UserAgent')) { userAgent = '-'; } diff --git a/app/authentication/server/lib/restrictLoginAttempts.ts b/apps/meteor/app/authentication/server/lib/restrictLoginAttempts.ts similarity index 90% rename from app/authentication/server/lib/restrictLoginAttempts.ts rename to apps/meteor/app/authentication/server/lib/restrictLoginAttempts.ts index 978cf4c27043..0301fa1bb934 100644 --- a/app/authentication/server/lib/restrictLoginAttempts.ts +++ b/apps/meteor/app/authentication/server/lib/restrictLoginAttempts.ts @@ -1,13 +1,14 @@ +import type { IServerEvent } from '@rocket.chat/core-typings'; +import { ServerEventType } from '@rocket.chat/core-typings'; +import { Rooms, ServerEvents, Sessions, Users } from '@rocket.chat/models'; import moment from 'moment'; -import { ILoginAttempt } from '../ILoginAttempt'; -import { ServerEvents, Users, Rooms, Sessions } from '../../../models/server/raw'; -import { IServerEventType, IServerEvent } from '../../../../definition/IServerEvent'; -import { settings } from '../../../settings/server'; import { addMinutesToADate } from '../../../../lib/utils/addMinutesToADate'; import { getClientAddress } from '../../../../server/lib/getClientAddress'; import { sendMessage } from '../../../lib/server/functions'; import { Logger } from '../../../logger/server'; +import { settings } from '../../../settings/server'; +import type { ILoginAttempt } from '../ILoginAttempt'; const logger = new Logger('LoginProtection'); @@ -93,7 +94,8 @@ export const isValidAttemptByUser = async (login: ILoginAttempt): Promise = await ServerEvents.insertOne({ ip: getClientAddress(login.connection), - t: IServerEventType.LOGIN, + t: ServerEventType.LOGIN, ts: new Date(), u: user, }); diff --git a/apps/meteor/app/authentication/server/startup/index.js b/apps/meteor/app/authentication/server/startup/index.js new file mode 100644 index 000000000000..536117e232d0 --- /dev/null +++ b/apps/meteor/app/authentication/server/startup/index.js @@ -0,0 +1,428 @@ +import { Meteor } from 'meteor/meteor'; +import { Match } from 'meteor/check'; +import { Accounts } from 'meteor/accounts-base'; +import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; +import _ from 'underscore'; +import { escapeRegExp, escapeHTML } from '@rocket.chat/string-helpers'; +import { Roles, Settings, Users as UsersRaw } from '@rocket.chat/models'; + +import * as Mailer from '../../../mailer/server/api'; +import { settings } from '../../../settings/server'; +import { callbacks } from '../../../../lib/callbacks'; +import { Users } from '../../../models/server'; +import { addUserRoles } from '../../../../server/lib/roles/addUserRoles'; +import { getAvatarSuggestionForUser } from '../../../lib/server/functions/getAvatarSuggestionForUser'; +import { parseCSV } from '../../../../lib/utils/parseCSV'; +import { isValidAttemptByUser, isValidLoginAttemptByIp } from '../lib/restrictLoginAttempts'; +import './settings'; +import { getClientAddress } from '../../../../server/lib/getClientAddress'; +import { getNewUserRoles } from '../../../../server/services/user/lib/getNewUserRoles'; +import { AppEvents, Apps } from '../../../apps/server/orchestrator'; +import { safeGetMeteorUser } from '../../../utils/server/functions/safeGetMeteorUser'; + +Accounts.config({ + forbidClientAccountCreation: true, +}); + +Meteor.startup(() => { + settings.watchMultiple(['Accounts_LoginExpiration', 'Site_Name', 'From_Email'], () => { + Accounts._options.loginExpirationInDays = settings.get('Accounts_LoginExpiration'); + + Accounts.emailTemplates.siteName = settings.get('Site_Name'); + + Accounts.emailTemplates.from = `${settings.get('Site_Name')} <${settings.get('From_Email')}>`; + }); +}); + +Accounts.emailTemplates.userToActivate = { + subject() { + const subject = TAPi18n.__('Accounts_Admin_Email_Approval_Needed_Subject_Default'); + const siteName = settings.get('Site_Name'); + + return `[${siteName}] ${subject}`; + }, + + html(options = {}) { + const email = options.reason + ? 'Accounts_Admin_Email_Approval_Needed_With_Reason_Default' + : 'Accounts_Admin_Email_Approval_Needed_Default'; + + return Mailer.replace(TAPi18n.__(email), { + name: escapeHTML(options.name), + email: escapeHTML(options.email), + reason: escapeHTML(options.reason), + }); + }, +}; + +Accounts.emailTemplates.userActivated = { + subject({ active, username }) { + const activated = username ? 'Activated' : 'Approved'; + const action = active ? activated : 'Deactivated'; + const subject = `Accounts_Email_${action}_Subject`; + const siteName = settings.get('Site_Name'); + + return `[${siteName}] ${TAPi18n.__(subject)}`; + }, + + html({ active, name, username }) { + const activated = username ? 'Activated' : 'Approved'; + const action = active ? activated : 'Deactivated'; + + return Mailer.replace(TAPi18n.__(`Accounts_Email_${action}`), { + name: escapeHTML(name), + }); + }, +}; + +let verifyEmailTemplate = ''; +let enrollAccountTemplate = ''; +let resetPasswordTemplate = ''; +Meteor.startup(() => { + Mailer.getTemplateWrapped('Verification_Email', (value) => { + verifyEmailTemplate = value; + }); + Mailer.getTemplateWrapped('Accounts_Enrollment_Email', (value) => { + enrollAccountTemplate = value; + }); + Mailer.getTemplateWrapped('Forgot_Password_Email', (value) => { + resetPasswordTemplate = value; + }); +}); + +Accounts.emailTemplates.verifyEmail.html = function (userModel, url) { + return Mailer.replace(verifyEmailTemplate, { Verification_Url: url, name: userModel.name }); +}; + +Accounts.emailTemplates.verifyEmail.subject = function () { + const subject = settings.get('Verification_Email_Subject'); + return Mailer.replace(subject || ''); +}; + +Accounts.urls.resetPassword = function (token) { + return Meteor.absoluteUrl(`reset-password/${token}`); +}; + +Accounts.emailTemplates.resetPassword.subject = function (userModel) { + return Mailer.replace(settings.get('Forgot_Password_Email_Subject') || '', { + name: userModel.name, + }); +}; + +Accounts.emailTemplates.resetPassword.html = function (userModel, url) { + return Mailer.replacekey( + Mailer.replace(resetPasswordTemplate, { + name: userModel.name, + }), + 'Forgot_Password_Url', + url, + ); +}; + +Accounts.emailTemplates.enrollAccount.subject = function (user) { + const subject = settings.get('Accounts_Enrollment_Email_Subject'); + return Mailer.replace(subject, user); +}; + +Accounts.emailTemplates.enrollAccount.html = function (user = {} /* , url*/) { + return Mailer.replace(enrollAccountTemplate, { + name: escapeHTML(user.name), + email: user.emails && user.emails[0] && escapeHTML(user.emails[0].address), + }); +}; + +const getLinkedInName = ({ firstName, lastName }) => { + const { preferredLocale, localized: firstNameLocalized } = firstName; + const { localized: lastNameLocalized } = lastName; + + // LinkedIn new format + if (preferredLocale && firstNameLocalized && preferredLocale.language && preferredLocale.country) { + const locale = `${preferredLocale.language}_${preferredLocale.country}`; + + if (firstNameLocalized[locale] && lastNameLocalized[locale]) { + return `${firstNameLocalized[locale]} ${lastNameLocalized[locale]}`; + } + if (firstNameLocalized[locale]) { + return firstNameLocalized[locale]; + } + } + + // LinkedIn old format + if (!lastName) { + return firstName; + } + return `${firstName} ${lastName}`; +}; + +Accounts.onCreateUser(function (options, user = {}) { + callbacks.run('beforeCreateUser', options, user); + + user.status = 'offline'; + user.active = user.active !== undefined ? user.active : !settings.get('Accounts_ManuallyApproveNewUsers'); + + if (!user.name) { + if (options.profile) { + if (options.profile.name) { + user.name = options.profile.name; + } else if (options.profile.firstName) { + // LinkedIn format + user.name = getLinkedInName(options.profile); + } + } + } + + if (user.services) { + const verified = settings.get('Accounts_Verify_Email_For_External_Accounts'); + + for (const service of Object.values(user.services)) { + if (!user.name) { + user.name = service.name || service.username; + } + + if (!user.emails && service.email) { + user.emails = [ + { + address: service.email, + verified, + }, + ]; + } + } + } + + if (!user.active) { + const destinations = []; + const usersInRole = Promise.await(Roles.findUsersInRole('admin')); + Promise.await(usersInRole.toArray()).forEach((adminUser) => { + if (Array.isArray(adminUser.emails)) { + adminUser.emails.forEach((email) => { + destinations.push(`${adminUser.name}<${email.address}>`); + }); + } + }); + + const email = { + to: destinations, + from: settings.get('From_Email'), + subject: Accounts.emailTemplates.userToActivate.subject(), + html: Accounts.emailTemplates.userToActivate.html(options), + }; + + Mailer.send(email); + } + + callbacks.run('onCreateUser', options, user); + + // App IPostUserCreated event hook + Promise.await(Apps.triggerEvent(AppEvents.IPostUserCreated, { user, performedBy: safeGetMeteorUser() })); + + return user; +}); + +Accounts.insertUserDoc = _.wrap(Accounts.insertUserDoc, function (insertUserDoc, options, user) { + const globalRoles = []; + + if (Match.test(user.globalRoles, [String]) && user.globalRoles.length > 0) { + globalRoles.push(...user.globalRoles); + } + + delete user.globalRoles; + + if (user.services && !user.services.password) { + const defaultAuthServiceRoles = parseCSV(settings.get('Accounts_Registration_AuthenticationServices_Default_Roles') || ''); + + if (defaultAuthServiceRoles.length > 0) { + globalRoles.push(...defaultAuthServiceRoles); + } + } + + const roles = getNewUserRoles(globalRoles); + + if (!user.type) { + user.type = 'user'; + } + + if (settings.get('Accounts_TwoFactorAuthentication_By_Email_Auto_Opt_In')) { + user.services = user.services || {}; + user.services.email2fa = { + enabled: true, + changedAt: new Date(), + }; + } + + const _id = insertUserDoc.call(Accounts, options, user); + + user = Meteor.users.findOne({ + _id, + }); + + if (user.username) { + if (options.joinDefaultChannels !== false && user.joinDefaultChannels !== false) { + Meteor.runAsUser(_id, function () { + return Meteor.call('joinDefaultChannels', options.joinDefaultChannelsSilenced); + }); + } + + if (user.type !== 'visitor') { + Meteor.defer(function () { + return callbacks.run('afterCreateUser', user); + }); + } + if (settings.get('Accounts_SetDefaultAvatar') === true) { + const avatarSuggestions = Promise.await(getAvatarSuggestionForUser(user)); + Object.keys(avatarSuggestions).some((service) => { + const avatarData = avatarSuggestions[service]; + if (service !== 'gravatar') { + Meteor.runAsUser(_id, function () { + return Meteor.call('setAvatarFromService', avatarData.blob, '', service); + }); + return true; + } + + return false; + }); + } + } + + /** + * if settings shows setup wizard to be pending + * and no admin's been found, + * and existing role list doesn't include admin + * create this user admin. + * count this as the completion of setup wizard step 1. + */ + const hasAdmin = Users.findOneByRolesAndType('admin', 'user', { fields: { _id: 1 } }); + if (!roles.includes('admin') && !hasAdmin) { + roles.push('admin'); + if (settings.get('Show_Setup_Wizard') === 'pending') { + Promise.await(Settings.updateValueById('Show_Setup_Wizard', 'in_progress')); + } + } + + addUserRoles(_id, roles); + + return _id; +}); + +Accounts.validateLoginAttempt(function (login) { + login = callbacks.run('beforeValidateLogin', login); + + if (!Promise.await(isValidLoginAttemptByIp(getClientAddress(login.connection)))) { + throw new Meteor.Error('error-login-blocked-for-ip', 'Login has been temporarily blocked For IP', { + function: 'Accounts.validateLoginAttempt', + }); + } + + if (!Promise.await(isValidAttemptByUser(login))) { + throw new Meteor.Error('error-login-blocked-for-user', 'Login has been temporarily blocked For User', { + function: 'Accounts.validateLoginAttempt', + }); + } + + if (login.allowed !== true) { + return login.allowed; + } + + if (login.user.type === 'visitor') { + return true; + } + + if (login.user.type === 'app') { + throw new Meteor.Error('error-app-user-is-not-allowed-to-login', 'App user is not allowed to login', { + function: 'Accounts.validateLoginAttempt', + }); + } + + if (!!login.user.active !== true) { + throw new Meteor.Error('error-user-is-not-activated', 'User is not activated', { + function: 'Accounts.validateLoginAttempt', + }); + } + + if (!login.user.roles || !Array.isArray(login.user.roles)) { + throw new Meteor.Error('error-user-has-no-roles', 'User has no roles', { + function: 'Accounts.validateLoginAttempt', + }); + } + + if (login.user.roles.includes('admin') === false && login.type === 'password' && settings.get('Accounts_EmailVerification') === true) { + const validEmail = login.user.emails.filter((email) => email.verified === true); + if (validEmail.length === 0) { + throw new Meteor.Error('error-invalid-email', 'Invalid email __email__'); + } + } + + login = callbacks.run('onValidateLogin', login); + + Users.updateLastLoginById(login.user._id); + Meteor.defer(function () { + return callbacks.run('afterValidateLogin', login); + }); + + /** + * Trigger the event only when the + * user does login in Rocket.chat + */ + if (login.type !== 'resume') { + // App IPostUserLoggedIn event hook + Promise.await(Apps.triggerEvent(AppEvents.IPostUserLoggedIn, login.user)); + } + + return true; +}); + +Accounts.validateNewUser(function (user) { + if (user.type === 'visitor') { + return true; + } + + if ( + settings.get('Accounts_Registration_AuthenticationServices_Enabled') === false && + settings.get('LDAP_Enable') === false && + !(user.services && user.services.password) + ) { + throw new Meteor.Error('registration-disabled-authentication-services', 'User registration is disabled for authentication services'); + } + + return true; +}); + +Accounts.validateNewUser(function (user) { + if (user.type === 'visitor') { + return true; + } + + let domainWhiteList = settings.get('Accounts_AllowedDomainsList'); + if (_.isEmpty(domainWhiteList?.trim())) { + return true; + } + + domainWhiteList = domainWhiteList.split(',').map((domain) => domain.trim()); + + if (user.emails && user.emails.length > 0) { + const email = user.emails[0].address; + const inWhiteList = domainWhiteList.some((domain) => email.match(`@${escapeRegExp(domain)}$`)); + + if (inWhiteList === false) { + throw new Meteor.Error('error-invalid-domain'); + } + } + + return true; +}); + +export const MAX_RESUME_LOGIN_TOKENS = parseInt(process.env.MAX_RESUME_LOGIN_TOKENS) || 50; + +Accounts.onLogin(async ({ user }) => { + if (!user || !user.services || !user.services.resume || !user.services.resume.loginTokens) { + return; + } + if (user.services.resume.loginTokens.length < MAX_RESUME_LOGIN_TOKENS) { + return; + } + const { tokens } = (await UsersRaw.findAllResumeTokensByUserId(user._id))[0]; + if (tokens.length >= MAX_RESUME_LOGIN_TOKENS) { + const oldestDate = tokens.reverse()[MAX_RESUME_LOGIN_TOKENS - 1]; + Users.removeOlderResumeTokensByUserId(user._id, oldestDate.when); + } +}); diff --git a/app/authentication/server/startup/settings.ts b/apps/meteor/app/authentication/server/startup/settings.ts similarity index 100% rename from app/authentication/server/startup/settings.ts rename to apps/meteor/app/authentication/server/startup/settings.ts diff --git a/apps/meteor/app/authorization/README.md b/apps/meteor/app/authorization/README.md new file mode 100644 index 000000000000..93d86ed2092b --- /dev/null +++ b/apps/meteor/app/authorization/README.md @@ -0,0 +1,41 @@ +Supports role or permission based authorization, and defines the association between them. + +A user is associated with role(s), and a role is associated with permission(s). This package depends on alanning:roles for the role/user association, while the role/permission association is handled internally. Thus, the underlying alanning:roles has no concept of a permission or the association between a role and permission. + +Authorization checks can be done based on a role or permission. However, permission based checks are preferred because they loosely associate an action with a role. For example: + +``` +# permission based check +if hasPermission(userId, 'edit-message') ... + # action is loosely associated to role via permission. Thus action can be revoked + # at runtime by removing the permission for user's role instead of modifying the action code. + +# role based check +if hasRole(userId, 'admin') +if hasAnyRole(userId, ['admin','site-moderator','moderator']) + # action is statically associated with the role + # action code has to be modified to add/remove role authorization + +``` + +Usage: +``` +# assign user to admin role. Permissions scoped globally +RocketChat.authz.addUserRoles(userId, ['admin']) + +# assign user to moderator role. Permissions scoped to the specified room +# user can moderate (e.g. edit channel name, delete private group message) for only one room specified by the roomId +RocketChat.authz.addUserRoles(userId, ['moderator'], roomId ) + +# check if user can modify message for any room +RocketChat.authz.hasPermission(userId, 'edit-message') + +# check if user can modify message for the specified room. Also returns true if user +# has 'edit-message' at global scope. +RocketChat.authz.hasPermission(userId, 'edit-message', roomId) +``` + +Notes: +1. Roles are statically defined. UI needs to be implemented to dynamically assign permission(s) to a Role +2. 'admin', 'moderator', 'user' role identifiers should NOT be changed (unless you update the associated code) because they are referenced when creating users and creating rooms. +3. edit, delete message permissions are at either the global or room scope. i.e. role with edit-message with GLOBAL scope can edit ANY message regardless of the room type. However, role with edit-message with room scope can only edit messages for the room. The global scope is associated with the admin role while the "room-scoped" permission is assigned to the room "moderator" (room creator). If we want a middle ground that allows for edit-message for only channel/group/direct, then we need to create individual edit-c-message, edit-p-message, edit-d-message permissions. diff --git a/apps/meteor/app/authorization/client/hasPermission.ts b/apps/meteor/app/authorization/client/hasPermission.ts new file mode 100644 index 000000000000..a0d6a2fe63b4 --- /dev/null +++ b/apps/meteor/app/authorization/client/hasPermission.ts @@ -0,0 +1,78 @@ +import { Meteor } from 'meteor/meteor'; +import type { IUser, IRole, IPermission } from '@rocket.chat/core-typings'; + +import { ChatPermissions } from './lib/ChatPermissions'; +import * as Models from '../../models/client'; +import { AuthorizationUtils } from '../lib/AuthorizationUtils'; + +const isValidScope = (scope: IRole['scope']): boolean => typeof scope === 'string' && scope in Models; + +const createPermissionValidator = + (quantifier: (predicate: (permissionId: IPermission['_id']) => boolean) => boolean) => + (permissionIds: IPermission['_id'][], scope: string | undefined, userId: IUser['_id']): boolean => { + const user: IUser | null = Models.Users.findOneById(userId, { fields: { roles: 1 } }); + + const checkEachPermission = quantifier.bind(permissionIds); + + return checkEachPermission((permissionId) => { + if (user?.roles) { + if (AuthorizationUtils.isPermissionRestrictedForRoleList(permissionId, user.roles)) { + return false; + } + } + + const permission: IPermission | null = ChatPermissions.findOne(permissionId, { + fields: { roles: 1 }, + }); + const roles = permission?.roles ?? []; + + return roles.some((roleId) => { + const role = Models.Roles.findOne(roleId, { fields: { scope: 1 } }); + const roleScope = role?.scope; + + if (!isValidScope(roleScope)) { + return false; + } + + const model = Models[roleScope as keyof typeof Models]; + return model.isUserInRole?.(userId, roleId, scope); + }); + }); + }; + +const atLeastOne = createPermissionValidator(Array.prototype.some); + +const all = createPermissionValidator(Array.prototype.every); + +const validatePermissions = ( + permissions: IPermission['_id'] | IPermission['_id'][], + scope: string | undefined, + predicate: (permissionIds: IPermission['_id'][], scope: string | undefined, userId: IUser['_id']) => boolean, + userId?: IUser['_id'] | null, +): boolean => { + userId = userId ?? Meteor.userId(); + + if (!userId) { + return false; + } + + if (!Models.AuthzCachedCollection.ready.get()) { + return false; + } + + return predicate(([] as IPermission['_id'][]).concat(permissions), scope, userId); +}; + +export const hasAllPermission = (permissions: IPermission['_id'] | IPermission['_id'][], scope?: string): boolean => + validatePermissions(permissions, scope, all); + +export const hasAtLeastOnePermission = (permissions: IPermission['_id'] | IPermission['_id'][], scope?: string): boolean => + validatePermissions(permissions, scope, atLeastOne); + +export const userHasAllPermission = ( + permissions: IPermission['_id'] | IPermission['_id'][], + scope?: string, + userId?: IUser['_id'] | null, +): boolean => validatePermissions(permissions, scope, all, userId); + +export const hasPermission = hasAllPermission; diff --git a/apps/meteor/app/authorization/client/hasRole.ts b/apps/meteor/app/authorization/client/hasRole.ts new file mode 100644 index 000000000000..25995aeb3773 --- /dev/null +++ b/apps/meteor/app/authorization/client/hasRole.ts @@ -0,0 +1,19 @@ +import type { IUser, IRole, IRoom } from '@rocket.chat/core-typings'; + +import { Roles } from '../../models/client'; + +export const hasRole = (userId: IUser['_id'], roleId: IRole['_id'], scope?: IRoom['_id'], ignoreSubscriptions = false): boolean => { + if (Array.isArray(roleId)) { + throw new Error('error-invalid-arguments'); + } + + return Roles.isUserInRoles(userId, [roleId], scope, ignoreSubscriptions); +}; + +export const hasAnyRole = (userId: IUser['_id'], roleIds: IRole['_id'][], scope?: IRoom['_id'], ignoreSubscriptions = false): boolean => { + if (!Array.isArray(roleIds)) { + throw new Error('error-invalid-arguments'); + } + + return Roles.isUserInRoles(userId, roleIds, scope, ignoreSubscriptions); +}; diff --git a/apps/meteor/app/authorization/client/index.ts b/apps/meteor/app/authorization/client/index.ts new file mode 100644 index 000000000000..ea320d1601f2 --- /dev/null +++ b/apps/meteor/app/authorization/client/index.ts @@ -0,0 +1,7 @@ +import { hasAllPermission, hasAtLeastOnePermission, hasPermission, userHasAllPermission } from './hasPermission'; +import { hasRole, hasAnyRole } from './hasRole'; +import { AuthorizationUtils } from '../lib/AuthorizationUtils'; +import './requiresPermission.html'; +import './startup'; + +export { hasAllPermission, hasAtLeastOnePermission, hasRole, hasAnyRole, hasPermission, userHasAllPermission, AuthorizationUtils }; diff --git a/apps/meteor/app/authorization/client/lib/ChatPermissions.js b/apps/meteor/app/authorization/client/lib/ChatPermissions.js new file mode 100644 index 000000000000..1fc4377af95f --- /dev/null +++ b/apps/meteor/app/authorization/client/lib/ChatPermissions.js @@ -0,0 +1,3 @@ +import { AuthzCachedCollection } from '../../../models/client'; + +export const ChatPermissions = AuthzCachedCollection.collection; diff --git a/app/authorization/client/lib/streamer.js b/apps/meteor/app/authorization/client/lib/streamer.ts similarity index 100% rename from app/authorization/client/lib/streamer.js rename to apps/meteor/app/authorization/client/lib/streamer.ts diff --git a/app/authorization/client/requiresPermission.html b/apps/meteor/app/authorization/client/requiresPermission.html similarity index 100% rename from app/authorization/client/requiresPermission.html rename to apps/meteor/app/authorization/client/requiresPermission.html diff --git a/apps/meteor/app/authorization/client/startup.js b/apps/meteor/app/authorization/client/startup.js new file mode 100644 index 000000000000..6a7d79cb79cc --- /dev/null +++ b/apps/meteor/app/authorization/client/startup.js @@ -0,0 +1,36 @@ +import { Meteor } from 'meteor/meteor'; +import { Tracker } from 'meteor/tracker'; + +import { CachedCollectionManager } from '../../ui-cached-collection'; +import { APIClient } from '../../utils/client/lib/RestApiClient'; +import { Roles } from '../../models/client'; +import { rolesStreamer } from './lib/streamer'; + +Meteor.startup(() => { + CachedCollectionManager.onLogin(async () => { + const { roles } = await APIClient.get('/v1/roles.list'); + // if a role is checked before this collection is populated, it will return undefined + Roles._collection._docs._map = new Map(roles.map((record) => [Roles._collection._docs._idStringify(record._id), record])); + Object.values(Roles._collection.queries).forEach((query) => Roles._collection._recomputeResults(query)); + + Roles.ready.set(true); + }); + + const events = { + changed: (role) => { + delete role.type; + Roles.upsert({ _id: role._id }, role); + }, + removed: (role) => { + Roles.remove({ _id: role._id }); + }, + }; + + Tracker.autorun((c) => { + if (!Meteor.userId()) { + return; + } + rolesStreamer.on('roles', (role) => events[role.type](role)); + c.stop(); + }); +}); diff --git a/apps/meteor/app/authorization/index.js b/apps/meteor/app/authorization/index.js new file mode 100644 index 000000000000..c20f7ea60706 --- /dev/null +++ b/apps/meteor/app/authorization/index.js @@ -0,0 +1,8 @@ +import { Meteor } from 'meteor/meteor'; + +if (Meteor.isClient) { + module.exports = require('./client/'); +} +if (Meteor.isServer) { + module.exports = require('./server/index.js'); +} diff --git a/app/authorization/lib/AuthorizationUtils.ts b/apps/meteor/app/authorization/lib/AuthorizationUtils.ts similarity index 100% rename from app/authorization/lib/AuthorizationUtils.ts rename to apps/meteor/app/authorization/lib/AuthorizationUtils.ts diff --git a/app/authorization/lib/index.js b/apps/meteor/app/authorization/lib/index.js similarity index 100% rename from app/authorization/lib/index.js rename to apps/meteor/app/authorization/lib/index.js diff --git a/apps/meteor/app/authorization/server/functions/canAccessRoom.ts b/apps/meteor/app/authorization/server/functions/canAccessRoom.ts new file mode 100644 index 000000000000..d82bed560d14 --- /dev/null +++ b/apps/meteor/app/authorization/server/functions/canAccessRoom.ts @@ -0,0 +1,15 @@ +import { Authorization } from '../../../../server/sdk'; +import type { IAuthorization } from '../../../../server/sdk/types/IAuthorization'; + +export const canAccessRoomAsync = Authorization.canAccessRoom; +export const canAccessRoomIdAsync = Authorization.canAccessRoomId; +export const roomAccessAttributes = { + _id: 1, + t: 1, + teamId: 1, + prid: 1, +}; + +export const canAccessRoom = (...args: Parameters): boolean => Promise.await(canAccessRoomAsync(...args)); +export const canAccessRoomId = (...args: Parameters): boolean => + Promise.await(canAccessRoomIdAsync(...args)); diff --git a/apps/meteor/app/authorization/server/functions/canDeleteMessage.ts b/apps/meteor/app/authorization/server/functions/canDeleteMessage.ts new file mode 100644 index 000000000000..8ffb33958c26 --- /dev/null +++ b/apps/meteor/app/authorization/server/functions/canDeleteMessage.ts @@ -0,0 +1,53 @@ +import type { IUser } from '@rocket.chat/core-typings'; + +import { hasPermissionAsync } from './hasPermission'; +import { getValue } from '../../../settings/server/raw'; +import { Rooms } from '../../../models/server'; + +const elapsedTime = (ts: number): number => { + const dif = Date.now() - ts; + return Math.round(dif / 1000 / 60); +}; + +export const canDeleteMessageAsync = async (uid: string, { u, rid, ts }: { u: IUser; rid: string; ts: number }): Promise => { + const forceDelete = await hasPermissionAsync(uid, 'force-delete-message', rid); + + if (forceDelete) { + return true; + } + + if (!ts) { + return false; + } + const deleteAllowed = await getValue('Message_AllowDeleting'); + + if (!deleteAllowed) { + return false; + } + + const allowedToDeleteAny = await hasPermissionAsync(uid, 'delete-message', rid); + + const allowed = allowedToDeleteAny || (uid === u._id && (await hasPermissionAsync(uid, 'delete-own-message', rid))); + if (!allowed) { + return false; + } + const blockDeleteInMinutes = await getValue('Message_AllowDeleting_BlockDeleteInMinutes'); + + if (blockDeleteInMinutes) { + const timeElapsedForMessage = elapsedTime(ts); + return timeElapsedForMessage <= blockDeleteInMinutes; + } + + const room = await Rooms.findOneById(rid, { fields: { ro: 1, unmuted: 1 } }); + if (room.ro === true && !(await hasPermissionAsync(uid, 'post-readonly', rid))) { + // Unless the user was manually unmuted + if (!(room.unmuted || []).includes(u.username)) { + throw new Error("You can't delete messages because the room is readonly."); + } + } + + return true; +}; + +export const canDeleteMessage = (uid: string, { u, rid, ts }: { u: IUser; rid: string; ts: number }): boolean => + Promise.await(canDeleteMessageAsync(uid, { u, rid, ts })); diff --git a/apps/meteor/app/authorization/server/functions/canSendMessage.ts b/apps/meteor/app/authorization/server/functions/canSendMessage.ts new file mode 100644 index 000000000000..6b962fbda47c --- /dev/null +++ b/apps/meteor/app/authorization/server/functions/canSendMessage.ts @@ -0,0 +1,75 @@ +import type { IRoom, IUser } from '@rocket.chat/core-typings'; +import { Subscriptions, Rooms } from '@rocket.chat/models'; + +import { canAccessRoomAsync } from './canAccessRoom'; +import { hasPermissionAsync } from './hasPermission'; +import { roomCoordinator } from '../../../../server/lib/rooms/roomCoordinator'; +import { RoomMemberActions } from '../../../../definition/IRoomTypeConfig'; + +const subscriptionOptions = { + projection: { + blocked: 1, + blocker: 1, + }, +}; + +async function validateRoomMessagePermissionsAsync( + room: IRoom | null, + { uid, username, type }: { uid: IUser['_id']; username: IUser['username']; type: IUser['type'] }, + extraData: Record, +): Promise { + if (!room) { + throw new Error('error-invalid-room'); + } + + if (type !== 'app' && !(await canAccessRoomAsync(room, { _id: uid }, extraData))) { + throw new Error('error-not-allowed'); + } + + if (roomCoordinator.getRoomDirectives(room.t)?.allowMemberAction(room, RoomMemberActions.BLOCK)) { + const subscription = await Subscriptions.findOneByRoomIdAndUserId(room._id, uid, subscriptionOptions); + if (subscription && (subscription.blocked || subscription.blocker)) { + throw new Error('room_is_blocked'); + } + } + + if (room.ro === true && !(await hasPermissionAsync(uid, 'post-readonly', room._id))) { + // Unless the user was manually unmuted + if (username && !(room.unmuted || []).includes(username)) { + throw new Error("You can't send messages because the room is readonly."); + } + } + + if (username && room?.muted?.includes(username)) { + throw new Error('You_have_been_muted'); + } +} + +export async function canSendMessageAsync( + rid: IRoom['_id'], + { uid, username, type }: { uid: IUser['_id']; username: IUser['username']; type: IUser['type'] }, + extraData: Record, +): Promise { + const room = await Rooms.findOneById(rid); + if (!room) { + throw new Error('error-invalid-room'); + } + + await validateRoomMessagePermissionsAsync(room, { uid, username, type }, extraData); + return room; +} + +export function canSendMessage( + rid: IRoom['_id'], + { uid, username, type }: { uid: IUser['_id']; username: IUser['username']; type: IUser['type'] }, + extraData: Record, +): IRoom { + return Promise.await(canSendMessageAsync(rid, { uid, username, type }, extraData)); +} +export function validateRoomMessagePermissions( + room: IRoom, + { uid, username, type }: { uid: IUser['_id']; username: IUser['username']; type: IUser['type'] }, + extraData: Record, +): void { + return Promise.await(validateRoomMessagePermissionsAsync(room, { uid, username, type }, extraData)); +} diff --git a/apps/meteor/app/authorization/server/functions/getRoles.ts b/apps/meteor/app/authorization/server/functions/getRoles.ts new file mode 100644 index 000000000000..657b546aaaae --- /dev/null +++ b/apps/meteor/app/authorization/server/functions/getRoles.ts @@ -0,0 +1,4 @@ +import type { IRole } from '@rocket.chat/core-typings'; +import { Roles } from '@rocket.chat/models'; + +export const getRoles = (): IRole[] => Promise.await(Roles.find().toArray()); diff --git a/apps/meteor/app/authorization/server/functions/getUsersInRole.ts b/apps/meteor/app/authorization/server/functions/getUsersInRole.ts new file mode 100644 index 000000000000..3e6e82b20df4 --- /dev/null +++ b/apps/meteor/app/authorization/server/functions/getUsersInRole.ts @@ -0,0 +1,51 @@ +import type { FindCursor, FindOptions } from 'mongodb'; +import type { IRole, IUser } from '@rocket.chat/core-typings'; +import { Roles, Subscriptions, Users } from '@rocket.chat/models'; +import type { FindPaginated } from '@rocket.chat/model-typings'; +import { compact } from 'lodash'; + +export function getUsersInRole(roleId: IRole['_id'], scope?: string): Promise>; + +export function getUsersInRole(roleId: IRole['_id'], scope: string | undefined, options: FindOptions): Promise>; + +export function getUsersInRole

( + roleId: IRole['_id'], + scope: string | undefined, + options: FindOptions

, +): Promise>; + +export function getUsersInRole

( + roleId: IRole['_id'], + scope: string | undefined, + options?: any | undefined, +): Promise> { + // TODO move the code from Roles.findUsersInRole to here and change all places to use this function + return Roles.findUsersInRole(roleId, scope, options); +} + +export async function getUsersInRolePaginated( + roleId: IRole['_id'], + scope: string | undefined, + options?: any | undefined, +): Promise>> { + if (process.env.NODE_ENV === 'development' && (scope === 'Users' || scope === 'Subscriptions')) { + throw new Error('Roles.findUsersInRole method received a role scope instead of a scope value.'); + } + + const role = await Roles.findOneById>(roleId, { projection: { scope: 1 } }); + if (!role) { + throw new Error('role not found'); + } + + switch (role.scope) { + case 'Subscriptions': + const subscriptions = await Subscriptions.findByRolesAndRoomId({ roles: role._id, rid: scope }, { projection: { 'u._id': 1 } }) + .map((subscription) => subscription.u?._id) + .toArray(); + + return Users.findPaginated({ _id: { $in: compact(subscriptions) } }, options || {}); + case 'Users': + default: + return Users.findPaginatedUsersInRoles([role._id], options); + } +} diff --git a/apps/meteor/app/authorization/server/functions/hasPermission.ts b/apps/meteor/app/authorization/server/functions/hasPermission.ts new file mode 100644 index 000000000000..ae7edd333e9f --- /dev/null +++ b/apps/meteor/app/authorization/server/functions/hasPermission.ts @@ -0,0 +1,22 @@ +import type { IUser, IPermission, IRoom } from '@rocket.chat/core-typings'; + +import { Authorization } from '../../../../server/sdk'; + +export const hasAllPermissionAsync = async ( + userId: IUser['_id'], + permissions: IPermission['_id'][], + scope?: IRoom['_id'], +): Promise => Authorization.hasAllPermission(userId, permissions, scope); +export const hasPermissionAsync = async (userId: IUser['_id'], permissionId: IPermission['_id'], scope?: IRoom['_id']): Promise => + Authorization.hasPermission(userId, permissionId, scope); +export const hasAtLeastOnePermissionAsync = async ( + userId: IUser['_id'], + permissions: IPermission['_id'][], + scope?: IRoom['_id'], +): Promise => Authorization.hasAtLeastOnePermission(userId, permissions, scope); + +export const hasAllPermission = (...args: Parameters): boolean => + Promise.await(hasAllPermissionAsync(...args)); +export const hasPermission = (...args: Parameters): boolean => Promise.await(hasPermissionAsync(...args)); +export const hasAtLeastOnePermission = (...args: Parameters): boolean => + Promise.await(hasAtLeastOnePermissionAsync(...args)); diff --git a/apps/meteor/app/authorization/server/functions/hasRole.ts b/apps/meteor/app/authorization/server/functions/hasRole.ts new file mode 100644 index 000000000000..076ce8741ea9 --- /dev/null +++ b/apps/meteor/app/authorization/server/functions/hasRole.ts @@ -0,0 +1,32 @@ +import type { IRole, IUser, IRoom, ISubscription } from '@rocket.chat/core-typings'; +import { Roles } from '@rocket.chat/models'; + +export const hasAnyRoleAsync = async ( + userId: IUser['_id'], + roleIds: IRole['_id'][], + scope?: IRoom['_id'] | undefined, +): Promise => { + if (!Array.isArray(roleIds)) { + throw new Error('error-invalid-arguments'); + } + + if (!userId || userId === '') { + return false; + } + + return Roles.isUserInRoles(userId, roleIds, scope); +}; + +export const hasRoleAsync = async (userId: IUser['_id'], roleId: IRole['_id'], scope?: IRoom['_id'] | undefined): Promise => { + if (Array.isArray(roleId)) { + throw new Error('error-invalid-arguments'); + } + + return hasAnyRoleAsync(userId, [roleId], scope); +}; + +export const hasRole = (...args: Parameters): boolean => Promise.await(hasRoleAsync(...args)); + +export const hasAnyRole = (...args: Parameters): boolean => Promise.await(hasAnyRoleAsync(...args)); + +export const subscriptionHasRole = (sub: ISubscription, role: IRole['_id']): boolean | undefined => sub.roles?.includes(role); diff --git a/app/authorization/server/functions/upsertPermissions.ts b/apps/meteor/app/authorization/server/functions/upsertPermissions.ts similarity index 87% rename from app/authorization/server/functions/upsertPermissions.ts rename to apps/meteor/app/authorization/server/functions/upsertPermissions.ts index abfa562122be..3be452c5ca58 100644 --- a/app/authorization/server/functions/upsertPermissions.ts +++ b/apps/meteor/app/authorization/server/functions/upsertPermissions.ts @@ -1,9 +1,10 @@ /* eslint no-multi-spaces: 0 */ +import type { IPermission, ISetting } from '@rocket.chat/core-typings'; +import { Permissions, Settings } from '@rocket.chat/models'; + import { settings } from '../../../settings/server'; import { getSettingPermissionId, CONSTANTS } from '../../lib'; -import { Permissions, Roles, Settings } from '../../../models/server/raw'; -import { IPermission } from '../../../../definition/IPermission'; -import { ISetting } from '../../../../definition/ISetting'; +import { createOrUpdateProtectedRoleAsync } from '../../../../server/lib/roles/createOrUpdateProtectedRole'; export const upsertPermissions = async (): Promise => { // Note: @@ -174,7 +175,7 @@ export const upsertPermissions = async (): Promise => { }, { _id: 'send-omnichannel-chat-transcript', roles: ['livechat-manager', 'admin'] }, { _id: 'mail-messages', roles: ['admin'] }, - { _id: 'toggle-room-e2e-encryption', roles: ['owner'] }, + { _id: 'toggle-room-e2e-encryption', roles: ['owner', 'admin'] }, { _id: 'message-impersonate', roles: ['bot', 'app'] }, { _id: 'create-team', roles: ['admin', 'user'] }, { _id: 'delete-team', roles: ['admin', 'owner'] }, @@ -188,6 +189,18 @@ export const upsertPermissions = async (): Promise => { { _id: 'view-all-team-channels', roles: ['admin', 'owner'] }, { _id: 'view-all-teams', roles: ['admin'] }, { _id: 'remove-closed-livechat-room', roles: ['livechat-manager', 'admin'] }, + { _id: 'remove-livechat-department', roles: ['livechat-manager', 'admin'] }, + + // VOIP Permissions + // allows to manage voip calls configuration + { _id: 'manage-voip-call-settings', roles: ['livechat-manager', 'admin'] }, + { _id: 'manage-voip-contact-center-settings', roles: ['livechat-manager', 'admin'] }, + // allows agent-extension association. + { _id: 'manage-agent-extension-association', roles: ['admin'] }, + { _id: 'view-agent-extension-association', roles: ['livechat-manager', 'admin', 'livechat-agent'] }, + // allows to receive a voip call + { _id: 'inbound-voip-calls', roles: ['livechat-agent'] }, + { _id: 'remove-livechat-department', roles: ['livechat-manager', 'admin'] }, { _id: 'manage-apps', roles: ['admin'] }, { _id: 'post-readonly', roles: ['admin', 'owner', 'moderator'] }, @@ -199,6 +212,19 @@ export const upsertPermissions = async (): Promise => { { _id: 'pin-message', roles: ['owner', 'moderator', 'admin'] }, { _id: 'snippet-message', roles: ['owner', 'moderator', 'admin'] }, { _id: 'mobile-upload-file', roles: ['user', 'admin'] }, + { _id: 'send-mail', roles: ['admin'] }, + { _id: 'view-federation-data', roles: ['admin'] }, + { _id: 'add-all-to-room', roles: ['admin'] }, + { _id: 'get-server-info', roles: ['admin'] }, + { _id: 'register-on-cloud', roles: ['admin'] }, + { _id: 'test-admin-options', roles: ['admin'] }, + { _id: 'sync-auth-services-users', roles: ['admin'] }, + { _id: 'manage-chatpal', roles: ['admin'] }, + { _id: 'restart-server', roles: ['admin'] }, + { _id: 'remove-slackbridge-links', roles: ['admin'] }, + { _id: 'view-import-operations', roles: ['admin'] }, + { _id: 'clear-oembed-cache', roles: ['admin'] }, + { _id: 'videoconf-ring-users', roles: ['admin', 'owner', 'moderator', 'user'] }, ]; for await (const permission of permissions) { @@ -217,10 +243,10 @@ export const upsertPermissions = async (): Promise => { { name: 'anonymous', scope: 'Users', description: '' }, { name: 'livechat-agent', scope: 'Users', description: 'Livechat Agent' }, { name: 'livechat-manager', scope: 'Users', description: 'Livechat Manager' }, - ]; + ] as const; for await (const role of defaultRoles) { - await Roles.createOrUpdate(role.name, role.scope as 'Users' | 'Subscriptions', role.description, true, false); + await createOrUpdateProtectedRoleAsync(role.name, role); } const getPreviousPermissions = async function (settingId?: string): Promise> { @@ -253,7 +279,7 @@ export const upsertPermissions = async (): Promise => { roles: [], }; // copy previously assigned roles if available - if (previousSettingPermissions[permissionId] && previousSettingPermissions[permissionId].roles) { + if (previousSettingPermissions[permissionId]?.roles) { permission.roles = previousSettingPermissions[permissionId].roles; } if (setting.group) { @@ -268,17 +294,17 @@ export const upsertPermissions = async (): Promise => { _id: permissionId, ...permission, }, - { fields: { _id: 1 } }, + { projection: { _id: 1 } }, ); if (!existent) { try { - await Permissions.update({ _id: permissionId }, { $set: permission }, { upsert: true }); + await Permissions.updateOne({ _id: permissionId }, { $set: permission }, { upsert: true }); } catch (e) { - if (!e.message.includes('E11000')) { + if (!(e as Error).message.includes('E11000')) { // E11000 refers to a MongoDB error that can occur when using unique indexes for upserts // https://docs.mongodb.com/manual/reference/method/db.collection.update/#use-unique-indexes - await Permissions.update({ _id: permissionId }, { $set: permission }, { upsert: true }); + await Permissions.updateOne({ _id: permissionId }, { $set: permission }, { upsert: true }); } } } diff --git a/apps/meteor/app/authorization/server/index.js b/apps/meteor/app/authorization/server/index.js new file mode 100644 index 000000000000..b43cbeabc51d --- /dev/null +++ b/apps/meteor/app/authorization/server/index.js @@ -0,0 +1,32 @@ +import { canAccessRoom, canAccessRoomId, roomAccessAttributes, roomAccessValidators } from './functions/canAccessRoom'; +import { canSendMessage, validateRoomMessagePermissions } from './functions/canSendMessage'; +import { getRoles } from './functions/getRoles'; +import { getUsersInRole } from './functions/getUsersInRole'; +import { hasAllPermission, hasAtLeastOnePermission, hasPermission } from './functions/hasPermission'; +import { hasRole, hasAnyRole, subscriptionHasRole } from './functions/hasRole'; +import { AuthorizationUtils } from '../lib/AuthorizationUtils'; +import './methods/addPermissionToRole'; +import './methods/addUserToRole'; +import './methods/deleteRole'; +import './methods/removeRoleFromPermission'; +import './methods/removeUserFromRole'; +import './methods/saveRole'; +import './streamer/permissions'; + +export { + getRoles, + getUsersInRole, + hasRole, + hasAnyRole, + subscriptionHasRole, + canSendMessage, + validateRoomMessagePermissions, + roomAccessValidators, + canAccessRoom, + canAccessRoomId, + roomAccessAttributes, + hasAllPermission, + hasAtLeastOnePermission, + hasPermission, + AuthorizationUtils, +}; diff --git a/app/authorization/server/methods/addPermissionToRole.ts b/apps/meteor/app/authorization/server/methods/addPermissionToRole.ts similarity index 96% rename from app/authorization/server/methods/addPermissionToRole.ts rename to apps/meteor/app/authorization/server/methods/addPermissionToRole.ts index 946a7813b226..8041cb8b7301 100644 --- a/app/authorization/server/methods/addPermissionToRole.ts +++ b/apps/meteor/app/authorization/server/methods/addPermissionToRole.ts @@ -1,8 +1,8 @@ import { Meteor } from 'meteor/meteor'; +import { Permissions } from '@rocket.chat/models'; import { hasPermission } from '../functions/hasPermission'; import { CONSTANTS, AuthorizationUtils } from '../../lib'; -import { Permissions } from '../../../models/server/raw'; Meteor.methods({ async 'authorization:addPermissionToRole'(permissionId, role) { diff --git a/apps/meteor/app/authorization/server/methods/addUserToRole.ts b/apps/meteor/app/authorization/server/methods/addUserToRole.ts new file mode 100644 index 000000000000..c33f950e0dbc --- /dev/null +++ b/apps/meteor/app/authorization/server/methods/addUserToRole.ts @@ -0,0 +1,84 @@ +import { Meteor } from 'meteor/meteor'; +import _ from 'underscore'; +import type { IRole, IUser, IRoom } from '@rocket.chat/core-typings'; +import { Roles } from '@rocket.chat/models'; + +import { Users } from '../../../models/server'; +import { settings } from '../../../settings/server'; +import { hasPermission } from '../functions/hasPermission'; +import { api } from '../../../../server/sdk/api'; +import { apiDeprecationLogger } from '../../../lib/server/lib/deprecationWarningLogger'; + +Meteor.methods({ + async 'authorization:addUserToRole'(roleId: IRole['_id'], username: IUser['username'], scope: IRoom['_id'] | undefined) { + const userId = Meteor.userId(); + + if (!userId || !hasPermission(userId, 'access-permissions')) { + throw new Meteor.Error('error-action-not-allowed', 'Accessing permissions is not allowed', { + method: 'authorization:addUserToRole', + action: 'Accessing_permissions', + }); + } + + if (!roleId || !_.isString(roleId) || !username || !_.isString(username)) { + throw new Meteor.Error('error-invalid-arguments', 'Invalid arguments', { + method: 'authorization:addUserToRole', + }); + } + + let role = await Roles.findOneById>(roleId, { projection: { _id: 1 } }); + if (!role) { + role = await Roles.findOneByName>(roleId, { projection: { _id: 1 } }); + + if (!role) { + throw new Meteor.Error('error-invalid-role', 'Invalid Role', { + method: 'authorization:addUserToRole', + }); + } + + apiDeprecationLogger.warn(`Calling authorization:addUserToRole with role names will be deprecated in future versions of Rocket.Chat`); + } + + if (role._id === 'admin' && !hasPermission(userId, 'assign-admin-role')) { + throw new Meteor.Error('error-action-not-allowed', 'Assigning admin is not allowed', { + method: 'authorization:addUserToRole', + action: 'Assign_admin', + }); + } + + const user = Users.findOneByUsernameIgnoringCase(username, { + fields: { + _id: 1, + }, + }); + + if (!user || !user._id) { + throw new Meteor.Error('error-user-not-found', 'User not found', { + method: 'authorization:addUserToRole', + }); + } + + // verify if user can be added to given scope + if (scope && !(await Roles.canAddUserToRole(user._id, role._id, scope))) { + throw new Meteor.Error('error-invalid-user', 'User is not part of given room', { + method: 'authorization:addUserToRole', + }); + } + + const add = await Roles.addUserRoles(user._id, [role._id], scope); + + if (settings.get('UI_DisplayRoles')) { + api.broadcast('user.roleUpdate', { + type: 'added', + _id: role._id, + u: { + _id: user._id, + username, + }, + scope, + }); + } + + return add; + }, +}); diff --git a/apps/meteor/app/authorization/server/methods/deleteRole.ts b/apps/meteor/app/authorization/server/methods/deleteRole.ts new file mode 100644 index 000000000000..71858b228705 --- /dev/null +++ b/apps/meteor/app/authorization/server/methods/deleteRole.ts @@ -0,0 +1,55 @@ +import { Meteor } from 'meteor/meteor'; +import type { IRole } from '@rocket.chat/core-typings'; +import { Roles } from '@rocket.chat/models'; + +import { hasPermission } from '../functions/hasPermission'; +import { apiDeprecationLogger } from '../../../lib/server/lib/deprecationWarningLogger'; + +Meteor.methods({ + async 'authorization:deleteRole'(roleId) { + const userId = Meteor.userId(); + + if (!userId || !hasPermission(userId, 'access-permissions')) { + throw new Meteor.Error('error-action-not-allowed', 'Accessing permissions is not allowed', { + method: 'authorization:deleteRole', + action: 'Accessing_permissions', + }); + } + + const options = { + projection: { + _id: 1, + protected: 1, + }, + }; + + let role = await Roles.findOneById>(roleId, options); + if (!role) { + role = await Roles.findOneByName>(roleId, options); + + if (!role) { + throw new Meteor.Error('error-invalid-role', 'Invalid role', { + method: 'authorization:deleteRole', + }); + } + + apiDeprecationLogger.warn(`Calling authorization:deleteRole with role names will be deprecated in future versions of Rocket.Chat`); + } + + if (role.protected) { + throw new Meteor.Error('error-delete-protected-role', 'Cannot delete a protected role', { + method: 'authorization:deleteRole', + }); + } + + const users = await (await Roles.findUsersInRole(role._id)).count(); + + if (users > 0) { + throw new Meteor.Error('error-role-in-use', "Cannot delete role because it's in use", { + method: 'authorization:deleteRole', + }); + } + + return Roles.removeById(role._id); + }, +}); diff --git a/app/authorization/server/methods/removeRoleFromPermission.ts b/apps/meteor/app/authorization/server/methods/removeRoleFromPermission.ts similarity index 95% rename from app/authorization/server/methods/removeRoleFromPermission.ts rename to apps/meteor/app/authorization/server/methods/removeRoleFromPermission.ts index f690c29d5ea2..0d2ecf59333f 100644 --- a/app/authorization/server/methods/removeRoleFromPermission.ts +++ b/apps/meteor/app/authorization/server/methods/removeRoleFromPermission.ts @@ -1,8 +1,8 @@ import { Meteor } from 'meteor/meteor'; +import { Permissions } from '@rocket.chat/models'; import { hasPermission } from '../functions/hasPermission'; import { CONSTANTS } from '../../lib'; -import { Permissions } from '../../../models/server/raw'; Meteor.methods({ async 'authorization:removeRoleFromPermission'(permissionId, role) { diff --git a/apps/meteor/app/authorization/server/methods/removeUserFromRole.ts b/apps/meteor/app/authorization/server/methods/removeUserFromRole.ts new file mode 100644 index 000000000000..3eeda9c2c84e --- /dev/null +++ b/apps/meteor/app/authorization/server/methods/removeUserFromRole.ts @@ -0,0 +1,90 @@ +import { Meteor } from 'meteor/meteor'; +import _ from 'underscore'; +import type { IRole, IUser } from '@rocket.chat/core-typings'; +import { Roles } from '@rocket.chat/models'; + +import { Users } from '../../../models/server'; +import { settings } from '../../../settings/server'; +import { hasPermission } from '../functions/hasPermission'; +import { api } from '../../../../server/sdk/api'; +import { apiDeprecationLogger } from '../../../lib/server/lib/deprecationWarningLogger'; + +Meteor.methods({ + async 'authorization:removeUserFromRole'(roleId, username, scope) { + const userId = Meteor.userId(); + + if (!userId || !hasPermission(userId, 'access-permissions')) { + throw new Meteor.Error('error-action-not-allowed', 'Access permissions is not allowed', { + method: 'authorization:removeUserFromRole', + action: 'Accessing_permissions', + }); + } + + if (!roleId || !_.isString(roleId) || !username || !_.isString(username)) { + throw new Meteor.Error('error-invalid-arguments', 'Invalid arguments', { + method: 'authorization:removeUserFromRole', + }); + } + + let role = await Roles.findOneById>(roleId, { projection: { _id: 1 } }); + if (!role) { + role = await Roles.findOneByName>(roleId, { projection: { _id: 1 } }); + if (!role) { + throw new Meteor.Error('error-invalid-role', 'Invalid Role', { + method: 'authorization:removeUserFromRole', + }); + } + + apiDeprecationLogger.warn( + `Calling authorization:removeUserFromRole with role names will be deprecated in future versions of Rocket.Chat`, + ); + } + + const user = Users.findOneByUsernameIgnoringCase(username, { + fields: { + _id: 1, + roles: 1, + }, + }) as Pick; + + if (!user || !user._id) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', { + method: 'authorization:removeUserFromRole', + }); + } + + // prevent removing last user from admin role + if (role._id === 'admin') { + const adminCount = Meteor.users + .find({ + roles: { + $in: ['admin'], + }, + }) + .count(); + + const userIsAdmin = user.roles?.indexOf('admin') > -1; + if (adminCount === 1 && userIsAdmin) { + throw new Meteor.Error('error-action-not-allowed', 'Leaving the app without admins is not allowed', { + method: 'removeUserFromRole', + action: 'Remove_last_admin', + }); + } + } + + const remove = await Roles.removeUserRoles(user._id, [role._id], scope); + if (settings.get('UI_DisplayRoles')) { + api.broadcast('user.roleUpdate', { + type: 'removed', + _id: role._id, + u: { + _id: user._id, + username, + }, + scope, + }); + } + + return remove; + }, +}); diff --git a/apps/meteor/app/authorization/server/methods/saveRole.ts b/apps/meteor/app/authorization/server/methods/saveRole.ts new file mode 100644 index 000000000000..9eb19298f7f7 --- /dev/null +++ b/apps/meteor/app/authorization/server/methods/saveRole.ts @@ -0,0 +1,48 @@ +import { Meteor } from 'meteor/meteor'; +import { isRoleCreateProps } from '@rocket.chat/rest-typings'; +import { Roles } from '@rocket.chat/models'; + +import { settings } from '../../../settings/server'; +import { hasPermission } from '../functions/hasPermission'; +import { methodDeprecationLogger } from '../../../lib/server/lib/deprecationWarningLogger'; +import { updateRoleAsync } from '../../../../server/lib/roles/updateRole'; +import { insertRoleAsync } from '../../../../server/lib/roles/insertRole'; + +Meteor.methods({ + async 'authorization:saveRole'(roleData: Record) { + methodDeprecationLogger.warn('authorization:saveRole will be deprecated in future versions of Rocket.Chat'); + const userId = Meteor.userId(); + + if (!isRoleCreateProps(roleData)) { + throw new Meteor.Error('error-invalid-role-properties', 'The role properties are invalid.', { + method: 'authorization:saveRole', + }); + } + + if (!userId || !hasPermission(userId, 'access-permissions')) { + throw new Meteor.Error('error-action-not-allowed', 'Accessing permissions is not allowed', { + method: 'authorization:saveRole', + action: 'Accessing_permissions', + }); + } + + const role = { + description: roleData.description || '', + ...(roleData.mandatory2fa !== undefined && { mandatory2fa: roleData.mandatory2fa }), + name: roleData.name, + scope: roleData.scope || 'Users', + protected: false, + }; + + const existingRole = await Roles.findOneByName(roleData.name, { projection: { _id: 1 } }); + const options = { + broadcastUpdate: settings.get('UI_DisplayRoles'), + }; + + if (existingRole) { + return updateRoleAsync(existingRole._id, role, options); + } + + return insertRoleAsync(role); + }, +}); diff --git a/apps/meteor/app/authorization/server/streamer/permissions/index.ts b/apps/meteor/app/authorization/server/streamer/permissions/index.ts new file mode 100644 index 000000000000..866bec5fb407 --- /dev/null +++ b/apps/meteor/app/authorization/server/streamer/permissions/index.ts @@ -0,0 +1,23 @@ +import { Meteor } from 'meteor/meteor'; +import { check, Match } from 'meteor/check'; +import { Permissions } from '@rocket.chat/models'; + +Meteor.methods({ + async 'permissions/get'(updatedAt: Date) { + check(updatedAt, Match.Maybe(Date)); + + // TODO: should we return this for non logged users? + // TODO: we could cache this collection + + const records = await Permissions.find(updatedAt && { _updatedAt: { $gt: updatedAt } }).toArray(); + + if (updatedAt instanceof Date) { + return { + update: records, + remove: await Permissions.trashFindDeletedAfter(updatedAt, {}, { projection: { _id: 1, _deletedAt: 1 } }).toArray(), + }; + } + + return records; + }, +}); diff --git a/app/autolinker/client/client.js b/apps/meteor/app/autolinker/client/client.js similarity index 100% rename from app/autolinker/client/client.js rename to apps/meteor/app/autolinker/client/client.js diff --git a/app/autolinker/client/index.js b/apps/meteor/app/autolinker/client/index.js similarity index 100% rename from app/autolinker/client/index.js rename to apps/meteor/app/autolinker/client/index.js diff --git a/app/autolinker/server/index.js b/apps/meteor/app/autolinker/server/index.js similarity index 100% rename from app/autolinker/server/index.js rename to apps/meteor/app/autolinker/server/index.js diff --git a/app/autolinker/server/settings.ts b/apps/meteor/app/autolinker/server/settings.ts similarity index 100% rename from app/autolinker/server/settings.ts rename to apps/meteor/app/autolinker/server/settings.ts diff --git a/app/autotranslate/README.md b/apps/meteor/app/autotranslate/README.md similarity index 100% rename from app/autotranslate/README.md rename to apps/meteor/app/autotranslate/README.md diff --git a/app/autotranslate/client/index.js b/apps/meteor/app/autotranslate/client/index.ts similarity index 100% rename from app/autotranslate/client/index.js rename to apps/meteor/app/autotranslate/client/index.ts diff --git a/apps/meteor/app/autotranslate/client/lib/actionButton.ts b/apps/meteor/app/autotranslate/client/lib/actionButton.ts new file mode 100644 index 000000000000..0d742d68f9ab --- /dev/null +++ b/apps/meteor/app/autotranslate/client/lib/actionButton.ts @@ -0,0 +1,65 @@ +import { Meteor } from 'meteor/meteor'; +import { Tracker } from 'meteor/tracker'; +import { isTranslatedMessage } from '@rocket.chat/core-typings'; + +import { AutoTranslate } from './autotranslate'; +import { settings } from '../../../settings/client'; +import { hasAtLeastOnePermission } from '../../../authorization/client'; +import { MessageAction } from '../../../ui-utils/client/lib/MessageAction'; +import { messageArgs } from '../../../../client/lib/utils/messageArgs'; +import { Messages } from '../../../models/client'; + +Meteor.startup(() => { + AutoTranslate.init(); + + Tracker.autorun(() => { + if (settings.get('AutoTranslate_Enabled') && hasAtLeastOnePermission(['auto-translate'])) { + MessageAction.addButton({ + id: 'translate', + icon: 'language', + label: 'Translate', + context: ['message', 'message-mobile', 'threads'], + action(_, props) { + const { message = messageArgs(this).msg } = props; + const language = AutoTranslate.getLanguage(message.rid); + if (!isTranslatedMessage(message) || !message.translations[language]) { + // } && !_.find(message.attachments, attachment => { return attachment.translations && attachment.translations[language]; })) { + (AutoTranslate.messageIdsToWait as any)[message._id] = true; + Messages.update({ _id: message._id }, { $set: { autoTranslateFetching: true } }); + Meteor.call('autoTranslate.translateMessage', message, language); + } + const action = 'autoTranslateShowInverse' in message ? '$unset' : '$set'; + Messages.update({ _id: message._id }, { [action]: { autoTranslateShowInverse: true } }); + }, + condition({ message, user }) { + return Boolean(message?.u && message.u._id !== user._id && isTranslatedMessage(message) && message.autoTranslateShowInverse); + }, + order: 90, + }); + MessageAction.addButton({ + id: 'view-original', + icon: 'language', + label: 'View_original', + context: ['message', 'message-mobile', 'threads'], + action(_, props) { + const { message = messageArgs(this).msg } = props; + const language = AutoTranslate.getLanguage(message.rid); + if (!isTranslatedMessage(message) || !message.translations[language]) { + // } && !_.find(message.attachments, attachment => { return attachment.translations && attachment.translations[language]; })) { + (AutoTranslate.messageIdsToWait as any)[message._id] = true; + Messages.update({ _id: message._id }, { $set: { autoTranslateFetching: true } }); + Meteor.call('autoTranslate.translateMessage', message, language); + } + const action = 'autoTranslateShowInverse' in message ? '$unset' : '$set'; + Messages.update({ _id: message._id }, { [action]: { autoTranslateShowInverse: true } }); + }, + condition({ message, user }) { + return Boolean(message?.u && message.u._id !== user._id && isTranslatedMessage(message) && !message.autoTranslateShowInverse); + }, + order: 90, + }); + } else { + MessageAction.removeButton('toggle-language'); + } + }); +}); diff --git a/apps/meteor/app/autotranslate/client/lib/autotranslate.ts b/apps/meteor/app/autotranslate/client/lib/autotranslate.ts new file mode 100644 index 000000000000..71ff7cc92c5a --- /dev/null +++ b/apps/meteor/app/autotranslate/client/lib/autotranslate.ts @@ -0,0 +1,192 @@ +import { Meteor } from 'meteor/meteor'; +import { Tracker } from 'meteor/tracker'; +import mem from 'mem'; +import type { + IRoom, + ISubscription, + ISupportedLanguage, + ITranslatedMessage, + IUser, + MessageAttachmentDefault, +} from '@rocket.chat/core-typings'; + +import { Subscriptions, Messages } from '../../../models/client'; +import { hasPermission } from '../../../authorization/client'; +import { call } from '../../../../client/lib/utils/call'; + +let userLanguage = 'en'; +let username = ''; + +Meteor.startup(() => { + Tracker.autorun(() => { + const user: Pick | null = Meteor.user(); + if (!user) { + return; + } + userLanguage = user.language || 'en'; + username = user.username || ''; + }); +}); + +export const AutoTranslate = { + initialized: false, + providersMetadata: {} as { [providerNamer: string]: { name: string; displayName: string } }, + messageIdsToWait: {} as { [messageId: string]: string }, + supportedLanguages: [] as ISupportedLanguage[] | undefined, + + findSubscriptionByRid: mem((rid) => Subscriptions.findOne({ rid })), + + getLanguage(rid: IRoom['_id']): string { + let subscription: ISubscription | undefined; + if (rid) { + subscription = this.findSubscriptionByRid(rid); + } + const language = (subscription?.autoTranslateLanguage || userLanguage || window.defaultUserLanguage?.()) as string; + if (language.indexOf('-') !== -1) { + if (!(this.supportedLanguages || []).some((supportedLanguage) => supportedLanguage.language === language)) { + return language.slice(0, 2); + } + } + return language; + }, + + translateAttachments( + attachments: MessageAttachmentDefault[], + language: string, + autoTranslateShowInverse: boolean, + ): MessageAttachmentDefault[] { + for (const attachment of attachments) { + if (attachment.author_name !== username) { + if (attachment.text && attachment.translations && attachment.translations[language]) { + attachment.translations.original = attachment.text; + + if (autoTranslateShowInverse) { + attachment.text = attachment.translations.original; + } else { + attachment.text = attachment.translations[language]; + } + } + + if (attachment.description && attachment.translations && attachment.translations[language]) { + attachment.translations.original = attachment.description; + + if (autoTranslateShowInverse) { + attachment.description = attachment.translations.original; + } else { + attachment.description = attachment.translations[language]; + } + } + + // @ts-expect-error - not sure what to do with this + if (attachment.attachments && attachment.attachments.length > 0) { + // @ts-expect-error - not sure what to do with this + attachment.attachments = this.translateAttachments(attachment.attachments, language); + } + } + } + return attachments; + }, + + init(): void { + if (this.initialized) { + return; + } + + Tracker.autorun(async (c) => { + const uid = Meteor.userId(); + if (!uid || !hasPermission('auto-translate')) { + return; + } + + c.stop(); + + try { + [this.providersMetadata, this.supportedLanguages] = await Promise.all([ + call('autoTranslate.getProviderUiMetadata'), + call('autoTranslate.getSupportedLanguages', 'en'), + ]); + } catch (e: unknown) { + // Avoid unwanted error message on UI when autotranslate is disabled while fetching data + console.error((e as Error).message); + } + }); + + Subscriptions.find().observeChanges({ + changed: (_id: string, fields: ISubscription) => { + if (fields.hasOwnProperty('autoTranslate') || fields.hasOwnProperty('autoTranslateLanguage')) { + mem.clear(this.findSubscriptionByRid); + } + }, + }); + + this.initialized = true; + }, +}; + +export const createAutoTranslateMessageRenderer = (): ((message: ITranslatedMessage) => ITranslatedMessage) => { + AutoTranslate.init(); + + return (message: ITranslatedMessage): ITranslatedMessage => { + const subscription = AutoTranslate.findSubscriptionByRid(message.rid); + const autoTranslateLanguage = AutoTranslate.getLanguage(message.rid); + if (message.u && message.u._id !== Meteor.userId()) { + if (!message.translations) { + message.translations = {}; + } + if (!!subscription?.autoTranslate !== !!message.autoTranslateShowInverse) { + const hasAttachmentsTranslate = + message.attachments?.some( + (attachment) => + 'translations' in attachment && + typeof attachment.translations === 'object' && + autoTranslateLanguage in attachment.translations, + ) ?? false; + + message.translations.original = message.html; + if (message.translations[autoTranslateLanguage] && !hasAttachmentsTranslate) { + message.html = message.translations[autoTranslateLanguage]; + } + + if (message.attachments && message.attachments.length > 0) { + message.attachments = AutoTranslate.translateAttachments( + message.attachments, + autoTranslateLanguage, + !!message.autoTranslateShowInverse, + ); + } + } + } else if (message.attachments && message.attachments.length > 0) { + message.attachments = AutoTranslate.translateAttachments( + message.attachments, + autoTranslateLanguage, + !!message.autoTranslateShowInverse, + ); + } + return message; + }; +}; + +export const createAutoTranslateMessageStreamHandler = (): ((message: ITranslatedMessage) => void) => { + AutoTranslate.init(); + + return (message: ITranslatedMessage): void => { + if (message.u && message.u._id !== Meteor.userId()) { + const subscription = AutoTranslate.findSubscriptionByRid(message.rid); + const language = AutoTranslate.getLanguage(message.rid); + if ( + subscription && + subscription.autoTranslate === true && + message.msg && + (!message.translations || !message.translations[language]) + ) { + // || (message.attachments && !_.find(message.attachments, attachment => { return attachment.translations && attachment.translations[language]; })) + Messages.update({ _id: message._id }, { $set: { autoTranslateFetching: true } }); + } else if (AutoTranslate.messageIdsToWait[message._id] !== undefined && subscription && subscription.autoTranslate !== true) { + Messages.update({ _id: message._id }, { $set: { autoTranslateShowInverse: true }, $unset: { autoTranslateFetching: true } }); + delete AutoTranslate.messageIdsToWait[message._id]; + } else if (message.autoTranslateFetching === true) { + Messages.update({ _id: message._id }, { $unset: { autoTranslateFetching: true } }); + } + } + }; +}; diff --git a/apps/meteor/app/autotranslate/client/lib/tabBar.ts b/apps/meteor/app/autotranslate/client/lib/tabBar.ts new file mode 100644 index 000000000000..fe564c7bd6b0 --- /dev/null +++ b/apps/meteor/app/autotranslate/client/lib/tabBar.ts @@ -0,0 +1,24 @@ +import { lazy, useMemo } from 'react'; +import { useSetting, usePermission } from '@rocket.chat/ui-contexts'; + +import { addAction } from '../../../../client/views/room/lib/Toolbox'; + +addAction('autotranslate', () => { + const hasPermission = usePermission('auto-translate'); + const autoTranslateEnabled = useSetting('AutoTranslate_Enabled'); + return useMemo( + () => + hasPermission && autoTranslateEnabled + ? { + groups: ['channel', 'group', 'direct', 'direct_multiple', 'team'], + id: 'autotranslate', + title: 'Auto_Translate', + icon: 'language', + template: lazy(() => import('../../../../client/views/room/contextualBar/AutoTranslate')), + order: 20, + full: true, + } + : null, + [autoTranslateEnabled, hasPermission], + ); +}); diff --git a/apps/meteor/app/autotranslate/server/autotranslate.ts b/apps/meteor/app/autotranslate/server/autotranslate.ts new file mode 100644 index 000000000000..8566cdd18e4a --- /dev/null +++ b/apps/meteor/app/autotranslate/server/autotranslate.ts @@ -0,0 +1,374 @@ +import { Meteor } from 'meteor/meteor'; +import _ from 'underscore'; +import { escapeHTML } from '@rocket.chat/string-helpers'; +import type { + IMessage, + IRoom, + MessageAttachment, + ISupportedLanguages, + IProviderMetadata, + ISupportedLanguage, + ITranslationResult, +} from '@rocket.chat/core-typings'; + +import { settings } from '../../settings/server'; +import { callbacks } from '../../../lib/callbacks'; +import { Subscriptions, Messages } from '../../models/server'; +import { Markdown } from '../../markdown/server'; +import { Logger } from '../../logger/server'; + +const translationLogger = new Logger('AutoTranslate'); + +const Providers = Symbol('Providers'); +const Provider = Symbol('Provider'); + +/** + * This class allows translation providers to + * register,load and also returns the active provider. + */ +export class TranslationProviderRegistry { + static [Providers]: { [k: string]: AutoTranslate } = {}; + + static enabled = false; + + static [Provider]: string | null = null; + + /** + * Registers the translation provider into the registry. + * @param {*} provider + */ + static registerProvider(provider: AutoTranslate): void { + // get provider information + const metadata = provider._getProviderMetadata(); + if (!metadata) { + translationLogger.error('Provider metadata is not defined'); + return; + } + + TranslationProviderRegistry[Providers][metadata.name] = provider; + } + + /** + * Return the active Translation provider + */ + static getActiveProvider(): AutoTranslate | null { + if (!TranslationProviderRegistry.enabled) { + return null; + } + const provider = TranslationProviderRegistry[Provider]; + if (!provider) { + return null; + } + + return TranslationProviderRegistry[Providers][provider]; + } + + static getSupportedLanguages(target: string): ISupportedLanguage[] | undefined { + return TranslationProviderRegistry.enabled ? TranslationProviderRegistry.getActiveProvider()?.getSupportedLanguages(target) : undefined; + } + + static translateMessage(message: IMessage, room: IRoom, targetLanguage: string): IMessage | undefined { + return TranslationProviderRegistry.enabled + ? TranslationProviderRegistry.getActiveProvider()?.translateMessage(message, room, targetLanguage) + : undefined; + } + + static getProviders(): AutoTranslate[] { + return Object.values(TranslationProviderRegistry[Providers]); + } + + static setCurrentProvider(provider: string): void { + if (provider === TranslationProviderRegistry[Provider]) { + return; + } + + TranslationProviderRegistry[Provider] = provider; + + TranslationProviderRegistry.registerCallbacks(); + } + + static setEnable(enabled: boolean): void { + TranslationProviderRegistry.enabled = enabled; + + TranslationProviderRegistry.registerCallbacks(); + } + + static registerCallbacks(): void { + if (!TranslationProviderRegistry.enabled) { + callbacks.remove('afterSaveMessage', 'autotranslate'); + return; + } + + const provider = TranslationProviderRegistry.getActiveProvider(); + if (!provider) { + return; + } + + callbacks.add('afterSaveMessage', provider.translateMessage.bind(provider), callbacks.priority.MEDIUM, 'autotranslate'); + } +} + +/** + * Generic auto translate base implementation. + * This class provides generic parts of implementation for + * tokenization, detokenization, call back register and unregister. + * @abstract + * @class + */ +export abstract class AutoTranslate { + name: string; + + languages: string[]; + + supportedLanguages: ISupportedLanguages; + + /** + * Encapsulate the api key and provider settings. + * @constructor + */ + constructor() { + this.name = ''; + this.languages = []; + this.supportedLanguages = {}; + } + + /** + * Extracts non-translatable parts of a message + * @param {object} message + * @return {object} message + */ + tokenize(message: IMessage): IMessage { + if (!message.tokens || !Array.isArray(message.tokens)) { + message.tokens = []; + } + message = this.tokenizeEmojis(message); + message = this.tokenizeCode(message); + message = this.tokenizeURLs(message); + message = this.tokenizeMentions(message); + return message; + } + + tokenizeEmojis(message: IMessage): IMessage { + let count = message.tokens?.length || 0; + message.msg = message.msg.replace(/:[+\w\d]+:/g, function (match) { + const token = `{${count++}}`; + message.tokens?.push({ + token, + text: match, + }); + return token; + }); + + return message; + } + + tokenizeURLs(message: IMessage): IMessage { + let count = message.tokens?.length || 0; + + const schemes = settings.get('Markdown_SupportSchemesForLink')?.split(',').join('|'); + + // Support ![alt text](http://image url) and [text](http://link) + message.msg = message.msg.replace( + new RegExp(`(!?\\[)([^\\]]+)(\\]\\((?:${schemes}):\\/\\/[^\\)]+\\))`, 'gm'), + function (_match, pre, text, post) { + const pretoken = `{${count++}}`; + message.tokens?.push({ + token: pretoken, + text: pre, + }); + + const posttoken = `{${count++}}`; + message.tokens?.push({ + token: posttoken, + text: post, + }); + + return pretoken + text + posttoken; + }, + ); + + // Support + message.msg = message.msg.replace( + new RegExp(`((?:<|<)(?:${schemes}):\\/\\/[^\\|]+\\|)(.+?)(?=>|>)((?:>|>))`, 'gm'), + function (_match, pre, text, post) { + const pretoken = `{${count++}}`; + message.tokens?.push({ + token: pretoken, + text: pre, + }); + + const posttoken = `{${count++}}`; + message.tokens?.push({ + token: posttoken, + text: post, + }); + + return pretoken + text + posttoken; + }, + ); + + return message; + } + + tokenizeCode(message: IMessage): IMessage { + let count = message.tokens?.length || 0; + message.html = message.msg; + message = Markdown.parseMessageNotEscaped(message); + + // Some parsers (e. g. Marked) wrap the complete message in a

- this is unnecessary and should be ignored with respect to translations + const regexWrappedParagraph = new RegExp('^\\s*

|

\\s*$', 'gm'); + message.msg = message.msg.replace(regexWrappedParagraph, ''); + + for (const [tokenIndex, value] of message.tokens?.entries() ?? []) { + const { token } = value; + if (token.indexOf('notranslate') === -1) { + const newToken = `{${count++}}`; + message.msg = message.msg.replace(token, newToken); + message.tokens ? (message.tokens[tokenIndex].token = newToken) : undefined; + } + } + + return message; + } + + tokenizeMentions(message: IMessage): IMessage { + let count = message.tokens?.length || 0; + + if (message.mentions && message.mentions.length > 0) { + message.mentions.forEach((mention) => { + message.msg = message.msg.replace(new RegExp(`(@${mention.username})`, 'gm'), (match) => { + const token = `{${count++}}`; + message.tokens?.push({ + token, + text: match, + }); + return token; + }); + }); + } + + if (message.channels && message.channels.length > 0) { + message.channels.forEach((channel) => { + message.msg = message.msg.replace(new RegExp(`(#${channel.name})`, 'gm'), (match) => { + const token = `{${count++}}`; + message.tokens?.push({ + token, + text: match, + }); + return token; + }); + }); + } + + return message; + } + + deTokenize(message: IMessage): string { + if (message.tokens && message.tokens?.length > 0) { + for (const { token, text, noHtml } of message.tokens) { + message.msg = message.msg.replace(token, () => noHtml || text); + } + } + return message.msg; + } + + /** + * Triggers the translation of the prepared (tokenized) message + * and persists the result + * @public + * @param {object} message + * @param {object} room + * @param {object} targetLanguage + * @returns {object} unmodified message object. + */ + translateMessage(message: IMessage, room: IRoom, targetLanguage: string): IMessage { + let targetLanguages: string[]; + if (targetLanguage) { + targetLanguages = [targetLanguage]; + } else { + targetLanguages = Subscriptions.getAutoTranslateLanguagesByRoomAndNotUser(room._id, message.u?._id); + } + if (message.msg) { + Meteor.defer(() => { + let targetMessage = Object.assign({}, message); + targetMessage.html = escapeHTML(String(targetMessage.msg)); + targetMessage = this.tokenize(targetMessage); + + const translations = this._translateMessage(targetMessage, targetLanguages); + if (!_.isEmpty(translations)) { + Messages.addTranslations(message._id, translations, TranslationProviderRegistry[Provider]); + } + }); + } + + if (message.attachments && message.attachments.length > 0) { + Meteor.defer(() => { + for (const [index, attachment] of message.attachments?.entries() ?? []) { + if (attachment.description || attachment.text) { + const translations = this._translateAttachmentDescriptions(attachment, targetLanguages); + if (!_.isEmpty(translations)) { + Messages.addAttachmentTranslations(message._id, index, translations); + Messages.addTranslations(message._id, translations, TranslationProviderRegistry[Provider]); + } + } + } + }); + } + return Messages.findOneById(message._id); + } + + /** + * Returns metadata information about the service provider which is used by + * the generic implementation + * @abstract + * @protected + * @returns { name, displayName, settings } + }; + */ + abstract _getProviderMetadata(): IProviderMetadata; + + /** + * Provides the possible languages _from_ which a message can be translated into a target language + * @abstract + * @protected + * @param {string} target - the language into which shall be translated + * @returns [{ language, name }] + */ + abstract getSupportedLanguages(target: string): ISupportedLanguage[]; + + /** + * Performs the actual translation of a message, + * usually by sending a REST API call to the service provider. + * @abstract + * @protected + * @param {object} message + * @param {object} targetLanguages + * @return {object} + */ + abstract _translateMessage(message: IMessage, targetLanguages: string[]): ITranslationResult; + + /** + * Performs the actual translation of an attachment (precisely its description), + * usually by sending a REST API call to the service provider. + * @abstract + * @param {object} attachment + * @param {object} targetLanguages + * @returns {object} translated messages for each target language + */ + abstract _translateAttachmentDescriptions(attachment: MessageAttachment, targetLanguages: string[]): ITranslationResult; +} + +Meteor.startup(() => { + /** Register the active service provider on the 'AfterSaveMessage' callback. + * So the registered provider will be invoked when a message is saved. + * All the other inactive service provider must be deactivated. + */ + settings.watch('AutoTranslate_ServiceProvider', (providerName) => { + TranslationProviderRegistry.setCurrentProvider(providerName); + }); + + // Get Auto Translate Active flag + settings.watch('AutoTranslate_Enabled', (value) => { + TranslationProviderRegistry.setEnable(value); + }); +}); diff --git a/apps/meteor/app/autotranslate/server/deeplTranslate.ts b/apps/meteor/app/autotranslate/server/deeplTranslate.ts new file mode 100644 index 000000000000..28793811505e --- /dev/null +++ b/apps/meteor/app/autotranslate/server/deeplTranslate.ts @@ -0,0 +1,284 @@ +/** + * @author Vigneshwaran Odayappan + */ + +import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; +import { HTTP } from 'meteor/http'; +import _ from 'underscore'; +import type { + IMessage, + IDeepLTranslation, + MessageAttachment, + IProviderMetadata, + ITranslationResult, + ISupportedLanguage, +} from '@rocket.chat/core-typings'; + +import { TranslationProviderRegistry, AutoTranslate } from './autotranslate'; +import { SystemLogger } from '../../../server/lib/logger/system'; +import { settings } from '../../settings/server'; + +/** + * DeepL translation service provider class representation. + * Encapsulates the service provider settings and information. + * Provides languages supported by the service provider. + * Resolves API call to service provider to resolve the translation request. + * @class + * @augments AutoTranslate + */ +class DeeplAutoTranslate extends AutoTranslate { + apiKey: string; + + apiEndPointUrl: string; + + /** + * setup api reference to deepl translate to be used as message translation provider. + * @constructor + */ + constructor() { + super(); + this.name = 'deepl-translate'; + this.apiEndPointUrl = 'https://api.deepl.com/v2/translate'; + // Get the service provide API key. + settings.watch('AutoTranslate_DeepLAPIKey', (value) => { + this.apiKey = value; + }); + } + + /** + * Returns metadata information about the service provide + * @private implements super abstract method. + * @return {object} + */ + _getProviderMetadata(): IProviderMetadata { + return { + name: this.name, + displayName: TAPi18n.__('AutoTranslate_DeepL'), + settings: this._getSettings(), + }; + } + + /** + * Returns necessary settings information about the translation service provider. + * @private implements super abstract method. + * @return {object} + */ + _getSettings(): IProviderMetadata['settings'] { + return { + apiKey: this.apiKey, + apiEndPointUrl: this.apiEndPointUrl, + }; + } + + /** + * Returns supported languages for translation by the active service provider. + * Deepl does not provide an endpoint yet to retrieve the supported languages. + * So each supported languages are explicitly maintained. + * @private implements super abstract method. + * @param {string} target + * @returns {object} code : value pair + */ + getSupportedLanguages(target: string): ISupportedLanguage[] { + if (!this.apiKey) { + return []; + } + + if (this.supportedLanguages[target]) { + return this.supportedLanguages[target]; + } + this.supportedLanguages[target] = [ + { + language: 'bg', + name: TAPi18n.__('Language_Bulgarian', { lng: target }), + }, + { + language: 'cs', + name: TAPi18n.__('Language_Czech', { lng: target }), + }, + { + language: 'da', + name: TAPi18n.__('Language_Danish', { lng: target }), + }, + { + language: 'de', + name: TAPi18n.__('Language_German', { lng: target }), + }, + { + language: 'el', + name: TAPi18n.__('Language_Greek', { lng: target }), + }, + { + language: 'en', + name: TAPi18n.__('Language_English', { lng: target }), + }, + { + language: 'es', + name: TAPi18n.__('Language_Spanish', { lng: target }), + }, + { + language: 'et', + name: TAPi18n.__('Language_Estonian', { lng: target }), + }, + { + language: 'fi', + name: TAPi18n.__('Language_Finnish', { lng: target }), + }, + { + language: 'fr', + name: TAPi18n.__('Language_French', { lng: target }), + }, + { + language: 'hu', + name: TAPi18n.__('Language_Hungarian', { lng: target }), + }, + { + language: 'it', + name: TAPi18n.__('Language_Italian', { lng: target }), + }, + { + language: 'ja', + name: TAPi18n.__('Language_Japanese', { lng: target }), + }, + { + language: 'lt', + name: TAPi18n.__('Language_Lithuanian', { lng: target }), + }, + { + language: 'lv', + name: TAPi18n.__('Language_Latvian', { lng: target }), + }, + { + language: 'nl', + name: TAPi18n.__('Language_Dutch', { lng: target }), + }, + { + language: 'pl', + name: TAPi18n.__('Language_Polish', { lng: target }), + }, + { + language: 'pt', + name: TAPi18n.__('Language_Portuguese', { lng: target }), + }, + { + language: 'ro', + name: TAPi18n.__('Language_Romanian', { lng: target }), + }, + { + language: 'ru', + name: TAPi18n.__('Language_Russian', { lng: target }), + }, + { + language: 'sk', + name: TAPi18n.__('Language_Slovak', { lng: target }), + }, + { + language: 'sl', + name: TAPi18n.__('Language_Slovenian', { lng: target }), + }, + { + language: 'sv', + name: TAPi18n.__('Language_Swedish', { lng: target }), + }, + { + language: 'zh', + name: TAPi18n.__('Language_Chinese', { lng: target }), + }, + ]; + + return this.supportedLanguages[target]; + } + + /** + * Send Request REST API call to the service provider. + * Returns translated message for each target language in target languages. + * @private + * @param {object} message + * @param {object} targetLanguages + * @returns {object} translations: Translated messages for each language + */ + _translateMessage(message: IMessage, targetLanguages: string[]): ITranslationResult { + const translations: { [k: string]: string } = {}; + let msgs = message.msg.split('\n'); + msgs = msgs.map((msg) => encodeURIComponent(msg)); + const query = `text=${msgs.join('&text=')}`; + const supportedLanguages = this.getSupportedLanguages('en'); + targetLanguages.forEach((language) => { + if (language.indexOf('-') !== -1 && !_.findWhere(supportedLanguages, { language })) { + language = language.substr(0, 2); + } + try { + const result = HTTP.get(this.apiEndPointUrl, { + params: { + auth_key: this.apiKey, + target_lang: language, + }, + query, + }); + + if ( + result.statusCode === 200 && + result.data && + result.data.translations && + Array.isArray(result.data.translations) && + result.data.translations.length > 0 + ) { + // store translation only when the source and target language are different. + // multiple lines might contain different languages => Mix the text between source and detected target if neccessary + const translatedText = result.data.translations + .map((translation: IDeepLTranslation, index: number) => + translation.detected_source_language !== language ? translation.text : msgs[index], + ) + .join('\n'); + translations[language] = this.deTokenize(Object.assign({}, message, { msg: translatedText })); + } + } catch (e) { + SystemLogger.error('Error translating message', e); + } + }); + return translations; + } + + /** + * Returns translated message attachment description in target languages. + * @private + * @param {object} attachment + * @param {object} targetLanguages + * @returns {object} translated messages for each target language + */ + _translateAttachmentDescriptions(attachment: MessageAttachment, targetLanguages: string[]): ITranslationResult { + const translations: { [k: string]: string } = {}; + const query = `text=${encodeURIComponent(attachment.description || attachment.text || '')}`; + const supportedLanguages = this.getSupportedLanguages('en'); + targetLanguages.forEach((language) => { + if (language.indexOf('-') !== -1 && !_.findWhere(supportedLanguages, { language })) { + language = language.substr(0, 2); + } + try { + const result = HTTP.get(this.apiEndPointUrl, { + params: { + auth_key: this.apiKey, + target_lang: language, + }, + query, + }); + if ( + result.statusCode === 200 && + result.data && + result.data.translations && + Array.isArray(result.data.translations) && + result.data.translations.length > 0 + ) { + if (result.data.translations.map((translation: IDeepLTranslation) => translation.detected_source_language).join() !== language) { + translations[language] = result.data.translations.map((translation: IDeepLTranslation) => translation.text); + } + } + } catch (e) { + SystemLogger.error('Error translating message attachment', e); + } + }); + return translations; + } +} + +// Register DeepL translation provider to the registry. +TranslationProviderRegistry.registerProvider(new DeeplAutoTranslate()); diff --git a/apps/meteor/app/autotranslate/server/googleTranslate.ts b/apps/meteor/app/autotranslate/server/googleTranslate.ts new file mode 100644 index 000000000000..5ce253f80af9 --- /dev/null +++ b/apps/meteor/app/autotranslate/server/googleTranslate.ts @@ -0,0 +1,218 @@ +/** + * @author Vigneshwaran Odayappan + */ + +import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; +import { HTTP } from 'meteor/http'; +import _ from 'underscore'; +import type { + IMessage, + IProviderMetadata, + ISupportedLanguage, + ITranslationResult, + IGoogleTranslation, + MessageAttachment, +} from '@rocket.chat/core-typings'; + +import { AutoTranslate, TranslationProviderRegistry } from './autotranslate'; +import { SystemLogger } from '../../../server/lib/logger/system'; +import { settings } from '../../settings/server'; + +/** + * Represents google translate class + * @class + * @augments AutoTranslate + */ + +class GoogleAutoTranslate extends AutoTranslate { + apiKey: string; + + apiEndPointUrl: string; + + /** + * setup api reference to Google translate to be used as message translation provider. + * @constructor + */ + constructor() { + super(); + this.name = 'google-translate'; + this.apiEndPointUrl = 'https://translation.googleapis.com/language/translate/v2'; + // Get the service provide API key. + settings.watch('AutoTranslate_GoogleAPIKey', (value) => { + this.apiKey = value; + }); + } + + /** + * Returns metadata information about the service provider + * @private implements super abstract method. + * @returns {object} + */ + _getProviderMetadata(): IProviderMetadata { + return { + name: this.name, + displayName: TAPi18n.__('AutoTranslate_Google'), + settings: this._getSettings(), + }; + } + + /** + * Returns necessary settings information about the translation service provider. + * @private implements super abstract method. + * @returns {object} + */ + _getSettings(): IProviderMetadata['settings'] { + return { + apiKey: this.apiKey, + apiEndPointUrl: this.apiEndPointUrl, + }; + } + + /** + * Returns supported languages for translation by the active service provider. + * Google Translate api provides the list of supported languages. + * @private implements super abstract method. + * @param {string} target : user language setting or 'en' + * @returns {object} code : value pair + */ + getSupportedLanguages(target: string): ISupportedLanguage[] { + if (!this.apiKey) { + return []; + } + + if (this.supportedLanguages[target]) { + return this.supportedLanguages[target]; + } + + let result; + const params = { + key: this.apiKey, + ...(target && { target }), + }; + + try { + result = HTTP.get('https://translation.googleapis.com/language/translate/v2/languages', { + params, + }); + } catch (e: any) { + // Fallback: Get the English names of the target languages + if ( + e.response && + e.response.statusCode === 400 && + e.response.data && + e.response.data.error && + e.response.data.error.status === 'INVALID_ARGUMENT' + ) { + params.target = 'en'; + target = 'en'; + if (!this.supportedLanguages[target]) { + result = HTTP.get('https://translation.googleapis.com/language/translate/v2/languages', { + params, + }); + } + } + } + + if (this.supportedLanguages[target]) { + return this.supportedLanguages[target]; + } + this.supportedLanguages[target || 'en'] = result?.data?.data?.languages; + return this.supportedLanguages[target || 'en']; + } + + /** + * Send Request REST API call to the service provider. + * Returns translated message for each target language in target languages. + * @private + * @param {object} message + * @param {object} targetLanguages + * @returns {object} translations: Translated messages for each language + */ + _translateMessage(message: IMessage, targetLanguages: string[]): ITranslationResult { + const translations: { [k: string]: string } = {}; + let msgs = message.msg.split('\n'); + msgs = msgs.map((msg) => encodeURIComponent(msg)); + + const query = `q=${msgs.join('&q=')}`; + const supportedLanguages = this.getSupportedLanguages('en'); + + targetLanguages.forEach((language) => { + if (language.indexOf('-') !== -1 && !_.findWhere(supportedLanguages, { language })) { + language = language.substr(0, 2); + } + + try { + const result = HTTP.get(this.apiEndPointUrl, { + params: { + key: this.apiKey, + target: language, + }, + query, + }); + + if ( + result.statusCode === 200 && + result.data && + result.data.data && + result.data.data.translations && + Array.isArray(result.data.data.translations) && + result.data.data.translations.length > 0 + ) { + const txt = result.data.data.translations.map((translation: IGoogleTranslation) => translation.translatedText).join('\n'); + translations[language] = this.deTokenize(Object.assign({}, message, { msg: txt })); + } + } catch (e) { + SystemLogger.error('Error translating message', e); + } + }); + return translations; + } + + /** + * Returns translated message attachment description in target languages. + * @private + * @param {object} attachment + * @param {object} targetLanguages + * @returns {object} translated attachment descriptions for each target language + */ + _translateAttachmentDescriptions(attachment: MessageAttachment, targetLanguages: string[]): ITranslationResult { + const translations: { [k: string]: string } = {}; + const query = `q=${encodeURIComponent(attachment.description || attachment.text || '')}`; + const supportedLanguages = this.getSupportedLanguages('en'); + + targetLanguages.forEach((language) => { + if (language.indexOf('-') !== -1 && !_.findWhere(supportedLanguages, { language })) { + language = language.substr(0, 2); + } + + try { + const result = HTTP.get(this.apiEndPointUrl, { + params: { + key: this.apiKey, + target: language, + }, + query, + }); + + if ( + result.statusCode === 200 && + result.data && + result.data.data && + result.data.data.translations && + Array.isArray(result.data.data.translations) && + result.data.data.translations.length > 0 + ) { + translations[language] = result.data.data.translations + .map((translation: IGoogleTranslation) => translation.translatedText) + .join('\n'); + } + } catch (e) { + SystemLogger.error('Error translating message', e); + } + }); + return translations; + } +} + +// Register Google translation provider. +TranslationProviderRegistry.registerProvider(new GoogleAutoTranslate()); diff --git a/apps/meteor/app/autotranslate/server/index.ts b/apps/meteor/app/autotranslate/server/index.ts new file mode 100644 index 000000000000..ea971fe59ab1 --- /dev/null +++ b/apps/meteor/app/autotranslate/server/index.ts @@ -0,0 +1,19 @@ +/* eslint-disable import/no-duplicates */ +/** + * This file contains the exported members of the package shall be re-used. + * @module AutoTranslate, TranslationProviderRegistry + */ + +import { AutoTranslate, TranslationProviderRegistry } from './autotranslate'; +import './settings'; +import './permissions'; +import './autotranslate'; +import './methods/getSupportedLanguages'; +import './methods/saveSettings'; +import './methods/translateMessage'; +import './googleTranslate'; +import './deeplTranslate'; +import './msTranslate'; +import './methods/getProviderUiMetadata'; + +export { AutoTranslate, TranslationProviderRegistry }; diff --git a/app/autotranslate/server/logger.js b/apps/meteor/app/autotranslate/server/logger.ts similarity index 100% rename from app/autotranslate/server/logger.js rename to apps/meteor/app/autotranslate/server/logger.ts diff --git a/app/autotranslate/server/methods/getProviderUiMetadata.js b/apps/meteor/app/autotranslate/server/methods/getProviderUiMetadata.ts similarity index 100% rename from app/autotranslate/server/methods/getProviderUiMetadata.js rename to apps/meteor/app/autotranslate/server/methods/getProviderUiMetadata.ts diff --git a/apps/meteor/app/autotranslate/server/methods/getSupportedLanguages.ts b/apps/meteor/app/autotranslate/server/methods/getSupportedLanguages.ts new file mode 100644 index 000000000000..79d4b9076724 --- /dev/null +++ b/apps/meteor/app/autotranslate/server/methods/getSupportedLanguages.ts @@ -0,0 +1,41 @@ +import { Meteor } from 'meteor/meteor'; +import { DDPRateLimiter } from 'meteor/ddp-rate-limiter'; + +import { hasPermission } from '../../../authorization/server'; +import { TranslationProviderRegistry } from '..'; +import { settings } from '../../../settings/server'; + +Meteor.methods({ + 'autoTranslate.getSupportedLanguages'(targetLanguage) { + if (!settings.get('AutoTranslate_Enabled')) { + throw new Meteor.Error('error-autotranslate-disabled', 'Auto-Translate is disabled'); + } + + const userId = Meteor.userId(); + if (!userId) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', { + method: 'getSupportedLanguages', + }); + } + + if (!hasPermission(userId, 'auto-translate')) { + throw new Meteor.Error('error-action-not-allowed', 'Auto-Translate is not allowed', { + method: 'autoTranslate.saveSettings', + }); + } + + return TranslationProviderRegistry.getSupportedLanguages(targetLanguage); + }, +}); + +DDPRateLimiter.addRule( + { + type: 'method', + name: 'autoTranslate.getSupportedLanguages', + userId(/* userId*/) { + return true; + }, + }, + 5, + 60000, +); diff --git a/apps/meteor/app/autotranslate/server/methods/saveSettings.ts b/apps/meteor/app/autotranslate/server/methods/saveSettings.ts new file mode 100644 index 000000000000..601a1273af82 --- /dev/null +++ b/apps/meteor/app/autotranslate/server/methods/saveSettings.ts @@ -0,0 +1,53 @@ +import { Meteor } from 'meteor/meteor'; +import { check } from 'meteor/check'; + +import { hasPermission } from '../../../authorization/server'; +import { Subscriptions } from '../../../models/server'; + +Meteor.methods({ + 'autoTranslate.saveSettings'(rid, field, value, options) { + const userId = Meteor.userId(); + if (!userId) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', { + method: 'saveAutoTranslateSettings', + }); + } + + if (!hasPermission(userId, 'auto-translate')) { + throw new Meteor.Error('error-action-not-allowed', 'Auto-Translate is not allowed', { + method: 'autoTranslate.saveSettings', + }); + } + + check(rid, String); + check(field, String); + check(value, String); + + if (['autoTranslate', 'autoTranslateLanguage'].indexOf(field) === -1) { + throw new Meteor.Error('error-invalid-settings', 'Invalid settings field', { + method: 'saveAutoTranslateSettings', + }); + } + + const subscription = Subscriptions.findOneByRoomIdAndUserId(rid, userId); + if (!subscription) { + throw new Meteor.Error('error-invalid-subscription', 'Invalid subscription', { + method: 'saveAutoTranslateSettings', + }); + } + + switch (field) { + case 'autoTranslate': + Subscriptions.updateAutoTranslateById(subscription._id, value === '1'); + if (!subscription.autoTranslateLanguage && options.defaultLanguage) { + Subscriptions.updateAutoTranslateLanguageById(subscription._id, options.defaultLanguage); + } + break; + case 'autoTranslateLanguage': + Subscriptions.updateAutoTranslateLanguageById(subscription._id, value); + break; + } + + return true; + }, +}); diff --git a/apps/meteor/app/autotranslate/server/methods/translateMessage.ts b/apps/meteor/app/autotranslate/server/methods/translateMessage.ts new file mode 100644 index 000000000000..8e41604849bf --- /dev/null +++ b/apps/meteor/app/autotranslate/server/methods/translateMessage.ts @@ -0,0 +1,16 @@ +import { Meteor } from 'meteor/meteor'; + +import { Rooms } from '../../../models/server'; +import { TranslationProviderRegistry } from '..'; + +Meteor.methods({ + 'autoTranslate.translateMessage'(message, targetLanguage) { + if (!TranslationProviderRegistry.enabled) { + return; + } + const room = Rooms.findOneById(message?.rid); + if (message && room) { + TranslationProviderRegistry.translateMessage(message, room, targetLanguage); + } + }, +}); diff --git a/apps/meteor/app/autotranslate/server/msTranslate.ts b/apps/meteor/app/autotranslate/server/msTranslate.ts new file mode 100644 index 000000000000..46b3de381432 --- /dev/null +++ b/apps/meteor/app/autotranslate/server/msTranslate.ts @@ -0,0 +1,192 @@ +/** + * @author Vigneshwaran Odayappan + */ + +import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; +import { HTTP } from 'meteor/http'; +import _ from 'underscore'; +import type { IMessage, IProviderMetadata, ISupportedLanguage, ITranslationResult, MessageAttachment } from '@rocket.chat/core-typings'; + +import { TranslationProviderRegistry, AutoTranslate } from './autotranslate'; +import { msLogger } from './logger'; +import { settings } from '../../settings/server'; + +/** + * Microsoft translation service provider class representation. + * Encapsulates the service provider settings and information. + * Provides languages supported by the service provider. + * Resolves API call to service provider to resolve the translation request. + * @class + * @augments AutoTranslate + */ +class MsAutoTranslate extends AutoTranslate { + apiKey: string; + + apiEndPointUrl: string; + + apiDetectText: string; + + apiGetLanguages: string; + + breakSentence: string; + + /** + * setup api reference to Microsoft translate to be used as message translation provider. + * @constructor + */ + constructor() { + super(); + this.name = 'microsoft-translate'; + this.apiEndPointUrl = 'https://api.cognitive.microsofttranslator.com/translate?api-version=3.0'; + this.apiDetectText = 'https://api.cognitive.microsofttranslator.com/detect?api-version=3.0'; + this.apiGetLanguages = 'https://api.cognitive.microsofttranslator.com/languages?api-version=3.0'; + this.breakSentence = 'https://api.cognitive.microsofttranslator.com/breaksentence?api-version=3.0'; + // Get the service provide API key. + settings.watch('AutoTranslate_MicrosoftAPIKey', (value) => { + this.apiKey = value; + }); + } + + /** + * Returns metadata information about the service provide + * @private implements super abstract method. + * @return {object} + */ + _getProviderMetadata(): IProviderMetadata { + return { + name: this.name, + displayName: TAPi18n.__('AutoTranslate_Microsoft'), + settings: this._getSettings(), + }; + } + + /** + * Returns necessary settings information about the translation service provider. + * @private implements super abstract method. + * @return {object} + */ + _getSettings(): IProviderMetadata['settings'] { + return { + apiKey: this.apiKey, + apiEndPointUrl: this.apiEndPointUrl, + }; + } + + /** + * Returns supported languages for translation by the active service provider. + * Microsoft does not provide an endpoint yet to retrieve the supported languages. + * So each supported languages are explicitly maintained. + * @private implements super abstract method. + * @param {string} target + * @returns {object} code : value pair + */ + getSupportedLanguages(target: string): ISupportedLanguage[] { + if (!this.apiKey) { + return []; + } + if (this.supportedLanguages[target]) { + return this.supportedLanguages[target]; + } + const languages = HTTP.get(this.apiGetLanguages); + this.supportedLanguages[target] = Object.keys(languages.data.translation).map((language) => ({ + language, + name: languages.data.translation[language].name, + })); + return this.supportedLanguages[target || 'en']; + } + + /** + * Re-use method for REST API consumption of MS translate. + * @private + * @param {object} message + * @param {object} targetLanguages + * @throws Communication Errors + * @returns {object} translations: Translated messages for each language + */ + _translate( + data: { + Text: string; + }[], + targetLanguages: string[], + ): ITranslationResult { + let translations: { [k: string]: string } = {}; + const supportedLanguages = this.getSupportedLanguages('en'); + targetLanguages = targetLanguages.map((language) => { + if (language.indexOf('-') !== -1 && !_.findWhere(supportedLanguages, { language })) { + language = language.substr(0, 2); + } + return language; + }); + const url = `${this.apiEndPointUrl}&to=${targetLanguages.join('&to=')}`; + const result = HTTP.post(url, { + headers: { + 'Ocp-Apim-Subscription-Key': this.apiKey, + 'Content-Type': 'application/json; charset=UTF-8', + }, + data, + }); + + if (result.statusCode === 200 && result.data && result.data.length > 0) { + // store translation only when the source and target language are different. + translations = Object.assign( + {}, + ...targetLanguages.map((language) => ({ + [language]: result.data + .map( + (line: { translations: { to: string; text: string }[] }) => + line.translations.find((translation) => translation.to === language)?.text, + ) + .join('\n'), + })), + ); + } + + return translations; + } + + /** + * Returns translated message for each target language. + * @private + * @param {object} message + * @param {object} targetLanguages + * @returns {object} translations: Translated messages for each language + */ + _translateMessage(message: IMessage, targetLanguages: string[]): ITranslationResult { + // There are multi-sentence-messages where multiple sentences come from different languages + // This is a problem for translation services since the language detection fails. + // Thus, we'll split the message in sentences, get them translated, and join them again after translation + const msgs = message.msg.split('\n').map((msg) => ({ Text: msg })); + try { + return this._translate(msgs, targetLanguages); + } catch (e) { + msLogger.error({ err: e, msg: 'Error translating message' }); + } + return {}; + } + + /** + * Returns translated message attachment description in target languages. + * @private + * @param {object} attachment + * @param {object} targetLanguages + * @returns {object} translated messages for each target language + */ + _translateAttachmentDescriptions(attachment: MessageAttachment, targetLanguages: string[]): ITranslationResult { + try { + return this._translate( + [ + { + Text: attachment.description || attachment.text || '', + }, + ], + targetLanguages, + ); + } catch (e) { + msLogger.error({ err: e, msg: 'Error translating message attachment' }); + } + return {}; + } +} + +// Register Microsoft translation provider to the registry. +TranslationProviderRegistry.registerProvider(new MsAutoTranslate()); diff --git a/apps/meteor/app/autotranslate/server/permissions.ts b/apps/meteor/app/autotranslate/server/permissions.ts new file mode 100644 index 000000000000..f75edf705c24 --- /dev/null +++ b/apps/meteor/app/autotranslate/server/permissions.ts @@ -0,0 +1,8 @@ +import { Meteor } from 'meteor/meteor'; +import { Permissions } from '@rocket.chat/models'; + +Meteor.startup(async () => { + if (!(await Permissions.findOne({ _id: 'auto-translate' }))) { + Permissions.create('auto-translate', ['admin']); + } +}); diff --git a/app/autotranslate/server/settings.ts b/apps/meteor/app/autotranslate/server/settings.ts similarity index 100% rename from app/autotranslate/server/settings.ts rename to apps/meteor/app/autotranslate/server/settings.ts diff --git a/app/bot-helpers/README.md b/apps/meteor/app/bot-helpers/README.md similarity index 100% rename from app/bot-helpers/README.md rename to apps/meteor/app/bot-helpers/README.md diff --git a/apps/meteor/app/bot-helpers/server/index.js b/apps/meteor/app/bot-helpers/server/index.js new file mode 100644 index 000000000000..0d6a0b68e889 --- /dev/null +++ b/apps/meteor/app/bot-helpers/server/index.js @@ -0,0 +1,170 @@ +import './settings'; +import { Meteor } from 'meteor/meteor'; +import _ from 'underscore'; + +import { Users, Rooms } from '../../models/server'; +import { settings } from '../../settings/server'; +import { hasRole } from '../../authorization/server'; + +/** + * BotHelpers helps bots + * "private" properties use meteor collection cursors, so they stay reactive + * "public" properties use getters to fetch and filter collections as array + */ +class BotHelpers { + constructor() { + this.queries = { + online: { status: { $ne: 'offline' } }, + users: { roles: { $not: { $all: ['bot'] } } }, + }; + } + + // setup collection cursors with array of fields from setting + setupCursors(fieldsSetting) { + this.userFields = {}; + if (typeof fieldsSetting === 'string') { + fieldsSetting = fieldsSetting.split(','); + } + fieldsSetting.forEach((n) => { + this.userFields[n.trim()] = 1; + }); + this._allUsers = Users.find(this.queries.users, { fields: this.userFields }); + this._onlineUsers = Users.find({ $and: [this.queries.users, this.queries.online] }, { fields: this.userFields }); + } + + // request methods or props as arguments to Meteor.call + request(prop, ...params) { + if (typeof this[prop] === 'undefined') { + return null; + } + if (typeof this[prop] === 'function') { + return this[prop](...params); + } + return this[prop]; + } + + addUserToRole(userName, roleId) { + Meteor.call('authorization:addUserToRole', roleId, userName); + } + + removeUserFromRole(userName, roleId) { + Meteor.call('authorization:removeUserFromRole', roleId, userName); + } + + addUserToRoom(userName, room) { + const foundRoom = Rooms.findOneByIdOrName(room); + + if (!_.isObject(foundRoom)) { + throw new Meteor.Error('invalid-channel'); + } + + const data = {}; + data.rid = foundRoom._id; + data.username = userName; + Meteor.call('addUserToRoom', data); + } + + removeUserFromRoom(userName, room) { + const foundRoom = Rooms.findOneByIdOrName(room); + + if (!_.isObject(foundRoom)) { + throw new Meteor.Error('invalid-channel'); + } + const data = {}; + data.rid = foundRoom._id; + data.username = userName; + Meteor.call('removeUserFromRoom', data); + } + + // generic error whenever property access insufficient to fill request + requestError() { + throw new Meteor.Error('error-not-allowed', 'Bot request not allowed', { + method: 'botRequest', + action: 'bot_request', + }); + } + + // "public" properties accessed by getters + // allUsers / onlineUsers return whichever properties are enabled by settings + get allUsers() { + if (!Object.keys(this.userFields).length) { + this.requestError(); + return false; + } + return this._allUsers.fetch(); + } + + get onlineUsers() { + if (!Object.keys(this.userFields).length) { + this.requestError(); + return false; + } + return this._onlineUsers.fetch(); + } + + get allUsernames() { + if (!this.userFields.hasOwnProperty('username')) { + this.requestError(); + return false; + } + return this._allUsers.fetch().map((user) => user.username); + } + + get onlineUsernames() { + if (!this.userFields.hasOwnProperty('username')) { + this.requestError(); + return false; + } + return this._onlineUsers.fetch().map((user) => user.username); + } + + get allNames() { + if (!this.userFields.hasOwnProperty('name')) { + this.requestError(); + return false; + } + return this._allUsers.fetch().map((user) => user.name); + } + + get onlineNames() { + if (!this.userFields.hasOwnProperty('name')) { + this.requestError(); + return false; + } + return this._onlineUsers.fetch().map((user) => user.name); + } + + get allIDs() { + if (!this.userFields.hasOwnProperty('_id') || !this.userFields.hasOwnProperty('username')) { + this.requestError(); + return false; + } + return this._allUsers.fetch().map((user) => ({ id: user._id, name: user.username })); + } + + get onlineIDs() { + if (!this.userFields.hasOwnProperty('_id') || !this.userFields.hasOwnProperty('username')) { + this.requestError(); + return false; + } + return this._onlineUsers.fetch().map((user) => ({ id: user._id, name: user.username })); + } +} + +// add class to meteor methods +const botHelpers = new BotHelpers(); + +// init cursors with fields setting and update on setting change +settings.watch('BotHelpers_userFields', function (settingValue) { + botHelpers.setupCursors(settingValue); +}); + +Meteor.methods({ + botRequest: (...args) => { + const userID = Meteor.userId(); + if (userID && hasRole(userID, 'bot')) { + return botHelpers.request(...args); + } + throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'botRequest' }); + }, +}); diff --git a/app/bot-helpers/server/settings.ts b/apps/meteor/app/bot-helpers/server/settings.ts similarity index 100% rename from app/bot-helpers/server/settings.ts rename to apps/meteor/app/bot-helpers/server/settings.ts diff --git a/app/cas/client/cas_client.js b/apps/meteor/app/cas/client/cas_client.js similarity index 100% rename from app/cas/client/cas_client.js rename to apps/meteor/app/cas/client/cas_client.js diff --git a/app/cas/client/index.js b/apps/meteor/app/cas/client/index.js similarity index 100% rename from app/cas/client/index.js rename to apps/meteor/app/cas/client/index.js diff --git a/app/cas/server/cas_rocketchat.js b/apps/meteor/app/cas/server/cas_rocketchat.js similarity index 94% rename from app/cas/server/cas_rocketchat.js rename to apps/meteor/app/cas/server/cas_rocketchat.js index e499a798d88f..9b3655a66677 100644 --- a/app/cas/server/cas_rocketchat.js +++ b/apps/meteor/app/cas/server/cas_rocketchat.js @@ -36,8 +36,8 @@ Meteor.startup(function () { }); this.section('CAS_Login_Layout', function () { - this.add('CAS_popup_width', '810', { type: 'int', group: 'CAS', public: true }); - this.add('CAS_popup_height', '610', { type: 'int', group: 'CAS', public: true }); + this.add('CAS_popup_width', 810, { type: 'int', group: 'CAS', public: true }); + this.add('CAS_popup_height', 610, { type: 'int', group: 'CAS', public: true }); this.add('CAS_button_label_text', 'CAS', { type: 'string', group: 'CAS' }); this.add('CAS_button_label_color', '#FFFFFF', { type: 'color', group: 'CAS' }); this.add('CAS_button_color', '#1d74f5', { type: 'color', group: 'CAS' }); diff --git a/app/cas/server/cas_server.js b/apps/meteor/app/cas/server/cas_server.js similarity index 96% rename from app/cas/server/cas_server.js rename to apps/meteor/app/cas/server/cas_server.js index 53d64b1e34a9..cf0a273c4fcc 100644 --- a/app/cas/server/cas_server.js +++ b/apps/meteor/app/cas/server/cas_server.js @@ -6,12 +6,12 @@ import { WebApp } from 'meteor/webapp'; import { RoutePolicy } from 'meteor/routepolicy'; import _ from 'underscore'; import fiber from 'fibers'; -import CAS from 'cas'; +import { CredentialTokens } from '@rocket.chat/models'; +import { validate } from '@rocket.chat/cas-validate'; import { logger } from './cas_rocketchat'; -import { settings } from '../../settings'; +import { settings } from '../../settings/server'; import { Rooms } from '../../models/server'; -import { CredentialTokens } from '../../models/server/raw'; import { _setRealName } from '../../lib'; import { createRoom } from '../../lib/server/functions/createRoom'; @@ -38,13 +38,12 @@ const casTicket = function (req, token, callback) { const appUrl = Meteor.absoluteUrl().replace(/\/$/, '') + __meteor_runtime_config__.ROOT_URL_PATH_PREFIX; logger.debug(`Using CAS_base_url: ${baseUrl}`); - const cas = new CAS({ - base_url: baseUrl, - version: cas_version, - service: `${appUrl}/_cas/${token}`, - }); - - cas.validate( + validate( + { + base_url: baseUrl, + version: cas_version, + service: `${appUrl}/_cas/${token}`, + }, ticketId, Meteor.bindEnvironment(async function (err, status, username, details) { if (err) { @@ -113,7 +112,7 @@ WebApp.connectHandlers.use(function (req, res, next) { * It is call after Accounts.callLoginMethod() is call from client. * */ -Accounts.registerLoginHandler(function (options) { +Accounts.registerLoginHandler('cas', function (options) { if (!options.cas) { return undefined; } diff --git a/app/cas/server/index.js b/apps/meteor/app/cas/server/index.js similarity index 100% rename from app/cas/server/index.js rename to apps/meteor/app/cas/server/index.js diff --git a/app/channel-settings/client/index.js b/apps/meteor/app/channel-settings/client/index.js similarity index 100% rename from app/channel-settings/client/index.js rename to apps/meteor/app/channel-settings/client/index.js diff --git a/app/channel-settings/client/lib/ChannelSettings.js b/apps/meteor/app/channel-settings/client/lib/ChannelSettings.js similarity index 100% rename from app/channel-settings/client/lib/ChannelSettings.js rename to apps/meteor/app/channel-settings/client/lib/ChannelSettings.js diff --git a/apps/meteor/app/channel-settings/client/tabBar.ts b/apps/meteor/app/channel-settings/client/tabBar.ts new file mode 100644 index 000000000000..ffb431ec39b4 --- /dev/null +++ b/apps/meteor/app/channel-settings/client/tabBar.ts @@ -0,0 +1,15 @@ +import type { FC, LazyExoticComponent } from 'react'; +import { lazy } from 'react'; + +import { addAction } from '../../../client/views/room/lib/Toolbox'; + +addAction('channel-settings', { + groups: ['channel', 'group'], + id: 'channel-settings', + anonymous: true, + full: true, + title: 'Room_Info', + icon: 'info-circled', + template: lazy(() => import('../../../client/views/room/contextualBar/Info')) as LazyExoticComponent, + order: 1, +}); diff --git a/app/authorization/index.js b/apps/meteor/app/channel-settings/index.js similarity index 100% rename from app/authorization/index.js rename to apps/meteor/app/channel-settings/index.js diff --git a/app/channel-settings/server/functions/saveReactWhenReadOnly.js b/apps/meteor/app/channel-settings/server/functions/saveReactWhenReadOnly.js similarity index 91% rename from app/channel-settings/server/functions/saveReactWhenReadOnly.js rename to apps/meteor/app/channel-settings/server/functions/saveReactWhenReadOnly.js index d4a6898678d6..8b118c51f01e 100644 --- a/app/channel-settings/server/functions/saveReactWhenReadOnly.js +++ b/apps/meteor/app/channel-settings/server/functions/saveReactWhenReadOnly.js @@ -1,7 +1,7 @@ import { Meteor } from 'meteor/meteor'; import { Match } from 'meteor/check'; -import { Rooms, Messages } from '../../../models'; +import { Rooms, Messages } from '../../../models/server'; export const saveReactWhenReadOnly = function (rid, allowReact, user, sendMessage = true) { if (!Match.test(rid, String)) { diff --git a/app/channel-settings/server/functions/saveRoomAnnouncement.js b/apps/meteor/app/channel-settings/server/functions/saveRoomAnnouncement.js similarity index 92% rename from app/channel-settings/server/functions/saveRoomAnnouncement.js rename to apps/meteor/app/channel-settings/server/functions/saveRoomAnnouncement.js index 38a5f56d612a..b3f66bf311a0 100644 --- a/app/channel-settings/server/functions/saveRoomAnnouncement.js +++ b/apps/meteor/app/channel-settings/server/functions/saveRoomAnnouncement.js @@ -1,7 +1,7 @@ import { Meteor } from 'meteor/meteor'; import { Match } from 'meteor/check'; -import { Rooms, Messages } from '../../../models'; +import { Rooms, Messages } from '../../../models/server'; export const saveRoomAnnouncement = function (rid, roomAnnouncement, user, sendMessage = true) { if (!Match.test(rid, String)) { diff --git a/app/channel-settings/server/functions/saveRoomCustomFields.js b/apps/meteor/app/channel-settings/server/functions/saveRoomCustomFields.js similarity index 91% rename from app/channel-settings/server/functions/saveRoomCustomFields.js rename to apps/meteor/app/channel-settings/server/functions/saveRoomCustomFields.js index 5691cd69b169..c246e01224ba 100644 --- a/app/channel-settings/server/functions/saveRoomCustomFields.js +++ b/apps/meteor/app/channel-settings/server/functions/saveRoomCustomFields.js @@ -1,7 +1,7 @@ import { Meteor } from 'meteor/meteor'; import { Match } from 'meteor/check'; -import { Rooms, Subscriptions } from '../../../models'; +import { Rooms, Subscriptions } from '../../../models/server'; export const saveRoomCustomFields = function (rid, roomCustomFields) { if (!Match.test(rid, String)) { diff --git a/app/channel-settings/server/functions/saveRoomDescription.js b/apps/meteor/app/channel-settings/server/functions/saveRoomDescription.js similarity index 89% rename from app/channel-settings/server/functions/saveRoomDescription.js rename to apps/meteor/app/channel-settings/server/functions/saveRoomDescription.js index 0804175f8e2a..dd6e0fb3ee1b 100644 --- a/app/channel-settings/server/functions/saveRoomDescription.js +++ b/apps/meteor/app/channel-settings/server/functions/saveRoomDescription.js @@ -1,7 +1,7 @@ import { Meteor } from 'meteor/meteor'; import { Match } from 'meteor/check'; -import { Rooms, Messages } from '../../../models'; +import { Rooms, Messages } from '../../../models/server'; export const saveRoomDescription = function (rid, roomDescription, user) { if (!Match.test(rid, String)) { diff --git a/app/channel-settings/server/functions/saveRoomEncrypted.ts b/apps/meteor/app/channel-settings/server/functions/saveRoomEncrypted.ts similarity index 78% rename from app/channel-settings/server/functions/saveRoomEncrypted.ts rename to apps/meteor/app/channel-settings/server/functions/saveRoomEncrypted.ts index d00960afabe7..7d6a906ab8f1 100644 --- a/app/channel-settings/server/functions/saveRoomEncrypted.ts +++ b/apps/meteor/app/channel-settings/server/functions/saveRoomEncrypted.ts @@ -1,11 +1,11 @@ import { Meteor } from 'meteor/meteor'; import { Match } from 'meteor/check'; -import type { WriteOpResult } from 'mongodb'; +import type { UpdateResult } from 'mongodb'; +import type { IUser } from '@rocket.chat/core-typings'; import { Rooms, Messages } from '../../../models/server'; -import type { IUser } from '../../../../definition/IUser'; -export const saveRoomEncrypted = function (rid: string, encrypted: boolean, user: IUser, sendMessage = true): Promise { +export const saveRoomEncrypted = function (rid: string, encrypted: boolean, user: IUser, sendMessage = true): Promise { if (!Match.test(rid, String)) { throw new Meteor.Error('invalid-room', 'Invalid room', { function: 'RocketChat.saveRoomEncrypted', diff --git a/app/channel-settings/server/functions/saveRoomName.js b/apps/meteor/app/channel-settings/server/functions/saveRoomName.js similarity index 86% rename from app/channel-settings/server/functions/saveRoomName.js rename to apps/meteor/app/channel-settings/server/functions/saveRoomName.js index 159419151c27..941f8e86fcfc 100644 --- a/app/channel-settings/server/functions/saveRoomName.js +++ b/apps/meteor/app/channel-settings/server/functions/saveRoomName.js @@ -1,10 +1,11 @@ import { Meteor } from 'meteor/meteor'; +import { Integrations } from '@rocket.chat/models'; import { Rooms, Messages, Subscriptions } from '../../../models/server'; -import { Integrations } from '../../../models/server/raw'; -import { roomTypes, getValidRoomName } from '../../../utils/server'; +import { getValidRoomName } from '../../../utils/server'; import { callbacks } from '../../../../lib/callbacks'; import { checkUsernameAvailability } from '../../../lib/server/functions'; +import { roomCoordinator } from '../../../../server/lib/rooms/roomCoordinator'; const updateRoomName = (rid, displayName, isDiscussion) => { if (isDiscussion) { @@ -27,7 +28,7 @@ const updateRoomName = (rid, displayName, isDiscussion) => { export async function saveRoomName(rid, displayName, user, sendMessage = true) { const room = Rooms.findOneById(rid); - if (roomTypes.getConfig(room.t).preventRenaming()) { + if (roomCoordinator.getRoomDirectives(room.t)?.preventRenaming()) { throw new Meteor.Error('error-not-allowed', 'Not allowed', { function: 'RocketChat.saveRoomdisplayName', }); diff --git a/apps/meteor/app/channel-settings/server/functions/saveRoomReadOnly.js b/apps/meteor/app/channel-settings/server/functions/saveRoomReadOnly.js new file mode 100644 index 000000000000..7cdb614e0679 --- /dev/null +++ b/apps/meteor/app/channel-settings/server/functions/saveRoomReadOnly.js @@ -0,0 +1,18 @@ +import { Meteor } from 'meteor/meteor'; +import { Match } from 'meteor/check'; + +import { Rooms, Messages } from '../../../models/server'; + +export const saveRoomReadOnly = function (rid, readOnly, user, sendMessage = true) { + if (!Match.test(rid, String)) { + throw new Meteor.Error('invalid-room', 'Invalid room', { + function: 'RocketChat.saveRoomReadOnly', + }); + } + const result = Rooms.setReadOnlyById(rid, readOnly); + + if (result && sendMessage) { + readOnly ? Messages.createRoomSetReadOnlyByRoomIdAndUser(rid, user) : Messages.createRoomRemovedReadOnlyByRoomIdAndUser(rid, user); + } + return result; +}; diff --git a/app/channel-settings/server/functions/saveRoomSystemMessages.js b/apps/meteor/app/channel-settings/server/functions/saveRoomSystemMessages.js similarity index 93% rename from app/channel-settings/server/functions/saveRoomSystemMessages.js rename to apps/meteor/app/channel-settings/server/functions/saveRoomSystemMessages.js index 200b2d4eea8d..f3e30630ce5c 100644 --- a/app/channel-settings/server/functions/saveRoomSystemMessages.js +++ b/apps/meteor/app/channel-settings/server/functions/saveRoomSystemMessages.js @@ -1,7 +1,7 @@ import { Meteor } from 'meteor/meteor'; import { Match } from 'meteor/check'; -import { Rooms } from '../../../models'; +import { Rooms } from '../../../models/server'; import { MessageTypesValues } from '../../../lib/lib/MessageTypes'; export const saveRoomSystemMessages = function (rid, systemMessages) { diff --git a/apps/meteor/app/channel-settings/server/functions/saveRoomTopic.js b/apps/meteor/app/channel-settings/server/functions/saveRoomTopic.js new file mode 100644 index 000000000000..5edf3c215f31 --- /dev/null +++ b/apps/meteor/app/channel-settings/server/functions/saveRoomTopic.js @@ -0,0 +1,20 @@ +import { Meteor } from 'meteor/meteor'; +import { Match } from 'meteor/check'; + +import { Rooms, Messages } from '../../../models/server'; +import { callbacks } from '../../../../lib/callbacks'; + +export const saveRoomTopic = function (rid, roomTopic, user, sendMessage = true) { + if (!Match.test(rid, String)) { + throw new Meteor.Error('invalid-room', 'Invalid room', { + function: 'RocketChat.saveRoomTopic', + }); + } + + const update = Rooms.setTopicById(rid, roomTopic); + if (update && sendMessage) { + Messages.createRoomSettingsChangedWithTypeRoomIdMessageAndUser('room_changed_topic', rid, roomTopic, user); + } + callbacks.run('afterRoomTopicChange', { rid, topic: roomTopic }); + return update; +}; diff --git a/app/channel-settings/server/functions/saveRoomType.js b/apps/meteor/app/channel-settings/server/functions/saveRoomType.js similarity index 85% rename from app/channel-settings/server/functions/saveRoomType.js rename to apps/meteor/app/channel-settings/server/functions/saveRoomType.js index 444f431073cf..206520b01b23 100644 --- a/app/channel-settings/server/functions/saveRoomType.js +++ b/apps/meteor/app/channel-settings/server/functions/saveRoomType.js @@ -4,7 +4,8 @@ import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; import { Rooms, Subscriptions, Messages } from '../../../models/server'; import { settings } from '../../../settings/server'; -import { roomTypes, RoomSettingsEnum } from '../../../utils/server'; +import { roomCoordinator } from '../../../../server/lib/rooms/roomCoordinator'; +import { RoomSettingsEnum } from '../../../../definition/IRoomTypeConfig'; export const saveRoomType = function (rid, roomType, user, sendMessage = true) { if (!Match.test(rid, String)) { @@ -26,7 +27,7 @@ export const saveRoomType = function (rid, roomType, user, sendMessage = true) { }); } - if (!roomTypes.getConfig(room.t).allowRoomSettingChange(room, RoomSettingsEnum.TYPE)) { + if (!roomCoordinator.getRoomDirectives(room.t)?.allowRoomSettingChange(room, RoomSettingsEnum.TYPE)) { throw new Meteor.Error('error-direct-room', "Can't change type of direct rooms", { function: 'RocketChat.saveRoomType', }); diff --git a/app/channel-settings/server/functions/saveStreamingOptions.js b/apps/meteor/app/channel-settings/server/functions/saveStreamingOptions.js similarity index 92% rename from app/channel-settings/server/functions/saveStreamingOptions.js rename to apps/meteor/app/channel-settings/server/functions/saveStreamingOptions.js index c5c2d2b8fb2b..b9b7cea7f5f7 100644 --- a/app/channel-settings/server/functions/saveStreamingOptions.js +++ b/apps/meteor/app/channel-settings/server/functions/saveStreamingOptions.js @@ -1,7 +1,7 @@ import { Meteor } from 'meteor/meteor'; import { Match, check } from 'meteor/check'; -import { Rooms } from '../../../models'; +import { Rooms } from '../../../models/server'; export const saveStreamingOptions = function (rid, options) { if (!Match.test(rid, String)) { diff --git a/app/channel-settings/server/index.js b/apps/meteor/app/channel-settings/server/index.js similarity index 100% rename from app/channel-settings/server/index.js rename to apps/meteor/app/channel-settings/server/index.js diff --git a/app/channel-settings/server/methods/saveRoomSettings.js b/apps/meteor/app/channel-settings/server/methods/saveRoomSettings.js similarity index 94% rename from app/channel-settings/server/methods/saveRoomSettings.js rename to apps/meteor/app/channel-settings/server/methods/saveRoomSettings.js index 59393abf7a28..89dcd43fb8b8 100644 --- a/app/channel-settings/server/methods/saveRoomSettings.js +++ b/apps/meteor/app/channel-settings/server/methods/saveRoomSettings.js @@ -1,9 +1,10 @@ import { Meteor } from 'meteor/meteor'; -import { Match, check } from 'meteor/check'; +import { Match } from 'meteor/check'; +import { TEAM_TYPE } from '@rocket.chat/core-typings'; import { setRoomAvatar } from '../../../lib/server/functions/setRoomAvatar'; import { hasPermission } from '../../../authorization'; -import { Rooms } from '../../../models'; +import { Rooms } from '../../../models/server'; import { callbacks } from '../../../../lib/callbacks'; import { saveRoomName } from '../functions/saveRoomName'; import { saveRoomTopic } from '../functions/saveRoomTopic'; @@ -14,12 +15,11 @@ import { saveRoomType } from '../functions/saveRoomType'; import { saveRoomReadOnly } from '../functions/saveRoomReadOnly'; import { saveReactWhenReadOnly } from '../functions/saveReactWhenReadOnly'; import { saveRoomSystemMessages } from '../functions/saveRoomSystemMessages'; -import { saveRoomTokenpass } from '../functions/saveRoomTokens'; import { saveRoomEncrypted } from '../functions/saveRoomEncrypted'; import { saveStreamingOptions } from '../functions/saveStreamingOptions'; -import { RoomSettingsEnum, roomTypes } from '../../../utils'; import { Team } from '../../../../server/sdk'; -import { TEAM_TYPE } from '../../../../definition/ITeam'; +import { roomCoordinator } from '../../../../server/lib/rooms/roomCoordinator'; +import { RoomSettingsEnum } from '../../../../definition/IRoomTypeConfig'; const fields = [ 'roomAvatar', @@ -35,7 +35,6 @@ const fields = [ 'systemMessages', 'default', 'joinCode', - 'tokenpass', 'streamingOptions', 'retentionEnabled', 'retentionMaxAge', @@ -85,7 +84,7 @@ const validators = { }, encrypted({ userId, value, room, rid }) { if (value !== room.encrypted) { - if (!roomTypes.getConfig(room.t).allowRoomSettingChange(room, RoomSettingsEnum.E2E)) { + if (!roomCoordinator.getRoomDirectives(room.t)?.allowRoomSettingChange(room, RoomSettingsEnum.E2E)) { throw new Meteor.Error('error-action-not-allowed', 'Only groups or direct channels can enable encryption', { method: 'saveRoomSettings', action: 'Change_Room_Encrypted', @@ -194,18 +193,6 @@ const settingSavers = { Team.update(user._id, room.teamId, { type, updateRoom: false }); } }, - tokenpass({ value, rid }) { - check(value, { - require: String, - tokens: [ - { - token: String, - balance: String, - }, - ], - }); - saveRoomTokenpass(rid, value); - }, streamingOptions({ value, rid }) { saveStreamingOptions(rid, value); }, diff --git a/app/chatpal-search/client/index.js b/apps/meteor/app/chatpal-search/client/index.js similarity index 100% rename from app/chatpal-search/client/index.js rename to apps/meteor/app/chatpal-search/client/index.js diff --git a/app/chatpal-search/client/style.css b/apps/meteor/app/chatpal-search/client/style.css similarity index 100% rename from app/chatpal-search/client/style.css rename to apps/meteor/app/chatpal-search/client/style.css diff --git a/app/chatpal-search/client/template/admin.html b/apps/meteor/app/chatpal-search/client/template/admin.html similarity index 100% rename from app/chatpal-search/client/template/admin.html rename to apps/meteor/app/chatpal-search/client/template/admin.html diff --git a/apps/meteor/app/chatpal-search/client/template/admin.js b/apps/meteor/app/chatpal-search/client/template/admin.js new file mode 100644 index 000000000000..dd878d3e91e9 --- /dev/null +++ b/apps/meteor/app/chatpal-search/client/template/admin.js @@ -0,0 +1,91 @@ +import { Meteor } from 'meteor/meteor'; +import { ReactiveVar } from 'meteor/reactive-var'; +import { Template } from 'meteor/templating'; +import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; + +import { settings } from '../../../settings'; +import { hasPermission } from '../../../authorization'; +import { dispatchToastMessage } from '../../../../client/lib/toast'; +import { validateEmail } from '../../../../lib/emailValidator'; + +Template.ChatpalAdmin.onCreated(function () { + this.validateEmail = validateEmail; + + this.apiKey = new ReactiveVar(); + + const lang = settings.get('Language'); + + this.lang = lang === 'de' || lang === 'en' ? lang : 'en'; + + this.tac = new ReactiveVar(); + + Meteor.call('chatpalUtilsGetTaC', this.lang, (err, data) => { + this.tac.set(data); + }); +}); + +Template.ChatpalAdmin.events({ + 'submit form'(e, t) { + e.preventDefault(); + + const email = e.target.email.value; + const tac = e.target.readtac.checked; + + if (!tac) { + return dispatchToastMessage({ + type: 'error', + message: TAPi18n.__('Chatpal_ERROR_TAC_must_be_checked'), + }); + } + if (!email || email === '') { + return dispatchToastMessage({ + type: 'error', + message: TAPi18n.__('Chatpal_ERROR_Email_must_be_set'), + }); + } + if (!t.validateEmail(email)) { + return dispatchToastMessage({ + type: 'error', + message: TAPi18n.__('Chatpal_ERROR_Email_must_be_valid'), + }); + } + + // TODO register + try { + Meteor.call('chatpalUtilsCreateKey', email, (err, key) => { + if (!key) { + return dispatchToastMessage({ + type: 'error', + message: TAPi18n.__('Chatpal_ERROR_username_already_exists'), + }); + } + + dispatchToastMessage({ + type: 'info', + message: TAPi18n.__('Chatpal_created_key_successfully'), + }); + + t.apiKey.set(key); + }); + } catch (e) { + console.log(e); + dispatchToastMessage({ + type: 'error', + message: TAPi18n.__('Chatpal_ERROR_username_already_exists'), + }); // TODO error messages + } + }, +}); + +// template +Template.ChatpalAdmin.helpers({ + apiKey() { + return Template.instance().apiKey.get(); + }, + isAdmin() { + return hasPermission('manage-chatpal'); + }, + tac() { + return Template.instance().tac.get(); + }, +}); diff --git a/app/chatpal-search/client/template/result.html b/apps/meteor/app/chatpal-search/client/template/result.html similarity index 100% rename from app/chatpal-search/client/template/result.html rename to apps/meteor/app/chatpal-search/client/template/result.html diff --git a/apps/meteor/app/chatpal-search/client/template/result.js b/apps/meteor/app/chatpal-search/client/template/result.js new file mode 100644 index 000000000000..17a91ae4f6b1 --- /dev/null +++ b/apps/meteor/app/chatpal-search/client/template/result.js @@ -0,0 +1,153 @@ +import { ReactiveVar } from 'meteor/reactive-var'; +import { Template } from 'meteor/templating'; +import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; + +import { getURL } from '../../../utils'; +import { Subscriptions } from '../../../models/client'; +import { getUserAvatarURL as getAvatarUrl } from '../../../utils/lib/getUserAvatarURL'; +import { formatTime } from '../../../../client/lib/utils/formatTime'; +import { formatDate } from '../../../../client/lib/utils/formatDate'; +import { roomCoordinator } from '../../../../client/lib/rooms/roomCoordinator'; + +const getDMUrl = (username) => getURL(`/direct/${username}`); + +Template.ChatpalSearchResultTemplate.onCreated(function () { + this.badRequest = new ReactiveVar(false); + this.resultType = new ReactiveVar(this.data.settings.DefaultResultType); + this.data.parentPayload.resultType = this.resultType.get(); +}); + +Template.ChatpalSearchResultTemplate.events = { + 'click .chatpal-search-typefilter li'(evt, t) { + t.data.parentPayload.resultType = evt.currentTarget.getAttribute('value'); + t.data.payload.start = 0; + t.resultType.set(t.data.parentPayload.resultType); + t.data.search(); + }, + 'click .chatpal-paging-prev'(env, t) { + t.data.payload.start -= t.data.settings.PageSize; + t.data.search(); + }, + 'click .chatpal-paging-next'(env, t) { + t.data.payload.start = (t.data.payload.start || 0) + t.data.settings.PageSize; + t.data.search(); + }, + 'click .chatpal-show-more-messages'(evt, t) { + t.data.parentPayload.resultType = 'Messages'; + t.data.payload.start = 0; + t.data.payload.rows = t.data.settings.PageSize; + t.resultType.set(t.data.parentPayload.resultType); + t.data.search(); + }, +}; + +Template.ChatpalSearchResultTemplate.helpers({ + result() { + return Template.instance().data.result.get(); + }, + searching() { + return Template.instance().data.searching.get(); + }, + resultType() { + return Template.instance().resultType.get(); + }, + navSelected(type) { + return Template.instance().resultType.get() === type ? 'selected' : ''; + }, + resultsFoundForAllSearch() { + const result = Template.instance().data.result.get(); + + if (!result) { + return true; + } + + return result.message.numFound > 0 || result.user.numFound > 0 || result.room.numFound > 0; + }, + moreMessagesThanDisplayed() { + const result = Template.instance().data.result.get(); + + return result.message.docs.length < result.message.numFound; + }, + resultNumFound() { + const result = Template.instance().data.result.get(); + if (result) { + switch (result.message.numFound) { + case 0: + return TAPi18n.__('Chatpal_no_search_results'); + case 1: + return TAPi18n.__('Chatpal_one_search_result'); + default: + return TAPi18n.__('Chatpal_search_results', result.message.numFound); + } + } + }, + resultMessagesOnly() { + return Template.instance().resultType.get() === 'Messages' || Template.instance().resultType.get() === 'Room'; + }, + resultPaging() { + const result = Template.instance().data.result.get(); + const pageSize = Template.instance().data.settings.PageSize; + if (result) { + return { + currentPage: 1 + result.message.start / pageSize, + numOfPages: Math.ceil(result.message.numFound / pageSize), + }; + } + }, +}); + +Template.ChatpalSearchSingleMessage.helpers({ + roomIcon() { + const room = this.r; + if (room && room.t === 'd') { + return 'at'; + } + return roomCoordinator.getIcon(room); + }, + + roomLink() { + return roomCoordinator.getRouteLink(this.r.t, this.r); + }, + + roomName() { + return roomCoordinator.getRoomName(this.r.t, this.r); + }, + + roomNotSubscribed() { + const subscription = Subscriptions.findOne({ rid: this.rid }); + return typeof subscription === 'undefined'; + }, + + time() { + return formatTime(this.created); + }, + date() { + return formatDate(this.created); + }, + getAvatarUrl, +}); + +Template.ChatpalSearchSingleRoom.helpers({ + roomIcon() { + if (this.t === 'd') { + return 'at'; + } + return roomCoordinator.getIcon(this); + }, + roomLink() { + return roomCoordinator.getRouteLink(this.t, this); + }, + roomNotSubscribed() { + const subscription = Subscriptions.findOne({ rid: this.rid }); + return typeof subscription === 'undefined'; + }, +}); + +Template.ChatpalSearchSingleUser.helpers({ + cleanUsername() { + const username = this.user_username || this.username; // varies whether users or messages of users are displayed + return username.replace(/<\/?em>/gi, ''); + }, + getAvatarUrl, + getDMUrl, +}); diff --git a/app/chatpal-search/client/template/suggestion.html b/apps/meteor/app/chatpal-search/client/template/suggestion.html similarity index 100% rename from app/chatpal-search/client/template/suggestion.html rename to apps/meteor/app/chatpal-search/client/template/suggestion.html diff --git a/app/chatpal-search/client/template/suggestion.js b/apps/meteor/app/chatpal-search/client/template/suggestion.js similarity index 100% rename from app/chatpal-search/client/template/suggestion.js rename to apps/meteor/app/chatpal-search/client/template/suggestion.js diff --git a/app/chatpal-search/server/asset/config.js b/apps/meteor/app/chatpal-search/server/asset/config.js similarity index 100% rename from app/chatpal-search/server/asset/config.js rename to apps/meteor/app/chatpal-search/server/asset/config.js diff --git a/app/chatpal-search/server/index.js b/apps/meteor/app/chatpal-search/server/index.js similarity index 100% rename from app/chatpal-search/server/index.js rename to apps/meteor/app/chatpal-search/server/index.js diff --git a/apps/meteor/app/chatpal-search/server/provider/index.js b/apps/meteor/app/chatpal-search/server/provider/index.js new file mode 100644 index 000000000000..77eaa2725596 --- /dev/null +++ b/apps/meteor/app/chatpal-search/server/provider/index.js @@ -0,0 +1,444 @@ +import { Meteor } from 'meteor/meteor'; +import { HTTP } from 'meteor/http'; +import { Random } from 'meteor/random'; + +import ChatpalLogger from '../utils/logger'; +import { Rooms, Messages } from '../../../models/server'; + +/** + * Enables HTTP functions on Chatpal Backend + */ +class Backend { + constructor(options) { + this._options = options; + } + + /** + * index a set of Sorl documents + * @param docs + * @returns {boolean} + */ + index(docs) { + const options = { + data: docs, + params: { language: this._options.language }, + ...this._options.httpOptions, + }; + + try { + const response = HTTP.call('POST', `${this._options.baseurl}${this._options.updatepath}`, options); + + if (response.statusCode >= 200 && response.statusCode < 300) { + ChatpalLogger.debug({ msg: `indexed ${docs.length} documents`, data: response.data }); + } else { + throw new Error(response); + } + } catch (e) { + // TODO how to deal with this + ChatpalLogger.error({ msg: 'indexing failed', err: e }); + return false; + } + } + + /** + * remove an entry by type and id + * @param type + * @param id + * @returns {boolean} + */ + remove(type, id) { + ChatpalLogger.debug(`Remove ${type}(${id}) from Index`); + + const options = { + data: { + delete: { + query: `id:${id} AND type:${type}`, + }, + commit: {}, + }, + ...this._options.httpOptions, + }; + + try { + const response = HTTP.call('POST', this._options.baseurl + this._options.clearpath, options); + + return response.statusCode >= 200 && response.statusCode < 300; + } catch (e) { + return false; + } + } + + count(type) { + return this.query({ type, rows: 0, text: '*' })[type].numFound; + } + + /** + * query with params + * @param params + * @param callback + */ + query(params, callback) { + const options = { + params, + ...this._options.httpOptions, + }; + + ChatpalLogger.debug({ query: options }); + + try { + if (callback) { + HTTP.call('POST', this._options.baseurl + this._options.searchpath, options, (err, result) => { + if (err) { + return callback(err); + } + + callback(undefined, result.data); + }); + } else { + const response = HTTP.call('POST', this._options.baseurl + this._options.searchpath, options); + + if (response.statusCode >= 200 && response.statusCode < 300) { + return response.data; + } + throw new Error(response); + } + } catch (e) { + ChatpalLogger.error({ msg: 'query failed', err: e }); + throw e; + } + } + + suggest(params, callback) { + const options = { + params, + ...this._options.httpOptions, + }; + + HTTP.call('POST', this._options.baseurl + this._options.suggestionpath, options, (err, result) => { + if (err) { + return callback(err); + } + + try { + callback(undefined, result.data.suggestion); + } catch (e) { + callback(e); + } + }); + } + + clear() { + ChatpalLogger.debug('Clear Index'); + + const options = { + data: { + delete: { + query: '*:*', + }, + commit: {}, + }, + ...this._options.httpOptions, + }; + + try { + const response = HTTP.call('POST', this._options.baseurl + this._options.clearpath, options); + + return response.statusCode >= 200 && response.statusCode < 300; + } catch (e) { + return false; + } + } + + /** + * statically ping with configuration + * @param options + * @returns {boolean} + */ + static ping(config) { + const options = { + params: { + stats: true, + }, + ...config.httpOptions, + }; + + try { + const response = HTTP.call('GET', config.baseurl + config.pingpath, options); + + if (response.statusCode >= 200 && response.statusCode < 300) { + return response.data.stats; + } + return false; + } catch (e) { + return false; + } + } +} + +/** + * Enabled batch indexing + */ +class BatchIndexer { + constructor(size, func, ...rest) { + this._size = size; + this._func = func; + this._rest = rest; + this._values = []; + } + + add(value) { + this._values.push(value); + if (this._values.length === this._size) { + this.flush(); + } + } + + flush() { + this._func(this._values, this._rest); // TODO if flush does not work + this._values = []; + } +} + +/** + * Provides index functions to chatpal provider + */ +export default class Index { + /** + * Creates Index Stub + * @param options + * @param clear if a complete reindex should be done + */ + constructor(options, clear, date) { + this._id = Random.id(); + + this._backend = new Backend(options); + + this._options = options; + + this._batchIndexer = new BatchIndexer(this._options.batchSize || 100, (values) => this._backend.index(values)); + + this._bootstrap(clear, date); + } + + /** + * prepare solr documents + * @param type + * @param doc + * @returns {*} + * @private + */ + _getIndexDocument(type, doc) { + switch (type) { + case 'message': + return { + id: doc._id, + rid: doc.rid, + user: doc.u._id, + created: doc.ts, + updated: doc._updatedAt, + text: doc.msg, + type, + }; + case 'room': + return { + id: doc._id, + rid: doc._id, + created: doc.createdAt, + updated: doc.lm ? doc.lm : doc._updatedAt, + type, + room_name: doc.name, + room_announcement: doc.announcement, + room_description: doc.description, + room_topic: doc.topic, + }; + case 'user': + return { + id: doc._id, + created: doc.createdAt, + updated: doc._updatedAt, + type, + user_username: doc.username, + user_name: doc.name, + user_email: doc.emails && doc.emails.map((e) => e.address), + }; + default: + throw new Error(`Cannot index type '${type}'`); + } + } + + /** + * return true if there are messages in the databases which has been created before *date* + * @param date + * @returns {boolean} + * @private + */ + _existsDataOlderThan(date) { + return Messages.model.find({ ts: { $lt: new Date(date) }, t: { $exists: false } }, { limit: 1 }).fetch().length > 0; + } + + _doesRoomCountDiffer() { + return Rooms.find({ t: { $ne: 'd' } }).count() !== this._backend.count('room'); + } + + _doesUserCountDiffer() { + return Meteor.users.find({ active: true }).count() !== this._backend.count('user'); + } + + /** + * Index users by using a database cursor + */ + _indexUsers() { + const cursor = Meteor.users.find({ active: true }); + + ChatpalLogger.debug(`Start indexing ${cursor.count()} users`); + + cursor.forEach((user) => { + this.indexDoc('user', user, false); + }); + + ChatpalLogger.info(`Users indexed successfully (index-id: ${this._id})`); + } + + /** + * Index rooms by database cursor + * @private + */ + _indexRooms() { + const cursor = Rooms.find({ t: { $ne: 'd' } }); + + ChatpalLogger.debug(`Start indexing ${cursor.count()} rooms`); + + cursor.forEach((room) => { + this.indexDoc('room', room, false); + }); + + ChatpalLogger.info(`Rooms indexed successfully (index-id: ${this._id})`); + } + + _indexMessages(date, gap) { + const start = new Date(date - gap); + const end = new Date(date); + + const cursor = Messages.model.find({ ts: { $gt: start, $lt: end }, t: { $exists: false } }); + + ChatpalLogger.debug(`Start indexing ${cursor.count()} messages between ${start.toString()} and ${end.toString()}`); + + cursor.forEach((message) => { + this.indexDoc('message', message, false); + }); + + ChatpalLogger.info(`Messages between ${start.toString()} and ${end.toString()} indexed successfully (index-id: ${this._id})`); + + return start.getTime(); + } + + _run(date, resolve, reject) { + this._running = true; + + if (this._existsDataOlderThan(date) && !this._break) { + Meteor.setTimeout(() => { + date = this._indexMessages(date, (this._options.windowSize || 24) * 3600000); + + this._run(date, resolve, reject); + }, this._options.timeout || 1000); + } else if (this._break) { + ChatpalLogger.info(`stopped bootstrap (index-id: ${this._id})`); + + this._batchIndexer.flush(); + + this._running = false; + + resolve(); + } else { + ChatpalLogger.info(`No messages older than already indexed date ${new Date(date).toString()}`); + + if (this._doesUserCountDiffer() && !this._break) { + this._indexUsers(); + } else { + ChatpalLogger.info('Users already indexed'); + } + + if (this._doesRoomCountDiffer() && !this._break) { + this._indexRooms(); + } else { + ChatpalLogger.info('Rooms already indexed'); + } + + this._batchIndexer.flush(); + + ChatpalLogger.info(`finished bootstrap (index-id: ${this._id})`); + + this._running = false; + + resolve(); + } + } + + _bootstrap(clear, date) { + ChatpalLogger.info('Start bootstrapping'); + + return new Promise((resolve, reject) => { + if (clear) { + this._backend.clear(); + date = new Date().getTime(); + } + + this._run(date, resolve, reject); + }); + } + + static ping(options) { + return Backend.ping(options); + } + + stop() { + this._break = true; + } + + reindex() { + if (!this._running) { + this._bootstrap(true); + } + } + + indexDoc(type, doc, flush = true) { + this._batchIndexer.add(this._getIndexDocument(type, doc)); + + if (flush) { + this._batchIndexer.flush(); + } + + return true; + } + + removeDoc(type, id) { + return this._backend.remove(type, id); + } + + query(text, language, acl, type, start, rows, callback, params = {}) { + this._backend.query( + { + text, + language, + acl, + type, + start, + rows, + ...params, + }, + callback, + ); + } + + suggest(text, language, acl, type, callback) { + this._backend.suggest( + { + text, + language, + acl, + type, + }, + callback, + ); + } +} diff --git a/apps/meteor/app/chatpal-search/server/provider/provider.js b/apps/meteor/app/chatpal-search/server/provider/provider.js new file mode 100644 index 000000000000..b8705cf29be3 --- /dev/null +++ b/apps/meteor/app/chatpal-search/server/provider/provider.js @@ -0,0 +1,380 @@ +import { Meteor } from 'meteor/meteor'; + +import { searchProviderService, SearchProvider } from '../../../search/server'; +import ChatpalLogger from '../utils/logger'; +import { Subscriptions, Rooms } from '../../../models/server'; +import { baseUrl } from '../utils/settings'; +import Index from './index'; + +/** + * The chatpal search provider enables chatpal search. An appropriate backedn has to be specified by settings. + */ +class ChatpalProvider extends SearchProvider { + /** + * Create chatpal provider with some settings for backend and ui + */ + constructor() { + super('chatpalProvider'); + + this.chatpalBaseUrl = `${baseUrl}`; + + ChatpalLogger.debug(`Using ${this.chatpalBaseUrl} as chatpal base url`); + + this._settings.add('Backend', 'select', 'cloud', { + values: [ + { key: 'cloud', i18nLabel: 'Cloud Service' }, + { key: 'onsite', i18nLabel: 'On-Site' }, + ], + i18nLabel: 'Chatpal_Backend', + i18nDescription: 'Chatpal_Backend_Description', + }); + this._settings.add('API_Key', 'string', '', { + enableQuery: [ + { + _id: 'Search.chatpalProvider.Backend', + value: 'cloud', + }, + ], + i18nLabel: 'Chatpal_API_Key', + i18nDescription: 'Chatpal_API_Key_Description', + }); + this._settings.add('Base_URL', 'string', '', { + enableQuery: [ + { + _id: 'Search.chatpalProvider.Backend', + value: 'onsite', + }, + ], + i18nLabel: 'Chatpal_Base_URL', + i18nDescription: 'Chatpal_Base_URL_Description', + }); + this._settings.add('HTTP_Headers', 'string', '', { + enableQuery: [ + { + _id: 'Search.chatpalProvider.Backend', + value: 'onsite', + }, + ], + multiline: true, + i18nLabel: 'Chatpal_HTTP_Headers', + i18nDescription: 'Chatpal_HTTP_Headers_Description', + }); + this._settings.add('Main_Language', 'select', 'en', { + values: [ + { key: 'en', i18nLabel: 'English' }, + { key: 'none', i18nLabel: 'Language_Not_set' }, + { key: 'cs', i18nLabel: 'Czech' }, + { key: 'de', i18nLabel: 'Deutsch' }, + { key: 'el', i18nLabel: 'Greek' }, + { key: 'es', i18nLabel: 'Spanish' }, + { key: 'fi', i18nLabel: 'Finish' }, + { key: 'fr', i18nLabel: 'French' }, + { key: 'hu', i18nLabel: 'Hungarian' }, + { key: 'it', i18nLabel: 'Italian' }, + { key: 'nl', i18nLabel: 'Dutsch' }, + { key: 'pl', i18nLabel: 'Polish' }, + { key: 'pt', i18nLabel: 'Portuguese' }, + { key: 'pt_BR', i18nLabel: 'Brasilian' }, + { key: 'ro', i18nLabel: 'Romanian' }, + { key: 'ru', i18nLabel: 'Russian' }, + { key: 'sv', i18nLabel: 'Swedisch' }, + { key: 'tr', i18nLabel: 'Turkish' }, + { key: 'uk', i18nLabel: 'Ukrainian' }, + ], + i18nLabel: 'Chatpal_Main_Language', + i18nDescription: 'Chatpal_Main_Language_Description', + }); + this._settings.add('DefaultResultType', 'select', 'All', { + values: [ + { key: 'All', i18nLabel: 'Chatpal_All_Results' }, + { key: 'Room', i18nLabel: 'Chatpal_Current_Room_Only' }, + { key: 'Messages', i18nLabel: 'Chatpal_Messages_Only' }, + ], + i18nLabel: 'Chatpal_Default_Result_Type', + i18nDescription: 'Chatpal_Default_Result_Type_Description', + }); + this._settings.add('PageSize', 'int', 15, { + i18nLabel: 'Search_Page_Size', + }); + this._settings.add('SuggestionEnabled', 'boolean', true, { + i18nLabel: 'Chatpal_Suggestion_Enabled', + alert: 'This feature is currently in beta and will be extended in the future', + }); + this._settings.add('IncludeAllPublicChannels', 'boolean', false, { + i18nLabel: 'Chatpal_Include_All_Public_Channels', + i18nDescription: 'Chatpal_Include_All_Public_Channels_Description', + }); + this._settings.add('BatchSize', 'int', 100, { + i18nLabel: 'Chatpal_Batch_Size', + i18nDescription: 'Chatpal_Batch_Size_Description', + }); + this._settings.add('TimeoutSize', 'int', 5000, { + i18nLabel: 'Chatpal_Timeout_Size', + i18nDescription: 'Chatpal_Timeout_Size_Description', + }); + this._settings.add('WindowSize', 'int', 48, { + i18nLabel: 'Chatpal_Window_Size', + i18nDescription: 'Chatpal_Window_Size_Description', + }); + } + + get i18nLabel() { + return 'Chatpal Provider'; + } + + get iconName() { + return 'chatpal-logo-icon-darkblue'; + } + + get resultTemplate() { + return 'ChatpalSearchResultTemplate'; + } + + get suggestionItemTemplate() { + return 'ChatpalSuggestionItemTemplate'; + } + + get supportsSuggestions() { + return this._settings.get('SuggestionEnabled'); + } + + /** + * indexing for messages, rooms and users + * @inheritDoc + */ + on(name, value, payload) { + if (!this.index) { + this.indexFail = true; + return false; + } + + switch (name) { + case 'message.save': + return this.index.indexDoc('message', payload); + case 'user.save': + return this.index.indexDoc('user', payload); + case 'room.save': + return this.index.indexDoc('room', payload); + case 'message.delete': + return this.index.removeDoc('message', value); + case 'user.delete': + return this.index.removeDoc('user', value); + case 'room.delete': + return this.index.removeDoc('room', value); + } + + return true; + } + + /** + * Check if the index has to be deleted and completely new reindexed + * @param reason the reason for the provider start + * @returns {boolean} + * @private + */ + _checkForClear(reason) { + if (reason === 'startup') { + return false; + } + + if (reason === 'switch') { + return true; + } + + return ( + this._indexConfig.backendtype !== this._settings.get('Backend') || + (this._indexConfig.backendtype === 'onsite' && + this._indexConfig.baseurl !== + (this._settings.get('Base_URL').endsWith('/') ? this._settings.get('Base_URL').slice(0, -1) : this._settings.get('Base_URL'))) || + (this._indexConfig.backendtype === 'cloud' && this._indexConfig.httpOptions.headers['X-Api-Key'] !== this._settings.get('API_Key')) || + this._indexConfig.language !== this._settings.get('Main_Language') + ); + } + + /** + * parse string to object that can be used as header for HTTP calls + * @returns {{}} + * @private + */ + _parseHeaders() { + const headers = {}; + const sh = this._settings.get('HTTP_Headers').split('\n'); + sh.forEach(function (d) { + const ds = d.split(':'); + if (ds.length === 2 && ds[0].trim() !== '') { + headers[ds[0]] = ds[1]; + } + }); + return headers; + } + + /** + * ping if configuration has been set correctly + * @param config + * @param resolve if ping was successfull + * @param reject if some error occurs + * @param timeout until ping is repeated + * @private + */ + _ping(config, resolve, reject, timeout = 5000) { + const maxTimeout = 200000; + + const stats = Index.ping(config); + + if (stats) { + ChatpalLogger.debug('ping was successfull'); + resolve({ config, stats }); + } else { + ChatpalLogger.warn(`ping failed, retry in ${timeout} ms`); + + this._pingTimeout = Meteor.setTimeout(() => { + this._ping(config, resolve, reject, Math.min(maxTimeout, 2 * timeout)); + }, timeout); + } + } + + /** + * Get index config based on settings + * @param callback + * @private + */ + _getIndexConfig() { + return new Promise((resolve, reject) => { + const config = { + backendtype: this._settings.get('Backend'), + }; + + if (this._settings.get('Backend') === 'cloud') { + config.baseurl = this.chatpalBaseUrl; + config.language = this._settings.get('Main_Language'); + config.searchpath = 'search/search'; + config.updatepath = 'search/update'; + config.pingpath = 'search/ping'; + config.clearpath = 'search/clear'; + config.suggestionpath = 'search/suggest'; + config.httpOptions = { + headers: { + 'X-Api-Key': this._settings.get('API_Key'), + }, + }; + } else { + config.baseurl = this._settings.get('Base_URL').replace(/\/?$/, '/'); + config.language = this._settings.get('Main_Language'); + config.searchpath = 'chatpal/search'; + config.updatepath = 'chatpal/update'; + config.pingpath = 'chatpal/ping'; + config.clearpath = 'chatpal/clear'; + config.suggestionpath = 'chatpal/suggest'; + config.httpOptions = { + headers: this._parseHeaders(), + }; + } + + config.batchSize = this._settings.get('BatchSize'); + config.timeout = this._settings.get('TimeoutSize'); + config.windowSize = this._settings.get('WindowSize'); + + this._ping(config, resolve, reject); + }); + } + + /** + * @inheritDoc + * @param callback + */ + stop(resolve) { + ChatpalLogger.info('Provider stopped'); + Meteor.clearTimeout(this._pingTimeout); + this.indexFail = false; + this.index && this.index.stop(); + resolve(); + } + + /** + * @inheritDoc + * @param reason + * @param resolve + * @param reject + */ + start(reason, resolve, reject) { + const clear = this._checkForClear(reason); + + ChatpalLogger.debug(`clear = ${clear} with reason '${reason}'`); + + this._getIndexConfig().then((server) => { + this._indexConfig = server.config; + + this._stats = server.stats; + + ChatpalLogger.debug({ config: this._indexConfig }); + ChatpalLogger.debug({ stats: this._stats }); + + this.index = new Index(this._indexConfig, this.indexFail || clear, this._stats.message.oldest || new Date().valueOf()); + + resolve(); + }, reject); + } + + /** + * returns a list of rooms that are allowed to be seen by current user + * @param context + * @private + */ + _getAcl(context) { + let aclRoomsIds = []; + + const subscribedRooms = Subscriptions.find({ 'u._id': context.uid }) + .fetch() + .map((room) => room.rid); + aclRoomsIds = aclRoomsIds.concat(subscribedRooms); + + if (this._settings.get('IncludeAllPublicChannels')) { + const publicRooms = Rooms.findByType('c') + .fetch() + .map((room) => room._id); + aclRoomsIds = aclRoomsIds.concat(publicRooms); + } + + // return unique room ids + return [...new Set(aclRoomsIds)]; + } + + /** + * @inheritDoc + * @returns {*} + */ + search(text, context, payload, callback) { + if (!this.index) { + return callback({ msg: 'Chatpal_currently_not_active' }); + } + + const type = payload.resultType === 'All' ? ['message', 'user', 'room'] : ['message']; + const params = Object.assign({}, payload.custom); + + this.index.query( + text, + this._settings.get('Main_Language'), + payload.resultType === 'Room' ? [context.rid] : this._getAcl(context), + type, + payload.start || 0, + payload.rows || this._settings.get('PageSize'), + callback, + params, + ); + } + + /** + * @inheritDoc + */ + suggest(text, context, payload, callback) { + if (!this.index) { + return callback({ msg: 'Chatpal_currently_not_active' }); + } + + const type = payload.resultType === 'All' ? ['message', 'user', 'room'] : ['message']; + + this.index.suggest(text, this._settings.get('Main_Language'), this._getAcl(context), type, callback); + } +} + +searchProviderService.register(new ChatpalProvider()); diff --git a/app/chatpal-search/server/utils/logger.js b/apps/meteor/app/chatpal-search/server/utils/logger.js similarity index 100% rename from app/chatpal-search/server/utils/logger.js rename to apps/meteor/app/chatpal-search/server/utils/logger.js diff --git a/app/chatpal-search/server/utils/settings.js b/apps/meteor/app/chatpal-search/server/utils/settings.js similarity index 100% rename from app/chatpal-search/server/utils/settings.js rename to apps/meteor/app/chatpal-search/server/utils/settings.js diff --git a/app/chatpal-search/server/utils/utils.js b/apps/meteor/app/chatpal-search/server/utils/utils.js similarity index 100% rename from app/chatpal-search/server/utils/utils.js rename to apps/meteor/app/chatpal-search/server/utils/utils.js diff --git a/app/cloud/server/functions/buildRegistrationData.ts b/apps/meteor/app/cloud/server/functions/buildRegistrationData.ts similarity index 87% rename from app/cloud/server/functions/buildRegistrationData.ts rename to apps/meteor/app/cloud/server/functions/buildRegistrationData.ts index e3661c8ea172..a30fc190546b 100644 --- a/app/cloud/server/functions/buildRegistrationData.ts +++ b/apps/meteor/app/cloud/server/functions/buildRegistrationData.ts @@ -1,16 +1,17 @@ +import type { SettingValue } from '@rocket.chat/core-typings'; +import { Statistics } from '@rocket.chat/models'; + import { settings } from '../../../settings/server'; import { Users } from '../../../models/server'; -import { Statistics } from '../../../models/server/raw'; import { statistics } from '../../../statistics/server'; import { LICENSE_VERSION } from '../license'; -import { SettingValue } from '../../../../definition/ISetting'; -type WorkspaceRegistrationData = { +type WorkspaceRegistrationData = { uniqueId: string; workspaceId: SettingValue; address: SettingValue; contactName: string; - contactEmail: string; + contactEmail: T; seats: number; allowMarketing: SettingValue; accountName: SettingValue; @@ -32,7 +33,7 @@ type WorkspaceRegistrationData = { npsEnabled: SettingValue; }; -export async function buildWorkspaceRegistrationData(contactEmail: string): Promise { +export async function buildWorkspaceRegistrationData(contactEmail: T): Promise> { const stats = (await Statistics.findLast()) || (await statistics.get()); const address = settings.get('Site_Url'); diff --git a/app/cloud/server/functions/checkUserHasCloudLogin.js b/apps/meteor/app/cloud/server/functions/checkUserHasCloudLogin.js similarity index 90% rename from app/cloud/server/functions/checkUserHasCloudLogin.js rename to apps/meteor/app/cloud/server/functions/checkUserHasCloudLogin.js index 39743627152b..e68ff1570498 100644 --- a/app/cloud/server/functions/checkUserHasCloudLogin.js +++ b/apps/meteor/app/cloud/server/functions/checkUserHasCloudLogin.js @@ -1,5 +1,5 @@ import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; -import { Users } from '../../../models'; +import { Users } from '../../../models/server'; export function checkUserHasCloudLogin(userId) { const { connectToCloud, workspaceRegistered } = retrieveRegistrationStatus(); diff --git a/apps/meteor/app/cloud/server/functions/connectWorkspace.ts b/apps/meteor/app/cloud/server/functions/connectWorkspace.ts new file mode 100644 index 000000000000..b3b0c095715b --- /dev/null +++ b/apps/meteor/app/cloud/server/functions/connectWorkspace.ts @@ -0,0 +1,58 @@ +import { HTTP } from 'meteor/http'; +import { Settings } from '@rocket.chat/models'; + +import { getRedirectUri } from './getRedirectUri'; +import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; +import { settings } from '../../../settings/server'; +import { saveRegistrationData } from './saveRegistrationData'; +import { SystemLogger } from '../../../../server/lib/logger/system'; + +export async function connectWorkspace(token: string) { + const { connectToCloud } = retrieveRegistrationStatus(); + if (!connectToCloud) { + await Settings.updateValueById('Register_Server', true); + } + + // shouldn't get here due to checking this on the method + // but this is just to double check + if (!token) { + return new Error('Invalid token; the registration token is required.'); + } + + const redirectUri = getRedirectUri(); + + const regInfo = { + email: settings.get('Organization_Email'), + client_name: settings.get('Site_Name'), + redirect_uris: [redirectUri], + }; + + const cloudUrl = settings.get('Cloud_Url'); + let result; + try { + result = HTTP.post(`${cloudUrl}/api/oauth/clients`, { + headers: { + Authorization: `Bearer ${token}`, + }, + data: regInfo, + }); + } catch (e: any) { + if (e.response?.data?.error) { + SystemLogger.error(`Failed to register with Rocket.Chat Cloud. Error: ${e.response.data.error}`); + } else { + SystemLogger.error(e); + } + + return false; + } + + const { data } = result; + + if (!data) { + return false; + } + + await saveRegistrationData(data); + + return true; +} diff --git a/apps/meteor/app/cloud/server/functions/disconnectWorkspace.ts b/apps/meteor/app/cloud/server/functions/disconnectWorkspace.ts new file mode 100644 index 000000000000..0c1a9743b104 --- /dev/null +++ b/apps/meteor/app/cloud/server/functions/disconnectWorkspace.ts @@ -0,0 +1,14 @@ +import { Settings } from '@rocket.chat/models'; + +import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; + +export async function disconnectWorkspace() { + const { connectToCloud } = retrieveRegistrationStatus(); + if (!connectToCloud) { + return true; + } + + await Settings.updateValueById('Register_Server', false); + + return true; +} diff --git a/app/cloud/server/functions/finishOAuthAuthorization.js b/apps/meteor/app/cloud/server/functions/finishOAuthAuthorization.js similarity index 94% rename from app/cloud/server/functions/finishOAuthAuthorization.js rename to apps/meteor/app/cloud/server/functions/finishOAuthAuthorization.js index ec0601204795..e46bfda5cfd9 100644 --- a/app/cloud/server/functions/finishOAuthAuthorization.js +++ b/apps/meteor/app/cloud/server/functions/finishOAuthAuthorization.js @@ -2,8 +2,8 @@ import { Meteor } from 'meteor/meteor'; import { HTTP } from 'meteor/http'; import { getRedirectUri } from './getRedirectUri'; -import { settings } from '../../../settings'; -import { Users } from '../../../models'; +import { settings } from '../../../settings/server'; +import { Users } from '../../../models/server'; import { userScopes } from '../oauthScopes'; import { SystemLogger } from '../../../../server/lib/logger/system'; diff --git a/app/cloud/server/functions/getConfirmationPoll.ts b/apps/meteor/app/cloud/server/functions/getConfirmationPoll.ts similarity index 82% rename from app/cloud/server/functions/getConfirmationPoll.ts rename to apps/meteor/app/cloud/server/functions/getConfirmationPoll.ts index 3c8783e9220a..4405d0ba33ad 100644 --- a/app/cloud/server/functions/getConfirmationPoll.ts +++ b/apps/meteor/app/cloud/server/functions/getConfirmationPoll.ts @@ -1,8 +1,8 @@ import { HTTP } from 'meteor/http'; +import type { CloudConfirmationPollData } from '@rocket.chat/core-typings'; import { settings } from '../../../settings/server'; import { SystemLogger } from '../../../../server/lib/logger/system'; -import { CloudConfirmationPollData } from '../../../../definition/ICloud'; export async function getConfirmationPoll(deviceCode: string): Promise { const cloudUrl = settings.get('Cloud_Url'); @@ -10,8 +10,8 @@ export async function getConfirmationPoll(deviceCode: string): Promise('Register_Server'), + workspaceRegistered: !!settings.get('Cloud_Workspace_Client_Id'), + workspaceId: settings.get('Cloud_Workspace_Id'), + uniqueId: settings.get('uniqueID'), + token: '', + email: settings.get('Organization_Email'), + }; + + if (!info.email) { + const firstUser = Users.getOldest({ emails: 1 }); + info.email = firstUser?.emails?.[0]?.address; + } + + return info; +} diff --git a/app/cloud/server/functions/saveRegistrationData.js b/apps/meteor/app/cloud/server/functions/saveRegistrationData.js similarity index 94% rename from app/cloud/server/functions/saveRegistrationData.js rename to apps/meteor/app/cloud/server/functions/saveRegistrationData.js index 1bec537f8952..f9f5e3c05a9d 100644 --- a/app/cloud/server/functions/saveRegistrationData.js +++ b/apps/meteor/app/cloud/server/functions/saveRegistrationData.js @@ -1,4 +1,5 @@ -import { Settings } from '../../../models/server/raw'; +import { Settings } from '@rocket.chat/models'; + import { callbacks } from '../../../../lib/callbacks'; export function saveRegistrationData({ diff --git a/apps/meteor/app/cloud/server/functions/startRegisterWorkspace.ts b/apps/meteor/app/cloud/server/functions/startRegisterWorkspace.ts new file mode 100644 index 000000000000..a3a19810cafc --- /dev/null +++ b/apps/meteor/app/cloud/server/functions/startRegisterWorkspace.ts @@ -0,0 +1,45 @@ +import { HTTP } from 'meteor/http'; +import { Settings } from '@rocket.chat/models'; + +import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; +import { syncWorkspace } from './syncWorkspace'; +import { settings } from '../../../settings/server'; +import { buildWorkspaceRegistrationData } from './buildRegistrationData'; +import { SystemLogger } from '../../../../server/lib/logger/system'; + +export async function startRegisterWorkspace(resend = false) { + const { workspaceRegistered, connectToCloud } = retrieveRegistrationStatus(); + if ((workspaceRegistered && connectToCloud) || process.env.TEST_MODE) { + await syncWorkspace(true); + + return true; + } + + await Settings.updateValueById('Register_Server', true); + + const regInfo = await buildWorkspaceRegistrationData(undefined); + + const cloudUrl = settings.get('Cloud_Url'); + + let result; + try { + result = HTTP.post(`${cloudUrl}/api/v2/register/workspace?resend=${resend}`, { + data: regInfo, + }); + } catch (e: any) { + if (e.response?.data?.error) { + SystemLogger.error(`Failed to register with Rocket.Chat Cloud. ErrorCode: ${e.response.data.error}`); + } else { + SystemLogger.error(e); + } + return false; + } + const { data } = result; + if (!data) { + return false; + } + + await Settings.updateValueById('Cloud_Workspace_Id', data.id); + + return true; +} diff --git a/app/cloud/server/functions/startRegisterWorkspaceSetupWizard.ts b/apps/meteor/app/cloud/server/functions/startRegisterWorkspaceSetupWizard.ts similarity index 85% rename from app/cloud/server/functions/startRegisterWorkspaceSetupWizard.ts rename to apps/meteor/app/cloud/server/functions/startRegisterWorkspaceSetupWizard.ts index 463b4fe3e4b0..d0aa9e77045e 100644 --- a/app/cloud/server/functions/startRegisterWorkspaceSetupWizard.ts +++ b/apps/meteor/app/cloud/server/functions/startRegisterWorkspaceSetupWizard.ts @@ -1,9 +1,9 @@ import { HTTP } from 'meteor/http'; +import type { CloudRegistrationIntentData } from '@rocket.chat/core-typings'; import { settings } from '../../../settings/server'; import { buildWorkspaceRegistrationData } from './buildRegistrationData'; import { SystemLogger } from '../../../../server/lib/logger/system'; -import { CloudRegistrationIntentData } from '../../../../definition/ICloud'; export async function startRegisterWorkspaceSetupWizard(resend = false, email: string): Promise { const regInfo = await buildWorkspaceRegistrationData(email); @@ -14,8 +14,8 @@ export async function startRegisterWorkspaceSetupWizard(resend = false, email: s result = HTTP.post(`${cloudUrl}/api/v2/register/workspace/intent?resent=${resend}`, { data: regInfo, }); - } catch (e) { - if (e.response && e.response.data && e.response.data.error) { + } catch (e: any) { + if (e.response?.data?.error) { SystemLogger.error(`Failed to register with Rocket.Chat Cloud. ErrorCode: ${e.response.data.error}`); } else { SystemLogger.error(e); diff --git a/apps/meteor/app/cloud/server/functions/syncWorkspace.ts b/apps/meteor/app/cloud/server/functions/syncWorkspace.ts new file mode 100644 index 000000000000..72f0a2eb3351 --- /dev/null +++ b/apps/meteor/app/cloud/server/functions/syncWorkspace.ts @@ -0,0 +1,100 @@ +import { HTTP } from 'meteor/http'; +import { Settings } from '@rocket.chat/models'; + +import { buildWorkspaceRegistrationData } from './buildRegistrationData'; +import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; +import { getWorkspaceAccessToken } from './getWorkspaceAccessToken'; +import { getWorkspaceLicense } from './getWorkspaceLicense'; +import { settings } from '../../../settings/server'; +import { getAndCreateNpsSurvey } from '../../../../server/services/nps/getAndCreateNpsSurvey'; +import { NPS, Banner } from '../../../../server/sdk'; +import { SystemLogger } from '../../../../server/lib/logger/system'; + +export async function syncWorkspace(reconnectCheck = false) { + const { workspaceRegistered, connectToCloud } = retrieveRegistrationStatus(); + if (!workspaceRegistered || (!connectToCloud && !reconnectCheck)) { + return false; + } + + const info = await buildWorkspaceRegistrationData(undefined); + + const workspaceUrl = settings.get('Cloud_Workspace_Registration_Client_Uri'); + + let result; + try { + const headers: Record = {}; + const token = await getWorkspaceAccessToken(true); + + if (token) { + headers.Authorization = `Bearer ${token}`; + } else { + return false; + } + + result = HTTP.post(`${workspaceUrl}/client`, { + data: info, + headers, + }); + + await getWorkspaceLicense(); + } catch (e: any) { + if (e.response?.data?.error) { + SystemLogger.error(`Failed to sync with Rocket.Chat Cloud. Error: ${e.response.data.error}`); + } else { + SystemLogger.error(e); + } + + return false; + } + + const { data } = result; + if (!data) { + return true; + } + + if (data.publicKey) { + await Settings.updateValueById('Cloud_Workspace_PublicKey', data.publicKey); + } + + if (data.trial?.trialId) { + await Settings.updateValueById('Cloud_Workspace_Had_Trial', true); + } + + if (data.nps) { + const { id: npsId, expireAt } = data.nps; + + const startAt = new Date(data.nps.startAt); + + await NPS.create({ + npsId, + startAt, + expireAt: new Date(expireAt), + createdBy: { + _id: 'rocket.cat', + username: 'rocket.cat', + }, + }); + + const now = new Date(); + + if (startAt.getFullYear() === now.getFullYear() && startAt.getMonth() === now.getMonth() && startAt.getDate() === now.getDate()) { + getAndCreateNpsSurvey(npsId); + } + } + + // add banners + if (data.banners) { + for await (const banner of data.banners) { + const { createdAt, expireAt, startAt } = banner; + + await Banner.create({ + ...banner, + createdAt: new Date(createdAt), + expireAt: new Date(expireAt), + startAt: new Date(startAt), + }); + } + } + + return true; +} diff --git a/apps/meteor/app/cloud/server/functions/unregisterWorkspace.ts b/apps/meteor/app/cloud/server/functions/unregisterWorkspace.ts new file mode 100644 index 000000000000..e4023b6f66f7 --- /dev/null +++ b/apps/meteor/app/cloud/server/functions/unregisterWorkspace.ts @@ -0,0 +1,22 @@ +import { Settings } from '@rocket.chat/models'; + +import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; + +export async function unregisterWorkspace() { + const { workspaceRegistered } = retrieveRegistrationStatus(); + if (!workspaceRegistered) { + return true; + } + + await Promise.all([ + Settings.updateValueById('Cloud_Workspace_Id', null), + Settings.updateValueById('Cloud_Workspace_Name', null), + Settings.updateValueById('Cloud_Workspace_Client_Id', null), + Settings.updateValueById('Cloud_Workspace_Client_Secret', null), + Settings.updateValueById('Cloud_Workspace_Client_Secret_Expires_At', null), + Settings.updateValueById('Cloud_Workspace_PublicKey', null), + Settings.updateValueById('Cloud_Workspace_Registration_Client_Uri', null), + ]); + + return true; +} diff --git a/app/cloud/server/functions/userLoggedOut.js b/apps/meteor/app/cloud/server/functions/userLoggedOut.js similarity index 84% rename from app/cloud/server/functions/userLoggedOut.js rename to apps/meteor/app/cloud/server/functions/userLoggedOut.js index 6e08b878eb6f..ce1e6c6ac17b 100644 --- a/app/cloud/server/functions/userLoggedOut.js +++ b/apps/meteor/app/cloud/server/functions/userLoggedOut.js @@ -1,4 +1,4 @@ -import { Users } from '../../../models'; +import { Users } from '../../../models/server'; export function userLoggedOut(userId) { if (!userId) { diff --git a/app/cloud/server/functions/userLogout.js b/apps/meteor/app/cloud/server/functions/userLogout.js similarity index 93% rename from app/cloud/server/functions/userLogout.js rename to apps/meteor/app/cloud/server/functions/userLogout.js index cada35f809fc..6d2e917f347d 100644 --- a/app/cloud/server/functions/userLogout.js +++ b/apps/meteor/app/cloud/server/functions/userLogout.js @@ -2,8 +2,8 @@ import { HTTP } from 'meteor/http'; import { userLoggedOut } from './userLoggedOut'; import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; -import { Users } from '../../../models'; -import { settings } from '../../../settings'; +import { Users } from '../../../models/server'; +import { settings } from '../../../settings/server'; import { SystemLogger } from '../../../../server/lib/logger/system'; export function userLogout(userId) { diff --git a/apps/meteor/app/cloud/server/index.js b/apps/meteor/app/cloud/server/index.js new file mode 100644 index 000000000000..50dc3361a22c --- /dev/null +++ b/apps/meteor/app/cloud/server/index.js @@ -0,0 +1,60 @@ +import { Meteor } from 'meteor/meteor'; +import { SyncedCron } from 'meteor/littledata:synced-cron'; + +import './methods'; +import { getWorkspaceAccessToken } from './functions/getWorkspaceAccessToken'; +import { getWorkspaceAccessTokenWithScope } from './functions/getWorkspaceAccessTokenWithScope'; +import { getWorkspaceLicense } from './functions/getWorkspaceLicense'; +import { getUserCloudAccessToken } from './functions/getUserCloudAccessToken'; +import { retrieveRegistrationStatus } from './functions/retrieveRegistrationStatus'; +import { getWorkspaceKey } from './functions/getWorkspaceKey'; +import { syncWorkspace } from './functions/syncWorkspace'; +import { connectWorkspace } from './functions/connectWorkspace'; +import { settings } from '../../settings/server'; +import { SystemLogger } from '../../../server/lib/logger/system'; + +const licenseCronName = 'Cloud Workspace Sync'; + +Meteor.startup(function () { + // run token/license sync if registered + let TroubleshootDisableWorkspaceSync; + settings.watch('Troubleshoot_Disable_Workspace_Sync', (value) => { + if (TroubleshootDisableWorkspaceSync === value) { + return; + } + TroubleshootDisableWorkspaceSync = value; + + if (value) { + return SyncedCron.remove(licenseCronName); + } + + Meteor.defer(() => syncWorkspace()); + + SyncedCron.add({ + name: licenseCronName, + schedule(parser) { + // Every 12 hours + return parser.cron('0 */12 * * *'); + }, + job: syncWorkspace, + }); + }); + + const { workspaceRegistered } = retrieveRegistrationStatus(); + + if (process.env.REG_TOKEN && process.env.REG_TOKEN !== '' && !workspaceRegistered) { + try { + SystemLogger.info('REG_TOKEN Provided. Attempting to register'); + + if (!Promise.await(connectWorkspace(process.env.REG_TOKEN))) { + throw new Error("Couldn't register with token. Please make sure token is valid or hasn't already been used"); + } + + console.log('Successfully registered with token provided by REG_TOKEN!'); + } catch (e) { + SystemLogger.error('An error occured registering with token.', e.message); + } + } +}); + +export { getWorkspaceAccessToken, getWorkspaceAccessTokenWithScope, getWorkspaceLicense, getWorkspaceKey, getUserCloudAccessToken }; diff --git a/app/cloud/server/license.js b/apps/meteor/app/cloud/server/license.js similarity index 100% rename from app/cloud/server/license.js rename to apps/meteor/app/cloud/server/license.js diff --git a/app/cloud/server/methods.js b/apps/meteor/app/cloud/server/methods.js similarity index 100% rename from app/cloud/server/methods.js rename to apps/meteor/app/cloud/server/methods.js diff --git a/app/cloud/server/oauthScopes.js b/apps/meteor/app/cloud/server/oauthScopes.js similarity index 100% rename from app/cloud/server/oauthScopes.js rename to apps/meteor/app/cloud/server/oauthScopes.js diff --git a/app/colors/client/client.js b/apps/meteor/app/colors/client/client.js similarity index 100% rename from app/colors/client/client.js rename to apps/meteor/app/colors/client/client.js diff --git a/app/colors/client/index.js b/apps/meteor/app/colors/client/index.js similarity index 100% rename from app/colors/client/index.js rename to apps/meteor/app/colors/client/index.js diff --git a/app/colors/client/style.css b/apps/meteor/app/colors/client/style.css similarity index 100% rename from app/colors/client/style.css rename to apps/meteor/app/colors/client/style.css diff --git a/app/colors/server/index.js b/apps/meteor/app/colors/server/index.js similarity index 100% rename from app/colors/server/index.js rename to apps/meteor/app/colors/server/index.js diff --git a/app/colors/server/settings.ts b/apps/meteor/app/colors/server/settings.ts similarity index 100% rename from app/colors/server/settings.ts rename to apps/meteor/app/colors/server/settings.ts diff --git a/app/cors/client/index.js b/apps/meteor/app/cors/client/index.js similarity index 100% rename from app/cors/client/index.js rename to apps/meteor/app/cors/client/index.js diff --git a/app/cors/server/cors.js b/apps/meteor/app/cors/server/cors.js similarity index 98% rename from app/cors/server/cors.js rename to apps/meteor/app/cors/server/cors.js index 5f4e9db2a34b..c4f3c9e7693c 100644 --- a/app/cors/server/cors.js +++ b/apps/meteor/app/cors/server/cors.js @@ -5,7 +5,7 @@ import { WebApp, WebAppInternals } from 'meteor/webapp'; import _ from 'underscore'; import { settings } from '../../settings/server'; -import { Logger } from '../../logger'; +import { Logger } from '../../logger/server'; const logger = new Logger('CORS'); diff --git a/app/cors/server/index.js b/apps/meteor/app/cors/server/index.js similarity index 100% rename from app/cors/server/index.js rename to apps/meteor/app/cors/server/index.js diff --git a/app/crowd/client/index.js b/apps/meteor/app/crowd/client/index.js similarity index 100% rename from app/crowd/client/index.js rename to apps/meteor/app/crowd/client/index.js diff --git a/app/crowd/client/loginHelper.js b/apps/meteor/app/crowd/client/loginHelper.js similarity index 100% rename from app/crowd/client/loginHelper.js rename to apps/meteor/app/crowd/client/loginHelper.js diff --git a/app/crowd/server/crowd.js b/apps/meteor/app/crowd/server/crowd.js similarity index 98% rename from app/crowd/server/crowd.js rename to apps/meteor/app/crowd/server/crowd.js index 9f806d3246a5..535e4e130b74 100644 --- a/app/crowd/server/crowd.js +++ b/apps/meteor/app/crowd/server/crowd.js @@ -7,7 +7,7 @@ import { Logger } from '../../logger/server'; import { _setRealName } from '../../lib/server'; import { Users } from '../../models/server'; import { settings } from '../../settings/server'; -import { hasRole } from '../../authorization/server'; +import { hasPermission } from '../../authorization/server'; import { deleteUser } from '../../lib/server/functions'; import { setUserActiveStatus } from '../../lib/server/functions/setUserActiveStatus'; @@ -344,7 +344,7 @@ Meteor.methods({ }); } - if (!hasRole(user._id, 'admin')) { + if (!hasPermission(user._id, 'test-admin-options')) { throw new Meteor.Error('error-not-authorized', 'Not authorized', { method: 'crowd_test_connection', }); @@ -375,7 +375,7 @@ Meteor.methods({ throw new Meteor.Error('crowd_disabled'); } - if (!hasRole(user._id, 'admin')) { + if (!hasPermission(user._id, 'sync-auth-services-users')) { throw new Meteor.Error('error-not-authorized', 'Not authorized', { method: 'crowd_sync_users', }); diff --git a/app/crowd/server/index.js b/apps/meteor/app/crowd/server/index.js similarity index 100% rename from app/crowd/server/index.js rename to apps/meteor/app/crowd/server/index.js diff --git a/app/crowd/server/settings.ts b/apps/meteor/app/crowd/server/settings.ts similarity index 100% rename from app/crowd/server/settings.ts rename to apps/meteor/app/crowd/server/settings.ts diff --git a/app/custom-oauth/.gitignore b/apps/meteor/app/custom-oauth/.gitignore similarity index 100% rename from app/custom-oauth/.gitignore rename to apps/meteor/app/custom-oauth/.gitignore diff --git a/app/custom-oauth/README.md b/apps/meteor/app/custom-oauth/README.md similarity index 100% rename from app/custom-oauth/README.md rename to apps/meteor/app/custom-oauth/README.md diff --git a/app/custom-oauth/client/custom_oauth_client.js b/apps/meteor/app/custom-oauth/client/custom_oauth_client.js similarity index 95% rename from app/custom-oauth/client/custom_oauth_client.js rename to apps/meteor/app/custom-oauth/client/custom_oauth_client.js index 380dad6719bc..efb73d898dd2 100644 --- a/app/custom-oauth/client/custom_oauth_client.js +++ b/apps/meteor/app/custom-oauth/client/custom_oauth_client.js @@ -7,7 +7,7 @@ import { ServiceConfiguration } from 'meteor/service-configuration'; import { OAuth } from 'meteor/oauth'; import './swapSessionStorage'; -import { isURL } from '../../utils/lib/isURL'; +import { isURL } from '../../../lib/utils/isURL'; // Request custom OAuth credentials for the user // @param options {optional} @@ -49,6 +49,7 @@ export class CustomOAuth { this.serverURL = options.serverURL; this.authorizePath = options.authorizePath; this.scope = options.scope; + this.responseType = options.responseType || 'code'; if (!isURL(this.authorizePath)) { this.authorizePath = this.serverURL + this.authorizePath; @@ -93,7 +94,7 @@ export class CustomOAuth { const loginUrl = `${this.authorizePath}${separator}client_id=${config.clientId}&redirect_uri=${encodeURIComponent( OAuth._redirectUri(this.name, config), - )}&response_type=code` + + )}&response_type=${encodeURIComponent(this.responseType)}` + `&state=${encodeURIComponent(OAuth._stateParam(loginStyle, credentialToken, options.redirectUrl))}&scope=${encodeURIComponent( this.scope, )}`; diff --git a/app/custom-oauth/client/swapSessionStorage.js b/apps/meteor/app/custom-oauth/client/swapSessionStorage.js similarity index 100% rename from app/custom-oauth/client/swapSessionStorage.js rename to apps/meteor/app/custom-oauth/client/swapSessionStorage.js diff --git a/app/custom-oauth/index.js b/apps/meteor/app/custom-oauth/index.js similarity index 100% rename from app/custom-oauth/index.js rename to apps/meteor/app/custom-oauth/index.js diff --git a/apps/meteor/app/custom-oauth/server/custom_oauth_server.d.ts b/apps/meteor/app/custom-oauth/server/custom_oauth_server.d.ts new file mode 100644 index 000000000000..e0554f0b609a --- /dev/null +++ b/apps/meteor/app/custom-oauth/server/custom_oauth_server.d.ts @@ -0,0 +1,5 @@ +export class CustomOAuth { + constructor(name: string, options: Record); + + getIdentity(accessToken: string, query: Record): any; +} diff --git a/app/custom-oauth/server/custom_oauth_server.js b/apps/meteor/app/custom-oauth/server/custom_oauth_server.js similarity index 98% rename from app/custom-oauth/server/custom_oauth_server.js rename to apps/meteor/app/custom-oauth/server/custom_oauth_server.js index 8c2f87517dc0..25c5ef82ed88 100644 --- a/app/custom-oauth/server/custom_oauth_server.js +++ b/apps/meteor/app/custom-oauth/server/custom_oauth_server.js @@ -8,8 +8,8 @@ import _ from 'underscore'; import { normalizers, fromTemplate, renameInvalidProperties } from './transform_helpers'; import { Logger } from '../../logger'; -import { Users } from '../../models'; -import { isURL } from '../../utils/lib/isURL'; +import { Users } from '../../models/server'; +import { isURL } from '../../../lib/utils/isURL'; import { registerAccessTokenService } from '../../lib/server/oauth/oauth'; import { callbacks } from '../../../lib/callbacks'; @@ -191,7 +191,7 @@ export class CustomOAuth { const self = this; OAuth.registerService(this.name, 2, null, (query) => { const response = self.getAccessToken(query); - const identity = self.getIdentity(response.access_token); + const identity = self.getIdentity(response.access_token, query); const serviceData = { _OAuthCustom: true, diff --git a/app/custom-oauth/server/transform_helpers.js b/apps/meteor/app/custom-oauth/server/transform_helpers.js similarity index 100% rename from app/custom-oauth/server/transform_helpers.js rename to apps/meteor/app/custom-oauth/server/transform_helpers.js diff --git a/app/custom-sounds/client/index.js b/apps/meteor/app/custom-sounds/client/index.js similarity index 100% rename from app/custom-sounds/client/index.js rename to apps/meteor/app/custom-sounds/client/index.js diff --git a/app/custom-sounds/client/lib/CustomSounds.js b/apps/meteor/app/custom-sounds/client/lib/CustomSounds.js similarity index 79% rename from app/custom-sounds/client/lib/CustomSounds.js rename to apps/meteor/app/custom-sounds/client/lib/CustomSounds.js index 7cea36be304c..5ab704946619 100644 --- a/app/custom-sounds/client/lib/CustomSounds.js +++ b/apps/meteor/app/custom-sounds/client/lib/CustomSounds.js @@ -33,6 +33,26 @@ class CustomSoundsClass { extension: 'mp3', src: getURL('sounds/seasons.mp3'), }); + this.add({ + _id: 'telephone', + name: 'Telephone', + extension: 'mp3', + src: getURL('sounds/telephone.mp3'), + }); + this.add({ + _id: 'outbound-call-ringing', + name: 'Outbound Call Ringing', + extension: 'mp3', + src: getURL('sounds/outbound-call-ringing.mp3'), + }); + this.add({ + _id: 'call-ended', + name: 'Call Ended', + extension: 'mp3', + src: getURL('sounds/call-ended.mp3'), + }); + this.add({ _id: 'dialtone', name: 'Dialtone', extension: 'mp3', src: getURL('sounds/dialtone.mp3') }); + this.add({ _id: 'ringtone', name: 'Ringtone', extension: 'mp3', src: getURL('sounds/ringtone.mp3') }); } add(sound) { @@ -102,6 +122,12 @@ class CustomSoundsClass { audio.currentTime = 0; } }; + + isPlaying = (sound) => { + const audio = document.querySelector(`#${getCustomSoundId(sound)}`); + + return audio && audio.duration > 0 && !audio.paused; + }; } export const CustomSounds = new CustomSoundsClass(); diff --git a/app/custom-sounds/client/notifications/deleteCustomSound.js b/apps/meteor/app/custom-sounds/client/notifications/deleteCustomSound.js similarity index 100% rename from app/custom-sounds/client/notifications/deleteCustomSound.js rename to apps/meteor/app/custom-sounds/client/notifications/deleteCustomSound.js diff --git a/app/custom-sounds/client/notifications/updateCustomSound.js b/apps/meteor/app/custom-sounds/client/notifications/updateCustomSound.js similarity index 100% rename from app/custom-sounds/client/notifications/updateCustomSound.js rename to apps/meteor/app/custom-sounds/client/notifications/updateCustomSound.js diff --git a/app/custom-sounds/server/index.js b/apps/meteor/app/custom-sounds/server/index.js similarity index 100% rename from app/custom-sounds/server/index.js rename to apps/meteor/app/custom-sounds/server/index.js diff --git a/apps/meteor/app/custom-sounds/server/methods/deleteCustomSound.js b/apps/meteor/app/custom-sounds/server/methods/deleteCustomSound.js new file mode 100644 index 000000000000..1a51820ec6e8 --- /dev/null +++ b/apps/meteor/app/custom-sounds/server/methods/deleteCustomSound.js @@ -0,0 +1,30 @@ +import { Meteor } from 'meteor/meteor'; +import { CustomSounds } from '@rocket.chat/models'; + +import { hasPermission } from '../../../authorization/server'; +import { api } from '../../../../server/sdk/api'; +import { RocketChatFileCustomSoundsInstance } from '../startup/custom-sounds'; + +Meteor.methods({ + async deleteCustomSound(_id) { + let sound = null; + + if (hasPermission(this.userId, 'manage-sounds')) { + sound = await CustomSounds.findOneById(_id); + } else { + throw new Meteor.Error('not_authorized'); + } + + if (sound == null) { + throw new Meteor.Error('Custom_Sound_Error_Invalid_Sound', 'Invalid sound', { + method: 'deleteCustomSound', + }); + } + + RocketChatFileCustomSoundsInstance.deleteFile(`${sound._id}.${sound.extension}`); + await CustomSounds.removeById(_id); + api.broadcast('notify.deleteCustomSound', { soundData: sound }); + + return true; + }, +}); diff --git a/app/custom-sounds/server/methods/insertOrUpdateSound.js b/apps/meteor/app/custom-sounds/server/methods/insertOrUpdateSound.js similarity index 90% rename from app/custom-sounds/server/methods/insertOrUpdateSound.js rename to apps/meteor/app/custom-sounds/server/methods/insertOrUpdateSound.js index 6aed25e4ead7..d5cf8ae377bc 100644 --- a/app/custom-sounds/server/methods/insertOrUpdateSound.js +++ b/apps/meteor/app/custom-sounds/server/methods/insertOrUpdateSound.js @@ -1,10 +1,10 @@ import { Meteor } from 'meteor/meteor'; import s from 'underscore.string'; import { check } from 'meteor/check'; +import { CustomSounds } from '@rocket.chat/models'; -import { hasPermission } from '../../../authorization'; -import { CustomSounds } from '../../../models/server/raw'; -import { Notifications } from '../../../notifications'; +import { hasPermission } from '../../../authorization/server'; +import { api } from '../../../../server/sdk/api'; import { RocketChatFileCustomSoundsInstance } from '../startup/custom-sounds'; Meteor.methods({ @@ -71,7 +71,7 @@ Meteor.methods({ if (soundData.name !== soundData.previousName) { await CustomSounds.setName(soundData._id, soundData.name); - Notifications.notifyAll('updateCustomSound', { soundData }); + api.broadcast('notify.updateCustomSound', { soundData }); } return soundData._id; diff --git a/apps/meteor/app/custom-sounds/server/methods/listCustomSounds.js b/apps/meteor/app/custom-sounds/server/methods/listCustomSounds.js new file mode 100644 index 000000000000..c22506e42ed1 --- /dev/null +++ b/apps/meteor/app/custom-sounds/server/methods/listCustomSounds.js @@ -0,0 +1,8 @@ +import { Meteor } from 'meteor/meteor'; +import { CustomSounds } from '@rocket.chat/models'; + +Meteor.methods({ + async listCustomSounds() { + return CustomSounds.find({}).toArray(); + }, +}); diff --git a/apps/meteor/app/custom-sounds/server/methods/uploadCustomSound.js b/apps/meteor/app/custom-sounds/server/methods/uploadCustomSound.js new file mode 100644 index 000000000000..633903348702 --- /dev/null +++ b/apps/meteor/app/custom-sounds/server/methods/uploadCustomSound.js @@ -0,0 +1,26 @@ +import { Meteor } from 'meteor/meteor'; + +import { hasPermission } from '../../../authorization/server'; +import { api } from '../../../../server/sdk/api'; +import { RocketChatFile } from '../../../file/server'; +import { RocketChatFileCustomSoundsInstance } from '../startup/custom-sounds'; + +Meteor.methods({ + uploadCustomSound(binaryContent, contentType, soundData) { + if (!hasPermission(this.userId, 'manage-sounds')) { + throw new Meteor.Error('not_authorized'); + } + + const file = Buffer.from(binaryContent, 'binary'); + + const rs = RocketChatFile.bufferToStream(file); + RocketChatFileCustomSoundsInstance.deleteFile(`${soundData._id}.${soundData.extension}`); + const ws = RocketChatFileCustomSoundsInstance.createWriteStream(`${soundData._id}.${soundData.extension}`, contentType); + ws.on( + 'end', + setTimeout(() => api.broadcast('notify.updateCustomSound', { soundData }), 500), + ); + + rs.pipe(ws); + }, +}); diff --git a/app/custom-sounds/server/startup/custom-sounds.js b/apps/meteor/app/custom-sounds/server/startup/custom-sounds.js similarity index 100% rename from app/custom-sounds/server/startup/custom-sounds.js rename to apps/meteor/app/custom-sounds/server/startup/custom-sounds.js diff --git a/app/custom-sounds/server/startup/settings.ts b/apps/meteor/app/custom-sounds/server/startup/settings.ts similarity index 100% rename from app/custom-sounds/server/startup/settings.ts rename to apps/meteor/app/custom-sounds/server/startup/settings.ts diff --git a/app/custom/client/index.js b/apps/meteor/app/custom/client/index.js similarity index 100% rename from app/custom/client/index.js rename to apps/meteor/app/custom/client/index.js diff --git a/app/custom/server/index.js b/apps/meteor/app/custom/server/index.js similarity index 100% rename from app/custom/server/index.js rename to apps/meteor/app/custom/server/index.js diff --git a/apps/meteor/app/discussion/client/createDiscussionMessageAction.ts b/apps/meteor/app/discussion/client/createDiscussionMessageAction.ts new file mode 100644 index 000000000000..2b99ff50a022 --- /dev/null +++ b/apps/meteor/app/discussion/client/createDiscussionMessageAction.ts @@ -0,0 +1,63 @@ +import { Meteor } from 'meteor/meteor'; +import { Tracker } from 'meteor/tracker'; + +import { settings } from '../../settings/client'; +import { hasPermission } from '../../authorization/client'; +import { MessageAction } from '../../ui-utils/client'; +import { messageArgs } from '../../../client/lib/utils/messageArgs'; +import { imperativeModal } from '../../../client/lib/imperativeModal'; +import CreateDiscussion from '../../../client/components/CreateDiscussion/CreateDiscussion'; +import { roomCoordinator } from '../../../client/lib/rooms/roomCoordinator'; + +Meteor.startup(function () { + Tracker.autorun(() => { + if (!settings.get('Discussion_enabled')) { + return MessageAction.removeButton('start-discussion'); + } + + MessageAction.addButton({ + id: 'start-discussion', + icon: 'discussion', + label: 'Discussion_start', + context: ['message', 'message-mobile'], + async action(_, props) { + const { message = messageArgs(this).msg, room } = props; + + imperativeModal.open({ + component: CreateDiscussion, + props: { + defaultParentRoom: room?.prid || room?._id, + onClose: imperativeModal.close, + parentMessageId: message._id, + nameSuggestion: message?.msg?.substr(0, 140), + }, + }); + }, + condition({ + message: { + u: { _id: uid }, + drid, + dcount, + }, + room, + subscription, + user, + }) { + if (drid || !Number.isNaN(dcount)) { + return false; + } + if (!subscription) { + return false; + } + const isLivechatRoom = roomCoordinator.isLivechatRoom(room.t); + if (isLivechatRoom) { + return false; + } + + return uid !== user._id ? hasPermission('start-discussion-other-user') : hasPermission('start-discussion'); + }, + order: 1, + group: 'menu', + }); + }); +}); diff --git a/app/discussion/client/discussionFromMessageBox.js b/apps/meteor/app/discussion/client/discussionFromMessageBox.js similarity index 100% rename from app/discussion/client/discussionFromMessageBox.js rename to apps/meteor/app/discussion/client/discussionFromMessageBox.js diff --git a/apps/meteor/app/discussion/client/index.js b/apps/meteor/app/discussion/client/index.js new file mode 100644 index 000000000000..25f06f1a7bb4 --- /dev/null +++ b/apps/meteor/app/discussion/client/index.js @@ -0,0 +1,5 @@ +// Other UI extensions +import './lib/messageTypes/discussionMessage'; +import './createDiscussionMessageAction'; +import './discussionFromMessageBox'; +import './tabBar'; diff --git a/app/discussion/client/lib/messageTypes/discussionMessage.js b/apps/meteor/app/discussion/client/lib/messageTypes/discussionMessage.js similarity index 100% rename from app/discussion/client/lib/messageTypes/discussionMessage.js rename to apps/meteor/app/discussion/client/lib/messageTypes/discussionMessage.js diff --git a/apps/meteor/app/discussion/client/tabBar.ts b/apps/meteor/app/discussion/client/tabBar.ts new file mode 100644 index 000000000000..a9bece626e54 --- /dev/null +++ b/apps/meteor/app/discussion/client/tabBar.ts @@ -0,0 +1,32 @@ +import { useMemo, lazy } from 'react'; +import { useSetting } from '@rocket.chat/ui-contexts'; +import { isRoomFederated } from '@rocket.chat/core-typings'; + +import { addAction } from '../../../client/views/room/lib/Toolbox'; + +const template = lazy(() => import('../../../client/views/room/contextualBar/Discussions')); + +addAction('discussions', ({ room }) => { + const discussionEnabled = useSetting('Discussion_enabled'); + const federated = isRoomFederated(room); + + return useMemo( + () => + discussionEnabled && !room.prid + ? { + groups: ['channel', 'group', 'direct', 'direct_multiple', 'team'], + id: 'discussions', + title: 'Discussions', + icon: 'discussion', + template, + full: true, + ...(federated && { + 'disabled': true, + 'data-tooltip': 'Discussions_unavailable_for_federation', + }), + order: 3, + } + : null, + [discussionEnabled, room.prid, federated], + ); +}); diff --git a/app/discussion/client/views/DiscussionTabbar.html b/apps/meteor/app/discussion/client/views/DiscussionTabbar.html similarity index 100% rename from app/discussion/client/views/DiscussionTabbar.html rename to apps/meteor/app/discussion/client/views/DiscussionTabbar.html diff --git a/app/discussion/server/config.ts b/apps/meteor/app/discussion/server/config.ts similarity index 100% rename from app/discussion/server/config.ts rename to apps/meteor/app/discussion/server/config.ts diff --git a/app/discussion/server/hooks/joinDiscussionOnMessage.js b/apps/meteor/app/discussion/server/hooks/joinDiscussionOnMessage.js similarity index 100% rename from app/discussion/server/hooks/joinDiscussionOnMessage.js rename to apps/meteor/app/discussion/server/hooks/joinDiscussionOnMessage.js diff --git a/app/discussion/server/hooks/propagateDiscussionMetadata.js b/apps/meteor/app/discussion/server/hooks/propagateDiscussionMetadata.js similarity index 100% rename from app/discussion/server/hooks/propagateDiscussionMetadata.js rename to apps/meteor/app/discussion/server/hooks/propagateDiscussionMetadata.js diff --git a/apps/meteor/app/discussion/server/index.js b/apps/meteor/app/discussion/server/index.js new file mode 100644 index 000000000000..4ae84cfb1c55 --- /dev/null +++ b/apps/meteor/app/discussion/server/index.js @@ -0,0 +1,7 @@ +import './config'; +import './permissions'; + +import './hooks/propagateDiscussionMetadata'; + +// Methods +import './methods/createDiscussion'; diff --git a/app/discussion/server/methods/createDiscussion.js b/apps/meteor/app/discussion/server/methods/createDiscussion.js similarity index 97% rename from app/discussion/server/methods/createDiscussion.js rename to apps/meteor/app/discussion/server/methods/createDiscussion.js index 6868608d6c59..212201f2b293 100644 --- a/app/discussion/server/methods/createDiscussion.js +++ b/apps/meteor/app/discussion/server/methods/createDiscussion.js @@ -7,8 +7,8 @@ import { hasAtLeastOnePermission, canSendMessage } from '../../../authorization/ import { Messages, Rooms } from '../../../models/server'; import { createRoom, addUserToRoom, sendMessage, attachMessage } from '../../../lib/server'; import { settings } from '../../../settings/server'; -import { roomTypes } from '../../../utils/server'; import { callbacks } from '../../../../lib/callbacks'; +import { roomCoordinator } from '../../../../server/lib/rooms/roomCoordinator'; const getParentRoom = (rid) => { const room = Rooms.findOne(rid); @@ -111,7 +111,7 @@ const create = ({ prid, pmid, t_name, reply, users, user, encrypted }) => { // auto invite the replied message owner const invitedUsers = message ? [message.u.username, ...users] : users; - const type = roomTypes.getConfig(p_room.t).getDiscussionType(); + const type = roomCoordinator.getRoomDirectives(p_room.t)?.getDiscussionType(); const description = p_room.encrypted ? '' : message.msg; const topic = p_room.name; diff --git a/apps/meteor/app/discussion/server/permissions.ts b/apps/meteor/app/discussion/server/permissions.ts new file mode 100644 index 000000000000..fcd2412a77ea --- /dev/null +++ b/apps/meteor/app/discussion/server/permissions.ts @@ -0,0 +1,14 @@ +import { Meteor } from 'meteor/meteor'; +import { Permissions } from '@rocket.chat/models'; + +Meteor.startup(() => { + // Add permissions for discussion + const permissions = [ + { _id: 'start-discussion', roles: ['admin', 'user', 'guest', 'app'] }, + { _id: 'start-discussion-other-user', roles: ['admin', 'user', 'owner', 'app'] }, + ]; + + for (const permission of permissions) { + Permissions.create(permission._id, permission.roles); + } +}); diff --git a/app/dolphin/client/index.js b/apps/meteor/app/dolphin/client/index.js similarity index 100% rename from app/dolphin/client/index.js rename to apps/meteor/app/dolphin/client/index.js diff --git a/app/dolphin/client/login-button.css b/apps/meteor/app/dolphin/client/login-button.css similarity index 100% rename from app/dolphin/client/login-button.css rename to apps/meteor/app/dolphin/client/login-button.css diff --git a/apps/meteor/app/dolphin/lib/common.js b/apps/meteor/app/dolphin/lib/common.js new file mode 100644 index 000000000000..d9a901cedda0 --- /dev/null +++ b/apps/meteor/app/dolphin/lib/common.js @@ -0,0 +1,63 @@ +import { Meteor } from 'meteor/meteor'; +import { Tracker } from 'meteor/tracker'; +import { ServiceConfiguration } from 'meteor/service-configuration'; + +import { settings } from '../../settings'; +import { CustomOAuth } from '../../custom-oauth'; +import { callbacks } from '../../../lib/callbacks'; + +const config = { + serverURL: '', + authorizePath: '/m/oauth2/auth/', + tokenPath: '/m/oauth2/token/', + identityPath: '/m/oauth2/api/me/', + scope: 'basic', + addAutopublishFields: { + forLoggedInUser: ['services.dolphin'], + forOtherUsers: ['services.dolphin.name'], + }, + accessTokenParam: 'access_token', +}; + +const Dolphin = new CustomOAuth('dolphin', config); + +function DolphinOnCreateUser(options, user) { + if (user && user.services && user.services.dolphin && user.services.dolphin.NickName) { + user.username = user.services.dolphin.NickName; + } + return options; +} + +if (Meteor.isServer) { + Meteor.startup(() => + settings.watch('Accounts_OAuth_Dolphin_URL', (value) => { + config.serverURL = value; + return Dolphin.configure(config); + }), + ); + + if (settings.get('Accounts_OAuth_Dolphin_URL')) { + const data = { + buttonLabelText: settings.get('Accounts_OAuth_Dolphin_button_label_text'), + buttonColor: settings.get('Accounts_OAuth_Dolphin_button_color'), + buttonLabelColor: settings.get('Accounts_OAuth_Dolphin_button_label_color'), + clientId: settings.get('Accounts_OAuth_Dolphin_id'), + secret: settings.get('Accounts_OAuth_Dolphin_secret'), + serverURL: settings.get('Accounts_OAuth_Dolphin_URL'), + loginStyle: settings.get('Accounts_OAuth_Dolphin_login_style'), + }; + + ServiceConfiguration.configurations.upsert({ service: 'dolphin' }, { $set: data }); + } + + callbacks.add('beforeCreateUser', DolphinOnCreateUser, callbacks.priority.HIGH, 'dolphin'); +} else { + Meteor.startup(() => + Tracker.autorun(function () { + if (settings.get('Accounts_OAuth_Dolphin_URL')) { + config.serverURL = settings.get('Accounts_OAuth_Dolphin_URL'); + return Dolphin.configure(config); + } + }), + ); +} diff --git a/app/dolphin/server/index.js b/apps/meteor/app/dolphin/server/index.js similarity index 100% rename from app/dolphin/server/index.js rename to apps/meteor/app/dolphin/server/index.js diff --git a/app/dolphin/server/startup.ts b/apps/meteor/app/dolphin/server/startup.ts similarity index 100% rename from app/dolphin/server/startup.ts rename to apps/meteor/app/dolphin/server/startup.ts diff --git a/app/drupal/README.md b/apps/meteor/app/drupal/README.md similarity index 100% rename from app/drupal/README.md rename to apps/meteor/app/drupal/README.md diff --git a/app/drupal/client/index.js b/apps/meteor/app/drupal/client/index.js similarity index 100% rename from app/drupal/client/index.js rename to apps/meteor/app/drupal/client/index.js diff --git a/app/drupal/client/login-button.css b/apps/meteor/app/drupal/client/login-button.css similarity index 100% rename from app/drupal/client/login-button.css rename to apps/meteor/app/drupal/client/login-button.css diff --git a/apps/meteor/app/drupal/lib/common.js b/apps/meteor/app/drupal/lib/common.js new file mode 100644 index 000000000000..9090b3d75e2e --- /dev/null +++ b/apps/meteor/app/drupal/lib/common.js @@ -0,0 +1,44 @@ +import { Meteor } from 'meteor/meteor'; +import { Tracker } from 'meteor/tracker'; + +import { settings } from '../../settings'; +import { CustomOAuth } from '../../custom-oauth'; + +// Drupal Server CallBack URL needs to be http(s)://{rocketchat.server}[:port]/_oauth/drupal +// In RocketChat -> Administration the URL needs to be http(s)://{drupal.server}/ + +const config = { + serverURL: '', + identityPath: '/oauth2/UserInfo', + authorizePath: '/oauth2/authorize', + tokenPath: '/oauth2/token', + scope: 'openid email profile offline_access', + tokenSentVia: 'payload', + usernameField: 'preferred_username', + mergeUsers: true, + addAutopublishFields: { + forLoggedInUser: ['services.drupal'], + forOtherUsers: ['services.drupal.name'], + }, + accessTokenParam: 'access_token', +}; + +const Drupal = new CustomOAuth('drupal', config); + +if (Meteor.isServer) { + Meteor.startup(function () { + settings.watch('API_Drupal_URL', function (value) { + config.serverURL = value; + Drupal.configure(config); + }); + }); +} else { + Meteor.startup(function () { + Tracker.autorun(function () { + if (settings.get('API_Drupal_URL')) { + config.serverURL = settings.get('API_Drupal_URL'); + Drupal.configure(config); + } + }); + }); +} diff --git a/app/drupal/server/index.js b/apps/meteor/app/drupal/server/index.js similarity index 100% rename from app/drupal/server/index.js rename to apps/meteor/app/drupal/server/index.js diff --git a/app/drupal/server/startup.ts b/apps/meteor/app/drupal/server/startup.ts similarity index 100% rename from app/drupal/server/startup.ts rename to apps/meteor/app/drupal/server/startup.ts diff --git a/app/e2e/client/E2ERoomState.ts b/apps/meteor/app/e2e/client/E2ERoomState.ts similarity index 100% rename from app/e2e/client/E2ERoomState.ts rename to apps/meteor/app/e2e/client/E2ERoomState.ts diff --git a/app/e2e/client/events.js b/apps/meteor/app/e2e/client/events.js similarity index 100% rename from app/e2e/client/events.js rename to apps/meteor/app/e2e/client/events.js diff --git a/apps/meteor/app/e2e/client/helper.js b/apps/meteor/app/e2e/client/helper.js new file mode 100644 index 000000000000..8aec8db794d3 --- /dev/null +++ b/apps/meteor/app/e2e/client/helper.js @@ -0,0 +1,153 @@ +/* eslint-disable new-cap, no-proto */ + +import ByteBuffer from 'bytebuffer'; + +import { getRandomFraction } from '../../../lib/random'; + +const StaticArrayBufferProto = new ArrayBuffer().__proto__; + +export function toString(thing) { + if (typeof thing === 'string') { + return thing; + } + return new ByteBuffer.wrap(thing).toString('binary'); +} + +export function toArrayBuffer(thing) { + if (thing === undefined) { + return undefined; + } + if (thing === Object(thing)) { + if (thing.__proto__ === StaticArrayBufferProto) { + return thing; + } + } + + if (typeof thing !== 'string') { + throw new Error(`Tried to convert a non-string of type ${typeof thing} to an array buffer`); + } + return new ByteBuffer.wrap(thing, 'binary').toArrayBuffer(); +} + +export function joinVectorAndEcryptedData(vector, encryptedData) { + const cipherText = new Uint8Array(encryptedData); + const output = new Uint8Array(vector.length + cipherText.length); + output.set(vector, 0); + output.set(cipherText, vector.length); + return output; +} + +export function splitVectorAndEcryptedData(cipherText) { + const vector = cipherText.slice(0, 16); + const encryptedData = cipherText.slice(16); + + return [vector, encryptedData]; +} + +export async function encryptRSA(key, data) { + return crypto.subtle.encrypt({ name: 'RSA-OAEP' }, key, data); +} + +export async function encryptAES(vector, key, data) { + return crypto.subtle.encrypt({ name: 'AES-CBC', iv: vector }, key, data); +} + +export async function decryptRSA(key, data) { + return crypto.subtle.decrypt({ name: 'RSA-OAEP' }, key, data); +} + +export async function decryptAES(vector, key, data) { + return crypto.subtle.decrypt({ name: 'AES-CBC', iv: vector }, key, data); +} + +export async function generateAESKey() { + return crypto.subtle.generateKey({ name: 'AES-CBC', length: 128 }, true, ['encrypt', 'decrypt']); +} + +export async function generateRSAKey() { + return crypto.subtle.generateKey( + { + name: 'RSA-OAEP', + modulusLength: 2048, + publicExponent: new Uint8Array([0x01, 0x00, 0x01]), + hash: { name: 'SHA-256' }, + }, + true, + ['encrypt', 'decrypt'], + ); +} + +export async function exportJWKKey(key) { + return crypto.subtle.exportKey('jwk', key); +} + +export async function importRSAKey(keyData, keyUsages = ['encrypt', 'decrypt']) { + return crypto.subtle.importKey( + 'jwk', + keyData, + { + name: 'RSA-OAEP', + modulusLength: 2048, + publicExponent: new Uint8Array([0x01, 0x00, 0x01]), + hash: { name: 'SHA-256' }, + }, + true, + keyUsages, + ); +} + +export async function importAESKey(keyData, keyUsages = ['encrypt', 'decrypt']) { + return crypto.subtle.importKey('jwk', keyData, { name: 'AES-CBC' }, true, keyUsages); +} + +export async function importRawKey(keyData, keyUsages = ['deriveKey']) { + return crypto.subtle.importKey('raw', keyData, { name: 'PBKDF2' }, false, keyUsages); +} + +export async function deriveKey(salt, baseKey, keyUsages = ['encrypt', 'decrypt']) { + const iterations = 1000; + const hash = 'SHA-256'; + + return crypto.subtle.deriveKey({ name: 'PBKDF2', salt, iterations, hash }, baseKey, { name: 'AES-CBC', length: 256 }, true, keyUsages); +} + +export async function readFileAsArrayBuffer(file) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onload = function (evt) { + resolve(evt.target.result); + }; + reader.onerror = function (evt) { + reject(evt); + }; + reader.readAsArrayBuffer(file); + }); +} + +export async function generateMnemonicPhrase(n, sep = ' ') { + const { default: wordList } = await import('./wordList'); + const result = new Array(n); + let len = wordList.length; + const taken = new Array(len); + + while (n--) { + const x = Math.floor(getRandomFraction() * len); + result[n] = wordList[x in taken ? taken[x] : x]; + taken[x] = --len in taken ? taken[len] : len; + } + return result.join(sep); +} + +export class Deferred { + constructor() { + const p = new Promise((resolve, reject) => { + this.resolve = resolve; + this.reject = reject; + }); + + p.resolve = this.resolve; + p.reject = this.reject; + + return p; + } +} diff --git a/app/e2e/client/index.js b/apps/meteor/app/e2e/client/index.js similarity index 100% rename from app/e2e/client/index.js rename to apps/meteor/app/e2e/client/index.js diff --git a/app/e2e/client/logger.ts b/apps/meteor/app/e2e/client/logger.ts similarity index 100% rename from app/e2e/client/logger.ts rename to apps/meteor/app/e2e/client/logger.ts diff --git a/app/e2e/client/rocketchat.e2e.js b/apps/meteor/app/e2e/client/rocketchat.e2e.js similarity index 97% rename from app/e2e/client/rocketchat.e2e.js rename to apps/meteor/app/e2e/client/rocketchat.e2e.js index 913797f53f4a..88935931b832 100644 --- a/app/e2e/client/rocketchat.e2e.js +++ b/apps/meteor/app/e2e/client/rocketchat.e2e.js @@ -1,5 +1,4 @@ import { Meteor } from 'meteor/meteor'; -import { Random } from 'meteor/random'; import { ReactiveVar } from 'meteor/reactive-var'; import { EJSON } from 'meteor/ejson'; import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; @@ -18,6 +17,7 @@ import { importRSAKey, importRawKey, deriveKey, + generateMnemonicPhrase, } from './helper'; import * as banners from '../../../client/lib/banners'; import { Rooms, Subscriptions, Messages } from '../../models/client'; @@ -136,7 +136,7 @@ class E2E extends Emitter { if (!this.db_public_key || !this.db_private_key) { await call('e2e.setUserPublicAndPrivateKeys', { public_key: Meteor._localStorage.getItem('public_key'), - private_key: await this.encodePrivateKey(Meteor._localStorage.getItem('private_key'), this.createRandomPassword()), + private_key: await this.encodePrivateKey(Meteor._localStorage.getItem('private_key'), await this.createRandomPassword()), }); } @@ -256,8 +256,8 @@ class E2E extends Emitter { call('e2e.requestSubscriptionKeys'); } - createRandomPassword() { - const randomPassword = `${Random.id(3)}-${Random.id(3)}-${Random.id(3)}`.toLowerCase(); + async createRandomPassword() { + const randomPassword = await generateMnemonicPhrase(5); Meteor._localStorage.setItem('e2e.randomPassword', randomPassword); return randomPassword; } diff --git a/app/e2e/client/rocketchat.e2e.room.js b/apps/meteor/app/e2e/client/rocketchat.e2e.room.js similarity index 96% rename from app/e2e/client/rocketchat.e2e.room.js rename to apps/meteor/app/e2e/client/rocketchat.e2e.room.js index 0f2344dbe144..fea71e381182 100644 --- a/app/e2e/client/rocketchat.e2e.room.js +++ b/apps/meteor/app/e2e/client/rocketchat.e2e.room.js @@ -3,7 +3,6 @@ import { Base64 } from 'meteor/base64'; import { EJSON } from 'meteor/ejson'; import { Random } from 'meteor/random'; import { Session } from 'meteor/session'; -import { TimeSync } from 'meteor/mizzao:timesync'; import { Emitter } from '@rocket.chat/emitter'; import { e2e } from './rocketchat.e2e'; @@ -24,10 +23,11 @@ import { } from './helper'; import { Notifications } from '../../notifications/client'; import { Rooms, Subscriptions, Messages } from '../../models/client'; -import { roomTypes, RoomSettingsEnum } from '../../utils/client'; import { log, logError } from './logger'; import { E2ERoomState } from './E2ERoomState'; import { call } from '../../../client/lib/utils/call'; +import { roomCoordinator } from '../../../client/lib/rooms/roomCoordinator'; +import { RoomSettingsEnum } from '../../../definition/IRoomTypeConfig'; const KEY_ID = Symbol('keyID'); const PAUSED = Symbol('PAUSED'); @@ -145,7 +145,7 @@ export class E2ERoom extends Emitter { this.setState(E2ERoomState.KEYS_RECEIVED); } - async shouldConvertSentMessages() { + async shouldConvertSentMessages(message) { if (!this.isReady() || this[PAUSED]) { return false; } @@ -156,6 +156,10 @@ export class E2ERoom extends Emitter { }); } + if (message.msg[0] === '/') { + return false; + } + return true; } @@ -245,7 +249,7 @@ export class E2ERoom extends Emitter { } isSupportedRoomType(type) { - return roomTypes.getConfig(type).allowRoomSettingChange({}, RoomSettingsEnum.E2E); + return roomCoordinator.getRoomDirectives(type)?.allowRoomSettingChange({}, RoomSettingsEnum.E2E); } async importGroupKey(groupKey) { @@ -390,12 +394,7 @@ export class E2ERoom extends Emitter { // Helper function for encryption of messages encrypt(message) { - let ts; - if (isNaN(TimeSync.serverOffset())) { - ts = new Date(); - } else { - ts = new Date(Date.now() + TimeSync.serverOffset()); - } + const ts = new Date(); const data = new TextEncoder('UTF-8').encode( EJSON.stringify({ diff --git a/app/e2e/client/stylesheets/e2e.css b/apps/meteor/app/e2e/client/stylesheets/e2e.css similarity index 100% rename from app/e2e/client/stylesheets/e2e.css rename to apps/meteor/app/e2e/client/stylesheets/e2e.css diff --git a/apps/meteor/app/e2e/client/tabbar.ts b/apps/meteor/app/e2e/client/tabbar.ts new file mode 100644 index 000000000000..22eff563ae98 --- /dev/null +++ b/apps/meteor/app/e2e/client/tabbar.ts @@ -0,0 +1,38 @@ +import { useMemo, useCallback } from 'react'; +import { useMutableCallback } from '@rocket.chat/fuselage-hooks'; +import { useSetting, usePermission, useEndpoint } from '@rocket.chat/ui-contexts'; + +import { addAction } from '../../../client/views/room/lib/Toolbox'; +import { useReactiveValue } from '../../../client/hooks/useReactiveValue'; +import { e2e } from './rocketchat.e2e'; + +addAction('e2e', ({ room }) => { + const e2eEnabled = useSetting('E2E_Enable'); + const e2eReady = useReactiveValue(useCallback(() => e2e.isReady(), [])) || room.encrypted; + const canToggleE2e = usePermission('toggle-room-e2e-encryption', room._id); + const canEditRoom = usePermission('edit-room', room._id); + const hasPermission = (room.t === 'd' || (canEditRoom && canToggleE2e)) && e2eReady; + + const toggleE2E = useEndpoint('POST', '/v1/rooms.saveRoomSettings'); + + const action = useMutableCallback(() => { + toggleE2E({ rid: room._id, encrypted: !room.encrypted }); + }); + + const enabledOnRoom = !!room.encrypted; + + return useMemo( + () => + e2eEnabled && hasPermission + ? { + groups: ['direct', 'direct_multiple', 'group', 'team'], + id: 'e2e', + title: enabledOnRoom ? 'E2E_disable' : 'E2E_enable', + icon: 'key', + order: 13, + action, + } + : null, + [action, e2eEnabled, enabledOnRoom, hasPermission], + ); +}); diff --git a/apps/meteor/app/e2e/client/wordList.ts b/apps/meteor/app/e2e/client/wordList.ts new file mode 100644 index 000000000000..f2930b6cb969 --- /dev/null +++ b/apps/meteor/app/e2e/client/wordList.ts @@ -0,0 +1,1635 @@ +export default [ + 'acrobat', + 'africa', + 'alaska', + 'albert', + 'albino', + 'album', + 'alcohol', + 'alex', + 'alpha', + 'amadeus', + 'amanda', + 'amazon', + 'america', + 'analog', + 'animal', + 'antenna', + 'antonio', + 'apollo', + 'april', + 'aroma', + 'artist', + 'aspirin', + 'athlete', + 'atlas', + 'banana', + 'bandit', + 'banjo', + 'bikini', + 'bingo', + 'bonus', + 'camera', + 'canada', + 'carbon', + 'casino', + 'catalog', + 'cinema', + 'citizen', + 'cobra', + 'comet', + 'compact', + 'complex', + 'context', + 'credit', + 'critic', + 'crystal', + 'culture', + 'david', + 'delta', + 'dialog', + 'diploma', + 'doctor', + 'domino', + 'dragon', + 'drama', + 'extra', + 'fabric', + 'final', + 'focus', + 'forum', + 'galaxy', + 'gallery', + 'global', + 'harmony', + 'hotel', + 'humor', + 'index', + 'japan', + 'kilo', + 'lemon', + 'liter', + 'lotus', + 'mango', + 'melon', + 'menu', + 'meter', + 'metro', + 'mineral', + 'model', + 'music', + 'object', + 'piano', + 'pirate', + 'plastic', + 'radio', + 'report', + 'signal', + 'sport', + 'studio', + 'subject', + 'super', + 'tango', + 'taxi', + 'tempo', + 'tennis', + 'textile', + 'tokyo', + 'total', + 'tourist', + 'video', + 'visa', + 'academy', + 'alfred', + 'atlanta', + 'atomic', + 'barbara', + 'bazaar', + 'brother', + 'budget', + 'cabaret', + 'cadet', + 'candle', + 'capsule', + 'caviar', + 'channel', + 'chapter', + 'circle', + 'cobalt', + 'comrade', + 'condor', + 'crimson', + 'cyclone', + 'darwin', + 'declare', + 'denver', + 'desert', + 'divide', + 'dolby', + 'domain', + 'double', + 'eagle', + 'echo', + 'eclipse', + 'editor', + 'educate', + 'edward', + 'effect', + 'electra', + 'emerald', + 'emotion', + 'empire', + 'eternal', + 'evening', + 'exhibit', + 'expand', + 'explore', + 'extreme', + 'ferrari', + 'forget', + 'freedom', + 'friday', + 'fuji', + 'galileo', + 'genesis', + 'gravity', + 'habitat', + 'hamlet', + 'harlem', + 'helium', + 'holiday', + 'hunter', + 'ibiza', + 'iceberg', + 'imagine', + 'infant', + 'isotope', + 'jackson', + 'jamaica', + 'jasmine', + 'java', + 'jessica', + 'kitchen', + 'lazarus', + 'letter', + 'license', + 'lithium', + 'loyal', + 'lucky', + 'magenta', + 'manual', + 'marble', + 'maxwell', + 'mayor', + 'monarch', + 'monday', + 'money', + 'morning', + 'mother', + 'mystery', + 'native', + 'nectar', + 'nelson', + 'network', + 'nikita', + 'nobel', + 'nobody', + 'nominal', + 'norway', + 'nothing', + 'number', + 'october', + 'office', + 'oliver', + 'opinion', + 'option', + 'order', + 'outside', + 'package', + 'pandora', + 'panther', + 'papa', + 'pattern', + 'pedro', + 'pencil', + 'people', + 'phantom', + 'philips', + 'pioneer', + 'pluto', + 'podium', + 'portal', + 'potato', + 'process', + 'proxy', + 'pupil', + 'python', + 'quality', + 'quarter', + 'quiet', + 'rabbit', + 'radical', + 'radius', + 'rainbow', + 'ramirez', + 'ravioli', + 'raymond', + 'respect', + 'respond', + 'result', + 'resume', + 'richard', + 'river', + 'roger', + 'roman', + 'rondo', + 'sabrina', + 'salary', + 'salsa', + 'sample', + 'samuel', + 'saturn', + 'savage', + 'scarlet', + 'scorpio', + 'sector', + 'serpent', + 'shampoo', + 'sharon', + 'silence', + 'simple', + 'society', + 'sonar', + 'sonata', + 'soprano', + 'sparta', + 'spider', + 'sponsor', + 'abraham', + 'action', + 'active', + 'actor', + 'adam', + 'address', + 'admiral', + 'adrian', + 'agenda', + 'agent', + 'airline', + 'airport', + 'alabama', + 'aladdin', + 'alarm', + 'algebra', + 'alibi', + 'alice', + 'alien', + 'almond', + 'alpine', + 'amber', + 'amigo', + 'ammonia', + 'analyze', + 'anatomy', + 'angel', + 'annual', + 'answer', + 'apple', + 'archive', + 'arctic', + 'arena', + 'arizona', + 'armada', + 'arnold', + 'arsenal', + 'arthur', + 'asia', + 'aspect', + 'athena', + 'audio', + 'august', + 'austria', + 'avenue', + 'average', + 'axiom', + 'aztec', + 'bagel', + 'baker', + 'balance', + 'ballad', + 'ballet', + 'bambino', + 'bamboo', + 'baron', + 'basic', + 'basket', + 'battery', + 'belgium', + 'benefit', + 'berlin', + 'bermuda', + 'bernard', + 'bicycle', + 'binary', + 'biology', + 'bishop', + 'blitz', + 'block', + 'blonde', + 'bonjour', + 'boris', + 'boston', + 'bottle', + 'boxer', + 'brandy', + 'bravo', + 'brazil', + 'bridge', + 'british', + 'bronze', + 'brown', + 'bruce', + 'bruno', + 'brush', + 'burger', + 'burma', + 'cabinet', + 'cactus', + 'cafe', + 'cairo', + 'calypso', + 'camel', + 'campus', + 'canal', + 'cannon', + 'canoe', + 'cantina', + 'canvas', + 'canyon', + 'capital', + 'caramel', + 'caravan', + 'career', + 'cargo', + 'carlo', + 'carol', + 'carpet', + 'cartel', + 'cartoon', + 'castle', + 'castro', + 'cecilia', + 'cement', + 'center', + 'century', + 'ceramic', + 'chamber', + 'chance', + 'change', + 'chaos', + 'charlie', + 'charm', + 'charter', + 'cheese', + 'chef', + 'chemist', + 'cherry', + 'chess', + 'chicago', + 'chicken', + 'chief', + 'china', + 'cigar', + 'circus', + 'city', + 'clara', + 'classic', + 'claudia', + 'clean', + 'client', + 'climax', + 'clinic', + 'clock', + 'club', + 'cockpit', + 'coconut', + 'cola', + 'collect', + 'colombo', + 'colony', + 'color', + 'combat', + 'comedy', + 'command', + 'company', + 'concert', + 'connect', + 'consul', + 'contact', + 'contour', + 'control', + 'convert', + 'copy', + 'corner', + 'corona', + 'correct', + 'cosmos', + 'couple', + 'courage', + 'cowboy', + 'craft', + 'crash', + 'cricket', + 'crown', + 'cuba', + 'dallas', + 'dance', + 'daniel', + 'decade', + 'decimal', + 'degree', + 'delete', + 'deliver', + 'delphi', + 'deluxe', + 'demand', + 'demo', + 'denmark', + 'derby', + 'design', + 'detect', + 'develop', + 'diagram', + 'diamond', + 'diana', + 'diego', + 'diesel', + 'diet', + 'digital', + 'dilemma', + 'direct', + 'disco', + 'disney', + 'distant', + 'dollar', + 'dolphin', + 'donald', + 'drink', + 'driver', + 'dublin', + 'duet', + 'dynamic', + 'earth', + 'east', + 'ecology', + 'economy', + 'edgar', + 'egypt', + 'elastic', + 'elegant', + 'element', + 'elite', + 'elvis', + 'email', + 'empty', + 'energy', + 'engine', + 'english', + 'episode', + 'equator', + 'escape', + 'escort', + 'ethnic', + 'europe', + 'everest', + 'evident', + 'exact', + 'example', + 'exit', + 'exotic', + 'export', + 'express', + 'factor', + 'falcon', + 'family', + 'fantasy', + 'fashion', + 'fiber', + 'fiction', + 'fidel', + 'fiesta', + 'figure', + 'film', + 'filter', + 'finance', + 'finish', + 'finland', + 'first', + 'flag', + 'flash', + 'florida', + 'flower', + 'fluid', + 'flute', + 'folio', + 'ford', + 'forest', + 'formal', + 'formula', + 'fortune', + 'forward', + 'fragile', + 'france', + 'frank', + 'fresh', + 'friend', + 'frozen', + 'future', + 'gabriel', + 'gamma', + 'garage', + 'garcia', + 'garden', + 'garlic', + 'gemini', + 'general', + 'genetic', + 'genius', + 'germany', + 'gloria', + 'gold', + 'golf', + 'gondola', + 'gong', + 'good', + 'gordon', + 'gorilla', + 'grand', + 'granite', + 'graph', + 'green', + 'group', + 'guide', + 'guitar', + 'guru', + 'hand', + 'happy', + 'harbor', + 'harvard', + 'havana', + 'hawaii', + 'helena', + 'hello', + 'henry', + 'hilton', + 'history', + 'horizon', + 'house', + 'human', + 'icon', + 'idea', + 'igloo', + 'igor', + 'image', + 'impact', + 'import', + 'india', + 'indigo', + 'input', + 'insect', + 'instant', + 'iris', + 'italian', + 'jacket', + 'jacob', + 'jaguar', + 'janet', + 'jargon', + 'jazz', + 'jeep', + 'john', + 'joker', + 'jordan', + 'judo', + 'jumbo', + 'june', + 'jungle', + 'junior', + 'jupiter', + 'karate', + 'karma', + 'kayak', + 'kermit', + 'king', + 'koala', + 'korea', + 'labor', + 'lady', + 'lagoon', + 'laptop', + 'laser', + 'latin', + 'lava', + 'lecture', + 'left', + 'legal', + 'level', + 'lexicon', + 'liberal', + 'libra', + 'lily', + 'limbo', + 'limit', + 'linda', + 'linear', + 'lion', + 'liquid', + 'little', + 'llama', + 'lobby', + 'lobster', + 'local', + 'logic', + 'logo', + 'lola', + 'london', + 'lucas', + 'lunar', + 'machine', + 'macro', + 'madam', + 'madonna', + 'madrid', + 'maestro', + 'magic', + 'magnet', + 'magnum', + 'mailbox', + 'major', + 'mama', + 'mambo', + 'manager', + 'manila', + 'marco', + 'marina', + 'market', + 'mars', + 'martin', + 'marvin', + 'mary', + 'master', + 'matrix', + 'maximum', + 'media', + 'medical', + 'mega', + 'melody', + 'memo', + 'mental', + 'mentor', + 'mercury', + 'message', + 'metal', + 'meteor', + 'method', + 'mexico', + 'miami', + 'micro', + 'milk', + 'million', + 'minimum', + 'minus', + 'minute', + 'miracle', + 'mirage', + 'miranda', + 'mister', + 'mixer', + 'mobile', + 'modem', + 'modern', + 'modular', + 'moment', + 'monaco', + 'monica', + 'monitor', + 'mono', + 'monster', + 'montana', + 'morgan', + 'motel', + 'motif', + 'motor', + 'mozart', + 'multi', + 'museum', + 'mustang', + 'natural', + 'neon', + 'nepal', + 'neptune', + 'nerve', + 'neutral', + 'nevada', + 'news', + 'next', + 'ninja', + 'nirvana', + 'normal', + 'nova', + 'novel', + 'nuclear', + 'numeric', + 'nylon', + 'oasis', + 'observe', + 'ocean', + 'octopus', + 'olivia', + 'olympic', + 'omega', + 'opera', + 'optic', + 'optimal', + 'orange', + 'orbit', + 'organic', + 'orient', + 'origin', + 'orlando', + 'oscar', + 'oxford', + 'oxygen', + 'ozone', + 'pablo', + 'pacific', + 'pagoda', + 'palace', + 'pamela', + 'panama', + 'pancake', + 'panda', + 'panel', + 'panic', + 'paradox', + 'pardon', + 'paris', + 'parker', + 'parking', + 'parody', + 'partner', + 'passage', + 'passive', + 'pasta', + 'pastel', + 'patent', + 'patient', + 'patriot', + 'patrol', + 'pegasus', + 'pelican', + 'penguin', + 'pepper', + 'percent', + 'perfect', + 'perfume', + 'period', + 'permit', + 'person', + 'peru', + 'phone', + 'photo', + 'picasso', + 'picnic', + 'picture', + 'pigment', + 'pilgrim', + 'pilot', + 'pixel', + 'pizza', + 'planet', + 'plasma', + 'plaza', + 'pocket', + 'poem', + 'poetic', + 'poker', + 'polaris', + 'police', + 'politic', + 'polo', + 'polygon', + 'pony', + 'popcorn', + 'popular', + 'postage', + 'precise', + 'prefix', + 'premium', + 'present', + 'price', + 'prince', + 'printer', + 'prism', + 'private', + 'prize', + 'product', + 'profile', + 'program', + 'project', + 'protect', + 'proton', + 'public', + 'pulse', + 'puma', + 'pump', + 'pyramid', + 'queen', + 'radar', + 'ralph', + 'random', + 'rapid', + 'rebel', + 'record', + 'recycle', + 'reflex', + 'reform', + 'regard', + 'regular', + 'relax', + 'reptile', + 'reverse', + 'ricardo', + 'right', + 'ringo', + 'risk', + 'ritual', + 'robert', + 'robot', + 'rocket', + 'rodeo', + 'romeo', + 'royal', + 'russian', + 'safari', + 'salad', + 'salami', + 'salmon', + 'salon', + 'salute', + 'samba', + 'sandra', + 'santana', + 'sardine', + 'school', + 'scoop', + 'scratch', + 'screen', + 'script', + 'scroll', + 'second', + 'secret', + 'section', + 'segment', + 'select', + 'seminar', + 'senator', + 'senior', + 'sensor', + 'serial', + 'service', + 'shadow', + 'sharp', + 'sheriff', + 'shock', + 'short', + 'shrink', + 'sierra', + 'silicon', + 'silk', + 'silver', + 'similar', + 'simon', + 'single', + 'siren', + 'slang', + 'slogan', + 'smart', + 'smoke', + 'snake', + 'social', + 'soda', + 'solar', + 'solid', + 'solo', + 'sonic', + 'source', + 'soviet', + 'special', + 'speed', + 'sphere', + 'spiral', + 'spirit', + 'spring', + 'static', + 'status', + 'stereo', + 'stone', + 'stop', + 'street', + 'strong', + 'student', + 'style', + 'sultan', + 'susan', + 'sushi', + 'suzuki', + 'switch', + 'symbol', + 'system', + 'tactic', + 'tahiti', + 'talent', + 'tarzan', + 'telex', + 'texas', + 'theory', + 'thermos', + 'tiger', + 'titanic', + 'tomato', + 'topic', + 'tornado', + 'toronto', + 'torpedo', + 'totem', + 'tractor', + 'traffic', + 'transit', + 'trapeze', + 'travel', + 'tribal', + 'trick', + 'trident', + 'trilogy', + 'tripod', + 'tropic', + 'trumpet', + 'tulip', + 'tuna', + 'turbo', + 'twist', + 'ultra', + 'uniform', + 'union', + 'uranium', + 'vacuum', + 'valid', + 'vampire', + 'vanilla', + 'vatican', + 'velvet', + 'ventura', + 'venus', + 'vertigo', + 'veteran', + 'victor', + 'vienna', + 'viking', + 'village', + 'vincent', + 'violet', + 'violin', + 'virtual', + 'virus', + 'vision', + 'visitor', + 'visual', + 'vitamin', + 'viva', + 'vocal', + 'vodka', + 'volcano', + 'voltage', + 'volume', + 'voyage', + 'water', + 'weekend', + 'welcome', + 'western', + 'window', + 'winter', + 'wizard', + 'wolf', + 'world', + 'xray', + 'yankee', + 'yoga', + 'yogurt', + 'yoyo', + 'zebra', + 'zero', + 'zigzag', + 'zipper', + 'zodiac', + 'zoom', + 'acid', + 'adios', + 'agatha', + 'alamo', + 'alert', + 'almanac', + 'aloha', + 'andrea', + 'anita', + 'arcade', + 'aurora', + 'avalon', + 'baby', + 'baggage', + 'balloon', + 'bank', + 'basil', + 'begin', + 'biscuit', + 'blue', + 'bombay', + 'botanic', + 'brain', + 'brenda', + 'brigade', + 'cable', + 'calibre', + 'carmen', + 'cello', + 'celtic', + 'chariot', + 'chrome', + 'citrus', + 'civil', + 'cloud', + 'combine', + 'common', + 'cool', + 'copper', + 'coral', + 'crater', + 'cubic', + 'cupid', + 'cycle', + 'depend', + 'door', + 'dream', + 'dynasty', + 'edison', + 'edition', + 'enigma', + 'equal', + 'eric', + 'event', + 'evita', + 'exodus', + 'extend', + 'famous', + 'farmer', + 'food', + 'fossil', + 'frog', + 'fruit', + 'geneva', + 'gentle', + 'george', + 'giant', + 'gilbert', + 'gossip', + 'gram', + 'greek', + 'grille', + 'hammer', + 'harvest', + 'hazard', + 'heaven', + 'herbert', + 'heroic', + 'hexagon', + 'husband', + 'immune', + 'inca', + 'inch', + 'initial', + 'isabel', + 'ivory', + 'jason', + 'jerome', + 'joel', + 'joshua', + 'journal', + 'judge', + 'juliet', + 'jump', + 'justice', + 'kimono', + 'kinetic', + 'leonid', + 'leopard', + 'lima', + 'maze', + 'medusa', + 'member', + 'memphis', + 'michael', + 'miguel', + 'milan', + 'mile', + 'miller', + 'mimic', + 'mimosa', + 'mission', + 'monkey', + 'moral', + 'moses', + 'mouse', + 'nancy', + 'natasha', + 'nebula', + 'nickel', + 'nina', + 'noise', + 'orchid', + 'oregano', + 'origami', + 'orinoco', + 'orion', + 'othello', + 'paper', + 'paprika', + 'prelude', + 'prepare', + 'pretend', + 'promise', + 'prosper', + 'provide', + 'puzzle', + 'remote', + 'repair', + 'reply', + 'rival', + 'riviera', + 'robin', + 'rose', + 'rover', + 'rudolf', + 'saga', + 'sahara', + 'scholar', + 'shelter', + 'ship', + 'shoe', + 'sigma', + 'sister', + 'sleep', + 'smile', + 'spain', + 'spark', + 'split', + 'spray', + 'square', + 'stadium', + 'star', + 'storm', + 'story', + 'strange', + 'stretch', + 'stuart', + 'subway', + 'sugar', + 'sulfur', + 'summer', + 'survive', + 'sweet', + 'swim', + 'table', + 'taboo', + 'target', + 'teacher', + 'telecom', + 'temple', + 'tibet', + 'ticket', + 'tina', + 'today', + 'toga', + 'tommy', + 'tower', + 'trivial', + 'tunnel', + 'turtle', + 'twin', + 'uncle', + 'unicorn', + 'unique', + 'update', + 'valery', + 'vega', + 'version', + 'voodoo', + 'warning', + 'william', + 'wonder', + 'year', + 'yellow', + 'young', + 'absent', + 'absorb', + 'absurd', + 'accent', + 'alfonso', + 'alias', + 'ambient', + 'anagram', + 'andy', + 'anvil', + 'appear', + 'apropos', + 'archer', + 'ariel', + 'armor', + 'arrow', + 'austin', + 'avatar', + 'axis', + 'baboon', + 'bahama', + 'bali', + 'balsa', + 'barcode', + 'bazooka', + 'beach', + 'beast', + 'beatles', + 'beauty', + 'before', + 'benny', + 'betty', + 'between', + 'beyond', + 'billy', + 'bison', + 'blast', + 'bless', + 'bogart', + 'bonanza', + 'book', + 'border', + 'brave', + 'bread', + 'break', + 'broken', + 'bucket', + 'buenos', + 'buffalo', + 'bundle', + 'button', + 'buzzer', + 'byte', + 'caesar', + 'camilla', + 'canary', + 'candid', + 'carrot', + 'cave', + 'chant', + 'child', + 'choice', + 'chris', + 'cipher', + 'clarion', + 'clark', + 'clever', + 'cliff', + 'clone', + 'conan', + 'conduct', + 'congo', + 'costume', + 'cotton', + 'cover', + 'crack', + 'current', + 'danube', + 'data', + 'decide', + 'deposit', + 'desire', + 'detail', + 'dexter', + 'dinner', + 'donor', + 'druid', + 'drum', + 'easy', + 'eddie', + 'enjoy', + 'enrico', + 'epoxy', + 'erosion', + 'except', + 'exile', + 'explain', + 'fame', + 'fast', + 'father', + 'felix', + 'field', + 'fiona', + 'fire', + 'fish', + 'flame', + 'flex', + 'flipper', + 'float', + 'flood', + 'floor', + 'forbid', + 'forever', + 'fractal', + 'frame', + 'freddie', + 'front', + 'fuel', + 'gallop', + 'game', + 'garbo', + 'gate', + 'gelatin', + 'gibson', + 'ginger', + 'giraffe', + 'gizmo', + 'glass', + 'goblin', + 'gopher', + 'grace', + 'gray', + 'gregory', + 'grid', + 'griffin', + 'ground', + 'guest', + 'gustav', + 'gyro', + 'hair', + 'halt', + 'harris', + 'heart', + 'heavy', + 'herman', + 'hippie', + 'hobby', + 'honey', + 'hope', + 'horse', + 'hostel', + 'hydro', + 'imitate', + 'info', + 'ingrid', + 'inside', + 'invent', + 'invest', + 'invite', + 'ivan', + 'james', + 'jester', + 'jimmy', + 'join', + 'joseph', + 'juice', + 'julius', + 'july', + 'kansas', + 'karl', + 'kevin', + 'kiwi', + 'ladder', + 'lake', + 'laura', + 'learn', + 'legacy', + 'legend', + 'lesson', + 'life', + 'light', + 'list', + 'locate', + 'lopez', + 'lorenzo', + 'love', + 'lunch', + 'malta', + 'mammal', + 'margin', + 'margo', + 'marion', + 'mask', + 'match', + 'mayday', + 'meaning', + 'mercy', + 'middle', + 'mike', + 'mirror', + 'modest', + 'morph', + 'morris', + 'mystic', + 'nadia', + 'nato', + 'navy', + 'needle', + 'neuron', + 'never', + 'newton', + 'nice', + 'night', + 'nissan', + 'nitro', + 'nixon', + 'north', + 'oberon', + 'octavia', + 'ohio', + 'olga', + 'open', + 'opus', + 'orca', + 'oval', + 'owner', + 'page', + 'paint', + 'palma', + 'parent', + 'parlor', + 'parole', + 'paul', + 'peace', + 'pearl', + 'perform', + 'phoenix', + 'phrase', + 'pierre', + 'pinball', + 'place', + 'plate', + 'plato', + 'plume', + 'pogo', + 'point', + 'polka', + 'poncho', + 'powder', + 'prague', + 'press', + 'presto', + 'pretty', + 'prime', + 'promo', + 'quest', + 'quick', + 'quiz', + 'quota', + 'race', + 'rachel', + 'raja', + 'ranger', + 'region', + 'remark', + 'rent', + 'reward', + 'rhino', + 'ribbon', + 'rider', + 'road', + 'rodent', + 'round', + 'rubber', + 'ruby', + 'rufus', + 'sabine', + 'saddle', + 'sailor', + 'saint', + 'salt', + 'scale', + 'scuba', + 'season', + 'secure', + 'shake', + 'shallow', + 'shannon', + 'shave', + 'shelf', + 'sherman', + 'shine', + 'shirt', + 'side', + 'sinatra', + 'sincere', + 'size', + 'slalom', + 'slow', + 'small', + 'snow', + 'sofia', + 'song', + 'sound', + 'south', + 'speech', + 'spell', + 'spend', + 'spoon', + 'stage', + 'stamp', + 'stand', + 'state', + 'stella', + 'stick', + 'sting', + 'stock', + 'store', + 'sunday', + 'sunset', + 'support', + 'supreme', + 'sweden', + 'swing', + 'tape', + 'tavern', + 'think', + 'thomas', + 'tictac', + 'time', + 'toast', + 'tobacco', + 'tonight', + 'torch', + 'torso', + 'touch', + 'toyota', + 'trade', + 'tribune', + 'trinity', + 'triton', + 'truck', + 'trust', + 'type', + 'under', + 'unit', + 'urban', + 'urgent', + 'user', + 'value', + 'vendor', + 'venice', + 'verona', + 'vibrate', + 'virgo', + 'visible', + 'vista', + 'vital', + 'voice', + 'vortex', + 'waiter', + 'watch', + 'wave', + 'weather', + 'wedding', + 'wheel', + 'whiskey', + 'wisdom', + 'android', + 'annex', + 'armani', + 'cake', + 'confide', + 'deal', + 'define', + 'dispute', + 'genuine', + 'idiom', + 'impress', + 'include', + 'ironic', + 'null', + 'nurse', + 'obscure', + 'prefer', + 'prodigy', + 'ego', + 'fax', + 'jet', + 'job', + 'rio', + 'ski', + 'yes', +]; diff --git a/app/e2e/server/beforeCreateRoom.js b/apps/meteor/app/e2e/server/beforeCreateRoom.js similarity index 100% rename from app/e2e/server/beforeCreateRoom.js rename to apps/meteor/app/e2e/server/beforeCreateRoom.js diff --git a/apps/meteor/app/e2e/server/index.js b/apps/meteor/app/e2e/server/index.js new file mode 100644 index 000000000000..ad982fd196a9 --- /dev/null +++ b/apps/meteor/app/e2e/server/index.js @@ -0,0 +1,21 @@ +import { callbacks } from '../../../lib/callbacks'; +import { api } from '../../../server/sdk/api'; + +import './settings'; +import './beforeCreateRoom'; +import './methods/setUserPublicAndPrivateKeys'; +import './methods/getUsersOfRoomWithoutKey'; +import './methods/updateGroupKey'; +import './methods/setRoomKeyID'; +import './methods/fetchMyKeys'; +import './methods/resetOwnE2EKey'; +import './methods/requestSubscriptionKeys'; + +callbacks.add( + 'afterJoinRoom', + (user, room) => { + api.broadcast('notify.e2e.keyRequest', room._id, room.e2eKeyId); + }, + callbacks.priority.MEDIUM, + 'e2e', +); diff --git a/app/e2e/server/methods/fetchMyKeys.js b/apps/meteor/app/e2e/server/methods/fetchMyKeys.js similarity index 85% rename from app/e2e/server/methods/fetchMyKeys.js rename to apps/meteor/app/e2e/server/methods/fetchMyKeys.js index f50e8578f815..744cb9cd9c62 100644 --- a/app/e2e/server/methods/fetchMyKeys.js +++ b/apps/meteor/app/e2e/server/methods/fetchMyKeys.js @@ -1,6 +1,6 @@ import { Meteor } from 'meteor/meteor'; -import { Users } from '../../../models'; +import { Users } from '../../../models/server'; Meteor.methods({ 'e2e.fetchMyKeys'() { diff --git a/app/e2e/server/methods/getUsersOfRoomWithoutKey.js b/apps/meteor/app/e2e/server/methods/getUsersOfRoomWithoutKey.js similarity index 84% rename from app/e2e/server/methods/getUsersOfRoomWithoutKey.js rename to apps/meteor/app/e2e/server/methods/getUsersOfRoomWithoutKey.js index f7ae884b74b1..87984231cc81 100644 --- a/app/e2e/server/methods/getUsersOfRoomWithoutKey.js +++ b/apps/meteor/app/e2e/server/methods/getUsersOfRoomWithoutKey.js @@ -1,7 +1,7 @@ import { Meteor } from 'meteor/meteor'; import { check } from 'meteor/check'; -import { canAccessRoom } from '../../../authorization/server'; +import { canAccessRoomId } from '../../../authorization/server'; import { Subscriptions, Users } from '../../../models/server'; Meteor.methods({ @@ -21,10 +21,8 @@ Meteor.methods({ }); } - if (!canAccessRoom({ _id: rid }, { _id: userId })) { - throw new Meteor.Error('error-invalid-room', 'Invalid room', { - method: 'e2e.getUsersOfRoomWithoutKey', - }); + if (!canAccessRoomId(rid, userId)) { + throw new Meteor.Error('error-invalid-room', 'Invalid room', { method: 'e2e.getUsersOfRoomWithoutKey' }); } const subscriptions = Subscriptions.findByRidWithoutE2EKey(rid, { diff --git a/app/e2e/server/methods/requestSubscriptionKeys.js b/apps/meteor/app/e2e/server/methods/requestSubscriptionKeys.js similarity index 80% rename from app/e2e/server/methods/requestSubscriptionKeys.js rename to apps/meteor/app/e2e/server/methods/requestSubscriptionKeys.js index 2a381c2eea88..76d28b27c599 100644 --- a/app/e2e/server/methods/requestSubscriptionKeys.js +++ b/apps/meteor/app/e2e/server/methods/requestSubscriptionKeys.js @@ -1,7 +1,7 @@ import { Meteor } from 'meteor/meteor'; -import { Subscriptions, Rooms } from '../../../models'; -import { Notifications } from '../../../notifications'; +import { Subscriptions, Rooms } from '../../../models/server'; +import { api } from '../../../../server/sdk/api'; Meteor.methods({ 'e2e.requestSubscriptionKeys'() { @@ -27,7 +27,7 @@ Meteor.methods({ const rooms = Rooms.find(query); rooms.forEach((room) => { - Notifications.notifyRoom('e2e.keyRequest', room._id, room.e2eKeyId); + api.broadcast('notify.e2e.keyRequest', room._id, room.e2eKeyId); }); return true; diff --git a/app/e2e/server/methods/resetOwnE2EKey.js b/apps/meteor/app/e2e/server/methods/resetOwnE2EKey.js similarity index 100% rename from app/e2e/server/methods/resetOwnE2EKey.js rename to apps/meteor/app/e2e/server/methods/resetOwnE2EKey.js diff --git a/app/e2e/server/methods/setRoomKeyID.js b/apps/meteor/app/e2e/server/methods/setRoomKeyID.js similarity index 88% rename from app/e2e/server/methods/setRoomKeyID.js rename to apps/meteor/app/e2e/server/methods/setRoomKeyID.js index 2f69e0be3717..bae5da004019 100644 --- a/app/e2e/server/methods/setRoomKeyID.js +++ b/apps/meteor/app/e2e/server/methods/setRoomKeyID.js @@ -1,7 +1,7 @@ import { Meteor } from 'meteor/meteor'; import { check } from 'meteor/check'; -import { canAccessRoom } from '../../../authorization/server'; +import { canAccessRoomId } from '../../../authorization/server'; import { Rooms } from '../../../models/server'; Meteor.methods({ @@ -18,7 +18,7 @@ Meteor.methods({ throw new Meteor.Error('error-invalid-room', 'Invalid room', { method: 'e2e.setRoomKeyID' }); } - if (!canAccessRoom({ _id: rid }, { _id: userId })) { + if (!canAccessRoomId(rid, userId)) { throw new Meteor.Error('error-invalid-room', 'Invalid room', { method: 'e2e.setRoomKeyID' }); } diff --git a/app/e2e/server/methods/setUserPublicAndPrivateKeys.js b/apps/meteor/app/e2e/server/methods/setUserPublicAndPrivateKeys.js similarity index 89% rename from app/e2e/server/methods/setUserPublicAndPrivateKeys.js rename to apps/meteor/app/e2e/server/methods/setUserPublicAndPrivateKeys.js index ee8727794f0b..91c6f6b0fc7f 100644 --- a/app/e2e/server/methods/setUserPublicAndPrivateKeys.js +++ b/apps/meteor/app/e2e/server/methods/setUserPublicAndPrivateKeys.js @@ -1,6 +1,6 @@ import { Meteor } from 'meteor/meteor'; -import { Users } from '../../../models'; +import { Users } from '../../../models/server'; Meteor.methods({ 'e2e.setUserPublicAndPrivateKeys'({ public_key, private_key }) { diff --git a/app/e2e/server/methods/updateGroupKey.js b/apps/meteor/app/e2e/server/methods/updateGroupKey.js similarity index 88% rename from app/e2e/server/methods/updateGroupKey.js rename to apps/meteor/app/e2e/server/methods/updateGroupKey.js index e7276671c872..9aae29003ddf 100644 --- a/app/e2e/server/methods/updateGroupKey.js +++ b/apps/meteor/app/e2e/server/methods/updateGroupKey.js @@ -1,6 +1,6 @@ import { Meteor } from 'meteor/meteor'; -import { Subscriptions } from '../../../models'; +import { Subscriptions } from '../../../models/server'; Meteor.methods({ 'e2e.updateGroupKey'(rid, uid, key) { diff --git a/app/e2e/server/settings.ts b/apps/meteor/app/e2e/server/settings.ts similarity index 100% rename from app/e2e/server/settings.ts rename to apps/meteor/app/e2e/server/settings.ts diff --git a/apps/meteor/app/emoji-custom/client/index.js b/apps/meteor/app/emoji-custom/client/index.js new file mode 100644 index 000000000000..d8a1b75e275d --- /dev/null +++ b/apps/meteor/app/emoji-custom/client/index.js @@ -0,0 +1,3 @@ +import './lib/emojiCustom'; +import './notifications/deleteEmojiCustom'; +import './notifications/updateEmojiCustom'; diff --git a/app/emoji-custom/client/lib/emojiCustom.js b/apps/meteor/app/emoji-custom/client/lib/emojiCustom.js similarity index 99% rename from app/emoji-custom/client/lib/emojiCustom.js rename to apps/meteor/app/emoji-custom/client/lib/emojiCustom.js index 46cb53fcbf56..a3df7135cc5f 100644 --- a/app/emoji-custom/client/lib/emojiCustom.js +++ b/apps/meteor/app/emoji-custom/client/lib/emojiCustom.js @@ -184,7 +184,7 @@ Meteor.startup(() => try { const { emojis: { update: emojis }, - } = await APIClient.v1.get('emoji-custom.list'); + } = await APIClient.get('/v1/emoji-custom.list'); emoji.packages.emojiCustom.emojisByCategory = { rocket: [] }; for (const currentEmoji of emojis) { diff --git a/app/emoji-custom/client/lib/function-isSet.js b/apps/meteor/app/emoji-custom/client/lib/function-isSet.js similarity index 100% rename from app/emoji-custom/client/lib/function-isSet.js rename to apps/meteor/app/emoji-custom/client/lib/function-isSet.js diff --git a/app/emoji-custom/client/notifications/deleteEmojiCustom.js b/apps/meteor/app/emoji-custom/client/notifications/deleteEmojiCustom.js similarity index 100% rename from app/emoji-custom/client/notifications/deleteEmojiCustom.js rename to apps/meteor/app/emoji-custom/client/notifications/deleteEmojiCustom.js diff --git a/app/emoji-custom/client/notifications/updateEmojiCustom.js b/apps/meteor/app/emoji-custom/client/notifications/updateEmojiCustom.js similarity index 100% rename from app/emoji-custom/client/notifications/updateEmojiCustom.js rename to apps/meteor/app/emoji-custom/client/notifications/updateEmojiCustom.js diff --git a/app/emoji-custom/server/index.js b/apps/meteor/app/emoji-custom/server/index.js similarity index 100% rename from app/emoji-custom/server/index.js rename to apps/meteor/app/emoji-custom/server/index.js diff --git a/app/emoji-custom/server/methods/deleteEmojiCustom.js b/apps/meteor/app/emoji-custom/server/methods/deleteEmojiCustom.js similarity index 93% rename from app/emoji-custom/server/methods/deleteEmojiCustom.js rename to apps/meteor/app/emoji-custom/server/methods/deleteEmojiCustom.js index eceb0d933c31..4d26d9ca065a 100644 --- a/app/emoji-custom/server/methods/deleteEmojiCustom.js +++ b/apps/meteor/app/emoji-custom/server/methods/deleteEmojiCustom.js @@ -1,8 +1,8 @@ import { Meteor } from 'meteor/meteor'; +import { EmojiCustom } from '@rocket.chat/models'; import { api } from '../../../../server/sdk/api'; import { hasPermission } from '../../../authorization'; -import { EmojiCustom } from '../../../models/server/raw'; import { RocketChatFileEmojiCustomInstance } from '../startup/emoji-custom'; Meteor.methods({ diff --git a/app/emoji-custom/server/methods/insertOrUpdateEmoji.js b/apps/meteor/app/emoji-custom/server/methods/insertOrUpdateEmoji.js similarity index 98% rename from app/emoji-custom/server/methods/insertOrUpdateEmoji.js rename to apps/meteor/app/emoji-custom/server/methods/insertOrUpdateEmoji.js index b26953b1d266..96b95f3fbc6f 100644 --- a/app/emoji-custom/server/methods/insertOrUpdateEmoji.js +++ b/apps/meteor/app/emoji-custom/server/methods/insertOrUpdateEmoji.js @@ -2,9 +2,9 @@ import { Meteor } from 'meteor/meteor'; import _ from 'underscore'; import s from 'underscore.string'; import limax from 'limax'; +import { EmojiCustom } from '@rocket.chat/models'; import { hasPermission } from '../../../authorization'; -import { EmojiCustom } from '../../../models/server/raw'; import { RocketChatFileEmojiCustomInstance } from '../startup/emoji-custom'; import { api } from '../../../../server/sdk/api'; diff --git a/apps/meteor/app/emoji-custom/server/methods/listEmojiCustom.js b/apps/meteor/app/emoji-custom/server/methods/listEmojiCustom.js new file mode 100644 index 000000000000..a4fd124abe91 --- /dev/null +++ b/apps/meteor/app/emoji-custom/server/methods/listEmojiCustom.js @@ -0,0 +1,8 @@ +import { Meteor } from 'meteor/meteor'; +import { EmojiCustom } from '@rocket.chat/models'; + +Meteor.methods({ + async listEmojiCustom(options = {}) { + return EmojiCustom.find(options).toArray(); + }, +}); diff --git a/app/emoji-custom/server/methods/uploadEmojiCustom.js b/apps/meteor/app/emoji-custom/server/methods/uploadEmojiCustom.js similarity index 100% rename from app/emoji-custom/server/methods/uploadEmojiCustom.js rename to apps/meteor/app/emoji-custom/server/methods/uploadEmojiCustom.js diff --git a/app/emoji-custom/server/startup/emoji-custom.js b/apps/meteor/app/emoji-custom/server/startup/emoji-custom.js similarity index 100% rename from app/emoji-custom/server/startup/emoji-custom.js rename to apps/meteor/app/emoji-custom/server/startup/emoji-custom.js diff --git a/app/emoji-custom/server/startup/settings.ts b/apps/meteor/app/emoji-custom/server/startup/settings.ts similarity index 100% rename from app/emoji-custom/server/startup/settings.ts rename to apps/meteor/app/emoji-custom/server/startup/settings.ts diff --git a/app/emoji-emojione/.gitignore b/apps/meteor/app/emoji-emojione/.gitignore similarity index 100% rename from app/emoji-emojione/.gitignore rename to apps/meteor/app/emoji-emojione/.gitignore diff --git a/app/emoji-emojione/README.md b/apps/meteor/app/emoji-emojione/README.md similarity index 100% rename from app/emoji-emojione/README.md rename to apps/meteor/app/emoji-emojione/README.md diff --git a/app/emoji-emojione/client/activity-sprites.css b/apps/meteor/app/emoji-emojione/client/activity-sprites.css similarity index 100% rename from app/emoji-emojione/client/activity-sprites.css rename to apps/meteor/app/emoji-emojione/client/activity-sprites.css diff --git a/app/emoji-emojione/client/emojione-sprites.css b/apps/meteor/app/emoji-emojione/client/emojione-sprites.css similarity index 100% rename from app/emoji-emojione/client/emojione-sprites.css rename to apps/meteor/app/emoji-emojione/client/emojione-sprites.css diff --git a/app/emoji-emojione/client/flags-sprites.css b/apps/meteor/app/emoji-emojione/client/flags-sprites.css similarity index 100% rename from app/emoji-emojione/client/flags-sprites.css rename to apps/meteor/app/emoji-emojione/client/flags-sprites.css diff --git a/app/emoji-emojione/client/food-sprites.css b/apps/meteor/app/emoji-emojione/client/food-sprites.css similarity index 100% rename from app/emoji-emojione/client/food-sprites.css rename to apps/meteor/app/emoji-emojione/client/food-sprites.css diff --git a/app/emoji-emojione/client/index.js b/apps/meteor/app/emoji-emojione/client/index.js similarity index 100% rename from app/emoji-emojione/client/index.js rename to apps/meteor/app/emoji-emojione/client/index.js diff --git a/app/emoji-emojione/client/modifier-sprites.css b/apps/meteor/app/emoji-emojione/client/modifier-sprites.css similarity index 100% rename from app/emoji-emojione/client/modifier-sprites.css rename to apps/meteor/app/emoji-emojione/client/modifier-sprites.css diff --git a/app/emoji-emojione/client/nature-sprites.css b/apps/meteor/app/emoji-emojione/client/nature-sprites.css similarity index 100% rename from app/emoji-emojione/client/nature-sprites.css rename to apps/meteor/app/emoji-emojione/client/nature-sprites.css diff --git a/app/emoji-emojione/client/objects-sprites.css b/apps/meteor/app/emoji-emojione/client/objects-sprites.css similarity index 100% rename from app/emoji-emojione/client/objects-sprites.css rename to apps/meteor/app/emoji-emojione/client/objects-sprites.css diff --git a/app/emoji-emojione/client/people-sprites.css b/apps/meteor/app/emoji-emojione/client/people-sprites.css similarity index 100% rename from app/emoji-emojione/client/people-sprites.css rename to apps/meteor/app/emoji-emojione/client/people-sprites.css diff --git a/app/emoji-emojione/client/regional-sprites.css b/apps/meteor/app/emoji-emojione/client/regional-sprites.css similarity index 100% rename from app/emoji-emojione/client/regional-sprites.css rename to apps/meteor/app/emoji-emojione/client/regional-sprites.css diff --git a/app/emoji-emojione/client/symbols-sprites.css b/apps/meteor/app/emoji-emojione/client/symbols-sprites.css similarity index 100% rename from app/emoji-emojione/client/symbols-sprites.css rename to apps/meteor/app/emoji-emojione/client/symbols-sprites.css diff --git a/app/emoji-emojione/client/travel-sprites.css b/apps/meteor/app/emoji-emojione/client/travel-sprites.css similarity index 100% rename from app/emoji-emojione/client/travel-sprites.css rename to apps/meteor/app/emoji-emojione/client/travel-sprites.css diff --git a/app/emoji-emojione/lib/emojiPicker.js b/apps/meteor/app/emoji-emojione/lib/emojiPicker.js similarity index 100% rename from app/emoji-emojione/lib/emojiPicker.js rename to apps/meteor/app/emoji-emojione/lib/emojiPicker.js diff --git a/app/emoji-emojione/lib/emojione.tpl b/apps/meteor/app/emoji-emojione/lib/emojione.tpl similarity index 100% rename from app/emoji-emojione/lib/emojione.tpl rename to apps/meteor/app/emoji-emojione/lib/emojione.tpl diff --git a/app/emoji-emojione/lib/emojioneRender.js b/apps/meteor/app/emoji-emojione/lib/emojioneRender.js similarity index 100% rename from app/emoji-emojione/lib/emojioneRender.js rename to apps/meteor/app/emoji-emojione/lib/emojioneRender.js diff --git a/app/emoji-emojione/lib/generateEmojiIndex.mjs b/apps/meteor/app/emoji-emojione/lib/generateEmojiIndex.mjs similarity index 100% rename from app/emoji-emojione/lib/generateEmojiIndex.mjs rename to apps/meteor/app/emoji-emojione/lib/generateEmojiIndex.mjs diff --git a/app/emoji-emojione/lib/rocketchat.js b/apps/meteor/app/emoji-emojione/lib/rocketchat.js similarity index 100% rename from app/emoji-emojione/lib/rocketchat.js rename to apps/meteor/app/emoji-emojione/lib/rocketchat.js diff --git a/app/emoji-emojione/server/callbacks.js b/apps/meteor/app/emoji-emojione/server/callbacks.js similarity index 100% rename from app/emoji-emojione/server/callbacks.js rename to apps/meteor/app/emoji-emojione/server/callbacks.js diff --git a/app/emoji-emojione/server/index.js b/apps/meteor/app/emoji-emojione/server/index.js similarity index 100% rename from app/emoji-emojione/server/index.js rename to apps/meteor/app/emoji-emojione/server/index.js diff --git a/app/emoji/client/emojiParser.js b/apps/meteor/app/emoji/client/emojiParser.js similarity index 100% rename from app/emoji/client/emojiParser.js rename to apps/meteor/app/emoji/client/emojiParser.js diff --git a/app/emoji/client/emojiPicker.html b/apps/meteor/app/emoji/client/emojiPicker.html similarity index 100% rename from app/emoji/client/emojiPicker.html rename to apps/meteor/app/emoji/client/emojiPicker.html diff --git a/app/emoji/client/emojiPicker.js b/apps/meteor/app/emoji/client/emojiPicker.js similarity index 98% rename from app/emoji/client/emojiPicker.js rename to apps/meteor/app/emoji/client/emojiPicker.js index 393124a3fbef..671698280cc1 100644 --- a/app/emoji/client/emojiPicker.js +++ b/apps/meteor/app/emoji/client/emojiPicker.js @@ -5,7 +5,6 @@ import { FlowRouter } from 'meteor/kadira:flow-router'; import { Template } from 'meteor/templating'; import { escapeRegExp } from '@rocket.chat/string-helpers'; -import '../../theme/client/imports/components/emojiPicker.css'; import { t } from '../../utils/client'; import { EmojiPicker } from './lib/EmojiPicker'; import { emoji } from '../lib/rocketchat'; @@ -152,7 +151,7 @@ Template.emojiPicker.events({ 'click .add-custom'(event) { event.stopPropagation(); event.preventDefault(); - FlowRouter.go('/admin/emoji-custom'); + FlowRouter.go('/admin/emoji-custom/new'); EmojiPicker.close(); }, 'click .category-link'(event) { diff --git a/app/emoji/client/function-isSet.js b/apps/meteor/app/emoji/client/function-isSet.js similarity index 100% rename from app/emoji/client/function-isSet.js rename to apps/meteor/app/emoji/client/function-isSet.js diff --git a/app/emoji/client/index.js b/apps/meteor/app/emoji/client/index.js similarity index 100% rename from app/emoji/client/index.js rename to apps/meteor/app/emoji/client/index.js diff --git a/app/emoji/client/lib/EmojiPicker.js b/apps/meteor/app/emoji/client/lib/EmojiPicker.js similarity index 96% rename from app/emoji/client/lib/EmojiPicker.js rename to apps/meteor/app/emoji/client/lib/EmojiPicker.js index fd3225dce4ef..8c5f883dfacf 100644 --- a/app/emoji/client/lib/EmojiPicker.js +++ b/apps/meteor/app/emoji/client/lib/EmojiPicker.js @@ -70,8 +70,12 @@ export const EmojiPicker = { const windowHeight = window.innerHeight; const windowWidth = window.innerWidth; const windowBorder = 10; - const sourcePos = $(this.source).offset(); - const { left, top } = sourcePos; + + // get the position of the source element + let { left, top } = this.source.getBoundingClientRect(); + left += window.scrollX; + top += window.scrollY; + const cssProperties = { top, left }; const isLargerThanWindow = this.width + windowBorder > windowWidth; diff --git a/app/channel-settings/index.js b/apps/meteor/app/emoji/index.js similarity index 100% rename from app/channel-settings/index.js rename to apps/meteor/app/emoji/index.js diff --git a/apps/meteor/app/emoji/lib/rocketchat.js b/apps/meteor/app/emoji/lib/rocketchat.js new file mode 100644 index 000000000000..8a38eadc3912 --- /dev/null +++ b/apps/meteor/app/emoji/lib/rocketchat.js @@ -0,0 +1,34 @@ +import { emojioneRender } from '../../emoji-emojione/lib/emojioneRender'; + +let EmojiPicker; +const removeFromRecent = (emoji) => { + if (!EmojiPicker) { + // since this function will be only called client side, the import needs to happen here + ({ EmojiPicker } = require('../client/lib/EmojiPicker')); + } + EmojiPicker.removeFromRecent(emoji.replace(/(^:|:$)/g, '')); +}; + +export const emoji = { + packages: { + base: { + emojiCategories: [{ key: 'recent', i18n: 'Frequently_Used' }], + categoryIndex: 0, + emojisByCategory: { + recent: [], + }, + toneList: {}, + render: emojioneRender, + renderPicker(emojiToRender) { + if (!emoji.list[emojiToRender]) { + removeFromRecent(emojiToRender); + return; + } + const correctPackage = emoji.list[emojiToRender].emojiPackage; + return emoji.packages[correctPackage].renderPicker(emojiToRender); + }, + }, + }, + /** @type {Record} */ + list: {}, +}; diff --git a/app/emoji/server/index.js b/apps/meteor/app/emoji/server/index.js similarity index 100% rename from app/emoji/server/index.js rename to apps/meteor/app/emoji/server/index.js diff --git a/app/error-handler/index.js b/apps/meteor/app/error-handler/index.js similarity index 100% rename from app/error-handler/index.js rename to apps/meteor/app/error-handler/index.js diff --git a/app/error-handler/server/index.js b/apps/meteor/app/error-handler/server/index.js similarity index 100% rename from app/error-handler/server/index.js rename to apps/meteor/app/error-handler/server/index.js diff --git a/app/error-handler/server/lib/RocketChat.ErrorHandler.js b/apps/meteor/app/error-handler/server/lib/RocketChat.ErrorHandler.js similarity index 91% rename from app/error-handler/server/lib/RocketChat.ErrorHandler.js rename to apps/meteor/app/error-handler/server/lib/RocketChat.ErrorHandler.js index ac0f31e29679..8fd8700b4f43 100644 --- a/app/error-handler/server/lib/RocketChat.ErrorHandler.js +++ b/apps/meteor/app/error-handler/server/lib/RocketChat.ErrorHandler.js @@ -1,7 +1,8 @@ import { Meteor } from 'meteor/meteor'; +import { Settings } from '@rocket.chat/models'; import { settings } from '../../../settings/server'; -import { Users, Rooms } from '../../../models'; +import { Users, Rooms } from '../../../models/server'; import { sendMessage } from '../../../lib'; class ErrorHandler { @@ -33,6 +34,7 @@ class ErrorHandler { process.on( 'uncaughtException', Meteor.bindEnvironment((error) => { + Settings.incrementValueById('Uncaught_Exceptions_Count'); if (!this.reporting) { return; } diff --git a/app/error-handler/server/startup/settings.ts b/apps/meteor/app/error-handler/server/startup/settings.ts similarity index 100% rename from app/error-handler/server/startup/settings.ts rename to apps/meteor/app/error-handler/server/startup/settings.ts diff --git a/apps/meteor/app/federation-v2/server/Federation.ts b/apps/meteor/app/federation-v2/server/Federation.ts new file mode 100644 index 000000000000..25080150b687 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/Federation.ts @@ -0,0 +1,21 @@ +import type { IRoom, ValueOf } from '@rocket.chat/core-typings'; +import { isDirectMessageRoom } from '@rocket.chat/core-typings'; + +import { RoomMemberActions } from '../../../definition/IRoomTypeConfig'; + +const allowedActionsInFederatedRooms: ValueOf[] = [ + RoomMemberActions.REMOVE_USER, + RoomMemberActions.INVITE, + RoomMemberActions.JOIN, + RoomMemberActions.LEAVE, +]; + +export class Federation { + public static actionAllowed(room: IRoom, action: ValueOf): boolean { + return isDirectMessageRoom(room) && action === RoomMemberActions.REMOVE_USER ? false : allowedActionsInFederatedRooms.includes(action); + } + + public static isAFederatedUsername(username: string): boolean { + return username.includes('@') && username.includes(':'); + } +} diff --git a/apps/meteor/app/federation-v2/server/application/AbstractFederationService.ts b/apps/meteor/app/federation-v2/server/application/AbstractFederationService.ts new file mode 100644 index 000000000000..773eb480afc2 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/application/AbstractFederationService.ts @@ -0,0 +1,46 @@ +import { FederatedUser } from '../domain/FederatedUser'; +import type { IFederationBridge } from '../domain/IFederationBridge'; +import type { RocketChatSettingsAdapter } from '../infrastructure/rocket-chat/adapters/Settings'; +import type { RocketChatUserAdapter } from '../infrastructure/rocket-chat/adapters/User'; + +export abstract class FederationService { + protected internalHomeServerDomain: string; + + constructor( + protected bridge: IFederationBridge, + protected internalUserAdapter: RocketChatUserAdapter, + protected internalSettingsAdapter: RocketChatSettingsAdapter, + ) { + this.internalHomeServerDomain = this.internalSettingsAdapter.getHomeServerDomain(); + } + + protected async createFederatedUser( + externalUserId: string, + username: string, + existsOnlyOnProxyServer = false, + providedName?: string, + ): Promise { + const externalUserProfileInformation = await this.bridge.getUserProfileInformation(externalUserId); + const name = externalUserProfileInformation?.displayName || providedName || username; + const federatedUser = FederatedUser.createInstance(externalUserId, { + name, + username, + existsOnlyOnProxyServer, + }); + + await this.internalUserAdapter.createFederatedUser(federatedUser); + } + + protected async createFederatedUserForInviterUsingLocalInformation(internalInviterId: string): Promise { + const internalUser = await this.internalUserAdapter.getInternalUserById(internalInviterId); + if (!internalUser || !internalUser?.username) { + throw new Error(`Could not find user id for ${internalInviterId}`); + } + const name = internalUser.name || internalUser.username; + const externalInviterId = await this.bridge.createUser(internalUser.username, name, this.internalHomeServerDomain); + const existsOnlyOnProxyServer = true; + await this.createFederatedUser(externalInviterId, internalUser.username, existsOnlyOnProxyServer, name); + + return externalInviterId; + } +} diff --git a/apps/meteor/app/federation-v2/server/application/RoomServiceListener.ts b/apps/meteor/app/federation-v2/server/application/RoomServiceListener.ts new file mode 100644 index 000000000000..afdd395e5657 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/application/RoomServiceListener.ts @@ -0,0 +1,258 @@ +import { RoomType } from '@rocket.chat/apps-engine/definition/rooms'; +import { isDirectMessageRoom } from '@rocket.chat/core-typings'; + +import { DirectMessageFederatedRoom, FederatedRoom } from '../domain/FederatedRoom'; +import { FederatedUser } from '../domain/FederatedUser'; +import { EVENT_ORIGIN } from '../domain/IFederationBridge'; +import type { IFederationBridge } from '../domain/IFederationBridge'; +import type { RocketChatMessageAdapter } from '../infrastructure/rocket-chat/adapters/Message'; +import type { RocketChatRoomAdapter } from '../infrastructure/rocket-chat/adapters/Room'; +import type { RocketChatSettingsAdapter } from '../infrastructure/rocket-chat/adapters/Settings'; +import type { RocketChatUserAdapter } from '../infrastructure/rocket-chat/adapters/User'; +import type { + FederationRoomCreateInputDto, + FederationRoomChangeMembershipDto, + FederationRoomReceiveExternalMessageDto, + FederationRoomChangeJoinRulesDto, + FederationRoomChangeNameDto, + FederationRoomChangeTopicDto, +} from './input/RoomReceiverDto'; +import { FederationService } from './AbstractFederationService'; + +export class FederationRoomServiceListener extends FederationService { + constructor( + protected internalRoomAdapter: RocketChatRoomAdapter, + protected internalUserAdapter: RocketChatUserAdapter, + protected internalMessageAdapter: RocketChatMessageAdapter, + protected internalSettingsAdapter: RocketChatSettingsAdapter, + protected bridge: IFederationBridge, + ) { + super(bridge, internalUserAdapter, internalSettingsAdapter); + } + + public async onCreateRoom(roomCreateInput: FederationRoomCreateInputDto): Promise { + const { + externalRoomId, + externalInviterId, + normalizedInviterId, + externalRoomName, + normalizedRoomId, + roomType, + wasInternallyProgramaticallyCreated = false, + internalRoomId = '', + } = roomCreateInput; + + if (await this.internalRoomAdapter.getFederatedRoomByExternalId(externalRoomId)) { + return; + } + if (wasInternallyProgramaticallyCreated) { + const room = await this.internalRoomAdapter.getInternalRoomById(internalRoomId); + if (!room || !isDirectMessageRoom(room)) { + return; + } + await this.internalRoomAdapter.updateFederatedRoomByInternalRoomId(internalRoomId, externalRoomId); + return; + } + + const creatorUser = await this.internalUserAdapter.getFederatedUserByExternalId(externalInviterId); + if (!creatorUser) { + await this.createFederatedUser(externalInviterId, normalizedInviterId); + } + const creator = creatorUser || (await this.internalUserAdapter.getFederatedUserByExternalId(externalInviterId)); + if (!creator) { + throw new Error('Creator user not found'); + } + const newFederatedRoom = FederatedRoom.createInstance( + externalRoomId, + normalizedRoomId, + creator, + roomType || RoomType.CHANNEL, + externalRoomName, + ); + await this.internalRoomAdapter.createFederatedRoom(newFederatedRoom); + } + + public async onChangeRoomMembership(roomChangeMembershipInput: FederationRoomChangeMembershipDto): Promise { + const { + externalRoomId, + normalizedInviteeId, + normalizedRoomId, + normalizedInviterId, + externalRoomName, + externalInviteeId, + externalInviterId, + inviteeUsernameOnly, + inviterUsernameOnly, + eventOrigin, + roomType, + leave, + } = roomChangeMembershipInput; + const wasGeneratedOnTheProxyServer = eventOrigin === EVENT_ORIGIN.LOCAL; + const affectedFederatedRoom = await this.internalRoomAdapter.getFederatedRoomByExternalId(externalRoomId); + + if (wasGeneratedOnTheProxyServer && !affectedFederatedRoom) { + throw new Error(`Could not find room with external room id: ${externalRoomId}`); + } + + const isInviterFromTheSameHomeServer = FederatedUser.isOriginalFromTheProxyServer( + this.bridge.extractHomeserverOrigin(externalInviterId), + this.internalHomeServerDomain, + ); + const isInviteeFromTheSameHomeServer = FederatedUser.isOriginalFromTheProxyServer( + this.bridge.extractHomeserverOrigin(externalInviteeId), + this.internalHomeServerDomain, + ); + const inviterUsername = isInviterFromTheSameHomeServer ? inviterUsernameOnly : normalizedInviterId; + const inviteeUsername = isInviteeFromTheSameHomeServer ? inviteeUsernameOnly : normalizedInviteeId; + + const inviterUser = await this.internalUserAdapter.getFederatedUserByExternalId(externalInviterId); + if (!inviterUser) { + await this.createFederatedUser(externalInviterId, inviterUsername, isInviterFromTheSameHomeServer); + } + + const inviteeUser = await this.internalUserAdapter.getFederatedUserByExternalId(externalInviteeId); + if (!inviteeUser) { + await this.createFederatedUser(externalInviteeId, inviteeUsername, isInviteeFromTheSameHomeServer); + } + const federatedInviteeUser = inviteeUser || (await this.internalUserAdapter.getFederatedUserByExternalId(externalInviteeId)); + const federatedInviterUser = inviterUser || (await this.internalUserAdapter.getFederatedUserByExternalId(externalInviterId)); + + if (!federatedInviteeUser || !federatedInviterUser) { + throw new Error('Invitee or inviter user not found'); + } + + if (!wasGeneratedOnTheProxyServer && !affectedFederatedRoom) { + if (!roomType) { + return; + } + if (isDirectMessageRoom({ t: roomType })) { + const members = [federatedInviterUser, federatedInviteeUser]; + const newFederatedRoom = DirectMessageFederatedRoom.createInstance(externalRoomId, federatedInviterUser, members); + await this.internalRoomAdapter.createFederatedRoomForDirectMessage(newFederatedRoom); + await this.bridge.joinRoom(externalRoomId, externalInviteeId); + return; + } + const newFederatedRoom = FederatedRoom.createInstance( + externalRoomId, + normalizedRoomId, + federatedInviterUser, + roomType, + externalRoomName, + ); + + await this.internalRoomAdapter.createFederatedRoom(newFederatedRoom); + await this.bridge.joinRoom(externalRoomId, externalInviteeId); + } + + const federatedRoom = affectedFederatedRoom || (await this.internalRoomAdapter.getFederatedRoomByExternalId(externalRoomId)); + if (!federatedRoom) { + throw new Error(`Could not find room with external room id: ${externalRoomId}`); + } + + if (leave) { + const inviteeAlreadyJoinedTheInternalRoom = await this.internalRoomAdapter.isUserAlreadyJoined( + federatedRoom.getInternalId(), + federatedInviteeUser.getInternalId(), + ); + if (!inviteeAlreadyJoinedTheInternalRoom) { + return; + } + await this.internalRoomAdapter.removeUserFromRoom(federatedRoom, federatedInviteeUser, federatedInviterUser); + return; + } + if (!wasGeneratedOnTheProxyServer && federatedRoom.isDirectMessage()) { + const directMessageRoom = federatedRoom as DirectMessageFederatedRoom; + if (directMessageRoom.isUserPartOfTheRoom(federatedInviteeUser)) { + return; + } + directMessageRoom.addMember(federatedInviteeUser); + const newFederatedRoom = DirectMessageFederatedRoom.createInstance( + externalRoomId, + federatedInviterUser, + directMessageRoom.getMembers(), + ); + await this.internalRoomAdapter.removeDirectMessageRoom(federatedRoom); + await this.internalRoomAdapter.createFederatedRoomForDirectMessage(newFederatedRoom); + return; + } + + await this.internalRoomAdapter.addUserToRoom(federatedRoom, federatedInviteeUser, federatedInviterUser); + } + + public async onExternalMessageReceived(roomReceiveExternalMessageInput: FederationRoomReceiveExternalMessageDto): Promise { + const { externalRoomId, externalSenderId, messageText } = roomReceiveExternalMessageInput; + + const federatedRoom = await this.internalRoomAdapter.getFederatedRoomByExternalId(externalRoomId); + if (!federatedRoom) { + return; + } + + const senderUser = await this.internalUserAdapter.getFederatedUserByExternalId(externalSenderId); + if (!senderUser) { + return; + } + + await this.internalMessageAdapter.sendMessage(senderUser, federatedRoom, messageText); + } + + public async onChangeJoinRules(roomJoinRulesChangeInput: FederationRoomChangeJoinRulesDto): Promise { + const { externalRoomId, roomType } = roomJoinRulesChangeInput; + + const federatedRoom = await this.internalRoomAdapter.getFederatedRoomByExternalId(externalRoomId); + if (!federatedRoom) { + return; + } + + const notAllowedChangeJoinRules = federatedRoom.isDirectMessage(); + if (notAllowedChangeJoinRules) { + return; + } + + federatedRoom.changeRoomType(roomType); + await this.internalRoomAdapter.updateRoomType(federatedRoom); + } + + public async onChangeRoomName(roomChangeNameInput: FederationRoomChangeNameDto): Promise { + const { externalRoomId, normalizedRoomName, externalSenderId } = roomChangeNameInput; + + const federatedRoom = await this.internalRoomAdapter.getFederatedRoomByExternalId(externalRoomId); + if (!federatedRoom) { + return; + } + + if (!federatedRoom.shouldUpdateRoomName(normalizedRoomName)) { + return; + } + + const federatedUser = await this.internalUserAdapter.getFederatedUserByExternalId(externalSenderId); + if (!federatedUser) { + return; + } + + federatedRoom.changeRoomName(normalizedRoomName); + + await this.internalRoomAdapter.updateRoomName(federatedRoom, federatedUser); + } + + public async onChangeRoomTopic(roomChangeTopicInput: FederationRoomChangeTopicDto): Promise { + const { externalRoomId, roomTopic, externalSenderId } = roomChangeTopicInput; + + const federatedRoom = await this.internalRoomAdapter.getFederatedRoomByExternalId(externalRoomId); + if (!federatedRoom) { + return; + } + + if (!federatedRoom.shouldUpdateRoomTopic(roomTopic)) { + return; + } + + const federatedUser = await this.internalUserAdapter.getFederatedUserByExternalId(externalSenderId); + if (!federatedUser) { + return; + } + + federatedRoom.changeRoomTopic(roomTopic); + + await this.internalRoomAdapter.updateRoomTopic(federatedRoom, federatedUser); + } +} diff --git a/apps/meteor/app/federation-v2/server/application/input/RoomReceiverDto.ts b/apps/meteor/app/federation-v2/server/application/input/RoomReceiverDto.ts new file mode 100644 index 000000000000..8e20bbe0c988 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/application/input/RoomReceiverDto.ts @@ -0,0 +1,199 @@ +import type { RoomType } from '@rocket.chat/apps-engine/definition/rooms'; + +import type { EVENT_ORIGIN } from '../../domain/IFederationBridge'; + +export interface IFederationReceiverBaseRoomInputDto { + externalRoomId: string; + normalizedRoomId: string; +} + +export interface IFederationCreateInputDto extends IFederationReceiverBaseRoomInputDto { + externalInviterId: string; + normalizedInviterId: string; + externalRoomName?: string; + roomType?: RoomType; + wasInternallyProgramaticallyCreated?: boolean; + internalRoomId?: string; +} + +export interface IFederationChangeMembershipInputDto extends IFederationReceiverBaseRoomInputDto { + externalInviterId: string; + normalizedInviterId: string; + externalInviteeId: string; + normalizedInviteeId: string; + inviteeUsernameOnly: string; + inviterUsernameOnly: string; + eventOrigin: EVENT_ORIGIN; + leave?: boolean; + roomType?: RoomType; + externalRoomName?: string; +} + +export interface IFederationSendInternalMessageInputDto extends IFederationReceiverBaseRoomInputDto { + externalSenderId: string; + normalizedSenderId: string; + messageText: string; +} + +export interface IFederationRoomChangeJoinRulesDtoInputDto extends IFederationReceiverBaseRoomInputDto { + roomType: RoomType; +} + +export interface IFederationRoomNameChangeInputDto extends IFederationReceiverBaseRoomInputDto { + normalizedRoomName: string; + + externalSenderId: string; +} + +export interface IFederationRoomTopicChangeInputDto extends IFederationReceiverBaseRoomInputDto { + roomTopic: string; + + externalSenderId: string; +} + +export class FederationBaseRoomInputDto { + constructor({ externalRoomId, normalizedRoomId }: IFederationReceiverBaseRoomInputDto) { + this.externalRoomId = externalRoomId; + this.normalizedRoomId = normalizedRoomId; + } + + externalRoomId: string; + + normalizedRoomId: string; +} + +export class FederationRoomCreateInputDto extends FederationBaseRoomInputDto { + constructor({ + externalRoomId, + normalizedRoomId, + externalInviterId, + normalizedInviterId, + wasInternallyProgramaticallyCreated, + roomType, + externalRoomName, + internalRoomId, + }: IFederationCreateInputDto) { + super({ externalRoomId, normalizedRoomId }); + this.externalInviterId = externalInviterId; + this.normalizedInviterId = normalizedInviterId; + this.wasInternallyProgramaticallyCreated = wasInternallyProgramaticallyCreated; + this.roomType = roomType; + this.externalRoomName = externalRoomName; + this.internalRoomId = internalRoomId; + } + + externalInviterId: string; + + normalizedInviterId: string; + + wasInternallyProgramaticallyCreated?: boolean; + + internalRoomId?: string; + + externalRoomName?: string; + + roomType?: RoomType; +} + +export class FederationRoomChangeMembershipDto extends FederationBaseRoomInputDto { + constructor({ + externalRoomId, + normalizedRoomId, + externalInviterId, + normalizedInviterId, + externalInviteeId, + normalizedInviteeId, + inviteeUsernameOnly, + inviterUsernameOnly, + eventOrigin, + leave, + roomType, + externalRoomName, + }: IFederationChangeMembershipInputDto) { + super({ externalRoomId, normalizedRoomId }); + this.externalInviterId = externalInviterId; + this.normalizedInviterId = normalizedInviterId; + this.externalInviteeId = externalInviteeId; + this.normalizedInviteeId = normalizedInviteeId; + this.inviteeUsernameOnly = inviteeUsernameOnly; + this.inviterUsernameOnly = inviterUsernameOnly; + this.eventOrigin = eventOrigin; + this.leave = leave; + this.roomType = roomType; + this.externalRoomName = externalRoomName; + } + + externalInviterId: string; + + normalizedInviterId: string; + + inviterUsernameOnly: string; + + externalInviteeId: string; + + normalizedInviteeId: string; + + inviteeUsernameOnly: string; + + eventOrigin: EVENT_ORIGIN; + + roomType?: RoomType; + + leave?: boolean; + + externalRoomName?: string; +} + +export class FederationRoomReceiveExternalMessageDto extends FederationBaseRoomInputDto { + constructor({ + externalRoomId, + normalizedRoomId, + externalSenderId, + normalizedSenderId, + messageText, + }: IFederationSendInternalMessageInputDto) { + super({ externalRoomId, normalizedRoomId }); + this.externalSenderId = externalSenderId; + this.normalizedSenderId = normalizedSenderId; + this.messageText = messageText; + } + + externalSenderId: string; + + normalizedSenderId: string; + + messageText: string; +} + +export class FederationRoomChangeJoinRulesDto extends FederationBaseRoomInputDto { + constructor({ externalRoomId, normalizedRoomId, roomType }: IFederationRoomChangeJoinRulesDtoInputDto) { + super({ externalRoomId, normalizedRoomId }); + this.roomType = roomType; + } + + roomType: RoomType; +} + +export class FederationRoomChangeNameDto extends FederationBaseRoomInputDto { + constructor({ externalRoomId, normalizedRoomId, normalizedRoomName, externalSenderId }: IFederationRoomNameChangeInputDto) { + super({ externalRoomId, normalizedRoomId }); + this.normalizedRoomName = normalizedRoomName; + this.externalSenderId = externalSenderId; + } + + normalizedRoomName: string; + + externalSenderId: string; +} + +export class FederationRoomChangeTopicDto extends FederationBaseRoomInputDto { + constructor({ externalRoomId, normalizedRoomId, roomTopic, externalSenderId }: IFederationRoomTopicChangeInputDto) { + super({ externalRoomId, normalizedRoomId }); + this.roomTopic = roomTopic; + this.externalSenderId = externalSenderId; + } + + roomTopic: string; + + externalSenderId: string; +} diff --git a/apps/meteor/app/federation-v2/server/application/input/RoomSenderDto.ts b/apps/meteor/app/federation-v2/server/application/input/RoomSenderDto.ts new file mode 100644 index 000000000000..a638ec37f6bc --- /dev/null +++ b/apps/meteor/app/federation-v2/server/application/input/RoomSenderDto.ts @@ -0,0 +1,91 @@ +import type { IMessage } from '@rocket.chat/core-typings'; + +export interface IFederationSenderBaseRoomInputDto { + internalRoomId: string; +} + +export interface IFederationCreateDMAndInviteUserDto extends IFederationSenderBaseRoomInputDto { + internalInviterId: string; + rawInviteeId: string; + normalizedInviteeId: string; + inviteeUsernameOnly: string; +} + +export interface IFederationRoomSendExternalMessageDto extends IFederationSenderBaseRoomInputDto { + message: IMessage; + internalSenderId: string; +} + +export interface IFederationAfterLeaveRoomDto extends IFederationSenderBaseRoomInputDto { + internalUserId: string; +} + +export interface IFederationAfterRemoveUserFromRoomDto extends IFederationSenderBaseRoomInputDto { + internalUserId: string; + actionDoneByInternalId: string; +} + +export class FederationSenderBaseRoomInputDto { + constructor({ internalRoomId }: IFederationSenderBaseRoomInputDto) { + this.internalRoomId = internalRoomId; + } + + internalRoomId: string; +} + +export class FederationCreateDMAndInviteUserDto extends FederationSenderBaseRoomInputDto { + constructor({ + internalRoomId, + internalInviterId, + rawInviteeId, + normalizedInviteeId, + inviteeUsernameOnly, + }: IFederationCreateDMAndInviteUserDto) { + super({ internalRoomId }); + this.internalInviterId = internalInviterId; + this.rawInviteeId = rawInviteeId; + this.normalizedInviteeId = normalizedInviteeId; + this.inviteeUsernameOnly = inviteeUsernameOnly; + } + + internalInviterId: string; + + rawInviteeId: string; + + normalizedInviteeId: string; + + inviteeUsernameOnly: string; +} + +export class FederationRoomSendExternalMessageDto extends FederationSenderBaseRoomInputDto { + constructor({ internalRoomId, internalSenderId, message }: IFederationRoomSendExternalMessageDto) { + super({ internalRoomId }); + this.internalSenderId = internalSenderId; + this.message = message; + } + + internalSenderId: string; + + message: IMessage; +} + +export class FederationAfterLeaveRoomDto extends FederationSenderBaseRoomInputDto { + constructor({ internalRoomId, internalUserId }: IFederationAfterLeaveRoomDto) { + super({ internalRoomId }); + this.internalUserId = internalUserId; + } + + internalUserId: string; +} + +export class FederationAfterRemoveUserFromRoomDto extends FederationSenderBaseRoomInputDto { + constructor({ internalRoomId, internalUserId, actionDoneByInternalId }: IFederationAfterRemoveUserFromRoomDto) { + super({ internalRoomId }); + this.internalUserId = internalUserId; + this.actionDoneByInternalId = actionDoneByInternalId; + } + + internalUserId: string; + + actionDoneByInternalId: string; +} diff --git a/apps/meteor/app/federation-v2/server/application/sender/RoomInternalHooksValidator.ts b/apps/meteor/app/federation-v2/server/application/sender/RoomInternalHooksValidator.ts new file mode 100644 index 000000000000..f8ec436fb6f4 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/application/sender/RoomInternalHooksValidator.ts @@ -0,0 +1,97 @@ +import type { IRoom, IUser } from '@rocket.chat/core-typings'; +import { isDirectMessageRoom, isRoomFederated, isUserFederated } from '@rocket.chat/core-typings'; + +import { FederatedRoom } from '../../domain/FederatedRoom'; +import { FederatedUser } from '../../domain/FederatedUser'; +import type { IFederationBridge } from '../../domain/IFederationBridge'; +import type { RocketChatRoomAdapter } from '../../infrastructure/rocket-chat/adapters/Room'; +import type { RocketChatSettingsAdapter } from '../../infrastructure/rocket-chat/adapters/Settings'; +import type { RocketChatUserAdapter } from '../../infrastructure/rocket-chat/adapters/User'; +import { FederationService } from '../AbstractFederationService'; + +export class FederationRoomInternalHooksValidator extends FederationService { + constructor( + protected internalRoomAdapter: RocketChatRoomAdapter, + protected internalUserAdapter: RocketChatUserAdapter, + protected internalSettingsAdapter: RocketChatSettingsAdapter, + protected bridge: IFederationBridge, + ) { + super(bridge, internalUserAdapter, internalSettingsAdapter); + } + + public async canAddFederatedUserToNonFederatedRoom(internalUser: IUser | string, internalRoom: IRoom): Promise { + if (isRoomFederated(internalRoom)) { + return; + } + + if (this.isAddingANewExternalUser(internalUser)) { + throw new Error('error-cant-add-federated-users'); + } + + const user = await this.internalUserAdapter.getFederatedUserByInternalId((internalUser as IUser)._id); + const isAFederatedUser = user?.isRemote(); + if (isAFederatedUser) { + throw new Error('error-cant-add-federated-users'); + } + } + + public async canAddFederatedUserToFederatedRoom( + internalUser: IUser | string, + internalInviter: IUser, + internalRoom: IRoom, + ): Promise { + if (!isRoomFederated(internalRoom)) { + return; + } + if (this.isAddingANewExternalUser(internalUser) && !isDirectMessageRoom(internalRoom)) { + throw new Error('error-this-is-an-ee-feature'); + } + + const inviter = await this.internalUserAdapter.getFederatedUserByInternalId(internalInviter._id); + const externalRoom = await this.internalRoomAdapter.getFederatedRoomByInternalId(internalRoom._id); + if (!externalRoom || !inviter) { + return; + } + + const isRoomFromTheProxyServer = FederatedRoom.isOriginalFromTheProxyServer( + this.bridge.extractHomeserverOrigin(externalRoom.getExternalId()), + this.internalHomeServerDomain, + ); + const isInviterFromTheProxyServer = FederatedUser.isOriginalFromTheProxyServer( + this.bridge.extractHomeserverOrigin(inviter.getExternalId()), + this.internalHomeServerDomain, + ); + const fullActionExecutedOnTheRemoteHomeServer = !isRoomFromTheProxyServer && !isInviterFromTheProxyServer; + if (fullActionExecutedOnTheRemoteHomeServer) { + return; + } + + const invitee = await this.internalUserAdapter.getFederatedUserByInternalId((internalUser as IUser)._id); + const addingAnExternalUser = invitee?.isRemote(); + const addingExternalUserToNonDirectMessageRoom = addingAnExternalUser && !isDirectMessageRoom(internalRoom); + if (addingExternalUserToNonDirectMessageRoom) { + throw new Error('error-this-is-an-ee-feature'); + } + } + + public async canCreateDirectMessageFromUI(internalUsers: (IUser | string)[]): Promise { + const usernames: string[] = internalUsers.map((user) => { + if (this.isAddingANewExternalUser(user)) { + return user; + } + return user.username || ''; + }); + const atLeastOneExternalUser = + usernames.some( + (username) => + !FederatedUser.isOriginalFromTheProxyServer(this.bridge.extractHomeserverOrigin(username), this.internalHomeServerDomain), + ) || internalUsers.filter((user) => !this.isAddingANewExternalUser(user)).some((user) => isUserFederated(user as IUser)); + if (atLeastOneExternalUser) { + throw new Error('error-this-is-an-ee-feature'); + } + } + + private isAddingANewExternalUser(user: IUser | string): user is string { + return typeof user === 'string'; + } +} diff --git a/apps/meteor/app/federation-v2/server/application/sender/RoomServiceSender.ts b/apps/meteor/app/federation-v2/server/application/sender/RoomServiceSender.ts new file mode 100644 index 000000000000..721ee5f65186 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/application/sender/RoomServiceSender.ts @@ -0,0 +1,158 @@ +import type { IMessage } from '@rocket.chat/core-typings'; + +import { DirectMessageFederatedRoom } from '../../domain/FederatedRoom'; +import { FederatedUser } from '../../domain/FederatedUser'; +import type { IFederationBridge } from '../../domain/IFederationBridge'; +import type { RocketChatRoomAdapter } from '../../infrastructure/rocket-chat/adapters/Room'; +import type { RocketChatSettingsAdapter } from '../../infrastructure/rocket-chat/adapters/Settings'; +import type { RocketChatUserAdapter } from '../../infrastructure/rocket-chat/adapters/User'; +import { FederationService } from '../AbstractFederationService'; +import type { + FederationAfterLeaveRoomDto, + FederationAfterRemoveUserFromRoomDto, + FederationCreateDMAndInviteUserDto, + FederationRoomSendExternalMessageDto, +} from '../input/RoomSenderDto'; + +export class FederationRoomServiceSender extends FederationService { + constructor( + protected internalRoomAdapter: RocketChatRoomAdapter, + protected internalUserAdapter: RocketChatUserAdapter, + protected internalSettingsAdapter: RocketChatSettingsAdapter, + protected bridge: IFederationBridge, + ) { + super(bridge, internalUserAdapter, internalSettingsAdapter); + } + + public async createDirectMessageRoomAndInviteUser(roomCreateDMAndInviteUserInput: FederationCreateDMAndInviteUserDto): Promise { + const { normalizedInviteeId, rawInviteeId, internalInviterId, inviteeUsernameOnly, internalRoomId } = roomCreateDMAndInviteUserInput; + + const internalInviterUser = await this.internalUserAdapter.getFederatedUserByInternalId(internalInviterId); + if (!internalInviterUser) { + await this.createFederatedUserForInviterUsingLocalInformation(internalInviterId); + } + + const internalInviteeUser = await this.internalUserAdapter.getFederatedUserByInternalId(normalizedInviteeId); + if (!internalInviteeUser) { + const existsOnlyOnProxyServer = false; + await this.createFederatedUser(rawInviteeId, normalizedInviteeId, existsOnlyOnProxyServer); + } + + const federatedInviterUser = internalInviterUser || (await this.internalUserAdapter.getFederatedUserByInternalId(internalInviterId)); + const federatedInviteeUser = + internalInviteeUser || (await this.internalUserAdapter.getFederatedUserByInternalUsername(normalizedInviteeId)); + if (!federatedInviterUser || !federatedInviteeUser) { + throw new Error('Could not find inviter or invitee user'); + } + + const isInviteeFromTheSameHomeServer = FederatedUser.isOriginalFromTheProxyServer( + this.bridge.extractHomeserverOrigin(rawInviteeId), + this.internalHomeServerDomain, + ); + + const internalFederatedRoom = await this.internalRoomAdapter.getDirectMessageFederatedRoomByUserIds([ + federatedInviteeUser.getInternalId(), + federatedInviterUser.getInternalId(), + ]); + + if (!internalFederatedRoom) { + const externalRoomId = await this.bridge.createDirectMessageRoom( + federatedInviterUser.getExternalId(), + [federatedInviteeUser.getExternalId()], + { internalRoomId }, + ); + const newFederatedRoom = DirectMessageFederatedRoom.createInstance(externalRoomId, federatedInviterUser, [ + federatedInviterUser, + federatedInviteeUser, + ]); + await this.internalRoomAdapter.createFederatedRoomForDirectMessage(newFederatedRoom); + } + + const federatedRoom = + internalFederatedRoom || + (await this.internalRoomAdapter.getDirectMessageFederatedRoomByUserIds([ + federatedInviteeUser.getInternalId(), + federatedInviterUser.getInternalId(), + ])); + + if (!federatedRoom) { + throw new Error( + `Could not find room id for users: ${[federatedInviteeUser.getInternalId(), federatedInviterUser.getInternalId()].join(' ')}`, + ); + } + + if (isInviteeFromTheSameHomeServer) { + const profile = await this.bridge.getUserProfileInformation(federatedInviteeUser.getExternalId()); + if (!profile) { + await this.bridge.createUser( + inviteeUsernameOnly, + federatedInviteeUser.getName() || normalizedInviteeId, + this.internalHomeServerDomain, + ); + } + await this.bridge.inviteToRoom( + federatedRoom.getExternalId(), + federatedInviterUser.getExternalId(), + federatedInviteeUser.getExternalId(), + ); + await this.bridge.joinRoom(federatedRoom.getExternalId(), federatedInviteeUser.getExternalId()); + } + + await this.internalRoomAdapter.addUserToRoom(federatedRoom, federatedInviteeUser, federatedInviterUser); + } + + public async afterUserLeaveRoom(afterLeaveRoomInput: FederationAfterLeaveRoomDto): Promise { + const { internalRoomId, internalUserId } = afterLeaveRoomInput; + + const federatedRoom = await this.internalRoomAdapter.getFederatedRoomByInternalId(internalRoomId); + if (!federatedRoom) { + return; + } + + const federatedUser = await this.internalUserAdapter.getFederatedUserByInternalId(internalUserId); + if (!federatedUser) { + return; + } + + await this.bridge.leaveRoom(federatedRoom.getExternalId(), federatedUser.getExternalId()); + } + + public async onUserRemovedFromRoom(afterLeaveRoomInput: FederationAfterRemoveUserFromRoomDto): Promise { + const { internalRoomId, internalUserId, actionDoneByInternalId } = afterLeaveRoomInput; + + const federatedRoom = await this.internalRoomAdapter.getFederatedRoomByInternalId(internalRoomId); + if (!federatedRoom) { + return; + } + + const federatedUser = await this.internalUserAdapter.getFederatedUserByInternalId(internalUserId); + if (!federatedUser) { + return; + } + + const byWhom = await this.internalUserAdapter.getFederatedUserByInternalId(actionDoneByInternalId); + if (!byWhom) { + return; + } + + await this.bridge.kickUserFromRoom(federatedRoom.getExternalId(), federatedUser.getExternalId(), byWhom.getExternalId()); + } + + public async sendExternalMessage(roomSendExternalMessageInput: FederationRoomSendExternalMessageDto): Promise { + const { internalRoomId, internalSenderId, message } = roomSendExternalMessageInput; + + const federatedSender = await this.internalUserAdapter.getFederatedUserByInternalId(internalSenderId); + if (!federatedSender) { + throw new Error(`Could not find user id for ${internalSenderId}`); + } + + const federatedRoom = await this.internalRoomAdapter.getFederatedRoomByInternalId(internalRoomId); + if (!federatedRoom) { + throw new Error(`Could not find room id for ${internalRoomId}`); + } + + await this.bridge.sendMessage(federatedRoom.getExternalId(), federatedSender.getExternalId(), message.msg); + + return message; // this need to be here due to a limitation in the internal API that was expecting the return of the sendMessage function. + } +} diff --git a/apps/meteor/app/federation-v2/server/domain/FederatedRoom.ts b/apps/meteor/app/federation-v2/server/domain/FederatedRoom.ts new file mode 100644 index 000000000000..5a740830ddf4 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/domain/FederatedRoom.ts @@ -0,0 +1,206 @@ +import { RoomType } from '@rocket.chat/apps-engine/definition/rooms'; +import type { IRoom } from '@rocket.chat/core-typings'; +import { ObjectId } from 'mongodb'; // This should not be in the domain layer, but its a known "problem" + +import type { FederatedUser } from './FederatedUser'; + +export const isAnInternalIdentifier = (fromOriginName: string, localOriginName: string): boolean => { + return fromOriginName === localOriginName; +}; + +export abstract class AbstractFederatedRoom { + protected externalId: string; + + protected internalId: string; + + protected internalReference: Partial; + + protected constructor({ externalId, internalReference }: { externalId: string; internalReference: Partial }) { + this.externalId = externalId; + this.internalReference = internalReference; + this.internalId = internalReference._id || new ObjectId().toHexString(); + } + + protected static generateTemporaryName(normalizedExternalId: string): string { + return `Federation-${normalizedExternalId}`; + } + + public abstract isDirectMessage(): boolean; + + public getExternalId(): string { + return this.externalId; + } + + public getRoomType(): RoomType { + return this.internalReference.t as RoomType; + } + + public getInternalId(): string { + return this.internalId; + } + + public getName(): string | undefined { + return this.internalReference.fname || this.internalReference.name; + } + + public getTopic(): string | undefined { + return this.internalReference.topic; + } + + public static isOriginalFromTheProxyServer(fromOriginName: string, proxyServerOriginName: string): boolean { + return isAnInternalIdentifier(fromOriginName, proxyServerOriginName); + } + + public getInternalReference(): Readonly> { + return Object.freeze({ + ...this.internalReference, + _id: this.internalId, + }); + } + + public getCreatorUsername(): string | undefined { + return this.internalReference.u?.username; + } + + public getCreatorId(): string | undefined { + return this.internalReference.u?._id; + } + + public changeRoomType(type: RoomType): void { + if (this.isDirectMessage()) { + throw new Error('Its not possible to change a direct message type'); + } + this.internalReference.t = type; + } + + public changeRoomName(name: string): void { + if (this.isDirectMessage()) { + throw new Error('Its not possible to change a direct message name'); + } + this.internalReference.name = name; + this.internalReference.fname = name; + } + + public changeRoomTopic(topic: string): void { + if (this.isDirectMessage()) { + throw new Error('Its not possible to change a direct message topic'); + } + this.internalReference.topic = topic; + } + + public shouldUpdateRoomName(aRoomName: string): boolean { + return this.internalReference?.name !== aRoomName && !this.isDirectMessage(); + } + + public shouldUpdateRoomTopic(aRoomTopic: string): boolean { + return this.internalReference?.topic !== aRoomTopic && !this.isDirectMessage(); + } +} + +export class FederatedRoom extends AbstractFederatedRoom { + protected constructor({ externalId, internalReference }: { externalId: string; internalReference: Partial }) { + super({ externalId, internalReference }); + } + + public static createInstance( + externalId: string, + normalizedExternalId: string, + creator: FederatedUser, + type: RoomType, + name?: string, + ): FederatedRoom { + if (type === RoomType.DIRECT_MESSAGE) { + throw new Error('For DMs please use the specific class'); + } + const roomName = name || FederatedRoom.generateTemporaryName(normalizedExternalId); + return new FederatedRoom({ + externalId, + internalReference: { + t: type, + name: roomName, + fname: roomName, + u: creator.getInternalReference(), + }, + }); + } + + public static createWithInternalReference(externalId: string, internalReference: IRoom): FederatedRoom { + if (internalReference.t === RoomType.DIRECT_MESSAGE) { + throw new Error('For DMs please use the specific class'); + } + return new FederatedRoom({ + externalId, + internalReference, + }); + } + + public isDirectMessage(): boolean { + return false; + } +} + +export class DirectMessageFederatedRoom extends AbstractFederatedRoom { + public members: FederatedUser[]; + + protected constructor({ + externalId, + internalReference, + members, + }: { + externalId: string; + internalReference: Partial; + members: FederatedUser[]; + }) { + super({ externalId, internalReference }); + this.members = members; + } + + public static createInstance(externalId: string, creator: FederatedUser, members: FederatedUser[]): DirectMessageFederatedRoom { + return new DirectMessageFederatedRoom({ + externalId, + members, + internalReference: { + t: RoomType.DIRECT_MESSAGE, + u: creator.getInternalReference(), + }, + }); + } + + public static createWithInternalReference( + externalId: string, + internalReference: IRoom, + members: FederatedUser[], + ): DirectMessageFederatedRoom { + return new DirectMessageFederatedRoom({ + externalId, + internalReference, + members, + }); + } + + public getMembersUsernames(): string[] { + return this.members.map((user) => user.getUsername() || '').filter(Boolean); + } + + public getMembers(): FederatedUser[] { + return this.members; + } + + public addMember(member: FederatedUser): void { + this.members.push(member); + } + + public isDirectMessage(): boolean { + return true; + } + + public isUserPartOfTheRoom(federatedUser: FederatedUser): boolean { + if (!federatedUser.getUsername()) { + return false; + } + if (!this.internalReference?.usernames) { + return false; + } + return this.internalReference.usernames.includes(federatedUser.getUsername() as string); + } +} diff --git a/apps/meteor/app/federation-v2/server/domain/FederatedUser.ts b/apps/meteor/app/federation-v2/server/domain/FederatedUser.ts new file mode 100644 index 000000000000..3506965fc882 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/domain/FederatedUser.ts @@ -0,0 +1,112 @@ +import type { IUser } from '@rocket.chat/core-typings'; +import { UserStatus } from '@rocket.chat/core-typings'; +import { ObjectId } from 'mongodb'; // This should not be in the domain layer, but its a known "problem" + +import { isAnInternalIdentifier } from './FederatedRoom'; + +export interface IFederatedUserCreationParams { + name: string; + username: string; + existsOnlyOnProxyServer: boolean; +} + +export class FederatedUser { + protected externalId: string; + + protected internalId: string; + + protected existsOnlyOnProxyServer: boolean; + + protected internalReference: IUser; + + protected constructor({ + externalId, + internalReference, + existsOnlyOnProxyServer, + }: { + externalId: string; + internalReference: IUser; + existsOnlyOnProxyServer: boolean; + }) { + this.externalId = externalId; + this.existsOnlyOnProxyServer = existsOnlyOnProxyServer; + this.internalReference = internalReference; + this.internalId = internalReference._id || new ObjectId().toHexString(); + } + + public static createInstance(externalId: string, params: IFederatedUserCreationParams): FederatedUser { + return new FederatedUser({ + externalId, + existsOnlyOnProxyServer: params.existsOnlyOnProxyServer, + internalReference: FederatedUser.createLocalInstanceOnly(params), + }); + } + + public static createLocalInstanceOnly(params: IFederatedUserCreationParams): IUser { + return { + username: params.username, + name: params.name, + type: 'user', + status: UserStatus.ONLINE, + active: true, + roles: ['user'], + requirePasswordChange: false, + federated: !params.existsOnlyOnProxyServer, + } as unknown as IUser; + } + + public static createWithInternalReference(externalId: string, existsOnlyOnProxyServer: boolean, internalReference: IUser): FederatedUser { + return new FederatedUser({ + externalId, + existsOnlyOnProxyServer, + internalReference, + }); + } + + public getInternalReference(): Readonly { + return Object.freeze({ + ...this.internalReference, + _id: this.internalId, + }); + } + + public getStorageRepresentation(): Readonly { + return { + _id: this.internalId, + username: this.internalReference.username || '', + type: this.internalReference.type, + status: this.internalReference.status, + active: this.internalReference.active, + roles: this.internalReference.roles, + name: this.internalReference.name, + requirePasswordChange: this.internalReference.requirePasswordChange, + createdAt: new Date(), + _updatedAt: new Date(), + federated: this.isRemote(), + }; + } + + public getUsername(): string | undefined { + return this.internalReference?.username; + } + + public getName(): string | undefined { + return this.internalReference?.name; + } + + public static isOriginalFromTheProxyServer(fromOriginName: string, localOriginName: string): boolean { + return isAnInternalIdentifier(fromOriginName, localOriginName); + } + + public getExternalId(): string { + return this.externalId; + } + + public isRemote(): boolean { + return !this.existsOnlyOnProxyServer; + } + + public getInternalId(): string { + return this.internalId; + } +} diff --git a/apps/meteor/app/federation-v2/server/domain/IFederationBridge.ts b/apps/meteor/app/federation-v2/server/domain/IFederationBridge.ts new file mode 100644 index 000000000000..da62c804cb4d --- /dev/null +++ b/apps/meteor/app/federation-v2/server/domain/IFederationBridge.ts @@ -0,0 +1,26 @@ +export interface IExternalUserProfileInformation { + displayName: string; +} + +export enum EVENT_ORIGIN { + LOCAL = 'LOCAL', + REMOTE = 'REMOTE', +} + +export interface IFederationBridge { + start(): Promise; + stop(): Promise; + onFederationAvailabilityChanged(enabled: boolean): Promise; + getUserProfileInformation(externalUserId: string): Promise; + joinRoom(externalRoomId: string, externalUserId: string): Promise; + createDirectMessageRoom(externalCreatorId: string, externalInviteeIds: string[], extraData?: Record): Promise; + inviteToRoom(externalRoomId: string, externalInviterId: string, externalInviteeId: string): Promise; + sendMessage(externalRoomId: string, externaSenderId: string, text: string): Promise; + createUser(username: string, name: string, domain: string): Promise; + isUserIdFromTheSameHomeserver(externalUserId: string, domain: string): boolean; + extractHomeserverOrigin(externalUserId: string): string; + isRoomFromTheSameHomeserver(externalRoomId: string, domain: string): boolean; + leaveRoom(externalRoomId: string, externalUserId: string): Promise; + kickUserFromRoom(externalRoomId: string, externalUserId: string, externalOwnerId: string): Promise; + logFederationStartupInfo(info?: string): void; +} diff --git a/apps/meteor/app/federation-v2/server/index.ts b/apps/meteor/app/federation-v2/server/index.ts new file mode 100644 index 000000000000..c73d09a31677 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/index.ts @@ -0,0 +1,62 @@ +import { FederationFactory } from './infrastructure/Factory'; + +export const FEDERATION_PROCESSING_CONCURRENCY = 1; + +export const rocketSettingsAdapter = FederationFactory.buildRocketSettingsAdapter(); +export const queueInstance = FederationFactory.buildFederationQueue(); +rocketSettingsAdapter.initialize(); +export const federationQueueInstance = FederationFactory.buildFederationQueue(); +const federationBridge = FederationFactory.buildFederationBridge(rocketSettingsAdapter, federationQueueInstance); +const rocketRoomAdapter = FederationFactory.buildRocketRoomAdapter(); +const rocketUserAdapter = FederationFactory.buildRocketUserAdapter(); +const rocketMessageAdapter = FederationFactory.buildRocketMessageAdapter(); + +const federationRoomServiceReceiver = FederationFactory.buildRoomServiceReceiver( + rocketRoomAdapter, + rocketUserAdapter, + rocketMessageAdapter, + rocketSettingsAdapter, + federationBridge, +); + +const federationEventsHandler = FederationFactory.buildFederationEventHandler(federationRoomServiceReceiver, rocketSettingsAdapter); + +export const federationRoomServiceSender = FederationFactory.buildRoomServiceSender( + rocketRoomAdapter, + rocketUserAdapter, + rocketSettingsAdapter, + federationBridge, +); + +const federationRoomInternalHooksValidator = FederationFactory.buildRoomInternalHooksValidator( + rocketRoomAdapter, + rocketUserAdapter, + rocketSettingsAdapter, + federationBridge, +); + +FederationFactory.setupListeners(federationRoomServiceSender, federationRoomInternalHooksValidator); +let cancelSettingsObserver: () => void; + +export const runFederation = async (): Promise => { + federationQueueInstance.setHandler(federationEventsHandler.handleEvent.bind(federationEventsHandler), FEDERATION_PROCESSING_CONCURRENCY); + cancelSettingsObserver = rocketSettingsAdapter.onFederationEnabledStatusChanged( + federationBridge.onFederationAvailabilityChanged.bind(federationBridge), + ); + if (!rocketSettingsAdapter.isFederationEnabled()) { + return; + } + await federationBridge.start(); + federationBridge.logFederationStartupInfo('Running Federation V2'); + require('./infrastructure/rocket-chat/slash-commands'); +}; + +export const stopFederation = async (): Promise => { + FederationFactory.removeListeners(); + await federationBridge.stop(); + cancelSettingsObserver(); +}; + +(async (): Promise => { + await runFederation(); +})(); diff --git a/apps/meteor/app/federation-v2/server/infrastructure/Factory.ts b/apps/meteor/app/federation-v2/server/infrastructure/Factory.ts new file mode 100644 index 000000000000..d922f6b7aab0 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/Factory.ts @@ -0,0 +1,142 @@ +import type { IRoom, IUser } from '@rocket.chat/core-typings'; + +import { FederationRoomServiceListener } from '../application/RoomServiceListener'; +import { FederationRoomServiceSender } from '../application/sender/RoomServiceSender'; +import { MatrixBridge } from './matrix/Bridge'; +import { MatrixEventsHandler } from './matrix/handlers'; +import type { MatrixBaseEventHandler } from './matrix/handlers/BaseEvent'; +import { + MatrixRoomCreatedHandler, + MatrixRoomJoinRulesChangedHandler, + MatrixRoomMembershipChangedHandler, + MatrixRoomMessageSentHandler, + MatrixRoomNameChangedHandler, + MatrixRoomTopicChangedHandler, +} from './matrix/handlers/Room'; +import { InMemoryQueue } from './queue/InMemoryQueue'; +import { RocketChatMessageAdapter } from './rocket-chat/adapters/Message'; +import { RocketChatRoomAdapter } from './rocket-chat/adapters/Room'; +import { RocketChatSettingsAdapter } from './rocket-chat/adapters/Settings'; +import { RocketChatUserAdapter } from './rocket-chat/adapters/User'; +import type { IFederationBridge } from '../domain/IFederationBridge'; +import { FederationHooks } from './rocket-chat/hooks'; +import { FederationRoomSenderConverter } from './rocket-chat/converters/RoomSender'; +import { FederationRoomInternalHooksValidator } from '../application/sender/RoomInternalHooksValidator'; + +export class FederationFactory { + public static buildRocketSettingsAdapter(): RocketChatSettingsAdapter { + return new RocketChatSettingsAdapter(); + } + + public static buildRocketRoomAdapter(): RocketChatRoomAdapter { + return new RocketChatRoomAdapter(); + } + + public static buildRocketUserAdapter(): RocketChatUserAdapter { + return new RocketChatUserAdapter(); + } + + public static buildRocketMessageAdapter(): RocketChatMessageAdapter { + return new RocketChatMessageAdapter(); + } + + public static buildFederationQueue(): InMemoryQueue { + return new InMemoryQueue(); + } + + public static buildRoomServiceReceiver( + rocketRoomAdapter: RocketChatRoomAdapter, + rocketUserAdapter: RocketChatUserAdapter, + rocketMessageAdapter: RocketChatMessageAdapter, + rocketSettingsAdapter: RocketChatSettingsAdapter, + bridge: IFederationBridge, + ): FederationRoomServiceListener { + return new FederationRoomServiceListener(rocketRoomAdapter, rocketUserAdapter, rocketMessageAdapter, rocketSettingsAdapter, bridge); + } + + public static buildRoomServiceSender( + rocketRoomAdapter: RocketChatRoomAdapter, + rocketUserAdapter: RocketChatUserAdapter, + rocketSettingsAdapter: RocketChatSettingsAdapter, + bridge: IFederationBridge, + ): FederationRoomServiceSender { + return new FederationRoomServiceSender(rocketRoomAdapter, rocketUserAdapter, rocketSettingsAdapter, bridge); + } + + public static buildRoomInternalHooksValidator( + rocketRoomAdapter: RocketChatRoomAdapter, + rocketUserAdapter: RocketChatUserAdapter, + rocketSettingsAdapter: RocketChatSettingsAdapter, + bridge: IFederationBridge, + ): FederationRoomInternalHooksValidator { + return new FederationRoomInternalHooksValidator(rocketRoomAdapter, rocketUserAdapter, rocketSettingsAdapter, bridge); + } + + public static buildFederationBridge(rocketSettingsAdapter: RocketChatSettingsAdapter, queue: InMemoryQueue): IFederationBridge { + return new MatrixBridge( + rocketSettingsAdapter.getApplicationServiceId(), + rocketSettingsAdapter.getHomeServerUrl(), + rocketSettingsAdapter.getHomeServerDomain(), + rocketSettingsAdapter.getBridgeUrl(), + rocketSettingsAdapter.getBridgePort(), + rocketSettingsAdapter.generateRegistrationFileObject(), + queue.addToQueue.bind(queue), + ); + } + + public static buildFederationEventHandler( + roomServiceReceive: FederationRoomServiceListener, + rocketSettingsAdapter: RocketChatSettingsAdapter, + ): MatrixEventsHandler { + return new MatrixEventsHandler(FederationFactory.getEventHandlers(roomServiceReceive, rocketSettingsAdapter)); + } + + public static getEventHandlers( + roomServiceReceiver: FederationRoomServiceListener, + rocketSettingsAdapter: RocketChatSettingsAdapter, + ): MatrixBaseEventHandler[] { + return [ + new MatrixRoomCreatedHandler(roomServiceReceiver), + new MatrixRoomMembershipChangedHandler(roomServiceReceiver, rocketSettingsAdapter), + new MatrixRoomMessageSentHandler(roomServiceReceiver), + new MatrixRoomJoinRulesChangedHandler(roomServiceReceiver), + new MatrixRoomNameChangedHandler(roomServiceReceiver), + new MatrixRoomTopicChangedHandler(roomServiceReceiver), + ]; + } + + public static setupListeners( + roomServiceSender: FederationRoomServiceSender, + roomInternalHooksValidator: FederationRoomInternalHooksValidator, + ): void { + FederationFactory.setupActions(roomServiceSender); + FederationFactory.setupValidators(roomInternalHooksValidator); + } + + private static setupActions(roomServiceSender: FederationRoomServiceSender): void { + FederationHooks.afterUserLeaveRoom((user: IUser, room: IRoom) => + roomServiceSender.afterUserLeaveRoom(FederationRoomSenderConverter.toAfterUserLeaveRoom(user._id, room._id)), + ); + FederationHooks.onUserRemovedFromRoom((user: IUser, room: IRoom, userWhoRemoved: IUser) => + roomServiceSender.onUserRemovedFromRoom( + FederationRoomSenderConverter.toOnUserRemovedFromRoom(user._id, room._id, userWhoRemoved._id), + ), + ); + } + + private static setupValidators(roomInternalHooksValidator: FederationRoomInternalHooksValidator): void { + FederationHooks.canAddFederatedUserToNonFederatedRoom((user: IUser | string, room: IRoom) => + roomInternalHooksValidator.canAddFederatedUserToNonFederatedRoom(user, room), + ); + FederationHooks.canAddFederatedUserToFederatedRoom((user: IUser | string, inviter: IUser, room: IRoom) => + roomInternalHooksValidator.canAddFederatedUserToFederatedRoom(user, inviter, room), + ); + FederationHooks.canCreateDirectMessageFromUI((members: (IUser | string)[]) => + roomInternalHooksValidator.canCreateDirectMessageFromUI(members), + ); + } + + public static removeListeners(): void { + FederationHooks.removeCEValidation(); + } +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/matrix/Bridge.ts b/apps/meteor/app/federation-v2/server/infrastructure/matrix/Bridge.ts new file mode 100644 index 000000000000..fb9d6b614ec5 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/matrix/Bridge.ts @@ -0,0 +1,222 @@ +import type { AppServiceOutput, Bridge } from '@rocket.chat/forked-matrix-appservice-bridge'; + +import type { IExternalUserProfileInformation, IFederationBridge } from '../../domain/IFederationBridge'; +import { federationBridgeLogger } from '../rocket-chat/adapters/logger'; +import type { AbstractMatrixEvent } from './definitions/AbstractMatrixEvent'; +import { MatrixRoomType } from './definitions/MatrixRoomType'; +import { MatrixRoomVisibility } from './definitions/MatrixRoomVisibility'; + +let MatrixUserInstance: any; + +interface IRegistrationFileNamespaceRule { + exclusive: boolean; + regex: string; +} + +interface IRegistrationFileNamespaces { + users: IRegistrationFileNamespaceRule[]; + rooms: IRegistrationFileNamespaceRule[]; + aliases: IRegistrationFileNamespaceRule[]; +} + +export interface IFederationBridgeRegistrationFile { + id: string; + homeserverToken: string; + applicationServiceToken: string; + bridgeUrl: string; + botName: string; + listenTo: IRegistrationFileNamespaces; +} + +export class MatrixBridge implements IFederationBridge { + protected bridgeInstance: Bridge; + + protected isRunning = false; + + protected isUpdatingBridgeStatus = false; + + constructor( + protected appServiceId: string, + protected homeServerUrl: string, + protected homeServerDomain: string, + protected bridgeUrl: string, + protected bridgePort: number, + protected homeServerRegistrationFile: IFederationBridgeRegistrationFile, + protected eventHandler: (event: AbstractMatrixEvent) => void, + ) {} // eslint-disable-line no-empty-function + + public async onFederationAvailabilityChanged(enabled: boolean): Promise { + if (!enabled) { + await this.stop(); + return; + } + await this.start(); + } + + public async start(): Promise { + if (this.isUpdatingBridgeStatus) { + return; + } + this.isUpdatingBridgeStatus = true; + try { + await this.stop(); + await this.createInstance(); + + if (!this.isRunning) { + await this.bridgeInstance.run(this.bridgePort); + this.isRunning = true; + } + } catch (e) { + federationBridgeLogger.error('Failed to initialize the matrix-appservice-bridge.', e); + } finally { + this.isUpdatingBridgeStatus = false; + } + } + + public async stop(): Promise { + if (!this.isRunning) { + return; + } + this.isRunning = false; + // the http server might take some minutes to shutdown, and this promise can take some time to be resolved + await this.bridgeInstance?.close(); + } + + public async getUserProfileInformation(externalUserId: string): Promise { + try { + const externalInformation = await this.bridgeInstance.getIntent(externalUserId).getProfileInfo(externalUserId); + + return { + displayName: externalInformation.displayname || '', + }; + } catch (err) { + // no-op + } + } + + public async joinRoom(externalRoomId: string, externalUserId: string): Promise { + await this.bridgeInstance.getIntent(externalUserId).join(externalRoomId); + } + + public async inviteToRoom(externalRoomId: string, externalInviterId: string, externalInviteeId: string): Promise { + try { + await this.bridgeInstance.getIntent(externalInviterId).invite(externalRoomId, externalInviteeId); + } catch (e) { + // no-op + } + } + + public async createUser(username: string, name: string, domain: string): Promise { + if (!MatrixUserInstance) { + throw new Error('Error loading the Matrix User instance from the external library'); + } + const matrixUserId = `@${username?.toLowerCase()}:${domain}`; + const newUser = new MatrixUserInstance(matrixUserId); + await this.bridgeInstance.provisionUser(newUser, { name: `${username} (${name})` }); + + return matrixUserId; + } + + public async createDirectMessageRoom( + externalCreatorId: string, + externalInviteeIds: string[], + extraData: Record = {}, + ): Promise { + const intent = this.bridgeInstance.getIntent(externalCreatorId); + + const visibility = MatrixRoomVisibility.PRIVATE; + const preset = MatrixRoomType.PRIVATE; + const matrixRoom = await intent.createRoom({ + createAsClient: true, + options: { + visibility, + preset, + is_direct: true, + invite: externalInviteeIds, + creation_content: { + was_internally_programatically_created: true, + ...extraData, + }, + }, + }); + return matrixRoom.room_id; + } + + public async sendMessage(externalRoomId: string, externaSenderId: string, text: string): Promise { + try { + await this.bridgeInstance.getIntent(externaSenderId).sendText(externalRoomId, text); + } catch (e) { + throw new Error('User is not part of the room.'); + } + } + + public isUserIdFromTheSameHomeserver(externalUserId: string, domain: string): boolean { + const userDomain = this.extractHomeserverOrigin(externalUserId); + + return userDomain === domain; + } + + public extractHomeserverOrigin(externalUserId: string): string { + return externalUserId.includes(':') ? externalUserId.split(':').pop() || '' : this.homeServerDomain; + } + + public isRoomFromTheSameHomeserver(externalRoomId: string, domain: string): boolean { + return this.isUserIdFromTheSameHomeserver(externalRoomId, domain); + } + + public logFederationStartupInfo(info?: string): void { + federationBridgeLogger.info(`${info}: + id: ${this.appServiceId} + bridgeUrl: ${this.bridgeUrl} + homeserverURL: ${this.homeServerUrl} + homeserverDomain: ${this.homeServerDomain} + `); + } + + public async leaveRoom(externalRoomId: string, externalUserId: string): Promise { + try { + await this.bridgeInstance.getIntent(externalUserId).leave(externalRoomId); + } catch (e) { + // no-op + } + } + + public async kickUserFromRoom(externalRoomId: string, externalUserId: string, externalOwnerId: string): Promise { + await this.bridgeInstance.getIntent(externalOwnerId).kick(externalRoomId, externalUserId); + } + + protected async createInstance(): Promise { + federationBridgeLogger.info('Performing Dynamic Import of matrix-appservice-bridge'); + + // Dynamic import to prevent Rocket.Chat from loading the module until needed and then handle if that fails + const { Bridge, AppServiceRegistration, MatrixUser } = await import('@rocket.chat/forked-matrix-appservice-bridge'); + MatrixUserInstance = MatrixUser; + + this.bridgeInstance = new Bridge({ + homeserverUrl: this.homeServerUrl, + domain: this.homeServerDomain, + registration: AppServiceRegistration.fromObject(this.convertRegistrationFileToMatrixFormat()), + disableStores: true, + controller: { + onEvent: async (request): Promise => { + const event = request.getData() as unknown as AbstractMatrixEvent; + this.eventHandler(event); + }, + onLog: async (line, isError): Promise => { + console.log(line, isError); + }, + }, + }); + } + + private convertRegistrationFileToMatrixFormat(): AppServiceOutput { + return { + id: this.homeServerRegistrationFile.id, + hs_token: this.homeServerRegistrationFile.homeserverToken, + as_token: this.homeServerRegistrationFile.applicationServiceToken, + url: this.homeServerRegistrationFile.bridgeUrl, + sender_localpart: this.homeServerRegistrationFile.botName, + namespaces: this.homeServerRegistrationFile.listenTo, + }; + } +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/matrix/converters/RoomReceiver.ts b/apps/meteor/app/federation-v2/server/infrastructure/matrix/converters/RoomReceiver.ts new file mode 100644 index 000000000000..dc4cdcbf2c84 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/matrix/converters/RoomReceiver.ts @@ -0,0 +1,167 @@ +import { RoomType } from '@rocket.chat/apps-engine/definition/rooms'; + +import { + FederationRoomChangeJoinRulesDto, + FederationRoomChangeMembershipDto, + FederationRoomChangeNameDto, + FederationRoomChangeTopicDto, + FederationRoomCreateInputDto, + FederationRoomReceiveExternalMessageDto, +} from '../../../application/input/RoomReceiverDto'; +import { EVENT_ORIGIN } from '../../../domain/IFederationBridge'; +import type { MatrixEventRoomMembershipChanged } from '../definitions/events/RoomMembershipChanged'; +import { RoomMembershipChangedEventType } from '../definitions/events/RoomMembershipChanged'; +import { MatrixRoomJoinRules } from '../definitions/MatrixRoomJoinRules'; +import { MatrixEventType } from '../definitions/MatrixEventType'; +import type { MatrixEventRoomCreated } from '../definitions/events/RoomCreated'; +import type { MatrixEventRoomMessageSent } from '../definitions/events/RoomMessageSent'; +import type { MatrixEventRoomJoinRulesChanged } from '../definitions/events/RoomJoinRulesChanged'; +import type { MatrixEventRoomNameChanged } from '../definitions/events/RoomNameChanged'; +import type { MatrixEventRoomTopicChanged } from '../definitions/events/RoomTopicChanged'; +import type { AbstractMatrixEvent } from '../definitions/AbstractMatrixEvent'; + +export const removeExternalSpecificCharsFromExternalIdentifier = (matrixIdentifier = ''): string => { + return matrixIdentifier.replace('@', '').replace('!', ''); +}; + +export const formatExternalUserIdToInternalUsernameFormat = (matrixUserId = ''): string => { + return matrixUserId.split(':')[0]?.replace('@', ''); +}; + +export const isAnExternalIdentifierFormat = (identifier: string): boolean => identifier.includes(':'); + +export const isAnExternalUserIdFormat = (userId: string): boolean => isAnExternalIdentifierFormat(userId) && userId.includes('@'); + +export const extractServerNameFromExternalIdentifier = (identifier = ''): string => { + const splitted = identifier.split(':'); + + return splitted.length > 1 ? splitted[1] : ''; +}; + +const convertExternalRoomIdToInternalRoomIdFormat = (matrixRoomId = ''): string => { + const prefixedRoomIdOnly = matrixRoomId.split(':')[0]; + const prefix = '!'; + + return prefixedRoomIdOnly?.replace(prefix, ''); +}; + +const getEventOrigin = (inviterId = '', homeServerDomain: string): EVENT_ORIGIN => { + const fromADifferentServer = extractServerNameFromExternalIdentifier(inviterId) !== homeServerDomain; + + return fromADifferentServer ? EVENT_ORIGIN.REMOTE : EVENT_ORIGIN.LOCAL; +}; + +const convertExternalJoinRuleToInternalRoomType = (matrixJoinRule: MatrixRoomJoinRules, matrixRoomIsDirect = false): RoomType => { + if (matrixRoomIsDirect) { + return RoomType.DIRECT_MESSAGE; + } + const mapping: Record = { + [MatrixRoomJoinRules.JOIN]: RoomType.CHANNEL, + [MatrixRoomJoinRules.INVITE]: RoomType.PRIVATE_GROUP, + }; + + return mapping[matrixJoinRule] || RoomType.CHANNEL; +}; + +const tryToExtractExternalRoomNameFromTheRoomState = (roomState: AbstractMatrixEvent[] = []): { externalRoomName?: string } => { + if (roomState.length === 0) { + return {}; + } + const externalRoomName = ( + roomState.find((stateEvent) => stateEvent.type === MatrixEventType.ROOM_NAME_CHANGED) as MatrixEventRoomNameChanged + )?.content?.name; + + return { + ...(externalRoomName ? { externalRoomName } : {}), + }; +}; + +const tryToExtractAndConvertRoomTypeFromTheRoomState = ( + roomState: AbstractMatrixEvent[] = [], + matrixRoomIsDirect = false, +): { roomType?: RoomType } => { + if (roomState.length === 0) { + return {}; + } + const externalRoomJoinRule = ( + roomState.find((stateEvent) => stateEvent.type === MatrixEventType.ROOM_JOIN_RULES_CHANGED) as MatrixEventRoomJoinRulesChanged + )?.content?.join_rule; + + return { + ...(externalRoomJoinRule ? { roomType: convertExternalJoinRuleToInternalRoomType(externalRoomJoinRule, matrixRoomIsDirect) } : {}), + }; +}; + +export class MatrixRoomReceiverConverter { + public static toRoomCreateDto(externalEvent: MatrixEventRoomCreated): FederationRoomCreateInputDto { + return new FederationRoomCreateInputDto({ + externalRoomId: externalEvent.room_id, + normalizedRoomId: convertExternalRoomIdToInternalRoomIdFormat(externalEvent.room_id), + ...tryToExtractExternalRoomNameFromTheRoomState(externalEvent.invite_room_state || externalEvent.unsigned?.invite_room_state), + ...tryToExtractAndConvertRoomTypeFromTheRoomState(externalEvent.invite_room_state || externalEvent.unsigned?.invite_room_state), + externalInviterId: externalEvent.sender, + normalizedInviterId: removeExternalSpecificCharsFromExternalIdentifier(externalEvent.sender), + wasInternallyProgramaticallyCreated: externalEvent.content?.was_internally_programatically_created || false, + internalRoomId: externalEvent.content?.internalRoomId, + }); + } + + public static toChangeRoomMembershipDto( + externalEvent: MatrixEventRoomMembershipChanged, + homeServerDomain: string, + ): FederationRoomChangeMembershipDto { + return new FederationRoomChangeMembershipDto({ + externalRoomId: externalEvent.room_id, + normalizedRoomId: convertExternalRoomIdToInternalRoomIdFormat(externalEvent.room_id), + ...tryToExtractExternalRoomNameFromTheRoomState(externalEvent.invite_room_state || externalEvent.unsigned?.invite_room_state), + ...tryToExtractAndConvertRoomTypeFromTheRoomState( + externalEvent.invite_room_state || externalEvent.unsigned?.invite_room_state, + externalEvent.content?.is_direct, + ), + externalInviterId: externalEvent.sender, + normalizedInviterId: removeExternalSpecificCharsFromExternalIdentifier(externalEvent.sender), + externalInviteeId: externalEvent.state_key, + normalizedInviteeId: removeExternalSpecificCharsFromExternalIdentifier(externalEvent.state_key), + inviteeUsernameOnly: formatExternalUserIdToInternalUsernameFormat(externalEvent.state_key), + inviterUsernameOnly: formatExternalUserIdToInternalUsernameFormat(externalEvent.sender), + eventOrigin: getEventOrigin(externalEvent.sender, homeServerDomain), + leave: externalEvent.content?.membership === RoomMembershipChangedEventType.LEAVE, + }); + } + + public static toSendRoomMessageDto(externalEvent: MatrixEventRoomMessageSent): FederationRoomReceiveExternalMessageDto { + return new FederationRoomReceiveExternalMessageDto({ + externalRoomId: externalEvent.room_id, + normalizedRoomId: convertExternalRoomIdToInternalRoomIdFormat(externalEvent.room_id), + externalSenderId: externalEvent.sender, + normalizedSenderId: removeExternalSpecificCharsFromExternalIdentifier(externalEvent.sender), + messageText: externalEvent.content?.body, + }); + } + + public static toRoomChangeJoinRulesDto(externalEvent: MatrixEventRoomJoinRulesChanged): FederationRoomChangeJoinRulesDto { + return new FederationRoomChangeJoinRulesDto({ + externalRoomId: externalEvent.room_id, + normalizedRoomId: convertExternalRoomIdToInternalRoomIdFormat(externalEvent.room_id), + roomType: convertExternalJoinRuleToInternalRoomType(externalEvent.content?.join_rule), + }); + } + + public static toRoomChangeNameDto(externalEvent: MatrixEventRoomNameChanged): FederationRoomChangeNameDto { + return new FederationRoomChangeNameDto({ + externalRoomId: externalEvent.room_id, + normalizedRoomId: convertExternalRoomIdToInternalRoomIdFormat(externalEvent.room_id), + externalSenderId: externalEvent.sender, + normalizedRoomName: removeExternalSpecificCharsFromExternalIdentifier(externalEvent.content?.name), + }); + } + + public static toRoomChangeTopicDto(externalEvent: MatrixEventRoomTopicChanged): FederationRoomChangeTopicDto { + return new FederationRoomChangeTopicDto({ + externalRoomId: externalEvent.room_id, + normalizedRoomId: convertExternalRoomIdToInternalRoomIdFormat(externalEvent.room_id), + externalSenderId: externalEvent.sender, + roomTopic: externalEvent.content?.topic, + }); + } +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/AbstractMatrixEvent.ts b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/AbstractMatrixEvent.ts new file mode 100644 index 000000000000..4f141e8cabbb --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/AbstractMatrixEvent.ts @@ -0,0 +1,26 @@ +export abstract class AbstractMatrixEvent { + public age: number; + + public invite_room_state?: AbstractMatrixEvent[]; + + public event_id: string; + + public origin_server_ts: number; + + public room_id: string; + + public sender: string; + + public state_key: string; + + public unsigned: { age: number; invite_room_state: AbstractMatrixEvent[] }; + + public user_id: string; + + public abstract content: IBaseEventContent; + + public abstract type: string; +} + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface IBaseEventContent {} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/MatrixEventType.ts b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/MatrixEventType.ts new file mode 100644 index 000000000000..fd0fa4b21924 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/MatrixEventType.ts @@ -0,0 +1,12 @@ +export enum MatrixEventType { + ROOM_CREATED = 'm.room.create', + ROOM_MEMBERSHIP_CHANGED = 'm.room.member', + ROOM_MESSAGE_SENT = 'm.room.message', + ROOM_JOIN_RULES_CHANGED = 'm.room.join_rules', + ROOM_NAME_CHANGED = 'm.room.name', + // SET_ROOM_POWER_LEVELS = 'm.room.power_levels', + // SET_ROOM_CANONICAL_ALIAS = 'm.room.canonical_alias', + // SET_ROOM_HISTORY_VISIBILITY = 'm.room.history_visibility', + // SET_ROOM_GUEST_ACCESS = 'm.room.guest_access', + ROOM_TOPIC_CHANGED = 'm.room.topic', +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/MatrixRoomJoinRules.ts b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/MatrixRoomJoinRules.ts new file mode 100644 index 000000000000..9b9865feada6 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/MatrixRoomJoinRules.ts @@ -0,0 +1,4 @@ +export enum MatrixRoomJoinRules { + JOIN = 'public', + INVITE = 'invite', +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/MatrixRoomType.ts b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/MatrixRoomType.ts new file mode 100644 index 000000000000..7c591bbe590d --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/MatrixRoomType.ts @@ -0,0 +1,4 @@ +export enum MatrixRoomType { + PRIVATE = 'private_chat', + PUBLIC = 'public_chat', +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/MatrixRoomVisibility.ts b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/MatrixRoomVisibility.ts new file mode 100644 index 000000000000..0256caac480c --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/MatrixRoomVisibility.ts @@ -0,0 +1,4 @@ +export enum MatrixRoomVisibility { + PRIVATE = 'private', + PUBLIC = 'public ', +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/events/RoomCreated.ts b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/events/RoomCreated.ts new file mode 100644 index 000000000000..7518c19f7f25 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/events/RoomCreated.ts @@ -0,0 +1,16 @@ +import type { IBaseEventContent } from '../AbstractMatrixEvent'; +import { AbstractMatrixEvent } from '../AbstractMatrixEvent'; +import { MatrixEventType } from '../MatrixEventType'; + +export interface IMatrixEventContentRoomCreated extends IBaseEventContent { + creator: string; + room_version: string; + was_internally_programatically_created?: boolean; + internalRoomId?: string; +} + +export class MatrixEventRoomCreated extends AbstractMatrixEvent { + public content: IMatrixEventContentRoomCreated; + + public type = MatrixEventType.ROOM_CREATED; +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/events/RoomJoinRulesChanged.ts b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/events/RoomJoinRulesChanged.ts new file mode 100644 index 000000000000..fe8662842dc7 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/events/RoomJoinRulesChanged.ts @@ -0,0 +1,14 @@ +import type { IBaseEventContent } from '../AbstractMatrixEvent'; +import { AbstractMatrixEvent } from '../AbstractMatrixEvent'; +import { MatrixEventType } from '../MatrixEventType'; +import type { MatrixRoomJoinRules } from '../MatrixRoomJoinRules'; + +export interface IMatrixEventContentSetRoomJoinRules extends IBaseEventContent { + join_rule: MatrixRoomJoinRules; +} + +export class MatrixEventRoomJoinRulesChanged extends AbstractMatrixEvent { + public content: IMatrixEventContentSetRoomJoinRules; + + public type = MatrixEventType.ROOM_JOIN_RULES_CHANGED; +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/events/RoomMembershipChanged.ts b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/events/RoomMembershipChanged.ts new file mode 100644 index 000000000000..a4015d41b859 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/events/RoomMembershipChanged.ts @@ -0,0 +1,21 @@ +import type { IBaseEventContent } from '../AbstractMatrixEvent'; +import { AbstractMatrixEvent } from '../AbstractMatrixEvent'; +import { MatrixEventType } from '../MatrixEventType'; + +export enum RoomMembershipChangedEventType { + JOIN = 'join', + INVITE = 'invite', + LEAVE = 'leave', +} + +export interface IMatrixEventContentRoomMembershipChanged extends IBaseEventContent { + displayname: string; + membership: RoomMembershipChangedEventType; + is_direct?: boolean; +} + +export class MatrixEventRoomMembershipChanged extends AbstractMatrixEvent { + public content: IMatrixEventContentRoomMembershipChanged; + + public type = MatrixEventType.ROOM_MEMBERSHIP_CHANGED; +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/events/RoomMessageSent.ts b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/events/RoomMessageSent.ts new file mode 100644 index 000000000000..52ad3de06b94 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/events/RoomMessageSent.ts @@ -0,0 +1,18 @@ +import type { IBaseEventContent } from '../AbstractMatrixEvent'; +import { AbstractMatrixEvent } from '../AbstractMatrixEvent'; +import { MatrixEventType } from '../MatrixEventType'; + +export enum MatrixSendMessageType { + 'm.text', +} + +export interface IMatrixEventContentRoomMessageSent extends IBaseEventContent { + body: string; + msgtype: MatrixSendMessageType; +} + +export class MatrixEventRoomMessageSent extends AbstractMatrixEvent { + public content: IMatrixEventContentRoomMessageSent; + + public type = MatrixEventType.ROOM_MESSAGE_SENT; +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/events/RoomNameChanged.ts b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/events/RoomNameChanged.ts new file mode 100644 index 000000000000..38fabc545d74 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/events/RoomNameChanged.ts @@ -0,0 +1,13 @@ +import type { IBaseEventContent } from '../AbstractMatrixEvent'; +import { AbstractMatrixEvent } from '../AbstractMatrixEvent'; +import { MatrixEventType } from '../MatrixEventType'; + +export interface IMatrixEventContentSetRoomName extends IBaseEventContent { + name: string; +} + +export class MatrixEventRoomNameChanged extends AbstractMatrixEvent { + public content: IMatrixEventContentSetRoomName; + + public type = MatrixEventType.ROOM_NAME_CHANGED; +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/events/RoomTopicChanged.ts b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/events/RoomTopicChanged.ts new file mode 100644 index 000000000000..30831c969f2b --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/matrix/definitions/events/RoomTopicChanged.ts @@ -0,0 +1,13 @@ +import type { IBaseEventContent } from '../AbstractMatrixEvent'; +import { AbstractMatrixEvent } from '../AbstractMatrixEvent'; +import { MatrixEventType } from '../MatrixEventType'; + +export interface IMatrixEventContentSetRoomTopic extends IBaseEventContent { + topic: string; +} + +export class MatrixEventRoomTopicChanged extends AbstractMatrixEvent { + public content: IMatrixEventContentSetRoomTopic; + + public type = MatrixEventType.ROOM_TOPIC_CHANGED; +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/matrix/handlers/BaseEvent.ts b/apps/meteor/app/federation-v2/server/infrastructure/matrix/handlers/BaseEvent.ts new file mode 100644 index 000000000000..f2dfdd2b00f0 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/matrix/handlers/BaseEvent.ts @@ -0,0 +1,11 @@ +import type { AbstractMatrixEvent } from '../definitions/AbstractMatrixEvent'; + +export abstract class MatrixBaseEventHandler { + public abstract eventType: string; + + public abstract handle(externalEvent: AbstractMatrixEvent): Promise; + + public equals(event: AbstractMatrixEvent): boolean { + return this.eventType === event.type; + } +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/matrix/handlers/Room.ts b/apps/meteor/app/federation-v2/server/infrastructure/matrix/handlers/Room.ts new file mode 100644 index 000000000000..b9d596cefbd7 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/matrix/handlers/Room.ts @@ -0,0 +1,85 @@ +import type { FederationRoomServiceListener } from '../../../application/RoomServiceListener'; +import type { RocketChatSettingsAdapter } from '../../rocket-chat/adapters/Settings'; +import { MatrixRoomReceiverConverter } from '../converters/RoomReceiver'; +import { MatrixBaseEventHandler } from './BaseEvent'; +import type { MatrixEventRoomCreated } from '../definitions/events/RoomCreated'; +import type { MatrixEventRoomMembershipChanged } from '../definitions/events/RoomMembershipChanged'; +import type { MatrixEventRoomJoinRulesChanged } from '../definitions/events/RoomJoinRulesChanged'; +import type { MatrixEventRoomNameChanged } from '../definitions/events/RoomNameChanged'; +import type { MatrixEventRoomMessageSent } from '../definitions/events/RoomMessageSent'; +import type { MatrixEventRoomTopicChanged } from '../definitions/events/RoomTopicChanged'; +import { MatrixEventType } from '../definitions/MatrixEventType'; + +export class MatrixRoomCreatedHandler extends MatrixBaseEventHandler { + public eventType: string = MatrixEventType.ROOM_CREATED; + + constructor(private roomService: FederationRoomServiceListener) { + super(); + } + + public async handle(externalEvent: MatrixEventRoomCreated): Promise { + await this.roomService.onCreateRoom(MatrixRoomReceiverConverter.toRoomCreateDto(externalEvent)); + } +} + +export class MatrixRoomMembershipChangedHandler extends MatrixBaseEventHandler { + public eventType: string = MatrixEventType.ROOM_MEMBERSHIP_CHANGED; + + constructor(private roomService: FederationRoomServiceListener, private rocketSettingsAdapter: RocketChatSettingsAdapter) { + super(); + } + + public async handle(externalEvent: MatrixEventRoomMembershipChanged): Promise { + await this.roomService.onChangeRoomMembership( + MatrixRoomReceiverConverter.toChangeRoomMembershipDto(externalEvent, this.rocketSettingsAdapter.getHomeServerDomain()), + ); + } +} + +export class MatrixRoomMessageSentHandler extends MatrixBaseEventHandler { + public eventType: string = MatrixEventType.ROOM_MESSAGE_SENT; + + constructor(private roomService: FederationRoomServiceListener) { + super(); + } + + public async handle(externalEvent: MatrixEventRoomMessageSent): Promise { + await this.roomService.onExternalMessageReceived(MatrixRoomReceiverConverter.toSendRoomMessageDto(externalEvent)); + } +} + +export class MatrixRoomJoinRulesChangedHandler extends MatrixBaseEventHandler { + public eventType: string = MatrixEventType.ROOM_JOIN_RULES_CHANGED; + + constructor(private roomService: FederationRoomServiceListener) { + super(); + } + + public async handle(externalEvent: MatrixEventRoomJoinRulesChanged): Promise { + await this.roomService.onChangeJoinRules(MatrixRoomReceiverConverter.toRoomChangeJoinRulesDto(externalEvent)); + } +} + +export class MatrixRoomNameChangedHandler extends MatrixBaseEventHandler { + public eventType: string = MatrixEventType.ROOM_NAME_CHANGED; + + constructor(private roomService: FederationRoomServiceListener) { + super(); + } + + public async handle(externalEvent: MatrixEventRoomNameChanged): Promise { + await this.roomService.onChangeRoomName(MatrixRoomReceiverConverter.toRoomChangeNameDto(externalEvent)); + } +} + +export class MatrixRoomTopicChangedHandler extends MatrixBaseEventHandler { + public eventType: string = MatrixEventType.ROOM_TOPIC_CHANGED; + + constructor(private roomService: FederationRoomServiceListener) { + super(); + } + + public async handle(externalEvent: MatrixEventRoomTopicChanged): Promise { + await this.roomService.onChangeRoomTopic(MatrixRoomReceiverConverter.toRoomChangeTopicDto(externalEvent)); + } +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/matrix/handlers/index.ts b/apps/meteor/app/federation-v2/server/infrastructure/matrix/handlers/index.ts new file mode 100644 index 000000000000..d99a39edbf3a --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/matrix/handlers/index.ts @@ -0,0 +1,15 @@ +import type { AbstractMatrixEvent } from '../definitions/AbstractMatrixEvent'; +import type { MatrixBaseEventHandler } from './BaseEvent'; + +export class MatrixEventsHandler { + // eslint-disable-next-line no-empty-function + constructor(protected handlers: MatrixBaseEventHandler[]) {} + + public async handleEvent(event: AbstractMatrixEvent): Promise { + const handler = this.handlers.find((handler) => handler.equals(event)); + if (!handler) { + return console.log(`Could not find handler for ${event.type}`, event); + } + return handler.handle(event); + } +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/queue/InMemoryQueue.ts b/apps/meteor/app/federation-v2/server/infrastructure/queue/InMemoryQueue.ts new file mode 100644 index 000000000000..bd73bca41a2f --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/queue/InMemoryQueue.ts @@ -0,0 +1,18 @@ +import fastq from 'fastq'; + +import type { AbstractMatrixEvent } from '../matrix/definitions/AbstractMatrixEvent'; + +export class InMemoryQueue { + private instance: any; + + public setHandler(handler: (event: AbstractMatrixEvent) => Promise, concurrency: number): void { + this.instance = fastq.promise(handler, concurrency); + } + + public addToQueue(task: Record): void { + if (!this.instance) { + throw new Error('You need to set the handler first'); + } + this.instance.push(task).catch(console.error); + } +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/adapters/Message.ts b/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/adapters/Message.ts new file mode 100644 index 000000000000..9b5761b47e63 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/adapters/Message.ts @@ -0,0 +1,9 @@ +import { sendMessage } from '../../../../../lib/server'; +import type { FederatedRoom } from '../../../domain/FederatedRoom'; +import type { FederatedUser } from '../../../domain/FederatedUser'; + +export class RocketChatMessageAdapter { + public async sendMessage(user: FederatedUser, room: FederatedRoom, messageText: string): Promise { + sendMessage(user.getInternalReference(), { msg: messageText }, room.getInternalReference()); + } +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/adapters/Room.ts b/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/adapters/Room.ts new file mode 100644 index 000000000000..a773a065a997 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/adapters/Room.ts @@ -0,0 +1,143 @@ +import type { IRoom } from '@rocket.chat/core-typings'; +import { isDirectMessageRoom } from '@rocket.chat/core-typings'; +import { Rooms, Subscriptions, MatrixBridgedRoom } from '@rocket.chat/models'; + +import { DirectMessageFederatedRoom, FederatedRoom } from '../../../domain/FederatedRoom'; +import { createRoom, addUserToRoom, removeUserFromRoom } from '../../../../../lib/server'; +import type { FederatedUser } from '../../../domain/FederatedUser'; +import { saveRoomName } from '../../../../../channel-settings/server/functions/saveRoomName'; +import { saveRoomTopic } from '../../../../../channel-settings/server/functions/saveRoomTopic'; +import { getFederatedUserByInternalUsername } from './User'; + +export class RocketChatRoomAdapter { + public async getFederatedRoomByExternalId(externalRoomId: string): Promise { + const internalBridgedRoomId = await MatrixBridgedRoom.getLocalRoomId(externalRoomId); + if (!internalBridgedRoomId) { + return; + } + const room = await Rooms.findOneById(internalBridgedRoomId); + if (room) { + return this.createFederatedRoomInstance(externalRoomId, room); + } + } + + public async getFederatedRoomByInternalId(internalRoomId: string): Promise { + const externalRoomId = await MatrixBridgedRoom.getExternalRoomId(internalRoomId); + if (!externalRoomId) { + return; + } + const room = await Rooms.findOneById(internalRoomId); + + if (room) { + return this.createFederatedRoomInstance(externalRoomId, room); + } + } + + public async getInternalRoomById(internalRoomId: string): Promise { + return Rooms.findOneById(internalRoomId); + } + + public async createFederatedRoom(federatedRoom: FederatedRoom): Promise { + const usernameOrId = federatedRoom.getCreatorUsername() || federatedRoom.getCreatorId(); + if (!usernameOrId) { + throw new Error('Cannot create a room without a creator'); + } + const { rid, _id } = createRoom(federatedRoom.getRoomType(), federatedRoom.getName(), usernameOrId); + const roomId = rid || _id; + await MatrixBridgedRoom.createOrUpdateByLocalRoomId(roomId, federatedRoom.getExternalId()); + await Rooms.setAsFederated(roomId); + } + + public async removeDirectMessageRoom(federatedRoom: FederatedRoom): Promise { + const roomId = federatedRoom.getInternalId(); + await Rooms.removeById(roomId); + await Subscriptions.removeByRoomId(roomId); + await MatrixBridgedRoom.removeByLocalRoomId(roomId); + } + + public async createFederatedRoomForDirectMessage(federatedRoom: DirectMessageFederatedRoom): Promise { + const creatorId = federatedRoom.getCreatorId(); + const usernameOrId = federatedRoom.getCreatorUsername() || creatorId; + if (!usernameOrId) { + throw new Error('Cannot create a room without a creator'); + } + if (!creatorId) { + throw new Error('Cannot create a room without a creator'); + } + + const readonly = false; + const extraData = undefined; + const { rid, _id } = createRoom( + federatedRoom.getRoomType(), + federatedRoom.getName(), + usernameOrId, + federatedRoom.getMembersUsernames(), + readonly, + extraData, + { creator: creatorId }, + ); + const roomId = rid || _id; + await MatrixBridgedRoom.createOrUpdateByLocalRoomId(roomId, federatedRoom.getExternalId()); + await Rooms.setAsFederated(roomId); + } + + public async getDirectMessageFederatedRoomByUserIds(userIds: string[]): Promise { + const room = await Rooms.findOneDirectRoomContainingAllUserIDs(userIds); + if (!room) { + return; + } + const externalRoomId = await MatrixBridgedRoom.getExternalRoomId(room._id); + if (!externalRoomId) { + return; + } + + if (room) { + return this.createFederatedRoomInstance(externalRoomId, room); + } + } + + public async addUserToRoom(federatedRoom: FederatedRoom, inviteeUser: FederatedUser, inviterUser: FederatedUser): Promise { + addUserToRoom(federatedRoom.getInternalId(), inviteeUser.getInternalReference(), inviterUser.getInternalReference()); + } + + public async removeUserFromRoom(federatedRoom: FederatedRoom, affectedUser: FederatedUser, byUser: FederatedUser): Promise { + const userHasBeenRemoved = byUser.getInternalId() !== affectedUser.getInternalId(); + const options = userHasBeenRemoved ? { byUser: byUser.getInternalReference() } : undefined; + removeUserFromRoom(federatedRoom.getInternalId(), affectedUser.getInternalReference(), options); + } + + public async isUserAlreadyJoined(internalRoomId: string, internalUserId: string): Promise { + const subscription = await Subscriptions.findOneByRoomIdAndUserId(internalRoomId, internalUserId, { projection: { _id: 1 } }); + + return Boolean(subscription); + } + + public async updateRoomType(federatedRoom: FederatedRoom): Promise { + await Rooms.setRoomTypeById(federatedRoom.getInternalId(), federatedRoom.getRoomType()); + await Subscriptions.updateAllRoomTypesByRoomId(federatedRoom.getRoomType(), federatedRoom.getRoomType()); + } + + public async updateRoomName(federatedRoom: FederatedRoom, federatedUser: FederatedUser): Promise { + await saveRoomName(federatedRoom.getInternalId(), federatedRoom.getName(), federatedUser.getInternalReference()); + } + + public async updateRoomTopic(federatedRoom: FederatedRoom, federatedUser: FederatedUser): Promise { + await saveRoomTopic(federatedRoom.getInternalId(), federatedRoom.getTopic(), federatedUser.getInternalReference()); + } + + private async createFederatedRoomInstance(externalRoomId: string, room: IRoom): Promise { + if (isDirectMessageRoom(room)) { + const members = (await Promise.all( + (room.usernames || []).map((username) => getFederatedUserByInternalUsername(username)).filter(Boolean), + )) as FederatedUser[]; + return DirectMessageFederatedRoom.createWithInternalReference(externalRoomId, room, members); + } + + return FederatedRoom.createWithInternalReference(externalRoomId, room); + } + + public async updateFederatedRoomByInternalRoomId(internalRoomId: string, externalRoomId: string): Promise { + await MatrixBridgedRoom.createOrUpdateByLocalRoomId(internalRoomId, externalRoomId); + await Rooms.setAsFederated(internalRoomId); + } +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/adapters/Settings.ts b/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/adapters/Settings.ts new file mode 100644 index 000000000000..9c85e1ffd7d7 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/adapters/Settings.ts @@ -0,0 +1,209 @@ +import crypto from 'crypto'; + +import yaml from 'js-yaml'; +import { v4 as uuidv4 } from 'uuid'; +import { Settings } from '@rocket.chat/models'; + +import { settings, settingsRegistry } from '../../../../../settings/server'; +import type { IFederationBridgeRegistrationFile } from '../../matrix/Bridge'; + +const EVERYTHING_REGEX = '.*'; +const LISTEN_RULES = EVERYTHING_REGEX; + +export class RocketChatSettingsAdapter { + public initialize(): void { + this.addFederationSettings(); + this.watchChangesAndUpdateRegistrationFile(); + } + + public getApplicationServiceId(): string { + return settings.get('Federation_Matrix_id'); + } + + public getApplicationHomeServerToken(): string { + return settings.get('Federation_Matrix_hs_token'); + } + + public getApplicationApplicationServiceToken(): string { + return settings.get('Federation_Matrix_as_token'); + } + + public getBridgeUrl(): string { + return settings.get('Federation_Matrix_bridge_url'); + } + + public getBridgePort(): number { + const [, , port = '3300'] = this.getBridgeUrl().split(':'); + + return parseInt(port); + } + + public getHomeServerUrl(): string { + return settings.get('Federation_Matrix_homeserver_url'); + } + + public getHomeServerDomain(): string { + return settings.get('Federation_Matrix_homeserver_domain'); + } + + public getBridgeBotUsername(): string { + return settings.get('Federation_Matrix_bridge_localpart'); + } + + public async disableFederation(): Promise { + await Settings.updateValueById('Federation_Matrix_enabled', false); + } + + public isFederationEnabled(): boolean { + return settings.get('Federation_Matrix_enabled') === true; + } + + public onFederationEnabledStatusChanged(callback: (enabled: boolean) => Promise): () => void { + return settings.watchMultiple( + [ + 'Federation_Matrix_enabled', + 'Federation_Matrix_id', + 'Federation_Matrix_hs_token', + 'Federation_Matrix_as_token', + 'Federation_Matrix_homeserver_url', + 'Federation_Matrix_homeserver_domain', + 'Federation_Matrix_bridge_url', + 'Federation_Matrix_bridge_localpart', + ], + ([enabled]) => Promise.await(callback(enabled === true)), + ); + } + + public generateRegistrationFileObject(): IFederationBridgeRegistrationFile { + return { + id: this.getApplicationServiceId(), + homeserverToken: this.getApplicationHomeServerToken(), + applicationServiceToken: this.getApplicationApplicationServiceToken(), + bridgeUrl: this.getBridgeUrl(), + botName: this.getBridgeBotUsername(), + listenTo: { + users: [ + { + exclusive: false, + regex: LISTEN_RULES, + }, + ], + rooms: [ + { + exclusive: false, + regex: LISTEN_RULES, + }, + ], + aliases: [ + { + exclusive: false, + regex: LISTEN_RULES, + }, + ], + }, + }; + } + + private async updateRegistrationFile(): Promise { + const registrationFile = this.generateRegistrationFileObject(); + await Settings.updateValueById( + 'Federation_Matrix_registration_file', + yaml.dump({ + id: registrationFile.id, + hs_token: registrationFile.homeserverToken, + as_token: registrationFile.applicationServiceToken, + url: registrationFile.bridgeUrl, + sender_localpart: registrationFile.botName, + namespaces: registrationFile.listenTo, + }), + ); + } + + private watchChangesAndUpdateRegistrationFile(): void { + settings.watchMultiple( + [ + 'Federation_Matrix_id', + 'Federation_Matrix_hs_token', + 'Federation_Matrix_as_token', + 'Federation_Matrix_homeserver_url', + 'Federation_Matrix_homeserver_domain', + 'Federation_Matrix_bridge_url', + 'Federation_Matrix_bridge_localpart', + ], + this.updateRegistrationFile.bind(this), + ); + } + + private addFederationSettings(): void { + settingsRegistry.addGroup('Federation', function () { + this.section('Matrix Bridge', function () { + this.add('Federation_Matrix_enabled', false, { + readonly: false, + type: 'boolean', + i18nLabel: 'Federation_Matrix_enabled', + i18nDescription: 'Federation_Matrix_enabled_desc', + alert: 'Federation_Matrix_Enabled_Alert', + public: true, + }); + + const uniqueId = settings.get('uniqueID') || uuidv4().slice(0, 15).replace(new RegExp('-', 'g'), '_'); + const homeserverToken = crypto.createHash('sha256').update(`hs_${uniqueId}`).digest('hex'); + const applicationServiceToken = crypto.createHash('sha256').update(`as_${uniqueId}`).digest('hex'); + + this.add('Federation_Matrix_id', `rocketchat_${uniqueId}`, { + readonly: true, + type: 'string', + i18nLabel: 'Federation_Matrix_id', + i18nDescription: 'Federation_Matrix_id_desc', + }); + + this.add('Federation_Matrix_hs_token', homeserverToken, { + readonly: true, + type: 'string', + i18nLabel: 'Federation_Matrix_hs_token', + i18nDescription: 'Federation_Matrix_hs_token_desc', + }); + + this.add('Federation_Matrix_as_token', applicationServiceToken, { + readonly: true, + type: 'string', + i18nLabel: 'Federation_Matrix_as_token', + i18nDescription: 'Federation_Matrix_as_token_desc', + }); + + this.add('Federation_Matrix_homeserver_url', 'http://localhost:8008', { + type: 'string', + i18nLabel: 'Federation_Matrix_homeserver_url', + i18nDescription: 'Federation_Matrix_homeserver_url_desc', + alert: 'Federation_Matrix_homeserver_url_alert', + }); + + this.add('Federation_Matrix_homeserver_domain', 'local.rocket.chat', { + type: 'string', + i18nLabel: 'Federation_Matrix_homeserver_domain', + i18nDescription: 'Federation_Matrix_homeserver_domain_desc', + alert: 'Federation_Matrix_homeserver_domain_alert', + }); + + this.add('Federation_Matrix_bridge_url', 'http://host.docker.internal:3300', { + type: 'string', + i18nLabel: 'Federation_Matrix_bridge_url', + i18nDescription: 'Federation_Matrix_bridge_url_desc', + }); + + this.add('Federation_Matrix_bridge_localpart', 'rocket.cat', { + type: 'string', + i18nLabel: 'Federation_Matrix_bridge_localpart', + i18nDescription: 'Federation_Matrix_bridge_localpart_desc', + }); + + this.add('Federation_Matrix_registration_file', '', { + readonly: true, + type: 'code', + i18nLabel: 'Federation_Matrix_registration_file', + i18nDescription: 'Federation_Matrix_registration_file_desc', + }); + }); + }); + } +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/adapters/User.ts b/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/adapters/User.ts new file mode 100644 index 000000000000..3ed04a3cffab --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/adapters/User.ts @@ -0,0 +1,83 @@ +import type { IUser } from '@rocket.chat/core-typings'; +import { Users, MatrixBridgedUser } from '@rocket.chat/models'; + +import { FederatedUser } from '../../../domain/FederatedUser'; + +const createFederatedUserInstance = (externalUserId: string, user: IUser, remote = true): FederatedUser => { + const federatedUser = FederatedUser.createWithInternalReference(externalUserId, !remote, user); + + return federatedUser; +}; + +export const getFederatedUserByInternalUsername = async (username: string): Promise => { + const user = await Users.findOneByUsername(username); + if (!user) { + return; + } + const internalBridgedUser = await MatrixBridgedUser.getBridgedUserByLocalId(user._id); + if (!internalBridgedUser) { + return; + } + const { mui: externalUserId, remote } = internalBridgedUser; + + return createFederatedUserInstance(externalUserId, user, remote); +}; + +export class RocketChatUserAdapter { + public async getFederatedUserByExternalId(externalUserId: string): Promise { + const internalBridgedUserId = await MatrixBridgedUser.getLocalUserIdByExternalId(externalUserId); + if (!internalBridgedUserId) { + return; + } + + const user = await Users.findOneById(internalBridgedUserId); + + if (user) { + return createFederatedUserInstance(externalUserId, user); + } + } + + public async getFederatedUserByInternalId(internalUserId: string): Promise { + const internalBridgedUser = await MatrixBridgedUser.getBridgedUserByLocalId(internalUserId); + if (!internalBridgedUser) { + return; + } + const { uid: userId, mui: externalUserId, remote } = internalBridgedUser; + const user = await Users.findOneById(userId); + + if (user) { + return createFederatedUserInstance(externalUserId, user, remote); + } + } + + public async getFederatedUserByInternalUsername(username: string): Promise { + const user = await Users.findOneByUsername(username); + if (!user) { + return; + } + const internalBridgedUser = await MatrixBridgedUser.getBridgedUserByLocalId(user._id); + if (!internalBridgedUser) { + return; + } + const { mui: externalUserId, remote } = internalBridgedUser; + + return createFederatedUserInstance(externalUserId, user, remote); + } + + public async getInternalUserById(userId: string): Promise { + const user = await Users.findOneById(userId); + if (!user || !user.username) { + throw new Error(`User with internalId ${userId} not found`); + } + return user; + } + + public async createFederatedUser(federatedUser: FederatedUser): Promise { + const existingLocalUser = federatedUser.getUsername() && (await Users.findOneByUsername(federatedUser.getUsername() as string)); + if (existingLocalUser) { + return MatrixBridgedUser.createOrUpdateByLocalId(existingLocalUser._id, federatedUser.getExternalId(), federatedUser.isRemote()); + } + const { insertedId } = await Users.insertOne(federatedUser.getStorageRepresentation()); + return MatrixBridgedUser.createOrUpdateByLocalId(insertedId, federatedUser.getExternalId(), federatedUser.isRemote()); + } +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/adapters/logger.ts b/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/adapters/logger.ts new file mode 100644 index 000000000000..80f97ab5625f --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/adapters/logger.ts @@ -0,0 +1,6 @@ +import { Logger } from '../../../../../logger/server'; + +const logger = new Logger('Federation_Matrix'); + +export const federationBridgeLogger = logger.section('matrix_federation_bridge'); +export const federationSetupLogger = logger.section('matrix_federation_setup'); diff --git a/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/converters/RoomSender.ts b/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/converters/RoomSender.ts new file mode 100644 index 000000000000..1cef225a0b6a --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/converters/RoomSender.ts @@ -0,0 +1,62 @@ +import type { IMessage } from '@rocket.chat/core-typings'; + +import { + FederationAfterLeaveRoomDto, + FederationAfterRemoveUserFromRoomDto, + FederationCreateDMAndInviteUserDto, + FederationRoomSendExternalMessageDto, +} from '../../../application/input/RoomSenderDto'; +import { + formatExternalUserIdToInternalUsernameFormat, + removeExternalSpecificCharsFromExternalIdentifier, +} from '../../matrix/converters/RoomReceiver'; + +export class FederationRoomSenderConverter { + public static toCreateDirectMessageRoomDto( + internalInviterId: string, + internalRoomId: string, + externalInviteeId: string, + ): FederationCreateDMAndInviteUserDto { + const normalizedInviteeId = removeExternalSpecificCharsFromExternalIdentifier(externalInviteeId); + const inviteeUsernameOnly = formatExternalUserIdToInternalUsernameFormat(externalInviteeId); + + return new FederationCreateDMAndInviteUserDto({ + internalInviterId, + internalRoomId, + rawInviteeId: externalInviteeId, + normalizedInviteeId, + inviteeUsernameOnly, + }); + } + + public static toSendExternalMessageDto( + internalSenderId: string, + internalRoomId: string, + message: IMessage, + ): FederationRoomSendExternalMessageDto { + return new FederationRoomSendExternalMessageDto({ + internalRoomId, + internalSenderId, + message, + }); + } + + public static toAfterUserLeaveRoom(internalUserId: string, internalRoomId: string): FederationAfterLeaveRoomDto { + return new FederationAfterLeaveRoomDto({ + internalRoomId, + internalUserId, + }); + } + + public static toOnUserRemovedFromRoom( + internalUserId: string, + internalRoomId: string, + actionDoneByInternalId: string, + ): FederationAfterRemoveUserFromRoomDto { + return new FederationAfterRemoveUserFromRoomDto({ + internalRoomId, + internalUserId, + actionDoneByInternalId, + }); + } +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/hooks/index.ts b/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/hooks/index.ts new file mode 100644 index 000000000000..407d4f760b84 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/hooks/index.ts @@ -0,0 +1,71 @@ +import type { IRoom, IUser } from '@rocket.chat/core-typings'; + +import { callbacks } from '../../../../../../lib/callbacks'; + +export class FederationHooks { + public static afterUserLeaveRoom(callback: (user: IUser, room: IRoom) => Promise): void { + callbacks.add( + 'afterLeaveRoom', + (user: IUser, room: IRoom | undefined): void => { + if (!room?.federated) { + return; + } + Promise.await(callback(user, room)); + }, + callbacks.priority.HIGH, + 'federation-v2-after-leave-room', + ); + } + + public static onUserRemovedFromRoom(callback: (removedUser: IUser, room: IRoom, userWhoRemoved: IUser) => Promise): void { + callbacks.add( + 'afterRemoveFromRoom', + (params: { removedUser: IUser; userWhoRemoved: IUser }, room: IRoom | undefined): void => { + if (!room?.federated) { + return; + } + Promise.await(callback(params.removedUser, room, params.userWhoRemoved)); + }, + callbacks.priority.HIGH, + 'federation-v2-after-remove-from-room', + ); + } + + public static canAddFederatedUserToNonFederatedRoom(callback: (user: IUser | string, room: IRoom) => Promise): void { + callbacks.add( + 'federation.beforeAddUserAToRoom', + (params: { user: IUser | string }, room: IRoom): void => { + Promise.await(callback(params.user, room)); + }, + callbacks.priority.HIGH, + 'federation-v2-can-add-federated-user-to-non-federated-room', + ); + } + + public static canAddFederatedUserToFederatedRoom(callback: (user: IUser | string, inviter: IUser, room: IRoom) => Promise): void { + callbacks.add( + 'federation.beforeAddUserAToRoom', + (params: { user: IUser | string; inviter: IUser }, room: IRoom): void => { + Promise.await(callback(params.user, params.inviter, room)); + }, + callbacks.priority.HIGH, + 'federation-v2-can-add-federated-user-to-federated-room', + ); + } + + public static canCreateDirectMessageFromUI(callback: (members: IUser[]) => Promise): void { + callbacks.add( + 'federation.beforeCreateDirectMessage', + (members: IUser[]): void => { + Promise.await(callback(members)); + }, + callbacks.priority.HIGH, + 'federation-v2-can-create-direct-message-from-ui-ce', + ); + } + + public static removeCEValidation(): void { + callbacks.remove('federation.beforeAddUserAToRoom', 'federation-v2-can-add-federated-user-to-federated-room'); + callbacks.remove('federation.beforeCreateDirectMessage', 'federation-v2-can-create-direct-message-from-ui-ce'); + } +} diff --git a/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/slash-commands/action.ts b/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/slash-commands/action.ts new file mode 100644 index 000000000000..23a5e3c01752 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/slash-commands/action.ts @@ -0,0 +1,38 @@ +import { Users } from '@rocket.chat/models'; + +export const normalizeExternalInviteeId = (rawInviteeId: string): string => `@${rawInviteeId.replace(/@/g, '')}`; + +const validateExternalInviteeIdFormat = async (rawInviteeId: string, inviterId: string): Promise => { + const inviter = await Users.findOneById(inviterId); + const isInviterExternal = inviter?.federated === true || inviter?.username?.includes(':'); + const localUserInvitingAnotherLocalUser = !rawInviteeId.includes(':') && !isInviterExternal; + if (localUserInvitingAnotherLocalUser) { + throw new Error('Invalid userId format for federation command.'); + } +}; + +export const executeSlashCommand = async ( + providedCommand: string, + stringParams: string | undefined, + item: Record, + commands: Record Promise>, + currentUserId?: string | null, +): Promise => { + if (providedCommand !== 'federation' || !stringParams) { + return; + } + + const [command, ...params] = stringParams.trim().split(' '); + const [rawUserId] = params; + if (!currentUserId || !commands[command]) { + return; + } + + await validateExternalInviteeIdFormat(rawUserId, currentUserId); + + const invitee = normalizeExternalInviteeId(rawUserId); + + const { rid: roomId } = item; + + await commands[command](currentUserId, roomId, invitee); +}; diff --git a/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/slash-commands/index.ts b/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/slash-commands/index.ts new file mode 100644 index 000000000000..ee1a73e17759 --- /dev/null +++ b/apps/meteor/app/federation-v2/server/infrastructure/rocket-chat/slash-commands/index.ts @@ -0,0 +1,26 @@ +import { Meteor } from 'meteor/meteor'; + +import { federationRoomServiceSender } from '../../..'; +import { FederationRoomSenderConverter } from '../converters/RoomSender'; +import { slashCommands } from '../../../../../utils/lib/slashCommand'; +import { executeSlashCommand } from './action'; + +const FEDERATION_COMMANDS: Record Promise> = { + dm: async (currentUserId: string, roomId: string, invitee: string) => + federationRoomServiceSender.createDirectMessageRoomAndInviteUser( + FederationRoomSenderConverter.toCreateDirectMessageRoomDto(currentUserId, roomId, invitee), + ), +}; + +function federation(providedCommand: string, stringParams: string | undefined, item: Record): void { + Promise.await(executeSlashCommand(providedCommand, stringParams, item, FEDERATION_COMMANDS, Meteor.userId())); +} + +slashCommands.add({ + command: 'federation', + callback: federation, + options: { + description: 'Federation_slash_commands', + params: '#command (dm) #user', + }, +}); diff --git a/app/federation/README.md b/apps/meteor/app/federation/README.md similarity index 100% rename from app/federation/README.md rename to apps/meteor/app/federation/README.md diff --git a/app/federation/server/constants.js b/apps/meteor/app/federation/server/constants.js similarity index 100% rename from app/federation/server/constants.js rename to apps/meteor/app/federation/server/constants.js diff --git a/app/federation/server/endpoints/dispatch.js b/apps/meteor/app/federation/server/endpoints/dispatch.js similarity index 98% rename from app/federation/server/endpoints/dispatch.js rename to apps/meteor/app/federation/server/endpoints/dispatch.js index ece587769b76..05179c53144e 100644 --- a/app/federation/server/endpoints/dispatch.js +++ b/apps/meteor/app/federation/server/endpoints/dispatch.js @@ -1,13 +1,13 @@ import { EJSON } from 'meteor/ejson'; +import { FederationServers } from '@rocket.chat/models'; import { API } from '../../../api/server'; import { serverLogger } from '../lib/logger'; import { contextDefinitions, eventTypes } from '../../../models/server/models/FederationEvents'; import { FederationRoomEvents, Messages, Rooms, Subscriptions, Users } from '../../../models/server'; -import { FederationServers } from '../../../models/server/raw'; import { normalizers } from '../normalizers'; import { deleteRoom } from '../../../lib/server/functions'; -import { Notifications } from '../../../notifications/server'; +import { api } from '../../../../server/sdk/api'; import { FileUpload } from '../../../file-upload'; import { getFederationDomain } from '../lib/getFederationDomain'; import { decryptIfNeeded } from '../lib/crypt'; @@ -273,7 +273,7 @@ const eventHandlers = { processThreads(denormalizedMessage, room); // Notify users - notifyUsersOnMessage(denormalizedMessage, room); + await notifyUsersOnMessage(denormalizedMessage, room); sendAllNotifications(denormalizedMessage, room); } catch (err) { serverLogger.debug(`Error on creating message: ${message._id}`); @@ -327,7 +327,7 @@ const eventHandlers = { Messages.removeById(messageId); // Notify the room - Notifications.notifyRoom(roomId, 'deleteMessage', { _id: messageId }); + api.broadcast('notify.deleteMessage', roomId, { _id: messageId }); } return eventResult; diff --git a/app/federation/server/endpoints/index.js b/apps/meteor/app/federation/server/endpoints/index.js similarity index 100% rename from app/federation/server/endpoints/index.js rename to apps/meteor/app/federation/server/endpoints/index.js diff --git a/app/federation/server/endpoints/requestFromLatest.js b/apps/meteor/app/federation/server/endpoints/requestFromLatest.js similarity index 100% rename from app/federation/server/endpoints/requestFromLatest.js rename to apps/meteor/app/federation/server/endpoints/requestFromLatest.js diff --git a/apps/meteor/app/federation/server/endpoints/uploads.js b/apps/meteor/app/federation/server/endpoints/uploads.js new file mode 100644 index 000000000000..2edbbbdb2e62 --- /dev/null +++ b/apps/meteor/app/federation/server/endpoints/uploads.js @@ -0,0 +1,29 @@ +import { Uploads } from '@rocket.chat/models'; + +import { API } from '../../../api/server'; +import { FileUpload } from '../../../file-upload/server'; +import { isFederationEnabled } from '../lib/isFederationEnabled'; + +API.v1.addRoute( + 'federation.uploads', + { authRequired: false }, + { + get() { + if (!isFederationEnabled()) { + return API.v1.failure('Federation not enabled'); + } + + const { upload_id } = this.requestParams(); + + const upload = Promise.await(Uploads.findOneById(upload_id)); + + if (!upload) { + return API.v1.failure('There is no such file in this server'); + } + + const buffer = FileUpload.getBufferSync(upload); + + return API.v1.success({ upload, buffer }); + }, + }, +); diff --git a/app/federation/server/endpoints/users.js b/apps/meteor/app/federation/server/endpoints/users.js similarity index 100% rename from app/federation/server/endpoints/users.js rename to apps/meteor/app/federation/server/endpoints/users.js diff --git a/app/federation/server/functions/addUser.js b/apps/meteor/app/federation/server/functions/addUser.js similarity index 92% rename from app/federation/server/functions/addUser.js rename to apps/meteor/app/federation/server/functions/addUser.js index 314b7893fbc1..866185354d6a 100644 --- a/app/federation/server/functions/addUser.js +++ b/apps/meteor/app/federation/server/functions/addUser.js @@ -1,8 +1,8 @@ import { Meteor } from 'meteor/meteor'; +import { FederationServers } from '@rocket.chat/models'; import * as federationErrors from './errors'; import { Users } from '../../../models/server'; -import { FederationServers } from '../../../models/server/raw'; import { getUserByUsername } from '../handler'; export async function addUser(query) { diff --git a/app/federation/server/functions/dashboard.js b/apps/meteor/app/federation/server/functions/dashboard.js similarity index 94% rename from app/federation/server/functions/dashboard.js rename to apps/meteor/app/federation/server/functions/dashboard.js index 3868d98d821b..149e2215f73f 100644 --- a/app/federation/server/functions/dashboard.js +++ b/apps/meteor/app/federation/server/functions/dashboard.js @@ -1,7 +1,7 @@ import { Meteor } from 'meteor/meteor'; +import { FederationServers } from '@rocket.chat/models'; import { FederationRoomEvents, Users } from '../../../models/server'; -import { FederationServers } from '../../../models/server/raw'; export async function getStatistics() { const numberOfEvents = FederationRoomEvents.find().count(); diff --git a/app/federation/server/functions/errors.js b/apps/meteor/app/federation/server/functions/errors.js similarity index 100% rename from app/federation/server/functions/errors.js rename to apps/meteor/app/federation/server/functions/errors.js diff --git a/apps/meteor/app/federation/server/functions/helpers.ts b/apps/meteor/app/federation/server/functions/helpers.ts new file mode 100644 index 000000000000..3b354ecdf84a --- /dev/null +++ b/apps/meteor/app/federation/server/functions/helpers.ts @@ -0,0 +1,78 @@ +import { isDirectMessageRoom } from '@rocket.chat/core-typings'; +import type { ISubscription, IRegisterUser, IUser, IRoom } from '@rocket.chat/core-typings'; +import { Settings } from '@rocket.chat/models'; + +import { Subscriptions, Users } from '../../../models/server'; +import { STATUS_ENABLED, STATUS_REGISTERING } from '../constants'; + +export const getNameAndDomain = (fullyQualifiedName: string): string[] => fullyQualifiedName.split('@'); + +export const isFullyQualified = (name: string): boolean => name.indexOf('@') !== -1; + +export async function isRegisteringOrEnabled(): Promise { + const value = await Settings.getValueById('FEDERATION_Status'); + return typeof value === 'string' && [STATUS_ENABLED, STATUS_REGISTERING].includes(value); +} + +export async function updateStatus(status: string): Promise { + await Settings.updateValueById('FEDERATION_Status', status); +} + +export async function updateEnabled(enabled: boolean): Promise { + await Settings.updateValueById('FEDERATION_Enabled', enabled); +} + +export const checkRoomType = (room: IRoom): boolean => room.t === 'p' || room.t === 'd'; +export const checkRoomDomainsLength = (domains: unknown[]): boolean => domains.length <= (process.env.FEDERATED_DOMAINS_LENGTH || 10); + +export const hasExternalDomain = ({ federation }: { federation: { origin: string; domains: string[] } }): boolean => { + // same test as isFederated(room) + if (!federation) { + return false; + } + + return federation.domains.some((domain) => domain !== federation.origin); +}; + +export const isLocalUser = ({ federation }: { federation: { origin: string } }, localDomain: string): boolean => + !federation || federation.origin === localDomain; + +export const getFederatedRoomData = ( + room: IRoom, +): { + hasFederatedUser: boolean; + users: IUser[]; + subscriptions: { [k: string]: ISubscription } | undefined; +} => { + if (isDirectMessageRoom(room)) { + // Check if there is a federated user on this room + + return { + users: [], + hasFederatedUser: room.usernames.some(isFullyQualified), + subscriptions: undefined, + }; + } + + // Find all subscriptions of this room + const s = Subscriptions.findByRoomIdWhenUsernameExists(room._id).fetch() as ISubscription[]; + const subscriptions = s.reduce((acc, s) => { + acc[s.u._id] = s; + return acc; + }, {} as { [k: string]: ISubscription }); + + // Get all user ids + const userIds = Object.keys(subscriptions); + + // Load all the users + const users: IRegisterUser[] = Users.findUsersWithUsernameByIds(userIds).fetch(); + + // Check if there is a federated user on this room + const hasFederatedUser = users.some((u) => isFullyQualified(u.username)); + + return { + hasFederatedUser, + users, + subscriptions, + }; +}; diff --git a/app/federation/server/functions/resolveDNS.ts b/apps/meteor/app/federation/server/functions/resolveDNS.ts similarity index 100% rename from app/federation/server/functions/resolveDNS.ts rename to apps/meteor/app/federation/server/functions/resolveDNS.ts diff --git a/app/federation/server/functions/searchUsers.js b/apps/meteor/app/federation/server/functions/searchUsers.js similarity index 100% rename from app/federation/server/functions/searchUsers.js rename to apps/meteor/app/federation/server/functions/searchUsers.js diff --git a/app/federation/server/handler/index.js b/apps/meteor/app/federation/server/handler/index.js similarity index 100% rename from app/federation/server/handler/index.js rename to apps/meteor/app/federation/server/handler/index.js diff --git a/app/federation/server/hooks/afterAddedToRoom.js b/apps/meteor/app/federation/server/hooks/afterAddedToRoom.js similarity index 100% rename from app/federation/server/hooks/afterAddedToRoom.js rename to apps/meteor/app/federation/server/hooks/afterAddedToRoom.js diff --git a/app/federation/server/hooks/afterCreateDirectRoom.js b/apps/meteor/app/federation/server/hooks/afterCreateDirectRoom.js similarity index 100% rename from app/federation/server/hooks/afterCreateDirectRoom.js rename to apps/meteor/app/federation/server/hooks/afterCreateDirectRoom.js diff --git a/app/federation/server/hooks/afterCreateRoom.js b/apps/meteor/app/federation/server/hooks/afterCreateRoom.js similarity index 100% rename from app/federation/server/hooks/afterCreateRoom.js rename to apps/meteor/app/federation/server/hooks/afterCreateRoom.js diff --git a/app/federation/server/hooks/afterDeleteMessage.js b/apps/meteor/app/federation/server/hooks/afterDeleteMessage.js similarity index 100% rename from app/federation/server/hooks/afterDeleteMessage.js rename to apps/meteor/app/federation/server/hooks/afterDeleteMessage.js diff --git a/app/federation/server/hooks/afterLeaveRoom.js b/apps/meteor/app/federation/server/hooks/afterLeaveRoom.js similarity index 100% rename from app/federation/server/hooks/afterLeaveRoom.js rename to apps/meteor/app/federation/server/hooks/afterLeaveRoom.js diff --git a/app/federation/server/hooks/afterMuteUser.js b/apps/meteor/app/federation/server/hooks/afterMuteUser.js similarity index 100% rename from app/federation/server/hooks/afterMuteUser.js rename to apps/meteor/app/federation/server/hooks/afterMuteUser.js diff --git a/app/federation/server/hooks/afterRemoveFromRoom.js b/apps/meteor/app/federation/server/hooks/afterRemoveFromRoom.js similarity index 100% rename from app/federation/server/hooks/afterRemoveFromRoom.js rename to apps/meteor/app/federation/server/hooks/afterRemoveFromRoom.js diff --git a/app/federation/server/hooks/afterSaveMessage.js b/apps/meteor/app/federation/server/hooks/afterSaveMessage.js similarity index 100% rename from app/federation/server/hooks/afterSaveMessage.js rename to apps/meteor/app/federation/server/hooks/afterSaveMessage.js diff --git a/app/federation/server/hooks/afterSetReaction.js b/apps/meteor/app/federation/server/hooks/afterSetReaction.js similarity index 100% rename from app/federation/server/hooks/afterSetReaction.js rename to apps/meteor/app/federation/server/hooks/afterSetReaction.js diff --git a/app/federation/server/hooks/afterUnmuteUser.js b/apps/meteor/app/federation/server/hooks/afterUnmuteUser.js similarity index 100% rename from app/federation/server/hooks/afterUnmuteUser.js rename to apps/meteor/app/federation/server/hooks/afterUnmuteUser.js diff --git a/app/federation/server/hooks/afterUnsetReaction.js b/apps/meteor/app/federation/server/hooks/afterUnsetReaction.js similarity index 100% rename from app/federation/server/hooks/afterUnsetReaction.js rename to apps/meteor/app/federation/server/hooks/afterUnsetReaction.js diff --git a/app/federation/server/hooks/beforeDeleteRoom.js b/apps/meteor/app/federation/server/hooks/beforeDeleteRoom.js similarity index 100% rename from app/federation/server/hooks/beforeDeleteRoom.js rename to apps/meteor/app/federation/server/hooks/beforeDeleteRoom.js diff --git a/app/federation/server/index.js b/apps/meteor/app/federation/server/index.js similarity index 100% rename from app/federation/server/index.js rename to apps/meteor/app/federation/server/index.js diff --git a/app/federation/server/lib/callbacks.js b/apps/meteor/app/federation/server/lib/callbacks.js similarity index 100% rename from app/federation/server/lib/callbacks.js rename to apps/meteor/app/federation/server/lib/callbacks.js diff --git a/app/federation/server/lib/crypt.js b/apps/meteor/app/federation/server/lib/crypt.js similarity index 96% rename from app/federation/server/lib/crypt.js rename to apps/meteor/app/federation/server/lib/crypt.js index 5a7685a2e9e0..4abe78248a8b 100644 --- a/app/federation/server/lib/crypt.js +++ b/apps/meteor/app/federation/server/lib/crypt.js @@ -1,4 +1,5 @@ -import { FederationKeys } from '../../../models/server/raw'; +import { FederationKeys } from '@rocket.chat/models'; + import { getFederationDomain } from './getFederationDomain'; import { search } from './dns'; import { cryptLogger } from './logger'; diff --git a/app/federation/server/lib/dns.js b/apps/meteor/app/federation/server/lib/dns.js similarity index 100% rename from app/federation/server/lib/dns.js rename to apps/meteor/app/federation/server/lib/dns.js diff --git a/app/federation/server/lib/getFederationDiscoveryMethod.js b/apps/meteor/app/federation/server/lib/getFederationDiscoveryMethod.js similarity index 100% rename from app/federation/server/lib/getFederationDiscoveryMethod.js rename to apps/meteor/app/federation/server/lib/getFederationDiscoveryMethod.js diff --git a/app/federation/server/lib/getFederationDomain.js b/apps/meteor/app/federation/server/lib/getFederationDomain.js similarity index 100% rename from app/federation/server/lib/getFederationDomain.js rename to apps/meteor/app/federation/server/lib/getFederationDomain.js diff --git a/app/federation/server/lib/http.js b/apps/meteor/app/federation/server/lib/http.js similarity index 100% rename from app/federation/server/lib/http.js rename to apps/meteor/app/federation/server/lib/http.js diff --git a/app/federation/server/lib/isFederationEnabled.js b/apps/meteor/app/federation/server/lib/isFederationEnabled.js similarity index 100% rename from app/federation/server/lib/isFederationEnabled.js rename to apps/meteor/app/federation/server/lib/isFederationEnabled.js diff --git a/app/federation/server/lib/logger.js b/apps/meteor/app/federation/server/lib/logger.js similarity index 100% rename from app/federation/server/lib/logger.js rename to apps/meteor/app/federation/server/lib/logger.js diff --git a/app/federation/server/methods/dashboard.js b/apps/meteor/app/federation/server/methods/dashboard.js similarity index 100% rename from app/federation/server/methods/dashboard.js rename to apps/meteor/app/federation/server/methods/dashboard.js diff --git a/app/federation/server/methods/index.js b/apps/meteor/app/federation/server/methods/index.js similarity index 100% rename from app/federation/server/methods/index.js rename to apps/meteor/app/federation/server/methods/index.js diff --git a/app/federation/server/methods/loadContextEvents.js b/apps/meteor/app/federation/server/methods/loadContextEvents.js similarity index 81% rename from app/federation/server/methods/loadContextEvents.js rename to apps/meteor/app/federation/server/methods/loadContextEvents.js index 914564a61ec7..36df66a5b8f9 100644 --- a/app/federation/server/methods/loadContextEvents.js +++ b/apps/meteor/app/federation/server/methods/loadContextEvents.js @@ -1,6 +1,6 @@ import { Meteor } from 'meteor/meteor'; -import { hasRole } from '../../../authorization/server'; +import { hasPermission } from '../../../authorization/server'; import { FederationRoomEvents } from '../../../models/server'; Meteor.methods({ @@ -9,7 +9,7 @@ Meteor.methods({ throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'loadContextEvents' }); } - if (!hasRole(Meteor.userId(), 'admin')) { + if (!hasPermission(Meteor.userId(), 'view-federation-data')) { throw new Meteor.Error('error-not-authorized', 'Not authorized', { method: 'loadContextEvents', }); diff --git a/app/federation/server/methods/testSetup.js b/apps/meteor/app/federation/server/methods/testSetup.js similarity index 100% rename from app/federation/server/methods/testSetup.js rename to apps/meteor/app/federation/server/methods/testSetup.js diff --git a/app/federation/server/normalizers/index.js b/apps/meteor/app/federation/server/normalizers/index.js similarity index 100% rename from app/federation/server/normalizers/index.js rename to apps/meteor/app/federation/server/normalizers/index.js diff --git a/app/federation/server/normalizers/message.js b/apps/meteor/app/federation/server/normalizers/message.js similarity index 100% rename from app/federation/server/normalizers/message.js rename to apps/meteor/app/federation/server/normalizers/message.js diff --git a/app/federation/server/normalizers/room.js b/apps/meteor/app/federation/server/normalizers/room.js similarity index 100% rename from app/federation/server/normalizers/room.js rename to apps/meteor/app/federation/server/normalizers/room.js diff --git a/app/federation/server/normalizers/subscription.js b/apps/meteor/app/federation/server/normalizers/subscription.js similarity index 100% rename from app/federation/server/normalizers/subscription.js rename to apps/meteor/app/federation/server/normalizers/subscription.js diff --git a/app/federation/server/normalizers/user.js b/apps/meteor/app/federation/server/normalizers/user.js similarity index 100% rename from app/federation/server/normalizers/user.js rename to apps/meteor/app/federation/server/normalizers/user.js diff --git a/apps/meteor/app/federation/server/startup/generateKeys.js b/apps/meteor/app/federation/server/startup/generateKeys.js new file mode 100644 index 000000000000..da372335a662 --- /dev/null +++ b/apps/meteor/app/federation/server/startup/generateKeys.js @@ -0,0 +1,8 @@ +import { FederationKeys } from '@rocket.chat/models'; + +// Create key pair if needed +(async () => { + if (!(await FederationKeys.getPublicKey())) { + await FederationKeys.generateKeys(); + } +})(); diff --git a/app/federation/server/startup/index.js b/apps/meteor/app/federation/server/startup/index.js similarity index 100% rename from app/federation/server/startup/index.js rename to apps/meteor/app/federation/server/startup/index.js diff --git a/app/federation/server/startup/registerCallbacks.js b/apps/meteor/app/federation/server/startup/registerCallbacks.js similarity index 100% rename from app/federation/server/startup/registerCallbacks.js rename to apps/meteor/app/federation/server/startup/registerCallbacks.js diff --git a/apps/meteor/app/federation/server/startup/settings.ts b/apps/meteor/app/federation/server/startup/settings.ts new file mode 100644 index 000000000000..ee216054db04 --- /dev/null +++ b/apps/meteor/app/federation/server/startup/settings.ts @@ -0,0 +1,107 @@ +import { FederationKeys } from '@rocket.chat/models'; + +import { settingsRegistry, settings } from '../../../settings/server'; +import { updateStatus, updateEnabled, isRegisteringOrEnabled } from '../functions/helpers'; +import { getFederationDomain } from '../lib/getFederationDomain'; +import { getFederationDiscoveryMethod } from '../lib/getFederationDiscoveryMethod'; +import { registerWithHub } from '../lib/dns'; +import { enableCallbacks, disableCallbacks } from '../lib/callbacks'; +import { setupLogger } from '../lib/logger'; +import { STATUS_ENABLED, STATUS_REGISTERING, STATUS_ERROR_REGISTERING, STATUS_DISABLED } from '../constants'; + +settingsRegistry.addGroup('Federation', function () { + this.section('Rocket.Chat Federation', async function () { + this.add('FEDERATION_Enabled', false, { + type: 'boolean', + i18nLabel: 'Enabled', + i18nDescription: 'FEDERATION_Enabled', + alert: 'FEDERATION_Enabled_Alert', + public: true, + }); + + this.add('FEDERATION_Status', 'Disabled', { + readonly: true, + type: 'string', + i18nLabel: 'FEDERATION_Status', + }); + + this.add('FEDERATION_Domain', '', { + type: 'string', + i18nLabel: 'FEDERATION_Domain', + i18nDescription: 'FEDERATION_Domain_Description', + alert: 'FEDERATION_Domain_Alert', + // disableReset: true, + }); + + const federationPublicKey = await FederationKeys.getPublicKeyString(); + + this.add('FEDERATION_Public_Key', federationPublicKey || '', { + readonly: true, + type: 'string', + multiline: true, + i18nLabel: 'FEDERATION_Public_Key', + i18nDescription: 'FEDERATION_Public_Key_Description', + }); + + this.add('FEDERATION_Discovery_Method', 'dns', { + type: 'select', + values: [ + { + key: 'dns', + i18nLabel: 'DNS', + }, + { + key: 'hub', + i18nLabel: 'Hub', + }, + ], + i18nLabel: 'FEDERATION_Discovery_Method', + i18nDescription: 'FEDERATION_Discovery_Method_Description', + public: true, + }); + + this.add('FEDERATION_Test_Setup', 'FEDERATION_Test_Setup', { + type: 'action', + actionText: 'FEDERATION_Test_Setup', + }); + }); +}); + +const updateSettings = async function (): Promise { + // Get the key pair + + if (getFederationDiscoveryMethod() === 'hub' && !(await isRegisteringOrEnabled())) { + // Register with hub + try { + await updateStatus(STATUS_REGISTERING); + + await registerWithHub(getFederationDomain(), settings.get('Site_Url'), await FederationKeys.getPublicKeyString()); + + await updateStatus(STATUS_ENABLED); + } catch (err) { + // Disable federation + await updateEnabled(false); + + await updateStatus(STATUS_ERROR_REGISTERING); + } + return; + } + await updateStatus(STATUS_ENABLED); +}; + +// Add settings listeners +settings.watch('FEDERATION_Enabled', async function enableOrDisable(value) { + setupLogger.info(`Federation is ${value ? 'enabled' : 'disabled'}`); + + if (value) { + await updateSettings(); + + enableCallbacks(); + } else { + await updateStatus(STATUS_DISABLED); + + disableCallbacks(); + } +}); + +settings.watchMultiple(['FEDERATION_Discovery_Method', 'FEDERATION_Domain'], updateSettings); diff --git a/app/file-upload/client/index.js b/apps/meteor/app/file-upload/client/index.js similarity index 100% rename from app/file-upload/client/index.js rename to apps/meteor/app/file-upload/client/index.js diff --git a/app/file-upload/client/lib/fileUploadHandler.js b/apps/meteor/app/file-upload/client/lib/fileUploadHandler.js similarity index 93% rename from app/file-upload/client/lib/fileUploadHandler.js rename to apps/meteor/app/file-upload/client/lib/fileUploadHandler.js index 619cc70cb0aa..2764be6781dc 100644 --- a/app/file-upload/client/lib/fileUploadHandler.js +++ b/apps/meteor/app/file-upload/client/lib/fileUploadHandler.js @@ -4,7 +4,7 @@ import { Tracker } from 'meteor/tracker'; import { UploadFS } from 'meteor/jalik:ufs'; import { FileUploadBase } from '../../lib/FileUploadBase'; -import { Uploads, Avatars } from '../../../models'; +import { Uploads, Avatars } from '../../../models/client'; new UploadFS.Store({ collection: Uploads.model, diff --git a/app/emoji/index.js b/apps/meteor/app/file-upload/index.js similarity index 100% rename from app/emoji/index.js rename to apps/meteor/app/file-upload/index.js diff --git a/app/file-upload/lib/FileUploadBase.js b/apps/meteor/app/file-upload/lib/FileUploadBase.js similarity index 100% rename from app/file-upload/lib/FileUploadBase.js rename to apps/meteor/app/file-upload/lib/FileUploadBase.js diff --git a/app/file-upload/server/config/AmazonS3.js b/apps/meteor/app/file-upload/server/config/AmazonS3.js similarity index 98% rename from app/file-upload/server/config/AmazonS3.js rename to apps/meteor/app/file-upload/server/config/AmazonS3.js index 04f27c099da9..e265311786d6 100644 --- a/app/file-upload/server/config/AmazonS3.js +++ b/apps/meteor/app/file-upload/server/config/AmazonS3.js @@ -3,7 +3,7 @@ import https from 'https'; import _ from 'underscore'; -import { settings } from '../../../settings'; +import { settings } from '../../../settings/server'; import { FileUploadClass, FileUpload } from '../lib/FileUpload'; import '../../ufs/AmazonS3/server.js'; import { SystemLogger } from '../../../../server/lib/logger/system'; diff --git a/app/file-upload/server/config/FileSystem.js b/apps/meteor/app/file-upload/server/config/FileSystem.js similarity index 100% rename from app/file-upload/server/config/FileSystem.js rename to apps/meteor/app/file-upload/server/config/FileSystem.js diff --git a/app/file-upload/server/config/GoogleStorage.js b/apps/meteor/app/file-upload/server/config/GoogleStorage.js similarity index 97% rename from app/file-upload/server/config/GoogleStorage.js rename to apps/meteor/app/file-upload/server/config/GoogleStorage.js index f3f0de3e29d8..ce900d9811aa 100644 --- a/app/file-upload/server/config/GoogleStorage.js +++ b/apps/meteor/app/file-upload/server/config/GoogleStorage.js @@ -4,7 +4,7 @@ import https from 'https'; import _ from 'underscore'; import { FileUploadClass, FileUpload } from '../lib/FileUpload'; -import { settings } from '../../../settings'; +import { settings } from '../../../settings/server'; import '../../ufs/GoogleStorage/server.js'; import { SystemLogger } from '../../../../server/lib/logger/system'; diff --git a/app/file-upload/server/config/GridFS.js b/apps/meteor/app/file-upload/server/config/GridFS.js similarity index 100% rename from app/file-upload/server/config/GridFS.js rename to apps/meteor/app/file-upload/server/config/GridFS.js diff --git a/app/file-upload/server/config/Webdav.js b/apps/meteor/app/file-upload/server/config/Webdav.js similarity index 97% rename from app/file-upload/server/config/Webdav.js rename to apps/meteor/app/file-upload/server/config/Webdav.js index f3fe904ccc56..7ca78cad5da6 100644 --- a/app/file-upload/server/config/Webdav.js +++ b/apps/meteor/app/file-upload/server/config/Webdav.js @@ -1,7 +1,7 @@ import _ from 'underscore'; import { FileUploadClass, FileUpload } from '../lib/FileUpload'; -import { settings } from '../../../settings'; +import { settings } from '../../../settings/server'; import '../../ufs/Webdav/server.js'; import { SystemLogger } from '../../../../server/lib/logger/system'; diff --git a/app/file-upload/server/config/_configUploadStorage.js b/apps/meteor/app/file-upload/server/config/_configUploadStorage.js similarity index 100% rename from app/file-upload/server/config/_configUploadStorage.js rename to apps/meteor/app/file-upload/server/config/_configUploadStorage.js diff --git a/app/file-upload/server/index.js b/apps/meteor/app/file-upload/server/index.js similarity index 100% rename from app/file-upload/server/index.js rename to apps/meteor/app/file-upload/server/index.js diff --git a/app/file-upload/server/lib/FileUpload.js b/apps/meteor/app/file-upload/server/lib/FileUpload.js similarity index 97% rename from app/file-upload/server/lib/FileUpload.js rename to apps/meteor/app/file-upload/server/lib/FileUpload.js index 3fe104558e7c..dc99688c5642 100644 --- a/app/file-upload/server/lib/FileUpload.js +++ b/apps/meteor/app/file-upload/server/lib/FileUpload.js @@ -12,14 +12,12 @@ import { Match } from 'meteor/check'; import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; import filesize from 'filesize'; import { AppsEngineException } from '@rocket.chat/apps-engine/definition/exceptions'; +import { Avatars, UserDataFiles, Uploads, Settings } from '@rocket.chat/models'; import { settings } from '../../../settings/server'; -import { Avatars, UserDataFiles, Uploads } from '../../../models/server/raw'; import Users from '../../../models/server/models/Users'; import Rooms from '../../../models/server/models/Rooms'; -import Settings from '../../../models/server/models/Settings'; import { mime } from '../../../utils/lib/mimeTypes'; -import { roomTypes } from '../../../utils/server/lib/roomTypes'; import { hasPermission } from '../../../authorization/server/functions/hasPermission'; import { canAccessRoom } from '../../../authorization/server/functions/canAccessRoom'; import { fileUploadIsValidContentType } from '../../../utils/lib/fileUploadRestrictions'; @@ -28,15 +26,16 @@ import { Messages } from '../../../models/server'; import { AppEvents, Apps } from '../../../apps/server'; import { streamToBuffer } from './streamToBuffer'; import { SystemLogger } from '../../../../server/lib/logger/system'; +import { roomCoordinator } from '../../../../server/lib/rooms/roomCoordinator'; const cookie = new Cookies(); let maxFileSize = 0; -settings.watch('FileUpload_MaxFileSize', function (value) { +settings.watch('FileUpload_MaxFileSize', async function (value) { try { maxFileSize = parseInt(value); } catch (e) { - maxFileSize = Settings.findOneById('FileUpload_MaxFileSize').packageValue; + maxFileSize = await Settings.findOneById('FileUpload_MaxFileSize').packageValue; } }); @@ -229,7 +228,9 @@ export const FileUpload = { const future = new Future(); const s = sharp(tempFilePath); - s.rotate(); + if (settings.get('FileUpload_RotateImages') === true) { + s.rotate(); + } s.metadata( Meteor.bindEnvironment((err, metadata) => { @@ -442,7 +443,8 @@ export const FileUpload = { const isAuthorizedByCookies = rc_uid && rc_token && Users.findOneByIdAndLoginToken(rc_uid, rc_token); const isAuthorizedByHeaders = headers['x-user-id'] && headers['x-auth-token'] && Users.findOneByIdAndLoginToken(headers['x-user-id'], headers['x-auth-token']); - const isAuthorizedByRoom = rc_room_type && roomTypes.getConfig(rc_room_type).canAccessUploadedFile({ rc_uid, rc_rid, rc_token }); + const isAuthorizedByRoom = + rc_room_type && roomCoordinator.getRoomDirectives(rc_room_type)?.canAccessUploadedFile({ rc_uid, rc_rid, rc_token }); const isAuthorizedByJWT = settings.get('FileUpload_Enable_json_web_token_for_files') && token && diff --git a/app/file-upload/server/lib/proxy.js b/apps/meteor/app/file-upload/server/lib/proxy.js similarity index 100% rename from app/file-upload/server/lib/proxy.js rename to apps/meteor/app/file-upload/server/lib/proxy.js diff --git a/app/file-upload/server/lib/ranges.js b/apps/meteor/app/file-upload/server/lib/ranges.js similarity index 100% rename from app/file-upload/server/lib/ranges.js rename to apps/meteor/app/file-upload/server/lib/ranges.js diff --git a/apps/meteor/app/file-upload/server/lib/requests.js b/apps/meteor/app/file-upload/server/lib/requests.js new file mode 100644 index 000000000000..87f934f4a4f3 --- /dev/null +++ b/apps/meteor/app/file-upload/server/lib/requests.js @@ -0,0 +1,26 @@ +import { WebApp } from 'meteor/webapp'; +import { Uploads } from '@rocket.chat/models'; + +import { FileUpload } from './FileUpload'; + +WebApp.connectHandlers.use(FileUpload.getPath(), async function (req, res, next) { + const match = /^\/([^\/]+)\/(.*)/.exec(req.url); + + if (match && match[1]) { + const file = await Uploads.findOneById(match[1]); + + if (file) { + if (!FileUpload.requestCanAccessFiles(req)) { + res.writeHead(403); + return res.end(); + } + + res.setHeader('Content-Security-Policy', "default-src 'none'"); + res.setHeader('Cache-Control', 'max-age=31536000'); + return FileUpload.get(file, req, res, next); + } + } + + res.writeHead(404); + res.end(); +}); diff --git a/app/file-upload/server/lib/streamToBuffer.ts b/apps/meteor/app/file-upload/server/lib/streamToBuffer.ts similarity index 90% rename from app/file-upload/server/lib/streamToBuffer.ts rename to apps/meteor/app/file-upload/server/lib/streamToBuffer.ts index 09c13713a0dd..110d364705f3 100644 --- a/app/file-upload/server/lib/streamToBuffer.ts +++ b/apps/meteor/app/file-upload/server/lib/streamToBuffer.ts @@ -1,4 +1,4 @@ -import { Readable } from 'stream'; +import type { Readable } from 'stream'; export const streamToBuffer = (stream: Readable): Promise => new Promise((resolve, reject) => { diff --git a/apps/meteor/app/file-upload/server/methods/getS3FileUrl.js b/apps/meteor/app/file-upload/server/methods/getS3FileUrl.js new file mode 100644 index 000000000000..6a538caee41c --- /dev/null +++ b/apps/meteor/app/file-upload/server/methods/getS3FileUrl.js @@ -0,0 +1,28 @@ +import { Meteor } from 'meteor/meteor'; +import { check } from 'meteor/check'; +import { UploadFS } from 'meteor/jalik:ufs'; +import { Uploads } from '@rocket.chat/models'; + +import { settings } from '../../../settings/server'; +import { canAccessRoom } from '../../../authorization/server'; + +let protectedFiles; + +settings.watch('FileUpload_ProtectFiles', function (value) { + protectedFiles = value; +}); + +Meteor.methods({ + async getS3FileUrl(fileId) { + check(fileId, String); + if (protectedFiles && !Meteor.userId()) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'sendFileMessage' }); + } + const file = await Uploads.findOneById(fileId); + if (!file.rid || !canAccessRoom({ _id: file.rid }, { _id: this.userId })) { + throw new Meteor.Error('error-not-allowed', 'Not allowed'); + } + + return UploadFS.getStore('AmazonS3:Uploads').getRedirectURL(file); + }, +}); diff --git a/app/file-upload/server/methods/sendFileMessage.ts b/apps/meteor/app/file-upload/server/methods/sendFileMessage.ts similarity index 88% rename from app/file-upload/server/methods/sendFileMessage.ts rename to apps/meteor/app/file-upload/server/methods/sendFileMessage.ts index 3cae83885ed2..a3f6332f1cf3 100644 --- a/app/file-upload/server/methods/sendFileMessage.ts +++ b/apps/meteor/app/file-upload/server/methods/sendFileMessage.ts @@ -1,15 +1,12 @@ -/* eslint-disable @typescript-eslint/camelcase */ import { Meteor } from 'meteor/meteor'; import { Match, check } from 'meteor/check'; import _ from 'underscore'; +import type { MessageAttachment, FileAttachmentProps, IUser } from '@rocket.chat/core-typings'; +import { Rooms, Uploads } from '@rocket.chat/models'; -import { Rooms, Uploads } from '../../../models/server/raw'; import { callbacks } from '../../../../lib/callbacks'; import { FileUpload } from '../lib/FileUpload'; import { canAccessRoom } from '../../../authorization/server/functions/canAccessRoom'; -import { MessageAttachment } from '../../../../definition/IMessage/MessageAttachment/MessageAttachment'; -import { FileAttachmentProps } from '../../../../definition/IMessage/MessageAttachment/Files/FileAttachmentProps'; -import { IUser } from '../../../../definition/IUser'; import { SystemLogger } from '../../../../server/lib/logger/system'; Meteor.methods({ @@ -22,6 +19,9 @@ Meteor.methods({ } const room = await Rooms.findOneById(roomId); + if (!room) { + return false; + } if (user?.type !== 'app' && !canAccessRoom(room, user)) { return false; @@ -62,7 +62,7 @@ Meteor.methods({ image_size: file.size, }; - if (file.identify && file.identify.size) { + if (file.identify?.size) { attachment.image_dimensions = file.identify.size; } @@ -127,12 +127,12 @@ Meteor.methods({ const msg = Meteor.call('sendMessage', { rid: roomId, ts: new Date(), - msg: '', file: files[0], files, - groupable: false, attachments, ...msgData, + msg: msgData.msg ?? '', + groupable: msgData.groupable ?? false, }); callbacks.runAsync('afterFileUpload', { user, room, message: msg }); diff --git a/apps/meteor/app/file-upload/server/startup/settings.ts b/apps/meteor/app/file-upload/server/startup/settings.ts new file mode 100644 index 000000000000..f55887f25993 --- /dev/null +++ b/apps/meteor/app/file-upload/server/startup/settings.ts @@ -0,0 +1,284 @@ +import { settingsRegistry } from '../../../settings/server'; + +settingsRegistry.addGroup('FileUpload', function () { + this.add('FileUpload_Enabled', true, { + type: 'boolean', + public: true, + }); + + this.add('FileUpload_MaxFileSize', 104857600, { + type: 'int', + public: true, + i18nDescription: 'FileUpload_MaxFileSizeDescription', + }); + + this.add('FileUpload_MediaTypeWhiteList', '', { + type: 'string', + public: true, + i18nDescription: 'FileUpload_MediaTypeWhiteListDescription', + }); + + this.add('FileUpload_MediaTypeBlackList', 'image/svg+xml', { + type: 'string', + public: true, + i18nDescription: 'FileUpload_MediaTypeBlackListDescription', + }); + + this.add('FileUpload_ProtectFiles', true, { + type: 'boolean', + public: true, + i18nDescription: 'FileUpload_ProtectFilesDescription', + }); + + this.add('FileUpload_RotateImages', true, { + type: 'boolean', + public: true, + }); + + this.add('FileUpload_Enable_json_web_token_for_files', true, { + type: 'boolean', + i18nLabel: 'FileUpload_Enable_json_web_token_for_files', + i18nDescription: 'FileUpload_Enable_json_web_token_for_files_description', + enableQuery: { + _id: 'FileUpload_ProtectFiles', + value: true, + }, + }); + + this.add('FileUpload_json_web_token_secret_for_files', '', { + type: 'string', + i18nLabel: 'FileUpload_json_web_token_secret_for_files', + i18nDescription: 'FileUpload_json_web_token_secret_for_files_description', + enableQuery: { + _id: 'FileUpload_Enable_json_web_token_for_files', + value: true, + }, + }); + + this.add('FileUpload_Storage_Type', 'GridFS', { + type: 'select', + values: [ + { + key: 'GridFS', + i18nLabel: 'GridFS', + }, + { + key: 'AmazonS3', + i18nLabel: 'AmazonS3', + }, + { + key: 'GoogleCloudStorage', + i18nLabel: 'GoogleCloudStorage', + }, + { + key: 'Webdav', + i18nLabel: 'WebDAV', + }, + { + key: 'FileSystem', + i18nLabel: 'FileSystem', + }, + ], + public: true, + }); + + this.section('Amazon S3', function () { + this.add('FileUpload_S3_Bucket', '', { + type: 'string', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'AmazonS3', + }, + }); + this.add('FileUpload_S3_Acl', '', { + type: 'string', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'AmazonS3', + }, + }); + this.add('FileUpload_S3_AWSAccessKeyId', '', { + type: 'string', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'AmazonS3', + }, + secret: true, + }); + this.add('FileUpload_S3_AWSSecretAccessKey', '', { + type: 'string', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'AmazonS3', + }, + secret: true, + }); + this.add('FileUpload_S3_CDN', '', { + type: 'string', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'AmazonS3', + }, + }); + this.add('FileUpload_S3_Region', '', { + type: 'string', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'AmazonS3', + }, + }); + this.add('FileUpload_S3_BucketURL', '', { + type: 'string', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'AmazonS3', + }, + i18nDescription: 'Override_URL_to_which_files_are_uploaded_This_url_also_used_for_downloads_unless_a_CDN_is_given.', + secret: true, + }); + this.add('FileUpload_S3_SignatureVersion', 'v4', { + type: 'string', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'AmazonS3', + }, + }); + this.add('FileUpload_S3_ForcePathStyle', false, { + type: 'boolean', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'AmazonS3', + }, + }); + this.add('FileUpload_S3_URLExpiryTimeSpan', 120, { + type: 'int', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'AmazonS3', + }, + i18nDescription: 'FileUpload_S3_URLExpiryTimeSpan_Description', + }); + this.add('FileUpload_S3_Proxy_Avatars', false, { + type: 'boolean', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'AmazonS3', + }, + }); + this.add('FileUpload_S3_Proxy_Uploads', false, { + type: 'boolean', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'AmazonS3', + }, + }); + }); + + this.section('Google Cloud Storage', function () { + this.add('FileUpload_GoogleStorage_Bucket', '', { + type: 'string', + private: true, + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'GoogleCloudStorage', + }, + secret: true, + }); + this.add('FileUpload_GoogleStorage_AccessId', '', { + type: 'string', + private: true, + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'GoogleCloudStorage', + }, + secret: true, + }); + this.add('FileUpload_GoogleStorage_Secret', '', { + type: 'string', + multiline: true, + private: true, + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'GoogleCloudStorage', + }, + secret: true, + }); + this.add('FileUpload_GoogleStorage_Proxy_Avatars', false, { + type: 'boolean', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'GoogleCloudStorage', + }, + }); + this.add('FileUpload_GoogleStorage_Proxy_Uploads', false, { + type: 'boolean', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'GoogleCloudStorage', + }, + }); + }); + + this.section('File System', function () { + this.add('FileUpload_FileSystemPath', '', { + type: 'string', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'FileSystem', + }, + }); + }); + + this.section('WebDAV', function () { + this.add('FileUpload_Webdav_Upload_Folder_Path', '', { + type: 'string', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'Webdav', + }, + }); + this.add('FileUpload_Webdav_Server_URL', '', { + type: 'string', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'Webdav', + }, + }); + this.add('FileUpload_Webdav_Username', '', { + type: 'string', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'Webdav', + }, + secret: true, + }); + this.add('FileUpload_Webdav_Password', '', { + type: 'password', + private: true, + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'Webdav', + }, + secret: true, + }); + this.add('FileUpload_Webdav_Proxy_Avatars', false, { + type: 'boolean', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'Webdav', + }, + }); + this.add('FileUpload_Webdav_Proxy_Uploads', false, { + type: 'boolean', + enableQuery: { + _id: 'FileUpload_Storage_Type', + value: 'Webdav', + }, + }); + }); + + this.add('FileUpload_Enabled_Direct', true, { + type: 'boolean', + public: true, + }); +}); diff --git a/app/file-upload/ufs/AmazonS3/server.js b/apps/meteor/app/file-upload/ufs/AmazonS3/server.js similarity index 100% rename from app/file-upload/ufs/AmazonS3/server.js rename to apps/meteor/app/file-upload/ufs/AmazonS3/server.js diff --git a/app/file-upload/ufs/GoogleStorage/server.js b/apps/meteor/app/file-upload/ufs/GoogleStorage/server.js similarity index 100% rename from app/file-upload/ufs/GoogleStorage/server.js rename to apps/meteor/app/file-upload/ufs/GoogleStorage/server.js diff --git a/app/file-upload/ufs/Webdav/server.js b/apps/meteor/app/file-upload/ufs/Webdav/server.js similarity index 100% rename from app/file-upload/ufs/Webdav/server.js rename to apps/meteor/app/file-upload/ufs/Webdav/server.js diff --git a/app/file/index.js b/apps/meteor/app/file/index.js similarity index 100% rename from app/file/index.js rename to apps/meteor/app/file/index.js diff --git a/app/file/server/file.server.js b/apps/meteor/app/file/server/file.server.js similarity index 82% rename from app/file/server/file.server.js rename to apps/meteor/app/file/server/file.server.js index 8c3bb86723de..ae3c4a3c796a 100644 --- a/app/file/server/file.server.js +++ b/apps/meteor/app/file/server/file.server.js @@ -4,13 +4,10 @@ import path from 'path'; import { Meteor } from 'meteor/meteor'; import { MongoInternals } from 'meteor/mongo'; -import Grid from 'gridfs-stream'; import mkdirp from 'mkdirp'; -// Fix problem with usernames being converted to object id -Grid.prototype.tryParseObjectId = function () { - return false; -}; +const mongo = MongoInternals.NpmModule; +const { db } = MongoInternals.defaultRemoteCollectionDriver().mongo; const RocketChatFile = {}; @@ -40,37 +37,30 @@ RocketChatFile.GridFS = class { this.name = name; this.transformWrite = transformWrite; - const mongo = MongoInternals.NpmModule; - const { db } = MongoInternals.defaultRemoteCollectionDriver().mongo; - this.store = new Grid(db, mongo); - this.findOneSync = Meteor.wrapAsync(this.store.collection(this.name).findOne.bind(this.store.collection(this.name))); - this.removeSync = Meteor.wrapAsync(this.store.remove.bind(this.store)); - this.countSync = Meteor.wrapAsync(this.store._col.count.bind(this.store._col)); + + this.bucket = new mongo.GridFSBucket(db, { bucketName: this.name }); + this.getFileSync = Meteor.wrapAsync(this.getFile.bind(this)); } - findOne(fileName) { - return this.findOneSync({ - _id: fileName, - }); + findOne(filename) { + const file = Promise.await(this.bucket.find({ filename }).limit(1).toArray()); + if (!file) { + return; + } + return file[0]; } - remove(fileName) { - return this.removeSync({ - _id: fileName, - root: this.name, - }); + remove(fileId) { + Promise.await(this.bucket.delete(fileId)); } createWriteStream(fileName, contentType) { const self = this; - let ws = this.store.createWriteStream({ - _id: fileName, - filename: fileName, - mode: 'w', - root: this.name, - content_type: contentType, + let ws = this.bucket.openUploadStream(fileName, { + contentType, }); + if (self.transformWrite != null) { ws = RocketChatFile.addPassThrough(ws, function (rs, ws) { const file = { @@ -88,10 +78,7 @@ RocketChatFile.GridFS = class { } createReadStream(fileName) { - return this.store.createReadStream({ - _id: fileName, - root: this.name, - }); + return this.bucket.openDownloadStreamByName(fileName); } getFileWithReadStream(fileName) { @@ -138,7 +125,7 @@ RocketChatFile.GridFS = class { if (file == null) { return undefined; } - return this.remove(fileName); + return this.remove(file._id); } }; diff --git a/app/file/server/index.js b/apps/meteor/app/file/server/index.js similarity index 100% rename from app/file/server/index.js rename to apps/meteor/app/file/server/index.js diff --git a/app/github-enterprise/client/github-enterprise-login-button.css b/apps/meteor/app/github-enterprise/client/github-enterprise-login-button.css similarity index 100% rename from app/github-enterprise/client/github-enterprise-login-button.css rename to apps/meteor/app/github-enterprise/client/github-enterprise-login-button.css diff --git a/app/github-enterprise/client/index.js b/apps/meteor/app/github-enterprise/client/index.js similarity index 100% rename from app/github-enterprise/client/index.js rename to apps/meteor/app/github-enterprise/client/index.js diff --git a/apps/meteor/app/github-enterprise/lib/common.js b/apps/meteor/app/github-enterprise/lib/common.js new file mode 100644 index 000000000000..b1b07abc6cb8 --- /dev/null +++ b/apps/meteor/app/github-enterprise/lib/common.js @@ -0,0 +1,39 @@ +import { Meteor } from 'meteor/meteor'; +import { Tracker } from 'meteor/tracker'; + +import { CustomOAuth } from '../../custom-oauth'; +import { settings } from '../../settings'; + +// GitHub Enterprise Server CallBack URL needs to be http(s)://{rocketchat.server}[:port]/_oauth/github_enterprise +// In RocketChat -> Administration the URL needs to be http(s)://{github.enterprise.server}/ + +const config = { + serverURL: '', + identityPath: '/api/v3/user', + authorizePath: '/login/oauth/authorize', + tokenPath: '/login/oauth/access_token', + addAutopublishFields: { + forLoggedInUser: ['services.github-enterprise'], + forOtherUsers: ['services.github-enterprise.username'], + }, +}; + +const GitHubEnterprise = new CustomOAuth('github_enterprise', config); + +if (Meteor.isServer) { + Meteor.startup(function () { + settings.watch('API_GitHub_Enterprise_URL', function (value) { + config.serverURL = value; + GitHubEnterprise.configure(config); + }); + }); +} else { + Meteor.startup(function () { + Tracker.autorun(function () { + if (settings.get('API_GitHub_Enterprise_URL')) { + config.serverURL = settings.get('API_GitHub_Enterprise_URL'); + GitHubEnterprise.configure(config); + } + }); + }); +} diff --git a/app/github-enterprise/server/index.js b/apps/meteor/app/github-enterprise/server/index.js similarity index 100% rename from app/github-enterprise/server/index.js rename to apps/meteor/app/github-enterprise/server/index.js diff --git a/app/github-enterprise/server/startup.ts b/apps/meteor/app/github-enterprise/server/startup.ts similarity index 100% rename from app/github-enterprise/server/startup.ts rename to apps/meteor/app/github-enterprise/server/startup.ts diff --git a/app/gitlab/client/gitlab-login-button.css b/apps/meteor/app/gitlab/client/gitlab-login-button.css similarity index 100% rename from app/gitlab/client/gitlab-login-button.css rename to apps/meteor/app/gitlab/client/gitlab-login-button.css diff --git a/app/gitlab/client/index.js b/apps/meteor/app/gitlab/client/index.js similarity index 100% rename from app/gitlab/client/index.js rename to apps/meteor/app/gitlab/client/index.js diff --git a/apps/meteor/app/gitlab/lib/common.js b/apps/meteor/app/gitlab/lib/common.js new file mode 100644 index 000000000000..5e3bd9941846 --- /dev/null +++ b/apps/meteor/app/gitlab/lib/common.js @@ -0,0 +1,57 @@ +import { Meteor } from 'meteor/meteor'; +import { Tracker } from 'meteor/tracker'; +import _ from 'underscore'; + +import { settings } from '../../settings'; +import { CustomOAuth } from '../../custom-oauth'; + +const config = { + serverURL: 'https://gitlab.com', + identityPath: '/api/v4/user', + scope: 'read_user', + mergeUsers: false, + addAutopublishFields: { + forLoggedInUser: ['services.gitlab'], + forOtherUsers: ['services.gitlab.username'], + }, + accessTokenParam: 'access_token', +}; + +const Gitlab = new CustomOAuth('gitlab', config); + +if (Meteor.isServer) { + Meteor.startup(function () { + const updateConfig = _.debounce(() => { + config.serverURL = settings.get('API_Gitlab_URL').trim().replace(/\/*$/, '') || config.serverURL; + config.identityPath = settings.get('Accounts_OAuth_Gitlab_identity_path') || config.identityPath; + config.mergeUsers = Boolean(settings.get('Accounts_OAuth_Gitlab_merge_users')); + Gitlab.configure(config); + }, 300); + + settings.watchMultiple(['API_Gitlab_URL', 'Accounts_OAuth_Gitlab_identity_path', 'Accounts_OAuth_Gitlab_merge_users'], updateConfig); + }); +} else { + Meteor.startup(function () { + Tracker.autorun(function () { + let anyChange = false; + if (settings.get('API_Gitlab_URL')) { + config.serverURL = settings.get('API_Gitlab_URL').trim().replace(/\/*$/, ''); + anyChange = true; + } + + if (settings.get('Accounts_OAuth_Gitlab_identity_path')) { + config.identityPath = settings.get('Accounts_OAuth_Gitlab_identity_path').trim() || config.identityPath; + anyChange = true; + } + + if (settings.get('Accounts_OAuth_Gitlab_merge_users')) { + config.mergeUsers = true; + anyChange = true; + } + + if (anyChange) { + Gitlab.configure(config); + } + }); + }); +} diff --git a/app/gitlab/server/index.js b/apps/meteor/app/gitlab/server/index.js similarity index 100% rename from app/gitlab/server/index.js rename to apps/meteor/app/gitlab/server/index.js diff --git a/app/gitlab/server/startup.ts b/apps/meteor/app/gitlab/server/startup.ts similarity index 100% rename from app/gitlab/server/startup.ts rename to apps/meteor/app/gitlab/server/startup.ts diff --git a/app/google-oauth/server/index.js b/apps/meteor/app/google-oauth/server/index.js similarity index 100% rename from app/google-oauth/server/index.js rename to apps/meteor/app/google-oauth/server/index.js diff --git a/app/highlight-words/client/client.js b/apps/meteor/app/highlight-words/client/client.js similarity index 100% rename from app/highlight-words/client/client.js rename to apps/meteor/app/highlight-words/client/client.js diff --git a/apps/meteor/app/highlight-words/client/client.ts b/apps/meteor/app/highlight-words/client/client.ts new file mode 100644 index 000000000000..402d45e7b0be --- /dev/null +++ b/apps/meteor/app/highlight-words/client/client.ts @@ -0,0 +1,25 @@ +import type { IMessage } from '@rocket.chat/core-typings'; + +import { highlightWords, getRegexHighlight, getRegexHighlightUrl } from './helper'; + +// TODO: delete this file after message rewrites +export const createHighlightWordsMessageRenderer = ({ + wordsToHighlight, +}: { + wordsToHighlight: string[]; +}): ((message: T) => T) => { + const highlights = wordsToHighlight.map((highlight) => ({ + highlight, + regex: getRegexHighlight(highlight), + urlRegex: getRegexHighlightUrl(highlight), + })); + + return (message: T): T => { + if (!message.html?.trim()) { + return message; + } + + message.html = highlightWords(message.html, highlights); + return message; + }; +}; diff --git a/apps/meteor/app/highlight-words/client/helper.js b/apps/meteor/app/highlight-words/client/helper.js new file mode 100644 index 000000000000..aa4f85eed21d --- /dev/null +++ b/apps/meteor/app/highlight-words/client/helper.js @@ -0,0 +1,38 @@ +import { escapeRegExp } from '@rocket.chat/string-helpers'; + +export const checkHighlightedWordsInUrls = (msg, urlRegex) => msg.match(urlRegex); + +export const removeHighlightedUrls = (msg, highlight, urlMatches) => { + const highlightRegex = new RegExp(highlight, 'gmi'); + + return urlMatches.reduce((msg, match) => { + const withTemplate = match.replace(highlightRegex, `${highlight}`); + const regexWithTemplate = new RegExp(withTemplate, 'i'); + return msg.replace(regexWithTemplate, match); + }, msg); +}; + +const highlightTemplate = '$1$2$3'; + +export const getRegexHighlight = (highlight) => + new RegExp( + `(^|\\b|[\\s\\n\\r\\t.,،'\\\"\\+!?:-])(${escapeRegExp(highlight)})($|\\b|[\\s\\n\\r\\t.,،'\\\"\\+!?:-])(?![^<]*>|[^<>]*<\\/)`, + 'gmi', + ); + +export const getRegexHighlightUrl = (highlight) => + new RegExp( + `https?:\/\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)(${escapeRegExp( + highlight, + )})\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)`, + 'gmi', + ); + +export const highlightWords = (msg, highlights) => + highlights.reduce((msg, { highlight, regex, urlRegex }) => { + const urlMatches = checkHighlightedWordsInUrls(msg, urlRegex); + if (!urlMatches) { + return msg.replace(regex, highlightTemplate); + } + return removeHighlightedUrls(msg.replace(regex, highlightTemplate), highlight, urlMatches); + }, msg); diff --git a/app/highlight-words/client/index.js b/apps/meteor/app/highlight-words/client/index.js similarity index 100% rename from app/highlight-words/client/index.js rename to apps/meteor/app/highlight-words/client/index.js diff --git a/apps/meteor/app/highlight-words/client/index.ts b/apps/meteor/app/highlight-words/client/index.ts new file mode 100644 index 000000000000..fb7467ca95b7 --- /dev/null +++ b/apps/meteor/app/highlight-words/client/index.ts @@ -0,0 +1 @@ +export { createHighlightWordsMessageRenderer } from './client'; diff --git a/app/favico/index.js b/apps/meteor/app/highlight-words/index.js similarity index 100% rename from app/favico/index.js rename to apps/meteor/app/highlight-words/index.js diff --git a/app/iframe-login/client/iframe_client.js b/apps/meteor/app/iframe-login/client/iframe_client.js similarity index 100% rename from app/iframe-login/client/iframe_client.js rename to apps/meteor/app/iframe-login/client/iframe_client.js diff --git a/app/iframe-login/client/index.js b/apps/meteor/app/iframe-login/client/index.js similarity index 100% rename from app/iframe-login/client/index.js rename to apps/meteor/app/iframe-login/client/index.js diff --git a/app/iframe-login/server/iframe_rocketchat.ts b/apps/meteor/app/iframe-login/server/iframe_rocketchat.ts similarity index 100% rename from app/iframe-login/server/iframe_rocketchat.ts rename to apps/meteor/app/iframe-login/server/iframe_rocketchat.ts diff --git a/app/iframe-login/server/iframe_server.js b/apps/meteor/app/iframe-login/server/iframe_server.js similarity index 100% rename from app/iframe-login/server/iframe_server.js rename to apps/meteor/app/iframe-login/server/iframe_server.js diff --git a/app/iframe-login/server/index.js b/apps/meteor/app/iframe-login/server/index.js similarity index 100% rename from app/iframe-login/server/index.js rename to apps/meteor/app/iframe-login/server/index.js diff --git a/app/importer-csv/client/adder.js b/apps/meteor/app/importer-csv/client/adder.js similarity index 100% rename from app/importer-csv/client/adder.js rename to apps/meteor/app/importer-csv/client/adder.js diff --git a/app/importer-csv/client/index.js b/apps/meteor/app/importer-csv/client/index.js similarity index 100% rename from app/importer-csv/client/index.js rename to apps/meteor/app/importer-csv/client/index.js diff --git a/app/importer-csv/lib/info.js b/apps/meteor/app/importer-csv/lib/info.js similarity index 100% rename from app/importer-csv/lib/info.js rename to apps/meteor/app/importer-csv/lib/info.js diff --git a/apps/meteor/app/importer-csv/server/importer.js b/apps/meteor/app/importer-csv/server/importer.js new file mode 100644 index 000000000000..61ba6824a8c6 --- /dev/null +++ b/apps/meteor/app/importer-csv/server/importer.js @@ -0,0 +1,247 @@ +import { Settings } from '@rocket.chat/models'; +import { Random } from 'meteor/random'; + +import { Base, ProgressStep, ImporterWebsocket } from '../../importer/server'; +import { Users } from '../../models/server'; + +export class CsvImporter extends Base { + constructor(info, importRecord) { + super(info, importRecord); + + const { parse } = require('csv-parse/lib/sync'); + + this.csvParser = parse; + } + + prepareUsingLocalFile(fullFilePath) { + this.logger.debug('start preparing import operation'); + this.converter.clearImportData(); + + const zip = new this.AdmZip(fullFilePath); + const totalEntries = zip.getEntryCount(); + + ImporterWebsocket.progressUpdated({ rate: 0 }); + + let count = 0; + let oldRate = 0; + + const increaseProgressCount = () => { + try { + count++; + const rate = Math.floor((count * 1000) / totalEntries) / 10; + if (rate > oldRate) { + ImporterWebsocket.progressUpdated({ rate }); + oldRate = rate; + } + } catch (e) { + this.logger.error(e); + } + }; + + let messagesCount = 0; + let usersCount = 0; + let channelsCount = 0; + const dmRooms = new Map(); + const roomIds = new Map(); + const usedUsernames = new Set(); + const availableUsernames = new Set(); + + const getRoomId = (roomName) => { + if (!roomIds.has(roomName)) { + roomIds.set(roomName, Random.id()); + } + + return roomIds.get(roomName); + }; + + zip.forEach((entry) => { + this.logger.debug(`Entry: ${entry.entryName}`); + + // Ignore anything that has `__MACOSX` in it's name, as sadly these things seem to mess everything up + if (entry.entryName.indexOf('__MACOSX') > -1) { + this.logger.debug(`Ignoring the file: ${entry.entryName}`); + return increaseProgressCount(); + } + + // Directories are ignored, since they are "virtual" in a zip file + if (entry.isDirectory) { + this.logger.debug(`Ignoring the directory entry: ${entry.entryName}`); + return increaseProgressCount(); + } + + // Parse the channels + if (entry.entryName.toLowerCase() === 'channels.csv') { + super.updateProgress(ProgressStep.PREPARING_CHANNELS); + const parsedChannels = this.csvParser(entry.getData().toString()); + channelsCount = parsedChannels.length; + + for (const c of parsedChannels) { + const name = c[0].trim(); + const id = getRoomId(name); + const creator = c[1].trim(); + const isPrivate = c[2].trim().toLowerCase() === 'private'; + const members = c[3] + .trim() + .split(';') + .map((m) => m.trim()) + .filter((m) => m); + + this.converter.addChannel({ + importIds: [id], + u: { + _id: creator, + }, + name, + users: members, + t: isPrivate ? 'p' : 'c', + }); + } + + super.updateRecord({ 'count.channels': channelsCount }); + return increaseProgressCount(); + } + + // Parse the users + if (entry.entryName.toLowerCase() === 'users.csv') { + super.updateProgress(ProgressStep.PREPARING_USERS); + const parsedUsers = this.csvParser(entry.getData().toString()); + usersCount = parsedUsers.length; + + for (const u of parsedUsers) { + const username = u[0].trim(); + availableUsernames.add(username); + + const email = u[1].trim(); + const name = u[2].trim(); + + this.converter.addUser({ + importIds: [username], + emails: [email], + username, + name, + }); + } + + Promise.await(Settings.incrementValueById('CSV_Importer_Count', usersCount)); + super.updateRecord({ 'count.users': usersCount }); + return increaseProgressCount(); + } + + // Parse the messages + if (entry.entryName.indexOf('/') > -1) { + if (this.progress.step !== ProgressStep.PREPARING_MESSAGES) { + super.updateProgress(ProgressStep.PREPARING_MESSAGES); + } + + const item = entry.entryName.split('/'); // random/messages.csv + const folderName = item[0]; // random + + let msgs = []; + + try { + msgs = this.csvParser(entry.getData().toString()); + } catch (e) { + this.logger.warn(`The file ${entry.entryName} contains invalid syntax`, e); + return increaseProgressCount(); + } + + let data; + const msgGroupData = item[1].split('.')[0]; // messages + let isDirect = false; + + if (folderName.toLowerCase() === 'directmessages') { + isDirect = true; + data = msgs.map((m) => ({ + username: m[0], + ts: m[2], + text: m[3], + otherUsername: m[1], + isDirect: true, + })); + } else { + data = msgs.map((m) => ({ username: m[0], ts: m[1], text: m[2] })); + } + + messagesCount += data.length; + const channelName = `${folderName}/${msgGroupData}`; + + super.updateRecord({ messagesstatus: channelName }); + + if (isDirect) { + for (const msg of data) { + const sourceId = [msg.username, msg.otherUsername].sort().join('/'); + + if (!dmRooms.has(sourceId)) { + this.converter.addChannel({ + importIds: [sourceId], + users: [msg.username, msg.otherUsername], + t: 'd', + }); + + dmRooms.set(sourceId, true); + } + + const newMessage = { + rid: sourceId, + u: { + _id: msg.username, + }, + ts: new Date(parseInt(msg.ts)), + msg: msg.text, + }; + + usedUsernames.add(msg.username); + usedUsernames.add(msg.otherUsername); + this.converter.addMessage(newMessage); + } + } else { + const rid = getRoomId(folderName); + + for (const msg of data) { + const newMessage = { + rid, + u: { + _id: msg.username, + }, + ts: new Date(parseInt(msg.ts)), + msg: msg.text, + }; + + usedUsernames.add(msg.username); + this.converter.addMessage(newMessage); + } + } + + super.updateRecord({ 'count.messages': messagesCount, 'messagesstatus': null }); + return increaseProgressCount(); + } + + increaseProgressCount(); + }); + + // Check if any of the message usernames was not in the imported list of users + for (const username of usedUsernames) { + if (availableUsernames.has(username)) { + continue; + } + + // Check if an user with that username already exists + const user = Users.findOneByUsername(username); + if (user && !user.importIds?.includes(username)) { + // Add the username to the local user's importIds so it can be found by the import process + // This way we can support importing new messages for existing users + Users.addImportIds(user._id, username); + } + } + + super.addCountToTotal(messagesCount + usersCount + channelsCount); + ImporterWebsocket.progressUpdated({ rate: 100 }); + + // Ensure we have at least a single user, channel, or message + if (usersCount === 0 && channelsCount === 0 && messagesCount === 0) { + this.logger.error('No users, channels, or messages found in the import file.'); + super.updateProgress(ProgressStep.ERROR); + return super.getProgress(); + } + } +} diff --git a/app/importer-csv/server/index.js b/apps/meteor/app/importer-csv/server/index.js similarity index 100% rename from app/importer-csv/server/index.js rename to apps/meteor/app/importer-csv/server/index.js diff --git a/app/importer-hipchat-enterprise/client/adder.js b/apps/meteor/app/importer-hipchat-enterprise/client/adder.js similarity index 100% rename from app/importer-hipchat-enterprise/client/adder.js rename to apps/meteor/app/importer-hipchat-enterprise/client/adder.js diff --git a/app/importer-hipchat-enterprise/client/index.js b/apps/meteor/app/importer-hipchat-enterprise/client/index.js similarity index 100% rename from app/importer-hipchat-enterprise/client/index.js rename to apps/meteor/app/importer-hipchat-enterprise/client/index.js diff --git a/app/importer-hipchat-enterprise/lib/info.js b/apps/meteor/app/importer-hipchat-enterprise/lib/info.js similarity index 100% rename from app/importer-hipchat-enterprise/lib/info.js rename to apps/meteor/app/importer-hipchat-enterprise/lib/info.js diff --git a/apps/meteor/app/importer-hipchat-enterprise/server/importer.js b/apps/meteor/app/importer-hipchat-enterprise/server/importer.js new file mode 100644 index 000000000000..86a59e058a69 --- /dev/null +++ b/apps/meteor/app/importer-hipchat-enterprise/server/importer.js @@ -0,0 +1,354 @@ +import { Readable } from 'stream'; +import path from 'path'; +import fs from 'fs'; + +import { Meteor } from 'meteor/meteor'; +import { Settings } from '@rocket.chat/models'; + +import { Base, ProgressStep } from '../../importer/server'; + +export class HipChatEnterpriseImporter extends Base { + constructor(info, importRecord) { + super(info, importRecord); + + this.Readable = Readable; + this.zlib = require('zlib'); + this.tarStream = require('tar-stream'); + this.extract = this.tarStream.extract(); + this.path = path; + } + + parseData(data) { + const dataString = data.toString(); + try { + this.logger.debug('parsing file contents'); + return JSON.parse(dataString); + } catch (e) { + this.logger.error(e); + return false; + } + } + + async prepareUsersFile(file) { + super.updateProgress(ProgressStep.PREPARING_USERS); + let count = 0; + + for (const u of file) { + const newUser = { + emails: [], + importIds: [String(u.User.id)], + username: u.User.mention_name, + name: u.User.name, + avatarUrl: u.User.avatar && `data:image/png;base64,${u.User.avatar.replace(/\n/g, '')}`, + bio: u.User.title || undefined, + deleted: u.User.is_deleted, + type: 'user', + }; + count++; + + if (u.User.email) { + newUser.emails.push(u.User.email); + } + + this.converter.addUser(newUser); + } + + await Settings.incrementValueById('Hipchat_Enterprise_Importer_Count', count); + super.updateRecord({ 'count.users': count }); + super.addCountToTotal(count); + } + + async prepareRoomsFile(file) { + super.updateProgress(ProgressStep.PREPARING_CHANNELS); + let count = 0; + + for (const r of file) { + this.converter.addChannel({ + u: { + _id: r.Room.owner, + }, + importIds: [String(r.Room.id)], + name: r.Room.name, + users: r.Room.members, + t: r.Room.privacy === 'private' ? 'p' : 'c', + topic: r.Room.topic, + ts: new Date(r.Room.created), + archived: r.Room.is_archived, + }); + + count++; + } + + super.updateRecord({ 'count.channels': count }); + super.addCountToTotal(count); + } + + async prepareUserMessagesFile(file) { + this.logger.debug(`preparing room with ${file.length} messages `); + let count = 0; + const dmRooms = []; + + for (const m of file) { + if (!m.PrivateUserMessage) { + continue; + } + + // If the message id is already on the list, skip it + if (this.preparedMessages[m.PrivateUserMessage.id] !== undefined) { + continue; + } + this.preparedMessages[m.PrivateUserMessage.id] = true; + + const senderId = String(m.PrivateUserMessage.sender.id); + const receiverId = String(m.PrivateUserMessage.receiver.id); + const users = [senderId, receiverId].sort(); + + if (!dmRooms[receiverId]) { + dmRooms[receiverId] = this.converter.findDMForImportedUsers(senderId, receiverId); + + if (!dmRooms[receiverId]) { + const room = { + importIds: [users.join('')], + users, + t: 'd', + ts: new Date(m.PrivateUserMessage.timestamp.split(' ')[0]), + }; + this.converter.addChannel(room); + dmRooms[receiverId] = room; + } + } + + const rid = dmRooms[receiverId].importIds[0]; + const newMessage = this.convertImportedMessage(m.PrivateUserMessage, rid, 'private'); + count++; + this.converter.addMessage(newMessage); + } + + return count; + } + + get turndownService() { + const TurndownService = Promise.await(import('turndown')).default; + + const turndownService = new TurndownService({ + strongDelimiter: '*', + hr: '', + br: '\n', + }); + + turndownService.addRule('strikethrough', { + filter: 'img', + + replacement(content, node) { + const src = node.getAttribute('src') || ''; + const alt = node.alt || node.title || src; + return src ? `[${alt}](${src})` : ''; + }, + }); + + this.turndownService = turndownService; + + return turndownService; + } + + convertImportedMessage(importedMessage, rid, type) { + const idType = type === 'private' ? type : `${rid}-${type}`; + const newId = `hipchatenterprise-${idType}-${importedMessage.id}`; + + const newMessage = { + _id: newId, + rid, + ts: new Date(importedMessage.timestamp.split(' ')[0]), + u: { + _id: String(importedMessage.sender.id), + }, + }; + + const text = importedMessage.message; + + if (importedMessage.message_format === 'html') { + newMessage.msg = this.turndownService.turndown(text); + } else if (text.startsWith('/me ')) { + newMessage.msg = `${text.replace(/\/me /, '_')}_`; + } else { + newMessage.msg = text; + } + + if (importedMessage.attachment?.url) { + const fileId = `${importedMessage.id}-${importedMessage.attachment.name || 'attachment'}`; + + newMessage._importFile = { + downloadUrl: importedMessage.attachment.url, + id: `${fileId}`, + size: importedMessage.attachment.size || 0, + name: importedMessage.attachment.name, + external: false, + source: 'hipchat-enterprise', + original: { + ...importedMessage.attachment, + }, + }; + } + + return newMessage; + } + + async prepareRoomMessagesFile(file, rid) { + this.logger.debug(`preparing room with ${file.length} messages `); + let count = 0; + + for (const m of file) { + if (m.UserMessage) { + const newMessage = this.convertImportedMessage(m.UserMessage, rid, 'user'); + this.converter.addMessage(newMessage); + count++; + } else if (m.NotificationMessage) { + const newMessage = this.convertImportedMessage(m.NotificationMessage, rid, 'notif'); + newMessage.u._id = 'rocket.cat'; + newMessage.alias = m.NotificationMessage.sender; + + this.converter.addMessage(newMessage); + count++; + } else if (m.TopicRoomMessage) { + const newMessage = this.convertImportedMessage(m.TopicRoomMessage, rid, 'topic'); + newMessage.t = 'room_changed_topic'; + + this.converter.addMessage(newMessage); + count++; + } else if (m.ArchiveRoomMessage) { + this.logger.warn('Archived Room Notification was ignored.'); + } else if (m.GuestAccessMessage) { + this.logger.warn('Guess Access Notification was ignored.'); + } else { + this.logger.error("HipChat Enterprise importer isn't configured to handle this message:", m); + } + } + + return count; + } + + async prepareMessagesFile(file, info) { + super.updateProgress(ProgressStep.PREPARING_MESSAGES); + + const [type, id] = info.dir.split('/'); + const roomIdentifier = `${type}/${id}`; + + super.updateRecord({ messagesstatus: roomIdentifier }); + + switch (type) { + case 'users': + return this.prepareUserMessagesFile(file); + case 'rooms': + return this.prepareRoomMessagesFile(file, id); + default: + this.logger.error(`HipChat Enterprise importer isn't configured to handle "${type}" files (${info.dir}).`); + return 0; + } + } + + async prepareFile(info, data, fileName) { + const file = this.parseData(data); + if (file === false) { + this.logger.error('failed to parse data'); + return false; + } + + switch (info.base) { + case 'users.json': + await this.prepareUsersFile(file); + break; + case 'rooms.json': + await this.prepareRoomsFile(file); + break; + case 'history.json': + return this.prepareMessagesFile(file, info); + case 'emoticons.json': + case 'metadata.json': + break; + default: + this.logger.error(`HipChat Enterprise importer doesn't know what to do with the file "${fileName}"`); + break; + } + + return 0; + } + + prepareUsingLocalFile(fullFilePath) { + this.logger.debug('start preparing import operation'); + this.converter.clearImportData(); + + // HipChat duplicates direct messages (one for each user) + // This object will keep track of messages that have already been prepared so it doesn't try to do it twice + this.preparedMessages = {}; + let messageCount = 0; + + const promise = new Promise((resolve, reject) => { + this.extract.on( + 'entry', + Meteor.bindEnvironment((header, stream, next) => { + this.logger.debug(`new entry from import file: ${header.name}`); + if (!header.name.endsWith('.json')) { + stream.resume(); + return next(); + } + + const info = this.path.parse(header.name); + let pos = 0; + let data = Buffer.allocUnsafe(header.size); + + stream.on( + 'data', + Meteor.bindEnvironment((chunk) => { + data.fill(chunk, pos, pos + chunk.length); + pos += chunk.length; + }), + ); + + stream.on( + 'end', + Meteor.bindEnvironment(async () => { + this.logger.info(`Processing the file: ${header.name}`); + const newMessageCount = await this.prepareFile(info, data, header.name); + + messageCount += newMessageCount; + super.updateRecord({ 'count.messages': messageCount }); + super.addCountToTotal(newMessageCount); + + data = undefined; + + this.logger.debug('next import entry'); + next(); + }), + ); + + stream.on('error', () => next()); + stream.resume(); + }), + ); + + this.extract.on('error', (err) => { + this.logger.error('extract error:', err); + reject(new Meteor.Error('error-import-file-extract-error')); + }); + + this.extract.on( + 'finish', + Meteor.bindEnvironment(() => { + resolve(); + }), + ); + + const rs = fs.createReadStream(fullFilePath); + const gunzip = this.zlib.createGunzip(); + + gunzip.on('error', (err) => { + this.logger.error('extract error:', err); + reject(new Meteor.Error('error-import-file-extract-error')); + }); + this.logger.debug('start extracting import file'); + rs.pipe(gunzip).pipe(this.extract); + }); + + return promise; + } +} diff --git a/app/importer-hipchat-enterprise/server/index.js b/apps/meteor/app/importer-hipchat-enterprise/server/index.js similarity index 100% rename from app/importer-hipchat-enterprise/server/index.js rename to apps/meteor/app/importer-hipchat-enterprise/server/index.js diff --git a/apps/meteor/app/importer-pending-avatars/server/importer.js b/apps/meteor/app/importer-pending-avatars/server/importer.js new file mode 100644 index 000000000000..39fb6fd8b6ae --- /dev/null +++ b/apps/meteor/app/importer-pending-avatars/server/importer.js @@ -0,0 +1,74 @@ +import { Meteor } from 'meteor/meteor'; + +import { Base, ProgressStep, Selection } from '../../importer/server'; +import { Users } from '../../models/server'; + +export class PendingAvatarImporter extends Base { + prepareFileCount() { + this.logger.debug('start preparing import operation'); + super.updateProgress(ProgressStep.PREPARING_STARTED); + + const users = Users.findAllUsersWithPendingAvatar(); + const fileCount = users.count(); + + if (fileCount === 0) { + super.updateProgress(ProgressStep.DONE); + return 0; + } + + this.updateRecord({ 'count.messages': fileCount, 'messagesstatus': null }); + this.addCountToTotal(fileCount); + + const fileData = new Selection(this.name, [], [], fileCount); + this.updateRecord({ fileData }); + + super.updateProgress(ProgressStep.IMPORTING_FILES); + Meteor.defer(() => { + this.startImport(fileData); + }); + + return fileCount; + } + + startImport() { + const pendingFileUserList = Users.findAllUsersWithPendingAvatar(); + try { + pendingFileUserList.forEach((user) => { + try { + const { _pendingAvatarUrl: url, name, _id } = user; + + try { + if (!url || !url.startsWith('http')) { + return; + } + + Meteor.runAsUser(_id, () => { + try { + Meteor.call('setAvatarFromService', url, undefined, 'url'); + Users.update({ _id }, { $unset: { _pendingAvatarUrl: '' } }); + } catch (error) { + this.logger.warn(`Failed to set ${name}'s avatar from url ${url}`); + } + }); + } finally { + this.addCountCompleted(1); + } + } catch (error) { + this.logger.error(error); + } + }); + } catch (error) { + // If the cursor expired, restart the method + if (error && error.codeName === 'CursorNotFound') { + this.logger.info('CursorNotFound'); + return this.startImport(); + } + + super.updateProgress(ProgressStep.ERROR); + throw error; + } + + super.updateProgress(ProgressStep.DONE); + return this.getProgress(); + } +} diff --git a/app/importer-pending-avatars/server/index.js b/apps/meteor/app/importer-pending-avatars/server/index.js similarity index 100% rename from app/importer-pending-avatars/server/index.js rename to apps/meteor/app/importer-pending-avatars/server/index.js diff --git a/app/importer-pending-avatars/server/info.js b/apps/meteor/app/importer-pending-avatars/server/info.js similarity index 100% rename from app/importer-pending-avatars/server/info.js rename to apps/meteor/app/importer-pending-avatars/server/info.js diff --git a/apps/meteor/app/importer-pending-files/server/importer.js b/apps/meteor/app/importer-pending-files/server/importer.js new file mode 100644 index 000000000000..dd29caf8dc10 --- /dev/null +++ b/apps/meteor/app/importer-pending-files/server/importer.js @@ -0,0 +1,210 @@ +import https from 'https'; +import http from 'http'; + +import { Meteor } from 'meteor/meteor'; +import { Random } from 'meteor/random'; + +import { Base, ProgressStep, Selection } from '../../importer/server'; +import { Messages } from '../../models/server'; +import { FileUpload } from '../../file-upload'; + +export class PendingFileImporter extends Base { + constructor(info, importRecord) { + super(info, importRecord); + this.userTags = []; + this.bots = {}; + } + + prepareFileCount() { + this.logger.debug('start preparing import operation'); + super.updateProgress(ProgressStep.PREPARING_STARTED); + + const messages = Messages.findAllImportedMessagesWithFilesToDownload(); + const fileCount = messages.count(); + + if (fileCount === 0) { + super.updateProgress(ProgressStep.DONE); + return 0; + } + + this.updateRecord({ 'count.messages': fileCount, 'messagesstatus': null }); + this.addCountToTotal(fileCount); + + const fileData = new Selection(this.name, [], [], fileCount); + this.updateRecord({ fileData }); + + super.updateProgress(ProgressStep.IMPORTING_FILES); + Meteor.defer(() => { + this.startImport(fileData); + }); + + return fileCount; + } + + startImport() { + const pendingFileMessageList = Messages.findAllImportedMessagesWithFilesToDownload(); + const downloadedFileIds = []; + const maxFileCount = 10; + const maxFileSize = 1024 * 1024 * 500; + + let count = 0; + let currentSize = 0; + let nextSize = 0; + + const waitForFiles = () => { + if (count + 1 < maxFileCount && currentSize + nextSize < maxFileSize) { + return; + } + + Meteor.wrapAsync((callback) => { + const handler = setInterval(() => { + if (count + 1 >= maxFileCount) { + return; + } + + if (currentSize + nextSize >= maxFileSize && count > 0) { + return; + } + + clearInterval(handler); + callback(); + }, 1000); + })(); + }; + + const completeFile = (details) => { + this.addCountCompleted(1); + count--; + currentSize -= details.size; + }; + + const logError = (error) => { + this.logger.error(error); + }; + + try { + pendingFileMessageList.forEach((message) => { + try { + const { _importFile } = message; + + if (!_importFile || _importFile.downloaded || downloadedFileIds.includes(_importFile.id)) { + this.addCountCompleted(1); + return; + } + + const url = _importFile.downloadUrl; + if (!url || !url.startsWith('http')) { + this.addCountCompleted(1); + return; + } + + const details = { + message_id: `${message._id}-file-${_importFile.id}`, + name: _importFile.name || Random.id(), + size: _importFile.size || 0, + userId: message.u._id, + rid: message.rid, + }; + + const requestModule = /https/i.test(url) ? https : http; + const fileStore = FileUpload.getStore('Uploads'); + const reportProgress = this.reportProgress.bind(this); + + nextSize = details.size; + waitForFiles(); + count++; + currentSize += nextSize; + downloadedFileIds.push(_importFile.id); + + requestModule.get( + url, + Meteor.bindEnvironment(function (res) { + const contentType = res.headers['content-type']; + if (!details.type && contentType) { + details.type = contentType; + } + + const rawData = []; + res.on( + 'data', + Meteor.bindEnvironment((chunk) => { + rawData.push(chunk); + + // Update progress more often on large files + reportProgress(); + }), + ); + res.on( + 'error', + Meteor.bindEnvironment((error) => { + completeFile(details); + logError(error); + }), + ); + + res.on( + 'end', + Meteor.bindEnvironment(() => { + try { + // Bypass the fileStore filters + fileStore._doInsert(details, Buffer.concat(rawData), function (error, file) { + if (error) { + completeFile(details); + logError(error); + return; + } + + const url = FileUpload.getPath(`${file._id}/${encodeURI(file.name)}`); + const attachment = { + title: file.name, + title_link: url, + }; + + if (/^image\/.+/.test(file.type)) { + attachment.image_url = url; + attachment.image_type = file.type; + attachment.image_size = file.size; + attachment.image_dimensions = file.identify != null ? file.identify.size : undefined; + } + + if (/^audio\/.+/.test(file.type)) { + attachment.audio_url = url; + attachment.audio_type = file.type; + attachment.audio_size = file.size; + } + + if (/^video\/.+/.test(file.type)) { + attachment.video_url = url; + attachment.video_type = file.type; + attachment.video_size = file.size; + } + + Messages.setImportFileRocketChatAttachment(_importFile.id, url, attachment); + completeFile(details); + }); + } catch (error) { + completeFile(details); + logError(error); + } + }), + ); + }), + ); + } catch (error) { + this.logger.error(error); + } + }); + } catch (error) { + // If the cursor expired, restart the method + if (error && error.codeName === 'CursorNotFound') { + return this.startImport(); + } + + super.updateProgress(ProgressStep.ERROR); + throw error; + } + + super.updateProgress(ProgressStep.DONE); + return this.getProgress(); + } +} diff --git a/app/importer-pending-files/server/index.js b/apps/meteor/app/importer-pending-files/server/index.js similarity index 100% rename from app/importer-pending-files/server/index.js rename to apps/meteor/app/importer-pending-files/server/index.js diff --git a/app/importer-pending-files/server/info.js b/apps/meteor/app/importer-pending-files/server/info.js similarity index 100% rename from app/importer-pending-files/server/info.js rename to apps/meteor/app/importer-pending-files/server/info.js diff --git a/app/importer-slack-users/client/adder.js b/apps/meteor/app/importer-slack-users/client/adder.js similarity index 100% rename from app/importer-slack-users/client/adder.js rename to apps/meteor/app/importer-slack-users/client/adder.js diff --git a/app/importer-slack-users/client/index.js b/apps/meteor/app/importer-slack-users/client/index.js similarity index 100% rename from app/importer-slack-users/client/index.js rename to apps/meteor/app/importer-slack-users/client/index.js diff --git a/app/importer-slack-users/lib/info.js b/apps/meteor/app/importer-slack-users/lib/info.js similarity index 100% rename from app/importer-slack-users/lib/info.js rename to apps/meteor/app/importer-slack-users/lib/info.js diff --git a/apps/meteor/app/importer-slack-users/server/importer.js b/apps/meteor/app/importer-slack-users/server/importer.js new file mode 100644 index 000000000000..8ec8ce6afc5c --- /dev/null +++ b/apps/meteor/app/importer-slack-users/server/importer.js @@ -0,0 +1,76 @@ +import { Settings } from '@rocket.chat/models'; + +import { Base, ProgressStep } from '../../importer/server'; +import { RocketChatFile } from '../../file'; + +export class SlackUsersImporter extends Base { + constructor(info, importRecord) { + super(info, importRecord); + + const { parse } = require('csv-parse/lib/sync'); + + this.csvParser = parse; + } + + prepare(dataURI, sentContentType, fileName) { + this.logger.debug('start preparing import operation'); + this.converter.clearImportData(); + super.prepare(dataURI, sentContentType, fileName, true); + + super.updateProgress(ProgressStep.PREPARING_USERS); + const uriResult = RocketChatFile.dataURIParse(dataURI); + const buf = Buffer.from(uriResult.image, 'base64'); + const parsed = this.csvParser(buf.toString()); + + let userCount = 0; + parsed.forEach((user, index) => { + // Ignore the first column + if (index === 0) { + return; + } + + const username = user[0]; + const email = user[1]; + if (!email) { + return; + } + + const name = user[7] || user[8] || username; + + const newUser = { + emails: [email], + importIds: [email], + username, + name, + type: 'user', + }; + + switch (user[2]) { + case 'Admin': + newUser.roles = ['admin']; + break; + case 'Bot': + newUser.roles = ['bot']; + newUser.type = 'bot'; + break; + case 'Deactivated': + newUser.deleted = true; + break; + } + + this.converter.addUser(newUser); + userCount++; + }); + + if (userCount === 0) { + this.logger.error('No users found in the import file.'); + super.updateProgress(ProgressStep.ERROR); + return super.getProgress(); + } + + super.updateProgress(ProgressStep.USER_SELECTION); + super.addCountToTotal(userCount); + Settings.incrementValueById('Slack_Users_Importer_Count', userCount); + return super.updateRecord({ 'count.users': userCount }); + } +} diff --git a/app/importer-slack-users/server/index.js b/apps/meteor/app/importer-slack-users/server/index.js similarity index 100% rename from app/importer-slack-users/server/index.js rename to apps/meteor/app/importer-slack-users/server/index.js diff --git a/app/importer-slack/client/adder.js b/apps/meteor/app/importer-slack/client/adder.js similarity index 100% rename from app/importer-slack/client/adder.js rename to apps/meteor/app/importer-slack/client/adder.js diff --git a/app/importer-slack/client/index.js b/apps/meteor/app/importer-slack/client/index.js similarity index 100% rename from app/importer-slack/client/index.js rename to apps/meteor/app/importer-slack/client/index.js diff --git a/app/importer-slack/lib/info.js b/apps/meteor/app/importer-slack/lib/info.js similarity index 100% rename from app/importer-slack/lib/info.js rename to apps/meteor/app/importer-slack/lib/info.js diff --git a/apps/meteor/app/importer-slack/server/importer.js b/apps/meteor/app/importer-slack/server/importer.js new file mode 100644 index 000000000000..9b00f18123ee --- /dev/null +++ b/apps/meteor/app/importer-slack/server/importer.js @@ -0,0 +1,595 @@ +import _ from 'underscore'; +import { Settings } from '@rocket.chat/models'; + +import { Base, ProgressStep, ImporterWebsocket } from '../../importer/server'; +import { Messages, ImportData } from '../../models/server'; +import { settings } from '../../settings/server'; +import { MentionsParser } from '../../mentions/lib/MentionsParser'; +import { getUserAvatarURL } from '../../utils/lib/getUserAvatarURL'; + +export class SlackImporter extends Base { + parseData(data) { + const dataString = data.toString(); + try { + this.logger.debug('parsing file contents'); + return JSON.parse(dataString); + } catch (e) { + this.logger.error(e); + return false; + } + } + + prepareChannelsFile(entry) { + super.updateProgress(ProgressStep.PREPARING_CHANNELS); + const data = JSON.parse(entry.getData().toString()).filter((channel) => channel.creator != null); + + this.logger.debug(`loaded ${data.length} channels.`); + + this.addCountToTotal(data.length); + + for (const channel of data) { + this.converter.addChannel({ + _id: channel.is_general ? 'general' : undefined, + u: { + _id: this._replaceSlackUserId(channel.creator), + }, + importIds: [channel.id], + name: channel.name, + users: this._replaceSlackUserIds(channel.members), + t: 'c', + topic: channel.topic?.value || undefined, + description: channel.purpose?.value || undefined, + ts: channel.created ? new Date(channel.created * 1000) : undefined, + archived: channel.is_archived, + }); + } + + return data.length; + } + + prepareGroupsFile(entry) { + super.updateProgress(ProgressStep.PREPARING_CHANNELS); + const data = JSON.parse(entry.getData().toString()).filter((channel) => channel.creator != null); + + this.logger.debug(`loaded ${data.length} groups.`); + + this.addCountToTotal(data.length); + + for (const channel of data) { + this.converter.addChannel({ + u: { + _id: this._replaceSlackUserId(channel.creator), + }, + importIds: [channel.id], + name: channel.name, + users: this._replaceSlackUserIds(channel.members), + t: 'p', + topic: channel.topic?.value || undefined, + description: channel.purpose?.value || undefined, + ts: channel.created ? new Date(channel.created * 1000) : undefined, + archived: channel.is_archived, + }); + } + + return data.length; + } + + prepareMpimpsFile(entry) { + super.updateProgress(ProgressStep.PREPARING_CHANNELS); + const data = JSON.parse(entry.getData().toString()).filter((channel) => channel.creator != null); + + this.logger.debug(`loaded ${data.length} mpims.`); + + this.addCountToTotal(data.length); + + const maxUsers = settings.get('DirectMesssage_maxUsers') || 1; + + for (const channel of data) { + this.converter.addChannel({ + u: { + _id: this._replaceSlackUserId(channel.creator), + }, + importIds: [channel.id], + name: channel.name, + users: this._replaceSlackUserIds(channel.members), + t: channel.members.length > maxUsers ? 'p' : 'd', + topic: channel.topic?.value || undefined, + description: channel.purpose?.value || undefined, + ts: channel.created ? new Date(channel.created * 1000) : undefined, + archived: channel.is_archived, + }); + } + + return data.length; + } + + prepareDMsFile(entry) { + super.updateProgress(ProgressStep.PREPARING_CHANNELS); + const data = JSON.parse(entry.getData().toString()); + + this.logger.debug(`loaded ${data.length} dms.`); + + this.addCountToTotal(data.length); + for (const channel of data) { + this.converter.addChannel({ + importIds: [channel.id], + users: this._replaceSlackUserIds(channel.members), + t: 'd', + ts: channel.created ? new Date(channel.created * 1000) : undefined, + }); + } + + return data.length; + } + + prepareUsersFile(entry) { + super.updateProgress(ProgressStep.PREPARING_USERS); + const data = JSON.parse(entry.getData().toString()); + + this.logger.debug(`loaded ${data.length} users.`); + + // Insert the users record + this.updateRecord({ 'count.users': data.length }); + this.addCountToTotal(data.length); + + for (const user of data) { + const newUser = { + emails: [], + importIds: [user.id], + username: user.name, + name: user.profile.real_name, + utcOffset: user.tz_offset && user.tz_offset / 3600, + avatarUrl: user.profile.image_original || user.profile.image_512, + deleted: user.deleted, + statusText: user.profile.status_text || undefined, + bio: user.profile.title || undefined, + type: 'user', + }; + + if (user.profile.email) { + newUser.emails.push(user.profile.email); + } + + if (user.is_bot) { + newUser.roles = ['bot']; + newUser.type = 'bot'; + } + + this.converter.addUser(newUser); + Promise.await(Settings.incrementValueById('Slack_Importer_Count')); + } + } + + prepareUsingLocalFile(fullFilePath) { + this.logger.debug('start preparing import operation'); + this.converter.clearImportData(); + + const zip = new this.AdmZip(fullFilePath); + const totalEntries = zip.getEntryCount(); + + let messagesCount = 0; + let channelCount = 0; + let count = 0; + + ImporterWebsocket.progressUpdated({ rate: 0 }); + let oldRate = 0; + + const increaseProgress = () => { + try { + count++; + const rate = Math.floor((count * 1000) / totalEntries) / 10; + if (rate > oldRate) { + ImporterWebsocket.progressUpdated({ rate }); + oldRate = rate; + } + } catch (e) { + this.logger.error(e); + } + }; + + try { + // we need to iterate the zip file twice so that all channels are loaded before the messages + + zip.forEach((entry) => { + try { + if (entry.entryName === 'channels.json') { + channelCount += this.prepareChannelsFile(entry); + this.updateRecord({ 'count.channels': channelCount }); + return increaseProgress(); + } + + if (entry.entryName === 'groups.json') { + channelCount += this.prepareGroupsFile(entry); + this.updateRecord({ 'count.channels': channelCount }); + return increaseProgress(); + } + + if (entry.entryName === 'mpims.json') { + channelCount += this.prepareMpimpsFile(entry); + this.updateRecord({ 'count.channels': channelCount }); + return increaseProgress(); + } + + if (entry.entryName === 'dms.json') { + channelCount += this.prepareDMsFile(entry); + this.updateRecord({ 'count.channels': channelCount }); + return increaseProgress(); + } + + if (entry.entryName === 'users.json') { + this.prepareUsersFile(entry); + return increaseProgress(); + } + } catch (e) { + this.logger.error(e); + } + }); + + const missedTypes = {}; + // If we have no slack message yet, then we can insert them instead of upserting + this._useUpsert = !Messages.findOne({ _id: /slack\-.*/ }); + + zip.forEach((entry) => { + try { + if (entry.entryName.includes('__MACOSX') || entry.entryName.includes('.DS_Store')) { + count++; + return this.logger.debug(`Ignoring the file: ${entry.entryName}`); + } + + if (['channels.json', 'groups.json', 'mpims.json', 'dms.json', 'users.json'].includes(entry.entryName)) { + return; + } + + if (!entry.isDirectory && entry.entryName.includes('/')) { + const item = entry.entryName.split('/'); + + const channel = item[0]; + const date = item[1].split('.')[0]; + + try { + // Insert the messages records + if (this.progress.step !== ProgressStep.PREPARING_MESSAGES) { + super.updateProgress(ProgressStep.PREPARING_MESSAGES); + } + + const tempMessages = JSON.parse(entry.getData().toString()); + messagesCount += tempMessages.length; + this.updateRecord({ messagesstatus: `${channel}/${date}` }); + this.addCountToTotal(tempMessages.length); + + const slackChannelId = ImportData.findChannelImportIdByNameOrImportId(channel); + + if (slackChannelId) { + for (const message of tempMessages) { + this.prepareMessageObject(message, missedTypes, slackChannelId); + } + } + } catch (error) { + this.logger.warn(`${entry.entryName} is not a valid JSON file! Unable to import it.`); + } + } + } catch (e) { + this.logger.error(e); + } + + increaseProgress(); + }); + + if (!_.isEmpty(missedTypes)) { + this.logger.info('Missed import types:', missedTypes); + } + } catch (e) { + this.logger.error(e); + throw e; + } + + ImporterWebsocket.progressUpdated({ rate: 100 }); + this.updateRecord({ 'count.messages': messagesCount, 'messagesstatus': null }); + } + + parseMentions(newMessage) { + const mentionsParser = new MentionsParser({ + pattern: () => '[0-9a-zA-Z]+', + useRealName: () => settings.get('UI_Use_Real_Name'), + me: () => 'me', + }); + + const users = mentionsParser + .getUserMentions(newMessage.msg) + .filter((u) => u) + .map((uid) => this._replaceSlackUserId(uid.slice(1, uid.length))); + if (users.length) { + if (!newMessage.mentions) { + newMessage.mentions = []; + } + newMessage.mentions.push(...users); + } + + const channels = mentionsParser + .getChannelMentions(newMessage.msg) + .filter((c) => c) + .map((name) => name.slice(1, name.length)); + if (channels.length) { + if (!newMessage.channels) { + newMessage.channels = []; + } + newMessage.channels.push(...channels); + } + } + + processMessageSubType(message, slackChannelId, newMessage, missedTypes) { + const ignoreTypes = { bot_add: true, file_comment: true, file_mention: true }; + + switch (message.subtype) { + case 'channel_join': + case 'group_join': + newMessage.t = 'uj'; + newMessage.groupable = false; + return true; + case 'channel_leave': + case 'group_leave': + newMessage.t = 'ul'; + newMessage.groupable = false; + return true; + case 'channel_purpose': + case 'group_purpose': + newMessage.t = 'room_changed_description'; + newMessage.groupable = false; + newMessage.msg = message.purpose; + return true; + case 'channel_topic': + case 'group_topic': + newMessage.t = 'room_changed_topic'; + newMessage.groupable = false; + newMessage.msg = message.topic; + return true; + case 'channel_name': + case 'group_name': + newMessage.t = 'r'; + newMessage.msg = message.name; + newMessage.groupable = false; + return true; + case 'pinned_item': + if (message.attachments) { + if (!newMessage.attachments) { + newMessage.attachments = []; + } + newMessage.attachments.push({ + text: this.convertSlackMessageToRocketChat(message.attachments[0].text), + author_name: message.attachments[0].author_subname, + author_icon: getUserAvatarURL(message.attachments[0].author_subname), + }); + newMessage.t = 'message_pinned'; + } + break; + case 'file_share': + if (message.file?.url_private_download) { + const fileId = this.makeSlackMessageId(slackChannelId, message.ts, 'share'); + const fileMessage = { + _id: fileId, + rid: newMessage.rid, + ts: newMessage.ts, + msg: message.file.url_private_download || '', + _importFile: this.convertSlackFileToPendingFile(message.file), + u: { + _id: newMessage.u._id, + }, + }; + + if (message.thread_ts && message.thread_ts !== message.ts) { + fileMessage.tmid = this.makeSlackMessageId(slackChannelId, message.thread_ts); + } + + this.converter.addMessage(fileMessage, this._useUpsert); + } + break; + + default: + if (!missedTypes[message.subtype] && !ignoreTypes[message.subtype]) { + missedTypes[message.subtype] = message; + } + break; + } + } + + makeSlackMessageId(channelId, ts, fileIndex = undefined) { + const base = `slack-${channelId}-${ts.replace(/\./g, '-')}`; + + if (fileIndex) { + return `${base}-file${fileIndex}`; + } + + return base; + } + + prepareMessageObject(message, missedTypes, slackChannelId) { + const id = this.makeSlackMessageId(slackChannelId, message.ts); + const newMessage = { + _id: id, + rid: slackChannelId, + ts: new Date(parseInt(message.ts.split('.')[0]) * 1000), + u: { + _id: this._replaceSlackUserId(message.user), + }, + }; + + // Process the reactions + if (message.reactions && message.reactions.length > 0) { + newMessage.reactions = new Map(); + + message.reactions.forEach((reaction) => { + const name = `:${reaction.name}:`; + if (reaction.users && reaction.users.length) { + newMessage.reactions.set(name, { + name, + users: this._replaceSlackUserIds(reaction.users), + }); + } + }); + } + + if (message.type === 'message') { + if (message.files) { + let fileIndex = 0; + message.files.forEach((file) => { + fileIndex++; + + const fileId = this.makeSlackMessageId(slackChannelId, message.ts, fileIndex); + const fileMessage = { + _id: fileId, + rid: slackChannelId, + ts: newMessage.ts, + msg: file.url_private_download || '', + _importFile: this.convertSlackFileToPendingFile(file), + u: { + _id: this._replaceSlackUserId(message.user), + }, + }; + + if (message.thread_ts && message.thread_ts !== message.ts) { + fileMessage.tmid = this.makeSlackMessageId(slackChannelId, message.thread_ts); + } + + this.converter.addMessage(fileMessage, this._useUpsert); + }); + } + + const regularTypes = ['me_message', 'thread_broadcast']; + + const isBotMessage = message.subtype && ['bot_message', 'slackbot_response'].includes(message.subtype); + + if (message.subtype && !regularTypes.includes(message.subtype) && !isBotMessage) { + if (this.processMessageSubType(message, slackChannelId, newMessage, missedTypes)) { + this.converter.addMessage(newMessage, this._useUpsert); + } + } else { + const text = this.convertSlackMessageToRocketChat(message.text); + + if (isBotMessage) { + newMessage.bot = true; + } + + if (message.subtype === 'me_message') { + newMessage.msg = `_${text}_`; + } else { + newMessage.msg = text; + } + + if (message.thread_ts) { + if (message.thread_ts === message.ts) { + if (message.reply_users) { + const replies = new Set(); + message.reply_users.forEach((item) => { + replies.add(this._replaceSlackUserId(item)); + }); + + if (replies.length) { + newMessage.replies = Array.from(replies); + } + } else if (message.replies) { + const replies = new Set(); + message.repĺies.forEach((item) => { + replies.add(this._replaceSlackUserId(item.user)); + }); + + if (replies.length) { + newMessage.replies = Array.from(replies); + } + } else { + this.logger.warn(`Failed to import the parent comment, message: ${newMessage._id}. Missing replies/reply_users field`); + } + + newMessage.tcount = message.reply_count; + newMessage.tlm = new Date(parseInt(message.latest_reply.split('.')[0]) * 1000); + } else { + newMessage.tmid = this.makeSlackMessageId(slackChannelId, message.thread_ts); + } + } + + if (message.edited) { + newMessage.editedAt = new Date(parseInt(message.edited.ts.split('.')[0]) * 1000); + if (message.edited.user) { + newMessage.editedBy = this._replaceSlackUserId(message.edited.user); + } + } + + if (message.attachments) { + newMessage.attachments = this.convertMessageAttachments(message.attachments); + } + + if (message.icons && message.icons.emoji) { + newMessage.emoji = message.icons.emoji; + } + + this.parseMentions(newMessage); + this.converter.addMessage(newMessage, this._useUpsert); + } + } + } + + _replaceSlackUserId(userId) { + if (userId === 'USLACKBOT') { + return 'rocket.cat'; + } + + return userId; + } + + _replaceSlackUserIds(members) { + if (!members?.length) { + return []; + } + return members.map((userId) => this._replaceSlackUserId(userId)); + } + + convertSlackMessageToRocketChat(message) { + if (message) { + message = message.replace(//g, '@all'); + message = message.replace(//g, '@all'); + message = message.replace(//g, '@here'); + message = message.replace(/>/g, '>'); + message = message.replace(/</g, '<'); + message = message.replace(/&/g, '&'); + message = message.replace(/:simple_smile:/g, ':smile:'); + message = message.replace(/:memo:/g, ':pencil:'); + message = message.replace(/:piggy:/g, ':pig:'); + message = message.replace(/:uk:/g, ':gb:'); + message = message.replace(/<(http[s]?:[^>|]*)>/g, '$1'); + message = message.replace(/<(http[s]?:[^|]*)\|([^>]*)>/g, '[$2]($1)'); + message = message.replace(/<#([^|]*)\|([^>]*)>/g, '#$2'); + message = message.replace(/<@([^|]*)\|([^>]*)>/g, '@$1'); + message = message.replace(/<@([^|>]*)>/g, '@$1'); + } else { + message = ''; + } + + return message; + } + + convertSlackFileToPendingFile(file) { + return { + downloadUrl: file.url_private_download, + id: file.id, + size: file.size, + name: file.name, + external: file.is_external, + source: 'slack', + original: { + ...file, + }, + }; + } + + convertMessageAttachments(attachments) { + if (!attachments || !attachments.length) { + return attachments; + } + + return attachments.map((attachment) => ({ + ...attachment, + text: this.convertSlackMessageToRocketChat(attachment.text), + title: this.convertSlackMessageToRocketChat(attachment.title), + fallback: this.convertSlackMessageToRocketChat(attachment.fallback), + })); + } +} diff --git a/app/importer-slack/server/index.js b/apps/meteor/app/importer-slack/server/index.js similarity index 100% rename from app/importer-slack/server/index.js rename to apps/meteor/app/importer-slack/server/index.js diff --git a/app/importer/client/index.js b/apps/meteor/app/importer/client/index.js similarity index 100% rename from app/importer/client/index.js rename to apps/meteor/app/importer/client/index.js diff --git a/app/importer/lib/ImporterInfo.js b/apps/meteor/app/importer/lib/ImporterInfo.js similarity index 100% rename from app/importer/lib/ImporterInfo.js rename to apps/meteor/app/importer/lib/ImporterInfo.js diff --git a/app/importer/lib/ImporterProgressStep.js b/apps/meteor/app/importer/lib/ImporterProgressStep.js similarity index 100% rename from app/importer/lib/ImporterProgressStep.js rename to apps/meteor/app/importer/lib/ImporterProgressStep.js diff --git a/app/importer/lib/Importers.js b/apps/meteor/app/importer/lib/Importers.js similarity index 100% rename from app/importer/lib/Importers.js rename to apps/meteor/app/importer/lib/Importers.js diff --git a/app/importer/server/classes/ImportDataConverter.ts b/apps/meteor/app/importer/server/classes/ImportDataConverter.ts similarity index 84% rename from app/importer/server/classes/ImportDataConverter.ts rename to apps/meteor/app/importer/server/classes/ImportDataConverter.ts index c5f1c77d940b..74eec85b942d 100644 --- a/app/importer/server/classes/ImportDataConverter.ts +++ b/apps/meteor/app/importer/server/classes/ImportDataConverter.ts @@ -1,17 +1,24 @@ import { Meteor } from 'meteor/meteor'; import { Accounts } from 'meteor/accounts-base'; import _ from 'underscore'; - -import { ImportData as ImportDataRaw } from '../../../models/server/raw'; -import { IImportUser } from '../../../../definition/IImportUser'; -import { IImportMessage, IImportMessageReaction } from '../../../../definition/IImportMessage'; -import { IImportChannel } from '../../../../definition/IImportChannel'; -import { IConversionCallbacks } from '../definitions/IConversionCallbacks'; -import { IImportUserRecord, IImportChannelRecord, IImportMessageRecord } from '../../../../definition/IImportRecord'; +import { ObjectId } from 'mongodb'; +import type { + IImportUser, + IImportMessage, + IImportMessageReaction, + IImportChannel, + IImportUserRecord, + IImportChannelRecord, + IImportMessageRecord, + IUser, + IUserEmail, +} from '@rocket.chat/core-typings'; +import { ImportData as ImportDataRaw } from '@rocket.chat/models'; + +import type { IConversionCallbacks } from '../definitions/IConversionCallbacks'; import { Users, Rooms, Subscriptions, ImportData } from '../../../models/server'; import { generateUsernameSuggestion, insertMessage, saveUserIdentity, addUserToDefaultChannels } from '../../../lib/server'; import { setUserActiveStatus } from '../../../lib/server/functions/setUserActiveStatus'; -import { IUser, IUserEmail } from '../../../../definition/IUser'; import type { Logger } from '../../../../server/lib/logger/Logger'; type IRoom = Record; @@ -120,6 +127,7 @@ export class ImportDataConverter { protected addObject(type: string, data: Record, options: Record = {}): void { ImportData.model.rawCollection().insert({ + _id: new ObjectId().toHexString(), data, dataType: type, ...options, @@ -257,11 +265,11 @@ export class ImportDataConverter { } if (userData.name || userData.username) { - saveUserIdentity({ _id, name: userData.name, username: userData.username }); + saveUserIdentity({ _id, name: userData.name, username: userData.username } as Parameters[0]); } if (userData.importIds.length) { - this.addUserToCache(userData.importIds[0], existingUser._id, existingUser.username); + this.addUserToCache(userData.importIds[0], existingUser._id, existingUser.username || userData.username); } } @@ -275,7 +283,6 @@ export class ImportDataConverter { : Accounts.createUser({ username: userData.username, password, - // @ts-ignore joinDefaultChannelsSilenced: true, }); @@ -306,7 +313,7 @@ export class ImportDataConverter { } public convertUsers({ beforeImportFn, afterImportFn }: IConversionCallbacks = {}): void { - const users = Promise.await(this.getUsersToImport()); + const users = Promise.await(this.getUsersToImport()) as IImportUserRecord[]; users.forEach(({ data, _id }) => { try { if (beforeImportFn && !beforeImportFn(data, 'user')) { @@ -314,7 +321,7 @@ export class ImportDataConverter { return; } - data.emails = data.emails.filter((item) => item); + const emails = data.emails.filter(Boolean).map((email) => ({ address: email })); data.importIds = data.importIds.filter((item) => item); if (!data.emails.length && !data.username) { @@ -330,7 +337,7 @@ export class ImportDataConverter { if (!data.username) { data.username = generateUsernameSuggestion({ name: data.name, - emails: data.emails, + emails, }); } @@ -347,10 +354,11 @@ export class ImportDataConverter { } // Deleted users are 'inactive' users in Rocket.Chat + // TODO: Check data._id if exists/required or not if (data.deleted && existingUser?.active) { - setUserActiveStatus(data._id, false, true); + data._id && setUserActiveStatus(data._id, false, true); } else if (data.deleted === false && existingUser?.active === false) { - setUserActiveStatus(data._id, true); + data._id && setUserActiveStatus(data._id, true); } if (afterImportFn) { @@ -358,7 +366,7 @@ export class ImportDataConverter { } } catch (e) { this._logger.error(e); - this.saveError(_id, e); + this.saveError(_id, e instanceof Error ? e : new Error(String(e))); } }); } @@ -461,9 +469,12 @@ export class ImportDataConverter { const data = this.findImportedUser(importId); if (!data) { - throw new Error('importer-message-mentioned-user-not-found'); + this._logger.warn(`Mentioned user not found: ${importId}`); + continue; } + if (!data.username) { + this._logger.debug(importId); throw new Error('importer-message-mentioned-username-not-found'); } @@ -478,6 +489,31 @@ export class ImportDataConverter { return result; } + getMentionedChannelData(importId: string): IMentionedChannel | undefined { + // loading the name will also store the id on the cache if it's missing, so this won't run two queries + const name = this.findImportedRoomName(importId); + const _id = this.findImportedRoomId(importId); + + if (name && _id) { + return { + name, + _id, + }; + } + + // If the importId was not found, check if we have a room with that name + const room = Rooms.findOneByNonValidatedName(importId, { fields: { name: 1 } }); + if (room) { + this.addRoomToCache(importId, room._id); + this.addRoomNameToCache(importId, room.name); + + return { + name: room.name, + _id: room._id, + }; + } + } + convertMessageChannels(message: IImportMessage): Array | undefined { const { channels } = message; if (!channels) { @@ -486,9 +522,7 @@ export class ImportDataConverter { const result: Array = []; for (const importId of channels) { - // loading the name will also store the id on the cache if it's missing, so this won't run two queries - const name = this.findImportedRoomName(importId); - const _id = this.findImportedRoomId(importId); + const { name, _id } = this.getMentionedChannelData(importId) || {}; if (!_id || !name) { this._logger.warn(`Mentioned room not found: ${importId}`); @@ -513,24 +547,24 @@ export class ImportDataConverter { convertMessages({ beforeImportFn, afterImportFn }: IConversionCallbacks = {}): void { const rids: Array = []; const messages = Promise.await(this.getMessagesToImport()); - messages.forEach(({ data: m, _id }: IImportMessageRecord) => { + messages.forEach(({ data, _id }: IImportMessageRecord) => { try { - if (beforeImportFn && !beforeImportFn(m, 'message')) { + if (beforeImportFn && !beforeImportFn(data, 'message')) { this.skipRecord(_id); return; } - if (!m.ts || isNaN(m.ts as unknown as number)) { + if (!data.ts || isNaN(data.ts as unknown as number)) { throw new Error('importer-message-invalid-timestamp'); } - const creator = this.findImportedUser(m.u._id); + const creator = this.findImportedUser(data.u._id); if (!creator) { - this._logger.warn(`Imported user not found: ${m.u._id}`); + this._logger.warn(`Imported user not found: ${data.u._id}`); throw new Error('importer-message-unknown-user'); } - const rid = this.findImportedRoomId(m.rid); + const rid = this.findImportedRoomId(data.rid); if (!rid) { throw new Error('importer-message-unknown-room'); } @@ -539,8 +573,8 @@ export class ImportDataConverter { } // Convert the mentions and channels first because these conversions can also modify the msg in the message object - const mentions = m.mentions && this.convertMessageMentions(m); - const channels = m.channels && this.convertMessageChannels(m); + const mentions = data.mentions && this.convertMessageMentions(data); + const channels = data.channels && this.convertMessageChannels(data); const msgObj: IMessage = { rid, @@ -548,32 +582,32 @@ export class ImportDataConverter { _id: creator._id, username: creator.username, }, - msg: m.msg, - ts: m.ts, - t: m.t || undefined, - groupable: m.groupable, - tmid: m.tmid, - tlm: m.tlm, - tcount: m.tcount, - replies: m.replies && this.convertMessageReplies(m.replies), - editedAt: m.editedAt, - editedBy: m.editedBy && (this.findImportedUser(m.editedBy) || undefined), + msg: data.msg, + ts: data.ts, + t: data.t || undefined, + groupable: data.groupable, + tmid: data.tmid, + tlm: data.tlm, + tcount: data.tcount, + replies: data.replies && this.convertMessageReplies(data.replies), + editedAt: data.editedAt, + editedBy: data.editedBy && (this.findImportedUser(data.editedBy) || undefined), mentions, channels, - _importFile: m._importFile, - url: m.url, - attachments: m.attachments, - bot: m.bot, - emoji: m.emoji, - alias: m.alias, + _importFile: data._importFile, + url: data.url, + attachments: data.attachments, + bot: data.bot, + emoji: data.emoji, + alias: data.alias, }; - if (m._id) { - msgObj._id = m._id; + if (data._id) { + msgObj._id = data._id; } - if (m.reactions) { - msgObj.reactions = this.convertMessageReactions(m.reactions); + if (data.reactions) { + msgObj.reactions = this.convertMessageReactions(data.reactions); } try { @@ -584,10 +618,10 @@ export class ImportDataConverter { } if (afterImportFn) { - afterImportFn(m, 'message', true); + afterImportFn(data, 'message', true); } } catch (e) { - this.saveError(_id, e); + this.saveError(_id, e instanceof Error ? e : new Error(String(e))); } }); @@ -863,41 +897,41 @@ export class ImportDataConverter { convertChannels(startedByUserId: string, { beforeImportFn, afterImportFn }: IConversionCallbacks = {}): void { const channels = Promise.await(this.getChannelsToImport()); - channels.forEach(({ data: c, _id }: IImportChannelRecord) => { + channels.forEach(({ data, _id }: IImportChannelRecord) => { try { - if (beforeImportFn && !beforeImportFn(c, 'channel')) { + if (beforeImportFn && !beforeImportFn(data, 'channel')) { this.skipRecord(_id); return; } - if (!c.name && c.t !== 'd') { + if (!data.name && data.t !== 'd') { throw new Error('importer-channel-missing-name'); } - c.importIds = c.importIds.filter((item) => item); - c.users = _.uniq(c.users); + data.importIds = data.importIds.filter((item) => item); + data.users = _.uniq(data.users); - if (!c.importIds.length) { + if (!data.importIds.length) { throw new Error('importer-channel-missing-import-id'); } - const existingRoom = this.findExistingRoom(c); + const existingRoom = this.findExistingRoom(data); if (existingRoom) { - this.updateRoom(existingRoom, c, startedByUserId); + this.updateRoom(existingRoom, data, startedByUserId); } else { - this.insertRoom(c, startedByUserId); + this.insertRoom(data, startedByUserId); } - if (c.archived && c._id) { - this.archiveRoomById(c._id); + if (data.archived && data._id) { + this.archiveRoomById(data._id); } if (afterImportFn) { - afterImportFn(c, 'channel', !existingRoom); + afterImportFn(data, 'channel', !existingRoom); } } catch (e) { - this.saveError(_id, e); + this.saveError(_id, e instanceof Error ? e : new Error(String(e))); } }); } diff --git a/app/importer/server/classes/ImporterBase.js b/apps/meteor/app/importer/server/classes/ImporterBase.js similarity index 85% rename from app/importer/server/classes/ImporterBase.js rename to apps/meteor/app/importer/server/classes/ImporterBase.js index 2024338dde56..4dc6ba04f2a5 100644 --- a/app/importer/server/classes/ImporterBase.js +++ b/apps/meteor/app/importer/server/classes/ImporterBase.js @@ -2,6 +2,7 @@ import http from 'http'; import fs from 'fs'; import https from 'https'; +import { Settings } from '@rocket.chat/models'; import { Meteor } from 'meteor/meteor'; import AdmZip from 'adm-zip'; import getFileType from 'file-type'; @@ -11,10 +12,9 @@ import { ImporterWebsocket } from './ImporterWebsocket'; import { ProgressStep } from '../../lib/ImporterProgressStep'; import { ImporterInfo } from '../../lib/ImporterInfo'; import { RawImports } from '../models/RawImports'; -import { Settings, Imports } from '../../../models'; +import { Imports, ImportData } from '../../../models/server'; import { Logger } from '../../../logger'; import { ImportDataConverter } from './ImportDataConverter'; -import { ImportData } from '../../../models/server'; import { t } from '../../../utils/server'; import { Selection, SelectionChannel, SelectionUser } from '..'; @@ -251,33 +251,29 @@ export class Base { switch (step) { case ProgressStep.IMPORTING_STARTED: - this.oldSettings.Accounts_AllowedDomainsList = Settings.findOneById('Accounts_AllowedDomainsList').value; - Settings.updateValueById('Accounts_AllowedDomainsList', ''); + this.oldSettings.Accounts_AllowedDomainsList = Promise.await(Settings.findOneById('Accounts_AllowedDomainsList')).value; + Promise.await(Settings.updateValueById('Accounts_AllowedDomainsList', '')); - this.oldSettings.Accounts_AllowUsernameChange = Settings.findOneById('Accounts_AllowUsernameChange').value; - Settings.updateValueById('Accounts_AllowUsernameChange', true); + this.oldSettings.Accounts_AllowUsernameChange = Promise.await(Settings.findOneById('Accounts_AllowUsernameChange')).value; + Promise.await(Settings.updateValueById('Accounts_AllowUsernameChange', true)); - this.oldSettings.FileUpload_MaxFileSize = Settings.findOneById('FileUpload_MaxFileSize').value; - Settings.updateValueById('FileUpload_MaxFileSize', -1); + this.oldSettings.FileUpload_MaxFileSize = Promise.await(Settings.findOneById('FileUpload_MaxFileSize')).value; + Promise.await(Settings.updateValueById('FileUpload_MaxFileSize', -1)); - this.oldSettings.FileUpload_MediaTypeWhiteList = Settings.findOneById('FileUpload_MediaTypeWhiteList').value; - Settings.updateValueById('FileUpload_MediaTypeWhiteList', '*'); + this.oldSettings.FileUpload_MediaTypeWhiteList = Promise.await(Settings.findOneById('FileUpload_MediaTypeWhiteList')).value; + Promise.await(Settings.updateValueById('FileUpload_MediaTypeWhiteList', '*')); - this.oldSettings.FileUpload_MediaTypeBlackList = Settings.findOneById('FileUpload_MediaTypeBlackList').value; - Settings.updateValueById('FileUpload_MediaTypeBlackList', ''); - - this.oldSettings.UI_Allow_room_names_with_special_chars = Settings.findOneById('UI_Allow_room_names_with_special_chars').value; - Settings.updateValueById('UI_Allow_room_names_with_special_chars', true); + this.oldSettings.FileUpload_MediaTypeBlackList = Promise.await(Settings.findOneById('FileUpload_MediaTypeBlackList')).value; + Promise.await(Settings.updateValueById('FileUpload_MediaTypeBlackList', '')); break; case ProgressStep.DONE: case ProgressStep.ERROR: case ProgressStep.CANCELLED: - Settings.updateValueById('Accounts_AllowedDomainsList', this.oldSettings.Accounts_AllowedDomainsList); - Settings.updateValueById('Accounts_AllowUsernameChange', this.oldSettings.Accounts_AllowUsernameChange); - Settings.updateValueById('FileUpload_MaxFileSize', this.oldSettings.FileUpload_MaxFileSize); - Settings.updateValueById('FileUpload_MediaTypeWhiteList', this.oldSettings.FileUpload_MediaTypeWhiteList); - Settings.updateValueById('FileUpload_MediaTypeBlackList', this.oldSettings.FileUpload_MediaTypeBlackList); - Settings.updateValueById('UI_Allow_room_names_with_special_chars', this.oldSettings.UI_Allow_room_names_with_special_chars); + Promise.await(Settings.updateValueById('Accounts_AllowedDomainsList', this.oldSettings.Accounts_AllowedDomainsList)); + Promise.await(Settings.updateValueById('Accounts_AllowUsernameChange', this.oldSettings.Accounts_AllowUsernameChange)); + Promise.await(Settings.updateValueById('FileUpload_MaxFileSize', this.oldSettings.FileUpload_MaxFileSize)); + Promise.await(Settings.updateValueById('FileUpload_MediaTypeWhiteList', this.oldSettings.FileUpload_MediaTypeWhiteList)); + Promise.await(Settings.updateValueById('FileUpload_MediaTypeBlackList', this.oldSettings.FileUpload_MediaTypeBlackList)); break; } @@ -295,8 +291,8 @@ export class Base { this.progress.count.completed = 0; } - this.progress.count.total = this.importRecord.count.total || 0; - this.progress.count.completed = this.importRecord.count.completed || 0; + this.progress.count.total = this.importRecord.count?.total || 0; + this.progress.count.completed = this.importRecord.count?.completed || 0; } /** diff --git a/app/importer/server/classes/ImporterProgress.js b/apps/meteor/app/importer/server/classes/ImporterProgress.js similarity index 100% rename from app/importer/server/classes/ImporterProgress.js rename to apps/meteor/app/importer/server/classes/ImporterProgress.js diff --git a/app/importer/server/classes/ImporterSelection.js b/apps/meteor/app/importer/server/classes/ImporterSelection.js similarity index 100% rename from app/importer/server/classes/ImporterSelection.js rename to apps/meteor/app/importer/server/classes/ImporterSelection.js diff --git a/app/importer/server/classes/ImporterSelectionChannel.js b/apps/meteor/app/importer/server/classes/ImporterSelectionChannel.js similarity index 100% rename from app/importer/server/classes/ImporterSelectionChannel.js rename to apps/meteor/app/importer/server/classes/ImporterSelectionChannel.js diff --git a/app/importer/server/classes/ImporterSelectionUser.js b/apps/meteor/app/importer/server/classes/ImporterSelectionUser.js similarity index 100% rename from app/importer/server/classes/ImporterSelectionUser.js rename to apps/meteor/app/importer/server/classes/ImporterSelectionUser.js diff --git a/app/importer/server/classes/ImporterWebsocket.js b/apps/meteor/app/importer/server/classes/ImporterWebsocket.js similarity index 100% rename from app/importer/server/classes/ImporterWebsocket.js rename to apps/meteor/app/importer/server/classes/ImporterWebsocket.js diff --git a/app/importer/server/classes/VirtualDataConverter.ts b/apps/meteor/app/importer/server/classes/VirtualDataConverter.ts similarity index 96% rename from app/importer/server/classes/VirtualDataConverter.ts rename to apps/meteor/app/importer/server/classes/VirtualDataConverter.ts index ee8c01a8b947..9e0944a2430f 100644 --- a/app/importer/server/classes/VirtualDataConverter.ts +++ b/apps/meteor/app/importer/server/classes/VirtualDataConverter.ts @@ -1,5 +1,4 @@ import { Random } from 'meteor/random'; - import type { IImportUserRecord, IImportChannelRecord, @@ -7,8 +6,9 @@ import type { IImportRecord, IImportRecordType, IImportData, -} from '../../../../definition/IImportRecord'; -import { IImportChannel } from '../../../../definition/IImportChannel'; + IImportChannel, +} from '@rocket.chat/core-typings'; + import { ImportDataConverter } from './ImportDataConverter'; import type { IConverterOptions } from './ImportDataConverter'; diff --git a/apps/meteor/app/importer/server/definitions/IConversionCallbacks.ts b/apps/meteor/app/importer/server/definitions/IConversionCallbacks.ts new file mode 100644 index 000000000000..5f012712619a --- /dev/null +++ b/apps/meteor/app/importer/server/definitions/IConversionCallbacks.ts @@ -0,0 +1,13 @@ +import type { IImportUser, IImportMessage, IImportChannel } from '@rocket.chat/core-typings'; + +export type ImporterBeforeImportCallback = { + (data: IImportUser | IImportChannel | IImportMessage, type: string): boolean; +}; +export type ImporterAfterImportCallback = { + (data: IImportUser | IImportChannel | IImportMessage, type: string, isNewRecord: boolean): void; +}; + +export interface IConversionCallbacks { + beforeImportFn?: ImporterBeforeImportCallback; + afterImportFn?: ImporterAfterImportCallback; +} diff --git a/apps/meteor/app/importer/server/index.js b/apps/meteor/app/importer/server/index.js new file mode 100644 index 000000000000..18c16ffa8766 --- /dev/null +++ b/apps/meteor/app/importer/server/index.js @@ -0,0 +1,15 @@ +import { Base } from './classes/ImporterBase'; +import { ImporterWebsocket } from './classes/ImporterWebsocket'; +import { Progress } from './classes/ImporterProgress'; +import { RawImports } from './models/RawImports'; +import { Selection } from './classes/ImporterSelection'; +import { SelectionChannel } from './classes/ImporterSelectionChannel'; +import { SelectionUser } from './classes/ImporterSelectionUser'; +import { ProgressStep } from '../lib/ImporterProgressStep'; +import { ImporterInfo } from '../lib/ImporterInfo'; +import { Importers } from '../lib/Importers'; +import './methods'; +import './startup/setImportsToInvalid'; +import './startup/store'; + +export { Base, Importers, ImporterInfo, ImporterWebsocket, Progress, ProgressStep, RawImports, Selection, SelectionChannel, SelectionUser }; diff --git a/apps/meteor/app/importer/server/methods/downloadPublicImportFile.ts b/apps/meteor/app/importer/server/methods/downloadPublicImportFile.ts new file mode 100644 index 000000000000..ec6c1f1587f8 --- /dev/null +++ b/apps/meteor/app/importer/server/methods/downloadPublicImportFile.ts @@ -0,0 +1,97 @@ +import http from 'http'; +import https from 'https'; +import fs from 'fs'; + +import { Meteor } from 'meteor/meteor'; +import type { IUser } from '@rocket.chat/core-typings'; + +import { RocketChatImportFileInstance } from '../startup/store'; +import { ProgressStep } from '../../lib/ImporterProgressStep'; +import { hasPermission } from '../../../authorization/server'; +import { Importers } from '..'; + +function downloadHttpFile(fileUrl: string, writeStream: fs.WriteStream): void { + const protocol = fileUrl.startsWith('https') ? https : http; + protocol.get(fileUrl, function (response) { + response.pipe(writeStream); + }); +} + +function copyLocalFile(filePath: fs.PathLike, writeStream: fs.WriteStream): void { + const readStream = fs.createReadStream(filePath); + readStream.pipe(writeStream); +} + +export const executeDownloadPublicImportFile = (userId: IUser['_id'], fileUrl: string, importerKey: string): void => { + const importer = Importers.get(importerKey); + const isUrl = fileUrl.startsWith('http'); + if (!importer) { + throw new Meteor.Error( + 'error-importer-not-defined', + `The importer (${importerKey}) has no import class defined.`, + 'downloadImportFile', + ); + } + // Check if it's a valid url or path before creating a new import record + if (!isUrl) { + if (!fs.existsSync(fileUrl)) { + throw new Meteor.Error('error-import-file-missing', fileUrl, 'downloadPublicImportFile'); + } + } + + importer.instance = new importer.importer(importer); // eslint-disable-line new-cap + + const oldFileName = fileUrl.substring(fileUrl.lastIndexOf('/') + 1).split('?')[0]; + const date = new Date(); + const dateStr = `${date.getUTCFullYear()}${date.getUTCMonth()}${date.getUTCDate()}${date.getUTCHours()}${date.getUTCMinutes()}${date.getUTCSeconds()}`; + const newFileName = `${dateStr}_${userId}_${oldFileName}`; + + // Store the file name on the imports collection + importer.instance.startFileUpload(newFileName); + importer.instance.updateProgress(ProgressStep.DOWNLOADING_FILE); + + const writeStream = RocketChatImportFileInstance.createWriteStream(newFileName); + + writeStream.on( + 'error', + Meteor.bindEnvironment(() => { + importer.instance.updateProgress(ProgressStep.ERROR); + }), + ); + + writeStream.on( + 'end', + Meteor.bindEnvironment(() => { + importer.instance.updateProgress(ProgressStep.FILE_LOADED); + }), + ); + + if (isUrl) { + downloadHttpFile(fileUrl, writeStream); + } else { + // If the url is actually a folder path on the current machine, skip moving it to the file store + if (fs.statSync(fileUrl).isDirectory()) { + importer.instance.updateRecord({ file: fileUrl }); + importer.instance.updateProgress(ProgressStep.FILE_LOADED); + return; + } + + copyLocalFile(fileUrl, writeStream); + } +}; + +Meteor.methods({ + downloadPublicImportFile(fileUrl: string, importerKey: string) { + const userId = Meteor.userId(); + + if (!userId) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', 'downloadPublicImportFile'); + } + + if (!hasPermission(userId, 'run-import')) { + throw new Meteor.Error('error-action-not-allowed', 'Importing is not allowed', 'downloadPublicImportFile'); + } + + executeDownloadPublicImportFile(userId, fileUrl, importerKey); + }, +}); diff --git a/apps/meteor/app/importer/server/methods/getImportFileData.ts b/apps/meteor/app/importer/server/methods/getImportFileData.ts new file mode 100644 index 000000000000..fead1a54750e --- /dev/null +++ b/apps/meteor/app/importer/server/methods/getImportFileData.ts @@ -0,0 +1,75 @@ +import path from 'path'; +import fs from 'fs'; + +import { Meteor } from 'meteor/meteor'; +import type { IImportFileData } from '@rocket.chat/core-typings'; + +import { RocketChatImportFileInstance } from '../startup/store'; +import { hasPermission } from '../../../authorization/server'; +import { Imports } from '../../../models/server'; +import { ProgressStep } from '../../lib/ImporterProgressStep'; +import { Importers } from '..'; + +export const executeGetImportFileData = async (): Promise => { + const operation = Imports.findLastImport(); + if (!operation) { + throw new Meteor.Error('error-operation-not-found', 'Import Operation Not Found', 'getImportFileData'); + } + + const { importerKey } = operation; + + const importer = Importers.get(importerKey); + if (!importer) { + throw new Meteor.Error('error-importer-not-defined', `The importer (${importerKey}) has no import class defined.`, 'getImportFileData'); + } + + importer.instance = new importer.importer(importer, operation); // eslint-disable-line new-cap + + const waitingSteps = [ + ProgressStep.DOWNLOADING_FILE, + ProgressStep.PREPARING_CHANNELS, + ProgressStep.PREPARING_MESSAGES, + ProgressStep.PREPARING_USERS, + ProgressStep.PREPARING_STARTED, + ]; + + if (waitingSteps.indexOf(importer.instance.progress.step) >= 0) { + if (importer.instance.importRecord && importer.instance.importRecord.valid) { + return { waiting: true }; + } + throw new Meteor.Error('error-import-operation-invalid', 'Invalid Import Operation', 'getImportFileData'); + } + + const readySteps = [ProgressStep.USER_SELECTION, ProgressStep.DONE, ProgressStep.CANCELLED, ProgressStep.ERROR]; + + if (readySteps.indexOf(importer.instance.progress.step) >= 0) { + return importer.instance.buildSelection(); + } + + const fileName = importer.instance.importRecord.file; + const fullFilePath = fs.existsSync(fileName) ? fileName : path.join(RocketChatImportFileInstance.absolutePath, fileName); + const promise = importer.instance.prepareUsingLocalFile(fullFilePath); + + if (promise && promise instanceof Promise) { + // promise; + await promise; + } + + return importer.instance.buildSelection(); +}; + +Meteor.methods({ + getImportFileData() { + const userId = Meteor.userId(); + + if (!userId) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', 'getImportFileData'); + } + + if (!hasPermission(userId, 'run-import')) { + throw new Meteor.Error('error-action-not-allowed', 'Importing is not allowed', 'getImportFileData'); + } + + return executeGetImportFileData(); + }, +}); diff --git a/apps/meteor/app/importer/server/methods/getImportProgress.ts b/apps/meteor/app/importer/server/methods/getImportProgress.ts new file mode 100644 index 000000000000..ad78dc208691 --- /dev/null +++ b/apps/meteor/app/importer/server/methods/getImportProgress.ts @@ -0,0 +1,38 @@ +import type { IImportProgress } from '@rocket.chat/core-typings'; +import { Meteor } from 'meteor/meteor'; + +import { hasPermission } from '../../../authorization/server'; +import { Imports } from '../../../models/server'; +import { Importers } from '..'; + +export const executeGetImportProgress = (): IImportProgress => { + const operation = Imports.findLastImport(); + if (!operation) { + throw new Meteor.Error('error-operation-not-found', 'Import Operation Not Found', 'getImportProgress'); + } + + const { importerKey } = operation; + const importer = Importers.get(importerKey); + if (!importer) { + throw new Meteor.Error('error-importer-not-defined', `The importer (${importerKey}) has no import class defined.`, 'getImportProgress'); + } + + importer.instance = new importer.importer(importer, operation); // eslint-disable-line new-cap + + return importer.instance.getProgress(); +}; + +Meteor.methods({ + getImportProgress() { + const userId = Meteor.userId(); + if (!userId) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', 'getImportProgress'); + } + + if (!hasPermission(userId, 'run-import')) { + throw new Meteor.Error('error-action-not-allowed', 'Importing is not allowed', 'setupImporter'); + } + + return executeGetImportProgress(); + }, +}); diff --git a/apps/meteor/app/importer/server/methods/getLatestImportOperations.ts b/apps/meteor/app/importer/server/methods/getLatestImportOperations.ts new file mode 100644 index 000000000000..2b0a55671edc --- /dev/null +++ b/apps/meteor/app/importer/server/methods/getLatestImportOperations.ts @@ -0,0 +1,32 @@ +import { Meteor } from 'meteor/meteor'; + +import { Imports } from '../../../models/server'; +import { hasPermission } from '../../../authorization/server'; + +export const executeGetLatestImportOperations = () => { + const data = Imports.find( + {}, + { + sort: { _updatedAt: -1 }, + limit: 20, + }, + ); + + return data.fetch(); +}; + +Meteor.methods({ + getLatestImportOperations() { + const userId = Meteor.userId(); + + if (!userId) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', 'getLatestImportOperations'); + } + + if (!hasPermission(userId, 'view-import-operations')) { + throw new Meteor.Error('not_authorized', 'User not authorized', 'getLatestImportOperations'); + } + + return executeGetLatestImportOperations(); + }, +}); diff --git a/apps/meteor/app/importer/server/methods/index.ts b/apps/meteor/app/importer/server/methods/index.ts new file mode 100644 index 000000000000..0136565a1185 --- /dev/null +++ b/apps/meteor/app/importer/server/methods/index.ts @@ -0,0 +1,6 @@ +export * from './getImportProgress'; +export * from './startImport'; +export * from './uploadImportFile'; +export * from './getImportFileData'; +export * from './downloadPublicImportFile'; +export * from './getLatestImportOperations'; diff --git a/apps/meteor/app/importer/server/methods/startImport.ts b/apps/meteor/app/importer/server/methods/startImport.ts new file mode 100644 index 000000000000..bdef0abf1cc9 --- /dev/null +++ b/apps/meteor/app/importer/server/methods/startImport.ts @@ -0,0 +1,55 @@ +import { Meteor } from 'meteor/meteor'; +import type { StartImportParamsPOST } from '@rocket.chat/rest-typings'; + +import { hasPermission } from '../../../authorization/server'; +import { Imports } from '../../../models/server'; +import { Importers, Selection, SelectionChannel, SelectionUser } from '..'; + +export const executeStartImport = ({ input }: StartImportParamsPOST) => { + const operation = Imports.findLastImport(); + if (!operation) { + throw new Meteor.Error('error-operation-not-found', 'Import Operation Not Found', 'startImport'); + } + + const { importerKey } = operation; + const importer = Importers.get(importerKey); + if (!importer) { + throw new Meteor.Error('error-importer-not-defined', `The importer (${importerKey}) has no import class defined.`, 'startImport'); + } + + importer.instance = new importer.importer(importer, operation); // eslint-disable-line new-cap + + const usersSelection = input.users.map( + (user) => new SelectionUser(user.user_id, user.username, user.email, user.is_deleted, user.is_bot, user.do_import), + ); + const channelsSelection = input.channels.map( + (channel) => + new SelectionChannel( + channel.channel_id, + channel.name, + channel.is_archived, + channel.do_import, + channel.is_private, + channel.creator, + channel.is_direct, + ), + ); + const selection = new Selection(importer.name, usersSelection, channelsSelection, 0); + return importer.instance.startImport(selection); +}; + +Meteor.methods({ + startImport({ input }: StartImportParamsPOST) { + const userId = Meteor.userId(); + // Takes name and object with users / channels selected to import + if (!userId) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', 'startImport'); + } + + if (!hasPermission(userId, 'run-import')) { + throw new Meteor.Error('error-action-not-allowed', 'Importing is not allowed', 'startImport'); + } + + return executeStartImport({ input }); + }, +}); diff --git a/apps/meteor/app/importer/server/methods/uploadImportFile.ts b/apps/meteor/app/importer/server/methods/uploadImportFile.ts new file mode 100644 index 000000000000..3a5662d038b3 --- /dev/null +++ b/apps/meteor/app/importer/server/methods/uploadImportFile.ts @@ -0,0 +1,60 @@ +import { Meteor } from 'meteor/meteor'; +import type { IUser } from '@rocket.chat/core-typings'; + +import { RocketChatFile } from '../../../file'; +import { RocketChatImportFileInstance } from '../startup/store'; +import { hasPermission } from '../../../authorization/server'; +import { ProgressStep } from '../../lib/ImporterProgressStep'; +import { Importers } from '..'; + +export const executeUploadImportFile = ( + userId: IUser['_id'], + binaryContent: string, + contentType: string, + fileName: string, + importerKey: string, +): void => { + const importer = Importers.get(importerKey); + if (!importer) { + throw new Meteor.Error('error-importer-not-defined', `The importer (${importerKey}) has no import class defined.`, 'uploadImportFile'); + } + + importer.instance = new importer.importer(importer); // eslint-disable-line new-cap + + const date = new Date(); + const dateStr = `${date.getUTCFullYear()}${date.getUTCMonth()}${date.getUTCDate()}${date.getUTCHours()}${date.getUTCMinutes()}${date.getUTCSeconds()}`; + const newFileName = `${dateStr}_${userId}_${fileName}`; + + // Store the file name and content type on the imports collection + importer.instance.startFileUpload(newFileName, contentType); + + // Save the file on the File Store + const file = Buffer.from(binaryContent, 'base64'); + const readStream = RocketChatFile.bufferToStream(file); + const writeStream = RocketChatImportFileInstance.createWriteStream(newFileName, contentType); + + writeStream.on( + 'end', + Meteor.bindEnvironment(() => { + importer.instance.updateProgress(ProgressStep.FILE_LOADED); + }), + ); + + readStream.pipe(writeStream); +}; + +Meteor.methods({ + uploadImportFile(binaryContent, contentType, fileName, importerKey) { + const userId = Meteor.userId(); + + if (!userId) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', 'uploadImportFile'); + } + + if (!hasPermission(userId, 'run-import')) { + throw new Meteor.Error('error-action-not-allowed', 'Importing is not allowed', 'uploadImportFile'); + } + + executeUploadImportFile(userId, binaryContent, contentType, fileName, importerKey); + }, +}); diff --git a/apps/meteor/app/importer/server/models/RawImports.js b/apps/meteor/app/importer/server/models/RawImports.js new file mode 100644 index 000000000000..470c1a4ff7cc --- /dev/null +++ b/apps/meteor/app/importer/server/models/RawImports.js @@ -0,0 +1,9 @@ +import { Base } from '../../../models/server'; + +class RawImportsModel extends Base { + constructor() { + super('raw_imports'); + } +} + +export const RawImports = new RawImportsModel(); diff --git a/app/importer/server/startup/setImportsToInvalid.js b/apps/meteor/app/importer/server/startup/setImportsToInvalid.js similarity index 86% rename from app/importer/server/startup/setImportsToInvalid.js rename to apps/meteor/app/importer/server/startup/setImportsToInvalid.js index 691a42cd19b7..9a4ec9b728f3 100644 --- a/app/importer/server/startup/setImportsToInvalid.js +++ b/apps/meteor/app/importer/server/startup/setImportsToInvalid.js @@ -29,11 +29,11 @@ Meteor.startup(function () { Imports.invalidateOperationsExceptId(idToKeep); // Clean up all the raw import data, except for the last operation - runDrop(() => RawImports.model.rawCollection().remove({ import: { $ne: idToKeep } })); + runDrop(() => RawImports.model.rawCollection().deleteMany({ import: { $ne: idToKeep } })); } else { Imports.invalidateAllOperations(); // Clean up all the raw import data - runDrop(() => RawImports.model.rawCollection().remove({})); + runDrop(() => RawImports.model.rawCollection().deleteMany({})); } }); diff --git a/app/importer/server/startup/store.js b/apps/meteor/app/importer/server/startup/store.js similarity index 91% rename from app/importer/server/startup/store.js rename to apps/meteor/app/importer/server/startup/store.js index 2026945ba3f2..22ba5eadce34 100644 --- a/app/importer/server/startup/store.js +++ b/apps/meteor/app/importer/server/startup/store.js @@ -1,7 +1,7 @@ import { Meteor } from 'meteor/meteor'; import { RocketChatFile } from '../../../file'; -import { settings } from '../../../settings'; +import { settings } from '../../../settings/server'; export let RocketChatImportFileInstance; diff --git a/app/integrations/client/streamer.js b/apps/meteor/app/integrations/client/streamer.js similarity index 100% rename from app/integrations/client/streamer.js rename to apps/meteor/app/integrations/client/streamer.js diff --git a/apps/meteor/app/integrations/lib/outgoingEvents.ts b/apps/meteor/app/integrations/lib/outgoingEvents.ts new file mode 100644 index 000000000000..0beb18d0f092 --- /dev/null +++ b/apps/meteor/app/integrations/lib/outgoingEvents.ts @@ -0,0 +1,70 @@ +import type { OutgoingIntegrationEvent } from '@rocket.chat/core-typings'; + +export const outgoingEvents: Record< + OutgoingIntegrationEvent, + { label: string; value: OutgoingIntegrationEvent; use: { channel: boolean; triggerWords: boolean; targetRoom: boolean } } +> = { + sendMessage: { + label: 'Integrations_Outgoing_Type_SendMessage', + value: 'sendMessage', + use: { + channel: true, + triggerWords: true, + targetRoom: false, + }, + }, + fileUploaded: { + label: 'Integrations_Outgoing_Type_FileUploaded', + value: 'fileUploaded', + use: { + channel: true, + triggerWords: false, + targetRoom: false, + }, + }, + roomArchived: { + label: 'Integrations_Outgoing_Type_RoomArchived', + value: 'roomArchived', + use: { + channel: false, + triggerWords: false, + targetRoom: false, + }, + }, + roomCreated: { + label: 'Integrations_Outgoing_Type_RoomCreated', + value: 'roomCreated', + use: { + channel: false, + triggerWords: false, + targetRoom: false, + }, + }, + roomJoined: { + label: 'Integrations_Outgoing_Type_RoomJoined', + value: 'roomJoined', + use: { + channel: true, + triggerWords: false, + targetRoom: false, + }, + }, + roomLeft: { + label: 'Integrations_Outgoing_Type_RoomLeft', + value: 'roomLeft', + use: { + channel: true, + triggerWords: false, + targetRoom: false, + }, + }, + userCreated: { + label: 'Integrations_Outgoing_Type_UserCreated', + value: 'userCreated', + use: { + channel: false, + triggerWords: false, + targetRoom: true, + }, + }, +} as const; diff --git a/apps/meteor/app/integrations/server/api/api.js b/apps/meteor/app/integrations/server/api/api.js new file mode 100644 index 000000000000..724bfea9ad80 --- /dev/null +++ b/apps/meteor/app/integrations/server/api/api.js @@ -0,0 +1,525 @@ +import { VM, VMScript } from 'vm2'; +import { Meteor } from 'meteor/meteor'; +import { HTTP } from 'meteor/http'; +import { Random } from 'meteor/random'; +import { Livechat } from 'meteor/rocketchat:livechat'; +import Fiber from 'fibers'; +import Future from 'fibers/future'; +import _ from 'underscore'; +import s from 'underscore.string'; +import moment from 'moment'; +import { Integrations } from '@rocket.chat/models'; + +import { incomingLogger } from '../logger'; +import { processWebhookMessage } from '../../../lib/server'; +import { API, APIClass, defaultRateLimiterOptions } from '../../../api/server'; +import * as Models from '../../../models/server'; +import { settings } from '../../../settings/server'; + +const compiledScripts = {}; +function buildSandbox(store = {}) { + const sandbox = { + scriptTimeout(reject) { + return setTimeout(() => reject('timed out'), 3000); + }, + _, + s, + console, + moment, + Fiber, + Promise, + Livechat, + Store: { + set(key, val) { + store[key] = val; + return val; + }, + get(key) { + return store[key]; + }, + }, + HTTP(method, url, options) { + try { + return { + result: HTTP.call(method, url, options), + }; + } catch (error) { + return { + error, + }; + } + }, + }; + Object.keys(Models) + .filter((k) => !k.startsWith('_')) + .forEach((k) => { + sandbox[k] = Models[k]; + }); + return { store, sandbox }; +} + +function getIntegrationScript(integration) { + const compiledScript = compiledScripts[integration._id]; + if (compiledScript && +compiledScript._updatedAt === +integration._updatedAt) { + return compiledScript.script; + } + + const script = integration.scriptCompiled; + const { sandbox, store } = buildSandbox(); + try { + incomingLogger.info({ msg: 'Will evaluate script of Trigger', integration: integration.name }); + incomingLogger.debug(script); + + const vmScript = new VMScript(`${script}; Script;`, 'script.js'); + const vm = new VM({ + sandbox, + }); + + const ScriptClass = vm.run(vmScript); + + if (ScriptClass) { + compiledScripts[integration._id] = { + script: new ScriptClass(), + store, + _updatedAt: integration._updatedAt, + }; + + return compiledScripts[integration._id].script; + } + } catch (err) { + incomingLogger.error({ + msg: 'Error evaluating Script in Trigger', + integration: integration.name, + script, + err, + }); + throw API.v1.failure('error-evaluating-script'); + } + + incomingLogger.error({ msg: 'Class "Script" not in Trigger', integration: integration.name }); + throw API.v1.failure('class-script-not-found'); +} + +function createIntegration(options, user) { + incomingLogger.info({ msg: 'Add integration', integration: options.name }); + incomingLogger.debug({ options }); + + Meteor.runAsUser(user._id, function () { + switch (options.event) { + case 'newMessageOnChannel': + if (options.data == null) { + options.data = {}; + } + if (options.data.channel_name != null && options.data.channel_name.indexOf('#') === -1) { + options.data.channel_name = `#${options.data.channel_name}`; + } + return Meteor.call('addOutgoingIntegration', { + username: 'rocket.cat', + urls: [options.target_url], + name: options.name, + channel: options.data.channel_name, + triggerWords: options.data.trigger_words, + }); + case 'newMessageToUser': + if (options.data.username.indexOf('@') === -1) { + options.data.username = `@${options.data.username}`; + } + return Meteor.call('addOutgoingIntegration', { + username: 'rocket.cat', + urls: [options.target_url], + name: options.name, + channel: options.data.username, + triggerWords: options.data.trigger_words, + }); + } + }); + + return API.v1.success(); +} + +function removeIntegration(options, user) { + incomingLogger.info('Remove integration'); + incomingLogger.debug({ options }); + + const integrationToRemove = Promise.await(Integrations.findOneByUrl(options.target_url)); + if (!integrationToRemove) { + return API.v1.failure('integration-not-found'); + } + + Meteor.runAsUser(user._id, () => Meteor.call('deleteOutgoingIntegration', integrationToRemove._id)); + + return API.v1.success(); +} + +function executeIntegrationRest() { + incomingLogger.info({ msg: 'Post integration:', integration: this.integration.name }); + incomingLogger.debug({ urlParams: this.urlParams, bodyParams: this.bodyParams }); + + if (this.integration.enabled !== true) { + return { + statusCode: 503, + body: 'Service Unavailable', + }; + } + + const defaultValues = { + channel: this.integration.channel, + alias: this.integration.alias, + avatar: this.integration.avatar, + emoji: this.integration.emoji, + }; + + if (this.integration.scriptEnabled && this.integration.scriptCompiled && this.integration.scriptCompiled.trim() !== '') { + let script; + try { + script = getIntegrationScript(this.integration); + } catch (e) { + incomingLogger.error(e); + return API.v1.failure(e.message); + } + + this.request.setEncoding('utf8'); + const content_raw = this.request.read(); + + const request = { + url: { + hash: this.request._parsedUrl.hash, + search: this.request._parsedUrl.search, + query: this.queryParams, + pathname: this.request._parsedUrl.pathname, + path: this.request._parsedUrl.path, + }, + url_raw: this.request.url, + url_params: this.urlParams, + content: this.bodyParams, + content_raw, + headers: this.request.headers, + body: this.request.body, + user: { + _id: this.user._id, + name: this.user.name, + username: this.user.username, + }, + }; + + try { + const { sandbox } = buildSandbox(compiledScripts[this.integration._id].store); + sandbox.script = script; + sandbox.request = request; + + const vm = new VM({ + timeout: 3000, + sandbox, + }); + + const scriptResult = vm.run(` + new Promise((resolve, reject) => { + Fiber(() => { + scriptTimeout(reject); + try { + resolve(script.process_incoming_request({ request: request })); + } catch(e) { + reject(e); + } + }).run(); + }).catch((error) => { throw new Error(error); }); + `); + + const result = Future.fromPromise(scriptResult).wait(); + + if (!result) { + incomingLogger.debug({ + msg: 'Process Incoming Request result of Trigger has no data', + integration: this.integration.name, + }); + return API.v1.success(); + } + if (result && result.error) { + return API.v1.failure(result.error); + } + + this.bodyParams = result && result.content; + this.scriptResponse = result.response; + if (result.user) { + this.user = result.user; + } + + incomingLogger.debug({ + msg: 'Process Incoming Request result of Trigger', + integration: this.integration.name, + result: this.bodyParams, + }); + } catch (err) { + incomingLogger.error({ + msg: 'Error running Script in Trigger', + integration: this.integration.name, + script: this.integration.scriptCompiled, + err, + }); + return API.v1.failure('error-running-script'); + } + } + + // TODO: Turn this into an option on the integrations - no body means a success + // TODO: Temporary fix for https://github.com/RocketChat/Rocket.Chat/issues/7770 until the above is implemented + if (!this.bodyParams || (_.isEmpty(this.bodyParams) && !this.integration.scriptEnabled)) { + // return RocketChat.API.v1.failure('body-empty'); + return API.v1.success(); + } + + this.bodyParams.bot = { i: this.integration._id }; + + try { + const message = processWebhookMessage(this.bodyParams, this.user, defaultValues); + if (_.isEmpty(message)) { + return API.v1.failure('unknown-error'); + } + + if (this.scriptResponse) { + incomingLogger.debug({ msg: 'response', response: this.scriptResponse }); + } + + return API.v1.success(this.scriptResponse); + } catch ({ error, message }) { + return API.v1.failure(error || message); + } +} + +function addIntegrationRest() { + return createIntegration(this.bodyParams, this.user); +} + +function removeIntegrationRest() { + return removeIntegration(this.bodyParams, this.user); +} + +function integrationSampleRest() { + incomingLogger.info('Sample Integration'); + return { + statusCode: 200, + body: [ + { + token: Random.id(24), + channel_id: Random.id(), + channel_name: 'general', + timestamp: new Date(), + user_id: Random.id(), + user_name: 'rocket.cat', + text: 'Sample text 1', + trigger_word: 'Sample', + }, + { + token: Random.id(24), + channel_id: Random.id(), + channel_name: 'general', + timestamp: new Date(), + user_id: Random.id(), + user_name: 'rocket.cat', + text: 'Sample text 2', + trigger_word: 'Sample', + }, + { + token: Random.id(24), + channel_id: Random.id(), + channel_name: 'general', + timestamp: new Date(), + user_id: Random.id(), + user_name: 'rocket.cat', + text: 'Sample text 3', + trigger_word: 'Sample', + }, + ], + }; +} + +function integrationInfoRest() { + incomingLogger.info('Info integration'); + return { + statusCode: 200, + body: { + success: true, + }, + }; +} + +class WebHookAPI extends APIClass { + /* Webhooks are not versioned, so we must not validate we know a version before adding a rate limiter */ + shouldAddRateLimitToRoute(options) { + const { rateLimiterOptions } = options; + return ( + (typeof rateLimiterOptions === 'object' || rateLimiterOptions === undefined) && + !process.env.TEST_MODE && + Boolean(defaultRateLimiterOptions.numRequestsAllowed && defaultRateLimiterOptions.intervalTimeInMS) + ); + } + + shouldVerifyRateLimit(/* route */) { + return ( + settings.get('API_Enable_Rate_Limiter') === true && + (process.env.NODE_ENV !== 'development' || settings.get('API_Enable_Rate_Limiter_Dev') === true) + ); + } + + /* + There is only one generic route propagated to Restivus which has URL-path-parameters for the integration and the token. + Since the rate-limiter operates on absolute routes, we need to add a limiter to the absolute url before we can validate it + */ + enforceRateLimit(objectForRateLimitMatch, request, response, userId) { + const { method, url } = request; + const route = url.replace(`/${this.apiPath}`, ''); + const nameRoute = this.getFullRouteName(route, [method.toLowerCase()]); + // We'll be creating rate limiters on demand (when validating for the first time). + // This is possible since *all* integration hooks should be rate limited the same way. + // This way, we'll not have to add new limiters as new integrations are added + if (!this.getRateLimiter(nameRoute)) { + this.addRateLimiterRuleForRoutes({ + routes: [route], + rateLimiterOptions: defaultRateLimiterOptions, + endpoints: { + post: executeIntegrationRest, + get: executeIntegrationRest, + }, + }); + } + + const integrationForRateLimitMatch = objectForRateLimitMatch; + integrationForRateLimitMatch.route = nameRoute; + + super.enforceRateLimit(integrationForRateLimitMatch, request, response, userId); + } +} + +const Api = new WebHookAPI({ + enableCors: true, + apiPath: 'hooks/', + auth: { + user() { + const payloadKeys = Object.keys(this.bodyParams); + const payloadIsWrapped = this.bodyParams && this.bodyParams.payload && payloadKeys.length === 1; + if (payloadIsWrapped && this.request.headers['content-type'] === 'application/x-www-form-urlencoded') { + try { + this.bodyParams = JSON.parse(this.bodyParams.payload); + } catch ({ message }) { + return { + error: { + statusCode: 400, + body: { + success: false, + error: message, + }, + }, + }; + } + } + + this.integration = Promise.await( + Integrations.findOne({ + _id: this.request.params.integrationId, + token: decodeURIComponent(this.request.params.token), + }), + ); + + if (!this.integration) { + incomingLogger.info(`Invalid integration id ${this.request.params.integrationId} or token ${this.request.params.token}`); + + return { + error: { + statusCode: 404, + body: { + success: false, + error: 'Invalid integration id or token provided.', + }, + }, + }; + } + + const user = Models.Users.findOne({ + _id: this.integration.userId, + }); + + return { user }; + }, + }, +}); + +Api.addRoute( + ':integrationId/:userId/:token', + { authRequired: true }, + { + post: executeIntegrationRest, + get: executeIntegrationRest, + }, +); + +Api.addRoute( + ':integrationId/:token', + { authRequired: true }, + { + post: executeIntegrationRest, + get: executeIntegrationRest, + }, +); + +Api.addRoute( + 'sample/:integrationId/:userId/:token', + { authRequired: true }, + { + get: integrationSampleRest, + }, +); + +Api.addRoute( + 'sample/:integrationId/:token', + { authRequired: true }, + { + get: integrationSampleRest, + }, +); + +Api.addRoute( + 'info/:integrationId/:userId/:token', + { authRequired: true }, + { + get: integrationInfoRest, + }, +); + +Api.addRoute( + 'info/:integrationId/:token', + { authRequired: true }, + { + get: integrationInfoRest, + }, +); + +Api.addRoute( + 'add/:integrationId/:userId/:token', + { authRequired: true }, + { + post: addIntegrationRest, + }, +); + +Api.addRoute( + 'add/:integrationId/:token', + { authRequired: true }, + { + post: addIntegrationRest, + }, +); + +Api.addRoute( + 'remove/:integrationId/:userId/:token', + { authRequired: true }, + { + post: removeIntegrationRest, + }, +); + +Api.addRoute( + 'remove/:integrationId/:token', + { authRequired: true }, + { + post: removeIntegrationRest, + }, +); diff --git a/apps/meteor/app/integrations/server/index.js b/apps/meteor/app/integrations/server/index.js new file mode 100644 index 000000000000..bbae6e42745a --- /dev/null +++ b/apps/meteor/app/integrations/server/index.js @@ -0,0 +1,18 @@ +import './logger'; +import './lib/validateOutgoingIntegration'; +import './methods/incoming/addIncomingIntegration'; +import './methods/incoming/updateIncomingIntegration'; +import './methods/incoming/deleteIncomingIntegration'; +import './methods/outgoing/addOutgoingIntegration'; +import './methods/outgoing/updateOutgoingIntegration'; +import './methods/outgoing/replayOutgoingIntegration'; +import './methods/outgoing/deleteOutgoingIntegration'; +import './methods/clearIntegrationHistory'; +import './api/api'; +import './lib/triggerHandler'; +import './triggers'; + +export { + mountIntegrationQueryBasedOnPermissions, + mountIntegrationHistoryQueryBasedOnPermissions, +} from './lib/mountQueriesBasedOnPermission'; diff --git a/app/integrations/server/lib/mountQueriesBasedOnPermission.js b/apps/meteor/app/integrations/server/lib/mountQueriesBasedOnPermission.js similarity index 100% rename from app/integrations/server/lib/mountQueriesBasedOnPermission.js rename to apps/meteor/app/integrations/server/lib/mountQueriesBasedOnPermission.js diff --git a/app/integrations/server/lib/triggerHandler.js b/apps/meteor/app/integrations/server/lib/triggerHandler.js similarity index 94% rename from app/integrations/server/lib/triggerHandler.js rename to apps/meteor/app/integrations/server/lib/triggerHandler.js index 8ba50fca9bd4..a44deaa537d3 100644 --- a/app/integrations/server/lib/triggerHandler.js +++ b/apps/meteor/app/integrations/server/lib/triggerHandler.js @@ -1,26 +1,23 @@ -import vm from 'vm'; - +import { VM, VMScript } from 'vm2'; import { Meteor } from 'meteor/meteor'; import { Random } from 'meteor/random'; -import { fetch } from 'meteor/fetch'; import { HTTP } from 'meteor/http'; import _ from 'underscore'; import s from 'underscore.string'; import moment from 'moment'; import Fiber from 'fibers'; import Future from 'fibers/future'; +import { Integrations, IntegrationHistory } from '@rocket.chat/models'; import * as Models from '../../../models/server'; -import { Integrations, IntegrationHistory } from '../../../models/server/raw'; import { settings } from '../../../settings/server'; import { getRoomByNameOrIdWithOptionToJoin, processWebhookMessage } from '../../../lib/server'; import { outgoingLogger } from '../logger'; -import { integrations } from '../../lib/rocketchat'; -import { getUnsafeAgent } from '../../../../server/lib/getUnsafeAgent'; +import { outgoingEvents } from '../../lib/outgoingEvents'; +import { fetch } from '../../../../server/lib/http/fetch'; export class RocketChatIntegrationHandler { constructor() { - this.vm = vm; this.successResults = [200, 201, 202]; this.compiledScripts = {}; this.triggers = {}; @@ -31,7 +28,7 @@ export class RocketChatIntegrationHandler { addIntegration(record) { outgoingLogger.debug(`Adding the integration ${record.name} of the event ${record.event}!`); let channels; - if (record.event && !integrations.outgoingEvents[record.event].use.channel) { + if (record.event && !outgoingEvents[record.event].use.channel) { outgoingLogger.debug('The integration doesnt rely on channels.'); // We don't use any channels, so it's special ;) channels = ['__any']; @@ -276,18 +273,20 @@ export class RocketChatIntegrationHandler { const script = integration.scriptCompiled; const { store, sandbox } = this.buildSandbox(); - let vmScript; try { - outgoingLogger.info({ msg: 'Will evaluate script of Trigger', name: integration.name }); + outgoingLogger.info({ msg: 'Will evaluate script of Trigger', integration: integration.name }); outgoingLogger.debug(script); - vmScript = this.vm.createScript(script, 'script.js'); + const vmScript = new VMScript(`${script}; Script;`, 'script.js'); + const vm = new VM({ + sandbox, + }); - vmScript.runInNewContext(sandbox); + const ScriptClass = vm.run(vmScript); - if (sandbox.Script) { + if (ScriptClass) { this.compiledScripts[integration._id] = { - script: new sandbox.Script(), + script: new ScriptClass(), store, _updatedAt: integration._updatedAt, }; @@ -297,17 +296,15 @@ export class RocketChatIntegrationHandler { } catch (err) { outgoingLogger.error({ msg: 'Error evaluating Script in Trigger', - name: integration.name, + integration: integration.name, script, err, }); throw new Meteor.Error('error-evaluating-script'); } - if (!sandbox.Script) { - outgoingLogger.error(`Class "Script" not in Trigger ${integration.name}:`); - throw new Meteor.Error('class-script-not-found'); - } + outgoingLogger.error(`Class "Script" not in Trigger ${integration.name}:`); + throw new Meteor.Error('class-script-not-found'); } hasScriptAndMethod(integration, method) { @@ -353,9 +350,12 @@ export class RocketChatIntegrationHandler { this.updateHistory({ historyId, step: `execute-script-before-running-${method}` }); - const result = Future.fromPromise( - this.vm.runInNewContext( - ` + const vm = new VM({ + timeout: 3000, + sandbox, + }); + + const scriptResult = vm.run(` new Promise((resolve, reject) => { Fiber(() => { scriptTimeout(reject); @@ -366,13 +366,9 @@ export class RocketChatIntegrationHandler { } }).run(); }).catch((error) => { throw new Error(error); }); - `, - sandbox, - { - timeout: 3000, - }, - ), - ).wait(); + `); + + const result = Future.fromPromise(scriptResult).wait(); outgoingLogger.debug({ msg: `Script method "${method}" result of the Integration "${integration.name}" is:`, @@ -389,12 +385,12 @@ export class RocketChatIntegrationHandler { }); outgoingLogger.error({ msg: 'Error running Script in the Integration', - name: integration.name, + integration: integration.name, err, }); outgoingLogger.debug({ msg: 'Error running Script in the Integration', - name: integration.name, + integration: integration.name, script: integration.scriptCompiled, }); // Only output the compiled script if debugging is enabled, so the logs don't get spammed. } @@ -565,7 +561,7 @@ export class RocketChatIntegrationHandler { }); room.usernames - .filter((username) => username !== message.u.username && this.triggers[`@${username}`]) + .filter((username) => username !== message?.u?.username && this.triggers[`@${username}`]) .forEach((username) => { for (const trigger of Object.values(this.triggers[`@${username}`])) { triggersToExecute.add(trigger); @@ -668,7 +664,7 @@ export class RocketChatIntegrationHandler { let word; // Not all triggers/events support triggerWords - if (integrations.outgoingEvents[event].use.triggerWords) { + if (outgoingEvents[event].use.triggerWords) { if (trigger.triggerWords && trigger.triggerWords.length > 0) { for (const triggerWord of trigger.triggerWords) { if (!trigger.triggerWordAnywhere && message.msg.indexOf(triggerWord) === 0) { @@ -712,7 +708,7 @@ export class RocketChatIntegrationHandler { this.updateHistory({ historyId, step: 'mapped-args-to-data', data, triggerWord: word }); outgoingLogger.info(`Will be executing the Integration "${trigger.name}" to the url: ${url}`); - outgoingLogger.debug(data); + outgoingLogger.debug({ data }); let opts = { params: {}, @@ -771,14 +767,15 @@ export class RocketChatIntegrationHandler { opts.headers['Content-Type'] = 'application/json'; } - fetch(opts.url, { - method: opts.method, - headers: opts.headers, - ...(settings.get('Allow_Invalid_SelfSigned_Certs') && { - agent: getUnsafeAgent(opts.url.startsWith('https:') ? 'https:' : 'http:'), - }), - ...(opts.data && { body: JSON.stringify(opts.data) }), - }) + fetch( + opts.url, + { + method: opts.method, + headers: opts.headers, + ...(opts.data && { body: JSON.stringify(opts.data) }), + }, + settings.get('Allow_Invalid_SelfSigned_Certs'), + ) .then(async (res) => { const content = await res.text(); if (!content) { @@ -963,4 +960,4 @@ export class RocketChatIntegrationHandler { } } const triggerHandler = new RocketChatIntegrationHandler(); -export { integrations, triggerHandler }; +export { triggerHandler }; diff --git a/apps/meteor/app/integrations/server/lib/validateOutgoingIntegration.ts b/apps/meteor/app/integrations/server/lib/validateOutgoingIntegration.ts new file mode 100644 index 000000000000..cf78e9ed79de --- /dev/null +++ b/apps/meteor/app/integrations/server/lib/validateOutgoingIntegration.ts @@ -0,0 +1,198 @@ +import { Meteor } from 'meteor/meteor'; +import { Match } from 'meteor/check'; +import { Babel } from 'meteor/babel-compiler'; +import _ from 'underscore'; +import type { IUser, INewOutgoingIntegration, IOutgoingIntegration, IUpdateOutgoingIntegration } from '@rocket.chat/core-typings'; + +import { Rooms, Users, Subscriptions } from '../../../models/server'; +import { hasPermission, hasAllPermission } from '../../../authorization/server'; +import { outgoingEvents } from '../../lib/outgoingEvents'; +import { parseCSV } from '../../../../lib/utils/parseCSV'; + +const scopedChannels = ['all_public_channels', 'all_private_groups', 'all_direct_messages']; +const validChannelChars = ['@', '#']; + +function _verifyRequiredFields(integration: INewOutgoingIntegration | IUpdateOutgoingIntegration): void { + if ( + !integration.event || + !Match.test(integration.event, String) || + integration.event.trim() === '' || + !outgoingEvents[integration.event] + ) { + throw new Meteor.Error('error-invalid-event-type', 'Invalid event type', { + function: 'validateOutgoing._verifyRequiredFields', + }); + } + + if (!integration.username || !Match.test(integration.username, String) || integration.username.trim() === '') { + throw new Meteor.Error('error-invalid-username', 'Invalid username', { + function: 'validateOutgoing._verifyRequiredFields', + }); + } + + if (outgoingEvents[integration.event].use.targetRoom && !integration.targetRoom) { + throw new Meteor.Error('error-invalid-targetRoom', 'Invalid Target Room', { + function: 'validateOutgoing._verifyRequiredFields', + }); + } + + if (!Match.test(integration.urls, [String])) { + throw new Meteor.Error('error-invalid-urls', 'Invalid URLs', { + function: 'validateOutgoing._verifyRequiredFields', + }); + } + + integration.urls = integration.urls.filter((url) => url && url.trim() !== ''); + + if (integration.urls.length === 0) { + throw new Meteor.Error('error-invalid-urls', 'Invalid URLs', { + function: 'validateOutgoing._verifyRequiredFields', + }); + } +} + +function _verifyUserHasPermissionForChannels(userId: IUser['_id'], channels: string[]): void { + for (let channel of channels) { + if (scopedChannels.includes(channel)) { + if (channel === 'all_public_channels') { + // No special permissions needed to add integration to public channels + } else if (!hasPermission(userId, 'manage-outgoing-integrations')) { + throw new Meteor.Error('error-invalid-channel', 'Invalid Channel', { + function: 'validateOutgoing._verifyUserHasPermissionForChannels', + }); + } + } else { + let record; + const channelType = channel[0]; + channel = channel.substr(1); + + switch (channelType) { + case '#': + record = Rooms.findOne({ + $or: [{ _id: channel }, { name: channel }], + }); + break; + case '@': + record = Users.findOne({ + $or: [{ _id: channel }, { username: channel }], + }); + break; + } + + if (!record) { + throw new Meteor.Error('error-invalid-room', 'Invalid room', { + function: 'validateOutgoing._verifyUserHasPermissionForChannels', + }); + } + + if ( + !hasAllPermission(userId, ['manage-outgoing-integrations', 'manage-own-outgoing-integrations']) && + !Subscriptions.findOneByRoomIdAndUserId(record._id, userId, { fields: { _id: 1 } }) + ) { + throw new Meteor.Error('error-invalid-channel', 'Invalid Channel', { + function: 'validateOutgoing._verifyUserHasPermissionForChannels', + }); + } + } + } +} + +function _verifyRetryInformation(integration: IOutgoingIntegration): void { + if (!integration.retryFailedCalls) { + return; + } + + // Don't allow negative retry counts + integration.retryCount = + integration.retryCount && parseInt(String(integration.retryCount)) > 0 ? parseInt(String(integration.retryCount)) : 4; + integration.retryDelay = + !integration.retryDelay || !integration.retryDelay.trim() ? 'powers-of-ten' : integration.retryDelay.toLowerCase(); +} + +export const validateOutgoingIntegration = function ( + integration: INewOutgoingIntegration | IUpdateOutgoingIntegration, + userId: IUser['_id'], +): IOutgoingIntegration { + if (integration.channel && Match.test(integration.channel, String) && integration.channel.trim() === '') { + delete integration.channel; + } + + // Moved to it's own function to statisfy the complexity rule + _verifyRequiredFields(integration); + + let channels: string[] = []; + if (outgoingEvents[integration.event].use.channel) { + if (!Match.test(integration.channel, String)) { + throw new Meteor.Error('error-invalid-channel', 'Invalid Channel', { + function: 'validateOutgoing', + }); + } else { + channels = parseCSV(integration.channel); + + for (const channel of channels) { + if (!validChannelChars.includes(channel[0]) && !scopedChannels.includes(channel.toLowerCase())) { + throw new Meteor.Error('error-invalid-channel-start-with-chars', 'Invalid channel. Start with @ or #', { + function: 'validateOutgoing', + }); + } + } + } + } else if (!hasPermission(userId, 'manage-outgoing-integrations')) { + throw new Meteor.Error('error-invalid-permissions', 'Invalid permission for required Integration creation.', { + function: 'validateOutgoing', + }); + } + + const user = Users.findOne({ username: integration.username }); + + if (!user) { + throw new Meteor.Error('error-invalid-user', 'Invalid user (did you delete the `rocket.cat` user?)', { function: 'validateOutgoing' }); + } + + const integrationData: IOutgoingIntegration = { + ...integration, + type: 'webhook-outgoing', + channel: channels, + userId: user._id, + _createdAt: new Date(), + _createdBy: Users.findOne(userId, { fields: { username: 1 } }), + }; + + if (outgoingEvents[integration.event].use.triggerWords && integration.triggerWords) { + if (!Match.test(integration.triggerWords, [String])) { + throw new Meteor.Error('error-invalid-triggerWords', 'Invalid triggerWords', { + function: 'validateOutgoing', + }); + } + + integrationData.triggerWords = integration.triggerWords.filter((word) => word && word.trim() !== ''); + } else { + delete integrationData.triggerWords; + } + + if (integration.scriptEnabled === true && integration.script && integration.script.trim() !== '') { + try { + const babelOptions = Object.assign(Babel.getDefaultOptions({ runtime: false }), { + compact: true, + minified: true, + comments: false, + }); + + integrationData.scriptCompiled = Babel.compile(integration.script, babelOptions).code; + integrationData.scriptError = undefined; + } catch (e) { + integrationData.scriptCompiled = undefined; + integrationData.scriptError = e instanceof Error ? _.pick(e, 'name', 'message', 'stack') : undefined; + } + } + + if (typeof integration.runOnEdits !== 'undefined') { + // Verify this value is only true/false + integrationData.runOnEdits = integration.runOnEdits === true; + } + + _verifyUserHasPermissionForChannels(userId, channels); + _verifyRetryInformation(integrationData); + + return integrationData; +}; diff --git a/app/integrations/server/logger.js b/apps/meteor/app/integrations/server/logger.js similarity index 100% rename from app/integrations/server/logger.js rename to apps/meteor/app/integrations/server/logger.js diff --git a/app/integrations/server/methods/clearIntegrationHistory.ts b/apps/meteor/app/integrations/server/methods/clearIntegrationHistory.ts similarity index 75% rename from app/integrations/server/methods/clearIntegrationHistory.ts rename to apps/meteor/app/integrations/server/methods/clearIntegrationHistory.ts index 9cdf42e41307..0c9564ea5027 100644 --- a/app/integrations/server/methods/clearIntegrationHistory.ts +++ b/apps/meteor/app/integrations/server/methods/clearIntegrationHistory.ts @@ -1,19 +1,22 @@ import { Meteor } from 'meteor/meteor'; +import { Integrations, IntegrationHistory } from '@rocket.chat/models'; import { hasPermission } from '../../../authorization/server'; -import { IntegrationHistory, Integrations } from '../../../models/server/raw'; import notifications from '../../../notifications/server/lib/Notifications'; Meteor.methods({ async clearIntegrationHistory(integrationId) { let integration; - if (hasPermission(this.userId, 'manage-outgoing-integrations') || hasPermission(this.userId, 'manage-outgoing-integrations', 'bot')) { + if (!this.userId) { + throw new Meteor.Error('not_authorized', 'Unauthorized', { + method: 'clearIntegrationHistory', + }); + } + + if (hasPermission(this.userId, 'manage-outgoing-integrations')) { integration = await Integrations.findOneById(integrationId); - } else if ( - hasPermission(this.userId, 'manage-own-outgoing-integrations') || - hasPermission(this.userId, 'manage-own-outgoing-integrations', 'bot') - ) { + } else if (hasPermission(this.userId, 'manage-own-outgoing-integrations')) { integration = await Integrations.findOne({ '_id': integrationId, '_createdBy._id': this.userId, diff --git a/apps/meteor/app/integrations/server/methods/incoming/addIncomingIntegration.ts b/apps/meteor/app/integrations/server/methods/incoming/addIncomingIntegration.ts new file mode 100644 index 000000000000..1c40d62dcec8 --- /dev/null +++ b/apps/meteor/app/integrations/server/methods/incoming/addIncomingIntegration.ts @@ -0,0 +1,142 @@ +import { Meteor } from 'meteor/meteor'; +import { Match, check } from 'meteor/check'; +import { Random } from 'meteor/random'; +import { Babel } from 'meteor/babel-compiler'; +import _ from 'underscore'; +import s from 'underscore.string'; +import type { INewIncomingIntegration, IIncomingIntegration } from '@rocket.chat/core-typings'; +import { Integrations, Roles } from '@rocket.chat/models'; + +import { hasPermission, hasAllPermission } from '../../../../authorization/server'; +import { Users, Rooms, Subscriptions } from '../../../../models/server'; + +const validChannelChars = ['@', '#']; + +Meteor.methods({ + async addIncomingIntegration(integration: INewIncomingIntegration): Promise { + const { userId } = this; + + check( + integration, + Match.ObjectIncluding({ + type: String, + name: String, + enabled: Boolean, + username: String, + channel: String, + alias: Match.Maybe(String), + emoji: Match.Maybe(String), + scriptEnabled: Boolean, + script: Match.Maybe(String), + avatar: Match.Maybe(String), + }), + ); + + if (!userId || (!hasPermission(userId, 'manage-incoming-integrations') && !hasPermission(userId, 'manage-own-incoming-integrations'))) { + throw new Meteor.Error('not_authorized', 'Unauthorized', { + method: 'addIncomingIntegration', + }); + } + + if (!_.isString(integration.channel)) { + throw new Meteor.Error('error-invalid-channel', 'Invalid channel', { + method: 'addIncomingIntegration', + }); + } + + if (integration.channel.trim() === '') { + throw new Meteor.Error('error-invalid-channel', 'Invalid channel', { + method: 'addIncomingIntegration', + }); + } + + const channels = _.map(integration.channel.split(','), (channel) => s.trim(channel)); + + for (const channel of channels) { + if (!validChannelChars.includes(channel[0])) { + throw new Meteor.Error('error-invalid-channel-start-with-chars', 'Invalid channel. Start with @ or #', { + method: 'updateIncomingIntegration', + }); + } + } + + if (!_.isString(integration.username) || integration.username.trim() === '') { + throw new Meteor.Error('error-invalid-username', 'Invalid username', { + method: 'addIncomingIntegration', + }); + } + + const user = Users.findOne({ username: integration.username }); + + if (!user) { + throw new Meteor.Error('error-invalid-user', 'Invalid user', { + method: 'addIncomingIntegration', + }); + } + + const integrationData: IIncomingIntegration = { + ...integration, + type: 'webhook-incoming', + channel: channels, + token: Random.id(48), + userId: user._id, + _createdAt: new Date(), + _createdBy: Users.findOne(userId, { fields: { username: 1 } }), + }; + + if (integration.scriptEnabled === true && integration.script && integration.script.trim() !== '') { + try { + let babelOptions = Babel.getDefaultOptions({ runtime: false }); + babelOptions = _.extend(babelOptions, { compact: true, minified: true, comments: false }); + + integrationData.scriptCompiled = Babel.compile(integration.script, babelOptions).code; + integrationData.scriptError = undefined; + } catch (e) { + integrationData.scriptCompiled = undefined; + integrationData.scriptError = e instanceof Error ? _.pick(e, 'name', 'message', 'stack') : undefined; + } + } + + for (let channel of channels) { + let record; + const channelType = channel[0]; + channel = channel.substr(1); + + switch (channelType) { + case '#': + record = Rooms.findOne({ + $or: [{ _id: channel }, { name: channel }], + }); + break; + case '@': + record = Users.findOne({ + $or: [{ _id: channel }, { username: channel }], + }); + break; + } + + if (!record) { + throw new Meteor.Error('error-invalid-room', 'Invalid room', { + method: 'addIncomingIntegration', + }); + } + + if ( + !hasAllPermission(userId, ['manage-incoming-integrations', 'manage-own-incoming-integrations']) && + !Subscriptions.findOneByRoomIdAndUserId(record._id, userId, { fields: { _id: 1 } }) + ) { + throw new Meteor.Error('error-invalid-channel', 'Invalid Channel', { + method: 'addIncomingIntegration', + }); + } + } + + await Roles.addUserRoles(user._id, ['bot']); + + const result = await Integrations.insertOne(integrationData); + + integrationData._id = result.insertedId; + + return integrationData; + }, +}); diff --git a/apps/meteor/app/integrations/server/methods/incoming/deleteIncomingIntegration.ts b/apps/meteor/app/integrations/server/methods/incoming/deleteIncomingIntegration.ts new file mode 100644 index 000000000000..ef90340167be --- /dev/null +++ b/apps/meteor/app/integrations/server/methods/incoming/deleteIncomingIntegration.ts @@ -0,0 +1,34 @@ +import { Meteor } from 'meteor/meteor'; +import { Integrations } from '@rocket.chat/models'; + +import { hasPermission } from '../../../../authorization/server'; + +Meteor.methods({ + async deleteIncomingIntegration(integrationId) { + let integration; + const { userId } = this; + + if (userId && hasPermission(userId, 'manage-incoming-integrations')) { + integration = Integrations.findOneById(integrationId); + } else if (userId && hasPermission(userId, 'manage-own-incoming-integrations')) { + integration = Integrations.findOne({ + '_id': integrationId, + '_createdBy._id': userId, + }); + } else { + throw new Meteor.Error('not_authorized', 'Unauthorized', { + method: 'deleteIncomingIntegration', + }); + } + + if (!integration) { + throw new Meteor.Error('error-invalid-integration', 'Invalid integration', { + method: 'deleteIncomingIntegration', + }); + } + + await Integrations.removeById(integrationId); + + return true; + }, +}); diff --git a/app/integrations/server/methods/incoming/updateIncomingIntegration.js b/apps/meteor/app/integrations/server/methods/incoming/updateIncomingIntegration.js similarity index 97% rename from app/integrations/server/methods/incoming/updateIncomingIntegration.js rename to apps/meteor/app/integrations/server/methods/incoming/updateIncomingIntegration.js index 79cbb6240091..f3d161f53976 100644 --- a/app/integrations/server/methods/incoming/updateIncomingIntegration.js +++ b/apps/meteor/app/integrations/server/methods/incoming/updateIncomingIntegration.js @@ -2,9 +2,9 @@ import { Meteor } from 'meteor/meteor'; import { Babel } from 'meteor/babel-compiler'; import _ from 'underscore'; import s from 'underscore.string'; +import { Integrations, Roles } from '@rocket.chat/models'; import { Rooms, Users, Subscriptions } from '../../../../models/server'; -import { Integrations, Roles } from '../../../../models/server/raw'; import { hasAllPermission, hasPermission } from '../../../../authorization/server'; const validChannelChars = ['@', '#']; @@ -121,7 +121,7 @@ Meteor.methods({ }); } - await Roles.addUserRoles(user._id, 'bot'); + await Roles.addUserRoles(user._id, ['bot']); await Integrations.updateOne( { _id: integrationId }, diff --git a/apps/meteor/app/integrations/server/methods/outgoing/addOutgoingIntegration.ts b/apps/meteor/app/integrations/server/methods/outgoing/addOutgoingIntegration.ts new file mode 100644 index 000000000000..ee670807e3aa --- /dev/null +++ b/apps/meteor/app/integrations/server/methods/outgoing/addOutgoingIntegration.ts @@ -0,0 +1,51 @@ +import { Meteor } from 'meteor/meteor'; +import { Match, check } from 'meteor/check'; +import type { INewOutgoingIntegration, IOutgoingIntegration } from '@rocket.chat/core-typings'; +import { Integrations } from '@rocket.chat/models'; + +import { hasPermission } from '../../../../authorization/server'; +import { validateOutgoingIntegration } from '../../lib/validateOutgoingIntegration'; + +Meteor.methods({ + async addOutgoingIntegration(integration: INewOutgoingIntegration): Promise { + const { userId } = this; + + if (!userId || (!hasPermission(userId, 'manage-outgoing-integrations') && !hasPermission(userId, 'manage-own-outgoing-integrations'))) { + throw new Meteor.Error('not_authorized'); + } + + check( + integration, + Match.ObjectIncluding({ + type: String, + name: String, + enabled: Boolean, + username: String, + channel: String, + alias: Match.Maybe(String), + emoji: Match.Maybe(String), + scriptEnabled: Boolean, + script: Match.Maybe(String), + urls: Match.Maybe([String]), + event: Match.Maybe(String), + triggerWords: Match.Maybe([String]), + avatar: Match.Maybe(String), + token: Match.Maybe(String), + impersonateUser: Match.Maybe(Boolean), + retryCount: Match.Maybe(Number), + retryDelay: Match.Maybe(String), + retryFailedCalls: Match.Maybe(Boolean), + runOnEdits: Match.Maybe(Boolean), + targetRoom: Match.Maybe(String), + triggerWordAnywhere: Match.Maybe(Boolean), + }), + ); + + const integrationData = validateOutgoingIntegration(integration, userId); + + const result = await Integrations.insertOne(integrationData); + integrationData._id = result.insertedId; + + return integrationData; + }, +}); diff --git a/apps/meteor/app/integrations/server/methods/outgoing/deleteOutgoingIntegration.ts b/apps/meteor/app/integrations/server/methods/outgoing/deleteOutgoingIntegration.ts new file mode 100644 index 000000000000..7209ae909c74 --- /dev/null +++ b/apps/meteor/app/integrations/server/methods/outgoing/deleteOutgoingIntegration.ts @@ -0,0 +1,40 @@ +import { Meteor } from 'meteor/meteor'; +import { Integrations, IntegrationHistory } from '@rocket.chat/models'; + +import { hasPermission } from '../../../../authorization/server'; + +Meteor.methods({ + async deleteOutgoingIntegration(integrationId) { + let integration; + + if (!this.userId) { + throw new Meteor.Error('not_authorized', 'Unauthorized', { + method: 'deleteOutgoingIntegration', + }); + } + + if (hasPermission(this.userId, 'manage-outgoing-integrations')) { + integration = Integrations.findOneById(integrationId); + } else if (hasPermission(this.userId, 'manage-own-outgoing-integrations')) { + integration = Integrations.findOne({ + '_id': integrationId, + '_createdBy._id': this.userId, + }); + } else { + throw new Meteor.Error('not_authorized', 'Unauthorized', { + method: 'deleteOutgoingIntegration', + }); + } + + if (!integration) { + throw new Meteor.Error('error-invalid-integration', 'Invalid integration', { + method: 'deleteOutgoingIntegration', + }); + } + + await Integrations.removeById(integrationId); + await IntegrationHistory.removeByIntegrationId(integrationId); + + return true; + }, +}); diff --git a/app/integrations/server/methods/outgoing/replayOutgoingIntegration.ts b/apps/meteor/app/integrations/server/methods/outgoing/replayOutgoingIntegration.ts similarity index 77% rename from app/integrations/server/methods/outgoing/replayOutgoingIntegration.ts rename to apps/meteor/app/integrations/server/methods/outgoing/replayOutgoingIntegration.ts index a3f28e847546..00617c5d392b 100644 --- a/app/integrations/server/methods/outgoing/replayOutgoingIntegration.ts +++ b/apps/meteor/app/integrations/server/methods/outgoing/replayOutgoingIntegration.ts @@ -1,27 +1,26 @@ import { Meteor } from 'meteor/meteor'; +import { Integrations, IntegrationHistory } from '@rocket.chat/models'; import { hasPermission } from '../../../../authorization/server'; -import { Integrations, IntegrationHistory } from '../../../../models/server/raw'; import { triggerHandler } from '../../lib/triggerHandler'; Meteor.methods({ async replayOutgoingIntegration({ integrationId, historyId }) { let integration; - if (hasPermission(this.userId, 'manage-outgoing-integrations') || hasPermission(this.userId, 'manage-outgoing-integrations', 'bot')) { + if (!this.userId) { + throw new Meteor.Error('not_authorized', 'Unauthorized', { + method: 'replayOutgoingIntegration', + }); + } + + if (hasPermission(this.userId, 'manage-outgoing-integrations')) { integration = await Integrations.findOneById(integrationId); - } else if ( - hasPermission(this.userId, 'manage-own-outgoing-integrations') || - hasPermission(this.userId, 'manage-own-outgoing-integrations', 'bot') - ) { + } else if (hasPermission(this.userId, 'manage-own-outgoing-integrations')) { integration = await Integrations.findOne({ '_id': integrationId, '_createdBy._id': this.userId, }); - } else { - throw new Meteor.Error('not_authorized', 'Unauthorized', { - method: 'replayOutgoingIntegration', - }); } if (!integration) { diff --git a/app/integrations/server/methods/outgoing/updateOutgoingIntegration.js b/apps/meteor/app/integrations/server/methods/outgoing/updateOutgoingIntegration.js similarity index 92% rename from app/integrations/server/methods/outgoing/updateOutgoingIntegration.js rename to apps/meteor/app/integrations/server/methods/outgoing/updateOutgoingIntegration.js index ba48cb1b14cf..8ddae4b48cab 100644 --- a/app/integrations/server/methods/outgoing/updateOutgoingIntegration.js +++ b/apps/meteor/app/integrations/server/methods/outgoing/updateOutgoingIntegration.js @@ -1,13 +1,13 @@ import { Meteor } from 'meteor/meteor'; +import { Integrations } from '@rocket.chat/models'; import { hasPermission } from '../../../../authorization/server'; import { Users } from '../../../../models/server'; -import { Integrations } from '../../../../models/server/raw'; -import { integrations } from '../../../lib/rocketchat'; +import { validateOutgoingIntegration } from '../../lib/validateOutgoingIntegration'; Meteor.methods({ async updateOutgoingIntegration(integrationId, integration) { - integration = integrations.validateOutgoing(integration, this.userId); + integration = validateOutgoingIntegration(integration, this.userId); if (!integration.token || integration.token.trim() === '') { throw new Meteor.Error('error-invalid-token', 'Invalid token', { diff --git a/app/integrations/server/triggers.js b/apps/meteor/app/integrations/server/triggers.js similarity index 100% rename from app/integrations/server/triggers.js rename to apps/meteor/app/integrations/server/triggers.js diff --git a/app/invites/server/functions/findOrCreateInvite.js b/apps/meteor/app/invites/server/functions/findOrCreateInvite.js similarity index 82% rename from app/invites/server/functions/findOrCreateInvite.js rename to apps/meteor/app/invites/server/functions/findOrCreateInvite.js index cee51781c7dc..7d17dfae9c24 100644 --- a/app/invites/server/functions/findOrCreateInvite.js +++ b/apps/meteor/app/invites/server/functions/findOrCreateInvite.js @@ -1,13 +1,14 @@ import { Meteor } from 'meteor/meteor'; import { Random } from 'meteor/random'; +import { Invites } from '@rocket.chat/models'; -import { hasPermission } from '../../../authorization'; -import { Notifications } from '../../../notifications'; +import { hasPermission } from '../../../authorization/server'; +import { api } from '../../../../server/sdk/api'; import { Subscriptions, Rooms } from '../../../models/server'; -import { Invites } from '../../../models/server/raw'; -import { settings } from '../../../settings'; +import { settings } from '../../../settings/server'; import { getURL } from '../../../utils/lib/getURL'; -import { roomTypes, RoomMemberActions } from '../../../utils/server'; +import { roomCoordinator } from '../../../../server/lib/rooms/roomCoordinator'; +import { RoomMemberActions } from '../../../../definition/IRoomTypeConfig'; function getInviteUrl(invite) { const { _id } = invite; @@ -51,7 +52,7 @@ export const findOrCreateInvite = async (userId, invite) => { } const room = Rooms.findOneById(invite.rid); - if (!roomTypes.getConfig(room.t).allowMemberAction(room, RoomMemberActions.INVITE)) { + if (!roomCoordinator.getRoomDirectives(room.t)?.allowMemberAction(room, RoomMemberActions.INVITE)) { throw new Meteor.Error('error-room-type-not-allowed', 'Cannot create invite links for this room type', { method: 'findOrCreateInvite', }); @@ -98,7 +99,8 @@ export const findOrCreateInvite = async (userId, invite) => { }; await Invites.insertOne(createInvite); - Notifications.notifyUser(userId, 'updateInvites', { invite: createInvite }); + + api.broadcast('notify.updateInvites', userId, { invite: createInvite }); createInvite.url = getInviteUrl(createInvite); return createInvite; diff --git a/app/invites/server/functions/listInvites.js b/apps/meteor/app/invites/server/functions/listInvites.js similarity index 88% rename from app/invites/server/functions/listInvites.js rename to apps/meteor/app/invites/server/functions/listInvites.js index 10d67435237d..9ee3fb979204 100644 --- a/app/invites/server/functions/listInvites.js +++ b/apps/meteor/app/invites/server/functions/listInvites.js @@ -1,7 +1,7 @@ import { Meteor } from 'meteor/meteor'; +import { Invites } from '@rocket.chat/models'; import { hasPermission } from '../../../authorization/server'; -import { Invites } from '../../../models/server/raw'; export const listInvites = async (userId) => { if (!userId) { diff --git a/app/invites/server/functions/removeInvite.js b/apps/meteor/app/invites/server/functions/removeInvite.js similarity index 93% rename from app/invites/server/functions/removeInvite.js rename to apps/meteor/app/invites/server/functions/removeInvite.js index 3e51ded42e4b..d79f0c644bfa 100644 --- a/app/invites/server/functions/removeInvite.js +++ b/apps/meteor/app/invites/server/functions/removeInvite.js @@ -1,7 +1,7 @@ import { Meteor } from 'meteor/meteor'; +import { Invites } from '@rocket.chat/models'; import { hasPermission } from '../../../authorization'; -import { Invites } from '../../../models/server/raw'; export const removeInvite = async (userId, invite) => { if (!userId || !invite) { diff --git a/app/invites/server/functions/useInviteToken.js b/apps/meteor/app/invites/server/functions/useInviteToken.js similarity index 82% rename from app/invites/server/functions/useInviteToken.js rename to apps/meteor/app/invites/server/functions/useInviteToken.js index 3d43fd7e88b1..6514ebe4e92f 100644 --- a/app/invites/server/functions/useInviteToken.js +++ b/apps/meteor/app/invites/server/functions/useInviteToken.js @@ -1,10 +1,11 @@ import { Meteor } from 'meteor/meteor'; +import { Invites } from '@rocket.chat/models'; import { Users, Subscriptions } from '../../../models/server'; -import { Invites } from '../../../models/server/raw'; import { validateInviteToken } from './validateInviteToken'; import { addUserToRoom } from '../../../lib/server/functions/addUserToRoom'; -import { roomTypes, RoomMemberActions } from '../../../utils/server'; +import { roomCoordinator } from '../../../../server/lib/rooms/roomCoordinator'; +import { RoomMemberActions } from '../../../../definition/IRoomTypeConfig'; export const useInviteToken = async (userId, token) => { if (!userId) { @@ -23,7 +24,7 @@ export const useInviteToken = async (userId, token) => { const { inviteData, room } = await validateInviteToken(token); - if (!roomTypes.getConfig(room.t).allowMemberAction(room, RoomMemberActions.INVITE)) { + if (!roomCoordinator.getRoomDirectives(room.t)?.allowMemberAction(room, RoomMemberActions.INVITE)) { throw new Meteor.Error('error-room-type-not-allowed', "Can't join room of this type via invite", { method: 'useInviteToken', field: 'token', diff --git a/app/invites/server/functions/validateInviteToken.js b/apps/meteor/app/invites/server/functions/validateInviteToken.js similarity index 84% rename from app/invites/server/functions/validateInviteToken.js rename to apps/meteor/app/invites/server/functions/validateInviteToken.js index cc7ea9f194a5..623761324b30 100644 --- a/app/invites/server/functions/validateInviteToken.js +++ b/apps/meteor/app/invites/server/functions/validateInviteToken.js @@ -1,7 +1,5 @@ import { Meteor } from 'meteor/meteor'; - -import { Rooms } from '../../../models'; -import { Invites } from '../../../models/server/raw'; +import { Invites, Rooms } from '@rocket.chat/models'; export const validateInviteToken = async (token) => { if (!token || typeof token !== 'string') { @@ -19,9 +17,7 @@ export const validateInviteToken = async (token) => { }); } - const room = Rooms.findOneById(inviteData.rid, { - fields: { _id: 1, name: 1, fname: 1, t: 1, prid: 1 }, - }); + const room = await Rooms.findOneById(inviteData.rid); if (!room) { throw new Meteor.Error('error-invalid-room', 'The invite token is invalid.', { method: 'validateInviteToken', diff --git a/app/irc/README.md b/apps/meteor/app/irc/README.md similarity index 100% rename from app/irc/README.md rename to apps/meteor/app/irc/README.md diff --git a/app/irc/index.js b/apps/meteor/app/irc/index.js similarity index 100% rename from app/irc/index.js rename to apps/meteor/app/irc/index.js diff --git a/app/irc/server/index.js b/apps/meteor/app/irc/server/index.js similarity index 100% rename from app/irc/server/index.js rename to apps/meteor/app/irc/server/index.js diff --git a/apps/meteor/app/irc/server/irc-bridge/index.js b/apps/meteor/app/irc/server/irc-bridge/index.js new file mode 100644 index 000000000000..855f68acdded --- /dev/null +++ b/apps/meteor/app/irc/server/irc-bridge/index.js @@ -0,0 +1,238 @@ +import { Meteor } from 'meteor/meteor'; +import Queue from 'queue-fifo'; +import moment from 'moment'; +import _ from 'underscore'; +import { Settings } from '@rocket.chat/models'; + +import * as peerCommandHandlers from './peerHandlers'; +import * as localCommandHandlers from './localHandlers'; +import { callbacks } from '../../../../lib/callbacks'; +import * as servers from '../servers'; +import { Logger } from '../../../logger/server'; + +const logger = new Logger('IRC Bridge'); +const queueLogger = logger.section('Queue'); + +let removed = false; +const updateLastPing = _.throttle( + Meteor.bindEnvironment(() => { + if (removed) { + return; + } + Settings.upsert( + { _id: 'IRC_Bridge_Last_Ping' }, + { + $set: { + value: new Date(), + }, + }, + ); + }), + 1000 * 10, +); + +class Bridge { + constructor(config) { + // General + this.config = config; + + // Workaround for Rocket.Chat callbacks being called multiple times + this.loggedInUsers = []; + + // Server + const Server = servers[this.config.server.protocol]; + + this.server = new Server(this.config); + + this.setupPeerHandlers(); + this.setupLocalHandlers(); + + // Command queue + this.queue = new Queue(); + this.queueTimeout = 5; + } + + init() { + this.initTime = new Date(); + removed = false; + this.loggedInUsers = []; + + const lastPing = Promise.await(Settings.findOneById('IRC_Bridge_Last_Ping')); + if (lastPing) { + if (Math.abs(moment(lastPing.value).diff()) < 1000 * 30) { + this.log('Not trying to connect.'); + this.remove(); + return; + } + } + + this.log('Connecting.'); + updateLastPing(); + this.server.register(); + + this.server.on('registered', () => { + this.logQueue('Starting...'); + + this.runQueue(); + }); + } + + stop() { + this.server.disconnect(); + } + + remove() { + this.log('Removing current connection.'); + removed = true; + this.server = null; + this.removeLocalHandlers(); + } + + /** + * Log helper + */ + log(message) { + // TODO logger: debug? + logger.info(message); + } + + logQueue(message) { + // TODO logger: debug? + queueLogger.info(message); + } + + /** + * + * + * Queue + * + * + */ + onMessageReceived(from, command, ...parameters) { + this.queue.enqueue({ from, command, parameters }); + } + + async runQueue() { + if (!this.server) { + return; + } + + const lastResetTime = Settings.findOneById('IRC_Bridge_Reset_Time'); + if (lastResetTime && lastResetTime.value > this.initTime) { + this.stop(); + this.remove(); + return; + } + + updateLastPing(); + + // If it is empty, skip and keep the queue going + if (this.queue.isEmpty()) { + return setTimeout(this.runQueue.bind(this), this.queueTimeout); + } + + // Get the command + const item = this.queue.dequeue(); + + this.logQueue(`Processing "${item.command}" command from "${item.from}"`); + + // Handle the command accordingly + try { + // Handle the command accordingly + switch (item.from) { + case 'local': + if (!localCommandHandlers[item.command]) { + throw new Error(`Could not find handler for local:${item.command}`); + } + + await localCommandHandlers[item.command].apply(this, item.parameters); + break; + case 'peer': + if (!peerCommandHandlers[item.command]) { + throw new Error(`Could not find handler for peer:${item.command}`); + } + + await peerCommandHandlers[item.command].apply(this, item.parameters); + break; + } + } catch (e) { + this.logQueue(e); + } + + // Keep the queue going + setTimeout(this.runQueue.bind(this), this.queueTimeout); + } + + /** + * + * + * Peer + * + * + */ + setupPeerHandlers() { + this.server.on('peerCommand', (cmd) => { + this.onMessageReceived('peer', cmd.identifier, cmd.args); + }); + } + + /** + * + * + * Local + * + * + */ + setupLocalHandlers() { + // Auth + callbacks.add('afterValidateLogin', this.onMessageReceived.bind(this, 'local', 'onLogin'), callbacks.priority.LOW, 'irc-on-login'); + callbacks.add( + 'afterCreateUser', + this.onMessageReceived.bind(this, 'local', 'onCreateUser'), + callbacks.priority.LOW, + 'irc-on-create-user', + ); + // Joining rooms or channels + callbacks.add( + 'afterCreateChannel', + this.onMessageReceived.bind(this, 'local', 'onCreateRoom'), + callbacks.priority.LOW, + 'irc-on-create-channel', + ); + callbacks.add( + 'afterCreateRoom', + this.onMessageReceived.bind(this, 'local', 'onCreateRoom'), + callbacks.priority.LOW, + 'irc-on-create-room', + ); + callbacks.add('afterJoinRoom', this.onMessageReceived.bind(this, 'local', 'onJoinRoom'), callbacks.priority.LOW, 'irc-on-join-room'); + // Leaving rooms or channels + callbacks.add('afterLeaveRoom', this.onMessageReceived.bind(this, 'local', 'onLeaveRoom'), callbacks.priority.LOW, 'irc-on-leave-room'); + // Chatting + callbacks.add( + 'afterSaveMessage', + this.onMessageReceived.bind(this, 'local', 'onSaveMessage'), + callbacks.priority.LOW, + 'irc-on-save-message', + ); + // Leaving + callbacks.add('afterLogoutCleanUp', this.onMessageReceived.bind(this, 'local', 'onLogout'), callbacks.priority.LOW, 'irc-on-logout'); + } + + removeLocalHandlers() { + callbacks.remove('afterValidateLogin', 'irc-on-login'); + callbacks.remove('afterCreateUser', 'irc-on-create-user'); + callbacks.remove('afterCreateChannel', 'irc-on-create-channel'); + callbacks.remove('afterCreateRoom', 'irc-on-create-room'); + callbacks.remove('afterJoinRoom', 'irc-on-join-room'); + callbacks.remove('afterLeaveRoom', 'irc-on-leave-room'); + callbacks.remove('afterSaveMessage', 'irc-on-save-message'); + callbacks.remove('afterLogoutCleanUp', 'irc-on-logout'); + } + + sendCommand(command, parameters) { + this.server.emit('onReceiveFromLocal', command, parameters); + } +} + +export default Bridge; diff --git a/app/irc/server/irc-bridge/localHandlers/index.js b/apps/meteor/app/irc/server/irc-bridge/localHandlers/index.js similarity index 100% rename from app/irc/server/irc-bridge/localHandlers/index.js rename to apps/meteor/app/irc/server/irc-bridge/localHandlers/index.js diff --git a/app/irc/server/irc-bridge/localHandlers/onCreateRoom.js b/apps/meteor/app/irc/server/irc-bridge/localHandlers/onCreateRoom.js similarity index 85% rename from app/irc/server/irc-bridge/localHandlers/onCreateRoom.js rename to apps/meteor/app/irc/server/irc-bridge/localHandlers/onCreateRoom.js index 42e01bd78b9f..07caf87bd140 100644 --- a/app/irc/server/irc-bridge/localHandlers/onCreateRoom.js +++ b/apps/meteor/app/irc/server/irc-bridge/localHandlers/onCreateRoom.js @@ -1,4 +1,4 @@ -import { Users } from '../../../../models'; +import { Users } from '../../../../models/server'; export default function handleOnCreateRoom(user, room) { const users = Users.findByRoomId(room._id); diff --git a/app/irc/server/irc-bridge/localHandlers/onCreateUser.js b/apps/meteor/app/irc/server/irc-bridge/localHandlers/onCreateUser.js similarity index 94% rename from app/irc/server/irc-bridge/localHandlers/onCreateUser.js rename to apps/meteor/app/irc/server/irc-bridge/localHandlers/onCreateUser.js index 851c16c628ad..5e1e9442b0e5 100644 --- a/app/irc/server/irc-bridge/localHandlers/onCreateUser.js +++ b/apps/meteor/app/irc/server/irc-bridge/localHandlers/onCreateUser.js @@ -1,6 +1,6 @@ import { Meteor } from 'meteor/meteor'; -import { Users, Rooms } from '../../../../models'; +import { Users, Rooms } from '../../../../models/server'; export default function handleOnCreateUser(newUser) { if (!newUser) { diff --git a/app/irc/server/irc-bridge/localHandlers/onJoinRoom.js b/apps/meteor/app/irc/server/irc-bridge/localHandlers/onJoinRoom.js similarity index 100% rename from app/irc/server/irc-bridge/localHandlers/onJoinRoom.js rename to apps/meteor/app/irc/server/irc-bridge/localHandlers/onJoinRoom.js diff --git a/app/irc/server/irc-bridge/localHandlers/onLeaveRoom.js b/apps/meteor/app/irc/server/irc-bridge/localHandlers/onLeaveRoom.js similarity index 100% rename from app/irc/server/irc-bridge/localHandlers/onLeaveRoom.js rename to apps/meteor/app/irc/server/irc-bridge/localHandlers/onLeaveRoom.js diff --git a/app/irc/server/irc-bridge/localHandlers/onLogin.js b/apps/meteor/app/irc/server/irc-bridge/localHandlers/onLogin.js similarity index 94% rename from app/irc/server/irc-bridge/localHandlers/onLogin.js rename to apps/meteor/app/irc/server/irc-bridge/localHandlers/onLogin.js index a10ae0950f04..7d8d350dd99d 100644 --- a/app/irc/server/irc-bridge/localHandlers/onLogin.js +++ b/apps/meteor/app/irc/server/irc-bridge/localHandlers/onLogin.js @@ -1,6 +1,6 @@ import { Meteor } from 'meteor/meteor'; -import { Users, Rooms } from '../../../../models'; +import { Users, Rooms } from '../../../../models/server'; export default function handleOnLogin(login) { if (login.user === null) { diff --git a/app/irc/server/irc-bridge/localHandlers/onLogout.js b/apps/meteor/app/irc/server/irc-bridge/localHandlers/onLogout.js similarity index 100% rename from app/irc/server/irc-bridge/localHandlers/onLogout.js rename to apps/meteor/app/irc/server/irc-bridge/localHandlers/onLogout.js diff --git a/app/irc/server/irc-bridge/localHandlers/onSaveMessage.js b/apps/meteor/app/irc/server/irc-bridge/localHandlers/onSaveMessage.js similarity index 93% rename from app/irc/server/irc-bridge/localHandlers/onSaveMessage.js rename to apps/meteor/app/irc/server/irc-bridge/localHandlers/onSaveMessage.js index e720091d630f..c9a1499a02d0 100644 --- a/app/irc/server/irc-bridge/localHandlers/onSaveMessage.js +++ b/apps/meteor/app/irc/server/irc-bridge/localHandlers/onSaveMessage.js @@ -1,5 +1,5 @@ import { SystemLogger } from '../../../../../server/lib/logger/system'; -import { Subscriptions, Users } from '../../../../models'; +import { Subscriptions, Users } from '../../../../models/server'; export default function handleOnSaveMessage(message, to) { let toIdentification = ''; diff --git a/app/irc/server/irc-bridge/peerHandlers/disconnected.js b/apps/meteor/app/irc/server/irc-bridge/peerHandlers/disconnected.js similarity index 83% rename from app/irc/server/irc-bridge/peerHandlers/disconnected.js rename to apps/meteor/app/irc/server/irc-bridge/peerHandlers/disconnected.js index e5ed2214f05d..fc432446b5fb 100644 --- a/app/irc/server/irc-bridge/peerHandlers/disconnected.js +++ b/apps/meteor/app/irc/server/irc-bridge/peerHandlers/disconnected.js @@ -1,6 +1,6 @@ import { Meteor } from 'meteor/meteor'; -import { Users } from '../../../../models'; +import { Users } from '../../../../models/server'; export default function handleQUIT(args) { const user = Users.findOne({ diff --git a/app/irc/server/irc-bridge/peerHandlers/index.js b/apps/meteor/app/irc/server/irc-bridge/peerHandlers/index.js similarity index 100% rename from app/irc/server/irc-bridge/peerHandlers/index.js rename to apps/meteor/app/irc/server/irc-bridge/peerHandlers/index.js diff --git a/app/irc/server/irc-bridge/peerHandlers/joinedChannel.js b/apps/meteor/app/irc/server/irc-bridge/peerHandlers/joinedChannel.js similarity index 91% rename from app/irc/server/irc-bridge/peerHandlers/joinedChannel.js rename to apps/meteor/app/irc/server/irc-bridge/peerHandlers/joinedChannel.js index 6555807b5a0b..b17009e54eb5 100644 --- a/app/irc/server/irc-bridge/peerHandlers/joinedChannel.js +++ b/apps/meteor/app/irc/server/irc-bridge/peerHandlers/joinedChannel.js @@ -1,4 +1,4 @@ -import { Users, Rooms } from '../../../../models'; +import { Users, Rooms } from '../../../../models/server'; import { createRoom, addUserToRoom } from '../../../../lib'; export default function handleJoinedChannel(args) { diff --git a/app/irc/server/irc-bridge/peerHandlers/leftChannel.js b/apps/meteor/app/irc/server/irc-bridge/peerHandlers/leftChannel.js similarity index 80% rename from app/irc/server/irc-bridge/peerHandlers/leftChannel.js rename to apps/meteor/app/irc/server/irc-bridge/peerHandlers/leftChannel.js index d9c43ca6437c..e6b8f46f6301 100644 --- a/app/irc/server/irc-bridge/peerHandlers/leftChannel.js +++ b/apps/meteor/app/irc/server/irc-bridge/peerHandlers/leftChannel.js @@ -1,4 +1,4 @@ -import { Users, Rooms } from '../../../../models'; +import { Users, Rooms } from '../../../../models/server'; import { removeUserFromRoom } from '../../../../lib'; export default function handleLeftChannel(args) { @@ -17,5 +17,5 @@ export default function handleLeftChannel(args) { } this.log(`${user.username} left room ${room.name}`); - removeUserFromRoom(room._id, user); + Promise.await(removeUserFromRoom(room._id, user)); } diff --git a/app/irc/server/irc-bridge/peerHandlers/nickChanged.js b/apps/meteor/app/irc/server/irc-bridge/peerHandlers/nickChanged.js similarity index 89% rename from app/irc/server/irc-bridge/peerHandlers/nickChanged.js rename to apps/meteor/app/irc/server/irc-bridge/peerHandlers/nickChanged.js index 9ebc16057f3c..de2956e3302d 100644 --- a/app/irc/server/irc-bridge/peerHandlers/nickChanged.js +++ b/apps/meteor/app/irc/server/irc-bridge/peerHandlers/nickChanged.js @@ -1,4 +1,4 @@ -import { Users } from '../../../../models'; +import { Users } from '../../../../models/server'; export default function handleNickChanged(args) { const user = Users.findOne({ diff --git a/app/irc/server/irc-bridge/peerHandlers/sentMessage.js b/apps/meteor/app/irc/server/irc-bridge/peerHandlers/sentMessage.js similarity index 94% rename from app/irc/server/irc-bridge/peerHandlers/sentMessage.js rename to apps/meteor/app/irc/server/irc-bridge/peerHandlers/sentMessage.js index d4f4bb8ae5d6..cfad046fd725 100644 --- a/app/irc/server/irc-bridge/peerHandlers/sentMessage.js +++ b/apps/meteor/app/irc/server/irc-bridge/peerHandlers/sentMessage.js @@ -1,4 +1,4 @@ -import { Users, Rooms } from '../../../../models'; +import { Users, Rooms } from '../../../../models/server'; import { sendMessage, createDirectRoom } from '../../../../lib'; /* * diff --git a/app/irc/server/irc-bridge/peerHandlers/userRegistered.js b/apps/meteor/app/irc/server/irc-bridge/peerHandlers/userRegistered.js similarity index 95% rename from app/irc/server/irc-bridge/peerHandlers/userRegistered.js rename to apps/meteor/app/irc/server/irc-bridge/peerHandlers/userRegistered.js index 2f42f790e8f5..29c0dad9019d 100644 --- a/app/irc/server/irc-bridge/peerHandlers/userRegistered.js +++ b/apps/meteor/app/irc/server/irc-bridge/peerHandlers/userRegistered.js @@ -1,6 +1,6 @@ import { Meteor } from 'meteor/meteor'; -import { Users } from '../../../../models'; +import { Users } from '../../../../models/server'; export default async function handleUserRegistered(args) { // Check if there is an user with the given username diff --git a/app/irc/server/irc-settings.ts b/apps/meteor/app/irc/server/irc-settings.ts similarity index 100% rename from app/irc/server/irc-settings.ts rename to apps/meteor/app/irc/server/irc-settings.ts diff --git a/app/irc/server/irc.js b/apps/meteor/app/irc/server/irc.js similarity index 92% rename from app/irc/server/irc.js rename to apps/meteor/app/irc/server/irc.js index dd6c4449ab01..de3638169607 100644 --- a/app/irc/server/irc.js +++ b/apps/meteor/app/irc/server/irc.js @@ -1,7 +1,7 @@ import { Meteor } from 'meteor/meteor'; import Bridge from './irc-bridge'; -import { settings } from '../../settings'; +import { settings } from '../../settings/server'; if (!!settings.get('IRC_Enabled') === true) { // Normalize the config values diff --git a/apps/meteor/app/irc/server/methods/resetIrcConnection.ts b/apps/meteor/app/irc/server/methods/resetIrcConnection.ts new file mode 100644 index 000000000000..c72f894b64b0 --- /dev/null +++ b/apps/meteor/app/irc/server/methods/resetIrcConnection.ts @@ -0,0 +1,75 @@ +import { Settings } from '@rocket.chat/models'; +import { Meteor } from 'meteor/meteor'; + +import { settings } from '../../../settings/server'; +import Bridge from '../irc-bridge'; + +Meteor.methods({ + resetIrcConnection() { + const ircEnabled = Boolean(settings.get('IRC_Enabled')); + Settings.updateOne( + { _id: 'IRC_Bridge_Last_Ping' }, + { + $set: { + value: new Date(0), + }, + }, + { + upsert: true, + }, + ); + Settings.updateOne( + { _id: 'IRC_Bridge_Reset_Time' }, + { + $set: { + value: new Date(), + }, + }, + { + upsert: true, + }, + ); + + if (!ircEnabled) { + return { + message: 'Connection_Closed', + params: [], + }; + } + + setTimeout( + Meteor.bindEnvironment(() => { + // Normalize the config values + const config = { + server: { + protocol: settings.get('IRC_Protocol'), + host: settings.get('IRC_Host'), + port: settings.get('IRC_Port'), + name: settings.get('IRC_Name'), + description: settings.get('IRC_Description'), + }, + passwords: { + local: settings.get('IRC_Local_Password'), + peer: settings.get('IRC_Peer_Password'), + }, + }; + // TODO: is this the best way to do this? is this really necessary? + Meteor.ircBridge = new Bridge(config); + Meteor.ircBridge.init(); + }), + 300, + ); + + return { + message: 'Connection_Reset', + params: [], + }; + }, +}); + +declare module 'meteor/meteor' { + // eslint-disable-next-line @typescript-eslint/no-namespace + export namespace Meteor { + export let ircBridge: Bridge; + } +} diff --git a/app/irc/server/servers/RFC2813/codes.js b/apps/meteor/app/irc/server/servers/RFC2813/codes.js similarity index 100% rename from app/irc/server/servers/RFC2813/codes.js rename to apps/meteor/app/irc/server/servers/RFC2813/codes.js diff --git a/app/irc/server/servers/RFC2813/index.js b/apps/meteor/app/irc/server/servers/RFC2813/index.js similarity index 100% rename from app/irc/server/servers/RFC2813/index.js rename to apps/meteor/app/irc/server/servers/RFC2813/index.js diff --git a/app/irc/server/servers/RFC2813/localCommandHandlers.js b/apps/meteor/app/irc/server/servers/RFC2813/localCommandHandlers.js similarity index 100% rename from app/irc/server/servers/RFC2813/localCommandHandlers.js rename to apps/meteor/app/irc/server/servers/RFC2813/localCommandHandlers.js diff --git a/app/irc/server/servers/RFC2813/parseMessage.js b/apps/meteor/app/irc/server/servers/RFC2813/parseMessage.js similarity index 100% rename from app/irc/server/servers/RFC2813/parseMessage.js rename to apps/meteor/app/irc/server/servers/RFC2813/parseMessage.js diff --git a/app/irc/server/servers/RFC2813/peerCommandHandlers.js b/apps/meteor/app/irc/server/servers/RFC2813/peerCommandHandlers.js similarity index 100% rename from app/irc/server/servers/RFC2813/peerCommandHandlers.js rename to apps/meteor/app/irc/server/servers/RFC2813/peerCommandHandlers.js diff --git a/app/irc/server/servers/index.js b/apps/meteor/app/irc/server/servers/index.js similarity index 100% rename from app/irc/server/servers/index.js rename to apps/meteor/app/irc/server/servers/index.js diff --git a/app/issuelinks/client/client.js b/apps/meteor/app/issuelinks/client/client.js similarity index 100% rename from app/issuelinks/client/client.js rename to apps/meteor/app/issuelinks/client/client.js diff --git a/app/issuelinks/client/index.js b/apps/meteor/app/issuelinks/client/index.js similarity index 100% rename from app/issuelinks/client/index.js rename to apps/meteor/app/issuelinks/client/index.js diff --git a/app/issuelinks/server/index.js b/apps/meteor/app/issuelinks/server/index.js similarity index 100% rename from app/issuelinks/server/index.js rename to apps/meteor/app/issuelinks/server/index.js diff --git a/app/issuelinks/server/settings.ts b/apps/meteor/app/issuelinks/server/settings.ts similarity index 100% rename from app/issuelinks/server/settings.ts rename to apps/meteor/app/issuelinks/server/settings.ts diff --git a/apps/meteor/app/katex/client/index.ts b/apps/meteor/app/katex/client/index.ts new file mode 100644 index 000000000000..93ba5b984591 --- /dev/null +++ b/apps/meteor/app/katex/client/index.ts @@ -0,0 +1,248 @@ +import { Random } from 'meteor/random'; +import KatexPackage from 'katex'; +import { unescapeHTML, escapeHTML } from '@rocket.chat/string-helpers'; +import 'katex/dist/katex.min.css'; +import './style.css'; +import type { IMessage } from '@rocket.chat/core-typings'; + +class Boundary { + start: number; + + end: number; + + length(): number { + return this.end - this.start; + } + + extract(str: string): string { + return str.substr(this.start, this.length()); + } +} + +type Delimiter = { + opener: string; + closer: string; + displayMode: boolean; + enabled: () => boolean; +}; + +type OpeningDelimiter = { options: Delimiter; pos: number }; + +type LatexBoundary = { outer: Boundary; inner: Boundary }; + +class Katex { + katex: KatexPackage; + + delimitersMap: Delimiter[]; + + constructor(katex: KatexPackage, { dollarSyntax, parenthesisSyntax }: { dollarSyntax: boolean; parenthesisSyntax: boolean }) { + this.katex = katex; + this.delimitersMap = [ + { + opener: '\\[', + closer: '\\]', + displayMode: true, + enabled: (): boolean => parenthesisSyntax, + }, + { + opener: '\\(', + closer: '\\)', + displayMode: false, + enabled: (): boolean => parenthesisSyntax, + }, + { + opener: '$$', + closer: '$$', + displayMode: true, + enabled: (): boolean => dollarSyntax, + }, + { + opener: '$', + closer: '$', + displayMode: false, + enabled: (): boolean => dollarSyntax, + }, + ]; + } + + findOpeningDelimiter(str: string, start: number): OpeningDelimiter | null { + const matches = this.delimitersMap + .filter((options) => options.enabled()) + .map((options) => ({ + options, + pos: str.indexOf(options.opener, start), + })); + + const positions = matches.filter(({ pos }) => pos >= 0).map(({ pos }) => pos); + + // No opening delimiters were found + if (positions.length === 0) { + return null; + } + + // Take the first delimiter found + const minPos = Math.min(...positions); + + const matchIndex = matches.findIndex(({ pos }) => pos === minPos); + + const match = matches[matchIndex]; + return match; + } + + getLatexBoundaries(str: string, { options: { closer }, pos }: OpeningDelimiter): LatexBoundary | null { + const closerIndex = str.substr(pos + closer.length).indexOf(closer); + if (closerIndex < 0) { + return null; + } + + const inner = new Boundary(); + const outer = new Boundary(); + + inner.start = pos + closer.length; + inner.end = inner.start + closerIndex; + + outer.start = pos; + outer.end = inner.end + closer.length; + + return { + outer, + inner, + }; + } + + // Searches for the first latex block in the given string + findLatex(str: string): (LatexBoundary & { options: Delimiter }) | null { + let start = 0; + let openingDelimiterMatch; + + while ((openingDelimiterMatch = this.findOpeningDelimiter(str, start++)) != null) { + const match = this.getLatexBoundaries(str, openingDelimiterMatch); + if (match?.inner.extract(str).trim().length) { + return { + ...match, + options: openingDelimiterMatch.options, + }; + } + } + + return null; + } + + // Breaks a message to what comes before, after and to the content of a + // matched latex block + extractLatex(str: string, match: LatexBoundary): { before: string; latex: string; after: string } { + const before = str.substr(0, match.outer.start); + const after = str.substr(match.outer.end); + let latex = match.inner.extract(str); + latex = unescapeHTML(latex); + return { + before, + latex, + after, + }; + } + + // Takes a latex math string and the desired display mode and renders it + // to HTML using the KaTeX library + renderLatex = (latex: string, displayMode: Delimiter['displayMode']): string => { + try { + return KatexPackage.renderToString(latex, { + displayMode, + macros: { + '\\href': '\\@secondoftwo', + }, + }); + } catch (e) { + return `
${escapeHTML( + e instanceof Error ? e.message : String(e), + )}
`; + } + }; + + // Takes a string and renders all latex blocks inside it + render(str: string, renderFunction: (latex: string, displayMode: Delimiter['displayMode']) => string): string { + let result = ''; + while (this.findLatex(str) != null) { + // Find the first latex block in the string + const match = this.findLatex(str); + if (!match) { + continue; + } + + const parts = this.extractLatex(str, match); + + // Add to the reuslt what comes before the latex block as well as + // the rendered latex content + const rendered = renderFunction(parts.latex, match.options.displayMode); + result += parts.before + rendered; + // Set what comes after the latex block to be examined next + str = parts.after; + } + result += str; + return result; + } + + public renderMessage(message: string): string; + + public renderMessage(message: IMessage): IMessage; + + public renderMessage(message: string | IMessage): string | IMessage { + if (typeof message === 'string') { + return this.render(message, this.renderLatex); + } + + if (!message.html?.trim()) { + return message; + } + + if (!message.tokens) { + message.tokens = []; + } + + message.html = this.render(message.html, (latex, displayMode) => { + const token = `=!=${Random.id()}=!=`; + message.tokens?.push({ + token, + text: this.renderLatex(latex, displayMode), + }); + return token; + }); + + return message; + } +} + +export function createKatexMessageRendering( + options: { + dollarSyntax: boolean; + parenthesisSyntax: boolean; + }, + _isMessage: true, +): (message: IMessage) => IMessage; +export function createKatexMessageRendering( + options: { + dollarSyntax: boolean; + parenthesisSyntax: boolean; + }, + _isMessage: false, +): (message: string) => string; +export function createKatexMessageRendering( + options: { + dollarSyntax: boolean; + parenthesisSyntax: boolean; + }, + _isMessage: true | false, +): ((message: string) => string) | ((message: IMessage) => IMessage) { + const instance = new Katex(KatexPackage, options); + if (_isMessage) { + return (message: IMessage): IMessage => instance.renderMessage(message); + } + return (message: string): string => instance.renderMessage(message); +} + +export const getKatexHtml = (text: string, katex: { dollarSyntaxEnabled: boolean; parenthesisSyntaxEnabled: boolean }): string => { + return createKatexMessageRendering( + { dollarSyntax: katex.dollarSyntaxEnabled, parenthesisSyntax: katex.parenthesisSyntaxEnabled }, + false, + )(text); +}; diff --git a/app/katex/client/style.css b/apps/meteor/app/katex/client/style.css similarity index 100% rename from app/katex/client/style.css rename to apps/meteor/app/katex/client/style.css diff --git a/app/katex/server/index.js b/apps/meteor/app/katex/server/index.ts similarity index 100% rename from app/katex/server/index.js rename to apps/meteor/app/katex/server/index.ts diff --git a/app/katex/server/settings.ts b/apps/meteor/app/katex/server/settings.ts similarity index 100% rename from app/katex/server/settings.ts rename to apps/meteor/app/katex/server/settings.ts diff --git a/app/lazy-load/client/index.js b/apps/meteor/app/lazy-load/client/index.js similarity index 100% rename from app/lazy-load/client/index.js rename to apps/meteor/app/lazy-load/client/index.js diff --git a/app/lazy-load/client/lazyloadImage.html b/apps/meteor/app/lazy-load/client/lazyloadImage.html similarity index 100% rename from app/lazy-load/client/lazyloadImage.html rename to apps/meteor/app/lazy-load/client/lazyloadImage.html diff --git a/app/lazy-load/client/lazyloadImage.js b/apps/meteor/app/lazy-load/client/lazyloadImage.js similarity index 100% rename from app/lazy-load/client/lazyloadImage.js rename to apps/meteor/app/lazy-load/client/lazyloadImage.js diff --git a/app/highlight-words/index.js b/apps/meteor/app/lazy-load/index.js similarity index 100% rename from app/highlight-words/index.js rename to apps/meteor/app/lazy-load/index.js diff --git a/apps/meteor/app/lib/README.md b/apps/meteor/app/lib/README.md new file mode 100644 index 000000000000..708a9a21790e --- /dev/null +++ b/apps/meteor/app/lib/README.md @@ -0,0 +1,71 @@ +## Rocket.Chat main library + +This package contains the main libraries of Rocket.Chat. + +### APIs + +#### Settings + +This is an example to create settings: +```javascript +settingsRegistry.addGroup('Settings_Group', function() { + this.add('SettingInGroup', 'default_value', { type: 'boolean', public: true }); + + this.section('Group_Section', function() { + this.add('Setting_Inside_Section', 'default_value', { + type: 'boolean', + public: true, + enableQuery: { + _id: 'SettingInGroup', + value: true + } + }); + }); +}); +``` + +`settingsRegistry.add` type: + +* `string` - Stores a string value + * Additional options: + * `multiline`: boolean +* `int` - Stores an integer value +* `boolean` - Stores a boolean value +* `select` - Creates an `