Compare commits

..
102 Commits
Author SHA1 Message Date
devlikepro 35e92bebbd [core] Bump version to 2024.5.8
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-05-21 08:46:58 +07:00
devlikepro 2bd3e9f556 [core] Update NOWEB engine 2024-05-21 08:46:49 +07:00
devlikepro 60705d1558 [core] Crypto offer 2024-05-20 19:35:10 +07:00
devlikepro 2cbd08c470 [core] Crypto offer 2024-05-20 19:33:44 +07:00
devlikepro 51a501611d [docs] Compare 2024-05-20 15:32:37 +07:00
devlikepro 46bcfb5695 [docs] Live Helper Chat 2024-05-20 14:12:13 +07:00
devlikepro e44bd55df2 [core] geonode 2024-05-18 15:19:32 +07:00
devlikepro efaa090053 [core] geonode 2024-05-18 15:14:15 +07:00
devlikepro 8be13fbc5c [core] Proxy 2024-05-18 14:37:10 +07:00
devlikepro e0a1be1417 [core] Bump to 2024.5.7 2024-05-14 10:13:37 +07:00
devlikepro 7f841f6862 [core] Revert back video fix 2024-05-14 10:13:35 +07:00
devlikepro d1804996d7 [core] Fix send video
Fix #321 #328
2024-05-12 10:47:09 +07:00
devlikepro 34084a7ee8 [docs] Fix pricing 2024-05-12 10:11:00 +07:00
devlikepro fedde8bb87 [docs] 💅 2024-05-10 19:44:11 +07:00
devlikepro 7439e80eec [docs] note 2024-05-10 19:29:34 +07:00
devlikepro e388f361af [docs] note 2024-05-10 19:27:46 +07:00
devlikepro 2a9ed6bac7 [docs] WAHA 2024-05-10 19:25:59 +07:00
devlikepro 5936a86159 [core] Rm line 2024-05-10 18:50:12 +07:00
devlikepro 3b22911fb1 [core] Update NOWEB engine 2024-05-10 18:50:12 +07:00
devlikepro 0dd3762685 [core] Bump version to 2024.5.5 2024-05-10 18:50:12 +07:00
devlikepro fd9106e97e [core] /pricing 2024-05-10 18:50:06 +07:00
devlikepro 5a3d709e4f [core] up year 2024-05-10 18:50:06 +07:00
allburov c0c357dc39 [docs] Adjust header 2024-05-08 18:06:57 +07:00
allburov e76bec3d4f [docs] Fix patreon link 2024-05-08 15:03:18 +07:00
allburov 384b3974f7 [docs] Pricing 2024-05-08 15:02:39 +07:00
allburov 3c37044cd8 [docs] index 2024-05-08 15:00:32 +07:00
allburov 541112a9eb [docs] index 2024-05-08 14:54:55 +07:00
allburov 59d7613485 [docs] badges 2024-05-08 14:52:35 +07:00
allburov d1a579372d [docs] reorder text
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-05-08 11:20:57 +07:00
allburov 16cd247db8 [docs] Up swagger 2024-05-08 11:13:04 +07:00
allburov 872d6d9880 [docs] white label 2024-05-08 11:12:35 +07:00
allburov 79fe322d69 [docs] dashboard 2024-05-08 10:45:11 +07:00
allburov fe6f1cb547 [docs] dashboard video 2024-05-08 10:35:18 +07:00
allburov 8d7fcd0b84 [docs] dashboard video 2024-05-08 10:32:40 +07:00
allburov 46b0c3cee2 [docs] related links 2024-05-08 10:31:58 +07:00
allburov 1ad9c3017c [core] Swagger video 2024-05-08 10:20:46 +07:00
allburov 5d320fa22f [core] /videos 2024-05-08 10:13:40 +07:00
allburov 5e1d9b6463 [core] Add swagger page 2024-05-08 10:01:11 +07:00
allburov 175dfde0b8 [core] Adjust import 2024-05-07 19:20:58 +07:00
allburov 87717ae214 [core] Refactor SwaggerConfiguratorCore.ts 2024-05-07 19:18:47 +07:00
allburov 111c8f3160 [core] Adjust SwaggerConfiguratorCore.ts 2024-05-07 19:18:47 +07:00
allburov 6c756352cf [core] Add Dashboard config 2024-05-07 18:37:43 +07:00
allburov 97a5d11c1f [core] Add SwaggerConfigServiceCore 2024-05-07 18:36:54 +07:00
allburov 44415d824e [core] Detect boolean type 2024-05-07 18:34:36 +07:00
allburov 286e8f3afe [core] REST API 2024-05-07 17:04:46 +07:00
allburov 4c2e3db2d5 [core] No WAHA in text 2024-05-07 16:59:42 +07:00
allburov 6faf699fcc [docs] Changelog 2024-05-07 12:36:56 +07:00
allburov 80b765e56a [core] Bump version to 2024.5.3 2024-05-07 12:34:17 +07:00
allburov 3f9ebe5c8c [core] Use local cache, fix 2.2412.54 version
fix #316
2024-05-07 12:30:24 +07:00
allburov 481371fd03 [docs] Add Dashboard Overview 2024-05-06 12:45:03 +07:00
allburov 36c2165fc3 [docs] Add docs link 2024-05-06 11:31:55 +07:00
allburov 36402626e0 [docs] Add #315 to changelog 2024-05-06 10:55:13 +07:00
allburov 40c39e61e1 [docs] disclaimer 2024-05-06 10:51:03 +07:00
allburov 4e1b13e776 [docs] Feature first 2024-05-06 10:48:33 +07:00
allburov 7f355ff43a [docs] default password in docker-compose 2024-05-06 09:54:48 +07:00
allburov 22df449013 [docs] speacker 2024-05-04 12:34:17 +07:00
allburov 68303f5124 [docs] Add note about QR event
Fix #314
2024-05-04 12:32:54 +07:00
allburov 33babfef6b [docs] no soon 2024-05-04 12:25:52 +07:00
allburov 910a9185c7 [core] Bump to 2024.5.3 2024-05-04 12:24:58 +07:00
allburov f5bd74dfa1 [core] Prevent starting two sessions with the same name #314 2024-05-04 12:24:58 +07:00
allburov b982640c85 [docs] Dashboard changelog 2024-05-04 10:50:19 +07:00
allburov 245bcc46ed [docs] waha hub 2024-05-04 09:32:52 +07:00
allburov 08a346bfa1 [docs] index 2024-05-04 09:30:51 +07:00
allburov 0cb4dd6d63 [docs] Edit page 2024-05-04 09:25:10 +07:00
allburov 1a7a78cc51 [docs] dashboard 2024-05-04 09:22:59 +07:00
allburov 9b69875b78 [docs] dashboard 2024-05-04 09:22:33 +07:00
allburov 999ae4782b [docs] index 2024-05-04 09:21:07 +07:00
allburov 3c61ca8c94 [docs] No dark mode 2024-05-04 09:21:02 +07:00
allburov 0790e0a0ef [docs] Dashboard 2024-05-04 09:19:01 +07:00
allburov 0a2d77b699 [docs] Fix weigth 2024-05-04 09:17:17 +07:00
allburov 051ada3f21 [docs] index open in new tab 2024-05-03 18:19:17 +07:00
allburov faf8d053dd [docs] Index
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-05-03 18:00:12 +07:00
allburov 5ece56f9b0 [docs] Add WAHA Dashboard, Hub 2024-05-03 17:44:37 +07:00
allburov c4d9474f34 [docs] update swagger 2024-05-03 16:37:55 +07:00
allburov 3b8481ccac [docs] Dashboard stub 2024-05-03 16:33:41 +07:00
allburov a31d0215f5 [core] Correct plus docker-compose.yaml 2024-05-03 16:31:25 +07:00
allburov f6cce68553 [core] Bump version 2024.5.2 2024-05-03 16:31:25 +07:00
allburov 636b100b9f [core] Bump version to 2024.5.1 2024-05-03 11:56:29 +07:00
allburov 7a3574eaa0 [core] Update WEBJS version 2024-05-03 11:56:29 +07:00
allburov 9cd6176e60 [core] Change default password to waha/waha 2024-05-03 11:56:29 +07:00
allburov f2641029cb [core] nest cli 2024-05-02 14:39:18 +07:00
allburov 6350e191f8 [core] Ignore dashboard 2024-05-02 14:38:54 +07:00
allburov c570ba3488 [core] Correct dashboard 2024-05-02 12:05:22 +07:00
allburov b64abd24c8 [core] Configure dashboard right 2024-05-02 12:03:46 +07:00
allburov 13c9ab3962 [core] Adjust dashboard stub 2024-05-02 12:03:46 +07:00
allburov b9f1c6ee79 [core] Adjust swagger 2024-05-02 12:03:46 +07:00
allburov 938170a957 [core] Add Dashboard 2024-05-02 12:03:46 +07:00
allburov ca0a28c0cf [core] Logout if logout is true 2024-05-02 09:42:25 +07:00
allburov c3967173a1 [core] Enable cors 2024-04-28 17:35:52 +07:00
allburov 9ebbd9a1fd [docs] no MOBILE yet 2024-04-23 11:03:39 +07:00
allburov 16e343ca19 [docs] Labels 2024-04-21 18:54:55 +07:00
allburov 1de9132f16 [core] Remove ignore 2024-04-21 18:49:53 +07:00
allburov dad54a8e47 [core] Pin WEBJS version to 2.2412.54 2024-04-21 17:30:16 +07:00
allburov 7d73b96b78 [core] Fix send voice 2024-04-21 17:08:08 +07:00
allburov 1260fe34aa [core] Bump version to 2024.4.4 2024-04-21 16:35:43 +07:00
allburov 3b4678e059 [core] Add GET /api/sessions/{session} endpoint 2024-04-21 16:35:28 +07:00
allburov ff8294b5db [core] Add patron portal link 2024-04-21 16:14:54 +07:00
allburov 7e94e19f5d [core] NOWEB - add GET /api/contacts/profile-picture 2024-04-21 16:14:54 +07:00
allburov ae18e2575a [docs] Add tier 2024-04-21 16:01:35 +07:00
allburov a5c493a29c [docs] Add tier 2024-04-17 13:45:14 +07:00
allburov 8ee89fe51c [docs] pro tier 2024-04-15 09:21:46 +07:00
allburov b4909847bf [docs] link 2024-04-15 09:16:32 +07:00
86 changed files with 3010 additions and 333 deletions

No files matched your search

-5
View File
@@ -1,8 +1,3 @@
ignore:
teams:
- no-labels
users:
- allburov
teamLabels:
- team: waha-patrons-pro
label: patron:PRO
+6
View File
@@ -1,3 +1,9 @@
exclude: |
(?x)^(
^src/dashboard/.*|
^src/core/engines/webjs/.*html
)$
repos:
- repo: local
hooks:
+3 -2
View File
@@ -4,7 +4,9 @@
<img src="./docs/site/static/images/logo.png" alt="Image" />
</p>
**WAHA** - **W**hats**A**pp **H**TTP **A**PI that you can install on your own server and run in less than 5 minutes!
**WAHA** - **W**hats**A**pp **H**TTP **A**PI (REST API) that you can install on your own server and run in less than 5 minutes!
[![Docker Pulls](https://img.shields.io/docker/pulls/devlikeapro/whatsapp-http-api)](https://hub.docker.com/r/devlikeapro/whatsapp-http-api)
- Documentation: [https://waha.devlike.pro/](https://waha.devlike.pro/)
- Swagger Example: [https://waha.devlike.pro/swagger](https://waha.devlike.pro/swagger)
@@ -203,4 +205,3 @@ curl -d "{\"chatId\": \"${PHONE}@c.us\", \"text\": \"Hello from WhatsApp HTTP AP
## What is next?
[Go and read the full documentation!](https://waha.devlike.pro/docs/overview/introduction/)
+21 -13
View File
@@ -21,14 +21,20 @@ services:
- './.sessions:/app/.sessions'
environment:
# Environment variables from https://waha.devlike.pro/docs/how-to/config/
- WHATSAPP_RESTART_ALL_SESSIONS=True
- WHATSAPP_HOOK_URL=https://httpbin.org/post
- WHATSAPP_HOOK_EVENTS=message
# - WHATSAPP_RESTART_ALL_SESSIONS=True
# - WHATSAPP_HOOK_URL=https://httpbin.org/post
# - WHATSAPP_HOOK_EVENTS=message
# - WHATSAPP_API_HOSTNAME=localhost
- WHATSAPP_DEFAULT_ENGINE=WEBJS
- WHATSAPP_API_KEY=321
- WHATSAPP_SWAGGER_USERNAME=admin
- WHATSAPP_SWAGGER_PASSWORD=123
- WHATSAPP_API_HOSTNAME=localhost
# Username and password for Swagger
- WHATSAPP_SWAGGER_USERNAME=swagger
- WHATSAPP_SWAGGER_PASSWORD=admin
# Username and password for WAHA Dashboard
# you can use the same username and password for both Swagger and Dashboard
# Default - waha / waha
- WAHA_DASHBOARD_USERNAME=waha
- WAHA_DASHBOARD_PASSWORD=waha
restart: always
whatsapp-http-api-plus--mongodb:
@@ -40,14 +46,16 @@ services:
- './.sessions:/app/.sessions'
environment:
# Environment variables from https://waha.devlike.pro/docs/how-to/config/
- WHATSAPP_RESTART_ALL_SESSIONS=True
- WHATSAPP_HOOK_URL=https://httpbin.org/post
- WHATSAPP_HOOK_EVENTS=message
# - WHATSAPP_RESTART_ALL_SESSIONS=True
# - WHATSAPP_HOOK_URL=https://httpbin.org/post
# - WHATSAPP_HOOK_EVENTS=message
# - WHATSAPP_API_KEY=321
# - WHATSAPP_SWAGGER_USERNAME=admin
# - WHATSAPP_SWAGGER_PASSWORD=123
# - WAHA_DASHBOARD_USERNAME=admin
# - WAHA_DASHBOARD_PASSWORD=123
# - WHATSAPP_API_HOSTNAME=localhost
- WHATSAPP_DEFAULT_ENGINE=WEBJS
- WHATSAPP_API_KEY=321
- WHATSAPP_SWAGGER_USERNAME=admin
- WHATSAPP_SWAGGER_PASSWORD=123
- WHATSAPP_API_HOSTNAME=localhost
- WHATSAPP_SESSIONS_MONGO_URL=mongodb://mongodb:27017
restart: always
+14 -4
View File
@@ -35,6 +35,11 @@
url = "/docs/overview/introduction"
parent = "docs"
[[main]]
name = "Install"
weight = 13
url = "/docs/how-to/install"
parent = "docs"
[[main]]
name = "Send messages"
@@ -68,7 +73,7 @@
[[main]]
name = "WAHA Plus"
weight = 30
weight = 20
identifier = "waha-plus"
[[main]]
@@ -95,21 +100,26 @@
url = "https://boosty.to/wa-http-api"
parent = "waha-plus"
[[main]]
name = "Pricing"
weight = 90
url = "/pricing"
[[main]]
name = "Examples"
weight = 20
weight = 30
identifier = "examples"
[[main]]
name = "Python ->"
weight = 21
weight = 31
url = "/docs/examples/python"
parent = "examples"
[[main]]
name = "Kotlin ->"
weight = 22
weight = 32
url = "/docs/examples/kotlin"
parent = "examples"
+5 -5
View File
@@ -68,12 +68,12 @@ fillImage = "1270x740 Center" # normalize image size
footer = 'This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with WhatsApp or any of its subsidiaries or its affiliates.<br/>The official WhatsApp website can be found at <a class="text-muted" href="https://whatsapp.com/">https://whatsapp.com/</a>.<br/>"WhatsApp" as well as related names, marks, emblems and images are registered trademarks of their respective owners.'
# Feed
copyRight = "Copyright (c) 2021-2023 Dev Like A Pro"
copyRight = "Copyright (c) 2021-2024 Dev Like A Pro"
# Alert
alert = true
alertDismissable = true
alertText = "<a class=\"alert-link stretched-link\" href=\"https://waha.devlike.pro/docs/how-to/plus-version/\">Support the project and get WAHA Plus version! -></a>"
alertText = "📢 <a class=\"alert-link stretched-link\" href=\"https://waha.devlike.pro/docs/how-to/waha-dashboard/\">WAHA Dashboard - UI to manage your WhatsApp sessions!</a> 📢"
# Edit Page
# repoHost [Github | Gitea | GitLab | Bitbucket | BitbucketServer ] is used for building the edit link based on git hoster
@@ -81,8 +81,8 @@ repoHost = "GitHub"
#repoHost = "Gitea"
docsRepo = "https://github.com/devlikeapro/whatsapp-http-api"
docsRepoBranch = "core"
docsRepoSubPath = ""
editPage = false
docsRepoSubPath = "docs/site"
editPage = true
lastMod = false
[sections]
@@ -95,7 +95,7 @@ lastMod = false
flexSearch = true
searchSectionsShow = []
searchSectionsIndex = []
darkMode = true
darkMode = false
bootStrapJs = true
breadCrumb = false
highLight = true
+1 -1
View File
@@ -1,5 +1,5 @@
---
title: "Examples"
title: "🧩 Examples"
description: "Examples for different languages."
lead: "Examples for different languages."
date: 2020-10-06T08:49:15+00:00
@@ -9,7 +9,7 @@ images: ["/images/kotlin-whatsapp.png"]
menu:
docs:
parent: "help"
weight: 630
weight: 631
toc: true
---
@@ -0,0 +1,37 @@
---
title: "Live Helper Chat"
description: "WhatsApp HTTP API + Live Helper Chat integration."
lead: "WhatsApp HTTP API + Live Helper Chat integration."
date: 2020-10-06T08:49:31+00:00
lastmod: 2020-10-06T08:49:31+00:00
draft: false
menu:
docs:
parent: "help"
weight: 632
toc: true
---
<div class="text-center">
![Logo](logo.png)
</div>
Open source
<a href="https://livehelperchat.com/" target="_blank" rel="noopener noreferrer">Live Helper Chat -></a>
system with mobile app, Bot, AI, Voice & Video & ScreenShare.
<div class="text-center">
![Screenshot](screenshot.png)
</div>
👉 Please checkout
<a href="https://doc.livehelperchat.com/docs/integrating/waha" target="_blank" rel="noopener noreferrer">
WhatsApp WAHA integration on Live Helper Chat ->
</a>
documentation for more details how to integrate WhatsApp with Live Helper Chat.
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

@@ -1,5 +1,5 @@
---
title : "Chats"
title : "💬 Chats"
description: "Chats"
lead: ""
date: 2020-10-06T08:48:45+00:00
@@ -1,5 +1,5 @@
---
title: "Configuration"
title: "⚙️ Configuration"
description: "Configuration"
lead: ""
date: 2020-10-06T08:48:45+00:00
@@ -49,7 +49,7 @@ The following environment variables can be used to configure the WAHA.
- `WHATSAPP_SWAGGER_USERNAME=admin` and `WHATSAPP_SWAGGER_PASSWORD=admin` - these variables can be used to protect the Swagger panel
with `admin / admin` credentials. This does not affect API access. Available in **WAHA Plus** only.
Read more about security settings for Swagger and API on [**Security page** ->]({{< relref "/docs/how-to/security" >}}).
Read more about Swagger configuration on [**Swagger page** ->]({{< relref "/docs/how-to/swagger" >}}).
### Proxy
#### Global proxy configuration
@@ -1,5 +1,5 @@
---
title : "Contacts"
title : "👤 Contacts"
description: "Contacts"
lead: ""
date: 2020-10-06T08:48:45+00:00
@@ -1,12 +1,12 @@
---
title: "Deploy"
title: "🚀 Deploy"
description: "How to deploy WAHA"
lead: ""
date: 2020-10-06T08:48:45+00:00
lastmod: 2020-10-06T08:48:45+00:00
draft: false
images: [ ]
weight: 899
weight: 898
---
This page provides useful information to assist you in deploying the project.
@@ -1,5 +1,5 @@
---
title: "Engines"
title: "🏭 Engines"
description: "Engines"
lead: ""
date: 2020-10-06T08:48:45+00:00
@@ -129,8 +129,6 @@ please [create an issue](https://github.com/devlikeapro/whatsapp-http-api/issues
| `POST /api/{session}/auth/qr` | ✔️ | ✔️ | ✔️ |
| `POST /api/{session}/auth/request-code` | ➖ | ✔️ | ➖ |
| `POST /api/{session}/auth/authorize-code` | ➖ | ➖️<br>[#113](https://github.com/devlikeapro/whatsapp-http-api/issues/113) | ➖ |
| `GET /api/{session}/auth/captcha` <br>Only in **MOBILE** engine | ➖ | ➖ | ➖ |
| `POST /api/{session}/auth/captcha` <br>Only in **MOBILE** engine | ➖ | ➖ | ➖ |
| **Screenshot** | | | |
| `POST /api/screenshot` | ✔️ | ➖ | ✔️ |
@@ -176,7 +174,7 @@ please [create an issue](https://github.com/devlikeapro/whatsapp-http-api/issues
| `GET /api/contacts/all` | ✔️ | ➖ | ➖ |
| `GET /api/contacts/check-exists` | ✔️ | ✔️ | ✔️ |
| `GET /api/contacts/about` | ✔️ | ➖ | ➖ |
| `GET /api/contacts/profile-picture` | ✔️ | ➖ | ➖ |
| `GET /api/contacts/profile-picture` | ✔️ | ✔️ | ➖ |
| `POST /api/contacts/block` | ✔️ | ➖ | ➖ |
| `POST /api/contacts/unblock` | ✔️ | ➖ | ➖ |
@@ -1,5 +1,5 @@
---
title : "Groups"
title : "👥 Groups"
description: "Groups"
lead: ""
date: 2020-10-06T08:48:45+00:00
@@ -1,5 +1,5 @@
---
title : "Install"
title : "🔧 Install"
description: "How to install and update WAHA"
lead: ""
date: 2020-10-06T08:48:45+00:00
@@ -1,5 +1,5 @@
---
title: "Other"
title: "🛸 Other"
description: "Other features and API"
lead: ""
date: 2020-10-06T08:48:45+00:00
@@ -1,5 +1,5 @@
---
title : "WAHA Plus"
title : "➕ WAHA Plus"
description: "WAHA Plus"
lead: ""
date: 2020-10-06T08:48:45+00:00
@@ -16,149 +16,10 @@ weight: 900
1. Core ![](/images/versions/core.png) the basic version that meet almost 80% people’s needs. 100% free and open source.
2. Plus ![](/images/versions/plus.png) the version with advanced messages, security, and reliability features.
You support the project and get **WAHA Plus** on
<a href="https://patreon.com/wa_http_api" target="_blank">
<b>
Patreon ->
</b>
</a>
or
<a href="https://boosty.to/wa-http-api" target="_blank">
<b>
Boosty ->
</b>
</a>
.
### Donations
WAHA Plus version is available through **donations** (subscriptions).
**It doesn't require monthly subscriptions, once installed on your server - it always works!**
(until WhatsApp made backward-incompatible changes, and you have to update the image)
{{< alert icon="💡" text="No licence checks or expiration on already installed instances!" />}}
We do not sell **WAHA**, it's not a purchase. It's a donation.
We treat our projects like art. You donate to the project and get a bit more from it as a thank-you. 😊
Treat **WAHA Plus** it as an additional episode, behind-the-scenes videos, our nude photos 😊
{{< alert icon="💡" text="WAHA does not have license checks and expiration - because art can not expire! Enjoy it till it works!" />}}
We donate most of the donations down to the stream to the underlying libraries and tools - JS-community, Node, other libraries authors, personal contributors.
By donating to the **WAHA** you donate to the Open Source world!
## Tiers
You support the project and get WAHA Plus by donating to the project on one of the platforms.
The more you support the project - the more you get!
### Core
| Essential product for your needs! | |
|----------------------------------------------------------------------------------|----------|
| [Send and receive text messages ->]({{< relref "/docs/how-to/send-messages" >}}) | ✔️ |
| [Webhooks ->]({{< relref "/docs/how-to/webhooks" >}}) | ✔️ |
| No license checks on installed instances | ✔️ |
| Messages limit | **∞** |
| [Sessions limit ->]({{< relref "/docs/how-to/sessions" >}}) | **1** |
| **Donation** | **FREE** |
### Plus
| Optimize your experience with extra perks! | |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|
| All in **Core** | ✔️ |
| [Sessions limit ->]({{< relref "/docs/how-to/sessions" >}}) | **∞** |
| [Send and receive files ->]({{< relref "/docs/how-to/send-messages" >}}) | ✔️ |
| [Built-in Security ->]({{< relref "/docs/how-to/security" >}}) | ✔️ |
| [Webhook retries →]({{< relref "/docs/how-to/receive-messages#retries" >}}) | ✔️ |
| [MongoDB support ->]({{< relref "/docs/how-to/storages" >}}) | ✔️ |
| Access to **WAHA Plus** docker image with a personal key. | ✔️ |
| Special [![patron:TIER](https://img.shields.io/badge/patron-TIER-188a42)](https://waha.devlike.pro/docs/how-to/plus-version/#tiers) badge and `patron:TIER` label on [project's issues, PRs and Discussion](https://github.com/devlikeapro/whatsapp-http-api) to highlight your support to the project! | ✔️ |
| **Donation** | **$19** |
### Pro
| Exclusive perks for the professionals! | |
|---------------------------------------------------------------------------------------------|---------|
| All in **Plus** | ✔️ |
| An invitation to **a private Github repository** so you have the **WAHA Plus** source code. | ✔️ |
| Access to a **Discord Server** where we provide support and assistance. | ✔️ |
| **Donation** | **$99** |
For **$19** donation you get:
1. **Secret password** for Docker Hub to download Plus image: `devlikeapro/whatsapp-http-api-plus`.
2. **All updates for one month** for the Plus image.
3. **NO LICENSE CHECKS** on installed instances!
4. **NO LICENSE EXPIRATION** on installed instances! We repeated it twice to make sure that you've got it 😊
{{< alert icon="💡" text="If you stay subscribed - the donation amount will never change for you and always be $19 to get monthly updates!" />}}
## Why WAHA?
What is the difference between **WAHA Plus** and **other SaaS solutions** for WhatsApp HTTP API?
| WAHA Plus | Others |
|:-------------------------------------------------:|----------------------------------------------------------------------------------:|
| ✔️ No limits on **accounts** or **servers**! | ➖ One account for $50/month. |
| ✔️ On-Premise - your server, your infrastructure! | ➖ Insecure cloud solution. |
| ✔️ No data leaks! | ➖ You have to give access to customers' data - phone number, name, your messages. |
| ✔️ No license checks! | ➖ One month |
| ✔️ All messages are **Free**! | ➖ Some solutions have a price for messages - $1/100 messages. |
| ✔️ $19 **donation**! | ➖ Monthly payment starts from $50 |
{{< alert icon="💡" text="If you stay subscribed - the donation amount will never change for you and always be $19 to get monthly updates!" />}}
## Get Plus ![](/images/versions/plus.png)
{{< alert icon="💡" text="If you stay subscribed - the donation amount will never change for you and always be $19 to get monthly updates!" />}}
### Boosty
<p align="center">
<img src="boosty.svg" alt="Patreon" style='width: 40%'/>
<br/>
<br/>
</p>
Support the project and get WAHA Plus version on
<a href="https://boosty.to/wa-http-api" target="_blank">
<b>
Boosty ->
</b>
</a>
Go ahead and get your own WhatsApp HTTP API!
### Patreon
<p align="center">
<img src="patreon.png" alt="Patreon" style='width: 40%'/>
</p>
{{< alert icon="🙏" text="Please consider using Boosty instead of Patreon due to its lower fees 🙏" />}}
Support the project and get WAHA Plus version on
<a href="https://patreon.com/wa_http_api" target="_blank">
<b>
Patreon ->
</b>
</a>
Go ahead and get your own WhatsApp HTTP API!
### Crypto
<p align="center">
<img src="tether-usdt-logo.svg" alt="Tether Logo" style='width: 40%'/>
</p>
If you wish to donate in crypto - please contact us at [crypto@devlike.pro](mailto:crypto@devlike.pro)
with the desired **amount**, **currency** and **network**.
> e.g. "I want to donate $99 in USDT using TRC20 network."
See tiers and available platforms on [**Pricing page ->**](/pricing)
## Patron Portal
<p align="center">
@@ -173,7 +34,7 @@ where you will get the password to download the Plus image and manage your perks
Read more about Patron Portal in
**<a href="https://www.patreon.com/posts/waha-patron-97637416" target="_blank">Patreon -> </a>**
or
**<a href="https://boosty.to/wa-http-api/posts/1011" target="_blank">Boosty -></a>**
**<a href="https://boosty.to/wa-http-api/posts/8319079f-dac1-4179-b954-fcc559097c76" target="_blank">Boosty -></a>**
posts.
### Install Plus
@@ -1,5 +1,5 @@
---
title: "Polls"
title: "📶 Polls"
description: "How to send polls and receive votes"
lead: ""
date: 2020-10-06T08:48:45+00:00
@@ -1,5 +1,5 @@
---
title: "Presence"
title: "✅ Presence"
description: "Presence"
lead: ""
date: 2020-10-06T08:48:45+00:00
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

@@ -0,0 +1,97 @@
---
title: "🌐 Proxy"
description: "Proxy"
lead: ""
date: 2020-10-06T08:48:45+00:00
lastmod: 2020-10-06T08:48:45+00:00
draft: false
images: [ ]
weight: 126
---
## Overview
If you're experiencing issues scanning QR codes in WhatsApp, especially with **Indian 🇮🇳 phone numbers**,
using a proxy located close to the phone number's location may help resolve the problem.
It affects both **WEBJS** and **NOWEB** [engines]({{< relref "/docs/how-to/engines" >}}).
### Symptoms
1. You start a new session in WhatsApp.
2. Scan the QR code.
3. Experience a long loading time.
4. Face login failures or instant logout.
5. Encounter a new QR code or enter a FAILED state immediately.
<div class="text-center">
![WhatsApp - could not login](could-not-login.png)
</div>
## Configuration
There are two ways to set up proxies:
1. Global Setting (for all sessions per container)
2. Per Session Configuration (you can define a proxy for each session when you start it)
### Global Proxy Configuration
To use a proxy, you can set the following environment variables:
- `WHATSAPP_PROXY_SERVER=localhost:3128`: Set the proxy server in the format `host:port`, without HTTP or HTTPS.
- `WHATSAPP_PROXY_SERVER_USERNAME=username` and `WHATSAPP_PROXY_SERVER_PASSWORD=password`: Configure credentials for the proxy.
- `WHATSAPP_PROXY_SERVER_LIST=host1.example.com:3138,host2.example.com:3138`: Specify a comma-separated list of addresses to use, utilizing a round-robin algorithm for server selection.
- `WHATSAPP_PROXY_SERVER_INDEX_PREFIX=proxy-`: Define a session name prefix to choose the appropriate proxy from the list.
Read more about it on [**Configuration page** ->]({{< relref "/docs/how-to/config#proxy" >}}).
### Session Proxy Configuration
You can configure proxy for a session by setting `config.proxy` fields when you `POST /api/sessions/start`:
- `server` - proxy server address, without `http://` or `https://` prefixes
- `username` and `password` - set this if the proxy requires authentication
**No authentication**
```json
{
"name": "default",
"config": {
"proxy": {
"server": "localhost:3128"
}
}
}
```
**Proxy with authentication**
```json
{
"name": "default",
"config": {
"proxy": {
"server": "localhost:3128",
"username": "username",
"password": "P@ssw0rd"
}
}
}
```
The configuration is saved and will be applied if the docker container restarts,
and you set `WHATSAPP_RESTART_ALL_SESSIONS` environment variables.
Read more about it in [Autostart section](#autostart).
Read more about it on [**Sessions page** ->]({{< relref "/docs/how-to/sessions#configure-proxy" >}}).
## Recommended Proxies
### Proxy6
We recommend using <b><a href="https://proxy6.net/en/?r=628046" target="_blank">Proxy6</a></b>
where you can get a DEDICATED proxy (only you'll use it) for **$1.77 per month**.
Apply the promocode get a **5% discount** on your purchase.
```
9W9oVxx3UX
```
### Geonode
Another option is <b><a href="https://geonode.com/invite/89107" target="_blank">Geonode</a></b>.
@@ -1,5 +1,5 @@
---
title : "Receive messages"
title : "📥 Receive messages"
description: "Receive messages"
lead: ""
date: 2020-10-06T08:48:45+00:00
@@ -1,5 +1,5 @@
---
title : "Security"
title : "🔒 Security"
description: "Security"
lead: ""
date: 2020-10-06T08:48:45+00:00
@@ -15,7 +15,9 @@ We do not recommend exposing the API on any public networks!
Either protect the API with [Api Key](https://www.fortinet.com/resources/cyberglossary/api-key) or deny access by using
firewalls.
## Swagger Security ![](/images/versions/plus.png)
👉 Security options are available in [**WAHA Plus**]({{< relref "plus-version#plus" >}}) ![](/images/versions/plus.png) version only.
## Swagger Security
### Username and password
If you want to hide the project Swagger panel under the password - run the following command to hide under `admin/admin`
login and password.
@@ -35,8 +37,15 @@ You also can hide swagger completely by setting `WHATSAPP_SWAGGER_ENABLED=false`
{{< alert icon="👉" text="Disabling Swagger does not protect the API, please use API security as well" />}}
## Dashboard Security
When running WAHA you can set the following environment variables to configure the dashboard:
- `WAHA_DASHBOARD_ENABLED=true` - enable or disable the dashboard, by default `true`. Set to `false` to disable the dashboard.
- `WAHA_DASHBOARD_USERNAME=waha` - username used to log in, by default `waha`.
- `WAHA_DASHBOARD_PASSWORD=waha` - password used to log in, by default `waha`.
## API security ![](/images/versions/plus.png)
Read more about [**Dashboard ->**]({{< relref "/docs/how-to/waha-dashboard" >}})
## API security
You can protect the API by requiring Api Key in a request's headers.
@@ -72,7 +81,7 @@ headers = {
requests.get("http://localhost:3000/api/sessions", headers=headers)
```
## Webhook security ![](/images/versions/plus.png)
## Webhook security
To make sure that you get a webhook from your WAHA instance - you can use **HMAC authentication**.
Read more about it on [Webhooks page ->]({{< relref "/docs/how-to/webhooks#hmac-authentication" >}})
@@ -1,12 +1,12 @@
---
title : "Send messages"
title : "📤 Send messages"
description: "Send messages"
lead: ""
date: 2020-10-06T08:48:45+00:00
lastmod: 2020-10-06T08:48:45+00:00
draft: false
images: []
weight: 110
weight: 115
---
We consider that you've run docker container and authenticated the session with QR code.
@@ -87,7 +87,7 @@ To reply on a message - use `POST /api/reply` with example payload.
}
```
#### Reply files ![](/images/versions/plus-soon.png)
#### Reply files ![](/images/versions/plus.png)
WAHA does not support reply with files (images, voice, etc.). If you're interested in it - please create an issue in GitHub.
@@ -273,6 +273,8 @@ You can send voice messages in two ways:
1. Provide a URL for the voice.
2. Encode the whole file content into base64 and send it in the request body.
Please make sure your file has **OPUS** encoding and packed in OGG container.
#### URL
```json
{
@@ -280,8 +282,7 @@ You can send voice messages in two ways:
"chatId": "11111111111@c.us",
"file": {
"mimetype": "audio/ogg; codecs=opus",
"filename": "voice-message.mp3",
"url": "https://github.com/devlikeapro/whatsapp-http-api/raw/core/examples/dev.likeapro.mp3"
"url": "https://github.com/devlikeapro/whatsapp-http-api/raw/core/examples/dev.likeapro.opus"
},
"caption": "string"
}
@@ -319,7 +320,7 @@ You can send voice messages in two ways:
"file": {
"mimetype": "video/mp4",
"filename": "video.mp4",
"url": "https://github.com/devlikeapro/whatsapp-http-api/raw/core/examples/dev.likeapro.mp3"
"url": "https://github.com/devlikeapro/whatsapp-http-api/raw/core/examples/video.mp4"
}
}
```
@@ -1,5 +1,5 @@
---
title: "Sessions"
title: "🖥️ Sessions"
description: "Sessions"
lead: ""
date: 2020-10-06T08:48:45+00:00
@@ -46,7 +46,7 @@ and you set `WHATSAPP_RESTART_ALL_SESSIONS` environment variables.
Read more about it in [Autostart section](#autostart).
#### Configure proxy
You can configure proxy for a session by setting `config.proxy` fields:
You can configure proxy for a session by setting `config.proxy` fields when you `POST /api/sessions/start`:
- `server` - proxy server address, without `http://` or `https://` prefixes
- `username` and `password` - set this if the proxy requires authentication
@@ -82,7 +82,7 @@ and you set `WHATSAPP_RESTART_ALL_SESSIONS` environment variables.
Read more about it in [Autostart section](#autostart).
You can configure proxy when for all sessions by set up environment variables.
Read more about it on [**Configuration page** ->]({{< relref "/docs/how-to/config#proxy" >}}).
Read more about it on [**Proxy page** ->]({{< relref "/docs/how-to/proxy" >}}) or [**Configuration page** ->]({{< relref "/docs/how-to/config#proxy" >}}).
#### Enable debug
You can enable debug mode for a session by setting `config.debug` field to `true`.
@@ -108,7 +108,30 @@ The response:
[
{
"name": "default",
"status": "STARTING"
"status": "WORKING",
"config": {
"proxy": null,
"webhooks": [
{
"url": "https://httpbin.org/post",
"events": [
"message",
"session.status"
],
"hmac": null,
"retries": null,
"customHeaders": null
}
],
"debug": false
},
"me": {
"id": "79111111@c.us",
"pushName": "WAHA"
},
"engine": {
"engine": "NOWEB"
}
}
]
```
@@ -117,6 +140,38 @@ You can add `?all=true` parameter to the request `GET /api/session?all=True` it'
including **STOPPED**,
so you can know which one will be restarted if you set `WHATSAPP_RESTART_ALL_SESSIONS=True` environment variable.
### Get session
To get information about a specific session - call `GET /api/sessions/{session}`.
```json
{
"name": "default",
"status": "WORKING",
"config": {
"proxy": null,
"webhooks": [
{
"url": "https://httpbin.org/post",
"events": [
"message",
"session.status"
],
"hmac": null,
"retries": null,
"customHeaders": null
}
],
"debug": false
},
"me": {
"id": "79111111@c.us",
"pushName": "WAHA"
},
"engine": {
"engine": "NOWEB"
}
}
```
### Stop
In order to stop a new session - call `POST /api/sessions/stop`
@@ -279,7 +334,9 @@ See the list of engines [**that support the feature ->**]({{< relref "/docs/how-
The `session.status` event is triggered when the session status changes.
- `STOPPED` - session is stopped
- `STARTING` - session is starting
- `SCAN_QR_CODE` - session is required to scan QR code or login via phone number
- `SCAN_QR_CODE` - session is required to scan QR code or login via phone number.
- When you receive the `session.status` event with `SCAN_QR_CODE` status, you can [**fetch updated QR ->**]({{< relref "/docs/how-to/sessions#get-qr" >}})
- The `SCAN_QR_CODE` is issued every time when QR updated (WhatsApp requirements)
- `WORKING` - session is working and ready to use
- `FAILED` - session is failed due to some error. It's likely that authorization is required again or device has been disconnected from that account.
Try to restart the session and if it doesn't help - logout and start the session again.
@@ -1,5 +1,5 @@
---
title: "Storages"
title: "🗄️ Storages"
description: "Storages"
lead: ""
date: 2020-10-06T08:48:45+00:00
@@ -0,0 +1,60 @@
---
title: "📚 Swagger (OpenAPI)"
description: "Swagger (OpenAPI)"
lead: ""
date: 2020-10-06t08:48:45+00:00
lastmod: 2020-10-06t08:48:45+00:00
draft: false
images: [ ]
weight: 111
---
## Overview
The project provides HTTP API (REST), which is documented with OpenAPI specification and Swagger UI.
<video autoplay loop muted playsinline controls='noremoteplayback' width="100%" poster='/images/swagger.png'>
<source src="/videos/swagger-overview.webm" type="video/webm" />
Download the <a href="/videos/swagger-overview.webm">Swagger Overview video</a> .
</video>
You can see all available endpoints, request/response examples, and even execute them directly from the Swagger UI.
Later version:
- [OpenAPI specification ->](/swagger/openapi.json)
- [Swagger documentation ->](/swagger)
You can find Swagger documentation on the following url after you
[install and started]( {{< relref "/docs/how-to/install" >}}) it:
- Swagger: [http://localhost:3000](http://localhost:3000).
- OpenAPI: [http://localhost:3000/-json](http://localhost:3000/-json).
## Configuration
- `WHATSAPP_SWAGGER_CONFIG_ADVANCED=true` - enables advanced configuration options for Swagger documentation - you can customize host, port and base URL for the requests.
Disabled by default.
- `WHATSAPP_SWAGGER_ENABLED=false` - disables Swagger documentation. Enabled by default. Available in **WAHA Plus** only.
- `WHATSAPP_SWAGGER_USERNAME=admin` and `WHATSAPP_SWAGGER_PASSWORD=admin` - these variables can be used to protect the Swagger panel
with `admin / admin` credentials. This does not affect API access. Available in **WAHA Plus** only.
Read more about security settings for Swagger and API on [**Security page** ->]({{< relref "/docs/how-to/security" >}}).
### White label
You can show your own brand in the Swagger documentation.
<img src="swagger-white-label.png" onclick="window.open(this.src)" style="cursor: pointer;">
<br/>
<br/>
👉 Swagger White Label is available in [**WAHA Plus**]({{< relref "plus-version#plus" >}}) ![](/images/versions/plus.png) version only.
Use the following environment variables to customize the Swagger documentation:
- `WHATSAPP_SWAGGER_TITLE` - the title of the Swagger documentation and some other places.
- `WHATSAPP_SWAGGER_DESCRIPTION` - Markdown formatted description of your API.
- `WHATSAPP_SWAGGER_EXTERNAL_DOC_URL` - URL to the external documentation.
**Example** (consider using [docker-compose](https://github.com/devlikeapro/whatsapp-http-api/blob/core/docker-compose.yaml#L15-L38) or other methods to store these settings):
```bash
docker run -it -p 3000:3000 -e WHATSAPP_SWAGGER_TITLE="AwesomeCRM" -e 'WHATSAPP_SWAGGER_DESCRIPTION=<p>FantasticFindz - Discover unique treasures from around the world at unbelievable prices!<br/> <a href='https://google.com'>Read more about us!</a></p>' -e "WHATSAPP_SWAGGER_EXTERNAL_DOC_URL=https://google.com" devlikeapro/whatsapp-http-api-plus
```
Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

@@ -0,0 +1,57 @@
---
title: "📊 Dashboard"
description: "Dashboard"
lead: ""
date: 2020-10-06T08:48:45+00:00
lastmod: 2020-10-06T08:48:45+00:00
draft: false
images: [ ]
weight: 110
---
## Overview
**Dashboard** is a UI to manage your WhatsApp sessions!
<video autoplay loop muted playsinline controls='noremoteplayback' width="100%" poster='/images/waha-dashboard.png'>
<source src="/videos/waha-dashboard-overview.webm" type="video/webm" />
Download the <a href="/videos/waha-dashboard-overview.webm">Dashboard Overview video</a> .
</video>
👉 **Dashboard** is available in [**WAHA Plus**]({{< relref "plus-version#plus" >}}) ![](/images/versions/plus.png) version only.
You can access **Dashboard** by running the project and opening
<a href="http://localhost:3000/dashboard" target="_blank">http://localhost:3000/dashboard</a>
(or similar, but with <a href="/dashboard" target="_blank">/dashboard</a> at the end).
ℹ️ **Default username and password**: `waha/waha`
```bash
docker run -it -p 3000:3000/tcp devlikeapro/whatsapp-http-api-plus
```
If you're using [API Key]({{< relref "security" >}}), remember to set up the key in the dashboard.
![Dashboard with API Key](waha-dashboard-key.png)
## Configuration
When running WAHA you can set the following environment variables to configure the dashboard:
- `WAHA_DASHBOARD_ENABLED=true` - enable or disable the dashboard, by default `true`. Set to `false` to disable the
dashboard.
- `WAHA_DASHBOARD_USERNAME=waha` - username used to log in, by default `waha`.
- `WAHA_DASHBOARD_PASSWORD=waha` - password used to log in, by default `waha`.
```bash
docker run -it -p 3000:3000/tcp -e WAHA_DASHBOARD_USERNAME=waha -e WAHA_DASHBOARD_PASSWORD=waha devlikeapro/whatsapp-http-api-plus
```
## Multiple servers
If you wish to connect, control and manage multiple servers in a single "dashboard", consider using
[WAHA Hub]({{< relref "/docs/waha-hub/introduction" >}}) - central management server to help you build reliable infrastructure!
## Bug reports and feature requests
If you're experiencing any issues or have a feature request, please create an issue in the
[WAHA GitHub](https://github.com/devlikeapro/whatsapp-http-api/issues)
Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

@@ -1,5 +1,5 @@
---
title : "Webhooks"
title : "🔄 Webhooks"
description: "Webhooks"
lead: ""
date: 2020-10-06T08:48:45+00:00
@@ -123,6 +123,8 @@ The `session.status` event is triggered when the session status changes.
- `STOPPED` - session is stopped
- `STARTING` - session is starting
- `SCAN_QR_CODE` - session is required to scan QR code or login via phone number
- When you receive the `session.status` event with `SCAN_QR_CODE` status, you can [**fetch updated QR ->**]({{< relref "/docs/how-to/sessions#get-qr" >}})
- The `SCAN_QR_CODE` is issued every time when QR updated (WhatsApp requirements)
- `WORKING` - session is working and ready to use
- `FAILED` - session is failed due to some error. It's likely that authorization is required again or device has been disconnected from that account.
Try to restart the session and if it doesn't help - logout and start the session again.
@@ -1,5 +1,5 @@
---
title: "Changelog"
title: "🔄 Changelog"
description: "WAHA's changelog"
lead: "You can find here the list of changes made to WAHA."
date: 2020-10-06T08:49:31+00:00
@@ -15,9 +15,73 @@ toc: true
If you wish to get and read Release Notes - read them on one of our platforms, **these posts are FREE**.
- [**Boosty ->**](https://boosty.to/wa-http-api)
- [**Patreon ->**](patreon.com/wa_http_api)
- [**Patreon ->**](https://patreon.com/wa_http_api)
You even can **subscribe to get new updates** there!
**Subscribe for FREE to get new updates** there!
----
## 2024.5
### 🎉 New
----
[Swagger White Label]({{< relref "/docs/how-to/swagger#white-label" >}}) - show your own brand in the Swagger documentation!
- Read more about [Swagger White Label]({{< relref "/docs/how-to/swagger#white-label" >}})
- Issue: [#305](https://github.com/devlikeapro/whatsapp-http-api/issues/305)
- Build: `2024.5.4`
- Engine: **ALL**
----
### 🐛 Fixes
----
Fix send video issue `POST /api/sendVideo` in **WEBJS**.
- Issue: [#321](https://github.com/devlikeapro/whatsapp-http-api/issues/321)
- Issue: [#328](https://github.com/devlikeapro/whatsapp-http-api/issues/328)
- Build: `2024.5.6`
- Engine: **WEBJS**
----
Use local cache for **WEBJS** engine (versions file).
- Issue: [#316](https://github.com/devlikeapro/whatsapp-http-api/issues/316)
- Build: `2024.5.4`
- Engine: **WEBJS**
----
Don't allow to start two sessions with the same name.
Before API allowed to start two sessions with the same name, which could lead to potential problems (no way to stop the first, abandoned session).
- Issue: [#315](https://github.com/devlikeapro/whatsapp-http-api/issues/315)
- Read more about [start a session](https://waha.devlike.pro/docs/how-to/sessions/#start)
- Build: `2024.5.3`
- Engine: **ALL**
----
## 2024.4
### 🎉 New
----
Add **WAHA Dashboard** - UI to manage your WhatsApp sessions!
- Read more about [Dashboard]({{< relref "/docs/how-to/waha-dashboard" >}})
- Open [screenshot](/images/waha-dashboard.png)
----
Add `GET /api/sessions/{session}` endpoint to get information about a specific session.
- Read more about [Get session information]({{< relref "/docs/how-to/sessions#get-session" >}})
- Issue: [#300](https://github.com/devlikeapro/whatsapp-http-api/issues/300)
----
Implement `GET /api/contacts/profile-picture` for **NOWEB** engine.
- Read more about [Get contact profile picture](https://waha.devlike.pro/docs/how-to/contacts/#get-contact-profile-picture)
- Issue: [#298](https://github.com/devlikeapro/whatsapp-http-api/issues/298)
----
## 2024.3
### 🎉 New
+1 -1
View File
@@ -1,5 +1,5 @@
---
title: "FAQ"
title: "❓ FAQ"
description: "Answers to frequently asked questions."
lead: "Answers to frequently asked questions."
date: 2020-10-06T08:49:31+00:00
@@ -1,5 +1,5 @@
---
title: "How to Avoid Blocking"
title: "⚠️ How to Avoid Blocking"
description: "How to Avoid Blocking From Whatsapp"
date: 2020-11-12T13:26:54+01:00
lastmod: 2020-11-12T13:26:54+01:00
@@ -1,5 +1,5 @@
---
title: "Introduction"
title: "📖 Introduction"
description: "WAHA - WhatsApp HTTP API that you can install on your own server and run in less than 5 minutes!"
lead: ""
date: 2020-10-06T08:48:57+00:00
@@ -12,7 +12,7 @@ parent: "overview"
weight: 100
toc: true
---
**WAHA** - **W**hats**A**pp **H**TTP **A**PI that you can install on your own server and run in less than 5 minutes!
**WAHA** - <u>W</u>hats<u>A</u>pp <u>H</u>TTP <u>A</u>PI that you can install on your own server and run in less than 5 minutes!
<div class="d-flex justify-content-center my-4">
<img src="/images/logo.svg" style='border-radius: 50%' width='150'/>
@@ -25,12 +25,16 @@ toc: true
We will guide you through the necessary steps to successfully send your first text message using WhatsApp HTTP API in
[**Quick Start →**]({{< relref "quick-start" >}}).
## Features
WAHA is distributed in two versions:
- Core ![](/images/versions/core.png) - the basic version that meet almost 80% people's needs. 100% free and [open source ->](https://github.com/devlikeapro/whatsapp-http-api).
- Plus ![](/images/versions/plus.png) - the version with advanced messages, security, and reliability features. Donations, no license expiration, quick updates, read more about [Plus Version →]({{< relref "plus-version" >}})
## Disclaimer
This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with WhatsApp or any of its subsidiaries or its affiliates. The official WhatsApp website can be found at [whatsapp.com](https://whatsapp.com).
See the list of engines [**that support the features ->**]({{< relref "/docs/how-to/engines#features" >}}).
"WhatsApp" as well as related names, marks, emblems and images are registered trademarks of their respective owners. Also it is not guaranteed you will not be blocked by using this method. WhatsApp does not allow bots or unofficial clients on their platform, so this shouldn't be considered totally safe.
For any businesses looking to integrate with WhatsApp for critical applications, we highly recommend using officially supported methods, such as Twilio's solution or other alternatives. You might also consider [the official API ->](https://developers.facebook.com/docs/whatsapp/).
## Features
Here's the available features:
@@ -67,7 +71,7 @@ Here's the available features:
- Single WhatsApp account running inside one container
- Multiple WhatsApp account running inside one container ![](/images/versions/plus.png)
- Session saving (don't have to scan QR on every restart) ![](/images/versions/plus.png)
- Session saving on remote storage (database, redis) ![](/images/versions/plus-soon.png)
- Session saving on remote storage (mongodb) ![](/images/versions/plus.png)
### Security
- API authentication ![](/images/versions/plus.png)
@@ -76,3 +80,12 @@ Here's the available features:
### Updates
- Bug fixes and updates come as soon as they are implemented.
## Engines
Not all Engines support all Features, see [**the feature supported by engines ->**]({{< relref "/docs/how-to/engines#features" >}}).
## Versions
WAHA is distributed in two versions:
- Core ![](/images/versions/core.png) - the basic version that meet almost 80% people's needs. **100% free and [open source ->](https://github.com/devlikeapro/whatsapp-http-api)**.
- Plus ![](/images/versions/plus.png) - the version with advanced messages, security, and reliability features. Donations, no license expiration, quick updates, read more about [**Plus Version →**]({{< relref "plus-version" >}})
@@ -1,5 +1,5 @@
---
title: "Quick Start"
title: "⚡ Quick Start"
description: "One page summary of how to start WhatsApp HTTP API."
lead: "One page summary of how to start WhatsApp HTTP API."
date: 2020-11-16T13:59:39+01:00
@@ -189,8 +189,9 @@ curl -d "{\"chatId\": \"${PHONE}@c.us\", \"text\": \"Hello from WhatsApp HTTP AP
```
## What is next?
- Right now you've sent simple text message, but you can send more! [Send messages →]({{< relref "/docs/how-to/send-messages" >}})
- Read how to receive and response to messages [Receive messages →]({{< relref "/docs/how-to/receive-messages" >}})
- Learn about the easiest way to manage your WhatsApp sessions - [Dashboard ->]({{< relref "/docs/how-to/waha-dashboard" >}})
- Right now you've sent simple text message, but you can send more! [Send messages ->]({{< relref "/docs/how-to/send-messages" >}})
- Read how to receive and response to messages [Receive messages ->]({{< relref "/docs/how-to/receive-messages" >}})
- [Save session information, so you don't have to scan QR after container restart ->]({{< relref "/docs/how-to/sessions" >}})
- Make sure your [API is properly protected ->]({{< relref "/docs/how-to/security" >}})
@@ -0,0 +1,10 @@
---
title : "WAHA Hub"
description: "WAHA Hub"
lead: ""
date: 2020-10-06T08:48:45+00:00
lastmod: 2020-10-06T08:48:45+00:00
draft: false
images: []
weight: 300
---
@@ -0,0 +1,52 @@
---
title: "WAHA Hub"
description: "WAHA Hub"
lead: ""
date: 2020-10-06T08:48:57+00:00
lastmod: 2020-10-06T08:48:57+00:00
draft: false
images: [ ]
menu:
docs:
parent: "overview"
weight: 301
toc: true
---
---
⚠️
**WAHA Hub** in **DEVELOPMENT** yet...
Consider using [Dashboard]({{< relref "/docs/how-to/waha-dashboard" >}}) for managing your sessions.
Subscribe to [**WAHA PRO**]({{< relref "plus-version#pro" >}}) to speed up the development!
⚠️
---
## Overview
**WAHA Hub** - central management solution to help your build reliable infrastructure with multiple WAHA servers!
While [Dashboard]({{< relref "/docs/how-to/waha-dashboard" >}}) is a UI to manage your WhatsApp sessions on
**single server**, **WAHA Hub** is a central management server to control and manage **multiple servers** in a single
place.
👉 **WAHA Hub** is available in [**WAHA PRO**]({{< relref "plus-version#pro" >}}) version only.
![Dashboard](waha-dashboard.png)
<div class="text-center">
<a href="waha-dashboard.png" target="_blank">See full size image</a>
</div>
## Features
- Control and manage multiple servers in a single Hub.
- Monitor the status of your servers
- And more!
Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

+9
View File
@@ -0,0 +1,9 @@
---
title: "Pricing"
description: "WAHA - WhatsApp HTTP API that you can run in a click!"
summary: "WAHA Plus"
date: 2024-01-29T15:50:07+02:00
lastmod: 2024-01-29T15:50:07+02:00
draft: false
---
+75 -20
View File
@@ -6,7 +6,7 @@
</div>
<div class='col-lg-9 col-xl-9 text-center'>
<div class='mb-4'>
<img src='/images/logo.svg' title='WhatsApp HTTP API' alt='logo' width='100' style='border-radius: 50%'/>
<img src='/images/logo.svg' title='WhatsApp HTTP API' alt='logo' style='border-radius: 50%; width: 10rem' />
</div>
<p class='lead'>{{ .Params.lead | safeHTML }}</p>
<div class='code-block highlight'>
@@ -15,7 +15,13 @@
<a class='btn btn-primary btn-lg px-4 mb-2'
href='/docs/{{ if .Site.Params.options.docsVersioning }}{{ .Site.Params.docsVersion }}/{{ end }}overview/introduction/'
role='button'>Get Started</a>
<p class='meta'><a href='https://github.com/devlikeapro/whatsapp-http-api'>Source code in GitHub.</a></p>
<p class='meta'>
<a href='https://github.com/devlikeapro/whatsapp-http-api'>Source code in GitHub.</a>
<br />
<a href='https://hub.docker.com/r/devlikeapro/whatsapp-http-api'>
<img alt='Docker Pulls' src='https://img.shields.io/docker/pulls/devlikeapro/whatsapp-http-api'>
</a>
</p>
</div>
</div>
</section>
@@ -27,7 +33,7 @@
<div class='row justify-content-center text-center'>
<div class='col-12'>
<h2>
What can WAHA do?
WAHA Features
</h2>
</div>
<div class='col-12 col-lg-4 pros-card'>
@@ -35,10 +41,10 @@
<h2 class='h4 color-accent'>Send and Receive<br />Messages</h2>
<p>
You can
<a href='https://waha.devlike.pro/docs/how-to/send-messages/'>send</a>
<a href='/docs/how-to/send-messages/'>send messages to</a>
and
<a href='https://waha.devlike.pro/docs/how-to/receive-messages/'>receive</a>
messages from WhatsApp using HTTP API.
<a href='/docs/how-to/receive-messages/'>receive messages from</a>
WhatsApp using HTTP API (REST API).
</p>
<div class='code-block highlight' style='text-align: left'>
@@ -60,10 +66,10 @@
<h2 class='h4'>Send and Receive<br />Files</h2>
<p>
You can
<a href='https://waha.devlike.pro/docs/how-to/send-messages/'>send</a>
<a href='/docs/how-to/send-messages/'>send files to</a>
and
<a href='https://waha.devlike.pro/docs/how-to/receive-messages/'>receive</a>
files from WhatsApp using HTTP API.
<a href='/docs/how-to/receive-messages/'>receive files from</a>
WhatsApp using HTTP API (REST API).
</p>
<div class='code-block highlight' style='text-align: left'>
@@ -86,7 +92,7 @@
</h2>
<p>
Check out
<a href='https://waha.devlike.pro/docs/overview/introduction/#features'>
<a href='/docs/overview/introduction/#features'>
the documentation
</a>
to see all the features.
@@ -105,6 +111,47 @@
</pre>
</div>
</div>
<div class='col-12' style='width: 80%; margin-top: 2rem'>
<a href='/docs/how-to/swagger/' target='_blank'>
<h2 class='h4 color-accent'>
Swagger documentation and OpenAPI Specification
</h2>
</a>
<p>
<a href='/docs/how-to/plus-version/#core' target='_blank'>
<b>WAHA Core</b>
</a>
and
<a href='/docs/how-to/plus-version/#plus' target='_blank'>
<b>WAHA Plus</b>
</a>
provide Swagger documentation and OpenAPI schema to easily integrate with your favorite language and HTTP API (REST API)!
<br>
</p>
<video autoplay loop muted playsinline controls='noremoteplayback' width='100%' poster='/images/swagger.png'>
<source src='/videos/swagger-overview.webm' type='video/webm' />
Download the <a href='/videos/swagger-overview.webm'>Swagger Overview video</a> .
</video>
</div>
<div class='col-12' style='width: 80%; margin-top: 2rem'>
<a href='/docs/how-to/waha-dashboard' target='_blank'>
<h2 class='h4 color-accent'>Built-in Dashboard</h2>
</a>
<p>
<a href='/docs/how-to/plus-version/#plus' target='_blank'>
<b>WAHA Plus</b>
</a>
provides Dashboard - a web interface to easily manage your WhatsApp sessions!
<br>
</p>
<video autoplay loop muted playsinline controls='noremoteplayback' width='100%'
poster='/images/waha-dashboard.png'>
<source src='/videos/waha-dashboard-overview.webm' type='video/webm' />
Download the <a href='/videos/waha-dashboard-overview.webm'>Dashboard Overview video</a> .
</video>
</div>
</div>
</div>
</section>
@@ -120,12 +167,12 @@
<img src='/images/icons/free-green.png' alt='Free' style='width: 5rem'>
<h2 class='h4 color-accent'>It's free!</h2>
<p>
<a href='https://waha.devlike.pro/docs/how-to/plus-version/#tiers' target='_blank'>
<a href='/docs/how-to/plus-version/#tiers' target='_blank'>
<b>WAHA Core</b>
</a>
version is always free, <b>no limits in messages</b> or time!
<br>
<a href='https://waha.devlike.pro/docs/how-to/plus-version/#tiers' target='_blank'>
<a href='/docs/how-to/plus-version/#tiers' target='_blank'>
<b>WAHA Plus</b>
</a>
version have no licence expiration!
@@ -135,7 +182,7 @@
<img src='/images/icons/servers-green.png' alt='Servers' style='width: 5rem'>
<h2 class='h4'>Self-hosted solution</h2>
<p>
<a href='https://waha.devlike.pro/docs/how-to/plus-version/#why-waha' target='_blank'>
<a href='/docs/how-to/plus-version/#why-waha' target='_blank'>
No strings to suspicious SaaS WhatsApp HTTP API solutions.
</a>
Install it on your own server!
@@ -143,7 +190,7 @@
</div>
<div class='col-12 col-lg-4 pros-card'>
<img src='/images/icons/api-green.png' alt='API' style='width: 5rem'>
<h2 class='h4'>HTTP API</h2>
<h2 class='h4'>HTTP / REST API</h2>
<p>
Use your own favorite language - Python, JavaScript, PHP, C#, Clojure, or PowerShell.
<br />
@@ -158,7 +205,7 @@
<img src='/images/icons/document-green.png' alt='Document' style='width: 5rem'>
<h2 class='h4'>Well documented</h2>
<p>
<a href='https://waha.devlike.pro/docs/overview/introduction/' target='_blank'>
<a href='/docs/overview/introduction/' target='_blank'>
Documentation
</a>
has a lof examples and how-to guides.</p>
@@ -168,7 +215,7 @@
<h2 class='h4'>Quick installation</h2>
<p>
You need to install Docker and
<a href='https://waha.devlike.pro/docs/how-to/install/' target='_blank'>
<a href='/docs/how-to/install/' target='_blank'>
run the API in a click!
</a>
<br />
@@ -181,7 +228,7 @@
<img src='/images/icons/checked-green.png' alt='Checked' style='width: 5rem'>
<h2 class='h4'>No blocking</h2>
<p>
<a href='https://waha.devlike.pro/docs/how-to/engines/' target='_blank'>
<a href='/docs/how-to/engines/' target='_blank'>
Under the hood
</a>
it runs a real instance of Whatsapp Web to avoid getting blocked.
@@ -192,22 +239,30 @@
</small>
</p>
</div>
</div>
</div>
</section>
<section class='section section-sm'>
<div class='container hr'>
<div class='text-center mt-4'>
<h2>
Try it now!
Give it a try!
</h2>
<div class='mb-4'>
<img src='/images/logo.png' title='WhatsApp HTTP API' alt='logo' width='100' />
<img src='/images/logo.svg' title='WhatsApp HTTP API' alt='logo' style='border-radius: 50%; width: 10rem' />
</div>
<a class='btn btn-primary btn-lg px-4 mb-2'
href='/docs/{{ if .Site.Params.options.docsVersioning }}{{ .Site.Params.docsVersion }}/{{ end }}overview/introduction/'
role='button'>Get Started</a>
<p class='meta'><a href='https://github.com/devlikeapro/whatsapp-http-api'>Source code in GitHub.</a></p>
<p class='meta'>
<a href='https://github.com/devlikeapro/whatsapp-http-api'>Source code in GitHub.</a>
<br/>
<a href='https://hub.docker.com/r/devlikeapro/whatsapp-http-api'>
<img alt='Docker Pulls' src='https://img.shields.io/docker/pulls/devlikeapro/whatsapp-http-api'>
</a>
</p>
</div>
</div>
</section>
@@ -27,10 +27,14 @@
<!-- /Yandex.Metrika counter -->
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-2XLLXRJ1KF"></script>
<script async src='https://www.googletagmanager.com/gtag/js?id=G-2XLLXRJ1KF'></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-2XLLXRJ1KF');
@@ -59,5 +63,29 @@
.hr {
border-top: 1px solid #e9ecef;
}
.pros-card-tier {
border: 1px solid #e9ecef;
border-radius: 0.5rem;
padding: 1.5rem;
margin: 1rem;
min-width: 25rem;
background-color: #fff;
box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.1);
}
/* Using shadow */
.pros-card--highlighted {
background-color: #fff;
box-shadow: 0 0 1.5rem 0 #4aae2050;
}
.tier-pros > * {
margin: 0.5rem 0;
text-align: left;
}
.table-highlight-first-column td:nth-child(1) {
font-weight: bold;
}
</style>
<!-- /Main page cards -->
+650
View File
@@ -0,0 +1,650 @@
{{ define "main" }}
<section class='section section-md pb-0'>
<div class='container'>
<div class='row justify-content-center'>
<div class='col-11 col-lg-9 text-center'>
<h1 class='display-5 fw-normal mt-1'>{{ .Summary }}</h1>
</div>
<div class='d-flex justify-content-center mb-4'>
<img src='/images/logo.svg' title='WhatsApp HTTP API' alt='logo'
style='border-radius: 50%; width: 10rem' />
</div>
<div class='col-11 col-lg-9' style='min-width: 25rem'>
<p><strong>WAHA</strong> (<u>W</u>hats<u>A</u>pp <u>H</u>TTP <u>A</u>PI) is distributed in two versions:</p>
<ol>
<li>Core <img src='/images/versions/core.png' alt='Core version image'> the basic version that meets almost
80%
of people's needs. 100% free and open source.
</li>
<li>Plus <img src='/images/versions/plus.png' alt='Plus version image'> the version with advanced messages,
security, and reliability features.
</li>
</ol>
You support the project and get <b>WAHA Plus</b> by
<a href='#tiers'>donating to the project</a> on
<a href='#how-to-donate'>one of the platforms</a>.
</div>
</div>
</div>
</section>
<section class='section section-md pb-0' id='tiers'>
<div class='text-center'>
<h1 class='display-5 fw-normal mt-1'>Tiers</h1>
</div>
<div class='row justify-content-center'>
<div class='col-11 col-lg-9 text-center' style='min-width: 25rem'>
<p>The more you support, the more you get!</p>
</div>
</div>
<div class='row justify-content-center text-center'>
<!-- Core -->
<div
class='col-12 col-lg-4 pros-card-tier h-full d-flex flex-column justify-content-between'
id='tier-core'
>
<div>
<h2 class='h4 color-accent mt-0 display-4'>Core</h2>
<p class='fw-bold'>
Essential product for 80% of people needs!
</p>
<div class='mb-4'>
<span class='display-4 fw-bold'>$0</span>
</div>
<div class='tier-pros'>
<div>
✔️ <a href='https://github.com/devlikeapro/whatsapp-http-api'><b>WAHA Core</b> Source
Code</a>
</div>
<div>
✔️ <a href='{{ relref . "/docs/how-to/send-messages" }}'>Send text messages</a>
</div>
<div>
✔️ <a href='{{ relref . "/docs/how-to/receive-messages" }}'>Receive text messages</a>
</div>
<div>
✔️ <a href='{{ relref . "/docs/how-to/webhooks" }}'>Webhooks</a>
</div>
<div>
✔️ <a href='{{ relref . "/docs/how-to/swagger" }}'>Swagger and OpenAPI spec</a>
</div>
<div>
✔️ <a href='{{ relref . "/docs/how-to/engines#webjs" }}'>Web based engine (WEBJS)</a>
</div>
<div>
✔️ <a href='{{ relref . "/docs/how-to/engines#noweb" }}'>Light non-chrome engine (NOWEB)</a>
</div>
<div>
✔️ <a href='{{ relref . "/docs/how-to/engines#features" }}'>and more!</a>
</div>
<div>
&nbsp;<b>∞</b>&nbsp; Unlimited messages
</div>
<div>
&nbsp;<b>1</b>&nbsp; <a href='{{ relref . "/docs/how-to/sessions"}}'>Session</a>
</div>
</div>
</div>
<div class='mt-4 pt-2'>
<a class='btn btn-outline-primary btn-lg px-4 mb-2'
href='/docs/{{ if .Site.Params.options.docsVersioning }}{{ .Site.Params.docsVersion }}/{{ end }}overview/introduction/'
role='button'>Get Started →</a>
</div>
</div>
<!-- PLUS -->
<div
class='col-12 col-lg-4 pros-card-tier h-full d-flex flex-column justify-content-between'
id='tier-plus'
>
<div>
<h2 class='h4 color-accent mt-0 display-4'>Plus</h2>
<p class='fw-bold'>
Optimize your experience with extra features!
</p>
<div class='mb-4'>
<span class='display-4 fw-bold'>$19</span>
</div>
<div class='tier-pros'>
<div>
✔️ All <b>Core</b> features
</div>
<div>
✔️ <a href='{{ relref . "/docs/how-to/plus-version" }}'>Personal Docker Key to <b>WAHA Plus</b></a>
</div>
<div>
✔️ <a href='{{ relref . "/docs/how-to/send-messages" }}'>Send files, voices, video</a>
</div>
<div>
✔️ <a href='{{ relref . "/docs/how-to/receive-messages" }}'>Receive files, voices, video</a>
</div>
<div>
✔️ <a href='{{ relref . "/docs/how-to/security" }}'>Built-in Security</a>
</div>
<div>
✔️ <a href='{{ relref . "/docs/how-to/webhooks" }}'>Webhooks retries</a>
</div>
<div>
✔️ <a href='{{ relref . "/docs/how-to/storages" }}'>File storage</a>
</div>
<div>
✔️ <a href='{{ relref . "/docs/how-to/storages" }}'>MongoDB storage</a>
</div>
<div>
✔️ <a href='{{ relref . "/docs/how-to/waha-dashboard" }}'>Built-in Dashboard</a>
</div>
<div>
✔️ Special badge on GitHub <img src='https://img.shields.io/badge/patron-PLUS-a0e6ba'>
</div>
<div>
&nbsp;<b>∞</b>&nbsp; <a href='{{ relref . "/docs/how-to/sessions"}}'>Unlimited Sessions</a>
</div>
</div>
</div>
<div class='mt-4 pt-2'>
<div class='mb-4'>
<hr>
<p class='text-center'>
<b><span class='fs-4'>⚡50% OFF</span> Yearly Crypto Offer!⚡</b>
</p>
<p>
Save the fees and get <b>Plus</b> for a year donating in <a href='#crypto'>Crypto</a>!
</p>
<div class='text-center'>
<span class='fs-3 fw-light text-secondary'><del>$228</del></span>
<span class='fs-3 fw-bold text-primary'>
<a href='#crypto'>$110</a>
</span>
</div>
<hr>
</div>
<a class='btn btn-primary btn-lg px-4 mb-2'
href='#donations'
role='button'>Support project →</a>
</div>
</div>
<!-- PRO -->
<div
class='col-12 col-lg-4 pros-card-tier pros-card--highlighted h-full d-flex flex-column justify-content-between'
id='tier-pro'
>
<div>
<h2 class='h4 color-accent mt-0 display-4'>PRO</h2>
<p class='fw-bold'>
Get the most out of WAHA, with all the features!
</p>
<div class='mb-4'>
<span class='display-4 fw-bold'>$99</span>
</div>
<div class='tier-pros'>
<div>
✔️ All <b>Plus</b> features
</div>
<div>
✔️ <a href='https://github.com/devlikeapro/whatsapp-http-api-plus'><b>WAHA Plus</b> Source
Code</a>
</div>
<div>
✔️ Special badge on GitHub <img src='https://img.shields.io/badge/patron-PRO-188a42'>
</div>
<div>
✔️ Membership in <b>WAHA PRO</b> Discord server for receiving personal support, and sharing your experiences
with other professionals.
</div>
</div>
</div>
<div class='mt-4 pt-2'>
<div class='mb-4'>
<hr>
<p class='text-center'>
<b><span class='fs-4'>⚡50% OFF</span> Yearly Crypto Offer!⚡</b>
</p>
<p>
Save the fees and get <b>PRO</b> for a year donating in <a href='#crypto'>Crypto</a>!
</p>
<div class='text-center'>
<span class='fs-3 fw-light text-secondary'><del>$1,118</del></span>
<span class='fs-3 fw-bold text-primary'>
<a href='#crypto'>$590</a>
</span>
</div>
<hr>
</div>
<a class='btn btn-primary btn-lg px-4 mb-2'
href='#donations'
role='button'>Support project →</a>
</div>
</div>
</div>
</section>
<section class='section section-md pb-0' id='tiers-compare'>
<div class='text-center'>
<h1 class='display-5 fw-normal mt-1'>Compare Features</h1>
</div>
<div class='row justify-content-center'>
<table class='table-highlight-first-column'>
<tr>
<th></th>
<th>
Core
</th>
<th>Plus</th>
<th>PRO</th>
</tr>
<tr>
<td>
<a href='{{ relref . "/docs/how-to/sessions"}}'>Sessions</a>
</td>
<td>1</td>
<td>∞</td>
<td>∞</td>
</tr>
<tr>
<td>
Messages
</td>
<td>∞</td>
<td>∞</td>
<td>∞</td>
</tr>
<tr>
<td>
<a href='{{ relref . "/docs/how-to/send-messages" }}'> Send text messages </a>
</td>
<td>✔️</td>
<td>✔️</td>
<td>✔️</td>
</tr>
<tr>
<td>
<a href='{{ relref . "/docs/how-to/receive-messages" }}'> Receive text messages </a>
</td>
<td>✔️</td>
<td>✔️</td>
<td>✔️</td>
</tr>
<tr>
<td>
<a href='{{ relref . "/docs/how-to/send-messages" }}'> Send files, voices, video </a>
</td>
<td>➖</td>
<td>✔️</td>
<td>✔️</td>
</tr>
<tr>
<td>
<a href='{{ relref . "/docs/how-to/receive-messages" }}'> Receive files, voices, video</a>
</td>
<td>➖</td>
<td>✔️</td>
<td>✔️</td>
</tr>
<tr>
<td>
<a href='{{ relref . "/docs/how-to/storages" }}'>Webhooks</a>
</td>
<td>✔️</td>
<td>✔️</td>
<td>✔️</td>
</tr>
<tr>
<td>
<a href='{{ relref . "/docs/how-to/webhooks" }}'>Webhooks retries</a>
</td>
<td>➖</td>
<td>✔️</td>
<td>✔️</td>
</tr>
<tr>
<td>
<a href='{{ relref . "/docs/how-to/storages" }}'>File storage</a>
</td>
<td>➖</td>
<td>✔️</td>
<td>✔️</td>
</tr>
<tr>
<td>
<a href='{{ relref . "/docs/how-to/storages" }}'>MongoDB storage</a>
</td>
<td>➖</td>
<td>✔️</td>
<td>✔️</td>
</tr>
<tr>
<td>
<a href='{{ relref . "/docs/how-to/waha-dashboard" }}'>Built-in Dashboard</a>
</td>
<td>➖</td>
<td>✔️</td>
<td>✔️</td>
</tr>
<tr>
<td>
<a href='{{ relref . "/docs/how-to/security" }}'>Built-in Security</a>
</td>
<td>➖</td>
<td>✔️</td>
<td>✔️</td>
</tr>
<tr>
<td>
<a href='{{ relref . "/docs/how-to/engines#webjs" }}'>Web based engine (WEBJS)</a>
</td>
<td>✔️</td>
<td>✔️</td>
<td>✔️</td>
</tr>
<tr>
<td>
<a href='{{ relref . "/docs/how-to/engines#noweb" }}'>Light non-chrome engine (NOWEB)</a>
</td>
<td>✔️</td>
<td>✔️</td>
<td>✔️</td>
</tr>
<tr>
<td>
<a href='{{ relref . "/docs/how-to/plus-version" }}'>Personal Docker Key to <b>WAHA Plus</b></a>
</td>
<td>➖</td>
<td>✔️</td>
<td>✔️</td>
</tr>
<tr>
<td>
<a href='https://github.com/devlikeapro/whatsapp-http-api' target='_blank'>WAHA Core Source Code -></a>
</td>
<td>✔️</td>
<td>✔️</td>
<td>✔️</td>
</tr>
<tr>
<td>
<a href='https://github.com/devlikeapro/whatsapp-http-api-plus' target='_blank'>WAHA Plus Source Code -></a>
</td>
<td>➖</td>
<td>➖</td>
<td>✔️</td>
</tr>
<tr>
<td>
Membership in <b>WAHA PRO</b> Discord server
</td>
<td>➖</td>
<td>➖</td>
<td>✔️</td>
</tr>
<tr>
<td>
Special Badge on GitHub
</td>
<td>➖</td>
<td>
<img src='https://img.shields.io/badge/patron-PLUS-a0e6ba'>
</td>
<td>
<img src='https://img.shields.io/badge/patron-PRO-188a42'>
</td>
</tr>
<tr>
<th></th>
<th>
<a
href='/docs/{{ if .Site.Params.options.docsVersioning }}{{ .Site.Params.docsVersion }}/{{ end }}overview/introduction/'
>Get Started -></a>
</th>
<th>
<a href='#donations'>Support project -></a>
</th>
<th>
<a href='#donations'>Support project -></a>
</th>
</tr>
</table>
</div>
</section>
<section class='section section-md pb-0' id='why-waha'>
<div class='text-center'>
<h1 class='display-5 fw-normal mt-1'>Why WAHA?</h1>
</div>
<div class='row justify-content-center'>
<table class='table-highlight-first-column'>
<tr>
<th>Features</th>
<th>
<img src='/images/logo-robot.svg' title='WhatsApp HTTP API' alt='logo'
style='height: 2rem; transform: translateY(-0.3rem)' />
WAHA Plus
</th>
<th>🤔 Others</th>
</tr>
<tr>
<td>Number of accounts</td>
<td>✔️ No limits on <b>accounts</b> or <b>servers</b>!</td>
<td> ➖ One account for $50/month.</td>
</tr>
<tr>
<td>Infrastructure</td>
<td>✔️ On-Premise - your server, your infrastructure!</td>
<td> ➖ Insecure cloud solution.</td>
</tr>
<tr>
<td>Security</td>
<td>✔️ No data leaks!</td>
<td>➖ You have to give access to customers' data - phone number, name, your messages.</td>
</tr>
<tr>
<td>License</td>
<td> ✔️ No license checks! It works even after you got unsubscribed
<br />
<span class='text-muted fs-6'>
(as long as WhatsApp doesn't make backward incompatible changes, or you need to reinstall it on new server).
</span>
</td>
<td> ➖ One month</td>
</tr>
<tr>
<td>Messages</td>
<td>✔️ No message limits!</td>
<td>➖ Some solutions have a price for messages, like $1 every 1,000 messages.</td>
</tr>
<tr>
<td>Source Code</td>
<td>✔️ Available for <a href='#tier-pro'>PRO</a> patrons!</td>
<td>➖ No access to verify the code or adjust it for your needs.</td>
</tr>
<tr>
<td>Price</td>
<td>✔️ <b>19$</b></td>
<td>➖ Monthly payment starts from $50</td>
</tr>
</table>
</div>
</section>
<section class='section section-md pb-0' id='donations'>
<div class='text-center'>
<h1 class='display-5 fw-normal mt-1'>Donations</h1>
</div>
<div class='row justify-content-center'>
<div class='col-11 col-lg-9' style='min-width: 25rem'>
<p>WAHA Plus version is available through <strong>donations</strong> (subscriptions).</p>
<p><strong>It doesn't require monthly subscriptions, once installed on your server - it always works!</strong>
(until WhatsApp made backward-incompatible changes, and you have to update the image,
or you need to reinstall it on new server
)</p>
<div class='alert' style='display: flex; align-items: center;'>
<span style='margin-right: 10px;'>💡</span>
<span>No licence checks or expiration on already installed instances!</span>
</div>
<p>We do not sell <strong>WAHA</strong>, it's not a purchase. It's a donation.</p>
<p>We treat our projects like art. You donate to the project and get a bit more from it as a thank-you. 😊</p>
<p>Treat <strong>WAHA Plus</strong> it as an additional episode, behind-the-scenes videos, our nude photos 😊</p>
<div class='alert' style='display: flex; align-items: center;'>
<span style='margin-right: 10px;'>💡</span>
<span>WAHA does not have license checks and expiration - because art can not expire! Enjoy it till it works!</span>
</div>
<p>We donate most of the donations down to the stream to the underlying libraries and tools - JS-community, Node,
other libraries authors, personal contributors.<br>
By donating to the <strong>WAHA</strong> you donate to the Open Source world!</p>
</div>
</div>
</section>
<section class='section section-md pb-0' id='how-to-donate'>
<div class='text-center'>
<h2 class='display-5 fw-normal mt-1'>How to donate?</h2>
</div>
<div class='row justify-content-center'>
<div class='col-11 col-lg-9 text-center' style='min-width: 25rem'>
<p>Choose the platform that suits you best to support the project.</p>
</div>
</div>
<div class='row justify-content-center mt-4'>
<!-- Crypto -->
<div
class='col-12 col-lg-4 pros-card pros-card--highlighted h-full d-flex flex-column justify-content-between'
id='crypto'
>
<div>
<div class='text-center mb-4'>
<img
src='/logos/tether-usdt-logo.svg' alt='Tether' style='height: 5rem'
/>
</div>
<p>
<b>Cryptocurrency</b> - support the project with crypto!
<br />
</p>
<div>
<p>
If you wish to donate in crypto (any currencies, any network) - please contact us at <a
href='mailto:crypto@devlike.pro'>crypto@devlike.pro</a>.
</p>
<blockquote>
<p>e.g. "I want to donate as PRO patron in crypto."</p>
</blockquote>
<hr>
<p class='text-center mx-0'>
<b>⚡50% OFF Yearly Offer!⚡</b>
</p>
<ul style='margin-left: 0'>
<li><b>Plus</b> -
<del>$228</del>
<b>$110</b></li>
<li><b>PRO</b> -
<del>$1,188</del>
<b>$590</b></li>
</ul>
<p>
Save the fees and get <b>Plus</b> or <b>PRO</b> for a year donating in crypto!
Mention the Yearly offer in the email if you want to get it.
</p>
<hr>
</div>
</div>
<div class='text-center pt-4'>
<a
class='btn btn-outline-info btn-lg'
href='mailto:crypto@devlike.pro?subject=I%20want%20to%20donate%20as%20PRO%20patron.'
target='_blank'
role='button'>
Support with Crypto →
</a>
</div>
</div>
<!-- Boosty -->
<div
class='col-12 col-lg-4 pros-card h-full d-flex flex-column justify-content-between'
>
<div>
<div class='text-center mb-4'>
<img src='/logos/boosty.svg' alt='Boosty' style='height: 5rem' />
</div>
<p>
<b>Boosty</b> - Patreon-like service for donations with fewer fees.
<br />
</p>
<div>
Go ahead and get your own WhatsApp HTTP API!
</div>
</div>
<div class='text-center pt-4'>
<a
class='btn btn-outline-dark btn-lg'
href='https://boosty.to/wa-http-api'
target='_blank'
role='button'>Support on Boosty →</a>
</div>
</div>
<!-- Patreon -->
<div
class='col-12 col-lg-4 pros-card h-full d-flex flex-column justify-content-between'
>
<div>
<div class='text-center mb-4'>
<img src='/logos/patreon.png' alt='Patreon' style='height: 5rem' />
</div>
<p>
<b>Patreon</b> - well-known service for donations.
<br />
</p>
<div>
Please consider using <b>Boosty</b> or <b>Crypto</b> instead of Patreon due to its lower fees 🙏
</div>
</div>
<div class='text-center pt-4'>
<a
class='btn btn-outline-danger btn-lg'
href='https://www.patreon.com/wa_http_api'
target='_blank'
role='button'>Support on Patreon →</a>
</div>
</div>
</div>
</section>
<section class='section section-md' id='what-next'>
<div class='text-center'>
<h2 class='display-5 fw-normal mt-1'>
What's next?
</h2>
</div>
<div class='row justify-content-center text-center'>
<div class='col-11 col-lg-9' style='min-width: 25rem'>
Read more about
<a href='{{ relref . "/docs/how-to/plus-version" }}'>
how to get WAHA Plus using Patron Portal ->
</a>
</div>
</div>
</section>
{{ end }}
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

+289
View File
@@ -0,0 +1,289 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dashboard | WAHA</title>
<link rel="icon" href="./favicon.ico" />
<style>
:root {
--surface-card: #1f2937;
--surface-border: #374151;
--card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
body,
html {
height: 100%;
padding: 0;
margin: 0;
}
* {
box-sizing: border-box;
}
.bg-image {
/* The image used */
background-image: url('./waha-dashboard.png');
/* Add the blur effect */
filter: blur(2px);
-webkit-filter: blur(2px);
/* Full height */
height: 100%;
/* Center and scale the image nicely */
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
body {
background-color: #111827;
color: rgba(255, 255, 255, 0.87);
}
svg {
width: 100px;
height: 100px;
}
.message {
font-size: 20px;
margin: 20px;
}
a {
color: rgb(158, 158, 255);
text-decoration-color: rgb(158, 158, 255);
}
.upgrade-link {
text-decoration: none;
font-size: 1.5rem;
}
.link-button {
background-color: #4ade80;
padding: 10px 20px;
border-radius: 5px;
color: #052e16;
text-decoration: none;
margin-top: 50px;
}
.card {
min-width: 25rem;
background: var(--surface-card);
border: 1px solid var(--surface-border);
box-shadow: var(--card-shadow);
padding: 2rem;
border-radius: 12px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 2;
text-align: center;
}
</style>
</head>
<body>
<div class="bg-image"></div>
<div class="card">
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1"
width="1080"
height="1080"
viewBox="0 0 1080 1080"
xml:space="preserve"
>
<desc>Created with Fabric.js 5.2.4</desc>
<defs></defs>
<g
transform="matrix(1 0 0 1 540 540)"
id="c3cb5d1b-8350-492a-8567-8c1ee2307b9a"
></g>
<g
transform="matrix(1 0 0 1 540 540)"
id="054ae9ae-db12-4435-8648-8bfb02267690"
>
<rect
style="
stroke: none;
stroke-width: 1;
stroke-dasharray: none;
stroke-linecap: butt;
stroke-dashoffset: 0;
stroke-linejoin: miter;
stroke-miterlimit: 4;
fill: rgb(255, 255, 255);
fill-rule: nonzero;
opacity: 1;
visibility: hidden;
"
vector-effect="non-scaling-stroke"
x="-540"
y="-540"
rx="0"
ry="0"
width="1080"
height="1080"
/>
</g>
<g transform="matrix(1 0 0 1 540 540)">
<rect
style="
stroke: none;
stroke-width: 1;
stroke-dasharray: none;
stroke-linecap: butt;
stroke-dashoffset: 0;
stroke-linejoin: miter;
stroke-miterlimit: 4;
fill: rgb(255, 255, 255);
fill-rule: nonzero;
opacity: 1;
visibility: hidden;
"
vector-effect="non-scaling-stroke"
x="-540"
y="-540"
rx="0"
ry="0"
width="1080"
height="1080"
/>
</g>
<g transform="matrix(2.02 0 0 2.02 540 540)">
<rect
style="
stroke: none;
stroke-width: 1;
stroke-dasharray: none;
stroke-linecap: butt;
stroke-dashoffset: 0;
stroke-linejoin: miter;
stroke-miterlimit: 4;
fill: rgb(255, 255, 255);
fill-rule: nonzero;
opacity: 1;
visibility: hidden;
"
vector-effect="non-scaling-stroke"
x="-540"
y="-540"
rx="0"
ry="0"
width="1080"
height="1080"
/>
</g>
<g transform="matrix(3.68 0 0 3.68 540.38 540.48)">
<path
style="
stroke: none;
stroke-width: 1;
stroke-dasharray: none;
stroke-linecap: butt;
stroke-dashoffset: 0;
stroke-linejoin: miter;
stroke-miterlimit: 4;
fill: rgb(74, 173, 32);
fill-rule: nonzero;
opacity: 1;
"
vector-effect="non-scaling-stroke"
transform=" translate(-392.21, -570.16)"
d="M 392.26 705.96 C 376.77 705.96 361.28999999999996 706.0400000000001 345.8 705.95 C 318.16 705.7900000000001 297.6 685.2700000000001 297.22 657.57 C 297.15000000000003 652.24 297.07000000000005 646.9100000000001 297.25 641.59 C 297.36 638.23 296.3 636.6 292.72 636.89 C 290.24 637.09 287.73 636.98 285.23 636.9 C 277.1 636.63 271.70000000000005 631.65 271.38 623.49 C 271.06 615.1800000000001 271.06 606.83 271.37 598.52 C 271.69 590.05 277.04 585.23 285.58 585.01 C 297.21 584.72 297.19 584.72 297.21999999999997 573.01 C 297.22999999999996 567.36 297.14 561.72 297.97999999999996 556.0699999999999 C 301.25999999999993 533.93 320.72999999999996 516.4599999999999 343.09 516.04 C 355.07 515.81 367.07 515.86 379.04999999999995 516.02 C 382.72999999999996 516.0699999999999 384.02 514.87 383.96 511.15 C 383.77 500.65999999999997 383.76 490.16999999999996 383.96999999999997 479.67999999999995 C 384.04999999999995 476.00999999999993 382.96 473.65999999999997 379.92999999999995 471.37999999999994 C 372.23999999999995 465.5799999999999 369.78 456.25999999999993 373.06999999999994 447.7199999999999 C 376.18999999999994 439.5999999999999 385.13999999999993 433.7399999999999 393.4599999999999 434.3599999999999 C 402.63999999999993 435.0399999999999 410.43999999999994 441.3499999999999 412.4599999999999 450.2199999999999 C 414.4799999999999 459.0299999999999 411.7099999999999 466.4299999999999 404.4699999999999 471.7899999999999 C 401.8699999999999 473.7199999999999 400.9199999999999 475.69999999999993 400.9699999999999 478.8299999999999 C 401.1199999999999 489.1499999999999 401.2499999999999 499.4799999999999 400.9299999999999 509.79999999999995 C 400.7899999999999 514.5 402.0299999999999 516.24 406.9999999999999 516.0799999999999 C 417.8099999999999 515.7299999999999 428.6399999999999 515.91 439.4699999999999 515.9899999999999 C 466.5199999999999 516.2099999999999 486.7199999999999 536.2299999999999 487.2399999999999 563.3 C 487.3399999999999 568.29 487.2599999999999 573.29 487.2799999999999 578.29 C 487.2999999999999 585 487.3099999999999 585 493.7899999999999 585.02 C 495.94999999999993 585.03 498.1199999999999 584.96 500.2799999999999 585.06 C 507.94999999999993 585.43 512.9999999999999 590.42 513.1499999999999 598.1199999999999 C 513.3199999999998 606.6099999999999 513.3099999999998 615.1099999999999 513.1599999999999 623.5999999999999 C 513.0299999999999 631.3599999999999 508.1999999999999 636.31 500.47999999999985 636.8699999999999 C 498.15999999999985 637.0399999999998 495.77999999999986 637.2199999999999 493.49999999999983 636.8899999999999 C 488.1999999999998 636.1299999999999 486.86999999999983 638.5399999999998 487.1999999999998 643.3999999999999 C 487.54999999999984 648.5399999999998 487.3499999999998 653.7199999999999 487.23999999999984 658.8799999999999 C 486.67999999999984 685.6599999999999 466.4599999999998 705.7399999999999 439.71999999999986 705.9599999999999 C 423.9 706.06 408.08 705.95 392.26 705.96 z"
stroke-linecap="round"
/>
</g>
<g transform="matrix(-3.68 0 0 -3.68 546.38 845.01)">
<path
style="
stroke: none;
stroke-width: 1;
stroke-dasharray: none;
stroke-linecap: butt;
stroke-dashoffset: 0;
stroke-linejoin: miter;
stroke-miterlimit: 4;
fill: rgb(56, 134, 22);
fill-rule: nonzero;
opacity: 1;
"
vector-effect="non-scaling-stroke"
transform=" translate(-394.07, -654.42)"
d="M 394.26 632.93 C 404.75 632.93 415.23 632.9 425.71999999999997 632.9399999999999 C 431.92999999999995 632.9599999999999 433.52 634.7399999999999 432.90999999999997 640.7099999999999 C 430.99999999999994 659.66 414.40999999999997 675.2199999999999 395.38 675.91 C 376.87 676.5799999999999 359.57 662.65 356 644.1899999999999 C 355.72 642.7199999999999 355.33 641.26 355.19 639.78 C 354.71 634.9 356.32 633.01 361.3 632.97 C 372.29 632.87 383.28 632.93 394.26 632.93 z"
stroke-linecap="round"
/>
</g>
<g transform="matrix(3.68 0 0 3.68 673.99 594.08)">
<path
style="
stroke: none;
stroke-width: 1;
stroke-dasharray: none;
stroke-linecap: butt;
stroke-dashoffset: 0;
stroke-linejoin: miter;
stroke-miterlimit: 4;
fill: rgb(56, 135, 22);
fill-rule: nonzero;
opacity: 1;
"
vector-effect="non-scaling-stroke"
transform=" translate(-428.75, -584.99)"
d="M 428.83 602 C 419.12 601.96 411.59999999999997 594.6 411.53 585.07 C 411.46999999999997 575.4100000000001 419.21 567.9100000000001 429.16999999999996 567.98 C 438.33 568.0500000000001 445.93999999999994 575.71 445.97999999999996 584.91 C 446.02 594.33 438.29 602.04 428.83 602 z"
stroke-linecap="round"
/>
</g>
<g transform="matrix(3.68 0 0 3.68 406.92 594.18)">
<path
style="
stroke: none;
stroke-width: 1;
stroke-dasharray: none;
stroke-linecap: butt;
stroke-dashoffset: 0;
stroke-linejoin: miter;
stroke-miterlimit: 4;
fill: rgb(56, 135, 22);
fill-rule: nonzero;
opacity: 1;
"
vector-effect="non-scaling-stroke"
transform=" translate(-356.06, -584.99)"
d="M 339.05 584.57 C 339.19 574.94 346.67 567.84 356.53000000000003 567.99 C 366.26000000000005 568.14 373.21000000000004 575.46 373.07000000000005 585.42 C 372.94000000000005 595.16 365.62000000000006 602.13 355.68000000000006 602 C 346.04 601.87 338.91 594.4 339.05 584.57 z"
stroke-linecap="round"
/>
</g>
</svg>
<div class="message">
Sorry,
<a
href="https://waha.devlike.pro/docs/how-to/waha-dashboard"
target="_blank"
>Dashboard</a
>
is not available in <strong>WAHA Core</strong> version.
<br />
Please consider upgrading to <strong>WAHA Plus</strong>.
</div>
<div style="margin-top: 2rem; margin-bottom: 1rem">
<a
class="upgrade-link link-button"
href="https://waha.devlike.pro/docs/how-to/plus-version/"
target="_blank"
>Upgrade to WAHA Plus</a
>
</div>
</div>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

+31
View File
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1080" height="1080" viewBox="0 0 1080 1080" xml:space="preserve">
<desc>Created with Fabric.js 5.2.4</desc>
<defs>
</defs>
<g transform="matrix(1 0 0 1 540 540)" id="94fb7419-c823-4df4-843f-bbcfe644afa4" >
</g>
<g transform="matrix(1 0 0 1 540 540)" id="a7bb2e9d-f416-4045-ad8c-f43c3c44b881" >
<rect style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,255,255); fill-rule: nonzero; opacity: 1; visibility: hidden;" vector-effect="non-scaling-stroke" x="-540" y="-540" rx="0" ry="0" width="1080" height="1080" />
</g>
<g transform="matrix(2.02 0 0 2.02 540 540)" >
<g style="" vector-effect="non-scaling-stroke" >
<g transform="matrix(1 0 0 1 0 0)" >
<rect style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,255,255); fill-rule: nonzero; opacity: 1; visibility: hidden;" vector-effect="non-scaling-stroke" x="-540" y="-540" rx="0" ry="0" width="1080" height="1080" />
</g>
<g transform="matrix(1.82 0 0 1.82 -0.02 0)" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(74,173,32); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-392.21, -570.16)" d="M 392.26 705.96 C 376.77 705.96 361.28999999999996 706.0400000000001 345.8 705.95 C 318.16 705.7900000000001 297.6 685.2700000000001 297.22 657.57 C 297.15000000000003 652.24 297.07000000000005 646.9100000000001 297.25 641.59 C 297.36 638.23 296.3 636.6 292.72 636.89 C 290.24 637.09 287.73 636.98 285.23 636.9 C 277.1 636.63 271.70000000000005 631.65 271.38 623.49 C 271.06 615.1800000000001 271.06 606.83 271.37 598.52 C 271.69 590.05 277.04 585.23 285.58 585.01 C 297.21 584.72 297.19 584.72 297.21999999999997 573.01 C 297.22999999999996 567.36 297.14 561.72 297.97999999999996 556.0699999999999 C 301.25999999999993 533.93 320.72999999999996 516.4599999999999 343.09 516.04 C 355.07 515.81 367.07 515.86 379.04999999999995 516.02 C 382.72999999999996 516.0699999999999 384.02 514.87 383.96 511.15 C 383.77 500.65999999999997 383.76 490.16999999999996 383.96999999999997 479.67999999999995 C 384.04999999999995 476.00999999999993 382.96 473.65999999999997 379.92999999999995 471.37999999999994 C 372.23999999999995 465.5799999999999 369.78 456.25999999999993 373.06999999999994 447.7199999999999 C 376.18999999999994 439.5999999999999 385.13999999999993 433.7399999999999 393.4599999999999 434.3599999999999 C 402.63999999999993 435.0399999999999 410.43999999999994 441.3499999999999 412.4599999999999 450.2199999999999 C 414.4799999999999 459.0299999999999 411.7099999999999 466.4299999999999 404.4699999999999 471.7899999999999 C 401.8699999999999 473.7199999999999 400.9199999999999 475.69999999999993 400.9699999999999 478.8299999999999 C 401.1199999999999 489.1499999999999 401.2499999999999 499.4799999999999 400.9299999999999 509.79999999999995 C 400.7899999999999 514.5 402.0299999999999 516.24 406.9999999999999 516.0799999999999 C 417.8099999999999 515.7299999999999 428.6399999999999 515.91 439.4699999999999 515.9899999999999 C 466.5199999999999 516.2099999999999 486.7199999999999 536.2299999999999 487.2399999999999 563.3 C 487.3399999999999 568.29 487.2599999999999 573.29 487.2799999999999 578.29 C 487.2999999999999 585 487.3099999999999 585 493.7899999999999 585.02 C 495.94999999999993 585.03 498.1199999999999 584.96 500.2799999999999 585.06 C 507.94999999999993 585.43 512.9999999999999 590.42 513.1499999999999 598.1199999999999 C 513.3199999999998 606.6099999999999 513.3099999999998 615.1099999999999 513.1599999999999 623.5999999999999 C 513.0299999999999 631.3599999999999 508.1999999999999 636.31 500.47999999999985 636.8699999999999 C 498.15999999999985 637.0399999999998 495.77999999999986 637.2199999999999 493.49999999999983 636.8899999999999 C 488.1999999999998 636.1299999999999 486.86999999999983 638.5399999999998 487.1999999999998 643.3999999999999 C 487.54999999999984 648.5399999999998 487.3499999999998 653.7199999999999 487.23999999999984 658.8799999999999 C 486.67999999999984 685.6599999999999 466.4599999999998 705.7399999999999 439.71999999999986 705.9599999999999 C 423.9 706.06 408.08 705.95 392.26 705.96 z" stroke-linecap="round" />
</g>
<g transform="matrix(1.82 0 0 1.82 3.23 153.01)" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(56,134,22); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-394.07, -654.42)" d="M 394.26 632.93 C 404.75 632.93 415.23 632.9 425.71999999999997 632.9399999999999 C 431.92999999999995 632.9599999999999 433.52 634.7399999999999 432.90999999999997 640.7099999999999 C 430.99999999999994 659.66 414.40999999999997 675.2199999999999 395.38 675.91 C 376.87 676.5799999999999 359.57 662.65 356 644.1899999999999 C 355.72 642.7199999999999 355.33 641.26 355.19 639.78 C 354.71 634.9 356.32 633.01 361.3 632.97 C 372.29 632.87 383.28 632.93 394.26 632.93 z" stroke-linecap="round" />
</g>
<g transform="matrix(1.82 0 0 1.82 66.29 26.74)" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(56,135,22); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-428.75, -584.99)" d="M 428.83 602 C 419.12 601.96 411.59999999999997 594.6 411.53 585.07 C 411.46999999999997 575.4100000000001 419.21 567.9100000000001 429.16999999999996 567.98 C 438.33 568.0500000000001 445.93999999999994 575.71 445.97999999999996 584.91 C 446.02 594.33 438.29 602.04 428.83 602 z" stroke-linecap="round" />
</g>
<g transform="matrix(1.82 0 0 1.82 -65.91 26.78)" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(56,135,22); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-356.06, -584.99)" d="M 339.05 584.57 C 339.19 574.94 346.67 567.84 356.53000000000003 567.99 C 366.26000000000005 568.14 373.21000000000004 575.46 373.07000000000005 585.42 C 372.94000000000005 595.16 365.62000000000006 602.13 355.68000000000006 602 C 346.04 601.87 338.91 594.4 339.05 584.57 z" stroke-linecap="round" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg width="145px" height="40px" viewBox="0 0 145 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><linearGradient x1="61.5370404%" y1="13%" x2="34.2376801%" y2="129.365079%" id="linearGradient-1"><stop stop-color="#EF7829" offset="0%"/><stop stop-color="#F0692A" offset="28%"/><stop stop-color="#F15E2C" offset="63%"/><stop stop-color="#F15A2C" offset="100%"/></linearGradient></defs><g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Blocks/Header_Unlogged" transform="translate(-15.000000, -15.000000)"><g id="icons/boosty_logo" transform="translate(15.000000, 15.000000)"><g id="Shape"><path d="M138.119363,13.14856 L132.002653,22.63144 L131.397878,13.14856 L122.575597,13.14856 C123.384615,10.366 124.037135,8.13256 124.037135,8.13256 L124.381963,7.01848 L117.6313,7.01848 L117.312997,8.13256 L115.851459,13.14856 L108.660477,13.14856 C102.750663,13.14856 99.4244032,14.8276 98.0503979,18.00352 C97.2546419,15.09952 94.6206897,13.14856 90.5782493,13.14856 C87.2902077,13.135208 84.1128672,14.3300173 81.6551724,16.504 C80.464191,14.45536 78.1061008,13.1512 74.8116711,13.1512 C71.2975199,13.1360778 67.9189855,14.5000837 65.4084881,16.94752 C64.3103448,14.656 61.8541114,13.14856 58.3262599,13.14856 C57.1586378,13.1510938 55.9961737,13.302814 54.867374,13.6 L55.397878,11.77312 C55.4066092,11.7439195 55.4181572,11.7156279 55.4323607,11.68864 L56.7904509,7 L50.066313,7 L45.7798408,21.73384 C45.668435,22.02952 45.5676393,22.32784 45.4801061,22.63144 C45.2902336,23.2752559 45.1623364,23.9355911 45.0981432,24.60352 C44.5384615,28.714 46.3474801,31.816 51.3660477,32.0272 C51.8475451,32.0843575 52.332067,32.1125687 52.8169761,32.11168 C56.2925823,32.0722669 59.6211655,30.7100879 62.1193634,28.3048 C63.1564987,30.6148 65.5676393,32.11168 69.2970822,32.11168 C72.5436452,32.0790306 75.6705362,30.8873894 78.1087533,28.7536 C79.2493369,30.80488 81.5862069,32.11168 85.061008,32.11168 L101.917772,32.11168 C107.143236,32.11168 110.095491,31.08472 111.6313,28.85392 C111.6313,30.98176 112.851459,32.11168 115.941645,32.11168 C118.437666,32.11168 121.777188,31.5652 126.366048,30.43792 L119.687003,39.9208 L126.411141,39.9208 L144.846154,13.14856 L138.119363,13.14856 Z M58.9310345,22.63144 C58.3023873,24.79096 56.2785146,26.53336 54.4217507,26.53336 C52.5649867,26.53336 51.5676393,24.79096 52.1962865,22.63144 C52.8249337,20.47192 54.8488064,18.72688 56.6923077,18.72688 C58.535809,18.72688 59.5596817,20.464 58.9310345,22.63144 Z M75.4164456,22.63144 C74.7877984,24.79096 72.7639257,26.53336 70.9071618,26.53336 C69.0503979,26.53336 68.0769231,24.79096 68.6923077,22.63144 C69.3076923,20.47192 71.3448276,18.72688 73.2015915,18.72688 C75.0583554,18.72688 76.0344828,20.464 75.4164456,22.63144 Z M84.4562334,22.63144 C85.0848806,20.46928 87.1087533,18.72688 88.9522546,18.72688 C90.795756,18.72688 91.8090186,20.46928 91.1803714,22.63144 C90.5517241,24.7936 88.5941645,26.4832 86.7586207,26.536 L86.6074271,26.536 C84.801061,26.4832 83.8355438,24.76192 84.4562334,22.63144 Z M106.127321,25.85752 C105.787798,26.64952 103.132626,26.53072 102.466844,26.54128 L95.928382,26.536 C96.8103436,25.360374 97.4758216,24.0383816 97.8938992,22.63144 C97.9363395,22.48888 97.9734748,22.34896 98.0079576,22.20904 C98.7108753,23.2096 100.201592,24.11248 103.100796,24.68536 C105.864721,25.216 106.3687,25.05496 106.127321,25.85752 Z M112.777188,23.7244 C112.204244,21.49624 109.721485,20.6224 106.241379,20.2 C104.785146,20.02576 103.965517,19.95712 104.148541,19.3288 C104.289125,18.8404 105.018568,18.73744 106.586207,18.73744 L114.230769,18.73744 L112.777188,23.7244 Z M119.496021,23.74552 C119.496021,23.70064 120.151194,21.4804 120.952255,18.72952 L125.217507,18.72952 L125.915119,25.8364 C118.888594,27.328 118.713528,26.92672 119.496021,23.74552 L119.496021,23.74552 Z" fill="#242B2C" fill-rule="nonzero"/><path d="M1.03841146,23.8920635 L7.81508464,0 L18.2158138,0 L16.1119922,7.40740741 C16.0897554,7.44994435 16.0716695,7.49460291 16.0579948,7.54074074 L10.5357227,27.1005291 L15.6903971,27.1005291 C13.537424,32.5848325 11.8524284,36.8846561 10.6354102,40 C1.12771484,39.8920635 -1.53892578,32.9481481 0.795423177,24.7322751 L1.03841146,23.8920635 Z M10.672793,40 L23.2084961,21.6 L17.8897526,21.6 L22.5169141,9.81375661 C30.4586849,10.6603175 34.1824284,17.0285714 31.993457,24.7301587 C29.6424935,33.015873 20.1285677,40 10.8659375,40 L10.672793,40 Z" fill="url(#linearGradient-1)" fill-rule="nonzero"/></g></g></g></g></svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -0,0 +1 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 339.43 295.27"><title>tether-usdt-logo</title><path d="M62.15,1.45l-61.89,130a2.52,2.52,0,0,0,.54,2.94L167.95,294.56a2.55,2.55,0,0,0,3.53,0L338.63,134.4a2.52,2.52,0,0,0,.54-2.94l-61.89-130A2.5,2.5,0,0,0,275,0H64.45a2.5,2.5,0,0,0-2.3,1.45h0Z" style="fill:#50af95;fill-rule:evenodd"/><path d="M191.19,144.8v0c-1.2.09-7.4,0.46-21.23,0.46-11,0-18.81-.33-21.55-0.46v0c-42.51-1.87-74.24-9.27-74.24-18.13s31.73-16.25,74.24-18.15v28.91c2.78,0.2,10.74.67,21.74,0.67,13.2,0,19.81-.55,21-0.66v-28.9c42.42,1.89,74.08,9.29,74.08,18.13s-31.65,16.24-74.08,18.12h0Zm0-39.25V79.68h59.2V40.23H89.21V79.68H148.4v25.86c-48.11,2.21-84.29,11.74-84.29,23.16s36.18,20.94,84.29,23.16v82.9h42.78V151.83c48-2.21,84.12-11.73,84.12-23.14s-36.09-20.93-84.12-23.15h0Zm0,0h0Z" style="fill:#fff;fill-rule:evenodd"/></svg>

After

Width:  |  Height:  |  Size: 874 B

+1 -1
View File
@@ -1 +1 @@
{"openapi":"3.1.0","paths":{"/api/{session}/auth/qr":{"get":{"operationId":"AuthController_getQR","summary":"Get QR code for pairing WhatsApp Web.","parameters":[{"name":"session","required":true,"in":"path","schema":{"default":"default"},"description":"WhatsApp session name"},{"name":"format","required":true,"in":"query","schema":{"default":"image","enum":["image","raw"],"type":"string"}}],"responses":{"200":{"content":{"image/png":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Base64File"},{"$ref":"#/components/schemas/QRCodeValue"}]}}},"description":""}},"tags":["auth"],"security":[{"api_key":[]}]}},"/api/{session}/auth/request-code":{"post":{"operationId":"AuthController_requestCode","summary":"Request authentication code.","parameters":[{"name":"session","required":true,"in":"path","schema":{"default":"default"},"description":"WhatsApp session name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestCodeRequest"}}}},"responses":{"201":{"description":""}},"tags":["auth"],"security":[{"api_key":[]}]}},"/api/{session}/auth/authorize-code":{"post":{"operationId":"AuthController_authorizeCode","summary":"Send OTP authentication code.","parameters":[{"name":"session","required":true,"in":"path","schema":{"default":"default"},"description":"WhatsApp session name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTPRequest"}}}},"responses":{"201":{"description":""}},"tags":["auth"],"security":[{"api_key":[]}]}},"/api/{session}/auth/captcha":{"get":{"operationId":"AuthController_getCaptcha","summary":"Get captcha image.","parameters":[{"name":"session","required":true,"in":"path","schema":{"default":"default"},"description":"WhatsApp session name"}],"responses":{"200":{"content":{"image/png":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Base64File"}]}}},"description":""}},"tags":["auth"],"security":[{"api_key":[]}]},"post":{"operationId":"AuthController_saveCaptcha","summary":"Enter captcha code.","parameters":[{"name":"session","required":true,"in":"path","schema":{"default":"default"},"description":"WhatsApp session name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptchaBody"}}}},"responses":{"201":{"description":""}},"tags":["auth"],"security":[{"api_key":[]}]}},"/api/sessions/start":{"post":{"operationId":"SessionsController_start","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionStartRequest"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionDTO"}}}}},"tags":["sessions"],"security":[{"api_key":[]}]}},"/api/sessions/stop":{"post":{"operationId":"SessionsController_stop","summary":"Stop session","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionStopRequest"}}}},"responses":{"201":{"description":""}},"tags":["sessions"],"security":[{"api_key":[]}]}},"/api/sessions/logout":{"post":{"operationId":"SessionsController_clean","summary":"Logout from session.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionLogoutRequest"}}}},"responses":{"201":{"description":""}},"tags":["sessions"],"security":[{"api_key":[]}]}},"/api/sessions":{"get":{"operationId":"SessionsController_list","parameters":[{"name":"all","required":false,"in":"query","example":false,"description":"Return all sessions, including those that are in the STOPPED state.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SessionInfo"}}}}}},"tags":["sessions"],"security":[{"api_key":[]}]}},"/api/sessions/{session}/me":{"get":{"operationId":"SessionController_getMe","summary":"Get information about the authenticated account","parameters":[{"name":"session","required":true,"in":"path","schema":{"default":"default"},"description":"WhatsApp session name"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeInfo"}}}}},"tags":["sessions"],"security":[{"api_key":[]}]}},"/api/checkNumberStatus":{"get":{"operationId":"ChattingController_checkNumberStatus","summary":"Check number status","parameters":[{"name":"phone","required":true,"in":"query","schema":{"type":"string"}},{"name":"session","required":true,"in":"query","schema":{"default":"default","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WANumberExistResult"}}}}},"tags":["chatting"],"security":[{"api_key":[]}]}},"/api/sendContactVcard":{"post":{"operationId":"ChattingContrLine truncated
{"openapi":"3.1.0","paths":{"/api/{session}/auth/qr":{"get":{"operationId":"AuthController_getQR","summary":"Get QR code for pairing WhatsApp Web.","parameters":[{"name":"session","required":true,"in":"path","schema":{"default":"default"},"description":"WhatsApp session name"},{"name":"format","required":true,"in":"query","schema":{"default":"image","enum":["image","raw"],"type":"string"}}],"responses":{"200":{"content":{"image/png":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Base64File"},{"$ref":"#/components/schemas/QRCodeValue"}]}}},"description":""}},"tags":["auth"],"security":[{"api_key":[]}]}},"/api/{session}/auth/request-code":{"post":{"operationId":"AuthController_requestCode","summary":"Request authentication code.","parameters":[{"name":"session","required":true,"in":"path","schema":{"default":"default"},"description":"WhatsApp session name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestCodeRequest"}}}},"responses":{"201":{"description":""}},"tags":["auth"],"security":[{"api_key":[]}]}},"/api/{session}/auth/authorize-code":{"post":{"operationId":"AuthController_authorizeCode","summary":"Send OTP authentication code.","parameters":[{"name":"session","required":true,"in":"path","schema":{"default":"default"},"description":"WhatsApp session name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTPRequest"}}}},"responses":{"201":{"description":""}},"tags":["auth"],"security":[{"api_key":[]}]}},"/api/{session}/auth/captcha":{"get":{"operationId":"AuthController_getCaptcha","summary":"Get captcha image.","parameters":[{"name":"session","required":true,"in":"path","schema":{"default":"default"},"description":"WhatsApp session name"}],"responses":{"200":{"content":{"image/png":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Base64File"}]}}},"description":""}},"tags":["auth"],"security":[{"api_key":[]}]},"post":{"operationId":"AuthController_saveCaptcha","summary":"Enter captcha code.","parameters":[{"name":"session","required":true,"in":"path","schema":{"default":"default"},"description":"WhatsApp session name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptchaBody"}}}},"responses":{"201":{"description":""}},"tags":["auth"],"security":[{"api_key":[]}]}},"/api/sessions/start":{"post":{"operationId":"SessionsController_start","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionStartRequest"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionDTO"}}}}},"tags":["sessions"],"security":[{"api_key":[]}]}},"/api/sessions/stop":{"post":{"operationId":"SessionsController_stop","summary":"Stop session","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionStopRequest"}}}},"responses":{"201":{"description":""}},"tags":["sessions"],"security":[{"api_key":[]}]}},"/api/sessions/logout":{"post":{"operationId":"SessionsController_clean","summary":"Logout from session.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionLogoutRequest"}}}},"responses":{"201":{"description":""}},"tags":["sessions"],"security":[{"api_key":[]}]}},"/api/sessions":{"get":{"operationId":"SessionsController_list","parameters":[{"name":"all","required":false,"in":"query","example":false,"description":"Return all sessions, including those that are in the STOPPED state.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SessionInfo"}}}}}},"tags":["sessions"],"security":[{"api_key":[]}]}},"/api/sessions/{session}":{"get":{"operationId":"SessionsController_get","parameters":[{"name":"session","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionInfo"}}}}},"tags":["sessions"],"security":[{"api_key":[]}]}},"/api/sessions/{session}/me":{"get":{"operationId":"SessionController_getMe","summary":"Get information about the authenticated account","parameters":[{"name":"session","required":true,"in":"path","schema":{"default":"default"},"description":"WhatsApp session name"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeInfo"}}}}},"tags":["sessions"],"security":[{"api_key":[]}]}},"/api/checkNumberStatus":{"get":{"operationId":"ChattingController_checkNumberStatus","summary":"Check number status","parameters":[{"name":"phone","required":true,"in":"query","schema":{"type":"string"}},{"nLine truncated
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+3 -1
View File
@@ -2,6 +2,8 @@
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"plugins": ["@nestjs/swagger"]
"plugins": ["@nestjs/swagger"],
"assets": ["dashboard/**", "core/engines/webjs/*"],
"watchAssets": true
}
}
+1 -1
View File
@@ -58,7 +58,7 @@
"rxjs": "^7.1.0",
"swagger-ui-express": "^4.1.4",
"venom-bot": "5.0.1",
"whatsapp-web.js": "https://github.com/devlikeapro/whatsapp-web.js#main-form-update-nodejs"
"whatsapp-web.js": "https://github.com/devlikeapro/whatsapp-web.js#main-fork-update"
},
"devDependencies": {
"@nestjs/cli": "^9.0.0",
+21 -2
View File
@@ -1,4 +1,13 @@
import { Body, Controller, Get, Post, Query } from '@nestjs/common';
import {
Body,
Controller,
Delete,
Get,
NotFoundException,
Param,
Post,
Query,
} from '@nestjs/common';
import {
ApiExtraModels,
ApiOperation,
@@ -39,9 +48,10 @@ class SessionsController {
@Post('/stop/')
@ApiOperation({ summary: 'Stop session' })
async stop(@Body() request: SessionStopRequest): Promise<void> {
await this.manager.stop(request);
if (request.logout) {
await this.manager.logout(request);
} else {
await this.manager.stop(request);
}
return;
}
@@ -57,6 +67,15 @@ class SessionsController {
const all = parseBool(query.all);
return this.manager.getSessions(all);
}
@Get('/:session')
async get(@Param('session') name: string): Promise<SessionInfo> {
const session = this.manager.getSessionInfo(name);
if (session === null) {
throw new NotFoundException('Session not found');
}
return session;
}
}
@ApiSecurity('api_key')
+13 -17
View File
@@ -8,13 +8,13 @@ import { getEngineName } from './version';
@Injectable()
export class WhatsappConfigService {
public files_uri = '/api/files';
public filesUri = '/api/files';
public schema = 'http';
constructor(private configService: ConfigService) {}
get filesURL(): string {
return `${this.schema}://${this.hostname}:${this.port}${this.files_uri}/`;
return `${this.schema}://${this.hostname}:${this.port}${this.filesUri}/`;
}
get hostname(): string {
@@ -131,31 +131,27 @@ export class WhatsappConfigService {
return this.configService.get('WHATSAPP_API_KEY', '');
}
getSwaggerEnabled(): boolean {
const value = this.configService.get('WHATSAPP_SWAGGER_ENABLED', 'true');
getDashboardEnabled(): boolean {
const value = this.configService.get('WAHA_DASHBOARD_ENABLED', 'true');
return parseBool(value);
}
getSwaggerUsernamePassword(): [string, string] | undefined {
const user = this.configService.get('WHATSAPP_SWAGGER_USERNAME', undefined);
const password = this.configService.get(
'WHATSAPP_SWAGGER_PASSWORD',
undefined,
);
if (!user && !password) {
getDashboardUsernamePassword(): [string, string] | null {
if (!this.getDashboardEnabled()) {
return null;
}
const user = this.configService.get('WAHA_DASHBOARD_USERNAME', 'waha');
const password = this.configService.get('WAHA_DASHBOARD_PASSWORD', 'waha');
if (!user || !password) {
console.log(
'Please set up both WHATSAPP_SWAGGER_USERNAME and WHATSAPP_SWAGGER_PASSWORD ' +
'Please set up both WAHA_DASHBOARD_USERNAME and WAHA_DASHBOARD_PASSWORD ' +
'to enable swagger authentication.',
);
return undefined;
return null;
}
return [user, password];
}
getSwaggerAdvancedConfigEnabled(): boolean {
return this.configService.get('WHATSAPP_SWAGGER_CONFIG_ADVANCED', false);
}
getHealthMediaFilesThreshold(): number {
return this.configService.get<number>(
'WHATSAPP_HEALTH_MEDIA_FILES_THRESHOLD_MB',
@@ -4,30 +4,52 @@ import { DECORATORS } from '@nestjs/swagger/dist/constants';
import { WhatsappConfigService } from '../config.service';
import { VERSION } from '../version';
import { SwaggerConfigServiceCore } from './config/SwaggerConfigServiceCore';
export class SwaggerModuleCore {
configure(app: INestApplication, webhooks: any[]) {
export class SwaggerConfiguratorCore {
constructor(protected app: INestApplication) {}
get title() {
return 'WAHA - WhatsApp HTTP API';
}
get description() {
return (
'WhatsApp HTTP API that you can run in a click!<br/>' +
'<br/>' +
'Learn more:' +
'<ul>' +
'<li><a href="https://waha.devlike.pro/" target="_blank">Documentation</a></li>' +
'<li><a href="https://waha.devlike.pro/docs/how-to/engines/#features" target="_blank">Supported features in engines</a></li>' +
'<li><a href="https://github.com/devlikeapro/whatsapp-http-api" target="_blank">GitHub - WAHA Core</a></li>' +
'<li><a href="https://github.com/devlikeapro/whatsapp-http-api-plu' + // Separate line to pass pre-commit check
's" target="_blank">GitHub - WAHA Plus</a></li>' +
'<li><b>NEW!</b> - <a href="/dashboard">WAHA Dashboard</a></li>' +
'<li><b>NEW!</b> - <a href="https://waha.devlike.pro/docs/how-to/waha-dashboard">WAHA Dashboard Documentation</a></li>' +
'</ul>' +
'<p>Support the project and get WAHA Plus version!</p>' +
'<ul>' +
'<li><a href="https://waha.devlike.pro/docs/how-to/plu' + // Separate line to pass pre-commit check
's-version/" target="_blank">WAHA Plus</a></li>' +
'<li><a href="https://patreon.com/wa_http_api/" target="_blank">Patreon</a></li>' +
'<li><a href="https://boosty.to/wa-http-api/" target="_blank">Boosty</a></li>' +
'<li><a href="https://portal.devlike.pro/" target="_blank">Patron Portal</a></li>' +
'</ul>'
);
}
get externalDocUrl() {
return 'https://waha.devlike.pro/';
}
configure(webhooks: any[]) {
const app = this.app;
const builder = new DocumentBuilder();
builder
.setTitle('WAHA - WhatsApp HTTP API')
.setDescription(
'WhatsApp HTTP API that you can run in a click!<br/>' +
'<ul>' +
'<li><a href="https://waha.devlike.pro/" target="_blank">Documentation</a></li>' +
'<li><a href="https://waha.devlike.pro/docs/how-to/engines/#features" target="_blank">Supported features in engines</a></li>' +
'<li><a href="https://github.com/devlikeapro/whatsapp-http-api" target="_blank">GitHub - WAHA Core</a></li>' +
'<li><a href="https://github.com/devlikeapro/whatsapp-http-api-plu' + // Separate line to pass pre-commit check
's" target="_blank">GitHub - WAHA Plus</a></li>' +
'</ul>' +
'<br/>' +
'Support the project and get WAHA Plus version!' +
'<ul>' +
'<li><a href="https://patreon.com/wa_http_api/" target="_blank">Patreon</a></li>' +
'<li><a href="https://boosty.to/wa-http-api/" target="_blank">Boosty</a></li>' +
'</ul>',
)
.setExternalDoc('WAHA', 'https://waha.devlike.pro/')
.setTitle(this.title)
.setDescription(this.description)
.setExternalDoc(this.title, this.externalDocUrl)
.setVersion(VERSION.version)
.addTag('sessions', 'Control WhatsApp sessions')
.addTag('auth', 'Authentication')
@@ -54,7 +76,8 @@ export class SwaggerModuleCore {
});
const config = app.get(WhatsappConfigService);
if (config.getSwaggerAdvancedConfigEnabled()) {
const swaggerConfig = app.get(SwaggerConfigServiceCore);
if (swaggerConfig.advancedConfigEnabled) {
builder.addServer('{protocol}://{host}:{port}/{baseUrl}', '', {
protocol: {
default: 'http',
@@ -89,7 +112,7 @@ export class SwaggerModuleCore {
);
document = this.configureWebhooks(document, webhooks);
SwaggerModule.setup('', app, document, {
customSiteTitle: 'WAHA - WhatsApp HTTP API',
customSiteTitle: this.title,
});
}
+2
View File
@@ -37,5 +37,7 @@ export abstract class SessionManager implements OnApplicationShutdown {
abstract getSession(name: string): WhatsappSession;
abstract getSessionInfo(name: string): Promise<SessionInfo | null>;
abstract getSessions(all: boolean): Promise<SessionInfo[]>;
}
+24 -6
View File
@@ -3,6 +3,7 @@ import { ConfigModule } from '@nestjs/config';
import { PassportModule } from '@nestjs/passport';
import { ServeStaticModule } from '@nestjs/serve-static';
import { TerminusModule } from '@nestjs/terminus';
import { join } from 'path';
import { AuthController } from '../api/auth.controller';
import { ChatsController } from '../api/chats.controller';
@@ -21,6 +22,8 @@ import { VersionController } from '../api/version.controller';
import { WhatsappConfigService } from '../config.service';
import { SessionManager } from './abc/manager.abc';
import { WAHAHealthCheckService } from './abc/WAHAHealthCheckService';
import { DashboardConfigServiceCore } from './config/DashboardConfigServiceCore';
import { SwaggerConfigServiceCore } from './config/SwaggerConfigServiceCore';
import { WAHAHealthCheckServiceCore } from './health/WAHAHealthCheckServiceCore';
import { SessionManagerCore } from './manager.core';
@@ -30,15 +33,26 @@ export const IMPORTS = [
}),
ServeStaticModule.forRootAsync({
imports: [],
extraProviders: [WhatsappConfigService],
inject: [WhatsappConfigService],
useFactory: (config: WhatsappConfigService) => {
return [
extraProviders: [WhatsappConfigService, DashboardConfigServiceCore],
inject: [WhatsappConfigService, DashboardConfigServiceCore],
useFactory: (
config: WhatsappConfigService,
dashboardConfig: DashboardConfigServiceCore,
) => {
const options = [
// Serve files (media)
{
rootPath: config.filesFolder,
serveRoot: config.files_uri,
serveRoot: config.filesUri,
},
];
if (dashboardConfig.enabled) {
options.push({
rootPath: join(__dirname, '..', 'dashboard'),
serveRoot: dashboardConfig.dashboardUri,
});
}
return options;
},
}),
PassportModule,
@@ -67,6 +81,8 @@ const PROVIDERS = [
provide: WAHAHealthCheckService,
useClass: WAHAHealthCheckServiceCore,
},
DashboardConfigServiceCore,
SwaggerConfigServiceCore,
WhatsappConfigService,
ConsoleLogger,
];
@@ -76,4 +92,6 @@ const PROVIDERS = [
controllers: CONTROLLERS,
providers: PROVIDERS,
})
export class AppModuleCore {}
export class AppModuleCore {
constructor(protected config: WhatsappConfigService) {}
}
@@ -0,0 +1,16 @@
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { parseBool } from '../../helpers';
@Injectable()
export class DashboardConfigServiceCore {
public dashboardUri = '/dashboard';
constructor(protected configService: ConfigService) {}
get enabled(): boolean {
const value = this.configService.get('WAHA_DASHBOARD_ENABLED', 'true');
return parseBool(value);
}
}
@@ -0,0 +1,17 @@
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { parseBool } from '../../helpers';
@Injectable()
export class SwaggerConfigServiceCore {
constructor(protected configService: ConfigService) {}
get advancedConfigEnabled(): boolean {
const value = this.configService.get(
'WHATSAPP_SWAGGER_CONFIG_ADVANCED',
false,
);
return parseBool(value);
}
}
+4 -2
View File
@@ -173,7 +173,7 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
this.log.debug(`Connecting store...`);
if (!this.store) {
this.log.debug(`Making a new auth store...`);
this.store = makeInMemoryStore({});
this.store = makeInMemoryStore({ logger: logger });
}
this.log.debug(`Binding store to socket...`);
this.store.bind(this.sock.ev);
@@ -516,7 +516,9 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
}
public async getContactProfilePicture(query: ContactQuery) {
throw new NotImplementedByEngineError();
const contact = this.ensureSuffix(query.contactId);
const url = await this.sock.profilePictureUrl(contact, 'image');
return { profilePictureURL: url };
}
public async blockContact(request: ContactRequest) {
@@ -0,0 +1,316 @@
<!DOCTYPE html><html class="no-js" dir="ltr" loc="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><title>WhatsApp Web</title><meta name="viewport" content="width=device-width"><meta name="google" content="notranslate"><meta name="format-detection" content="telephone=no"><meta name="description" content="Quickly send and receive WhatsApp messages right from your computer."><meta name="og:description" content="Quickly send and receive WhatsApp messages right from your computer."><meta name="og:url" content="https://web.whatsapp.com/"><meta name="og:title" content="WhatsApp Web"><meta name="og:image" content="https://static.facebook.com/images/whatsapp/www/whatsapp-promo.png"><link id="favicon" rel="shortcut icon" href="/img/favicon/1x/favicon.png" type="image/png"><link rel="apple-touch-icon" sizes="192x192" href="/apple-touch-icon.png" type="image/png"><meta name="theme-color" content="#111b21" media="(prefers-color-scheme: dark)"><meta name="theme-color" content="#f0f2f5"><link id="whatsapp-pwa-manifest-link" rel="manifest" href="/manifest.json" crossorigin="use-credentials"><style>#initial_startup{--startup-background:#f0f2f5;--startup-background-rgb:240,242,245;--startup-icon:#bbc5cb;--secondary-lighter:#8696a0;--primary-title:#41525d;--progress-primary:#00c298;--progress-background:#e9edef}.dark #initial_startup{--startup-background:#111b21;--startup-background-rgb:17,27,33;--startup-icon:#676f73;--primary-title:rgba(233, 237, 239, 0.88);--secondary-lighter:#667781;--progress-primary:#0b846d;--progress-background:#233138}#app,body,html{width:100%;height:100%;padding:0;margin:0;overflow:hidden}#app{position:absolute;top:0;left:0}#initial_startup{position:fixed;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;user-select:none;background-color:var(--startup-background)}#initial_startup .graphic{margin-top:-40px;color:var(--startup-icon)}#initial_startup .graphic .resume-logo{transform:translateX(calc(50% - 52px / 2))}#initial_startup .graphic::after{position:relative;top:-100%;left:calc(50% - 72px * 2 - 72px / 2);display:block;width:calc(72px * 3);height:100%;content:'';background:linear-gradient(to right,rgba(var(--startup-background-rgb),.5) 0,rgba(var(--startup-background-rgb),.5) 33.33%,rgba(var(--startup-background-rgb),0) 44.1%,rgba(var(--startup-background-rgb),0) 55.8%,rgba(var(--startup-background-rgb),.5) 66.66%,rgba(var(--startup-background-rgb),.5) 100%);opacity:1;animation:shimmer 1.5s linear .6s infinite}html[dir=rtl] #initial_startup .graphic::after{animation-direction:reverse}@keyframes shimmer{from{left:calc(50% - 72px * 2 - 72px / 2)}to{left:calc(50% - 72px / 2)}}#initial_startup .progress{position:relative;width:420px;height:3px;margin-top:40px}#initial_startup .progress progress{vertical-align:top}#initial_startup .main{margin-top:40px;font-size:17px;color:var(--primary-title)}#initial_startup .secondary{margin-top:12px;font-size:14px;color:var(--secondary-lighter)}#initial_startup .secondary span{display:inline-block;margin-bottom:2px;vertical-align:middle}progress{-webkit-appearance:none;appearance:none;width:100%;height:3px;margin:0;color:var(--progress-primary);background-color:var(--progress-background);border:none}progress[value]::-webkit-progress-bar{background-color:var(--progress-background)}progress[value]::-moz-progress-bar,progress[value]::-webkit-progress-value{background-color:var(--progress-primary);transition:width .45s ease}</style><link href="/stylex-f0601c57714fe972a8c4d2c2562f8082.css" rel="stylesheet"><link href="/app-6113f1562d101247269b.css" rel="stylesheet"></head><body class="web"><script data-binary-transparency-hash-key="inline-js-d11c72a06542fc3b43af600028cf0f996e4b9b178dfa047e18730efaf74aab0b">try{var systemThemeDark,theme=window.localStorage.getItem("theme"),systemThemeMode=window.localStorage.getItem("system-theme-mode");if(("true"===systemThemeMode||!theme)&&window.matchMedia){var systemTheme=window.matchMedia("(prefers-color-scheme: dark)");systemThemeDark=systemTheme&&systemTheme.matches}var darkTheme='"dark"'===theme||Boolean(systemThemeDark);darkTheme&&document.body.classList.add("dark")}catch(e){}</script><div id="app"></div><div id="hard_expire_time" data-time="1719543128.405"></div><div id="initial_startup"><div class="graphic"><span><svg width="250" height="52" xmlns="http://www.w3.org/2000/svg"><path class="resume-logo" d="M37.7 31.2c-.6-.4-3.8-2-4.4-2.1-.6-.2-1-.4-1.4.3l-2 2.5c-.4.4-.8.5-1.5.2-.6-.3-2.7-1-5.1-3.2-2-1.7-3.2-3.8-3.6-4.5-.4-.6 0-1 .3-1.3l1-1.1.6-1.1c.2-.4 0-.8 0-1.1l-2-4.8c-.6-1.3-1.1-1-1.5-1.1h-1.2c-.5 0-1.2.1-1.8.8-.5.6-2.2 2.2-2.2 5.3 0 3.2 2.3 6.3 2.6 6.7.3.4 4.6 7 11 9.7l3.7 1.4c1.5.5 3 .4 4 .2 1.3-.1 3.9-1.5 4.4-3 .5-1.5.5-2.8.4-3-.2-.4-.6-.5-1.3-.8M26 47.2c-3.9 0-7.6-1-11-3l-.7-.4-8.1 2L8.4 38l-.6-.8A21.4 21.4 0 0126 4.4a21.3 21.3 0 0121.4 21.4c0 11.8-9.6 21.4-21.4 21.4M44.2 7.6a25.8 25.8 0 00-40.6 31L0 52l13.7-3.6A2Line truncated
(self.webpackChunkwhatsapp_web_client=self.webpackChunkwhatsapp_web_client||[]).push([[5617],{307914:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}}},595318:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},415227:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=new Error(e);if(void 0===t.stack)try{throw t}catch(e){}return t}},670983:(e,t,r)=>{"use strict";var n=r(307914);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"?";if(null==e)throw(0,o.default)("Unexpected null or undefined: "+t);return e};var o=n(r(415227))},250473:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UNIQUE_UPLOADS_ALLOWED_BEFORE_THROTTLE=t.TICKET_URL=t.CLB_URL=t.CLB_TOKEN=t.CLB_CHECK_URL=void 0;var n=r(508247);t.CLB_CHECK_URL="https://crashlogs.whatsapp.net/wa_fls_upload_check",t.CLB_TOKEN="1063127757113399|745146ffa34413f9dbb5469f5370b7af",t.CLB_URL="https://crashlogs.whatsapp.net/wa_clb_data";const o=n.DYN_ORIGIN+"web-contact-us";t.TICKET_URL=o,t.UNIQUE_UPLOADS_ALLOWED_BEFORE_THROTTLE=0},207024:(e,t,r)=>{"use strict";var n=r(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.getDistribution=function(){let e="unknown";return e="prod","web_prod"},t.getLogUserAgent=function(e){let t,{appVersion:r,browser:n,device:o}=e;return t="Web/"+n,`WhatsApp/${r} ${t} Device/${o}`},n(r(472514)),n(r(556869))},794858:(e,t,r)=>{"use strict";var n=r(595318),o=n(r(670983)),a=r(508247),s=r(250473),c=r(207024),_=n(r(174285)),u=r(425017);function i(e){!function(e,t){const r=window.navigator.userAgent;if(r===p&&e.includes("getElementsByTagName"))return;const n=new FormData,i=new Blob([e],{type:"text/plain"});n.append("from_jid",function(){if(f)return f;try{f=JSON.parse((0,o.default)(_.default,"localStorage").getItem(d.UNKNOWN_ID)),f&&(f=f.replace("-",""))}catch(e){}if(!f){f="unknown"+Math.floor(1e10*Math.random());const e=f;try{(0,o.default)(_.default,"localStorage").setItem(d.UNKNOWN_ID,JSON.stringify(e))}catch(e){}}return(0,o.default)(f,"id")}()),n.append("agent",(0,c.getLogUserAgent)((0,u.parseUASimple)(r,a.VERSION_BASE))),n.append("file",i,"logs.txt"),n.append("tags","load");const l=new XMLHttpRequest,I=s.CLB_URL+"?access_token="+encodeURIComponent(s.CLB_TOKEN);l.open("POST",I,!0),l.send(n)}(e)}function l(e){let{error:t,reason:r,stack:n}=e;const o=(new Date).toISOString();return`${o}: error: ${t}\n${o}: reason for logs: ${r}\n${o}: userAgent: ${window.navigator.userAgent}\n${n}`}null==window.onerror&&(window.onerror=function(e,t,r){const n=t.split("?")[0];return"Uncaught SyntaxError: Unexpected token '<'"===e?(function(e){i(l({error:"failed to load a js or css bundle",reason:`failed to load [${e.split("/")[3].replace(/^\//,"")}]`,stack:""}))}(n),!0):(i(l({error:e,reason:`Error at [${n}:${r}]`,stack:""})),!1)});const d={UNKNOWN_ID:a.UNKNOWN_ID},p="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36";let f},425017:(e,t)=>{"use strict";function r(e){return e.includes("windows")?"Windows":e.includes("mac")?"Mac OS":e.includes("linux")?"Linux":"Unparsed"}Object.defineProperty(t,"__esModule",{value:!0}),t.parseUASimple=function(e,t){const n=e.toLowerCase();return{browser:s(n),device:r(n),appVersion:t}};const n=/(chrome|firefox)\/([\w\.]+)/i,o=/(edge|opr)\/([\w\.]+)/i,a={chrome:"Chrome",edge:"Edge",opr:"Opera",firefox:"Firefox"};function s(e){const t=e.match(o)||e.match(n);return null==t?"Unparsed":`${a[t[1]]} ${t[2]}`}},174285:(e,t)=>{"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;try{r=window.localStorage}catch(e){}var n=r;t.default=n},508247:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WS_ORIGIN=t.WEB_PUBLIC_PATH=t.VERSION_TERTIARY=t.VERSION_STR=t.VERSION_SECONDARY=t.VERSION_PRIMARY=t.VERSION_BASE=t.USER_TIMINGS=t.UNKNOWN_ID=t.LOCALHOST_ENV_CONFIG=t.HASH_PLACEHOLDER=t.FLB_PLATFORM=t.FB_APP_ID=t.DYN_ORIGIN=t.DIFF_VERSION=t.DIFF_ID=t.BUILD_URL=t.BUILD_TIMESTAMP=t.BUILD_ID=void 0;t.DIFF_ID="";t.DIFF_VERSION="",t.LOCALHOST_ENV_CONFIG=!1,t.HASH_PLACEHOLDER="507042ed75b89fb00e8ef35da3541122cbc261e6",t.VERSION_PRIMARY="2",t.VERSION_SECONDARY="2412",t.VERSION_TERTIARY="54",t.VERSION_BASE="2.2412.54",t.VERSION_STR="2.2412.54",t.DYN_ORIGIN="https://web.whatsapp.com/",t.WS_ORIGIN="",t.FLB_PLATFORM="web",t.FB_APP_ID="",t.UNKNOWN_ID="WAUnknownID",t.BUILD_ID="583059957",t.BUILD_TIMESTAMP="March 29, 2024",t.WEB_PUBLIC_PATH="/",t.BUILD_URL="https://web.whatsapp.com/",t.USER_TIMINGS=!1},472514:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.default}},556869:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){const r=new Error(t);if(void 0===r.stack)try{throw e}catch(e){}return r}}},e=>{"use strict";e(Line truncated
(self.webpackChunkwhatsapp_web_client=self.webpackChunkwhatsapp_web_client||[]).push([[2143],{363509:(e,t,n)=>{var r={"./f00.png":192256,"./f01.png":107151,"./f02.png":329449,"./f03.png":594719,"./f04.png":783004,"./f05.png":99381,"./f06.png":604893,"./f07.png":761353,"./f08.png":945598,"./f09.png":379575,"./f10.png":105211,"./f11.png":419751,"./f12.png":61294,"./f13.png":970938,"./f14.png":381790,"./f15.png":8669,"./f16.png":130047,"./f17.png":361022,"./f18.png":633295,"./f19.png":299635,"./f20.png":882645,"./f21.png":367083,"./f22.png":755359,"./f23.png":30003,"./f24.png":677659,"./f25.png":81024,"./f26.png":564195,"./f27.png":837704,"./f28.png":393374,"./f29.png":712282,"./f30.png":657894,"./f31.png":353320,"./f32.png":918234,"./f33.png":537426,"./f34.png":37382,"./f35.png":380904,"./f36.png":605193,"./f37.png":838324,"./f38.png":683149,"./f39.png":968480,"./f40.png":235741,"./f41.png":424081,"./f42.png":709062,"./f43.png":951839,"./f44.png":477271,"./f45.png":39622,"./f46.png":148373,"./f47.png":51400,"./f48.png":542720,"./f49.png":243805,"./f50.png":56995,"./f51.png":575688,"./f52.png":131796,"./f53.png":173785,"./f54.png":162521,"./f55.png":471449,"./f56.png":298224,"./f57.png":710601,"./f58.png":972870,"./f59.png":493224,"./f60.png":921564,"./f61.png":93169,"./f62.png":154423,"./f63.png":303491,"./f64.png":886262,"./f65.png":37806,"./f66.png":135049,"./f67.png":704971,"./f68.png":332845,"./f69.png":529664,"./f70.png":29469,"./f71.png":860540,"./f72.png":114364,"./f73.png":34476,"./f74.png":280952,"./f75.png":547236,"./f76.png":991385,"./f77.png":886342,"./f78.png":593828,"./f79.png":407026,"./f80.png":659076,"./f81.png":686555,"./f82.png":215330,"./f83.png":751331,"./f84.png":844780,"./f85.png":902506,"./f86.png":527300,"./f87.png":235074,"./f88.png":583020,"./f89.png":558516,"./f90.png":615707,"./f91.png":871247,"./f92.png":654647,"./f93.png":167517,"./f94.png":383439,"./f95.png":938404,"./f96.png":550273,"./f97.png":312123,"./f98.png":879144,"./f99.png":440594,"./favicon-error.png":172654,"./favicon-error2.png":819528,"./favicon.png":429242};function i(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=a,e.exports=i,i.id=363509},276554:(e,t,n)=>{var r={"./f00.png":211372,"./f01.png":648039,"./f02.png":149519,"./f03.png":298446,"./f04.png":868917,"./f05.png":146454,"./f06.png":580841,"./f07.png":941038,"./f08.png":457522,"./f09.png":604754,"./f10.png":644183,"./f11.png":899233,"./f12.png":800347,"./f13.png":452761,"./f14.png":219754,"./f15.png":318613,"./f16.png":117613,"./f17.png":670322,"./f18.png":55928,"./f19.png":98442,"./f20.png":732677,"./f21.png":664770,"./f22.png":643426,"./f23.png":31644,"./f24.png":106597,"./f25.png":407210,"./f26.png":561890,"./f27.png":258229,"./f28.png":181250,"./f29.png":341431,"./f30.png":60853,"./f31.png":875920,"./f32.png":621202,"./f33.png":523022,"./f34.png":746622,"./f35.png":13683,"./f36.png":945274,"./f37.png":374507,"./f38.png":536466,"./f39.png":855254,"./f40.png":695725,"./f41.png":297585,"./f42.png":175218,"./f43.png":81303,"./f44.png":249465,"./f45.png":55625,"./f46.png":448475,"./f47.png":767848,"./f48.png":658139,"./f49.png":697019,"./f50.png":263744,"./f51.png":814517,"./f52.png":302181,"./f53.png":665405,"./f54.png":661605,"./f55.png":990866,"./f56.png":671888,"./f57.png":435515,"./f58.png":18457,"./f59.png":820009,"./f60.png":63163,"./f61.png":820930,"./f62.png":969341,"./f63.png":108373,"./f64.png":399910,"./f65.png":510127,"./f66.png":134843,"./f67.png":168683,"./f68.png":279587,"./f69.png":481265,"./f70.png":929761,"./f71.png":67156,"./f72.png":14427,"./f73.png":118241,"./f74.png":555948,"./f75.png":305193,"./f76.png":585044,"./f77.png":56746,"./f78.png":973675,"./f79.png":263159,"./f80.png":437160,"./f81.png":331456,"./f82.png":958193,"./f83.png":68436,"./f84.png":15188,"./f85.png":335444,"./f86.png":961218,"./f87.png":712535,"./f88.png":756277,"./f89.png":111847,"./f90.png":83242,"./f91.png":697168,"./f92.png":906763,"./f93.png":169685,"./f94.png":234887,"./f95.png":424111,"./f96.png":271972,"./f97.png":739920,"./f98.png":694784,"./f99.png":760795,"./favicon-error.png":306769,"./favicon-error2.png":477238,"./favicon.png":56216};function i(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=a,e.exports=i,i.id=276554},123098:module=>{var e={},aa={},l;for(l in e)e.hasOwnProperty(l)&&(aa[l]=e[l]);function ba(e){eval.call(null,e)}for(l in e.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},"undefined"!=typeof arguments&&(e.arguments=arguments),"undefined"!=typeof console?(e.print||(e.print=function(e){console.log(e)}),e.printErr||(e.printErr=function(e){console.log(e)})):e.print||(e.print=function(){}),void 0===e.setWLine truncated
/**
* Apache License
*
* Version 2.0, January 2004
*
* http://www.apache.org/licenses/
*
* TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
*
* 1. Definitions.
*
* "License" shall mean the terms and conditions for use, reproduction, and dist
* ribution as defined by Sections 1 through 9 of this document.
*
* "Licensor" shall mean the copyright owner or entity authorized by the copyrig
* ht owner that is granting the License.
*
* "Legal Entity" shall mean the union of the acting entity and all other entiti
* es that control, are controlled by, or are under common control with that ent
* ity. For the purposes of this definition, "control" means (i) the power, dire
* ct or indirect, to cause the direction or management of such entity, whether
* by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of
* the outstanding shares, or (iii) beneficial ownership of such entity.
*
* "You" (or "Your") shall mean an individual or Legal Entity exercising permiss
* ions granted by this License.
*
* "Source" form shall mean the preferred form for making modifications, includi
* ng but not limited to software source code, documentation source, and configu
* ration files.
*
* "Object" form shall mean any form resulting from mechanical transformation or
* translation of a Source form, including but not limited to compiled object c
* ode, generated documentation, and conversions to other media types.
*
* "Work" shall mean the work of authorship, whether in Source or Object form, m
* ade available under the License, as indicated by a copyright notice that is i
* ncluded in or attached to the work (an example is provided in the Appendix be
* low).
*
* "Derivative Works" shall mean any work, whether in Source or Object form, tha
* t is based on (or derived from) the Work and for which the editorial revision
* s, annotations, elaborations, or other modifications represent, as a whole, a
* n original work of authorship. For the purposes of this License, Derivative W
* orks shall not include works that remain separable from, or merely link (or b
* ind by name) to the interfaces of, the Work and Derivative Works thereof.
*
* "Contribution" shall mean any work of authorship, including the original vers
* ion of the Work and any modifications or additions to that Work or Derivative
* Works thereof, that is intentionally submitted to Licensor for inclusion in
* the Work by the copyright owner or by an individual or Legal Entity authorize
* d to submit on behalf of the copyright owner. For the purposes of this defini
* tion, "submitted" means any form of electronic, verbal, or written communicat
* ion sent to the Licensor or its representatives, including but not limited to
* communication on electronic mailing lists, source code control systems, and
* issue tracking systems that are managed by, or on behalf of, the Licensor for
* the purpose of discussing and improving the Work, but excluding communicatio
* n that is conspicuously marked or otherwise designated in writing by the copy
* right owner as "Not a Contribution."
*
* "Contributor" shall mean Licensor and any individual or Legal Entity on behal
* f of whom a Contribution has been received by Licensor and subsequently incor
* porated within the Work.
*
* 2. Grant of Copyright License. Subject to the terms and conditions of this Li
* cense, each Contributor hereby grants to You a perpetual, worldwide, non-excl
* usive, no-charge, royalty-free, irrevocable copyright license to reproduce, p
* repare Derivative Works of, publicly display, publicly perform, sublicense, a
* nd distribute the Work and such Derivative Works in Source or Object form.
*
* 3. Grant of Patent License. Subject to the terms and conditions of this Licen
* se, each Contributor hereby grants to You a perpetual, worldwide, non-exclusi
* ve, no-charge, royalty-free, irrevocable (except as stated in this section) p
* atent license to make, have made, use, offer to sell, sell, import, and other
* wise transfer the Work, where such license applies only to those patent claim
* s licensable by such Contributor that are necessarily infringed by their Cont
* ribution(s) alone or by combination of their Contribution(s) with the Work to
* which such Contribution(s) was submitted. If You institute patent litigation
* against any entity (including a cross-claim or counterclaim in a lawsuit) al
* leging that the Work or a Contribution incorporated within the Work constitut
* es direct or contributory patent infringement, then any patent licenses grant
* ed to You under this License for that Work shall terminate as of the date suc
* h litigation is filed.
*
* 4. Redistribution. You may reproduce and distribute copies of the Work or Der
* ivative Works thereof in any medium, with or without modifications, and in So
* urce or Object form, provided that You meet the following conditions:
*
* (a) You must give any other recipients of the Work or Derivative Works a
* copy of this License; and
*
* (b) You must cause any modified files to carry prominent notices stating
* that You changed the files; and
*
* (c) You must retain, in the Source form of any Derivative Works that You
* distribute, all copyright, patent, trademark, and attribution notices from t
* he Source form of the Work, excluding those notices that do not pertain to an
* y part of the Derivative Works; and
*
* (d) If the Work includes a "NOTICE" text file as part of its distributio
* n, then any Derivative Works that You distribute must include a readable copy
* of the attribution notices contained within such NOTICE file, excluding thos
* e notices that do not pertain to any part of the Derivative Works, in at leas
* t one of the following places: within a NOTICE text file distributed as part
* of the Derivative Works; within the Source form or documentation, if provided
* along with the Derivative Works; or, within a display generated by the Deriv
* ative Works, if and wherever such third-party notices normally appear. The co
* ntents of the NOTICE file are for informational purposes only and do not modi
* fy the License. You may add Your own attribution notices within Derivative Wo
* rks that You distribute, alongside or as an addendum to the NOTICE text from
* the Work, provided that such additional attribution notices cannot be constru
* ed as modifying the License.
*
* You may add Your own copyright statement to Your modifications and may p
* rovide additional or different license terms and conditions for use, reproduc
* tion, or distribution of Your modifications, or for any such Derivative Works
* as a whole, provided Your use, reproduction, and distribution of the Work ot
* herwise complies with the conditions stated in this License.
*
* 5. Submission of Contributions. Unless You explicitly state otherwise, any Co
* ntribution intentionally submitted for inclusion in the Work by You to the Li
* censor shall be under the terms and conditions of this License, without any a
* dditional terms or conditions. Notwithstanding the above, nothing herein shal
* l supersede or modify the terms of any separate license agreement you may hav
* e executed with Licensor regarding such Contributions.
*
* 6. Trademarks. This License does not grant permission to use the trade names,
* trademarks, service marks, or product names of the Licensor, except as requi
* red for reasonable and customary use in describing the origin of the Work and
* reproducing the content of the NOTICE file.
*
* 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
* writing, Licensor provides the Work (and each Contributor provides its Contri
* butions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, e
* ither express or implied, including, without limitation, any warranties or co
* nditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTIC
* ULAR PURPOSE. You are solely responsible for determining the appropriateness
* of using or redistributing the Work and assume any risks associated with Your
* exercise of permissions under this License.
*
* 8. Limitation of Liability. In no event and under no legal theory, whether in
* tort (including negligence), contract, or otherwise, unless required by appl
* icable law (such as deliberate and grossly negligent acts) or agreed to in wr
* iting, shall any Contributor be liable to You for damages, including any dire
* ct, indirect, special, incidental, or consequential damages of any character
* arising as a result of this License or out of the use or inability to use the
* Work (including but not limited to damages for loss of goodwill, work stoppa
* ge, computer failure or malfunction, or any and all other commercial damages
* or losses), even if such Contributor has been advised of the possibility of s
* uch damages.
*
* 9. Accepting Warranty or Additional Liability. While redistributing the Work
* or Derivative Works thereof, You may choose to offer, and charge a fee for, a
* cceptance of support, warranty, indemnity, or other liability obligations and
* /or rights consistent with this License. However, in accepting such obligatio
* ns, You may act only on Your own behalf and on Your sole responsibility, not
* on behalf of any other Contributor, and only if You agree to indemnify, defen
* d, and hold each Contributor harmless for any liability incurred by, or claim
* s asserted against, such Contributor by reason of your accepting any such war
* ranty or additional liability.
*
* END OF TERMS AND CONDITIONS
*
* APPENDIX: How to apply the Apache License to your work.
*
* To apply the Apache License to your work, attach the following boilerplate no
* tice, with the fields enclosed by brackets "[]" replaced with your own identi
* fying information. (Don't include the brackets!) The text should be enclosed
* in the appropriate comment syntax for the file format. We also recommend tha
* t a file or class name and description of purpose be included on the same "pr
* inted page" as the copyright notice for easier identification within third-pa
* rty archives.
*
* Copyright [yyyy] [name of copyright owner]
*
* Licensed under the Apache License, Version 2.0 (the "License");
*
* you may not use this file except in compliance with the License.
*
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
*
* distributed under the License is distributed on an "AS IS" BASIS,
*
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
*
* limitations under the License.
*
* THIS FILE HAS BEEN AUTOMATICALLY GENERATED AND IS NOT MEANT TO BE
* EDITED THROUGH NORMAL MEANS. PLEASE CHECK THE DOCUMENTATION FOR
* DETAILS AND GUIDANCE: http://fburl.com/js-libs-www
*
* @preserve-header
* @noflow
* @nolint
*/var r={},i={exports:r};function a(){var e,t;e=this,t=function(){
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var e=function(){return(e=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function t(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,i=Object.keys,a=Array.isArray;function o(e,t){return"object"!=typeof t||i(t).forEach((function(n){e[n]=t[n]})),e}"undefined"==typeof Promise||r.Promise||(r.Promise=Promise);var s=Object.getPrototypeOf,l={}.hasOwnProperty;function u(e,t){return l.call(e,t)}function c(e,t){"function"==typeof t&&(t=t(s(e))),("undefined"==typeof Reflect?i:Reflect.ownKeys)(t).forEach((function(n){p(e,n,t[n])}))}var d=Object.defineProperty;function p(e,t,n,r){d(e,t,o(n&&u(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function f(e){return{from:function(t){return e.prototype=Object.create(t.prototype),p(e.prototype,"constructor",e),{extend:c.bind(null,e.prototype)}}}}var _=Object.getOwnPropertyDescriptor;function g(e,t){var n;return _(e,t)||(n=s(e))&&g(n,t)}var m=[].slice;function h(e,t,n){return m.call(e,t,n)}function y(e,t){return t(e)}function E(e){if(!e)throw new Error("Assertion Failed")}function S(e){r.setImmediate?setImmediate(e):setTimeout(e,0)}function v(e,t){return e.reduce((function(e,n,r){var i=t(n,r);return i&&(e[i[0]]=i[1]),e}),{})}function T(e,t){if(u(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,i=t.length;r<i;++r){var a=T(e,t[r]);n.push(a)}return n}var o=t.indexOf(".");if(-1!==o){var s=e[t.substr(0,o)];return void 0===s?void 0:T(s,t.substr(o+1))}}function M(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){E("string"!=typeof n&&"length"in n);for(var r=0,i=t.length;r<i;++r)M(e,t[r],n[r])}else{var o=t.indexOf(".");if(-1!==o){var s=t.substr(0,o),l=t.substr(o+1);if(""===l)void 0===n?a(e)&&!isNaN(parseInt(s))?e.splice(s,1):delete e[s]:e[s]=n;else{var c=e[s];c&&u(e,s)||(c=e[s]={}),M(c,l,n)}}else void 0===n?a(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function b(e){var t={};for(var n in e)u(e,n)&&(t[n]=e[n]);return t}var A=[].concat;function C(e){return A.apply([],e)}var P="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(C([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return r[e]})),I=P.map((function(e){return r[e]}));v(P,(function(e){return[e,!0]}));var O=null;function R(e){O="undefined"!=typeof WeakMap&&new WeakMap;var t=N(e);return O=null,t}function N(e){if(!e||"object"!=typeof e)return e;var t=O&&O.get(e);if(t)return t;if(a(e)){t=[],O&&O.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(N(e[n]))}else if(I.indexOf(e.constructor)>=0)t=e;else{var i=s(e);for(var o in t=i===Object.prototype?{}:Object.create(i),O&&O.set(e,t),e)u(e,o)&&(t[o]=N(e[o]))}return t}var D={}.toString;function w(e){return D.call(e).slice(8,-1)}var L="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",k="symbol"==typeof L?function(e){var t;return null!=e&&(t=e[L])&&t.apply(e)}:function(){return null},G={};function U(e){var t,n,r,i;if(1===arguments.length){if(a(e))return e.slice();if(this===G&&"string"==typeof e)return[e];if(i=k(e)){for(n=[];!(r=i.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}var x="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},B="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function F(e,t){B=e,j=t}var j=function(){return!0},K=!new Error("").stack;function Y(){if(K)try{throw new Error}catch(e){return e}return new Error}function W(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(j).map((function(e){return"\n"+e})).join("")):""}var V=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],H=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(V),$={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has alreadLine truncated
/*! modernizr 3.11.8 (Custom Build) | MIT *
* https://modernizr.com/download/?-adownload-cssanimations-csstransitions-exiforientation-serviceworker-webp-domprefixes-hasevent-prefixed-prefixes-setclasses-testallprops-testprop !*/
!function(e,t,n,r){function i(e,t){return typeof e===t}function a(e){var t=v.className,n=E._config.classPrefix||"";if(T&&(t=t.baseVal),E._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}E._config.enableClasses&&(e.length>0&&(t+=" "+n+e.join(" "+n)),T?v.className.baseVal=t:v.className=t)}function o(){return"function"!=typeof n.createElement?n.createElement(arguments[0]):T?n.createElementNS.call(n,"http://www.w3.org/2000/svg",arguments[0]):n.createElement.apply(n,arguments)}function s(e,t){return!!~(""+e).indexOf(t)}function l(e,t,r,i){var a,s,l,u,c="modernizr",d=o("div"),p=function(){var e=n.body;return e||((e=o(T?"svg":"body")).fake=!0),e}();if(parseInt(r,10))for(;r--;)(l=o("div")).id=i?i[r]:c+(r+1),d.appendChild(l);return(a=o("style")).type="text/css",a.id="s"+c,(p.fake?p:d).appendChild(a),p.appendChild(d),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(n.createTextNode(e)),d.id=c,p.fake&&(p.style.background="",p.style.overflow="hidden",u=v.style.overflow,v.style.overflow="hidden",v.appendChild(p)),s=t(d,e),p.fake&&p.parentNode?(p.parentNode.removeChild(p),v.style.overflow=u,v.offsetHeight):d.parentNode.removeChild(d),!!s}function u(e){return e.replace(/([A-Z])/g,(function(e,t){return"-"+t.toLowerCase()})).replace(/^ms-/,"-ms-")}function c(e,n){var i=e.length;if("CSS"in t&&"supports"in t.CSS){for(;i--;)if(t.CSS.supports(u(e[i]),n))return!0;return!1}if("CSSSupportsRule"in t){for(var a=[];i--;)a.push("("+u(e[i])+":"+n+")");return l("@supports ("+(a=a.join(" or "))+") { #modernizr { position: absolute; } }",(function(e){return"absolute"===function(e,n,r){var i;if("getComputedStyle"in t){i=getComputedStyle.call(t,e,n);var a=t.console;null!==i?r&&(i=i.getPropertyValue(r)):a&&a[a.error?"error":"log"].call(a,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}else i=!n&&e.currentStyle&&e.currentStyle[r];return i}(e,null,"position")}))}return r}function d(e){return e.replace(/([a-z])-([a-z])/g,(function(e,t,n){return t+n.toUpperCase()})).replace(/^-/,"")}function p(e,t,n,a){function l(){p&&(delete O.style,delete O.modElem)}if(a=!i(a,"undefined")&&a,!i(n,"undefined")){var u=c(e,n);if(!i(u,"undefined"))return u}for(var p,f,_,g,m,h=["modernizr","tspan","samp"];!O.style&&h.length;)p=!0,O.modElem=o(h.shift()),O.style=O.modElem.style;for(_=e.length,f=0;f<_;f++)if(g=e[f],m=O.style[g],s(g,"-")&&(g=d(g)),O.style[g]!==r){if(a||i(n,"undefined"))return l(),"pfx"!==t||g;try{O.style[g]=n}catch(e){}if(O.style[g]!==m)return l(),"pfx"!==t||g}return l(),!1}function f(e,t){return function(){return e.apply(t,arguments)}}function _(e,t,n,r,a){var o=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+P.join(o+" ")+o).split(" ");return i(t,"string")||i(t,"undefined")?p(s,t,r,a):function(e,t,n){var r;for(var a in e)if(e[a]in t)return!1===n?e[a]:i(r=t[e[a]],"function")?f(r,n||t):r;return!1}(s=(e+" "+b.join(o+" ")+o).split(" "),t,n)}function g(e,t,n){return _(e,r,r,t,n)}function m(e,t){if("object"==typeof e)for(var n in e)R(e,n)&&m(n,e[n]);else{var r=(e=e.toLowerCase()).split("."),i=E[r[0]];if(2===r.length&&(i=i[r[1]]),void 0!==i)return E;t="function"==typeof t?t():t,1===r.length?E[r[0]]=t:(!E[r[0]]||E[r[0]]instanceof Boolean||(E[r[0]]=new Boolean(E[r[0]])),E[r[0]][r[1]]=t),a([(t&&!1!==t?"":"no-")+r.join("-")]),E._trigger(e,t)}return E}var h=[],y={_version:"3.11.8",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout((function(){t(n[e])}),0)},addTest:function(e,t,n){h.push({name:e,fn:t,options:n})},addAsyncTest:function(e){h.push({name:null,fn:e})}},E=function(){};E.prototype=y,E=new E;var S=[],v=n.documentElement,T="svg"===v.nodeName.toLowerCase(),M="Moz O ms Webkit",b=y._config.usePrefixes?M.toLowerCase().split(" "):[];y._domPrefixes=b;var A=y._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];y._prefixes=A;var C=function(){var e=!("onblur"in v);return function(t,n){var i;return!!t&&(n&&"string"!=typeof n||(n=o(n||"div")),!(i=(t="on"+t)in n)&&e&&(n.setAttribute||(n=o("div")),n.setAttribute(t,""),i="function"==typeof n[t],n[t]!==r&&(n[t]=r),n.removeAttribute(t)),i)}}();y.hasEvent=C;var P=y._config.usePrefixes?M.split(" "):[];y._cssomPrefixes=P;var I={elem:o("modernizr")};E._q.push((function(){delete I.elem}));var O={style:I.elem.style};E._q.unshift((function(){delete O.style})),y.testAllProps=_;var R,N=function(e){var n,i=A.length,a=t.CSSRule;if(void 0===a)return r;if(!e)return!1;if((n=(e=e.replace(/^@/,"")).replace(/-/g,"_").toUpperCase()+"_RULE")in a)return"@"+e;for(var o=0;o<i;o++){var s=A[o];if(s.toUpperCase()+"_"+n in a)return"@-"+s.toLowerCase()+"-"+e}return!1};y.atRule=N,y.prefixed=function(e,t,n){return 0===e.indexOf("@")?N(e):(-1!==e.indexOf("-")&&(e=d(e)),t?_(e,t,n):_(e,"pfx"))},y.testAllProps=g,y.testProp=function(e,t,n){return p([e],r,t,n)},function(){var e={}.hasOwnProperty;R=i(e,"undefined")||i(e.call,"undefined")?function(e,t){return t in e&&i(e.constructor.prototyLine truncated
\tmoving blocked collections to dirty: [${e}]
\tadding inflight collections to pending: [${Array.from(T)}]`,w()};var i=r(n(311504)),a=n(819416),o=n(377380),s=n(822144),l=n(986753),u=n(526835),c=(n(522815),r(n(436269))),d=n(122393),p=(n(405057),n(272961)),f=n(36686),_=n(751691),g=n(787685),m=n(998667),h=n(90347),y=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=E(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(123647));function E(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(E=function(e){return e?n:t})(e)}const S=36e5;let v,T=new Set,M=new Set,b=!1,A=0,C=0;function P(){return I.apply(this,arguments)}function I(){return(I=(0,i.default)((function*(e,t){const n=null!=t?yield O(e,t):e;return __LOG__(2)`syncd: marking for sync: ${n}`,n.forEach((e=>{const t=c.default.getCollectionState(e);__LOG__(2)`syncd: ${e} state before sync: ${t}`,t===d.CollectionSyncState.UpToDate?c.default.moveCollectionsToDirty([e]):t===d.CollectionSyncState.Dirty&&(M=new Set([...Array.from(M),e]))})),yield c.default.persistToDb(),w()}))).apply(this,arguments)}function O(){return R.apply(this,arguments)}function R(){return(R=(0,i.default)((function*(e,t){__LOG__(2)`syncd: start filter collections: ${e}`;const n=yield(0,o.bulkGetCollectionVersionsInTransaction)(e),r=new Map(e.map(((e,t)=>{var r;return[e,null===(r=n[t])||void 0===r?void 0:r.version]})));return e.filter((e=>{const n=r.get(e);if(null==n)return __LOG__(2)`syncd: local version for ${e} missing; will mark for sync.`,!0;const i=t.get(e);return null==i?(__LOG__(2)`syncd: server version for ${e} missing; will mark for sync.`,!0):n<i?(__LOG__(2)`syncd: local version (${n}) for ${e} less than server version (${i}); will mark for sync.`,!0):(__LOG__(2)`syncd: local version (${n})for ${e} >= server version (${i}); will not mark for sync.`,!1)}))}))).apply(this,arguments)}function N(){return(N=(0,i.default)((function*(){const e=yield(0,u.countSyncActionsInTransaction)();y.setStoredMutationCount(e);const t=yield(0,u.getSyncActionsByActionStatesInTransaction)([d.SyncActionState.Malformed]);y.setInvalidActionCount(t.length);const n=yield(0,u.getSyncActionsByActionStatesInTransaction)([d.SyncActionState.Unsupported]);y.setUnsupportedActionCount(n.length);const r=yield(0,s.getMissingKeyCountTransaction)();y.setMissingKeyCount(r)}))).apply(this,arguments)}function D(){return(D=(0,i.default)((function*(){}))).apply(this,arguments)}function w(){return L.apply(this,arguments)}function L(){return(L=(0,i.default)((function*(){if((0,p.isSyncdDisabled)())return Promise.resolve();const e=c.default.getCollectionsInStateDirty();__LOG__(2)`syncd: dirty collections: ${e}`;const t=new Set(e.filter((e=>!T.has(e))));if(0===t.size)return __LOG__(2)`syncd: no collections to sync`,Promise.resolve();let n=[];try{T=new Set([...Array.from(T),...Array.from(t)]),__LOG__(2)`syncd: initiate server sync`,n=yield(0,h.serverSync)(Array.from(t)),__LOG__(2)`syncd: server sync successful`;const e=n.filter((e=>e.state===d.CollectionState.ErrorRetry));e.length>0&&(C=e[0].serverBackoff||0,A=0),U(n)}catch(e){__LOG__(2)`syncd: exception during sync(): ${e}`,c.default.moveCollectionsToFiniteRetry(Array.from(t))}finally{__LOG__(2)`syncd: cleanup after sync()`,c.default.persistToDb(),T=new Set(Array.from(T).filter((e=>!t.has(e)))),G(),yield(0,a.getDbImpls)().handleSyncCompleted(n)}}))).apply(this,arguments)}function k(){if((0,p.isSyncdDisabled)())return;const e=new Set(c.default.getCollectionsInStateRetry());var t,n;0!==e.size&&(v=setTimeout((0,i.default)((function*(){try{b=!0,A+=1,__LOG__(2)`syncd: initiate server sync retry`;const t=yield(0,h.serverSync)(Array.from(e));__LOG__(2)`syncd: server sync retry successful`,U(t)}catch(t){__LOG__(2)`syncd: exception during handleRetry(): ${t}`,c.default.moveCollectionsToFiniteRetry(Array.from(e))}finally{__LOG__(2)`syncd: cleanup after handleRetry()`,function(){const e=c.default.getExpiredCollections();e.length>0&&(c.default.moveCollectionsToFatal(e),__LOG__(4,void 0,new Error,!0)`syncd: fatal error: expired collections`,SEND_LOGS("syncd: fatal error: expired collections"),(0,g.reportSyncdFatalError)(g.SyncdFatalErrorType.TOO_MANY_INTERNAL_SERVER_ERRORS_IN_7D))}(),c.default.persistToDb(),b=!1,G()}})),(t=A,n=C,Math.min(Math.max(2**t*1e3,n),S))))}function G(){__LOG__(2)`syncd: state machine tick`,c.default.getCollectionsInStateDirty().length>0&&(M=new Set(Array.from(M).filter((e=>T.has(e)))),w());const e=c.default.getCollectionsInStateRetry();if(e.length>0){if(b)return void __LOG__(2)`syncd: retry is in flight`;null!=v&&clearTimeout(v),M=new Set(Array.from(M).filter((t=>!e.includes(t)))),k()}c.default.getCollectionsInStateFatal().length>0&&(0,a.getDbImplLine truncated
${e} snapshot macsToAdd:
${Array.from(l.entries()).map((e=>{let[t,n]=e;return T(t,n)})).join("\n\t")}`;const u=yield o.LT_HASH_ANTI_TAMPERING.add(o.EMPTY_LT_HASH,Array.from(l.values())),{snapshotMacKey:c}=yield(0,f.generateEncryptionKeys)(s),d=(0,_.to64BitNetworkOrder)(r.version),p=(0,_.toUtf8)(e).buffer;return __LOG__(2)`syncd: validating snapshot mac for ${e} snapshot v${r.version}:
ltHash: ${(0,_.arrayBufferToHexPadded)(u)}
encoded version: ${(0,_.arrayBufferToHexPadded)(d)}
encoded collection: ${(0,_.arrayBufferToHexPadded)(p)}
expected snapshotMAC: ${(0,_.arrayBufferToHexPadded)(n)}`,yield I(e,n,c,u,d,p,!0,a.length,t.version.version,null,null,null,null),u}))).apply(this,arguments)}function A(){return(A=(0,i.default)((function*(e,t,n){__LOG__(2)`syncd: computeLtHashAndValidatePatch for ${e}`;const{version:r,mutations:o,snapshotMac:s,patchMac:u,keyId:c}=t,p=c.id,y=yield(0,m.getKeyData)(p);if(!y)throw new g.SyncdMissingKeyError;const{snapshotMacKey:E,patchMacKey:S}=yield(0,f.generateEncryptionKeys)(y),M=o.map((e=>({operation:e.operation,indexMac:e.record.index.blob,valueMac:(0,f.valueMacFromIndexAndValueCipherText)(e.record.value.blob)}))),b=yield(0,a.runInTransaction)({SyncActionStore:!0},function(){var t=(0,i.default)((function*(t){let{SyncActionStore:n}=t;return yield n.getByCollections([e])}));return function(){return t.apply(this,arguments)}}()),A=(0,a.getConfig)().syncShouldCalculateLtHashFromScratch()&&b&&b.length<1e3;__LOG__(2)`syncd: shouldRecalculateLtHash: ${A}`;const C=A?yield U(b):yield(0,l.getCollectionVersionLtHashInTransaction)(e),P=yield w(e,M,n,t.version.version,v.Incoming,C),O=(0,_.to64BitNetworkOrder)(r.version),N=(0,_.toUtf8)(e).buffer;__LOG__(2)`syncd: validating snapshot and patch mac for ${e} v${r.version}:
expected snapshotMAC: ${(0,_.arrayBufferToHexPadded)(s)}
expected patchMAC: ${(0,_.arrayBufferToHexPadded)(u)}
encoded version: ${(0,_.arrayBufferToHexPadded)(O)}
encoded collection: ${(0,_.arrayBufferToHexPadded)(N)}
key ID: ${(0,_.arrayBufferToHexPadded)((0,h.fromSyncKeyId)(p))}`;try{yield R(e,u,S,s,M.map((e=>e.valueMac)),O,N,o.length,r.version),yield I(e,s,E,P.ltHash,O,N,!1,o.length,r.version,t.clientDebugData,C,P,t.deviceIndex)}catch(e){throw yield function(){return D.apply(this,arguments)}(),e}return P.ltHash;function D(){return(D=(0,i.default)((function*(){const t=yield F(e,!1),n=new Map(t.map((e=>{let{indexMac:t,valueMac:n}=e;return[(0,_.arrayBufferToHexPadded)(t),(0,_.arrayBufferToHexPadded)(n)]})));__LOG__(2)`syncd: error on incoming records:
\t${M.map((e=>{let{operation:t,indexMac:r,valueMac:i}=e;return`${t===d.SyncdMutation$SyncdOperation.SET?"set":"remove"} | ${T(r,i,!1)} | ${n.has((0,_.arrayBufferToHexPadded)(r))?"found":"did not find"} indexMAC in the above logged macs`})).join("\n\t")}`}))).apply(this,arguments)}}))).apply(this,arguments)}function C(){return P.apply(this,arguments)}function P(){return(P=(0,i.default)((function*(e,t){const n=yield(0,l.getCollectionVersionInTransaction)(e).then((e=>{var t;return null!==(t=null==e?void 0:e.version)&&void 0!==t?t:0}));if(n!==t-1){const r=n>t-1?"greater-than-expected":"less-than-expected";throw __LOG__(3,void 0,void 0,!0)`syncd: ${e} received patch v${t} !== latest local version (v${n}) + 1`,SEND_LOGS(`syncd-version-check-error-local-version-${r}`),new g.SyncdRetryableError(`syncd-version-check-error-local-version-${r}`)}const r=yield(0,l.getCollectionVersionLtHashInTransaction)(e);if((0,s.arrayBuffersEqual)(r,o.EMPTY_LT_HASH)&&1!==t)throw __LOG__(3,void 0,void 0,!0)`syncd: empty local lthash found when processing ${e} patch v${t}`,SEND_LOGS("syncd-empty-lthash-on-mac-mismatch"),new g.SyncdRetryableError("empty lthash")}))).apply(this,arguments)}function I(){return O.apply(this,arguments)}function O(){return(O=(0,i.default)((function*(e,t,n,r,i,o,u,c,d,p,_,m,h){var E;const S=(0,a.getConfig)().syncdShouldNotFatalOnSnapshotMacMismatchInPatches()&&!u,v=null!==(E=yield(0,l.getIsCollectionInMacMismatchFatalInTransaction)(e))&&void 0!==E&&E;if(S&&v)return void __LOG__(2)`syncd: collection ${e} is already in snapshot mac mismatch so not checking again`;const T=yield(0,f.generateSnapshotMac)(n,r,i,o);if(!(0,s.arrayBuffersEqual)(T,t)){__LOG__(3,void 0,void 0,!0)`syncd: unable to validate snapshot mac.`,SEND_LOGS("syncd: unable to validate snapshot mac.",.01),u||(yield C(e,d)),yield(0,a.getDbImpls)().writeSyncdLog(e,"failed validate snapshot mac");const{isLtHashConsistent:t,scratchLtHash:n}=yield k(e),f=u?y.SyncdFatalErrorType.SNAPSHOT_MAC_MISMATCH_IN_SNAPSHOT:y.SyncdFatalErrorType.SNAPSHOT_MAC_MISMATCH_IN_PATCH,E=(null==p?void 0:p.collectionName)&&!(0,s.arrayBuffersEqual)(o,null==p?void 0:p.collectionName),v=(null==p?void 0:p.newLthash)&&!(0,s.arrayBuffersEqual)(r,null==p?void 0:p.newLthash),T=(null==p?void 0:p.patchVersion)&&!(0,s.arrayBuffersEqual)(i,null==p?void 0:p.patchVersion),M=(null==p?void 0:p.currentLthash)&&_&&!(0,s.arrayBuffersEqual)(_,null==p?void 0:p.currentLthash),b=(null==p?void 0:p.newLthashSubtract)&&(null==m?void 0:m.subtractResult)&&!(0,s.arrayBuffersEqual)(null==m?void 0:m.subtractResult,null==p?void 0:p.newLthashSubtract),A=null==m?void 0:m.hasOverride,P=null==m?void 0:m.numAdd,I=null==m?void 0:m.numRemove,O=(null==p?void 0:p.currentLthash)&&n&&!(0,s.arrayBuffersEqual)(n,null==p?void 0:p.currentLthash),R=null!=(null==p?void 0:p.numberAdd)&&null!=(null==m?void 0:m.numAdd)&&(null==m?void 0:m.numAdd)!==(null==p?void 0:p.numberAdd),N=null!=(null==p?void 0:p.numberRemove)&&null!=(null==m?void 0:m.numRemove)&&(null==m?void 0:m.numRemove)!==(null==p?void 0:p.numberRemove),D=null==m?void 0:m.didUseFallback,w=null==m?void 0:m.hasMissingRemove,L=yield(0,l.getCollectionVersionInTransaction)(e),G=null==L?void 0:L.didLastPatchFailPostValidation,U=(null==p?void 0:p.currentLthash)&&(null==L?void 0:L.lastPatchNewLtHashFromPatchDebugData)&&!(0,s.arrayBuffersEqual)(null==L?void 0:L.lastPatchNewLtHashFromPatchDebugData,null==p?void 0:p.currentLthash),x=null==L?void 0:L.isLastPatchAnIncomingPatch,B=null==L?void 0:L.isLastPatchSenderAPrimaryDevice,F=null==L?void 0:L.didBootstrapFromSnapshot,j=null!=(null==L?void 0:L.lastPatchSenderDeviceId)&&null!=h&&h===(null==L?void 0:L.lastPatchSenderDeviceId),K=yield(0,a.getConfig)().getAreThereMoreCompanions();if((0,y.reportSyncdFatalError)(f,e,c,d,!S,t,E,M,v,T,b,A,P,I,O,0===h,D,w,R,N,G,U,x,B,j,F,K),S)return yield(0,l.updateIsCollectionInMacMismatchFatalInTransaction)(e),void __LOG__(2)`syncd: skip fatal after snapshot mac mismatch for collection ${e}`;throw new g.SyncdFatalError("unable to validate snapshot mac")}}))).apply(this,arguments)}function R(){return N.apply(this,arguments)}function N(){return(N=(0,i.default)((function*(e,t,n,r,i,o,l,u,c){const d=yield(0,f.generatePatchMac)(n,r,i,o,l);if(!(0,s.arrayBuffersEqual)(d,t))throw yield C(e,c),yield(0,a.getDbImpls)().writeSyncdLog(e,"failed validate patch mac"),(0,y.reportSyncdFatalError)(y.SyncdFatalErrorType.MAC_MISMATCH_PATCH,e,u,c),__LOG__(3,void 0,void 0,!0)`syncd: unable to validate patch mac.`,SEND_LOGS("syncd: unable to validate patch mac."),new g.SyncdFatalError("unable to validate patch mac")}))).apply(this,arguments)}function D(){return(D=(0,i.default)((function*(e,t,n,r){const i=(yield(0,l.getCollectionVersionInTransaction)(e).then((e=>{var t;return null!==(t=null==e?void 0:e.version)&&void 0!==t?t:p.DEFAULT_COLLECTION_VERSION})))+1,{patchMacKey:a,snapshotMacKey:o}=yield(0,f.generateEncryptionKeys)(r),s=(0,_.to64BitNetworkOrder)(i),u=(0,_.toUtf8)(e).buffer,c=yield(0,f.generateSnapshotMac)(o,t,s,u),dLine truncated
encoded version: ${(0,_.arrayBufferToHexPadded)(s)}
encoded collection: ${(0,_.arrayBufferToHexPadded)(u)}
snapshotMAC: ${(0,_.arrayBufferToHexPadded)(c)}
patchMAC: ${(0,_.arrayBufferToHexPadded)(d)}`,{snapshotMac:c,patchMac:d}}))).apply(this,arguments)}function w(){return L.apply(this,arguments)}function L(){return(L=(0,i.default)((function*(e,t,n,r,s,u){const p=null!=u?u:yield(0,l.getCollectionVersionLtHashInTransaction)(e),f=yield x(t.map((e=>e.indexMac))),g=new Map,m=new Map,h=new Map;let y=!1,S=!1;yield(0,c.promiseEach)(t,function(){var t=(0,i.default)((function*(t){const{indexMac:i,valueMac:o,operation:l}=t,u=M.decode(i),c=f.get(u);if(c)l===d.SyncdMutation$SyncdOperation.REMOVE?m.set((0,_.arrayBufferToHexPadded)(i),c):h.set((0,_.arrayBufferToHexPadded)(i),c);else if(l===d.SyncdMutation$SyncdOperation.REMOVE){const t=yield function(e){if(null==n)return Promise.resolve(null);return n(e)}(i);var p,v;if(null!=t)m.set((0,_.arrayBufferToHexPadded)(i),t),S=!0,__LOG__(3,void 0,void 0,!0,["non-sad"])`syncd: had to use fallbackQueryForValueMac in collection ${e} for platform ${null!==(p=(0,a.getConfig)().primaryPlatform())&&void 0!==p?p:"[empty]"}: ${(0,_.arrayBufferToHexPadded)(i).slice(-16)}
}`,SEND_LOGS("syncd: fallback query",1,"non-sad");else y=!0,(0,E.reportSyncdCriticalEvent)(E.SyncdCriticalEventType.MISSING_MUTATION_TO_REMOVE,e),__LOG__(4,void 0,new Error,!0)`syncd: missing indexMAC in sync-actions table for REMOVE mutation in collection ${e} version ${r} direction ${s} for platform ${null!==(v=(0,a.getConfig)().primaryPlatform())&&void 0!==v?v:"[empty]"}:
${(0,_.arrayBufferToHexPadded)(i).slice(-16)}`,SEND_LOGS("syncd: missing indexMAC from REMOVE",.01)}l===d.SyncdMutation$SyncdOperation.SET&&g.set((0,_.arrayBufferToHexPadded)(i),o)}));return function(){return t.apply(this,arguments)}}());const{ltHash:v,subtractResult:b}=yield o.LT_HASH_ANTI_TAMPERING.subtractThenAdd(p,Array.from(g.values()),Array.from(m.values()).concat(Array.from(h.values())));return __LOG__(2)`syncd: computing ltHash for ${e}:
currentLtHash: ${(0,_.arrayBufferToHexPadded)(p)}
macsToAdd:
${Array.from(g.entries()).map((e=>{let[t,n]=e;return T(t,n)})).join("\n\t")}
macsToRemove:
${Array.from(m.entries()).map((e=>{let[t,n]=e;return T(t,n)})).join("\n\t")}
macsToOverwrite (also remove):
${Array.from(h.entries()).map((e=>{let[t,n]=e;return T(t,n)})).join("\n\t")}
newLtHash: ${(0,_.arrayBufferToHexPadded)(v)}`,{ltHash:v,numAdd:g.size,numRemove:m.size,hasOverride:h.size>0,subtractResult:b,hasMissingRemove:y,didUseFallback:S}}))).apply(this,arguments)}function k(){return G.apply(this,arguments)}function G(){return(G=(0,i.default)((function*(e,t){const n=yield(0,a.runInTransaction)({SyncActionStore:!0,CollectionVersionStore:!0},function(){var t=(0,i.default)((function*(t){let{SyncActionStore:n,CollectionVersionStore:r}=t;const a=null==e?yield r.getAll():[yield r.get(e)];return Promise.all(a.filter(Boolean).map(function(){var e=(0,i.default)((function*(e){let{collection:t,ltHash:r}=e;return{collection:t,ltHash:r,mutations:yield n.getByCollections([t])}}));return function(){return e.apply(this,arguments)}}()))}));return function(){return t.apply(this,arguments)}}());let r=0;if(n.map((e=>{let{collection:t,ltHash:n,mutations:i}=e;r+=i.length})),void 0!==t&&r>t)return{isLtHashConsistent:void 0,scratchLtHash:void 0,cachedLtHash:void 0};let o=null,l=null,u=!0;return yield Promise.all(n.map(function(){var e=(0,i.default)((function*(e){let{collection:t,ltHash:n,mutations:r}=e;const i=yield U(r);null==o&&(o=i),null==l&&(l=n),(0,s.arrayBuffersEqual)(n,i)||(u=!1,__LOG__(4,!0,new Error,!0)`syncd: failed LtHash check for ${t}`,SEND_LOGS("LtHash check failed",.01))}));return function(){return e.apply(this,arguments)}}())),{isLtHashConsistent:u,scratchLtHash:o,cachedLtHash:l}}))).apply(this,arguments)}function U(e){const t=new Map(e.map((e=>[(0,_.arrayBufferToHexPadded)(e.indexMac),e.valueMac])));return o.LT_HASH_ANTI_TAMPERING.add(o.EMPTY_LT_HASH,Array.from(t.values()))}function x(){return B.apply(this,arguments)}function B(){return(B=(0,i.default)((function*(e){const t=yield(0,u.getSyncActionsByIndexMacsInTransaction)(e);return new Map(t.map((e=>[M.decode(e.indexMac),e.valueMac])))}))).apply(this,arguments)}function F(){return j.apply(this,arguments)}function j(){return(j=(0,i.default)((function*(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=t?20:1;__LOG__(2)`syncd: logMacs: ${e}: prepare`;const[r,i]=yield(0,a.runInTransaction)({SyncActionStore:!0,CollectionVersionStore:!0},(t=>{let{SyncActionStore:n,CollectionVersionStore:r}=t;return Promise.all([r.get(e).then((e=>null==e?void 0:e.version)),n.getByCollections([e])])}));if(__LOG__(2)`syncd: current snapshot ${e} v${r} with ${i.length} mutations:`,t&&i.length>100)return i;const o=i.reduce(((e,r,i)=>(i%n==0&&e.push(""),e[e.length-1]+=T(r.indexMac,r.valueMac,t)+" | ",e)),[]);return o.forEach((e=>__LOG__(2)`|${e}`)),i}))).apply(this,arguments)}function K(){return(K=(0,i.default)((function*(e,t){const{isLtHashConsistent:n,scratchLtHash:r,cachedLtHash:i}=yield k(e,300),o=null==r?"":(0,_.arrayBufferToHexPadded)(r).slice(-16),s=null==i?"":(0,_.arrayBufferToHexPadded)(i).slice(-16);if(!0===(yield(0,l.getIsCollectionLthashInconsistentInTransaction)(e)))return yield(0,a.getDbImpls)().writeSyncdLog(e,`lthash already inconsistent. scratchLtHash: ${o}, cachedLtHash: ${s}, context: ${t}`),!0;if(!1===n){yield(0,a.getDbImpls)().writeSyncdLog(e,`lthash first time inconsistent. scratchLtHash: ${o}, cachedLtHash: ${s}, context: ${t}`);const{isLtHashConsistent:n,scratchLtHash:r,cachedLtHash:i}=yield k(e,300),u=null==r?"":(0,_.arrayBufferToHexPadded)(r).slice(-16),c=null==i?"":(0,_.arrayBufferToHexPadded)(i).slice(-16),d=null==n?"[undefined]":(!n).toString();return yield(0,a.getDbImpls)().writeSyncdLog(e,`lthash inconsistency second run. is inconsistent? ${d} scratchLtHash: ${u}, cachedLtHash: ${c}, context: ${t}`),yield(0,a.getDbImpls)().printSyncdLog(),yield(0,l.updateIsCollectionLthashInconsistentInTransaction)(e),__LOG__(4,!0,new Error,!0)`syncd: lthash inconsistent for ${e}`,SEND_LOGS("syncd: lthash inconsistent",.01),!0}if(!0===n)return yield(0,a.getDbImpls)().writeSyncdLog(e,`lthash consistent. scratchLtHash: ${o}, cachedLtHash: ${s}, context: ${t}`),!1;yield(0,a.getDbImpls)().writeSyncdLog(e,`lthash unknown if consistent. scratchLtHash: ${o}, cachedLtHash: ${s}, context: ${t}`)}))).apply(this,arguments)}},122393:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncModelType=t.SyncDataType=t.SyncActionState=t.MIN_PATCH_SIZE=t.MIN_INLINE_MUTATIONS=t.MAX_PATCH_SIZE=t.MAX_INLINE_MUTATIONS=t.LABEL_ASSOCIATION_SYNC_VERSION=t.FINITE_FAILURE_EXPIRY_DURATION=t.DEFAULT_COLLECTION_VERSION=t.ConflictResolutionState=t.CollectionSyncState=t.CollectionState=t.CollectionName=t.CHAT_ASSIGNMENT_SYNC_VERSION=t.BACKOFF_MIN_TIMEOUT=t.BACKOFF_MAX_TIMEOUT=t.BACKOFF_BASE=t.Actions=void 0;var r=n(632157);t.BACKOFF_MIN_TIMEOUT=1e3;t.BACKOFF_MAX_TIMEOUT=36e5;t.BACKOFF_BASE=2;const i=2*r.DAY_MILLISECONDS;t.FINITE_FAILURE_EXPIRY_DURATION=i;t.MIN_INLINE_MUTATIONS=100;t.MAX_INLINE_MUTATIONS=2e3;t.MIN_PATCH_SIZE=10;t.MAX_PATCH_SIZE=100;t.DEFAULT_COLLECTION_VERSION=0;t.LABEL_ASSOCIATION_SYNC_VERSION=3;t.CHAT_ASSIGNMENT_SYNC_VERSION=7;const a=n(654302)({Star:"star",Contact:"contact",Mute:"mute",PinDEPRECATED:"pin",Pin:"pin_v1Line truncated
minPatch: ${e}`,yield x(r,g[0]),yield(0,o.getDbImpls)().printSyncdLog(),yield F(),__LOG__(4,void 0,new Error,!0)`syncd: has missing patches`,SEND_LOGS("syncd: has missing patches"),(0,o.getConfig)().syncdShouldFatalOnMissingPatch())throw(0,A.reportSyncdFatalError)(A.SyncdFatalErrorType.SERVER_DID_NOT_SEND_ALL_PATCHES,r,void 0,null!=t?t:0),new v.SyncdFatalError("syncd: has missing patches")}yield X(r,g,n),__LOG__(2)`syncd: ${r} patches applied successfully`}else null!=i?(yield(0,o.getDbImpls)().writeSyncdLog(r,`start upload patches. version: ${i}. mutation count: ${d.length}`),yield K(r,i,l,d),yield(0,o.getDbImpls)().writeSyncdLog(r,"end upload patches"),__LOG__(2)`syncd: ${r} v${i} uploaded successfully`):((0,y.isBootstrap)(t)&&(yield(0,u.updateCollectionVersionAndLtHashInTransaction)(r,0,k)),__LOG__(2)`syncd: sync ${r} but there are no updates`);const E=Math.floor(performance.now()-h);return __LOG__(2)`syncd: applyAppStateSyncResponse: finished applying ${r} in ${E}ms`,(g||_)&&(0,y.isBootstrap)(t)&&!(0,y.isCriticalCollection)(r)&&(0,C.reportSyncdBootstrapDataApplied)(r,null!=_?C.SyncdBootstrapDataAppliedSnapshotUsed.SNAPSHOT_USED:C.SyncdBootstrapDataAppliedSnapshotUsed.SNAPSHOT_NOT_USED,E),yield(0,m.logMacsInSnapshot)(e.name),e}catch(e){const t=e.message;return yield(0,o.getDbImpls)().writeSyncdLog(r,`error (maybe retryable): ${e}`),e instanceof v.SyncdMissingKeyError?(__LOG__(3)`syncd: key error: ${r} missing keys`,{name:r,state:E.CollectionState.Blocked}):e instanceof v.SyncdFatalError?(__LOG__(4,void 0,new Error,!0)`syncd: fatal error: ${r} throws ${t}`,SEND_LOGS(`syncd: fatal error: ${String(r)} throws ${t}`),{name:r,state:E.CollectionState.ErrorFatal}):(__LOG__(3,void 0,void 0,!0)`syncd: retryable error: ${r} throws ${t}`,SEND_LOGS(`syncd: retryable error: ${String(r)} throws ${t}`),{name:r,state:E.CollectionState.ErrorRetry})}}))).apply(this,arguments)}function x(){return B.apply(this,arguments)}function B(){return(B=(0,a.default)((function*(e,t){try{const n=(yield(0,S.tryDecryptPatch)(e,t)).filter((e=>e.operation===_.SyncdMutation$SyncdOperation.SET)),r=(0,O.validateAndTypeSetMutations)(e,n),i=r.length>0?r[0].timestamp:null,a=null==i?null:(0,D.daysDiff)((0,D.unixTimeMs)(),i);yield(0,o.getDbImpls)().writeSyncdLog(e,`max timestamp in first patch: ${null!=a?a:"n/a"} days ago`)}catch(e){__LOG__(3)`syncd: could not log max timestamp: ${e}`}}))).apply(this,arguments)}function F(){return j.apply(this,arguments)}function j(){return(j=(0,a.default)((function*(){__LOG__(2)`syncd: missing patch info:`;(yield(0,u.getAllCollectionVersionsInTransaction)()).forEach((e=>{var t;const n=(null!==(t=e.lastSyncAttemptStartTimes)&&void 0!==t?t:[]).map((e=>(0,D.daysDiff)((0,D.unixTimeMs)(),e))),r=e.lastSuccessfulSyncEndTime,i=null==r?null:(0,D.daysDiff)((0,D.unixTimeMs)(),r);__LOG__(2)`${e.collection}:
lastSuccessfulSyncEndTime = ${e.lastSuccessfulSyncEndTime} (${i} days ago))
lastSyncAttemptStartTimes = ${e.lastSyncAttemptStartTimes}
lastSyncAttemptStartTimes by days ago: ${n}`}))}))).apply(this,arguments)}function K(){return Y.apply(this,arguments)}function Y(){return(Y=(0,a.default)((function*(e,t,n,r){var i;yield(0,m.logMacsInSnapshot)(e);const s=r.map((e=>({indexMac:e.indexMac,valueMac:e.valueMac,operation:e.operation}))),{ltHash:l}=yield(0,m.computeLtHash)(e,s,null,t,m.SyncdPatchDirection.Outgoing),c=(0,h.encryptedUploadMutationsToSyncActions)(r.filter((e=>e.operation===_.SyncdMutation$SyncdOperation.SET)),E.SyncActionState.Success),d=null!==(i=yield(0,u.getCollectionVersionInTransaction)(e).then((e=>null==e?void 0:e.version)))&&void 0!==i?i:0;t!==d+1&&(__LOG__(4,void 0,new Error,!0)`syncd: _uploadSuccessful: unexpected server version (${t}) after patch upload, expected ${d+1}`,SEND_LOGS("syncd: unexpected server version after patch upload")),__LOG__(2)`syncd: _uploadSuccessful: write to db for ${e}`;const p=(0,o.getConfig)().syncdShouldParsePatchDebugData();if(p&&(yield(0,m.reportCollectionInconsistency)(e,`pre-processing outgoing patch ${t}`)),yield(0,o.runInTransaction)({SyncActionStore:!0,PendingMutationStore:!0,CollectionVersionStore:!0},function(){var r=(0,a.default)((function*(r){let{SyncActionStore:i,PendingMutationStore:a,CollectionVersionStore:o}=r;yield i.bulkSet(c),yield a.bulkRemove(n),yield o.update(e,{version:t,ltHash:l,isLastPatchAnIncomingPatch:!1,lastPatchNewLtHashFromPatchDebugData:void 0,isLastPatchSenderAPrimaryDevice:void 0,didLastPatchFailPostValidation:void 0,lastPatchSenderDeviceId:void 0})}));return function(){return r.apply(this,arguments)}}()),__LOG__(2)`syncd: end _uploadSuccessful for ${e}`,p){const n=yield(0,m.reportCollectionInconsistency)(e,`post-processing outgoing patch ${t}`);yield ne(e,n)}}))).apply(this,arguments)}function W(){return V.apply(this,arguments)}function V(){return(V=(0,a.default)((function*(e,t,n,r){let i=Promise.resolve(),o=0;const s=(0,D.unixTimeMs)();if(null!=n){var l;const t=R.default.validateExternalBlobReference(e,n);o+=(0,p.numberOrThrowIfTooLarge)(null!==(l=t.fileSizeBytes)&&void 0!==l?l:0),__LOG__(2)`syncd: download snapshot for ${e}`,i=(0,P.downloadSnapshot)(e,t)}let u,c,d=Promise.resolve();if(null!=t&&t.length>0){const n=t.map((t=>R.default.validatePatchProtobuf(e,t)));d=Promise.all(n.map(function(){var t=(0,a.default)((function*(t){let n=t.mutations||[];const r=t.externalMutations;var i;r&&(__LOG__(2)`syncd: download patch for ${e}`,n=yield(0,P.downloadExternalPatch)(e,r),__LOG__(2)`syncd: ${e}'s external patch downloaded`,o+=(0,p.numberOrThrowIfTooLarge)(null!==(i=r.fileSizeBytes)&&void 0!==i?i:0));return{mutations:n,version:t.version,snapshotMac:t.snapshotMac,patchMac:t.patchMac,keyId:t.keyId,exitCode:t.exitCode,deviceIndex:t.deviceIndex,clientDebugData:t.clientDebugData}}));return function(){return t.apply(this,arguments)}}()))}try{[u,c]=yield Promise.all([i,d]),(0,y.isBootstrap)(r)&&(0,C.reportSyncdBootstrapAppStateDownloadMetric)({collection:e,downloadStartTs:s,downloadSize:o,isSuccess:"success"})}catch(t){throw(0,y.isBootstrap)(r)&&(0,C.reportSyncdBootstrapAppStateDownloadMetric)({collection:e,downloadStartTs:s,downloadSize:o,isSuccess:"failure"}),t}return[u,c]}))).apply(this,arguments)}function H(e){return{measuredComputeLtHashAndValidateSnapshot:function(){var t=(0,a.default)((function*(t,n){null==e||e.mark("anti_tampering_start",{source:E.SyncDataType.Snapshot});const r=yield(0,m.computeLtHashAndValidateSnapshot)(t,n);return null==e||e.mark("anti_tampering_end",{source:E.SyncDataType.Snapshot}),r}));return function(){return t.apply(this,arguments)}}(),measuredTryDecryptSnapshot:function(){var t=(0,a.default)((function*(t,n){null==e||e.mark("decryption_start",{source:E.SyncDataType.Snapshot});const r=yield(0,S.tryDecryptSnapshot)(t,n);return null==e||e.mark("decryption_end",{source:E.SyncDataType.Snapshot}),r}));return function(){return t.apply(this,arguments)}}()}}function $(e){return{measuredComputeLtHashAndValidatePatch:function(){var t=(0,a.default)((function*(t,n,r){null==e||e.mark("anti_tampering_start",{source:E.SyncDataType.Patch});const i=yield(0,m.computeLtHashAndValidatePatch)(t,n,r);return null==e||e.mark("anti_tampering_end",{source:E.SyncDataType.Patch}),i}));return function(){return t.apply(this,arguments)}}(),measuredTryDecryptPatch:function(){var t=(0,a.default)((function*(t,n){null==e||e.mark("decryption_start",{source:E.SyncDataType.Patch});const r=yield(0,S.tryDecryptPatch)(t,n);return null==e||e.mark("decryption_end",{source:E.SyncDataType.Patch}),r}));return function(){return t.apply(this,arguments)}}()}}function z(){return q.apply(this,arguments)}function q(){return(q=(0,a.default)((function*(e,t,n,r){yield(0,o.getDbImpls)().writeSyncdLog(e,`start _applySnapshotAndPatches. mutation count: ${t.records.length}, version: ${t.version.version}`),yield(0,m.logMacsInSnapshot)(e);try{const{measuredComputeLtHashAndValidateSnapshot:n,measuredTryDecryptSnapshot:i}=H(r);null==r||r.mark("apply_start",{source:E.SyncDataType.Snapshot,snapshotRecordsCounLine truncated
SET count: ${u}
REMOVE count: ${c}`,0===u&&0===c&&(__LOG__(3,void 0,void 0,!0)`syncd: ${e}: empty patch found`,SEND_LOGS(`syncd: ${e}: empty patch found`));const{measuredComputeLtHashAndValidatePatch:p,measuredTryDecryptPatch:f}=$(n),g=yield p(e,t,I);__LOG__(2)`syncd: completed computeLtHashAndValidatePatch for ${e} v${t.version.version}`;const h=yield f(e,t);(0,b.reportSyncdDecryptedMutations)(b.SyncdDecryptMutationsType.PATCH_MUTATIONS,h),r&&(yield(0,o.getDbImpls)().writeSyncdLog(e,`after decrypt patch ${t.version.version}`)),N.addMutationCount(h.length),(0,O.validateNoSameIndexForMultipleMutations)(e,h,E.SyncDataType.Patch);const y=ue(h),S=y.filter((e=>e.operation===_.SyncdMutation$SyncdOperation.REMOVE));yield oe(e,S),__LOG__(2)`syncd: completed _applyRemoveMutations for ${e} v${t.version.version}`;const T=y.filter((e=>e.operation===_.SyncdMutation$SyncdOperation.SET)),{setMutationsToPersist:M,pendingMutationsToDrop:C}=yield ie(e,T,E.SyncDataType.Patch,n,r);__LOG__(2)`syncd: processed ${h.length} mutations in patch version ${t.version.version} of collection ${e}`,null==n||n.mark("update_DB_start",{source:E.SyncDataType.Patch,setMutationsToPersistCount:M.length,pendingMutationsToDropCount:C.length});const P=t.version.version;if(yield(0,o.runInTransaction)({SyncActionStore:!0,PendingMutationStore:!0,CollectionVersionStore:!0},function(){var n=(0,a.default)((function*(n){var r;let{SyncActionStore:i,PendingMutationStore:a,CollectionVersionStore:o}=n;yield i.bulkRemove(S.map((e=>e.index))),yield i.bulkSet(M),yield a.bulkRemove(C),yield o.update(e,{version:P,ltHash:g,lastPatchNewLtHashFromPatchDebugData:null===(r=t.clientDebugData)||void 0===r?void 0:r.newLthash,isLastPatchAnIncomingPatch:!0,isLastPatchSenderAPrimaryDevice:0===t.deviceIndex,didLastPatchFailPostValidation:void 0,lastPatchSenderDeviceId:t.deviceIndex})}));return function(){return n.apply(this,arguments)}}()),i){const n=yield(0,m.reportCollectionInconsistency)(e,`post-processing incoming patch ${t.version.version}. has remove: ${(c>0).toString()}`);yield ne(e,n)}function I(){return R.apply(this,arguments)}function R(){return(R=(0,a.default)((function*(t){var n;return null===(n=(yield(0,d.getSyncActionsByCollectionsInTransaction)([e])).filter((e=>(0,s.arrayBuffersEqual)(t,e.indexMac))).pop())||void 0===n?void 0:n.valueMac}))).apply(this,arguments)}null==n||n.mark("update_DB_end",{source:E.SyncDataType.Patch}),__LOG__(2)`syncd: completed final transaction in _applyPatch for ${e} v${t.version.version}`,r&&(yield(0,o.getDbImpls)().writeSyncdLog(e,`after final transaction for patch ${t.version.version}`))}))).apply(this,arguments)}function ne(){return re.apply(this,arguments)}function re(){return(re=(0,a.default)((function*(e,t){yield(0,o.runInTransaction)({CollectionVersionStore:!0},function(){var n=(0,a.default)((function*(n){let{CollectionVersionStore:r}=n;yield r.update(e,{didLastPatchFailPostValidation:t})}));return function(){return n.apply(this,arguments)}}())}))).apply(this,arguments)}function ie(){return ae.apply(this,arguments)}function ae(){return(ae=(0,a.default)((function*(e,t,n,r){let a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];(0,b.reportSyncdCriticalBootstrapStage)(b.SyncdCriticalBootstrapStageType.ABOUT_TO_APPLY_MUTATIONS);const s=n===E.SyncDataType.Local?" (individual mutations)":"",l=[],u=(0,O.validateAndTypeSetMutations)(e,t),{supportedMutations:c,unsupportedMutations:d}=ce(e,u);d.forEach((e=>l.push((0,h.setMutationToSyncAction)(e,E.SyncActionState.Unsupported)))),null==r||r.mark("conflict_resolution_start",{source:n,collectionName:e,count:c.length});const{remoteMutationsToApply:p,pendingMutationsToDrop:_}=yield(0,I.resolveConflict)(e,c),m=c.filter((e=>!p.includes(e)));null==r||r.mark("conflict_resolution_end",{source:n,collectionName:e,apply:p.length,drop:m.length}),m.forEach((e=>l.push((0,h.setMutationToSyncAction)(e,E.SyncActionState.Skipped,e.actionName)))),null==r||r.mark("apply_set_mutations_start",{source:n,collectionName:e,count:p.length});const y=de(p);let S=null;for(let t=0;t<y.length;t++){const n=a&&t<=1,r=y[t][0].actionHandler,i=y[t].map((e=>{let t;return t=e.binarySyncData?(0,f.default)((0,w.decodeProtobuf)(g.SyncActionDataSpec,e.binarySyncData).value,"decodeProtobuf(SyncActionDataSpec, m.binarySyncData).value"):(0,w.decodeProtobuf)(g.SyncActionValueSpec,e.binarySyncAction),(null==S||S<e.timestamp)&&(S=e.timestamp),{operation:"set",indexParts:e.indexArr,value:t,timestamp:e.timestamp}}));n&&(yield(0,o.getDbImpls)().writeSyncdLog(e,`after deserialize. mutationsToApply length: ${i.length}`));let u=[],c=!1;try{__LOG__(2)`syncd: before apply mutation batch for ${e}. mutations count: ${i.length} ${s}`,u=yield r.applyMutations(i,{setMutationsPendingToPersist:l,allSupportedSetMutations:p},n),n&&(yield(0,o.getDbImpls)().writeSyncdLog(e,`after apply. result length: ${u.length}`))}catch(t){if(t instanceof v.SyncdFatalError||e===E.CollectionName.CriticalBlock)throw t;c=!0,__LOG__(3)`synd: catching error during _applySetMutations:Line truncated
\tkeys with keyData: ${n}
\tkeys without keyData: ${r}`,(0,o.runInTransaction)({MissingKeyStore:!0},function(){var e=(0,i.default)((function*(e){let{MissingKeyStore:i}=e;if(n.length>0&&(yield i.bulkRemove(n),yield g({MissingKeyStore:i})),r.length>0){const e=(yield i.bulkGet(r)).filter(Boolean);e.forEach((e=>e.deviceResponses.set(t,!1))),__LOG__(2)`syncd: updateMissingKeys: begin updating missing keys from device ${t}
\tmissingKeys: [${r}]`,yield i.bulkUpdate(e),__LOG__(2)`syncd: updateMissingKeys: finish updating missing keys from device ${t}`,yield v({MissingKeyStore:i})}}));return function(){return e.apply(this,arguments)}}())};var i=r(n(311504)),a=n(138291),o=n(819416),s=n(822144),l=n(522815),u=n(405057),c=n(787685),d=n(632157);let p;function f(){return(f=(0,i.default)((function*(){const e=(yield(0,o.getDbImpls)().getDeviceFingerprint()).deviceIndexes;return(0,o.runInTransaction)({MissingKeyStore:!0},function(){var t=(0,i.default)((function*(t){let{MissingKeyStore:n}=t;const r=yield n.getAll();if(0===r.length)return Promise.resolve();r.forEach((t=>{t.deviceResponses.forEach(((n,r)=>{e.includes(r)||t.deviceResponses.delete(r)}))})),yield n.bulkUpdate(r),yield v({MissingKeyStore:n})}));return function(){return t.apply(this,arguments)}}())}))).apply(this,arguments)}function _(){return(0,o.runInTransaction)({MissingKeyStore:!0},(e=>{let{MissingKeyStore:t}=e;return g({MissingKeyStore:t})}))}function g(){return m.apply(this,arguments)}function m(){return(m=(0,i.default)((function*(e){let{MissingKeyStore:t}=e;clearTimeout(p),p=null;const n=yield t.getAll();if(0===n.length)return;__LOG__(2)`syncd: _setMissingKeyTimeout: missing keys: ${n.map((e=>(0,u.syncKeyIdToHex)(e.keyId)))}`;const r=n.reduce(((e,t)=>e.timestamp<t.timestamp?e:t)),i=(0,o.getConfig)().syncdWaitForKeyTimeoutDays()*d.DAY_MILLISECONDS-(-r.timestamp+(0,d.unixTimeMs)());__LOG__(2)`syncd: earliest missing key: ${(0,u.syncKeyIdToHex)(r.keyId)}, timestamp=${r.timestamp}, timeoutMs=${i}`,p=setTimeout(h,i)}))).apply(this,arguments)}function h(){return y.apply(this,arguments)}function y(){return(y=(0,i.default)((function*(){__LOG__(2)`syncd: _timeoutWhileWaitingForMissingKey`,(yield E())?((0,c.reportSyncdFatalError)(c.SyncdFatalErrorType.TIMEOUT_WHILE_WAITING_FOR_MISSING_KEY),__LOG__(4,void 0,new Error,!0)`syncd: fatal error: timeout while waiting for missing key`,SEND_LOGS("syncd fatal error: timeout while waiting for missing key"),(0,o.getDbImpls)().handleSyncdFatal()):__LOG__(2)`syncd: _timeoutWhileWaitingForMissingKey: no expired keys`}))).apply(this,arguments)}function E(){return S.apply(this,arguments)}function S(){return(S=(0,i.default)((function*(){__LOG__(2)`syncd: check if has expired keys`;const e=(yield(0,l.getAllSyncKeysInTransaction)()).map((e=>(0,u.syncKeyIdToHex)(e.keyId)));__LOG__(2)`syncd: all keys: ${e}`;const t=yield(0,s.getAllMissingKeysInTransaction)();__LOG__(2)`syncd: missing keys: ${t.map((e=>(0,u.syncKeyIdToHex)(e.keyId)))}`;const n=t.filter((t=>!e.includes(t.keyHex)));__LOG__(2)`syncd: actually missing keys: ${t.map((e=>(0,u.syncKeyIdToHex)(e.keyId)))}`;const r=n.filter((e=>(0,o.getConfig)().syncdWaitForKeyTimeoutDays()*d.DAY_MILLISECONDS<(0,d.unixTimeMs)()-e.timestamp));return __LOG__(2)`syncd: expired keys: ${r.map((e=>(0,u.syncKeyIdToHex)(e.keyId)))}`,r.length>0}))).apply(this,arguments)}function v(){return T.apply(this,arguments)}function T(){return(T=(0,i.default)((function*(e){let{MissingKeyStore:t}=e;const n=yield t.getAll();for(const e of n){let t=!0;for(const n of e.deviceResponses.values())if(null==n){t=!1;break}if(t)return __LOG__(4,void 0,new Error,!0)`syncd: fatal error: missing key on all clients`,SEND_LOGS("syncd: fatal error: missing key on all clients"),(0,c.reportSyncdFatalError)(c.SyncdFatalErrorType.MISSING_KEY_ON_ALL_CLIENTS),yield(0,a.asyncSleep)(5e3),void(0,o.getDbImpls)().handleSyncdFatal()}}))).apply(this,arguments)}function M(){return(M=(0,i.default)((function*(e,t){const n=()=>{const e=new Map;return t.forEach((t=>e.set(t,null))),e},r=e.map((e=>({keyHex:(0,u.syncKeyIdToHex)(e),keyId:e,timestamp:(0,d.unixTimeMs)(),deviceResponses:n()})));yield(0,s.bulkUpdateMissingKeysInTransaction)(r),yield _()}))).apply(this,arguments)}},751691:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncdDecryptMutationsType=t.SyncdCriticalBootstrapStageType=void 0,t.convertSyncdCriticalBootstrapStageFromAnnotations=function(e){var t;const n=null==e||null===(t=e.string)||void 0===t?void 0:t.criticalBootstrapStage;if(null==n)return __LOG__(4,void 0,new Error)`syncd: missing bootstrap stage for critical bootstrap stage`,null;const r=s.cast(n);if(null==r)return __LOG__(4,void 0,new Error)`syncd: unknown bootstrap stage: ${n} for critical bootstrap stage`,null;return{type:r}},t.convertSyncdDecryptMutationsMetricsFromAnnotations=function(e){var t,n,r,i;const a=null==e||null===(t=e.string)||void 0===t?void 0:t.mutationType,o=null==e||null===(n=e.int)||void 0===n?void 0:n.count,s=null==e||null===(r=e.int)||void 0===r?void 0:r.totalAdditionalMessagesCount,u=null==e||null===(i=e.int_array)||void 0===i?void 0:i.messageRangeLengths;if(null==a)return __LOG__(4,void 0,new Error)`syncd: missing type for DecryptMutations`,null;if(null==o)return __LOG__(4,void 0,new Error)`syncd: missing count for DecryptMutations`,null;if(null==s)return __LOG__(4,void 0,new Error)`syncd: missing totalAdditionalMessagesCount for DecryptMutationLine truncated
is incomplete`,t.push(e);else{const{patchNode:t,encryptedMutations:r}=yield R(e,n);i=t,a=r}return{collection:e,version:r,patchNode:i,encryptedMutations:a}}));return function(){return e.apply(this,arguments)}}(),r=new Map,a=new Map,o=[];e.forEach(((e,t)=>o.push(n(t,e))));const l=(yield Promise.all(o)).map((e=>{const{collection:t,version:n,patchNode:i,encryptedMutations:o}=e;return o&&a.set(t,o),r.set(t,n),(0,M.wap)("collection",{name:(0,M.CUSTOM_STRING)(t),version:(0,M.INT)(null!=n?n:f.DEFAULT_COLLECTION_VERSION),return_snapshot:void 0===n?"true":"false"},i)}));return __LOG__(2)`syncd: end _buildCollectionNodes`,{collectionNodes:l,collectionWithEncryptedMutations:a,localCollectionVersions:r,collectionsToSkip:t}}))).apply(this,arguments)}function R(){return N.apply(this,arguments)}function N(){return(N=(0,i.default)((function*(e,t){const n=yield(0,m.getActiveKey)(!D(t)),r=(yield B(e,t,n)).map((e=>(0,g.encryptMutation)(e,n))),a=yield Promise.all(r),s=a.map((e=>({indexMac:e.indexMac,valueMac:e.valueMac,operation:e.operation}))),{ltHash:l}=yield(0,p.computeLtHash)(e,s),{snapshotMac:u,patchMac:c}=yield(0,p.computeOutgoingSnapshotAndPatchMacs)(e,l,a,n.keyData),d=a.map((e=>x(e.keyId,e.operation,e.indexMac,e.indexAndValueCipherText))),f=U(d),_=function(){var e=(0,i.default)((function*(){const e=yield(0,o.getDbImpls)().uploadSyncExternalPatch(f);return k(yield w(e,f),n.keyId,u,c)}));return function(){return e.apply(this,arguments)}}();let h;(0,E.exceedInlineMutationCount)(d)?h=yield _():(h=G(d,n.keyId,u,c),(0,E.exceedPatchProtobufSize)(h)&&(h=yield _()));return{patchNode:(0,M.wap)("patch",null,h),encryptedMutations:a}}))).apply(this,arguments)}function D(e){return(0,o.getConfig)().logoutInProgress()&&e.some((e=>JSON.parse(e.index)[0]===f.Actions.Sentinel))}function w(){return L.apply(this,arguments)}function L(){return(L=(0,i.default)((function*(e,t){const{mediaKey:n,directPath:r,encFilehash:i,handle:o}=e,s=yield(0,c.calculateFilehash)(t);return{mediaKey:n,directPath:r,handle:o,fileSizeBytes:t.byteLength,fileSha256:(0,a.decodeB64)(s),fileEncSha256:i}}))).apply(this,arguments)}function k(e,t,n,r){const i=(0,o.getConfig)().syncdPatchDeviceIndexIncluded()?(0,u.extractDeviceId)((0,o.getMyDeviceJid)()):void 0;return(0,v.encodeSyncdPatch)({keyId:{id:(0,y.fromSyncKeyId)(t)},externalMutations:e,snapshotMac:n,patchMac:r,deviceIndex:i})}function G(e,t,n,r){const i=(0,o.getConfig)().syncdPatchDeviceIndexIncluded()?(0,u.extractDeviceId)((0,o.getMyDeviceJid)()):void 0;return(0,v.encodeSyncdPatch)({keyId:{id:(0,y.fromSyncKeyId)(t)},mutations:e,snapshotMac:n,patchMac:r,deviceIndex:i})}function U(e){return(0,v.encodeSyncdMutations)({mutations:e})}function x(e,t,n,r){return{operation:t,record:{keyId:{id:(0,y.fromSyncKeyId)(e)},index:{blob:n},value:{blob:r}}}}function B(){return F.apply(this,arguments)}function F(){return(F=(0,i.default)((function*(e,t,n){const r=yield(0,l.getSyncActionsByCollectionsInTransaction)([e]);let i=t;const a=j(r,t,n.keyId);i=i.concat(a);const o=K(r,i,n.keyId);return T.addKeyRotationRemoveCount(o.length),i=i.concat(o),i}))).apply(this,arguments)}function j(e,t,n){let r=e.filter((e=>!t.map((e=>e.index)).includes(e.index)&&!(0,_.syncKeyIdsEqual)(e.keyId,n)));r=(0,b.default)(r,(e=>(0,h.getKeyEpoch)(e.keyId)));const i=Math.min(5,(0,o.getConfig)().syncdAdditionalMutations());return r=r.slice(0,i),(0,S.syncActionsToPendingMutations)(r,d.SyncdMutation$SyncdOperation.SET)}function K(e,t,n){const r=t.map((e=>e.index)),i=e.filter((e=>r.includes(e.index))).filter((e=>!(0,_.syncKeyIdsEqual)(e.keyId,n)));return(0,S.syncActionsToPendingMutations)(i,d.SyncdMutation$SyncdOperation.REMOVE)}},212309:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.syncActionsToPendingMutations=function(e,t){return e.map((e=>{const n=(0,i.decodeProtobuf)(r.SyncActionDataSpec,e.binarySyncData).value,o=(0,a.encodeProtobuf)(r.SyncActionValueSpec,n).readBuffer();return{collection:e.collection,index:e.index,binarySyncAction:o,operation:t,version:e.version,timestamp:e.timestamp,action:e.action}}))};var r=n(527796),i=n(394629),a=n(385914)},101093:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compactPatch=function(e){return function(e,t){const n=new Set;return e.filter((e=>{const r=t(e);return!n.has(r)&&(n.add(r),!0)}))}(e.reverse(),(e=>e.index)).reverse()}},507809:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeSyncActionData=function(e){try{return(0,s.encodeProtobuf)(i.SyncActionDataSpec,e).readBuffer()}catch(e){throw(0,o.reportSyncdFatalError)(o.SyncdFatalErrorType.ACTION_DATA_PROTOBUF_SERIALIZATION_FAILED),new a.SyncdFatalError("action data protobuf serialization failed")}},t.encodeSyncdMutations=function(e){try{return(0,s.encodeProtobuf)(r.SyncdMutationsSpec,e).readBuffer()}catch(e){throw(0,o.reportSyncdFatalError)(o.SyncdFatalErrorType.MUTATIONS_PROTOBUF_SERIALIZATION_FAILED),new a.SyncdFatalError("mutations protobuf serialization failed")}},t.encodeSyncdPatch=funLine truncated
for ${e.from.toString()}`,e.type){case m.SIDE_LIST_CHANGE:{const t=yield(0,d.getContactTable)().equals(["contactHash"],e.hash);if(0===t.length)__LOG__(3)`could not find side contact hash for status update operation`;else{const e=(0,g.createWid)(t[0].id),n=p.StatusCollection.get(e),r=null==n?null:(0,f.getStatus)(e).then((e=>{n.set({status:e.status})}));yield r}break}case m.CHANGE:{const t=e.from;if(!(t instanceof _.default))break;const n=[t];if(t.isLid()){const e=(0,l.getPhoneNumber)(t);null!=e&&n.push(e)}for(const t of n){const n=p.StatusCollection.get(t);n&&null!=e.content?n.status=e.content:__LOG__(3)`handleAboutNotification: get status update for unknown contact ${t.toLogString()}`}break}default:__LOG__(3)`handleAboutNotification: unhandled notification of
type ${e.type}`}return(0,s.wap)("ack",{id:(0,s.CUSTOM_STRING)(e.stanzaId),to:e.from instanceof _.default?(0,u.JID)(e.from):(0,s.CUSTOM_STRING)(e.from),class:"notification",type:"status"})}))).apply(this,arguments)}},996578:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.getAndUpdateStatus=B,t.getDeviceSyncInputs=Y,t.handleAccountSyncNotification=function(){return V.apply(this,arguments)},t.updateMyTextStatusFromServer=j;var i=r(n(348926)),a=r(n(81109)),o=r(n(67062)),s=n(418987),l=n(716358),u=n(696155),c=n(798440),d=n(853670),p=n(359987),f=n(354458),_=n(780549),g=n(355813),m=n(380900),h=n(515309),y=n(256905),E=n(854379),S=n(280464),v=n(359484),T=n(359099),M=n(60370),b=n(755985),A=n(139374),C=n(999821),P=n(326314),I=n(491805),O=n(574892),R=n(622868),N=n(557883),D=n(967910),w=n(129417),L=n(819539),k=n(459857),G=n(669050);const U=e=>{const t=e.maybeChild("key-index-list"),n=null==t?null:{ts:t.attrTime("ts"),signedKeyIndexBytes:t.hasContent()?t.contentBytes():null,expectedTs:t.hasAttr("expected_ts")?t.attrTime("expected_ts"):void 0},r=e.mapChildrenWithTag("device",(e=>{var t;return e.attrDeviceJid("jid"),{id:null!==(t=(0,G.createWid)(e.attrDeviceJid("jid")).device)&&void 0!==t?t:s.DEFAULT_DEVICE_ID,keyIndex:e.hasAttr("key-index")?e.attrInt("key-index"):null}}));return 0===r.length?null:{deviceList:r,keyIndex:n}},x=new o.default("incomingAccountSyncNotification",(e=>{e.assertTag("notification");const t={stanzaId:e.attrString("id"),ts:e.attrTime("t"),from:(0,E.deviceJidToDeviceWid)(e.attrDeviceJid("from"))};if(e.hasChild("status")){const n=e.child("status"),r=n.hasAttr("action")?n.attrString("action"):void 0;return(0,a.default)({type:u.AccountSyncType.STATUS,action:r},t)}if(e.hasChild("text_status")){const n=e.child("text_status"),r=n.hasAttr("action")?n.attrString("action"):void 0,i=n.hasAttr("text")?n.attrString("text"):void 0,o=n.hasChild("emoji")?n.child("emoji"):void 0,s=(null==o?void 0:o.hasAttr("content"))?null==o?void 0:o.attrString("content"):void 0,l=n.hasAttr("ephemeral_duration_sec")?n.attrInt("ephemeral_duration_sec"):void 0,c=n.hasAttr("last_update_time")?n.attrString("last_update_time"):void 0;return(0,a.default)({type:u.AccountSyncType.TEXT_STATUS,action:r,text:i,emoji:s,ephemeralDurationSeconds:l,lastUpdateTime:c},t)}if(e.hasChild("username")){const n=[];if(w.usernameSupported){const t=e.child("username"),r=(null==t?void 0:t.hasAttr("username"))?t.attrString("username"):void 0;n.push({userId:(0,k.getMeUser)(),username:r})}return(0,a.default)({type:u.AccountSyncType.USERNAME,usernames:n},t)}if(e.hasChild("privacy"))return(0,a.default)({type:u.AccountSyncType.PRIVACY},t);if(e.hasChild("devices"))return(0,a.default)({type:u.AccountSyncType.DEVICES,devices:U(e.child("devices"))},t);if(e.hasChild("blocklist")){const n=e.child("blocklist"),r=[];return(0,w.usernameDisplayedEnabled)()&&n.forEachChildWithTag("item",(e=>{const t=e.maybeAttrString("username"),n=(0,E.userJidToUserWid)(e.attrUserJid("jid"));null!=t&&r.push({userId:n,username:t})})),(0,a.default)({type:u.AccountSyncType.BLOCKLIST,usernames:r},t)}if(e.hasChild("picture"))return(0,a.default)({type:u.AccountSyncType.PICTURE},t);if(e.hasChild("tos")){const n=e.child("tos"),r=[];return n.forEachChildWithTag("notice",(e=>{const t="false"!==e.maybeAttrString("state"),n=e.attrString("id");r.push({id:n,state:t})})),(0,a.default)({type:u.AccountSyncType.TOS,notices:r},t)}if(e.hasChild("disappearing_mode")){const n=e.child("disappearing_mode");let r,i,o;return n.hasAttr("action")?r=n.attrString("action"):(i=n.attrInt("duration"),o=n.attrInt("t")),(0,a.default)((0,a.default)({},t),{},{type:u.AccountSyncType.DISAPPEARING_MODE,action:r,disappearingModeDuration:i,disappearingModeSettingTimestamp:o})}if(e.hasChild("notice")){const n=e.child("notice");return(0,a.default)({type:u.AccountSyncType.NOTICE,noticeId:n.attrString("id"),noticeStage:n.maybeAttrString("stage"),noticeVersion:n.maybeAttrString("version")},t)}if(e.hasChild("user")){const n="AI available"===e.child("user").maybeAttrString("state");return(0,a.default)({type:u.AccountSyncType.USER,isAiAvailable:n},t)}throw e.createParseError("notification type not supported")}));function B(){return F.apply(this,arguments)}function F(){return(F=(0,i.default)((function*(){const e=(0,k.assertGetMe)(),t=yield(0,h.getAbout)(e);if(t.error)return __LOG__(3)`getStatus failed for ${e}: failed ${t.error.errorCode} : ${t.error.errorText}`,Promise.reject(t.error.errorText);""!==t.status&&(yield(0,p.frontendSendAndReceive)("setMyStatus",{status:t.status}))}))).apply(this,arguments)}function j(){return K.apply(this,arguments)}function K(){return(K=(0,i.default)((function*(){const e=(0,k.assertGetMe)(),t=yield(0,m.getTextStatus)(e);if(t.error)return __LOG__(3)`getStatus failed for ${e}: failed ${t.error.errorCode} : ${t.error.errorText}`,Promise.reject(t.error.errorText);const{id:n,text:r,emoji:i,ephemeralDurationSeconds:a,lastUpdateTime:o}=t,s=(0,O.parseTextStatusServerResponse)({tLine truncated
for ${n.toString()}`,yield(0,d.updateDisappearingModeForContact)(n,t,i),(0,s.wap)("ack",{id:(0,s.CUSTOM_STRING)(r),to:(0,l.JID)(n),class:"notification",type:"disappearing_mode"})}))).apply(this,arguments)}},63099:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return y.apply(this,arguments)};var i=r(n(348926)),a=n(250281),o=r(n(67062)),s=n(780549),l=(n(618422),n(621059)),u=(n(827747),r(n(932325))),c=(r(n(174285)),n(332108)),d=n(95644),p=n(366320),f=n(343343),_=n(233895),g=n(350906),m=r(n(556869));const h=new o.default("failureParser",(e=>(e.assertTag("failure"),{reason:e.attrInt("reason",400,599),location:e.attrString("location"),code:e.hasAttr("code")?e.attrInt("code"):null,expire:e.hasAttr("expire")?e.attrInt("expire"):null,message:e.maybeAttrString("message"),url:e.maybeAttrString("url"),logoutMessageHeader:e.maybeAttrString("logout_message_header"),logoutMessageSubtext:e.maybeAttrString("logout_message_subtext"),logoutMessageLocale:e.maybeAttrString("logout_message_locale")})));function y(){return(y=(0,i.default)((function*(e){const t=h.parse(e);if(t.error)return __LOG__(4,void 0,new Error)`${t.error.toString()} parsing ${e.toString()}`,Promise.reject(t.error);switch(t.success.reason){case l.FAILURE_REASON.REASON_LOCKED:{__LOG__(2)`received failure stanza, reason: ${t.success.reason}, logging out`;const{logoutMessageHeader:e,logoutMessageSubtext:n,logoutMessageLocale:r}=t.success;let i=null;r!==u.default.getNormalizedLocale()||null==e&&null==n||(i={logoutMessageHeader:e,logoutMessageSubtext:n}),yield d.Socket.clearCredentialsAndStoredData(c.LogoutReason.AccountLocked,i),s.Cmd.logout();break}case l.FAILURE_REASON.REASON_NOT_AUTHORIZED:case l.FAILURE_REASON.REASON_BANNED:__LOG__(2)`received failure stanza, reason: ${t.success.reason}, logging out`,yield d.Socket.clearCredentialsAndStoredData(),s.Cmd.logout();break;case l.FAILURE_REASON.REASON_CLIENT_TOO_OLD:case l.FAILURE_REASON.REASON_BAD_USER_AGENT:__LOG__(2)`Client too old or bad user agent, attempting to update the app`;"web"===f.PLATFORMS[(0,g.getWamPlatform)()]?p.Updater.update(_.SANITIZED_VERSION_STR,!1,0):p.Updater.update(void 0,!1,0,!1),(0,a.stopComms)();break;case l.FAILURE_REASON.REASON_TEMP_BANNED:{const{code:e,expire:n,message:r,url:i}=t.success;if(null==e||null==n)throw __LOG__(4,void 0,new Error)`Incorrect temporary ban data ${e} ${n}`,(0,m.default)("handleFailure: wrong temp ban data");s.Cmd.onTemporaryBan({banned:!0,code:e,message:r,url:i,expire:n});break}case l.FAILURE_REASON.REASON_GENERIC_FAILURE:case l.FAILURE_REASON.REASON_INTERNAL_SERVER_ERROR:case l.FAILURE_REASON.REASON_EXPERIMENTAL:__LOG__(3)`handleFailure: got failure code ${t.success.reason}`;break;case l.FAILURE_REASON.REASON_SERVICE_UNAVAILABLE:__LOG__(3)`handleFailure: got failure code ${t.success.reason}`,s.Cmd.showServiceUnavailableError();break;default:return __LOG__(3)`failure reason ${t.success.reason} not implemented yet`,Promise.reject((0,m.default)(`failure reason ${t.success.reason} not implemented yet`))}}))).apply(this,arguments)}},200279:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.handleAction=$,t.handleGroupNotification=function(e){const t=e.content;if(null!=t&&Array.isArray(t)&&t.length>0){const n=t[0];if("groups_dirty"===n.tag)return Promise.resolve((0,A.handleGroupsDirtyNotificationJob)(e))}const n=j.parse(e);if(n.error)return __LOG__(4,void 0,new Error)`Parsing Error: ${n.error.toString()}`,Promise.reject(n.error);const r=n.success,a=Boolean(r.offline)&&!O.OfflineMessageHandler.isResumeFromRestartComplete();if(function(){Z.apply(this,arguments)}(r.chatId),(0,b.isGroupNotificationOptimizationEligible)(r,a)&&a)return(0,b.handleGroupNotificationV2)(r,a);return(0,I.handleMessage)(r.chatId.toString(),a,(0,i.default)((function*(){return yield Promise.all(r.actions.map((e=>$(r,e,a)))),(0,l.wap)("ack",{to:(0,p.GROUP_JID)(r.chatId),id:(0,l.CUSTOM_STRING)(r.externalId),class:"notification",type:"w:gp2",participant:r.author?(0,p.USER_JID)(r.author):l.DROP_ATTR})})))};var i=r(n(348926)),a=r(n(81109)),o=r(n(67062)),s=r(n(670983)),l=n(716358),u=n(287461),c=n(827467),d=n(359987),p=n(355813),f=n(174834),_=n(588090),g=n(185212),m=n(800321),h=n(529921),y=n(113269),E=n(429267),S=n(614198),v=n(862159),T=n(143375),M=n(111070),b=n(225390),A=n(961063),C=n(411745),P=n(854379),I=n(412985),O=n(359484),R=n(130207),N=n(61229),D=n(98742),w=n(439446),L=n(193970),k=n(459857);function G(e){return e.mapChildrenWithTag("participant",(e=>{const t=e.attrEnumOrDefault("type",h.GROUP_PARTICIPANT_TYPES,"participant"),n=e.maybeAttrLidUserJid("lid"),r=e.maybeAttrPhoneUserJid("phone_number");return{displayName:e.maybeAttrString("display_name"),id:(0,P.userJidToUserWid)(e.attrUserJid("jid")),isSuperAdmin:t===h.GROUP_PARTICIPANT_TYPES.superadmin,isAdmin:t===h.GROUP_PARTICIPANT_TYPES.admin||t===h.GROUP_PARTICIPANT_TYPES.superadmin,lid:null!=n?(0,P.userJidToUserWid)(n):null,phoneNumber:null!=r?(0,Line truncated
blindly ack-ing it and doing nothing`,Promise.resolve(t);switch(e.type){case c.LOG:return s.upload({reason:s.SERVER_REQUESTED,immediate:!0,isHighPri:!0}),Promise.resolve(t);case c.PROPS:return(0,l.queryServerProps)().then((()=>t));case c.ABPROPS:return(0,o.syncABPropsTask)(!1).then((()=>t))}}(t.success)};var i=r(n(67062)),a=n(716358),o=n(266485),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(996588)),l=n(460148);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}const c=n(76672)({LOG:"log",PROPS:"props",ABPROPS:"abprops"});t.NotificationType=c;const d=new i.default("incomingServerNotificationParser",(e=>{e.assertTag("notification");const t=e.attrString("id"),n=e.attrWapJid("from");return e.hasChild(c.LOG)?{type:c.LOG,stanzaId:t,from:n}:e.hasChild(c.PROPS)?{type:c.PROPS,stanzaId:t,from:n}:e.hasChild(c.ABPROPS)?{type:c.ABPROPS,stanzaId:t,from:n}:{type:null,stanzaId:t,from:n}}))},828104:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.handleServerSyncNotification=function(e){const t=p.parse(e);if(t.error)return __LOG__(4,void 0,new Error)`Parsing Error: ${t.error.toString()}`,Promise.reject(t.error);return function(e){if(e.changedCollections){const t=new Map;for(const[n,r]of e.changedCollections){const e=s.CollectionName.cast(n);null!=e?t.set(e,r):__LOG__(3)`syncd: unknown collection name in notification: ${n}`}let n=Array.from(t.keys());e.offline&&n.forEach((e=>{const t=d.get(e);null!=t?d.set(e,t+1):d.set(e,1)})),__LOG__(2)`syncd: incoming sync notification for collections
${Array.from(t.entries()).map((e=>{let[t,n]=e;return`${t} v${n}`})).join("\n")}`,c.default.isSyncDCriticalDataSyncInProcess()&&(n=n.filter((e=>(0,o.isCriticalCollection)(e))),__LOG__(2)`syncd: filtered non critical collections during bootstrap. new collections: ${n}`),(0,a.markCollectionsForSync)(n,t)}return Promise.resolve((0,l.wap)("ack",{id:(0,l.CUSTOM_STRING)(e.stanzaId),class:"notification",type:"server_sync",to:l.S_WHATSAPP_NET}))}(t.success)},t.reportOfflineNotifications=function(){if(d.size<1)return;let e=0;Array.from(d.entries()).forEach((t=>{let[,n]=t;e+=n-1})),new u.MdAppStateOfflineNotificationsWamEvent({redundantCount:e}).commit(),d.clear()};var i=r(n(67062)),a=n(280015),o=n(411907),s=n(122393),l=n(716358),u=n(600969),c=r(n(775410));const d=new Map,p=new i.default("serverSyncNotification",(e=>{if(e.assertTag("notification"),!e.hasChild("collection"))throw e.createParseError("Server sync notification does not contain any collections");const t=e.attrString("id"),n=new Map(e.mapChildrenWithTag("collection",(e=>[e.attrString("name"),e.attrInt("version")]))),r=e.hasAttr("offline");return e.attrString("from")!==l.S_WHATSAPP_NET.toString()&&__LOG__(4,void 0,new Error)`handleServerSyncNotification: "from" is not domain jid "s.whatsapp.net"`,{changedCollections:n,stanzaId:t,offline:r}}))},657874:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return g.apply(this,arguments)};var i=r(n(348926)),a=n(250281),o=r(n(67062)),s=n(780549),l=n(400116),u=n(827747),c=n(95644),d=n(581263),p=n(173077),f=n(784898);const _=new o.default("streamErrorParser",(e=>{if(e.assertTag("stream:error"),!e.hasChild("conflict"))return e.hasAttr("code")?{type:"code",code:e.attrInt("code")}:e.hasChild("ack")?{type:"ack",id:e.child("ack").hasAttr("id")?e.child("ack").attrString("id"):null}:e.hasChild("xml-not-well-formed")?{type:"xml-not-well-formed"}:(__LOG__(3)`Unrecognized stream:error: ${e.toString()}`,{type:"other"});switch(e.child("conflict").attrString("type")){case"replaced":return{type:"replaced"};case"device_removed":default:return{type:"device_removed"}}}));function g(){return(g=(0,i.default)((function*(e){const t=_.parse(e);if(t.error)return __LOG__(4,void 0,new Error)`Parsing Error: ${t.error.toString()}`,Promise.reject(t.error);const n=t.success;if("code"===n.type&&n.code>=500&&n.code<600){if(515===n.code)return(0,a.stopComms)(),yield(0,l.startLogin)(),(0,d.startBackend)(),Promise.resolve("NO_ACK");if(516===n.code)return(0,a.stopComms)(),yield(0,f.commitDeviceLinkEvent)(516),yield(0,l.startLogout)(),(0,d.startBackend)(),Promise.resolve("NO_ACK");(0,a.onStreamErrorReceived)()}else{if("device_removed"===n.type)return s.Cmd.onStartingLogout(),(0,a.stopComms)(),yield c.Socket.clearCredentialsAndStoredData(),__LOG__(2)`stream error due to device removed, logging out`,(0,u.maybeLogToJestE2eJSConsole)("stream error due to device removed, logging out"),s.Cmd.logout(),Promise.resolve("NO_ACK");if("replaced"===n.type)return(0,p.currentTabHasMutex)()&&(__LOG__(4,void 0,new Error,!0)`handleStreamError: session replaced while we have a mutex, closing the socket`,SEND_LOGS("invalid-session-replacement",.1)),(0,a.stopComms)(),Promise.resolve("NO_ACK");"xml-not-well-formed"===n.type&&__LOG__(3)`handleStreamError: sent xml not well formed, closing the socket`}return Promise.resolve("CLOSE_SOCKET")}))).apply(this,arguments)}},265927:(e,t,n)=>{"use strict";var r=n(530066).default,i=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return b.apply(this,arguments)};var a=i(n(348926)),o=n(477689),s=i(n(67062)),l=n(434517),u=n(183660),c=n(266485),d=n(780549),p=n(188472),f=n(659102),_=n(643235),g=n(474465),m=n(588237),h=n(192498),y=n(496956),E=n(460148),S=n(757453),v=n(459857),T=n(669050);const M=new s.default("successParser",(e=>(e.assertTag("success"),{ts:e.attrTime("t"),propsVersion:e.attrInt("props"),companionEncStatic:e.maybeAttrString("companion_enc_static")||"NULL",lid:e.maybeAttrString("lid"),displayName:e.maybeAttrString("display_name"),abpropsRefreshId:e.maybeAttrInt("abprops")})));function b(){return(b=(0,a.default)((function*(e){var t,n;(0,g.addPageLoadQplPoint)("success_received");const r=M.parse(e);if(r.error)return __LOG__(4,void 0,new Error)`handleSuccess: failed to parse ${r.error}`,Promise.reject(r.error);const i=r.success;(0,h.updateClockSkew)(i.ts),(0,y.updateMeLid)(null!=i.lid?(0,T.createWid)(i.lid):null),null!=i.displayName&&(0,v.setMeDisplayName)(i.displayName),d.Cmd.onTemporaryBan({banned:!1}),m.PassiveTaskManager.executePassiveTasks(),(0,S.setOfflinePushDisabled)(!1);const a=i.companionEncStatic;f.DbEncKeyStore.generateFinalDbEncryptionAndFtsKey(a),(0,p.generateFinalDbEncryptionAndFtsKeyForInvoker)(a);const o=yield(0,S.getServerPropsAttributes)();(null!==(t=null==o?void 0:o.version)&&void 0!==t?t:-1)<i.propsVersion&&(yield(0,E.queryServerProps)());const s=null!==(n=i.abpropsRefreshId)&&void 0!==n?n:0;if((0,u.getRefreshId)()<s){(0,Line truncated
existing length: ${n.length}, new length: ${t.length}`,SEND_LOGS("self-identity-change-from-history-sync",1,"history-sync"))}))).apply(this,arguments)}function U(){return(U=(0,a.default)((function*(e,t){const n=e.syncType===T.HistorySync$HistorySyncType.INITIAL_BOOTSTRAP?P.MD_BOOTSTRAP_PAYLOAD_TYPE.CRITICAL:P.MD_BOOTSTRAP_PAYLOAD_TYPE.NON_CRITICAL,r=(0,f.getMetricHistorySyncPayloadType)(e.syncType),i=yield A.MdSyncFieldStatsMeta.getMdSessionId(),a=yield B(e),o=new S.MdBootstrapHistoryDataStartDownloadingWamEvent({mdBootstrapPayloadType:n,mdBootstrapPayloadSize:e.historySyncPayloadSize,mdBootstrapHistoryPayloadType:r,mdSessionId:i,historySyncStageProgress:a}),s=new E.MdBootstrapHistoryDataDownloadedWamEvent({mdBootstrapPayloadType:n,mdBootstrapPayloadSize:e.historySyncPayloadSize,mdBootstrapHistoryPayloadType:r,mdSessionId:i,historySyncStageProgress:a}),l=new y.MdBootstrapDataAppliedWamEvent({mdBootstrapPayloadType:n,mdBootstrapSource:I.MD_BOOTSTRAP_SOURCE.HISTORY,mdBootstrapHistoryPayloadType:r,mdSessionId:i,sentViaMms:t,historySyncStageProgress:a});null!=e.chunkOrder&&(o.historySyncChunkOrder=e.chunkOrder,s.historySyncChunkOrder=e.chunkOrder,l.historySyncChunkOrder=e.chunkOrder);const u=yield A.MdSyncFieldStatsMeta.getStorageEstimation();return u.mdStorageQuotaBytes!==A.STORAGE_QUOTA_UNAVAILABLE&&(s.mdStorageQuotaUsedBytes=u.mdStorageQuotaUsedBytes,s.mdStorageQuotaBytes=u.mdStorageQuotaBytes),{historySyncStartDownloadingMetric:o,historySyncDownloadedMetric:s,historySyncDataAppliedMetric:l}}))).apply(this,arguments)}function x(){return(x=(0,a.default)((function*(e){e&&(yield new Promise((e=>self.setTimeout(e,1e3))))}))).apply(this,arguments)}function B(){return F.apply(this,arguments)}function F(){return(F=(0,a.default)((function*(e){var t;let n=e.progress;const r=yield(0,C.getChunkCountForEndOfRecentHistorySync)();return(e.syncType===T.HistorySync$HistorySyncType.FULL||e.syncType===T.HistorySync$HistorySyncType.RECENT&&e.chunkOrder===r)&&(n=100),null!==(t=n)&&void 0!==t?t:0}))).apply(this,arguments)}function j(){return(j=(0,a.default)((function*(){return(0,M.getHistorySyncNotificationTable)().equals(["processed","syncType"],[0,T.HistorySync$HistorySyncType.RECENT],{shouldDecrypt:!1}).then((e=>e.filter((e=>!u.inFlightChunk.has(e.msgKey)&&!e.reuploadPending)).sort(((e,t)=>{var n,r;return(null!==(n=e.chunkOrder)&&void 0!==n?n:0)-(null!==(r=t.chunkOrder)&&void 0!==r?r:0)}))))}))).apply(this,arguments)}t.HistorySyncScheduleSource=N},827144:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.updateEndOfHistorySync=function(){return u.apply(this,arguments)};var i=r(n(348926)),a=n(359987),o=n(735618),s=n(60370),l=n(61229);function u(){return(u=(0,i.default)((function*(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=c(t),i={id:e,endOfHistoryTransferType:r};n&&(i.t=0),yield(0,a.frontendSendAndReceive)("chatCollectionAdd",{things:[i],options:{merge:!0}}),yield(0,l.getChatTable)().merge(e.toString(),{endOfHistoryTransferType:r})}))).apply(this,arguments)}function c(e){switch(e){case s.Conversation$EndOfHistoryTransferType.COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY:return o.ConversationEndOfHistoryTransferModelPropType.COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY;case s.Conversation$EndOfHistoryTransferType.COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY:return o.ConversationEndOfHistoryTransferModelPropType.COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY;case s.Conversation$EndOfHistoryTransferType.COMPLETE_ON_DEMAND_SYNC_BUT_MORE_MSG_REMAIN_ON_PRIMARY:return o.ConversationEndOfHistoryTransferModelPropType.COMPLETE_ON_DEMAND_SYNC_BUT_MORE_MSG_REMAIN_ON_PRIMARY}}},192498:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateClockSkew=function(e){const t=Date.now()/1e3,n=Math.round(t-e),s=Math.round(n/r.HOUR_SECONDS);0!==s&&(0,i.getABPropConfigValue)("log_clock_skew")&&new o.ClockSkewDifferenceTWamEvent({clockSkewHourly:-1*s}).commit();(0,r.setClockSkew)(n),(0,a.frontendFireAndForget)("setWebClockSkew",{newClockSkew:n})};var r=n(632157),i=n(287461),a=n(359987),o=n(930711)},496956:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.updateMeLid=function(e){const t=(0,a.getMaybeMeLid)(!1);if(null==t&&null==e)return;if(null==t&&null!=e)return void(0,a.setMeLid)(e);if(null!=t&&null==e)return;if((0,i.default)(t,"lid").equals(e))return;(0,a.setMeLid)((0,i.default)(e,"nextLid"))};var i=r(n(670983)),a=n(459857)},730104:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.handleCall=function(){return T.apply(this,arguments)};var i=r(n(348926)),a=n(415659),o=r(n(67062)),s=n(716358),l=n(355813),u=(r(n(846870)),r(n(766770))),c=n(281802),d=n(854379),p=n(171612),f=n(487837),_=n(459857),g=r(n(850928)),m=r(n(109037)),h=n(549227),y=n(669050),E=r(n(556869));function S(e){return h.TYPE[e.tag().toUpperCase()]||h.TYPE.NONE}const v=new o.default("callParser",(e=>{e.assertTag("caLine truncated
${e}`})))):Promise.resolve();yield Promise.all([t,r,a,o])})),u.length>0,i)}))).apply(this,arguments)}function A(){return C.apply(this,arguments)}function C(){return(C=(0,a.default)((function*(e,t){const{notifications:n,chatIds:r}=yield(0,u.bulkGenerateDeviceNotifications)(e);if(!t){const e=yield(0,_.encryptMultipleDBMsgs)(n);return O(n),{chatIds:r,encryptedNotifications:e}}return(0,h.getMessageCache)().addMessages(n.map((e=>({msg:e}))),!1),{chatIds:[],encryptedNotifications:[]}}))).apply(this,arguments)}function P(){return I.apply(this,arguments)}function I(){return(I=(0,a.default)((function*(e){const{deleteDeviceSenderKey:t,deleteRemoteInfo:r}=n(743275);try{yield Promise.all([r(e),t(e)])}catch(t){__LOG__(2)`handleDevicesNotification: failed to clean the signal info for ${e.user}`}}))).apply(this,arguments)}function O(e){return Promise.all(e.map((e=>(0,f.frontendSendAndReceive)("processMultipleMessages",{chatId:e.from,msgObjs:[(0,i.default)((0,i.default)({},e),{},{recvFresh:!0,isNewMsg:!0})],meta:{add:"after",isHistory:!1},processMessagesOrigin:"updateDeviceTableApi"}))))}},76833:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.processKeyBundles=function(){return c.apply(this,arguments)};var i=r(n(348926)),a=n(418987),o=n(138706),s=n(999821),l=n(76256),u=r(n(556869));function c(){return(c=(0,i.default)((function*(e){let t=null,n=0,r=0;const i=[],c=[];if(e.forEach((e=>{e instanceof Error?(__LOG__(3)`establishE2ESession: error: ${e}`,t=e):(null!=e.wid.device&&e.wid.device!==a.DEFAULT_DEVICE_ID?c.push(e):i.push(e),e.key||n++)})),0===i.length&&0===c.length)throw(0,u.default)("establishE2ESession: no keys in the response");try{const e=[...i,...c].map((e=>(0,s.createSignalAddress)(e.wid).toString()));yield(0,l.getPersistSignalProtocolStore)().bulkLoadIdentityKey(e),__LOG__(2)`establishE2ESession: warmed up identity cache: ${e.length} records`}catch(e){__LOG__(3)`establishE2ESession: failed to warm up identity cache: ${e}`}const d=e=>o.Session.createSignalSession(e).then((()=>{r++})).catch((t=>{__LOG__(3,void 0,void 0,!0)`createSignalSession: failed for device ${e.wid} with error ${t}`,SEND_LOGS("createSignalSession-fail")}));if(yield Promise.all(i.map(d)),yield Promise.all(c.map(d)),null!=t)throw t;return{depletedPrekeyCount:n,processedPrekeyCount:r}}))).apply(this,arguments)}},944641:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.addSecurityCodeChangedNotifications=function(){return h.apply(this,arguments)},t.generateSecurityCodeChangedNotifications=y;var i=r(n(81109)),a=r(n(348926)),o=n(359987),s=n(389293),l=n(890490),u=n(6007),c=n(800321),d=n(61229),p=n(98742),f=n(918475),_=n(117429),g=n(669050),m=r(n(556869));function h(){return(h=(0,a.default)((function*(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.isBot())return;const n=yield y(e);let r=n.notifications;const a=n.chatIds;if(0!==r.length){if(!t){r=r.map((e=>(0,i.default)((0,i.default)({},e),{},{recvFresh:!0,isNewMsg:!0})));for(const e of r)(0,o.frontendSendAndReceive)("processMultipleMessages",{chatId:e.from,msgObjs:[e],meta:{add:"after",isHistory:!1},processMessagesOrigin:"securityCodeApi"});const e=yield(0,l.encryptMultipleDBMsgs)(r);return(0,u.storeEncryptedDBMessages)(e,a,!1)}(0,c.getMessageCache)().addMessages(r.map((e=>({msg:e}))),!1)}}))).apply(this,arguments)}function y(){return E.apply(this,arguments)}function E(){return(E=(0,a.default)((function*(e){const t={notifications:[],chatIds:[]};if(!(0,_.getGlobalSecurityNotifications)())return t;const n=[];try{const t=yield(0,d.getChatTable)().get(e.toString(),!1);t&&n.push((0,g.createWid)(t.id));const r=yield(0,f.getParticipantTable)().equals(["participants"],String(e)),i=new Map;if(r.length>0){const e=r.map((e=>e.groupId));(yield(0,p.getGroupMetadataTable)().bulkGet(e)).forEach((e=>{null!=e&&i.set(e.id,e)}))}r.forEach((t=>{const r=i.get(t.groupId);!0===Boolean(null==r?void 0:r.defaultSubgroup)&&e.isLid()||n.push((0,g.createWid)(t.groupId))}))}catch(e){throw __LOG__(4,!0,new Error,!0)`get chats failed`,SEND_LOGS("get chats failed when creating device notification"),(0,m.default)("get chats failed")}const r=n.map((t=>(0,s.genSecurityCodeNotificationMsg)(t,e)));return t.notifications=r,t.chatIds=n.map(String),t}))).apply(this,arguments)}},47:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createOutgoingMsgModelProtobuf=t.createOutgoingMessageProtobuf=t.createOutgoingAddonMessageProtobuf=void 0;var r=n(287461),i=n(317851),a=n(21838),o=n(974637),s=n(163755),l=n(177205),u=n(263674),c=n(373070),d=n(619350),p=n(604538),f=n(943037);const _=new Set([c.MSG_TYPE.REACTION,c.MSG_TYPE.REACTION_ENC,c.MSG_TYPE.POLL_CREATION,c.MSG_TYPE.POLL_UPDATE,c.MSG_TYPE.COMMENT,c.MSG_TYPE.IMAGE,c.MSG_TYPE.VIDEO,c.MSG_TYPE.STICKER,c.MSG_TYPE.AUDIO,c.MSG_TYPE.PTT,c.MSG_TYPE.DOCUMENT,c.MSG_TYPE.MULTI_VCARD]),g=(e,t)=>{try{const n=(0,o.getMutableMessageProtobuf)(t);(0,f.verifyProtobufMessageObjectKeys)(n)Line truncated
played: ${o.played.length}, read: ${o.read.length}, delivery: ${o.delivery.length}`,o.playedRemaining=l-o.played.length,o.readRemaining=o.playedRemaining-o.read.length,o.deliveryRemaining=o.readRemaining-o.delivery.length,t.set(n,o)}return t}function T(e){const t=e.read;null!=t&&(null==e.delivery||e.delivery>t)&&(e.delivery=t)}function M(){return(M=(0,a.default)((function*(e){const t=new Map,n=yield E(e);for(const r of e){const e=n.get(r.toString());if(null==e)continue;let i;0===e.playedRemaining&&e.played.length>0?i=s.ACK.PLAYED:0===e.readRemaining&&e.read.length>0?i=s.ACK.READ:0===e.deliveryRemaining&&e.delivery.length>0&&(i=s.ACK.RECEIVED),null!=i&&t.set(r.toString(),i)}return t}))).apply(this,arguments)}t.RetryEligibilityResult=h},176573:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createOrUpdateOrphanReceipt=function(e,t,n){return(0,r.getStorage)().lock(["orphan-receipt"],(r=>{let[i]=r;return i.bulkGet(n).then((r=>{const a=n.reduce(((n,i,a)=>{let o=r[a];null==o&&(o={msgKey:i});const s=o[e];return(null==s||s>t)&&(o[e]=t,n.push(o)),n}),[]);return i.bulkCreateOrReplace(a)}))}))},t.getOrphanReceipt=function(e){return(0,i.getOrphanReceiptTable)().get(e)},t.removeOrphanReceipt=function(e){return(0,i.getOrphanReceiptTable)().remove(e)};var r=n(732011),i=n(463631)},583464:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.addOrphanRevokes=function(e){return f.bulkCreateOrReplaceOrphanRevokes(e)},t.applyOrphanRevokes=function(){return _.apply(this,arguments)};var i=r(n(348926)),a=r(n(670983)),o=n(787742),s=n(373070),l=n(434030),u=r(n(124928)),c=n(669050);let d=new Map,p=!1;const f={reset:()=>{d=new Map,p=!1},bulkRemoveOrphans:e=>(e.forEach((e=>{d.delete(e.msgKey)})),(0,l.getOrphanRevokeTable)().bulkRemove(e.map((e=>e.msgKey)))),bulkCreateOrReplaceOrphanRevokes:e=>(e.forEach((e=>{d.has(e.msgKey)&&d.delete(e.msgKey),d.set(e.msgKey,e)})),(0,l.getOrphanRevokeTable)().bulkCreateOrReplace(e)),getAllOrphanRevokes:()=>(0,i.default)((function*(){if(!p){const e=yield(0,l.getOrphanRevokeTable)().all();d=new Map(e.map((e=>[e.msgKey,e]))),p=!0}return d}))()};function _(){return(_=(0,i.default)((function*(e){const t=yield f.getAllOrphanRevokes(),n=[],r=[];return e.forEach((e=>{const i=e.id.toString();if(t.has(i)){const d=(0,a.default)(t.get(i),"orphanRevokesCache.get(messageId)");var l;if(__LOG__(2)`applyOrphanRevokes: found orphan revoke for message ${e.id.toString()}`,!u.default.isStatusV3(e.id.remote))r.push({id:e.id,to:e.to,author:e.author,revokeSender:(0,c.createWidFromWidLike)(null!==(l=d.sender)&&void 0!==l?l:(0,o.getSender)(e)),type:s.MSG_TYPE.REVOKED,kind:s.MsgKind.RevokedMessage,subtype:"admin_revoke"===d.subtype?"admin":"sender",protocolMessageKey:e.id,from:e.from,t:e.t,broadcast:e.broadcast});n.push(d)}else r.push(e)})),f.bulkRemoveOrphans(n),r}))).apply(this,arguments)}},328329:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.createOrUpdateOrphanTcToken=function(e,t){return(0,a.getOrphanTcTokenTable)().createOrMerge(e,(0,i.default)({chatId:e},t))},t.getOrphanTcToken=function(e){return(0,a.getOrphanTcTokenTable)().get(e)},t.removeOrphanTcToken=function(e){return(0,a.getOrphanTcTokenTable)().remove(e)};var i=r(n(81109)),a=n(324862)},827467:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.GroupUnSyncedError=void 0,t.clearAdminshipCache=function(e){null!=e?v.delete(e):v.clear()},t.getGroupSenderKeyList=function(){return g.apply(this,arguments)},t.getGroupSenderKeyListFromParticipantRecord=m,t.injectPastParticipantsFromDB=function(){return S.apply(this,arguments)},t.isCurrentUserGroupAdmin=function(){return T.apply(this,arguments)},t.markForgetSenderKey=function(e,t){const n=e.toString();return(0,u.getStorage)().lock(["participant"],function(){var e=(0,a.default)((function*(e){let[r]=e;const i=yield r.get(n);i?yield r.createOrReplace(y(i,t,!1)):__LOG__(2)`markForgetSenderKey: group participant info missing for group ${n}`}));return function(){return e.apply(this,arguments)}}())},t.markHasSenderKey=function(e,t){const n=e.toString();return(0,u.getStorage)().lock(["participant"],function(){var e=(0,a.default)((function*(e){let[r]=e;const i=yield r.get(n);i?yield r.createOrReplace(y(i,t,!0)):__LOG__(2)`markHasSenderKey: group participant info missing for group ${n}`}));return function(){return e.apply(this,arguments)}}())},t.pruneExpiredPastParticipants=function(){return(0,u.getStorage)().lock(["participant"],function(){var e=(0,a.default)((function*(e){let[t]=e;const n=yield(0,c.getParticipantTable)().all(),r=[];return n.forEach((e=>{const t=e.pastParticipants.filter((e=>{const t=(0,o.castToUnixTime)(e.leaveTs);return(0,o.happenedWithin)(t,o.DAY_SECONDS*l.PAST_PARTICIPANT_EXPIRATION_DAYS)}));if(t.length!==e.pastParticipants.length){const n=(0,i.default)((0,i.default)({},e),{},{pastParticipants:t});r.push(n)}})),r.length,t.bulkCreateOrReplace(r)}));return function(){returLine truncated
This likely indicates a permissions error. Falling back to fake \
(no-op) storage.`;else{if(e instanceof p.DbOnLogoutAbort)throw e;__LOG__(4,!0,new Error,!0)`Failed to initialize media store! Falling back to fake (no-op) storage. Error:
${(0,f.default)(e)}`,SEND_LOGS("Failed to initialize media store")}}return new c.default})))}setMaxSize(e){var t=this;return(0,i.default)((function*(){(yield t._getBackingStore()).setMaxSize(e)}))()}get(e){var t=this;return(0,i.default)((function*(){return(yield t._getBackingStore()).get(e)}))()}queryByIndex(e,t){var n=this;return(0,i.default)((function*(){return(yield n._getBackingStore()).queryByIndex(e,t)}))()}getAll(){var e=this;return(0,i.default)((function*(){return(yield e._getBackingStore()).getAll()}))()}put(e,t){var n=this;return(0,i.default)((function*(){return(yield n._getBackingStore()).put(e,t)}))()}del(e){var t=this;return(0,i.default)((function*(){const n=yield t._getBackingStore();yield n.del(e)}))()}count(){var e=this;return(0,i.default)((function*(){return(yield e._getBackingStore()).count()}))()}clear(){var e=this;return(0,i.default)((function*(){const t=yield e._getBackingStore();yield t.clear()}))()}open(){var e=this;return(0,i.default)((function*(){const t=yield e._getBackingStore();yield t.open()}))()}close(){var e=this;return(0,i.default)((function*(){const t=yield e._getBackingStore();yield t.close()}))()}}function m(){return(m=(0,i.default)((function*(){const e=h();if(null==e)return null;const t=(0,u.isStoreQuotaManagerEnabled)()?yield _.storeQuotaManager.getQuotaForStore("lru-media-store"):Number.MAX_SAFE_INTEGER;return new d.default({maxSize:t,arrayBufferStore:e})}))).apply(this,arguments)}function h(){if(null!=o.default){const e=new l.default("media_lru_buffer");return"caches"in self?new s.default("lru-media-array-buffer-cache"):e}return null}t.MediaStore=g;const y=new g;t.LruMediaStore=y},740573:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(173207));class a extends i.default{get(){return Promise.resolve()}queryByIndex(){return Promise.resolve([])}getAll(){return Promise.resolve([])}put(e,t){return Promise.resolve(t)}del(){return Promise.resolve()}count(){return Promise.resolve(0)}clear(){return Promise.resolve()}setMaxSize(){return Promise.resolve()}}t.default=a},198765:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(348926)),a=r(n(670983)),o=n(652204),s=r(n(721698)),l=r(n(173207)),u=r(n(495976)),c=n(75421),d=r(n(909520));class p extends l.default{constructor(e){var t;super(),t=this,this._queueMap=new o.PromiseQueueMap,this.updateMaxSizeInterval=null,this._dispose=e=>this._bufferStore.del(e),this.doPut=(e,n)=>this._queueMap.enqueue(e,(0,i.default)((function*(){if(n.byteLength>t.getMaxSize())return n;if(n.byteLength>3e7)return n;const r={id:e,timestamp:(new Date).getTime(),size:n.byteLength};try{return yield t._metaInfoStore.putObject(r),t._bufferStore.put(e,n)}catch(e){if(e instanceof s.default.AbortError&&e.message.includes("QuotaExceededError"))return __LOG__(2)`LruMediaStore: encounter QuotaExceededError, thus shrink the size of LruMediaStore`,void t.setMaxSize((0,a.default)(t.getCurrentSize(),"_this.getCurrentSize()")/2);throw e}}))),this.doDel=e=>this._queueMap.enqueue(e,(()=>this._metaInfoStore.del(e))),this._updateMaxSize=function(){var e=(0,i.default)((function*(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if((0,c.isStoreQuotaManagerEnabled)())return;const n=yield(0,u.default)();if(null==n)return void t._clearStoreForThisSession();const r=t.getCurrentSize();if(null==r)return;const i=n.available,a=t._calculateTargetedBufferSize(n.quota);if(i>a)return void(e&&t.setMaxSize(i));const o=a-i;r<o?t._clearStoreForThisSession():t.setMaxSize(r-o)}));return function(){return e.apply(this,arguments)}}();const{maxSize:n,arrayBufferStore:r}=e;this._bufferStore=r,this._metaInfoStore=new d.default(n,this._dispose),(0,c.isStoreQuotaManagerEnabled)()||(this.updateMaxSizeInterval=self.setInterval(this._updateMaxSize,6e4))}doGet(e){var t=this;return(0,i.default)((function*(){const n=yield t._bufferStore.get(e);return null!=n&&t.put(e,n),n}))()}doClear(){var e=this;return(0,i.default)((function*(){return yield e._bufferStore.clear(),e._metaInfoStore.clear()}))()}doCount(){return this._metaInfoStore.count()}doOpen(){var e=this;return(0,i.default)((function*(){yield Promise.all([e._metaInfoStore.open(),e._bufferStore.open()])}))()}doClose(){var e=this;return(0,i.default)((function*(){yield Promise.all([e._metaInfoStore.close(),e._bufferStore.close()])}))()}getCurrentSize(){return this._metaInfoStore.getCurrentSize()}getMaxSize(){return this._metaInfoStore.getMaxSize()}setMaxSize(e){return this._metaInfoStore.setMaxSize(e)}_calculateTargetedBufferSize(e){const t=Math.floor(.01*e);return t<1e8?1e8:t>5e8?5e8:t}_clearStoreForThisSession(){this.setMaxSize(0),this.updateMaxSizeInterval&&(self.clearInterval(this.updateMaxSizeInterval),this.updateMaxSizeInterval=null)}}t.default=p},909520:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(840669),a=r(n(24824)),o=n(419272),s=r(n(881205)Line truncated
============== offline resume perf ================
message: ${t.offlineMessageCount}
receipt: ${t.offlineReceiptCount}
notification: ${t.offlineNotificationCount}
chatThreadCount: ${t.chatThreadCount}
offlineSizeBytes: ${t.offlineSizeBytes}
decryptError: ${t.offlineDecryptErrorCount}
preackMessageCount: ${t.preackMessageCount}
preackReceiptCount: ${t.preackReceiptCount}
lastStanzaT: ${t.lastStanzaT}
pageLoadT: ${t.pageLoadT}
connectionT: ${t.socketConnectT}
passiveModeT: ${t.passiveModeT}
offlinePreviewT: ${t.offlinePreviewT}
screenLoadT: ${t.mainScreenLoadT}
isResumeInForeground: ${t.isResumeInForeground}
mailboxAge: ${t.mailboxAge}
===================================================`,e.isInitialSync?e.qpl.drop():(t.commit(),e.qpl.setAnnotations({messageCount:t.offlineMessageCount,receiptCount:t.offlineReceiptCount,notificationCount:t.offlineNotificationCount,chatThreadCount:t.chatThreadCount,decryptErrorCount:t.offlineDecryptErrorCount,sizeBytes:t.offlineSizeBytes}),e.qpl.end(),e.endTableUsageMetric()),e.offlineResume=null,window.document&&document.removeEventListener("visibilitychange",e.logResumeInBackground))}))()}resetEvent(){null==this.offlineResume&&(this._initEvents(E.ResumeFromOpentab),this.logOfflineStartT())}_generateOfflineSessionId(){return`${(0,a.randomHex)(4)}${(0,s.unixTimeWithoutClockSkewCorrection)()}`}};t.OfflineResumeReporter=b},115383:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.mainScriptTimer=t.initialScreenTimer=t.exeTimer=t.PageLoad=void 0,t.onInitialRenderComplete=function(){_()},t.saveInitialPanelMountTime=function(e){(0,a.addPageLoadQplPoint)("webc_initial_panel_mount_t"),d=e},t.setInitialScreen=function(e){if(null==p)return;p.set({webcInitialPanel:e})},t.streamInfoChange=function(e,t,n){!function(e){switch(e){case o.StreamInfo.OPENING:(0,a.addPageLoadQplPoint)("webc_ws_opening");break;case o.StreamInfo.PAIRING:(0,a.addPageLoadQplPoint)("webc_ws_pairing");break;case o.StreamInfo.NORMAL:(0,a.addPageLoadQplPoint)("webc_ws_normal")}}(e);const r=Math.floor(self.performance.now());f[e]=r,n&&(f.socketSequence=t,g())};var i=r(n(670983)),a=n(474465),o=n(146044),s=n(154378),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(824194)),u=r(n(24650));function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}let d,p=new(n(453060).WebcPageLoadWamEvent);const f={};let _,g;const m=new Promise((e=>_=e)),h=new Promise((e=>g=e));let y,E=!1;function S(e){return self.performance&&self.performance.timing&&self.performance.timing.navigationStart?e-self.performance.timing.navigationStart:null}function v(){p&&document.hidden&&(y=!1)}function T(){var e;if(!(null===(e=self.performance)||void 0===e?void 0:e.timing)||!self.performance.navigation)return void __LOG__(2)`MetricReporter:logPageLoad metrics not provided by browser!`;if(!p)return;const t=p,n=self.performance.timing,r=self.performance.navigation,i=n.navigationStart,o=n.loadEventEnd-i;if(o<=0)return __LOG__(2)`MetricReporter:logPageLoad delayed`,void self.setTimeout(T,1e4);function s(e){const t=n[e];return t&&S(t)}var l;t.set({webcPageLoadT:o,webcUnloadEventStart:s("unloadEventStart"),webcUnloadEventEnd:s("unloadEventEnd"),webcRedirectStart:s("redirectStart"),webcRedirectEnd:s("redirectEnd"),webcFetchStart:s("fetchStart"),webcDomainLookupStart:s("domainLookupStart"),webcDomainLookupEnd:s("domainLookupEnd"),webcConnectStart:s("connectStart"),webcConnectEnd:s("connectEnd"),webcSecureConnectionStart:s("secureConnectionStart"),webcRequestStart:s("requestStart"),webcResponseStart:s("responseStart"),webcResponseEnd:s("responseEnd"),webcDomLoading:s("domLoading"),webcDomInteractive:s("domInteractive"),webcDomContentLoadedEventStart:s("domContentLoadedEventStart"),webcDomContentLoadedEventEnd:s("domContentLoadedEventEnd"),webcDomComplete:s("domComplete"),webcLoadEventStart:s("loadEventStart"),webcLoadEventEnd:s("loadEventEnd"),webcCached:n.fetchStart===n.domainLookupEnd,webcNavigation:r.type,webcRedirectCount:r.redirectCount,webcWsOpening:f.OPENING,webcWsPairing:f.PAIRING,webcWsSyncing:f.SYNCING,webcWsNormal:f.NORMAL,webcWsAttempts:f.socketSequence,webcQrCode:!f.SYNCING,webcInitialPanelMountT:d-i,webcLoadInForeground:y}),l=t,(0,a.addPageLoadValidationData)("webc_ws_opening",{wam:l.webcWsOpening}),(0,a.addPageLoadValidationData)("webc_ws_pairing",{wam:l.webcWsPairing}),(0,a.addPageLoadValidationData)("webc_ws_normal",{wam:l.webcWsNormal}),(0,a.addPageLoadValidationData)("webc_initial_panel_mount_t",{wam:l.webcInitialPanelMountT}),(0,a.addPageLoadValidationData)("webc_initial_panel_mount_start_t",{wam:l.webcInitialPanelMountStartT}),(0,a.addPageLoadValidationData)("webc_initial_panel_render_t",{wam:l.webcInitialPanelRenderT}),(0,a.setWamCompleteForValidation)(),t.commit(),window.document&&document.removeEventListener("visibilitychange",v),p=null}window.document&&(y=!document.hidden,document.addEventListener("visibilitychange",v)),Promise.all([m,h]).then((()=>{T(),(0,u.default)(),E||(E=!0,s.Wam.resumeJobs())}));class M{constructor(e){this._hasStarted=!1,this._label=e.label,this._startProperty=e.startProperty,this._endProperty=e.endProperty}start(){this._hasStarted=!0,null!=p&&(p.set({[tLine truncated
======= worker offline processing update ========
ProcessedMessage: ${this._processedMessageCount}
ProcessedNotification: ${this._processedNotificationCount}
currentProcessingT: ${e}
=================================================`,e>12e4)return __LOG__(4,void 0,new Error,!0)` [offline-resume][worker] worker offline processing takes too long`,void SEND_LOGS("worker-offline-process-takes-too-long");this._commit(f.OFFLINE_PROCESS_STAGES.PROCESSING,e),this._refreshProcessingStage()}))),this._processingStageTimer.onOrAfter(1e4)}_startProcessingStage(){var e;this._currentStage=f.OFFLINE_PROCESS_STAGES.PROCESSING,null===(e=this._processingStageTimer)||void 0===e||e.cancel(),this._refreshProcessingStage()}_printProcessingPerf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;__LOG__(2)`[offline-resume][worker] worker offline processing ends
========= worker offline processing perf ==========
message: ${this._offlineMessageCount}
receipt: ${this._offlineReceiptCount}
notification: ${this._offlineNotificationCount}
ProcessedMessage: ${this._processedMessageCount}
ProcessedNotification: ${this._processedNotificationCount}
decryptError: ${this._offlineDecryptErrorCount}
pageLoadT: 0
socketConnectT: ${this.socketConnectT}
offlinePreviewT: ${this.offlinePreviewT}
processCompleteT: ${this.processCompleteT}
mailboxAge: ${e}
isInterrupted: ${this._currentStage===f.OFFLINE_PROCESS_STAGES.PROCESS_INTERRUPTED}
runReason: ${this._runReason}
===================================================`}getCurrentStage(){return this._currentStage}updateOldestStanzaTime(e){(null==this._oldestStanzaTs||this._oldestStanzaTs>e)&&(this._oldestStanzaTs=e)}updateOfflineCount(e){this._offlineMessageCount=e.message,this._offlineReceiptCount=e.receipt,this._offlineNotificationCount=e.notification}updateOfflineDecryptionErrorCount(e){this._offlineDecryptErrorCount=e}updateProcessedMessageCount(){(0,u.isWorker)()&&(this._processedMessageCount+=1)}updateProcessedNotificationCount(){(0,u.isWorker)()&&(this._processedNotificationCount+=1)}logWorkerInitialized(e){this._currentStage=f.OFFLINE_PROCESS_STAGES.PAGE_LOAD,this._runReason=e,this._commit(f.OFFLINE_PROCESS_STAGES.PAGE_LOAD,0)}logSocketConnect(){this._currentStage=f.OFFLINE_PROCESS_STAGES.SOCKET_CONNECT;const e=Math.floor(self.performance.now()-this.pageLoadT);this.socketConnectT=e,this._commit(f.OFFLINE_PROCESS_STAGES.SOCKET_CONNECT,e)}logOfflinePreview(){this._currentStage=f.OFFLINE_PROCESS_STAGES.OFFLINE_PREVIEW;const e=Math.floor(self.performance.now()-this.pageLoadT);this.offlinePreviewT=e,this._commit(f.OFFLINE_PROCESS_STAGES.OFFLINE_PREVIEW,e),this._startProcessingStage()}logProcessComplete(){var e=this;return(0,i.default)((function*(){var t;if(e._currentStage===f.OFFLINE_PROCESS_STAGES.PROCESS_COMPLETE||e._currentStage===f.OFFLINE_PROCESS_STAGES.PROCESS_INTERRUPTED)return;e._currentStage=f.OFFLINE_PROCESS_STAGES.PROCESS_COMPLETE,null===(t=e._processingStageTimer)||void 0===t||t.cancel(),e._processingStageTimer=null;const n=(0,_.countDays)(e._oldestStanzaTs);yield(0,d.setRecentMailboxAgeDays)(n);const r=Math.floor(self.performance.now()-e.pageLoadT);e.processCompleteT=r,e._printProcessingPerf(n),e._commit(f.OFFLINE_PROCESS_STAGES.PROCESS_COMPLETE,r),(0,c.setLastPushCompleteTimestamp)((0,s.unixTimeMs)())}))()}logProcessInterrupted(){var e;if(null==this._currentStage||this._currentStage===f.OFFLINE_PROCESS_STAGES.PROCESS_COMPLETE||this._currentStage===f.OFFLINE_PROCESS_STAGES.PROCESS_INTERRUPTED)return;this._currentStage=f.OFFLINE_PROCESS_STAGES.PROCESS_INTERRUPTED,null===(e=this._processingStageTimer)||void 0===e||e.cancel(),this._processingStageTimer=null;const t=Math.floor(self.performance.now()-this.pageLoadT);this.processCompleteT=t,this._printProcessingPerf(),this._commit(f.OFFLINE_PROCESS_STAGES.PROCESS_INTERRUPTED,t)}};t.WorkerOfflineResumeReporter=m},550660:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(121955);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}))},130945:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrivateStatsAllIds=t.Global=void 0;var r=n(901032),i=n(181548),a=n(524400),o=n(300571),s=n(519237),l=n(97288);const{BOOLEAN:u,INTEGER:c,STRING:d}=r.TYPES,p=(0,r.defineGlobal)({abKey2:[4473,d,["regular"]],appBuild:[1657,i.APP_BUILD_TYPE,["regular","private"]],appIsBetaRelease:[21,u,["regular","private"]],appVersion:[17,d,["regular","private"]],browser:[779,d,["regular"]],browserVersion:[295,d,["regular"]],datacenter:[2795,d,["regular"]],deviceClassification:[14507,a.DEVICE_CLASSIFICATION,["regular"]],deviceName:[13,d,["regular","private"]],deviceVersion:[4505,d,["regular"]],expoKey:[5029,d,["regular","private"]],mcc:[5,c,["regular","private"]],memClass:[655,c,["regular","private"]],mnc:[3,c,["regular","private"]],networkIsWifi:[23,u,["regular"]],ocVersion:[6251,c,["regular","private"]],osVersion:[15,d,["regular","private"]],platform:[11,o.PLATFORM_TYPE,["regular","private"]],psCountryCode:[6833,d,["private"]],psId:[6005,d,["private"]],serviceImprovementOptOut:[13293,u,["regular","private"]],streamId:[3543,c,["regular","private"]],wametaLoggerTestFilter:[15881,d,["regular","private"]],webcBucket:[875,d,["regular"]],webcEnv:[633,s.WEBC_ENV_CODE,["regular"]],webcNativeAutolaunch:[1009,u,["regular"]],webcNativeBetaUpdates:[1007,u,["regular"]],webcPhoneAppVersion:[1005,d,["regular"]],webcPhoneCharging:[783,u,["regular"]],webcPhoneDeviceManufacturer:[829,d,["regular"]],webcPhoneDeviceModel:[831,d,["regular"]],webcPhoneOsBuildNumber:[833,d,["regular"]],webcPhoneOsVersion:[835,d,["regular"]],webcPhonePlatform:[707,o.PLATFORM_TYPE,["regular"]],webcTabId:[3727,d,["regular"]],webcWebArch:[6605,d,["regular"]],webcWebDeviceManufacturer:[6599,d,["regular"]],webcWebDeviceModel:[6601,d,["regular"]],webcWebOsReleaseNumber:[6603,d,["regular"]],webcWebPlatform:[899,l.WEBC_WEB_PLATFORM_TYPE,["regular","private"]],yearClass:[689,c,["regular","private"]],yearClass2016:[2617,c,["regular","private"]]});t.Global=p;t.PrivateStatsAllIds=[{key:"DefaultPsId",keyHashInt:113760892,rotationPeriodDays:-1},{key:"IdPreMetrics",keyHashInt:56300709,rotationPeriodDays:-1},{key:"IdTtl90Days",keyHashInt:37887164,rotationPeriodDays:90},{key:"IdTtlDaily",keyHashInt:248614979,rotationPeriodDays:1},{key:"IdTtlMonthly",keyHashInt:191000728,rotationPeriodDays:30Line truncated
Header as expected? ${String("BEGIN:VCARD"===i)}
Version as expected? ${String(c)}
Footer as expected? ${String("END:VCARD"===u)}
Lines: ${t.length}`,void SEND_LOGS("vcard-fault");for(let e=2;e<t.length-1;e++){var d;const i=t[e],a=i.match(/item(\d+)\.(.*)/),o=a?a[2]:i,l=null===(d=o.match(/([^:;]*)[:;].*/))||void 0===d?void 0:d[1];if(null==l)continue;const u=a?f:_;let c,y,E=l,S=l;if(u[E]){const[e,t]=u[E],n=o.match(e);n&&(c=h(n[1]),y=1===t?y=n[2]:n.slice(2,2+t))}else{const e=o.match(p);e&&(S="SERVICE",E=e[1],y=e[2],c={})}if((Array.isArray(y)?y:[y]).some((e=>e&&(0,s.isString)(e)&&e.trim())))if(a){const t=a[1];r[t]?r[t].fields.push(new g(E,null,c,y)):r[t]={type:E,index:e,key:S,properties:c,value:y,fields:[]}}else m(n,S,new g(E,e,c,y))}return Object.keys(r).forEach((e=>{const{key:t,index:i,type:a,value:o,properties:s,fields:l}=r[e];l.forEach((e=>{s[e.type]=e.value})),m(n,t,new g(a,i,s,o))})),function(e){const t={};return(0,o.default)(e,((e,n)=>{t[n]=(0,a.default)(e,(e=>e.index))})),t}(n)}t.Field=g},366202:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.getAgentId=function(e){if(null!=e.agentId||!(0,l.canUserSeeMessageAttribution)())return e.agentId;const t=(0,m.getMe)();if(null!=t){const e=s.AgentCollection.getByDeviceId(t.getDeviceId());if(null!=e)return e.id}},t.initializeAgentLog=function(){if(!(0,u.isMultiDeviceAgentsLoggingEnabled)())return;const e=(0,m.assertGetMe)().getDeviceId(),t=p.default.persistentExpiringId();c.Cmd.on("logout",(()=>{T({browserId:t,companionMdId:e,logoutTimestamp:(0,o.unixTimeWithoutClockSkewCorrection)(),multideviceAction:h.MULTIDEVICE_ACTION_TYPE.LOGOUT},!0)})),document.addEventListener("visibilitychange",(()=>{document.hidden||T({browserId:t,companionMdId:e,multideviceAction:h.MULTIDEVICE_ACTION_TYPE.ACTIVE})}));const n=s.AgentCollection.getByDeviceId(e);null!=n?(S=n.id,M({browserId:t,companionMdId:e})):c.Cmd.on(c.APP_STATE_SYNC_COMPLETED,(()=>{const n=s.AgentCollection.getByDeviceId(e);null!=(null==n?void 0:n.id)&&null==S&&(S=n.id,M({browserId:t,companionMdId:e}))}))},t.logMessageInfo=function(e){const t=null!=e?s.AgentCollection.get(e):void 0;T({browserId:p.default.persistentExpiringId(),agentId:null==t?void 0:t.id,companionMdId:null==t?void 0:t.deviceId,multideviceAction:h.MULTIDEVICE_ACTION_TYPE.MESSAGE_INFO})},t.setShouldLogAgentLogin=function(e){v=e},t.updateUnattributedMessages=function(){return E.apply(this,arguments)};var i=r(n(81109)),a=r(n(348926)),o=n(632157),s=n(919833),l=n(86417),u=n(72696),c=n(780549),d=n(447714),p=r(n(524173)),f=n(61113),_=n(851698),g=n(645485),m=n(459857),h=n(926723);function y(e){var t;return e.author.user!==(null===(t=(0,m.getMaybeMeUser)())||void 0===t?void 0:t.user)}function E(){return(E=(0,a.default)((function*(e,t){if(y(e)||!(0,l.canUserSeeMessageAttribution)())return;const n=e.author.getDeviceId(),r=s.AgentCollection.getByDeviceId(n);if(null==r){const e=t.map((e=>({id:e.id.toString(),deviceId:n})));return g.UnattributedMessageCollection.add(e),void e.forEach((()=>{}))}const i=t.map((e=>f.MsgCollection.get(e.id))).filter(Boolean).filter((e=>null==e.agentId)),a=String(r.id);i.forEach((e=>{e.agentId=a}));const o=i.map((e=>({id:e.id.toString(),agentId:a})));yield(0,_.getMessageTable)().bulkCreateOrMerge(o)}))).apply(this,arguments)}let S,v;function T(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,u.isMultiDeviceAgentsLoggingEnabled)()&&new d.MdExpansionAgentBrowserMdIdWamEvent((0,i.default)({agentId:S},e)).commitAndWaitForFlush(t)}function M(e){null!=v&&T((0,i.default)((0,i.default)((0,i.default)({},e),v),{},{multideviceAction:h.MULTIDEVICE_ACTION_TYPE.LOGIN}))}},446426:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleBusinessChange=void 0;var r=n(324729),i=n(660666),a=n(163139);t.handleBusinessChange=e=>{const t=(0,a.unproxy)(e),{businessProfile:o,id:s}=t,l=t.isBusiness||(0,i.getIsMe)(t)&&r.Conn.isSMB;l&&!o?t.addChild("businessProfile",n(778945).BusinessProfileCollection.gadd(s)):!l&&o&&(t.stopListening(o),t.businessProfile=void 0,o.delete())}},724472:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.queryBusinessCategories=function(e){if(e===a.BUSINESS_CATEGORY_EMPTY_STR_ID)return(0,o.queryBusinessCategories)("");return(0,o.queryBusinessCategories)(e)},t.queryBusinessProfile=function(){return p.apply(this,arguments)},t.queryBusinessPublicKey=function(e){return(0,n(628905).getJobManager)().waitUntilCompleted(l.jobSerializers.getPublicKey(e))},t.querySignedUserInfo=function(){return _.apply(this,arguments)},t.updateCartEnabled=function(){return f.apply(this,arguments)};r(n(81109));var i=r(n(348926)),a=(n(8304),n(431307)),o=n(954439),s=n(761849),l=n(323829),u=n(228733),c=n(459857),d=r(n(556869));function p(){return(p=(0,i.default)((function*(e,t){return yield(0,u.queryBusinessProfile)(e,t)}))).apply(this,arguments)}function f(){return(f=(0,i.default)((function*(e){const t=n(778945).BusinessProfileCollection,r=yield(0,s.updateCartEnabled)(e),i=t.getValid((0,c.getMeUser)()),a=null==i?void 0:i.profileOptions;i&&a&&(a.cartEnabled=r,t.add(i,{mergLine truncated
formattedName:${ee},
name:${ae},
formattedShortName:${te},
formattedUser:${Z}`,SEND_LOGS("display name is null or undefined"),"";const _e=O.default.createElement(O.default.Fragment,null,O.default.createElement(g.EmojiText,{text:(0,s.default)(de.toString()),ariaLabel:null!=pe?(0,s.default)(pe.toString()):void 0,element:n,className:(0,d.classnamesConvertMeToStylexPlease)(null,e.className),formatters:ce,titlify:i,ellipsify:a,breakWord:u,direction:"auto",selectable:T,inlineblock:!0,onClick:R,xstyle:B,testid:H}),V&&O.default.createElement(g.EmojiText,{testid:"you-label",text:I.fbt._("(You)",null,{hk:"1CQza2"}),xstyle:j.spaceBefore}),fe?O.default.createElement("span",{className:v.default.lidDebugLabel},"LID"):null),ge=e.labels||ie;(null==ge?void 0:ge.length)&&null!=x&&(0,o.default)(ge,x);const me=!0===w&&(null==ge?void 0:ge.length)?O.default.createElement(E.Labels,{labels:ge,showName:!1}):null,he=!W&&(J||Q||X||Boolean(L)||$),ye=F?K(Y):null;if(!0===he){let e;if((0,S.isBlueEnabled)()){const t=q?24:20;e=z&&R?O.default.createElement(C.default,{height:t,width:t,Icon:b.PsaVerifiedBlueIcon,"aria-label":I.fbt._("Verified Information",null,{hk:"XGzuI"}),onClick:R}):O.default.createElement(b.PsaVerifiedBlueIcon,{height:t,width:t})}else e=O.default.createElement(A.PsaVerifiedIcon,null);return O.default.createElement("div",{className:(0,d.classnamesConvertMeToStylexPlease)(v.default.verified,v.default.disableGrow)},_e,O.default.createElement("div",{className:!0===$?v.default.newsletterIcon:v.default.icon},e),O.default.createElement("div",{className:v.default.labels},ye,me))}return ye||me?O.default.createElement("div",{className:(0,d.classnamesConvertMeToStylexPlease)({[v.default.verified]:!0,[v.default.hasLabels]:!!me&&!V})},_e,O.default.createElement("div",{className:v.default.labels},ye,me)):O.default.createElement("div",{className:(0,d.classnamesConvertMeToStylexPlease)(v.default.disableGrow,v.default.verified)},_e)}function W(e){const{element:t,highlightText:n,titlify:r,ellipsify:i,breakWord:a,onClick:u,showLabel:c,firstLabel:p,className:f,xstyle:_,showChatAssignmentIcon:h=!1,assignedAgents:T=[],testid:C,overrideCommunityAnnouncementGroupName:P=!1,checkmarkLarge:N=!1}=e;let D;const G=(0,k.useModelValues)(e.chat,["formattedTitle","labels"]),U=(0,k.useModelValues)(e.groupMetadata,["support","isUnnamed","participants","groupType"]),x=(0,w.default)();(0,L.useListener)(U.participants,"bulk_add bulk_remove reset sort change:isAdmin change:isSuperAdmin remove add",x),null!=n&&""!==n&&(D=m.SearchName({terms:[n]}));const B=e.labels||G.labels;(null==B?void 0:B.length)&&null!=p&&(0,o.default)(B,p);const F=!0===c&&(null==B?void 0:B.length)?O.default.createElement(E.Labels,{labels:B,showName:!1}):null,Y=P&&U.groupType===y.GroupType.LINKED_ANNOUNCEMENT_GROUP?I.fbt._("Announcements",null,{hk:"GNIKa"}):(0,s.default)((null==U?void 0:U.isUnnamed)&&(0,l.getABPropConfigValue)("ugr_enabled")?(0,M.calculateUnnamedGroupFullParticipantsList)(U,!0):G.title()),W=O.default.createElement(g.EmojiText,{text:Y,element:t,className:f,xstyle:_,formatters:D,titlify:r,ellipsify:i,breakWord:a,direction:"auto",inlineblock:!0,onClick:u,testid:C});if(U.support){const e=N?24:20;return O.default.createElement("div",{className:(0,d.classnamesConvertMeToStylexPlease)({[v.default.verified]:!0,[v.default.hasLabels]:!!F})},W,O.default.createElement("div",{className:v.default.icon},(0,S.isBlueEnabled)()?O.default.createElement(b.PsaVerifiedBlueIcon,{width:e,height:e}):O.default.createElement(A.PsaVerifiedIcon,null)),O.default.createElement("div",{className:v.default.labels},F))}const V=h?K(T):null;return V||F?O.default.createElement("span",{className:v.default.hasLabels},O.default.createElement("span",{className:(0,R.default)(j.disableGrow)},W),O.default.createElement("div",{className:v.default.labels},V,F)):W}function V(e){if(e.chat&&!e.chat.isUser&&!e.chat.isNewsletter){const{chat:t}=e,n=(0,a.default)(e,G);return O.default.createElement(W,(0,i.default)({chat:t,groupMetadata:t.groupMetadata},n))}if(e.chat&&!e.chat.isUser&&e.chat.isNewsletter){const{chat:t}=e,n=(0,a.default)(e,U);return O.default.createElement(T.NewsletterName,(0,i.default)({chat:t},n))}let t,n;if(e.chat){const{chat:r}=e,i=(0,a.default)(e,x);t=r.contact,n=i}else{const{contact:r}=e;t=r,n=(0,a.default)(e,B)}return O.default.createElement(Y,(0,i.default)({contact:t},n))}function H(e){const{chat:t,contact:n,xstyle:r}=e;return O.default.createElement("span",{className:(0,R.default)(r)},O.default.createElement(V,{contact:n,useShortName:Boolean(n.shortName),showNotifyName:!0,elevatedPushNamesEnabled:!0}),O.default.createElement("span",null," • "),O.default.createElement(W,{chat:t,groupMetadata:t.groupMetadata}))}Y.displayName="ContactName",W.displayName="GroupName",H.displayName="ContactAndGroupName"},783301:(e,t,n)=>{"use strict";var r=n(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var i=n(396574),a=n(306703),o=n(220584),s=n(676345),l=r(n(625903)),u=n(376331),c=n(922760),d=n(548360),p=function(e,t){if(!t&&e&&e.__esModule)return e;if(nulLine truncated
</script><script data-binary-transparency-hash-key="inline-js-9c8cd3d0f4d5af8c7f5cd1c45208edd308bfe472e353a50e4cbacbf6cb58627c">(i => {const l = document.getElementById(i); l &&fetch(l.href).then(b => b.text()).then(code => {const script = document.createElement('script');script.id = 'binary-transparency-manifest';script.type = 'application/json';script.innerHTML = code;document.body.append(script);});})('binary-transparency-manifest-preload');</script></body></html>
+535
View File
@@ -0,0 +1,535 @@
<!doctype html>
<html class="no-js" dir="ltr" loc="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>WhatsApp Web</title>
<meta name="viewport" content="width=device-width" />
<meta name="google" content="notranslate" />
<meta name="format-detection" content="telephone=no" />
<meta
name="description"
content="Quickly send and receive WhatsApp messages right from your computer."
/>
<meta
name="og:description"
content="Quickly send and receive WhatsApp messages right from your computer."
/>
<meta name="og:url" content="https://web.whatsapp.com/" />
<meta name="og:title" content="WhatsApp Web" />
<meta
name="og:image"
content="https://static.facebook.com/images/whatsapp/www/whatsapp-promo.png"
/>
<link
id="favicon"
rel="shortcut icon"
href="/img/favicon/1x/favicon.png"
type="image/png"
/>
<link
rel="apple-touch-icon"
sizes="192x192"
href="/apple-touch-icon.png"
type="image/png"
/>
<meta
name="theme-color"
content="#111b21"
media="(prefers-color-scheme: dark)"
/>
<meta name="theme-color" content="#f0f2f5" />
<link
id="whatsapp-pwa-manifest-link"
rel="manifest"
href="/manifest.json"
crossorigin="use-credentials"
/>
<style>
#initial_startup {
--startup-background: #f0f2f5;
--startup-background-rgb: 240, 242, 245;
--startup-icon: #bbc5cb;
--secondary-lighter: #8696a0;
--primary-title: #41525d;
--progress-primary: #00c298;
--progress-background: #e9edef;
}
.dark #initial_startup {
--startup-background: #111b21;
--startup-background-rgb: 17, 27, 33;
--startup-icon: #676f73;
--primary-title: rgba(233, 237, 239, 0.88);
--secondary-lighter: #667781;
--progress-primary: #0b846d;
--progress-background: #233138;
}
#app,
body,
html {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
overflow: hidden;
}
#app {
position: absolute;
top: 0;
left: 0;
}
#initial_startup {
position: fixed;
top: 0;
left: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
user-select: none;
background-color: var(--startup-background);
}
#initial_startup .graphic {
margin-top: -40px;
color: var(--startup-icon);
}
#initial_startup .graphic .resume-logo {
transform: translateX(calc(50% - 52px / 2));
}
#initial_startup .graphic::after {
position: relative;
top: -100%;
left: calc(50% - 72px * 2 - 72px / 2);
display: block;
width: calc(72px * 3);
height: 100%;
content: '';
background: linear-gradient(
to right,
rgba(var(--startup-background-rgb), 0.5) 0,
rgba(var(--startup-background-rgb), 0.5) 33.33%,
rgba(var(--startup-background-rgb), 0) 44.1%,
rgba(var(--startup-background-rgb), 0) 55.8%,
rgba(var(--startup-background-rgb), 0.5) 66.66%,
rgba(var(--startup-background-rgb), 0.5) 100%
);
opacity: 1;
animation: shimmer 1.5s linear 0.6s infinite;
}
html[dir='rtl'] #initial_startup .graphic::after {
animation-direction: reverse;
}
@keyframes shimmer {
from {
left: calc(50% - 72px * 2 - 72px / 2);
}
to {
left: calc(50% - 72px / 2);
}
}
#initial_startup .progress {
position: relative;
width: 420px;
height: 3px;
margin-top: 40px;
}
#initial_startup .progress progress {
vertical-align: top;
}
#initial_startup .main {
margin-top: 40px;
font-size: 17px;
color: var(--primary-title);
}
#initial_startup .secondary {
margin-top: 12px;
font-size: 14px;
color: var(--secondary-lighter);
}
#initial_startup .secondary span {
display: inline-block;
margin-bottom: 2px;
vertical-align: middle;
}
progress {
-webkit-appearance: none;
appearance: none;
width: 100%;
height: 3px;
margin: 0;
color: var(--progress-primary);
background-color: var(--progress-background);
border: none;
}
progress[value]::-webkit-progress-bar {
background-color: var(--progress-background);
}
progress[value]::-moz-progress-bar,
progress[value]::-webkit-progress-value {
background-color: var(--progress-primary);
transition: width 0.45s ease;
}
</style>
<link
href="/stylex-f0601c57714fe972a8c4d2c2562f8082.css"
rel="stylesheet"
/>
<link href="/app-6113f1562d101247269b.css" rel="stylesheet" />
</head>
<body class="web">
<script
data-binary-transparency-hash-key="inline-js-d11c72a06542fc3b43af600028cf0f996e4b9b178dfa047e18730efaf74aab0b"
>
try {
var systemThemeDark,
theme = window.localStorage.getItem('theme'),
systemThemeMode = window.localStorage.getItem('system-theme-mode');
if (('true' === systemThemeMode || !theme) && window.matchMedia) {
var systemTheme = window.matchMedia('(prefers-color-scheme: dark)');
systemThemeDark = systemTheme && systemTheme.matches;
}
var darkTheme = '"dark"' === theme || Boolean(systemThemeDark);
darkTheme && document.body.classList.add('dark');
} catch (e) {}
</script>
<div id="app"></div>
<div id="hard_expire_time" data-time="1719543128.405"></div>
<div id="initial_startup">
<div class="graphic">
<span
><svg width="250" height="52" xmlns="http://www.w3.org/2000/svg">
<path
class="resume-logo"
d="M37.7 31.2c-.6-.4-3.8-2-4.4-2.1-.6-.2-1-.4-1.4.3l-2 2.5c-.4.4-.8.5-1.5.2-.6-.3-2.7-1-5.1-3.2-2-1.7-3.2-3.8-3.6-4.5-.4-.6 0-1 .3-1.3l1-1.1.6-1.1c.2-.4 0-.8 0-1.1l-2-4.8c-.6-1.3-1.1-1-1.5-1.1h-1.2c-.5 0-1.2.1-1.8.8-.5.6-2.2 2.2-2.2 5.3 0 3.2 2.3 6.3 2.6 6.7.3.4 4.6 7 11 9.7l3.7 1.4c1.5.5 3 .4 4 .2 1.3-.1 3.9-1.5 4.4-3 .5-1.5.5-2.8.4-3-.2-.4-.6-.5-1.3-.8M26 47.2c-3.9 0-7.6-1-11-3l-.7-.4-8.1 2L8.4 38l-.6-.8A21.4 21.4 0 0126 4.4a21.3 21.3 0 0121.4 21.4c0 11.8-9.6 21.4-21.4 21.4M44.2 7.6a25.8 25.8 0 00-40.6 31L0 52l13.7-3.6A25.8 25.8 0 0044.3 7.5"
fill="currentColor"
></path></svg
></span>
</div>
<div class="progress">
<progress value="0" max="100" dir="ltr"></progress>
</div>
<div class="main">WhatsApp</div>
<div class="secondary">
<span
><svg width="10" height="12" xmlns="http://www.w3.org/2000/svg">
<path
d="M5 1.6c1.4 0 2.5 1 2.6 2.4v1.5h.2c.5 0 1 .4 1 1V10c0 .6-.5 1-1 1H2.3a1 1 0 01-1.1-1V6.5c0-.6.5-1 1-1h.2V4.2c0-1.4 1-2.5 2.4-2.6H5zm0 1.2c-.7 0-1.3.6-1.3 1.3v1.4h2.6V4.2c0-.7-.4-1.2-1-1.3H5z"
fill="currentColor"
></path>
</svg> </span
>&nbsp;End-to-end encrypted
</div>
</div>
<link
rel="preload"
crossorigin="anonymous"
as="fetch"
href="/binary-transparency-manifest-2.2412.54.json"
id="binary-transparency-manifest-preload"
/>
<script src="/libsignal-protocol-ee5b8ba.min.js"></script>
<script defer="defer" src="/runtime.295f0230b6dbd8983513.js"></script>
<script
data-binary-transparency-hash-key="inline-js-cdf06293c99d00ee0c1bc0fcfdbd76a7ae9aef6290926dbff0cba3a7994b7fca"
>
/*! Copyright (c) 2024 WhatsApp Inc. All Rights Reserved. */
(self.webpackChunkwhatsapp_web_client =
self.webpackChunkwhatsapp_web_client || []).push([
[5617],
{
307914: (e) => {
e.exports = function (e) {
return e && e.__esModule ? e : { default: e };
};
},
595318: (e) => {
(e.exports = function (e) {
return e && e.__esModule ? e : { default: e };
}),
(e.exports.default = e.exports),
(e.exports.__esModule = !0);
},
415227: (e, t) => {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.default = function (e) {
const t = new Error(e);
if (void 0 === t.stack)
try {
throw t;
} catch (e) {}
return t;
});
},
670983: (e, t, r) => {
'use strict';
var n = r(307914);
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.default = function (e) {
let t =
arguments.length > 1 && void 0 !== arguments[1]
? arguments[1]
: '?';
if (null == e)
throw (0, o.default)('Unexpected null or undefined: ' + t);
return e;
});
var o = n(r(415227));
},
250473: (e, t, r) => {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.UNIQUE_UPLOADS_ALLOWED_BEFORE_THROTTLE =
t.TICKET_URL =
t.CLB_URL =
t.CLB_TOKEN =
t.CLB_CHECK_URL =
void 0);
var n = r(508247);
(t.CLB_CHECK_URL =
'https://crashlogs.whatsapp.net/wa_fls_upload_check'),
(t.CLB_TOKEN =
'1063127757113399|745146ffa34413f9dbb5469f5370b7af'),
(t.CLB_URL = 'https://crashlogs.whatsapp.net/wa_clb_data');
const o = n.DYN_ORIGIN + 'web-contact-us';
(t.TICKET_URL = o), (t.UNIQUE_UPLOADS_ALLOWED_BEFORE_THROTTLE = 0);
},
207024: (e, t, r) => {
'use strict';
var n = r(595318);
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.getDistribution = function () {
let e = 'unknown';
return (e = 'prod'), 'web_prod';
}),
(t.getLogUserAgent = function (e) {
let t,
{ appVersion: r, browser: n, device: o } = e;
return (t = 'Web/' + n), `WhatsApp/${r} ${t} Device/${o}`;
}),
n(r(472514)),
n(r(556869));
},
794858: (e, t, r) => {
'use strict';
var n = r(595318),
o = n(r(670983)),
a = r(508247),
s = r(250473),
c = r(207024),
_ = n(r(174285)),
u = r(425017);
function i(e) {
!(function (e, t) {
const r = window.navigator.userAgent;
if (r === p && e.includes('getElementsByTagName')) return;
const n = new FormData(),
i = new Blob([e], { type: 'text/plain' });
n.append(
'from_jid',
(function () {
if (f) return f;
try {
(f = JSON.parse(
(0, o.default)(_.default, 'localStorage').getItem(
d.UNKNOWN_ID,
),
)),
f && (f = f.replace('-', ''));
} catch (e) {}
if (!f) {
f = 'unknown' + Math.floor(1e10 * Math.random());
const e = f;
try {
(0, o.default)(_.default, 'localStorage').setItem(
d.UNKNOWN_ID,
JSON.stringify(e),
);
} catch (e) {}
}
return (0, o.default)(f, 'id');
})(),
),
n.append(
'agent',
(0, c.getLogUserAgent)(
(0, u.parseUASimple)(r, a.VERSION_BASE),
),
),
n.append('file', i, 'logs.txt'),
n.append('tags', 'load');
const l = new XMLHttpRequest(),
I =
s.CLB_URL +
'?access_token=' +
encodeURIComponent(s.CLB_TOKEN);
l.open('POST', I, !0), l.send(n);
})(e);
}
function l(e) {
let { error: t, reason: r, stack: n } = e;
const o = new Date().toISOString();
return `${o}: error: ${t}\n${o}: reason for logs: ${r}\n${o}: userAgent: ${window.navigator.userAgent}\n${n}`;
}
null == window.onerror &&
(window.onerror = function (e, t, r) {
const n = t.split('?')[0];
return "Uncaught SyntaxError: Unexpected token '<'" === e
? ((function (e) {
i(
l({
error: 'failed to load a js or css bundle',
reason: `failed to load [${e
.split('/')[3]
.replace(/^\//, '')}]`,
stack: '',
}),
);
})(n),
!0)
: (i(
l({
error: e,
reason: `Error at [${n}:${r}]`,
stack: '',
}),
),
!1);
});
const d = { UNKNOWN_ID: a.UNKNOWN_ID },
p =
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36';
let f;
},
425017: (e, t) => {
'use strict';
function r(e) {
return e.includes('windows')
? 'Windows'
: e.includes('mac')
? 'Mac OS'
: e.includes('linux')
? 'Linux'
: 'Unparsed';
}
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.parseUASimple = function (e, t) {
const n = e.toLowerCase();
return { browser: s(n), device: r(n), appVersion: t };
});
const n = /(chrome|firefox)\/([\w\.]+)/i,
o = /(edge|opr)\/([\w\.]+)/i,
a = {
chrome: 'Chrome',
edge: 'Edge',
opr: 'Opera',
firefox: 'Firefox',
};
function s(e) {
const t = e.match(o) || e.match(n);
return null == t ? 'Unparsed' : `${a[t[1]]} ${t[2]}`;
}
},
174285: (e, t) => {
'use strict';
let r;
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.default = void 0);
try {
r = window.localStorage;
} catch (e) {}
var n = r;
t.default = n;
},
508247: (e, t) => {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.WS_ORIGIN =
t.WEB_PUBLIC_PATH =
t.VERSION_TERTIARY =
t.VERSION_STR =
t.VERSION_SECONDARY =
t.VERSION_PRIMARY =
t.VERSION_BASE =
t.USER_TIMINGS =
t.UNKNOWN_ID =
t.LOCALHOST_ENV_CONFIG =
t.HASH_PLACEHOLDER =
t.FLB_PLATFORM =
t.FB_APP_ID =
t.DYN_ORIGIN =
t.DIFF_VERSION =
t.DIFF_ID =
t.BUILD_URL =
t.BUILD_TIMESTAMP =
t.BUILD_ID =
void 0);
t.DIFF_ID = '';
(t.DIFF_VERSION = ''),
(t.LOCALHOST_ENV_CONFIG = !1),
(t.HASH_PLACEHOLDER = '507042ed75b89fb00e8ef35da3541122cbc261e6'),
(t.VERSION_PRIMARY = '2'),
(t.VERSION_SECONDARY = '2412'),
(t.VERSION_TERTIARY = '54'),
(t.VERSION_BASE = '2.2412.54'),
(t.VERSION_STR = '2.2412.54'),
(t.DYN_ORIGIN = 'https://web.whatsapp.com/'),
(t.WS_ORIGIN = ''),
(t.FLB_PLATFORM = 'web'),
(t.FB_APP_ID = ''),
(t.UNKNOWN_ID = 'WAUnknownID'),
(t.BUILD_ID = '583059957'),
(t.BUILD_TIMESTAMP = 'March 29, 2024'),
(t.WEB_PUBLIC_PATH = '/'),
(t.BUILD_URL = 'https://web.whatsapp.com/'),
(t.USER_TIMINGS = !1);
},
472514: (e, t) => {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.default = function (e) {
return e.default;
});
},
556869: (e, t) => {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.default = function e(t) {
const r = new Error(t);
if (void 0 === r.stack)
try {
throw e;
} catch (e) {}
return r;
});
},
},
(e) => {
'use strict';
e((e.s = 794858));
},
]);
</script>
<script defer="defer" src="/vendor1~app.264a01b6133c4a120327.js"></script>
<script defer="defer" src="/app.2c7f8dd150ae88037cde.js"></script>
<script
data-binary-transparency-hash-key="inline-js-9c8cd3d0f4d5af8c7f5cd1c45208edd308bfe472e353a50e4cbacbf6cb58627c"
>
((i) => {
const l = document.getElementById(i);
l &&
fetch(l.href)
.then((b) => b.text())
.then((code) => {
const script = document.createElement('script');
script.id = 'binary-transparency-manifest';
script.type = 'application/json';
script.innerHTML = code;
document.body.append(script);
});
})('binary-transparency-manifest-preload');
</script>
</body>
</html>
+6 -4
View File
@@ -74,17 +74,19 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
}
protected getClientOptions(): ClientOptions {
// Folder with current file
const path = __dirname;
return {
puppeteer: {
headless: true,
executablePath: this.getBrowserExecutablePath(),
args: this.getBrowserArgsForPuppeteer(),
},
webVersion: '2.2411.2',
webVersion: '2.2412.54',
webVersionCache: {
type: 'remote',
remotePath:
'https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/{version}.html',
type: 'local',
path: path,
strict: true,
},
};
}
+24
View File
@@ -105,6 +105,11 @@ export class SessionManagerCore extends SessionManager {
//
async start(request: SessionStartRequest): Promise<SessionDTO> {
this.onlyDefault(request.name);
if (this.session) {
throw new UnprocessableEntityException(
`Session '${this.DEFAULT}' is already started.`,
);
}
const name = request.name;
this.log.log(`'${name}' - starting session...`);
@@ -186,6 +191,18 @@ export class SessionManagerCore extends SessionManager {
}
async logout(request: SessionLogoutRequest) {
const name = request.name;
this.onlyDefault(request.name);
this.stop({ name: name, logout: false })
.then(() => {
this.log.log(`Session '${name}' has been stopped.`);
})
.catch((err) => {
this.log.error(
`Error while stopping session '${name}' while logging out`,
err,
);
});
await this.sessionAuthRepository.clean(request.name);
}
@@ -229,4 +246,11 @@ export class SessionManagerCore extends SessionManager {
},
];
}
async getSessionInfo(name: string): Promise<SessionInfo | null> {
if (name !== this.DEFAULT) {
return null;
}
return this.getSessions(true).then((sessions) => sessions[0]);
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

+289
View File
@@ -0,0 +1,289 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dashboard | WAHA</title>
<link rel="icon" href="./favicon.ico" />
<style>
:root {
--surface-card: #1f2937;
--surface-border: #374151;
--card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
body,
html {
height: 100%;
padding: 0;
margin: 0;
}
* {
box-sizing: border-box;
}
.bg-image {
/* The image used */
background-image: url('./waha-dashboard.png');
/* Add the blur effect */
filter: blur(2px);
-webkit-filter: blur(2px);
/* Full height */
height: 100%;
/* Center and scale the image nicely */
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
body {
background-color: #111827;
color: rgba(255, 255, 255, 0.87);
}
svg {
width: 100px;
height: 100px;
}
.message {
font-size: 20px;
margin: 20px;
}
a {
color: rgb(158, 158, 255);
text-decoration-color: rgb(158, 158, 255);
}
.upgrade-link {
text-decoration: none;
font-size: 1.5rem;
}
.link-button {
background-color: #4ade80;
padding: 10px 20px;
border-radius: 5px;
color: #052e16;
text-decoration: none;
margin-top: 50px;
}
.card {
min-width: 25rem;
background: var(--surface-card);
border: 1px solid var(--surface-border);
box-shadow: var(--card-shadow);
padding: 2rem;
border-radius: 12px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 2;
text-align: center;
}
</style>
</head>
<body>
<div class="bg-image"></div>
<div class="card">
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1"
width="1080"
height="1080"
viewBox="0 0 1080 1080"
xml:space="preserve"
>
<desc>Created with Fabric.js 5.2.4</desc>
<defs></defs>
<g
transform="matrix(1 0 0 1 540 540)"
id="c3cb5d1b-8350-492a-8567-8c1ee2307b9a"
></g>
<g
transform="matrix(1 0 0 1 540 540)"
id="054ae9ae-db12-4435-8648-8bfb02267690"
>
<rect
style="
stroke: none;
stroke-width: 1;
stroke-dasharray: none;
stroke-linecap: butt;
stroke-dashoffset: 0;
stroke-linejoin: miter;
stroke-miterlimit: 4;
fill: rgb(255, 255, 255);
fill-rule: nonzero;
opacity: 1;
visibility: hidden;
"
vector-effect="non-scaling-stroke"
x="-540"
y="-540"
rx="0"
ry="0"
width="1080"
height="1080"
/>
</g>
<g transform="matrix(1 0 0 1 540 540)">
<rect
style="
stroke: none;
stroke-width: 1;
stroke-dasharray: none;
stroke-linecap: butt;
stroke-dashoffset: 0;
stroke-linejoin: miter;
stroke-miterlimit: 4;
fill: rgb(255, 255, 255);
fill-rule: nonzero;
opacity: 1;
visibility: hidden;
"
vector-effect="non-scaling-stroke"
x="-540"
y="-540"
rx="0"
ry="0"
width="1080"
height="1080"
/>
</g>
<g transform="matrix(2.02 0 0 2.02 540 540)">
<rect
style="
stroke: none;
stroke-width: 1;
stroke-dasharray: none;
stroke-linecap: butt;
stroke-dashoffset: 0;
stroke-linejoin: miter;
stroke-miterlimit: 4;
fill: rgb(255, 255, 255);
fill-rule: nonzero;
opacity: 1;
visibility: hidden;
"
vector-effect="non-scaling-stroke"
x="-540"
y="-540"
rx="0"
ry="0"
width="1080"
height="1080"
/>
</g>
<g transform="matrix(3.68 0 0 3.68 540.38 540.48)">
<path
style="
stroke: none;
stroke-width: 1;
stroke-dasharray: none;
stroke-linecap: butt;
stroke-dashoffset: 0;
stroke-linejoin: miter;
stroke-miterlimit: 4;
fill: rgb(74, 173, 32);
fill-rule: nonzero;
opacity: 1;
"
vector-effect="non-scaling-stroke"
transform=" translate(-392.21, -570.16)"
d="M 392.26 705.96 C 376.77 705.96 361.28999999999996 706.0400000000001 345.8 705.95 C 318.16 705.7900000000001 297.6 685.2700000000001 297.22 657.57 C 297.15000000000003 652.24 297.07000000000005 646.9100000000001 297.25 641.59 C 297.36 638.23 296.3 636.6 292.72 636.89 C 290.24 637.09 287.73 636.98 285.23 636.9 C 277.1 636.63 271.70000000000005 631.65 271.38 623.49 C 271.06 615.1800000000001 271.06 606.83 271.37 598.52 C 271.69 590.05 277.04 585.23 285.58 585.01 C 297.21 584.72 297.19 584.72 297.21999999999997 573.01 C 297.22999999999996 567.36 297.14 561.72 297.97999999999996 556.0699999999999 C 301.25999999999993 533.93 320.72999999999996 516.4599999999999 343.09 516.04 C 355.07 515.81 367.07 515.86 379.04999999999995 516.02 C 382.72999999999996 516.0699999999999 384.02 514.87 383.96 511.15 C 383.77 500.65999999999997 383.76 490.16999999999996 383.96999999999997 479.67999999999995 C 384.04999999999995 476.00999999999993 382.96 473.65999999999997 379.92999999999995 471.37999999999994 C 372.23999999999995 465.5799999999999 369.78 456.25999999999993 373.06999999999994 447.7199999999999 C 376.18999999999994 439.5999999999999 385.13999999999993 433.7399999999999 393.4599999999999 434.3599999999999 C 402.63999999999993 435.0399999999999 410.43999999999994 441.3499999999999 412.4599999999999 450.2199999999999 C 414.4799999999999 459.0299999999999 411.7099999999999 466.4299999999999 404.4699999999999 471.7899999999999 C 401.8699999999999 473.7199999999999 400.9199999999999 475.69999999999993 400.9699999999999 478.8299999999999 C 401.1199999999999 489.1499999999999 401.2499999999999 499.4799999999999 400.9299999999999 509.79999999999995 C 400.7899999999999 514.5 402.0299999999999 516.24 406.9999999999999 516.0799999999999 C 417.8099999999999 515.7299999999999 428.6399999999999 515.91 439.4699999999999 515.9899999999999 C 466.5199999999999 516.2099999999999 486.7199999999999 536.2299999999999 487.2399999999999 563.3 C 487.3399999999999 568.29 487.2599999999999 573.29 487.2799999999999 578.29 C 487.2999999999999 585 487.3099999999999 585 493.7899999999999 585.02 C 495.94999999999993 585.03 498.1199999999999 584.96 500.2799999999999 585.06 C 507.94999999999993 585.43 512.9999999999999 590.42 513.1499999999999 598.1199999999999 C 513.3199999999998 606.6099999999999 513.3099999999998 615.1099999999999 513.1599999999999 623.5999999999999 C 513.0299999999999 631.3599999999999 508.1999999999999 636.31 500.47999999999985 636.8699999999999 C 498.15999999999985 637.0399999999998 495.77999999999986 637.2199999999999 493.49999999999983 636.8899999999999 C 488.1999999999998 636.1299999999999 486.86999999999983 638.5399999999998 487.1999999999998 643.3999999999999 C 487.54999999999984 648.5399999999998 487.3499999999998 653.7199999999999 487.23999999999984 658.8799999999999 C 486.67999999999984 685.6599999999999 466.4599999999998 705.7399999999999 439.71999999999986 705.9599999999999 C 423.9 706.06 408.08 705.95 392.26 705.96 z"
stroke-linecap="round"
/>
</g>
<g transform="matrix(-3.68 0 0 -3.68 546.38 845.01)">
<path
style="
stroke: none;
stroke-width: 1;
stroke-dasharray: none;
stroke-linecap: butt;
stroke-dashoffset: 0;
stroke-linejoin: miter;
stroke-miterlimit: 4;
fill: rgb(56, 134, 22);
fill-rule: nonzero;
opacity: 1;
"
vector-effect="non-scaling-stroke"
transform=" translate(-394.07, -654.42)"
d="M 394.26 632.93 C 404.75 632.93 415.23 632.9 425.71999999999997 632.9399999999999 C 431.92999999999995 632.9599999999999 433.52 634.7399999999999 432.90999999999997 640.7099999999999 C 430.99999999999994 659.66 414.40999999999997 675.2199999999999 395.38 675.91 C 376.87 676.5799999999999 359.57 662.65 356 644.1899999999999 C 355.72 642.7199999999999 355.33 641.26 355.19 639.78 C 354.71 634.9 356.32 633.01 361.3 632.97 C 372.29 632.87 383.28 632.93 394.26 632.93 z"
stroke-linecap="round"
/>
</g>
<g transform="matrix(3.68 0 0 3.68 673.99 594.08)">
<path
style="
stroke: none;
stroke-width: 1;
stroke-dasharray: none;
stroke-linecap: butt;
stroke-dashoffset: 0;
stroke-linejoin: miter;
stroke-miterlimit: 4;
fill: rgb(56, 135, 22);
fill-rule: nonzero;
opacity: 1;
"
vector-effect="non-scaling-stroke"
transform=" translate(-428.75, -584.99)"
d="M 428.83 602 C 419.12 601.96 411.59999999999997 594.6 411.53 585.07 C 411.46999999999997 575.4100000000001 419.21 567.9100000000001 429.16999999999996 567.98 C 438.33 568.0500000000001 445.93999999999994 575.71 445.97999999999996 584.91 C 446.02 594.33 438.29 602.04 428.83 602 z"
stroke-linecap="round"
/>
</g>
<g transform="matrix(3.68 0 0 3.68 406.92 594.18)">
<path
style="
stroke: none;
stroke-width: 1;
stroke-dasharray: none;
stroke-linecap: butt;
stroke-dashoffset: 0;
stroke-linejoin: miter;
stroke-miterlimit: 4;
fill: rgb(56, 135, 22);
fill-rule: nonzero;
opacity: 1;
"
vector-effect="non-scaling-stroke"
transform=" translate(-356.06, -584.99)"
d="M 339.05 584.57 C 339.19 574.94 346.67 567.84 356.53000000000003 567.99 C 366.26000000000005 568.14 373.21000000000004 575.46 373.07000000000005 585.42 C 372.94000000000005 595.16 365.62000000000006 602.13 355.68000000000006 602 C 346.04 601.87 338.91 594.4 339.05 584.57 z"
stroke-linecap="round"
/>
</g>
</svg>
<div class="message">
Sorry,
<a
href="https://waha.devlike.pro/docs/how-to/waha-dashboard"
target="_blank"
>WAHA Dashboard</a
>
is not available in <strong>WAHA Core</strong> version.
<br />
Please consider upgrading to <strong>WAHA Plus</strong>.
</div>
<div style="margin-top: 2rem; margin-bottom: 1rem">
<a
class="upgrade-link link-button"
href="https://waha.devlike.pro/docs/how-to/plus-version/"
target="_blank"
>Upgrade to WAHA Plus</a
>
</div>
</div>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

+4
View File
@@ -1,6 +1,10 @@
import { LogLevel } from '@nestjs/common';
function parseBool(value: any): boolean {
if (typeof value === 'boolean') {
return value;
}
if (!value) {
return false;
}
+12 -8
View File
@@ -4,28 +4,31 @@ import { json, urlencoded } from 'express';
import { AllExceptionsFilter } from './api/exception.filter';
import { WhatsappConfigService } from './config.service';
import { AppModuleCore } from './core/app.module.core';
import { SwaggerModuleCore } from './core/swagger.module.core';
import { SwaggerConfiguratorCore } from './core/SwaggerConfiguratorCore';
import { getLogLevels } from './helpers';
import { WAHA_WEBHOOKS } from './structures/webhooks.dto';
import { getWAHAVersion, VERSION, WAHAVersion } from './version';
async function loadModules(): Promise<
[typeof AppModuleCore, typeof SwaggerModuleCore]
[typeof AppModuleCore, typeof SwaggerConfiguratorCore]
> {
const version = getWAHAVersion();
console.log(`WAHA (WhatsApp HTTP API) - Running ${version} version...`);
if (version === WAHAVersion.CORE) {
const { AppModuleCore } = await import('./core/app.module.core');
const { SwaggerModuleCore } = await import('./core/swagger.module.core');
return [AppModuleCore, SwaggerModuleCore];
const { SwaggerConfiguratorCore } = await import(
'./core/SwaggerConfiguratorCore'
);
return [AppModuleCore, SwaggerConfiguratorCore];
}
// Ignore if it's core version - there's no plus module
// @ts-ignore
const { AppModulePlus } = await import('./plus/app.module.plus');
// @ts-ignore
const { SwaggerModulePlus } = await import('./plus/swagger.module.plus');
return [AppModulePlus, SwaggerModulePlus];
const { SwaggerConfiguratorPlus } = await import('./plus/SwaggerConfiguratorPlus'); // prettier-ignore
// @ts-ignore
return [AppModulePlus, SwaggerConfiguratorPlus];
}
async function bootstrap() {
@@ -36,14 +39,15 @@ async function bootstrap() {
app.enableShutdownHooks();
app.useGlobalFilters(new AllExceptionsFilter());
app.enableCors();
// Allow to send big body - for images and attachments
app.use(json({ limit: '50mb' }));
app.use(urlencoded({ limit: '50mb', extended: false }));
// Configure swagger
const swagger = new SwaggerModule();
swagger.configure(app, WAHA_WEBHOOKS);
const swaggerConfigurator = new SwaggerModule(app);
swaggerConfigurator.configure(WAHA_WEBHOOKS);
const config = app.get(WhatsappConfigService);
await app.listen(config.port);
+2 -2
View File
@@ -171,8 +171,8 @@ export class MessageLocationRequest extends ChatRequest {
class FileRequest extends ChatRequest {
@ApiProperty({
oneOf: [
{ $ref: getSchemaPath(BinaryFile) },
{ $ref: getSchemaPath(RemoteFile) },
{ $ref: getSchemaPath(BinaryFile) },
],
})
file: BinaryFile | RemoteFile;
@@ -190,8 +190,8 @@ export class MessageFileRequest extends FileRequest {
export class MessageVoiceRequest extends ChatRequest {
@ApiProperty({
oneOf: [
{ $ref: getSchemaPath(VoiceBinaryFile) },
{ $ref: getSchemaPath(VoiceRemoteFile) },
{ $ref: getSchemaPath(VoiceBinaryFile) },
],
})
file: VoiceBinaryFile | VoiceRemoteFile;
+2 -6
View File
@@ -1,4 +1,5 @@
import { ApiProperty } from '@nestjs/swagger';
export class Base64File {
mimetype: string;
data: string;
@@ -70,14 +71,9 @@ export class VoiceRemoteFile {
})
mimetype = 'audio/ogg; codecs=opus';
@ApiProperty({
description: 'Document file name. Optional',
})
filename = 'voice-message.mp3';
@ApiProperty({
example:
'https://github.com/devlikeapro/whatsapp-http-api/raw/core/examples/dev.likeapro.mp3',
'https://github.com/devlikeapro/whatsapp-http-api/raw/core/examples/dev.likeapro.opus',
})
url: string;
}
+2 -2
View File
@@ -222,8 +222,8 @@ class WAHAWebhookPollVote extends WAHAWebhook {
class WAHAWebhookPollVoteFailed extends WAHAWebhook {
@ApiProperty({
description:
'There may be cases when WAHA fails to decrypt a vote from the user. ' +
'Read more about how to handle such events: https://waha.devlike.pro/docs/how-to/polls/#pollvotefailed',
'There may be cases when it fails to decrypt a vote from the user. ' +
'Read more about how to handle such events in the documentations.',
})
event = WAHAEvents.POLL_VOTE_FAILED;
+9
View File
@@ -0,0 +1,9 @@
export function noSlashAtTheEnd(value: string): string {
if (!value) {
return value;
}
if (value.startsWith('/')) {
return value.slice(1);
}
return value;
}
+1 -1
View File
@@ -33,7 +33,7 @@ export function getEngineName(): string {
}
export const VERSION: WAHAEnvironment = {
version: '2024.4.3',
version: '2024.5.8',
engine: getEngineName(),
tier: getWAHAVersion(),
browser: getBrowserExecutablePath(),
+13 -13
View File
@@ -13,8 +13,8 @@ __metadata:
linkType: hard
"@adiwajshing/baileys@github:WhiskeySockets/Baileys":
version: 6.6.0
resolution: "@adiwajshing/baileys@https://github.com/WhiskeySockets/Baileys.git#commit=f5a5eb991a6b14a6efdf48bcfed039966abaec8d"
version: 6.7.2
resolution: "@adiwajshing/baileys@https://github.com/WhiskeySockets/Baileys.git#commit=79c33e53b4124735f019c48e8075c9cde807b7e7"
dependencies:
"@adiwajshing/keyed-db": ^0.2.4
"@hapi/boom": ^9.1.3
@@ -44,7 +44,7 @@ __metadata:
optional: true
sharp:
optional: true
checksum: 4c824f02decad9b71cc8c1910407de1b62436f1fd9ef39999ece9db205b50c4a227a7366d589b244ac0ef8f7f3f8836632a03c1044998176dfdeef81519d69e7
checksum: dacfec2d2c4767370f2ee9a846e119cedf22d792ae920c5682e66aa67e788ec409d5ee364e6879c7c9e76d00acfb2c26c197d377893aaccc2100f3ae22940d72
languageName: node
linkType: hard
@@ -1300,10 +1300,10 @@ __metadata:
languageName: node
linkType: hard
"@pedroslopez/moduleraid@github:wwebjs/moduleRaid":
version: 6.0.2
resolution: "@pedroslopez/moduleraid@https://github.com/wwebjs/moduleRaid.git#commit=ecb616c04172dbeb294cef6b63715bfb4fd42d80"
checksum: 399d08f1bc7703f73f7ec5e80618139f6ed4a95cd05baa87a9c6c69d8cd0fbd299e1c757414fed2e160c9ec6dfb0f4b8e5fc08261b97bfb7f248dc16c28e9f83
"@pedroslopez/moduleraid@npm:^5.0.2":
version: 5.0.2
resolution: "@pedroslopez/moduleraid@npm:5.0.2"
checksum: b5668cb8d602e3fae0bcd75172f53b301814582ec288f4413127377a8be007aafc63846855431b6096a70dc9f113b059f6286bbc254f3bdbec435ba517dae36f
languageName: node
linkType: hard
@@ -13464,15 +13464,15 @@ __metadata:
tsconfig-paths: ^4.1.0
typescript: ^4.8.4
venom-bot: 5.0.1
whatsapp-web.js: "https://github.com/devlikeapro/whatsapp-web.js#main-form-update-nodejs"
whatsapp-web.js: "https://github.com/devlikeapro/whatsapp-web.js#main-fork-update"
languageName: unknown
linkType: soft
"whatsapp-web.js@https://github.com/devlikeapro/whatsapp-web.js#main-form-update-nodejs":
version: 1.23.1-alpha.5
resolution: "whatsapp-web.js@https://github.com/devlikeapro/whatsapp-web.js.git#commit=616a80a7da5f8ce522c8e6b8a9ee29a94b315d8e"
"whatsapp-web.js@https://github.com/devlikeapro/whatsapp-web.js#main-fork-update":
version: 1.23.1-alpha.6
resolution: "whatsapp-web.js@https://github.com/devlikeapro/whatsapp-web.js.git#commit=d6eff450edf3e8d292cf70eb4243fd32ace61182"
dependencies:
"@pedroslopez/moduleraid": "github:wwebjs/moduleRaid"
"@pedroslopez/moduleraid": ^5.0.2
adm-zip: ^0.5.10
archiver: ^5.3.1
fluent-ffmpeg: 2.1.2
@@ -13489,7 +13489,7 @@ __metadata:
optional: true
unzipper:
optional: true
checksum: b89226a826a13578a2e01ed27951e87444d0ce4725e17742380d4f373ae5505c34ffd86cb26097f70848643016270ab506af47d0cb41c64f175029d8eaa90afa
checksum: 3a34d43b37caddb4544f8ddad885ceb02edb2e2fccf8412574d57631a16e08e3f4b37e7c5c28debad958f7b08a7b33916db60133e47daa5ebbcd9921b9f7455d
languageName: node
linkType: hard