diff -Nru ring-20230206.0~ds1/debian/changelog ring-20230206.0~ds2/debian/changelog --- ring-20230206.0~ds1/debian/changelog 2023-02-15 06:56:22.000000000 +0000 +++ ring-20230206.0~ds2/debian/changelog 2023-03-01 05:05:32.000000000 +0000 @@ -1,3 +1,64 @@ +ring (20230206.0~ds2-1.1) unstable; urgency=medium + + * Upload to unstable. + + * Upload sponsored by Petter Reinholdtsen. + + -- Amin Bandali Wed, 01 Mar 2023 00:05:32 -0500 + +ring (20230206.0~ds2-1) experimental; urgency=medium + + * Always build without Qt WebEngine to ship with a uniform set of + features across supported architectures. The features currently + requiring Qt WebEngine (link previews, emoji picker, preview of + shared media for some formats, and location sharing) are *not* + core features without which Jami's use would be substantially + hindered, and most (if not all) of them could be implemented + natively and without using Qt WebEngine. + - debian/control: Drop Qt WebEngine from dependencies. + - debian/copyright: Excluded web-related files. + - debian/rules: Always build without Qt WebEngine. + - debian/source/lintian-overrides: Remove unneeded overrides. + * Use the right Debian Source (ds) number in orig tarball name. + - debian/rules: Get ds from the latest changelog entry and use it + instead of hardcoding '~ds1'. + * Add patch to change two CMake variables into proper options. + - debian/patches/1010-cmake-options.patch: Change + WITH_DAEMON_SUBMODULE and WITH_WEBENGINE into proper options. + Also, pass src/libclient/webresource.qrc to qt_add_executable + only if WITH_WEBENGINE. + * Use dh_auto_* tools for the client. The stopgap sed workaround + for building without Qt WebEngine is no longer necessary. The + issue was calling out to dh_auto_configure but without the right + flags, which would then overwrite/interfere with the flags + specified in the earlier manual call to cmake. + * debian/jami.lintian-overrides: Drop vestigial file. This was + previously added likely because the jami package used to ship a + libringclient.a static library for use by the client, but after an + upstream refactoring merging the Jami libclient sources into + jami-client-qt.git, that is no longer needed. + + * Upload sponsored by Petter Reinholdtsen. + + -- Amin Bandali Sun, 26 Feb 2023 01:08:53 -0500 + +ring (20230206.0~ds1-6) experimental; urgency=medium + + * debian/control: Add libqt6sql6-sqlite to jami's Depends, needed + for importing existing Jami accounts with non-swarm conversations, + as well as SIP accounts (Closes: #1031692). + Also, taking over the maintenance of the package; many thanks, + Alexandre! + * Address several lintian errors and warnings: + - debian/copyright: Drop vestigial entries for nonexistent files. + - debian/rules: Remove usr/lib/pkgconfig/jami.pc, since we + currently don't ship the Jami daemon as a library. + - debian/source/lintian-overrides: Update. + + * Upload sponsored by Petter Reinholdtsen. + + -- Amin Bandali Tue, 21 Feb 2023 01:08:33 -0500 + ring (20230206.0~ds1-5) unstable; urgency=medium * debian/control: Add missing runtime dependencies of jami to its diff -Nru ring-20230206.0~ds1/debian/control ring-20230206.0~ds2/debian/control --- ring-20230206.0~ds1/debian/control 2023-02-15 06:56:22.000000000 +0000 +++ ring-20230206.0~ds2/debian/control 2023-02-26 15:37:15.000000000 +0000 @@ -2,7 +2,7 @@ Section: comm Priority: optional Maintainer: Debian VoIP Team -Uploaders: Alexandre Viau , Amin Bandali +Uploaders: Amin Bandali Build-Depends: debhelper-compat (= 12), autoconf, automake, @@ -28,8 +28,6 @@ qml6-module-qtquick-shapes, qml6-module-qtquick-templates, qml6-module-qtquick-window, - qml6-module-qtwebengine [amd64 arm64 armhf i386], - qml6-module-qtwebchannel [amd64 arm64 armhf i386], qt6-5compat-dev, qt6-base-dev, qt6-declarative-dev, @@ -38,8 +36,6 @@ qt6-positioning-dev, qt6-tools-dev, qt6-tools-dev-tools, - qt6-webengine-dev [amd64 arm64 armhf i386], - qt6-webengine-dev-tools [amd64 arm64 armhf i386], # daemon libdbus-1-dev, libdbus-c++-dev, @@ -95,6 +91,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, jami-daemon (=${binary:Version}), + libqt6sql6-sqlite, qml6-module-qt-labs-platform, qml6-module-qt-labs-qmlmodels, qml6-module-qt5compat-graphicaleffects, @@ -107,9 +104,7 @@ qml6-module-qtquick-layouts, qml6-module-qtquick-shapes, qml6-module-qtquick-templates, - qml6-module-qtquick-window, - qml6-module-qtwebengine [amd64 arm64 armhf i386], - qml6-module-qtwebchannel [amd64 arm64 armhf i386] + qml6-module-qtquick-window Provides: jami-qt Description: Secure and distributed voice, video, and chat platform - desktop client Jami is an end-to-end encrypted secure and distributed voice, video, diff -Nru ring-20230206.0~ds1/debian/copyright ring-20230206.0~ds2/debian/copyright --- ring-20230206.0~ds1/debian/copyright 2023-02-07 06:48:09.000000000 +0000 +++ ring-20230206.0~ds2/debian/copyright 2023-02-26 15:37:15.000000000 +0000 @@ -30,6 +30,17 @@ daemon/contrib/tarballs/x264* daemon/contrib/tarballs/yaml-cpp* daemon/contrib/tarballs/zlib* + src/app/webengine/* + src/app/previewengine.cpp + src/libclient/web-chatview/* + src/libclient/webresources.qrc +Comment: Reasons for above exclusions: + The daemon/contrib/tarballs exclusions are for dependencies bundled + in release tarballs by upstream that are already packaged in Debian, + with the exception of pjproject which we keep (more details below). + The web-related exclusions are for omitting web-related files, some + of which minified JavaScript, since we build without Qt WebEngine, + and thus do not need those files. Files: * @@ -76,13 +87,6 @@ # Jami daemon -Files: daemon/doc/dbus-api/tools/devhelp.xsl - daemon/doc/dbus-api/tools/doc-generator.py - daemon/doc/dbus-api/tools/doc-generator.xsl - daemon/doc/dbus-api/tools/specparser.py -Copyright: 2009 Collabora Ltd. -License: LGPL-2.1+ - Files: daemon/compat/msvc/dlfcn.h daemon/compat/msvc/dlfcn.c Copyright: 2007 Ramiro Polla @@ -113,7 +117,6 @@ License: GPL-2+ Files: daemon/m4/ax_cxx_compile_stdcxx.m4 - daemon/m4/dolt.m4 Copyright: 2008 Benjamin Kosnik 2012 Zack Weinberg 2013 Roy Stogner diff -Nru ring-20230206.0~ds1/debian/jami.lintian-overrides ring-20230206.0~ds2/debian/jami.lintian-overrides --- ring-20230206.0~ds1/debian/jami.lintian-overrides 2023-02-07 06:48:09.000000000 +0000 +++ ring-20230206.0~ds2/debian/jami.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -# We are shipping a .so, but this isn't a library package -package-name-doesnt-match-sonames -no-symbols-control-file diff -Nru ring-20230206.0~ds1/debian/patches/1000-appstream-categories.patch ring-20230206.0~ds2/debian/patches/1000-appstream-categories.patch --- ring-20230206.0~ds1/debian/patches/1000-appstream-categories.patch 1970-01-01 00:00:00.000000000 +0000 +++ ring-20230206.0~ds2/debian/patches/1000-appstream-categories.patch 2023-02-26 15:37:15.000000000 +0000 @@ -0,0 +1,23 @@ +Description: Remove appstream metadata categories not recognized by validator + The Communication and Productivity categories are not listed in the + XDG Menu Specification. +Author: Petter Reinholdtsen +Forwarded: no + +diff --git a/daemon/net.jami.daemon.metainfo.xml.in b/daemon/net.jami.daemon.metainfo.xml.in +index f30a8ac6..99c70f7a 100644 +--- a/daemon/net.jami.daemon.metainfo.xml.in ++++ b/daemon/net.jami.daemon.metainfo.xml.in +@@ -67,12 +67,10 @@ + + + Chat +- Communication + FileTransfer + InstantMessaging + Network + P2P +- Productivity + + + diff -Nru ring-20230206.0~ds1/debian/patches/1010-cmake-options.patch ring-20230206.0~ds2/debian/patches/1010-cmake-options.patch --- ring-20230206.0~ds1/debian/patches/1010-cmake-options.patch 1970-01-01 00:00:00.000000000 +0000 +++ ring-20230206.0~ds2/debian/patches/1010-cmake-options.patch 2023-02-26 15:37:15.000000000 +0000 @@ -0,0 +1,80 @@ +From a6367d50826811caf7cf315f33e7d6cde9677911 Mon Sep 17 00:00:00 2001 +From: Amin Bandali +Date: Sat, 25 Feb 2023 14:42:02 -0500 +Subject: [PATCH] cmake: Change two variables into proper options. +Forwarded: no +Last-Update: 2023-02-25 + +Make WITH_DAEMON_SUBMODULE and WITH_WEBENGINE into proper options. +Also, pass src/libclient/webresource.qrc to qt_add_executable only +if WITH_WEBENGINE. +--- + CMakeLists.txt | 22 +++++++++------------- + 1 file changed, 9 insertions(+), 13 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d4e24da0..fc023d96 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -38,16 +38,16 @@ set(CMAKE_AUTORCC ON) + set(CMAKE_AUTOUIC ON) + set(CMAKE_INCLUDE_CURRENT_DIR ON) + ++option(WITH_DAEMON_SUBMODULE "Build with the daemon submodule" OFF) ++option(WITH_WEBENGINE "Build with Qt WebEngine" ON) ++ + # Main project directories: + + # jami-daemon +-if(NOT DEFINED WITH_DAEMON_SUBMODULE) +- set(WITH_DAEMON_SUBMODULE false) +- # daemon +- set(DAEMON_DIR ${PROJECT_SOURCE_DIR}/../daemon) +-else() +- # daemon ++if(WITH_DAEMON_SUBMODULE) + set(DAEMON_DIR ${PROJECT_SOURCE_DIR}/daemon) ++else() ++ set(DAEMON_DIR ${PROJECT_SOURCE_DIR}/../daemon) + endif() + # src + set(LIBCLIENT_SRC_DIR ${PROJECT_SOURCE_DIR}/src/libclient) +@@ -96,17 +96,12 @@ set(QT_MODULES + Widgets + Positioning) + +-if(NOT DEFINED WITH_WEBENGINE) +- set(WITH_WEBENGINE true) +-endif() +- + if(WITH_WEBENGINE) + list(APPEND QT_MODULES + WebEngineCore + WebEngineQuick + WebChannel +- WebEngineWidgets +- ) ++ WebEngineWidgets) + endif() + + set(CMAKE_CXX_FLAGS +@@ -286,6 +281,7 @@ set(COMMON_HEADERS + if(WITH_WEBENGINE) + list(APPEND COMMON_SOURCES + ${APP_SRC_DIR}/previewengine.cpp) ++ set(QML_WEBRESOURCES ${LIBCLIENT_SRC_DIR}/webresource.qrc) + add_definitions(-DWITH_WEBENGINE) + else() + list(APPEND COMMON_SOURCES +@@ -492,7 +488,7 @@ qt_add_executable( + ${COMMON_SOURCES} + ${QML_RESOURCES} + ${QML_RESOURCES_QML} +- ${LIBCLIENT_SRC_DIR}/webresource.qrc ++ ${QML_WEBRESOURCES} + ${SFPM_OBJECTS}) + + foreach(MODULE ${QT_MODULES}) +-- +2.39.2 + diff -Nru ring-20230206.0~ds1/debian/patches/series ring-20230206.0~ds2/debian/patches/series --- ring-20230206.0~ds1/debian/patches/series 2023-02-08 06:02:19.000000000 +0000 +++ ring-20230206.0~ds2/debian/patches/series 2023-02-26 15:37:15.000000000 +0000 @@ -1,3 +1,5 @@ +1000-appstream-categories.patch +1010-cmake-options.patch 2000-jsoncpp-rename.patch 2010-dont-build-gnutls.patch 2020-dont-build-msgpack.patch diff -Nru ring-20230206.0~ds1/debian/rules ring-20230206.0~ds2/debian/rules --- ring-20230206.0~ds1/debian/rules 2023-02-11 06:32:42.000000000 +0000 +++ ring-20230206.0~ds2/debian/rules 2023-02-26 15:37:15.000000000 +0000 @@ -19,13 +19,6 @@ NO_CPUS=1 endif -# Build with Qt WebEngine on supported arches -ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 armhf i386)) -webengine := true -else -webengine := false -endif - %: dh $@ --without autoreconf @@ -88,20 +81,9 @@ --disable-shared # Qt client configure -ifeq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 armhf i386)) -# Stopgap workaround to disable building with Qt WebEngine - sed -i 's/set(WITH_WEBENGINE true)/#&/' CMakeLists.txt -endif - mkdir build - cd build && \ - cmake \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_BUILD_TYPE=Release \ - -DWITH_DAEMON_SUBMODULE=true \ - -DWITH_WEBENGINE=$(webengine) \ - .. - - dh_auto_configure + dh_auto_configure -- \ + -DWITH_DAEMON_SUBMODULE=true \ + -DWITH_WEBENGINE=false override_dh_auto_build: # Daemon build @@ -109,7 +91,7 @@ pod2man daemon/man/jamid.pod > daemon/jamid.1 # Qt client build - make -C build -j$(NO_CPUS) V=1 + dh_auto_build override_dh_auto_clean: # Generated contrib tarballs @@ -122,9 +104,7 @@ rm -rfv daemon/jamid.1 # Qt client clean - [ -f build/Makefile ] && \ - make -C build clean || true - rm -rfv build + dh_auto_clean override_dh_auto_install: # Daemon install @@ -132,17 +112,13 @@ rm -rfv $(CURDIR)/debian/jami-daemon/usr/include rm -rfv $(CURDIR)/debian/jami-daemon/usr/lib/*.a rm -rfv $(CURDIR)/debian/jami-daemon/usr/lib/*.la + rm -rfv $(CURDIR)/debian/jami-daemon/usr/lib/pkgconfig + rm -rv $(CURDIR)/debian/jami-daemon/usr/lib # CMake files rm -rfv $(CURDIR)/debian/jami/usr/lib/cmake # Qt client install - cd build && \ - make DESTDIR=$(CURDIR)/debian/jami install - -tmp_dir := $(shell mktemp -d) -version := $(shell dpkg-parsechangelog -ldebian/changelog | perl -ne \ - 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\~ds.+)(?:\-\d+.*)};') -pj := $(tmp_dir)/jami-*/daemon/contrib/tarballs-unpacked/pjproject-*/pjproject-* + dh_auto_install --destdir=$(CURDIR)/debian/jami # Work around dak not liking files with timestamps too far in the past execute_before_dh_strip_nondeterminism: @@ -150,6 +126,13 @@ -exec touch --date="@$(SOURCE_DATE_EPOCH)" {} + +tmp_dir := $(shell mktemp -d) +version := $(shell dpkg-parsechangelog -ldebian/changelog | perl -ne \ + 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\~ds.+)(?:\-\d+.*)};') +ds := $(shell dpkg-parsechangelog -ldebian/changelog | perl -ne \ + 'print $$1 if m{^Version:\s+(?:\d+:)?(?:\d.*)(\~ds.+)(?:\-\d+.*)};') +pj := $(tmp_dir)/jami-*/daemon/contrib/tarballs-unpacked/pjproject-*/pjproject-* + # Repack the tarball with contrib tarballs unpacked get-orig-source: # Download jami tarball @@ -201,7 +184,7 @@ # Create the new tarball cd $(tmp_dir) && \ tar -czf \ - $(CURDIR)/../ring_$(version)~ds1.orig.tar.gz \ + $(CURDIR)/../ring_$(version)$(ds).orig.tar.gz \ jami-* # Remove the temporary directory diff -Nru ring-20230206.0~ds1/debian/source/lintian-overrides ring-20230206.0~ds2/debian/source/lintian-overrides --- ring-20230206.0~ds1/debian/source/lintian-overrides 2023-02-07 06:48:09.000000000 +0000 +++ ring-20230206.0~ds2/debian/source/lintian-overrides 2023-02-26 15:37:15.000000000 +0000 @@ -1,3 +1 @@ -# The full commented source is there. -source-is-missing lrc/src/web-chatview/linkify.js * -source-is-missing lrc/src/web-chatview/jed.js * +source-is-missing [3rdparty/SortFilterProxyModel/docs/*.html] diff -Nru ring-20230206.0~ds1/src/app/previewengine.cpp ring-20230206.0~ds2/src/app/previewengine.cpp --- ring-20230206.0~ds1/src/app/previewengine.cpp 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/app/previewengine.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,116 +0,0 @@ -/* - * Copyright (C) 2021-2023 Savoir-faire Linux Inc. - * Author: Trevor Tabah - * Author: Andreas Traczyk - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "previewengine.h" - -#include -#include -#include - -#include -#include - -struct PreviewEngine::Impl : public QWebEnginePage -{ -public: - PreviewEngine& parent_; - QWebChannel* channel_; - - Impl(PreviewEngine& parent) - : QWebEnginePage((QObject*) nullptr) - , parent_(parent) - { - QWebEngineProfile* profile = QWebEngineProfile::defaultProfile(); - - QDir dataDir(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation)); - dataDir.cdUp(); - auto cachePath = dataDir.absolutePath() + "/jami"; - profile->setCachePath(cachePath); - profile->setPersistentStoragePath(cachePath); - profile->setPersistentCookiesPolicy(QWebEngineProfile::NoPersistentCookies); - profile->setHttpCacheType(QWebEngineProfile::NoCache); - - settings()->setAttribute(QWebEngineSettings::JavascriptEnabled, true); - settings()->setAttribute(QWebEngineSettings::ScrollAnimatorEnabled, false); - settings()->setAttribute(QWebEngineSettings::ErrorPageEnabled, false); - settings()->setAttribute(QWebEngineSettings::PluginsEnabled, false); - settings()->setAttribute(QWebEngineSettings::ScreenCaptureEnabled, false); - settings()->setAttribute(QWebEngineSettings::LinksIncludedInFocusChain, false); - settings()->setAttribute(QWebEngineSettings::LocalStorageEnabled, false); - settings()->setAttribute(QWebEngineSettings::AllowRunningInsecureContent, true); - settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessRemoteUrls, true); - settings()->setAttribute(QWebEngineSettings::XSSAuditingEnabled, false); - settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessFileUrls, true); - - channel_ = new QWebChannel(this); - channel_->registerObject(QStringLiteral("jsbridge"), &parent_); - - setWebChannel(channel_); - runJavaScript(Utils::QByteArrayFromFile(":/linkify.js"), QWebEngineScript::MainWorld); - runJavaScript(Utils::QByteArrayFromFile(":/linkify-string.js"), QWebEngineScript::MainWorld); - runJavaScript(Utils::QByteArrayFromFile(":/qwebchannel.js"), QWebEngineScript::MainWorld); - runJavaScript(Utils::QByteArrayFromFile(":/previewInfo.js"), QWebEngineScript::MainWorld); - runJavaScript(Utils::QByteArrayFromFile(":/misc/previewInterop.js"), - QWebEngineScript::MainWorld); - } - - void parseMessage(const QString& messageId, const QString& msg, bool showPreview, QColor color) - { - QString colorStr = "'" + color.name() + "'"; - runJavaScript(QString("parseMessage(`%1`, `%2`, %3, %4)") - .arg(messageId, msg, showPreview ? "true" : "false", colorStr)); - } -}; - -PreviewEngine::PreviewEngine(QObject* parent) - : QObject(parent) - , pimpl_(std::make_unique(*this)) -{} - -PreviewEngine::~PreviewEngine() {} - -void -PreviewEngine::parseMessage(const QString& messageId, - const QString& msg, - bool showPreview, - QColor color) -{ - pimpl_->parseMessage(messageId, msg, showPreview, color); -} - -void -PreviewEngine::log(const QString& str) -{ - qDebug() << str; -} - -void -PreviewEngine::emitInfoReady(const QString& messageId, const QVariantMap& info) -{ - Q_EMIT infoReady(messageId, info); -} - -void -PreviewEngine::emitLinkified(const QString& messageId, const QString& linkifiedStr) -{ - Q_EMIT linkified(messageId, linkifiedStr); -} - -#include "moc_previewengine.cpp" -#include "previewengine.moc" diff -Nru ring-20230206.0~ds1/src/app/webengine/emojipicker/emoji.js ring-20230206.0~ds2/src/app/webengine/emojipicker/emoji.js --- ring-20230206.0~ds1/src/app/webengine/emojipicker/emoji.js 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/app/webengine/emojipicker/emoji.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -/** - * Skipped minification because the original files appears to be already minified. - * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files - */ -/*! ***************************************************************************** -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. -***************************************************************************** */ -function e(e, o, n, i) { return new (n || (n = Promise))((function (a, r) { function t(e) { try { m(i.next(e)) } catch (e) { r(e) } } function s(e) { try { m(i.throw(e)) } catch (e) { r(e) } } function m(e) { var o; e.done ? a(e.value) : (o = e.value, o instanceof n ? o : new n((function (e) { e(o) }))).then(t, s) } m((i = i.apply(e, o || [])).next()) })) } !function (e, o) { void 0 === o && (o = {}); var n = o.insertAt; if (e && "undefined" != typeof document) { var i = document.head || document.getElementsByTagName("head")[0], a = document.createElement("style"); a.type = "text/css", "top" === n && i.firstChild ? i.insertBefore(a, i.firstChild) : i.appendChild(a), a.styleSheet ? a.styleSheet.cssText = e : a.appendChild(document.createTextNode(e)) } }('@keyframes show {\n 0% {\n opacity: 0;\n transform: scale3d(0.8, 0.8, 0.8);\n }\n\n 50% {\n transform: scale3d(1.05, 1.05, 1.05);\n }\n\n 100% {\n transform: scale3d(1, 1, 1);\n }\n}\n\n@keyframes hide {\n 0% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n }\n\n 100% {\n opacity: 0;\n transform: scale3d(0.8, 0.8, 0.8);\n }\n}\n\n@keyframes grow {\n 0% {\n opacity: 0;\n transform: scale3d(0.8, 0.8, 0.8); \n }\n\n 100% { \n opacity: 1;\n transform: scale3d(1, 1, 1); \n }\n}\n\n@keyframes shrink {\n 0% { \n opacity: 1;\n transform: scale3d(1, 1, 1);\n }\n\n 100% { \n opacity: 0;\n transform: scale3d(0.8, 0.8, 0.8); \n }\n}\n\n@keyframes fade-in {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n}\n\n@keyframes fade-out {\n 0% { opacity: 1; }\n 100% { opacity: 0; }\n}\n\n.emoji-picker {\n --animation-duration: 0.2s;\n --animation-easing: ease-in-out;\n\n --emoji-size: 1.8em;\n --emoji-size-multiplier: 1.5;\n --emoji-preview-size: 2em;\n --emoji-per-row: 8;\n --row-count: 6;\n\n --content-height: calc((var(--emoji-size) * var(--emoji-size-multiplier)) * var(--row-count) + var(--category-name-size) + var(--category-button-height) + 0.5em);\n\n --category-name-size: 0.85em;\n\n --category-button-height: 2em;\n --category-button-size: 1.1em;\n --category-border-bottom-size: 4px;\n\n --focus-indicator-color: #999999;\n\n --search-height: 2em;\n\n --blue-color: #4F81E5;\n\n --border-color: #CCCCCC;\n --background-color: #FFFFFF;\n --text-color: #000000;\n --secondary-text-color: #666666;\n --hover-color: #E8F4F9;\n --search-focus-border-color: var(--blue-color);\n --search-icon-color: #CCCCCC;\n --overlay-background-color: rgba(0, 0, 0, 0.8);\n --popup-background-color: #FFFFFF;\n --category-button-color: #666666;\n --category-button-active-color: var(--blue-color);\n\n --dark-border-color: #666666;\n --dark-background-color: #333333;\n --dark-text-color: #FFFFFF;\n --dark-secondary-text-color: #999999;\n --dark-hover-color: #666666;\n --dark-search-background-color: #666666;\n --dark-search-border-color: #999999;\n --dark-search-placeholder-color: #999999;\n --dark-search-focus-border-color: #DBE5F9;\n --dark-popup-background-color: #333333;\n --dark-category-button-color: #FFFFFF;\n\n --font: Arial, Helvetica, sans-serif;\n --font-size: 16px;\n}\n\n.emoji-picker {\n font-size: var(--font-size);\n border: 1px solid var(--border-color);\n border-radius: 5px;\n background: var(--background-color);\n height: 99%;\n font-family: var(--font);\n overflow: hidden;\n animation: show var(--animation-duration) var(--animation-easing);\n}\n\n.emoji-picker * {\n font-family: var(--font);\n box-sizing: content-box;\n}\n\n.emoji-picker__overlay {\n background: rgba(0, 0, 0, 0.75);\n z-index: 1000;\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.emoji-picker.hiding {\n animation: hide var(--animation-duration) var(--animation-easing);\n}\n\n.emoji-picker.dark {\n background: var(--dark-background-color);\n color: var(--dark-text-color);\n border-color: var(--dark-border-color);\n}\n\n.emoji-picker__content {\n padding: 0.5em;\n height: var(--content-height);\n position: relative;\n}\n\n.emoji-picker__preview {\n height: var(--emoji-preview-size);\n padding: 0.5em;\n border-top: 1px solid var(--border-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.emoji-picker.dark .emoji-picker__preview {\n border-top-color: var(--dark-border-color);\n}\n\n.emoji-picker__preview-emoji {\n font-size: var(--emoji-preview-size);\n margin-right: 0.25em;\n font-family: "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "EmojiOne Color", "Android Emoji";\n}\n\n.emoji-picker__preview-emoji img.emoji {\n height: 1em;\n width: 1em;\n margin: 0 .05em 0 .1em;\n vertical-align: -0.1em;\n}\n\n.emoji-picker__preview-name {\n color: var(--text-color);\n font-size: 0.85em;\n overflow-wrap: break-word;\n word-break: break-all;\n}\n\n.emoji-picker.dark .emoji-picker__preview-name {\n color: var(--dark-text-color);\n}\n\n.emoji-picker__container {\n display: grid;\n justify-content: center;\n grid-template-columns: repeat(var(--emoji-per-row), calc(var(--emoji-size) * var(--emoji-size-multiplier)));\n grid-auto-rows: calc(var(--emoji-size) * var(--emoji-size-multiplier));\n}\n\n.emoji-picker__container.search-results {\n height: var(--content-height);\n overflow-y: auto;\n}\n\n.emoji-picker__custom-emoji {\n width: 1em;\n height: 1em;\n}\n\n.emoji-picker__emoji {\n background: transparent;\n border: none;\n cursor: pointer;\n overflow: hidden;\n font-size: var(--emoji-size);\n width: 1.5em;\n height: 1.5em;\n padding: 0;\n margin: 0;\n outline: none;\n font-family: "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "EmojiOne Color", "Android Emoji";\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n\n.emoji-picker__emoji img.emoji {\n height: 1em;\n width: 1em;\n margin: 0 .05em 0 .1em;\n vertical-align: -0.1em;\n}\n\n.emoji-picker__emoji:focus, .emoji-picker__emoji:hover {\n background: var(--hover-color);\n}\n\n.emoji-picker__emoji:focus {\n outline: 1px dotted var(--focus-indicator-color);\n}\n\n.emoji-picker.dark .emoji-picker__emoji:focus, .emoji-picker.dark .emoji-picker__emoji:hover {\n background: var(--dark-hover-color);\n}\n\n.emoji-picker__plugin-container {\n margin: 0.5em;\n display: flex;\n flex-direction: row;\n}\n\n.emoji-picker__search-container {\n margin: 0.5em;\n position: relative;\n height: var(--search-height);\n display: flex;\n}\n\n.emoji-picker__search {\n box-sizing: border-box;\n width: 100%;\n border-radius: 3px;\n border: 1px solid var(--border-color);\n padding-right: 2em;\n padding: 0.5em 2.25em 0.5em 0.5em;\n font-size: 0.85em;\n outline: none;\n}\n\n.emoji-picker.dark .emoji-picker__search {\n background: var(--dark-search-background-color);\n color: var(--dark-text-color);\n border-color: var(--dark-search-border-color);\n}\n\n.emoji-picker.dark .emoji-picker__search::placeholder {\n color: var(--dark-search-placeholder-color);\n}\n\n.emoji-picker__search:focus {\n border: 1px solid var(--search-focus-border-color);\n}\n\n.emoji-picker.dark .emoji-picker__search:focus {\n border-color: var(--dark-search-focus-border-color);\n}\n\n.emoji-picker__search-icon {\n position: absolute;\n color: var(--search-icon-color);\n width: 1em;\n height: 1em;\n right: 0.75em;\n top: calc(50% - 0.5em);\n}\n\n.emoji-picker__search-icon img {\n width: 1em;\n height: 1em;\n}\n\n.emoji-picker__search-not-found {\n color: var(--secondary-text-color);\n text-align: center;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n\n.emoji-picker__search-not-found h2 {\n color: var(--secondary-text-color);\n}\n\n.emoji-picker.dark .emoji-picker__search-not-found {\n color: var(--dark-secondary-text-color);\n}\n\n.emoji-picker.dark .emoji-picker__search-not-found h2 {\n color: var(--dark-secondary-text-color);\n}\n\n.emoji-picker__search-not-found-icon {\n font-size: 3em;\n}\n\n.emoji-picker__search-not-found-icon img {\n width: 1em;\n height: 1em;\n}\n\n.emoji-picker__search-not-found h2 {\n margin: 0.5em 0;\n font-size: 1em;\n}\n\n.emoji-picker__variant-overlay {\n background: var(--overlay-background-color);\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border-radius: 5px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n animation: fade-in var(--animation-duration) var(--animation-easing);\n}\n\n.emoji-picker__variant-overlay.hiding {\n animation: fade-out var(--animation-duration) var(--animation-easing);\n}\n\n.emoji-picker__variant-popup {\n background: var(--popup-background-color);\n margin: 0.5em;\n padding: 0.5em;\n text-align: center;\n border-radius: 5px;\n animation: grow var(--animation-duration) var(--animation-easing);\n user-select: none;\n}\n\n.emoji-picker__variant-overlay.hiding .emoji-picker__variant-popup {\n animation: shrink var(--animation-duration) var(--animation-easing);\n}\n\n.emoji-picker.dark .emoji-picker__variant-popup {\n background: var(--dark-popup-background-color);\n}\n\n.emoji-picker__emojis {\n overflow-y: auto;\n position: relative;\n height: calc((var(--emoji-size) * var(--emoji-size-multiplier)) * var(--row-count) + var(--category-name-size));\n}\n\n.emoji-picker__emojis.hiding {\n animation: fade-out 0.05s var(--animation-easing);\n}\n\n.emoji-picker__emojis h2.emoji-picker__category-name {\n font-size: 0.85em;\n color: var(--secondary-text-color);\n text-transform: uppercase;\n margin: 0.25em 0;\n text-align: left;\n}\n\n.emoji-picker.dark h2.emoji-picker__category-name {\n color: var(--dark-secondary-text-color);\n}\n\n.emoji-picker__category-buttons {\n display: flex;\n flex-direction: row;\n justify-content: space-around;\n height: var(--category-button-height);\n margin-bottom: 0.5em;\n}\n\nbutton.emoji-picker__category-button {\n flex-grow: 1;\n background: transparent;\n padding: 0;\n border: none;\n cursor: pointer;\n font-size: var(--category-button-size);\n vertical-align: middle;\n color: var(--category-button-color);\n border-bottom: var(--category-border-bottom-size) solid transparent;\n outline: none;\n}\n\nbutton.emoji-picker__category-button img {\n width: var(--category-button-size);\n height: var(--category-button-size);\n}\n\n.emoji-picker.keyboard button.emoji-picker__category-button:focus {\n outline: 1px dotted var(--focus-indicator-color);\n}\n\n.emoji-picker.dark button.emoji-picker__category-button.active {\n color: var(--category-button-active-color);\n}\n\n.emoji-picker.dark button.emoji-picker__category-button {\n color: var(--dark-category-button-color);\n}\n\nbutton.emoji-picker__category-button.active {\n color: var(--category-button-active-color);\n border-bottom: var(--category-border-bottom-size) solid var(--category-button-active-color);\n}\n\n@media (prefers-color-scheme: dark) {\n .emoji-picker.auto {\n background: var(--dark-background-color);\n color: var(--dark-text-color);\n border-color: var(--dark-border-color);\n }\n\n .emoji-picker.auto .emoji-picker__preview {\n border-top-color: var(--dark-border-color);\n }\n\n .emoji-picker.auto .emoji-picker__preview-name {\n color: var(--dark-text-color);\n }\n\n .emoji-picker.auto button.emoji-picker__category-button {\n color: var(--dark-category-button-color);\n }\n\n .emoji-picker.auto button.emoji-picker__category-button.active {\n color: var(--category-button-active-color);\n }\n\n .emoji-picker.auto .emoji-picker__emoji:focus, .emoji-picker.auto .emoji-picker__emoji:hover {\n background: var(--dark-hover-color);\n }\n\n .emoji-picker.auto .emoji-picker__search {\n background: var(--dark-search-background-color);\n color: var(--dark-text-color);\n border-color: var(--dark-search-border-color);\n }\n \n .emoji-picker.auto h2.emoji-picker__category-name {\n color: var(--dark-secondary-text-color);\n }\n\n .emoji-picker.auto .emoji-picker__search::placeholder {\n color: var(--dark-search-placeholder-color);\n }\n\n .emoji-picker.auto .emoji-picker__search:focus {\n border-color: var(--dark-search-focus-border-color);\n }\n\n .emoji-picker.auto .emoji-picker__search-not-found {\n color: var(--dark-secondary-text-color);\n }\n\n .emoji-picker.auto .emoji-picker__search-not-found h2 {\n color: var(--dark-secondary-text-color);\n }\n\n .emoji-picker.auto .emoji-picker__variant-popup {\n background: var(--dark-popup-background-color);\n }\n}'); var o = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'], n = o.join(","), i = "undefined" == typeof Element ? function () { } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; function a(e, o) { o = o || {}; var a, t, s, d = [], g = [], u = e.querySelectorAll(n); for (o.includeContainer && i.call(e, n) && (u = Array.prototype.slice.apply(u)).unshift(e), a = 0; a < u.length; a++)r(t = u[a]) && (0 === (s = m(t)) ? d.push(t) : g.push({ documentOrder: a, tabIndex: s, node: t })); return g.sort(c).map((function (e) { return e.node })).concat(d) } function r(e) { return !(!t(e) || function (e) { return function (e) { return d(e) && "radio" === e.type }(e) && !function (e) { if (!e.name) return !0; var o = function (e) { for (var o = 0; o < e.length; o++)if (e[o].checked) return e[o] }(e.ownerDocument.querySelectorAll('input[type="radio"][name="' + e.name + '"]')); return !o || o === e }(e) }(e) || m(e) < 0) } function t(e) { return !(e.disabled || function (e) { return d(e) && "hidden" === e.type }(e) || function (e) { return null === e.offsetParent || "hidden" === getComputedStyle(e).visibility }(e)) } a.isTabbable = function (e) { if (!e) throw new Error("No node provided"); return !1 !== i.call(e, n) && r(e) }, a.isFocusable = function (e) { if (!e) throw new Error("No node provided"); return !1 !== i.call(e, s) && t(e) }; var s = o.concat("iframe").join(","); function m(e) { var o = parseInt(e.getAttribute("tabindex"), 10); return isNaN(o) ? function (e) { return "true" === e.contentEditable }(e) ? 0 : e.tabIndex : o } function c(e, o) { return e.tabIndex === o.tabIndex ? e.documentOrder - o.documentOrder : e.tabIndex - o.tabIndex } function d(e) { return "INPUT" === e.tagName } var g, u = a, l = function () { for (var e = {}, o = 0; o < arguments.length; o++) { var n = arguments[o]; for (var i in n) v.call(n, i) && (e[i] = n[i]) } return e }, v = Object.prototype.hasOwnProperty; var f, y = (f = [], { activateTrap: function (e) { if (f.length > 0) { var o = f[f.length - 1]; o !== e && o.pause() } var n = f.indexOf(e); -1 === n || f.splice(n, 1), f.push(e) }, deactivateTrap: function (e) { var o = f.indexOf(e); -1 !== o && f.splice(o, 1), f.length > 0 && f[f.length - 1].unpause() } }); function j(e) { return setTimeout(e, 0) } var h = function (e, o) { var n = document, i = "string" == typeof e ? n.querySelector(e) : e, a = l({ returnFocusOnDeactivate: !0, escapeDeactivates: !0 }, o), r = { firstTabbableNode: null, lastTabbableNode: null, nodeFocusedBeforeActivation: null, mostRecentlyFocusedNode: null, active: !1, paused: !1 }, t = { activate: function (e) { if (r.active) return; w(), r.active = !0, r.paused = !1, r.nodeFocusedBeforeActivation = n.activeElement; var o = e && e.onActivate ? e.onActivate : a.onActivate; o && o(); return m(), t }, deactivate: s, pause: function () { if (r.paused || !r.active) return; r.paused = !0, c() }, unpause: function () { if (!r.paused || !r.active) return; r.paused = !1, w(), m() } }; return t; function s(e) { if (r.active) { clearTimeout(g), c(), r.active = !1, r.paused = !1, y.deactivateTrap(t); var o = e && void 0 !== e.onDeactivate ? e.onDeactivate : a.onDeactivate; return o && o(), (e && void 0 !== e.returnFocus ? e.returnFocus : a.returnFocusOnDeactivate) && j((function () { var e; k((e = r.nodeFocusedBeforeActivation, d("setReturnFocus") || e)) })), t } } function m() { if (r.active) return y.activateTrap(t), g = j((function () { k(v()) })), n.addEventListener("focusin", h, !0), n.addEventListener("mousedown", f, { capture: !0, passive: !1 }), n.addEventListener("touchstart", f, { capture: !0, passive: !1 }), n.addEventListener("click", b, { capture: !0, passive: !1 }), n.addEventListener("keydown", p, { capture: !0, passive: !1 }), t } function c() { if (r.active) return n.removeEventListener("focusin", h, !0), n.removeEventListener("mousedown", f, !0), n.removeEventListener("touchstart", f, !0), n.removeEventListener("click", b, !0), n.removeEventListener("keydown", p, !0), t } function d(e) { var o = a[e], i = o; if (!o) return null; if ("string" == typeof o && !(i = n.querySelector(o))) throw new Error("`" + e + "` refers to no known node"); if ("function" == typeof o && !(i = o())) throw new Error("`" + e + "` did not return a node"); return i } function v() { var e; if (!(e = null !== d("initialFocus") ? d("initialFocus") : i.contains(n.activeElement) ? n.activeElement : r.firstTabbableNode || d("fallbackFocus"))) throw new Error("Your focus-trap needs to have at least one focusable element"); return e } function f(e) { i.contains(e.target) || (a.clickOutsideDeactivates ? s({ returnFocus: !u.isFocusable(e.target) }) : a.allowOutsideClick && a.allowOutsideClick(e) || e.preventDefault()) } function h(e) { i.contains(e.target) || e.target instanceof Document || (e.stopImmediatePropagation(), k(r.mostRecentlyFocusedNode || v())) } function p(e) { if (!1 !== a.escapeDeactivates && function (e) { return "Escape" === e.key || "Esc" === e.key || 27 === e.keyCode }(e)) return e.preventDefault(), void s(); (function (e) { return "Tab" === e.key || 9 === e.keyCode })(e) && function (e) { if (w(), e.shiftKey && e.target === r.firstTabbableNode) return e.preventDefault(), void k(r.lastTabbableNode); if (!e.shiftKey && e.target === r.lastTabbableNode) e.preventDefault(), k(r.firstTabbableNode) }(e) } function b(e) { a.clickOutsideDeactivates || i.contains(e.target) || a.allowOutsideClick && a.allowOutsideClick(e) || (e.preventDefault(), e.stopImmediatePropagation()) } function w() { var e = u(i); r.firstTabbableNode = e[0] || v(), r.lastTabbableNode = e[e.length - 1] || v() } function k(e) { e !== n.activeElement && (e && e.focus ? (e.focus(), r.mostRecentlyFocusedNode = e, function (e) { return e.tagName && "input" === e.tagName.toLowerCase() && "function" == typeof e.select }(e) && e.select()) : k(v())) } }; function p() { } p.prototype = { on: function (e, o, n) { var i = this.e || (this.e = {}); return (i[e] || (i[e] = [])).push({ fn: o, ctx: n }), this }, once: function (e, o, n) { var i = this; function a() { i.off(e, a), o.apply(n, arguments) } return a._ = o, this.on(e, a, n) }, emit: function (e) { for (var o = [].slice.call(arguments, 1), n = ((this.e || (this.e = {}))[e] || []).slice(), i = 0, a = n.length; i < a; i++)n[i].fn.apply(n[i].ctx, o); return this }, off: function (e, o) { var n = this.e || (this.e = {}), i = n[e], a = []; if (i && o) for (var r = 0, t = i.length; r < t; r++)i[r].fn !== o && i[r].fn._ !== o && a.push(i[r]); return a.length ? n[e] = a : delete n[e], this } }; var b = p; function w(e) { var o = e.getBoundingClientRect(); return { width: o.width, height: o.height, top: o.top, right: o.right, bottom: o.bottom, left: o.left, x: o.left, y: o.top } } function k(e) { if ("[object Window]" !== e.toString()) { var o = e.ownerDocument; return o ? o.defaultView : window } return e } function x(e) { var o = k(e); return { scrollLeft: o.pageXOffset, scrollTop: o.pageYOffset } } function C(e) { return e instanceof k(e).Element || e instanceof Element } function E(e) { return e instanceof k(e).HTMLElement || e instanceof HTMLElement } function _(e) { return e ? (e.nodeName || "").toLowerCase() : null } function z(e) { return (C(e) ? e.ownerDocument : e.document).documentElement } function O(e) { return w(z(e)).left + x(e).scrollLeft } function I(e) { return k(e).getComputedStyle(e) } function S(e) { var o = I(e), n = o.overflow, i = o.overflowX, a = o.overflowY; return /auto|scroll|overlay|hidden/.test(n + a + i) } function P(e, o, n) { void 0 === n && (n = !1); var i, a, r = z(o), t = w(e), s = { scrollLeft: 0, scrollTop: 0 }, m = { x: 0, y: 0 }; return n || (("body" !== _(o) || S(r)) && (s = (i = o) !== k(i) && E(i) ? { scrollLeft: (a = i).scrollLeft, scrollTop: a.scrollTop } : x(i)), E(o) ? ((m = w(o)).x += o.clientLeft, m.y += o.clientTop) : r && (m.x = O(r))), { x: t.left + s.scrollLeft - m.x, y: t.top + s.scrollTop - m.y, width: t.width, height: t.height } } function M(e) { return { x: e.offsetLeft, y: e.offsetTop, width: e.offsetWidth, height: e.offsetHeight } } function A(e) { return "html" === _(e) ? e : e.assignedSlot || e.parentNode || e.host || z(e) } function L(e) { return ["html", "body", "#document"].indexOf(_(e)) >= 0 ? e.ownerDocument.body : E(e) && S(e) ? e : L(A(e)) } function T(e, o) { void 0 === o && (o = []); var n = L(e), i = "body" === _(n), a = k(n), r = i ? [a].concat(a.visualViewport || [], S(n) ? n : []) : n, t = o.concat(r); return i ? t : t.concat(T(A(r))) } function N(e) { return ["table", "td", "th"].indexOf(_(e)) >= 0 } function F(e) { return E(e) && "fixed" !== I(e).position ? e.offsetParent : null } function B(e) { for (var o = k(e), n = F(e); n && N(n);)n = F(n); return n && "body" === _(n) && "static" === I(n).position ? o : n || o } p.TinyEmitter = b; var D = "top", R = "bottom", q = "right", V = "left", H = [D, R, q, V], U = H.reduce((function (e, o) { return e.concat([o + "-start", o + "-end"]) }), []), W = [].concat(H, ["auto"]).reduce((function (e, o) { return e.concat([o, o + "-start", o + "-end"]) }), []), K = ["beforeRead", "read", "afterRead", "beforeMain", "main", "afterMain", "beforeWrite", "write", "afterWrite"]; function J(e) { var o = new Map, n = new Set, i = []; function a(e) { n.add(e.name), [].concat(e.requires || [], e.requiresIfExists || []).forEach((function (e) { if (!n.has(e)) { var i = o.get(e); i && a(i) } })), i.push(e) } return e.forEach((function (e) { o.set(e.name, e) })), e.forEach((function (e) { n.has(e.name) || a(e) })), i } function G(e) { return e.split("-")[0] } var X = { placement: "bottom", modifiers: [], strategy: "absolute" }; function Y() { for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)o[n] = arguments[n]; return !o.some((function (e) { return !(e && "function" == typeof e.getBoundingClientRect) })) } function $(e) { void 0 === e && (e = {}); var o = e, n = o.defaultModifiers, i = void 0 === n ? [] : n, a = o.defaultOptions, r = void 0 === a ? X : a; return function (e, o, n) { void 0 === n && (n = r); var a, t, s = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, X, {}, r), modifiersData: {}, elements: { reference: e, popper: o }, attributes: {}, styles: {} }, m = [], c = !1, d = { state: s, setOptions: function (n) { g(), s.options = Object.assign({}, r, {}, s.options, {}, n), s.scrollParents = { reference: C(e) ? T(e) : e.contextElement ? T(e.contextElement) : [], popper: T(o) }; var a, t, c = function (e) { var o = J(e); return K.reduce((function (e, n) { return e.concat(o.filter((function (e) { return e.phase === n }))) }), []) }((a = [].concat(i, s.options.modifiers), t = a.reduce((function (e, o) { var n = e[o.name]; return e[o.name] = n ? Object.assign({}, n, {}, o, { options: Object.assign({}, n.options, {}, o.options), data: Object.assign({}, n.data, {}, o.data) }) : o, e }), {}), Object.keys(t).map((function (e) { return t[e] })))); return s.orderedModifiers = c.filter((function (e) { return e.enabled })), s.orderedModifiers.forEach((function (e) { var o = e.name, n = e.options, i = void 0 === n ? {} : n, a = e.effect; if ("function" == typeof a) { var r = a({ state: s, name: o, instance: d, options: i }), t = function () { }; m.push(r || t) } })), d.update() }, forceUpdate: function () { if (!c) { var e = s.elements, o = e.reference, n = e.popper; if (Y(o, n)) { s.rects = { reference: P(o, B(n), "fixed" === s.options.strategy), popper: M(n) }, s.reset = !1, s.placement = s.options.placement, s.orderedModifiers.forEach((function (e) { return s.modifiersData[e.name] = Object.assign({}, e.data) })); for (var i = 0; i < s.orderedModifiers.length; i++)if (!0 !== s.reset) { var a = s.orderedModifiers[i], r = a.fn, t = a.options, m = void 0 === t ? {} : t, g = a.name; "function" == typeof r && (s = r({ state: s, options: m, name: g, instance: d }) || s) } else s.reset = !1, i = -1 } } }, update: (a = function () { return new Promise((function (e) { d.forceUpdate(), e(s) })) }, function () { return t || (t = new Promise((function (e) { Promise.resolve().then((function () { t = void 0, e(a()) })) }))), t }), destroy: function () { g(), c = !0 } }; if (!Y(e, o)) return d; function g() { m.forEach((function (e) { return e() })), m = [] } return d.setOptions(n).then((function (e) { !c && n.onFirstUpdate && n.onFirstUpdate(e) })), d } } var Z = { passive: !0 }; function Q(e) { return e.split("-")[1] } function ee(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y" } function oe(e) { var o, n = e.reference, i = e.element, a = e.placement, r = a ? G(a) : null, t = a ? Q(a) : null, s = n.x + n.width / 2 - i.width / 2, m = n.y + n.height / 2 - i.height / 2; switch (r) { case D: o = { x: s, y: n.y - i.height }; break; case R: o = { x: s, y: n.y + n.height }; break; case q: o = { x: n.x + n.width, y: m }; break; case V: o = { x: n.x - i.width, y: m }; break; default: o = { x: n.x, y: n.y } }var c = r ? ee(r) : null; if (null != c) { var d = "y" === c ? "height" : "width"; switch (t) { case "start": o[c] = Math.floor(o[c]) - Math.floor(n[d] / 2 - i[d] / 2); break; case "end": o[c] = Math.floor(o[c]) + Math.ceil(n[d] / 2 - i[d] / 2) } } return o } var ne = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function ie(e) { var o, n = e.popper, i = e.popperRect, a = e.placement, r = e.offsets, t = e.position, s = e.gpuAcceleration, m = e.adaptive, c = function (e) { var o = e.x, n = e.y, i = window.devicePixelRatio || 1; return { x: Math.round(o * i) / i || 0, y: Math.round(n * i) / i || 0 } }(r), d = c.x, g = c.y, u = r.hasOwnProperty("x"), l = r.hasOwnProperty("y"), v = V, f = D, y = window; if (m) { var j = B(n); j === k(n) && (j = z(n)), a === D && (f = R, g -= j.clientHeight - i.height, g *= s ? 1 : -1), a === V && (v = q, d -= j.clientWidth - i.width, d *= s ? 1 : -1) } var h, p = Object.assign({ position: t }, m && ne); return s ? Object.assign({}, p, ((h = {})[f] = l ? "0" : "", h[v] = u ? "0" : "", h.transform = (y.devicePixelRatio || 1) < 2 ? "translate(" + d + "px, " + g + "px)" : "translate3d(" + d + "px, " + g + "px, 0)", h)) : Object.assign({}, p, ((o = {})[f] = l ? g + "px" : "", o[v] = u ? d + "px" : "", o.transform = "", o)) } var ae = { left: "right", right: "left", bottom: "top", top: "bottom" }; function re(e) { return e.replace(/left|right|bottom|top/g, (function (e) { return ae[e] })) } var te = { start: "end", end: "start" }; function se(e) { return e.replace(/start|end/g, (function (e) { return te[e] })) } function me(e) { return parseFloat(e) || 0 } function ce(e) { var o = k(e), n = function (e) { var o = E(e) ? I(e) : {}; return { top: me(o.borderTopWidth), right: me(o.borderRightWidth), bottom: me(o.borderBottomWidth), left: me(o.borderLeftWidth) } }(e), i = "html" === _(e), a = O(e), r = e.clientWidth + n.right, t = e.clientHeight + n.bottom; return i && o.innerHeight - e.clientHeight > 50 && (t = o.innerHeight - n.bottom), { top: i ? 0 : e.clientTop, right: e.clientLeft > n.left ? n.right : i ? o.innerWidth - r - a : e.offsetWidth - r, bottom: i ? o.innerHeight - t : e.offsetHeight - t, left: i ? a : e.clientLeft } } function de(e, o) { var n = Boolean(o.getRootNode && o.getRootNode().host); if (e.contains(o)) return !0; if (n) { var i = o; do { if (i && e.isSameNode(i)) return !0; i = i.parentNode || i.host } while (i) } return !1 } function ge(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }) } function ue(e, o) { return "viewport" === o ? ge(function (e) { var o = k(e), n = o.visualViewport, i = o.innerWidth, a = o.innerHeight; return n && /iPhone|iPod|iPad/.test(navigator.platform) && (i = n.width, a = n.height), { width: i, height: a, x: 0, y: 0 } }(e)) : E(o) ? w(o) : ge(function (e) { var o = k(e), n = x(e), i = P(z(e), o); return i.height = Math.max(i.height, o.innerHeight), i.width = Math.max(i.width, o.innerWidth), i.x = -n.scrollLeft, i.y = -n.scrollTop, i }(z(e))) } function le(e, o, n) { var i = "clippingParents" === o ? function (e) { var o = T(e), n = ["absolute", "fixed"].indexOf(I(e).position) >= 0 && E(e) ? B(e) : e; return C(n) ? o.filter((function (e) { return C(e) && de(e, n) })) : [] }(e) : [].concat(o), a = [].concat(i, [n]), r = a[0], t = a.reduce((function (o, n) { var i = ue(e, n), a = ce(E(n) ? n : z(e)); return o.top = Math.max(i.top + a.top, o.top), o.right = Math.min(i.right - a.right, o.right), o.bottom = Math.min(i.bottom - a.bottom, o.bottom), o.left = Math.max(i.left + a.left, o.left), o }), ue(e, r)); return t.width = t.right - t.left, t.height = t.bottom - t.top, t.x = t.left, t.y = t.top, t } function ve(e) { return Object.assign({}, { top: 0, right: 0, bottom: 0, left: 0 }, {}, e) } function fe(e, o) { return o.reduce((function (o, n) { return o[n] = e, o }), {}) } function ye(e, o) { void 0 === o && (o = {}); var n = o, i = n.placement, a = void 0 === i ? e.placement : i, r = n.boundary, t = void 0 === r ? "clippingParents" : r, s = n.rootBoundary, m = void 0 === s ? "viewport" : s, c = n.elementContext, d = void 0 === c ? "popper" : c, g = n.altBoundary, u = void 0 !== g && g, l = n.padding, v = void 0 === l ? 0 : l, f = ve("number" != typeof v ? v : fe(v, H)), y = "popper" === d ? "reference" : "popper", j = e.elements.reference, h = e.rects.popper, p = e.elements[u ? y : d], b = le(C(p) ? p : p.contextElement || z(e.elements.popper), t, m), k = w(j), x = oe({ reference: k, element: h, strategy: "absolute", placement: a }), E = ge(Object.assign({}, h, {}, x)), _ = "popper" === d ? E : k, O = { top: b.top - _.top + f.top, bottom: _.bottom - b.bottom + f.bottom, left: b.left - _.left + f.left, right: _.right - b.right + f.right }, I = e.modifiersData.offset; if ("popper" === d && I) { var S = I[a]; Object.keys(O).forEach((function (e) { var o = [q, R].indexOf(e) >= 0 ? 1 : -1, n = [D, R].indexOf(e) >= 0 ? "y" : "x"; O[e] += S[n] * o })) } return O } function je(e, o) { void 0 === o && (o = {}); var n = o, i = n.placement, a = n.boundary, r = n.rootBoundary, t = n.padding, s = n.flipVariations, m = n.allowedAutoPlacements, c = void 0 === m ? W : m, d = Q(i), g = (d ? s ? U : U.filter((function (e) { return Q(e) === d })) : H).filter((function (e) { return c.indexOf(e) >= 0 })).reduce((function (o, n) { return o[n] = ye(e, { placement: n, boundary: a, rootBoundary: r, padding: t })[G(n)], o }), {}); return Object.keys(g).sort((function (e, o) { return g[e] - g[o] })) } function he(e, o, n) { return Math.max(e, Math.min(o, n)) } function pe(e, o, n) { return void 0 === n && (n = { x: 0, y: 0 }), { top: e.top - o.height - n.y, right: e.right - o.width + n.x, bottom: e.bottom - o.height + n.y, left: e.left - o.width - n.x } } function be(e) { return [D, q, R, V].some((function (o) { return e[o] >= 0 })) } var we = $({ defaultModifiers: [{ name: "eventListeners", enabled: !0, phase: "write", fn: function () { }, effect: function (e) { var o = e.state, n = e.instance, i = e.options, a = i.scroll, r = void 0 === a || a, t = i.resize, s = void 0 === t || t, m = k(o.elements.popper), c = [].concat(o.scrollParents.reference, o.scrollParents.popper); return r && c.forEach((function (e) { e.addEventListener("scroll", n.update, Z) })), s && m.addEventListener("resize", n.update, Z), function () { r && c.forEach((function (e) { e.removeEventListener("scroll", n.update, Z) })), s && m.removeEventListener("resize", n.update, Z) } }, data: {} }, { name: "popperOffsets", enabled: !0, phase: "read", fn: function (e) { var o = e.state, n = e.name; o.modifiersData[n] = oe({ reference: o.rects.reference, element: o.rects.popper, strategy: "absolute", placement: o.placement }) }, data: {} }, { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: function (e) { var o = e.state, n = e.options, i = n.gpuAcceleration, a = void 0 === i || i, r = n.adaptive, t = void 0 === r || r, s = { placement: G(o.placement), popper: o.elements.popper, popperRect: o.rects.popper, gpuAcceleration: a }; null != o.modifiersData.popperOffsets && (o.styles.popper = Object.assign({}, o.styles.popper, {}, ie(Object.assign({}, s, { offsets: o.modifiersData.popperOffsets, position: o.options.strategy, adaptive: t })))), null != o.modifiersData.arrow && (o.styles.arrow = Object.assign({}, o.styles.arrow, {}, ie(Object.assign({}, s, { offsets: o.modifiersData.arrow, position: "absolute", adaptive: !1 })))), o.attributes.popper = Object.assign({}, o.attributes.popper, { "data-popper-placement": o.placement }) }, data: {} }, { name: "applyStyles", enabled: !0, phase: "write", fn: function (e) { var o = e.state; Object.keys(o.elements).forEach((function (e) { var n = o.styles[e] || {}, i = o.attributes[e] || {}, a = o.elements[e]; E(a) && _(a) && (Object.assign(a.style, n), Object.keys(i).forEach((function (e) { var o = i[e]; !1 === o ? a.removeAttribute(e) : a.setAttribute(e, !0 === o ? "" : o) }))) })) }, effect: function (e) { var o = e.state, n = { popper: { position: o.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} }; return Object.assign(o.elements.popper.style, n.popper), o.elements.arrow && Object.assign(o.elements.arrow.style, n.arrow), function () { Object.keys(o.elements).forEach((function (e) { var i = o.elements[e], a = o.attributes[e] || {}, r = Object.keys(o.styles.hasOwnProperty(e) ? o.styles[e] : n[e]).reduce((function (e, o) { return e[o] = "", e }), {}); E(i) && _(i) && (Object.assign(i.style, r), Object.keys(a).forEach((function (e) { i.removeAttribute(e) }))) })) } }, requires: ["computeStyles"] }, { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: function (e) { var o = e.state, n = e.options, i = e.name, a = n.offset, r = void 0 === a ? [0, 0] : a, t = W.reduce((function (e, n) { return e[n] = function (e, o, n) { var i = G(e), a = [V, D].indexOf(i) >= 0 ? -1 : 1, r = "function" == typeof n ? n(Object.assign({}, o, { placement: e })) : n, t = r[0], s = r[1]; return t = t || 0, s = (s || 0) * a, [V, q].indexOf(i) >= 0 ? { x: s, y: t } : { x: t, y: s } }(n, o.rects, r), e }), {}), s = t[o.placement], m = s.x, c = s.y; null != o.modifiersData.popperOffsets && (o.modifiersData.popperOffsets.x += m, o.modifiersData.popperOffsets.y += c), o.modifiersData[i] = t } }, { name: "flip", enabled: !0, phase: "main", fn: function (e) { var o = e.state, n = e.options, i = e.name; if (!o.modifiersData[i]._skip) { for (var a = n.mainAxis, r = void 0 === a || a, t = n.altAxis, s = void 0 === t || t, m = n.fallbackPlacements, c = n.padding, d = n.boundary, g = n.rootBoundary, u = n.altBoundary, l = n.flipVariations, v = void 0 === l || l, f = n.allowedAutoPlacements, y = o.options.placement, j = G(y), h = m || (j === y || !v ? [re(y)] : function (e) { if ("auto" === G(e)) return []; var o = re(e); return [se(e), o, se(o)] }(y)), p = [y].concat(h).reduce((function (e, n) { return e.concat("auto" === G(n) ? je(o, { placement: n, boundary: d, rootBoundary: g, padding: c, flipVariations: v, allowedAutoPlacements: f }) : n) }), []), b = o.rects.reference, w = o.rects.popper, k = new Map, x = !0, C = p[0], E = 0; E < p.length; E++) { var _ = p[E], z = G(_), O = "start" === Q(_), I = [D, R].indexOf(z) >= 0, S = I ? "width" : "height", P = ye(o, { placement: _, boundary: d, rootBoundary: g, altBoundary: u, padding: c }), M = I ? O ? q : V : O ? R : D; b[S] > w[S] && (M = re(M)); var A = re(M), L = []; if (r && L.push(P[z] <= 0), s && L.push(P[M] <= 0, P[A] <= 0), L.every((function (e) { return e }))) { C = _, x = !1; break } k.set(_, L) } if (x) for (var T = function (e) { var o = p.find((function (o) { var n = k.get(o); if (n) return n.slice(0, e).every((function (e) { return e })) })); if (o) return C = o, "break" }, N = v ? 3 : 1; N > 0; N--) { if ("break" === T(N)) break } o.placement !== C && (o.modifiersData[i]._skip = !0, o.placement = C, o.reset = !0) } }, requiresIfExists: ["offset"], data: { _skip: !1 } }, { name: "preventOverflow", enabled: !0, phase: "main", fn: function (e) { var o = e.state, n = e.options, i = e.name, a = n.mainAxis, r = void 0 === a || a, t = n.altAxis, s = void 0 !== t && t, m = n.boundary, c = n.rootBoundary, d = n.altBoundary, g = n.padding, u = n.tether, l = void 0 === u || u, v = n.tetherOffset, f = void 0 === v ? 0 : v, y = ye(o, { boundary: m, rootBoundary: c, padding: g, altBoundary: d }), j = G(o.placement), h = Q(o.placement), p = !h, b = ee(j), w = "x" === b ? "y" : "x", k = o.modifiersData.popperOffsets, x = o.rects.reference, C = o.rects.popper, E = "function" == typeof f ? f(Object.assign({}, o.rects, { placement: o.placement })) : f, _ = { x: 0, y: 0 }; if (k) { if (r) { var z = "y" === b ? D : V, O = "y" === b ? R : q, I = "y" === b ? "height" : "width", S = k[b], P = k[b] + y[z], A = k[b] - y[O], L = l ? -C[I] / 2 : 0, T = "start" === h ? x[I] : C[I], N = "start" === h ? -C[I] : -x[I], F = o.elements.arrow, H = l && F ? M(F) : { width: 0, height: 0 }, U = o.modifiersData["arrow#persistent"] ? o.modifiersData["arrow#persistent"].padding : { top: 0, right: 0, bottom: 0, left: 0 }, W = U[z], K = U[O], J = he(0, x[I], H[I]), X = p ? x[I] / 2 - L - J - W - E : T - J - W - E, Y = p ? -x[I] / 2 + L + J + K + E : N + J + K + E, $ = o.elements.arrow && B(o.elements.arrow), Z = $ ? "y" === b ? $.clientTop || 0 : $.clientLeft || 0 : 0, oe = o.modifiersData.offset ? o.modifiersData.offset[o.placement][b] : 0, ne = k[b] + X - oe - Z, ie = k[b] + Y - oe, ae = he(l ? Math.min(P, ne) : P, S, l ? Math.max(A, ie) : A); k[b] = ae, _[b] = ae - S } if (s) { var re = "x" === b ? D : V, te = "x" === b ? R : q, se = k[w], me = he(se + y[re], se, se - y[te]); k[w] = me, _[w] = me - se } o.modifiersData[i] = _ } }, requiresIfExists: ["offset"] }, { name: "arrow", enabled: !0, phase: "main", fn: function (e) { var o, n = e.state, i = e.name, a = n.elements.arrow, r = n.modifiersData.popperOffsets, t = G(n.placement), s = ee(t), m = [V, q].indexOf(t) >= 0 ? "height" : "width"; if (a && r) { var c = n.modifiersData[i + "#persistent"].padding, d = M(a), g = "y" === s ? D : V, u = "y" === s ? R : q, l = n.rects.reference[m] + n.rects.reference[s] - r[s] - n.rects.popper[m], v = r[s] - n.rects.reference[s], f = B(a), y = f ? "y" === s ? f.clientHeight || 0 : f.clientWidth || 0 : 0, j = l / 2 - v / 2, h = c[g], p = y - d[m] - c[u], b = y / 2 - d[m] / 2 + j, w = he(h, b, p), k = s; n.modifiersData[i] = ((o = {})[k] = w, o.centerOffset = w - b, o) } }, effect: function (e) { var o = e.state, n = e.options, i = e.name, a = n.element, r = void 0 === a ? "[data-popper-arrow]" : a, t = n.padding, s = void 0 === t ? 0 : t; null != r && ("string" != typeof r || (r = o.elements.popper.querySelector(r))) && de(o.elements.popper, r) && (o.elements.arrow = r, o.modifiersData[i + "#persistent"] = { padding: ve("number" != typeof s ? s : fe(s, H)) }) }, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }, { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: function (e) { var o = e.state, n = e.name, i = o.rects.reference, a = o.rects.popper, r = o.modifiersData.preventOverflow, t = ye(o, { elementContext: "reference" }), s = ye(o, { altBoundary: !0 }), m = pe(t, i), c = pe(s, a, r), d = be(m), g = be(c); o.modifiersData[n] = { referenceClippingOffsets: m, popperEscapeOffsets: c, isReferenceHidden: d, hasPopperEscaped: g }, o.attributes.popper = Object.assign({}, o.attributes.popper, { "data-popper-reference-hidden": d, "data-popper-escaped": g }) } }] }), ke = function () { var e = { base: "https://twemoji.maxcdn.com/v/13.0.0/", ext: ".png", size: "72x72", className: "emoji", convert: { fromCodePoint: function (e) { var o = "string" == typeof e ? parseInt(e, 16) : e; if (o < 65536) return s(o); return s(55296 + ((o -= 65536) >> 10), 56320 + (1023 & o)) }, toCodePoint: j }, onerror: function () { this.parentNode && this.parentNode.replaceChild(m(this.alt, !1), this) }, parse: function (o, n) { n && "function" != typeof n || (n = { callback: n }); return ("string" == typeof o ? l : u)(o, { callback: n.callback || c, attributes: "function" == typeof n.attributes ? n.attributes : f, base: "string" == typeof n.base ? n.base : e.base, ext: n.ext || e.ext, size: n.folder || (i = n.size || e.size, "number" == typeof i ? i + "x" + i : i), className: n.className || e.className, onerror: n.onerror || e.onerror }); var i }, replace: y, test: function (e) { n.lastIndex = 0; var o = n.test(e); return n.lastIndex = 0, o } }, o = { "&": "&", "<": "<", ">": ">", "'": "'", '"': """ }, n = /(?:\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d])|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udeeb\udeec\udef4-\udefc\udfe0-\udfeb]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd1d\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78\udd7a-\uddb4\uddb7\uddba\uddbc-\uddcb\uddd0\uddde-\uddff\ude70-\ude74\ude78-\ude7a\ude80-\ude86\ude90-\udea8\udeb0-\udeb6\udec0-\udec2\uded0-\uded6]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g, i = /\uFE0F/g, a = String.fromCharCode(8205), r = /[&<>'"]/g, t = /^(?:iframe|noframes|noscript|script|select|style|textarea)$/, s = String.fromCharCode; return e; function m(e, o) { return document.createTextNode(o ? e.replace(i, "") : e) } function c(e, o) { return "".concat(o.base, o.size, "/", e, o.ext) } function d(e, o) { for (var n, i, a = e.childNodes, r = a.length; r--;)3 === (i = (n = a[r]).nodeType) ? o.push(n) : 1 !== i || "ownerSVGElement" in n || t.test(n.nodeName.toLowerCase()) || d(n, o); return o } function g(e) { return j(e.indexOf(a) < 0 ? e.replace(i, "") : e) } function u(e, o) { for (var i, a, r, t, s, c, u, l, v, f, y, j, h, p = d(e, []), b = p.length; b--;) { for (r = !1, t = document.createDocumentFragment(), c = (s = p[b]).nodeValue, l = 0; u = n.exec(c);) { if ((v = u.index) !== l && t.appendChild(m(c.slice(l, v), !0)), j = g(y = u[0]), l = v + y.length, h = o.callback(j, o), j && h) { for (a in (f = new Image).onerror = o.onerror, f.setAttribute("draggable", "false"), i = o.attributes(y, j)) i.hasOwnProperty(a) && 0 !== a.indexOf("on") && !f.hasAttribute(a) && f.setAttribute(a, i[a]); f.className = o.className, f.alt = y, f.src = h, r = !0, t.appendChild(f) } f || t.appendChild(m(y, !1)), f = null } r && (l < c.length && t.appendChild(m(c.slice(l), !0)), s.parentNode.replaceChild(t, s)) } return e } function l(e, o) { return y(e, (function (e) { var n, i, a = e, t = g(e), s = o.callback(t, o); if (t && s) { for (i in a = "") } return a })) } function v(e) { return o[e] } function f() { return null } function y(e, o) { return String(e).replace(n, o) } function j(e, o) { for (var n = [], i = 0, a = 0, r = 0; r < e.length;)i = e.charCodeAt(r++), a ? (n.push((65536 + (a - 55296 << 10) + (i - 56320)).toString(16)), a = 0) : 55296 <= i && i <= 56319 ? a = i : n.push(i.toString(16)); return n.join(o || "-") } }(), xe = { categories: ["smileys", "people", "animals", "food", "travel", "activities", "objects", "symbols", "flags"], emoji: [{ emoji: "😀", category: 0, name: "grinning face", version: "1.0" }, { emoji: "😃", category: 0, name: "grinning face with big eyes", version: "1.0" }, { emoji: "😄", category: 0, name: "grinning face with smiling eyes", version: "1.0" }, { emoji: "😁", category: 0, name: "beaming face with smiling eyes", version: "1.0" }, { emoji: "😆", category: 0, name: "grinning squinting face", version: "1.0" }, { emoji: "😅", category: 0, name: "grinning face with sweat", version: "1.0" }, { emoji: "🤣", category: 0, name: "rolling on the floor laughing", version: "3.0" }, { emoji: "😂", category: 0, name: "face with tears of joy", version: "1.0" }, { emoji: "🙂", category: 0, name: "slightly smiling face", version: "1.0" }, { emoji: "🙃", category: 0, name: "upside-down face", version: "1.0" }, { emoji: "😉", category: 0, name: "winking face", version: "1.0" }, { emoji: "😊", category: 0, name: "smiling face with smiling eyes", version: "1.0" }, { emoji: "😇", category: 0, name: "smiling face with halo", version: "1.0" }, { emoji: "🥰", category: 0, name: "smiling face with hearts", version: "11.0" }, { emoji: "😍", category: 0, name: "smiling face with heart-eyes", version: "1.0" }, { emoji: "🤩", category: 0, name: "star-struck", version: "5.0" }, { emoji: "😘", category: 0, name: "face blowing a kiss", version: "1.0" }, { emoji: "😗", category: 0, name: "kissing face", version: "1.0" }, { emoji: "☺️", category: 0, name: "smiling face", version: "1.0" }, { emoji: "😚", category: 0, name: "kissing face with closed eyes", version: "1.0" }, { emoji: "😙", category: 0, name: "kissing face with smiling eyes", version: "1.0" }, { emoji: "🥲", category: 0, name: "smiling face with tear", version: "13.0" }, { emoji: "😋", category: 0, name: "face savoring food", version: "1.0" }, { emoji: "😛", category: 0, name: "face with tongue", version: "1.0" }, { emoji: "😜", category: 0, name: "winking face with tongue", version: "1.0" }, { emoji: "🤪", category: 0, name: "zany face", version: "5.0" }, { emoji: "😝", category: 0, name: "squinting face with tongue", version: "1.0" }, { emoji: "🤑", category: 0, name: "money-mouth face", version: "1.0" }, { emoji: "🤗", category: 0, name: "hugging face", version: "1.0" }, { emoji: "🤭", category: 0, name: "face with hand over mouth", version: "5.0" }, { emoji: "🤫", category: 0, name: "shushing face", version: "5.0" }, { emoji: "🤔", category: 0, name: "thinking face", version: "1.0" }, { emoji: "🤐", category: 0, name: "zipper-mouth face", version: "1.0" }, { emoji: "🤨", category: 0, name: "face with raised eyebrow", version: "5.0" }, { emoji: "😐", category: 0, name: "neutral face", version: "1.0" }, { emoji: "😑", category: 0, name: "expressionless face", version: "1.0" }, { emoji: "😶", category: 0, name: "face without mouth", version: "1.0" }, { emoji: "😏", category: 0, name: "smirking face", version: "1.0" }, { emoji: "😒", category: 0, name: "unamused face", version: "1.0" }, { emoji: "🙄", category: 0, name: "face with rolling eyes", version: "1.0" }, { emoji: "😬", category: 0, name: "grimacing face", version: "1.0" }, { emoji: "🤥", category: 0, name: "lying face", version: "3.0" }, { emoji: "😌", category: 0, name: "relieved face", version: "1.0" }, { emoji: "😔", category: 0, name: "pensive face", version: "1.0" }, { emoji: "😪", category: 0, name: "sleepy face", version: "1.0" }, { emoji: "🤤", category: 0, name: "drooling face", version: "3.0" }, { emoji: "😴", category: 0, name: "sleeping face", version: "1.0" }, { emoji: "😷", category: 0, name: "face with medical mask", version: "1.0" }, { emoji: "🤒", category: 0, name: "face with thermometer", version: "1.0" }, { emoji: "🤕", category: 0, name: "face with head-bandage", version: "1.0" }, { emoji: "🤢", category: 0, name: "nauseated face", version: "3.0" }, { emoji: "🤮", category: 0, name: "face vomiting", version: "5.0" }, { emoji: "🤧", category: 0, name: "sneezing face", version: "3.0" }, { emoji: "🥵", category: 0, name: "hot face", version: "11.0" }, { emoji: "🥶", category: 0, name: "cold face", version: "11.0" }, { emoji: "🥴", category: 0, name: "woozy face", version: "11.0" }, { emoji: "😵", category: 0, name: "dizzy face", version: "1.0" }, { emoji: "🤯", category: 0, name: "exploding head", version: "5.0" }, { emoji: "🤠", category: 0, name: "cowboy hat face", version: "3.0" }, { emoji: "🥳", category: 0, name: "partying face", version: "11.0" }, { emoji: "🥸", category: 0, name: "disguised face", version: "13.0" }, { emoji: "😎", category: 0, name: "smiling face with sunglasses", version: "1.0" }, { emoji: "🤓", category: 0, name: "nerd face", version: "1.0" }, { emoji: "🧐", category: 0, name: "face with monocle", version: "5.0" }, { emoji: "😕", category: 0, name: "confused face", version: "1.0" }, { emoji: "😟", category: 0, name: "worried face", version: "1.0" }, { emoji: "🙁", category: 0, name: "slightly frowning face", version: "1.0" }, { emoji: "☹️", category: 0, name: "frowning face", version: "1.0" }, { emoji: "😮", category: 0, name: "face with open mouth", version: "1.0" }, { emoji: "😯", category: 0, name: "hushed face", version: "1.0" }, { emoji: "😲", category: 0, name: "astonished face", version: "1.0" }, { emoji: "😳", category: 0, name: "flushed face", version: "1.0" }, { emoji: "🥺", category: 0, name: "pleading face", version: "11.0" }, { emoji: "😦", category: 0, name: "frowning face with open mouth", version: "1.0" }, { emoji: "😧", category: 0, name: "anguished face", version: "1.0" }, { emoji: "😨", category: 0, name: "fearful face", version: "1.0" }, { emoji: "😰", category: 0, name: "anxious face with sweat", version: "1.0" }, { emoji: "😥", category: 0, name: "sad but relieved face", version: "1.0" }, { emoji: "😢", category: 0, name: "crying face", version: "1.0" }, { emoji: "😭", category: 0, name: "loudly crying face", version: "1.0" }, { emoji: "😱", category: 0, name: "face screaming in fear", version: "1.0" }, { emoji: "😖", category: 0, name: "confounded face", version: "1.0" }, { emoji: "😣", category: 0, name: "persevering face", version: "1.0" }, { emoji: "😞", category: 0, name: "disappointed face", version: "1.0" }, { emoji: "😓", category: 0, name: "downcast face with sweat", version: "1.0" }, { emoji: "😩", category: 0, name: "weary face", version: "1.0" }, { emoji: "😫", category: 0, name: "tired face", version: "1.0" }, { emoji: "🥱", category: 0, name: "yawning face", version: "12.0" }, { emoji: "😤", category: 0, name: "face with steam from nose", version: "1.0" }, { emoji: "😡", category: 0, name: "pouting face", version: "1.0" }, { emoji: "😠", category: 0, name: "angry face", version: "1.0" }, { emoji: "🤬", category: 0, name: "face with symbols on mouth", version: "5.0" }, { emoji: "😈", category: 0, name: "smiling face with horns", version: "1.0" }, { emoji: "👿", category: 0, name: "angry face with horns", version: "1.0" }, { emoji: "💀", category: 0, name: "skull", version: "1.0" }, { emoji: "☠️", category: 0, name: "skull and crossbones", version: "1.0" }, { emoji: "💩", category: 0, name: "pile of poo", version: "1.0" }, { emoji: "🤡", category: 0, name: "clown face", version: "3.0" }, { emoji: "👹", category: 0, name: "ogre", version: "1.0" }, { emoji: "👺", category: 0, name: "goblin", version: "1.0" }, { emoji: "👻", category: 0, name: "ghost", version: "1.0" }, { emoji: "👽", category: 0, name: "alien", version: "1.0" }, { emoji: "👾", category: 0, name: "alien monster", version: "1.0" }, { emoji: "🤖", category: 0, name: "robot", version: "1.0" }, { emoji: "😺", category: 0, name: "grinning cat", version: "1.0" }, { emoji: "😸", category: 0, name: "grinning cat with smiling eyes", version: "1.0" }, { emoji: "😹", category: 0, name: "cat with tears of joy", version: "1.0" }, { emoji: "😻", category: 0, name: "smiling cat with heart-eyes", version: "1.0" }, { emoji: "😼", category: 0, name: "cat with wry smile", version: "1.0" }, { emoji: "😽", category: 0, name: "kissing cat", version: "1.0" }, { emoji: "🙀", category: 0, name: "weary cat", version: "1.0" }, { emoji: "😿", category: 0, name: "crying cat", version: "1.0" }, { emoji: "😾", category: 0, name: "pouting cat", version: "1.0" }, { emoji: "🙈", category: 0, name: "see-no-evil monkey", version: "1.0" }, { emoji: "🙉", category: 0, name: "hear-no-evil monkey", version: "1.0" }, { emoji: "🙊", category: 0, name: "speak-no-evil monkey", version: "1.0" }, { emoji: "💋", category: 0, name: "kiss mark", version: "1.0" }, { emoji: "💌", category: 0, name: "love letter", version: "1.0" }, { emoji: "💘", category: 0, name: "heart with arrow", version: "1.0" }, { emoji: "💝", category: 0, name: "heart with ribbon", version: "1.0" }, { emoji: "💖", category: 0, name: "sparkling heart", version: "1.0" }, { emoji: "💗", category: 0, name: "growing heart", version: "1.0" }, { emoji: "💓", category: 0, name: "beating heart", version: "1.0" }, { emoji: "💞", category: 0, name: "revolving hearts", version: "1.0" }, { emoji: "💕", category: 0, name: "two hearts", version: "1.0" }, { emoji: "💟", category: 0, name: "heart decoration", version: "1.0" }, { emoji: "❣️", category: 0, name: "heart exclamation", version: "1.0" }, { emoji: "💔", category: 0, name: "broken heart", version: "1.0" }, { emoji: "❤️", category: 0, name: "red heart", version: "1.0" }, { emoji: "🧡", category: 0, name: "orange heart", version: "5.0" }, { emoji: "💛", category: 0, name: "yellow heart", version: "1.0" }, { emoji: "💚", category: 0, name: "green heart", version: "1.0" }, { emoji: "💙", category: 0, name: "blue heart", version: "1.0" }, { emoji: "💜", category: 0, name: "purple heart", version: "1.0" }, { emoji: "🤎", category: 0, name: "brown heart", version: "12.0" }, { emoji: "🖤", category: 0, name: "black heart", version: "3.0" }, { emoji: "🤍", category: 0, name: "white heart", version: "12.0" }, { emoji: "💯", category: 0, name: "hundred points", version: "1.0" }, { emoji: "💢", category: 0, name: "anger symbol", version: "1.0" }, { emoji: "💥", category: 0, name: "collision", version: "1.0" }, { emoji: "💫", category: 0, name: "dizzy", version: "1.0" }, { emoji: "💦", category: 0, name: "sweat droplets", version: "1.0" }, { emoji: "💨", category: 0, name: "dashing away", version: "1.0" }, { emoji: "🕳️", category: 0, name: "hole", version: "1.0" }, { emoji: "💣", category: 0, name: "bomb", version: "1.0" }, { emoji: "💬", category: 0, name: "speech balloon", version: "1.0" }, { emoji: "👁️‍🗨️", category: 0, name: "eye in speech bubble", version: "2.0" }, { emoji: "🗨️", category: 0, name: "left speech bubble", version: "2.0" }, { emoji: "🗯️", category: 0, name: "right anger bubble", version: "1.0" }, { emoji: "💭", category: 0, name: "thought balloon", version: "1.0" }, { emoji: "💤", category: 0, name: "zzz", version: "1.0" }, { emoji: "👋", category: 1, name: "waving hand", variations: ["👋🏻", "👋🏼", "👋🏽", "👋🏾", "👋🏿"], version: "1.0" }, { emoji: "🤚", category: 1, name: "raised back of hand", variations: ["🤚🏻", "🤚🏼", "🤚🏽", "🤚🏾", "🤚🏿"], version: "3.0" }, { emoji: "🖐️", category: 1, name: "hand with fingers splayed", variations: ["🖐🏻", "🖐🏼", "🖐🏽", "🖐🏾", "🖐🏿"], version: "1.0" }, { emoji: "✋", category: 1, name: "raised hand", variations: ["✋🏻", "✋🏼", "✋🏽", "✋🏾", "✋🏿"], version: "1.0" }, { emoji: "🖖", category: 1, name: "vulcan salute", variations: ["🖖🏻", "🖖🏼", "🖖🏽", "🖖🏾", "🖖🏿"], version: "1.0" }, { emoji: "👌", category: 1, name: "OK hand", variations: ["👌🏻", "👌🏼", "👌🏽", "👌🏾", "👌🏿"], version: "1.0" }, { emoji: "🤌", category: 1, name: "pinched fingers", variations: ["🤌🏻", "🤌🏼", "🤌🏽", "🤌🏾", "🤌🏿"], version: "13.0" }, { emoji: "🤏", category: 1, name: "pinching hand", variations: ["🤏🏻", "🤏🏼", "🤏🏽", "🤏🏾", "🤏🏿"], version: "12.0" }, { emoji: "✌️", category: 1, name: "victory hand", variations: ["✌🏻", "✌🏼", "✌🏽", "✌🏾", "✌🏿"], version: "1.0" }, { emoji: "🤞", category: 1, name: "crossed fingers", variations: ["🤞🏻", "🤞🏼", "🤞🏽", "🤞🏾", "🤞🏿"], version: "3.0" }, { emoji: "🤟", category: 1, name: "love-you gesture", variations: ["🤟🏻", "🤟🏼", "🤟🏽", "🤟🏾", "🤟🏿"], version: "5.0" }, { emoji: "🤘", category: 1, name: "sign of the horns", variations: ["🤘🏻", "🤘🏼", "🤘🏽", "🤘🏾", "🤘🏿"], version: "1.0" }, { emoji: "🤙", category: 1, name: "call me hand", variations: ["🤙🏻", "🤙🏼", "🤙🏽", "🤙🏾", "🤙🏿"], version: "3.0" }, { emoji: "👈", category: 1, name: "backhand index pointing left", variations: ["👈🏻", "👈🏼", "👈🏽", "👈🏾", "👈🏿"], version: "1.0" }, { emoji: "👉", category: 1, name: "backhand index pointing right", variations: ["👉🏻", "👉🏼", "👉🏽", "👉🏾", "👉🏿"], version: "1.0" }, { emoji: "👆", category: 1, name: "backhand index pointing up", variations: ["👆🏻", "👆🏼", "👆🏽", "👆🏾", "👆🏿"], version: "1.0" }, { emoji: "🖕", category: 1, name: "middle finger", variations: ["🖕🏻", "🖕🏼", "🖕🏽", "🖕🏾", "🖕🏿"], version: "1.0" }, { emoji: "👇", category: 1, name: "backhand index pointing down", variations: ["👇🏻", "👇🏼", "👇🏽", "👇🏾", "👇🏿"], version: "1.0" }, { emoji: "☝️", category: 1, name: "index pointing up", variations: ["☝🏻", "☝🏼", "☝🏽", "☝🏾", "☝🏿"], version: "1.0" }, { emoji: "👍", category: 1, name: "thumbs up", variations: ["👍🏻", "👍🏼", "👍🏽", "👍🏾", "👍🏿"], version: "1.0" }, { emoji: "👎", category: 1, name: "thumbs down", variations: ["👎🏻", "👎🏼", "👎🏽", "👎🏾", "👎🏿"], version: "1.0" }, { emoji: "✊", category: 1, name: "raised fist", variations: ["✊🏻", "✊🏼", "✊🏽", "✊🏾", "✊🏿"], version: "1.0" }, { emoji: "👊", category: 1, name: "oncoming fist", variations: ["👊🏻", "👊🏼", "👊🏽", "👊🏾", "👊🏿"], version: "1.0" }, { emoji: "🤛", category: 1, name: "left-facing fist", variations: ["🤛🏻", "🤛🏼", "🤛🏽", "🤛🏾", "🤛🏿"], version: "3.0" }, { emoji: "🤜", category: 1, name: "right-facing fist", variations: ["🤜🏻", "🤜🏼", "🤜🏽", "🤜🏾", "🤜🏿"], version: "3.0" }, { emoji: "👏", category: 1, name: "clapping hands", variations: ["👏🏻", "👏🏼", "👏🏽", "👏🏾", "👏🏿"], version: "1.0" }, { emoji: "🙌", category: 1, name: "raising hands", variations: ["🙌🏻", "🙌🏼", "🙌🏽", "🙌🏾", "🙌🏿"], version: "1.0" }, { emoji: "👐", category: 1, name: "open hands", variations: ["👐🏻", "👐🏼", "👐🏽", "👐🏾", "👐🏿"], version: "1.0" }, { emoji: "🤲", category: 1, name: "palms up together", variations: ["🤲🏻", "🤲🏼", "🤲🏽", "🤲🏾", "🤲🏿"], version: "5.0" }, { emoji: "🤝", category: 1, name: "handshake", version: "3.0" }, { emoji: "🙏", category: 1, name: "folded hands", variations: ["🙏🏻", "🙏🏼", "🙏🏽", "🙏🏾", "🙏🏿"], version: "1.0" }, { emoji: "✍️", category: 1, name: "writing hand", variations: ["✍🏻", "✍🏼", "✍🏽", "✍🏾", "✍🏿"], version: "1.0" }, { emoji: "💅", category: 1, name: "nail polish", variations: ["💅🏻", "💅🏼", "💅🏽", "💅🏾", "💅🏿"], version: "1.0" }, { emoji: "🤳", category: 1, name: "selfie", variations: ["🤳🏻", "🤳🏼", "🤳🏽", "🤳🏾", "🤳🏿"], version: "3.0" }, { emoji: "💪", category: 1, name: "flexed biceps", variations: ["💪🏻", "💪🏼", "💪🏽", "💪🏾", "💪🏿"], version: "1.0" }, { emoji: "🦾", category: 1, name: "mechanical arm", version: "12.0" }, { emoji: "🦿", category: 1, name: "mechanical leg", version: "12.0" }, { emoji: "🦵", category: 1, name: "leg", variations: ["🦵🏻", "🦵🏼", "🦵🏽", "🦵🏾", "🦵🏿"], version: "11.0" }, { emoji: "🦶", category: 1, name: "foot", variations: ["🦶🏻", "🦶🏼", "🦶🏽", "🦶🏾", "🦶🏿"], version: "11.0" }, { emoji: "👂", category: 1, name: "ear", variations: ["👂🏻", "👂🏼", "👂🏽", "👂🏾", "👂🏿"], version: "1.0" }, { emoji: "🦻", category: 1, name: "ear with hearing aid", variations: ["🦻🏻", "🦻🏼", "🦻🏽", "🦻🏾", "🦻🏿"], version: "12.0" }, { emoji: "👃", category: 1, name: "nose", variations: ["👃🏻", "👃🏼", "👃🏽", "👃🏾", "👃🏿"], version: "1.0" }, { emoji: "🧠", category: 1, name: "brain", version: "5.0" }, { emoji: "🫀", category: 1, name: "anatomical heart", version: "13.0" }, { emoji: "🫁", category: 1, name: "lungs", version: "13.0" }, { emoji: "🦷", category: 1, name: "tooth", version: "11.0" }, { emoji: "🦴", category: 1, name: "bone", version: "11.0" }, { emoji: "👀", category: 1, name: "eyes", version: "1.0" }, { emoji: "👁️", category: 1, name: "eye", version: "1.0" }, { emoji: "👅", category: 1, name: "tongue", version: "1.0" }, { emoji: "👄", category: 1, name: "mouth", version: "1.0" }, { emoji: "👶", category: 1, name: "baby", variations: ["👶🏻", "👶🏼", "👶🏽", "👶🏾", "👶🏿"], version: "1.0" }, { emoji: "🧒", category: 1, name: "child", variations: ["🧒🏻", "🧒🏼", "🧒🏽", "🧒🏾", "🧒🏿"], version: "5.0" }, { emoji: "👦", category: 1, name: "boy", variations: ["👦🏻", "👦🏼", "👦🏽", "👦🏾", "👦🏿"], version: "1.0" }, { emoji: "👧", category: 1, name: "girl", variations: ["👧🏻", "👧🏼", "👧🏽", "👧🏾", "👧🏿"], version: "1.0" }, { emoji: "🧑", category: 1, name: "person", variations: ["🧑🏻", "🧑🏼", "🧑🏽", "🧑🏾", "🧑🏿"], version: "5.0" }, { emoji: "👱", category: 1, name: "person with blond hair", variations: ["👱🏻", "👱🏼", "👱🏽", "👱🏾", "👱🏿"], version: "1.0" }, { emoji: "👨", category: 1, name: "man", variations: ["👨🏻", "👨🏼", "👨🏽", "👨🏾", "👨🏿"], version: "1.0" }, { emoji: "🧔", category: 1, name: "man with beard", variations: ["🧔🏻", "🧔🏼", "🧔🏽", "🧔🏾", "🧔🏿"], version: "5.0" }, { emoji: "👨‍🦰", category: 1, name: "man with red hair", variations: ["👨🏻‍🦰", "👨🏼‍🦰", "👨🏽‍🦰", "👨🏾‍🦰", "👨🏿‍🦰"], version: "11.0" }, { emoji: "👨‍🦱", category: 1, name: "man with curly hair", variations: ["👨🏻‍🦱", "👨🏼‍🦱", "👨🏽‍🦱", "👨🏾‍🦱", "👨🏿‍🦱"], version: "11.0" }, { emoji: "👨‍🦳", category: 1, name: "man with white hair", variations: ["👨🏻‍🦳", "👨🏼‍🦳", "👨🏽‍🦳", "👨🏾‍🦳", "👨🏿‍🦳"], version: "11.0" }, { emoji: "👨‍🦲", category: 1, name: "man with no hair", variations: ["👨🏻‍🦲", "👨🏼‍🦲", "👨🏽‍🦲", "👨🏾‍🦲", "👨🏿‍🦲"], version: "11.0" }, { emoji: "👩", category: 1, name: "woman", variations: ["👩🏻", "👩🏼", "👩🏽", "👩🏾", "👩🏿"], version: "1.0" }, { emoji: "👩‍🦰", category: 1, name: "woman with red hair", variations: ["👩🏻‍🦰", "👩🏼‍🦰", "👩🏽‍🦰", "👩🏾‍🦰", "👩🏿‍🦰"], version: "11.0" }, { emoji: "🧑‍🦰", category: 1, name: "person with red hair", variations: ["🧑🏻‍🦰", "🧑🏼‍🦰", "🧑🏽‍🦰", "🧑🏾‍🦰", "🧑🏿‍🦰"], version: "12.1" }, { emoji: "👩‍🦱", category: 1, name: "woman with curly hair", variations: ["👩🏻‍🦱", "👩🏼‍🦱", "👩🏽‍🦱", "👩🏾‍🦱", "👩🏿‍🦱"], version: "11.0" }, { emoji: "🧑‍🦱", category: 1, name: "person with curly hair", variations: ["🧑🏻‍🦱", "🧑🏼‍🦱", "🧑🏽‍🦱", "🧑🏾‍🦱", "🧑🏿‍🦱"], version: "12.1" }, { emoji: "👩‍🦳", category: 1, name: "woman with white hair", variations: ["👩🏻‍🦳", "👩🏼‍🦳", "👩🏽‍🦳", "👩🏾‍🦳", "👩🏿‍🦳"], version: "11.0" }, { emoji: "🧑‍🦳", category: 1, name: "person with white hair", variations: ["🧑🏻‍🦳", "🧑🏼‍🦳", "🧑🏽‍🦳", "🧑🏾‍🦳", "🧑🏿‍🦳"], version: "12.1" }, { emoji: "👩‍🦲", category: 1, name: "woman with no hair", variations: ["👩🏻‍🦲", "👩🏼‍🦲", "👩🏽‍🦲", "👩🏾‍🦲", "👩🏿‍🦲"], version: "11.0" }, { emoji: "🧑‍🦲", category: 1, name: "person with no hair", variations: ["🧑🏻‍🦲", "🧑🏼‍🦲", "🧑🏽‍🦲", "🧑🏾‍🦲", "🧑🏿‍🦲"], version: "12.1" }, { emoji: "👱‍♀️", category: 1, name: "woman with blond hair", variations: ["👱🏻‍♀️", "👱🏼‍♀️", "👱🏽‍♀️", "👱🏾‍♀️", "👱🏿‍♀️"], version: "4.0" }, { emoji: "👱‍♂️", category: 1, name: "man with blond hair", variations: ["👱🏻‍♂️", "👱🏼‍♂️", "👱🏽‍♂️", "👱🏾‍♂️", "👱🏿‍♂️"], version: "4.0" }, { emoji: "🧓", category: 1, name: "older person", variations: ["🧓🏻", "🧓🏼", "🧓🏽", "🧓🏾", "🧓🏿"], version: "5.0" }, { emoji: "👴", category: 1, name: "old man", variations: ["👴🏻", "👴🏼", "👴🏽", "👴🏾", "👴🏿"], version: "1.0" }, { emoji: "👵", category: 1, name: "old woman", variations: ["👵🏻", "👵🏼", "👵🏽", "👵🏾", "👵🏿"], version: "1.0" }, { emoji: "🙍", category: 1, name: "person frowning", variations: ["🙍🏻", "🙍🏼", "🙍🏽", "🙍🏾", "🙍🏿"], version: "1.0" }, { emoji: "🙍‍♂️", category: 1, name: "man frowning", variations: ["🙍🏻‍♂️", "🙍🏼‍♂️", "🙍🏽‍♂️", "🙍🏾‍♂️", "🙍🏿‍♂️"], version: "4.0" }, { emoji: "🙍‍♀️", category: 1, name: "woman frowning", variations: ["🙍🏻‍♀️", "🙍🏼‍♀️", "🙍🏽‍♀️", "🙍🏾‍♀️", "🙍🏿‍♀️"], version: "4.0" }, { emoji: "🙎", category: 1, name: "person pouting", variations: ["🙎🏻", "🙎🏼", "🙎🏽", "🙎🏾", "🙎🏿"], version: "1.0" }, { emoji: "🙎‍♂️", category: 1, name: "man pouting", variations: ["🙎🏻‍♂️", "🙎🏼‍♂️", "🙎🏽‍♂️", "🙎🏾‍♂️", "🙎🏿‍♂️"], version: "4.0" }, { emoji: "🙎‍♀️", category: 1, name: "woman pouting", variations: ["🙎🏻‍♀️", "🙎🏼‍♀️", "🙎🏽‍♀️", "🙎🏾‍♀️", "🙎🏿‍♀️"], version: "4.0" }, { emoji: "🙅", category: 1, name: "person gesturing NO", variations: ["🙅🏻", "🙅🏼", "🙅🏽", "🙅🏾", "🙅🏿"], version: "1.0" }, { emoji: "🙅‍♂️", category: 1, name: "man gesturing NO", variations: ["🙅🏻‍♂️", "🙅🏼‍♂️", "🙅🏽‍♂️", "🙅🏾‍♂️", "🙅🏿‍♂️"], version: "4.0" }, { emoji: "🙅‍♀️", category: 1, name: "woman gesturing NO", variations: ["🙅🏻‍♀️", "🙅🏼‍♀️", "🙅🏽‍♀️", "🙅🏾‍♀️", "🙅🏿‍♀️"], version: "4.0" }, { emoji: "🙆", category: 1, name: "person gesturing OK", variations: ["🙆🏻", "🙆🏼", "🙆🏽", "🙆🏾", "🙆🏿"], version: "1.0" }, { emoji: "🙆‍♂️", category: 1, name: "man gesturing OK", variations: ["🙆🏻‍♂️", "🙆🏼‍♂️", "🙆🏽‍♂️", "🙆🏾‍♂️", "🙆🏿‍♂️"], version: "4.0" }, { emoji: "🙆‍♀️", category: 1, name: "woman gesturing OK", variations: ["🙆🏻‍♀️", "🙆🏼‍♀️", "🙆🏽‍♀️", "🙆🏾‍♀️", "🙆🏿‍♀️"], version: "4.0" }, { emoji: "💁", category: 1, name: "person tipping hand", variations: ["💁🏻", "💁🏼", "💁🏽", "💁🏾", "💁🏿"], version: "1.0" }, { emoji: "💁‍♂️", category: 1, name: "man tipping hand", variations: ["💁🏻‍♂️", "💁🏼‍♂️", "💁🏽‍♂️", "💁🏾‍♂️", "💁🏿‍♂️"], version: "4.0" }, { emoji: "💁‍♀️", category: 1, name: "woman tipping hand", variations: ["💁🏻‍♀️", "💁🏼‍♀️", "💁🏽‍♀️", "💁🏾‍♀️", "💁🏿‍♀️"], version: "4.0" }, { emoji: "🙋", category: 1, name: "person raising hand", variations: ["🙋🏻", "🙋🏼", "🙋🏽", "🙋🏾", "🙋🏿"], version: "1.0" }, { emoji: "🙋‍♂️", category: 1, name: "man raising hand", variations: ["🙋🏻‍♂️", "🙋🏼‍♂️", "🙋🏽‍♂️", "🙋🏾‍♂️", "🙋🏿‍♂️"], version: "4.0" }, { emoji: "🙋‍♀️", category: 1, name: "woman raising hand", variations: ["🙋🏻‍♀️", "🙋🏼‍♀️", "🙋🏽‍♀️", "🙋🏾‍♀️", "🙋🏿‍♀️"], version: "4.0" }, { emoji: "🧏", category: 1, name: "deaf person", variations: ["🧏🏻", "🧏🏼", "🧏🏽", "🧏🏾", "🧏🏿"], version: "12.0" }, { emoji: "🧏‍♂️", category: 1, name: "deaf man", variations: ["🧏🏻‍♂️", "🧏🏼‍♂️", "🧏🏽‍♂️", "🧏🏾‍♂️", "🧏🏿‍♂️"], version: "12.0" }, { emoji: "🧏‍♀️", category: 1, name: "deaf woman", variations: ["🧏🏻‍♀️", "🧏🏼‍♀️", "🧏🏽‍♀️", "🧏🏾‍♀️", "🧏🏿‍♀️"], version: "12.0" }, { emoji: "🙇", category: 1, name: "person bowing", variations: ["🙇🏻", "🙇🏼", "🙇🏽", "🙇🏾", "🙇🏿"], version: "1.0" }, { emoji: "🙇‍♂️", category: 1, name: "man bowing", variations: ["🙇🏻‍♂️", "🙇🏼‍♂️", "🙇🏽‍♂️", "🙇🏾‍♂️", "🙇🏿‍♂️"], version: "4.0" }, { emoji: "🙇‍♀️", category: 1, name: "woman bowing", variations: ["🙇🏻‍♀️", "🙇🏼‍♀️", "🙇🏽‍♀️", "🙇🏾‍♀️", "🙇🏿‍♀️"], version: "4.0" }, { emoji: "🤦", category: 1, name: "person facepalming", variations: ["🤦🏻", "🤦🏼", "🤦🏽", "🤦🏾", "🤦🏿"], version: "3.0" }, { emoji: "🤦‍♂️", category: 1, name: "man facepalming", variations: ["🤦🏻‍♂️", "🤦🏼‍♂️", "🤦🏽‍♂️", "🤦🏾‍♂️", "🤦🏿‍♂️"], version: "4.0" }, { emoji: "🤦‍♀️", category: 1, name: "woman facepalming", variations: ["🤦🏻‍♀️", "🤦🏼‍♀️", "🤦🏽‍♀️", "🤦🏾‍♀️", "🤦🏿‍♀️"], version: "4.0" }, { emoji: "🤷", category: 1, name: "person shrugging", variations: ["🤷🏻", "🤷🏼", "🤷🏽", "🤷🏾", "🤷🏿"], version: "3.0" }, { emoji: "🤷‍♂️", category: 1, name: "man shrugging", variations: ["🤷🏻‍♂️", "🤷🏼‍♂️", "🤷🏽‍♂️", "🤷🏾‍♂️", "🤷🏿‍♂️"], version: "4.0" }, { emoji: "🤷‍♀️", category: 1, name: "woman shrugging", variations: ["🤷🏻‍♀️", "🤷🏼‍♀️", "🤷🏽‍♀️", "🤷🏾‍♀️", "🤷🏿‍♀️"], version: "4.0" }, { emoji: "🧑‍⚕️", category: 1, name: "health worker", variations: ["🧑🏻‍⚕️", "🧑🏼‍⚕️", "🧑🏽‍⚕️", "🧑🏾‍⚕️", "🧑🏿‍⚕️"], version: "12.1" }, { emoji: "👨‍⚕️", category: 1, name: "man health worker", variations: ["👨🏻‍⚕️", "👨🏼‍⚕️", "👨🏽‍⚕️", "👨🏾‍⚕️", "👨🏿‍⚕️"], version: "4.0" }, { emoji: "👩‍⚕️", category: 1, name: "woman health worker", variations: ["👩🏻‍⚕️", "👩🏼‍⚕️", "👩🏽‍⚕️", "👩🏾‍⚕️", "👩🏿‍⚕️"], version: "4.0" }, { emoji: "🧑‍🎓", category: 1, name: "student", variations: ["🧑🏻‍🎓", "🧑🏼‍🎓", "🧑🏽‍🎓", "🧑🏾‍🎓", "🧑🏿‍🎓"], version: "12.1" }, { emoji: "👨‍🎓", category: 1, name: "man student", variations: ["👨🏻‍🎓", "👨🏼‍🎓", "👨🏽‍🎓", "👨🏾‍🎓", "👨🏿‍🎓"], version: "4.0" }, { emoji: "👩‍🎓", category: 1, name: "woman student", variations: ["👩🏻‍🎓", "👩🏼‍🎓", "👩🏽‍🎓", "👩🏾‍🎓", "👩🏿‍🎓"], version: "4.0" }, { emoji: "🧑‍🏫", category: 1, name: "teacher", variations: ["🧑🏻‍🏫", "🧑🏼‍🏫", "🧑🏽‍🏫", "🧑🏾‍🏫", "🧑🏿‍🏫"], version: "12.1" }, { emoji: "👨‍🏫", category: 1, name: "man teacher", variations: ["👨🏻‍🏫", "👨🏼‍🏫", "👨🏽‍🏫", "👨🏾‍🏫", "👨🏿‍🏫"], version: "4.0" }, { emoji: "👩‍🏫", category: 1, name: "woman teacher", variations: ["👩🏻‍🏫", "👩🏼‍🏫", "👩🏽‍🏫", "👩🏾‍🏫", "👩🏿‍🏫"], version: "4.0" }, { emoji: "🧑‍⚖️", category: 1, name: "judge", variations: ["🧑🏻‍⚖️", "🧑🏼‍⚖️", "🧑🏽‍⚖️", "🧑🏾‍⚖️", "🧑🏿‍⚖️"], version: "12.1" }, { emoji: "👨‍⚖️", category: 1, name: "man judge", variations: ["👨🏻‍⚖️", "👨🏼‍⚖️", "👨🏽‍⚖️", "👨🏾‍⚖️", "👨🏿‍⚖️"], version: "4.0" }, { emoji: "👩‍⚖️", category: 1, name: "woman judge", variations: ["👩🏻‍⚖️", "👩🏼‍⚖️", "👩🏽‍⚖️", "👩🏾‍⚖️", "👩🏿‍⚖️"], version: "4.0" }, { emoji: "🧑‍🌾", category: 1, name: "farmer", variations: ["🧑🏻‍🌾", "🧑🏼‍🌾", "🧑🏽‍🌾", "🧑🏾‍🌾", "🧑🏿‍🌾"], version: "12.1" }, { emoji: "👨‍🌾", category: 1, name: "man farmer", variations: ["👨🏻‍🌾", "👨🏼‍🌾", "👨🏽‍🌾", "👨🏾‍🌾", "👨🏿‍🌾"], version: "4.0" }, { emoji: "👩‍🌾", category: 1, name: "woman farmer", variations: ["👩🏻‍🌾", "👩🏼‍🌾", "👩🏽‍🌾", "👩🏾‍🌾", "👩🏿‍🌾"], version: "4.0" }, { emoji: "🧑‍🍳", category: 1, name: "cook", variations: ["🧑🏻‍🍳", "🧑🏼‍🍳", "🧑🏽‍🍳", "🧑🏾‍🍳", "🧑🏿‍🍳"], version: "12.1" }, { emoji: "👨‍🍳", category: 1, name: "man cook", variations: ["👨🏻‍🍳", "👨🏼‍🍳", "👨🏽‍🍳", "👨🏾‍🍳", "👨🏿‍🍳"], version: "4.0" }, { emoji: "👩‍🍳", category: 1, name: "woman cook", variations: ["👩🏻‍🍳", "👩🏼‍🍳", "👩🏽‍🍳", "👩🏾‍🍳", "👩🏿‍🍳"], version: "4.0" }, { emoji: "🧑‍🔧", category: 1, name: "mechanic", variations: ["🧑🏻‍🔧", "🧑🏼‍🔧", "🧑🏽‍🔧", "🧑🏾‍🔧", "🧑🏿‍🔧"], version: "12.1" }, { emoji: "👨‍🔧", category: 1, name: "man mechanic", variations: ["👨🏻‍🔧", "👨🏼‍🔧", "👨🏽‍🔧", "👨🏾‍🔧", "👨🏿‍🔧"], version: "4.0" }, { emoji: "👩‍🔧", category: 1, name: "woman mechanic", variations: ["👩🏻‍🔧", "👩🏼‍🔧", "👩🏽‍🔧", "👩🏾‍🔧", "👩🏿‍🔧"], version: "4.0" }, { emoji: "🧑‍🏭", category: 1, name: "factory worker", variations: ["🧑🏻‍🏭", "🧑🏼‍🏭", "🧑🏽‍🏭", "🧑🏾‍🏭", "🧑🏿‍🏭"], version: "12.1" }, { emoji: "👨‍🏭", category: 1, name: "man factory worker", variations: ["👨🏻‍🏭", "👨🏼‍🏭", "👨🏽‍🏭", "👨🏾‍🏭", "👨🏿‍🏭"], version: "4.0" }, { emoji: "👩‍🏭", category: 1, name: "woman factory worker", variations: ["👩🏻‍🏭", "👩🏼‍🏭", "👩🏽‍🏭", "👩🏾‍🏭", "👩🏿‍🏭"], version: "4.0" }, { emoji: "🧑‍💼", category: 1, name: "office worker", variations: ["🧑🏻‍💼", "🧑🏼‍💼", "🧑🏽‍💼", "🧑🏾‍💼", "🧑🏿‍💼"], version: "12.1" }, { emoji: "👨‍💼", category: 1, name: "man office worker", variations: ["👨🏻‍💼", "👨🏼‍💼", "👨🏽‍💼", "👨🏾‍💼", "👨🏿‍💼"], version: "4.0" }, { emoji: "👩‍💼", category: 1, name: "woman office worker", variations: ["👩🏻‍💼", "👩🏼‍💼", "👩🏽‍💼", "👩🏾‍💼", "👩🏿‍💼"], version: "4.0" }, { emoji: "🧑‍🔬", category: 1, name: "scientist", variations: ["🧑🏻‍🔬", "🧑🏼‍🔬", "🧑🏽‍🔬", "🧑🏾‍🔬", "🧑🏿‍🔬"], version: "12.1" }, { emoji: "👨‍🔬", category: 1, name: "man scientist", variations: ["👨🏻‍🔬", "👨🏼‍🔬", "👨🏽‍🔬", "👨🏾‍🔬", "👨🏿‍🔬"], version: "4.0" }, { emoji: "👩‍🔬", category: 1, name: "woman scientist", variations: ["👩🏻‍🔬", "👩🏼‍🔬", "👩🏽‍🔬", "👩🏾‍🔬", "👩🏿‍🔬"], version: "4.0" }, { emoji: "🧑‍💻", category: 1, name: "technologist", variations: ["🧑🏻‍💻", "🧑🏼‍💻", "🧑🏽‍💻", "🧑🏾‍💻", "🧑🏿‍💻"], version: "12.1" }, { emoji: "👨‍💻", category: 1, name: "man technologist", variations: ["👨🏻‍💻", "👨🏼‍💻", "👨🏽‍💻", "👨🏾‍💻", "👨🏿‍💻"], version: "4.0" }, { emoji: "👩‍💻", category: 1, name: "woman technologist", variations: ["👩🏻‍💻", "👩🏼‍💻", "👩🏽‍💻", "👩🏾‍💻", "👩🏿‍💻"], version: "4.0" }, { emoji: "🧑‍🎤", category: 1, name: "singer", variations: ["🧑🏻‍🎤", "🧑🏼‍🎤", "🧑🏽‍🎤", "🧑🏾‍🎤", "🧑🏿‍🎤"], version: "12.1" }, { emoji: "👨‍🎤", category: 1, name: "man singer", variations: ["👨🏻‍🎤", "👨🏼‍🎤", "👨🏽‍🎤", "👨🏾‍🎤", "👨🏿‍🎤"], version: "4.0" }, { emoji: "👩‍🎤", category: 1, name: "woman singer", variations: ["👩🏻‍🎤", "👩🏼‍🎤", "👩🏽‍🎤", "👩🏾‍🎤", "👩🏿‍🎤"], version: "4.0" }, { emoji: "🧑‍🎨", category: 1, name: "artist", variations: ["🧑🏻‍🎨", "🧑🏼‍🎨", "🧑🏽‍🎨", "🧑🏾‍🎨", "🧑🏿‍🎨"], version: "12.1" }, { emoji: "👨‍🎨", category: 1, name: "man artist", variations: ["👨🏻‍🎨", "👨🏼‍🎨", "👨🏽‍🎨", "👨🏾‍🎨", "👨🏿‍🎨"], version: "4.0" }, { emoji: "👩‍🎨", category: 1, name: "woman artist", variations: ["👩🏻‍🎨", "👩🏼‍🎨", "👩🏽‍🎨", "👩🏾‍🎨", "👩🏿‍🎨"], version: "4.0" }, { emoji: "🧑‍✈️", category: 1, name: "pilot", variations: ["🧑🏻‍✈️", "🧑🏼‍✈️", "🧑🏽‍✈️", "🧑🏾‍✈️", "🧑🏿‍✈️"], version: "12.1" }, { emoji: "👨‍✈️", category: 1, name: "man pilot", variations: ["👨🏻‍✈️", "👨🏼‍✈️", "👨🏽‍✈️", "👨🏾‍✈️", "👨🏿‍✈️"], version: "4.0" }, { emoji: "👩‍✈️", category: 1, name: "woman pilot", variations: ["👩🏻‍✈️", "👩🏼‍✈️", "👩🏽‍✈️", "👩🏾‍✈️", "👩🏿‍✈️"], version: "4.0" }, { emoji: "🧑‍🚀", category: 1, name: "astronaut", variations: ["🧑🏻‍🚀", "🧑🏼‍🚀", "🧑🏽‍🚀", "🧑🏾‍🚀", "🧑🏿‍🚀"], version: "12.1" }, { emoji: "👨‍🚀", category: 1, name: "man astronaut", variations: ["👨🏻‍🚀", "👨🏼‍🚀", "👨🏽‍🚀", "👨🏾‍🚀", "👨🏿‍🚀"], version: "4.0" }, { emoji: "👩‍🚀", category: 1, name: "woman astronaut", variations: ["👩🏻‍🚀", "👩🏼‍🚀", "👩🏽‍🚀", "👩🏾‍🚀", "👩🏿‍🚀"], version: "4.0" }, { emoji: "🧑‍🚒", category: 1, name: "firefighter", variations: ["🧑🏻‍🚒", "🧑🏼‍🚒", "🧑🏽‍🚒", "🧑🏾‍🚒", "🧑🏿‍🚒"], version: "12.1" }, { emoji: "👨‍🚒", category: 1, name: "man firefighter", variations: ["👨🏻‍🚒", "👨🏼‍🚒", "👨🏽‍🚒", "👨🏾‍🚒", "👨🏿‍🚒"], version: "4.0" }, { emoji: "👩‍🚒", category: 1, name: "woman firefighter", variations: ["👩🏻‍🚒", "👩🏼‍🚒", "👩🏽‍🚒", "👩🏾‍🚒", "👩🏿‍🚒"], version: "4.0" }, { emoji: "👮", category: 1, name: "police officer", variations: ["👮🏻", "👮🏼", "👮🏽", "👮🏾", "👮🏿"], version: "1.0" }, { emoji: "👮‍♂️", category: 1, name: "man police officer", variations: ["👮🏻‍♂️", "👮🏼‍♂️", "👮🏽‍♂️", "👮🏾‍♂️", "👮🏿‍♂️"], version: "4.0" }, { emoji: "👮‍♀️", category: 1, name: "woman police officer", variations: ["👮🏻‍♀️", "👮🏼‍♀️", "👮🏽‍♀️", "👮🏾‍♀️", "👮🏿‍♀️"], version: "4.0" }, { emoji: "🕵️", category: 1, name: "detective", variations: ["🕵🏻", "🕵🏼", "🕵🏽", "🕵🏾", "🕵🏿"], version: "1.0" }, { emoji: "🕵️‍♂️", category: 1, name: "man detective", variations: ["🕵🏻‍♂️", "🕵🏼‍♂️", "🕵🏽‍♂️", "🕵🏾‍♂️", "🕵🏿‍♂️"], version: "4.0" }, { emoji: "🕵️‍♀️", category: 1, name: "woman detective", variations: ["🕵🏻‍♀️", "🕵🏼‍♀️", "🕵🏽‍♀️", "🕵🏾‍♀️", "🕵🏿‍♀️"], version: "4.0" }, { emoji: "💂", category: 1, name: "guard", variations: ["💂🏻", "💂🏼", "💂🏽", "💂🏾", "💂🏿"], version: "1.0" }, { emoji: "💂‍♂️", category: 1, name: "man guard", variations: ["💂🏻‍♂️", "💂🏼‍♂️", "💂🏽‍♂️", "💂🏾‍♂️", "💂🏿‍♂️"], version: "4.0" }, { emoji: "💂‍♀️", category: 1, name: "woman guard", variations: ["💂🏻‍♀️", "💂🏼‍♀️", "💂🏽‍♀️", "💂🏾‍♀️", "💂🏿‍♀️"], version: "4.0" }, { emoji: "🥷", category: 1, name: "ninja", variations: ["🥷🏻", "🥷🏼", "🥷🏽", "🥷🏾", "🥷🏿"], version: "13.0" }, { emoji: "👷", category: 1, name: "construction worker", variations: ["👷🏻", "👷🏼", "👷🏽", "👷🏾", "👷🏿"], version: "1.0" }, { emoji: "👷‍♂️", category: 1, name: "man construction worker", variations: ["👷🏻‍♂️", "👷🏼‍♂️", "👷🏽‍♂️", "👷🏾‍♂️", "👷🏿‍♂️"], version: "4.0" }, { emoji: "👷‍♀️", category: 1, name: "woman construction worker", variations: ["👷🏻‍♀️", "👷🏼‍♀️", "👷🏽‍♀️", "👷🏾‍♀️", "👷🏿‍♀️"], version: "4.0" }, { emoji: "🤴", category: 1, name: "prince", variations: ["🤴🏻", "🤴🏼", "🤴🏽", "🤴🏾", "🤴🏿"], version: "3.0" }, { emoji: "👸", category: 1, name: "princess", variations: ["👸🏻", "👸🏼", "👸🏽", "👸🏾", "👸🏿"], version: "1.0" }, { emoji: "👳", category: 1, name: "person wearing turban", variations: ["👳🏻", "👳🏼", "👳🏽", "👳🏾", "👳🏿"], version: "1.0" }, { emoji: "👳‍♂️", category: 1, name: "man wearing turban", variations: ["👳🏻‍♂️", "👳🏼‍♂️", "👳🏽‍♂️", "👳🏾‍♂️", "👳🏿‍♂️"], version: "4.0" }, { emoji: "👳‍♀️", category: 1, name: "woman wearing turban", variations: ["👳🏻‍♀️", "👳🏼‍♀️", "👳🏽‍♀️", "👳🏾‍♀️", "👳🏿‍♀️"], version: "4.0" }, { emoji: "👲", category: 1, name: "person with skullcap", variations: ["👲🏻", "👲🏼", "👲🏽", "👲🏾", "👲🏿"], version: "1.0" }, { emoji: "🧕", category: 1, name: "woman with headscarf", variations: ["🧕🏻", "🧕🏼", "🧕🏽", "🧕🏾", "🧕🏿"], version: "5.0" }, { emoji: "🤵", category: 1, name: "person in tuxedo", variations: ["🤵🏻", "🤵🏼", "🤵🏽", "🤵🏾", "🤵🏿"], version: "3.0" }, { emoji: "🤵‍♂️", category: 1, name: "man in tuxedo", variations: ["🤵🏻‍♂️", "🤵🏼‍♂️", "🤵🏽‍♂️", "🤵🏾‍♂️", "🤵🏿‍♂️"], version: "13.0" }, { emoji: "🤵‍♀️", category: 1, name: "woman in tuxedo", variations: ["🤵🏻‍♀️", "🤵🏼‍♀️", "🤵🏽‍♀️", "🤵🏾‍♀️", "🤵🏿‍♀️"], version: "13.0" }, { emoji: "👰", category: 1, name: "person with veil", variations: ["👰🏻", "👰🏼", "👰🏽", "👰🏾", "👰🏿"], version: "1.0" }, { emoji: "👰‍♂️", category: 1, name: "man with veil", variations: ["👰🏻‍♂️", "👰🏼‍♂️", "👰🏽‍♂️", "👰🏾‍♂️", "👰🏿‍♂️"], version: "13.0" }, { emoji: "👰‍♀️", category: 1, name: "woman with veil", variations: ["👰🏻‍♀️", "👰🏼‍♀️", "👰🏽‍♀️", "👰🏾‍♀️", "👰🏿‍♀️"], version: "13.0" }, { emoji: "🤰", category: 1, name: "pregnant woman", variations: ["🤰🏻", "🤰🏼", "🤰🏽", "🤰🏾", "🤰🏿"], version: "3.0" }, { emoji: "🤱", category: 1, name: "breast-feeding", variations: ["🤱🏻", "🤱🏼", "🤱🏽", "🤱🏾", "🤱🏿"], version: "5.0" }, { emoji: "👩‍🍼", category: 1, name: "woman feeding baby", variations: ["👩🏻‍🍼", "👩🏼‍🍼", "👩🏽‍🍼", "👩🏾‍🍼", "👩🏿‍🍼"], version: "13.0" }, { emoji: "👨‍🍼", category: 1, name: "man feeding baby", variations: ["👨🏻‍🍼", "👨🏼‍🍼", "👨🏽‍🍼", "👨🏾‍🍼", "👨🏿‍🍼"], version: "13.0" }, { emoji: "🧑‍🍼", category: 1, name: "person feeding baby", variations: ["🧑🏻‍🍼", "🧑🏼‍🍼", "🧑🏽‍🍼", "🧑🏾‍🍼", "🧑🏿‍🍼"], version: "13.0" }, { emoji: "👼", category: 1, name: "baby angel", variations: ["👼🏻", "👼🏼", "👼🏽", "👼🏾", "👼🏿"], version: "1.0" }, { emoji: "🎅", category: 1, name: "Santa Claus", variations: ["🎅🏻", "🎅🏼", "🎅🏽", "🎅🏾", "🎅🏿"], version: "1.0" }, { emoji: "🤶", category: 1, name: "Mrs. Claus", variations: ["🤶🏻", "🤶🏼", "🤶🏽", "🤶🏾", "🤶🏿"], version: "3.0" }, { emoji: "🧑‍🎄", category: 1, name: "mx claus", variations: ["🧑🏻‍🎄", "🧑🏼‍🎄", "🧑🏽‍🎄", "🧑🏾‍🎄", "🧑🏿‍🎄"], version: "13.0" }, { emoji: "🦸", category: 1, name: "superhero", variations: ["🦸🏻", "🦸🏼", "🦸🏽", "🦸🏾", "🦸🏿"], version: "11.0" }, { emoji: "🦸‍♂️", category: 1, name: "man superhero", variations: ["🦸🏻‍♂️", "🦸🏼‍♂️", "🦸🏽‍♂️", "🦸🏾‍♂️", "🦸🏿‍♂️"], version: "11.0" }, { emoji: "🦸‍♀️", category: 1, name: "woman superhero", variations: ["🦸🏻‍♀️", "🦸🏼‍♀️", "🦸🏽‍♀️", "🦸🏾‍♀️", "🦸🏿‍♀️"], version: "11.0" }, { emoji: "🦹", category: 1, name: "supervillain", variations: ["🦹🏻", "🦹🏼", "🦹🏽", "🦹🏾", "🦹🏿"], version: "11.0" }, { emoji: "🦹‍♂️", category: 1, name: "man supervillain", variations: ["🦹🏻‍♂️", "🦹🏼‍♂️", "🦹🏽‍♂️", "🦹🏾‍♂️", "🦹🏿‍♂️"], version: "11.0" }, { emoji: "🦹‍♀️", category: 1, name: "woman supervillain", variations: ["🦹🏻‍♀️", "🦹🏼‍♀️", "🦹🏽‍♀️", "🦹🏾‍♀️", "🦹🏿‍♀️"], version: "11.0" }, { emoji: "🧙", category: 1, name: "mage", variations: ["🧙🏻", "🧙🏼", "🧙🏽", "🧙🏾", "🧙🏿"], version: "5.0" }, { emoji: "🧙‍♂️", category: 1, name: "man mage", variations: ["🧙🏻‍♂️", "🧙🏼‍♂️", "🧙🏽‍♂️", "🧙🏾‍♂️", "🧙🏿‍♂️"], version: "5.0" }, { emoji: "🧙‍♀️", category: 1, name: "woman mage", variations: ["🧙🏻‍♀️", "🧙🏼‍♀️", "🧙🏽‍♀️", "🧙🏾‍♀️", "🧙🏿‍♀️"], version: "5.0" }, { emoji: "🧚", category: 1, name: "fairy", variations: ["🧚🏻", "🧚🏼", "🧚🏽", "🧚🏾", "🧚🏿"], version: "5.0" }, { emoji: "🧚‍♂️", category: 1, name: "man fairy", variations: ["🧚🏻‍♂️", "🧚🏼‍♂️", "🧚🏽‍♂️", "🧚🏾‍♂️", "🧚🏿‍♂️"], version: "5.0" }, { emoji: "🧚‍♀️", category: 1, name: "woman fairy", variations: ["🧚🏻‍♀️", "🧚🏼‍♀️", "🧚🏽‍♀️", "🧚🏾‍♀️", "🧚🏿‍♀️"], version: "5.0" }, { emoji: "🧛", category: 1, name: "vampire", variations: ["🧛🏻", "🧛🏼", "🧛🏽", "🧛🏾", "🧛🏿"], version: "5.0" }, { emoji: "🧛‍♂️", category: 1, name: "man vampire", variations: ["🧛🏻‍♂️", "🧛🏼‍♂️", "🧛🏽‍♂️", "🧛🏾‍♂️", "🧛🏿‍♂️"], version: "5.0" }, { emoji: "🧛‍♀️", category: 1, name: "woman vampire", variations: ["🧛🏻‍♀️", "🧛🏼‍♀️", "🧛🏽‍♀️", "🧛🏾‍♀️", "🧛🏿‍♀️"], version: "5.0" }, { emoji: "🧜", category: 1, name: "merperson", variations: ["🧜🏻", "🧜🏼", "🧜🏽", "🧜🏾", "🧜🏿"], version: "5.0" }, { emoji: "🧜‍♂️", category: 1, name: "merman", variations: ["🧜🏻‍♂️", "🧜🏼‍♂️", "🧜🏽‍♂️", "🧜🏾‍♂️", "🧜🏿‍♂️"], version: "5.0" }, { emoji: "🧜‍♀️", category: 1, name: "mermaid", variations: ["🧜🏻‍♀️", "🧜🏼‍♀️", "🧜🏽‍♀️", "🧜🏾‍♀️", "🧜🏿‍♀️"], version: "5.0" }, { emoji: "🧝", category: 1, name: "elf", variations: ["🧝🏻", "🧝🏼", "🧝🏽", "🧝🏾", "🧝🏿"], version: "5.0" }, { emoji: "🧝‍♂️", category: 1, name: "man elf", variations: ["🧝🏻‍♂️", "🧝🏼‍♂️", "🧝🏽‍♂️", "🧝🏾‍♂️", "🧝🏿‍♂️"], version: "5.0" }, { emoji: "🧝‍♀️", category: 1, name: "woman elf", variations: ["🧝🏻‍♀️", "🧝🏼‍♀️", "🧝🏽‍♀️", "🧝🏾‍♀️", "🧝🏿‍♀️"], version: "5.0" }, { emoji: "🧞", category: 1, name: "genie", version: "5.0" }, { emoji: "🧞‍♂️", category: 1, name: "man genie", version: "5.0" }, { emoji: "🧞‍♀️", category: 1, name: "woman genie", version: "5.0" }, { emoji: "🧟", category: 1, name: "zombie", version: "5.0" }, { emoji: "🧟‍♂️", category: 1, name: "man zombie", version: "5.0" }, { emoji: "🧟‍♀️", category: 1, name: "woman zombie", version: "5.0" }, { emoji: "💆", category: 1, name: "person getting massage", variations: ["💆🏻", "💆🏼", "💆🏽", "💆🏾", "💆🏿"], version: "1.0" }, { emoji: "💆‍♂️", category: 1, name: "man getting massage", variations: ["💆🏻‍♂️", "💆🏼‍♂️", "💆🏽‍♂️", "💆🏾‍♂️", "💆🏿‍♂️"], version: "4.0" }, { emoji: "💆‍♀️", category: 1, name: "woman getting massage", variations: ["💆🏻‍♀️", "💆🏼‍♀️", "💆🏽‍♀️", "💆🏾‍♀️", "💆🏿‍♀️"], version: "4.0" }, { emoji: "💇", category: 1, name: "person getting haircut", variations: ["💇🏻", "💇🏼", "💇🏽", "💇🏾", "💇🏿"], version: "1.0" }, { emoji: "💇‍♂️", category: 1, name: "man getting haircut", variations: ["💇🏻‍♂️", "💇🏼‍♂️", "💇🏽‍♂️", "💇🏾‍♂️", "💇🏿‍♂️"], version: "4.0" }, { emoji: "💇‍♀️", category: 1, name: "woman getting haircut", variations: ["💇🏻‍♀️", "💇🏼‍♀️", "💇🏽‍♀️", "💇🏾‍♀️", "💇🏿‍♀️"], version: "4.0" }, { emoji: "🚶", category: 1, name: "person walking", variations: ["🚶🏻", "🚶🏼", "🚶🏽", "🚶🏾", "🚶🏿"], version: "1.0" }, { emoji: "🚶‍♂️", category: 1, name: "man walking", variations: ["🚶🏻‍♂️", "🚶🏼‍♂️", "🚶🏽‍♂️", "🚶🏾‍♂️", "🚶🏿‍♂️"], version: "4.0" }, { emoji: "🚶‍♀️", category: 1, name: "woman walking", variations: ["🚶🏻‍♀️", "🚶🏼‍♀️", "🚶🏽‍♀️", "🚶🏾‍♀️", "🚶🏿‍♀️"], version: "4.0" }, { emoji: "🧍", category: 1, name: "person standing", variations: ["🧍🏻", "🧍🏼", "🧍🏽", "🧍🏾", "🧍🏿"], version: "12.0" }, { emoji: "🧍‍♂️", category: 1, name: "man standing", variations: ["🧍🏻‍♂️", "🧍🏼‍♂️", "🧍🏽‍♂️", "🧍🏾‍♂️", "🧍🏿‍♂️"], version: "12.0" }, { emoji: "🧍‍♀️", category: 1, name: "woman standing", variations: ["🧍🏻‍♀️", "🧍🏼‍♀️", "🧍🏽‍♀️", "🧍🏾‍♀️", "🧍🏿‍♀️"], version: "12.0" }, { emoji: "🧎", category: 1, name: "person kneeling", variations: ["🧎🏻", "🧎🏼", "🧎🏽", "🧎🏾", "🧎🏿"], version: "12.0" }, { emoji: "🧎‍♂️", category: 1, name: "man kneeling", variations: ["🧎🏻‍♂️", "🧎🏼‍♂️", "🧎🏽‍♂️", "🧎🏾‍♂️", "🧎🏿‍♂️"], version: "12.0" }, { emoji: "🧎‍♀️", category: 1, name: "woman kneeling", variations: ["🧎🏻‍♀️", "🧎🏼‍♀️", "🧎🏽‍♀️", "🧎🏾‍♀️", "🧎🏿‍♀️"], version: "12.0" }, { emoji: "🧑‍🦯", category: 1, name: "person with white cane", variations: ["🧑🏻‍🦯", "🧑🏼‍🦯", "🧑🏽‍🦯", "🧑🏾‍🦯", "🧑🏿‍🦯"], version: "12.1" }, { emoji: "👨‍🦯", category: 1, name: "man with white cane", variations: ["👨🏻‍🦯", "👨🏼‍🦯", "👨🏽‍🦯", "👨🏾‍🦯", "👨🏿‍🦯"], version: "12.0" }, { emoji: "👩‍🦯", category: 1, name: "woman with white cane", variations: ["👩🏻‍🦯", "👩🏼‍🦯", "👩🏽‍🦯", "👩🏾‍🦯", "👩🏿‍🦯"], version: "12.0" }, { emoji: "🧑‍🦼", category: 1, name: "person in motorized wheelchair", variations: ["🧑🏻‍🦼", "🧑🏼‍🦼", "🧑🏽‍🦼", "🧑🏾‍🦼", "🧑🏿‍🦼"], version: "12.1" }, { emoji: "👨‍🦼", category: 1, name: "man in motorized wheelchair", variations: ["👨🏻‍🦼", "👨🏼‍🦼", "👨🏽‍🦼", "👨🏾‍🦼", "👨🏿‍🦼"], version: "12.0" }, { emoji: "👩‍🦼", category: 1, name: "woman in motorized wheelchair", variations: ["👩🏻‍🦼", "👩🏼‍🦼", "👩🏽‍🦼", "👩🏾‍🦼", "👩🏿‍🦼"], version: "12.0" }, { emoji: "🧑‍🦽", category: 1, name: "person in manual wheelchair", variations: ["🧑🏻‍🦽", "🧑🏼‍🦽", "🧑🏽‍🦽", "🧑🏾‍🦽", "🧑🏿‍🦽"], version: "12.1" }, { emoji: "👨‍🦽", category: 1, name: "man in manual wheelchair", variations: ["👨🏻‍🦽", "👨🏼‍🦽", "👨🏽‍🦽", "👨🏾‍🦽", "👨🏿‍🦽"], version: "12.0" }, { emoji: "👩‍🦽", category: 1, name: "woman in manual wheelchair", variations: ["👩🏻‍🦽", "👩🏼‍🦽", "👩🏽‍🦽", "👩🏾‍🦽", "👩🏿‍🦽"], version: "12.0" }, { emoji: "🏃", category: 1, name: "person running", variations: ["🏃🏻", "🏃🏼", "🏃🏽", "🏃🏾", "🏃🏿"], version: "1.0" }, { emoji: "🏃‍♂️", category: 1, name: "man running", variations: ["🏃🏻‍♂️", "🏃🏼‍♂️", "🏃🏽‍♂️", "🏃🏾‍♂️", "🏃🏿‍♂️"], version: "4.0" }, { emoji: "🏃‍♀️", category: 1, name: "woman running", variations: ["🏃🏻‍♀️", "🏃🏼‍♀️", "🏃🏽‍♀️", "🏃🏾‍♀️", "🏃🏿‍♀️"], version: "4.0" }, { emoji: "💃", category: 1, name: "woman dancing", variations: ["💃🏻", "💃🏼", "💃🏽", "💃🏾", "💃🏿"], version: "1.0" }, { emoji: "🕺", category: 1, name: "man dancing", variations: ["🕺🏻", "🕺🏼", "🕺🏽", "🕺🏾", "🕺🏿"], version: "3.0" }, { emoji: "🕴️", category: 1, name: "person in suit levitating", variations: ["🕴🏻", "🕴🏼", "🕴🏽", "🕴🏾", "🕴🏿"], version: "1.0" }, { emoji: "👯", category: 1, name: "people with bunny ears", version: "1.0" }, { emoji: "👯‍♂️", category: 1, name: "men with bunny ears", version: "4.0" }, { emoji: "👯‍♀️", category: 1, name: "women with bunny ears", version: "4.0" }, { emoji: "🧖", category: 1, name: "person in steamy room", variations: ["🧖🏻", "🧖🏼", "🧖🏽", "🧖🏾", "🧖🏿"], version: "5.0" }, { emoji: "🧖‍♂️", category: 1, name: "man in steamy room", variations: ["🧖🏻‍♂️", "🧖🏼‍♂️", "🧖🏽‍♂️", "🧖🏾‍♂️", "🧖🏿‍♂️"], version: "5.0" }, { emoji: "🧖‍♀️", category: 1, name: "woman in steamy room", variations: ["🧖🏻‍♀️", "🧖🏼‍♀️", "🧖🏽‍♀️", "🧖🏾‍♀️", "🧖🏿‍♀️"], version: "5.0" }, { emoji: "🧗", category: 1, name: "person climbing", variations: ["🧗🏻", "🧗🏼", "🧗🏽", "🧗🏾", "🧗🏿"], version: "5.0" }, { emoji: "🧗‍♂️", category: 1, name: "man climbing", variations: ["🧗🏻‍♂️", "🧗🏼‍♂️", "🧗🏽‍♂️", "🧗🏾‍♂️", "🧗🏿‍♂️"], version: "5.0" }, { emoji: "🧗‍♀️", category: 1, name: "woman climbing", variations: ["🧗🏻‍♀️", "🧗🏼‍♀️", "🧗🏽‍♀️", "🧗🏾‍♀️", "🧗🏿‍♀️"], version: "5.0" }, { emoji: "🤺", category: 1, name: "person fencing", version: "3.0" }, { emoji: "🏇", category: 1, name: "horse racing", variations: ["🏇🏻", "🏇🏼", "🏇🏽", "🏇🏾", "🏇🏿"], version: "1.0" }, { emoji: "⛷️", category: 1, name: "skier", version: "1.0" }, { emoji: "🏂", category: 1, name: "snowboarder", variations: ["🏂🏻", "🏂🏼", "🏂🏽", "🏂🏾", "🏂🏿"], version: "1.0" }, { emoji: "🏌️", category: 1, name: "person golfing", variations: ["🏌🏻", "🏌🏼", "🏌🏽", "🏌🏾", "🏌🏿"], version: "1.0" }, { emoji: "🏌️‍♂️", category: 1, name: "man golfing", variations: ["🏌🏻‍♂️", "🏌🏼‍♂️", "🏌🏽‍♂️", "🏌🏾‍♂️", "🏌🏿‍♂️"], version: "4.0" }, { emoji: "🏌️‍♀️", category: 1, name: "woman golfing", variations: ["🏌🏻‍♀️", "🏌🏼‍♀️", "🏌🏽‍♀️", "🏌🏾‍♀️", "🏌🏿‍♀️"], version: "4.0" }, { emoji: "🏄", category: 1, name: "person surfing", variations: ["🏄🏻", "🏄🏼", "🏄🏽", "🏄🏾", "🏄🏿"], version: "1.0" }, { emoji: "🏄‍♂️", category: 1, name: "man surfing", variations: ["🏄🏻‍♂️", "🏄🏼‍♂️", "🏄🏽‍♂️", "🏄🏾‍♂️", "🏄🏿‍♂️"], version: "4.0" }, { emoji: "🏄‍♀️", category: 1, name: "woman surfing", variations: ["🏄🏻‍♀️", "🏄🏼‍♀️", "🏄🏽‍♀️", "🏄🏾‍♀️", "🏄🏿‍♀️"], version: "4.0" }, { emoji: "🚣", category: 1, name: "person rowing boat", variations: ["🚣🏻", "🚣🏼", "🚣🏽", "🚣🏾", "🚣🏿"], version: "1.0" }, { emoji: "🚣‍♂️", category: 1, name: "man rowing boat", variations: ["🚣🏻‍♂️", "🚣🏼‍♂️", "🚣🏽‍♂️", "🚣🏾‍♂️", "🚣🏿‍♂️"], version: "4.0" }, { emoji: "🚣‍♀️", category: 1, name: "woman rowing boat", variations: ["🚣🏻‍♀️", "🚣🏼‍♀️", "🚣🏽‍♀️", "🚣🏾‍♀️", "🚣🏿‍♀️"], version: "4.0" }, { emoji: "🏊", category: 1, name: "person swimming", variations: ["🏊🏻", "🏊🏼", "🏊🏽", "🏊🏾", "🏊🏿"], version: "1.0" }, { emoji: "🏊‍♂️", category: 1, name: "man swimming", variations: ["🏊🏻‍♂️", "🏊🏼‍♂️", "🏊🏽‍♂️", "🏊🏾‍♂️", "🏊🏿‍♂️"], version: "4.0" }, { emoji: "🏊‍♀️", category: 1, name: "woman swimming", variations: ["🏊🏻‍♀️", "🏊🏼‍♀️", "🏊🏽‍♀️", "🏊🏾‍♀️", "🏊🏿‍♀️"], version: "4.0" }, { emoji: "⛹️", category: 1, name: "person bouncing ball", variations: ["⛹🏻", "⛹🏼", "⛹🏽", "⛹🏾", "⛹🏿"], version: "1.0" }, { emoji: "⛹️‍♂️", category: 1, name: "man bouncing ball", variations: ["⛹🏻‍♂️", "⛹🏼‍♂️", "⛹🏽‍♂️", "⛹🏾‍♂️", "⛹🏿‍♂️"], version: "4.0" }, { emoji: "⛹️‍♀️", category: 1, name: "woman bouncing ball", variations: ["⛹🏻‍♀️", "⛹🏼‍♀️", "⛹🏽‍♀️", "⛹🏾‍♀️", "⛹🏿‍♀️"], version: "4.0" }, { emoji: "🏋️", category: 1, name: "person lifting weights", variations: ["🏋🏻", "🏋🏼", "🏋🏽", "🏋🏾", "🏋🏿"], version: "1.0" }, { emoji: "🏋️‍♂️", category: 1, name: "man lifting weights", variations: ["🏋🏻‍♂️", "🏋🏼‍♂️", "🏋🏽‍♂️", "🏋🏾‍♂️", "🏋🏿‍♂️"], version: "4.0" }, { emoji: "🏋️‍♀️", category: 1, name: "woman lifting weights", variations: ["🏋🏻‍♀️", "🏋🏼‍♀️", "🏋🏽‍♀️", "🏋🏾‍♀️", "🏋🏿‍♀️"], version: "4.0" }, { emoji: "🚴", category: 1, name: "person biking", variations: ["🚴🏻", "🚴🏼", "🚴🏽", "🚴🏾", "🚴🏿"], version: "1.0" }, { emoji: "🚴‍♂️", category: 1, name: "man biking", variations: ["🚴🏻‍♂️", "🚴🏼‍♂️", "🚴🏽‍♂️", "🚴🏾‍♂️", "🚴🏿‍♂️"], version: "4.0" }, { emoji: "🚴‍♀️", category: 1, name: "woman biking", variations: ["🚴🏻‍♀️", "🚴🏼‍♀️", "🚴🏽‍♀️", "🚴🏾‍♀️", "🚴🏿‍♀️"], version: "4.0" }, { emoji: "🚵", category: 1, name: "person mountain biking", variations: ["🚵🏻", "🚵🏼", "🚵🏽", "🚵🏾", "🚵🏿"], version: "1.0" }, { emoji: "🚵‍♂️", category: 1, name: "man mountain biking", variations: ["🚵🏻‍♂️", "🚵🏼‍♂️", "🚵🏽‍♂️", "🚵🏾‍♂️", "🚵🏿‍♂️"], version: "4.0" }, { emoji: "🚵‍♀️", category: 1, name: "woman mountain biking", variations: ["🚵🏻‍♀️", "🚵🏼‍♀️", "🚵🏽‍♀️", "🚵🏾‍♀️", "🚵🏿‍♀️"], version: "4.0" }, { emoji: "🤸", category: 1, name: "person cartwheeling", variations: ["🤸🏻", "🤸🏼", "🤸🏽", "🤸🏾", "🤸🏿"], version: "3.0" }, { emoji: "🤸‍♂️", category: 1, name: "man cartwheeling", variations: ["🤸🏻‍♂️", "🤸🏼‍♂️", "🤸🏽‍♂️", "🤸🏾‍♂️", "🤸🏿‍♂️"], version: "4.0" }, { emoji: "🤸‍♀️", category: 1, name: "woman cartwheeling", variations: ["🤸🏻‍♀️", "🤸🏼‍♀️", "🤸🏽‍♀️", "🤸🏾‍♀️", "🤸🏿‍♀️"], version: "4.0" }, { emoji: "🤼", category: 1, name: "people wrestling", version: "3.0" }, { emoji: "🤼‍♂️", category: 1, name: "men wrestling", version: "4.0" }, { emoji: "🤼‍♀️", category: 1, name: "women wrestling", version: "4.0" }, { emoji: "🤽", category: 1, name: "person playing water polo", variations: ["🤽🏻", "🤽🏼", "🤽🏽", "🤽🏾", "🤽🏿"], version: "3.0" }, { emoji: "🤽‍♂️", category: 1, name: "man playing water polo", variations: ["🤽🏻‍♂️", "🤽🏼‍♂️", "🤽🏽‍♂️", "🤽🏾‍♂️", "🤽🏿‍♂️"], version: "4.0" }, { emoji: "🤽‍♀️", category: 1, name: "woman playing water polo", variations: ["🤽🏻‍♀️", "🤽🏼‍♀️", "🤽🏽‍♀️", "🤽🏾‍♀️", "🤽🏿‍♀️"], version: "4.0" }, { emoji: "🤾", category: 1, name: "person playing handball", variations: ["🤾🏻", "🤾🏼", "🤾🏽", "🤾🏾", "🤾🏿"], version: "3.0" }, { emoji: "🤾‍♂️", category: 1, name: "man playing handball", variations: ["🤾🏻‍♂️", "🤾🏼‍♂️", "🤾🏽‍♂️", "🤾🏾‍♂️", "🤾🏿‍♂️"], version: "4.0" }, { emoji: "🤾‍♀️", category: 1, name: "woman playing handball", variations: ["🤾🏻‍♀️", "🤾🏼‍♀️", "🤾🏽‍♀️", "🤾🏾‍♀️", "🤾🏿‍♀️"], version: "4.0" }, { emoji: "🤹", category: 1, name: "person juggling", variations: ["🤹🏻", "🤹🏼", "🤹🏽", "🤹🏾", "🤹🏿"], version: "3.0" }, { emoji: "🤹‍♂️", category: 1, name: "man juggling", variations: ["🤹🏻‍♂️", "🤹🏼‍♂️", "🤹🏽‍♂️", "🤹🏾‍♂️", "🤹🏿‍♂️"], version: "4.0" }, { emoji: "🤹‍♀️", category: 1, name: "woman juggling", variations: ["🤹🏻‍♀️", "🤹🏼‍♀️", "🤹🏽‍♀️", "🤹🏾‍♀️", "🤹🏿‍♀️"], version: "4.0" }, { emoji: "🧘", category: 1, name: "person in lotus position", variations: ["🧘🏻", "🧘🏼", "🧘🏽", "🧘🏾", "🧘🏿"], version: "5.0" }, { emoji: "🧘‍♂️", category: 1, name: "man in lotus position", variations: ["🧘🏻‍♂️", "🧘🏼‍♂️", "🧘🏽‍♂️", "🧘🏾‍♂️", "🧘🏿‍♂️"], version: "5.0" }, { emoji: "🧘‍♀️", category: 1, name: "woman in lotus position", variations: ["🧘🏻‍♀️", "🧘🏼‍♀️", "🧘🏽‍♀️", "🧘🏾‍♀️", "🧘🏿‍♀️"], version: "5.0" }, { emoji: "🛀", category: 1, name: "person taking bath", variations: ["🛀🏻", "🛀🏼", "🛀🏽", "🛀🏾", "🛀🏿"], version: "1.0" }, { emoji: "🛌", category: 1, name: "person in bed", variations: ["🛌🏻", "🛌🏼", "🛌🏽", "🛌🏾", "🛌🏿"], version: "1.0" }, { emoji: "🧑‍🤝‍🧑", category: 1, name: "people holding hands", variations: ["🧑🏻‍🤝‍🧑🏻", "🧑🏻‍🤝‍🧑🏼", "🧑🏻‍🤝‍🧑🏽", "🧑🏻‍🤝‍🧑🏾", "🧑🏻‍🤝‍🧑🏿", "🧑🏼‍🤝‍🧑🏻", "🧑🏼‍🤝‍🧑🏼", "🧑🏼‍🤝‍🧑🏽", "🧑🏼‍🤝‍🧑🏾", "🧑🏼‍🤝‍🧑🏿", "🧑🏽‍🤝‍🧑🏻", "🧑🏽‍🤝‍🧑🏼", "🧑🏽‍🤝‍🧑🏽", "🧑🏽‍🤝‍🧑🏾", "🧑🏽‍🤝‍🧑🏿", "🧑🏾‍🤝‍🧑🏻", "🧑🏾‍🤝‍🧑🏼", "🧑🏾‍🤝‍🧑🏽", "🧑🏾‍🤝‍🧑🏾", "🧑🏾‍🤝‍🧑🏿", "🧑🏿‍🤝‍🧑🏻", "🧑🏿‍🤝‍🧑🏼", "🧑🏿‍🤝‍🧑🏽", "🧑🏿‍🤝‍🧑🏾", "🧑🏿‍🤝‍🧑🏿"], version: "12.0" }, { emoji: "👭", category: 1, name: "women holding hands", variations: ["👭🏻", "👩🏻‍🤝‍👩🏼", "👩🏻‍🤝‍👩🏽", "👩🏻‍🤝‍👩🏾", "👩🏻‍🤝‍👩🏿", "👩🏼‍🤝‍👩🏻", "👭🏼", "👩🏼‍🤝‍👩🏽", "👩🏼‍🤝‍👩🏾", "👩🏼‍🤝‍👩🏿", "👩🏽‍🤝‍👩🏻", "👩🏽‍🤝‍👩🏼", "👭🏽", "👩🏽‍🤝‍👩🏾", "👩🏽‍🤝‍👩🏿", "👩🏾‍🤝‍👩🏻", "👩🏾‍🤝‍👩🏼", "👩🏾‍🤝‍👩🏽", "👭🏾", "👩🏾‍🤝‍👩🏿", "👩🏿‍🤝‍👩🏻", "👩🏿‍🤝‍👩🏼", "👩🏿‍🤝‍👩🏽", "👩🏿‍🤝‍👩🏾", "👭🏿"], version: "1.0" }, { emoji: "👫", category: 1, name: "woman and man holding hands", variations: ["👫🏻", "👩🏻‍🤝‍👨🏼", "👩🏻‍🤝‍👨🏽", "👩🏻‍🤝‍👨🏾", "👩🏻‍🤝‍👨🏿", "👩🏼‍🤝‍👨🏻", "👫🏼", "👩🏼‍🤝‍👨🏽", "👩🏼‍🤝‍👨🏾", "👩🏼‍🤝‍👨🏿", "👩🏽‍🤝‍👨🏻", "👩🏽‍🤝‍👨🏼", "👫🏽", "👩🏽‍🤝‍👨🏾", "👩🏽‍🤝‍👨🏿", "👩🏾‍🤝‍👨🏻", "👩🏾‍🤝‍👨🏼", "👩🏾‍🤝‍👨🏽", "👫🏾", "👩🏾‍🤝‍👨🏿", "👩🏿‍🤝‍👨🏻", "👩🏿‍🤝‍👨🏼", "👩🏿‍🤝‍👨🏽", "👩🏿‍🤝‍👨🏾", "👫🏿"], version: "1.0" }, { emoji: "👬", category: 1, name: "men holding hands", variations: ["👬🏻", "👨🏻‍🤝‍👨🏼", "👨🏻‍🤝‍👨🏽", "👨🏻‍🤝‍👨🏾", "👨🏻‍🤝‍👨🏿", "👨🏼‍🤝‍👨🏻", "👬🏼", "👨🏼‍🤝‍👨🏽", "👨🏼‍🤝‍👨🏾", "👨🏼‍🤝‍👨🏿", "👨🏽‍🤝‍👨🏻", "👨🏽‍🤝‍👨🏼", "👬🏽", "👨🏽‍🤝‍👨🏾", "👨🏽‍🤝‍👨🏿", "👨🏾‍🤝‍👨🏻", "👨🏾‍🤝‍👨🏼", "👨🏾‍🤝‍👨🏽", "👬🏾", "👨🏾‍🤝‍👨🏿", "👨🏿‍🤝‍👨🏻", "👨🏿‍🤝‍👨🏼", "👨🏿‍🤝‍👨🏽", "👨🏿‍🤝‍👨🏾", "👬🏿"], version: "1.0" }, { emoji: "💏", category: 1, name: "kiss", variations: ["👩‍❤️‍💋‍👨", "👨‍❤️‍💋‍👨", "👩‍❤️‍💋‍👩"], version: "1.0" }, { emoji: "💑", category: 1, name: "couple with heart", variations: ["👩‍❤️‍👨", "👨‍❤️‍👨", "👩‍❤️‍👩"], version: "1.0" }, { emoji: "👪", category: 1, name: "family", version: "1.0" }, { emoji: "👨‍👩‍👦", category: 1, name: "family: man, woman, boy", version: "2.0" }, { emoji: "👨‍👩‍👧", category: 1, name: "family: man, woman, girl", version: "2.0" }, { emoji: "👨‍👩‍👧‍👦", category: 1, name: "family: man, woman, girl, boy", version: "2.0" }, { emoji: "👨‍👩‍👦‍👦", category: 1, name: "family: man, woman, boy, boy", version: "2.0" }, { emoji: "👨‍👩‍👧‍👧", category: 1, name: "family: man, woman, girl, girl", version: "2.0" }, { emoji: "👨‍👨‍👦", category: 1, name: "family: man, man, boy", version: "2.0" }, { emoji: "👨‍👨‍👧", category: 1, name: "family: man, man, girl", version: "2.0" }, { emoji: "👨‍👨‍👧‍👦", category: 1, name: "family: man, man, girl, boy", version: "2.0" }, { emoji: "👨‍👨‍👦‍👦", category: 1, name: "family: man, man, boy, boy", version: "2.0" }, { emoji: "👨‍👨‍👧‍👧", category: 1, name: "family: man, man, girl, girl", version: "2.0" }, { emoji: "👩‍👩‍👦", category: 1, name: "family: woman, woman, boy", version: "2.0" }, { emoji: "👩‍👩‍👧", category: 1, name: "family: woman, woman, girl", version: "2.0" }, { emoji: "👩‍👩‍👧‍👦", category: 1, name: "family: woman, woman, girl, boy", version: "2.0" }, { emoji: "👩‍👩‍👦‍👦", category: 1, name: "family: woman, woman, boy, boy", version: "2.0" }, { emoji: "👩‍👩‍👧‍👧", category: 1, name: "family: woman, woman, girl, girl", version: "2.0" }, { emoji: "👨‍👦", category: 1, name: "family: man, boy", version: "4.0" }, { emoji: "👨‍👦‍👦", category: 1, name: "family: man, boy, boy", version: "4.0" }, { emoji: "👨‍👧", category: 1, name: "family: man, girl", version: "4.0" }, { emoji: "👨‍👧‍👦", category: 1, name: "family: man, girl, boy", version: "4.0" }, { emoji: "👨‍👧‍👧", category: 1, name: "family: man, girl, girl", version: "4.0" }, { emoji: "👩‍👦", category: 1, name: "family: woman, boy", version: "4.0" }, { emoji: "👩‍👦‍👦", category: 1, name: "family: woman, boy, boy", version: "4.0" }, { emoji: "👩‍👧", category: 1, name: "family: woman, girl", version: "4.0" }, { emoji: "👩‍👧‍👦", category: 1, name: "family: woman, girl, boy", version: "4.0" }, { emoji: "👩‍👧‍👧", category: 1, name: "family: woman, girl, girl", version: "4.0" }, { emoji: "🗣️", category: 1, name: "speaking head", version: "1.0" }, { emoji: "👤", category: 1, name: "bust in silhouette", version: "1.0" }, { emoji: "👥", category: 1, name: "busts in silhouette", version: "1.0" }, { emoji: "🫂", category: 1, name: "people hugging", version: "13.0" }, { emoji: "👣", category: 1, name: "footprints", version: "1.0" }, { emoji: "🐵", category: 2, name: "monkey face", version: "1.0" }, { emoji: "🐒", category: 2, name: "monkey", version: "1.0" }, { emoji: "🦍", category: 2, name: "gorilla", version: "3.0" }, { emoji: "🦧", category: 2, name: "orangutan", version: "12.0" }, { emoji: "🐶", category: 2, name: "dog face", version: "1.0" }, { emoji: "🐕", category: 2, name: "dog", version: "1.0" }, { emoji: "🦮", category: 2, name: "guide dog", version: "12.0" }, { emoji: "🐕‍🦺", category: 2, name: "service dog", version: "12.0" }, { emoji: "🐩", category: 2, name: "poodle", version: "1.0" }, { emoji: "🐺", category: 2, name: "wolf", version: "1.0" }, { emoji: "🦊", category: 2, name: "fox", version: "3.0" }, { emoji: "🦝", category: 2, name: "raccoon", version: "11.0" }, { emoji: "🐱", category: 2, name: "cat face", version: "1.0" }, { emoji: "🐈", category: 2, name: "cat", version: "1.0" }, { emoji: "🐈‍⬛", category: 2, name: "black cat", version: "13.0" }, { emoji: "🦁", category: 2, name: "lion", version: "1.0" }, { emoji: "🐯", category: 2, name: "tiger face", version: "1.0" }, { emoji: "🐅", category: 2, name: "tiger", version: "1.0" }, { emoji: "🐆", category: 2, name: "leopard", version: "1.0" }, { emoji: "🐴", category: 2, name: "horse face", version: "1.0" }, { emoji: "🐎", category: 2, name: "horse", version: "1.0" }, { emoji: "🦄", category: 2, name: "unicorn", version: "1.0" }, { emoji: "🦓", category: 2, name: "zebra", version: "5.0" }, { emoji: "🦌", category: 2, name: "deer", version: "3.0" }, { emoji: "🦬", category: 2, name: "bison", version: "13.0" }, { emoji: "🐮", category: 2, name: "cow face", version: "1.0" }, { emoji: "🐂", category: 2, name: "ox", version: "1.0" }, { emoji: "🐃", category: 2, name: "water buffalo", version: "1.0" }, { emoji: "🐄", category: 2, name: "cow", version: "1.0" }, { emoji: "🐷", category: 2, name: "pig face", version: "1.0" }, { emoji: "🐖", category: 2, name: "pig", version: "1.0" }, { emoji: "🐗", category: 2, name: "boar", version: "1.0" }, { emoji: "🐽", category: 2, name: "pig nose", version: "1.0" }, { emoji: "🐏", category: 2, name: "ram", version: "1.0" }, { emoji: "🐑", category: 2, name: "ewe", version: "1.0" }, { emoji: "🐐", category: 2, name: "goat", version: "1.0" }, { emoji: "🐪", category: 2, name: "camel", version: "1.0" }, { emoji: "🐫", category: 2, name: "two-hump camel", version: "1.0" }, { emoji: "🦙", category: 2, name: "llama", version: "11.0" }, { emoji: "🦒", category: 2, name: "giraffe", version: "5.0" }, { emoji: "🐘", category: 2, name: "elephant", version: "1.0" }, { emoji: "🦣", category: 2, name: "mammoth", version: "13.0" }, { emoji: "🦏", category: 2, name: "rhinoceros", version: "3.0" }, { emoji: "🦛", category: 2, name: "hippopotamus", version: "11.0" }, { emoji: "🐭", category: 2, name: "mouse face", version: "1.0" }, { emoji: "🐁", category: 2, name: "mouse", version: "1.0" }, { emoji: "🐀", category: 2, name: "rat", version: "1.0" }, { emoji: "🐹", category: 2, name: "hamster", version: "1.0" }, { emoji: "🐰", category: 2, name: "rabbit face", version: "1.0" }, { emoji: "🐇", category: 2, name: "rabbit", version: "1.0" }, { emoji: "🐿️", category: 2, name: "chipmunk", version: "1.0" }, { emoji: "🦫", category: 2, name: "beaver", version: "13.0" }, { emoji: "🦔", category: 2, name: "hedgehog", version: "5.0" }, { emoji: "🦇", category: 2, name: "bat", version: "3.0" }, { emoji: "🐻", category: 2, name: "bear", version: "1.0" }, { emoji: "🐻‍❄️", category: 2, name: "polar bear", version: "13.0" }, { emoji: "🐨", category: 2, name: "koala", version: "1.0" }, { emoji: "🐼", category: 2, name: "panda", version: "1.0" }, { emoji: "🦥", category: 2, name: "sloth", version: "12.0" }, { emoji: "🦦", category: 2, name: "otter", version: "12.0" }, { emoji: "🦨", category: 2, name: "skunk", version: "12.0" }, { emoji: "🦘", category: 2, name: "kangaroo", version: "11.0" }, { emoji: "🦡", category: 2, name: "badger", version: "11.0" }, { emoji: "🐾", category: 2, name: "paw prints", version: "1.0" }, { emoji: "🦃", category: 2, name: "turkey", version: "1.0" }, { emoji: "🐔", category: 2, name: "chicken", version: "1.0" }, { emoji: "🐓", category: 2, name: "rooster", version: "1.0" }, { emoji: "🐣", category: 2, name: "hatching chick", version: "1.0" }, { emoji: "🐤", category: 2, name: "baby chick", version: "1.0" }, { emoji: "🐥", category: 2, name: "front-facing baby chick", version: "1.0" }, { emoji: "🐦", category: 2, name: "bird", version: "1.0" }, { emoji: "🐧", category: 2, name: "penguin", version: "1.0" }, { emoji: "🕊️", category: 2, name: "dove", version: "1.0" }, { emoji: "🦅", category: 2, name: "eagle", version: "3.0" }, { emoji: "🦆", category: 2, name: "duck", version: "3.0" }, { emoji: "🦢", category: 2, name: "swan", version: "11.0" }, { emoji: "🦉", category: 2, name: "owl", version: "3.0" }, { emoji: "🦤", category: 2, name: "dodo", version: "13.0" }, { emoji: "🪶", category: 2, name: "feather", version: "13.0" }, { emoji: "🦩", category: 2, name: "flamingo", version: "12.0" }, { emoji: "🦚", category: 2, name: "peacock", version: "11.0" }, { emoji: "🦜", category: 2, name: "parrot", version: "11.0" }, { emoji: "🐸", category: 2, name: "frog", version: "1.0" }, { emoji: "🐊", category: 2, name: "crocodile", version: "1.0" }, { emoji: "🐢", category: 2, name: "turtle", version: "1.0" }, { emoji: "🦎", category: 2, name: "lizard", version: "3.0" }, { emoji: "🐍", category: 2, name: "snake", version: "1.0" }, { emoji: "🐲", category: 2, name: "dragon face", version: "1.0" }, { emoji: "🐉", category: 2, name: "dragon", version: "1.0" }, { emoji: "🦕", category: 2, name: "sauropod", version: "5.0" }, { emoji: "🦖", category: 2, name: "T-Rex", version: "5.0" }, { emoji: "🐳", category: 2, name: "spouting whale", version: "1.0" }, { emoji: "🐋", category: 2, name: "whale", version: "1.0" }, { emoji: "🐬", category: 2, name: "dolphin", version: "1.0" }, { emoji: "🦭", category: 2, name: "seal", version: "13.0" }, { emoji: "🐟", category: 2, name: "fish", version: "1.0" }, { emoji: "🐠", category: 2, name: "tropical fish", version: "1.0" }, { emoji: "🐡", category: 2, name: "blowfish", version: "1.0" }, { emoji: "🦈", category: 2, name: "shark", version: "3.0" }, { emoji: "🐙", category: 2, name: "octopus", version: "1.0" }, { emoji: "🐚", category: 2, name: "spiral shell", version: "1.0" }, { emoji: "🐌", category: 2, name: "snail", version: "1.0" }, { emoji: "🦋", category: 2, name: "butterfly", version: "3.0" }, { emoji: "🐛", category: 2, name: "bug", version: "1.0" }, { emoji: "🐜", category: 2, name: "ant", version: "1.0" }, { emoji: "🐝", category: 2, name: "honeybee", version: "1.0" }, { emoji: "🪲", category: 2, name: "beetle", version: "13.0" }, { emoji: "🐞", category: 2, name: "lady beetle", version: "1.0" }, { emoji: "🦗", category: 2, name: "cricket", version: "5.0" }, { emoji: "🪳", category: 2, name: "cockroach", version: "13.0" }, { emoji: "🕷️", category: 2, name: "spider", version: "1.0" }, { emoji: "🕸️", category: 2, name: "spider web", version: "1.0" }, { emoji: "🦂", category: 2, name: "scorpion", version: "1.0" }, { emoji: "🦟", category: 2, name: "mosquito", version: "11.0" }, { emoji: "🪰", category: 2, name: "fly", version: "13.0" }, { emoji: "🪱", category: 2, name: "worm", version: "13.0" }, { emoji: "🦠", category: 2, name: "microbe", version: "11.0" }, { emoji: "💐", category: 2, name: "bouquet", version: "1.0" }, { emoji: "🌸", category: 2, name: "cherry blossom", version: "1.0" }, { emoji: "💮", category: 2, name: "white flower", version: "1.0" }, { emoji: "🏵️", category: 2, name: "rosette", version: "1.0" }, { emoji: "🌹", category: 2, name: "rose", version: "1.0" }, { emoji: "🥀", category: 2, name: "wilted flower", version: "3.0" }, { emoji: "🌺", category: 2, name: "hibiscus", version: "1.0" }, { emoji: "🌻", category: 2, name: "sunflower", version: "1.0" }, { emoji: "🌼", category: 2, name: "blossom", version: "1.0" }, { emoji: "🌷", category: 2, name: "tulip", version: "1.0" }, { emoji: "🌱", category: 2, name: "seedling", version: "1.0" }, { emoji: "🪴", category: 2, name: "potted plant", version: "13.0" }, { emoji: "🌲", category: 2, name: "evergreen tree", version: "1.0" }, { emoji: "🌳", category: 2, name: "deciduous tree", version: "1.0" }, { emoji: "🌴", category: 2, name: "palm tree", version: "1.0" }, { emoji: "🌵", category: 2, name: "cactus", version: "1.0" }, { emoji: "🌾", category: 2, name: "sheaf of rice", version: "1.0" }, { emoji: "🌿", category: 2, name: "herb", version: "1.0" }, { emoji: "☘️", category: 2, name: "shamrock", version: "1.0" }, { emoji: "🍀", category: 2, name: "four leaf clover", version: "1.0" }, { emoji: "🍁", category: 2, name: "maple leaf", version: "1.0" }, { emoji: "🍂", category: 2, name: "fallen leaf", version: "1.0" }, { emoji: "🍃", category: 2, name: "leaf fluttering in wind", version: "1.0" }, { emoji: "🍇", category: 3, name: "grapes", version: "1.0" }, { emoji: "🍈", category: 3, name: "melon", version: "1.0" }, { emoji: "🍉", category: 3, name: "watermelon", version: "1.0" }, { emoji: "🍊", category: 3, name: "tangerine", version: "1.0" }, { emoji: "🍋", category: 3, name: "lemon", version: "1.0" }, { emoji: "🍌", category: 3, name: "banana", version: "1.0" }, { emoji: "🍍", category: 3, name: "pineapple", version: "1.0" }, { emoji: "🥭", category: 3, name: "mango", version: "11.0" }, { emoji: "🍎", category: 3, name: "red apple", version: "1.0" }, { emoji: "🍏", category: 3, name: "green apple", version: "1.0" }, { emoji: "🍐", category: 3, name: "pear", version: "1.0" }, { emoji: "🍑", category: 3, name: "peach", version: "1.0" }, { emoji: "🍒", category: 3, name: "cherries", version: "1.0" }, { emoji: "🍓", category: 3, name: "strawberry", version: "1.0" }, { emoji: "🫐", category: 3, name: "blueberries", version: "13.0" }, { emoji: "🥝", category: 3, name: "kiwi fruit", version: "3.0" }, { emoji: "🍅", category: 3, name: "tomato", version: "1.0" }, { emoji: "🫒", category: 3, name: "olive", version: "13.0" }, { emoji: "🥥", category: 3, name: "coconut", version: "5.0" }, { emoji: "🥑", category: 3, name: "avocado", version: "3.0" }, { emoji: "🍆", category: 3, name: "eggplant", version: "1.0" }, { emoji: "🥔", category: 3, name: "potato", version: "3.0" }, { emoji: "🥕", category: 3, name: "carrot", version: "3.0" }, { emoji: "🌽", category: 3, name: "ear of corn", version: "1.0" }, { emoji: "🌶️", category: 3, name: "hot pepper", version: "1.0" }, { emoji: "🫑", category: 3, name: "bell pepper", version: "13.0" }, { emoji: "🥒", category: 3, name: "cucumber", version: "3.0" }, { emoji: "🥬", category: 3, name: "leafy green", version: "11.0" }, { emoji: "🥦", category: 3, name: "broccoli", version: "5.0" }, { emoji: "🧄", category: 3, name: "garlic", version: "12.0" }, { emoji: "🧅", category: 3, name: "onion", version: "12.0" }, { emoji: "🍄", category: 3, name: "mushroom", version: "1.0" }, { emoji: "🥜", category: 3, name: "peanuts", version: "3.0" }, { emoji: "🌰", category: 3, name: "chestnut", version: "1.0" }, { emoji: "🍞", category: 3, name: "bread", version: "1.0" }, { emoji: "🥐", category: 3, name: "croissant", version: "3.0" }, { emoji: "🥖", category: 3, name: "baguette bread", version: "3.0" }, { emoji: "🫓", category: 3, name: "flatbread", version: "13.0" }, { emoji: "🥨", category: 3, name: "pretzel", version: "5.0" }, { emoji: "🥯", category: 3, name: "bagel", version: "11.0" }, { emoji: "🥞", category: 3, name: "pancakes", version: "3.0" }, { emoji: "🧇", category: 3, name: "waffle", version: "12.0" }, { emoji: "🧀", category: 3, name: "cheese wedge", version: "1.0" }, { emoji: "🍖", category: 3, name: "meat on bone", version: "1.0" }, { emoji: "🍗", category: 3, name: "poultry leg", version: "1.0" }, { emoji: "🥩", category: 3, name: "cut of meat", version: "5.0" }, { emoji: "🥓", category: 3, name: "bacon", version: "3.0" }, { emoji: "🍔", category: 3, name: "hamburger", version: "1.0" }, { emoji: "🍟", category: 3, name: "french fries", version: "1.0" }, { emoji: "🍕", category: 3, name: "pizza", version: "1.0" }, { emoji: "🌭", category: 3, name: "hot dog", version: "1.0" }, { emoji: "🥪", category: 3, name: "sandwich", version: "5.0" }, { emoji: "🌮", category: 3, name: "taco", version: "1.0" }, { emoji: "🌯", category: 3, name: "burrito", version: "1.0" }, { emoji: "🫔", category: 3, name: "tamale", version: "13.0" }, { emoji: "🥙", category: 3, name: "stuffed flatbread", version: "3.0" }, { emoji: "🧆", category: 3, name: "falafel", version: "12.0" }, { emoji: "🥚", category: 3, name: "egg", version: "3.0" }, { emoji: "🍳", category: 3, name: "cooking", version: "1.0" }, { emoji: "🥘", category: 3, name: "shallow pan of food", version: "3.0" }, { emoji: "🍲", category: 3, name: "pot of food", version: "1.0" }, { emoji: "🫕", category: 3, name: "fondue", version: "13.0" }, { emoji: "🥣", category: 3, name: "bowl with spoon", version: "5.0" }, { emoji: "🥗", category: 3, name: "green salad", version: "3.0" }, { emoji: "🍿", category: 3, name: "popcorn", version: "1.0" }, { emoji: "🧈", category: 3, name: "butter", version: "12.0" }, { emoji: "🧂", category: 3, name: "salt", version: "11.0" }, { emoji: "🥫", category: 3, name: "canned food", version: "5.0" }, { emoji: "🍱", category: 3, name: "bento box", version: "1.0" }, { emoji: "🍘", category: 3, name: "rice cracker", version: "1.0" }, { emoji: "🍙", category: 3, name: "rice ball", version: "1.0" }, { emoji: "🍚", category: 3, name: "cooked rice", version: "1.0" }, { emoji: "🍛", category: 3, name: "curry rice", version: "1.0" }, { emoji: "🍜", category: 3, name: "steaming bowl", version: "1.0" }, { emoji: "🍝", category: 3, name: "spaghetti", version: "1.0" }, { emoji: "🍠", category: 3, name: "roasted sweet potato", version: "1.0" }, { emoji: "🍢", category: 3, name: "oden", version: "1.0" }, { emoji: "🍣", category: 3, name: "sushi", version: "1.0" }, { emoji: "🍤", category: 3, name: "fried shrimp", version: "1.0" }, { emoji: "🍥", category: 3, name: "fish cake with swirl", version: "1.0" }, { emoji: "🥮", category: 3, name: "moon cake", version: "11.0" }, { emoji: "🍡", category: 3, name: "dango", version: "1.0" }, { emoji: "🥟", category: 3, name: "dumpling", version: "5.0" }, { emoji: "🥠", category: 3, name: "fortune cookie", version: "5.0" }, { emoji: "🥡", category: 3, name: "takeout box", version: "5.0" }, { emoji: "🦀", category: 3, name: "crab", version: "1.0" }, { emoji: "🦞", category: 3, name: "lobster", version: "11.0" }, { emoji: "🦐", category: 3, name: "shrimp", version: "3.0" }, { emoji: "🦑", category: 3, name: "squid", version: "3.0" }, { emoji: "🦪", category: 3, name: "oyster", version: "12.0" }, { emoji: "🍦", category: 3, name: "soft ice cream", version: "1.0" }, { emoji: "🍧", category: 3, name: "shaved ice", version: "1.0" }, { emoji: "🍨", category: 3, name: "ice cream", version: "1.0" }, { emoji: "🍩", category: 3, name: "doughnut", version: "1.0" }, { emoji: "🍪", category: 3, name: "cookie", version: "1.0" }, { emoji: "🎂", category: 3, name: "birthday cake", version: "1.0" }, { emoji: "🍰", category: 3, name: "shortcake", version: "1.0" }, { emoji: "🧁", category: 3, name: "cupcake", version: "11.0" }, { emoji: "🥧", category: 3, name: "pie", version: "5.0" }, { emoji: "🍫", category: 3, name: "chocolate bar", version: "1.0" }, { emoji: "🍬", category: 3, name: "candy", version: "1.0" }, { emoji: "🍭", category: 3, name: "lollipop", version: "1.0" }, { emoji: "🍮", category: 3, name: "custard", version: "1.0" }, { emoji: "🍯", category: 3, name: "honey pot", version: "1.0" }, { emoji: "🍼", category: 3, name: "baby bottle", version: "1.0" }, { emoji: "🥛", category: 3, name: "glass of milk", version: "3.0" }, { emoji: "☕", category: 3, name: "hot beverage", version: "1.0" }, { emoji: "🫖", category: 3, name: "teapot", version: "13.0" }, { emoji: "🍵", category: 3, name: "teacup without handle", version: "1.0" }, { emoji: "🍶", category: 3, name: "sake", version: "1.0" }, { emoji: "🍾", category: 3, name: "bottle with popping cork", version: "1.0" }, { emoji: "🍷", category: 3, name: "wine glass", version: "1.0" }, { emoji: "🍸", category: 3, name: "cocktail glass", version: "1.0" }, { emoji: "🍹", category: 3, name: "tropical drink", version: "1.0" }, { emoji: "🍺", category: 3, name: "beer mug", version: "1.0" }, { emoji: "🍻", category: 3, name: "clinking beer mugs", version: "1.0" }, { emoji: "🥂", category: 3, name: "clinking glasses", version: "3.0" }, { emoji: "🥃", category: 3, name: "tumbler glass", version: "3.0" }, { emoji: "🥤", category: 3, name: "cup with straw", version: "5.0" }, { emoji: "🧋", category: 3, name: "bubble tea", version: "13.0" }, { emoji: "🧃", category: 3, name: "beverage box", version: "12.0" }, { emoji: "🧉", category: 3, name: "mate", version: "12.0" }, { emoji: "🧊", category: 3, name: "ice", version: "12.0" }, { emoji: "🥢", category: 3, name: "chopsticks", version: "5.0" }, { emoji: "🍽️", category: 3, name: "fork and knife with plate", version: "1.0" }, { emoji: "🍴", category: 3, name: "fork and knife", version: "1.0" }, { emoji: "🥄", category: 3, name: "spoon", version: "3.0" }, { emoji: "🔪", category: 3, name: "kitchen knife", version: "1.0" }, { emoji: "🏺", category: 3, name: "amphora", version: "1.0" }, { emoji: "🌍", category: 4, name: "globe showing Europe-Africa", version: "1.0" }, { emoji: "🌎", category: 4, name: "globe showing Americas", version: "1.0" }, { emoji: "🌏", category: 4, name: "globe showing Asia-Australia", version: "1.0" }, { emoji: "🌐", category: 4, name: "globe with meridians", version: "1.0" }, { emoji: "🗺️", category: 4, name: "world map", version: "1.0" }, { emoji: "🗾", category: 4, name: "map of Japan", version: "1.0" }, { emoji: "🧭", category: 4, name: "compass", version: "11.0" }, { emoji: "🏔️", category: 4, name: "snow-capped mountain", version: "1.0" }, { emoji: "⛰️", category: 4, name: "mountain", version: "1.0" }, { emoji: "🌋", category: 4, name: "volcano", version: "1.0" }, { emoji: "🗻", category: 4, name: "mount fuji", version: "1.0" }, { emoji: "🏕️", category: 4, name: "camping", version: "1.0" }, { emoji: "🏖️", category: 4, name: "beach with umbrella", version: "1.0" }, { emoji: "🏜️", category: 4, name: "desert", version: "1.0" }, { emoji: "🏝️", category: 4, name: "desert island", version: "1.0" }, { emoji: "🏞️", category: 4, name: "national park", version: "1.0" }, { emoji: "🏟️", category: 4, name: "stadium", version: "1.0" }, { emoji: "🏛️", category: 4, name: "classical building", version: "1.0" }, { emoji: "🏗️", category: 4, name: "building construction", version: "1.0" }, { emoji: "🧱", category: 4, name: "brick", version: "11.0" }, { emoji: "🪨", category: 4, name: "rock", version: "13.0" }, { emoji: "🪵", category: 4, name: "wood", version: "13.0" }, { emoji: "🛖", category: 4, name: "hut", version: "13.0" }, { emoji: "🏘️", category: 4, name: "houses", version: "1.0" }, { emoji: "🏚️", category: 4, name: "derelict house", version: "1.0" }, { emoji: "🏠", category: 4, name: "house", version: "1.0" }, { emoji: "🏡", category: 4, name: "house with garden", version: "1.0" }, { emoji: "🏢", category: 4, name: "office building", version: "1.0" }, { emoji: "🏣", category: 4, name: "Japanese post office", version: "1.0" }, { emoji: "🏤", category: 4, name: "post office", version: "1.0" }, { emoji: "🏥", category: 4, name: "hospital", version: "1.0" }, { emoji: "🏦", category: 4, name: "bank", version: "1.0" }, { emoji: "🏨", category: 4, name: "hotel", version: "1.0" }, { emoji: "🏩", category: 4, name: "love hotel", version: "1.0" }, { emoji: "🏪", category: 4, name: "convenience store", version: "1.0" }, { emoji: "🏫", category: 4, name: "school", version: "1.0" }, { emoji: "🏬", category: 4, name: "department store", version: "1.0" }, { emoji: "🏭", category: 4, name: "factory", version: "1.0" }, { emoji: "🏯", category: 4, name: "Japanese castle", version: "1.0" }, { emoji: "🏰", category: 4, name: "castle", version: "1.0" }, { emoji: "💒", category: 4, name: "wedding", version: "1.0" }, { emoji: "🗼", category: 4, name: "Tokyo tower", version: "1.0" }, { emoji: "🗽", category: 4, name: "Statue of Liberty", version: "1.0" }, { emoji: "⛪", category: 4, name: "church", version: "1.0" }, { emoji: "🕌", category: 4, name: "mosque", version: "1.0" }, { emoji: "🛕", category: 4, name: "hindu temple", version: "12.0" }, { emoji: "🕍", category: 4, name: "synagogue", version: "1.0" }, { emoji: "⛩️", category: 4, name: "shinto shrine", version: "1.0" }, { emoji: "🕋", category: 4, name: "kaaba", version: "1.0" }, { emoji: "⛲", category: 4, name: "fountain", version: "1.0" }, { emoji: "⛺", category: 4, name: "tent", version: "1.0" }, { emoji: "🌁", category: 4, name: "foggy", version: "1.0" }, { emoji: "🌃", category: 4, name: "night with stars", version: "1.0" }, { emoji: "🏙️", category: 4, name: "cityscape", version: "1.0" }, { emoji: "🌄", category: 4, name: "sunrise over mountains", version: "1.0" }, { emoji: "🌅", category: 4, name: "sunrise", version: "1.0" }, { emoji: "🌆", category: 4, name: "cityscape at dusk", version: "1.0" }, { emoji: "🌇", category: 4, name: "sunset", version: "1.0" }, { emoji: "🌉", category: 4, name: "bridge at night", version: "1.0" }, { emoji: "♨️", category: 4, name: "hot springs", version: "1.0" }, { emoji: "🎠", category: 4, name: "carousel horse", version: "1.0" }, { emoji: "🎡", category: 4, name: "ferris wheel", version: "1.0" }, { emoji: "🎢", category: 4, name: "roller coaster", version: "1.0" }, { emoji: "💈", category: 4, name: "barber pole", version: "1.0" }, { emoji: "🎪", category: 4, name: "circus tent", version: "1.0" }, { emoji: "🚂", category: 4, name: "locomotive", version: "1.0" }, { emoji: "🚃", category: 4, name: "railway car", version: "1.0" }, { emoji: "🚄", category: 4, name: "high-speed train", version: "1.0" }, { emoji: "🚅", category: 4, name: "bullet train", version: "1.0" }, { emoji: "🚆", category: 4, name: "train", version: "1.0" }, { emoji: "🚇", category: 4, name: "metro", version: "1.0" }, { emoji: "🚈", category: 4, name: "light rail", version: "1.0" }, { emoji: "🚉", category: 4, name: "station", version: "1.0" }, { emoji: "🚊", category: 4, name: "tram", version: "1.0" }, { emoji: "🚝", category: 4, name: "monorail", version: "1.0" }, { emoji: "🚞", category: 4, name: "mountain railway", version: "1.0" }, { emoji: "🚋", category: 4, name: "tram car", version: "1.0" }, { emoji: "🚌", category: 4, name: "bus", version: "1.0" }, { emoji: "🚍", category: 4, name: "oncoming bus", version: "1.0" }, { emoji: "🚎", category: 4, name: "trolleybus", version: "1.0" }, { emoji: "🚐", category: 4, name: "minibus", version: "1.0" }, { emoji: "🚑", category: 4, name: "ambulance", version: "1.0" }, { emoji: "🚒", category: 4, name: "fire engine", version: "1.0" }, { emoji: "🚓", category: 4, name: "police car", version: "1.0" }, { emoji: "🚔", category: 4, name: "oncoming police car", version: "1.0" }, { emoji: "🚕", category: 4, name: "taxi", version: "1.0" }, { emoji: "🚖", category: 4, name: "oncoming taxi", version: "1.0" }, { emoji: "🚗", category: 4, name: "automobile", version: "1.0" }, { emoji: "🚘", category: 4, name: "oncoming automobile", version: "1.0" }, { emoji: "🚙", category: 4, name: "sport utility vehicle", version: "1.0" }, { emoji: "🛻", category: 4, name: "pickup truck", version: "13.0" }, { emoji: "🚚", category: 4, name: "delivery truck", version: "1.0" }, { emoji: "🚛", category: 4, name: "articulated lorry", version: "1.0" }, { emoji: "🚜", category: 4, name: "tractor", version: "1.0" }, { emoji: "🏎️", category: 4, name: "racing car", version: "1.0" }, { emoji: "🏍️", category: 4, name: "motorcycle", version: "1.0" }, { emoji: "🛵", category: 4, name: "motor scooter", version: "3.0" }, { emoji: "🦽", category: 4, name: "manual wheelchair", version: "12.0" }, { emoji: "🦼", category: 4, name: "motorized wheelchair", version: "12.0" }, { emoji: "🛺", category: 4, name: "auto rickshaw", version: "12.0" }, { emoji: "🚲", category: 4, name: "bicycle", version: "1.0" }, { emoji: "🛴", category: 4, name: "kick scooter", version: "3.0" }, { emoji: "🛹", category: 4, name: "skateboard", version: "11.0" }, { emoji: "🛼", category: 4, name: "roller skate", version: "13.0" }, { emoji: "🚏", category: 4, name: "bus stop", version: "1.0" }, { emoji: "🛣️", category: 4, name: "motorway", version: "1.0" }, { emoji: "🛤️", category: 4, name: "railway track", version: "1.0" }, { emoji: "🛢️", category: 4, name: "oil drum", version: "1.0" }, { emoji: "⛽", category: 4, name: "fuel pump", version: "1.0" }, { emoji: "🚨", category: 4, name: "police car light", version: "1.0" }, { emoji: "🚥", category: 4, name: "horizontal traffic light", version: "1.0" }, { emoji: "🚦", category: 4, name: "vertical traffic light", version: "1.0" }, { emoji: "🛑", category: 4, name: "stop sign", version: "3.0" }, { emoji: "🚧", category: 4, name: "construction", version: "1.0" }, { emoji: "⚓", category: 4, name: "anchor", version: "1.0" }, { emoji: "⛵", category: 4, name: "sailboat", version: "1.0" }, { emoji: "🛶", category: 4, name: "canoe", version: "3.0" }, { emoji: "🚤", category: 4, name: "speedboat", version: "1.0" }, { emoji: "🛳️", category: 4, name: "passenger ship", version: "1.0" }, { emoji: "⛴️", category: 4, name: "ferry", version: "1.0" }, { emoji: "🛥️", category: 4, name: "motor boat", version: "1.0" }, { emoji: "🚢", category: 4, name: "ship", version: "1.0" }, { emoji: "✈️", category: 4, name: "airplane", version: "1.0" }, { emoji: "🛩️", category: 4, name: "small airplane", version: "1.0" }, { emoji: "🛫", category: 4, name: "airplane departure", version: "1.0" }, { emoji: "🛬", category: 4, name: "airplane arrival", version: "1.0" }, { emoji: "🪂", category: 4, name: "parachute", version: "12.0" }, { emoji: "💺", category: 4, name: "seat", version: "1.0" }, { emoji: "🚁", category: 4, name: "helicopter", version: "1.0" }, { emoji: "🚟", category: 4, name: "suspension railway", version: "1.0" }, { emoji: "🚠", category: 4, name: "mountain cableway", version: "1.0" }, { emoji: "🚡", category: 4, name: "aerial tramway", version: "1.0" }, { emoji: "🛰️", category: 4, name: "satellite", version: "1.0" }, { emoji: "🚀", category: 4, name: "rocket", version: "1.0" }, { emoji: "🛸", category: 4, name: "flying saucer", version: "5.0" }, { emoji: "🛎️", category: 4, name: "bellhop bell", version: "1.0" }, { emoji: "🧳", category: 4, name: "luggage", version: "11.0" }, { emoji: "⌛", category: 4, name: "hourglass done", version: "1.0" }, { emoji: "⏳", category: 4, name: "hourglass not done", version: "1.0" }, { emoji: "⌚", category: 4, name: "watch", version: "1.0" }, { emoji: "⏰", category: 4, name: "alarm clock", version: "1.0" }, { emoji: "⏱️", category: 4, name: "stopwatch", version: "1.0" }, { emoji: "⏲️", category: 4, name: "timer clock", version: "1.0" }, { emoji: "🕰️", category: 4, name: "mantelpiece clock", version: "1.0" }, { emoji: "🕛", category: 4, name: "twelve o’clock", version: "1.0" }, { emoji: "🕧", category: 4, name: "twelve-thirty", version: "1.0" }, { emoji: "🕐", category: 4, name: "one o’clock", version: "1.0" }, { emoji: "🕜", category: 4, name: "one-thirty", version: "1.0" }, { emoji: "🕑", category: 4, name: "two o’clock", version: "1.0" }, { emoji: "🕝", category: 4, name: "two-thirty", version: "1.0" }, { emoji: "🕒", category: 4, name: "three o’clock", version: "1.0" }, { emoji: "🕞", category: 4, name: "three-thirty", version: "1.0" }, { emoji: "🕓", category: 4, name: "four o’clock", version: "1.0" }, { emoji: "🕟", category: 4, name: "four-thirty", version: "1.0" }, { emoji: "🕔", category: 4, name: "five o’clock", version: "1.0" }, { emoji: "🕠", category: 4, name: "five-thirty", version: "1.0" }, { emoji: "🕕", category: 4, name: "six o’clock", version: "1.0" }, { emoji: "🕡", category: 4, name: "six-thirty", version: "1.0" }, { emoji: "🕖", category: 4, name: "seven o’clock", version: "1.0" }, { emoji: "🕢", category: 4, name: "seven-thirty", version: "1.0" }, { emoji: "🕗", category: 4, name: "eight o’clock", version: "1.0" }, { emoji: "🕣", category: 4, name: "eight-thirty", version: "1.0" }, { emoji: "🕘", category: 4, name: "nine o’clock", version: "1.0" }, { emoji: "🕤", category: 4, name: "nine-thirty", version: "1.0" }, { emoji: "🕙", category: 4, name: "ten o’clock", version: "1.0" }, { emoji: "🕥", category: 4, name: "ten-thirty", version: "1.0" }, { emoji: "🕚", category: 4, name: "eleven o’clock", version: "1.0" }, { emoji: "🕦", category: 4, name: "eleven-thirty", version: "1.0" }, { emoji: "🌑", category: 4, name: "new moon", version: "1.0" }, { emoji: "🌒", category: 4, name: "waxing crescent moon", version: "1.0" }, { emoji: "🌓", category: 4, name: "first quarter moon", version: "1.0" }, { emoji: "🌔", category: 4, name: "waxing gibbous moon", version: "1.0" }, { emoji: "🌕", category: 4, name: "full moon", version: "1.0" }, { emoji: "🌖", category: 4, name: "waning gibbous moon", version: "1.0" }, { emoji: "🌗", category: 4, name: "last quarter moon", version: "1.0" }, { emoji: "🌘", category: 4, name: "waning crescent moon", version: "1.0" }, { emoji: "🌙", category: 4, name: "crescent moon", version: "1.0" }, { emoji: "🌚", category: 4, name: "new moon face", version: "1.0" }, { emoji: "🌛", category: 4, name: "first quarter moon face", version: "1.0" }, { emoji: "🌜", category: 4, name: "last quarter moon face", version: "1.0" }, { emoji: "🌡️", category: 4, name: "thermometer", version: "1.0" }, { emoji: "☀️", category: 4, name: "sun", version: "1.0" }, { emoji: "🌝", category: 4, name: "full moon face", version: "1.0" }, { emoji: "🌞", category: 4, name: "sun with face", version: "1.0" }, { emoji: "🪐", category: 4, name: "ringed planet", version: "12.0" }, { emoji: "⭐", category: 4, name: "star", version: "1.0" }, { emoji: "🌟", category: 4, name: "glowing star", version: "1.0" }, { emoji: "🌠", category: 4, name: "shooting star", version: "1.0" }, { emoji: "🌌", category: 4, name: "milky way", version: "1.0" }, { emoji: "☁️", category: 4, name: "cloud", version: "1.0" }, { emoji: "⛅", category: 4, name: "sun behind cloud", version: "1.0" }, { emoji: "⛈️", category: 4, name: "cloud with lightning and rain", version: "1.0" }, { emoji: "🌤️", category: 4, name: "sun behind small cloud", version: "1.0" }, { emoji: "🌥️", category: 4, name: "sun behind large cloud", version: "1.0" }, { emoji: "🌦️", category: 4, name: "sun behind rain cloud", version: "1.0" }, { emoji: "🌧️", category: 4, name: "cloud with rain", version: "1.0" }, { emoji: "🌨️", category: 4, name: "cloud with snow", version: "1.0" }, { emoji: "🌩️", category: 4, name: "cloud with lightning", version: "1.0" }, { emoji: "🌪️", category: 4, name: "tornado", version: "1.0" }, { emoji: "🌫️", category: 4, name: "fog", version: "1.0" }, { emoji: "🌬️", category: 4, name: "wind face", version: "1.0" }, { emoji: "🌀", category: 4, name: "cyclone", version: "1.0" }, { emoji: "🌈", category: 4, name: "rainbow", version: "1.0" }, { emoji: "🌂", category: 4, name: "closed umbrella", version: "1.0" }, { emoji: "☂️", category: 4, name: "umbrella", version: "1.0" }, { emoji: "☔", category: 4, name: "umbrella with rain drops", version: "1.0" }, { emoji: "⛱️", category: 4, name: "umbrella on ground", version: "1.0" }, { emoji: "⚡", category: 4, name: "high voltage", version: "1.0" }, { emoji: "❄️", category: 4, name: "snowflake", version: "1.0" }, { emoji: "☃️", category: 4, name: "snowman", version: "1.0" }, { emoji: "⛄", category: 4, name: "snowman without snow", version: "1.0" }, { emoji: "☄️", category: 4, name: "comet", version: "1.0" }, { emoji: "🔥", category: 4, name: "fire", version: "1.0" }, { emoji: "💧", category: 4, name: "droplet", version: "1.0" }, { emoji: "🌊", category: 4, name: "water wave", version: "1.0" }, { emoji: "🎃", category: 5, name: "jack-o-lantern", version: "1.0" }, { emoji: "🎄", category: 5, name: "Christmas tree", version: "1.0" }, { emoji: "🎆", category: 5, name: "fireworks", version: "1.0" }, { emoji: "🎇", category: 5, name: "sparkler", version: "1.0" }, { emoji: "🧨", category: 5, name: "firecracker", version: "11.0" }, { emoji: "✨", category: 5, name: "sparkles", version: "1.0" }, { emoji: "🎈", category: 5, name: "balloon", version: "1.0" }, { emoji: "🎉", category: 5, name: "party popper", version: "1.0" }, { emoji: "🎊", category: 5, name: "confetti ball", version: "1.0" }, { emoji: "🎋", category: 5, name: "tanabata tree", version: "1.0" }, { emoji: "🎍", category: 5, name: "pine decoration", version: "1.0" }, { emoji: "🎎", category: 5, name: "Japanese dolls", version: "1.0" }, { emoji: "🎏", category: 5, name: "carp streamer", version: "1.0" }, { emoji: "🎐", category: 5, name: "wind chime", version: "1.0" }, { emoji: "🎑", category: 5, name: "moon viewing ceremony", version: "1.0" }, { emoji: "🧧", category: 5, name: "red envelope", version: "11.0" }, { emoji: "🎀", category: 5, name: "ribbon", version: "1.0" }, { emoji: "🎁", category: 5, name: "wrapped gift", version: "1.0" }, { emoji: "🎗️", category: 5, name: "reminder ribbon", version: "1.0" }, { emoji: "🎟️", category: 5, name: "admission tickets", version: "1.0" }, { emoji: "🎫", category: 5, name: "ticket", version: "1.0" }, { emoji: "🎖️", category: 5, name: "military medal", version: "1.0" }, { emoji: "🏆", category: 5, name: "trophy", version: "1.0" }, { emoji: "🏅", category: 5, name: "sports medal", version: "1.0" }, { emoji: "🥇", category: 5, name: "1st place medal", version: "3.0" }, { emoji: "🥈", category: 5, name: "2nd place medal", version: "3.0" }, { emoji: "🥉", category: 5, name: "3rd place medal", version: "3.0" }, { emoji: "⚽", category: 5, name: "soccer ball", version: "1.0" }, { emoji: "⚾", category: 5, name: "baseball", version: "1.0" }, { emoji: "🥎", category: 5, name: "softball", version: "11.0" }, { emoji: "🏀", category: 5, name: "basketball", version: "1.0" }, { emoji: "🏐", category: 5, name: "volleyball", version: "1.0" }, { emoji: "🏈", category: 5, name: "american football", version: "1.0" }, { emoji: "🏉", category: 5, name: "rugby football", version: "1.0" }, { emoji: "🎾", category: 5, name: "tennis", version: "1.0" }, { emoji: "🥏", category: 5, name: "flying disc", version: "11.0" }, { emoji: "🎳", category: 5, name: "bowling", version: "1.0" }, { emoji: "🏏", category: 5, name: "cricket game", version: "1.0" }, { emoji: "🏑", category: 5, name: "field hockey", version: "1.0" }, { emoji: "🏒", category: 5, name: "ice hockey", version: "1.0" }, { emoji: "🥍", category: 5, name: "lacrosse", version: "11.0" }, { emoji: "🏓", category: 5, name: "ping pong", version: "1.0" }, { emoji: "🏸", category: 5, name: "badminton", version: "1.0" }, { emoji: "🥊", category: 5, name: "boxing glove", version: "3.0" }, { emoji: "🥋", category: 5, name: "martial arts uniform", version: "3.0" }, { emoji: "🥅", category: 5, name: "goal net", version: "3.0" }, { emoji: "⛳", category: 5, name: "flag in hole", version: "1.0" }, { emoji: "⛸️", category: 5, name: "ice skate", version: "1.0" }, { emoji: "🎣", category: 5, name: "fishing pole", version: "1.0" }, { emoji: "🤿", category: 5, name: "diving mask", version: "12.0" }, { emoji: "🎽", category: 5, name: "running shirt", version: "1.0" }, { emoji: "🎿", category: 5, name: "skis", version: "1.0" }, { emoji: "🛷", category: 5, name: "sled", version: "5.0" }, { emoji: "🥌", category: 5, name: "curling stone", version: "5.0" }, { emoji: "🎯", category: 5, name: "direct hit", version: "1.0" }, { emoji: "🪀", category: 5, name: "yo-yo", version: "12.0" }, { emoji: "🪁", category: 5, name: "kite", version: "12.0" }, { emoji: "🎱", category: 5, name: "pool 8 ball", version: "1.0" }, { emoji: "🔮", category: 5, name: "crystal ball", version: "1.0" }, { emoji: "🪄", category: 5, name: "magic wand", version: "13.0" }, { emoji: "🧿", category: 5, name: "nazar amulet", version: "11.0" }, { emoji: "🎮", category: 5, name: "video game", version: "1.0" }, { emoji: "🕹️", category: 5, name: "joystick", version: "1.0" }, { emoji: "🎰", category: 5, name: "slot machine", version: "1.0" }, { emoji: "🎲", category: 5, name: "game die", version: "1.0" }, { emoji: "🧩", category: 5, name: "puzzle piece", version: "11.0" }, { emoji: "🧸", category: 5, name: "teddy bear", version: "11.0" }, { emoji: "🪅", category: 5, name: "piñata", version: "13.0" }, { emoji: "🪆", category: 5, name: "nesting dolls", version: "13.0" }, { emoji: "♠️", category: 5, name: "spade suit", version: "1.0" }, { emoji: "♥️", category: 5, name: "heart suit", version: "1.0" }, { emoji: "♦️", category: 5, name: "diamond suit", version: "1.0" }, { emoji: "♣️", category: 5, name: "club suit", version: "1.0" }, { emoji: "♟️", category: 5, name: "chess pawn", version: "11.0" }, { emoji: "🃏", category: 5, name: "joker", version: "1.0" }, { emoji: "🀄", category: 5, name: "mahjong red dragon", version: "1.0" }, { emoji: "🎴", category: 5, name: "flower playing cards", version: "1.0" }, { emoji: "🎭", category: 5, name: "performing arts", version: "1.0" }, { emoji: "🖼️", category: 5, name: "framed picture", version: "1.0" }, { emoji: "🎨", category: 5, name: "artist palette", version: "1.0" }, { emoji: "🧵", category: 5, name: "thread", version: "11.0" }, { emoji: "🪡", category: 5, name: "sewing needle", version: "13.0" }, { emoji: "🧶", category: 5, name: "yarn", version: "11.0" }, { emoji: "🪢", category: 5, name: "knot", version: "13.0" }, { emoji: "👓", category: 6, name: "glasses", version: "1.0" }, { emoji: "🕶️", category: 6, name: "sunglasses", version: "1.0" }, { emoji: "🥽", category: 6, name: "goggles", version: "11.0" }, { emoji: "🥼", category: 6, name: "lab coat", version: "11.0" }, { emoji: "🦺", category: 6, name: "safety vest", version: "12.0" }, { emoji: "👔", category: 6, name: "necktie", version: "1.0" }, { emoji: "👕", category: 6, name: "t-shirt", version: "1.0" }, { emoji: "👖", category: 6, name: "jeans", version: "1.0" }, { emoji: "🧣", category: 6, name: "scarf", version: "5.0" }, { emoji: "🧤", category: 6, name: "gloves", version: "5.0" }, { emoji: "🧥", category: 6, name: "coat", version: "5.0" }, { emoji: "🧦", category: 6, name: "socks", version: "5.0" }, { emoji: "👗", category: 6, name: "dress", version: "1.0" }, { emoji: "👘", category: 6, name: "kimono", version: "1.0" }, { emoji: "🥻", category: 6, name: "sari", version: "12.0" }, { emoji: "🩱", category: 6, name: "one-piece swimsuit", version: "12.0" }, { emoji: "🩲", category: 6, name: "briefs", version: "12.0" }, { emoji: "🩳", category: 6, name: "shorts", version: "12.0" }, { emoji: "👙", category: 6, name: "bikini", version: "1.0" }, { emoji: "👚", category: 6, name: "woman’s clothes", version: "1.0" }, { emoji: "👛", category: 6, name: "purse", version: "1.0" }, { emoji: "👜", category: 6, name: "handbag", version: "1.0" }, { emoji: "👝", category: 6, name: "clutch bag", version: "1.0" }, { emoji: "🛍️", category: 6, name: "shopping bags", version: "1.0" }, { emoji: "🎒", category: 6, name: "backpack", version: "1.0" }, { emoji: "🩴", category: 6, name: "thong sandal", version: "13.0" }, { emoji: "👞", category: 6, name: "man’s shoe", version: "1.0" }, { emoji: "👟", category: 6, name: "running shoe", version: "1.0" }, { emoji: "🥾", category: 6, name: "hiking boot", version: "11.0" }, { emoji: "🥿", category: 6, name: "flat shoe", version: "11.0" }, { emoji: "👠", category: 6, name: "high-heeled shoe", version: "1.0" }, { emoji: "👡", category: 6, name: "woman’s sandal", version: "1.0" }, { emoji: "🩰", category: 6, name: "ballet shoes", version: "12.0" }, { emoji: "👢", category: 6, name: "woman’s boot", version: "1.0" }, { emoji: "👑", category: 6, name: "crown", version: "1.0" }, { emoji: "👒", category: 6, name: "woman’s hat", version: "1.0" }, { emoji: "🎩", category: 6, name: "top hat", version: "1.0" }, { emoji: "🎓", category: 6, name: "graduation cap", version: "1.0" }, { emoji: "🧢", category: 6, name: "billed cap", version: "5.0" }, { emoji: "🪖", category: 6, name: "military helmet", version: "13.0" }, { emoji: "⛑️", category: 6, name: "rescue worker’s helmet", version: "1.0" }, { emoji: "📿", category: 6, name: "prayer beads", version: "1.0" }, { emoji: "💄", category: 6, name: "lipstick", version: "1.0" }, { emoji: "💍", category: 6, name: "ring", version: "1.0" }, { emoji: "💎", category: 6, name: "gem stone", version: "1.0" }, { emoji: "🔇", category: 6, name: "muted speaker", version: "1.0" }, { emoji: "🔈", category: 6, name: "speaker low volume", version: "1.0" }, { emoji: "🔉", category: 6, name: "speaker medium volume", version: "1.0" }, { emoji: "🔊", category: 6, name: "speaker high volume", version: "1.0" }, { emoji: "📢", category: 6, name: "loudspeaker", version: "1.0" }, { emoji: "📣", category: 6, name: "megaphone", version: "1.0" }, { emoji: "📯", category: 6, name: "postal horn", version: "1.0" }, { emoji: "🔔", category: 6, name: "bell", version: "1.0" }, { emoji: "🔕", category: 6, name: "bell with slash", version: "1.0" }, { emoji: "🎼", category: 6, name: "musical score", version: "1.0" }, { emoji: "🎵", category: 6, name: "musical note", version: "1.0" }, { emoji: "🎶", category: 6, name: "musical notes", version: "1.0" }, { emoji: "🎙️", category: 6, name: "studio microphone", version: "1.0" }, { emoji: "🎚️", category: 6, name: "level slider", version: "1.0" }, { emoji: "🎛️", category: 6, name: "control knobs", version: "1.0" }, { emoji: "🎤", category: 6, name: "microphone", version: "1.0" }, { emoji: "🎧", category: 6, name: "headphone", version: "1.0" }, { emoji: "📻", category: 6, name: "radio", version: "1.0" }, { emoji: "🎷", category: 6, name: "saxophone", version: "1.0" }, { emoji: "🪗", category: 6, name: "accordion", version: "13.0" }, { emoji: "🎸", category: 6, name: "guitar", version: "1.0" }, { emoji: "🎹", category: 6, name: "musical keyboard", version: "1.0" }, { emoji: "🎺", category: 6, name: "trumpet", version: "1.0" }, { emoji: "🎻", category: 6, name: "violin", version: "1.0" }, { emoji: "🪕", category: 6, name: "banjo", version: "12.0" }, { emoji: "🥁", category: 6, name: "drum", version: "3.0" }, { emoji: "🪘", category: 6, name: "long drum", version: "13.0" }, { emoji: "📱", category: 6, name: "mobile phone", version: "1.0" }, { emoji: "📲", category: 6, name: "mobile phone with arrow", version: "1.0" }, { emoji: "☎️", category: 6, name: "telephone", version: "1.0" }, { emoji: "📞", category: 6, name: "telephone receiver", version: "1.0" }, { emoji: "📟", category: 6, name: "pager", version: "1.0" }, { emoji: "📠", category: 6, name: "fax machine", version: "1.0" }, { emoji: "🔋", category: 6, name: "battery", version: "1.0" }, { emoji: "🔌", category: 6, name: "electric plug", version: "1.0" }, { emoji: "💻", category: 6, name: "laptop", version: "1.0" }, { emoji: "🖥️", category: 6, name: "desktop computer", version: "1.0" }, { emoji: "🖨️", category: 6, name: "printer", version: "1.0" }, { emoji: "⌨️", category: 6, name: "keyboard", version: "1.0" }, { emoji: "🖱️", category: 6, name: "computer mouse", version: "1.0" }, { emoji: "🖲️", category: 6, name: "trackball", version: "1.0" }, { emoji: "💽", category: 6, name: "computer disk", version: "1.0" }, { emoji: "💾", category: 6, name: "floppy disk", version: "1.0" }, { emoji: "💿", category: 6, name: "optical disk", version: "1.0" }, { emoji: "📀", category: 6, name: "dvd", version: "1.0" }, { emoji: "🧮", category: 6, name: "abacus", version: "11.0" }, { emoji: "🎥", category: 6, name: "movie camera", version: "1.0" }, { emoji: "🎞️", category: 6, name: "film frames", version: "1.0" }, { emoji: "📽️", category: 6, name: "film projector", version: "1.0" }, { emoji: "🎬", category: 6, name: "clapper board", version: "1.0" }, { emoji: "📺", category: 6, name: "television", version: "1.0" }, { emoji: "📷", category: 6, name: "camera", version: "1.0" }, { emoji: "📸", category: 6, name: "camera with flash", version: "1.0" }, { emoji: "📹", category: 6, name: "video camera", version: "1.0" }, { emoji: "📼", category: 6, name: "videocassette", version: "1.0" }, { emoji: "🔍", category: 6, name: "magnifying glass tilted left", version: "1.0" }, { emoji: "🔎", category: 6, name: "magnifying glass tilted right", version: "1.0" }, { emoji: "🕯️", category: 6, name: "candle", version: "1.0" }, { emoji: "💡", category: 6, name: "light bulb", version: "1.0" }, { emoji: "🔦", category: 6, name: "flashlight", version: "1.0" }, { emoji: "🏮", category: 6, name: "red paper lantern", version: "1.0" }, { emoji: "🪔", category: 6, name: "diya lamp", version: "12.0" }, { emoji: "📔", category: 6, name: "notebook with decorative cover", version: "1.0" }, { emoji: "📕", category: 6, name: "closed book", version: "1.0" }, { emoji: "📖", category: 6, name: "open book", version: "1.0" }, { emoji: "📗", category: 6, name: "green book", version: "1.0" }, { emoji: "📘", category: 6, name: "blue book", version: "1.0" }, { emoji: "📙", category: 6, name: "orange book", version: "1.0" }, { emoji: "📚", category: 6, name: "books", version: "1.0" }, { emoji: "📓", category: 6, name: "notebook", version: "1.0" }, { emoji: "📒", category: 6, name: "ledger", version: "1.0" }, { emoji: "📃", category: 6, name: "page with curl", version: "1.0" }, { emoji: "📜", category: 6, name: "scroll", version: "1.0" }, { emoji: "📄", category: 6, name: "page facing up", version: "1.0" }, { emoji: "📰", category: 6, name: "newspaper", version: "1.0" }, { emoji: "🗞️", category: 6, name: "rolled-up newspaper", version: "1.0" }, { emoji: "📑", category: 6, name: "bookmark tabs", version: "1.0" }, { emoji: "🔖", category: 6, name: "bookmark", version: "1.0" }, { emoji: "🏷️", category: 6, name: "label", version: "1.0" }, { emoji: "💰", category: 6, name: "money bag", version: "1.0" }, { emoji: "🪙", category: 6, name: "coin", version: "13.0" }, { emoji: "💴", category: 6, name: "yen banknote", version: "1.0" }, { emoji: "💵", category: 6, name: "dollar banknote", version: "1.0" }, { emoji: "💶", category: 6, name: "euro banknote", version: "1.0" }, { emoji: "💷", category: 6, name: "pound banknote", version: "1.0" }, { emoji: "💸", category: 6, name: "money with wings", version: "1.0" }, { emoji: "💳", category: 6, name: "credit card", version: "1.0" }, { emoji: "🧾", category: 6, name: "receipt", version: "11.0" }, { emoji: "💹", category: 6, name: "chart increasing with yen", version: "1.0" }, { emoji: "✉️", category: 6, name: "envelope", version: "1.0" }, { emoji: "📧", category: 6, name: "e-mail", version: "1.0" }, { emoji: "📨", category: 6, name: "incoming envelope", version: "1.0" }, { emoji: "📩", category: 6, name: "envelope with arrow", version: "1.0" }, { emoji: "📤", category: 6, name: "outbox tray", version: "1.0" }, { emoji: "📥", category: 6, name: "inbox tray", version: "1.0" }, { emoji: "📦", category: 6, name: "package", version: "1.0" }, { emoji: "📫", category: 6, name: "closed mailbox with raised flag", version: "1.0" }, { emoji: "📪", category: 6, name: "closed mailbox with lowered flag", version: "1.0" }, { emoji: "📬", category: 6, name: "open mailbox with raised flag", version: "1.0" }, { emoji: "📭", category: 6, name: "open mailbox with lowered flag", version: "1.0" }, { emoji: "📮", category: 6, name: "postbox", version: "1.0" }, { emoji: "🗳️", category: 6, name: "ballot box with ballot", version: "1.0" }, { emoji: "✏️", category: 6, name: "pencil", version: "1.0" }, { emoji: "✒️", category: 6, name: "black nib", version: "1.0" }, { emoji: "🖋️", category: 6, name: "fountain pen", version: "1.0" }, { emoji: "🖊️", category: 6, name: "pen", version: "1.0" }, { emoji: "🖌️", category: 6, name: "paintbrush", version: "1.0" }, { emoji: "🖍️", category: 6, name: "crayon", version: "1.0" }, { emoji: "📝", category: 6, name: "memo", version: "1.0" }, { emoji: "💼", category: 6, name: "briefcase", version: "1.0" }, { emoji: "📁", category: 6, name: "file folder", version: "1.0" }, { emoji: "📂", category: 6, name: "open file folder", version: "1.0" }, { emoji: "🗂️", category: 6, name: "card index dividers", version: "1.0" }, { emoji: "📅", category: 6, name: "calendar", version: "1.0" }, { emoji: "📆", category: 6, name: "tear-off calendar", version: "1.0" }, { emoji: "🗒️", category: 6, name: "spiral notepad", version: "1.0" }, { emoji: "🗓️", category: 6, name: "spiral calendar", version: "1.0" }, { emoji: "📇", category: 6, name: "card index", version: "1.0" }, { emoji: "📈", category: 6, name: "chart increasing", version: "1.0" }, { emoji: "📉", category: 6, name: "chart decreasing", version: "1.0" }, { emoji: "📊", category: 6, name: "bar chart", version: "1.0" }, { emoji: "📋", category: 6, name: "clipboard", version: "1.0" }, { emoji: "📌", category: 6, name: "pushpin", version: "1.0" }, { emoji: "📍", category: 6, name: "round pushpin", version: "1.0" }, { emoji: "📎", category: 6, name: "paperclip", version: "1.0" }, { emoji: "🖇️", category: 6, name: "linked paperclips", version: "1.0" }, { emoji: "📏", category: 6, name: "straight ruler", version: "1.0" }, { emoji: "📐", category: 6, name: "triangular ruler", version: "1.0" }, { emoji: "✂️", category: 6, name: "scissors", version: "1.0" }, { emoji: "🗃️", category: 6, name: "card file box", version: "1.0" }, { emoji: "🗄️", category: 6, name: "file cabinet", version: "1.0" }, { emoji: "🗑️", category: 6, name: "wastebasket", version: "1.0" }, { emoji: "🔒", category: 6, name: "locked", version: "1.0" }, { emoji: "🔓", category: 6, name: "unlocked", version: "1.0" }, { emoji: "🔏", category: 6, name: "locked with pen", version: "1.0" }, { emoji: "🔐", category: 6, name: "locked with key", version: "1.0" }, { emoji: "🔑", category: 6, name: "key", version: "1.0" }, { emoji: "🗝️", category: 6, name: "old key", version: "1.0" }, { emoji: "🔨", category: 6, name: "hammer", version: "1.0" }, { emoji: "🪓", category: 6, name: "axe", version: "12.0" }, { emoji: "⛏️", category: 6, name: "pick", version: "1.0" }, { emoji: "⚒️", category: 6, name: "hammer and pick", version: "1.0" }, { emoji: "🛠️", category: 6, name: "hammer and wrench", version: "1.0" }, { emoji: "🗡️", category: 6, name: "dagger", version: "1.0" }, { emoji: "⚔️", category: 6, name: "crossed swords", version: "1.0" }, { emoji: "🔫", category: 6, name: "pistol", version: "1.0" }, { emoji: "🪃", category: 6, name: "boomerang", version: "13.0" }, { emoji: "🏹", category: 6, name: "bow and arrow", version: "1.0" }, { emoji: "🛡️", category: 6, name: "shield", version: "1.0" }, { emoji: "🪚", category: 6, name: "carpentry saw", version: "13.0" }, { emoji: "🔧", category: 6, name: "wrench", version: "1.0" }, { emoji: "🪛", category: 6, name: "screwdriver", version: "13.0" }, { emoji: "🔩", category: 6, name: "nut and bolt", version: "1.0" }, { emoji: "⚙️", category: 6, name: "gear", version: "1.0" }, { emoji: "🗜️", category: 6, name: "clamp", version: "1.0" }, { emoji: "⚖️", category: 6, name: "balance scale", version: "1.0" }, { emoji: "🦯", category: 6, name: "white cane", version: "12.0" }, { emoji: "🔗", category: 6, name: "link", version: "1.0" }, { emoji: "⛓️", category: 6, name: "chains", version: "1.0" }, { emoji: "🪝", category: 6, name: "hook", version: "13.0" }, { emoji: "🧰", category: 6, name: "toolbox", version: "11.0" }, { emoji: "🧲", category: 6, name: "magnet", version: "11.0" }, { emoji: "🪜", category: 6, name: "ladder", version: "13.0" }, { emoji: "⚗️", category: 6, name: "alembic", version: "1.0" }, { emoji: "🧪", category: 6, name: "test tube", version: "11.0" }, { emoji: "🧫", category: 6, name: "petri dish", version: "11.0" }, { emoji: "🧬", category: 6, name: "dna", version: "11.0" }, { emoji: "🔬", category: 6, name: "microscope", version: "1.0" }, { emoji: "🔭", category: 6, name: "telescope", version: "1.0" }, { emoji: "📡", category: 6, name: "satellite antenna", version: "1.0" }, { emoji: "💉", category: 6, name: "syringe", version: "1.0" }, { emoji: "🩸", category: 6, name: "drop of blood", version: "12.0" }, { emoji: "💊", category: 6, name: "pill", version: "1.0" }, { emoji: "🩹", category: 6, name: "adhesive bandage", version: "12.0" }, { emoji: "🩺", category: 6, name: "stethoscope", version: "12.0" }, { emoji: "🚪", category: 6, name: "door", version: "1.0" }, { emoji: "🛗", category: 6, name: "elevator", version: "13.0" }, { emoji: "🪞", category: 6, name: "mirror", version: "13.0" }, { emoji: "🪟", category: 6, name: "window", version: "13.0" }, { emoji: "🛏️", category: 6, name: "bed", version: "1.0" }, { emoji: "🛋️", category: 6, name: "couch and lamp", version: "1.0" }, { emoji: "🪑", category: 6, name: "chair", version: "12.0" }, { emoji: "🚽", category: 6, name: "toilet", version: "1.0" }, { emoji: "🪠", category: 6, name: "plunger", version: "13.0" }, { emoji: "🚿", category: 6, name: "shower", version: "1.0" }, { emoji: "🛁", category: 6, name: "bathtub", version: "1.0" }, { emoji: "🪤", category: 6, name: "mouse trap", version: "13.0" }, { emoji: "🪒", category: 6, name: "razor", version: "12.0" }, { emoji: "🧴", category: 6, name: "lotion bottle", version: "11.0" }, { emoji: "🧷", category: 6, name: "safety pin", version: "11.0" }, { emoji: "🧹", category: 6, name: "broom", version: "11.0" }, { emoji: "🧺", category: 6, name: "basket", version: "11.0" }, { emoji: "🧻", category: 6, name: "roll of paper", version: "11.0" }, { emoji: "🪣", category: 6, name: "bucket", version: "13.0" }, { emoji: "🧼", category: 6, name: "soap", version: "11.0" }, { emoji: "🪥", category: 6, name: "toothbrush", version: "13.0" }, { emoji: "🧽", category: 6, name: "sponge", version: "11.0" }, { emoji: "🧯", category: 6, name: "fire extinguisher", version: "11.0" }, { emoji: "🛒", category: 6, name: "shopping cart", version: "3.0" }, { emoji: "🚬", category: 6, name: "cigarette", version: "1.0" }, { emoji: "⚰️", category: 6, name: "coffin", version: "1.0" }, { emoji: "🪦", category: 6, name: "headstone", version: "13.0" }, { emoji: "⚱️", category: 6, name: "funeral urn", version: "1.0" }, { emoji: "🗿", category: 6, name: "moai", version: "1.0" }, { emoji: "🪧", category: 6, name: "placard", version: "13.0" }, { emoji: "🏧", category: 7, name: "ATM sign", version: "1.0" }, { emoji: "🚮", category: 7, name: "litter in bin sign", version: "1.0" }, { emoji: "🚰", category: 7, name: "potable water", version: "1.0" }, { emoji: "♿", category: 7, name: "wheelchair symbol", version: "1.0" }, { emoji: "🚹", category: 7, name: "men’s room", version: "1.0" }, { emoji: "🚺", category: 7, name: "women’s room", version: "1.0" }, { emoji: "🚻", category: 7, name: "restroom", version: "1.0" }, { emoji: "🚼", category: 7, name: "baby symbol", version: "1.0" }, { emoji: "🚾", category: 7, name: "water closet", version: "1.0" }, { emoji: "🛂", category: 7, name: "passport control", version: "1.0" }, { emoji: "🛃", category: 7, name: "customs", version: "1.0" }, { emoji: "🛄", category: 7, name: "baggage claim", version: "1.0" }, { emoji: "🛅", category: 7, name: "left luggage", version: "1.0" }, { emoji: "⚠️", category: 7, name: "warning", version: "1.0" }, { emoji: "🚸", category: 7, name: "children crossing", version: "1.0" }, { emoji: "⛔", category: 7, name: "no entry", version: "1.0" }, { emoji: "🚫", category: 7, name: "prohibited", version: "1.0" }, { emoji: "🚳", category: 7, name: "no bicycles", version: "1.0" }, { emoji: "🚭", category: 7, name: "no smoking", version: "1.0" }, { emoji: "🚯", category: 7, name: "no littering", version: "1.0" }, { emoji: "🚱", category: 7, name: "non-potable water", version: "1.0" }, { emoji: "🚷", category: 7, name: "no pedestrians", version: "1.0" }, { emoji: "📵", category: 7, name: "no mobile phones", version: "1.0" }, { emoji: "🔞", category: 7, name: "no one under eighteen", version: "1.0" }, { emoji: "☢️", category: 7, name: "radioactive", version: "1.0" }, { emoji: "☣️", category: 7, name: "biohazard", version: "1.0" }, { emoji: "⬆️", category: 7, name: "up arrow", version: "1.0" }, { emoji: "↗️", category: 7, name: "up-right arrow", version: "1.0" }, { emoji: "➡️", category: 7, name: "right arrow", version: "1.0" }, { emoji: "↘️", category: 7, name: "down-right arrow", version: "1.0" }, { emoji: "⬇️", category: 7, name: "down arrow", version: "1.0" }, { emoji: "↙️", category: 7, name: "down-left arrow", version: "1.0" }, { emoji: "⬅️", category: 7, name: "left arrow", version: "1.0" }, { emoji: "↖️", category: 7, name: "up-left arrow", version: "1.0" }, { emoji: "↕️", category: 7, name: "up-down arrow", version: "1.0" }, { emoji: "↔️", category: 7, name: "left-right arrow", version: "1.0" }, { emoji: "↩️", category: 7, name: "right arrow curving left", version: "1.0" }, { emoji: "↪️", category: 7, name: "left arrow curving right", version: "1.0" }, { emoji: "⤴️", category: 7, name: "right arrow curving up", version: "1.0" }, { emoji: "⤵️", category: 7, name: "right arrow curving down", version: "1.0" }, { emoji: "🔃", category: 7, name: "clockwise vertical arrows", version: "1.0" }, { emoji: "🔄", category: 7, name: "counterclockwise arrows button", version: "1.0" }, { emoji: "🔙", category: 7, name: "BACK arrow", version: "1.0" }, { emoji: "🔚", category: 7, name: "END arrow", version: "1.0" }, { emoji: "🔛", category: 7, name: "ON! arrow", version: "1.0" }, { emoji: "🔜", category: 7, name: "SOON arrow", version: "1.0" }, { emoji: "🔝", category: 7, name: "TOP arrow", version: "1.0" }, { emoji: "🛐", category: 7, name: "place of worship", version: "1.0" }, { emoji: "⚛️", category: 7, name: "atom symbol", version: "1.0" }, { emoji: "🕉️", category: 7, name: "om", version: "1.0" }, { emoji: "✡️", category: 7, name: "star of David", version: "1.0" }, { emoji: "☸️", category: 7, name: "wheel of dharma", version: "1.0" }, { emoji: "☯️", category: 7, name: "yin yang", version: "1.0" }, { emoji: "✝️", category: 7, name: "latin cross", version: "1.0" }, { emoji: "☦️", category: 7, name: "orthodox cross", version: "1.0" }, { emoji: "☪️", category: 7, name: "star and crescent", version: "1.0" }, { emoji: "☮️", category: 7, name: "peace symbol", version: "1.0" }, { emoji: "🕎", category: 7, name: "menorah", version: "1.0" }, { emoji: "🔯", category: 7, name: "dotted six-pointed star", version: "1.0" }, { emoji: "♈", category: 7, name: "Aries", version: "1.0" }, { emoji: "♉", category: 7, name: "Taurus", version: "1.0" }, { emoji: "♊", category: 7, name: "Gemini", version: "1.0" }, { emoji: "♋", category: 7, name: "Cancer", version: "1.0" }, { emoji: "♌", category: 7, name: "Leo", version: "1.0" }, { emoji: "♍", category: 7, name: "Virgo", version: "1.0" }, { emoji: "♎", category: 7, name: "Libra", version: "1.0" }, { emoji: "♏", category: 7, name: "Scorpio", version: "1.0" }, { emoji: "♐", category: 7, name: "Sagittarius", version: "1.0" }, { emoji: "♑", category: 7, name: "Capricorn", version: "1.0" }, { emoji: "♒", category: 7, name: "Aquarius", version: "1.0" }, { emoji: "♓", category: 7, name: "Pisces", version: "1.0" }, { emoji: "⛎", category: 7, name: "Ophiuchus", version: "1.0" }, { emoji: "🔀", category: 7, name: "shuffle tracks button", version: "1.0" }, { emoji: "🔁", category: 7, name: "repeat button", version: "1.0" }, { emoji: "🔂", category: 7, name: "repeat single button", version: "1.0" }, { emoji: "▶️", category: 7, name: "play button", version: "1.0" }, { emoji: "⏩", category: 7, name: "fast-forward button", version: "1.0" }, { emoji: "⏭️", category: 7, name: "next track button", version: "1.0" }, { emoji: "⏯️", category: 7, name: "play or pause button", version: "1.0" }, { emoji: "◀️", category: 7, name: "reverse button", version: "1.0" }, { emoji: "⏪", category: 7, name: "fast reverse button", version: "1.0" }, { emoji: "⏮️", category: 7, name: "last track button", version: "1.0" }, { emoji: "🔼", category: 7, name: "upwards button", version: "1.0" }, { emoji: "⏫", category: 7, name: "fast up button", version: "1.0" }, { emoji: "🔽", category: 7, name: "downwards button", version: "1.0" }, { emoji: "⏬", category: 7, name: "fast down button", version: "1.0" }, { emoji: "⏸️", category: 7, name: "pause button", version: "1.0" }, { emoji: "⏹️", category: 7, name: "stop button", version: "1.0" }, { emoji: "⏺️", category: 7, name: "record button", version: "1.0" }, { emoji: "⏏️", category: 7, name: "eject button", version: "1.0" }, { emoji: "🎦", category: 7, name: "cinema", version: "1.0" }, { emoji: "🔅", category: 7, name: "dim button", version: "1.0" }, { emoji: "🔆", category: 7, name: "bright button", version: "1.0" }, { emoji: "📶", category: 7, name: "antenna bars", version: "1.0" }, { emoji: "📳", category: 7, name: "vibration mode", version: "1.0" }, { emoji: "📴", category: 7, name: "mobile phone off", version: "1.0" }, { emoji: "♀️", category: 7, name: "female sign", version: "4.0" }, { emoji: "♂️", category: 7, name: "male sign", version: "4.0" }, { emoji: "⚧️", category: 7, name: "transgender symbol", version: "13.0" }, { emoji: "✖️", category: 7, name: "multiply", version: "1.0" }, { emoji: "➕", category: 7, name: "plus", version: "1.0" }, { emoji: "➖", category: 7, name: "minus", version: "1.0" }, { emoji: "➗", category: 7, name: "divide", version: "1.0" }, { emoji: "♾️", category: 7, name: "infinity", version: "11.0" }, { emoji: "‼️", category: 7, name: "double exclamation mark", version: "1.0" }, { emoji: "⁉️", category: 7, name: "exclamation question mark", version: "1.0" }, { emoji: "❓", category: 7, name: "question mark", version: "1.0" }, { emoji: "❔", category: 7, name: "white question mark", version: "1.0" }, { emoji: "❕", category: 7, name: "white exclamation mark", version: "1.0" }, { emoji: "❗", category: 7, name: "exclamation mark", version: "1.0" }, { emoji: "〰️", category: 7, name: "wavy dash", version: "1.0" }, { emoji: "💱", category: 7, name: "currency exchange", version: "1.0" }, { emoji: "💲", category: 7, name: "heavy dollar sign", version: "1.0" }, { emoji: "⚕️", category: 7, name: "medical symbol", version: "4.0" }, { emoji: "♻️", category: 7, name: "recycling symbol", version: "1.0" }, { emoji: "⚜️", category: 7, name: "fleur-de-lis", version: "1.0" }, { emoji: "🔱", category: 7, name: "trident emblem", version: "1.0" }, { emoji: "📛", category: 7, name: "name badge", version: "1.0" }, { emoji: "🔰", category: 7, name: "Japanese symbol for beginner", version: "1.0" }, { emoji: "⭕", category: 7, name: "hollow red circle", version: "1.0" }, { emoji: "✅", category: 7, name: "check mark button", version: "1.0" }, { emoji: "☑️", category: 7, name: "check box with check", version: "1.0" }, { emoji: "✔️", category: 7, name: "check mark", version: "1.0" }, { emoji: "❌", category: 7, name: "cross mark", version: "1.0" }, { emoji: "❎", category: 7, name: "cross mark button", version: "1.0" }, { emoji: "➰", category: 7, name: "curly loop", version: "1.0" }, { emoji: "➿", category: 7, name: "double curly loop", version: "1.0" }, { emoji: "〽️", category: 7, name: "part alternation mark", version: "1.0" }, { emoji: "✳️", category: 7, name: "eight-spoked asterisk", version: "1.0" }, { emoji: "✴️", category: 7, name: "eight-pointed star", version: "1.0" }, { emoji: "❇️", category: 7, name: "sparkle", version: "1.0" }, { emoji: "©️", category: 7, name: "copyright", version: "1.0" }, { emoji: "®️", category: 7, name: "registered", version: "1.0" }, { emoji: "™️", category: 7, name: "trade mark", version: "1.0" }, { emoji: "#️⃣", category: 7, name: "keycap: #", version: "1.0" }, { emoji: "*️⃣", category: 7, name: "keycap: *", version: "2.0" }, { emoji: "0️⃣", category: 7, name: "keycap: 0", version: "1.0" }, { emoji: "1️⃣", category: 7, name: "keycap: 1", version: "1.0" }, { emoji: "2️⃣", category: 7, name: "keycap: 2", version: "1.0" }, { emoji: "3️⃣", category: 7, name: "keycap: 3", version: "1.0" }, { emoji: "4️⃣", category: 7, name: "keycap: 4", version: "1.0" }, { emoji: "5️⃣", category: 7, name: "keycap: 5", version: "1.0" }, { emoji: "6️⃣", category: 7, name: "keycap: 6", version: "1.0" }, { emoji: "7️⃣", category: 7, name: "keycap: 7", version: "1.0" }, { emoji: "8️⃣", category: 7, name: "keycap: 8", version: "1.0" }, { emoji: "9️⃣", category: 7, name: "keycap: 9", version: "1.0" }, { emoji: "🔟", category: 7, name: "keycap: 10", version: "1.0" }, { emoji: "🔠", category: 7, name: "input latin uppercase", version: "1.0" }, { emoji: "🔡", category: 7, name: "input latin lowercase", version: "1.0" }, { emoji: "🔢", category: 7, name: "input numbers", version: "1.0" }, { emoji: "🔣", category: 7, name: "input symbols", version: "1.0" }, { emoji: "🔤", category: 7, name: "input latin letters", version: "1.0" }, { emoji: "🅰️", category: 7, name: "A button (blood type)", version: "1.0" }, { emoji: "🆎", category: 7, name: "AB button (blood type)", version: "1.0" }, { emoji: "🅱️", category: 7, name: "B button (blood type)", version: "1.0" }, { emoji: "🆑", category: 7, name: "CL button", version: "1.0" }, { emoji: "🆒", category: 7, name: "COOL button", version: "1.0" }, { emoji: "🆓", category: 7, name: "FREE button", version: "1.0" }, { emoji: "ℹ️", category: 7, name: "information", version: "1.0" }, { emoji: "🆔", category: 7, name: "ID button", version: "1.0" }, { emoji: "Ⓜ️", category: 7, name: "circled M", version: "1.0" }, { emoji: "🆕", category: 7, name: "NEW button", version: "1.0" }, { emoji: "🆖", category: 7, name: "NG button", version: "1.0" }, { emoji: "🅾️", category: 7, name: "O button (blood type)", version: "1.0" }, { emoji: "🆗", category: 7, name: "OK button", version: "1.0" }, { emoji: "🅿️", category: 7, name: "P button", version: "1.0" }, { emoji: "🆘", category: 7, name: "SOS button", version: "1.0" }, { emoji: "🆙", category: 7, name: "UP! button", version: "1.0" }, { emoji: "🆚", category: 7, name: "VS button", version: "1.0" }, { emoji: "🈁", category: 7, name: "Japanese “here” button", version: "1.0" }, { emoji: "🈂️", category: 7, name: "Japanese “service charge” button", version: "1.0" }, { emoji: "🈷️", category: 7, name: "Japanese “monthly amount” button", version: "1.0" }, { emoji: "🈶", category: 7, name: "Japanese “not free of charge” button", version: "1.0" }, { emoji: "🈯", category: 7, name: "Japanese “reserved” button", version: "1.0" }, { emoji: "🉐", category: 7, name: "Japanese “bargain” button", version: "1.0" }, { emoji: "🈹", category: 7, name: "Japanese “discount” button", version: "1.0" }, { emoji: "🈚", category: 7, name: "Japanese “free of charge” button", version: "1.0" }, { emoji: "🈲", category: 7, name: "Japanese “prohibited” button", version: "1.0" }, { emoji: "🉑", category: 7, name: "Japanese “acceptable” button", version: "1.0" }, { emoji: "🈸", category: 7, name: "Japanese “application” button", version: "1.0" }, { emoji: "🈴", category: 7, name: "Japanese “passing grade” button", version: "1.0" }, { emoji: "🈳", category: 7, name: "Japanese “vacancy” button", version: "1.0" }, { emoji: "㊗️", category: 7, name: "Japanese “congratulations” button", version: "1.0" }, { emoji: "㊙️", category: 7, name: "Japanese “secret” button", version: "1.0" }, { emoji: "🈺", category: 7, name: "Japanese “open for business” button", version: "1.0" }, { emoji: "🈵", category: 7, name: "Japanese “no vacancy” button", version: "1.0" }, { emoji: "🔴", category: 7, name: "red circle", version: "1.0" }, { emoji: "🟠", category: 7, name: "orange circle", version: "12.0" }, { emoji: "🟡", category: 7, name: "yellow circle", version: "12.0" }, { emoji: "🟢", category: 7, name: "green circle", version: "12.0" }, { emoji: "🔵", category: 7, name: "blue circle", version: "1.0" }, { emoji: "🟣", category: 7, name: "purple circle", version: "12.0" }, { emoji: "🟤", category: 7, name: "brown circle", version: "12.0" }, { emoji: "⚫", category: 7, name: "black circle", version: "1.0" }, { emoji: "⚪", category: 7, name: "white circle", version: "1.0" }, { emoji: "🟥", category: 7, name: "red square", version: "12.0" }, { emoji: "🟧", category: 7, name: "orange square", version: "12.0" }, { emoji: "🟨", category: 7, name: "yellow square", version: "12.0" }, { emoji: "🟩", category: 7, name: "green square", version: "12.0" }, { emoji: "🟦", category: 7, name: "blue square", version: "12.0" }, { emoji: "🟪", category: 7, name: "purple square", version: "12.0" }, { emoji: "🟫", category: 7, name: "brown square", version: "12.0" }, { emoji: "⬛", category: 7, name: "black large square", version: "1.0" }, { emoji: "⬜", category: 7, name: "white large square", version: "1.0" }, { emoji: "◼️", category: 7, name: "black medium square", version: "1.0" }, { emoji: "◻️", category: 7, name: "white medium square", version: "1.0" }, { emoji: "◾", category: 7, name: "black medium-small square", version: "1.0" }, { emoji: "◽", category: 7, name: "white medium-small square", version: "1.0" }, { emoji: "▪️", category: 7, name: "black small square", version: "1.0" }, { emoji: "▫️", category: 7, name: "white small square", version: "1.0" }, { emoji: "🔶", category: 7, name: "large orange diamond", version: "1.0" }, { emoji: "🔷", category: 7, name: "large blue diamond", version: "1.0" }, { emoji: "🔸", category: 7, name: "small orange diamond", version: "1.0" }, { emoji: "🔹", category: 7, name: "small blue diamond", version: "1.0" }, { emoji: "🔺", category: 7, name: "red triangle pointed up", version: "1.0" }, { emoji: "🔻", category: 7, name: "red triangle pointed down", version: "1.0" }, { emoji: "💠", category: 7, name: "diamond with a dot", version: "1.0" }, { emoji: "🔘", category: 7, name: "radio button", version: "1.0" }, { emoji: "🔳", category: 7, name: "white square button", version: "1.0" }, { emoji: "🔲", category: 7, name: "black square button", version: "1.0" }, { emoji: "🏁", category: 8, name: "chequered flag", version: "1.0" }, { emoji: "🚩", category: 8, name: "triangular flag", version: "1.0" }, { emoji: "🎌", category: 8, name: "crossed flags", version: "1.0" }, { emoji: "🏴", category: 8, name: "black flag", version: "1.0" }, { emoji: "🏳️", category: 8, name: "white flag", version: "1.0" }, { emoji: "🏳️‍🌈", category: 8, name: "rainbow flag", version: "4.0" }, { emoji: "🏳️‍⚧️", category: 8, name: "transgender flag", version: "13.0" }, { emoji: "🏴‍☠️", category: 8, name: "pirate flag", version: "11.0" }, { emoji: "🇦🇨", category: 8, name: "flag: Ascension Island", version: "2.0" }, { emoji: "🇦🇩", category: 8, name: "flag: Andorra", version: "2.0" }, { emoji: "🇦🇪", category: 8, name: "flag: United Arab Emirates", version: "2.0" }, { emoji: "🇦🇫", category: 8, name: "flag: Afghanistan", version: "2.0" }, { emoji: "🇦🇬", category: 8, name: "flag: Antigua & Barbuda", version: "2.0" }, { emoji: "🇦🇮", category: 8, name: "flag: Anguilla", version: "2.0" }, { emoji: "🇦🇱", category: 8, name: "flag: Albania", version: "2.0" }, { emoji: "🇦🇲", category: 8, name: "flag: Armenia", version: "2.0" }, { emoji: "🇦🇴", category: 8, name: "flag: Angola", version: "2.0" }, { emoji: "🇦🇶", category: 8, name: "flag: Antarctica", version: "2.0" }, { emoji: "🇦🇷", category: 8, name: "flag: Argentina", version: "2.0" }, { emoji: "🇦🇸", category: 8, name: "flag: American Samoa", version: "2.0" }, { emoji: "🇦🇹", category: 8, name: "flag: Austria", version: "2.0" }, { emoji: "🇦🇺", category: 8, name: "flag: Australia", version: "2.0" }, { emoji: "🇦🇼", category: 8, name: "flag: Aruba", version: "2.0" }, { emoji: "🇦🇽", category: 8, name: "flag: Åland Islands", version: "2.0" }, { emoji: "🇦🇿", category: 8, name: "flag: Azerbaijan", version: "2.0" }, { emoji: "🇧🇦", category: 8, name: "flag: Bosnia & Herzegovina", version: "2.0" }, { emoji: "🇧🇧", category: 8, name: "flag: Barbados", version: "2.0" }, { emoji: "🇧🇩", category: 8, name: "flag: Bangladesh", version: "2.0" }, { emoji: "🇧🇪", category: 8, name: "flag: Belgium", version: "2.0" }, { emoji: "🇧🇫", category: 8, name: "flag: Burkina Faso", version: "2.0" }, { emoji: "🇧🇬", category: 8, name: "flag: Bulgaria", version: "2.0" }, { emoji: "🇧🇭", category: 8, name: "flag: Bahrain", version: "2.0" }, { emoji: "🇧🇮", category: 8, name: "flag: Burundi", version: "2.0" }, { emoji: "🇧🇯", category: 8, name: "flag: Benin", version: "2.0" }, { emoji: "🇧🇱", category: 8, name: "flag: St. Barthélemy", version: "2.0" }, { emoji: "🇧🇲", category: 8, name: "flag: Bermuda", version: "2.0" }, { emoji: "🇧🇳", category: 8, name: "flag: Brunei", version: "2.0" }, { emoji: "🇧🇴", category: 8, name: "flag: Bolivia", version: "2.0" }, { emoji: "🇧🇶", category: 8, name: "flag: Caribbean Netherlands", version: "2.0" }, { emoji: "🇧🇷", category: 8, name: "flag: Brazil", version: "2.0" }, { emoji: "🇧🇸", category: 8, name: "flag: Bahamas", version: "2.0" }, { emoji: "🇧🇹", category: 8, name: "flag: Bhutan", version: "2.0" }, { emoji: "🇧🇻", category: 8, name: "flag: Bouvet Island", version: "2.0" }, { emoji: "🇧🇼", category: 8, name: "flag: Botswana", version: "2.0" }, { emoji: "🇧🇾", category: 8, name: "flag: Belarus", version: "2.0" }, { emoji: "🇧🇿", category: 8, name: "flag: Belize", version: "2.0" }, { emoji: "🇨🇦", category: 8, name: "flag: Canada", version: "2.0" }, { emoji: "🇨🇨", category: 8, name: "flag: Cocos (Keeling) Islands", version: "2.0" }, { emoji: "🇨🇩", category: 8, name: "flag: Congo - Kinshasa", version: "2.0" }, { emoji: "🇨🇫", category: 8, name: "flag: Central African Republic", version: "2.0" }, { emoji: "🇨🇬", category: 8, name: "flag: Congo - Brazzaville", version: "2.0" }, { emoji: "🇨🇭", category: 8, name: "flag: Switzerland", version: "2.0" }, { emoji: "🇨🇮", category: 8, name: "flag: Côte d’Ivoire", version: "2.0" }, { emoji: "🇨🇰", category: 8, name: "flag: Cook Islands", version: "2.0" }, { emoji: "🇨🇱", category: 8, name: "flag: Chile", version: "2.0" }, { emoji: "🇨🇲", category: 8, name: "flag: Cameroon", version: "2.0" }, { emoji: "🇨🇳", category: 8, name: "flag: China", version: "1.0" }, { emoji: "🇨🇴", category: 8, name: "flag: Colombia", version: "2.0" }, { emoji: "🇨🇵", category: 8, name: "flag: Clipperton Island", version: "2.0" }, { emoji: "🇨🇷", category: 8, name: "flag: Costa Rica", version: "2.0" }, { emoji: "🇨🇺", category: 8, name: "flag: Cuba", version: "2.0" }, { emoji: "🇨🇻", category: 8, name: "flag: Cape Verde", version: "2.0" }, { emoji: "🇨🇼", category: 8, name: "flag: Curaçao", version: "2.0" }, { emoji: "🇨🇽", category: 8, name: "flag: Christmas Island", version: "2.0" }, { emoji: "🇨🇾", category: 8, name: "flag: Cyprus", version: "2.0" }, { emoji: "🇨🇿", category: 8, name: "flag: Czechia", version: "2.0" }, { emoji: "🇩🇪", category: 8, name: "flag: Germany", version: "1.0" }, { emoji: "🇩🇬", category: 8, name: "flag: Diego Garcia", version: "2.0" }, { emoji: "🇩🇯", category: 8, name: "flag: Djibouti", version: "2.0" }, { emoji: "🇩🇰", category: 8, name: "flag: Denmark", version: "2.0" }, { emoji: "🇩🇲", category: 8, name: "flag: Dominica", version: "2.0" }, { emoji: "🇩🇴", category: 8, name: "flag: Dominican Republic", version: "2.0" }, { emoji: "🇩🇿", category: 8, name: "flag: Algeria", version: "2.0" }, { emoji: "🇪🇦", category: 8, name: "flag: Ceuta & Melilla", version: "2.0" }, { emoji: "🇪🇨", category: 8, name: "flag: Ecuador", version: "2.0" }, { emoji: "🇪🇪", category: 8, name: "flag: Estonia", version: "2.0" }, { emoji: "🇪🇬", category: 8, name: "flag: Egypt", version: "2.0" }, { emoji: "🇪🇭", category: 8, name: "flag: Western Sahara", version: "2.0" }, { emoji: "🇪🇷", category: 8, name: "flag: Eritrea", version: "2.0" }, { emoji: "🇪🇸", category: 8, name: "flag: Spain", version: "1.0" }, { emoji: "🇪🇹", category: 8, name: "flag: Ethiopia", version: "2.0" }, { emoji: "🇪🇺", category: 8, name: "flag: European Union", version: "2.0" }, { emoji: "🇫🇮", category: 8, name: "flag: Finland", version: "2.0" }, { emoji: "🇫🇯", category: 8, name: "flag: Fiji", version: "2.0" }, { emoji: "🇫🇰", category: 8, name: "flag: Falkland Islands", version: "2.0" }, { emoji: "🇫🇲", category: 8, name: "flag: Micronesia", version: "2.0" }, { emoji: "🇫🇴", category: 8, name: "flag: Faroe Islands", version: "2.0" }, { emoji: "🇫🇷", category: 8, name: "flag: France", version: "1.0" }, { emoji: "🇬🇦", category: 8, name: "flag: Gabon", version: "2.0" }, { emoji: "🇬🇧", category: 8, name: "flag: United Kingdom", version: "1.0" }, { emoji: "🇬🇩", category: 8, name: "flag: Grenada", version: "2.0" }, { emoji: "🇬🇪", category: 8, name: "flag: Georgia", version: "2.0" }, { emoji: "🇬🇫", category: 8, name: "flag: French Guiana", version: "2.0" }, { emoji: "🇬🇬", category: 8, name: "flag: Guernsey", version: "2.0" }, { emoji: "🇬🇭", category: 8, name: "flag: Ghana", version: "2.0" }, { emoji: "🇬🇮", category: 8, name: "flag: Gibraltar", version: "2.0" }, { emoji: "🇬🇱", category: 8, name: "flag: Greenland", version: "2.0" }, { emoji: "🇬🇲", category: 8, name: "flag: Gambia", version: "2.0" }, { emoji: "🇬🇳", category: 8, name: "flag: Guinea", version: "2.0" }, { emoji: "🇬🇵", category: 8, name: "flag: Guadeloupe", version: "2.0" }, { emoji: "🇬🇶", category: 8, name: "flag: Equatorial Guinea", version: "2.0" }, { emoji: "🇬🇷", category: 8, name: "flag: Greece", version: "2.0" }, { emoji: "🇬🇸", category: 8, name: "flag: South Georgia & South Sandwich Islands", version: "2.0" }, { emoji: "🇬🇹", category: 8, name: "flag: Guatemala", version: "2.0" }, { emoji: "🇬🇺", category: 8, name: "flag: Guam", version: "2.0" }, { emoji: "🇬🇼", category: 8, name: "flag: Guinea-Bissau", version: "2.0" }, { emoji: "🇬🇾", category: 8, name: "flag: Guyana", version: "2.0" }, { emoji: "🇭🇰", category: 8, name: "flag: Hong Kong SAR China", version: "2.0" }, { emoji: "🇭🇲", category: 8, name: "flag: Heard & McDonald Islands", version: "2.0" }, { emoji: "🇭🇳", category: 8, name: "flag: Honduras", version: "2.0" }, { emoji: "🇭🇷", category: 8, name: "flag: Croatia", version: "2.0" }, { emoji: "🇭🇹", category: 8, name: "flag: Haiti", version: "2.0" }, { emoji: "🇭🇺", category: 8, name: "flag: Hungary", version: "2.0" }, { emoji: "🇮🇨", category: 8, name: "flag: Canary Islands", version: "2.0" }, { emoji: "🇮🇩", category: 8, name: "flag: Indonesia", version: "2.0" }, { emoji: "🇮🇪", category: 8, name: "flag: Ireland", version: "2.0" }, { emoji: "🇮🇱", category: 8, name: "flag: Israel", version: "2.0" }, { emoji: "🇮🇲", category: 8, name: "flag: Isle of Man", version: "2.0" }, { emoji: "🇮🇳", category: 8, name: "flag: India", version: "2.0" }, { emoji: "🇮🇴", category: 8, name: "flag: British Indian Ocean Territory", version: "2.0" }, { emoji: "🇮🇶", category: 8, name: "flag: Iraq", version: "2.0" }, { emoji: "🇮🇷", category: 8, name: "flag: Iran", version: "2.0" }, { emoji: "🇮🇸", category: 8, name: "flag: Iceland", version: "2.0" }, { emoji: "🇮🇹", category: 8, name: "flag: Italy", version: "1.0" }, { emoji: "🇯🇪", category: 8, name: "flag: Jersey", version: "2.0" }, { emoji: "🇯🇲", category: 8, name: "flag: Jamaica", version: "2.0" }, { emoji: "🇯🇴", category: 8, name: "flag: Jordan", version: "2.0" }, { emoji: "🇯🇵", category: 8, name: "flag: Japan", version: "1.0" }, { emoji: "🇰🇪", category: 8, name: "flag: Kenya", version: "2.0" }, { emoji: "🇰🇬", category: 8, name: "flag: Kyrgyzstan", version: "2.0" }, { emoji: "🇰🇭", category: 8, name: "flag: Cambodia", version: "2.0" }, { emoji: "🇰🇮", category: 8, name: "flag: Kiribati", version: "2.0" }, { emoji: "🇰🇲", category: 8, name: "flag: Comoros", version: "2.0" }, { emoji: "🇰🇳", category: 8, name: "flag: St. Kitts & Nevis", version: "2.0" }, { emoji: "🇰🇵", category: 8, name: "flag: North Korea", version: "2.0" }, { emoji: "🇰🇷", category: 8, name: "flag: South Korea", version: "1.0" }, { emoji: "🇰🇼", category: 8, name: "flag: Kuwait", version: "2.0" }, { emoji: "🇰🇾", category: 8, name: "flag: Cayman Islands", version: "2.0" }, { emoji: "🇰🇿", category: 8, name: "flag: Kazakhstan", version: "2.0" }, { emoji: "🇱🇦", category: 8, name: "flag: Laos", version: "2.0" }, { emoji: "🇱🇧", category: 8, name: "flag: Lebanon", version: "2.0" }, { emoji: "🇱🇨", category: 8, name: "flag: St. Lucia", version: "2.0" }, { emoji: "🇱🇮", category: 8, name: "flag: Liechtenstein", version: "2.0" }, { emoji: "🇱🇰", category: 8, name: "flag: Sri Lanka", version: "2.0" }, { emoji: "🇱🇷", category: 8, name: "flag: Liberia", version: "2.0" }, { emoji: "🇱🇸", category: 8, name: "flag: Lesotho", version: "2.0" }, { emoji: "🇱🇹", category: 8, name: "flag: Lithuania", version: "2.0" }, { emoji: "🇱🇺", category: 8, name: "flag: Luxembourg", version: "2.0" }, { emoji: "🇱🇻", category: 8, name: "flag: Latvia", version: "2.0" }, { emoji: "🇱🇾", category: 8, name: "flag: Libya", version: "2.0" }, { emoji: "🇲🇦", category: 8, name: "flag: Morocco", version: "2.0" }, { emoji: "🇲🇨", category: 8, name: "flag: Monaco", version: "2.0" }, { emoji: "🇲🇩", category: 8, name: "flag: Moldova", version: "2.0" }, { emoji: "🇲🇪", category: 8, name: "flag: Montenegro", version: "2.0" }, { emoji: "🇲🇫", category: 8, name: "flag: St. Martin", version: "2.0" }, { emoji: "🇲🇬", category: 8, name: "flag: Madagascar", version: "2.0" }, { emoji: "🇲🇭", category: 8, name: "flag: Marshall Islands", version: "2.0" }, { emoji: "🇲🇰", category: 8, name: "flag: North Macedonia", version: "2.0" }, { emoji: "🇲🇱", category: 8, name: "flag: Mali", version: "2.0" }, { emoji: "🇲🇲", category: 8, name: "flag: Myanmar (Burma)", version: "2.0" }, { emoji: "🇲🇳", category: 8, name: "flag: Mongolia", version: "2.0" }, { emoji: "🇲🇴", category: 8, name: "flag: Macao SAR China", version: "2.0" }, { emoji: "🇲🇵", category: 8, name: "flag: Northern Mariana Islands", version: "2.0" }, { emoji: "🇲🇶", category: 8, name: "flag: Martinique", version: "2.0" }, { emoji: "🇲🇷", category: 8, name: "flag: Mauritania", version: "2.0" }, { emoji: "🇲🇸", category: 8, name: "flag: Montserrat", version: "2.0" }, { emoji: "🇲🇹", category: 8, name: "flag: Malta", version: "2.0" }, { emoji: "🇲🇺", category: 8, name: "flag: Mauritius", version: "2.0" }, { emoji: "🇲🇻", category: 8, name: "flag: Maldives", version: "2.0" }, { emoji: "🇲🇼", category: 8, name: "flag: Malawi", version: "2.0" }, { emoji: "🇲🇽", category: 8, name: "flag: Mexico", version: "2.0" }, { emoji: "🇲🇾", category: 8, name: "flag: Malaysia", version: "2.0" }, { emoji: "🇲🇿", category: 8, name: "flag: Mozambique", version: "2.0" }, { emoji: "🇳🇦", category: 8, name: "flag: Namibia", version: "2.0" }, { emoji: "🇳🇨", category: 8, name: "flag: New Caledonia", version: "2.0" }, { emoji: "🇳🇪", category: 8, name: "flag: Niger", version: "2.0" }, { emoji: "🇳🇫", category: 8, name: "flag: Norfolk Island", version: "2.0" }, { emoji: "🇳🇬", category: 8, name: "flag: Nigeria", version: "2.0" }, { emoji: "🇳🇮", category: 8, name: "flag: Nicaragua", version: "2.0" }, { emoji: "🇳🇱", category: 8, name: "flag: Netherlands", version: "2.0" }, { emoji: "🇳🇴", category: 8, name: "flag: Norway", version: "2.0" }, { emoji: "🇳🇵", category: 8, name: "flag: Nepal", version: "2.0" }, { emoji: "🇳🇷", category: 8, name: "flag: Nauru", version: "2.0" }, { emoji: "🇳🇺", category: 8, name: "flag: Niue", version: "2.0" }, { emoji: "🇳🇿", category: 8, name: "flag: New Zealand", version: "2.0" }, { emoji: "🇴🇲", category: 8, name: "flag: Oman", version: "2.0" }, { emoji: "🇵🇦", category: 8, name: "flag: Panama", version: "2.0" }, { emoji: "🇵🇪", category: 8, name: "flag: Peru", version: "2.0" }, { emoji: "🇵🇫", category: 8, name: "flag: French Polynesia", version: "2.0" }, { emoji: "🇵🇬", category: 8, name: "flag: Papua New Guinea", version: "2.0" }, { emoji: "🇵🇭", category: 8, name: "flag: Philippines", version: "2.0" }, { emoji: "🇵🇰", category: 8, name: "flag: Pakistan", version: "2.0" }, { emoji: "🇵🇱", category: 8, name: "flag: Poland", version: "2.0" }, { emoji: "🇵🇲", category: 8, name: "flag: St. Pierre & Miquelon", version: "2.0" }, { emoji: "🇵🇳", category: 8, name: "flag: Pitcairn Islands", version: "2.0" }, { emoji: "🇵🇷", category: 8, name: "flag: Puerto Rico", version: "2.0" }, { emoji: "🇵🇸", category: 8, name: "flag: Palestinian Territories", version: "2.0" }, { emoji: "🇵🇹", category: 8, name: "flag: Portugal", version: "2.0" }, { emoji: "🇵🇼", category: 8, name: "flag: Palau", version: "2.0" }, { emoji: "🇵🇾", category: 8, name: "flag: Paraguay", version: "2.0" }, { emoji: "🇶🇦", category: 8, name: "flag: Qatar", version: "2.0" }, { emoji: "🇷🇪", category: 8, name: "flag: Réunion", version: "2.0" }, { emoji: "🇷🇴", category: 8, name: "flag: Romania", version: "2.0" }, { emoji: "🇷🇸", category: 8, name: "flag: Serbia", version: "2.0" }, { emoji: "🇷🇺", category: 8, name: "flag: Russia", version: "1.0" }, { emoji: "🇷🇼", category: 8, name: "flag: Rwanda", version: "2.0" }, { emoji: "🇸🇦", category: 8, name: "flag: Saudi Arabia", version: "2.0" }, { emoji: "🇸🇧", category: 8, name: "flag: Solomon Islands", version: "2.0" }, { emoji: "🇸🇨", category: 8, name: "flag: Seychelles", version: "2.0" }, { emoji: "🇸🇩", category: 8, name: "flag: Sudan", version: "2.0" }, { emoji: "🇸🇪", category: 8, name: "flag: Sweden", version: "2.0" }, { emoji: "🇸🇬", category: 8, name: "flag: Singapore", version: "2.0" }, { emoji: "🇸🇭", category: 8, name: "flag: St. Helena", version: "2.0" }, { emoji: "🇸🇮", category: 8, name: "flag: Slovenia", version: "2.0" }, { emoji: "🇸🇯", category: 8, name: "flag: Svalbard & Jan Mayen", version: "2.0" }, { emoji: "🇸🇰", category: 8, name: "flag: Slovakia", version: "2.0" }, { emoji: "🇸🇱", category: 8, name: "flag: Sierra Leone", version: "2.0" }, { emoji: "🇸🇲", category: 8, name: "flag: San Marino", version: "2.0" }, { emoji: "🇸🇳", category: 8, name: "flag: Senegal", version: "2.0" }, { emoji: "🇸🇴", category: 8, name: "flag: Somalia", version: "2.0" }, { emoji: "🇸🇷", category: 8, name: "flag: Suriname", version: "2.0" }, { emoji: "🇸🇸", category: 8, name: "flag: South Sudan", version: "2.0" }, { emoji: "🇸🇹", category: 8, name: "flag: São Tomé & Príncipe", version: "2.0" }, { emoji: "🇸🇻", category: 8, name: "flag: El Salvador", version: "2.0" }, { emoji: "🇸🇽", category: 8, name: "flag: Sint Maarten", version: "2.0" }, { emoji: "🇸🇾", category: 8, name: "flag: Syria", version: "2.0" }, { emoji: "🇸🇿", category: 8, name: "flag: Eswatini", version: "2.0" }, { emoji: "🇹🇦", category: 8, name: "flag: Tristan da Cunha", version: "2.0" }, { emoji: "🇹🇨", category: 8, name: "flag: Turks & Caicos Islands", version: "2.0" }, { emoji: "🇹🇩", category: 8, name: "flag: Chad", version: "2.0" }, { emoji: "🇹🇫", category: 8, name: "flag: French Southern Territories", version: "2.0" }, { emoji: "🇹🇬", category: 8, name: "flag: Togo", version: "2.0" }, { emoji: "🇹🇭", category: 8, name: "flag: Thailand", version: "2.0" }, { emoji: "🇹🇯", category: 8, name: "flag: Tajikistan", version: "2.0" }, { emoji: "🇹🇰", category: 8, name: "flag: Tokelau", version: "2.0" }, { emoji: "🇹🇱", category: 8, name: "flag: Timor-Leste", version: "2.0" }, { emoji: "🇹🇲", category: 8, name: "flag: Turkmenistan", version: "2.0" }, { emoji: "🇹🇳", category: 8, name: "flag: Tunisia", version: "2.0" }, { emoji: "🇹🇴", category: 8, name: "flag: Tonga", version: "2.0" }, { emoji: "🇹🇷", category: 8, name: "flag: Turkey", version: "2.0" }, { emoji: "🇹🇹", category: 8, name: "flag: Trinidad & Tobago", version: "2.0" }, { emoji: "🇹🇻", category: 8, name: "flag: Tuvalu", version: "2.0" }, { emoji: "🇹🇼", category: 8, name: "flag: Taiwan", version: "2.0" }, { emoji: "🇹🇿", category: 8, name: "flag: Tanzania", version: "2.0" }, { emoji: "🇺🇦", category: 8, name: "flag: Ukraine", version: "2.0" }, { emoji: "🇺🇬", category: 8, name: "flag: Uganda", version: "2.0" }, { emoji: "🇺🇲", category: 8, name: "flag: U.S. Outlying Islands", version: "2.0" }, { emoji: "🇺🇳", category: 8, name: "flag: United Nations", version: "4.0" }, { emoji: "🇺🇸", category: 8, name: "flag: United States", version: "1.0" }, { emoji: "🇺🇾", category: 8, name: "flag: Uruguay", version: "2.0" }, { emoji: "🇺🇿", category: 8, name: "flag: Uzbekistan", version: "2.0" }, { emoji: "🇻🇦", category: 8, name: "flag: Vatican City", version: "2.0" }, { emoji: "🇻🇨", category: 8, name: "flag: St. Vincent & Grenadines", version: "2.0" }, { emoji: "🇻🇪", category: 8, name: "flag: Venezuela", version: "2.0" }, { emoji: "🇻🇬", category: 8, name: "flag: British Virgin Islands", version: "2.0" }, { emoji: "🇻🇮", category: 8, name: "flag: U.S. Virgin Islands", version: "2.0" }, { emoji: "🇻🇳", category: 8, name: "flag: Vietnam", version: "2.0" }, { emoji: "🇻🇺", category: 8, name: "flag: Vanuatu", version: "2.0" }, { emoji: "🇼🇫", category: 8, name: "flag: Wallis & Futuna", version: "2.0" }, { emoji: "🇼🇸", category: 8, name: "flag: Samoa", version: "2.0" }, { emoji: "🇽🇰", category: 8, name: "flag: Kosovo", version: "2.0" }, { emoji: "🇾🇪", category: 8, name: "flag: Yemen", version: "2.0" }, { emoji: "🇾🇹", category: 8, name: "flag: Mayotte", version: "2.0" }, { emoji: "🇿🇦", category: 8, name: "flag: South Africa", version: "2.0" }, { emoji: "🇿🇲", category: 8, name: "flag: Zambia", version: "2.0" }, { emoji: "🇿🇼", category: 8, name: "flag: Zimbabwe", version: "2.0" }, { emoji: "🏴󠁧󠁢󠁥󠁮󠁧󠁿", category: 8, name: "flag: England", version: "5.0" }, { emoji: "🏴󠁧󠁢󠁳󠁣󠁴󠁿", category: 8, name: "flag: Scotland", version: "5.0" }, { emoji: "🏴󠁧󠁢󠁷󠁬󠁳󠁿", category: 8, name: "flag: Wales", version: "5.0" }] }; const Ce = "emoji-picker__emoji"; function Ee(e, o) { const n = document.createElement(e); return o && (n.className = o), n } function _e(e) { for (; e.firstChild;)e.removeChild(e.firstChild) } function ze(e, o) { e.dataset.loaded || (e.dataset.custom ? function (e) { const o = Ee("img", "emoji-picker__custom-emoji"); e.dataset.emoji && (o.src = e.dataset.emoji, e.innerText = "", e.appendChild(o)) }(e) : "twemoji" === o.style && function (e, o) { e.dataset.emoji && (e.innerHTML = ke.parse(e.dataset.emoji, o.twemojiOptions)) }(e, o), e.dataset.loaded = "true", e.style.opacity = "1") } class Oe { constructor(e, o) { this.events = e, this.options = o } render() { const e = Ee("div", "emoji-picker__preview"); return this.emoji = Ee("div", "emoji-picker__preview-emoji"), e.appendChild(this.emoji), this.name = Ee("div", "emoji-picker__preview-name"), e.appendChild(this.name), this.events.on("showPreview", (e => this.showPreview(e))), this.events.on("hidePreview", (() => this.hidePreview())), e } showPreview(e) { let o = e.emoji; e.custom ? o = `` : "twemoji" === this.options.style && (o = ke.parse(e.emoji, this.options.twemojiOptions)), this.emoji.innerHTML = o, this.name.innerHTML = e.name } hidePreview() { this.emoji.innerHTML = "", this.name.innerHTML = "" } } function Ie(e, o) { for (var n = 0; n < o.length; n++) { var i = o[n]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i) } } function Se(e, o, n) { return o in e ? Object.defineProperty(e, o, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[o] = n, e } function Pe(e) { for (var o = 1; o < arguments.length; o++) { var n = null != arguments[o] ? arguments[o] : {}, i = Object.keys(n); "function" == typeof Object.getOwnPropertySymbols && (i = i.concat(Object.getOwnPropertySymbols(n).filter((function (e) { return Object.getOwnPropertyDescriptor(n, e).enumerable })))), i.forEach((function (o) { Se(e, o, n[o]) })) } return e } function Me(e, o) { return function (e) { if (Array.isArray(e)) return e }(e) || function (e, o) { var n = [], i = !0, a = !1, r = void 0; try { for (var t, s = e[Symbol.iterator](); !(i = (t = s.next()).done) && (n.push(t.value), !o || n.length !== o); i = !0); } catch (e) { a = !0, r = e } finally { try { i || null == s.return || s.return() } finally { if (a) throw r } } return n }(e, o) || function () { throw new TypeError("Invalid attempt to destructure non-iterable instance") }() } var Ae = function () { }, Le = {}, Te = {}, Ne = { mark: Ae, measure: Ae }; try { "undefined" != typeof window && (Le = window), "undefined" != typeof document && (Te = document), "undefined" != typeof MutationObserver && MutationObserver, "undefined" != typeof performance && (Ne = performance) } catch (e) { } var Fe = (Le.navigator || {}).userAgent, Be = void 0 === Fe ? "" : Fe, De = Le, Re = Te, qe = Ne, Ve = (De.document, !!Re.documentElement && !!Re.head && "function" == typeof Re.addEventListener && "function" == typeof Re.createElement), He = (~Be.indexOf("MSIE") || Be.indexOf("Trident/"), function () { try { } catch (e) { return !1 } }(), "group"), Ue = "primary", We = "secondary", Ke = De.FontAwesomeConfig || {}; if (Re && "function" == typeof Re.querySelector) { [["data-family-prefix", "familyPrefix"], ["data-replacement-class", "replacementClass"], ["data-auto-replace-svg", "autoReplaceSvg"], ["data-auto-add-css", "autoAddCss"], ["data-auto-a11y", "autoA11y"], ["data-search-pseudo-elements", "searchPseudoElements"], ["data-observe-mutations", "observeMutations"], ["data-mutate-approach", "mutateApproach"], ["data-keep-original-source", "keepOriginalSource"], ["data-measure-performance", "measurePerformance"], ["data-show-missing-icons", "showMissingIcons"]].forEach((function (e) { var o = Me(e, 2), n = o[0], i = o[1], a = function (e) { return "" === e || "false" !== e && ("true" === e || e) }(function (e) { var o = Re.querySelector("script[" + e + "]"); if (o) return o.getAttribute(e) }(n)); null != a && (Ke[i] = a) })) } var Je = Pe({}, { familyPrefix: "fa", replacementClass: "svg-inline--fa", autoReplaceSvg: !0, autoAddCss: !0, autoA11y: !0, searchPseudoElements: !1, observeMutations: !0, mutateApproach: "async", keepOriginalSource: !0, measurePerformance: !1, showMissingIcons: !0 }, Ke); Je.autoReplaceSvg || (Je.observeMutations = !1); var Ge = Pe({}, Je); De.FontAwesomeConfig = Ge; var Xe = De || {}; Xe.___FONT_AWESOME___ || (Xe.___FONT_AWESOME___ = {}), Xe.___FONT_AWESOME___.styles || (Xe.___FONT_AWESOME___.styles = {}), Xe.___FONT_AWESOME___.hooks || (Xe.___FONT_AWESOME___.hooks = {}), Xe.___FONT_AWESOME___.shims || (Xe.___FONT_AWESOME___.shims = []); var Ye = Xe.___FONT_AWESOME___, $e = []; Ve && ((Re.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(Re.readyState) || Re.addEventListener("DOMContentLoaded", (function e() { Re.removeEventListener("DOMContentLoaded", e), 1, $e.map((function (e) { return e() })) }))); "undefined" != typeof global && void 0 !== global.process && global.process.emit, "undefined" == typeof setImmediate ? setTimeout : setImmediate; var Ze = { size: 16, x: 0, y: 0, rotate: 0, flipX: !1, flipY: !1 }; function Qe() { for (var e = 12, o = ""; e-- > 0;)o += "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62 * Math.random() | 0]; return o } function eo(e) { return "".concat(e).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">") } function oo(e) { return Object.keys(e || {}).reduce((function (o, n) { return o + "".concat(n, ": ").concat(e[n], ";") }), "") } function no(e) { return e.size !== Ze.size || e.x !== Ze.x || e.y !== Ze.y || e.rotate !== Ze.rotate || e.flipX || e.flipY } function io(e) { var o = e.transform, n = e.containerWidth, i = e.iconWidth, a = { transform: "translate(".concat(n / 2, " 256)") }, r = "translate(".concat(32 * o.x, ", ").concat(32 * o.y, ") "), t = "scale(".concat(o.size / 16 * (o.flipX ? -1 : 1), ", ").concat(o.size / 16 * (o.flipY ? -1 : 1), ") "), s = "rotate(".concat(o.rotate, " 0 0)"); return { outer: a, inner: { transform: "".concat(r, " ").concat(t, " ").concat(s) }, path: { transform: "translate(".concat(i / 2 * -1, " -256)") } } } var ao = { x: 0, y: 0, width: "100%", height: "100%" }; function ro(e) { var o = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]; return e.attributes && (e.attributes.fill || o) && (e.attributes.fill = "black"), e } function to(e) { var o = e.icons, n = o.main, i = o.mask, a = e.prefix, r = e.iconName, t = e.transform, s = e.symbol, m = e.title, c = e.maskId, d = e.titleId, g = e.extra, u = e.watchable, l = void 0 !== u && u, v = i.found ? i : n, f = v.width, y = v.height, j = "fa-w-".concat(Math.ceil(f / y * 16)), h = [Ge.replacementClass, r ? "".concat(Ge.familyPrefix, "-").concat(r) : "", j].filter((function (e) { return -1 === g.classes.indexOf(e) })).concat(g.classes).join(" "), p = { children: [], attributes: Pe({}, g.attributes, { "data-prefix": a, "data-icon": r, class: h, role: g.attributes.role || "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 ".concat(f, " ").concat(y) }) }; l && (p.attributes["data-fa-i2svg"] = ""), m && p.children.push({ tag: "title", attributes: { id: p.attributes["aria-labelledby"] || "title-".concat(d || Qe()) }, children: [m] }); var b = Pe({}, p, { prefix: a, iconName: r, main: n, mask: i, maskId: c, transform: t, symbol: s, styles: g.styles }), w = i.found && n.found ? function (e) { var o, n = e.children, i = e.attributes, a = e.main, r = e.mask, t = e.maskId, s = e.transform, m = a.width, c = a.icon, d = r.width, g = r.icon, u = io({ transform: s, containerWidth: d, iconWidth: m }), l = { tag: "rect", attributes: Pe({}, ao, { fill: "white" }) }, v = c.children ? { children: c.children.map(ro) } : {}, f = { tag: "g", attributes: Pe({}, u.inner), children: [ro(Pe({ tag: c.tag, attributes: Pe({}, c.attributes, u.path) }, v))] }, y = { tag: "g", attributes: Pe({}, u.outer), children: [f] }, j = "mask-".concat(t || Qe()), h = "clip-".concat(t || Qe()), p = { tag: "mask", attributes: Pe({}, ao, { id: j, maskUnits: "userSpaceOnUse", maskContentUnits: "userSpaceOnUse" }), children: [l, y] }, b = { tag: "defs", children: [{ tag: "clipPath", attributes: { id: h }, children: (o = g, "g" === o.tag ? o.children : [o]) }, p] }; return n.push(b, { tag: "rect", attributes: Pe({ fill: "currentColor", "clip-path": "url(#".concat(h, ")"), mask: "url(#".concat(j, ")") }, ao) }), { children: n, attributes: i } }(b) : function (e) { var o = e.children, n = e.attributes, i = e.main, a = e.transform, r = oo(e.styles); if (r.length > 0 && (n.style = r), no(a)) { var t = io({ transform: a, containerWidth: i.width, iconWidth: i.width }); o.push({ tag: "g", attributes: Pe({}, t.outer), children: [{ tag: "g", attributes: Pe({}, t.inner), children: [{ tag: i.icon.tag, children: i.icon.children, attributes: Pe({}, i.icon.attributes, t.path) }] }] }) } else o.push(i.icon); return { children: o, attributes: n } }(b), k = w.children, x = w.attributes; return b.children = k, b.attributes = x, s ? function (e) { var o = e.prefix, n = e.iconName, i = e.children, a = e.attributes, r = e.symbol; return [{ tag: "svg", attributes: { style: "display: none;" }, children: [{ tag: "symbol", attributes: Pe({}, a, { id: !0 === r ? "".concat(o, "-").concat(Ge.familyPrefix, "-").concat(n) : r }), children: i }] }] }(b) : function (e) { var o = e.children, n = e.main, i = e.mask, a = e.attributes, r = e.styles, t = e.transform; if (no(t) && n.found && !i.found) { var s = { x: n.width / n.height / 2, y: .5 }; a.style = oo(Pe({}, r, { "transform-origin": "".concat(s.x + t.x / 16, "em ").concat(s.y + t.y / 16, "em") })) } return [{ tag: "svg", attributes: a, children: o }] }(b) } var so = function () { }, mo = (Ge.measurePerformance && qe && qe.mark && qe.measure, function (e, o, n, i) { var a, r, t, s = Object.keys(e), m = s.length, c = void 0 !== i ? function (e, o) { return function (n, i, a, r) { return e.call(o, n, i, a, r) } }(o, i) : o; for (void 0 === n ? (a = 1, t = e[s[0]]) : (a = 0, t = n); a < m; a++)t = c(t, e[r = s[a]], r, e); return t }); function co(e, o) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, i = n.skipHooks, a = void 0 !== i && i, r = Object.keys(o).reduce((function (e, n) { var i = o[n]; return !!i.icon ? e[i.iconName] = i.icon : e[n] = i, e }), {}); "function" != typeof Ye.hooks.addPack || a ? Ye.styles[e] = Pe({}, Ye.styles[e] || {}, r) : Ye.hooks.addPack(e, r), "fas" === e && co("fa", o) } var go = Ye.styles, uo = Ye.shims, lo = function () { var e = function (e) { return mo(go, (function (o, n, i) { return o[i] = mo(n, e, {}), o }), {}) }; e((function (e, o, n) { return o[3] && (e[o[3]] = n), e })), e((function (e, o, n) { var i = o[2]; return e[n] = n, i.forEach((function (o) { e[o] = n })), e })); var o = "far" in go; mo(uo, (function (e, n) { var i = n[0], a = n[1], r = n[2]; return "far" !== a || o || (a = "fas"), e[i] = { prefix: a, iconName: r }, e }), {}) }; lo(); Ye.styles; function vo(e, o, n) { if (e && e[o] && e[o][n]) return { prefix: o, iconName: n, icon: e[o][n] } } function fo(e) { var o = e.tag, n = e.attributes, i = void 0 === n ? {} : n, a = e.children, r = void 0 === a ? [] : a; return "string" == typeof e ? eo(e) : "<".concat(o, " ").concat(function (e) { return Object.keys(e || {}).reduce((function (o, n) { return o + "".concat(n, '="').concat(eo(e[n]), '" ') }), "").trim() }(i), ">").concat(r.map(fo).join(""), "") } function yo(e) { this.name = "MissingIcon", this.message = e || "Icon unavailable", this.stack = (new Error).stack } yo.prototype = Object.create(Error.prototype), yo.prototype.constructor = yo; var jo = { fill: "currentColor" }, ho = { attributeType: "XML", repeatCount: "indefinite", dur: "2s" }, po = (Pe({}, jo, { d: "M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z" }), Pe({}, ho, { attributeName: "opacity" })); Pe({}, jo, { cx: "256", cy: "364", r: "28" }), Pe({}, ho, { attributeName: "r", values: "28;14;28;28;14;28;" }), Pe({}, po, { values: "1;0;1;1;0;1;" }), Pe({}, jo, { opacity: "1", d: "M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z" }), Pe({}, po, { values: "1;0;0;0;0;1;" }), Pe({}, jo, { opacity: "0", d: "M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z" }), Pe({}, po, { values: "0;0;1;1;0;0;" }), Ye.styles; function bo(e) { var o = e[0], n = e[1], i = Me(e.slice(4), 1)[0]; return { found: !0, width: o, height: n, icon: Array.isArray(i) ? { tag: "g", attributes: { class: "".concat(Ge.familyPrefix, "-").concat(He) }, children: [{ tag: "path", attributes: { class: "".concat(Ge.familyPrefix, "-").concat(We), fill: "currentColor", d: i[0] } }, { tag: "path", attributes: { class: "".concat(Ge.familyPrefix, "-").concat(Ue), fill: "currentColor", d: i[1] } }] } : { tag: "path", attributes: { fill: "currentColor", d: i } } } } Ye.styles; function wo() { Ge.autoAddCss && !_o && (!function (e) { if (e && Ve) { var o = Re.createElement("style"); o.setAttribute("type", "text/css"), o.innerHTML = e; for (var n = Re.head.childNodes, i = null, a = n.length - 1; a > -1; a--) { var r = n[a], t = (r.tagName || "").toUpperCase();["STYLE", "LINK"].indexOf(t) > -1 && (i = r) } Re.head.insertBefore(o, i) } }(function () { var e = "fa", o = "svg-inline--fa", n = Ge.familyPrefix, i = Ge.replacementClass, a = 'svg:not(:root).svg-inline--fa {\n overflow: visible;\n}\n\n.svg-inline--fa {\n display: inline-block;\n font-size: inherit;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.225em;\n}\n.svg-inline--fa.fa-w-1 {\n width: 0.0625em;\n}\n.svg-inline--fa.fa-w-2 {\n width: 0.125em;\n}\n.svg-inline--fa.fa-w-3 {\n width: 0.1875em;\n}\n.svg-inline--fa.fa-w-4 {\n width: 0.25em;\n}\n.svg-inline--fa.fa-w-5 {\n width: 0.3125em;\n}\n.svg-inline--fa.fa-w-6 {\n width: 0.375em;\n}\n.svg-inline--fa.fa-w-7 {\n width: 0.4375em;\n}\n.svg-inline--fa.fa-w-8 {\n width: 0.5em;\n}\n.svg-inline--fa.fa-w-9 {\n width: 0.5625em;\n}\n.svg-inline--fa.fa-w-10 {\n width: 0.625em;\n}\n.svg-inline--fa.fa-w-11 {\n width: 0.6875em;\n}\n.svg-inline--fa.fa-w-12 {\n width: 0.75em;\n}\n.svg-inline--fa.fa-w-13 {\n width: 0.8125em;\n}\n.svg-inline--fa.fa-w-14 {\n width: 0.875em;\n}\n.svg-inline--fa.fa-w-15 {\n width: 0.9375em;\n}\n.svg-inline--fa.fa-w-16 {\n width: 1em;\n}\n.svg-inline--fa.fa-w-17 {\n width: 1.0625em;\n}\n.svg-inline--fa.fa-w-18 {\n width: 1.125em;\n}\n.svg-inline--fa.fa-w-19 {\n width: 1.1875em;\n}\n.svg-inline--fa.fa-w-20 {\n width: 1.25em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: 0.3em;\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: 0.3em;\n width: auto;\n}\n.svg-inline--fa.fa-border {\n height: 1.5em;\n}\n.svg-inline--fa.fa-li {\n width: 2em;\n}\n.svg-inline--fa.fa-fw {\n width: 1.25em;\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: #ff253a;\n border-radius: 1em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: #fff;\n height: 1.5em;\n line-height: 1;\n max-width: 5em;\n min-width: 1.5em;\n overflow: hidden;\n padding: 0.25em;\n right: 0;\n text-overflow: ellipsis;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: 0;\n right: 0;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: 0;\n left: 0;\n right: auto;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n right: 0;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: 0;\n right: auto;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n\n.fa-lg {\n font-size: 1.3333333333em;\n line-height: 0.75em;\n vertical-align: -0.0667em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: 2.5em;\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: -2em;\n position: absolute;\n text-align: center;\n width: 2em;\n line-height: inherit;\n}\n\n.fa-border {\n border: solid 0.08em #eee;\n border-radius: 0.1em;\n padding: 0.2em 0.25em 0.15em;\n}\n\n.fa-pull-left {\n float: left;\n}\n\n.fa-pull-right {\n float: right;\n}\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n margin-right: 0.3em;\n}\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n margin-left: 0.3em;\n}\n\n.fa-spin {\n -webkit-animation: fa-spin 2s infinite linear;\n animation: fa-spin 2s infinite linear;\n}\n\n.fa-pulse {\n -webkit-animation: fa-spin 1s infinite steps(8);\n animation: fa-spin 1s infinite steps(8);\n}\n\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical,\n:root .fa-flip-both {\n -webkit-filter: none;\n filter: none;\n}\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: #fff;\n}\n\n.sr-only {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n}\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n clip: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n position: static;\n width: auto;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: 1;\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: 0.4;\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: 0.4;\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: 1;\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.fad.fa-inverse {\n color: #fff;\n}'; if (n !== e || i !== o) { var r = new RegExp("\\.".concat(e, "\\-"), "g"), t = new RegExp("\\--".concat(e, "\\-"), "g"), s = new RegExp("\\.".concat(o), "g"); a = a.replace(r, ".".concat(n, "-")).replace(t, "--".concat(n, "-")).replace(s, ".".concat(i)) } return a }()), _o = !0) } function ko(e, o) { return Object.defineProperty(e, "abstract", { get: o }), Object.defineProperty(e, "html", { get: function () { return e.abstract.map((function (e) { return fo(e) })) } }), Object.defineProperty(e, "node", { get: function () { if (Ve) { var o = Re.createElement("div"); return o.innerHTML = e.html, o.children } } }), e } function xo(e) { var o = e.prefix, n = void 0 === o ? "fa" : o, i = e.iconName; if (i) return vo(Eo.definitions, n, i) || vo(Ye.styles, n, i) } var Co, Eo = new (function () { function e() { !function (e, o) { if (!(e instanceof o)) throw new TypeError("Cannot call a class as a function") }(this, e), this.definitions = {} } var o, n, i; return o = e, (n = [{ key: "add", value: function () { for (var e = this, o = arguments.length, n = new Array(o), i = 0; i < o; i++)n[i] = arguments[i]; var a = n.reduce(this._pullDefinitions, {}); Object.keys(a).forEach((function (o) { e.definitions[o] = Pe({}, e.definitions[o] || {}, a[o]), co(o, a[o]), lo() })) } }, { key: "reset", value: function () { this.definitions = {} } }, { key: "_pullDefinitions", value: function (e, o) { var n = o.prefix && o.iconName && o.icon ? { 0: o } : o; return Object.keys(n).map((function (o) { var i = n[o], a = i.prefix, r = i.iconName, t = i.icon; e[a] || (e[a] = {}), e[a][r] = t })), e } }]) && Ie(o.prototype, n), i && Ie(o, i), e }()), _o = !1, zo = (Co = function (e) { var o = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = o.transform, i = void 0 === n ? Ze : n, a = o.symbol, r = void 0 !== a && a, t = o.mask, s = void 0 === t ? null : t, m = o.maskId, c = void 0 === m ? null : m, d = o.title, g = void 0 === d ? null : d, u = o.titleId, l = void 0 === u ? null : u, v = o.classes, f = void 0 === v ? [] : v, y = o.attributes, j = void 0 === y ? {} : y, h = o.styles, p = void 0 === h ? {} : h; if (e) { var b = e.prefix, w = e.iconName, k = e.icon; return ko(Pe({ type: "icon" }, e), (function () { return wo(), Ge.autoA11y && (g ? j["aria-labelledby"] = "".concat(Ge.replacementClass, "-title-").concat(l || Qe()) : (j["aria-hidden"] = "true", j.focusable = "false")), to({ icons: { main: bo(k), mask: s ? bo(s.icon) : { found: !1, width: null, height: null, icon: {} } }, prefix: b, iconName: w, transform: Pe({}, Ze, i), symbol: r, title: g, maskId: c, titleId: l, extra: { attributes: j, styles: p, classes: f } }) })) } }, function (e) { var o = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = (e || {}).icon ? e : xo(e || {}), i = o.mask; return i && (i = (i || {}).icon ? i : xo(i || {})), Co(n, Pe({}, o, { mask: i })) }); Eo.add({ prefix: "far", iconName: "building", icon: [448, 512, [], "f1ad", "M128 148v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12zm140 12h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm-128 96h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm128 0h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm-76 84v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm76 12h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm180 124v36H0v-36c0-6.6 5.4-12 12-12h19.5V24c0-13.3 10.7-24 24-24h337c13.3 0 24 10.7 24 24v440H436c6.6 0 12 5.4 12 12zM79.5 463H192v-67c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v67h112.5V49L80 48l-.5 415z"] }, { prefix: "fas", iconName: "cat", icon: [512, 512, [], "f6be", "M290.59 192c-20.18 0-106.82 1.98-162.59 85.95V192c0-52.94-43.06-96-96-96-17.67 0-32 14.33-32 32s14.33 32 32 32c17.64 0 32 14.36 32 32v256c0 35.3 28.7 64 64 64h176c8.84 0 16-7.16 16-16v-16c0-17.67-14.33-32-32-32h-32l128-96v144c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V289.86c-10.29 2.67-20.89 4.54-32 4.54-61.81 0-113.52-44.05-125.41-102.4zM448 96h-64l-64-64v134.4c0 53.02 42.98 96 96 96s96-42.98 96-96V32l-64 64zm-72 80c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16zm80 0c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16z"] }, { prefix: "fas", iconName: "coffee", icon: [640, 512, [], "f0f4", "M192 384h192c53 0 96-43 96-96h32c70.6 0 128-57.4 128-128S582.6 32 512 32H120c-13.3 0-24 10.7-24 24v232c0 53 43 96 96 96zM512 96c35.3 0 64 28.7 64 64s-28.7 64-64 64h-32V96h32zm47.7 384H48.3c-47.6 0-61-64-36-64h583.3c25 0 11.8 64-35.9 64z"] }, { prefix: "far", iconName: "flag", icon: [512, 512, [], "f024", "M336.174 80c-49.132 0-93.305-32-161.913-32-31.301 0-58.303 6.482-80.721 15.168a48.04 48.04 0 0 0 2.142-20.727C93.067 19.575 74.167 1.594 51.201.104 23.242-1.71 0 20.431 0 48c0 17.764 9.657 33.262 24 41.562V496c0 8.837 7.163 16 16 16h16c8.837 0 16-7.163 16-16v-83.443C109.869 395.28 143.259 384 199.826 384c49.132 0 93.305 32 161.913 32 58.479 0 101.972-22.617 128.548-39.981C503.846 367.161 512 352.051 512 335.855V95.937c0-34.459-35.264-57.768-66.904-44.117C409.193 67.309 371.641 80 336.174 80zM464 336c-21.783 15.412-60.824 32-102.261 32-59.945 0-102.002-32-161.913-32-43.361 0-96.379 9.403-127.826 24V128c21.784-15.412 60.824-32 102.261-32 59.945 0 102.002 32 161.913 32 43.271 0 96.32-17.366 127.826-32v240z"] }, { prefix: "far", iconName: "frown", icon: [496, 512, [], "f119", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160-64c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm-80 128c-40.2 0-78 17.7-103.8 48.6-8.5 10.2-7.1 25.3 3.1 33.8 10.2 8.4 25.3 7.1 33.8-3.1 16.6-19.9 41-31.4 66.9-31.4s50.3 11.4 66.9 31.4c8.1 9.7 23.1 11.9 33.8 3.1 10.2-8.5 11.5-23.6 3.1-33.8C326 321.7 288.2 304 248 304z"] }, { prefix: "fas", iconName: "futbol", icon: [512, 512, [], "f1e3", "M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zm-48 0l-.003-.282-26.064 22.741-62.679-58.5 16.454-84.355 34.303 3.072c-24.889-34.216-60.004-60.089-100.709-73.141l13.651 31.939L256 139l-74.953-41.525 13.651-31.939c-40.631 13.028-75.78 38.87-100.709 73.141l34.565-3.073 16.192 84.355-62.678 58.5-26.064-22.741-.003.282c0 43.015 13.497 83.952 38.472 117.991l7.704-33.897 85.138 10.447 36.301 77.826-29.902 17.786c40.202 13.122 84.29 13.148 124.572 0l-29.902-17.786 36.301-77.826 85.138-10.447 7.704 33.897C442.503 339.952 456 299.015 456 256zm-248.102 69.571l-29.894-91.312L256 177.732l77.996 56.527-29.622 91.312h-96.476z"] }, { prefix: "fas", iconName: "history", icon: [512, 512, [], "f1da", "M504 255.531c.253 136.64-111.18 248.372-247.82 248.468-59.015.042-113.223-20.53-155.822-54.911-11.077-8.94-11.905-25.541-1.839-35.607l11.267-11.267c8.609-8.609 22.353-9.551 31.891-1.984C173.062 425.135 212.781 440 256 440c101.705 0 184-82.311 184-184 0-101.705-82.311-184-184-184-48.814 0-93.149 18.969-126.068 49.932l50.754 50.754c10.08 10.08 2.941 27.314-11.313 27.314H24c-8.837 0-16-7.163-16-16V38.627c0-14.254 17.234-21.393 27.314-11.314l49.372 49.372C129.209 34.136 189.552 8 256 8c136.81 0 247.747 110.78 248 247.531zm-180.912 78.784l9.823-12.63c8.138-10.463 6.253-25.542-4.21-33.679L288 256.349V152c0-13.255-10.745-24-24-24h-16c-13.255 0-24 10.745-24 24v135.651l65.409 50.874c10.463 8.137 25.541 6.253 33.679-4.21z"] }, { prefix: "fas", iconName: "icons", icon: [512, 512, [], "f86d", "M116.65 219.35a15.68 15.68 0 0 0 22.65 0l96.75-99.83c28.15-29 26.5-77.1-4.91-103.88C203.75-7.7 163-3.5 137.86 22.44L128 32.58l-9.85-10.14C93.05-3.5 52.25-7.7 24.86 15.64c-31.41 26.78-33 74.85-5 103.88zm143.92 100.49h-48l-7.08-14.24a27.39 27.39 0 0 0-25.66-17.78h-71.71a27.39 27.39 0 0 0-25.66 17.78l-7 14.24h-48A27.45 27.45 0 0 0 0 347.3v137.25A27.44 27.44 0 0 0 27.43 512h233.14A27.45 27.45 0 0 0 288 484.55V347.3a27.45 27.45 0 0 0-27.43-27.46zM144 468a52 52 0 1 1 52-52 52 52 0 0 1-52 52zm355.4-115.9h-60.58l22.36-50.75c2.1-6.65-3.93-13.21-12.18-13.21h-75.59c-6.3 0-11.66 3.9-12.5 9.1l-16.8 106.93c-1 6.3 4.88 11.89 12.5 11.89h62.31l-24.2 83c-1.89 6.65 4.2 12.9 12.23 12.9a13.26 13.26 0 0 0 10.92-5.25l92.4-138.91c4.88-6.91-1.16-15.7-10.87-15.7zM478.08.33L329.51 23.17C314.87 25.42 304 38.92 304 54.83V161.6a83.25 83.25 0 0 0-16-1.7c-35.35 0-64 21.48-64 48s28.65 48 64 48c35.2 0 63.73-21.32 64-47.66V99.66l112-17.22v47.18a83.25 83.25 0 0 0-16-1.7c-35.35 0-64 21.48-64 48s28.65 48 64 48c35.2 0 63.73-21.32 64-47.66V32c0-19.48-16-34.42-33.92-31.67z"] }, { prefix: "far", iconName: "lightbulb", icon: [352, 512, [], "f0eb", "M176 80c-52.94 0-96 43.06-96 96 0 8.84 7.16 16 16 16s16-7.16 16-16c0-35.3 28.72-64 64-64 8.84 0 16-7.16 16-16s-7.16-16-16-16zM96.06 459.17c0 3.15.93 6.22 2.68 8.84l24.51 36.84c2.97 4.46 7.97 7.14 13.32 7.14h78.85c5.36 0 10.36-2.68 13.32-7.14l24.51-36.84c1.74-2.62 2.67-5.7 2.68-8.84l.05-43.18H96.02l.04 43.18zM176 0C73.72 0 0 82.97 0 176c0 44.37 16.45 84.85 43.56 115.78 16.64 18.99 42.74 58.8 52.42 92.16v.06h48v-.12c-.01-4.77-.72-9.51-2.15-14.07-5.59-17.81-22.82-64.77-62.17-109.67-20.54-23.43-31.52-53.15-31.61-84.14-.2-73.64 59.67-128 127.95-128 70.58 0 128 57.42 128 128 0 30.97-11.24 60.85-31.65 84.14-39.11 44.61-56.42 91.47-62.1 109.46a47.507 47.507 0 0 0-2.22 14.3v.1h48v-.05c9.68-33.37 35.78-73.18 52.42-92.16C335.55 260.85 352 220.37 352 176 352 78.8 273.2 0 176 0z"] }, { prefix: "fas", iconName: "music", icon: [512, 512, [], "f001", "M470.38 1.51L150.41 96A32 32 0 0 0 128 126.51v261.41A139 139 0 0 0 96 384c-53 0-96 28.66-96 64s43 64 96 64 96-28.66 96-64V214.32l256-75v184.61a138.4 138.4 0 0 0-32-3.93c-53 0-96 28.66-96 64s43 64 96 64 96-28.65 96-64V32a32 32 0 0 0-41.62-30.49z"] }, { prefix: "fas", iconName: "search", icon: [512, 512, [], "f002", "M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"] }, { prefix: "far", iconName: "smile", icon: [496, 512, [], "f118", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm4 72.6c-20.8 25-51.5 39.4-84 39.4s-63.2-14.3-84-39.4c-8.5-10.2-23.7-11.5-33.8-3.1-10.2 8.5-11.5 23.6-3.1 33.8 30 36 74.1 56.6 120.9 56.6s90.9-20.6 120.9-56.6c8.5-10.2 7.1-25.3-3.1-33.8-10.1-8.4-25.3-7.1-33.8 3.1z"] }, { prefix: "fas", iconName: "times", icon: [352, 512, [], "f00d", "M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"] }, { prefix: "fas", iconName: "user", icon: [448, 512, [], "f007", "M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"] }); const Oo = zo({ prefix: "far", iconName: "building" }).html[0], Io = zo({ prefix: "fas", iconName: "cat" }).html[0], So = zo({ prefix: "fas", iconName: "coffee" }).html[0], Po = zo({ prefix: "far", iconName: "flag" }).html[0], Mo = zo({ prefix: "fas", iconName: "futbol" }).html[0], Ao = zo({ prefix: "far", iconName: "frown" }).html[0], Lo = zo({ prefix: "fas", iconName: "history" }).html[0], To = zo({ prefix: "fas", iconName: "icons" }).html[0], No = zo({ prefix: "far", iconName: "lightbulb" }).html[0], Fo = zo({ prefix: "fas", iconName: "music" }).html[0], Bo = zo({ prefix: "fas", iconName: "search" }).html[0], Do = zo({ prefix: "far", iconName: "smile" }).html[0], Ro = zo({ prefix: "fas", iconName: "times" }).html[0], qo = zo({ prefix: "fas", iconName: "user" }).html[0]; function Vo(e) { const o = document.createElement("img"); return o.src = e, o } function Ho() { const e = localStorage.getItem("emojiPicker.recent"); return (e ? JSON.parse(e) : []).filter((e => !!e.emoji)) } class Uo { constructor(e, o, n, i, a, r = !0) { this.emoji = e, this.showVariants = o, this.showPreview = n, this.events = i, this.options = a, this.lazy = r } render() { this.emojiButton = Ee("button", Ce); let e = this.emoji.emoji; return this.emoji.custom ? e = this.lazy ? Do : `` : "twemoji" === this.options.style && (e = this.lazy ? Do : ke.parse(this.emoji.emoji, this.options.twemojiOptions)), this.emojiButton.innerHTML = e, this.emojiButton.tabIndex = -1, this.emojiButton.dataset.emoji = this.emoji.emoji, this.emoji.custom && (this.emojiButton.dataset.custom = "true"), this.emojiButton.title = this.emoji.name, this.emojiButton.addEventListener("focus", (() => this.onEmojiHover())), this.emojiButton.addEventListener("blur", (() => this.onEmojiLeave())), this.emojiButton.addEventListener("click", (() => this.onEmojiClick())), this.emojiButton.addEventListener("mouseover", (() => this.onEmojiHover())), this.emojiButton.addEventListener("mouseout", (() => this.onEmojiLeave())), "twemoji" === this.options.style && this.lazy && (this.emojiButton.style.opacity = "0.25"), this.emojiButton } onEmojiClick() { this.emoji.variations && this.showVariants && this.options.showVariants || !this.options.showRecents || function (e, o) { const n = Ho(), i = { emoji: e.emoji, name: e.name, key: e.key || e.name, custom: e.custom }; localStorage.setItem("emojiPicker.recent", JSON.stringify([i, ...n.filter((e => !!e.emoji && e.key !== i.key))].slice(0, o.recentsCount))) }(this.emoji, this.options), this.events.emit("emoji", { emoji: this.emoji, showVariants: this.showVariants, button: this.emojiButton }) } onEmojiHover() { this.showPreview && this.events.emit("showPreview", this.emoji) } onEmojiLeave() { this.showPreview && this.events.emit("hidePreview") } } class Wo { constructor(e, o, n, i, a = !0) { this.showVariants = o, this.events = n, this.options = i, this.lazy = a, this.emojis = e.filter((e => !e.version || parseFloat(e.version) <= parseFloat(i.emojiVersion))) } render() { const e = Ee("div", "emoji-picker__container"); return this.emojis.forEach((o => e.appendChild(new Uo(o, this.showVariants, !0, this.events, this.options, this.lazy).render()))), e } } var Ko = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var Jo, Go = (function (e) { var o, n; o = Ko, n = function () { var e = "undefined" == typeof window, o = new Map, n = new Map, i = []; i.total = 0; var a = [], r = []; function t() { o.clear(), n.clear(), a = [], r = [] } function s(e) { for (var o = -9007199254740991, n = e.length - 1; n >= 0; --n) { var i = e[n]; if (null !== i) { var a = i.score; a > o && (o = a) } } return -9007199254740991 === o ? null : o } function m(e, o) { var n = e[o]; if (void 0 !== n) return n; var i = o; Array.isArray(o) || (i = o.split(".")); for (var a = i.length, r = -1; e && ++r < a;)e = e[i[r]]; return e } function c(e) { return "object" == typeof e } var d = function () { var e = [], o = 0, n = {}; function i() { for (var n = 0, i = e[n], a = 1; a < o;) { var r = a + 1; n = a, r < o && e[r].score < e[a].score && (n = r), e[n - 1 >> 1] = e[n], a = 1 + (n << 1) } for (var t = n - 1 >> 1; n > 0 && i.score < e[t].score; t = (n = t) - 1 >> 1)e[n] = e[t]; e[n] = i } return n.add = function (n) { var i = o; e[o++] = n; for (var a = i - 1 >> 1; i > 0 && n.score < e[a].score; a = (i = a) - 1 >> 1)e[i] = e[a]; e[i] = n }, n.poll = function () { if (0 !== o) { var n = e[0]; return e[0] = e[--o], i(), n } }, n.peek = function (n) { if (0 !== o) return e[0] }, n.replaceTop = function (o) { e[0] = o, i() }, n }, g = d(); return function u(l) { var v = { single: function (e, o, n) { return e ? (c(e) || (e = v.getPreparedSearch(e)), o ? (c(o) || (o = v.getPrepared(o)), ((n && void 0 !== n.allowTypo ? n.allowTypo : !l || void 0 === l.allowTypo || l.allowTypo) ? v.algorithm : v.algorithmNoTypo)(e, o, e[0])) : null) : null }, go: function (e, o, n) { if (!e) return i; var a = (e = v.prepareSearch(e))[0], r = n && n.threshold || l && l.threshold || -9007199254740991, t = n && n.limit || l && l.limit || 9007199254740991, d = (n && void 0 !== n.allowTypo ? n.allowTypo : !l || void 0 === l.allowTypo || l.allowTypo) ? v.algorithm : v.algorithmNoTypo, u = 0, f = 0, y = o.length; if (n && n.keys) for (var j = n.scoreFn || s, h = n.keys, p = h.length, b = y - 1; b >= 0; --b) { for (var w = o[b], k = new Array(p), x = p - 1; x >= 0; --x)(_ = m(w, E = h[x])) ? (c(_) || (_ = v.getPrepared(_)), k[x] = d(e, _, a)) : k[x] = null; k.obj = w; var C = j(k); null !== C && (C < r || (k.score = C, u < t ? (g.add(k), ++u) : (++f, C > g.peek().score && g.replaceTop(k)))) } else if (n && n.key) { var E = n.key; for (b = y - 1; b >= 0; --b)(_ = m(w = o[b], E)) && (c(_) || (_ = v.getPrepared(_)), null !== (z = d(e, _, a)) && (z.score < r || (z = { target: z.target, _targetLowerCodes: null, _nextBeginningIndexes: null, score: z.score, indexes: z.indexes, obj: w }, u < t ? (g.add(z), ++u) : (++f, z.score > g.peek().score && g.replaceTop(z))))) } else for (b = y - 1; b >= 0; --b) { var _, z; (_ = o[b]) && (c(_) || (_ = v.getPrepared(_)), null !== (z = d(e, _, a)) && (z.score < r || (u < t ? (g.add(z), ++u) : (++f, z.score > g.peek().score && g.replaceTop(z))))) } if (0 === u) return i; var O = new Array(u); for (b = u - 1; b >= 0; --b)O[b] = g.poll(); return O.total = u + f, O }, goAsync: function (o, n, a) { var r = !1, t = new Promise((function (t, g) { if (!o) return t(i); var u = (o = v.prepareSearch(o))[0], f = d(), y = n.length - 1, j = a && a.threshold || l && l.threshold || -9007199254740991, h = a && a.limit || l && l.limit || 9007199254740991, p = (a && void 0 !== a.allowTypo ? a.allowTypo : !l || void 0 === l.allowTypo || l.allowTypo) ? v.algorithm : v.algorithmNoTypo, b = 0, w = 0; function k() { if (r) return g("canceled"); var d = Date.now(); if (a && a.keys) for (var l = a.scoreFn || s, x = a.keys, C = x.length; y >= 0; --y) { for (var E = n[y], _ = new Array(C), z = C - 1; z >= 0; --z)(S = m(E, I = x[z])) ? (c(S) || (S = v.getPrepared(S)), _[z] = p(o, S, u)) : _[z] = null; _.obj = E; var O = l(_); if (null !== O && !(O < j) && (_.score = O, b < h ? (f.add(_), ++b) : (++w, O > f.peek().score && f.replaceTop(_)), y % 1e3 == 0 && Date.now() - d >= 10)) return void (e ? setImmediate(k) : setTimeout(k)) } else if (a && a.key) { for (var I = a.key; y >= 0; --y)if ((S = m(E = n[y], I)) && (c(S) || (S = v.getPrepared(S)), null !== (P = p(o, S, u)) && !(P.score < j) && (P = { target: P.target, _targetLowerCodes: null, _nextBeginningIndexes: null, score: P.score, indexes: P.indexes, obj: E }, b < h ? (f.add(P), ++b) : (++w, P.score > f.peek().score && f.replaceTop(P)), y % 1e3 == 0 && Date.now() - d >= 10))) return void (e ? setImmediate(k) : setTimeout(k)) } else for (; y >= 0; --y) { var S, P; if ((S = n[y]) && (c(S) || (S = v.getPrepared(S)), null !== (P = p(o, S, u)) && !(P.score < j) && (b < h ? (f.add(P), ++b) : (++w, P.score > f.peek().score && f.replaceTop(P)), y % 1e3 == 0 && Date.now() - d >= 10))) return void (e ? setImmediate(k) : setTimeout(k)) } if (0 === b) return t(i); for (var M = new Array(b), A = b - 1; A >= 0; --A)M[A] = f.poll(); M.total = b + w, t(M) } e ? setImmediate(k) : k() })); return t.cancel = function () { r = !0 }, t }, highlight: function (e, o, n) { if (null === e) return null; void 0 === o && (o = ""), void 0 === n && (n = ""); for (var i = "", a = 0, r = !1, t = e.target, s = t.length, m = e.indexes, c = 0; c < s; ++c) { var d = t[c]; if (m[a] === c) { if (r || (r = !0, i += o), ++a === m.length) { i += d + n + t.substr(c + 1); break } } else r && (r = !1, i += n); i += d } return i }, prepare: function (e) { if (e) return { target: e, _targetLowerCodes: v.prepareLowerCodes(e), _nextBeginningIndexes: null, score: null, indexes: null, obj: null } }, prepareSlow: function (e) { if (e) return { target: e, _targetLowerCodes: v.prepareLowerCodes(e), _nextBeginningIndexes: v.prepareNextBeginningIndexes(e), score: null, indexes: null, obj: null } }, prepareSearch: function (e) { if (e) return v.prepareLowerCodes(e) }, getPrepared: function (e) { if (e.length > 999) return v.prepare(e); var n = o.get(e); return void 0 !== n || (n = v.prepare(e), o.set(e, n)), n }, getPreparedSearch: function (e) { if (e.length > 999) return v.prepareSearch(e); var o = n.get(e); return void 0 !== o || (o = v.prepareSearch(e), n.set(e, o)), o }, algorithm: function (e, o, n) { for (var i = o._targetLowerCodes, t = e.length, s = i.length, m = 0, c = 0, d = 0, g = 0; ;) { if (n === i[c]) { if (a[g++] = c, ++m === t) break; n = e[0 === d ? m : d === m ? m + 1 : d === m - 1 ? m - 1 : m] } if (++c >= s) for (; ;) { if (m <= 1) return null; if (0 === d) { if (n === e[--m]) continue; d = m } else { if (1 === d) return null; if ((n = e[1 + (m = --d)]) === e[m]) continue } c = a[(g = m) - 1] + 1; break } } m = 0; var u = 0, l = !1, f = 0, y = o._nextBeginningIndexes; null === y && (y = o._nextBeginningIndexes = v.prepareNextBeginningIndexes(o.target)); var j = c = 0 === a[0] ? 0 : y[a[0] - 1]; if (c !== s) for (; ;)if (c >= s) { if (m <= 0) { if (++u > t - 2) break; if (e[u] === e[u + 1]) continue; c = j; continue } --m, c = y[r[--f]] } else if (e[0 === u ? m : u === m ? m + 1 : u === m - 1 ? m - 1 : m] === i[c]) { if (r[f++] = c, ++m === t) { l = !0; break } ++c } else c = y[c]; if (l) var h = r, p = f; else h = a, p = g; for (var b = 0, w = -1, k = 0; k < t; ++k)w !== (c = h[k]) - 1 && (b -= c), w = c; for (l ? 0 !== u && (b += -20) : (b *= 1e3, 0 !== d && (b += -20)), b -= s - t, o.score = b, o.indexes = new Array(p), k = p - 1; k >= 0; --k)o.indexes[k] = h[k]; return o }, algorithmNoTypo: function (e, o, n) { for (var i = o._targetLowerCodes, t = e.length, s = i.length, m = 0, c = 0, d = 0; ;) { if (n === i[c]) { if (a[d++] = c, ++m === t) break; n = e[m] } if (++c >= s) return null } m = 0; var g = !1, u = 0, l = o._nextBeginningIndexes; if (null === l && (l = o._nextBeginningIndexes = v.prepareNextBeginningIndexes(o.target)), (c = 0 === a[0] ? 0 : l[a[0] - 1]) !== s) for (; ;)if (c >= s) { if (m <= 0) break; --m, c = l[r[--u]] } else if (e[m] === i[c]) { if (r[u++] = c, ++m === t) { g = !0; break } ++c } else c = l[c]; if (g) var f = r, y = u; else f = a, y = d; for (var j = 0, h = -1, p = 0; p < t; ++p)h !== (c = f[p]) - 1 && (j -= c), h = c; for (g || (j *= 1e3), j -= s - t, o.score = j, o.indexes = new Array(y), p = y - 1; p >= 0; --p)o.indexes[p] = f[p]; return o }, prepareLowerCodes: function (e) { for (var o = e.length, n = [], i = e.toLowerCase(), a = 0; a < o; ++a)n[a] = i.charCodeAt(a); return n }, prepareBeginningIndexes: function (e) { for (var o = e.length, n = [], i = 0, a = !1, r = !1, t = 0; t < o; ++t) { var s = e.charCodeAt(t), m = s >= 65 && s <= 90, c = m || s >= 97 && s <= 122 || s >= 48 && s <= 57, d = m && !a || !r || !c; a = m, r = c, d && (n[i++] = t) } return n }, prepareNextBeginningIndexes: function (e) { for (var o = e.length, n = v.prepareBeginningIndexes(e), i = [], a = n[0], r = 0, t = 0; t < o; ++t)a > t ? i[t] = a : (a = n[++r], i[t] = void 0 === a ? o : a); return i }, cleanup: t, new: u }; return v }() }, e.exports ? e.exports = n() : o.fuzzysort = n() }(Jo = { exports: {} }, Jo.exports), Jo.exports); class Xo { constructor(e, o) { this.message = e, this.iconUrl = o } render() { const e = Ee("div", "emoji-picker__search-not-found"), o = Ee("div", "emoji-picker__search-not-found-icon"); this.iconUrl ? o.appendChild(Vo(this.iconUrl)) : o.innerHTML = Ao, e.appendChild(o); const n = Ee("h2"); return n.innerHTML = this.message, e.appendChild(n), e } } class Yo { constructor(e, o, n, i, a) { if (this.events = e, this.i18n = o, this.options = n, this.focusedEmojiIndex = 0, this.emojisPerRow = this.options.emojisPerRow || 8, this.emojiData = i.filter((e => e.version && parseFloat(e.version) <= parseFloat(n.emojiVersion) && void 0 !== e.category && a.indexOf(e.category) >= 0)), this.options.custom) { const e = this.options.custom.map((e => Object.assign(Object.assign({}, e), { custom: !0 }))); this.emojiData = [...this.emojiData, ...e] } this.events.on("hideVariantPopup", (() => { setTimeout((() => this.setFocusedEmoji(this.focusedEmojiIndex))) })) } render() { return this.searchContainer = Ee("div", "emoji-picker__search-container"), this.searchField = Ee("input", "emoji-picker__search"), this.searchField.placeholder = this.i18n.search, this.searchContainer.appendChild(this.searchField), this.searchIcon = Ee("span", "emoji-picker__search-icon"), this.options.icons && this.options.icons.search ? this.searchIcon.appendChild(Vo(this.options.icons.search)) : this.searchIcon.innerHTML = Bo, this.searchIcon.addEventListener("click", (e => this.onClearSearch(e))), this.searchContainer.appendChild(this.searchIcon), this.searchField.addEventListener("keydown", (e => this.onKeyDown(e))), this.searchField.addEventListener("keyup", (e => this.onKeyUp(e))), this.searchContainer } clear() { this.searchField.value = "" } focus() { this.searchField.focus() } onClearSearch(e) { e.stopPropagation(), this.searchField.value && (this.searchField.value = "", this.resultsContainer = null, this.options.icons && this.options.icons.search ? (_e(this.searchIcon), this.searchIcon.appendChild(Vo(this.options.icons.search))) : this.searchIcon.innerHTML = Bo, this.searchIcon.style.cursor = "default", this.events.emit("hideSearchResults"), setTimeout((() => this.searchField.focus()))) } setFocusedEmoji(e) { if (this.resultsContainer) { const o = this.resultsContainer.querySelectorAll("." + Ce); o[this.focusedEmojiIndex].tabIndex = -1, this.focusedEmojiIndex = e; const n = o[this.focusedEmojiIndex]; n.tabIndex = 0, n.focus() } } handleResultsKeydown(e) { if (this.resultsContainer) { const o = this.resultsContainer.querySelectorAll("." + Ce); "ArrowRight" === e.key ? this.setFocusedEmoji(Math.min(this.focusedEmojiIndex + 1, o.length - 1)) : "ArrowLeft" === e.key ? this.setFocusedEmoji(Math.max(0, this.focusedEmojiIndex - 1)) : "ArrowDown" === e.key ? (e.preventDefault(), this.focusedEmojiIndex < o.length - this.emojisPerRow && this.setFocusedEmoji(this.focusedEmojiIndex + this.emojisPerRow)) : "ArrowUp" === e.key ? (e.preventDefault(), this.focusedEmojiIndex >= this.emojisPerRow && this.setFocusedEmoji(this.focusedEmojiIndex - this.emojisPerRow)) : "Escape" === e.key && this.onClearSearch(e) } } onKeyDown(e) { "Escape" === e.key && this.searchField.value && this.onClearSearch(e) } onKeyUp(e) { if ("Tab" !== e.key && "Shift" !== e.key) if (this.searchField.value) { this.options.icons && this.options.icons.clearSearch ? (_e(this.searchIcon), this.searchIcon.appendChild(Vo(this.options.icons.clearSearch))) : this.searchIcon.innerHTML = Ro, this.searchIcon.style.cursor = "pointer"; const e = Go.go(this.searchField.value, this.emojiData, { allowTypo: !0, limit: 100, key: "name" }).map((e => e.obj)); this.events.emit("hidePreview"), e.length ? (this.resultsContainer = new Wo(e, !0, this.events, this.options, !1).render(), this.resultsContainer && (this.resultsContainer.querySelector("." + Ce).tabIndex = 0, this.focusedEmojiIndex = 0, this.resultsContainer.addEventListener("keydown", (e => this.handleResultsKeydown(e))), this.events.emit("showSearchResults", this.resultsContainer))) : this.events.emit("showSearchResults", new Xo(this.i18n.notFound, this.options.icons && this.options.icons.notFound).render()) } else this.options.icons && this.options.icons.search ? (_e(this.searchIcon), this.searchIcon.appendChild(Vo(this.options.icons.search))) : this.searchIcon.innerHTML = Bo, this.searchIcon.style.cursor = "default", this.events.emit("hideSearchResults") } } class $o { constructor(e, o, n) { this.events = e, this.emoji = o, this.options = n, this.focusedEmojiIndex = 0 } getEmoji(e) { return this.popup.querySelectorAll("." + Ce)[e] } setFocusedEmoji(e) { this.getEmoji(this.focusedEmojiIndex).tabIndex = -1, this.focusedEmojiIndex = e; const o = this.getEmoji(this.focusedEmojiIndex); o.tabIndex = 0, o.focus() } render() { this.popup = Ee("div", "emoji-picker__variant-popup"); const e = Ee("div", "emoji-picker__variant-overlay"); e.addEventListener("click", (e => { e.stopPropagation(), this.popup.contains(e.target) || this.events.emit("hideVariantPopup") })), this.popup.appendChild(new Uo(this.emoji, !1, !1, this.events, this.options, !1).render()), (this.emoji.variations || []).forEach(((e, o) => this.popup.appendChild(new Uo({ name: this.emoji.name, emoji: e, key: this.emoji.name + o }, !1, !1, this.events, this.options, !1).render()))); const o = this.popup.querySelector("." + Ce); return this.focusedEmojiIndex = 0, o.tabIndex = 0, setTimeout((() => o.focus())), this.popup.addEventListener("keydown", (e => { "ArrowRight" === e.key ? this.setFocusedEmoji(Math.min(this.focusedEmojiIndex + 1, this.popup.querySelectorAll("." + Ce).length - 1)) : "ArrowLeft" === e.key ? this.setFocusedEmoji(Math.max(this.focusedEmojiIndex - 1, 0)) : "Escape" === e.key && (e.stopPropagation(), this.events.emit("hideVariantPopup")) })), e.appendChild(this.popup), e } } const Zo = { search: "Search emojis...", categories: { recents: "Recent Emojis", smileys: "Smileys & Emotion", people: "People & Body", animals: "Animals & Nature", food: "Food & Drink", activities: "Activities", travel: "Travel & Places", objects: "Objects", symbols: "Symbols", flags: "Flags", custom: "Custom" }, notFound: "No emojis found" }, Qo = { recents: Lo, smileys: Do, people: qo, animals: Io, food: So, activities: Mo, travel: Oo, objects: No, symbols: Fo, flags: Po, custom: To }; class en { constructor(e, o, n) { this.options = e, this.events = o, this.i18n = n, this.activeButton = 0, this.buttons = [] } render() { var e; const o = Ee("div", "emoji-picker__category-buttons"), n = this.options.categories || (null === (e = this.options.emojiData) || void 0 === e ? void 0 : e.categories) || xe.categories; let i = this.options.showRecents ? ["recents", ...n] : n; return this.options.custom && (i = [...i, "custom"]), i.forEach((e => { const n = Ee("button", "emoji-picker__category-button"); this.options.icons && this.options.icons.categories && this.options.icons.categories[e] ? n.appendChild(Vo(this.options.icons.categories[e])) : n.innerHTML = Qo[e], n.tabIndex = -1, n.title = this.i18n.categories[e], o.appendChild(n), this.buttons.push(n), n.addEventListener("click", (() => { this.events.emit("categoryClicked", e) })) })), o.addEventListener("keydown", (e => { switch (e.key) { case "ArrowRight": this.events.emit("categoryClicked", i[(this.activeButton + 1) % this.buttons.length]); break; case "ArrowLeft": this.events.emit("categoryClicked", i[0 === this.activeButton ? this.buttons.length - 1 : this.activeButton - 1]); break; case "ArrowUp": case "ArrowDown": e.stopPropagation(), e.preventDefault() } })), o } setActiveButton(e, o = !0) { let n = this.buttons[this.activeButton]; n.classList.remove("active"), n.tabIndex = -1, this.activeButton = e, n = this.buttons[this.activeButton], n.classList.add("active"), n.tabIndex = 0, o && n.focus() } } const on = ["recents", "smileys", "people", "animals", "food", "activities", "travel", "objects", "symbols", "flags", "custom"]; class nn { constructor(e, o, n, i) { var a; this.events = e, this.i18n = o, this.options = n, this.emojiCategories = i, this.currentCategory = 0, this.headers = [], this.focusedIndex = 0, this.handleKeyDown = e => { switch (this.emojis.removeEventListener("scroll", this.highlightCategory), e.key) { case "ArrowRight": this.focusedEmoji.tabIndex = -1, this.focusedIndex === this.currentEmojiCount - 1 && this.currentCategory < this.categories.length - 1 ? (this.options.showCategoryButtons && this.categoryButtons.setActiveButton(++this.currentCategory), this.setFocusedEmoji(0)) : this.focusedIndex < this.currentEmojiCount - 1 && this.setFocusedEmoji(this.focusedIndex + 1); break; case "ArrowLeft": this.focusedEmoji.tabIndex = -1, 0 === this.focusedIndex && this.currentCategory > 0 ? (this.options.showCategoryButtons && this.categoryButtons.setActiveButton(--this.currentCategory), this.setFocusedEmoji(this.currentEmojiCount - 1)) : this.setFocusedEmoji(Math.max(0, this.focusedIndex - 1)); break; case "ArrowDown": e.preventDefault(), this.focusedEmoji.tabIndex = -1, this.focusedIndex + this.emojisPerRow >= this.currentEmojiCount && this.currentCategory < this.categories.length - 1 ? (this.currentCategory++ , this.options.showCategoryButtons && this.categoryButtons.setActiveButton(this.currentCategory), this.setFocusedEmoji(Math.min(this.focusedIndex % this.emojisPerRow, this.currentEmojiCount - 1))) : this.currentEmojiCount - this.focusedIndex > this.emojisPerRow && this.setFocusedEmoji(this.focusedIndex + this.emojisPerRow); break; case "ArrowUp": if (e.preventDefault(), this.focusedEmoji.tabIndex = -1, this.focusedIndex < this.emojisPerRow && this.currentCategory > 0) { const e = this.getEmojiCount(this.currentCategory - 1); let o = e % this.emojisPerRow; 0 === o && (o = this.emojisPerRow); const n = this.focusedIndex, i = n > o - 1 ? e - 1 : e - o + n; this.currentCategory-- , this.options.showCategoryButtons && this.categoryButtons.setActiveButton(this.currentCategory), this.setFocusedEmoji(i) } else this.setFocusedEmoji(this.focusedIndex >= this.emojisPerRow ? this.focusedIndex - this.emojisPerRow : this.focusedIndex) }requestAnimationFrame((() => this.emojis.addEventListener("scroll", this.highlightCategory))) }, this.addCategory = (e, o) => { const n = Ee("h2", "emoji-picker__category-name"); n.innerHTML = this.i18n.categories[e] || Zo.categories[e], this.emojis.appendChild(n), this.headers.push(n), this.emojis.appendChild(new Wo(o, !0, this.events, this.options, "recents" !== e).render()) }, this.selectCategory = (e, o = !0) => { this.emojis.removeEventListener("scroll", this.highlightCategory), this.focusedEmoji && (this.focusedEmoji.tabIndex = -1); const n = this.categories.indexOf(e); this.currentCategory = n, this.setFocusedEmoji(0, !1), this.options.showCategoryButtons && this.categoryButtons.setActiveButton(this.currentCategory, o); const i = this.headerOffsets[n]; this.emojis.scrollTop = i, requestAnimationFrame((() => this.emojis.addEventListener("scroll", this.highlightCategory))) }, this.highlightCategory = () => { if (document.activeElement && document.activeElement.classList.contains("emoji-picker__emoji")) return; let e = this.headerOffsets.findIndex((e => e >= Math.round(this.emojis.scrollTop))); this.emojis.scrollTop + this.emojis.offsetHeight === this.emojis.scrollHeight && (e = -1), 0 === e ? e = 1 : e < 0 && (e = this.headerOffsets.length), this.headerOffsets[e] === this.emojis.scrollTop && e++ , this.currentCategory = e - 1, this.options.showCategoryButtons && this.categoryButtons.setActiveButton(this.currentCategory) }, this.emojisPerRow = n.emojisPerRow || 8, this.categories = (null === (a = n.emojiData) || void 0 === a ? void 0 : a.categories) || n.categories || xe.categories, n.showRecents && (this.categories = ["recents", ...this.categories]), n.custom && (this.categories = [...this.categories, "custom"]), this.categories.sort(((e, o) => on.indexOf(e) - on.indexOf(o))) } updateRecents() { if (this.options.showRecents) { this.emojiCategories.recents = Ho(); const e = this.emojis.querySelector(".emoji-picker__container"); e && e.parentNode && e.parentNode.replaceChild(new Wo(this.emojiCategories.recents, !0, this.events, this.options, !1).render(), e) } } render() { this.container = Ee("div", "emoji-picker__emoji-area"), this.options.showCategoryButtons && (this.categoryButtons = new en(this.options, this.events, this.i18n), this.container.appendChild(this.categoryButtons.render())), this.emojis = Ee("div", "emoji-picker__emojis"), this.options.showRecents && (this.emojiCategories.recents = Ho()), this.options.custom && (this.emojiCategories.custom = this.options.custom.map((e => Object.assign(Object.assign({}, e), { custom: !0 })))), this.categories.forEach((e => this.addCategory(e, this.emojiCategories[e]))), requestAnimationFrame((() => { setTimeout((() => { setTimeout((() => this.emojis.addEventListener("scroll", this.highlightCategory))) })) })), this.emojis.addEventListener("keydown", this.handleKeyDown), this.events.on("categoryClicked", this.selectCategory), this.container.appendChild(this.emojis); return this.container.querySelectorAll("." + Ce)[0].tabIndex = 0, this.container } reset() { this.headerOffsets = Array.prototype.map.call(this.headers, (e => e.offsetTop)), this.selectCategory(this.options.initialCategory || "smileys", !1), this.currentCategory = this.categories.indexOf(this.options.initialCategory || "smileys"), this.options.showCategoryButtons && this.categoryButtons.setActiveButton(this.currentCategory, !1) } get currentCategoryEl() { return this.emojis.querySelectorAll(".emoji-picker__container")[this.currentCategory] } get focusedEmoji() { return this.currentCategoryEl.querySelectorAll("." + Ce)[this.focusedIndex] } get currentEmojiCount() { return this.currentCategoryEl.querySelectorAll("." + Ce).length } getEmojiCount(e) { return this.emojis.querySelectorAll(".emoji-picker__container")[e].querySelectorAll("." + Ce).length } setFocusedEmoji(e, o = !0) { this.focusedIndex = e, this.focusedEmoji && (this.focusedEmoji.tabIndex = 0, o && this.focusedEmoji.focus()) } } const an = { position: "auto", autoHide: !1, autoFocusSearch: !0, showAnimation: !0, showPreview: !0, showSearch: !0, showRecents: !0, showVariants: !0, showCategoryButtons: !0, recentsCount: 50, emojiData: xe, emojiVersion: "12.1", theme: "light", categories: ["smileys", "people", "animals", "food", "activities", "travel", "objects", "symbols", "flags"], style: "native", twemojiOptions: { ext: ".svg", folder: "svg" }, emojisPerRow: 8, rows: 6, emojiSize: "1.8em", initialCategory: "smileys" }; class EmojiButton { constructor(e = {}) { this.events = new b, this.publicEvents = new b, this.pickerVisible = !1, this.options = Object.assign(Object.assign({}, an), e), this.options.rootElement || (this.options.rootElement = document.body), this.i18n = Object.assign(Object.assign({}, Zo), e.i18n), this.onDocumentClick = this.onDocumentClick.bind(this), this.onDocumentKeydown = this.onDocumentKeydown.bind(this), this.theme = this.options.theme || "light", this.emojiCategories = function (e) { const o = {}; return e.emoji.forEach((n => { let i = o[e.categories[n.category || 0]]; i || (i = o[e.categories[n.category || 0]] = []), i.push(n) })), o }(this.options.emojiData || xe), this.buildPicker() } on(e, o) { this.publicEvents.on(e, o) } off(e, o) { this.publicEvents.off(e, o) } setStyleProperties() { this.options.showAnimation || this.pickerEl.style.setProperty("--animation-duration", "0s"), this.options.emojisPerRow && this.pickerEl.style.setProperty("--emoji-per-row", this.options.emojisPerRow.toString()), this.options.rows && this.pickerEl.style.setProperty("--row-count", this.options.rows.toString()), this.options.emojiSize && this.pickerEl.style.setProperty("--emoji-size", this.options.emojiSize), this.options.showCategoryButtons || this.pickerEl.style.setProperty("--category-button-height", "0"), this.options.styleProperties && Object.keys(this.options.styleProperties).forEach((e => { this.options.styleProperties && this.pickerEl.style.setProperty(e, this.options.styleProperties[e]) })) } showSearchResults(e) { _e(this.pickerContent), e.classList.add("search-results"), this.pickerContent.appendChild(e) } hideSearchResults() { this.pickerContent.firstChild !== this.emojiArea.container && (_e(this.pickerContent), this.pickerContent.appendChild(this.emojiArea.container)), this.emojiArea.reset() } emitEmoji({ emoji: o, showVariants: n }) { return e(this, void 0, void 0, (function* () { if (o.variations && n && this.options.showVariants) this.showVariantPopup(o); else { let e; setTimeout((() => this.emojiArea.updateRecents())), e = o.custom ? this.emitCustomEmoji(o) : "twemoji" === this.options.style ? yield this.emitTwemoji(o) : this.emitNativeEmoji(o), this.publicEvents.emit("emoji", e), this.options.autoHide && this.hidePicker() } })) } emitNativeEmoji(e) { return { emoji: e.emoji, name: e.name } } emitCustomEmoji(e) { return { url: e.emoji, name: e.name, custom: !0 } } emitTwemoji(e) { return new Promise((o => { ke.parse(e.emoji, Object.assign(Object.assign({}, this.options.twemojiOptions), { callback: (n, { base: i, size: a, ext: r }) => { const t = `${i}${a}/${n}${r}`; return o({ url: t, emoji: e.emoji, name: e.name }), t } })) })) } buildSearch() { var e; this.options.showSearch && (this.search = new Yo(this.events, this.i18n, this.options, (null === (e = this.options.emojiData) || void 0 === e ? void 0 : e.emoji) || xe.emoji, (this.options.categories || []).map((e => (this.options.emojiData || xe).categories.indexOf(e)))), this.pickerEl.appendChild(this.search.render())) } buildPreview() { this.options.showPreview && this.pickerEl.appendChild(new Oe(this.events, this.options).render()) } initPlugins() { if (this.options.plugins) { const e = Ee("div", "emoji-picker__plugin-container"); this.options.plugins.forEach((o => { if (!o.render) throw new Error('Emoji Button plugins must have a "render" function.'); e.appendChild(o.render(this)) })), this.pickerEl.appendChild(e) } } initFocusTrap() { this.focusTrap = h(this.pickerEl, { clickOutsideDeactivates: !0, initialFocus: this.options.showSearch && this.options.autoFocusSearch ? ".emoji-picker__search" : '.emoji-picker__emoji[tabindex="0"]' }) } buildPicker() { this.pickerEl = Ee("div", "emoji-picker"), this.pickerEl.classList.add(this.theme), this.setStyleProperties(), this.initFocusTrap(), this.pickerContent = Ee("div", "emoji-picker__content"), this.initPlugins(), this.buildSearch(), this.pickerEl.appendChild(this.pickerContent), this.emojiArea = new nn(this.events, this.i18n, this.options, this.emojiCategories), this.pickerContent.appendChild(this.emojiArea.render()), this.events.on("showSearchResults", this.showSearchResults.bind(this)), this.events.on("hideSearchResults", this.hideSearchResults.bind(this)), this.events.on("emoji", this.emitEmoji.bind(this)), this.buildPreview(), this.wrapper = Ee("div", "emoji-picker__wrapper"), this.wrapper.appendChild(this.pickerEl), this.wrapper.style.display = "none", this.options.zIndex && (this.wrapper.style.zIndex = this.options.zIndex + ""), this.options.rootElement && this.options.rootElement.appendChild(this.wrapper), this.observeForLazyLoad() } showVariantPopup(e) { const o = new $o(this.events, e, this.options).render(); o && this.pickerEl.appendChild(o), this.events.on("hideVariantPopup", (() => { o && (o.classList.add("hiding"), setTimeout((() => { o && this.pickerEl.removeChild(o) }), 175)), this.events.off("hideVariantPopup") })) } observeForLazyLoad() { this.observer = new IntersectionObserver(this.handleIntersectionChange.bind(this), { root: this.emojiArea.emojis }), this.emojiArea.emojis.querySelectorAll("." + Ce).forEach((e => { this.shouldLazyLoad(e) && this.observer.observe(e) })) } handleIntersectionChange(e) { Array.prototype.filter.call(e, (e => e.intersectionRatio > 0)).map((e => e.target)).forEach((e => { ze(e, this.options) })) } shouldLazyLoad(e) { return "twemoji" === this.options.style || "true" === e.dataset.custom } onDocumentClick(e) { this.pickerEl.contains(e.target) || this.hidePicker() } destroyPicker() { this.events.off("emoji"), this.events.off("hideVariantPopup"), this.options.rootElement && (this.options.rootElement.removeChild(this.wrapper), this.popper && this.popper.destroy()), this.observer && this.observer.disconnect(), this.options.plugins && this.options.plugins.forEach((e => { e.destroy && e.destroy() })) } hidePicker() { this.hideInProgress = !0, this.focusTrap.deactivate(), this.pickerVisible = !1, this.overlay && (document.body.removeChild(this.overlay), this.overlay = void 0), this.emojiArea.emojis.removeEventListener("scroll", this.emojiArea.highlightCategory), this.pickerEl.classList.add("hiding"), setTimeout((() => { this.wrapper.style.display = "none", this.pickerEl.classList.remove("hiding"), this.pickerContent.firstChild !== this.emojiArea.container && (_e(this.pickerContent), this.pickerContent.appendChild(this.emojiArea.container)), this.search && this.search.clear(), this.events.emit("hideVariantPopup"), this.hideInProgress = !1, this.popper && this.popper.destroy(), this.publicEvents.emit("hidden") }), this.options.showAnimation ? 170 : 0), setTimeout((() => { document.removeEventListener("click", this.onDocumentClick), document.removeEventListener("keydown", this.onDocumentKeydown) })) } showPicker(e) { this.hideInProgress ? setTimeout((() => this.showPicker(e)), 100) : (this.pickerVisible = !0, this.wrapper.style.display = "block", this.determineDisplay(e), this.focusTrap.activate(), setTimeout((() => { this.addEventListeners(), this.setInitialFocus() })), this.emojiArea.reset()) } determineDisplay(e) { window.matchMedia("screen and (max-width: 450px)").matches ? this.showMobileView() : "string" == typeof this.options.position ? this.setRelativePosition(e) : this.setFixedPosition() } setInitialFocus() { this.pickerEl.querySelector(this.options.showSearch && this.options.autoFocusSearch ? ".emoji-picker__search" : `.${Ce}[tabindex="0"]`).focus() } addEventListeners() { document.addEventListener("click", this.onDocumentClick), document.addEventListener("keydown", this.onDocumentKeydown) } setRelativePosition(e) { this.popper = we(e, this.wrapper, { placement: this.options.position }) } setFixedPosition() { var e; if (null === (e = this.options) || void 0 === e ? void 0 : e.position) { this.wrapper.style.position = "fixed"; const e = this.options.position; Object.keys(e).forEach((o => { this.wrapper.style[o] = e[o] })) } } showMobileView() { const e = window.getComputedStyle(this.pickerEl), o = document.querySelector("html"), n = o && o.clientHeight, i = o && o.clientWidth, a = parseInt(e.height), r = n ? n / 2 - a / 2 : 0, t = parseInt(e.width), s = i ? i / 2 - t / 2 : 0; this.wrapper.style.position = "fixed", this.wrapper.style.top = r + "px", this.wrapper.style.left = s + "px", this.wrapper.style.zIndex = "5000", this.overlay = Ee("div", "emoji-picker__overlay"), document.body.appendChild(this.overlay) } togglePicker(e) { this.pickerVisible ? this.hidePicker() : this.showPicker(e) } isPickerVisible() { return this.pickerVisible } onDocumentKeydown(e) { "Escape" === e.key ? this.hidePicker() : "Tab" === e.key ? this.pickerEl.classList.add("keyboard") : e.key.match(/^[\w]$/) && this.search && this.search.focus() } setTheme(e) { e !== this.theme && (this.pickerEl.classList.remove(this.theme), this.theme = e, this.pickerEl.classList.add(e)) } } diff -Nru ring-20230206.0~ds1/src/app/webengine/emojipicker/emojiPickerLoader.html ring-20230206.0~ds2/src/app/webengine/emojipicker/emojiPickerLoader.html --- ring-20230206.0~ds1/src/app/webengine/emojipicker/emojiPickerLoader.html 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/app/webengine/emojipicker/emojiPickerLoader.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff -Nru ring-20230206.0~ds1/src/app/webengine/emojipicker/emojiPickerLoader.js ring-20230206.0~ds2/src/app/webengine/emojipicker/emojiPickerLoader.js --- ring-20230206.0~ds1/src/app/webengine/emojipicker/emojiPickerLoader.js 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/app/webengine/emojipicker/emojiPickerLoader.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,99 +0,0 @@ -"use strict" - -var emojiPicker = undefined - -const HIDE_VARIANT_POPUP = 'hideVariantPopup' -const PICKER_HIDDEN = 'hidden' - -new QWebChannel(qt.webChannelTransport, function (channel) { - window.jsbridge = channel.objects.jsbridge -}) - -/* exported init_emoji_picker */ -function init_emoji_picker(dark) { - emojiPicker = new EmojiButton({ - theme: dark ? "dark" : "light" - }) - emojiPicker.on("emoji", selection => { - window.jsbridge.emojiIsPicked(selection.emoji) - }) -} - -/* exported prepare_to_show */ -function prepare_to_show(dark) { - emojiPicker.setTheme(dark ? "dark" : "light") - - if (emojiPicker.hideInProgress) { - setTimeout(() => prepare_to_show(dark), 100) - return - } - - emojiPicker.pickerVisible = true - emojiPicker.wrapper.style.display = 'block' - - emojiPicker.focusTrap.activate() - - emojiPicker.wrapper.style.height = '100%' - emojiPicker.wrapper.style.width = '100%' - - setTimeout(() => { - emojiPicker.addEventListeners() - emojiPicker.setInitialFocus() - }) - - emojiPicker.emojiArea.reset() -} - -/* exported prepare_to_hide */ -function prepare_to_hide() { - emojiPicker.hideInProgress = true - emojiPicker.focusTrap.deactivate() - emojiPicker.pickerVisible = false - - if (emojiPicker.overlay) { - document.body.removeChild(emojiPicker.overlay) - emojiPicker.overlay = undefined - } - - // In some browsers, the delayed hide was triggering the scroll event handler - // and stealing the focus. Remove the scroll listener before doing the delayed hide. - emojiPicker.emojiArea.emojis.removeEventListener( - 'scroll', - emojiPicker.emojiArea.highlightCategory - ) - - emojiPicker.pickerEl.classList.add('hiding') - - // Let the transition finish before actually hiding the picker so that - // the user sees the hide animation. - setTimeout( - () => { - emojiPicker.wrapper.style.display = 'none' - emojiPicker.pickerEl.classList.remove('hiding') - - if (emojiPicker.pickerContent.firstChild !== emojiPicker.emojiArea.container) { - empty(emojiPicker.pickerContent) - emojiPicker.pickerContent.appendChild(emojiPicker.emojiArea.container) - } - - if (emojiPicker.search) { - emojiPicker.search.clear() - } - - emojiPicker.events.emit(HIDE_VARIANT_POPUP) - - emojiPicker.hideInProgress = false - emojiPicker.popper && emojiPicker.popper.destroy() - - emojiPicker.publicEvents.emit(PICKER_HIDDEN) - - window.jsbridge.emojiPickerHideFinished() - }, - emojiPicker.options.showAnimation ? 170 : 0 - ) - - setTimeout(() => { - document.removeEventListener('click', emojiPicker.onDocumentClick) - document.removeEventListener('keydown', emojiPicker.onDocumentKeydown) - }) -} diff -Nru ring-20230206.0~ds1/src/app/webengine/emojipicker/EmojiPicker.qml ring-20230206.0~ds2/src/app/webengine/emojipicker/EmojiPicker.qml --- ring-20230206.0~ds1/src/app/webengine/emojipicker/EmojiPicker.qml 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/app/webengine/emojipicker/EmojiPicker.qml 1970-01-01 00:00:00.000000000 +0000 @@ -1,118 +0,0 @@ -/* - * Copyright (C) 2020-2023 Savoir-faire Linux Inc. - * Author: Mingrui Zhang - * Author: Nicolas Vengeon - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import QtQuick -import QtQuick.Controls -import Qt5Compat.GraphicalEffects -import QtWebEngine -import QtWebChannel - -import net.jami.Constants 1.1 -import net.jami.Adapters 1.1 - -import "../" - -Popup { - id: root - - signal emojiIsPicked(string content) - - function openEmojiPicker() { - root.open() - emojiPickerWebView.runJavaScript( - "prepare_to_show(" + JamiTheme.darkTheme + ");") - } - - function closeEmojiPicker() { - emojiPickerWebView.runJavaScript("prepare_to_hide();") - close() - } - padding: 0 - visible: false - background.visible: false - - QtObject { - id: jsBridgeObject - - // ID, under which this object will be known at chatview.js side. - WebChannel.id: "jsbridge" - - // Functions that are exposed, return code can be derived from js side - // by setting callback function. - function emojiIsPicked(arg) { - root.emojiIsPicked(arg) - closeEmojiPicker() - } - - // For emojiPicker to properly close - function emojiPickerHideFinished() { - root.visible = false - } - } - - GeneralWebEngineView { - id: emojiPickerWebView - - width: JamiTheme.emojiPickerWidth - height: JamiTheme.emojiPickerHeight - - webChannel.registeredObjects: [jsBridgeObject] - - onCompletedLoadHtml: ":/webengine/emojipicker/emojiPickerLoader.html" - - onLoadingChanged: function (loadingInfo) { - if (loadingInfo.status === WebEngineView.LoadSucceededStatus) { - emojiPickerWebView.runJavaScript(UtilsAdapter.qStringFromFile( - ":qwebchannel.js")) - emojiPickerWebView.runJavaScript( - UtilsAdapter.qStringFromFile( - ":/webengine/emojipicker/emoji.js")) - emojiPickerWebView.runJavaScript( - UtilsAdapter.qStringFromFile( - ":/webengine/emojipicker/emojiPickerLoader.js")) - emojiPickerWebView.runJavaScript( - "init_emoji_picker(" + JamiTheme.darkTheme + ");") - root.openEmojiPicker() - } - } - } - - Overlay.modal: Rectangle { - color: JamiTheme.transparentColor - // Color animation for overlay when pop up is shown. - ColorAnimation on color { - to: JamiTheme.popupOverlayColor - duration: 500 - } - } - - enter: Transition { - NumberAnimation { - properties: "opacity"; from: 0.0; to: 1.0 - duration: JamiTheme.shortFadeDuration - } - } - - exit: Transition { - NumberAnimation { - properties: "opacity"; from: 1.0; to: 0.0 - duration: JamiTheme.shortFadeDuration - } - } -} diff -Nru ring-20230206.0~ds1/src/app/webengine/GeneralWebEngineView.qml ring-20230206.0~ds2/src/app/webengine/GeneralWebEngineView.qml --- ring-20230206.0~ds1/src/app/webengine/GeneralWebEngineView.qml 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/app/webengine/GeneralWebEngineView.qml 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2020-2023 Savoir-faire Linux Inc. - * Author: Mingrui Zhang - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import QtQuick -import QtWebEngine -import QtWebChannel - -import net.jami.Adapters 1.1 -import net.jami.Constants 1.1 - -WebEngineView { - id: root - - property string onCompletedLoadHtml: "" - property string onCompletedUrl: "qrc" + onCompletedLoadHtml - - backgroundColor: "transparent" - - settings.javascriptEnabled: true - settings.javascriptCanOpenWindows: false - settings.javascriptCanAccessClipboard: true - settings.javascriptCanPaste: true - settings.fullScreenSupportEnabled: true - settings.allowRunningInsecureContent: true - settings.localContentCanAccessRemoteUrls: true - settings.localContentCanAccessFileUrls: true - settings.errorPageEnabled: false - settings.pluginsEnabled: false - settings.screenCaptureEnabled: false - settings.linksIncludedInFocusChain: false - settings.localStorageEnabled: true - - // Provide WebChannel by registering jsBridgeObject. - webChannel: WebChannel { - id: webViewChannel - } - - onNavigationRequested: function (request) { - if (request.navigationType === WebEngineView.LinkClickedNavigation) { - MessagesAdapter.openUrl(request.url) - request.action = WebEngineView.IgnoreRequest - } - } - - onContextMenuRequested: function (request) { - var needContextMenu = request.selectedText.length || request.isContentEditable - if (!needContextMenu) - request.accepted = true - } - - Component.onCompleted: { - profile.cachePath = UtilsAdapter.getCachePath() - profile.persistentStoragePath = UtilsAdapter.getCachePath() - profile.persistentCookiesPolicy = WebEngineProfile.NoPersistentCookies - profile.httpCacheType = WebEngineProfile.NoCache - profile.httpUserAgent = JamiStrings.httpUserAgentName - - root.loadHtml(UtilsAdapter.qStringFromFile(onCompletedLoadHtml), - onCompletedLoadHtml) - root.url = onCompletedUrl - } -} diff -Nru ring-20230206.0~ds1/src/app/webengine/map/map.css ring-20230206.0~ds2/src/app/webengine/map/map.css --- ring-20230206.0~ds1/src/app/webengine/map/map.css 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/app/webengine/map/map.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2022-2023 Savoir-faire Linux Inc. - * Author: Nicolas Vengeon - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -html, -body { - margin: 0; - height: 100%; -} - -#map { - position: absolute; - top: 0; - bottom: 0; - width: 100%; -} diff -Nru ring-20230206.0~ds1/src/app/webengine/map/map.html ring-20230206.0~ds2/src/app/webengine/map/map.html --- ring-20230206.0~ds1/src/app/webengine/map/map.html 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/app/webengine/map/map.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ - - - - - - - - - - -
- - diff -Nru ring-20230206.0~ds1/src/app/webengine/map/map.js ring-20230206.0~ds2/src/app/webengine/map/map.js --- ring-20230206.0~ds1/src/app/webengine/map/map.js 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/app/webengine/map/map.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,165 +0,0 @@ -/* - * Copyright (C) 2022-2023 Savoir-faire Linux Inc. - * Author: Nicolas Vengeon - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -const {Map,View} = ol -const TileLayer = ol.layer.Tile -const ImageLayer = ol.layer.Image -const {OSM,ImageStatic} = ol.source - -var basemap = new TileLayer({ source: new OSM() }) -basemap.layer_type = "map" - -var dict = [] - -const map = new Map({ - target: 'map', - layers: [basemap], - view: new View({ - center: ol.proj.fromLonLat([2.1734, 41.3851]), - zoom: 2 - }) -}) - -function setMapView(coordos, zoom) { - map.getView().setCenter(ol.proj.fromLonLat(coordos)) - map.getView().setZoom(zoom) -} - -function dynamicZoom(longMin, latMin, longMax, latMax) { - var coordMin = ol.proj.fromLonLat([longMin,latMin]) - var coordMax = ol.proj.fromLonLat([longMax,latMax]) - var extent = [coordMin[0],coordMin[1],coordMax[0],coordMax[1]] - map.getView().fit(extent, {size: map.getSize(), maxZoom: 16, duration:500, - padding: [80 ,80 ,80 ,80]}) -} - -var extent = [0,0,50,50] -var projection = new ol.proj.Projection({ - code: 'local_image', - units: 'pixels', - extent: extent -}) - -var proj = new ol.proj.Projection({ - code: 'static-image', - units: 'pixels', - extent: extent -}) - -function setSource (coordos, avatar, authorName) { - var coord = ol.proj.fromLonLat(coordos) - var pointFeature = new ol.Feature({ - geometry: new ol.geom.Point(coord), - weight: 20 - }) - - var preStyle = new ol.style.Icon({ - src: "data:image/png;base64," + avatar}) - - //resize the image to 40 px - var image = preStyle.getImage() - if (!image.width) { - image.addEventListener('load', function () { - preStyle.setScale([40 / image.width, 40 / image.height]) - }) - } else { - preStyle.setScale([40 / image.width, 40 / image.height]) - } - - var iconStyle = new ol.style.Style({ - image: preStyle - }) - - pointFeature.setStyle(iconStyle) - - // create a text label - var textLabel = new ol.Feature({ - geometry: new ol.geom.Point(coord), - text: authorName - }); - - // set the style for the text label - textLabel.setStyle(new ol.style.Style({ - text: new ol.style.Text({ - text: textLabel.get('text'), - font: '15px Arial', - fill: new ol.style.Fill({ - color: 'black' - }), - stroke: new ol.style.Stroke({ - color: 'white', - width: 3 - }), - offsetY: 30 - }) - })); - - var vectorSource = new ol.source.Vector({ - features: [pointFeature,textLabel], - }) - - return vectorSource -} - - -function newPosition (coordos, authorUri, avatar, authorName) { - var layerArray = map.getLayers().getArray(); - for (var i = 0; i < layerArray.length; i++ ){ - if(layerArray[i].layer_type === authorUri) { - return - } - } - vectorSource = setSource(coordos, avatar, authorName) - var iconLayer = new ol.layer.Vector({source: vectorSource}) - iconLayer.layer_type = authorUri - map.addLayer(iconLayer) -} - -function updatePosition (coordos, authorUri) { - var coord = ol.proj.fromLonLat(coordos); - var layerArray = map.getLayers().getArray(); - for (var i = 0; i < layerArray.length; i++ ){ - if(layerArray[i].layer_type === authorUri) { - layerArray[i].getSource().getFeatures()[0].getGeometry().setCoordinates(coord) - layerArray[i].getSource().getFeatures()[1].getGeometry().setCoordinates(coord) - return - } - } -} - -function zoomTolayersExtent() { - var ext = ol.extent.createEmpty(); - var layerArray = map.getLayers().getArray(); - for (var i = 0; i < layerArray.length; i++ ){ - if(layerArray[i].layer_type !== "map") { - ext = ol.extent.extend(ext, layerArray[i].getSource().getExtent()); - } - } - map.getView().fit(ext, {size: map.getSize(), maxZoom: 16, duration:500, - padding: [80 ,80 ,80 ,80]}) -} - -function removePosition (authorUri) { - var layerArray = map.getLayers().getArray(); - for (var i = 0; i < layerArray.length; i++ ){ - if(layerArray[i].layer_type === authorUri) { - map.removeLayer(layerArray[i]) - return - } - } -} diff -Nru ring-20230206.0~ds1/src/app/webengine/map/MapPositionOverlay.qml ring-20230206.0~ds2/src/app/webengine/map/MapPositionOverlay.qml --- ring-20230206.0~ds1/src/app/webengine/map/MapPositionOverlay.qml 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/app/webengine/map/MapPositionOverlay.qml 1970-01-01 00:00:00.000000000 +0000 @@ -1,125 +0,0 @@ -/* - * Copyright (C) 2022-2023 Savoir-faire Linux Inc. - * Author: Nicolas Vengeon - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import QtQuick -import QtQuick.Layouts - -import net.jami.Constants 1.1 -import net.jami.Adapters 1.1 - -import "../../commoncomponents" - -Rectangle { - id: root - - anchors.right: webView.right - anchors.top: webView.top - anchors.margins: 10 - radius: 10 - width: lay.width + 10 - height: lay.height + 10 - color: JamiTheme.mapButtonsOverlayColor - - RowLayout { - id: lay - - anchors.centerIn: parent - - PushButton { - id: btnUnpin - - toolTipText: !isUnpin ? JamiStrings.unpin : JamiStrings.pinWindow - imageColor: JamiTheme.mapButtonColor - normalColor: JamiTheme.transparentColor - source: JamiResources.unpin_svg - onClicked: { - if (!isUnpin) { - PositionManager.unPinMap(attachedAccountId) - } else { - PositionManager.pinMap(attachedAccountId) - } - } - } - - PushButton { - id: btnCenter - - toolTipText: JamiStrings.centerMapTooltip - imageColor: JamiTheme.mapButtonColor - normalColor: JamiTheme.transparentColor - source: JamiResources.share_location_svg - onClicked: { - webView.runJavaScript("zoomTolayersExtent()" ); - } - } - - PushButton { - id: btnMove - - toolTipText: JamiStrings.dragMapTooltip - imageColor: JamiTheme.mapButtonColor - normalColor: JamiTheme.transparentColor - source: JamiResources.move_svg - visible: !isUnpin - - MouseArea { - anchors.fill: parent - drag.target: mapObject - drag.minimumX: 0 - drag.maximumX: maxWidth - mapObject.maxWidth - drag.minimumY: 0 - drag.maximumY: maxHeight - mapObject.maxHeight - } - } - - PushButton { - id: btnMaximise - - visible: !isUnpin - toolTipText: mapObject.isFullScreen - ? JamiStrings.reduceMapTooltip - : JamiStrings.maximizeMapTooltip - imageColor: JamiTheme.mapButtonColor - normalColor: JamiTheme.transparentColor - source: mapObject.isFullScreen? JamiResources.close_fullscreen_24dp_svg : JamiResources.open_in_full_24dp_svg - onClicked: { - if (!mapObject.isFullScreen) { - mapObject.x = mapObject.xPos - mapObject.y = mapObject.yPos - } - - mapObject.isFullScreen = !mapObject.isFullScreen - } - } - - PushButton { - id: btnClose - - toolTipText: JamiStrings.closeMapTooltip - imageColor: JamiTheme.mapButtonColor - normalColor: JamiTheme.transparentColor - source: JamiResources.round_close_24dp_svg - visible: !isUnpin - - onClicked: { - PositionManager.setMapInactive(attachedAccountId) - PositionManager.mapAutoOpening = false - } - } - } -} diff -Nru ring-20230206.0~ds1/src/app/webengine/map/MapPosition.qml ring-20230206.0~ds2/src/app/webengine/map/MapPosition.qml --- ring-20230206.0~ds1/src/app/webengine/map/MapPosition.qml 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/app/webengine/map/MapPosition.qml 1970-01-01 00:00:00.000000000 +0000 @@ -1,238 +0,0 @@ -/* - * Copyright (C) 2022-2023 Savoir-faire Linux Inc. - * Author: Nicolas Vengeon - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import Qt5Compat.GraphicalEffects -import QtWebEngine - -import net.jami.Models 1.1 -import net.jami.Adapters 1.1 -import net.jami.Enums 1.1 -import net.jami.Constants 1.1 - -import "../../commoncomponents" - -Item { - id: root - - property bool isUnpin: false - property real maxWidth - property real maxHeight - property string attachedAccountId - property string currentAccountId: CurrentAccount.id - property string currentConvId: CurrentConversation.id - property bool isSharing: (PositionManager.positionShareConvIdsCount !== 0) - property bool isSharingToCurrentConversation - - function closeMapPosition() { - root.destroy() - } - - Connections { - target: PositionManager - - function onPinMapSignal(key) { - if (key === attachedAccountId) { - isUnpin = false - mapObject.state = "pin" - windowUnpin.close() - } - } - - function onCloseMap(key) { - if (key === attachedAccountId ) - closeMapPosition() - } - - function onUnPinMapSignal(key) { - if (key === attachedAccountId ) { - isUnpin = true - mapObject.state = "unpin" - windowUnpin.show() - } - } - } - - Window { - id: windowUnpin - - width: parentPin.width - height: parentPin.height - visible: false - title: PositionManager.getmapTitle(attachedAccountId) - - Item { - id: parentUnPin - - width: mapObject.width - height: mapObject.height - } - - onClosing: { - if (isUnpin) { - PositionManager.setMapInactive(attachedAccountId) - } - } - } - - Item { - id: parentPin - - width: mapObject.width - height: mapObject.height - - Rectangle { - id: mapObject - - x: xPos - y: yPos - width: root.isUnpin - ? windowUnpin.width - : isFullScreen ? root.maxWidth : windowSize - height: root.isUnpin - ? windowUnpin.height - : isFullScreen ? root.maxHeight - yPos : windowSize - - property bool isFullScreen: false - property real windowSize: windowPreferedSize > JamiTheme.minimumMapWidth - ? windowPreferedSize - : JamiTheme.minimumMapWidth - property real windowPreferedSize: root.maxWidth > root.maxHeight - ? root.maxHeight / 3 - : root.maxWidth / 3 - property real xPos: 0 - property real yPos: root.isUnpin ? 0 : JamiTheme.chatViewHeaderPreferredHeight - - states: [ State { - name: "unpin" - ParentChange { target: mapObject; parent: parentUnPin; x:0; y:0 } - }, - State { - name: "pin" - ParentChange { target: mapObject; parent: parentPin; x:xPos; y:JamiTheme.chatViewHeaderPreferredHeight } - } - ] - property alias webView: webView - - WebEngineView { - id: webView - - layer.enabled: !isFullScreen - layer.effect: OpacityMask { - maskSource: - Rectangle { - width: webView.width - height: webView.height - radius: 10 - } - } - - width: parent.width - height: parent.height - - property string mapHtml: ":/webengine/map/map.html" - property string olCss: ":/webengine/map/ol.css" - property string mapJs: "../../webengine/map/map.js" - property string olJs: "../../webengine/map/ol.js" - property bool isLoaded: false - property var positionList: PositionManager.positionList; - property var avatarPositionList: PositionManager.avatarPositionList; - - function loadScripts () { - var scriptMapJs = { - sourceUrl: Qt.resolvedUrl(mapJs), - injectionPoint: WebEngineScript.DocumentReady, - worldId: WebEngineScript.MainWorld - } - - var scriptOlJs = { - sourceUrl: Qt.resolvedUrl(olJs), - injectionPoint: WebEngineScript.DocumentReady, - worldId: WebEngineScript.MainWorld - } - - userScripts.collection = [ scriptOlJs, scriptMapJs ] - } - Connections { - target: PositionManager - - function onPositionShareAdded(shareInfo) { - if(webView.isLoaded) { - if (shareInfo.account === attachedAccountId) { - var curLong = shareInfo.long - var curLat = shareInfo.lat - webView.runJavaScript("newPosition([" + curLong + "," + curLat + "], '" + - shareInfo.author + "', '" + shareInfo.avatar + "', '" + shareInfo.authorName + "' )" ); - webView.runJavaScript("zoomTolayersExtent()" ); - } - } - } - - function onPositionShareUpdated(shareInfo) { - if(webView.isLoaded) { - if (shareInfo.account === attachedAccountId) { - var curLong = shareInfo.long - var curLat = shareInfo.lat - webView.runJavaScript("updatePosition([" + curLong + "," + curLat + "], '" + shareInfo.author + "' )" ); - } - } - } - - function onPositionShareRemoved(author, accountId) { - if(webView.isLoaded) { - if (accountId === attachedAccountId) { - webView.runJavaScript("removePosition( '" + author + "' )" ); - webView.runJavaScript("zoomTolayersExtent()" ); - } - } - } - } - - Component.onCompleted: { - loadHtml(UtilsAdapter.qStringFromFile(mapHtml), mapHtml) - loadScripts() - } - - onLoadingChanged: function (loadingInfo) { - if (loadingInfo.status === WebEngineView.LoadSucceededStatus) { - attachedAccountId = CurrentAccount.id - runJavaScript(UtilsAdapter.getStyleSheet("olcss",UtilsAdapter.qStringFromFile(olCss))) - webView.isLoaded = true - webView.runJavaScript("setMapView([" + 0 + ","+ 0 + "], " + 1 + " );" ); - PositionManager.startPositioning() - //load locations that were received before this conversation was opened - PositionManager.loadPreviousLocations(attachedAccountId); - } - } - } - - MapPositionSharingControl {} - - MapPositionOverlay {} - - StopSharingPositionPopup { - id: stopSharingPositionPopup - - property alias attachedAccountId: root.attachedAccountId - } - } - } -} - diff -Nru ring-20230206.0~ds1/src/app/webengine/map/MapPositionSharingControl.qml ring-20230206.0~ds2/src/app/webengine/map/MapPositionSharingControl.qml --- ring-20230206.0~ds1/src/app/webengine/map/MapPositionSharingControl.qml 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/app/webengine/map/MapPositionSharingControl.qml 1970-01-01 00:00:00.000000000 +0000 @@ -1,203 +0,0 @@ -/* - * Copyright (C) 2022-2023 Savoir-faire Linux Inc. - * Author: Nicolas Vengeon - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -import QtQuick -import QtQuick.Layouts - -import net.jami.Constants 1.1 -import net.jami.Adapters 1.1 -import net.jami.Enums 1.1 - -import "../../commoncomponents" - -ColumnLayout { - id: root - - anchors.horizontalCenter: mapObject.horizontalCenter - anchors.margins: 10 - anchors.bottom: mapObject.bottom - - RowLayout { - Layout.alignment: Qt.AlignHCenter - - Rectangle { - radius: 10 - Layout.preferredWidth: textTimer.width + 15 - Layout.preferredHeight: textTimer.height + 15 - color: JamiTheme.mapButtonsOverlayColor - visible: textTimer.remainingTimeMs === 0 - ? false - : isUnpin - ? isSharing - : isSharingToCurrentConversation - - Text { - id: textTimer - - anchors.centerIn: parent - color: JamiTheme.mapButtonColor - text: standartCountdown(Math.floor(remainingTimeMs / 1000)) - - function standartCountdown(seconds) { - var minutes = Math.floor(seconds / 60); - var hour = Math.floor(minutes / 60) - minutes = minutes % 60 - var sec = seconds % 60 - if (hour) { - if (minutes) - return qsTr("%1h%2min").arg(hour).arg(minutes) - else - return qsTr("%1h").arg(hour) - } - if (minutes) { - if (sec) - return qsTr("%1m%2sec").arg(minutes).arg(sec) - else - return qsTr("%1m").arg(minutes) - - } - return qsTr("%1sec").arg(sec) - } - - property int remainingTimeMs: 0 - Connections { - target: PositionManager - function onSendCountdownUpdate(accountId, remainingTime) { - if (accountId === attachedAccountId) { - textTimer.remainingTimeMs = remainingTime - } - } - } - } - } - } - - RowLayout { - id: sharePositionLayout - - Layout.alignment: Qt.AlignHCenter - - MaterialButton { - id: sharePositionButton - - preferredWidth: text.contentWidth - textLeftPadding: JamiTheme.buttontextPadding - textRightPadding: JamiTheme.buttontextPadding - primary: true - visible: !isSharingToCurrentConversation && !isUnpin - text: JamiStrings.shareLocation - color: isError - ? JamiTheme.buttonTintedGreyInactive - : JamiTheme.buttonTintedBlue - hoveredColor: isError - ? JamiTheme.buttonTintedGreyInactive - : JamiTheme.buttonTintedBlueHovered - pressedColor: isError - ? JamiTheme.buttonTintedGreyInactive - : JamiTheme.buttonTintedBluePressed - Layout.alignment: Qt.AlignHCenter - property bool isHovered: false - property string positioningError: "default" - property bool isError: positioningError.length - property int positionShareConvIdsCount: PositionManager.positionShareConvIdsCount - property string currentConvId: CurrentConversation.id - property bool isMapUnpin: isUnpin - - function errorString(posError) { - if (posError === "locationServicesError") - return JamiStrings.locationServicesError - return JamiStrings.locationServicesClosedError - } - - onPositionShareConvIdsCountChanged: { - isSharingToCurrentConversation = PositionManager.isPositionSharedToConv(attachedAccountId, currentConvId) - } - - onCurrentConvIdChanged: { - isSharingToCurrentConversation = PositionManager.isPositionSharedToConv(attachedAccountId, currentConvId) - } - - onIsMapUnpinChanged: { - isSharingToCurrentConversation = PositionManager.isPositionSharedToConv(attachedAccountId, currentConvId) - } - - onClicked: { - var sharingDuration = 60 * 1000 * UtilsAdapter.getAppValue(Settings.PositionShareDuration) - if (!isError && !isUnpin) { - PositionManager.sharePosition(sharingDuration, attachedAccountId, currentConvId); - } - webView.runJavaScript("zoomTolayersExtent()" ); - } - - MaterialToolTip { - property bool isSharingPossible: !(sharePositionButton.isError && (sharePositionButton.positioningError !== "default")) - - visible: sharePositionButton.hovered - text: isSharingPossible - ? JamiStrings.shareLocationToolTip.arg(PositionManager.getmapTitle(attachedAccountId, currentConvId)) - : sharePositionButton.errorString(sharePositionButton.positioningError) - } - Connections { - target: PositionManager - function onPositioningError (err) { - sharePositionButton.positioningError = err; - } - } - } - - MaterialButton { - id: stopSharingPositionButton - - preferredWidth: text.contentWidth - textLeftPadding: JamiTheme.buttontextPadding - textRightPadding: JamiTheme.buttontextPadding - primary: true - visible: isSharing - text: stopAllSharing - ? JamiStrings.shortStopAllSharings - : JamiStrings.stopSharingLocation - color: isError - ? JamiTheme.buttonTintedGreyInactive - : JamiTheme.buttonTintedRed - hoveredColor: isError - ? JamiTheme.buttonTintedGreyInactive - : JamiTheme.buttonTintedRedHovered - pressedColor: isError - ? JamiTheme.buttonTintedGreyInactive - : JamiTheme.buttonTintedRedPressed - Layout.alignment: Qt.AlignHCenter - toolTipText: stopAllSharing - ? isUnpin - ? JamiStrings.unpinStopSharingTooltip - : JamiStrings.stopAllSharings - : JamiStrings.stopSharingSeveralConversationTooltip - property bool isHovered: false - property string positioningError - property bool isError: positioningError.length - property bool stopAllSharing: !(PositionManager.positionShareConvIdsCount >= 2 && !isUnpin && isSharingToCurrentConversation) - onClicked: { - if (!isError) { - if (stopAllSharing) { - PositionManager.stopSharingPosition(); - } else { - stopSharingPositionPopup.open() - } - } - } - } - } -} diff -Nru ring-20230206.0~ds1/src/app/webengine/map/ol.css ring-20230206.0~ds2/src/app/webengine/map/ol.css --- ring-20230206.0~ds1/src/app/webengine/map/ol.css 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/app/webengine/map/ol.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,371 +0,0 @@ -/* -* BSD 2-Clause License -* -* Copyright 2005-present, OpenLayers Contributors All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* 1. Redistributions of source code must retain the above copyright notice, -* this list of conditions and the following disclaimer. -* -* 2. Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the following disclaimer in the documentation and/or -* other materials provided with the distribution. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS -* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -:root, -:host { - --ol-background-color: white; - --ol-accent-background-color: #F5F5F5; - --ol-subtle-background-color: rgba(128, 128, 128, 0.25); - --ol-partial-background-color: rgba(255, 255, 255, 0.75); - --ol-foreground-color: #333333; - --ol-subtle-foreground-color: #666666; - --ol-brand-color: #00AAFF; -} - -.ol-box { - box-sizing: border-box; - border-radius: 2px; - border: 1.5px solid var(--ol-background-color); - background-color: var(--ol-partial-background-color); -} - -.ol-mouse-position { - top: 8px; - right: 8px; - position: absolute; -} - -.ol-scale-line { - background: var(--ol-partial-background-color); - border-radius: 4px; - bottom: 8px; - left: 8px; - padding: 2px; - position: absolute; -} - -.ol-scale-line-inner { - border: 1px solid var(--ol-subtle-foreground-color); - border-top: none; - color: var(--ol-foreground-color); - font-size: 10px; - text-align: center; - margin: 1px; - will-change: contents, width; - transition: all 0.25s; -} - -.ol-scale-bar { - position: absolute; - bottom: 8px; - left: 8px; -} - -.ol-scale-bar-inner { - display: flex; -} - -.ol-scale-step-marker { - width: 1px; - height: 15px; - background-color: var(--ol-foreground-color); - float: right; - z-index: 10; -} - -.ol-scale-step-text { - position: absolute; - bottom: -5px; - font-size: 10px; - z-index: 11; - color: var(--ol-foreground-color); - text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); -} - -.ol-scale-text { - position: absolute; - font-size: 12px; - text-align: center; - bottom: 25px; - color: var(--ol-foreground-color); - text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); -} - -.ol-scale-singlebar { - position: relative; - height: 10px; - z-index: 9; - box-sizing: border-box; - border: 1px solid var(--ol-foreground-color); -} - -.ol-scale-singlebar-even { - background-color: var(--ol-subtle-foreground-color); -} - -.ol-scale-singlebar-odd { - background-color: var(--ol-background-color); -} - -.ol-unsupported { - display: none; -} - -.ol-viewport, -.ol-unselectable { - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; - -webkit-tap-highlight-color: transparent; -} - -.ol-viewport canvas { - all: unset; -} - -.ol-selectable { - -webkit-touch-callout: default; - -webkit-user-select: text; - -moz-user-select: text; - user-select: text; -} - -.ol-grabbing { - cursor: -webkit-grabbing; - cursor: -moz-grabbing; - cursor: grabbing; -} - -.ol-grab { - cursor: move; - cursor: -webkit-grab; - cursor: -moz-grab; - cursor: grab; -} - -.ol-control { - position: absolute; - background-color: var(--ol-subtle-background-color); - border-radius: 4px; -} - -.ol-zoom { - top: .5em; - left: .5em; -} - -.ol-rotate { - top: .5em; - right: .5em; - transition: opacity .25s linear, visibility 0s linear; -} - -.ol-rotate.ol-hidden { - opacity: 0; - visibility: hidden; - transition: opacity .25s linear, visibility 0s linear .25s; -} - -.ol-zoom-extent { - top: 4.643em; - left: .5em; -} - -.ol-full-screen { - right: .5em; - top: .5em; -} - -.ol-control button { - display: block; - margin: 1px; - padding: 0; - color: var(--ol-subtle-foreground-color); - font-weight: bold; - text-decoration: none; - font-size: inherit; - text-align: center; - height: 1.375em; - width: 1.375em; - line-height: .4em; - background-color: var(--ol-background-color); - border: none; - border-radius: 2px; -} - -.ol-control button::-moz-focus-inner { - border: none; - padding: 0; -} - -.ol-zoom-extent button { - line-height: 1.4em; -} - -.ol-compass { - display: block; - font-weight: normal; - will-change: transform; -} - -.ol-touch .ol-control button { - font-size: 1.5em; -} - -.ol-touch .ol-zoom-extent { - top: 5.5em; -} - -.ol-control button:hover, -.ol-control button:focus { - text-decoration: none; - outline: 1px solid var(--ol-subtle-foreground-color); - color: var(--ol-foreground-color); -} - -.ol-zoom .ol-zoom-in { - border-radius: 2px 2px 0 0; -} - -.ol-zoom .ol-zoom-out { - border-radius: 0 0 2px 2px; -} - -.ol-attribution { - text-align: right; - bottom: .5em; - right: .5em; - max-width: calc(100% - 1.3em); - display: flex; - flex-flow: row-reverse; - align-items: center; -} - -.ol-attribution a { - color: var(--ol-subtle-foreground-color); - text-decoration: none; -} - -.ol-attribution ul { - margin: 0; - padding: 1px .5em; - color: var(--ol-foreground-color); - text-shadow: 0 0 2px var(--ol-background-color); - font-size: 12px; -} - -.ol-attribution li { - display: inline; - list-style: none; -} - -.ol-attribution li:not(:last-child):after { - content: " "; -} - -.ol-attribution img { - max-height: 2em; - max-width: inherit; - vertical-align: middle; -} - -.ol-attribution button { - flex-shrink: 0; -} - -.ol-attribution.ol-collapsed ul { - display: none; -} - -.ol-attribution:not(.ol-collapsed) { - background: var(--ol-partial-background-color); -} - -.ol-attribution.ol-uncollapsible { - bottom: 0; - right: 0; - border-radius: 4px 0 0; -} - -.ol-attribution.ol-uncollapsible img { - margin-top: -.2em; - max-height: 1.6em; -} - -.ol-attribution.ol-uncollapsible button { - display: none; -} - -.ol-zoomslider { - top: 4.5em; - left: .5em; - height: 200px; -} - -.ol-zoomslider button { - position: relative; - height: 10px; -} - -.ol-touch .ol-zoomslider { - top: 5.5em; -} - -.ol-overviewmap { - left: 0.5em; - bottom: 0.5em; -} - -.ol-overviewmap.ol-uncollapsible { - bottom: 0; - left: 0; - border-radius: 0 4px 0 0; -} - -.ol-overviewmap .ol-overviewmap-map, -.ol-overviewmap button { - display: block; -} - -.ol-overviewmap .ol-overviewmap-map { - border: 1px solid var(--ol-subtle-foreground-color); - height: 150px; - width: 150px; -} - -.ol-overviewmap:not(.ol-collapsed) button { - bottom: 0; - left: 0; - position: absolute; -} - -.ol-overviewmap.ol-collapsed .ol-overviewmap-map, -.ol-overviewmap.ol-uncollapsible button { - display: none; -} - -.ol-overviewmap:not(.ol-collapsed) { - background: var(--ol-subtle-background-color); -} - -.ol-overviewmap-box { - border: 1.5px dotted var(--ol-subtle-foreground-color); -} - -.ol-overviewmap .ol-overviewmap-box:hover { - cursor: move; -} diff -Nru ring-20230206.0~ds1/src/app/webengine/map/ol.js ring-20230206.0~ds2/src/app/webengine/map/ol.js --- ring-20230206.0~ds1/src/app/webengine/map/ol.js 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/app/webengine/map/ol.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -/* -* BSD 2-Clause License -* -* Copyright 2005-present, OpenLayers Contributors All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* 1. Redistributions of source code must retain the above copyright notice, -* this list of conditions and the following disclaimer. -* -* 2. Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the following disclaimer in the documentation and/or -* other materials provided with the distribution. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS -* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -var ol=function(){"use strict";const t={1:"The view center is not defined",2:"The view resolution is not defined",3:"The view rotation is not defined",4:"`image` and `src` cannot be provided at the same time",5:"`imgSize` must be set when `image` is provided",7:"`format` must be set when `url` is set",8:"Unknown `serverType` configured",9:"`url` must be configured or set using `#setUrl()`",10:"The default `geometryFunction` can only handle `Point` geometries",11:"`options.featureTypes` must be an Array",12:"`options.geometryName` must also be provided when `options.bbox` is set",13:"Invalid corner",14:"Invalid color",15:"Tried to get a value for a key that does not exist in the cache",16:"Tried to set a value for a key that is used already",17:"`resolutions` must be sorted in descending order",18:"Either `origin` or `origins` must be configured, never both",19:"Number of `tileSizes` and `resolutions` must be equal",20:"Number of `origins` and `resolutions` must be equal",22:"Either `tileSize` or `tileSizes` must be configured, never both",24:"Invalid extent or geometry provided as `geometry`",25:"Cannot fit empty extent provided as `geometry`",26:"Features must have an id set",27:"Features must have an id set",28:'`renderMode` must be `"hybrid"` or `"vector"`',30:"The passed `feature` was already added to the source",31:"Tried to enqueue an `element` that was already added to the queue",32:"Transformation matrix cannot be inverted",33:"Invalid units",34:"Invalid geometry layout",36:"Unknown SRS type",37:"Unknown geometry type found",38:"`styleMapValue` has an unknown type",39:"Unknown geometry type",40:"Expected `feature` to have a geometry",41:"Expected an `ol/style/Style` or an array of `ol/style/Style.js`",42:"Question unknown, the answer is 42",43:"Expected `layers` to be an array or a `Collection`",47:"Expected `controls` to be an array or an `ol/Collection`",48:"Expected `interactions` to be an array or an `ol/Collection`",49:"Expected `overlays` to be an array or an `ol/Collection`",50:"`options.featureTypes` should be an Array",51:"Either `url` or `tileJSON` options must be provided",52:"Unknown `serverType` configured",53:"Unknown `tierSizeCalculation` configured",55:"The {-y} placeholder requires a tile grid with extent",56:"mapBrowserEvent must originate from a pointer event",57:"At least 2 conditions are required",59:"Invalid command found in the PBF",60:"Missing or invalid `size`",61:"Cannot determine IIIF Image API version from provided image information JSON",62:"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`",64:"Layer opacity must be a number",66:"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`",67:"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both",68:"A VectorTile source can only be rendered if it has a projection compatible with the view projection"};class e extends Error{constructor(e){const i=t[e];super(i),this.code=e,this.name="AssertionError",this.message=i}}class i{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}function n(t){t.stopPropagation()}var r="propertychange";class s{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function o(t,e,i){let n,r;i=i||a;let s=0,o=t.length,l=!1;for(;s>1),r=+i(t[n],e),r<0?s=n+1:(o=n,l=!r);return l?s:~s}function a(t,e){return t>e?1:t0){for(r=1;r0?r-1:r:t[r-1]-e0||i&&0===s)}))}function g(){return!0}function f(){return!1}function p(){}function m(t){let e,i,n,r=!1;return function(){const s=Array.prototype.slice.call(arguments);return r&&this===n&&u(s,i)||(r=!0,n=this,i=s,e=t.apply(this,arguments)),e}}function _(t){return function(){let e;try{e=t()}catch(t){return Promise.reject(t)}return e instanceof Promise?e:Promise.resolve(e)}()}function y(t){for(const e in t)delete t[e]}function x(t){let e;for(e in t)return!1;return!e}class v extends s{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);n.includes(e)||n.push(e)}dispatchEvent(t){const e="string"==typeof t,n=e?t:t.type,r=this.listeners_&&this.listeners_[n];if(!r)return;const s=e?new i(t):t;s.target||(s.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});let l;n in o||(o[n]=0,a[n]=0),++o[n];for(let t=0,e=r.length;t0)}removeEventListener(t,e){const i=this.listeners_&&this.listeners_[t];if(i){const n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=p,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}}}var S="change",w="error",E="contextmenu",T="click",C="dblclick",b="dragenter",R="dragover",P="drop",I="keydown",L="keypress",M="load",F="resize",A="touchmove",O="wheel";function N(t,e,i,n,r){if(n&&n!==t&&(i=i.bind(n)),r){const n=i;i=function(){t.removeEventListener(e,i),n.apply(this,arguments)}}const s={target:t,type:e,listener:i};return t.addEventListener(e,i),s}function D(t,e,i,n){return N(t,e,i,n,!0)}function k(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),y(t))}class G extends v{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(S)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let r=0;r0;)this.pop()}extend(t){for(let e=0,i=t.length;ethis.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new K(W,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,n=e.length;i=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new K(Z,e,t)),e}setAt(t,e){if(t>=this.getLength())return void this.insertAt(t,e);if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new K(Z,i,t)),this.dispatchEvent(new K(W,e,t))}updateLength_(){this.set(Y,this.array_.length)}assertUnique_(t,i){for(let n=0,r=this.array_.length;nt)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){B()}getAlpha(t,e){if(!this.transition_)return 1;let i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;const n=e-i+1e3/60;return n>=this.transition_?1:et(n/this.transition_)}inTransition(t){return!!this.transition_&&-1!==this.transitionStarts_[t]}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}class ot extends st{constructor(t){const e=H;super(t.tileCoord,e,{transition:t.transition,interpolate:t.interpolate}),this.loader_=t.loader,this.data_=null,this.error_=null,this.size_=t.size||[256,256]}getSize(){return this.size_}getData(){return this.data_}getError(){return this.error_}load(){if(this.state!==H&&this.state!==Q)return;this.state=$,this.changed();const t=this;this.loader_().then((function(e){t.data_=e,t.state=J,t.changed()})).catch((function(e){t.error_=e,t.state=Q,t.changed()}))}}function at(t,i){if(!t)throw new e(i)}class lt extends V{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if("function"==typeof t.getSimplifiedGeometry){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new lt(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(k(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=N(t,S,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?ht(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function ht(t){if("function"==typeof t)return t;{let e;if(Array.isArray(t))e=t;else{at("function"==typeof t.getZIndex,41);e=[t]}return function(){return e}}}const ct="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",ut=ct.includes("firefox"),dt=ct.includes("safari")&&!ct.includes("chrom"),gt=dt&&(ct.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(ct)),ft=ct.includes("webkit")&&!ct.includes("edge"),pt=ct.includes("macintosh"),mt="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,_t="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,yt="undefined"!=typeof Image&&Image.prototype.decode,xt=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}(),vt=new Array(6);function St(){return[1,0,0,1,0,0]}function wt(t){return Tt(t,1,0,0,1,0,0)}function Et(t,e){const i=t[0],n=t[1],r=t[2],s=t[3],o=t[4],a=t[5],l=e[0],h=e[1],c=e[2],u=e[3],d=e[4],g=e[5];return t[0]=i*l+r*h,t[1]=n*l+s*h,t[2]=i*c+r*u,t[3]=n*c+s*u,t[4]=i*d+r*g+o,t[5]=n*d+s*g+a,t}function Tt(t,e,i,n,r,s,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t[4]=s,t[5]=o,t}function Ct(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function bt(t,e){const i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function Rt(t,e){const i=Math.cos(e),n=Math.sin(e);return Et(t,Tt(vt,i,n,-n,i,0,0))}function Pt(t,e,i){return Et(t,Tt(vt,e,0,0,i,0,0))}function It(t,e,i){return Tt(t,e,0,0,i,0,0)}function Lt(t,e,i){return Et(t,Tt(vt,1,0,0,1,e,i))}function Mt(t,e,i,n,r,s,o,a){const l=Math.sin(s),h=Math.cos(s);return t[0]=n*h,t[1]=r*l,t[2]=-n*l,t[3]=r*h,t[4]=o*n*h-a*n*l+e,t[5]=o*r*l+a*r*h+i,t}function Ft(t,e){const i=At(e);at(0!==i,32);const n=e[0],r=e[1],s=e[2],o=e[3],a=e[4],l=e[5];return t[0]=o/i,t[1]=-r/i,t[2]=-s/i,t[3]=n/i,t[4]=(s*l-o*a)/i,t[5]=-(n*l-r*a)/i,t}function At(t){return t[0]*t[3]-t[1]*t[2]}let Ot;function Nt(t){const e="matrix("+t.join(", ")+")";if(_t)return e;const i=Ot||(Ot=document.createElement("div"));return i.style.transform=e,i.style.transform}var Dt=0,kt=1,Gt=2,jt=4,Bt=8,Ut=16;function zt(t){const e=Ht();for(let i=0,n=t.length;ir&&(l|=jt),as&&(l|=Gt),l===Dt&&(l=kt),l}function Ht(){return[1/0,1/0,-1/0,-1/0]}function $t(t,e,i,n,r){return r?(r[0]=t,r[1]=e,r[2]=i,r[3]=n,r):[t,e,i,n]}function Jt(t){return $t(1/0,1/0,-1/0,-1/0,t)}function Qt(t,e){const i=t[0],n=t[1];return $t(i,n,i,n,e)}function te(t,e,i,n,r){return oe(Jt(r),t,e,i,n)}function ee(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function ie(t,e,i){return Math.abs(t[0]-e[0])t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function re(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function se(t,e){for(let i=0,n=e.length;ie[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Ee(t){return t[2]=o&&p<=l),n||!(s&jt)||r&jt||(m=g-(d-l)*f,n=m>=a&&m<=h),n||!(s&Bt)||r&Bt||(p=d-(g-a)/f,n=p>=o&&p<=l),n||!(s&Ut)||r&Ut||(m=g-(d-o)*f,n=m>=a&&m<=h)}return n}function Re(t,e,i,n){let r=[];if(n>1){const e=t[2]-t[0],i=t[3]-t[1];for(let s=0;s=i[2])){const e=Se(i),r=Math.floor((n[0]-i[0])/e)*e;t[0]-=r,t[2]-=r}return t}function Ie(t,e){if(e.canWrapX()){const i=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[i[0],t[1],i[2],t[3]]];Pe(t,e);const n=Se(i);if(Se(t)>n)return[[i[0],t[1],i[2],t[3]]];if(t[0]i[2])return[[t[0],t[1],i[2],t[3]],[i[0],t[1],t[2]-n,t[3]]]}return[t]}const Le={9001:"m",9002:"ft",9003:"us-ft",9101:"radians",9102:"degrees"};function Me(t){return Le[t]}const Fe={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class Ae{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Fe[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const Oe=6378137,Ne=Math.PI*Oe,De=[-Ne,-Ne,Ne,Ne],ke=[-180,-85,180,85],Ge=Oe*Math.log(Math.tan(Math.PI/2));class je extends Ae{constructor(t){super({code:t,units:"m",extent:De,global:!0,worldExtent:ke,getPointResolution:function(t,e){return t/Math.cosh(e[1]/Oe)}})}}const Be=[new je("EPSG:3857"),new je("EPSG:102100"),new je("EPSG:102113"),new je("EPSG:900913"),new je("http://www.opengis.net/def/crs/EPSG/0/3857"),new je("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Ue(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let r=0;rGe?i=Ge:i<-Ge&&(i=-Ge),e[r+1]=i}return e}function ze(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let r=0;r1?(i=r,n=s):l>0&&(i+=o*l,n+=a*l)}return ri(t,e,i,n)}function ri(t,e,i,n){const r=i-t,s=n-e;return r*r+s*s}function si(t){const e=t.length;for(let i=0;ir&&(r=e,n=s)}if(0===r)return null;const s=t[n];t[n]=t[i],t[i]=s;for(let n=i+1;n=0;n--){i[n]=t[n][e]/t[n][n];for(let r=n-1;r>=0;r--)t[r][e]-=t[r][n]*i[n]}return i}function oi(t){return 180*t/Math.PI}function ai(t){return t*Math.PI/180}function li(t,e){const i=t%e;return i*e<0?i+e:i}function hi(t,e,i){return t+i*(e-t)}function ci(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}function ui(t,e){return Math.round(ci(t,e))}function di(t,e){return Math.floor(ci(t,e))}function gi(t,e){return Math.ceil(ci(t,e))}function fi(t,e,i){const n=void 0!==i?t.toFixed(i):""+t;let r=n.indexOf(".");return r=-1===r?n.length:r,r>e?n:new Array(1+e-r).join("0")+n}function pi(t,e){const i=(""+t).split("."),n=(""+e).split(".");for(let t=0;tr)return 1;if(r>e)return-1}return 0}function mi(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function _i(t,e){const i=e.getRadius(),n=e.getCenter(),r=n[0],s=n[1];let o=t[0]-r;const a=t[1]-s;0===o&&0===a&&(o=1);const l=Math.sqrt(o*o+a*a);return[r+i*o/l,s+i*a/l]}function yi(t,e){const i=t[0],n=t[1],r=e[0],s=e[1],o=r[0],a=r[1],l=s[0],h=s[1],c=l-o,u=h-a,d=0===c&&0===u?0:(c*(i-o)+u*(n-a))/(c*c+u*u||0);let g,f;return d<=0?(g=o,f=a):d>=1?(g=l,f=h):(g=o+d*c,f=a+d*u),[g,f]}function xi(t,e,i){const n=li(e+180,360)-180,r=Math.abs(3600*n),s=i||0;let o=Math.floor(r/3600),a=Math.floor((r-3600*o)/60),l=ci(r-3600*o-60*a,s);l>=60&&(l=0,a+=1),a>=60&&(a=0,o+=1);let h=o+"°";return 0===a&&0===l||(h+=" "+fi(a,2)+"′"),0!==l&&(h+=" "+fi(l,2,s)+"″"),0!==n&&(h+=" "+t.charAt(n<0?1:0)),h}function vi(t,e,i){return t?e.replace("{x}",t[0].toFixed(i)).replace("{y}",t[1].toFixed(i)):""}function Si(t,e){let i=!0;for(let n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function wi(t,e){const i=Math.cos(e),n=Math.sin(e),r=t[0]*i-t[1]*n,s=t[1]*i+t[0]*n;return t[0]=r,t[1]=s,t}function Ei(t,e){return t[0]*=e,t[1]*=e,t}function Ti(t,e){const i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n}function Ci(t,e){return Math.sqrt(Ti(t,e))}function bi(t,e){return Ti(t,yi(t,e))}function Ri(t,e){return vi(t,"{x}, {y}",e)}function Pi(t,e){if(e.canWrapX()){const i=Se(e.getExtent()),n=Ii(t,e,i);n&&(t[0]-=n*i)}return t}function Ii(t,e,i){const n=e.getExtent();let r=0;return e.canWrapX()&&(t[0]n[2])&&(i=i||Se(n),r=Math.floor((t[0]-n[0])/i)),r}const Li=6371008.8;function Mi(t,e,i){i=i||Li;const n=ai(t[1]),r=ai(e[1]),s=(r-n)/2,o=ai(e[0]-t[0])/2,a=Math.sin(s)*Math.sin(s)+Math.sin(o)*Math.sin(o)*Math.cos(n)*Math.cos(r);return 2*i*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function Fi(t,e){let i=0;for(let n=0,r=t.length;n=o?e[s+t]:r[t]}return i}}function Yi(t,e,i,n){const r=Ui(t),s=Ui(e);ti(r,s,Zi(i)),ti(s,r,Zi(n))}function Ki(t,e){if(t===e)return!0;const i=t.getUnits()===e.getUnits();if(t.getCode()===e.getCode())return i;return qi(t,e)===ki&&i}function qi(t,e){let i=ei(t.getCode(),e.getCode());return i||(i=Gi),i}function Hi(t,e){return qi(Ui(t),Ui(e))}function $i(t,e,i){return Hi(e,i)(t,void 0,t.length)}function Ji(t,e,i,n){return Re(t,Hi(e,i),void 0,n)}let Qi=null;function tn(t){Qi=Ui(t)}function en(){return Qi}function nn(t,e){return Qi?$i(t,e,Qi):t}function rn(t,e){return Qi?$i(t,Qi,e):(Ni&&!Si(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(Ni=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function sn(t,e){return Qi?Ji(t,e,Qi):t}function on(t,e){return Qi?Ji(t,Qi,e):t}function an(t,e){if(!Qi)return t;const i=Ui(e).getUnits(),n=Qi.getUnits();return i&&n?t*Fe[i]/Fe[n]:t}function ln(t,e){if(!Qi)return t;const i=Ui(e).getUnits(),n=Qi.getUnits();return i&&n?t*Fe[n]/Fe[i]:t}function hn(t,e,i){return function(n){let r,s;if(t.canWrapX()){const e=t.getExtent(),o=Se(e);s=Ii(n=n.slice(0),t,o),s&&(n[0]=n[0]-s*o),n[0]=ii(n[0],e[0],e[2]),n[1]=ii(n[1],e[1],e[3]),r=i(n)}else r=i(n);return s&&e.canWrapX()&&(r[0]+=s*Se(e.getExtent())),r}}function cn(){Xi(Be),Xi(Ye),Vi(Ye,Be,Ue,ze)}function un(t,e,i,n,r,s){s=s||[];let o=0;for(let a=e;a1)u=i;else{if(d>0){for(let r=0;rr&&(r=a),s=i,o=n}return r}function wn(t,e,i,n,r){for(let s=0,o=i.length;s0;){const i=h.pop(),s=h.pop();let o=0;const a=t[s],u=t[s+1],d=t[i],g=t[i+1];for(let e=s+n;eo&&(c=e,o=i)}o>r&&(l[(c-e)/n]=1,s+nr&&(s[o++]=h,s[o++]=c,a=h,l=c);return h==a&&c==l||(s[o++]=h,s[o++]=c),o}function On(t,e){return e*Math.round(t/e)}function Nn(t,e,i,n,r,s,o){if(e==i)return o;let a,l,h=On(t[e],r),c=On(t[e+1],r);e+=n,s[o++]=h,s[o++]=c;do{if(a=On(t[e],r),l=On(t[e+1],r),(e+=n)==i)return s[o++]=a,s[o++]=l,o}while(a==h&&l==c);for(;e0&&f>d)&&(g<0&&p0&&p>g)?(a=i,l=u):(s[o++]=a,s[o++]=l,h=a,c=l,a=i,l=u)}return s[o++]=a,s[o++]=l,o}function Dn(t,e,i,n,r,s,o,a){for(let l=0,h=i.length;ls&&(i-a)*(s-l)-(r-a)*(n-l)>0&&o++:n<=s&&(i-a)*(s-l)-(r-a)*(n-l)<0&&o--,a=i,l=n}return 0!==o}function Kn(t,e,i,n,r,s){if(0===i.length)return!1;if(!Yn(t,e,i[0],n,r,s))return!1;for(let e=1,o=i.length;ey&&(c=(u+d)/2,Kn(t,e,i,n,c,p)&&(_=c,y=r)),u=d}return isNaN(_)&&(_=r[s]),o?(o.push(_,p,y),o):[_,p,y]}function $n(t,e,i,n,r){let s=[];for(let o=0,a=i.length;o=r[0]&&s[2]<=r[2]||(s[1]>=r[1]&&s[3]<=r[3]||Jn(t,e,i,n,(function(t,e){return be(r,t,e)})))))}function tr(t,e,i,n,r){for(let s=0,o=i.length;s0}function or(t,e,i,n,r){r=void 0!==r&&r;for(let s=0,o=i.length;s0&&this.points_[i+2]>t;)i-=3;const n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;const r=this.points_[e]-this.points_[i],s=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(s,r),this.initialVelocity_=Math.sqrt(r*r+s*s)/n,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}const Zr=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Yr=/^([a-z]*)$|^hsla?\(.*\)$/i;function Kr(t){return"string"==typeof t?t:Qr(t)}function qr(t){const e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);const t=getComputedStyle(e).color;return document.body.removeChild(e),t}return""}const Hr=function(){const t={};let e=0;return function(i){let n;if(t.hasOwnProperty(i))n=t[i];else{if(e>=1024){let i=0;for(const n in t)0==(3&i++)&&(delete t[n],--e)}n=function(t){let e,i,n,r,s;Yr.exec(t)&&(t=qr(t));if(Zr.exec(t)){const o=t.length-1;let a;a=o<=4?1:2;const l=4===o||8===o;e=parseInt(t.substr(1+0*a,a),16),i=parseInt(t.substr(1+1*a,a),16),n=parseInt(t.substr(1+2*a,a),16),r=l?parseInt(t.substr(1+3*a,a),16):255,1==a&&(e=(e<<4)+e,i=(i<<4)+i,n=(n<<4)+n,l&&(r=(r<<4)+r)),s=[e,i,n,r/255]}else t.startsWith("rgba(")?(s=t.slice(5,-1).split(",").map(Number),Jr(s)):t.startsWith("rgb(")?(s=t.slice(4,-1).split(",").map(Number),s.push(1),Jr(s)):at(!1,14);return s}(i),t[i]=n,++e}return n}}();function $r(t){return Array.isArray(t)?t:Hr(t)}function Jr(t){return t[0]=ii(t[0]+.5|0,0,255),t[1]=ii(t[1]+.5|0,0,255),t[2]=ii(t[2]+.5|0,0,255),t[3]=ii(t[3],0,1),t}function Qr(t){let e=t[0];e!=(0|e)&&(e=e+.5|0);let i=t[1];i!=(0|i)&&(i=i+.5|0);let n=t[2];n!=(0|n)&&(n=n+.5|0);return"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}function ts(t){return Yr.test(t)&&(t=qr(t)),Zr.test(t)||t.startsWith("rgba(")||t.startsWith("rgb(")}class es{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const i=this.cache_[e];0!=(3&t++)||i.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,i){const n=is(t,e,i);return n in this.cache_?this.cache_[n]:null}set(t,e,i,n){const r=is(t,e,i);this.cache_[r]=n,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function is(t,e,i){return e+":"+t+":"+(i?Kr(i):"null")}const ns=new es;var rs="opacity",ss="visible",os="extent",as="zIndex",ls="maxResolution",hs="minResolution",cs="maxZoom",us="minZoom",ds="source",gs="map";class fs extends V{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);"object"==typeof t.properties&&(delete e.properties,Object.assign(e,t.properties)),e[rs]=void 0!==t.opacity?t.opacity:1,at("number"==typeof e[rs],64),e[ss]=void 0===t.visible||t.visible,e[as]=t.zIndex,e[ls]=void 0!==t.maxResolution?t.maxResolution:1/0,e[hs]=void 0!==t.minResolution?t.minResolution:0,e[us]=void 0!==t.minZoom?t.minZoom:-1/0,e[cs]=void 0!==t.maxZoom?t.maxZoom:1/0,this.className_=void 0!==e.className?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=ii(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return B()}getLayerStatesArray(t){return B()}getExtent(){return this.get(os)}getMaxResolution(){return this.get(ls)}getMinResolution(){return this.get(hs)}getMinZoom(){return this.get(us)}getMaxZoom(){return this.get(cs)}getOpacity(){return this.get(rs)}getSourceState(){return B()}getVisible(){return this.get(ss)}getZIndex(){return this.get(as)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(os,t)}setMaxResolution(t){this.set(ls,t)}setMinResolution(t){this.set(hs,t)}setMaxZoom(t){this.set(cs,t)}setMinZoom(t){this.set(us,t)}setOpacity(t){at("number"==typeof t,64),this.set(rs,t)}setVisible(t){this.set(ss,t)}setZIndex(t){this.set(as,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}var ps="prerender",ms="postrender",_s="precompose",ys="postcompose",xs="rendercomplete";class vs extends fs{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(ds,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return(t=t||[]).push(this),t}getLayerStatesArray(t){return(t=t||[]).push(this.getLayerState()),t}getSource(){return this.get(ds)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed()}handleSourcePropertyChange_(){this.sourceChangeKey_&&(k(this.sourceChangeKey_),this.sourceChangeKey_=null);const t=this.getSource();t&&(this.sourceChangeKey_=N(t,S,this.handleSourceChange_,this)),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise((t=>t([])))}getData(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null}render(t,e){const i=this.getRenderer();if(i.prepareFrame(t))return this.rendered=!0,i.renderFrame(t,e)}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set(gs,t)}getMapInternal(){return this.get(gs)}setMap(t){this.mapPrecomposeKey_&&(k(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(k(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=N(t,_s,(function(t){const e=t.frameState.layerStatesArray,i=this.getLayerState(!1);at(!e.some((function(t){return t.layer===i.layer})),67),e.push(i)}),this),this.mapRenderKey_=N(this,S,t.render,t),this.changed())}setSource(t){this.set(ds,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function Ss(t,e){if(!t.visible)return!1;const i=e.resolution;if(i=t.maxResolution)return!1;const n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}class ws extends s{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){B()}calculateMatrices2D(t){const e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;Mt(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Ft(n,i)}forEachFeatureAtCoordinate(t,e,i,n,r,s,o,a){let l;const h=e.viewState;function c(t,e,i,n){return r.call(s,e,t?i:null,n)}const u=h.projection,d=Pi(t.slice(),u),g=[[0,0]];if(u.canWrapX()&&n){const t=Se(u.getExtent());g.push([-t,0],[t,0])}const f=e.layerStatesArray,p=f.length,m=[],_=[];for(let n=0;n=0;--r){const s=f[r],u=s.layer;if(u.hasRenderer()&&Ss(s,h)&&o.call(a,u)){const r=u.getRenderer(),o=u.getSource();if(r&&o){const a=o.getWrapX()?d:t,h=c.bind(null,s.managed);_[0]=a[0]+g[n][0],_[1]=a[1]+g[n][1],l=r.forEachFeatureAtCoordinate(_,e,i,h,m)}if(l)return l}}if(0===m.length)return;const y=1/m.length;return m.forEach(((t,e)=>t.distanceSq+=e*y)),m.sort(((t,e)=>t.distanceSq-e.distanceSq)),m.some((t=>l=t.callback(t.feature,t.layer,t.geometry))),l}hasFeatureAtCoordinate(t,e,i,n,r,s){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,g,this,r,s)}getMap(){return this.map_}renderFrame(t){B()}scheduleExpireIconCache(t){ns.canExpireCache()&&t.postRenderFunctions.push(Es)}}function Es(t,e){ns.expire()}class Ts extends i{constructor(t,e,i,n){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=n}}const Cs="ol-hidden",bs="ol-selectable",Rs="ol-unselectable",Ps="ol-unsupported",Is="ol-control",Ls="ol-collapsed",Ms=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),Fs=["style","variant","weight","size","lineHeight","family"],As=function(t){const e=t.match(Ms);if(!e)return null;const i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let t=0,n=Fs.length;tMath.max(e,$s(t,i))),0);return i[e]=n,n}function Qs(t,e){const i=[],n=[],r=[];let s=0,o=0,a=0,l=0;for(let h=0,c=e.length;h<=c;h+=2){const u=e[h];if("\n"===u||h===c){s=Math.max(s,o),r.push(o),o=0,a+=l;continue}const d=e[h+1]||t.font,g=$s(d,u);i.push(g),o+=g;const f=qs(d);n.push(f),l=Math.max(l,f)}return{width:s,height:a,widths:i,heights:n,lineWidths:r}}function to(t,e,i,n,r,s,o,a,l,h,c){t.save(),1!==i&&(t.globalAlpha*=i),e&&t.setTransform.apply(t,e),n.contextInstructions?(t.translate(l,h),t.scale(c[0],c[1]),function(t,e){const i=t.contextInstructions;for(let t=0,n=i.length;t=0;--e)n[e].renderDeclutter(t);Xr(this.element_,this.children_),this.dispatchRenderEvent(ys,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}}class io extends i{constructor(t,e){super(t),this.layer=e}}const no="layers";class ro extends fs{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let i=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(no,this.handleLayersChanged_),i?Array.isArray(i)?i=new q(i.slice(),{unique:!0}):at("function"==typeof i.getArray,43):i=new q(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(k),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(N(t,W,this.handleLayersAdd_,this),N(t,Z,this.handleLayersRemove_,this));for(const t in this.listenerKeys_)this.listenerKeys_[t].forEach(k);y(this.listenerKeys_);const e=t.getArray();for(let t=0,i=e.length;tthis.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(k(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(A,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(k(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(k),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}var fo="postrender",po="movestart",mo="moveend",_o="loadstart",yo="loadend",xo="layergroup",vo="size",So="target",wo="view";const Eo=1/0;class To{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,y(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const n=this.keyFunction_(i);return delete this.queuedElements_[n],i}enqueue(t){at(!(this.keyFunction_(t)in this.queuedElements_),31);const e=this.priorityFunction_(t);return e!=Eo&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}getCount(){return this.elements_.length}getLeftChildIndex_(t){return 2*t+1}getRightChildIndex_(t){return 2*t+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return 0===this.elements_.length}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,i=this.priorities_,n=e.length,r=e[t],s=i[t],o=t;for(;t>1;){const r=this.getLeftChildIndex_(t),s=this.getRightChildIndex_(t),o=st;){const t=this.getParentIndex_(e);if(!(n[t]>s))break;i[e]=i[t],n[e]=n[t],e=t}i[e]=r,n[e]=s}reprioritize(){const t=this.priorityFunction_,e=this.elements_,i=this.priorities_;let n=0;const r=e.length;let s,o,a;for(o=0;o0;)n=this.dequeue()[0],r=n.getKey(),i=n.getState(),i!==H||r in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[r]=!0,++this.tilesLoading_,++s,n.load())}}function bo(t,e,i,n,r){if(!t||!(i in t.wantedTiles))return Eo;if(!t.wantedTiles[i][e.getKey()])return Eo;const s=t.viewState.center,o=n[0]-s[0],a=n[1]-s[1];return 65536*Math.log(r)+Math.sqrt(o*o+a*a)/r}var Ro=0,Po=1,Io={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};const Lo=256;function Mo(t,e,i){return function(n,r,s,o,a){if(!n)return;if(!r&&!e)return n;const l=e?0:s[0]*r,h=e?0:s[1]*r,c=a?a[0]:0,u=a?a[1]:0;let d=t[0]+l/2+c,g=t[2]-l/2+c,f=t[1]+h/2+u,p=t[3]-h/2+u;d>g&&(d=(g+d)/2,g=d),f>p&&(f=(p+f)/2,p=f);let m=ii(n[0],d,g),_=ii(n[1],f,p);if(o&&i&&r){const t=30*r;m+=-t*Math.log(1+Math.max(0,d-n[0])/t)+t*Math.log(1+Math.max(0,n[0]-g)/t),_+=-t*Math.log(1+Math.max(0,f-n[1])/t)+t*Math.log(1+Math.max(0,n[1]-p)/t)}return[m,_]}}function Fo(t){return t}function Ao(t,e,i,n){const r=Se(e)/i[0],s=_e(e)/i[1];return n?Math.min(t,Math.max(r,s)):Math.min(t,Math.min(r,s))}function Oo(t,e,i){let n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),ii(n,i/2,2*e)}function No(t,e,i,n){return e=void 0===e||e,function(r,s,o,a){if(void 0!==r){const h=t[0],c=t[t.length-1],u=i?Ao(h,i,o,n):h;if(a)return e?Oo(r,u,c):ii(r,c,u);const d=Math.min(u,r),g=Math.floor(l(t,d,s));return t[g]>u&&g1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i);let n=0;for(;n0}getInteracting(){return this.hints_[Po]>0}cancelAnimations(){let t;this.setHint(Ro,-this.hints_[Ro]);for(let e=0,i=this.animations_.length;e=0;--i){const n=this.animations_[i];let r=!0;for(let i=0,s=n.length;i0?o/s.duration:1;a>=1?(s.complete=!0,a=1):r=!1;const l=s.easing(a);if(s.sourceCenter){const t=s.sourceCenter[0],e=s.sourceCenter[1],i=s.targetCenter[0],n=s.targetCenter[1];this.nextCenter_=s.targetCenter;const r=t+l*(i-t),o=e+l*(n-e);this.targetCenter_=[r,o]}if(s.sourceResolution&&s.targetResolution){const t=1===l?s.targetResolution:s.sourceResolution+l*(s.targetResolution-s.sourceResolution);if(s.anchor){const e=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(t,0,e,!0);this.targetCenter_=this.calculateCenterZoom(i,s.anchor)}this.nextResolution_=s.targetResolution,this.targetResolution_=t,this.applyTargetState_(!0)}if(void 0!==s.sourceRotation&&void 0!==s.targetRotation){const t=1===l?li(s.targetRotation+Math.PI,2*Math.PI)-Math.PI:s.sourceRotation+l*(s.targetRotation-s.sourceRotation);if(s.anchor){const e=this.constraints_.rotation(t,!0);this.targetCenter_=this.calculateCenterRotate(e,s.anchor)}this.nextRotation_=s.targetRotation,this.targetRotation_=t}if(this.applyTargetState_(!0),e=!0,!s.complete)break}if(r){this.animations_[i]=null,this.setHint(Ro,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const t=n[0].callback;t&&Xo(t,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const n=this.getCenterInternal();return void 0!==n&&(i=[n[0]-e[0],n[1]-e[1]],wi(i,t-this.getRotation()),mi(i,e)),i}calculateCenterZoom(t,e){let i;const n=this.getCenterInternal(),r=this.getResolution();if(void 0!==n&&void 0!==r){i=[e[0]-t*(e[0]-n[0])/r,e[1]-t*(e[1]-n[1])/r]}return i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t?nn(t,this.getProjection()):t}getCenterInternal(){return this.get(Io.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){return sn(this.calculateExtentInternal(t),this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();at(e,1);const i=this.getResolution();at(void 0!==i,2);const n=this.getRotation();return at(void 0!==n,3),pe(e,i,n,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Io.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(on(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=Se(t)/e[0],n=_e(t)/e[1];return Math.max(i,n)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(e/i)/Math.log(t);return function(i){return e/Math.pow(t,i*n)}}getRotation(){return this.get(Io.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(i/n)/e;return function(t){return Math.log(i/t)/e/r}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let n=this.getCenterInternal();const r=this.padding_;if(r){const t=this.getViewportSizeMinusPadding_();n=Ko(n,this.getViewportSize_(),[t[0]/2+r[3],t[1]/2+r[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getZoom(){let t;const e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e,i,n=this.minZoom_||0;if(this.resolutions_){const r=l(this.resolutions_,t,1);n=r,e=this.resolutions_[r],i=r==this.resolutions_.length-1?2:e/this.resolutions_[r+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=ii(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,ii(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(at(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t)){at(!Ee(t),25);i=gr(on(t,this.getProjection()))}else if("Circle"===t.getType()){const e=on(t.getExtent(),this.getProjection());i=gr(e),i.rotate(this.getRotation(),ge(e))}else{const e=en();i=e?t.clone().transform(e,this.getProjection()):t}this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),r=t.getFlatCoordinates(),s=t.getStride();let o=1/0,a=1/0,l=-1/0,h=-1/0;for(let t=0,e=r.length;t0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!u(e,this.renderedAttributions_)){zr(this.ulElement_);for(let t=0,i=e.length;t0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:it}):t.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const i=e.viewState.rotation;if(i!=this.rotation_){const t="rotate("+i+"rad)";if(this.autoHide_){const t=this.element.classList.contains(Cs);t||0!==i?t&&0!==i&&this.element.classList.remove(Cs):this.element.classList.add(Cs)}this.label_.style.transform=t}this.rotation_=i}}class Jo extends qo{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=void 0!==t.className?t.className:"ol-zoom",i=void 0!==t.delta?t.delta:1,n=void 0!==t.zoomInClassName?t.zoomInClassName:e+"-in",r=void 0!==t.zoomOutClassName?t.zoomOutClassName:e+"-out",s=void 0!==t.zoomInLabel?t.zoomInLabel:"+",o=void 0!==t.zoomOutLabel?t.zoomOutLabel:"–",a=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",l=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=n,h.setAttribute("type","button"),h.title=a,h.appendChild("string"==typeof s?document.createTextNode(s):s),h.addEventListener(T,this.handleClick_.bind(this,i),!1);const c=document.createElement("button");c.className=r,c.setAttribute("type","button"),c.title=l,c.appendChild("string"==typeof o?document.createTextNode(o):o),c.addEventListener(T,this.handleClick_.bind(this,-i),!1);const u=e+" "+"ol-unselectable "+Is,d=this.element;d.className=u,d.appendChild(h),d.appendChild(c),this.duration_=void 0!==t.duration?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const e=this.getMap().getView();if(!e)return;const i=e.getZoom();if(void 0!==i){const n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:it})):e.setZoom(n)}}}function Qo(t){t=t||{};const e=new q;(void 0===t.zoom||t.zoom)&&e.push(new Jo(t.zoomOptions));(void 0===t.rotate||t.rotate)&&e.push(new $o(t.rotateOptions));return(void 0===t.attribution||t.attribution)&&e.push(new Ho(t.attributionOptions)),e}var ta="active";class ea extends V{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(ta)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(ta,t)}setMap(t){this.map_=t}}function ia(t,e,i){const n=t.getCenterInternal();if(n){const r=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:rt,center:t.getConstrainedCenter(r)})}}function na(t,e,i,n){const r=t.getZoom();if(void 0===r)return;const s=t.getConstrainedZoom(r+e),o=t.getResolutionForZoom(s);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:o,anchor:i,duration:void 0!==n?n:250,easing:it})}class ra extends ea{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:250}handleEvent(t){let e=!1;if(t.type==ao.DBLCLICK){const i=t.originalEvent,n=t.map,r=t.coordinate,s=i.shiftKey?-this.delta_:this.delta_;na(n.getView(),s,r,this.duration_),i.preventDefault(),e=!0}return!e}}class sa extends ea{constructor(t){super(t=t||{}),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==ao.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==ao.POINTERUP){const e=this.handleUpEvent(t);this.handlingDownUpSequence=e&&this.targetPointers.length>0}}else if(t.type==ao.POINTERDOWN){const i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==ao.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function oa(t){const e=t.length;let i=0,n=0;for(let r=0;r0&&this.condition_(t)){const e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}class wa extends sa{constructor(t){t=t||{},super({stopDown:f}),this.condition_=t.condition?t.condition:ha,this.lastAngle_=void 0,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){if(!xa(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===Go)return;const n=e.getSize(),r=t.pixel,s=Math.atan2(n[1]/2-r[1],r[0]-n[0]/2);if(void 0!==this.lastAngle_){const t=s-this.lastAngle_;i.adjustRotationInternal(-t)}this.lastAngle_=s}handleUpEvent(t){if(!xa(t))return!0;return t.map.getView().endInteraction(this.duration_),!1}handleDownEvent(t){if(!xa(t))return!1;if(ga(t)&&this.condition_(t)){return t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0}return!1}}class Ea extends s{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,i="px",n=this.element_.style;n.left=Math.min(t[0],e[0])+i,n.top=Math.min(t[1],e[1])+i,n.width=Math.abs(e[0]-t[0])+i,n.height=Math.abs(e[1]-t[1])+i}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new ur([i])}getGeometry(){return this.geometry_}}const Ta="boxstart",Ca="boxdrag",ba="boxend",Ra="boxcancel";class Pa extends i{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}class Ia extends sa{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new Ea(t.className||"ol-dragbox"),this.minArea_=void 0!==t.minArea?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:ga,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,i){const n=i[0]-e[0],r=i[1]-e[1];return n*n+r*r>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Pa(Ca,t.coordinate,t))}handleUpEvent(t){this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Pa(e?ba:Ra,t.coordinate,t)),!1}handleDownEvent(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Pa(Ta,t.coordinate,t)),!0)}onBoxEnd(t){}}class La extends Ia{constructor(t){super({condition:(t=t||{}).condition?t.condition:_a,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=void 0!==t.duration?t.duration:200,this.out_=void 0!==t.out&&t.out}onBoxEnd(t){const e=this.getMap().getView();let i=this.getGeometry();if(this.out_){const t=e.rotatedExtentForGeometry(i),n=e.getResolutionForExtentInternal(t),r=e.getResolution()/n;i=i.clone(),i.scale(r*r)}e.fitInternal(i,{duration:this.duration_,easing:it})}}var Ma=37,Fa=38,Aa=39,Oa=40;class Na extends ea{constructor(t){super(),t=t||{},this.defaultCondition_=function(t){return ma(t)&&ya(t)},this.condition_=void 0!==t.condition?t.condition:this.defaultCondition_,this.duration_=void 0!==t.duration?t.duration:100,this.pixelDelta_=void 0!==t.pixelDelta?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==I){const i=t.originalEvent,n=i.keyCode;if(this.condition_(t)&&(n==Oa||n==Ma||n==Aa||n==Fa)){const r=t.map.getView(),s=r.getResolution()*this.pixelDelta_;let o=0,a=0;n==Oa?a=-s:n==Ma?o=-s:n==Aa?o=s:a=s;const l=[o,a];wi(l,r.getRotation()),ia(r,l,this.duration_),i.preventDefault(),e=!0}}return!e}}class Da extends ea{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:ya,this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:100}handleEvent(t){let e=!1;if(t.type==I||t.type==L){const i=t.originalEvent,n=i.charCode;if(this.condition_(t)&&(n=="+".charCodeAt(0)||n=="-".charCodeAt(0))){const r=t.map,s=n=="+".charCodeAt(0)?this.delta_:-this.delta_;na(r.getView(),s,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}}class ka extends ea{constructor(t){super(t=t||{}),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==t.maxDelta?t.maxDelta:1,this.duration_=void 0!==t.duration?t.duration:250,this.timeout_=void 0!==t.timeout?t.timeout:80,this.useAnchor_=void 0===t.useAnchor||t.useAnchor,this.constrainResolution_=void 0!==t.constrainResolution&&t.constrainResolution;const e=t.condition?t.condition:da;this.condition_=t.onFocusOnly?aa(ua,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();if(!t)return;t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t))return!0;if(t.type!==O)return!0;const e=t.map,i=t.originalEvent;let n;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==O&&(n=i.deltaY,ut&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(n/=mt),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(n*=40)),0===n)return!1;this.lastDelta_=n;const r=Date.now();void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(n)<4?"trackpad":"wheel");const s=e.getView();if("trackpad"===this.mode_&&!s.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(s.getAnimating()&&s.cancelAnimations(),s.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),s.adjustZoom(-n/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=r,!1;this.totalDelta_+=n;const o=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,e),o),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let i=-ii(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),na(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}class Ga extends sa{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=f),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==t.threshold?t.threshold:.3,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){let e=0;const i=this.targetPointers[0],n=this.targetPointers[1],r=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){const t=r-this.lastAngle_;this.rotationDelta_+=t,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=t}this.lastAngle_=r;const s=t.map,o=s.getView();if(o.getConstraints().rotation===Go)return;const a=s.getViewport().getBoundingClientRect(),l=oa(this.targetPointers);l[0]-=a.left,l[1]-=a.top,this.anchor_=s.getCoordinateFromPixelInternal(l),this.rotating_&&(s.render(),o.adjustRotationInternal(e,this.anchor_))}handleUpEvent(t){if(this.targetPointers.length<2){return t.map.getView().endInteraction(this.duration_),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}class ja extends sa{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=f),super(e),this.anchor_=null,this.duration_=void 0!==t.duration?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const i=this.targetPointers[0],n=this.targetPointers[1],r=i.clientX-n.clientX,s=i.clientY-n.clientY,o=Math.sqrt(r*r+s*s);void 0!==this.lastDistance_&&(e=this.lastDistance_/o),this.lastDistance_=o;const a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e);const h=a.getViewport().getBoundingClientRect(),c=oa(this.targetPointers);c[0]-=h.left,c[1]-=h.top,this.anchor_=a.getCoordinateFromPixelInternal(c),a.render(),l.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}function Ba(t){t=t||{};const e=new q,i=new Wr(-.005,.05,100);(void 0===t.altShiftDragRotate||t.altShiftDragRotate)&&e.push(new wa);(void 0===t.doubleClickZoom||t.doubleClickZoom)&&e.push(new ra({delta:t.zoomDelta,duration:t.zoomDuration}));(void 0===t.dragPan||t.dragPan)&&e.push(new Sa({onFocusOnly:t.onFocusOnly,kinetic:i}));(void 0===t.pinchRotate||t.pinchRotate)&&e.push(new Ga);(void 0===t.pinchZoom||t.pinchZoom)&&e.push(new ja({duration:t.zoomDuration}));(void 0===t.keyboard||t.keyboard)&&(e.push(new Na),e.push(new Da({delta:t.zoomDelta,duration:t.zoomDuration})));(void 0===t.mouseWheelZoom||t.mouseWheelZoom)&&e.push(new ka({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration}));return(void 0===t.shiftDragZoom||t.shiftDragZoom)&&e.push(new La({duration:t.zoomDuration})),e}function Ua(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]+2*e,i[1]=t[1]+2*e,i}function za(t){return t[0]>0&&t[1]>0}function Xa(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]*e+.5|0,i[1]=t[1]*e+.5|0,i}function Va(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}function Wa(t){t instanceof vs?t.setMapInternal(null):t instanceof ro&&t.getLayers().forEach(Wa)}function Za(t,e){if(t instanceof vs)t.setMapInternal(e);else if(t instanceof ro){const i=t.getLayers().getArray();for(let t=0,n=i.length;t=0;i--){const n=e[i];if(n.getMap()!==this||!n.getActive()||!this.getTargetElement())continue;if(!n.handleEvent(t)||t.propagationStopped)break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let i=this.maxTilesLoading_,n=i;if(t){const e=t.viewHints;if(e[Ro]||e[Po]){const e=Date.now()-t.time>8;i=e?0:8,n=e?0:2}}e.getTilesLoading(){this.postRenderTimeoutHandle_=void 0,this.handlePostRender()}),0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new io("removelayer",e)),this.set(xo,t)}setSize(t){this.set(vo,t)}setTarget(t){this.set(So,t)}setView(t){if(!t||t instanceof zo)return void this.set(wo,t);this.set(wo,new zo);const e=this;t.then((function(t){e.setView(new zo(t))}))}updateSize(){const t=this.getTargetElement();let e;if(t){const i=getComputedStyle(t),n=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),r=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);isNaN(n)||isNaN(r)||(e=[n,r],!za(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0."))}this.setSize(e),this.updateViewportSize_()}updateViewportSize_(){const t=this.getView();if(t){let e;const i=getComputedStyle(this.viewport_);i.width&&i.height&&(e=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(e)}}}const Ka="element",qa="map",Ha="offset",$a="position",Ja="positioning";class Qa extends V{constructor(t){super(),this.on,this.once,this.un,this.options=t,this.id=t.id,this.insertFirst=void 0===t.insertFirst||t.insertFirst,this.stopEvent=void 0===t.stopEvent||t.stopEvent,this.element=document.createElement("div"),this.element.className=void 0!==t.className?t.className:"ol-overlay-container ol-selectable",this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=!0===t.autoPan?{}:t.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(Ka,this.handleElementChanged),this.addChangeListener(qa,this.handleMapChanged),this.addChangeListener(Ha,this.handleOffsetChanged),this.addChangeListener($a,this.handlePositionChanged),this.addChangeListener(Ja,this.handlePositioningChanged),void 0!==t.element&&this.setElement(t.element),this.setOffset(void 0!==t.offset?t.offset:[0,0]),this.setPositioning(t.positioning||"top-left"),void 0!==t.position&&this.setPosition(t.position)}getElement(){return this.get(Ka)}getId(){return this.id}getMap(){return this.get(qa)||null}getOffset(){return this.get(Ha)}getPosition(){return this.get($a)}getPositioning(){return this.get(Ja)}handleElementChanged(){zr(this.element);const t=this.getElement();t&&this.element.appendChild(t)}handleMapChanged(){this.mapPostrenderListenerKey&&(Ur(this.element),k(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const t=this.getMap();if(t){this.mapPostrenderListenerKey=N(t,fo,this.render,this),this.updatePixelPosition();const e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(t){this.set(Ka,t)}setMap(t){this.set(qa,t)}setOffset(t){this.set(Ha,t)}setPosition(t){this.set($a,t)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(t){const e=this.getMap();if(!e||!e.getTargetElement()||!this.get($a))return;const i=this.getRect(e.getTargetElement(),e.getSize()),n=this.getElement(),r=this.getRect(n,[Gr(n),jr(n)]),s=void 0===(t=t||{}).margin?20:t.margin;if(!Yt(i,r)){const n=r[0]-i[0],o=i[2]-r[2],a=r[1]-i[1],l=i[3]-r[3],h=[0,0];if(n<0?h[0]=n-s:o<0&&(h[0]=Math.abs(o)+s),a<0?h[1]=a-s:l<0&&(h[1]=Math.abs(l)+s),0!==h[0]||0!==h[1]){const i=e.getView().getCenterInternal(),n=e.getPixelFromCoordinateInternal(i);if(!n)return;const r=[n[0]+h[0],n[1]+h[1]],s=t.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(r),duration:s.duration,easing:s.easing})}}}getRect(t,e){const i=t.getBoundingClientRect(),n=i.left+window.pageXOffset,r=i.top+window.pageYOffset;return[n,r,n+e[0],r+e[1]]}setPositioning(t){this.set(Ja,t)}setVisible(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)}updatePixelPosition(){const t=this.getMap(),e=this.getPosition();if(!t||!t.isRendered()||!e)return void this.setVisible(!1);const i=t.getPixelFromCoordinate(e),n=t.getSize();this.updateRenderedPosition(i,n)}updateRenderedPosition(t,e){const i=this.element.style,n=this.getOffset(),r=this.getPositioning();this.setVisible(!0);let s="0%",o="0%";"bottom-right"==r||"center-right"==r||"top-right"==r?s="-100%":"bottom-center"!=r&&"center-center"!=r&&"top-center"!=r||(s="-50%"),"bottom-left"==r||"bottom-center"==r||"bottom-right"==r?o="-100%":"center-left"!=r&&"center-center"!=r&&"center-right"!=r||(o="-50%");const a=`translate(${s}, ${o}) translate(${Math.round(t[0]+n[0])+"px"}, ${Math.round(t[1]+n[1])+"px"})`;this.rendered.transform_!=a&&(this.rendered.transform_=a,i.transform=a)}getOptions(){return this.options}}class tl{constructor(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const i=this.entries_[t];return at(void 0!==i,15),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(t){const e=this.entries_[t];return at(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.key_;return t}getValues(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){if(this.containsKey(t))return this.entries_[t].value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){at(!(t in this.entries_),16);const i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_}setSize(t){this.highWaterMark=t}}function el(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function il(t,e,i){return t+"/"+e+"/"+i}function nl(t){return il(t[0],t[1],t[2])}function rl(t){const[e,i,n]=t.substring(t.lastIndexOf("/")+1,t.length).split(",").map(Number);return il(e,i,n)}function sl(t){return t.split("/").map(Number)}function ol(t){return(t[1]<i||i>e.getMaxZoom())return!1;const s=e.getFullTileRange(i);return!s||s.containsXY(n,r)}class ll extends tl{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}}pruneExceptNewestZ(){if(0===this.getCount())return;const t=sl(this.peekFirstKey())[0];this.forEach(function(e){e.tileCoord[0]!==t&&(this.remove(nl(e.tileCoord)),e.release())}.bind(this))}}class hl{constructor(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function cl(t,e,i,n,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=i,r.maxY=n,r):new hl(t,e,i,n)}const ul=[];class dl extends st{constructor(t,e,i,n){super(t,e,{transition:0}),this.context_={},this.executorGroups={},this.declutterExecutorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=n.bind(void 0,this),this.wrappedTileCoord=i}getContext(t){const e=z(t);return e in this.context_||(this.context_[e]=Dr(1,1,ul)),this.context_[e]}hasContext(t){return z(t)in this.context_}getImage(t){return this.hasContext(t)?this.getContext(t).canvas:null}getReplayState(t){const e=z(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]}load(){this.getSourceTiles()}release(){for(const t in this.context_){const e=this.context_[t];kr(e),ul.push(e.canvas),delete this.context_[t]}super.release()}}class gl extends st{constructor(t,e,i,n,r,s){super(t,e,s),this.extent=null,this.format_=n,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=r,this.url_=i,this.key=i}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==H&&(this.setState($),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(t,e){this.setFeatures(t)}onError(){this.setState(Q)}setFeatures(t){this.features_=t,this.setState(J)}setLoader(t){this.loader_=t}}function fl(t){return Array.isArray(t)?Qr(t):t}let pl,ml=!1;function _l(t,e,i,n,r,s,o){const a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(i,n,r):t,!0),"arraybuffer"==e.getType()&&(a.responseType="arraybuffer"),a.withCredentials=ml,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){const t=e.getType();let n;"json"==t||"text"==t?n=a.responseText:"xml"==t?(n=a.responseXML,n||(n=(new DOMParser).parseFromString(a.responseText,"application/xml"))):"arraybuffer"==t&&(n=a.response),n?s(e.readFeatures(n,{extent:i,featureProjection:r}),e.readProjection(n)):o()}else o()},a.onerror=o,a.send()}function yl(t,e){return function(i,n,r,s,o){const a=this;_l(t,e,i,n,r,(function(t,e){a.addFeatures(t),void 0!==s&&s(t)}),o||p)}}function xl(t,e){return[[-1/0,-1/0,1/0,1/0]]}function vl(t,e,i,n){const r=document.createElement("script"),s="olc_"+z(e);function o(){delete window[s],r.parentNode.removeChild(r)}r.async=!0,r.src=t+(t.includes("?")?"&":"?")+(n||"callback")+"="+s;const a=setTimeout((function(){o(),i&&i()}),1e4);window[s]=function(t){clearTimeout(a),o(),e(t)},document.head.appendChild(r)}class Sl extends Error{constructor(t){super("Unexpected response status: "+t.status),this.name="ResponseError",this.response=t}}class wl extends Error{constructor(t){super("Failed to issue request"),this.name="ClientError",this.client=t}}function El(t){return new Promise((function(e,i){const n=new XMLHttpRequest;n.addEventListener("load",(function(t){const n=t.target;if(!n.status||n.status>=200&&n.status<300){let t;try{t=JSON.parse(n.responseText)}catch(t){const e="Error parsing response text as JSON: "+t.message;return void i(new Error(e))}e(t)}else i(new Sl(n))})),n.addEventListener("error",(function(t){i(new wl(t.target))})),n.open("GET",t),n.setRequestHeader("Accept","application/json"),n.send()}))}function Tl(t,e){return e.includes("://")?e:new URL(e,t).href}class Cl{drawCustom(t,e,i,n){}drawGeometry(t){}setStyle(t){}drawCircle(t,e){}drawFeature(t,e){}drawGeometryCollection(t,e){}drawLineString(t,e){}drawMultiLineString(t,e){}drawMultiPoint(t,e){}drawMultiPolygon(t,e){}drawPoint(t,e){}drawPolygon(t,e){}drawText(t,e){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}class bl extends Cl{constructor(t,e,i,n,r,s,o){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=n,this.viewRotation_=r,this.squaredTolerance_=s,this.userTransform_=o,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=[1,0,0,1,0,0]}drawImages_(t,e,i,n){if(!this.image_)return;const r=un(t,e,i,n,this.transform_,this.pixelCoordinates_),s=this.context_,o=this.tmpLocalTransform_,a=s.globalAlpha;1!=this.imageOpacity_&&(s.globalAlpha=a*this.imageOpacity_);let l=this.imageRotation_;this.imageRotateWithView_&&(l+=this.viewRotation_);for(let t=0,e=r.length;tt*this.pixelRatio_)),lineDashOffset:(r||0)*this.pixelRatio_,lineJoin:void 0!==s?s:Gs,lineWidth:(void 0!==o?o:1)*this.pixelRatio_,miterLimit:void 0!==a?a:js,strokeStyle:fl(t||Bs)}}else this.strokeState_=null}setImageStyle(t){let e;if(!t||!(e=t.getSize()))return void(this.image_=null);const i=t.getPixelRatio(this.pixelRatio_),n=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*i,this.imageAnchorY_=n[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const s=t.getScaleArray();this.imageScale_=[s[0]*this.pixelRatio_/i,s[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(t){const e=t.getFill();if(e){const t=e.getColor();this.textFillState_={fillStyle:fl(t||Ns)}}else this.textFillState_=null;const i=t.getStroke();if(i){const t=i.getColor(),e=i.getLineCap(),n=i.getLineDash(),r=i.getLineDashOffset(),s=i.getLineJoin(),o=i.getWidth(),a=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==e?e:Ds,lineDash:n||ks,lineDashOffset:r||0,lineJoin:void 0!==s?s:Gs,lineWidth:void 0!==o?o:1,miterLimit:void 0!==a?a:js,strokeStyle:fl(t||Bs)}}else this.textStrokeState_=null;const n=t.getFont(),r=t.getOffsetX(),s=t.getOffsetY(),o=t.getRotateWithView(),a=t.getRotation(),l=t.getScaleArray(),h=t.getText(),c=t.getTextAlign(),u=t.getTextBaseline();this.textState_={font:void 0!==n?n:Os,textAlign:void 0!==c?c:Us,textBaseline:void 0!==u?u:zs},this.text_=void 0!==h?Array.isArray(h)?h.reduce(((t,e,i)=>t+(i%2?" ":e)),""):h:"",this.textOffsetX_=void 0!==r?this.pixelRatio_*r:0,this.textOffsetY_=void 0!==s?this.pixelRatio_*s:0,this.textRotateWithView_=void 0!==o&&o,this.textRotation_=void 0!==a?a:0,this.textScale_=[this.pixelRatio_*l[0],this.pixelRatio_*l[1]]}else this.text_=""}}const Rl={Point:function(t,e,i,n,r){const s=i.getImage(),o=i.getText();let a;if(s){if(s.getImageState()!=Lr)return;let l=t;if(r){const h=s.getDeclutterMode();if("none"!==h)if(l=r,"obstacle"===h){const r=t.getBuilder(i.getZIndex(),"Image");r.setImageStyle(s,a),r.drawPoint(e,n)}else o&&o.getText()&&(a={})}const h=l.getBuilder(i.getZIndex(),"Image");h.setImageStyle(s,a),h.drawPoint(e,n)}if(o&&o.getText()){let s=t;r&&(s=r);const l=s.getBuilder(i.getZIndex(),"Text");l.setTextStyle(o,a),l.drawText(e,n)}},LineString:function(t,e,i,n,r){const s=i.getStroke();if(s){const r=t.getBuilder(i.getZIndex(),"LineString");r.setFillStrokeStyle(null,s),r.drawLineString(e,n)}const o=i.getText();if(o&&o.getText()){const s=(r||t).getBuilder(i.getZIndex(),"Text");s.setTextStyle(o),s.drawText(e,n)}},Polygon:function(t,e,i,n,r){const s=i.getFill(),o=i.getStroke();if(s||o){const r=t.getBuilder(i.getZIndex(),"Polygon");r.setFillStrokeStyle(s,o),r.drawPolygon(e,n)}const a=i.getText();if(a&&a.getText()){const s=(r||t).getBuilder(i.getZIndex(),"Text");s.setTextStyle(a),s.drawText(e,n)}},MultiPoint:function(t,e,i,n,r){const s=i.getImage(),o=i.getText();let a;if(s){if(s.getImageState()!=Lr)return;let l=t;if(r){const h=s.getDeclutterMode();if("none"!==h)if(l=r,"obstacle"===h){const r=t.getBuilder(i.getZIndex(),"Image");r.setImageStyle(s,a),r.drawMultiPoint(e,n)}else o&&o.getText()&&(a={})}const h=l.getBuilder(i.getZIndex(),"Image");h.setImageStyle(s,a),h.drawMultiPoint(e,n)}if(o&&o.getText()){let s=t;r&&(s=r);const l=s.getBuilder(i.getZIndex(),"Text");l.setTextStyle(o,a),l.drawText(e,n)}},MultiLineString:function(t,e,i,n,r){const s=i.getStroke();if(s){const r=t.getBuilder(i.getZIndex(),"LineString");r.setFillStrokeStyle(null,s),r.drawMultiLineString(e,n)}const o=i.getText();if(o&&o.getText()){const s=(r||t).getBuilder(i.getZIndex(),"Text");s.setTextStyle(o),s.drawText(e,n)}},MultiPolygon:function(t,e,i,n,r){const s=i.getFill(),o=i.getStroke();if(o||s){const r=t.getBuilder(i.getZIndex(),"Polygon");r.setFillStrokeStyle(s,o),r.drawMultiPolygon(e,n)}const a=i.getText();if(a&&a.getText()){const s=(r||t).getBuilder(i.getZIndex(),"Text");s.setTextStyle(a),s.drawText(e,n)}},GeometryCollection:function(t,e,i,n,r){const s=e.getGeometriesArray();let o,a;for(o=0,a=s.length;o2||Math.abs(t[4*e+3]-191.25)>2}function Gl(t,e,i,n){const r=$i(i,e,t);let s=zi(e,n,i);const o=e.getMetersPerUnit();void 0!==o&&(s*=o);const a=t.getMetersPerUnit();void 0!==a&&(s/=a);const l=t.getExtent();if(!l||Zt(l,r)){const e=zi(t,s,r)/s;isFinite(e)&&e>0&&(s/=e)}return s}function jl(t,e,i,n){const r=ge(i);let s=Gl(t,e,r,n);return(!isFinite(s)||s<=0)&&he(i,(function(i){return s=Gl(t,e,i,n),isFinite(s)&&s>0})),s}function Bl(t,e,i,n,r,s,o,a,l,h,c,u){const d=Dr(Math.round(i*t),Math.round(i*e),Nl);if(u||(d.imageSmoothingEnabled=!1),0===l.length)return d.canvas;function g(t){return Math.round(t*i)/i}d.scale(i,i),d.globalCompositeOperation="lighter";const f=[1/0,1/0,-1/0,-1/0];l.forEach((function(t,e,i){ne(f,t.extent)}));const p=Se(f),m=_e(f),_=Dr(Math.round(i*p/n),Math.round(i*m/n));u||(_.imageSmoothingEnabled=!1);const y=i/n;l.forEach((function(t,e,i){const n=t.extent[0]-f[0],r=-(t.extent[3]-f[3]),s=Se(t.extent),o=_e(t.extent);t.image.width>0&&t.image.height>0&&_.drawImage(t.image,h,h,t.image.width-2*h,t.image.height-2*h,n*y,r*y,s*y,o*y)}));const x=xe(o);return a.getTriangles().forEach((function(t,e,r){const o=t.source,a=t.target;let l=o[0][0],h=o[0][1],c=o[1][0],p=o[1][1],m=o[2][0],y=o[2][1];const v=g((a[0][0]-x[0])/s),S=g(-(a[0][1]-x[1])/s),w=g((a[1][0]-x[0])/s),E=g(-(a[1][1]-x[1])/s),T=g((a[2][0]-x[0])/s),C=g(-(a[2][1]-x[1])/s),b=l,R=h;l=0,h=0,c-=b,p-=R,m-=b,y-=R;const P=si([[c,p,0,0,w-v],[m,y,0,0,T-v],[0,0,c,p,E-S],[0,0,m,y,C-S]]);if(P){if(d.save(),d.beginPath(),function(){if(void 0===Ol){const t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Dl(t,4,5,4,0),Dl(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;Ol=kl(e,0)||kl(e,4)||kl(e,8)}return Ol}()||!u){d.moveTo(w,E);const t=4,e=v-w,i=S-E;for(let n=0;nthis.sourceWorldWidth_/2){const i=[[e.source[0][0],e.source[0][1]],[e.source[1][0],e.source[1][1]],[e.source[2][0],e.source[2][1]]];i[0][0]-t>this.sourceWorldWidth_/2&&(i[0][0]-=this.sourceWorldWidth_),i[1][0]-t>this.sourceWorldWidth_/2&&(i[1][0]-=this.sourceWorldWidth_),i[2][0]-t>this.sourceWorldWidth_/2&&(i[2][0]-=this.sourceWorldWidth_);const n=Math.min(i[0][0],i[1][0],i[2][0]);Math.max(i[0][0],i[1][0],i[2][0])-n.5&&c<1;let g=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){g=Se(zt([t,e,i,n]))/this.targetWorldWidth_>.25||g}!d&&this.sourceProj_.isGlobal()&&c&&(g=c>.25||g)}if(!g&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3])&&!we(h,this.maxSourceExtent_))return;let f=0;if(!(g||isFinite(r[0])&&isFinite(r[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(a[0])&&isFinite(a[1])))if(l>0)g=!0;else if(f=(isFinite(r[0])&&isFinite(r[1])?0:8)+(isFinite(s[0])&&isFinite(s[1])?0:4)+(isFinite(o[0])&&isFinite(o[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1),1!=f&&2!=f&&4!=f&&8!=f)return;if(l>0){if(!g){const e=[(t[0]+i[0])/2,(t[1]+i[1])/2],n=this.transformInv_(e);let s;if(d){s=(li(r[0],u)+li(o[0],u))/2-li(n[0],u)}else s=(r[0]+o[0])/2-n[0];const a=(r[1]+o[1])/2-n[1];g=s*s+a*a>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const h=[(e[0]+i[0])/2,(e[1]+i[1])/2],c=this.transformInv_(h),u=[(n[0]+t[0])/2,(n[1]+t[1])/2],d=this.transformInv_(u);this.addQuad_(t,e,h,u,r,s,c,d,l-1),this.addQuad_(u,h,i,n,d,c,o,a,l-1)}else{const h=[(t[0]+e[0])/2,(t[1]+e[1])/2],c=this.transformInv_(h),u=[(i[0]+n[0])/2,(i[1]+n[1])/2],d=this.transformInv_(u);this.addQuad_(t,h,u,n,r,c,d,a,l-1),this.addQuad_(h,e,i,u,c,s,o,d,l-1)}return}}if(d){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&f)&&this.addTriangle_(t,i,n,r,o,a),0==(14&f)&&this.addTriangle_(t,i,e,r,o,s),f&&(0==(13&f)&&this.addTriangle_(e,n,t,s,a,r),0==(7&f)&&this.addTriangle_(e,n,i,s,a,o))}calculateSourceExtent(){const t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(e,i,n){const r=e.source;re(t,r[0]),re(t,r[1]),re(t,r[2])})),t}getTriangles(){return this.triangles_}}class zl extends st{constructor(t,e,i,n,r,s,o,a,l,h,c,u){super(r,H,{interpolate:!!u}),this.renderEdges_=void 0!==c&&c,this.pixelRatio_=o,this.gutter_=a,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=n,this.wrappedTileCoord_=s||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const d=n.getTileCoordExtent(this.wrappedTileCoord_),g=this.targetTileGrid_.getExtent();let f=this.sourceTileGrid_.getExtent();const p=g?ye(d,g):d;if(0===ce(p))return void(this.state=tt);const m=t.getExtent();m&&(f=f?ye(f,m):m);const _=n.getResolution(this.wrappedTileCoord_[0]),y=jl(t,i,p,_);if(!isFinite(y)||y<=0)return void(this.state=tt);const x=void 0!==h?h:.5;if(this.triangulation_=new Ul(t,i,p,f,y*x,_),0===this.triangulation_.getTriangles().length)return void(this.state=tt);this.sourceZ_=e.getZForResolution(y);let v=this.triangulation_.calculateSourceExtent();if(f&&(t.canWrapX()?(v[1]=ii(v[1],f[1],f[3]),v[3]=ii(v[3],f[1],f[3])):v=ye(v,f)),ce(v)){const t=e.getTileRangeForExtentAndZ(v,this.sourceZ_);for(let e=t.minX;e<=t.maxX;e++)for(let i=t.minY;i<=t.maxY;i++){const t=l(this.sourceZ_,e,i,o);t&&this.sourceTiles_.push(t)}0===this.sourceTiles_.length&&(this.state=tt)}else this.state=tt}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(function(e,i,n){e&&e.getState()==J&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=Q;else{const e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],r="number"==typeof i?i:i[1],s=this.targetTileGrid_.getResolution(e),o=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Bl(n,r,this.pixelRatio_,o,this.sourceTileGrid_.getExtent(),s,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=J}this.changed()}load(){if(this.state==H){this.state=$,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,i,n){const r=e.getState();if(r==H||r==$){t++;const i=N(e,S,(function(n){const r=e.getState();r!=J&&r!=Q&&r!=tt||(k(i),t--,0===t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(i)}}.bind(this)),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,i){t.getState()==H&&t.load()}))}}unlistenSources_(){this.sourcesListenerKeys_.forEach(k),this.sourcesListenerKeys_=null}release(){this.canvas_&&(kr(this.canvas_.getContext("2d")),Nl.push(this.canvas_),this.canvas_=null),super.release()}}var Xl="tileloadstart",Vl="tileloadend",Wl="tileloaderror";class Zl extends V{constructor(t){super(),this.projection=Ui(t.projection),this.attributions_=Yl(t.attributions),this.attributionsCollapsible_=void 0===t.attributionsCollapsible||t.attributionsCollapsible,this.loading=!1,this.state_=void 0!==t.state?t.state:"ready",this.wrapX_=void 0!==t.wrapX&&t.wrapX,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise((function(t,i){e.viewResolver=t,e.viewRejector=i}))}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(){return B()}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=Yl(t),this.changed()}setState(t){this.state_=t,this.changed()}}function Yl(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}const Kl=[0,0,0];class ql{constructor(t){let e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,at(d(this.resolutions_,(function(t,e){return e-t}),!0),17),!t.origins)for(let t=0,i=this.resolutions_.length-1;t=this.minZoom;){if(2===this.zoomFactor_?(s=Math.floor(s/2),o=Math.floor(o/2),r=cl(s,s,o,o,i)):r=this.getTileRangeForExtentAndZ(a,l,i),e(l,r))return!0;--l}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,i){if(t[0]this.maxZoom||e0?n:Math.max(s/i[0],r/i[1]);const o=e+1,a=new Array(o);for(let t=0;ti.highWaterMark&&(i.highWaterMark=t)}useTile(t,e,i,n){}}class rh extends i{constructor(t,e){super(t),this.tile=e}}function sh(t,e){const i=/\{z\}/g,n=/\{x\}/g,r=/\{y\}/g,s=/\{-y\}/g;return function(o,a,l){return o?t.replace(i,o[0].toString()).replace(n,o[1].toString()).replace(r,o[2].toString()).replace(s,(function(){const t=o[0],i=e.getFullTileRange(t);at(i,55);return(i.getHeight()-o[2]-1).toString()})):void 0}}function oh(t,e){const i=t.length,n=new Array(i);for(let r=0;r>=1;return i.join("")}class fh extends uh{constructor(t){const e=void 0!==(t=t||{}).projection?t.projection:"EPSG:3857",i=void 0!==t.tileGrid?t.tileGrid:Ql({extent:ih(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=void 0!==t.gutter?t.gutter:0}getGutter(){return this.gutter_}}function ph(t,e,i,n,r){mh(t,e,i||0,n||t.length-1,r||yh)}function mh(t,e,i,n,r){for(;n>i;){if(n-i>600){var s=n-i+1,o=e-i+1,a=Math.log(s),l=.5*Math.exp(2*a/3),h=.5*Math.sqrt(a*l*(s-l)/s)*(o-s/2<0?-1:1);mh(t,e,Math.max(i,Math.floor(e-o*l/s+h)),Math.min(n,Math.floor(e+(s-o)*l/s+h)),r)}var c=t[e],u=i,d=n;for(_h(t,i,e),r(t[n],c)>0&&_h(t,i,n);u0;)d--}0===r(t[i],c)?_h(t,i,d):_h(t,++d,n),d<=e&&(i=d+1),e<=d&&(n=d-1)}}function _h(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function yh(t,e){return te?1:0}class xh{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const i=[];if(!Lh(t,e))return i;const n=this.toBBox,r=[];for(;e;){for(let s=0;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)}_split(t,e){const i=t[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);const s=this._chooseSplitIndex(i,r,n),o=Mh(i.children.splice(s,i.children.length-s));o.height=i.height,o.leaf=i.leaf,Sh(i,this.toBBox),Sh(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)}_splitRoot(t,e){this.data=Mh([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Sh(this.data,this.toBBox)}_chooseSplitIndex(t,e,i){let n,r=1/0,s=1/0;for(let o=e;o<=i-e;o++){const e=wh(t,0,o,this.toBBox),a=wh(t,o,i,this.toBBox),l=Ph(e,a),h=bh(e)+bh(a);l=e;n--){const e=t.children[n];Eh(o,t.leaf?r(e):e),a+=Rh(o)}return a}_adjustParentBBoxes(t,e,i){for(let n=i;n>=0;n--)Eh(e[n],t)}_condense(t){for(let e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children,e.splice(e.indexOf(t[i]),1)):this.clear():Sh(t[i],this.toBBox)}}function vh(t,e,i){if(!i)return e.indexOf(t);for(let n=0;n=t.minX&&e.maxY>=t.minY}function Mh(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Fh(t,e,i,n,r){const s=[e,i];for(;s.length;){if((i=s.pop())-(e=s.pop())<=n)continue;const o=e+Math.ceil((i-e)/n/2)*n;ph(t,o,e,i,r),s.push(e,o,o,i)}}class Ah{constructor(t){this.rbush_=new xh(t),this.items_={}}insert(t,e){const i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[z(e)]=i}load(t,e){const i=new Array(e.length);for(let n=0,r=e.length;nthis.featuresRtree_.getInExtent(t))))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],n=t[1];let r=null;const s=[NaN,NaN];let o=1/0;const a=[-1/0,-1/0,1/0,1/0];return e=e||g,this.featuresRtree_.forEachInExtent(a,(function(t){if(e(t)){const e=t.getGeometry(),l=o;if(o=e.closestPointXY(i,n,s,o),o0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let i;e.forEachInExtent(t,(function(e){if(ee(e.extent,t))return i=e,!0})),i&&e.remove(i)}removeFeature(t){if(!t)return;const e=z(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t);this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=z(t),i=this.featureChangeKeys_[e];if(!i)return;i.forEach(k),delete this.featureChangeKeys_[e];const n=t.getId();return void 0!==n&&delete this.idIndex_[n.toString()],delete this.uidIndex_[e],this.dispatchEvent(new Uh(kh,t)),t}removeFromIdIndex_(t){let e=!1;for(const i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}return e}setLoader(t){this.loader_=t}setUrl(t){at(this.format_,7),this.url_=t,this.setLoader(yl(t,this.format_))}}class Xh extends nh{constructor(t){const e=void 0===t.projection?"EPSG:3857":t.projection;let i=t.tileGrid;void 0===i&&e&&(i=Ql({extent:ih(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize})),super({cacheSize:.1,attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:e,tileGrid:i,opaque:t.opaque,state:t.state,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate}),this.gutter_=void 0!==t.gutter?t.gutter:0,this.tileSize_=t.tileSize?Va(t.tileSize):null,this.tileSizes_=null,this.tileLoadingKeys_={},this.loader_=t.loader,this.handleTileChange_=this.handleTileChange_.bind(this),this.bandCount=void 0===t.bandCount?4:t.bandCount}setTileSizes(t){this.tileSizes_=t}getTileSize(t){if(this.tileSizes_)return this.tileSizes_[t];if(this.tileSize_)return this.tileSize_;const e=this.getTileGrid();return e?Va(e.getTileSize(t)):[256,256]}getGutterForProjection(t){return this.gutter_}setLoader(t){this.loader_=t}getTile(t,e,i,n,r){const s=this.getTileSize(t),o=il(t,e,i);if(this.tileCache.containsKey(o))return this.tileCache.get(o);const a=this.loader_;const l=Object.assign({tileCoord:[t,e,i],loader:function(){return _((function(){return a(t,e,i)}))},size:s},this.tileOptions),h=new ot(l);return h.key=this.getKey(),h.addEventListener(S,this.handleTileChange_),this.tileCache.set(o,h),h}handleTileChange_(t){const e=t.target,i=z(e),n=e.getState();let r;n==$?(this.tileLoadingKeys_[i]=!0,r=Xl):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],r=n==Q?Wl:n==J?Vl:void 0),r&&this.dispatchEvent(new rh(r,e))}}function Vh(t,e){if(!t)return!1;if(!0===t)return!0;if(3!==e.getSamplesPerPixel())return!1;const i=e.fileDirectory.PhotometricInterpretation,n=GeoTIFF.globals.photometricInterpretations;return i===n.CMYK||i===n.YCbCr||i===n.CIELab||i===n.ICCLab}const Wh="STATISTICS_MAXIMUM",Zh="STATISTICS_MINIMUM";let Yh;function Kh(t){try{return t.getBoundingBox()}catch(e){const i=t.fileDirectory;return[0,0,i.ImageWidth,i.ImageLength]}}function qh(t){try{return t.getOrigin().slice(0,2)}catch(e){return[0,t.fileDirectory.ImageLength]}}function Hh(t,e){try{return t.getResolution(e)}catch(i){return[e.fileDirectory.ImageWidth/t.fileDirectory.ImageWidth,e.fileDirectory.ImageHeight/t.fileDirectory.ImageHeight]}}function $h(t){const e=t.geoKeys;if(!e)return null;if(e.ProjectedCSTypeGeoKey){const t="EPSG:"+e.ProjectedCSTypeGeoKey;let i=Ui(t);if(!i){const n=Me(e.ProjLinearUnitsGeoKey);n&&(i=new Ae({code:t,units:n}))}return i}if(e.GeographicTypeGeoKey){const t="EPSG:"+e.GeographicTypeGeoKey;let i=Ui(t);if(!i){const n=Me(e.GeogAngularUnitsGeoKey);n&&(i=new Ae({code:t,units:n}))}return i}return null}function Jh(t){return t.getImageCount().then((function(e){const i=new Array(e);for(let n=0;ni*t)throw new Error(n)}function ec(t){return t instanceof Int8Array?127:t instanceof Uint8Array||t instanceof Uint8ClampedArray?255:t instanceof Int16Array?32767:t instanceof Uint16Array?65535:t instanceof Int32Array?2147483647:t instanceof Uint32Array?4294967295:t instanceof Float32Array?34e37:255}class ic extends Xh{constructor(t){super({state:"loading",tileGrid:null,projection:null,opaque:t.opaque,transition:t.transition,interpolate:!1!==t.interpolate,wrapX:t.wrapX}),this.sourceInfo_=t.sources;const e=this.sourceInfo_.length;this.sourceOptions_=t.sourceOptions,this.sourceImagery_=new Array(e),this.sourceMasks_=new Array(e),this.resolutionFactors_=new Array(e),this.samplesPerPixel_,this.nodataValues_,this.metadata_,this.normalize_=!1!==t.normalize,this.addAlpha_=!1,this.error_=null,this.convertToRGB_=t.convertToRGB||!1,this.setKey(this.sourceInfo_.map((t=>t.url)).join(","));const i=this,n=new Array(e);for(let t=0;t{4==(4&(t.fileDirectory.NewSubfileType||0))?d.push(t):c.push(t)}));const g=c.length;if(d.length>0&&d.length!==g)throw new Error(`Expected one mask per image found ${d.length} masks and ${g} images`);let f,p;const m=new Array(g),_=new Array(g),y=new Array(g);a[u]=new Array(g),l[u]=new Array(g);for(let t=0;ty.length&&(h=s.length-y.length);const t=s[s.length-1]/y[y.length-1];this.resolutionFactors_[u]=t;const e=y.map((e=>e*t)),i=`Resolution mismatch for source ${u}, got [${e}] but expected [${s}]`;tc(s.slice(h,s.length),e,.02,i,this.viewRejector)}else s=y,this.resolutionFactors_[u]=1;n?tc(n.slice(h,n.length),_,.01,`Tile size mismatch for source ${u}`,this.viewRejector):n=_,r?tc(r.slice(h,r.length),m,0,`Tile size mismatch for source ${u}`,this.viewRejector):r=m,this.sourceImagery_[u]=c.reverse(),this.sourceMasks_[u]=d.reverse()}for(let t=0,e=this.sourceImagery_.length;t=0;--t){const i=$h(e[t]);if(i){this.projection=i;break}}}this.samplesPerPixel_=o,this.nodataValues_=a,this.metadata_=l;t:for(let t=0;t1,n=i&&t.imageInfo.profile[1].supports?t.imageInfo.profile[1].supports:[],r=i&&t.imageInfo.profile[1].formats?t.imageInfo.profile[1].formats:[],s=i&&t.imageInfo.profile[1].qualities?t.imageInfo.profile[1].qualities:[];return{url:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return void 0===t.height?t.width:t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:[...e.supports,...n],formats:[...e.formats,...r],qualities:[...e.qualities,...s]}},uc[oc]=function(t){const e=t.getComplianceLevelSupportedFeatures(),i=void 0===t.imageInfo.extraFormats?e.formats:[...e.formats,...t.imageInfo.extraFormats],n=void 0!==t.imageInfo.preferredFormats&&Array.isArray(t.imageInfo.preferredFormats)&&t.imageInfo.preferredFormats.length>0?t.imageInfo.preferredFormats.filter((function(t){return["jpg","png","gif"].includes(t)})).reduce((function(t,e){return void 0===t&&i.includes(e)?e:t}),void 0):void 0;return{url:t.imageInfo.id,sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:void 0===t.imageInfo.extraFeatures?e.supports:[...e.supports,...t.imageInfo.extraFeatures],formats:i,qualities:void 0===t.imageInfo.extraQualities?e.qualities:[...e.qualities,...t.imageInfo.extraQualities],preferredFormat:n}};function dc(t){return t.toLocaleString("en",{maximumFractionDigits:10})}class gc extends Rr{constructor(t,e,i,n,r,s,o){const a=t.getExtent(),l=e.getExtent(),h=l?ye(i,l):i,c=Gl(t,e,ge(h),n),u=new Ul(t,e,h,a,.5*c,n),d=s(u.calculateSourceExtent(),c,r),g=d?Pr:Fr,f=d?d.getPixelRatio():1;super(i,n,f,g),this.targetProj_=e,this.maxSourceExtent_=a,this.triangulation_=u,this.targetResolution_=n,this.targetExtent_=i,this.sourceImage_=d,this.sourcePixelRatio_=f,this.interpolate_=o,this.canvas_=null,this.sourceListenerKey_=null}disposeInternal(){this.state==Ir&&this.unlistenSource_(),super.disposeInternal()}getImage(){return this.canvas_}getProjection(){return this.targetProj_}reproject_(){const t=this.sourceImage_.getState();if(t==Lr){const t=Se(this.targetExtent_)/this.targetResolution_,e=_e(this.targetExtent_)/this.targetResolution_;this.canvas_=Bl(t,e,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_)}this.state=t,this.changed()}load(){if(this.state==Pr){this.state=Ir,this.changed();const t=this.sourceImage_.getState();t==Lr||t==Mr?this.reproject_():(this.sourceListenerKey_=N(this.sourceImage_,S,(function(t){const e=this.sourceImage_.getState();e!=Lr&&e!=Mr||(this.unlistenSource_(),this.reproject_())}),this),this.sourceImage_.load())}}unlistenSource_(){k(this.sourceListenerKey_),this.sourceListenerKey_=null}}const fc="imageloadstart",pc="imageloadend",mc="imageloaderror";class _c extends i{constructor(t,e){super(t),this.image=e}}class yc extends Zl{constructor(t){super({attributions:t.attributions,projection:t.projection,state:t.state,interpolate:void 0===t.interpolate||t.interpolate}),this.on,this.once,this.un,this.resolutions_=void 0!==t.resolutions?t.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0}getResolutions(){return this.resolutions_}findNearestResolution(t){if(this.resolutions_){const e=l(this.resolutions_,t,0);t=this.resolutions_[e]}return t}getImage(t,e,i,n){const r=this.getProjection();if(r&&n&&!Ki(r,n)){if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&Ki(this.reprojectedImage_.getProjection(),n)&&this.reprojectedImage_.getResolution()==e&&ee(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new gc(r,n,t,e,i,function(t,e,i){return this.getImageInternal(t,e,i,r)}.bind(this),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}return r&&(n=r),this.getImageInternal(t,e,i,n)}getImageInternal(t,e,i,n){return B()}handleImageChange(t){const e=t.target;let i;switch(e.getState()){case Ir:this.loading=!0,i=fc;break;case Lr:this.loading=!1,i=pc;break;case Mr:this.loading=!1,i=mc;break;default:return}this.hasListener(i)&&this.dispatchEvent(new _c(i,e))}}function xc(t,e){t.getImage().src=e}function vc(t,e){const i=[];Object.keys(e).forEach((function(t){null!==e[t]&&void 0!==e[t]&&i.push(t+"="+encodeURIComponent(e[t]))}));const n=i.join("&");return t=t.replace(/[?&]$/,""),(t+=t.includes("?")?"&":"?")+n}const Sc="1.3.0",wc=[101,101];const Ec='© OpenStreetMap contributors.';class Tc extends vs{constructor(t){super(t=t||{})}}class Cc extends G{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return B()}getData(t){return null}prepareFrame(t){return B()}renderFrame(t,e){return B()}loadedTileCallback(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i}createLoadedTileFinder(t,e,i){return function(n,r){const s=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,r,s)}.bind(this)}forEachFeatureAtCoordinate(t,e,i,n,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){t.target.getState()===Lr&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=Lr&&e!=Mr&&t.addEventListener(S,this.boundHandleImageChange_),e==Pr&&(t.load(),e=t.getState()),e==Lr}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const bc=[];let Rc=null;class Pc extends Cc{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=[1,0,0,1,0,0],this.pixelTransform=[1,0,0,1,0,0],this.inversePixelTransform=[1,0,0,1,0,0],this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,i){let n;Rc||function(){const t=document.createElement("canvas");t.width=1,t.height=1,Rc=t.getContext("2d")}(),Rc.clearRect(0,0,1,1);try{Rc.drawImage(t,e,i,1,1,0,0,1,1),n=Rc.getImageData(0,0,1,1).data}catch(t){return Rc=null,null}return n}getBackground(t){let e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0}useContainer(t,e,i){const n=this.getLayer().getClassName();let r,s;if(t&&t.className===n&&(!i||t&&t.style.backgroundColor&&u($r(t.style.backgroundColor),$r(i)))){const e=t.firstElementChild;e instanceof HTMLCanvasElement&&(s=e.getContext("2d"))}if(s&&s.canvas.style.transform===e?(this.container=t,this.context=s,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){r=document.createElement("div"),r.className=n;let t=r.style;t.position="absolute",t.width="100%",t.height="100%",s=Dr();const e=s.canvas;r.appendChild(e),t=e.style,t.position="absolute",t.left="0",t.transformOrigin="top left",this.container=r,this.context=s}this.containerReused||!i||this.container.style.backgroundColor||(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const n=xe(i),r=ve(i),s=de(i),o=ue(i);bt(e.coordinateToPixelTransform,n),bt(e.coordinateToPixelTransform,r),bt(e.coordinateToPixelTransform,s),bt(e.coordinateToPixelTransform,o);const a=this.inversePixelTransform;bt(a,n),bt(a,r),bt(a,s),bt(a,o),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.clip()}dispatchRenderEvent_(t,e,i){const n=this.getLayer();if(n.hasListener(t)){const r=new Ts(t,this.inversePixelTransform,i,e);n.dispatchEvent(r)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(ps,t,e)}postRender(t,e){this.dispatchRenderEvent_(ms,t,e)}getRenderTransform(t,e,i,n,r,s,o){const a=r/2,l=s/2,h=n/e,c=-h,u=-t[0]+o,d=-t[1];return Mt(this.tempTransform,a,l,h,c,-i,u,d)}disposeInternal(){delete this.frameState,super.disposeInternal()}}class Ic extends Pc{constructor(t){super(t),this.image_=null}getImage(){return this.image_?this.image_.getImage():null}prepareFrame(t){const e=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,n=t.viewState,r=n.resolution,s=this.getLayer().getSource(),o=t.viewHints;let a=t.extent;if(void 0!==e.extent&&(a=ye(a,on(e.extent,n.projection))),!o[Ro]&&!o[Po]&&!Ee(a))if(s){const t=n.projection,e=s.getImage(a,r,i,t);e&&(this.loadImage(e)?this.image_=e:e.getState()===Fr&&(this.image_=null))}else this.image_=null;return!!this.image_}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=bt(e.pixelToCoordinateTransform,t.slice()),r=i.getExtent();if(r&&!Zt(r,n))return null;const s=this.image_.getExtent(),o=this.image_.getImage(),a=Se(s),l=Math.floor(o.width*((n[0]-s[0])/a));if(l<0||l>=o.width)return null;const h=_e(s),c=Math.floor(o.height*((s[3]-n[1])/h));return c<0||c>=o.height?null:this.getImageData(o,l,c)}renderFrame(t,e){const i=this.image_,n=i.getExtent(),r=i.getResolution(),s=i.getPixelRatio(),o=t.layerStatesArray[t.layerIndex],a=t.pixelRatio,l=t.viewState,h=l.center,c=a*r/(l.resolution*s),u=t.extent,d=l.resolution,g=l.rotation,f=Math.round(Se(u)/d*a),p=Math.round(_e(u)/d*a);Mt(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/a,1/a,g,-f/2,-p/2),Ft(this.inversePixelTransform,this.pixelTransform);const m=Nt(this.pixelTransform);this.useContainer(e,m,this.getBackground(t));const _=this.context,y=_.canvas;y.width!=f||y.height!=p?(y.width=f,y.height=p):this.containerReused||_.clearRect(0,0,f,p);let x=!1,v=!0;if(o.extent){const e=on(o.extent,l.projection);v=we(e,t.extent),x=v&&!Yt(e,t.extent),x&&this.clipUnrotated(_,t,e)}const S=i.getImage(),w=Mt(this.tempTransform,f/2,p/2,c,c,0,s*(n[0]-h[0])/r,s*(h[1]-n[3])/r);this.renderedResolution=r*a/s;const E=S.width*w[0],T=S.height*w[3];if(this.getLayer().getSource().getInterpolate()||(_.imageSmoothingEnabled=!1),this.preRender(_,t),v&&E>=.5&&T>=.5){const t=w[4],e=w[5],i=o.opacity;let n;1!==i&&(n=_.globalAlpha,_.globalAlpha=i),_.drawImage(S,0,0,+S.width,+S.height,t,e,E,T),1!==i&&(_.globalAlpha=n)}return this.postRender(_,t),x&&_.restore(),_.imageSmoothingEnabled=!0,m!==y.style.transform&&(y.style.transform=m),this.container}}class Lc extends Tc{constructor(t){super(t)}createRenderer(){return new Ic(this)}getData(t){return super.getData(t)}}var Mc="preload",Fc="useInterimTilesOnError";class Ac extends vs{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(void 0!==t.preload?t.preload:0),this.setUseInterimTilesOnError(void 0===t.useInterimTilesOnError||t.useInterimTilesOnError)}getPreload(){return this.get(Mc)}setPreload(t){this.set(Mc,t)}getUseInterimTilesOnError(){return this.get(Fc)}setUseInterimTilesOnError(t){this.set(Fc,t)}getData(t){return super.getData(t)}}class Oc extends Pc{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=[1/0,1/0,-1/0,-1/0],this.tmpTileRange_=new hl(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return i==J||i==tt||i==Q&&!n}getTile(t,e,i,n){const r=n.pixelRatio,s=n.viewState.projection,o=this.getLayer();let a=o.getSource().getTile(t,e,i,r,s);return a.getState()==Q&&o.getUseInterimTilesOnError()&&o.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(a)||(a=a.getInterimTile()),a}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=bt(e.pixelToCoordinateTransform,t.slice()),r=i.getExtent();if(r&&!Zt(r,n))return null;const s=e.pixelRatio,o=e.viewState.projection,a=e.viewState,l=i.getRenderSource(),h=l.getTileGridForProjection(a.projection),c=l.getTilePixelRatio(e.pixelRatio);for(let t=h.getZForResolution(a.resolution);t>=h.getMinZoom();--t){const e=h.getTileCoordForCoordAndZ(n,t),i=l.getTile(t,e[1],e[2],s,o);if(!(i instanceof Vr||i instanceof zl)||i instanceof zl&&i.getState()===tt)return null;if(i.getState()!==J)continue;const r=h.getOrigin(t),u=Va(h.getTileSize(t)),d=h.getResolution(t),g=Math.floor(c*((n[0]-r[0])/d-e[1]*u[0])),f=Math.floor(c*((r[1]-n[1])/d-e[2]*u[1])),p=Math.round(c*l.getGutterForProjection(a.projection));return this.getImageData(i.getImage(),g+p,f+p)}return null}loadedTileCallback(t,e,i){return!!this.isDrawableTile(i)&&super.loadedTileCallback(t,e,i)}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const i=t.layerStatesArray[t.layerIndex],n=t.viewState,r=n.projection,s=n.resolution,o=n.center,l=n.rotation,h=t.pixelRatio,c=this.getLayer(),u=c.getSource(),d=u.getRevision(),g=u.getTileGridForProjection(r),f=g.getZForResolution(s,u.zDirection),p=g.getResolution(f);let m=t.extent;const _=t.viewState.resolution,y=u.getTilePixelRatio(h),x=Math.round(Se(m)/_*h),v=Math.round(_e(m)/_*h),S=i.extent&&on(i.extent,r);S&&(m=ye(m,on(i.extent,r)));const w=p*x/2/y,E=p*v/2/y,T=[o[0]-w,o[1]-E,o[0]+w,o[1]+E],C=g.getTileRangeForExtentAndZ(m,f),b={};b[f]={};const R=this.createLoadedTileFinder(u,r,b),P=this.tmpExtent,I=this.tmpTileRange_;this.newTiles_=!1;const L=l?me(n.center,_,l,t.size):void 0;for(let e=C.minX;e<=C.maxX;++e)for(let n=C.minY;n<=C.maxY;++n){if(l&&!g.tileCoordIntersectsViewport([f,e,n],L))continue;const r=this.getTile(f,e,n,t);if(this.isDrawableTile(r)){const e=z(this);if(r.getState()==J){b[f][r.tileCoord.toString()]=r;let t=r.inTransition(e);t&&1!==i.opacity&&(r.endTransition(e),t=!1),this.newTiles_||!t&&this.renderedTiles.includes(r)||(this.newTiles_=!0)}if(1===r.getAlpha(e,t.time))continue}const s=g.getTileCoordChildTileRange(r.tileCoord,I,P);let o=!1;s&&(o=R(f+1,s)),o||g.forEachTileCoordParentTileRange(r.tileCoord,R,I,P)}const M=p/s*h/y;Mt(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/h,1/h,l,-x/2,-v/2);const F=Nt(this.pixelTransform);this.useContainer(e,F,this.getBackground(t));const A=this.context,O=A.canvas;Ft(this.inversePixelTransform,this.pixelTransform),Mt(this.tempTransform,x/2,v/2,M,M,0,-x/2,-v/2),O.width!=x||O.height!=v?(O.width=x,O.height=v):this.containerReused||A.clearRect(0,0,x,v),S&&this.clipUnrotated(A,t,S),u.getInterpolate()||(A.imageSmoothingEnabled=!1),this.preRender(A,t),this.renderedTiles.length=0;let N,D,k,G=Object.keys(b).map(Number);G.sort(a),1!==i.opacity||this.containerReused&&!u.getOpaque(t.viewState.projection)?(N=[],D=[]):G=G.reverse();for(let e=G.length-1;e>=0;--e){const i=G[e],n=u.getTilePixelSize(i,h,r),s=g.getResolution(i)/p,o=n[0]*s*M,a=n[1]*s*M,l=g.getTileCoordForCoordAndZ(xe(T),i),c=g.getTileCoordExtent(l),d=bt(this.tempTransform,[y*(c[0]-T[0])/p,y*(T[3]-c[3])/p]),m=y*u.getGutterForProjection(r),_=b[i];for(const e in _){const n=_[e],r=n.tileCoord,s=l[1]-r[1],h=Math.round(d[0]-(s-1)*o),c=l[2]-r[2],g=Math.round(d[1]-(c-1)*a),p=Math.round(d[0]-s*o),y=Math.round(d[1]-c*a),x=h-p,v=g-y,S=f===i,w=S&&1!==n.getAlpha(z(this),t.time);let E=!1;if(!w)if(N){k=[p,y,p+x,y,p+x,y+v,p,y+v];for(let t=0,e=N.length;tthis._maxQueueLength;)this._queue.shift().callback(null,null)}_dispatch(){if(this._running||0===this._queue.length)return;const t=this._queue.shift();this._job=t;const e=t.inputs[0].width,i=t.inputs[0].height,n=t.inputs.map((function(t){return t.data.buffer})),r=this._workers.length;if(this._running=r,1===r)return void this._workers[0].postMessage({buffers:n,meta:t.meta,imageOps:this._imageOps,width:e,height:i},n);const s=t.inputs[0].data.length,o=4*Math.ceil(s/4/r);for(let s=0;sStamen Design, under CC BY 3.0.',Ec],Hc={terrain:{extension:"jpg",opaque:!0},"terrain-background":{extension:"jpg",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},$c={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}};class Jc extends st{constructor(t,e,i,n,r,s){super(t,e),this.src_=i,this.extent_=n,this.preemptive_=r,this.grid_=null,this.keys_=null,this.data_=null,this.jsonp_=s}getImage(){return null}getData(t){if(!this.grid_||!this.keys_)return null;const e=(t[0]-this.extent_[0])/(this.extent_[2]-this.extent_[0]),i=(t[1]-this.extent_[1])/(this.extent_[3]-this.extent_[1]),n=this.grid_[Math.floor((1-i)*this.grid_.length)];if("string"!=typeof n)return null;let r=n.charCodeAt(Math.floor(e*n.length));r>=93&&r--,r>=35&&r--,r-=32;let s=null;if(r in this.keys_){const t=this.keys_[r];s=this.data_&&t in this.data_?this.data_[t]:t}return s}forDataAtCoordinate(t,e,i){this.state==tt&&!0===i?(this.state=H,D(this,S,(function(i){e(this.getData(t))}),this),this.loadInternal_()):!0===i?setTimeout(function(){e(this.getData(t))}.bind(this),0):e(this.getData(t))}getKey(){return this.src_}handleError_(){this.state=Q,this.changed()}handleLoad_(t){this.grid_=t.grid,this.keys_=t.keys,this.data_=t.data,this.state=J,this.changed()}loadInternal_(){if(this.state==H)if(this.state=$,this.jsonp_)vl(this.src_,this.handleLoad_.bind(this),this.handleError_.bind(this));else{const t=new XMLHttpRequest;t.addEventListener("load",this.onXHRLoad_.bind(this)),t.addEventListener("error",this.onXHRError_.bind(this)),t.open("GET",this.src_),t.send()}}onXHRLoad_(t){const e=t.target;if(!e.status||e.status>=200&&e.status<300){let t;try{t=JSON.parse(e.responseText)}catch(t){return void this.handleError_()}this.handleLoad_(t)}else this.handleError_()}onXHRError_(t){this.handleError_()}load(){this.preemptive_?this.loadInternal_():this.setState(tt)}}class Qc extends ch{constructor(t){const e=t.projection||"EPSG:3857",i=t.extent||ih(e),n=t.tileGrid||Ql({extent:i,maxResolution:t.maxResolution,maxZoom:void 0!==t.maxZoom?t.maxZoom:22,minZoom:t.minZoom,tileSize:t.tileSize||512});super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,interpolate:!0,opaque:!1,projection:e,state:t.state,tileGrid:n,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:tu,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:void 0===t.zDirection?1:t.zDirection}),this.format_=t.format?t.format:null,this.sourceTileCache=new ll(this.tileCache.highWaterMark),this.overlaps_=null==t.overlaps||t.overlaps,this.tileClass=t.tileClass?t.tileClass:gl,this.tileGrids_={}}getFeaturesInExtent(t){const e=[],i=this.tileCache;if(0===i.getCount())return e;const n=sl(i.peekFirstKey())[0],r=this.tileGrid;return i.forEach((function(i){if(i.tileCoord[0]!==n||i.getState()!==J)return;const s=i.getSourceTiles();for(let i=0,n=s.length;i{const n=rl(e),r=i.peek(n);if(r){const e=r.sourceTiles;for(let i=0,n=e.length;i{const r=this.tileUrlFunction(n,t,e),s=this.sourceTileCache.containsKey(r)?this.sourceTileCache.get(r):new this.tileClass(n,r?H:tt,r,this.format_,this.tileLoadFunction);i.sourceTiles.push(s);const o=s.getState();if(o{this.handleTileChange(e);const n=s.getState();if(n===J||n===Q){const e=s.getKey();e in i.errorTileKeys?s.getState()===J&&delete i.errorTileKeys[e]:i.loadingSourceTiles--,n===Q?i.errorTileKeys[e]=!0:s.removeEventListener(S,t),0===i.loadingSourceTiles&&i.setState(x(i.errorTileKeys)?J:Q)}};s.addEventListener(S,t),i.loadingSourceTiles++}o===H&&(s.extent=l.getTileCoordExtent(n),s.projection=e,s.resolution=l.getResolution(n[0]),this.sourceTileCache.set(r,s),s.load())})),i.loadingSourceTiles||i.setState(i.sourceTiles.some((t=>t.getState()===Q))?Q:J)}return i.sourceTiles}getTile(t,e,i,n,r){const s=il(t,e,i),o=this.getKey();let a;if(this.tileCache.containsKey(s)&&(a=this.tileCache.get(s),a.key===o))return a;const l=[t,e,i];let h=this.getTileCoordForTileUrlFunction(l,r);const c=this.getTileGrid().getExtent(),u=this.getTileGridForProjection(r);if(h&&c){const e=u.getTileCoordExtent(h);Xt(e,-u.getResolution(t),e),we(c,e)||(h=null)}let d=!0;if(null!==h){const e=this.tileGrid,i=u.getResolution(t),s=e.getZForResolution(i,1),o=u.getTileCoordExtent(h);Xt(o,-i,o),e.forEachTileCoord(o,s,function(t){d=d&&!this.tileUrlFunction(t,n,r)}.bind(this))}const g=new dl(l,d?tt:H,h,this.getSourceTiles.bind(this,n,r));return g.key=o,a?(g.interimTile=a,g.refreshInterimChain(),this.tileCache.replace(s,g)):this.tileCache.set(s,g),g}getTileGridForProjection(t){const e=t.getCode();let i=this.tileGrids_[e];if(!i){const t=this.tileGrid,n=t.getResolutions().slice(),r=n.map((function(e,i){return t.getOrigin(i)})),s=n.map((function(e,i){return t.getTileSize(i)})),o=43;for(let t=n.length;t0)||i.find((function(i){return e.Identifier==i.TileMatrix||!e.Identifier.includes(":")&&t.Identifier+":"+e.Identifier===i.TileMatrix})),l){r.push(e.Identifier);const t=28e-5*e.ScaleDenominator/h,i=e.TileWidth,l=e.TileHeight;c?s.push([e.TopLeftCorner[1],e.TopLeftCorner[0]]):s.push(e.TopLeftCorner),n.push(t),o.push(i==l?i:[i,l]),a.push([e.MatrixWidth,e.MatrixHeight])}})),new eu({extent:e,origins:s,resolutions:n,matrixIds:r,tileSizes:o,sizes:a})}const nu=34962,ru=34963,su=35044,ou=35048,au=5126,lu=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function hu(t,e){e=Object.assign({preserveDrawingBuffer:!0,antialias:!gt},e);const i=lu.length;for(let n=0;n0)return;const i=hu(e.canvas).getExtension("WEBGL_lose_context");i&&i.loseContext(),delete td[t]}(this.canvasCacheKey_),delete this.gl_,delete this.canvas_}prepareDraw(t,e){const i=this.getGL(),n=this.getCanvas(),r=t.size,s=t.pixelRatio;n.width=r[0]*s,n.height=r[1]*s,n.style.width=r[0]+"px",n.style.height=r[1]+"px";for(let e=this.postProcessPasses_.length-1;e>=0;e--)this.postProcessPasses_[e].init(t);i.bindTexture(i.TEXTURE_2D,null),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.enable(i.BLEND),i.blendFunc(i.ONE,e?i.ZERO:i.ONE_MINUS_SRC_ALPHA)}prepareDrawToRenderTarget(t,e,i){const n=this.getGL(),r=e.getSize();n.bindFramebuffer(n.FRAMEBUFFER,e.getFramebuffer()),n.viewport(0,0,r[0],r[1]),n.bindTexture(n.TEXTURE_2D,e.getTexture()),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.enable(n.BLEND),n.blendFunc(n.ONE,i?n.ZERO:n.ONE_MINUS_SRC_ALPHA)}drawElements(t,e){const i=this.getGL();this.getExtension("OES_element_index_uint");const n=i.UNSIGNED_INT,r=e-t,s=4*t;i.drawElements(i.TRIANGLES,r,n,s)}finalizeDraw(t,e,i){for(let n=0,r=this.postProcessPasses_.length;nthis.size_[0]||e>=this.size_[1])return ad[0]=0,ad[1]=0,ad[2]=0,ad[3]=0,ad;this.readAll();const i=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return ad[0]=this.data_[4*i],ad[1]=this.data_[4*i+1],ad[2]=this.data_[4*i+2],ad[3]=this.data_[4*i+3],ad}getTexture(){return this.texture_}getFramebuffer(){return this.framebuffer_}updateSize_(){const t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),this.data_=new Uint8Array(t[0]*t[1]*4)}}function hd(t,e,i){const n=i?t.LINEAR:t.NEAREST;t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,n)}function cd(t,e,i,n,r,s){const o=t.getGL();let a,l;if(i instanceof Float32Array){a=o.FLOAT,t.getExtension("OES_texture_float");l=null!==t.getExtension("OES_texture_float_linear")}else a=o.UNSIGNED_BYTE,l=!0;hd(o,e,s&&l);const h=i.byteLength/n[1];let c,u=1;switch(h%8==0?u=8:h%4==0?u=4:h%2==0&&(u=2),r){case 1:c=o.LUMINANCE;break;case 2:c=o.LUMINANCE_ALPHA;break;case 3:c=o.RGB;break;case 4:c=o.RGBA;break;default:throw new Error(`Unsupported number of bands: ${r}`)}const d=o.getParameter(o.UNPACK_ALIGNMENT);o.pixelStorei(o.UNPACK_ALIGNMENT,u),o.texImage2D(o.TEXTURE_2D,0,c,n[0],n[1],0,c,a,i),o.pixelStorei(o.UNPACK_ALIGNMENT,d)}let ud=null;class dd extends v{constructor(t){super(),this.tile,this.textures=[],this.handleTileChange_=this.handleTileChange_.bind(this),this.renderSize_=Va(t.grid.getTileSize(t.tile.tileCoord[0])),this.gutter_=t.gutter||0,this.bandCount=NaN,this.helper_=t.helper;const e=new Gu(nu,su);e.fromArray([0,1,1,1,1,0,0,0]),this.helper_.flushBufferData(e),this.coords=e,this.setTile(t.tile)}setTile(t){if(t!==this.tile)if(this.tile&&this.tile.removeEventListener(S,this.handleTileChange_),this.tile=t,this.textures.length=0,this.loaded=t.getState()===J,this.loaded)this.uploadTile_();else{if(t instanceof Vr){const e=t.getImage();e instanceof Image&&!e.crossOrigin&&(e.crossOrigin="anonymous")}t.addEventListener(S,this.handleTileChange_)}}uploadTile_(){const t=this.helper_,e=t.getGL(),i=this.tile;if(i instanceof Vr||i instanceof zl){const t=e.createTexture();return this.textures.push(t),this.bandCount=4,void function(t,e,i,n){hd(t,e,n),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i)}(e,t,i.getImage(),i.interpolate)}const n=i.getSize(),r=[n[0]+2*this.gutter_,n[1]+2*this.gutter_],s=i.getData(),o=s instanceof Float32Array,a=r[0]*r[1],l=o?Float32Array:Uint8Array,h=l.BYTES_PER_ELEMENT,c=s.byteLength/r[1];this.bandCount=Math.floor(c/h/r[0]);const u=Math.ceil(this.bandCount/4);if(1===u){const n=e.createTexture();return this.textures.push(n),void cd(t,n,s,r,this.bandCount,i.interpolate)}const d=new Array(u);for(let t=0;t=f;--r){const i=l.getTileRangeForExtentAndZ(e,r,this.tempTileRange_),o=l.getResolution(r);for(let e=i.minX;e<=i.maxX;++e)for(let g=i.minY;g<=i.maxY;++g){const i=el(r,e,g,this.tempTileCoord_),f=Sd(a,i);let p,m;if(d.containsKey(f)&&(p=d.get(f),m=p.tile),!p||p.tile.key!==a.getKey())if(m=a.getTile(r,e,g,t.pixelRatio,s.projection),p)if(this.isDrawableTile_(m))p.setTile(m);else{const t=m.getInterimTile();p.setTile(t)}else p=new dd({tile:m,grid:l,helper:this.helper,gutter:h}),d.set(f,p);xd(n,p,r);const _=m.getKey();u[_]=!0,m.getState()===H&&(t.tileQueue.isKeyQueued(_)||t.tileQueue.enqueue([m,c,l.getTileCoordCenter(i),o]))}}}renderFrame(t){this.frameState_=t,this.renderComplete=!0;const e=this.helper.getGL();this.preRender(e,t);const i=t.viewState,n=this.getLayer(),r=n.getRenderSource(),s=r.getTileGridForProjection(i.projection),o=r.getGutterForProjection(i.projection),l=vd(t,t.extent),h=s.getZForResolution(i.resolution,r.zDirection),c={},u=n.getPreload();if(t.nextExtent){const e=s.getZForResolution(i.nextResolution,r.zDirection),n=vd(t,t.nextExtent);this.enqueueTiles(t,n,e,c,u)}this.enqueueTiles(t,l,h,c,0),u>0&&setTimeout((()=>{this.enqueueTiles(t,l,h-1,c,u-1)}),0);const d={},g=z(this),f=t.time;let p=!1;const m=c[h];for(let t=0,e=m.length;t=r;--t){if(this.findAltTiles_(s,n,t,c))break}}this.helper.useProgram(this.program_,t),this.helper.prepareDraw(t,!p);const _=Object.keys(c).map(Number).sort(a),y=i.center[0],x=i.center[1];for(let n=0,r=_.length;n0&&(b=s.getTileCoordExtent(c),ye(b,l,b)),this.helper.setUniformFloatVec4(fd.RENDER_EXTENT,b),this.helper.setUniformFloatValue(fd.RESOLUTION,i.resolution),this.helper.setUniformFloatValue(fd.ZOOM,i.zoom),this.helper.drawElements(0,this.indices_.getSize())}}this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);const v=this.helper.getCanvas(),S=this.tileTextureCache_;for(;S.canExpireCache();){S.pop().dispose()}return t.postRenderFunctions.push((function(t,e){r.updateCacheSize(.1,e.viewState.projection),r.expireCache(e.viewState.projection,_d)})),this.postRender(e,t),v}getData(t){if(!this.helper.getGL())return null;const e=this.frameState_;if(!e)return null;const i=this.getLayer(),n=bt(e.pixelToCoordinateTransform,t.slice()),r=e.viewState,s=i.getExtent();if(s&&!Zt(on(s,r.projection),n))return null;const o=i.getSources(zt([n]),r.resolution);let a,l,h;for(a=o.length-1;a>=0;--a)if(l=o[a],"ready"===l.getState()){if(h=l.getTileGridForProjection(r.projection),l.getWrapX())break;const t=h.getExtent();if(!t||Zt(t,n))break}if(a<0)return null;const c=this.tileTextureCache_;for(let t=h.getZForResolution(r.resolution);t>=h.getMinZoom();--t){const e=h.getTileCoordForCoordAndZ(n,t),i=Sd(l,e);if(!c.containsKey(i))continue;const r=c.get(i),s=r.tile;if(s instanceof zl&&s.getState()===tt)return null;if(!r.loaded)continue;const o=h.getOrigin(t),a=Va(h.getTileSize(t)),u=h.getResolution(t),d=(n[0]-o[0])/u-e[1]*a[0],g=(o[1]-n[1])/u-e[2]*a[1];return r.getPixelData(d,g)}return null}findAltTiles_(t,e,i,n){const r=t.getTileRangeForTileCoordAndZ(e,i,this.tempTileRange_);if(!r)return!1;let s=!0;const o=this.tileTextureCache_,a=this.getLayer().getRenderSource();for(let t=r.minX;t<=r.maxX;++t)for(let e=r.minY;e<=r.maxY;++e){const r=Sd(a,[i,t,e]);let l=!1;if(o.containsKey(r)){const t=o.get(r);t.loaded&&(xd(n,t,i),l=!0)}l||(s=!1)}return s}clearCache(){const t=this.tileTextureCache_;t.forEach((t=>t.dispose())),t.clear()}removeHelper(){this.helper&&this.clearCache(),super.removeHelper()}disposeInternal(){const t=this.helper;if(t){t.getGL().deleteProgram(this.program_),delete this.program_,t.deleteBuffer(this.indices_)}super.disposeInternal(),delete this.indices_,delete this.tileTextureCache_,delete this.frameState_}}const Ed=1,Td=2,Cd=4,bd=8,Rd=16,Pd=31,Id=0,Ld={};function Md(t){if("number"==typeof t)return Ed;if("boolean"==typeof t)return bd;if("string"==typeof t)return ts(t)?Cd|Td:Td;if(!Array.isArray(t))throw new Error(`Unhandled value type: ${JSON.stringify(t)}`);const e=t;if(e.every((function(t){return"number"==typeof t})))return 3===e.length||4===e.length?Cd|Rd:Rd;if("string"!=typeof e[0])throw new Error(`Expected an expression operator but received: ${JSON.stringify(e)}`);const i=Ld[e[0]];if(void 0===i)throw new Error(`Unrecognized expression operator: ${JSON.stringify(e)}`);return i.getReturnType(e.slice(1))}function Fd(t){return Math.log2(t)%1==0}function Ad(t){const e=t.toString();return e.includes(".")?e:e+".0"}function Od(t){if(t.length<2||t.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return`vec${t.length}(${t.map(Ad).join(", ")})`}function Nd(t){const e=$r(t).slice();return e.length<4&&e.push(1),Od(e.map((function(t,e){return e<3?t/255:t})))}function Dd(t,e){return void 0===t.stringLiteralsMap[e]&&(t.stringLiteralsMap[e]=Object.keys(t.stringLiteralsMap).length),t.stringLiteralsMap[e]}function kd(t,e){return Ad(Dd(t,e))}function Gd(t,e,i){if(Array.isArray(e)&&"string"==typeof e[0]){const n=Ld[e[0]];if(void 0===n)throw new Error(`Unrecognized expression operator: ${JSON.stringify(e)}`);return n.toGlsl(t,e.slice(1),i)}const n=Md(e);if((n&Ed)>0)return Ad(e);if((n&bd)>0)return e.toString();if((n&Td)>0&&(void 0===i||i==Td))return kd(t,e.toString());if((n&Cd)>0&&(void 0===i||i==Cd))return Nd(e);if((n&Rd)>0)return Od(e);throw new Error(`Unexpected expression ${e} (expected type ${i})`)}function jd(t){if(!(Md(t)&Ed))throw new Error(`A numeric value was expected, got ${JSON.stringify(t)} instead`)}function Bd(t){for(let e=0;ee)throw new Error(`At most ${e} arguments were expected, got ${t.length} instead`)}function Zd(t){if(t.length%2!=0)throw new Error(`An even amount of arguments was expected, got ${t} instead`)}function Yd(t,e){if(!Fd(e))throw new Error(`Could not infer only one type from the following expression: ${JSON.stringify(t)}`)}function Kd(t){return"u_var_"+t}Ld.get={getReturnType:function(t){return Pd},toGlsl:function(t,e){Xd(e,1),Ud(e[0]);const i=e[0].toString();t.attributes.includes(i)||t.attributes.push(i);return(t.inFragmentShader?"v_":"a_")+i}},Ld.var={getReturnType:function(t){return Pd},toGlsl:function(t,e){Xd(e,1),Ud(e[0]);const i=e[0].toString();return t.variables.includes(i)||t.variables.push(i),Kd(i)}};const qd="u_paletteTextures";Ld.palette={getReturnType:function(t){return Cd},toGlsl:function(t,e){Xd(e,2),jd(e[0]);const i=Gd(t,e[0]),n=e[1];if(!Array.isArray(n))throw new Error("The second argument of palette must be an array");const r=n.length,s=new Uint8Array(4*r);for(let t=0;tGd(e,t))).join(` ${t} `),n=`(${n})`,n}}}Ld.band={getReturnType:function(t){return Ed},toGlsl:function(t,e){Vd(e,1),Wd(e,3);const i=e[0];if(!(Hd in t.functions)){let e="";const i=t.bandCount||1;for(let t=0;t"]={getReturnType:function(t){return bd},toGlsl:function(t,e){return Xd(e,2),Bd(e),`(${Gd(t,e[0])} > ${Gd(t,e[1])})`}},Ld[">="]={getReturnType:function(t){return bd},toGlsl:function(t,e){return Xd(e,2),Bd(e),`(${Gd(t,e[0])} >= ${Gd(t,e[1])})`}},Ld["<"]={getReturnType:function(t){return bd},toGlsl:function(t,e){return Xd(e,2),Bd(e),`(${Gd(t,e[0])} < ${Gd(t,e[1])})`}},Ld["<="]={getReturnType:function(t){return bd},toGlsl:function(t,e){return Xd(e,2),Bd(e),`(${Gd(t,e[0])} <= ${Gd(t,e[1])})`}},Ld["=="]=$d("=="),Ld["!="]=$d("!="),Ld["!"]={getReturnType:function(t){return bd},toGlsl:function(t,e){return Xd(e,1),zd(e[0]),`(!${Gd(t,e[0])})`}},Ld.all=Jd("&&"),Ld.any=Jd("||"),Ld.between={getReturnType:function(t){return bd},toGlsl:function(t,e){Xd(e,3),Bd(e);const i=Gd(t,e[1]),n=Gd(t,e[2]),r=Gd(t,e[0]);return`(${r} >= ${i} && ${r} <= ${n})`}},Ld.array={getReturnType:function(t){return Rd},toGlsl:function(t,e){Vd(e,2),Wd(e,4),Bd(e);const i=e.map((function(e){return Gd(t,e,Ed)}));return`vec${e.length}(${i.join(", ")})`}},Ld.color={getReturnType:function(t){return Cd},toGlsl:function(t,e){Vd(e,3),Wd(e,4),Bd(e);const i=e;3===e.length&&i.push(1);const n=e.map((function(e,i){return Gd(t,e,Ed)+(i<3?" / 255.0":"")}));return`vec${e.length}(${n.join(", ")})`}},Ld.interpolate={getReturnType:function(t){let e=Cd|Ed;for(let i=3;i=1;i-=2){o=`(${r} == ${Gd(t,e[i])} ? ${Gd(t,e[i+1],n)} : ${o||s})`}return o}},Ld.case={getReturnType:function(t){let e=Pd;for(let i=1;i=0;i-=2){s=`(${Gd(t,e[i])} ? ${Gd(t,e[i+1],n)} : ${s||r})`}return s}};class Qd{constructor(){this.uniforms=[],this.attributes=[],this.varyings=[],this.sizeExpression="vec2(1.0)",this.rotationExpression="0.0",this.offsetExpression="vec2(0.0)",this.colorExpression="vec4(1.0)",this.texCoordExpression="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression="false",this.rotateWithView=!1}addUniform(t){return this.uniforms.push(t),this}addAttribute(t){return this.attributes.push(t),this}addVarying(t,e,i){return this.varyings.push({name:t,type:e,expression:i}),this}setSizeExpression(t){return this.sizeExpression=t,this}setRotationExpression(t){return this.rotationExpression=t,this}setSymbolOffsetExpression(t){return this.offsetExpression=t,this}setColorExpression(t){return this.colorExpression=t,this}setTextureCoordinateExpression(t){return this.texCoordExpression=t,this}setFragmentDiscardExpression(t){return this.discardExpression=t,this}setSymbolRotateWithView(t){return this.rotateWithView=t,this}getSizeExpression(){return this.sizeExpression}getOffsetExpression(){return this.offsetExpression}getColorExpression(){return this.colorExpression}getTextureCoordinateExpression(){return this.texCoordExpression}getFragmentDiscardExpression(){return this.discardExpression}getSymbolVertexShader(t){const e=this.rotateWithView?"u_offsetScaleMatrix * u_offsetRotateMatrix":"u_offsetScaleMatrix";let i=this.attributes,n=this.varyings;return t&&(i=i.concat("vec4 a_hitColor"),n=n.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),`precision mediump float;\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n${this.uniforms.map((function(t){return"uniform "+t+";"})).join("\n")}\nattribute vec2 a_position;\nattribute float a_index;\n${i.map((function(t){return"attribute "+t+";"})).join("\n")}\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n${n.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\nvoid main(void) {\n mat4 offsetMatrix = ${e};\n vec2 halfSize = ${this.sizeExpression} * 0.5;\n vec2 offset = ${this.offsetExpression};\n float angle = ${this.rotationExpression};\n float offsetX;\n float offsetY;\n if (a_index == 0.0) {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n } else if (a_index == 1.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else if (a_index == 2.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n }\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n vec4 texCoord = ${this.texCoordExpression};\n float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;\n float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;\n v_texCoord = vec2(u, v);\n u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n v = a_index == 2.0 || a_index == 3.0 ? 0.0 : 1.0;\n v_quadCoord = vec2(u, v);\n${n.map((function(t){return" "+t.name+" = "+t.expression+";"})).join("\n")}\n}`}getSymbolFragmentShader(t){const e=t?" if (gl_FragColor.a < 0.1) { discard; } gl_FragColor = v_hitColor;":"";let i=this.varyings;return t&&(i=i.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),`precision mediump float;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n${this.uniforms.map((function(t){return"uniform "+t+";"})).join("\n")}\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n${i.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\nvoid main(void) {\n if (${this.discardExpression}) { discard; }\n gl_FragColor = ${this.colorExpression};\n gl_FragColor.rgb *= gl_FragColor.a;\n${e}\n}`}}function tg(t){const e=t.symbol,i=void 0!==e.size?e.size:1,n=e.color||"white",r=e.textureCoord||[0,0,1,1],s=e.offset||[0,0],o=void 0!==e.opacity?e.opacity:1,a=void 0!==e.rotation?e.rotation:0,l={inFragmentShader:!1,variables:[],attributes:[],stringLiteralsMap:{},functions:{}},h=Gd(l,i,Rd|Ed),c=Gd(l,s,Rd),u=Gd(l,r,Rd),d=Gd(l,a,Ed),g={inFragmentShader:!0,variables:l.variables,attributes:[],stringLiteralsMap:l.stringLiteralsMap,functions:{}},f=Gd(g,n,Cd),p=Gd(g,o,Ed);let m="1.0";const _=`vec2(${Gd(g,i,Rd|Ed)}).x`;switch(e.symbolType){case"square":case"image":break;case"circle":m=`(1.0-smoothstep(1.-4./${_},1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))`;break;case"triangle":const t="(v_quadCoord*2.-1.)",i=`(atan(${t}.x,${t}.y))`;m=`(1.0-smoothstep(.5-3./${_},.5,cos(floor(.5+${i}/2.094395102)*2.094395102-${i})*length(${t})))`;break;default:throw new Error("Unexpected symbol type: "+e.symbolType)}const y=(new Qd).setSizeExpression(`vec2(${h})`).setRotationExpression(d).setSymbolOffsetExpression(c).setTextureCoordinateExpression(u).setSymbolRotateWithView(!!e.rotateWithView).setColorExpression(`vec4(${f}.rgb, ${f}.a * ${p} * ${m})`);if(t.filter){const e=Gd(g,t.filter,bd);y.setFragmentDiscardExpression(`!${e}`)}const x={};if(g.variables.forEach((function(e){const i=Kd(e);y.addUniform(`float ${i}`),x[i]=function(){if(!t.variables||void 0===t.variables[e])throw new Error(`The following variable is missing from the style: ${e}`);let i=t.variables[e];return"string"==typeof i&&(i=Dd(l,i)),void 0!==i?i:-9999999}})),"image"===e.symbolType&&e.src){const t=new Image;t.crossOrigin=void 0===e.crossOrigin?"anonymous":e.crossOrigin,t.src=e.src,y.addUniform("sampler2D u_texture").setColorExpression(y.getColorExpression()+" * texture2D(u_texture, v_texCoord)"),x.u_texture=t}return g.attributes.forEach((function(t){l.attributes.includes(t)||l.attributes.push(t),y.addVarying(`v_${t}`,"float",`a_${t}`)})),l.attributes.forEach((function(t){y.addAttribute(`float a_${t}`)})),{builder:y,attributes:l.attributes.map((function(t){return{name:t,callback:function(e,i){let n=i[t];return"string"==typeof n&&(n=Dd(l,n)),void 0!==n?n:-9999999}}})),uniforms:x}}class eg{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Va(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new eg({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return B()}getImage(t){return B()}getHitDetectionImage(){return B()}getPixelRatio(t){return 1}getImageState(){return B()}getImageSize(){return B()}getOrigin(){return B()}getSize(){return B()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Va(t)}listenImageChange(t){B()}load(){B()}unlistenImageChange(t){B()}}class ig extends eg{constructor(t){super({opacity:1,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,rotation:void 0!==t.rotation?t.rotation:0,scale:void 0!==t.scale?t.scale:1,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=void 0!==t.fill?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=void 0!==t.radius?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=void 0!==t.angle?t.angle:0,this.stroke_=void 0!==t.stroke?t.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}clone(){const t=this.getScale(),e=new ig({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_;if(!t)return null;const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_}getImage(t){let e=this.canvas_[t];if(!e){const i=this.renderOptions_,n=Dr(i.size*t,i.size*t);this.draw_(i,n,t),e=n.canvas,this.canvas_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return Lr}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;let n=this.radius_,r=void 0===this.radius2_?n:this.radius2_;if(n0,6);const a=void 0!==t.src?Pr:Lr;this.color_=void 0!==t.color?$r(t.color):null,this.iconImage_=ag(s,o,void 0!==this.imgSize_?this.imgSize_:null,this.crossOrigin_,a,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==t.size?t.size:null}clone(){const t=this.getScale();return new lg({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[0]=-t[0]+e[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if("top-left"!=this.offsetOrigin_){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[0]=i[0]-e[0]-t[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}listenImageChange(t){this.iconImage_.addEventListener(S,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(S,t)}}class hg{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new hg({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}class cg{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=pg,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new cg({geometry:t,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=pg,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function ug(t){let e;if("function"==typeof t)e=t;else{let i;if(Array.isArray(t))i=t;else{at("function"==typeof t.getZIndex,41);i=[t]}e=function(){return i}}return e}let dg=null;function gg(t,e){if(!dg){const t=new rg({color:"rgba(255,255,255,0.4)"}),e=new hg({color:"#3399CC",width:1.25});dg=[new cg({image:new ng({fill:t,stroke:e,radius:5}),fill:t,stroke:e})]}return dg}function fg(){const t={},e=[255,255,255,1],i=[0,153,255,1];return t.Polygon=[new cg({fill:new rg({color:[255,255,255,.5]})})],t.MultiPolygon=t.Polygon,t.LineString=[new cg({stroke:new hg({color:e,width:5})}),new cg({stroke:new hg({color:i,width:3})})],t.MultiLineString=t.LineString,t.Circle=t.Polygon.concat(t.LineString),t.Point=[new cg({image:new ng({radius:6,fill:new rg({color:i}),stroke:new hg({color:e,width:1.5})}),zIndex:1/0})],t.MultiPoint=t.Point,t.GeometryCollection=t.Polygon.concat(t.LineString,t.Point),t}function pg(t){return t.getGeometry()}class mg{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=Va(void 0!==t.scale?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new rg({color:"#333"}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding}clone(){const t=this.getScale();return new mg({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Va(void 0!==t?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}function _g(t){return new cg({fill:yg(t,""),stroke:xg(t,""),text:vg(t),image:Sg(t)})}function yg(t,e){const i=t[e+"fill-color"];if(i)return new rg({color:i})}function xg(t,e){const i=t[e+"stroke-width"],n=t[e+"stroke-color"];if(i||n)return new hg({width:i,color:n,lineCap:t[e+"stroke-line-cap"],lineJoin:t[e+"stroke-line-join"],lineDash:t[e+"stroke-line-dash"],lineDashOffset:t[e+"stroke-line-dash-offset"],miterLimit:t[e+"stroke-miter-limit"]})}function vg(t){const e=t["text-value"];if(!e)return;return new mg({text:e,font:t["text-font"],maxAngle:t["text-max-angle"],offsetX:t["text-offset-x"],offsetY:t["text-offset-y"],overflow:t["text-overflow"],placement:t["text-placement"],scale:t["text-scale"],rotateWithView:t["text-rotate-with-view"],rotation:t["text-rotation"],textAlign:t["text-align"],justify:t["text-justify"],textBaseline:t["text-baseline"],padding:t["text-padding"],fill:yg(t,"text-"),backgroundFill:yg(t,"text-background-"),stroke:xg(t,"text-"),backgroundStroke:xg(t,"text-background-")})}function Sg(t){const e=t["icon-src"],i=t["icon-img"];if(e||i){return new lg({src:e,img:i,imgSize:t["icon-img-size"],anchor:t["icon-anchor"],anchorOrigin:t["icon-anchor-origin"],anchorXUnits:t["icon-anchor-x-units"],anchorYUnits:t["icon-anchor-y-units"],color:t["icon-color"],crossOrigin:t["icon-cross-origin"],offset:t["icon-offset"],displacement:t["icon-displacement"],opacity:t["icon-opacity"],scale:t["icon-scale"],rotation:t["icon-rotation"],rotateWithView:t["icon-rotate-with-view"],size:t["icon-size"],declutterMode:t["icon-declutter-mode"]})}const n=t["shape-points"];if(n){const e="shape-";return new ig({points:n,fill:yg(t,e),stroke:xg(t,e),radius:t["shape-radius"],radius1:t["shape-radius1"],radius2:t["shape-radius2"],angle:t["shape-angle"],displacement:t["shape-displacement"],rotation:t["shape-rotation"],rotateWithView:t["shape-rotate-with-view"],scale:t["shape-scale"],declutterMode:t["shape-declutter-mode"]})}const r=t["circle-radius"];if(r){const e="circle-";return new ng({radius:r,fill:yg(t,e),stroke:xg(t,e),displacement:t["circle-displacement"],scale:t["circle-scale"],rotation:t["circle-rotation"],rotateWithView:t["circle-rotate-with-view"],declutterMode:t["circle-declutter-mode"]})}}const wg={"image/png":!0,"image/jpeg":!0,"image/gif":!0,"image/webp":!0},Eg={"application/vnd.mapbox-vector-tile":!0,"application/geo+json":!0};function Tg(t,e){let i,n;for(let r=0;rt.maxTileCol||u.tileRowt.maxTileRow)return}Object.assign(u,_);const d=i.replace(/\{(\w+?)\}/g,(function(t,e){return u[e]}));return Tl(y,d)}}}function Rg(t){return El(t.url).then((function(e){return function(t,e){const i=e.tileMatrixSetLimits;let n;if("map"===e.dataType)n=Tg(e.links,t.mediaType);else{if("vector"!==e.dataType)throw new Error('Expected tileset data type to be "map" or "vector"');n=Cg(e.links,t.mediaType,t.supportedMediaTypes)}if(e.tileMatrixSet)return bg(t,e.tileMatrixSet,n,i);const r=e.links.find((t=>"http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme"===t.rel));if(!r)throw new Error("Expected http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme link or tileMatrixSet");const s=r.href;return El(Tl(t.url,s)).then((function(e){return bg(t,e,n,i)}))}(t,e)}))}const Pg="renderOrder";class Ig extends vs{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=void 0!==t.declutter&&t.declutter,this.renderBuffer_=void 0!==t.renderBuffer?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=void 0!==t.updateWhileAnimating&&t.updateWhileAnimating,this.updateWhileInteracting_=void 0!==t.updateWhileInteracting&&t.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Pg)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t){t.declutterTree||(t.declutterTree=new xh(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(Pg,t)}setStyle(t){let e;if(void 0===t)e=gg;else if(null===t)e=null;else if("function"==typeof t)e=t;else if(t instanceof cg)e=t;else if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let e=0;e80*i){n=s=t[0],r=o=t[1];for(var f=i;fs&&(s=a),l>o&&(o=l);h=0!==(h=Math.max(s-n,o-r))?1/h:0}return kg(d,g,i,n,r,h),g}function Ng(t,e,i,n,r){var s,o;if(r===of(t,e,i,n)>0)for(s=e;s=e;s-=n)o=nf(s,t[s],t[s+1],o);return o&&Hg(o,o.next)&&(rf(o),o=o.next),o}function Dg(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!Hg(n,n.next)&&0!==qg(n.prev,n,n.next))n=n.next;else{if(rf(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function kg(t,e,i,n,r,s,o){if(t){!o&&s&&function(t,e,i,n){var r=t;do{null===r.z&&(r.z=Wg(r.x,r.y,e,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,i,n,r,s,o,a,l,h=1;do{for(i=t,t=null,s=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||l>0&&n;)0!==a&&(0===l||!n||i.z<=n.z)?(r=i,i=i.nextZ,a--):(r=n,n=n.nextZ,l--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;i=n}s.nextZ=null,h*=2}while(o>1)}(r)}(t,n,r,s);for(var a,l,h=t;t.prev!==t.next;)if(a=t.prev,l=t.next,s?jg(t,n,r,s):Gg(t))e.push(a.i/i),e.push(t.i/i),e.push(l.i/i),rf(t),t=l.next,h=l.next;else if((t=l)===h){o?1===o?kg(t=Bg(Dg(t),e,i),e,i,n,r,s,2):2===o&&Ug(t,e,i,n,r,s):kg(Dg(t),e,i,n,r,s,1);break}}}function Gg(t){var e=t.prev,i=t,n=t.next;if(qg(e,i,n)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(Yg(e.x,e.y,i.x,i.y,n.x,n.y,r.x,r.y)&&qg(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function jg(t,e,i,n){var r=t.prev,s=t,o=t.next;if(qg(r,s,o)>=0)return!1;for(var a=r.xs.x?r.x>o.x?r.x:o.x:s.x>o.x?s.x:o.x,c=r.y>s.y?r.y>o.y?r.y:o.y:s.y>o.y?s.y:o.y,u=Wg(a,l,e,i,n),d=Wg(h,c,e,i,n),g=t.prevZ,f=t.nextZ;g&&g.z>=u&&f&&f.z<=d;){if(g!==t.prev&&g!==t.next&&Yg(r.x,r.y,s.x,s.y,o.x,o.y,g.x,g.y)&&qg(g.prev,g,g.next)>=0)return!1;if(g=g.prevZ,f!==t.prev&&f!==t.next&&Yg(r.x,r.y,s.x,s.y,o.x,o.y,f.x,f.y)&&qg(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;g&&g.z>=u;){if(g!==t.prev&&g!==t.next&&Yg(r.x,r.y,s.x,s.y,o.x,o.y,g.x,g.y)&&qg(g.prev,g,g.next)>=0)return!1;g=g.prevZ}for(;f&&f.z<=d;){if(f!==t.prev&&f!==t.next&&Yg(r.x,r.y,s.x,s.y,o.x,o.y,f.x,f.y)&&qg(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function Bg(t,e,i){var n=t;do{var r=n.prev,s=n.next.next;!Hg(r,s)&&$g(r,n,n.next,s)&&tf(r,s)&&tf(s,r)&&(e.push(r.i/i),e.push(n.i/i),e.push(s.i/i),rf(n),rf(n.next),n=t=s),n=n.next}while(n!==t);return Dg(n)}function Ug(t,e,i,n,r,s){var o=t;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&Kg(o,a)){var l=ef(o,a);return o=Dg(o,o.next),l=Dg(l,l.next),kg(o,e,i,n,r,s),void kg(l,e,i,n,r,s)}a=a.next}o=o.next}while(o!==t)}function zg(t,e){return t.x-e.x}function Xg(t,e){var i=function(t,e){var i,n=e,r=t.x,s=t.y,o=-1/0;do{if(s<=n.y&&s>=n.next.y&&n.next.y!==n.y){var a=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=r&&a>o){if(o=a,a===r){if(s===n.y)return n;if(s===n.next.y)return n.next}i=n.x=n.x&&n.x>=c&&r!==n.x&&Yg(si.x||n.x===i.x&&Vg(i,n)))&&(i=n,d=l)),n=n.next}while(n!==h);return i}(t,e);if(!i)return e;var n=ef(i,t),r=Dg(i,i.next);return Dg(n,n.next),e===i?r:e}function Vg(t,e){return qg(t.prev,t,e.prev)<0&&qg(e.next,t,t.next)<0}function Wg(t,e,i,n,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Zg(t){var e=t,i=t;do{(e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(s-a)-(r-o)*(n-a)>=0}function Kg(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&$g(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(tf(t,e)&&tf(e,t)&&function(t,e){var i=t,n=!1,r=(t.x+e.x)/2,s=(t.y+e.y)/2;do{i.y>s!=i.next.y>s&&i.next.y!==i.y&&r<(i.next.x-i.x)*(s-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)&&(qg(t.prev,t,e.prev)||qg(t,e.prev,e))||Hg(t,e)&&qg(t.prev,t,t.next)>0&&qg(e.prev,e,e.next)>0)}function qg(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function Hg(t,e){return t.x===e.x&&t.y===e.y}function $g(t,e,i,n){var r=Qg(qg(t,e,i)),s=Qg(qg(t,e,n)),o=Qg(qg(i,n,t)),a=Qg(qg(i,n,e));return r!==s&&o!==a||(!(0!==r||!Jg(t,i,e))||(!(0!==s||!Jg(t,n,e))||(!(0!==o||!Jg(i,t,n))||!(0!==a||!Jg(i,e,n)))))}function Jg(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function Qg(t){return t>0?1:t<0?-1:0}function tf(t,e){return qg(t.prev,t,t.next)<0?qg(t,e,t.next)>=0&&qg(t,t.prev,e)>=0:qg(t,e,t.prev)<0||qg(t,t.next,e)<0}function ef(t,e){var i=new sf(t.i,t.x,t.y),n=new sf(e.i,e.x,e.y),r=t.next,s=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,n.next=i,i.prev=n,s.next=n,n.prev=s,n}function nf(t,e,i,n){var r=new sf(t,e,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function rf(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function sf(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function of(t,e,i,n){for(var r=0,s=e,o=i-n;s0&&(n+=t[r-1].length,i.holes.push(n))}return i};const af=[],lf={vertexPosition:0,indexPosition:0};function hf(t,e,i,n,r){t[e+0]=i,t[e+1]=n,t[e+2]=r}function cf(t,e){const i=256,n=255;return(e=e||[])[0]=Math.floor(t/i/i/i)/n,e[1]=Math.floor(t/i/i)%i/n,e[2]=Math.floor(t/i)%i/n,e[3]=t%i/n,e}function uf(t){let e=0;const i=256,n=255;return e+=Math.round(t[0]*i*i*i*n),e+=Math.round(t[1]*i*i*n),e+=Math.round(t[2]*i*n),e+=Math.round(t[3]*n),e}function df(){const t='const e="GENERATE_POLYGON_BUFFERS",t="GENERATE_POINT_BUFFERS",n="GENERATE_LINE_STRING_BUFFERS",r="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"";r.includes("firefox");r.includes("safari")&&!r.includes("chrom")&&(r.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(r)),r.includes("webkit")&&r.includes("edge"),r.includes("macintosh"),"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&(self,WorkerGlobalScope),function(){let e=!1;try{const t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch(e){}}();const o={1:"The view center is not defined",2:"The view resolution is not defined",3:"The view rotation is not defined",4:"`image` and `src` cannot be provided at the same time",5:"`imgSize` must be set when `image` is provided",7:"`format` must be set when `url` is set",8:"Unknown `serverType` configured",9:"`url` must be configured or set using `#setUrl()`",10:"The default `geometryFunction` can only handle `Point` geometries",11:"`options.featureTypes` must be an Array",12:"`options.geometryName` must also be provided when `options.bbox` is set",13:"Invalid corner",14:"Invalid color",15:"Tried to get a value for a key that does not exist in the cache",16:"Tried to set a value for a key that is used already",17:"`resolutions` must be sorted in descending order",18:"Either `origin` or `origins` must be configured, never both",19:"Number of `tileSizes` and `resolutions` must be equal",20:"Number of `origins` and `resolutions` must be equal",22:"Either `tileSize` or `tileSizes` must be configured, never both",24:"Invalid extent or geometry provided as `geometry`",25:"Cannot fit empty extent provided as `geometry`",26:"Features must have an id set",27:"Features must have an id set",28:\'`renderMode` must be `"hybrid"` or `"vector"`\',30:"The passed `feature` was already added to the source",31:"Tried to enqueue an `element` that was already added to the queue",32:"Transformation matrix cannot be inverted",33:"Invalid units",34:"Invalid geometry layout",36:"Unknown SRS type",37:"Unknown geometry type found",38:"`styleMapValue` has an unknown type",39:"Unknown geometry type",40:"Expected `feature` to have a geometry",41:"Expected an `ol/style/Style` or an array of `ol/style/Style.js`",42:"Question unknown, the answer is 42",43:"Expected `layers` to be an array or a `Collection`",47:"Expected `controls` to be an array or an `ol/Collection`",48:"Expected `interactions` to be an array or an `ol/Collection`",49:"Expected `overlays` to be an array or an `ol/Collection`",50:"`options.featureTypes` should be an Array",51:"Either `url` or `tileJSON` options must be provided",52:"Unknown `serverType` configured",53:"Unknown `tierSizeCalculation` configured",55:"The {-y} placeholder requires a tile grid with extent",56:"mapBrowserEvent must originate from a pointer event",57:"At least 2 conditions are required",59:"Invalid command found in the PBF",60:"Missing or invalid `size`",61:"Cannot determine IIIF Image API version from provided image information JSON",62:"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`",64:"Layer opacity must be a number",66:"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`",67:"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both",68:"A VectorTile source can only be rendered if it has a projection compatible with the view projection"};class i extends Error{constructor(e){const t=o[e];super(t),this.code=e,this.name="AssertionError",this.message=t}}function s(e,t){const n=t[0],r=t[1];return t[0]=e[0]*n+e[2]*r+e[4],t[1]=e[1]*n+e[3]*r+e[5],t}function a(e,t){const n=(r=t)[0]*r[3]-r[1]*r[2];var r;!function(e,t){if(!e)throw new i(t)}(0!==n,32);const o=t[0],s=t[1],a=t[2],u=t[3],x=t[4],f=t[5];return e[0]=u/n,e[1]=-s/n,e[2]=-a/n,e[3]=o/n,e[4]=(a*f-u*x)/n,e[5]=-(o*f-s*x)/n,e}new Array(6);var u={exports:{}};function x(e,t,n){n=n||2;var r,o,i,s,a,u,x,y=t&&t.length,d=y?t[0]*n:e.length,h=f(e,0,d,n,!0),v=[];if(!h||h.next===h.prev)return v;if(y&&(h=function(e,t,n,r){var o,i,s,a=[];for(o=0,i=t.length;o80*n){r=i=e[0],o=s=e[1];for(var b=n;bi&&(i=a),u>s&&(s=u);x=0!==(x=Math.max(i-r,s-o))?1/x:0}return c(h,v,n,r,o,x),v}function f(e,t,n,r,o){var i,s;if(o===B(e,t,n,r)>0)for(i=t;i=t;i-=r)s=U(i,e[i],e[i+1],s);return s&&M(s,s.next)&&(z(s),s=s.next),s}function l(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!M(r,r.next)&&0!==Z(r.prev,r,r.next))r=r.next;else{if(z(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function c(e,t,n,r,o,i,s){if(e){!s&&i&&function(e,t,n,r){var o=e;do{null===o.z&&(o.z=m(o.x,o.y,t,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,n,r,o,i,s,a,u,x=1;do{for(n=e,e=null,i=null,s=0;n;){for(s++,r=n,a=0,t=0;t0||u>0&&r;)0!==a&&(0===u||!r||n.z<=r.z)?(o=n,n=n.nextZ,a--):(o=r,r=r.nextZ,u--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;n=r}i.nextZ=null,x*=2}while(s>1)}(o)}(e,r,o,i);for(var a,u,x=e;e.prev!==e.next;)if(a=e.prev,u=e.next,i?d(e,r,o,i):y(e))t.push(a.i/n),t.push(e.i/n),t.push(u.i/n),z(e),e=u.next,x=u.next;else if((e=u)===x){s?1===s?c(e=h(l(e),t,n),t,n,r,o,i,2):2===s&&v(e,t,n,r,o,i):c(l(e),t,n,r,o,i,1);break}}}function y(e){var t=e.prev,n=e,r=e.next;if(Z(t,n,r)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(A(t.x,t.y,n.x,n.y,r.x,r.y,o.x,o.y)&&Z(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function d(e,t,n,r){var o=e.prev,i=e,s=e.next;if(Z(o,i,s)>=0)return!1;for(var a=o.xi.x?o.x>s.x?o.x:s.x:i.x>s.x?i.x:s.x,f=o.y>i.y?o.y>s.y?o.y:s.y:i.y>s.y?i.y:s.y,l=m(a,u,t,n,r),c=m(x,f,t,n,r),y=e.prevZ,d=e.nextZ;y&&y.z>=l&&d&&d.z<=c;){if(y!==e.prev&&y!==e.next&&A(o.x,o.y,i.x,i.y,s.x,s.y,y.x,y.y)&&Z(y.prev,y,y.next)>=0)return!1;if(y=y.prevZ,d!==e.prev&&d!==e.next&&A(o.x,o.y,i.x,i.y,s.x,s.y,d.x,d.y)&&Z(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;y&&y.z>=l;){if(y!==e.prev&&y!==e.next&&A(o.x,o.y,i.x,i.y,s.x,s.y,y.x,y.y)&&Z(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;d&&d.z<=c;){if(d!==e.prev&&d!==e.next&&A(o.x,o.y,i.x,i.y,s.x,s.y,d.x,d.y)&&Z(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function h(e,t,n){var r=e;do{var o=r.prev,i=r.next.next;!M(o,i)&&F(o,r,r.next,i)&&k(o,i)&&k(i,o)&&(t.push(o.i/n),t.push(r.i/n),t.push(i.i/n),z(r),z(r.next),r=e=i),r=r.next}while(r!==e);return l(r)}function v(e,t,n,r,o,i){var s=e;do{for(var a=s.next.next;a!==s.prev;){if(s.i!==a.i&&E(s,a)){var u=S(s,a);return s=l(s,s.next),u=l(u,u.next),c(s,t,n,r,o,i),void c(u,t,n,r,o,i)}a=a.next}s=s.next}while(s!==e)}function p(e,t){return e.x-t.x}function g(e,t){var n=function(e,t){var n,r=t,o=e.x,i=e.y,s=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var a=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=o&&a>s){if(s=a,a===o){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x=r.x&&r.x>=f&&o!==r.x&&A(in.x||r.x===n.x&&b(n,r)))&&(n=r,c=u)),r=r.next}while(r!==x);return n}(e,t);if(!n)return t;var r=S(n,e),o=l(n,n.next);return l(r,r.next),t===n?o:t}function b(e,t){return Z(e.prev,e,t.prev)<0&&Z(t.next,e,e.next)<0}function m(e,t,n,r,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function w(e){var t=e,n=e;do{(t.x=0&&(e-s)*(r-a)-(n-s)*(t-a)>=0&&(n-s)*(i-a)-(o-s)*(r-a)>=0}function E(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&F(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(k(e,t)&&k(t,e)&&function(e,t){var n=e,r=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&o<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(Z(e.prev,e,t.prev)||Z(e,t.prev,t))||M(e,t)&&Z(e.prev,e,e.next)>0&&Z(t.prev,t,t.next)>0)}function Z(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function M(e,t){return e.x===t.x&&e.y===t.y}function F(e,t,n,r){var o=I(Z(e,t,n)),i=I(Z(e,t,r)),s=I(Z(n,r,e)),a=I(Z(n,r,t));return o!==i&&s!==a||(!(0!==o||!T(e,n,t))||(!(0!==i||!T(e,r,t))||(!(0!==s||!T(n,e,r))||!(0!==a||!T(n,t,r)))))}function T(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function I(e){return e>0?1:e<0?-1:0}function k(e,t){return Z(e.prev,e,e.next)<0?Z(e,t,e.next)>=0&&Z(e,e.prev,t)>=0:Z(e,t,e.prev)<0||Z(e,e.next,t)<0}function S(e,t){var n=new R(e.i,e.x,e.y),r=new R(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function U(e,t,n,r){var o=new R(e,t,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function z(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function R(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function B(e,t,n,r){for(var o=0,i=t,s=n-r;i0&&(r+=e[o-1].length,n.holes.push(r))}return n};const P=[],C={vertexPosition:0,indexPosition:0};function N(e,t,n,r,o){e[t+0]=n,e[t+1]=r,e[t+2]=o}function _(e,t,n,r,o,i){const s=3+o,a=e[t+0],u=e[t+1],x=P;x.length=o;for(let n=0;n0?u:2*Math.PI-u}const b=null!==o;let m=0,w=0;if(null!==r){m=g(h,v,s(f,[...[e[r],e[r+1]]]))}if(b){w=g(v,h,s(f,[...[e[o],e[o+1]]]))}i.push(y[0],y[1],d[0],d[1],p(0,m,w)),i.push(...u),i.push(y[0],y[1],d[0],d[1],p(1,m,w)),i.push(...u),i.push(y[0],y[1],d[0],d[1],p(2,m,w)),i.push(...u),i.push(y[0],y[1],d[0],d[1],p(3,m,w)),i.push(...u),a.push(c,c+1,c+2,c+1,c+3,c+2)}function G(e,t,n,r,o){const i=2+o;let s=t;const a=e.slice(s,s+o);s+=o;const x=e[s++];let f=0;const l=new Array(x-1);for(let t=0;t{const o=r.data;switch(o.type){case t:{const e=3,t=2,n=o.customAttributesCount,r=t+n,i=new Float32Array(o.renderInstructions),s=i.length/r,a=4*s*(n+e),u=new Uint32Array(6*s),x=new Float32Array(a);let f;for(let e=0;e0?s+(n-1)*r:null,nthis.addGeometry_(t,e)));break;case"MultiPolygon":t.getPolygons().map((t=>this.addGeometry_(t,e)));break;case"MultiLineString":t.getLineStrings().map((t=>this.addGeometry_(t,e)));break;case"MultiPoint":t.getPoints().map((t=>this.addGeometry_(t,e)));break;case"Polygon":const s=t;r=this.addFeatureEntryInPolygonBatch_(e),i=s.getFlatCoordinates(),n=i.length/2;const o=s.getLinearRingCount(),a=s.getEnds().map(((t,e,i)=>e>0?(t-i[e-1])/2:t/2));this.polygonBatch.verticesCount+=n,this.polygonBatch.ringsCount+=o,this.polygonBatch.geometriesCount++,r.flatCoordss.push(i),r.ringsVerticesCounts.push(a),r.verticesCount+=n,r.ringsCount+=o,s.getLinearRings().map((t=>this.addGeometry_(t,e)));break;case"Point":const l=t;r=this.addFeatureEntryInPointBatch_(e),i=l.getFlatCoordinates(),this.pointBatch.geometriesCount++,r.flatCoordss.push(i);break;case"LineString":case"LinearRing":const h=t;r=this.addFeatureEntryInLineStringBatch_(e),i=h.getFlatCoordinates(),n=i.length/2,this.lineStringBatch.verticesCount+=n,this.lineStringBatch.geometriesCount++,r.flatCoordss.push(i),r.verticesCount+=n}}changeFeature(t){this.clearFeatureEntryInPointBatch_(t),this.clearFeatureEntryInPolygonBatch_(t),this.clearFeatureEntryInLineStringBatch_(t);const e=t.getGeometry();e&&this.addGeometry_(e,t)}removeFeature(t){this.clearFeatureEntryInPointBatch_(t),this.clearFeatureEntryInPolygonBatch_(t),this.clearFeatureEntryInLineStringBatch_(t)}clear(){this.polygonBatch.entries={},this.polygonBatch.geometriesCount=0,this.polygonBatch.verticesCount=0,this.polygonBatch.ringsCount=0,this.lineStringBatch.entries={},this.lineStringBatch.geometriesCount=0,this.lineStringBatch.verticesCount=0,this.pointBatch.entries={},this.pointBatch.geometriesCount=0}}const xf={POSITION:"a_position",INDEX:"a_index"};class vf extends pf{constructor(t,e,i,n,r){super(t,e,i,n,r),this.attributes=[{name:xf.POSITION,size:2,type:Qu.FLOAT},{name:xf.INDEX,size:1,type:Qu.FLOAT}].concat(r.map((function(t){return{name:"a_"+t.name,size:1,type:Qu.FLOAT}})))}generateRenderInstructions(t){const e=(2+this.customAttributes.length)*t.geometriesCount;let i;t.renderInstructions&&t.renderInstructions.length===e||(t.renderInstructions=new Float32Array(e));const n=[];let r,s=0;for(const e in t.entries){i=t.entries[e];for(let e=0,o=i.flatCoordss.length;e 0.93) return normalPx - tangentPx;\n float halfAngle = joinAngle / 2.0;\n vec2 angleBisectorNormal = vec2(\n sin(halfAngle) * normalPx.x + cos(halfAngle) * normalPx.y,\n -cos(halfAngle) * normalPx.x + sin(halfAngle) * normalPx.y\n );\n float length = 1.0 / sin(halfAngle);\n return angleBisectorNormal * length;\n }\n\n void main(void) {\n float anglePrecision = 1500.0;\n float paramShift = 10000.0;\n v_angleStart = fract(a_parameters / paramShift) * paramShift / anglePrecision;\n v_angleEnd = fract(floor(a_parameters / paramShift + 0.5) / paramShift) * paramShift / anglePrecision;\n float vertexNumber = floor(a_parameters / paramShift / paramShift + 0.0001);\n vec2 tangentPx = worldToPx(a_segmentEnd) - worldToPx(a_segmentStart);\n tangentPx = normalize(tangentPx);\n vec2 normalPx = vec2(-tangentPx.y, tangentPx.x);\n float normalDir = vertexNumber < 0.5 || (vertexNumber > 1.5 && vertexNumber < 2.5) ? 1.0 : -1.0;\n float tangentDir = vertexNumber < 1.5 ? 1.0 : -1.0;\n float angle = vertexNumber < 1.5 ? v_angleStart : v_angleEnd;\n vec2 offsetPx = getOffsetDirection(normalPx * normalDir, tangentDir * tangentPx, angle) * a_width * 0.5;\n vec2 position = vertexNumber < 1.5 ? a_segmentStart : a_segmentEnd;\n gl_Position = u_projectionMatrix * vec4(position, 0.0, 1.0) + pxToScreen(offsetPx);\n v_segmentStart = worldToPx(a_segmentStart);\n v_segmentEnd = worldToPx(a_segmentEnd);\n v_color = ${Tf}\n v_opacity = a_opacity;\n v_width = a_width;\n }`,Pf="\n precision mediump float;\n uniform float u_pixelRatio;\n varying vec2 v_segmentStart;\n varying vec2 v_segmentEnd;\n varying float v_angleStart;\n varying float v_angleEnd;\n varying vec3 v_color;\n varying float v_opacity;\n varying float v_width;\n\n float segmentDistanceField(vec2 point, vec2 start, vec2 end, float radius) {\n vec2 startToPoint = point - start;\n vec2 startToEnd = end - start;\n float ratio = clamp(dot(startToPoint, startToEnd) / dot(startToEnd, startToEnd), 0.0, 1.0);\n float dist = length(startToPoint - ratio * startToEnd);\n return 1.0 - smoothstep(radius - 1.0, radius, dist);\n }\n\n void main(void) {\n vec2 v_currentPoint = gl_FragCoord.xy / u_pixelRatio;\n gl_FragColor = vec4(v_color, 1.0) * v_opacity;\n gl_FragColor *= segmentDistanceField(v_currentPoint, v_segmentStart, v_segmentEnd, v_width);\n }",If=`\n precision mediump float;\n uniform mat4 u_projectionMatrix;\n uniform mat4 u_offsetScaleMatrix;\n attribute vec2 a_position;\n attribute float a_index;\n attribute float a_color;\n attribute float a_opacity;\n varying vec2 v_texCoord;\n varying vec3 v_color;\n varying float v_opacity;\n\n void main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix;\n float size = 6.0;\n float offsetX = a_index == 0.0 || a_index == 3.0 ? -size / 2.0 : size / 2.0;\n float offsetY = a_index == 0.0 || a_index == 1.0 ? -size / 2.0 : size / 2.0;\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n v_texCoord = vec2(u, v);\n v_color = ${Tf}\n v_opacity = a_opacity;\n }`,Lf="\n precision mediump float;\n varying vec3 v_color;\n varying float v_opacity;\n\n void main(void) {\n gl_FragColor = vec4(v_color, 1.0) * v_opacity;\n }";function Mf(t){return Object.keys(t).map((e=>({name:e,callback:t[e]})))}const Ff=0,Af=1,Of=2,Nf=3,Df=4,kf=5,Gf=6,jf=7,Bf=8,Uf=9,zf=10,Xf=11,Vf=12,Wf=[Bf],Zf=[Vf],Yf=[Af],Kf=[Nf];class qf extends Cl{constructor(t,e,i,n){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))}appendFlatPointCoordinates(t,e){const i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,r=this.coordinates;let s=r.length;for(let o=0,a=t.length;oo&&(this.instructions.push([Df,o,l,t,i,Gn]),this.hitDetectionInstructions.push([Df,o,l,t,n||i,Gn]));break;case"Point":a=t.getFlatCoordinates(),this.coordinates.push(a[0],a[1]),l=this.coordinates.length,this.instructions.push([Df,o,l,t,i]),this.hitDetectionInstructions.push([Df,o,l,t,n||i])}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[Ff,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Ff,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;let e;t.reverse();const i=t.length;let n,r,s=-1;for(e=0;ethis.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(t){const e=t.fillStyle,i=[zf,e];return"string"!=typeof e&&i.push(!0),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[Xf,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,n=t.lineCap,r=t.lineDash,s=t.lineDashOffset,o=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||r!=t.currentLineDash&&!u(t.currentLineDash,r)||t.currentLineDashOffset!=s||t.currentLineJoin!=o||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=r,t.currentLineDashOffset=s,t.currentLineJoin=o,t.currentLineWidth=a,t.currentMiterLimit=l)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[jf,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Vt(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;Xt(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class Hf extends qf{constructor(t,e,i,n){super(t,e,i,n),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const i=t.getFlatCoordinates(),n=t.getStride(),r=this.coordinates.length,s=this.appendFlatPointCoordinates(i,n);this.instructions.push([Gf,r,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([Gf,r,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const i=t.getFlatCoordinates(),n=t.getStride(),r=this.coordinates.length,s=this.appendFlatPointCoordinates(i,n);this.instructions.push([Gf,r,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([Gf,r,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(t,e){const i=t.getAnchor(),n=t.getSize(),r=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=r[0],this.originY_=r[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=n[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}class $f extends qf{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinates_(t,e,i,n){const r=this.coordinates.length,s=this.appendFlatLineCoordinates(t,e,i,n,!1,!1),o=[Uf,r,s];return this.instructions.push(o),this.hitDetectionInstructions.push(o),i}drawLineString(t,e){const i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0===n||void 0===r)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Xf,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,ks,0],Yf);const s=t.getFlatCoordinates(),o=t.getStride();this.drawFlatCoordinates_(s,0,s.length,o),this.hitDetectionInstructions.push(Zf),this.endGeometry(e)}drawMultiLineString(t,e){const i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0===n||void 0===r)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Xf,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],Yf);const s=t.getEnds(),o=t.getFlatCoordinates(),a=t.getStride();let l=0;for(let t=0,e=s.length;tt&&(y>_&&(_=y,p=x,m=o),y=0,x=o-r)),a=l,u=g,d=f),h=i,c=n}return y+=l,y>_?[x,o]:[p,m]}const tp={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class ep extends qf{constructor(t,e,i,n){super(t,e,i,n),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e){const i=this.textFillState_,n=this.textStrokeState_,r=this.textState_;if(""===this.text_||!r||!i&&!n)return;const s=this.coordinates;let o=s.length;const a=t.getType();let l=null,h=t.getStride();if("line"!==r.placement||"LineString"!=a&&"MultiLineString"!=a&&"Polygon"!=a&&"MultiPolygon"!=a){let i=r.overflow?null:[];switch(a){case"Point":case"MultiPoint":l=t.getFlatCoordinates();break;case"LineString":l=t.getFlatMidpoint();break;case"Circle":l=t.getCenter();break;case"MultiLineString":l=t.getFlatMidpoints(),h=2;break;case"Polygon":l=t.getFlatInteriorPoint(),r.overflow||i.push(l[2]/this.resolution),h=3;break;case"MultiPolygon":const e=t.getFlatInteriorPoints();l=[];for(let t=0,n=e.length;t{const n=s[2*(t+i)]===l[i*h]&&s[2*(t+i)+1]===l[i*h+1];return n||--t,n}))}this.saveTextStates_(),(r.backgroundFill||r.backgroundStroke)&&(this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke),r.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),r.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let c=r.padding;if(c!=Xs&&(r.scale[0]<0||r.scale[1]<0)){let t=r.padding[0],e=r.padding[1],i=r.padding[2],n=r.padding[3];r.scale[0]<0&&(e=-e,n=-n),r.scale[1]<0&&(t=-t,i=-i),c=[t,e,i,n]}const u=this.pixelRatio;this.instructions.push([Gf,o,n,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,c==Xs?Xs:c.map((function(t){return t*u})),!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,i]);const d=1/u;this.hitDetectionInstructions.push([Gf,o,n,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[d,d],NaN,void 0,this.declutterImageWithText_,c,!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,i]),this.endGeometry(e)}else{if(!we(this.getBufferedMaxExtent(),t.getExtent()))return;let i;if(l=t.getFlatCoordinates(),"LineString"==a)i=[l.length];else if("MultiLineString"==a)i=t.getEnds();else if("Polygon"==a)i=t.getEnds().slice(0,1);else if("MultiPolygon"==a){const e=t.getEndss();i=[];for(let t=0,n=e.length;tt[2]}else R=v>C;const P=Math.PI,I=[],L=w+n===e;let M;if(m=0,_=E,d=t[e=w],g=t[e+1],L){y(),M=Math.atan2(g-p,d-f),R&&(M+=M>0?-P:P);const t=(C+v)/2,e=(b+S)/2;return I[0]=[t,e,(T-s)/2,M,r],I}for(let t=0,u=(r=r.replace(/\n/g," ")).length;t0?-P:P),void 0!==M){let t=v-M;if(t+=t>P?-2*P:t<-P?2*P:0,Math.abs(t)>o)return null}M=v;const S=t;let w=0;for(;t0&&t.push("\n",""),t.push(e,""),t}class pp{constructor(t,e,i,n){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={}}createLabel(t,e,i,n){const r=t+e+i+n;if(this.labels_[r])return this.labels_[r];const s=n?this.strokeStates[n]:null,o=i?this.fillStates[i]:null,a=this.textStates[e],l=this.pixelRatio,h=[a.scale[0]*l,a.scale[1]*l],c=Array.isArray(t),u=a.justify?tp[a.justify]:gp(Array.isArray(t)?t[0]:t,a.textAlign||Us),d=n&&s.lineWidth?s.lineWidth:0,g=c?t:t.split("\n").reduce(fp,[]),{width:f,height:p,widths:m,heights:_,lineWidths:y}=Qs(a,g),x=f+d,v=[],S=(x+2)*h[0],w=(p+d)*h[1],E={width:S<0?Math.floor(S):Math.ceil(S),height:w<0?Math.floor(w):Math.ceil(w),contextInstructions:v};1==h[0]&&1==h[1]||v.push("scale",h),n&&(v.push("strokeStyle",s.strokeStyle),v.push("lineWidth",d),v.push("lineCap",s.lineCap),v.push("lineJoin",s.lineJoin),v.push("miterLimit",s.miterLimit),v.push("setLineDash",[s.lineDash]),v.push("lineDashOffset",s.lineDashOffset)),i&&v.push("fillStyle",o.fillStyle),v.push("textBaseline","middle"),v.push("textAlign","center");const T=.5-u;let C=u*x+T*d;const b=[],R=[];let P,I=0,L=0,M=0,F=0;for(let t=0,e=g.length;tt?t-l:r,x=s+h>e?e-h:s,v=g[3]+y*u[0]+g[1],S=g[0]+x*u[1]+g[2],w=m-g[3],E=_-g[0];let T;return(f||0!==c)&&(ap[0]=w,cp[0]=w,ap[1]=E,lp[1]=E,lp[0]=w+v,hp[0]=lp[0],hp[1]=E+S,cp[1]=hp[1]),0!==c?(T=Mt([1,0,0,1,0,0],i,n,1,1,c,-i,-n),bt(T,ap),bt(T,lp),bt(T,hp),bt(T,cp),$t(Math.min(ap[0],lp[0],hp[0],cp[0]),Math.min(ap[1],lp[1],hp[1],cp[1]),Math.max(ap[0],lp[0],hp[0],cp[0]),Math.max(ap[1],lp[1],hp[1],cp[1]),op)):$t(Math.min(w,w+v),Math.min(E,E+S),Math.max(w,w+v),Math.max(E,E+S),op),d&&(m=Math.round(m),_=Math.round(_)),{drawImageX:m,drawImageY:_,drawImageW:y,drawImageH:x,originX:l,originY:h,declutterBox:{minX:op[0],minY:op[1],maxX:op[2],maxY:op[3],value:p},canvasTransform:T,scale:u}}replayImageOrLabel_(t,e,i,n,r,s,o){const a=!(!s&&!o),l=n.declutterBox,h=t.canvas,c=o?o[2]*n.scale[0]/2:0;return l.minX-c<=h.width/e&&l.maxX+c>=0&&l.minY-c<=h.height/e&&l.maxY+c>=0&&(a&&this.replayTextBackground_(t,ap,lp,hp,cp,s,o),to(t,n.canvasTransform,r,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0}fill_(t){if(this.alignFill_){const e=bt(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,i,n){const r=this.textStates[e],s=this.createLabel(t,e,n,i),o=this.strokeStates[i],a=this.pixelRatio,l=gp(Array.isArray(t)?t[0]:t,r.textAlign||Us),h=tp[r.textBaseline||zs],c=o&&o.lineWidth?o.lineWidth:0;return{label:s,anchorX:l*(s.width/a-2*r.scale[0])+2*(.5-l)*c,anchorY:h*s.height/a+2*(.5-h)*c}}execute_(t,e,i,n,r,s,o,a){let l;this.pixelCoordinates_&&u(i,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=un(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),Ct(this.renderedTransform_,i));let h=0;const c=n.length;let d,g,f,p,m,_,y,x,v,S,w,E,T=0,C=0,b=0,R=null,P=null;const I=this.coordinateCache_,L=this.viewRotation_,M=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,F={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:L},A=this.instructions!=n||this.overlaps?0:200;let O,N,D,k;for(;hA&&(this.fill_(t),C=0),b>A&&(t.stroke(),b=0),C||b||(t.beginPath(),p=NaN,m=NaN),++h;break;case Of:T=i[1];const n=l[T],c=l[T+1],u=l[T+2]-n,G=l[T+3]-c,j=Math.sqrt(u*u+G*G);t.moveTo(n+j,c),t.arc(n,c,j,0,2*Math.PI,!0),++h;break;case Nf:t.closePath(),++h;break;case Df:T=i[1],d=i[2];const B=i[3],U=i[4],z=6==i.length?i[5]:void 0;F.geometry=B,F.feature=O,h in I||(I[h]=[]);const X=I[h];z?z(l,T,d,2,X):(X[0]=l[T],X[1]=l[T+1],X.length=2),U(X,F),++h;break;case Gf:T=i[1],d=i[2],x=i[3],g=i[4],f=i[5];let V=i[6];const W=i[7],Z=i[8],Y=i[9],K=i[10];let q=i[11];const H=i[12];let $=i[13];const J=i[14],Q=i[15];if(!x&&i.length>=20){v=i[19],S=i[20],w=i[21],E=i[22];const t=this.drawLabelWithPointPlacement_(v,S,w,E);x=t.label,i[3]=x;const e=i[23];g=(t.anchorX-e)*this.pixelRatio,i[4]=g;const n=i[24];f=(t.anchorY-n)*this.pixelRatio,i[5]=f,V=x.height,i[6]=V,$=x.width,i[13]=$}let tt,et,it,nt;i.length>25&&(tt=i[25]),i.length>17?(et=i[16],it=i[17],nt=i[18]):(et=Xs,it=!1,nt=!1),K&&M?q+=L:K||M||(q-=L);let rt=0;for(;T0){if(!s||"Image"!==g&&"Text"!==g||s.includes(t)){const i=(d[a]-3)/4,s=n-i%o,l=n-(i/o|0),h=r(t,e,s*s+l*l);if(h)return h}c.clearRect(0,0,o,o);break}}const p=Object.keys(this.executorsByZIndex_).map(Number);let m,_,y,x,v;for(p.sort(a),m=p.length-1;m>=0;--m){const t=p[m].toString();for(y=this.executorsByZIndex_[t],_=mp.length-1;_>=0;--_)if(g=mp[_],x=y[g],void 0!==x&&(v=x.executeHitDetection(c,l,i,f,u),v))return v}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],n=e[1],r=e[2],s=e[3],o=[i,n,i,s,r,s,r,n];return un(o,0,8,2,t,o),o}isEmpty(){return x(this.executorsByZIndex_)}execute(t,e,i,n,r,s,o){const l=Object.keys(this.executorsByZIndex_).map(Number);let h,c,u,d,g,f;for(l.sort(a),this.maxExtent_&&(t.save(),this.clip(t,i)),s=s||mp,o&&l.reverse(),h=0,c=l.length;hi)break;let a=n[o];a||(a=[],n[o]=a),a.push(4*((t+r)*e+(t+s))+3),r>0&&a.push(4*((t-r)*e+(t+s))+3),s>0&&(a.push(4*((t+r)*e+(t-s))+3),r>0&&a.push(4*((t-r)*e+(t-s))+3))}const r=[];for(let t=0,e=n.length;tu[2];)++c,o=r*c,a.push(this.getRenderTransform(e,i,n,vp,l,h,o).slice()),t-=r}this.hitDetectionImageData_=Sp(t,a,this.renderedFeatures_,o.getStyleFunction(),s,i,n)}e(wp(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))}forEachFeatureAtCoordinate(t,e,i,n,r){if(!this.replayGroup_)return;const s=e.viewState.resolution,o=e.viewState.rotation,a=this.getLayer(),l={},h=function(t,e,i){const s=z(t),o=l[s];if(o){if(!0!==o&&ic=n.forEachFeatureAtCoordinate(t,s,o,i,h,n===this.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map((t=>t.value)):null))),c}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),i=e.getSource();if(!i)return!1;const n=t.viewHints[Ro],r=t.viewHints[Po],s=e.getUpdateWhileAnimating(),o=e.getUpdateWhileInteracting();if(this.ready&&!s&&n||!o&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const a=t.extent,l=t.viewState,h=l.projection,c=l.resolution,d=t.pixelRatio,g=e.getRevision(),f=e.getRenderBuffer();let p=e.getRenderOrder();void 0===p&&(p=Pl);const m=l.center.slice(),_=Xt(a,f*c),y=_.slice(),x=[_.slice()],v=h.getExtent();if(i.getWrapX()&&h.canWrapX()&&!Yt(v,t.extent)){const t=Se(v),e=Math.max(Se(_)/2,t);_[0]=v[0]-e,_[2]=v[2]+e,Pi(m,h);const i=Pe(x[0],h);i[0]v[0]&&i[2]>v[2]&&x.push([i[0]-t,i[1],i[2]-t,i[3]])}if(this.ready&&this.renderedResolution_==c&&this.renderedRevision_==g&&this.renderedRenderOrder_==p&&Yt(this.wrappedRenderedExtent_,_))return u(this.renderedExtent_,y)||(this.hitDetectionImageData_=null,this.renderedExtent_=y),this.renderedCenter_=m,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const S=new np(Ll(c,d),_,c,d);let w;this.getLayer().getDeclutter()&&(w=new np(Ll(c,d),_,c,d));const E=en();let T;if(E){for(let t=0,e=x.length;tt([])));const e=bt(this.coordinateToVectorPixelTransform_,bt(this.renderedPixelToCoordinateTransform_,t.slice()));return this.vectorRenderer_.getFeatures(e)}handleFontsChanged(){this.vectorRenderer_.handleFontsChanged()}prepareFrame(t){const e=t.pixelRatio,i=t.viewState,n=i.resolution,r=t.viewHints,s=this.vectorRenderer_;let o=t.extent;1!==this.layerImageRatio_&&(o=o.slice(0),Ce(o,this.layerImageRatio_));const a=Se(o)/n,l=_e(o)/n;if(!r[Ro]&&!r[Po]&&!Ee(o)){s.useContainer(null,null);const r=s.context,h=t.layerStatesArray[t.layerIndex];r.globalAlpha=h.opacity;const c=Object.assign({},h,{opacity:1}),u=Object.assign({},t,{declutterTree:new xh(9),extent:o,size:[a,l],viewState:Object.assign({},t.viewState,{rotation:0}),layerStatesArray:[c],layerIndex:0});let d=!0;const g=new Nr(o,n,e,r.canvas,(function(t){s.prepareFrame(u)&&s.replayGroupChanged&&(s.clipping=!1,s.renderFrame(u,null)&&(s.renderDeclutter(u),d=!1),t())}));g.addEventListener(S,function(){if(g.getState()!==Lr)return;this.image_=d?null:g;const t=g.getResolution(),n=g.getPixelRatio(),r=t*e/n;this.renderedResolution=r,this.coordinateToVectorPixelTransform_=Mt(this.coordinateToVectorPixelTransform_,a/2,l/2,1/r,-1/r,0,-i.center[0],-i.center[1])}.bind(this)),g.load()}return this.image_&&(this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice()),!!this.image_}preRender(){}postRender(){}renderDeclutter(){}forEachFeatureAtCoordinate(t,e,i,n,r){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(t,e,i,n,r):super.forEachFeatureAtCoordinate(t,e,i,n,r)}}const Cp={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},bp={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class Rp extends Oc{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.tmpTransform_=[1,0,0,1,0,0]}prepareTile(t,e,i){let n;const r=t.getState();return r!==J&&r!==Q||(this.updateExecutorGroup_(t,e,i),this.tileImageNeedsRender_(t)&&(n=!0)),n}getTile(t,e,i,n){const r=n.pixelRatio,s=n.viewState,o=s.resolution,a=s.projection,l=this.getLayer(),h=l.getSource().getTile(t,e,i,r,a),c=n.viewHints,u=!(c[Ro]||c[Po]);!u&&h.wantedResolution||(h.wantedResolution=o);return this.prepareTile(h,r,a)&&(u||Date.now()-n.time<8)&&"vector"!==l.getRenderMode()&&this.renderTileImage_(h,n),super.getTile(t,e,i,n)}isDrawableTile(t){const e=this.getLayer();return super.isDrawableTile(t)&&("vector"===e.getRenderMode()?z(e)in t.executorGroups:t.hasContext(e))}getTileImage(t){return t.getImage(this.getLayer())}prepareFrame(t){const e=this.getLayer().getRevision();return this.renderedLayerRevision_!==e&&(this.renderedLayerRevision_=e,this.renderedTiles.length=0),super.prepareFrame(t)}updateExecutorGroup_(t,e,i){const n=this.getLayer(),r=n.getRevision(),s=n.getRenderOrder()||null,o=t.wantedResolution,a=t.getReplayState(n);if(!a.dirty&&a.renderedResolution===o&&a.renderedRevision==r&&a.renderedRenderOrder==s)return;const l=n.getSource(),h=n.getDeclutter(),c=l.getTileGrid(),u=l.getTileGridForProjection(i).getTileCoordExtent(t.wrappedTileCoord),d=l.getSourceTiles(e,i,t),g=z(n);delete t.hitDetectionImageData[g],t.executorGroups[g]=[],h&&(t.declutterExecutorGroups[g]=[]),a.dirty=!1;for(let i=0,r=d.length;i{const r=n===p?e.declutterTree.all().map((t=>t.value)):null;for(let e=0,a=n.length;e0)return void e([]);const g=xe(h.getTileCoordExtent(d.wrappedTileCoord)),f=[(c[0]-g[0])/l,(g[1]-c[1])/l],p=d.getSourceTiles().reduce((function(t,e){return t.concat(e.getFeatures())}),[]);let m=d.hitDetectionImageData[r];if(!m&&!this.animatingOrInteracting_){const t=Va(h.getTileSize(h.getZForResolution(l,s.zDirection))),e=this.renderedRotation_;m=Sp(t,[this.getRenderTransform(h.getTileCoordCenter(d.wrappedTileCoord),l,0,vp,t[0]*vp,t[1]*vp,0)],p,n.getStyleFunction(),h.getTileCoordExtent(d.wrappedTileCoord),d.getReplayState(n).renderedResolution,e),d.hitDetectionImageData[r]=m}e(wp(f,p,m))}.bind(this))}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&void 0!==this.renderedLayerRevision_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}renderDeclutter(t){const e=this.context,i=e.globalAlpha;e.globalAlpha=this.getLayer().getOpacity();const n=t.viewHints,r=!(n[Ro]||n[Po]),s=this.renderedTiles;for(let e=0,i=s.length;e=0;--e)n[e].execute(this.context,1,this.getTileRenderTransform(i,t),t.viewState.rotation,r,void 0,t.declutterTree)}e.globalAlpha=i}getTileRenderTransform(t,e){const i=e.pixelRatio,n=e.viewState,r=n.center,s=n.resolution,o=n.rotation,a=e.size,l=Math.round(a[0]*i),h=Math.round(a[1]*i),c=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),u=t.tileCoord,d=c.getTileCoordExtent(t.wrappedTileCoord),g=c.getTileCoordExtent(u,this.tmpExtent)[0]-d[0];return Et(Pt(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(r,s,o,i,l,h,g))}postRender(t,e){const i=e.viewHints,n=!(i[Ro]||i[Po]);this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;const r=this.getLayer(),s=r.getRenderMode(),o=t.globalAlpha;t.globalAlpha=r.getOpacity();const a=bp[s],l=e.viewState,h=l.rotation,c=r.getSource(),u=c.getTileGridForProjection(l.projection).getZForResolution(l.resolution,c.zDirection),d=this.renderedTiles,g=[],f=[];let p=!0;for(let i=d.length-1;i>=0;--i){const s=d[i];p=p&&!s.getReplayState(r).dirty;const o=s.executorGroups[z(r)].filter((t=>t.hasExecutors(a)));if(0===o.length)continue;const l=this.getTileRenderTransform(s,e),c=s.tileCoord[0];let m=!1;const _=o[0].getClipCoords(l);if(_){for(let e=0,i=g.length;e=e[0]||(t[1]<=e[1]&&t[3]>=e[1]||he(t,this.intersectsCoordinate.bind(this)))}return!1}setCenter(t){const e=this.stride,i=this.flatCoordinates[e]-this.flatCoordinates[0],n=t.slice();n[e]=n[0]+i;for(let i=1;i1?a:2,s=s||new Array(a);for(let e=0;e>1;r1?new Gp(i,"XY",r):new ur(i,"XY",n);default:throw new Error("Invalid geometry type:"+e)}}Bp.prototype.getEndss=Bp.prototype.getEnds,Bp.prototype.getFlatCoordinates=Bp.prototype.getOrientedFlatCoordinates;class zp extends Ig{constructor(t){super(t)}createRenderer(){return new Ep(this)}}function Xp(t,e,i){const n=[];let r=t(0),s=t(1),o=e(r),a=e(s);const l=[s,r],h=[a,o],c=[1,0],u={};let d,g,f,p,m,_,y=1e5;for(;--y>0&&c.length>0;)f=c.pop(),r=l.pop(),o=h.pop(),_=f.toString(),_ in u||(n.push(o[0],o[1]),u[_]=!0),p=c.pop(),s=l.pop(),a=h.pop(),m=(f+p)/2,d=t(m),g=e(d),ni(g[0],g[1],o[0],o[1],a[0],a[1]) */ -read:function(t,e,i,n,r){var s,o,a=8*r-n-1,l=(1<>1,c=-7,u=i?r-1:0,d=i?-1:1,g=t[e+u];for(u+=d,s=g&(1<<-c)-1,g>>=-c,c+=a;c>0;s=256*s+t[e+u],u+=d,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=n;c>0;o=256*o+t[e+u],u+=d,c-=8);if(0===s)s=1-h;else{if(s===l)return o?NaN:1/0*(g?-1:1);o+=Math.pow(2,n),s-=h}return(g?-1:1)*o*Math.pow(2,s-n)},write:function(t,e,i,n,r,s){var o,a,l,h=8*s-r-1,c=(1<>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:s-1,f=n?1:-1,p=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+u>=1?d/l:d*Math.pow(2,1-u))*l>=2&&(o++,l/=2),o+u>=c?(a=0,o=c):o+u>=1?(a=(e*l-1)*Math.pow(2,r),o+=u):(a=e*Math.pow(2,u-1)*Math.pow(2,r),o=0));r>=8;t[i+g]=255&a,g+=f,a/=256,r-=8);for(o=o<0;t[i+g]=255&o,g+=f,o/=256,h-=8);t[i+g-f]|=128*p}},im=rm,nm=em;function rm(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}rm.Varint=0,rm.Fixed64=1,rm.Bytes=2,rm.Fixed32=5;var sm=4294967296,om=1/sm,am="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function lm(t){return t.type===rm.Bytes?t.readVarint()+t.pos:t.pos+1}function hm(t,e,i){return i?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function cm(t,e,i){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=t;r--)i.buf[r+n]=i.buf[r]}function um(t,e){for(var i=0;i>>8,t[i+2]=e>>>16,t[i+3]=e>>>24}function wm(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}rm.prototype={destroy:function(){this.buf=null},readFields:function(t,e,i){for(i=i||this.length;this.pos>3,s=this.pos;this.type=7&n,t(r,e,this),this.pos===s&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=vm(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=wm(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=vm(this.buf,this.pos)+vm(this.buf,this.pos+4)*sm;return this.pos+=8,t},readSFixed64:function(){var t=vm(this.buf,this.pos)+wm(this.buf,this.pos+4)*sm;return this.pos+=8,t},readFloat:function(){var t=nm.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=nm.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,i,n=this.buf;return e=127&(i=n[this.pos++]),i<128?e:(e|=(127&(i=n[this.pos++]))<<7,i<128?e:(e|=(127&(i=n[this.pos++]))<<14,i<128?e:(e|=(127&(i=n[this.pos++]))<<21,i<128?e:function(t,e,i){var n,r,s=i.buf;if(r=s[i.pos++],n=(112&r)>>4,r<128)return hm(t,n,e);if(r=s[i.pos++],n|=(127&r)<<3,r<128)return hm(t,n,e);if(r=s[i.pos++],n|=(127&r)<<10,r<128)return hm(t,n,e);if(r=s[i.pos++],n|=(127&r)<<17,r<128)return hm(t,n,e);if(r=s[i.pos++],n|=(127&r)<<24,r<128)return hm(t,n,e);if(r=s[i.pos++],n|=(1&r)<<31,r<128)return hm(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(i=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&am?function(t,e,i){return am.decode(t.subarray(e,i))}(this.buf,e,t):function(t,e,i){var n="",r=e;for(;r239?4:l>223?3:l>191?2:1;if(r+c>i)break;1===c?l<128&&(h=l):2===c?128==(192&(s=t[r+1]))&&(h=(31&l)<<6|63&s)<=127&&(h=null):3===c?(s=t[r+1],o=t[r+2],128==(192&s)&&128==(192&o)&&((h=(15&l)<<12|(63&s)<<6|63&o)<=2047||h>=55296&&h<=57343)&&(h=null)):4===c&&(s=t[r+1],o=t[r+2],a=t[r+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&((h=(15&l)<<18|(63&s)<<12|(63&o)<<6|63&a)<=65535||h>=1114112)&&(h=null)),null===h?(h=65533,c=1):h>65535&&(h-=65536,n+=String.fromCharCode(h>>>10&1023|55296),h=56320|1023&h),n+=String.fromCharCode(h),r+=c}return n}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==rm.Bytes)return t.push(this.readVarint(e));var i=lm(this);for(t=t||[];this.pos127;);else if(e===rm.Bytes)this.pos=this.readVarint()+this.pos;else if(e===rm.Fixed32)this.pos+=4;else{if(e!==rm.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455||t<0?function(t,e){var i,n;t>=0?(i=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(i=~(-t%4294967296))?i=i+1|0:(i=0,n=n+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,i){i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos]=127&t}(i,0,e),function(t,e){var i=(7&t)<<4;if(e.buf[e.pos++]|=i|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;e.buf[e.pos++]=127&t}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,i){for(var n,r,s=0;s55295&&n<57344){if(!r){n>56319||s+1===e.length?(t[i++]=239,t[i++]=191,t[i++]=189):r=n;continue}if(n<56320){t[i++]=239,t[i++]=191,t[i++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(t[i++]=239,t[i++]=191,t[i++]=189,r=null);n<128?t[i++]=n:(n<2048?t[i++]=n>>6|192:(n<65536?t[i++]=n>>12|224:(t[i++]=n>>18|240,t[i++]=n>>12&63|128),t[i++]=n>>6&63|128),t[i++]=63&n|128)}return i}(this.buf,t,this.pos);var i=this.pos-e;i>=128&&cm(e,i,this),this.pos=e-1,this.writeVarint(i),this.pos+=i},writeFloat:function(t){this.realloc(4),nm.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),nm.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var i=0;i=128&&cm(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,i){this.writeTag(t,rm.Bytes),this.writeRawMessage(e,i)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,um,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,dm,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,pm,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,gm,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,fm,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,mm,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,_m,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,ym,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,xm,e)},writeBytesField:function(t,e){this.writeTag(t,rm.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,rm.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,rm.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,rm.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,rm.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,rm.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,rm.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,rm.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,rm.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,rm.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};class Em extends Jp{constructor(t){super(),t=t||{},this.dataProjection=new Ae({code:"",units:"tile-pixels"}),this.featureClass_=t.featureClass?t.featureClass:Bp,this.geometryName_=t.geometryName,this.layerName_=t.layerName?t.layerName:"layer",this.layers_=t.layers?t.layers:null,this.idProperty_=t.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(t,e,i,n){t.pos=e.geometry;const r=t.readVarint()+t.pos;let s=1,o=0,a=0,l=0,h=0,c=0;for(;t.pos>3}o--,1===s||2===s?(a+=t.readSVarint(),l+=t.readSVarint(),1===s&&h>c&&(n.push(h),c=h),i.push(a,l),h+=2):7===s?h>c&&(i.push(i[c],i[c+1]),h+=2):at(!1,59)}h>c&&(n.push(h),c=h)}createFeature_(t,e,i){const n=e.type;if(0===n)return null;let r;const s=e.properties;let o;this.idProperty_?(o=s[this.idProperty_],delete s[this.idProperty_]):o=e.id,s[this.layerName_]=e.layer.name;const a=[],l=[];this.readRawGeometry_(t,e,a,l);const h=function(t,e){let i;1===t?i=1===e?"Point":"MultiPoint":2===t?i=1===e?"LineString":"MultiLineString":3===t&&(i="Polygon");return i}(n,l.length);if(this.featureClass_===Bp)r=new this.featureClass_(h,a,l,s,o),r.transform(i.dataProjection);else{let t;if("Polygon"==h){const e=cr(a,l);t=e.length>1?new Gp(a,"XY",e):new ur(a,"XY",l)}else t="Point"===h?new Wn(a,"XY"):"LineString"===h?new Op(a,"XY"):"MultiPoint"===h?new Dp(a,"XY"):"MultiLineString"===h?new Np(a,"XY",l):null;r=new(0,this.featureClass_),this.geometryName_&&r.setGeometryName(this.geometryName_);const e=Qp(t,!1,i);r.setGeometry(e),void 0!==o&&r.setId(o),r.setProperties(s,!0)}return r}getType(){return"arraybuffer"}readFeatures(t,e){const i=this.layers_,n=Ui((e=this.adaptOptions(e)).dataProjection);n.setWorldExtent(e.extent),e.dataProjection=n;const r=new im(t),s=r.readFields(Tm,{}),o=[];for(const t in s){if(i&&!i.includes(t))continue;const a=s[t],l=a?[0,0,a.extent,a.extent]:null;n.setExtent(l);for(let t=0,i=a.length;t>3)?i.readString():2===t?i.readFloat():3===t?i.readDouble():4===t?i.readVarint64():5===t?i.readVarint():6===t?i.readSVarint():7===t?i.readBoolean():null;e.values.push(n)}}function bm(t,e,i){if(1==t)e.id=i.readVarint();else if(2==t){const t=i.readVarint()+i.pos;for(;i.pos1&&!t.variables)throw new Error(`Missing variables in style (expected ${n.variables})`);for(let e=0;e ${fd.RENDER_EXTENT}[2] ||\n v_mapCoord[1] > ${fd.RENDER_EXTENT}[3]\n ) {\n discard;\n }\n\n vec4 color = texture2D(${fd.TILE_TEXTURE_ARRAY}[0], v_textureCoord);\n\n ${r.join("\n")}\n\n if (color.a == 0.0) {\n discard;\n }\n\n gl_FragColor = color;\n gl_FragColor.rgb *= gl_FragColor.a;\n gl_FragColor *= ${fd.TRANSITION_ALPHA};\n }`,uniforms:s,paletteTextures:n.paletteTextures}}class Mm extends Ac{constructor(t){const e=(t=t?Object.assign({},t):{}).style||{};delete t.style;const i=t.cacheSize;delete t.cacheSize,super(t),this.sources_=t.sources,this.renderedSource_=null,this.renderedResolution_=NaN,this.style_=e,this.cacheSize_=i,this.styleVariables_=this.style_.variables||{},this.addChangeListener(ds,this.handleSourceUpdate_)}getSources(t,e){const i=this.getSource();return this.sources_?"function"==typeof this.sources_?this.sources_(t,e):this.sources_:i?[i]:[]}getRenderSource(){return this.renderedSource_||this.getSource()}getSourceState(){const t=this.getRenderSource();return t?t.getState():"undefined"}handleSourceUpdate_(){this.hasRenderer()&&this.getRenderer().clearCache(),this.getSource()&&this.setStyle(this.style_)}getSourceBandCount_(){const t=Number.MAX_SAFE_INTEGER,e=this.getSources([-t,-t,t,t],t);return e&&e.length&&"bandCount"in e[0]?e[0].bandCount:4}createRenderer(){const t=Lm(this.style_,this.getSourceBandCount_());return new wd(this,{vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,cacheSize:this.cacheSize_,paletteTextures:t.paletteTextures})}renderSources(t,e){const i=this.getRenderer();let n;for(let r=0,s=e.length;r{"ready"==e.getState()&&(e.removeEventListener("change",t),this.changed())};e.addEventListener("change",t)}r=r&&"ready"==i}const s=this.renderSources(t,n);if(this.getRenderer().renderComplete&&r)return this.renderedResolution_=i.resolution,s;if(this.renderedResolution_>.5*i.resolution){const e=this.getSources(t.extent,this.renderedResolution_).filter((t=>!n.includes(t)));if(e.length>0)return this.renderSources(t,e)}return s}setStyle(t){this.styleVariables_=t.variables||{},this.style_=t;const e=Lm(this.style_,this.getSourceBandCount_());this.getRenderer().reset({vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,uniforms:e.uniforms,paletteTextures:e.paletteTextures}),this.changed()}updateStyleVariables(t){Object.assign(this.styleVariables_,t),this.changed()}}Mm.prototype.dispose;const Fm="addfeatures";class Am extends i{constructor(t,e,i,n){super(t),this.features=i,this.file=e,this.projection=n}}const Om="drawstart",Nm="drawend",Dm="drawabort";class km extends i{constructor(t,e){super(t),this.feature=e}}function Gm(t,e){return ri(t[0],t[1],e[0],e[1])}function jm(t,e){const i=t.length;return e<0?t[e+i]:e>=i?t[e-i]:t[e]}function Bm(t,e,i){let n,r;eo){return Gm(Zm(t,n),Zm(t,r))}let a=0;if(n=i?n-=i:n<0&&(n+=i);let s=n+1;s>=i&&(s-=i);const o=t[n],a=o[0],l=o[1],h=t[s];return[a+(h[0]-a)*r,l+(h[1]-l)*r]}function Ym(){const t=fg();return function(e,i){return t[e.getGeometry().getType()]}}const Km="extentchanged";class qm extends i{constructor(t){super(Km),this.extent=t}}function Hm(){const t=fg();return function(e,i){return t.Polygon}}function $m(){const t=fg();return function(e,i){return t.Point}}function Jm(t){return function(e){return zt([t,e])}}function Qm(t,e){return t[0]==e[0]?function(i){return zt([t,[i[0],e[1]]])}:t[1]==e[1]?function(i){return zt([t,[e[0],i[1]]])}:null}function t_(t){return parseFloat(t)}function e_(t){return function(t){return ci(t,5)}(t).toString()}function i_(t,e){return!isNaN(t)&&t!==t_(e_(e))}const n_=[0,0,0,0],r_=[],s_="modifystart",o_="modifyend";class a_ extends i{constructor(t,e,i){super(t),this.features=e,this.mapBrowserEvent=i}}function l_(t,e){return t.index-e.index}function h_(t,e,i){const n=e.geometry;if("Circle"===n.getType()){let r=n;if(1===e.index){const e=en();e&&(r=r.clone().transform(e,i));const n=Ti(r.getCenter(),rn(t,i)),s=Math.sqrt(n)-r.getRadius();return s*s}}const r=rn(t,i);return r_[0]=rn(e.segment[0],i),r_[1]=rn(e.segment[1],i),bi(r,r_)}function c_(t,e,i){const n=e.geometry;if("Circle"===n.getType()&&1===e.index){let e=n;const r=en();return r&&(e=e.clone().transform(r,i)),nn(e.getClosestPoint(rn(t,i)),i)}const r=rn(t,i);return r_[0]=rn(e.segment[0],i),r_[1]=rn(e.segment[1],i),nn(yi(r,r_),i)}function u_(){const t=fg();return function(e,i){return t.Point}}const d_="select";class g_ extends i{constructor(t,e,i,n){super(t),this.selected=e,this.deselected=i,this.mapBrowserEvent=n}}const f_={};class p_ extends ea{constructor(t){let e;if(super(),this.on,this.once,this.un,t=t||{},this.boundAddFeature_=this.addFeature_.bind(this),this.boundRemoveFeature_=this.removeFeature_.bind(this),this.condition_=t.condition?t.condition:pa,this.addCondition_=t.addCondition?t.addCondition:fa,this.removeCondition_=t.removeCondition?t.removeCondition:fa,this.toggleCondition_=t.toggleCondition?t.toggleCondition:_a,this.multi_=!!t.multi&&t.multi,this.filter_=t.filter?t.filter:g,this.hitTolerance_=t.hitTolerance?t.hitTolerance:0,this.style_=void 0!==t.style?t.style:function(){const t=fg();return c(t.Polygon,t.LineString),c(t.GeometryCollection,t.LineString),function(e){return e.getGeometry()?t[e.getGeometry().getType()]:null}}(),this.features_=t.features||new q,t.layers)if("function"==typeof t.layers)e=t.layers;else{const i=t.layers;e=function(t){return i.includes(t)}}else e=g;this.layerFilter_=e,this.featureLayerAssociation_={}}addFeatureLayerAssociation_(t,e){this.featureLayerAssociation_[z(t)]=e}getFeatures(){return this.features_}getHitTolerance(){return this.hitTolerance_}getLayer(t){return this.featureLayerAssociation_[z(t)]}setHitTolerance(t){this.hitTolerance_=t}setMap(t){this.getMap()&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),super.setMap(t),t?(this.features_.addEventListener(W,this.boundAddFeature_),this.features_.addEventListener(Z,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(W,this.boundAddFeature_),this.features_.removeEventListener(Z,this.boundRemoveFeature_))}addFeature_(t){const e=t.element;if(this.style_&&this.applySelectedStyle_(e),!this.getLayer(e)){const t=this.getMap().getAllLayers().find((function(t){if(t instanceof zp&&t.getSource()&&t.getSource().hasFeature(e))return t}));t&&this.addFeatureLayerAssociation_(e,t)}}removeFeature_(t){this.style_&&this.restorePreviousStyle_(t.element)}getStyle(){return this.style_}applySelectedStyle_(t){const e=z(t);e in f_||(f_[e]=t.getStyle()),t.setStyle(this.style_)}restorePreviousStyle_(t){const e=this.getMap().getInteractions().getArray();for(let i=e.length-1;i>=0;--i){const n=e[i];if(n!==this&&n instanceof p_&&n.getStyle()&&-1!==n.getFeatures().getArray().lastIndexOf(t))return void t.setStyle(n.getStyle())}const i=z(t);t.setStyle(f_[i]),delete f_[i]}removeFeatureLayerAssociation_(t){delete this.featureLayerAssociation_[z(t)]}handleEvent(t){if(!this.condition_(t))return!0;const e=this.addCondition_(t),i=this.removeCondition_(t),n=this.toggleCondition_(t),r=!e&&!i&&!n,s=t.map,o=this.getFeatures(),a=[],l=[];if(r){y(this.featureLayerAssociation_),s.forEachFeatureAtPixel(t.pixel,function(t,e){if(t instanceof lt&&this.filter_(t,e))return this.addFeatureLayerAssociation_(t,e),l.push(t),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let t=o.getLength()-1;t>=0;--t){const e=o.item(t),i=l.indexOf(e);i>-1?l.splice(i,1):(o.remove(e),a.push(e))}0!==l.length&&o.extend(l)}else{s.forEachFeatureAtPixel(t.pixel,function(t,r){if(t instanceof lt&&this.filter_(t,r))return!e&&!n||o.getArray().includes(t)?(i||n)&&o.getArray().includes(t)&&(a.push(t),this.removeFeatureLayerAssociation_(t)):(this.addFeatureLayerAssociation_(t,r),l.push(t)),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let t=a.length-1;t>=0;--t)o.remove(a[t]);o.extend(l)}return(l.length>0||a.length>0)&&this.dispatchEvent(new g_(d_,l,a,t)),!0}}function m_(t){return t.feature?t.feature:t.element?t.element:void 0}const __=[];const y_="translatestart",x_="translating",v_="translateend";class S_ extends i{constructor(t,e,i,n,r){super(t),this.features=e,this.coordinate=i,this.startCoordinate=n,this.mapBrowserEvent=r}}function w_(t,e,i,n,r,s){void 0!==r?s=void 0!==s?s:0:(r=[],s=0);let o=e;for(;o=0;e--)r.push(n[t][e]);return{hasZ:i.hasZ,hasM:i.hasM,rings:r}}};function R_(t,e){if(!t)return null;let i;if("number"==typeof t.x&&"number"==typeof t.y)i="Point";else if(t.points)i="MultiPoint";else if(t.paths){i=1===t.paths.length?"LineString":"MultiLineString"}else if(t.rings){const e=t,n=P_(e),r=function(t,e){const i=[],n=[],r=[];let s,o;for(s=0,o=t.length;s=0;s--){const i=n[s][0];if(Yt(new Vn(i).getExtent(),new Vn(t).getExtent())){n[s].push(t),e=!0;break}}e||n.push([t.reverse()])}return n}(e.rings,n);1===r.length?(i="Polygon",t=Object.assign({},t,{rings:r[0]})):(i="MultiPolygon",t=Object.assign({},t,{rings:r}))}return Qp((0,C_[i])(t),!1,e)}function P_(t){let e="XY";return!0===t.hasZ&&!0===t.hasM?e="XYZM":!0===t.hasZ?e="XYZ":!0===t.hasM&&(e="XYM"),e}function I_(t){const e=t.getLayout();return{hasZ:"XYZ"===e||"XYZM"===e,hasM:"XYM"===e||"XYZM"===e}}function L_(t,e){return(0,b_[t.getType()])(Qp(t,!0,e),e)}class M_ extends Jp{constructor(){super(),this.xmlSerializer_=Nu()}getType(){return"xml"}readFeature(t,e){if(t){if("string"==typeof t){const i=_u(t);return this.readFeatureFromDocument(i,e)}return pu(t)?this.readFeatureFromDocument(t,e):this.readFeatureFromNode(t,e)}return null}readFeatureFromDocument(t,e){const i=this.readFeaturesFromDocument(t,e);return i.length>0?i[0]:null}readFeatureFromNode(t,e){return null}readFeatures(t,e){if(t){if("string"==typeof t){const i=_u(t);return this.readFeaturesFromDocument(i,e)}return pu(t)?this.readFeaturesFromDocument(t,e):this.readFeaturesFromNode(t,e)}return[]}readFeaturesFromDocument(t,e){const i=[];for(let n=t.firstChild;n;n=n.nextSibling)n.nodeType==Node.ELEMENT_NODE&&c(i,this.readFeaturesFromNode(n,e));return i}readFeaturesFromNode(t,e){return B()}readGeometry(t,e){if(t){if("string"==typeof t){const i=_u(t);return this.readGeometryFromDocument(i,e)}return pu(t)?this.readGeometryFromDocument(t,e):this.readGeometryFromNode(t,e)}return null}readGeometryFromDocument(t,e){return null}readGeometryFromNode(t,e){return null}readProjection(t){if(t){if("string"==typeof t){const e=_u(t);return this.readProjectionFromDocument(e)}return pu(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}return null}readProjectionFromDocument(t){return this.dataProjection}readProjectionFromNode(t){return this.dataProjection}writeFeature(t,e){const i=this.writeFeatureNode(t,e);return this.xmlSerializer_.serializeToString(i)}writeFeatureNode(t,e){return null}writeFeatures(t,e){const i=this.writeFeaturesNode(t,e);return this.xmlSerializer_.serializeToString(i)}writeFeaturesNode(t,e){return null}writeGeometry(t,e){const i=this.writeGeometryNode(t,e);return this.xmlSerializer_.serializeToString(i)}writeGeometryNode(t,e){return null}}const F_="http://www.opengis.net/gml",A_=/^\s*$/;class O_ extends M_{constructor(t){super(),t=t||{},this.featureType=t.featureType,this.featureNS=t.featureNS,this.srsName=t.srsName,this.schemaLocation="",this.FEATURE_COLLECTION_PARSERS={},this.FEATURE_COLLECTION_PARSERS[this.namespace]={featureMember:xu(this.readFeaturesInternal),featureMembers:vu(this.readFeaturesInternal)},this.supportedMediaTypes=["application/gml+xml"]}readFeaturesInternal(t,e){const i=t.localName;let n=null;if("FeatureCollection"==i)n=Lu([],this.FEATURE_COLLECTION_PARSERS,t,e,this);else if("featureMembers"==i||"featureMember"==i||"member"==i){const r=e[0];let s=r.featureType,o=r.featureNS;const a="p",l="p0";if(!s&&t.childNodes){s=[],o={};for(let e=0,i=t.childNodes.length;e0){t={_content_:t};for(let e=0;e0){e[e.length-1].push(...i)}},outerBoundaryIs:function(t,e){const i=Lu(void 0,tv,t,e);if(i){e[e.length-1][0]=i}}});function Ux(t,e){const i=Lu({},Ox,t,e),n=Lu([null],Bx,t,e);if(n&&n[0]){const t=n[0],e=[t.length];for(let i=1,r=n.length;i0;let o;const a=r.href;let l,h,c;a?o=a:s&&(o=ix);let u="bottom-left";const d=i.hotSpot;let g;d?(l=[d.x,d.y],h=d.xunits,c=d.yunits,u=d.origin):/^https?:\/\/maps\.(?:google|gstatic)\.com\//.test(o)&&(o.includes("pushpin")?(l=Jy,h=Qy,c=tx):o.includes("arrow-reverse")?(l=[54,42],h=Qy,c=tx):o.includes("paddle")&&(l=[32,1],h=Qy,c=tx));const f=r.x,p=r.y;let m;void 0!==f&&void 0!==p&&(g=[f,p]);const _=r.w,y=r.h;let x;void 0!==_&&void 0!==y&&(m=[_,y]);const v=i.heading;void 0!==v&&(x=ai(v));const S=i.scale,w=i.color;if(s){o==ix&&(m=ex);const t=new lg({anchor:l,anchorOrigin:u,anchorXUnits:h,anchorYUnits:c,crossOrigin:this.crossOrigin_,offset:g,offsetOrigin:"bottom-left",rotation:x,scale:S,size:m,src:this.iconUrlFunction_(o),color:w}),e=t.getScaleArray()[0],i=t.getSize();if(null===i){const i=t.getImageState();if(i===Pr||i===Ir){const n=function(){const i=t.getImageState();if(i!==Pr&&i!==Ir){const i=t.getSize();if(i&&2==i.length){const n=dx(i);t.setScale(e*n)}t.unlistenImageChange(n)}};t.listenImageChange(n),i===Pr&&t.load()}}else if(2==i.length){const n=dx(i);t.setScale(e*n)}n.imageStyle=t}else n.imageStyle=rx},LabelStyle:function(t,e){const i=Lu({},Ex,t,e);if(!i)return;const n=e[e.length-1],r=new mg({fill:new rg({color:"color"in i?i.color:$y}),scale:i.scale});n.textStyle=r},LineStyle:function(t,e){const i=Lu({},Tx,t,e);if(!i)return;const n=e[e.length-1],r=new hg({color:"color"in i?i.color:$y,width:"width"in i?i.width:1});n.strokeStyle=r},PolyStyle:function(t,e){const i=Lu({},Cx,t,e);if(!i)return;const n=e[e.length-1],r=new rg({color:"color"in i?i.color:$y});n.fillStyle=r;const s=i.fill;void 0!==s&&(n.fill=s);const o=i.outline;void 0!==o&&(n.outline=o)}});function Xx(t,e){const i=Lu({},zx,t,e,this);if(!i)return null;let n="fillStyle"in i?i.fillStyle:nx;const r=i.fill;let s;void 0===r||r||(n=null),"imageStyle"in i?i.imageStyle!=rx&&(s=i.imageStyle):s=sx;const o="textStyle"in i?i.textStyle:lx,a="strokeStyle"in i?i.strokeStyle:ax,l=i.outline;return void 0===l||l?[new cg({fill:n,image:s,stroke:a,text:o,zIndex:void 0})]:[new cg({geometry:function(t){const e=t.getGeometry(),i=e.getType();if("GeometryCollection"===i){return new Ip(e.getGeometriesArrayRecursive().filter((function(t){const e=t.getType();return"Polygon"!==e&&"MultiPolygon"!==e})))}if("Polygon"!==i&&"MultiPolygon"!==i)return e},fill:n,image:s,stroke:a,text:o,zIndex:void 0}),new cg({geometry:function(t){const e=t.getGeometry(),i=e.getType();if("GeometryCollection"===i){return new Ip(e.getGeometriesArrayRecursive().filter((function(t){const e=t.getType();return"Polygon"===e||"MultiPolygon"===e})))}if("Polygon"===i||"MultiPolygon"===i)return e},fill:n,stroke:null,zIndex:void 0})]}function Vx(t,e){const i=e.length,n=new Array(e.length),r=new Array(e.length),s=new Array(e.length);let o,a,l;o=!1,a=!1,l=!1;for(let t=0;t0){const t=Ru(r,o);Fu(n,Cv,Rv,[{names:o,values:t}],i)}const u=i[0];let d=e.getGeometry();d&&(d=Qp(d,!0,u)),Fu(n,Cv,mv,[d],i)}const Iv=Pu(Xy,["extrude","tessellate","altitudeMode","coordinates"]),Lv=Pu(Xy,{extrude:Eu(X_),tessellate:Eu(X_),altitudeMode:Eu(K_),coordinates:Eu((function(t,e,i){const n=i[i.length-1],r=n.layout,s=n.stride;let o;"XY"==r||"XYM"==r?o=2:"XYZ"==r||"XYZM"==r?o=3:at(!1,34);const a=e.length;let l="";if(a>0){l+=e[0];for(let t=1;t>1):i>>1}return e}function mS(t){let e="";for(let i=0,n=t.length;i=32;)e=63+(32|31&t),i+=String.fromCharCode(e),t>>=5;return e=t+63,i+=String.fromCharCode(e),i}const xS={Point:function(t,e,i){const n=t.coordinates;e&&i&&TS(n,e,i);return new Wn(n)},LineString:function(t,e){const i=vS(t.arcs,e);return new Op(i)},Polygon:function(t,e){const i=[];for(let n=0,r=t.arcs.length;n0&&i.pop(),n>=0){const t=e[n];for(let e=0,n=t.length;e=0;--e)i.push(t[e].slice(0))}return i}function SS(t,e,i,n,r,s,o){const a=t.geometries,l=[];for(let t=0,h=a.length;t=2,57)}}class RS extends bS{constructor(t){super("And",Array.prototype.slice.call(arguments))}}class PS extends CS{constructor(t,e,i){if(super("BBOX"),this.geometryName=t,this.extent=e,4!==e.length)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");this.srsName=i}}class IS extends CS{constructor(t,e,i,n){super(t),this.geometryName=e||"the_geom",this.geometry=i,this.srsName=n}}class LS extends IS{constructor(t,e,i){super("Contains",t,e,i)}}class MS extends IS{constructor(t,e,i,n,r){super("DWithin",t,e,r),this.distance=i,this.unit=n}}class FS extends IS{constructor(t,e,i){super("Disjoint",t,e,i)}}class AS extends CS{constructor(t,e){super(t),this.propertyName=e}}class OS extends AS{constructor(t,e,i){super("During",t),this.begin=e,this.end=i}}class NS extends AS{constructor(t,e,i,n){super(t,e),this.expression=i,this.matchCase=n}}class DS extends NS{constructor(t,e,i){super("PropertyIsEqualTo",t,e,i)}}class kS extends NS{constructor(t,e){super("PropertyIsGreaterThan",t,e)}}class GS extends NS{constructor(t,e){super("PropertyIsGreaterThanOrEqualTo",t,e)}}class jS extends IS{constructor(t,e,i){super("Intersects",t,e,i)}}class BS extends AS{constructor(t,e,i){super("PropertyIsBetween",t),this.lowerBoundary=e,this.upperBoundary=i}}class US extends AS{constructor(t,e,i,n,r,s){super("PropertyIsLike",t),this.pattern=e,this.wildCard=void 0!==i?i:"*",this.singleChar=void 0!==n?n:".",this.escapeChar=void 0!==r?r:"!",this.matchCase=s}}class zS extends AS{constructor(t){super("PropertyIsNull",t)}}class XS extends NS{constructor(t,e){super("PropertyIsLessThan",t,e)}}class VS extends NS{constructor(t,e){super("PropertyIsLessThanOrEqualTo",t,e)}}class WS extends CS{constructor(t){super("Not"),this.condition=t}}class ZS extends NS{constructor(t,e,i){super("PropertyIsNotEqualTo",t,e,i)}}class YS extends bS{constructor(t){super("Or",Array.prototype.slice.call(arguments))}}class KS extends CS{constructor(t){super("ResourceId"),this.rid=t}}class qS extends IS{constructor(t,e,i){super("Within",t,e,i)}}function HS(t){const e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(RS,e))}function $S(t,e,i){return new PS(t,e,i)}const JS={"http://www.opengis.net/gml":{boundedBy:wu(O_.prototype.readExtentElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:xu(O_.prototype.readFeaturesInternal)}},QS={"http://www.opengis.net/wfs":{totalInserted:wu(B_),totalUpdated:wu(B_),totalDeleted:wu(B_)},"http://www.opengis.net/wfs/2.0":{totalInserted:wu(B_),totalUpdated:wu(B_),totalDeleted:wu(B_)}},tw={"http://www.opengis.net/wfs":{TransactionSummary:wu(uw,"transactionSummary"),InsertResults:wu(pw,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:wu(uw,"transactionSummary"),InsertResults:wu(pw,"insertIds")}},ew={"http://www.opengis.net/wfs":{PropertyName:Eu(K_)},"http://www.opengis.net/wfs/2.0":{PropertyName:Eu(K_)}},iw={"http://www.opengis.net/wfs":{Insert:Eu(mw),Update:Eu(vw),Delete:Eu(xw),Property:Eu(Sw),Native:Eu(ww)},"http://www.opengis.net/wfs/2.0":{Insert:Eu(mw),Update:Eu(vw),Delete:Eu(xw),Property:Eu(Sw),Native:Eu(ww)}},nw="feature",rw="http://www.w3.org/2000/xmlns/",sw={"2.0.0":"http://www.opengis.net/ogc/1.1","1.1.0":"http://www.opengis.net/ogc","1.0.0":"http://www.opengis.net/ogc"},ow={"2.0.0":"http://www.opengis.net/wfs/2.0","1.1.0":"http://www.opengis.net/wfs","1.0.0":"http://www.opengis.net/wfs"},aw={"2.0.0":"http://www.opengis.net/fes/2.0","1.1.0":"http://www.opengis.net/fes","1.0.0":"http://www.opengis.net/fes"},lw={"2.0.0":"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd","1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},hw={"2.0.0":ty,"1.1.0":J_,"1.0.0":H_};function cw(t,e,i,n){Fu(n,iw,Cu(t),e,i)}function uw(t,e){return Lu({},QS,t,e)}const dw={"http://www.opengis.net/ogc":{FeatureId:xu((function(t,e){return t.getAttribute("fid")}))},"http://www.opengis.net/ogc/1.1":{FeatureId:xu((function(t,e){return t.getAttribute("fid")}))}};function gw(t,e){Iu(dw,t,e)}const fw={"http://www.opengis.net/wfs":{Feature:gw},"http://www.opengis.net/wfs/2.0":{Feature:gw}};function pw(t,e){return Lu([],fw,t,e)}function mw(t,e,i){const n=i[i.length-1],r=n.featureType,s=n.featureNS,o=n.gmlVersion,a=du(s,r);t.appendChild(a),2===o?H_.prototype.writeFeatureElement(a,e,i):3===o?J_.prototype.writeFeatureElement(a,e,i):ty.prototype.writeFeatureElement(a,e,i)}function _w(t,e,i){const n=i[i.length-1].version,r=sw[n],s=du(r,"Filter"),o=du(r,"FeatureId");s.appendChild(o),o.setAttribute("fid",e),t.appendChild(s)}function yw(t,e){const i=(t=t||nw)+":";return e.startsWith(i)?e:i+e}function xw(t,e,i){const n=i[i.length-1];at(void 0!==e.getId(),26);const r=n.featureType,s=n.featurePrefix,o=n.featureNS,a=yw(s,r);t.setAttribute("typeName",a),t.setAttributeNS(rw,"xmlns:"+s,o);const l=e.getId();void 0!==l&&_w(t,l,i)}function vw(t,e,i){const n=i[i.length-1];at(void 0!==e.getId(),27);const r=n.version,s=n.featureType,o=n.featurePrefix,a=n.featureNS,l=yw(o,s),h=e.getGeometryName();t.setAttribute("typeName",l),t.setAttributeNS(rw,"xmlns:"+o,a);const c=e.getId();if(void 0!==c){const s=e.getKeys(),o=[];for(let t=0,i=s.length;t0,i=this.readUint32(e),n=Math.floor((268435455&i)/1e3),r=Boolean(2147483648&i)||1===n||3===n,s=Boolean(1073741824&i)||2===n||3===n,o=Boolean(536870912&i),a=(268435455&i)%1e3,l=["XY",r?"Z":"",s?"M":""].join(""),h=o?this.readUint32(e):null;if(void 0!==t&&t!==a)throw new Error("Unexpected WKB geometry type "+a);if(this.initialized_){if(this.isLittleEndian_!==e)throw new Error("Inconsistent endian");if(this.layout_!==l)throw new Error("Inconsistent geometry layout");if(h&&this.srid_!==h)throw new Error("Inconsistent coordinate system (SRID)")}else this.isLittleEndian_=e,this.hasZ_=r,this.hasM_=s,this.layout_=l,this.srid_=h,this.initialized_=!0;return a}readWkbPayload(t){switch(t){case zw:return this.readPoint();case Xw:return this.readLineString();case Vw:case $w:return this.readPolygon();case Ww:return this.readMultiPoint();case Zw:return this.readMultiLineString();case Yw:case qw:case Hw:return this.readMultiPolygon();case Kw:return this.readGeometryCollection();default:throw new Error("Unsupported WKB geometry type "+t+" is found")}}readWkbBlock(t){return this.readWkbPayload(this.readWkbHeader(t))}readWkbCollection(t,e){const i=this.readUint32(),n=[];for(let r=0;r({[e]:t[i]}))));for(const t of this.layout_)this.writeDouble(t in i?i[t]:this.nodata_[t])}writeLineString(t,e){this.writeUint32(t.length);for(let i=0;it+e[0]),0),e=new ArrayBuffer(t),i=new DataView(e);let n=0;return this.writeQueue_.forEach((t=>{switch(t[0]){case 1:i.setUint8(n,t[1]);break;case 4:i.setUint32(n,t[1],this.isLittleEndian_);break;case 8:i.setFloat64(n,t[1],this.isLittleEndian_)}n+=t[0]})),e}}function tE(t){return"string"==typeof t?function(t){const e=new Uint8Array(t.length/2);for(let i=0;i="a"&&t<="z"||t>="A"&&t<="Z"}isNumeric_(t,e){return e=void 0!==e&&e,t>="0"&&t<="9"||"."==t&&!e}isWhiteSpace_(t){return" "==t||"\t"==t||"\r"==t||"\n"==t}nextChar_(){return this.wkt.charAt(++this.index_)}nextToken(){const t=this.nextChar_(),e=this.index_;let i,n=t;if("("==t)i=sE;else if(","==t)i=lE;else if(")"==t)i=oE;else if(this.isNumeric_(t)||"-"==t)i=aE,n=this.readNumber_();else if(this.isAlpha_(t))i=rE,n=this.readText_();else{if(this.isWhiteSpace_(t))return this.nextToken();if(""!==t)throw new Error("Unexpected character: "+t);i=hE}return{position:e,value:n,type:i}}readNumber_(){let t;const e=this.index_;let i=!1,n=!1;do{"."==t?i=!0:"e"!=t&&"E"!=t||(n=!0),t=this.nextChar_()}while(this.isNumeric_(t,i)||!n&&("e"==t||"E"==t)||n&&("-"==t||"+"==t));return parseFloat(this.wkt.substring(e,this.index_--))}readText_(){let t;const e=this.index_;do{t=this.nextChar_()}while(this.isAlpha_(t));return this.wkt.substring(e,this.index_--).toUpperCase()}}class dE{constructor(t){this.lexer_=t,this.token_={position:0,type:nE},this.layout_="XY"}consume_(){this.token_=this.lexer_.nextToken()}isTokenType(t){return this.token_.type==t}match(t){const e=this.isTokenType(t);return e&&this.consume_(),e}parse(){return this.consume_(),this.parseGeometry_()}parseGeometryLayout_(){let t="XY";const e=this.token_;if(this.isTokenType(rE)){const i=e.value;"Z"===i?t="XYZ":"M"===i?t="XYM":"ZM"===i&&(t="XYZM"),"XY"!==t&&this.consume_()}return t}parseGeometryCollectionText_(){if(this.match(sE)){const t=[];do{t.push(this.parseGeometry_())}while(this.match(lE));if(this.match(oE))return t}throw new Error(this.formatErrorMessage_())}parsePointText_(){if(this.match(sE)){const t=this.parsePoint_();if(this.match(oE))return t}throw new Error(this.formatErrorMessage_())}parseLineStringText_(){if(this.match(sE)){const t=this.parsePointList_();if(this.match(oE))return t}throw new Error(this.formatErrorMessage_())}parsePolygonText_(){if(this.match(sE)){const t=this.parseLineStringTextList_();if(this.match(oE))return t}throw new Error(this.formatErrorMessage_())}parseMultiPointText_(){if(this.match(sE)){let t;if(t=this.token_.type==sE?this.parsePointTextList_():this.parsePointList_(),this.match(oE))return t}throw new Error(this.formatErrorMessage_())}parseMultiLineStringText_(){if(this.match(sE)){const t=this.parseLineStringTextList_();if(this.match(oE))return t}throw new Error(this.formatErrorMessage_())}parseMultiPolygonText_(){if(this.match(sE)){const t=this.parsePolygonTextList_();if(this.match(oE))return t}throw new Error(this.formatErrorMessage_())}parsePoint_(){const t=[],e=this.layout_.length;for(let i=0;i0&&(n+=" "+e)}return 0===i.length?n+" "+iE:n+"("+i+")"}const yE=[null,"http://www.opengis.net/wms"],xE=Pu(yE,{Service:wu((function(t,e){return Lu({},SE,t,e)})),Capability:wu((function(t,e){return Lu({},vE,t,e)}))}),vE=Pu(yE,{Request:wu((function(t,e){return Lu({},IE,t,e)})),Exception:wu((function(t,e){return Lu([],CE,t,e)})),Layer:wu((function(t,e){const i=Lu({},bE,t,e);if(void 0===i.Layer)return Object.assign(i,DE(t,e));return i}))});const SE=Pu(yE,{Name:wu(z_),Title:wu(z_),Abstract:wu(z_),KeywordList:wu(BE),OnlineResource:wu(Yv),ContactInformation:wu((function(t,e){return Lu({},wE,t,e)})),Fees:wu(z_),AccessConstraints:wu(z_),LayerLimit:wu(B_),MaxWidth:wu(B_),MaxHeight:wu(B_)}),wE=Pu(yE,{ContactPersonPrimary:wu((function(t,e){return Lu({},EE,t,e)})),ContactPosition:wu(z_),ContactAddress:wu((function(t,e){return Lu({},TE,t,e)})),ContactVoiceTelephone:wu(z_),ContactFacsimileTelephone:wu(z_),ContactElectronicMailAddress:wu(z_)}),EE=Pu(yE,{ContactPerson:wu(z_),ContactOrganization:wu(z_)}),TE=Pu(yE,{AddressType:wu(z_),Address:wu(z_),City:wu(z_),StateOrProvince:wu(z_),PostCode:wu(z_),Country:wu(z_)}),CE=Pu(yE,{Format:xu(z_)}),bE=Pu(yE,{Name:wu(z_),Title:wu(z_),Abstract:wu(z_),KeywordList:wu(BE),CRS:Su(z_),EX_GeographicBoundingBox:wu((function(t,e){const i=Lu({},PE,t,e);if(!i)return;const n=i.westBoundLongitude,r=i.southBoundLatitude,s=i.eastBoundLongitude,o=i.northBoundLatitude;if(void 0===n||void 0===r||void 0===s||void 0===o)return;return[n,r,s,o]})),BoundingBox:Su((function(t,e){const i=[j_(t.getAttribute("minx")),j_(t.getAttribute("miny")),j_(t.getAttribute("maxx")),j_(t.getAttribute("maxy"))],n=[j_(t.getAttribute("resx")),j_(t.getAttribute("resy"))];return{crs:t.getAttribute("CRS"),extent:i,res:n}})),Dimension:Su((function(t,e){return{name:t.getAttribute("name"),units:t.getAttribute("units"),unitSymbol:t.getAttribute("unitSymbol"),default:t.getAttribute("default"),multipleValues:D_(t.getAttribute("multipleValues")),nearestValue:D_(t.getAttribute("nearestValue")),current:D_(t.getAttribute("current")),values:z_(t)}})),Attribution:wu((function(t,e){return Lu({},RE,t,e)})),AuthorityURL:Su((function(t,e){const i=kE(t,e);if(i)return i.name=t.getAttribute("name"),i;return})),Identifier:Su(z_),MetadataURL:Su((function(t,e){const i=kE(t,e);if(i)return i.type=t.getAttribute("type"),i;return})),DataURL:Su(kE),FeatureListURL:Su(kE),Style:Su((function(t,e){return Lu({},AE,t,e)})),MinScaleDenominator:wu(G_),MaxScaleDenominator:wu(G_),Layer:Su(DE)}),RE=Pu(yE,{Title:wu(z_),OnlineResource:wu(Yv),LogoURL:wu(jE)}),PE=Pu(yE,{westBoundLongitude:wu(G_),eastBoundLongitude:wu(G_),southBoundLatitude:wu(G_),northBoundLatitude:wu(G_)}),IE=Pu(yE,{GetCapabilities:wu(GE),GetMap:wu(GE),GetFeatureInfo:wu(GE)}),LE=Pu(yE,{Format:Su(z_),DCPType:Su((function(t,e){return Lu({},ME,t,e)}))}),ME=Pu(yE,{HTTP:wu((function(t,e){return Lu({},FE,t,e)}))}),FE=Pu(yE,{Get:wu(kE),Post:wu(kE)}),AE=Pu(yE,{Name:wu(z_),Title:wu(z_),Abstract:wu(z_),LegendURL:Su(jE),StyleSheetURL:wu(kE),StyleURL:wu(kE)}),OE=Pu(yE,{Format:wu(z_),OnlineResource:wu(Yv)}),NE=Pu(yE,{Keyword:xu(z_)});function DE(t,e){const i=e[e.length-1],n=Lu({},bE,t,e);if(!n)return;let r=D_(t.getAttribute("queryable"));void 0===r&&(r=i.queryable),n.queryable=void 0!==r&&r;let s=U_(t.getAttribute("cascaded"));void 0===s&&(s=i.cascaded),n.cascaded=s;let o=D_(t.getAttribute("opaque"));void 0===o&&(o=i.opaque),n.opaque=void 0!==o&&o;let a=D_(t.getAttribute("noSubsets"));void 0===a&&(a=i.noSubsets),n.noSubsets=void 0!==a&&a;let l=j_(t.getAttribute("fixedWidth"));l||(l=i.fixedWidth),n.fixedWidth=l;let h=j_(t.getAttribute("fixedHeight"));h||(h=i.fixedHeight),n.fixedHeight=h;["Style","CRS","AuthorityURL"].forEach((function(t){if(t in i){const e=n[t]||[];n[t]=e.concat(i[t])}}));return["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"].forEach((function(t){if(!(t in n)){const e=i[t];n[t]=e}})),n}function kE(t,e){return Lu({},OE,t,e)}function GE(t,e){return Lu({},LE,t,e)}function jE(t,e){const i=kE(t,e);if(i){const e=[U_(t.getAttribute("width")),U_(t.getAttribute("height"))];return i.size=e,i}}function BE(t,e){return Lu([],NE,t,e)}const UE=[null,"http://www.opengis.net/wmts/1.0"],zE=[null,"http://www.opengis.net/ows/1.1"],XE=Pu(UE,{Contents:wu((function(t,e){return Lu({},VE,t,e)}))});const VE=Pu(UE,{Layer:Su((function(t,e){return Lu({},WE,t,e)})),TileMatrixSet:Su((function(t,e){return Lu({},JE,t,e)}))}),WE=Pu(UE,{Style:Su((function(t,e){const i=Lu({},ZE,t,e);if(!i)return;const n="true"===t.getAttribute("isDefault");return i.isDefault=n,i})),Format:Su(z_),TileMatrixSetLink:Su((function(t,e){return Lu({},YE,t,e)})),Dimension:Su((function(t,e){return Lu({},HE,t,e)})),ResourceURL:Su((function(t,e){const i=t.getAttribute("format"),n=t.getAttribute("template"),r=t.getAttribute("resourceType"),s={};i&&(s.format=i);n&&(s.template=n);r&&(s.resourceType=r);return s}))},Pu(zE,{Title:wu(z_),Abstract:wu(z_),WGS84BoundingBox:wu(tT),Identifier:wu(z_)})),ZE=Pu(UE,{LegendURL:Su((function(t,e){const i={};return i.format=t.getAttribute("format"),i.href=Yv(t),i}))},Pu(zE,{Title:wu(z_),Identifier:wu(z_)})),YE=Pu(UE,{TileMatrixSet:wu(z_),TileMatrixSetLimits:wu((function(t,e){return Lu([],KE,t,e)}))}),KE=Pu(UE,{TileMatrixLimits:xu((function(t,e){return Lu({},qE,t,e)}))}),qE=Pu(UE,{TileMatrix:wu(z_),MinTileRow:wu(B_),MaxTileRow:wu(B_),MinTileCol:wu(B_),MaxTileCol:wu(B_)}),HE=Pu(UE,{Default:wu(z_),Value:Su(z_)},Pu(zE,{Identifier:wu(z_)})),$E=Pu(zE,{LowerCorner:xu(eT),UpperCorner:xu(eT)}),JE=Pu(UE,{WellKnownScaleSet:wu(z_),TileMatrix:Su((function(t,e){return Lu({},QE,t,e)}))},Pu(zE,{SupportedCRS:wu(z_),Identifier:wu(z_),BoundingBox:wu(tT)})),QE=Pu(UE,{TopLeftCorner:wu(eT),ScaleDenominator:wu(G_),TileWidth:wu(B_),TileHeight:wu(B_),MatrixWidth:wu(B_),MatrixHeight:wu(B_)},Pu(zE,{Identifier:wu(z_)}));function tT(t,e){const i=Lu([],$E,t,e);if(2==i.length)return zt(i)}function eT(t,e){const i=z_(t).split(/\s+/);if(!i||2!=i.length)return;const n=+i[0],r=+i[1];return isNaN(n)||isNaN(r)?void 0:[n,r]}const iT=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],nT="enterfullscreen",rT="leavefullscreen";function sT(t){const e=t.body;return!!(e.webkitRequestFullscreen||e.requestFullscreen&&t.fullscreenEnabled)}function oT(t){return!(!t.webkitIsFullScreen&&!t.fullscreenElement)}function aT(t){t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}const lT="projection",hT="coordinateFormat";const cT=.75,uT=.1;const dT="units",gT=[1,2,5],fT=25.4/.28;const pT=0,mT=1;var _T={};return _T.AssertionError=e,_T.Collection=q,_T.Collection.CollectionEvent=K,_T.DataTile=ot,_T.Disposable=s,_T.Feature=lt,_T.Feature.createStyleFunction=ht,_T.Geolocation=class extends V{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.position_=null,this.transform_=Gi,this.watchId_=void 0,this.addChangeListener(wr,this.handleProjectionChanged_),this.addChangeListener(Tr,this.handleTrackingChanged_),void 0!==t.projection&&this.setProjection(t.projection),void 0!==t.trackingOptions&&this.setTrackingOptions(t.trackingOptions),this.setTracking(void 0!==t.tracking&&t.tracking)}disposeInternal(){this.setTracking(!1),super.disposeInternal()}handleProjectionChanged_(){const t=this.getProjection();t&&(this.transform_=qi(Ui("EPSG:4326"),t),this.position_&&this.set(Sr,this.transform_(this.position_)))}handleTrackingChanged_(){if("geolocation"in navigator){const t=this.getTracking();t&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):t||void 0===this.watchId_||(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}}positionChange_(t){const e=t.coords;this.set(mr,e.accuracy),this.set(yr,null===e.altitude?void 0:e.altitude),this.set(xr,null===e.altitudeAccuracy?void 0:e.altitudeAccuracy),this.set(vr,null===e.heading?void 0:ai(e.heading)),this.position_?(this.position_[0]=e.longitude,this.position_[1]=e.latitude):this.position_=[e.longitude,e.latitude];const i=this.transform_(this.position_);this.set(Sr,i),this.set(Er,null===e.speed?void 0:e.speed);const n=dr(this.position_,e.accuracy);n.applyTransform(this.transform_),this.set(_r,n),this.changed()}positionError_(t){this.dispatchEvent(new br(t))}getAccuracy(){return this.get(mr)}getAccuracyGeometry(){return this.get(_r)||null}getAltitude(){return this.get(yr)}getAltitudeAccuracy(){return this.get(xr)}getHeading(){return this.get(vr)}getPosition(){return this.get(Sr)}getProjection(){return this.get(wr)}getSpeed(){return this.get(Er)}getTracking(){return this.get(Tr)}getTrackingOptions(){return this.get(Cr)}setProjection(t){this.set(wr,Ui(t))}setTracking(t){this.set(Tr,t)}setTrackingOptions(t){this.set(Cr,t)}},_T.Image=Ar,_T.Image.listenImage=Or,_T.ImageBase=Rr,_T.ImageCanvas=Nr,_T.ImageTile=Vr,_T.Kinetic=Wr,_T.Map=Ya,_T.MapBrowserEvent=oo,_T.MapBrowserEventHandler=go,_T.MapEvent=so,_T.Object=V,_T.Object.ObjectEvent=X,_T.Observable=G,_T.Observable.unByKey=j,_T.Overlay=Qa,_T.Tile=st,_T.TileCache=ll,_T.TileQueue=Co,_T.TileQueue.getTilePriority=bo,_T.TileRange=hl,_T.TileRange.createOrUpdate=cl,_T.VectorRenderTile=dl,_T.VectorTile=gl,_T.View=zo,_T.View.createCenterConstraint=Vo,_T.View.createResolutionConstraint=Wo,_T.View.createRotationConstraint=Zo,_T.View.isNoopAnimation=Yo,_T.array={},_T.array.binarySearch=o,_T.array.equals=u,_T.array.extend=c,_T.array.isSorted=d,_T.array.linearFindNearest=l,_T.array.numberSafeCompareFunction=a,_T.array.remove=function(t,e){const i=t.indexOf(e),n=i>-1;return n&&t.splice(i,1),n},_T.array.reverseSubArray=h,_T.array.stableSort=function(t,e){const i=t.length,n=Array(t.length);let r;for(r=0;rc*cT||h>u*cT?this.resetExtent_():Yt(s,n)||this.recenter_()}resetExtent_(){const t=this.getMap(),e=this.ovmap_,i=t.getSize(),n=t.getView().calculateExtentInternal(i),r=e.getView(),s=Math.log(7.5)/Math.LN2;Ce(n,1/(Math.pow(2,s/2)*uT)),r.fitInternal(gr(n))}recenter_(){const t=this.getMap(),e=this.ovmap_,i=t.getView();e.getView().setCenterInternal(i.getCenterInternal())}updateBox_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const i=t.getSize(),n=t.getView(),r=e.getView(),s=this.rotateWithView_?0:-n.getRotation(),o=this.boxOverlay_,a=this.boxOverlay_.getElement(),l=n.getCenterInternal(),h=n.getResolution(),c=r.getResolution(),u=i[0]*h/c,d=i[1]*h/c;if(o.setPosition(l),a){a.style.width=u+"px",a.style.height=d+"px";const t="rotate("+s+"rad)";a.style.transform=t}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=D(this.ovmap_,fo,(function(t){delete this.ovmapPostrenderKey_,this.updateBox_()}),this))}handleClick_(t){t.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(Ls),this.collapsed_?Br(this.collapseLabel_,this.label_):Br(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const t=this.ovmap_;if(!this.collapsed_){if(t.isRendered())return this.viewExtent_=void 0,void t.render();t.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())}setCollapsed(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(t){this.rotateWithView_!==t&&(this.rotateWithView_=t,0!==this.getMap().getView().getRotation()&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))}getOverviewMap(){return this.ovmap_}render(t){this.validateExtent_(),this.updateBox_()}},_T.control.Rotate=$o,_T.control.ScaleLine=class extends qo{constructor(t){t=t||{};const e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;const i=void 0!==t.className?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=i+"-inner",this.element.className=i+" "+Rs,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=void 0!==t.minWidth?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(dT,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(dT)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(dT,t)}setDpi(t){this.dpi_=t}updateElement_(){const t=this.viewState_;if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=t.center,i=t.projection,n=this.getUnits(),r="degrees"==n?"degrees":"m";let s=zi(i,t.resolution,e,r);const o=this.minWidth_*(this.dpi_||fT)/fT,a=void 0!==this.maxWidth_?this.maxWidth_*(this.dpi_||fT)/fT:void 0;let l=o*s,h="";if("degrees"==n){const t=Fe.degrees;l*=t,l=a){c=g,u=f,d=p;break}if(u>=o)break;g=c,f=u,p=d,++m}const _=this.scaleBar_?this.createScaleBar(u,c,h):c.toFixed(d<0?-d:0)+" "+h;this.renderedHTML_!=_&&(this.innerElement_.innerHTML=_,this.renderedHTML_=_),this.renderedWidth_!=u&&(this.innerElement_.style.width=u+"px",this.renderedWidth_=u),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,i){const n=this.getScaleForResolution(),r=n<1?Math.round(1/n).toLocaleString()+" : 1":"1 : "+Math.round(n).toLocaleString(),s=this.scaleBarSteps_,o=t/s,a=[this.createMarker("absolute")];for(let n=0;n
`+this.createMarker("relative")+(n%2==0||2===s?this.createStepText(n,t,!1,e,i):"")+"")}a.push(this.createStepText(s,t,!0,e,i));return(this.scaleBarText_?`
`+r+"
":"")+a.join("")}createMarker(t){return`
`}createStepText(t,e,i,n,r){const s=(0===t?0:Math.round(n/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+r);return`
`+s+"
"}getScaleForResolution(){return zi(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m")*(1e3/25.4)*(this.dpi_||fT)}render(t){const e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()}},_T.control.Zoom=Jo,_T.control.ZoomSlider=class extends qo{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render}),this.dragListenerKeys_=[],this.currentResolution_=void 0,this.direction_=pT,this.dragging_,this.heightLimit_=0,this.widthLimit_=0,this.startX_,this.startY_,this.thumbSize_=null,this.sliderInitialized_=!1,this.duration_=void 0!==t.duration?t.duration:200;const e=void 0!==t.className?t.className:"ol-zoomslider",i=document.createElement("button");i.setAttribute("type","button"),i.className=e+"-thumb "+Rs;const r=this.element;r.className=e+" "+"ol-unselectable "+Is,r.appendChild(i),r.addEventListener(ho,this.handleDraggerStart_.bind(this),!1),r.addEventListener(lo,this.handleDraggerDrag_.bind(this),!1),r.addEventListener(co,this.handleDraggerEnd_.bind(this),!1),r.addEventListener(T,this.handleContainerClick_.bind(this),!1),i.addEventListener(T,n,!1)}setMap(t){super.setMap(t),t&&t.render()}initSlider_(){const t=this.element;let e=t.offsetWidth,i=t.offsetHeight;if(0===e&&0===i)return this.sliderInitialized_=!1;const n=getComputedStyle(t);e-=parseFloat(n.paddingRight)+parseFloat(n.paddingLeft),i-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom);const r=t.firstElementChild,s=getComputedStyle(r),o=r.offsetWidth+parseFloat(s.marginRight)+parseFloat(s.marginLeft),a=r.offsetHeight+parseFloat(s.marginTop)+parseFloat(s.marginBottom);return this.thumbSize_=[o,a],e>i?(this.direction_=mT,this.widthLimit_=e-o):(this.direction_=pT,this.heightLimit_=i-a),this.sliderInitialized_=!0}handleContainerClick_(t){const e=this.getMap().getView(),i=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),n=this.getResolutionForPosition_(i),r=e.getConstrainedZoom(e.getZoomForResolution(n));e.animateInternal({zoom:r,duration:this.duration_,easing:it})}handleDraggerStart_(t){if(!this.dragging_&&t.target===this.element.firstElementChild){const e=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=t.clientX-parseFloat(e.style.left),this.startY_=t.clientY-parseFloat(e.style.top),this.dragging_=!0,0===this.dragListenerKeys_.length){const t=this.handleDraggerDrag_,e=this.handleDraggerEnd_,i=this.getMap().getOwnerDocument();this.dragListenerKeys_.push(N(i,lo,t,this),N(i,co,e,this))}}}handleDraggerDrag_(t){if(this.dragging_){const e=t.clientX-this.startX_,i=t.clientY-this.startY_,n=this.getRelativePosition_(e,i);this.currentResolution_=this.getResolutionForPosition_(n),this.getMap().getView().setResolution(this.currentResolution_)}}handleDraggerEnd_(t){if(this.dragging_){this.getMap().getView().endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(k),this.dragListenerKeys_.length=0}}setThumbPosition_(t){const e=this.getPositionForResolution_(t),i=this.element.firstElementChild;this.direction_==mT?i.style.left=this.widthLimit_*e+"px":i.style.top=this.heightLimit_*e+"px"}getRelativePosition_(t,e){let i;return i=this.direction_===mT?t/this.widthLimit_:e/this.heightLimit_,ii(i,0,1)}getResolutionForPosition_(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)}getPositionForResolution_(t){return ii(1-this.getMap().getView().getValueForResolutionFunction()(t),0,1)}render(t){if(!t.frameState)return;if(!this.sliderInitialized_&&!this.initSlider_())return;const e=t.frameState.viewState.resolution;this.currentResolution_=e,this.setThumbPosition_(e)}},_T.control.ZoomToExtent=class extends qo{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target}),this.extent=t.extent?t.extent:null;const e=void 0!==t.className?t.className:"ol-zoom-extent",i=void 0!==t.label?t.label:"E",n=void 0!==t.tipLabel?t.tipLabel:"Fit to extent",r=document.createElement("button");r.setAttribute("type","button"),r.title=n,r.appendChild("string"==typeof i?document.createTextNode(i):i),r.addEventListener(T,this.handleClick_.bind(this),!1);const s=e+" "+"ol-unselectable "+Is,o=this.element;o.className=s,o.appendChild(r)}handleClick_(t){t.preventDefault(),this.handleZoomToExtent()}handleZoomToExtent(){const t=this.getMap().getView(),e=this.extent?this.extent:t.getProjection().getExtent();t.fitInternal(gr(e))}},_T.control.defaults={},_T.control.defaults.defaults=Qo,_T.coordinate={},_T.coordinate.add=mi,_T.coordinate.closestOnCircle=_i,_T.coordinate.closestOnSegment=yi,_T.coordinate.createStringXY=function(t){return function(e){return Ri(e,t)}},_T.coordinate.degreesToStringHDMS=xi,_T.coordinate.distance=Ci,_T.coordinate.equals=Si,_T.coordinate.format=vi,_T.coordinate.getWorldsAway=Ii,_T.coordinate.rotate=wi,_T.coordinate.scale=Ei,_T.coordinate.squaredDistance=Ti,_T.coordinate.squaredDistanceToSegment=bi,_T.coordinate.toStringHDMS=function(t,e){return t?xi("NS",t[1],e)+" "+xi("EW",t[0],e):""},_T.coordinate.toStringXY=Ri,_T.coordinate.wrapX=Pi,_T.css={},_T.css.CLASS_COLLAPSED=Ls,_T.css.CLASS_CONTROL=Is,_T.css.CLASS_HIDDEN=Cs,_T.css.CLASS_SELECTABLE=bs,_T.css.CLASS_UNSELECTABLE=Rs,_T.css.CLASS_UNSUPPORTED=Ps,_T.css.getFontParameters=As,_T.dom={},_T.dom.createCanvasContext2D=Dr,_T.dom.outerHeight=jr,_T.dom.outerWidth=Gr,_T.dom.releaseCanvas=kr,_T.dom.removeChildren=zr,_T.dom.removeNode=Ur,_T.dom.replaceChildren=Xr,_T.dom.replaceNode=Br,_T.easing={},_T.easing.easeIn=et,_T.easing.easeOut=it,_T.easing.inAndOut=nt,_T.easing.linear=rt,_T.easing.upAndDown=function(t){return t<.5?nt(2*t):1-nt(2*(t-.5))},_T.events={},_T.events.Event=i,_T.events.Event.preventDefault=function(t){t.preventDefault()},_T.events.Event.stopPropagation=n,_T.events.Target=v,_T.events.condition={},_T.events.condition.all=aa,_T.events.condition.altKeyOnly=la,_T.events.condition.altShiftKeysOnly=ha,_T.events.condition.always=da,_T.events.condition.click=function(t){return t.type==ao.CLICK},_T.events.condition.doubleClick=function(t){return t.type==ao.DBLCLICK},_T.events.condition.focus=ca,_T.events.condition.focusWithTabindex=ua,_T.events.condition.mouseActionButton=ga,_T.events.condition.mouseOnly=xa,_T.events.condition.never=fa,_T.events.condition.noModifierKeys=ma,_T.events.condition.penOnly=function(t){const e=t.originalEvent;return at(void 0!==e,56),"pen"===e.pointerType},_T.events.condition.platformModifierKeyOnly=function(t){const e=t.originalEvent;return!e.altKey&&(pt?e.metaKey:e.ctrlKey)&&!e.shiftKey},_T.events.condition.pointerMove=function(t){return"pointermove"==t.type},_T.events.condition.primaryAction=va,_T.events.condition.shiftKeyOnly=_a,_T.events.condition.singleClick=pa,_T.events.condition.targetNotEditable=ya,_T.events.condition.touchOnly=function(t){const e=t.originalEvent;return at(void 0!==e,56),"touch"===e.pointerType},_T.events.listen=N,_T.events.listenOnce=D,_T.events.unlistenByKey=k,_T.extent={},_T.extent.applyTransform=Re,_T.extent.approximatelyEquals=ie,_T.extent.boundingExtent=zt,_T.extent.buffer=Xt,_T.extent.clone=Vt,_T.extent.closestSquaredDistanceXY=Wt,_T.extent.containsCoordinate=Zt,_T.extent.containsExtent=Yt,_T.extent.containsXY=Kt,_T.extent.coordinateRelationship=qt,_T.extent.createEmpty=Ht,_T.extent.createOrUpdate=$t,_T.extent.createOrUpdateEmpty=Jt,_T.extent.createOrUpdateFromCoordinate=Qt,_T.extent.createOrUpdateFromCoordinates=function(t,e){return se(Jt(e),t)},_T.extent.createOrUpdateFromFlatCoordinates=te,_T.extent.createOrUpdateFromRings=function(t,e){return ae(Jt(e),t)},_T.extent.equals=ee,_T.extent.extend=ne,_T.extent.extendCoordinate=re,_T.extent.extendCoordinates=se,_T.extent.extendFlatCoordinates=oe,_T.extent.extendRings=ae,_T.extent.extendXY=le,_T.extent.forEachCorner=he,_T.extent.getArea=ce,_T.extent.getBottomLeft=ue,_T.extent.getBottomRight=de,_T.extent.getCenter=ge,_T.extent.getCorner=fe,_T.extent.getEnlargedArea=function(t,e){const i=Math.min(t[0],e[0]),n=Math.min(t[1],e[1]);return(Math.max(t[2],e[2])-i)*(Math.max(t[3],e[3])-n)},_T.extent.getForViewAndSize=pe,_T.extent.getHeight=_e,_T.extent.getIntersection=ye,_T.extent.getIntersectionArea=function(t,e){return ce(ye(t,e))},_T.extent.getMargin=function(t){return Se(t)+_e(t)},_T.extent.getRotatedViewport=me,_T.extent.getSize=function(t){return[t[2]-t[0],t[3]-t[1]]},_T.extent.getTopLeft=xe,_T.extent.getTopRight=ve,_T.extent.getWidth=Se,_T.extent.intersects=we,_T.extent.intersectsSegment=be,_T.extent.isEmpty=Ee,_T.extent.returnOrUpdate=Te,_T.extent.scaleFromCenter=Ce,_T.extent.wrapAndSliceX=Ie,_T.extent.wrapX=Pe,_T.featureloader={},_T.featureloader.loadFeaturesXhr=_l,_T.featureloader.setWithCredentials=function(t){ml=t},_T.featureloader.xhr=yl,_T.format={},_T.format.EsriJSON=class extends E_{constructor(t){t=t||{},super(),this.geometryName_=t.geometryName}readFeatureFromObject(t,e,i){const n=t,r=R_(n.geometry,e),s=new lt;if(this.geometryName_&&s.setGeometryName(this.geometryName_),s.setGeometry(r),n.attributes){s.setProperties(n.attributes,!0);const t=n.attributes[i];void 0!==t&&s.setId(t)}return s}readFeaturesFromObject(t,e){if(e=e||{},t.features){const i=[],n=t.features;for(let r=0,s=n.length;r0&&"string"==typeof this.imageInfo.profile[0]&&hc.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0]}}getComplianceLevelFromProfile(t){const e=this.getComplianceLevelEntryFromProfile(t);if(void 0===e)return;const i=e.match(/level[0-2](?:\.json)?$/g);return Array.isArray(i)?i[0].replace(".json",""):void 0}getComplianceLevelSupportedFeatures(){if(void 0===this.imageInfo)return;const t=this.getImageApiVersion(),e=this.getComplianceLevelFromProfile(t);return void 0===e?ac.none.none:ac[t][e]}getTileSourceOptions(t){const e=t||{},i=this.getImageApiVersion();if(void 0===i)return;const n=void 0===i?void 0:uc[i](this);return void 0!==n?{url:n.url,version:i,size:[this.imageInfo.width,this.imageInfo.height],sizes:n.sizes,format:void 0!==e.format&&n.formats.includes(e.format)?e.format:void 0!==n.preferredFormat?n.preferredFormat:"jpg",supports:n.supports,quality:e.quality&&n.qualities.includes(e.quality)?e.quality:n.qualities.includes("native")?"native":"default",resolutions:Array.isArray(n.resolutions)?n.resolutions.sort((function(t,e){return e-t})):void 0,tileSize:n.tileSize}:void 0}},_T.format.JSONFeature=E_,_T.format.KML=class extends M_{constructor(t){super(),t=t||{},ux||($y=[255,255,255,1],nx=new rg({color:$y}),Jy=[20,2],Qy="pixels",tx="pixels",ex=[64,64],ix="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",sx=new lg({anchor:Jy,anchorOrigin:"bottom-left",anchorXUnits:Qy,anchorYUnits:tx,crossOrigin:"anonymous",rotation:0,scale:dx(ex),size:ex,src:ix}),rx="NO_IMAGE",ax=new hg({color:$y,width:1}),ox=new hg({color:[51,51,51,1],width:2}),lx=new mg({font:"bold 16px Helvetica",fill:nx,stroke:ox,scale:.8}),hx=new cg({fill:nx,image:sx,text:lx,stroke:ax,zIndex:0}),ux=[hx]),this.dataProjection=Ui("EPSG:4326"),this.defaultStyle_=t.defaultStyle?t.defaultStyle:ux,this.extractStyles_=void 0===t.extractStyles||t.extractStyles,this.writeStyles_=void 0===t.writeStyles||t.writeStyles,this.sharedStyles_={},this.showPointNames_=void 0===t.showPointNames||t.showPointNames,this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:"anonymous",this.iconUrlFunction_=t.iconUrlFunction?t.iconUrlFunction:gx,this.supportedMediaTypes=["application/vnd.google-earth.kml+xml"]}readDocumentOrFolder_(t,e){const i=Lu([],Pu(Xy,{Document:yu(this.readDocumentOrFolder_,this),Folder:yu(this.readDocumentOrFolder_,this),Placemark:xu(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),t,e,this);return i||void 0}readPlacemark_(t,e){const i=Lu({geometry:null},Wy,t,e,this);if(!i)return;const n=new lt,r=t.getAttribute("id");null!==r&&n.setId(r);const s=e[0],o=i.geometry;if(o&&Qp(o,!1,s),n.setGeometry(o),delete i.geometry,this.extractStyles_){const t=function(t,e,i,n,r){return function(s,o){let a=r,l="",h=[];if(a){const t=s.getGeometry();if(t)if(t instanceof Ip)h=t.getGeometriesArrayRecursive().filter((function(t){const e=t.getType();return"Point"===e||"MultiPoint"===e})),a=h.length>0;else{const e=t.getType();a="Point"===e||"MultiPoint"===e}}a&&(l=s.get("name"),a=a&&!!l,a&&/&[^&]+;/.test(l)&&(cx||(cx=document.createElement("textarea")),cx.innerHTML=l,l=cx.value));let c=i;if(t?c=t:e&&(c=fx(e,i,n)),a){const t=function(t,e){const i=[0,0];let n="start";const r=t.getImage();if(r){const t=r.getSize();if(t&&2==t.length){const e=r.getScaleArray(),s=r.getAnchor();i[0]=e[0]*(t[0]-s[0]),i[1]=e[1]*(t[1]/2-s[1]),n="left"}}let s=t.getText();s?(s=s.clone(),s.setFont(s.getFont()||lx.getFont()),s.setScale(s.getScale()||lx.getScale()),s.setFill(s.getFill()||lx.getFill()),s.setStroke(s.getStroke()||ox)):s=lx.clone();s.setText(e),s.setOffsetX(i[0]),s.setOffsetY(i[1]),s.setTextAlign(n);return new cg({image:r,text:s})}(c[0],l);if(h.length>0){t.setGeometry(new Ip(h));return[t,new cg({geometry:c[0].getGeometry(),image:null,fill:c[0].getFill(),stroke:c[0].getStroke(),text:null})].concat(c.slice(1))}return t}return c}}(i.Style,i.styleUrl,this.defaultStyle_,this.sharedStyles_,this.showPointNames_);n.setStyle(t)}return delete i.Style,n.setProperties(i,!0),n}readSharedStyle_(t,e){const i=t.getAttribute("id");if(null!==i){const n=Xx.call(this,t,e);if(n){let e,r=t.baseURI;if(r&&"about:blank"!=r||(r=window.location.href),r){e=new URL("#"+i,r).href}else e="#"+i;this.sharedStyles_[e]=n}}}readSharedStyleMap_(t,e){const i=t.getAttribute("id");if(null===i)return;const n=Sx.call(this,t,e);if(!n)return;let r,s=t.baseURI;if(s&&"about:blank"!=s||(s=window.location.href),s){r=new URL("#"+i,s).href}else r="#"+i;this.sharedStyles_[r]=n}readFeatureFromNode(t,e){if(!Xy.includes(t.namespaceURI))return null;const i=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return i||null}readFeaturesFromNode(t,e){if(!Xy.includes(t.namespaceURI))return[];let i;const n=t.localName;if("Document"==n||"Folder"==n)return i=this.readDocumentOrFolder_(t,[this.getReadOptions(t,e)]),i||[];if("Placemark"==n){const i=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return i?[i]:[]}if("kml"==n){i=[];for(let n=t.firstElementChild;n;n=n.nextElementSibling){const t=this.readFeaturesFromNode(n,e);t&&c(i,t)}return i}return[]}readName(t){if(t){if("string"==typeof t){const e=_u(t);return this.readNameFromDocument(e)}return pu(t)?this.readNameFromDocument(t):this.readNameFromNode(t)}}readNameFromDocument(t){for(let e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE){const t=this.readNameFromNode(e);if(t)return t}}readNameFromNode(t){for(let e=t.firstElementChild;e;e=e.nextElementSibling)if(Xy.includes(e.namespaceURI)&&"name"==e.localName)return z_(e);for(let e=t.firstElementChild;e;e=e.nextElementSibling){const t=e.localName;if(Xy.includes(e.namespaceURI)&&("Document"==t||"Folder"==t||"Placemark"==t||"kml"==t)){const t=this.readNameFromNode(e);if(t)return t}}}readNetworkLinks(t){const e=[];if("string"==typeof t){const i=_u(t);c(e,this.readNetworkLinksFromDocument(i))}else pu(t)?c(e,this.readNetworkLinksFromDocument(t)):c(e,this.readNetworkLinksFromNode(t));return e}readNetworkLinksFromDocument(t){const e=[];for(let i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&c(e,this.readNetworkLinksFromNode(i));return e}readNetworkLinksFromNode(t){const e=[];for(let i=t.firstElementChild;i;i=i.nextElementSibling)if(Xy.includes(i.namespaceURI)&&"NetworkLink"==i.localName){const t=Lu({},Zy,i,[]);e.push(t)}for(let i=t.firstElementChild;i;i=i.nextElementSibling){const t=i.localName;!Xy.includes(i.namespaceURI)||"Document"!=t&&"Folder"!=t&&"kml"!=t||c(e,this.readNetworkLinksFromNode(i))}return e}readRegion(t){const e=[];if("string"==typeof t){const i=_u(t);c(e,this.readRegionFromDocument(i))}else pu(t)?c(e,this.readRegionFromDocument(t)):c(e,this.readRegionFromNode(t));return e}readRegionFromDocument(t){const e=[];for(let i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&c(e,this.readRegionFromNode(i));return e}readRegionFromNode(t){const e=[];for(let i=t.firstElementChild;i;i=i.nextElementSibling)if(Xy.includes(i.namespaceURI)&&"Region"==i.localName){const t=Lu({},Ky,i,[]);e.push(t)}for(let i=t.firstElementChild;i;i=i.nextElementSibling){const t=i.localName;!Xy.includes(i.namespaceURI)||"Document"!=t&&"Folder"!=t&&"kml"!=t||c(e,this.readRegionFromNode(i))}return e}writeFeaturesNode(t,e){e=this.adaptOptions(e);const i=du(Xy[4],"kml"),n="http://www.w3.org/2000/xmlns/";i.setAttributeNS(n,"xmlns:gx",zy[0]),i.setAttributeNS(n,"xmlns:xsi",uu),i.setAttributeNS(uu,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");const r={node:i},s={};t.length>1?s.Document=t:1==t.length&&(s.Placemark=t[0]);const o=qy[i.namespaceURI],a=Ru(s,o);return Fu(r,Hy,bu,a,[e],o,this),i}},_T.format.KML.getDefaultFillStyle=function(){return nx},_T.format.KML.getDefaultImageStyle=function(){return sx},_T.format.KML.getDefaultStrokeStyle=function(){return ax},_T.format.KML.getDefaultStyle=function(){return hx},_T.format.KML.getDefaultStyleArray=function(){return ux},_T.format.KML.getDefaultTextStyle=function(){return lx},_T.format.KML.readFlatCoordinates=mx,_T.format.MVT=Em,_T.format.OSMXML=class extends M_{constructor(){super(),this.dataProjection=Ui("EPSG:4326")}readFeaturesFromNode(t,e){if(e=this.getReadOptions(t,e),"osm"==t.localName){const i=Lu({nodes:{},ways:[],features:[]},Xv,t,[e]);for(let t=0;t{const r=this.combineBboxAndFilter(n.geometryName,n.bbox,t.srsName,t.filter);Object.assign(i,{geometryName:n.geometryName,filter:r}),Bw(e,[n.name],[i])}));return e}combineBboxAndFilter(t,e,i,n){const r=$S(t,e,i);return n?HS(n,r):r}writeTransaction(t,e,i,n){const r=[],s=n.version?n.version:this.version_,o=du(ow[s],"Transaction");let a;o.setAttribute("service","WFS"),o.setAttribute("version",s),n&&(a=n.gmlOptions?n.gmlOptions:{},n.handle&&o.setAttribute("handle",n.handle)),o.setAttributeNS(uu,"xsi:schemaLocation",lw[s]);const l=function(t,e,i,n){const r=n.featurePrefix?n.featurePrefix:nw;let s;"1.0.0"===i?s=2:"1.1.0"===i?s=3:"2.0.0"===i&&(s=3.2);return Object.assign({node:t},{version:i,featureNS:n.featureNS,featureType:n.featureType,featurePrefix:r,gmlVersion:s,hasZ:n.hasZ,srsName:n.srsName},e)}(o,a,s,n);return t&&cw("Insert",t,r,l),e&&cw("Update",e,r,l),i&&cw("Delete",i,r,l),n.nativeElements&&cw("Native",n.nativeElements,r,l),o}readProjectionFromDocument(t){for(let e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(e);return null}readProjectionFromNode(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild)for(let e=(t=t.firstElementChild.firstElementChild).firstElementChild;e;e=e.nextElementSibling)if(0!==e.childNodes.length&&(1!==e.childNodes.length||3!==e.firstChild.nodeType)){const t=[{}];return this.gmlFormat_.readGeometryElement(e,t),Ui(t.pop().srsName)}return null}},_T.format.WFS.writeFilter=function(t,e){const i=du(Uw(e=e||"1.1.0"),"Filter"),n={node:i};return Object.assign(n,{version:e,filter:t}),Cw(i,t,[n]),i},_T.format.WKB=class extends Jp{constructor(t){super(),t=t||{},this.splitCollection=Boolean(t.splitCollection),this.viewCache_=null,this.hex_=!1!==t.hex,this.littleEndian_=!1!==t.littleEndian,this.ewkb_=!1!==t.ewkb,this.layout_=t.geometryLayout,this.nodataZ_=t.nodataZ||0,this.nodataM_=t.nodataM||0,this.srid_=t.srid}getType(){return this.hex_?"text":"arraybuffer"}readFeature(t,e){return new lt({geometry:this.readGeometry(t,e)})}readFeatures(t,e){let i=[];const n=this.readGeometry(t,e);return i=this.splitCollection&&n instanceof Ip?n.getGeometriesArray():[n],i.map((t=>new lt({geometry:t})))}readGeometry(t,e){const i=tE(t);if(!i)return null;const n=new Jw(i).readGeometry();return this.viewCache_=i,e=this.getReadOptions(t,e),this.viewCache_=null,Qp(n,!1,e)}readProjection(t){const e=this.viewCache_||tE(t);if(!e)return;const i=new Jw(e);return i.readWkbHeader(),i.getSrid()&&Ui("EPSG:"+i.getSrid())||void 0}writeFeature(t,e){return this.writeGeometry(t.getGeometry(),e)}writeFeatures(t,e){return this.writeGeometry(new Ip(t.map((t=>t.getGeometry()))),e)}writeGeometry(t,e){e=this.adaptOptions(e);const i=new Qw({layout:this.layout_,littleEndian:this.littleEndian_,ewkb:this.ewkb_,nodata:{Z:this.nodataZ_,M:this.nodataM_}});let n=Number.isInteger(this.srid_)?Number(this.srid_):null;if(!1!==this.srid_&&!Number.isInteger(this.srid_)){const t=e.dataProjection&&Ui(e.dataProjection);if(t){const e=t.getCode();e.startsWith("EPSG:")&&(n=Number(e.substring(5)))}}i.writeGeometry(Qp(t,!0,e),n);const r=i.getBuffer();return this.hex_?function(t){const e=new Uint8Array(t);return Array.from(e.values()).map((t=>(t<16?"0":"")+Number(t).toString(16).toUpperCase())).join("")}(r):r}},_T.format.WKT=class extends Dy{constructor(t){super(),t=t||{},this.splitCollection_=void 0!==t.splitCollection&&t.splitCollection}parse_(t){const e=new uE(t);return new dE(e).parse()}readFeatureFromText(t,e){const i=this.readGeometryFromText(t,e),n=new lt;return n.setGeometry(i),n}readFeaturesFromText(t,e){let i=[];const n=this.readGeometryFromText(t,e);i=this.splitCollection_&&"GeometryCollection"==n.getType()?n.getGeometriesArray():[n];const r=[];for(let t=0,e=i.length;t3&&!!Un(t,e,i,n)},_T.geom.flat.transform={},_T.geom.flat.transform.rotate=dn,_T.geom.flat.transform.scale=gn,_T.geom.flat.transform.transform2D=un,_T.geom.flat.transform.translate=fn,_T.has={},_T.has.DEVICE_PIXEL_RATIO=mt,_T.has.FIREFOX=ut,_T.has.IMAGE_DECODE=yt,_T.has.MAC=pt,_T.has.PASSIVE_EVENT_LISTENERS=xt,_T.has.SAFARI=dt,_T.has.SAFARI_BUG_237906=gt,_T.has.WEBKIT=ft,_T.has.WORKER_OFFSCREEN_CANVAS=_t,_T.interaction={},_T.interaction.DoubleClickZoom=ra,_T.interaction.DragAndDrop=class extends ea{constructor(t){t=t||{},super({handleEvent:g}),this.on,this.once,this.un,this.readAsBuffer_=!1,this.formats_=[];const e=t.formatConstructors?t.formatConstructors:[];for(let t=0,i=e.length;t0){this.source_&&(this.source_.clear(),this.source_.addFeatures(l)),this.dispatchEvent(new Am(Fm,t,l,s));break}}}registerListeners_(){const t=this.getMap();if(t){const e=this.target?this.target:t.getViewport();this.dropListenKeys_=[N(e,P,this.handleDrop,this),N(e,b,this.handleStop,this),N(e,R,this.handleStop,this),N(e,P,this.handleStop,this)]}}setActive(t){!this.getActive()&&t&&this.registerListeners_(),this.getActive()&&!t&&this.unregisterListeners_(),super.setActive(t)}setMap(t){this.unregisterListeners_(),super.setMap(t),this.getActive()&&this.registerListeners_()}tryReadFeatures_(t,e,i){try{return t.readFeatures(e,i)}catch(t){return null}}unregisterListeners_(){this.dropListenKeys_&&(this.dropListenKeys_.forEach(k),this.dropListenKeys_=null)}handleDrop(t){const e=t.dataTransfer.files;for(let t=0,i=e.length;t1?1:-1;return e.endInteraction(this.duration_,i),this.lastScaleDelta_=0,!1}handleDownEvent(t){return!!xa(t)&&(!!this.condition_(t)&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0))}},_T.interaction.DragZoom=La,_T.interaction.Draw=class extends sa{constructor(t){const e=t;e.stopDown||(e.stopDown=f),super(e),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=t.source?t.source:null,this.features_=t.features?t.features:null,this.snapTolerance_=t.snapTolerance?t.snapTolerance:12,this.type_=t.type,this.mode_=function(t){switch(t){case"Point":case"MultiPoint":return"Point";case"LineString":case"MultiLineString":return"LineString";case"Polygon":case"MultiPolygon":return"Polygon";case"Circle":return"Circle";default:throw new Error("Invalid type: "+t)}}(this.type_),this.stopClick_=!!t.stopClick,this.minPoints_=t.minPoints?t.minPoints:"Polygon"===this.mode_?3:2,this.maxPoints_="Circle"===this.mode_?2:t.maxPoints?t.maxPoints:1/0,this.finishCondition_=t.finishCondition?t.finishCondition:g,this.geometryLayout_=t.geometryLayout?t.geometryLayout:"XY";let i=t.geometryFunction;if(!i){const t=this.mode_;if("Circle"===t)i=function(t,e,i){const n=e||new Pp([NaN,NaN]),r=rn(t[0],i),s=Ti(r,rn(t[t.length-1],i));n.setCenterAndRadius(r,Math.sqrt(s),this.geometryLayout_);const o=en();return o&&n.transform(i,o),n};else{let e;"Point"===t?e=Wn:"LineString"===t?e=Op:"Polygon"===t&&(e=ur),i=function(i,n,r){return n?"Polygon"===t?i[0].length?n.setCoordinates([i[0].concat([i[0][0]])],this.geometryLayout_):n.setCoordinates([],this.geometryLayout_):n.setCoordinates(i,this.geometryLayout_):n=new e(i,this.geometryLayout_),n}}}this.geometryFunction_=i,this.dragVertexDelay_=void 0!==t.dragVertexDelay?t.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,this.overlay_=new zp({source:new zh({useSpatialIndex:!1,wrapX:!!t.wrapX&&t.wrapX}),style:t.style?t.style:Ym(),updateWhileInteracting:!0}),this.geometryName_=t.geometryName,this.condition_=t.condition?t.condition:ma,this.freehandCondition_,t.freehand?this.freehandCondition_=da:this.freehandCondition_=t.freehandCondition?t.freehandCondition:_a,this.traceCondition_,this.setTrace(t.trace||!1),this.traceState_={active:!1},this.traceSource_=t.traceSource||t.source||null,this.addChangeListener(ta,this.updateState_)}setTrace(t){let e;e=t?!0===t?da:t:fa,this.traceCondition_=e}setMap(t){super.setMap(t),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(t){t.originalEvent.type===E&&t.originalEvent.preventDefault(),this.freehand_="Point"!==this.mode_&&this.freehandCondition_(t);let e=t.type===ao.POINTERMOVE,i=!0;if(!this.freehand_&&this.lastDragTime_&&t.type===ao.POINTERDRAG){Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,e=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)}return this.freehand_&&t.type===ao.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(t.coordinate),i=!1):this.freehand_&&t.type===ao.POINTERDOWN?i=!1:e&&this.getPointerCount()<2?(i=t.type===ao.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):("mouse"===t.originalEvent.pointerType||t.type===ao.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(t)):t.type===ao.DBLCLICK&&(i=!1),super.handleEvent(t)&&i}handleDownEvent(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new oo(ao.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}toggleTraceState_(t){if(!this.traceSource_||!this.traceCondition_(t))return;if(this.traceState_.active)return void this.deactivateTrace_();const e=this.getMap(),i=zt([e.getCoordinateFromPixel([t.pixel[0]-this.snapTolerance_,t.pixel[1]+this.snapTolerance_]),e.getCoordinateFromPixel([t.pixel[0]+this.snapTolerance_,t.pixel[1]-this.snapTolerance_])]),n=this.traceSource_.getFeaturesInExtent(i);if(0===n.length)return;const r=function(t,e){const i=[];for(let n=0;nt.endIndex||!i&&et.endIndex)&&this.removeTracedCoordinates_(e,t.endIndex):(this.removeTracedCoordinates_(t.startIndex,t.endIndex),this.addTracedCoordinates_(t,t.startIndex,e))}removeTracedCoordinates_(t,e){if(t===e)return;let i=0;if(t0&&this.removeLastPoints_(i)}addTracedCoordinates_(t,e,i){if(e===i)return;const n=[];if(e=s;--e)n.push(jm(t.coordinates,e))}n.length&&this.appendCoordinates(n)}updateTrace_(t){const e=this.traceState_;if(!e.active)return;if(-1===e.targetIndex&&Ci(e.startPx,t.pixel)i.startIndex?hi.startIndex&&(h-=n.length)),l=h,a=t)}const h=e.targets[a];let c=h.ring;if(e.targetIndex===a&&c){const t=Zm(h.coordinates,l);Ci(i.getPixelFromCoordinate(t),e.startPx)>n&&(c=!1)}if(c){const t=h.coordinates,e=t.length,i=h.startIndex,n=l;if(ithis.squaredClickTolerance_:s<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?(this.updateTrace_(t),this.modifyDrawing_(t.coordinate)):this.createOrUpdateSketchPoint_(t.coordinate.slice())}atFinish_(t,e){let i=!1;if(this.sketchFeature_){let n=!1,r=[this.finishCoordinate_];const s=this.mode_;if("Point"===s)i=!0;else if("Circle"===s)i=2===this.sketchCoords_.length;else if("LineString"===s)n=!e&&this.sketchCoords_.length>this.minPoints_;else if("Polygon"===s){const t=this.sketchCoords_;n=t[0].length>this.minPoints_,r=[t[0][0],t[0][t[0].length-2]],r=e?[t[0][0]]:[t[0][0],t[0][t[0].length-2]]}if(n){const e=this.getMap();for(let n=0,s=r.length;n=this.maxPoints_&&(this.freehand_?r.pop():n=!0),r.push(t.slice()),this.geometryFunction_(r,e,i)):"Polygon"===s&&(r=this.sketchCoords_[0],r.length>=this.maxPoints_&&(this.freehand_?r.pop():n=!0),r.push(t.slice()),n&&(this.finishCoordinate_=r[0]),this.geometryFunction_(this.sketchCoords_,e,i)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),n&&this.finishDrawing()}removeLastPoints_(t){if(!this.sketchFeature_)return;const e=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),n=this.mode_;for(let r=0;r=2){this.finishCoordinate_=t[t.length-2].slice();const e=this.finishCoordinate_.slice();t[t.length-1]=e,this.createOrUpdateSketchPoint_(e)}this.geometryFunction_(t,e,i),"Polygon"===e.getType()&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(e)}else if("Polygon"===n){t=this.sketchCoords_[0],t.splice(-2,1);const n=this.sketchLine_.getGeometry();if(t.length>=2){const e=t[t.length-2].slice();t[t.length-1]=e,this.createOrUpdateSketchPoint_(e)}n.setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,i)}if(1===t.length){this.abortDrawing();break}}this.updateSketchFeatures_()}removeLastPoint(){this.removeLastPoints_(1)}finishDrawing(){const t=this.abortDrawing_();if(!t)return;let e=this.sketchCoords_;const i=t.getGeometry(),n=this.getMap().getView().getProjection();"LineString"===this.mode_?(e.pop(),this.geometryFunction_(e,i,n)):"Polygon"===this.mode_&&(e[0].pop(),this.geometryFunction_(e,i,n),e=i.getCoordinates()),"MultiPoint"===this.type_?t.setGeometry(new Dp([e])):"MultiLineString"===this.type_?t.setGeometry(new Np([e])):"MultiPolygon"===this.type_&&t.setGeometry(new Gp([e])),this.dispatchEvent(new km(Nm,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}abortDrawing_(){this.finishCoordinate_=null;const t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),this.deactivateTrace_(),t}abortDrawing(){const t=this.abortDrawing_();t&&this.dispatchEvent(new km(Dm,t))}appendCoordinates(t){const e=this.mode_,i=!this.sketchFeature_;let n;if(i&&this.startDrawing_(t[0]),"LineString"===e||"Circle"===e)n=this.sketchCoords_;else{if("Polygon"!==e)return;n=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}i&&n.shift(),n.pop();for(let e=0;er?o[1]:o[0]),a}}return null}handlePointerMove_(t){const e=t.pixel,i=t.map;let n=this.snapToVertex_(e,i);n||(n=i.getCoordinateFromPixelInternal(e)),this.createOrUpdatePointerFeature_(n)}createOrUpdateExtentFeature_(t){let e=this.extentFeature_;return e?t?e.setGeometry(gr(t)):e.setGeometry(void 0):(e=new lt(t?gr(t):{}),this.extentFeature_=e,this.extentOverlay_.getSource().addFeature(e)),e}createOrUpdatePointerFeature_(t){let e=this.vertexFeature_;if(e){e.getGeometry().setCoordinates(t)}else e=new lt(new Wn(t)),this.vertexFeature_=e,this.vertexOverlay_.getSource().addFeature(e);return e}handleEvent(t){return!t.originalEvent||!this.condition_(t)||(t.type!=ao.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(t),super.handleEvent(t),!1)}handleDownEvent(t){const e=t.pixel,i=t.map,n=this.getExtentInternal();let r=this.snapToVertex_(e,i);const s=function(t){let e=null,i=null;return t[0]==n[0]?e=n[2]:t[0]==n[2]&&(e=n[0]),t[1]==n[1]?i=n[3]:t[1]==n[3]&&(i=n[1]),null!==e&&null!==i?[e,i]:null};if(r&&n){const t=r[0]==n[0]||r[0]==n[2]?r[0]:null,e=r[1]==n[1]||r[1]==n[3]?r[1]:null;null!==t&&null!==e?this.pointerHandler_=Jm(s(r)):null!==t?this.pointerHandler_=Qm(s([t,n[1]]),s([t,n[3]])):null!==e&&(this.pointerHandler_=Qm(s([n[0],e]),s([n[2],e])))}else r=i.getCoordinateFromPixelInternal(e),this.setExtent([r[0],r[1],r[0],r[1]]),this.pointerHandler_=Jm(r);return!0}handleDragEvent(t){if(this.pointerHandler_){const e=t.coordinate;this.setExtent(this.pointerHandler_(e)),this.createOrUpdatePointerFeature_(e)}}handleUpEvent(t){this.pointerHandler_=null;const e=this.getExtentInternal();return e&&0!==ce(e)||this.setExtent(null),!1}setMap(t){this.extentOverlay_.setMap(t),this.vertexOverlay_.setMap(t),super.setMap(t)}getExtent(){return sn(this.getExtentInternal(),this.getMap().getView().getProjection())}getExtentInternal(){return this.extent_}setExtent(t){this.extent_=t||null,this.createOrUpdateExtentFeature_(t),this.dispatchEvent(new qm(this.extent_))}},_T.interaction.Extent.ExtentEvent=qm,_T.interaction.Interaction=ea,_T.interaction.Interaction.pan=ia,_T.interaction.Interaction.zoomByDelta=na,_T.interaction.KeyboardPan=Na,_T.interaction.KeyboardZoom=Da,_T.interaction.Link=class extends ea{constructor(t){let e;super(),e=!0===(t=Object.assign({animate:!0,replace:!1,prefix:""},t||{})).animate?{duration:250}:t.animate?t.animate:null,this.animationOptions_=e,this.replace_=t.replace,this.prefix_=t.prefix,this.listenerKeys_=[],this.initial_=!0,this.updateState_=this.updateState_.bind(this)}getParamName_(t){return this.prefix_?this.prefix_+t:t}get_(t,e){return t.get(this.getParamName_(e))}set_(t,e,i){t.set(this.getParamName_(e),i)}delete_(t,e){t.delete(this.getParamName_(e))}setMap(t){const e=this.getMap();super.setMap(t),t!==e&&(e&&this.unregisterListeners_(e),t&&(this.initial_=!0,this.updateState_(),this.registerListeners_(t)))}registerListeners_(t){this.listenerKeys_.push(N(t,mo,this.updateUrl_,this),N(t.getLayerGroup(),S,this.updateUrl_,this),N(t,"change:layergroup",this.handleChangeLayerGroup_,this)),this.replace_||addEventListener("popstate",this.updateState_)}unregisterListeners_(t){for(let t=0,e=this.listenerKeys_.length;t=0;--t){const n=i[t];for(let t=this.dragSegments_.length-1;t>=0;--t)this.dragSegments_[t][0]===n&&this.dragSegments_.splice(t,1);e.remove(n)}}setActive(t){this.vertexFeature_&&!t&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(t)}setMap(t){this.overlay_.setMap(t),super.setMap(t)}getOverlay(){return this.overlay_}handleSourceAdd_(t){t.feature&&this.features_.push(t.feature)}handleSourceRemove_(t){t.feature&&this.features_.remove(t.feature)}handleFeatureAdd_(t){this.addFeature_(t.element)}handleFeatureChange_(t){if(!this.changingFeature_){const e=t.target;this.removeFeature_(e),this.addFeature_(e)}}handleFeatureRemove_(t){this.removeFeature_(t.element)}writePointGeometry_(t,e){const i=e.getCoordinates(),n={feature:t,geometry:e,segment:[i,i]};this.rBush_.insert(e.getExtent(),n)}writeMultiPointGeometry_(t,e){const i=e.getCoordinates();for(let n=0,r=i.length;n=0;--t)this.insertVertex_(r[t],s)}return!!this.vertexFeature_}handleUpEvent(t){for(let e=this.dragSegments_.length-1;e>=0;--e){const i=this.dragSegments_[e][0],n=i.geometry;if("Circle"===n.getType()){const e=n.getCenter(),r=i.featureSegments[0],s=i.featureSegments[1];r.segment[0]=e,r.segment[1]=e,s.segment[0]=e,s.segment[1]=e,this.rBush_.update(Qt(e),r);let o=n;const a=en();if(a){const e=t.map.getView().getProjection();o=o.clone().transform(a,e),o=fr(o).transform(e,a)}this.rBush_.update(o.getExtent(),s)}else this.rBush_.update(zt(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new a_(o_,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1}handlePointerMove_(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)}handlePointerAtPixel_(t,e,i){const n=i||e.getCoordinateFromPixel(t),r=e.getView().getProjection(),s=function(t,e){return h_(n,t,r)-h_(n,e,r)};let o,a;if(this.hitDetection_){const i="object"==typeof this.hitDetection_?t=>t===this.hitDetection_:void 0;e.forEachFeatureAtPixel(t,((t,e,i)=>{if("Point"===(i=i||t.getGeometry()).getType()&&this.features_.getArray().includes(t)){a=i;const e=i.getFlatCoordinates().slice(0,2);o=[{feature:t,geometry:i,segment:[e,e]}]}return!0}),{layerFilter:i})}if(!o){const t=sn(Xt(on(Qt(n,n_),r),e.getView().getResolution()*this.pixelTolerance_,n_),r);o=this.rBush_.getInExtent(t)}if(o&&o.length>0){const i=o.sort(s)[0],l=i.segment;let h=c_(n,i,r);const c=e.getPixelFromCoordinate(h);let u=Ci(t,c);if(a||u<=this.pixelTolerance_){const t={};if(t[z(l)]=!0,this.snapToPointer_||(this.delta_[0]=h[0]-n[0],this.delta_[1]=h[1]-n[1]),"Circle"===i.geometry.getType()&&1===i.index)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(h,[i.feature],[i.geometry]);else{const n=e.getPixelFromCoordinate(l[0]),r=e.getPixelFromCoordinate(l[1]),s=Ti(c,n),a=Ti(c,r);u=Math.sqrt(Math.min(s,a)),this.snappedToVertex_=u<=this.pixelTolerance_,this.snappedToVertex_&&(h=s>a?l[1]:l[0]),this.createOrUpdateVertexFeature_(h,[i.feature],[i.geometry]);const d={};d[z(i.geometry)]=!0;for(let e=1,i=o.length;e=0;--o)r=t[o],u=r[0],d=z(u.feature),u.depth&&(d+="-"+u.depth.join("-")),d in e||(e[d]={}),0===r[1]?(e[d].right=u,e[d].index=u.index):1==r[1]&&(e[d].left=u,e[d].index=u.index+1);for(d in e){switch(c=e[d].right,l=e[d].left,a=e[d].index,h=a-1,u=void 0!==l?l:c,h<0&&(h=0),s=u.geometry,n=s.getCoordinates(),i=n,g=!1,s.getType()){case"MultiLineString":n[u.depth[0]].length>2&&(n[u.depth[0]].splice(a,1),g=!0);break;case"LineString":n.length>2&&(n.splice(a,1),g=!0);break;case"MultiPolygon":i=i[u.depth[1]];case"Polygon":i=i[u.depth[0]],i.length>4&&(a==i.length-1&&(a=0),i.splice(a,1),g=!0,0===a&&(i.pop(),i.push(i[0]),h=i.length-1))}if(g){this.setGeometryCoordinates_(s,n);const e=[];if(void 0!==l&&(this.rBush_.remove(l),e.push(l.segment[0])),void 0!==c&&(this.rBush_.remove(c),e.push(c.segment[1])),void 0!==l&&void 0!==c){const t={depth:u.depth,feature:u.feature,geometry:u.geometry,index:h,segment:e};this.rBush_.insert(zt(t.segment),t)}this.updateSegmentIndices_(s,a,u.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.length=0}}return g}setGeometryCoordinates_(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1}updateSegmentIndices_(t,e,i,n){this.rBush_.forEachInExtent(t.getExtent(),(function(r){r.geometry===t&&(void 0===i||void 0===r.depth||u(r.depth,i))&&r.index>e&&(r.index+=n)}))}},_T.interaction.Modify.ModifyEvent=a_,_T.interaction.MouseWheelZoom=ka,_T.interaction.PinchRotate=Ga,_T.interaction.PinchZoom=ja,_T.interaction.Pointer=sa,_T.interaction.Pointer.centroid=oa,_T.interaction.Select=p_,_T.interaction.Select.SelectEvent=g_,_T.interaction.Snap=class extends sa{constructor(t){const e=t=t||{};e.handleDownEvent||(e.handleDownEvent=g),e.stopDown||(e.stopDown=f),super(e),this.source_=t.source?t.source:null,this.vertex_=void 0===t.vertex||t.vertex,this.edge_=void 0===t.edge||t.edge,this.features_=t.features?t.features:null,this.featuresListenerKeys_=[],this.featureChangeListenerKeys_={},this.indexedFeaturesExtents_={},this.pendingFeatures_={},this.pixelTolerance_=void 0!==t.pixelTolerance?t.pixelTolerance:10,this.rBush_=new Ah,this.GEOMETRY_SEGMENTERS_={Point:this.segmentPointGeometry_.bind(this),LineString:this.segmentLineStringGeometry_.bind(this),LinearRing:this.segmentLineStringGeometry_.bind(this),Polygon:this.segmentPolygonGeometry_.bind(this),MultiPoint:this.segmentMultiPointGeometry_.bind(this),MultiLineString:this.segmentMultiLineStringGeometry_.bind(this),MultiPolygon:this.segmentMultiPolygonGeometry_.bind(this),GeometryCollection:this.segmentGeometryCollectionGeometry_.bind(this),Circle:this.segmentCircleGeometry_.bind(this)}}addFeature(t,e){e=void 0===e||e;const i=z(t),n=t.getGeometry();if(n){const e=this.GEOMETRY_SEGMENTERS_[n.getType()];if(e){this.indexedFeaturesExtents_[i]=n.getExtent([1/0,1/0,-1/0,-1/0]);const r=[];if(e(r,n),1===r.length)this.rBush_.insert(zt(r[0]),{feature:t,segment:r[0]});else if(r.length>1){const e=r.map((t=>zt(t))),i=r.map((e=>({feature:t,segment:e})));this.rBush_.load(e,i)}}}e&&(this.featureChangeListenerKeys_[i]=N(t,S,this.handleFeatureChange_,this))}forEachFeatureAdd_(t){this.addFeature(t)}forEachFeatureRemove_(t){this.removeFeature(t)}getFeatures_(){let t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t}handleEvent(t){const e=this.snapTo(t.pixel,t.coordinate,t.map);return e&&(t.coordinate=e.vertex.slice(0,2),t.pixel=e.vertexPixel),super.handleEvent(t)}handleFeatureAdd_(t){const e=m_(t);this.addFeature(e)}handleFeatureRemove_(t){const e=m_(t);this.removeFeature(e)}handleFeatureChange_(t){const e=t.target;if(this.handlingDownUpSequence){const t=z(e);t in this.pendingFeatures_||(this.pendingFeatures_[t]=e)}else this.updateFeature_(e)}handleUpEvent(t){const e=Object.values(this.pendingFeatures_);return e.length&&(e.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1}removeFeature(t,e){const i=void 0===e||e,n=z(t),r=this.indexedFeaturesExtents_[n];if(r){const e=this.rBush_,i=[];e.forEachInExtent(r,(function(e){t===e.feature&&i.push(e)}));for(let t=i.length-1;t>=0;--t)e.remove(i[t])}i&&(k(this.featureChangeListenerKeys_[n]),delete this.featureChangeListenerKeys_[n])}setMap(t){const e=this.getMap(),i=this.featuresListenerKeys_,n=this.getFeatures_();e&&(i.forEach(k),i.length=0,n.forEach(this.forEachFeatureRemove_.bind(this))),super.setMap(t),t&&(this.features_?i.push(N(this.features_,W,this.handleFeatureAdd_,this),N(this.features_,Z,this.handleFeatureRemove_,this)):this.source_&&i.push(N(this.source_,Oh,this.handleFeatureAdd_,this),N(this.source_,kh,this.handleFeatureRemove_,this)),n.forEach(this.forEachFeatureAdd_.bind(this)))}snapTo(t,e,i){const n=zt([i.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),i.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_])]),r=this.rBush_.getInExtent(n),s=r.length;if(0===s)return null;const o=i.getView().getProjection(),a=rn(e,o);let l,h=1/0;const c=this.pixelTolerance_*this.pixelTolerance_,u=()=>{if(l){const e=i.getPixelFromCoordinate(l);if(Ti(t,e)<=c)return{vertex:l,vertexPixel:[Math.round(e[0]),Math.round(e[1])]}}return null};if(this.vertex_){for(let t=0;t{const e=rn(t,o),i=Ti(a,e);i{t.push([e])}))}segmentMultiPolygonGeometry_(t,e){const i=e.getCoordinates();for(let e=0,n=i.length;ethis.featurePool_.length;)a=new lt,this.featurePool_.push(a);const h=n.getFeaturesCollection();h.clear();let c,u,d=0;for(c=0,u=this.meridians_.length;cMath.PI/2}const d=Al(t);for(let t=a;t<=l;++t){let i,n,c,g,f=this.meridians_.length+this.parallels_.length;if(this.meridiansLabels_)for(n=0,c=this.meridiansLabels_.length;n=a?(t[0]=o[0],t[2]=o[2]):s=!0);const l=[ii(e[0],this.minX_,this.maxX_),ii(e[1],this.minY_,this.maxY_)],h=this.toLonLatTransform_(l);isNaN(h[1])&&(h[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_);let c=ii(h[0],this.minLon_,this.maxLon_),u=ii(h[1],this.minLat_,this.maxLat_);const d=this.maxLines_;let g,f,p,m,_=t;s||(_=[ii(t[0],this.minX_,this.maxX_),ii(t[1],this.minY_,this.maxY_),ii(t[2],this.minX_,this.maxX_),ii(t[3],this.minY_,this.maxY_)]);const y=Re(_,this.toLonLatTransform_,void 0,8);let x=y[3],v=y[2],S=y[1],w=y[0];if(s||(Zt(_,this.bottomLeft_)&&(w=this.minLon_,S=this.minLat_),Zt(_,this.bottomRight_)&&(v=this.maxLon_,S=this.minLat_),Zt(_,this.topLeft_)&&(w=this.minLon_,x=this.maxLat_),Zt(_,this.topRight_)&&(v=this.maxLon_,x=this.maxLat_),x=ii(x,u,this.maxLat_),v=ii(v,c,this.maxLon_),S=ii(S,this.minLat_,u),w=ii(w,this.minLon_,c)),c=Math.floor(c/r)*r,m=ii(c,this.minLon_,this.maxLon_),f=this.addMeridian_(m,S,x,n,t,0),g=0,s)for(;(m-=r)>=w&&g++n[s]&&(r=s,s=1);const o=Math.max(e[1],n[r]),a=Math.min(e[3],n[s]),l=ii(e[1]+Math.abs(e[1]-e[3])*this.lonLabelPosition_,o,a),h=[n[r-1]+(n[s-1]-n[r-1])*(l-n[r])/(n[s]-n[r]),l],c=this.meridiansLabels_[i].geom;return c.setCoordinates(h),c}getMeridians(){return this.meridians_}getParallel_(t,e,i,n,r){const s=Wp(t,e,i,this.projection_,n);let o=this.parallels_[r];return o?(o.setFlatCoordinates("XY",s),o.changed()):o=new Op(s,"XY"),o}getParallelPoint_(t,e,i){const n=t.getFlatCoordinates();let r=0,s=n.length-2;n[r]>n[s]&&(r=s,s=0);const o=Math.max(e[0],n[r]),a=Math.min(e[2],n[s]),l=ii(e[0]+Math.abs(e[0]-e[2])*this.latLabelPosition_,o,a),h=[l,n[r+1]+(n[s+1]-n[r+1])*(l-n[r])/(n[s]-n[r])],c=this.parallelsLabels_[i].geom;return c.setCoordinates(h),c}getParallels(){return this.parallels_}updateProjectionInfo_(t){const e=Ui("EPSG:4326"),i=t.getWorldExtent();this.maxLat_=i[3],this.maxLon_=i[2],this.minLat_=i[1],this.minLon_=i[0];const n=Hi(t,e);if(this.minLon_=Math.abs(this.minLat_)?this.maxLat_:this.minLat_),this.projection_=t}},_T.layer.Group=ro,_T.layer.Group.GroupEvent=io,_T.layer.Heatmap=class extends Ig{constructor(t){t=t||{};const e=Object.assign({},t);delete e.gradient,delete e.radius,delete e.blur,delete e.weight,super(e),this.gradient_=null,this.addChangeListener(qp,this.handleGradientChanged_),this.setGradient(t.gradient?t.gradient:$p),this.setBlur(void 0!==t.blur?t.blur:15),this.setRadius(void 0!==t.radius?t.radius:8);const i=t.weight?t.weight:"weight";this.weightFunction_="string"==typeof i?function(t){return t.get(i)}:i,this.setRenderOrder(null)}getBlur(){return this.get(Kp)}getGradient(){return this.get(qp)}getRadius(){return this.get(Hp)}handleGradientChanged_(){this.gradient_=function(t){const e=1,i=256,n=Dr(e,i),r=n.createLinearGradient(0,0,e,i),s=1/(t.length-1);for(let e=0,i=t.length;e{i.setState("ready")})).catch((t=>{this.dispatchEvent(new Im(t));this.getSource().setState("error")})),void 0===this.getBackground()&&olms.applyBackground(this,t.styleUrl,{accessToken:this.accessToken})}},_T.layer.Tile=Nc,_T.layer.Vector=zp,_T.layer.VectorImage=class extends Ig{constructor(t){t=t||{};const e=Object.assign({},t);delete e.imageRatio,super(e),this.imageRatio_=void 0!==t.imageRatio?t.imageRatio:1}getImageRatio(){return this.imageRatio_}createRenderer(){return new Tp(this)}},_T.layer.VectorTile=Pm,_T.layer.WebGLPoints=class extends vs{constructor(t){super(Object.assign({},t)),this.parseResult_=tg(t.style),this.styleVariables_=t.style.variables||{},this.hitDetectionDisabled_=!!t.disableHitDetection}createRenderer(){return new gf(this,{vertexShader:this.parseResult_.builder.getSymbolVertexShader(),fragmentShader:this.parseResult_.builder.getSymbolFragmentShader(),hitVertexShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolVertexShader(!0),hitFragmentShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolFragmentShader(!0),uniforms:this.parseResult_.uniforms,attributes:this.parseResult_.attributes})}updateStyleVariables(t){Object.assign(this.styleVariables_,t),this.changed()}},_T.layer.WebGLTile=Mm,_T.loadingstrategy={},_T.loadingstrategy.all=xl,_T.loadingstrategy.bbox=function(t,e){return[t]},_T.loadingstrategy.tile=function(t){return function(e,i,n){const r=t.getZForResolution(ln(i,n)),s=t.getTileRangeForExtentAndZ(on(e,n),r),o=[],a=[r,0,0];for(a[1]=s.minX;a[1]<=s.maxX;++a[1])for(a[2]=s.minY;a[2]<=s.maxY;++a[2])o.push(sn(t.getTileCoordExtent(a),n));return o}},_T.math={},_T.math.ceil=gi,_T.math.clamp=ii,_T.math.floor=di,_T.math.lerp=hi,_T.math.modulo=li,_T.math.round=ui,_T.math.solveLinearSystem=si,_T.math.squaredDistance=ri,_T.math.squaredSegmentDistance=ni,_T.math.toDegrees=oi,_T.math.toFixed=ci,_T.math.toRadians=ai,_T.net={},_T.net.ClientError=wl,_T.net.ResponseError=Sl,_T.net.getJSON=El,_T.net.jsonp=vl,_T.net.overrideXHR=function(t){"undefined"!=typeof XMLHttpRequest&&(pl=XMLHttpRequest),global.XMLHttpRequest=t},_T.net.resolveUrl=Tl,_T.net.restoreXHR=function(){global.XMLHttpRequest=pl},_T.obj={},_T.obj.clear=y,_T.obj.isEmpty=x,_T.proj={},_T.proj.Projection=Ae,_T.proj.Units={},_T.proj.Units.METERS_PER_UNIT=Fe,_T.proj.Units.fromCode=Me,_T.proj.addCommon=cn,_T.proj.addCoordinateTransforms=Yi,_T.proj.addEquivalentProjections=Xi,_T.proj.addEquivalentTransforms=Vi,_T.proj.addProjection=ji,_T.proj.addProjections=Bi,_T.proj.clearAllProjections=function(){qe(),Qe()},_T.proj.clearUserProjection=function(){Qi=null},_T.proj.cloneTransform=ki,_T.proj.createProjection=Wi,_T.proj.createSafeCoordinateTransform=hn,_T.proj.createTransformFromCoordinateTransform=Zi,_T.proj.disableCoordinateWarning=Di,_T.proj.epsg3857={},_T.proj.epsg3857.EXTENT=De,_T.proj.epsg3857.HALF_SIZE=Ne,_T.proj.epsg3857.MAX_SAFE_Y=Ge,_T.proj.epsg3857.PROJECTIONS=Be,_T.proj.epsg3857.RADIUS=Oe,_T.proj.epsg3857.WORLD_EXTENT=ke,_T.proj.epsg3857.fromEPSG4326=Ue,_T.proj.epsg3857.toEPSG4326=ze,_T.proj.epsg4326={},_T.proj.epsg4326.EXTENT=Ve,_T.proj.epsg4326.METERS_PER_UNIT=We,_T.proj.epsg4326.PROJECTIONS=Ye,_T.proj.epsg4326.RADIUS=Xe,_T.proj.equivalent=Ki,_T.proj.fromLonLat=function(t,e){return Di(),$i(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")},_T.proj.fromUserCoordinate=rn,_T.proj.fromUserExtent=on,_T.proj.fromUserResolution=ln,_T.proj.get=Ui,_T.proj.getPointResolution=zi,_T.proj.getTransform=Hi,_T.proj.getTransformFromProjections=qi,_T.proj.getUserProjection=en,_T.proj.identityTransform=Gi,_T.proj.proj4={},_T.proj.proj4.register=function(t){const e=Object.keys(t.defs),i=e.length;let n,r;for(n=0;n180)&&(i[0]=li(n+180,360)-180),i},_T.proj.toUserCoordinate=nn,_T.proj.toUserExtent=sn,_T.proj.toUserResolution=an,_T.proj.transform=$i,_T.proj.transformExtent=Ji,_T.proj.transformWithProjections=function(t,e,i){return qi(e,i)(t)},_T.proj.transforms={},_T.proj.transforms.add=ti,_T.proj.transforms.clear=Qe,_T.proj.transforms.get=ei,_T.proj.transforms.remove=function(t,e){const i=t.getCode(),n=e.getCode(),r=Je[i][n];return delete Je[i][n],x(Je[i])&&delete Je[i],r},_T.proj.useGeographic=function(){tn("EPSG:4326")},_T.render={},_T.render.Box=Ea,_T.render.Event=Ts,_T.render.Feature=Bp,_T.render.Feature.toFeature=function(t,e){const i=t.getId(),n=Up(t),r=t.getProperties(),s=new lt;return void 0!==e&&s.setGeometryName(e),s.setGeometry(n),void 0!==i&&s.setId(i),s.setProperties(r,!0),s},_T.render.Feature.toGeometry=Up,_T.render.VectorContext=Cl,_T.render.canvas={},_T.render.canvas.Builder=qf,_T.render.canvas.BuilderGroup=np,_T.render.canvas.Executor=pp,_T.render.canvas.ExecutorGroup=_p,_T.render.canvas.ExecutorGroup.getPixelIndexArray=xp,_T.render.canvas.ImageBuilder=Hf,_T.render.canvas.Immediate=bl,_T.render.canvas.Instruction={},_T.render.canvas.Instruction.beginPathInstruction=Yf,_T.render.canvas.Instruction.closePathInstruction=Kf,_T.render.canvas.Instruction.fillInstruction=Wf,_T.render.canvas.Instruction.strokeInstruction=Zf,_T.render.canvas.LineStringBuilder=$f,_T.render.canvas.PolygonBuilder=Jf,_T.render.canvas.TextBuilder=ep,_T.render.canvas.checkedFonts=Vs,_T.render.canvas.defaultFillStyle=Ns,_T.render.canvas.defaultFont=Os,_T.render.canvas.defaultLineCap=Ds,_T.render.canvas.defaultLineDash=ks,_T.render.canvas.defaultLineDashOffset=0,_T.render.canvas.defaultLineJoin=Gs,_T.render.canvas.defaultLineWidth=1,_T.render.canvas.defaultMiterLimit=js,_T.render.canvas.defaultPadding=Xs,_T.render.canvas.defaultStrokeStyle=Bs,_T.render.canvas.defaultTextAlign=Us,_T.render.canvas.defaultTextBaseline=zs,_T.render.canvas.drawImageOrLabel=to,_T.render.canvas.getTextDimensions=Qs,_T.render.canvas.hitdetect={},_T.render.canvas.hitdetect.HIT_DETECT_RESOLUTION=vp,_T.render.canvas.hitdetect.createHitDetectionImageData=Sp,_T.render.canvas.hitdetect.hitDetect=wp,_T.render.canvas.measureAndCacheTextWidth=Js,_T.render.canvas.measureTextHeight=qs,_T.render.canvas.measureTextWidth=$s,_T.render.canvas.registerFont=Ks,_T.render.canvas.rotateAtOffset=function(t,e,i,n){0!==e&&(t.translate(i,n),t.rotate(e),t.translate(-i,-n))},_T.render.canvas.textHeights=Ys,_T.render.getRenderPixel=function(t,e){return bt(t.inversePixelTransform,e.slice(0))},_T.render.getVectorContext=Al,_T.render.toContext=function(t,e){const i=t.canvas,n=(e=e||{}).pixelRatio||mt,r=e.size;r&&(i.width=r[0]*n,i.height=r[1]*n,i.style.width=r[0]+"px",i.style.height=r[1]+"px");const s=[0,0,i.width,i.height],o=Pt([1,0,0,1,0,0],n,n);return new bl(t,n,s,o,0)},_T.render.webgl={},_T.render.webgl.BatchRenderer=pf,_T.render.webgl.LineStringBatchRenderer=_f,_T.render.webgl.MixedGeometryBatch=yf,_T.render.webgl.PointBatchRenderer=vf,_T.render.webgl.PolygonBatchRenderer=wf,_T.render.webgl.utils={},_T.render.webgl.utils.colorDecodeId=uf,_T.render.webgl.utils.colorEncodeId=cf,_T.render.webgl.utils.getBlankImageData=function(){const t=document.createElement("canvas").getContext("2d").createImageData(1,1);return t.data[0]=255,t.data[1]=255,t.data[2]=255,t.data[3]=255,t},_T.render.webgl.utils.writeLineSegmentToBuffers=function(t,e,i,n,r,s,o,a,l,h){const c=5+a.length,u=s.length/c,d=[t[e+0],t[e+1]],g=[t[i],t[i+1]],f=bt(h,[...d]),p=bt(h,[...g]);function m(t,e,i){const n=1e4;return Math.round(1500*e)+Math.round(1500*i)*n+t*n*n}function _(t,e,i){const n=Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])),r=[(e[0]-t[0])/n,(e[1]-t[1])/n],s=[-r[1],r[0]],o=Math.sqrt((i[0]-t[0])*(i[0]-t[0])+(i[1]-t[1])*(i[1]-t[1])),a=[(i[0]-t[0])/o,(i[1]-t[1])/o],l=0===n||0===o?0:Math.acos(ii(a[0]*r[0]+a[1]*r[1],-1,1));return a[0]*s[0]+a[1]*s[1]>0?l:2*Math.PI-l}const y=null!==r;let x=0,v=0;if(null!==n){x=_(f,p,bt(h,[...[t[n],t[n+1]]]))}if(y){v=_(p,f,bt(h,[...[t[r],t[r+1]]]))}s.push(d[0],d[1],g[0],g[1],m(0,x,v)),s.push(...a),s.push(d[0],d[1],g[0],g[1],m(1,x,v)),s.push(...a),s.push(d[0],d[1],g[0],g[1],m(2,x,v)),s.push(...a),s.push(d[0],d[1],g[0],g[1],m(3,x,v)),s.push(...a),o.push(u,u+1,u+2,u+1,u+3,u+2)},_T.render.webgl.utils.writePointFeatureToBuffers=function(t,e,i,n,r,s){const o=3+r,a=t[e+0],l=t[e+1],h=af;h.length=r;for(let i=0;i{l--,this.ready=l<=0,this.getLayer().changed()};this.polygonRenderer_.rebuild(this.batch_.polygonBatch,t,"Polygon",h),this.lineStringRenderer_.rebuild(this.batch_.lineStringBatch,t,"LineString",h),this.pointRenderer_.rebuild(this.batch_.pointBatch,t,"Point",h),this.previousExtent_=t.extent.slice()}return this.helper.makeProjectionTransform(t,this.currentTransform_),this.helper.prepareDraw(t),!0}forEachFeatureAtCoordinate(t,e,i,n,r){}disposeInternal(){this.worker_.terminate(),this.layer_=null,this.sourceListenKeys_.forEach((function(t){k(t)})),this.sourceListenKeys_=null,super.disposeInternal()}},_T.renderer.webgl.shaders={},_T.renderer.webgl.shaders.FILL_FRAGMENT_SHADER=bf,_T.renderer.webgl.shaders.FILL_VERTEX_SHADER=Cf,_T.renderer.webgl.shaders.POINT_FRAGMENT_SHADER=Lf,_T.renderer.webgl.shaders.POINT_VERTEX_SHADER=If,_T.renderer.webgl.shaders.STROKE_FRAGMENT_SHADER=Pf,_T.renderer.webgl.shaders.STROKE_VERTEX_SHADER=Rf,_T.renderer.webgl.shaders.packColor=Ef,_T.reproj={},_T.reproj.Image=gc,_T.reproj.Tile=zl,_T.reproj.Triangulation=Ul,_T.reproj.calculateSourceExtentResolution=jl,_T.reproj.calculateSourceResolution=Gl,_T.reproj.canvasPool=Nl,_T.reproj.common={},_T.reproj.common.ERROR_THRESHOLD=.5,_T.reproj.render=Bl,_T.resolutionconstraint={},_T.resolutionconstraint.createMinMaxResolution=ko,_T.resolutionconstraint.createSnapToPower=Do,_T.resolutionconstraint.createSnapToResolutions=No,_T.rotationconstraint={},_T.rotationconstraint.createSnapToN=Bo,_T.rotationconstraint.createSnapToZero=Uo,_T.rotationconstraint.disable=Go,_T.rotationconstraint.none=jo,_T.size={},_T.size.buffer=Ua,_T.size.hasArea=za,_T.size.scale=Xa,_T.size.toSize=Va,_T.source={},_T.source.BingMaps=class extends uh{constructor(t){const e=void 0!==t.hidpi&&t.hidpi;super({cacheSize:t.cacheSize,crossOrigin:"anonymous",interpolate:t.interpolate,opaque:!0,projection:Ui("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,tilePixelRatio:e?2:1,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.hidpi_=e,this.culture_=void 0!==t.culture?t.culture:"en-us",this.maxZoom_=void 0!==t.maxZoom?t.maxZoom:-1,this.apiKey_=t.key,this.imagerySet_=t.imagerySet;vl("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+this.imagerySet_+"?uriScheme=https&include=ImageryProviders&key="+this.apiKey_+"&c="+this.culture_,this.handleImageryMetadataResponse.bind(this),void 0,"jsonp")}getApiKey(){return this.apiKey_}getImagerySet(){return this.imagerySet_}handleImageryMetadataResponse(t){if(200!=t.statusCode||"OK"!=t.statusDescription||"ValidCredentials"!=t.authenticationResultCode||1!=t.resourceSets.length||1!=t.resourceSets[0].resources.length)return void this.setState("error");const e=t.resourceSets[0].resources[0],i=-1==this.maxZoom_?e.zoomMax:this.maxZoom_,n=ih(this.getProjection()),r=this.hidpi_?2:1,s=e.imageWidth==e.imageHeight?e.imageWidth/r:[e.imageWidth/r,e.imageHeight/r],o=Ql({extent:n,minZoom:e.zoomMin,maxZoom:i,tileSize:s});this.tileGrid=o;const a=this.culture_,l=this.hidpi_;if(this.tileUrlFunction=ah(e.imageUrlSubdomains.map((function(t){const i=[0,0,0],n=e.imageUrl.replace("{subdomain}",t).replace("{culture}",a);return function(t,e,r){if(t){el(t[0],t[1],t[2],i);let e=n;return l&&(e+="&dpi=d1&device=mobile"),e.replace("{quadkey}",gh(i))}}}))),e.imageryProviders){const t=qi(Ui("EPSG:4326"),this.getProjection());this.setAttributions(function(i){const n=[],r=i.viewState,s=this.getTileGrid(),o=s.getZForResolution(r.resolution,this.zDirection),a=s.getTileCoordForCoordAndZ(r.center,o)[0];return e.imageryProviders.map((function(e){let r=!1;const s=e.coverageAreas;for(let e=0,n=s.length;e=n.zoomMin&&a<=n.zoomMax){const e=n.bbox;if(we(Re([e[1],e[0],e[3],e[2]],t),i.extent)){r=!0;break}}}r&&n.push(e.attribution)})),n.push('Terms of Use'),n}.bind(this))}this.setState("ready")}},_T.source.BingMaps.quadKey=gh,_T.source.CartoDB=class extends fh{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,maxZoom:void 0!==t.maxZoom?t.maxZoom:18,minZoom:t.minZoom,projection:t.projection,transition:t.transition,wrapX:t.wrapX,zDirection:t.zDirection}),this.account_=t.account,this.mapId_=t.map||"",this.config_=t.config||{},this.templateCache_={},this.initializeMap_()}getConfig(){return this.config_}updateConfig(t){Object.assign(this.config_,t),this.initializeMap_()}setConfig(t){this.config_=t||{},this.initializeMap_()}initializeMap_(){const t=JSON.stringify(this.config_);if(this.templateCache_[t])return void this.applyTemplate_(this.templateCache_[t]);let e="https://"+this.account_+".carto.com/api/v1/map";this.mapId_&&(e+="/named/"+this.mapId_);const i=new XMLHttpRequest;i.addEventListener("load",this.handleInitResponse_.bind(this,t)),i.addEventListener("error",this.handleInitError_.bind(this)),i.open("POST",e),i.setRequestHeader("Content-type","application/json"),i.send(JSON.stringify(this.config_))}handleInitResponse_(t,e){const i=e.target;if(!i.status||i.status>=200&&i.status<300){let e;try{e=JSON.parse(i.responseText)}catch(t){return void this.setState("error")}this.applyTemplate_(e),this.templateCache_[t]=e,this.setState("ready")}else this.setState("error")}handleInitError_(t){this.setState("error")}applyTemplate_(t){const e="https://"+t.cdn_url.https+"/"+this.account_+"/api/v1/map/"+t.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(e)}},_T.source.Cluster=class extends zh{constructor(t){super({attributions:t.attributions,wrapX:t.wrapX}),this.resolution=void 0,this.distance=void 0!==t.distance?t.distance:20,this.minDistance=t.minDistance||0,this.interpolationRatio=0,this.features=[],this.geometryFunction=t.geometryFunction||function(t){const e=t.getGeometry();return at("Point"==e.getType(),10),e},this.createCustomCluster_=t.createCluster,this.source=null,this.boundRefresh_=this.refresh.bind(this),this.updateDistance(this.distance,this.minDistance),this.setSource(t.source||null)}clear(t){this.features.length=0,super.clear(t)}getDistance(){return this.distance}getSource(){return this.source}loadFeatures(t,e,i){this.source.loadFeatures(t,e,i),e!==this.resolution&&(this.resolution=e,this.refresh())}setDistance(t){this.updateDistance(t,this.minDistance)}setMinDistance(t){this.updateDistance(this.distance,t)}getMinDistance(){return this.minDistance}setSource(t){this.source&&this.source.removeEventListener(S,this.boundRefresh_),this.source=t,t&&t.addEventListener(S,this.boundRefresh_),this.refresh()}refresh(){this.clear(),this.cluster(),this.addFeatures(this.features)}updateDistance(t,e){const i=0===t?0:Math.min(e,t)/t,n=t!==this.distance||this.interpolationRatio!==i;this.distance=t,this.minDistance=e,this.interpolationRatio=i,n&&this.refresh()}cluster(){if(void 0===this.resolution||!this.source)return;const t=[1/0,1/0,-1/0,-1/0],e=this.distance*this.resolution,i=this.source.getFeatures(),n={};for(let r=0,s=i.length;r=0;--e){const n=this.geometryFunction(t[e]);n?mi(i,n.getCoordinates()):t.splice(e,1)}Ei(i,1/t.length);const n=ge(e),r=this.interpolationRatio,s=new Wn([i[0]*(1-r)+n[0]*r,i[1]*(1-r)+n[1]*r]);return this.createCustomCluster_?this.createCustomCluster_(s,t):new lt({geometry:s,features:t})}},_T.source.DataTile=Xh,_T.source.GeoTIFF=ic,_T.source.IIIF=class extends uh{constructor(t){const e=t||{};let i=e.url||"";i+=i.lastIndexOf("/")===i.length-1||""===i?"":"/";const n=e.version||sc,r=e.sizes||[],s=e.size;at(null!=s&&Array.isArray(s)&&2==s.length&&!isNaN(s[0])&&s[0]>0&&!isNaN(s[1])&&s[1]>0,60);const o=s[0],a=s[1],l=e.tileSize,h=e.tilePixelRatio||1,c=e.format||"jpg",u=e.quality||(e.version==rc?"native":"default");let d=e.resolutions||[];const g=e.supports||[],f=e.extent||[0,-a,o,0],p=null!=r&&Array.isArray(r)&&r.length>0,m=void 0!==l&&("number"==typeof l&&Number.isInteger(l)&&l>0||Array.isArray(l)&&l.length>0),_=null!=g&&Array.isArray(g)&&(g.includes("regionByPx")||g.includes("regionByPct"))&&(g.includes("sizeByWh")||g.includes("sizeByH")||g.includes("sizeByW")||g.includes("sizeByPct"));let y,x,v;if(d.sort((function(t,e){return e-t})),m||_)if(null!=l&&("number"==typeof l&&Number.isInteger(l)&&l>0?(y=l,x=l):Array.isArray(l)&&l.length>0&&((1==l.length||null==l[1]&&Number.isInteger(l[0]))&&(y=l[0],x=l[0]),2==l.length&&(Number.isInteger(l[0])&&Number.isInteger(l[1])?(y=l[0],x=l[1]):null==l[0]&&Number.isInteger(l[1])&&(y=l[1],x=l[1])))),void 0!==y&&void 0!==x||(y=Lo,x=Lo),0==d.length){v=Math.max(Math.ceil(Math.log(o/y)/Math.LN2),Math.ceil(Math.log(a/x)/Math.LN2));for(let t=v;t>=0;t--)d.push(Math.pow(2,t))}else{const t=Math.max(...d);v=Math.round(Math.log(t)/Math.LN2)}else if(y=o,x=a,d=[],p){r.sort((function(t,e){return t[0]-e[0]})),v=-1;const t=[];for(let e=0;e0&&d[d.length-1]==i?t.push(e):(d.push(i),v++)}if(t.length>0)for(let e=0;ev)return;const S=t[1],w=t[2],E=d[f];if(!(void 0===S||void 0===w||void 0===E||S<0||Math.ceil(o/E/y)<=S||w<0||Math.ceil(a/E/x)<=w)){if(_||m){const t=S*y*E,e=w*x*E;let i=y*E,r=x*E,s=y,c=x;if(t+i>o&&(i=o-t),e+r>a&&(r=a-e),t+y*E>o&&(s=Math.floor((o-t+E-1)/E)),e+x*E>a&&(c=Math.floor((a-e+E-1)/E)),0==t&&i==o&&0==e&&r==a)l="full";else if(!_||g.includes("regionByPx"))l=t+","+e+","+i+","+r;else if(g.includes("regionByPct")){l="pct:"+dc(t/o*100)+","+dc(e/a*100)+","+dc(i/o*100)+","+dc(r/a*100)}n!=oc||_&&!g.includes("sizeByWh")?!_||g.includes("sizeByW")?h=s+",":g.includes("sizeByH")?h=","+c:g.includes("sizeByWh")?h=s+","+c:g.includes("sizeByPct")&&(h="pct:"+dc(100/E)):h=s+","+c}else if(l="full",p){const t=r[f][0],e=r[f][1];h=n==oc?t==o&&e==a?"max":t+","+e:t==o?"full":t+","}else h=n==oc?"max":"full";return i+l+"/"+h+"/0/"+u+"."+c}},transition:e.transition}),this.zDirection=e.zDirection}},_T.source.Image=yc,_T.source.Image.ImageSourceEvent=_c,_T.source.Image.defaultImageLoadFunction=xc,_T.source.ImageArcGISRest=class extends yc{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions}),this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null,this.hidpi_=void 0===t.hidpi||t.hidpi,this.url_=t.url,this.imageLoadFunction_=void 0!==t.imageLoadFunction?t.imageLoadFunction:xc,this.params_=t.params||{},this.image_=null,this.imageSize_=[0,0],this.renderedRevision_=0,this.ratio_=void 0!==t.ratio?t.ratio:1.5}getParams(){return this.params_}getImageInternal(t,e,i,n){if(void 0===this.url_)return null;e=this.findNearestResolution(e),i=this.hidpi_?i:1;const r=this.image_;if(r&&this.renderedRevision_==this.getRevision()&&r.getResolution()==e&&r.getPixelRatio()==i&&Yt(r.getExtent(),t))return r;const s={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};Object.assign(s,this.params_);const o=((t=t.slice())[0]+t[2])/2,a=(t[1]+t[3])/2;if(1!=this.ratio_){const e=this.ratio_*Se(t)/2,i=this.ratio_*_e(t)/2;t[0]=o-e,t[1]=a-i,t[2]=o+e,t[3]=a+i}const l=e/i,h=Math.ceil(Se(t)/l),c=Math.ceil(_e(t)/l);t[0]=o-l*h/2,t[2]=o+l*h/2,t[1]=a-l*c/2,t[3]=a+l*c/2,this.imageSize_[0]=h,this.imageSize_[1]=c;const u=this.getRequestUrl_(t,this.imageSize_,i,n,s);return this.image_=new Ar(t,e,i,u,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(S,this.handleImageChange.bind(this)),this.image_}getImageLoadFunction(){return this.imageLoadFunction_}getRequestUrl_(t,e,i,n,r){const s=n.getCode().split(/:(?=\d+$)/).pop();r.SIZE=e[0]+","+e[1],r.BBOX=t.join(","),r.BBOXSR=s,r.IMAGESR=s,r.DPI=Math.round(90*i);const o=this.url_,a=o.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return a==o&&at(!1,50),vc(a,r)}getUrl(){return this.url_}setImageLoadFunction(t){this.image_=null,this.imageLoadFunction_=t,this.changed()}setUrl(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())}updateParams(t){Object.assign(this.params_,t),this.image_=null,this.changed()}},_T.source.ImageCanvas=class extends yc{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions,state:t.state}),this.canvasFunction_=t.canvasFunction,this.canvas_=null,this.renderedRevision_=0,this.ratio_=void 0!==t.ratio?t.ratio:1.5}getImageInternal(t,e,i,n){e=this.findNearestResolution(e);let r=this.canvas_;if(r&&this.renderedRevision_==this.getRevision()&&r.getResolution()==e&&r.getPixelRatio()==i&&Yt(r.getExtent(),t))return r;Ce(t=t.slice(),this.ratio_);const s=[Se(t)/e*i,_e(t)/e*i],o=this.canvasFunction_.call(this,t,e,i,s,n);return o&&(r=new Nr(t,e,i,o)),this.canvas_=r,this.renderedRevision_=this.getRevision(),r}},_T.source.ImageMapGuide=class extends yc{constructor(t){super({interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions}),this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null,this.displayDpi_=void 0!==t.displayDpi?t.displayDpi:96,this.params_=t.params||{},this.url_=t.url,this.imageLoadFunction_=void 0!==t.imageLoadFunction?t.imageLoadFunction:xc,this.hidpi_=void 0===t.hidpi||t.hidpi,this.metersPerUnit_=void 0!==t.metersPerUnit?t.metersPerUnit:1,this.ratio_=void 0!==t.ratio?t.ratio:1,this.useOverlay_=void 0!==t.useOverlay&&t.useOverlay,this.image_=null,this.renderedRevision_=0}getParams(){return this.params_}getImageInternal(t,e,i,n){e=this.findNearestResolution(e),i=this.hidpi_?i:1;let r=this.image_;if(r&&this.renderedRevision_==this.getRevision()&&r.getResolution()==e&&r.getPixelRatio()==i&&Yt(r.getExtent(),t))return r;1!=this.ratio_&&Ce(t=t.slice(),this.ratio_);const s=[Se(t)/e*i,_e(t)/e*i];if(void 0!==this.url_){const o=this.getUrl(this.url_,this.params_,t,s,n);r=new Ar(t,e,i,o,this.crossOrigin_,this.imageLoadFunction_),r.addEventListener(S,this.handleImageChange.bind(this))}else r=null;return this.image_=r,this.renderedRevision_=this.getRevision(),r}getImageLoadFunction(){return this.imageLoadFunction_}updateParams(t){Object.assign(this.params_,t),this.changed()}getUrl(t,e,i,n,r){const s=function(t,e,i,n){const r=Se(t),s=_e(t),o=e[0],a=e[1],l=.0254/n;return a*r>o*s?r*i/(o*l):s*i/(a*l)}(i,n,this.metersPerUnit_,this.displayDpi_),o=ge(i),a={OPERATION:this.useOverlay_?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.displayDpi_,SETDISPLAYWIDTH:Math.round(n[0]),SETDISPLAYHEIGHT:Math.round(n[1]),SETVIEWSCALE:s,SETVIEWCENTERX:o[0],SETVIEWCENTERY:o[1]};return Object.assign(a,e),vc(t,a)}setImageLoadFunction(t){this.image_=null,this.imageLoadFunction_=t,this.changed()}},_T.source.ImageStatic=class extends yc{constructor(t){const e=void 0!==t.crossOrigin?t.crossOrigin:null,i=void 0!==t.imageLoadFunction?t.imageLoadFunction:xc;super({attributions:t.attributions,interpolate:t.interpolate,projection:Ui(t.projection)}),this.url_=t.url,this.imageExtent_=t.imageExtent,this.image_=new Ar(this.imageExtent_,void 0,1,this.url_,e,i),this.imageSize_=t.imageSize?t.imageSize:null,this.image_.addEventListener(S,this.handleImageChange.bind(this))}getImageExtent(){return this.imageExtent_}getImageInternal(t,e,i,n){return we(t,this.image_.getExtent())?this.image_:null}getUrl(){return this.url_}handleImageChange(t){if(this.image_.getState()==Lr){const t=this.image_.getExtent(),e=this.image_.getImage();let i,n;this.imageSize_?(i=this.imageSize_[0],n=this.imageSize_[1]):(i=e.width,n=e.height);const r=Se(t),s=_e(t),o=r/i,a=s/n;let l=i,h=n;if(o>a?l=Math.round(r/a):h=Math.round(s/o),l!==i||h!==n){const t=Dr(l,h);this.getInterpolate()||(t.imageSmoothingEnabled=!1);const r=t.canvas;t.drawImage(e,0,0,i,n,0,0,r.width,r.height),this.image_.setImage(r)}}super.handleImageChange(t)}},_T.source.ImageWMS=class extends yc{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions}),this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null,this.url_=t.url,this.imageLoadFunction_=void 0!==t.imageLoadFunction?t.imageLoadFunction:xc,this.params_=Object.assign({},t.params),this.v13_=!0,this.updateV13_(),this.serverType_=t.serverType,this.hidpi_=void 0===t.hidpi||t.hidpi,this.image_=null,this.imageSize_=[0,0],this.renderedRevision_=0,this.ratio_=void 0!==t.ratio?t.ratio:1.5}getFeatureInfoUrl(t,e,i,n){if(void 0===this.url_)return;const r=Ui(i),s=this.getProjection();s&&s!==r&&(e=Gl(s,r,t,e),t=$i(t,r,s));const o=pe(t,e,0,wc),a={SERVICE:"WMS",VERSION:Sc,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};Object.assign(a,this.params_,n);const l=di((t[0]-o[0])/e,4),h=di((o[3]-t[1])/e,4);return a[this.v13_?"I":"X"]=l,a[this.v13_?"J":"Y"]=h,this.getRequestUrl_(o,wc,1,s||r,a)}getLegendUrl(t,e){if(void 0===this.url_)return;const i={SERVICE:"WMS",VERSION:Sc,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){const t=this.params_.LAYERS;if(!(!Array.isArray(t)||1===t.length))return;i.LAYER=t}if(void 0!==t){const e=this.getProjection()?this.getProjection().getMetersPerUnit():1,n=28e-5;i.SCALE=t*e/n}return Object.assign(i,e),vc(this.url_,i)}getParams(){return this.params_}getImageInternal(t,e,i,n){if(void 0===this.url_)return null;e=this.findNearestResolution(e),1==i||this.hidpi_&&void 0!==this.serverType_||(i=1);const r=e/i,s=ge(t),o=pe(s,r,0,[gi(Se(t)/r,4),gi(_e(t)/r,4)]),a=pe(s,r,0,[gi(this.ratio_*Se(t)/r,4),gi(this.ratio_*_e(t)/r,4)]),l=this.image_;if(l&&this.renderedRevision_==this.getRevision()&&l.getResolution()==e&&l.getPixelRatio()==i&&Yt(l.getExtent(),o))return l;const h={SERVICE:"WMS",VERSION:Sc,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};Object.assign(h,this.params_),this.imageSize_[0]=ui(Se(a)/r,4),this.imageSize_[1]=ui(_e(a)/r,4);const c=this.getRequestUrl_(a,this.imageSize_,i,n,h);return this.image_=new Ar(a,e,i,c,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(S,this.handleImageChange.bind(this)),this.image_}getImageLoadFunction(){return this.imageLoadFunction_}getRequestUrl_(t,e,i,n,r){if(at(void 0!==this.url_,9),r[this.v13_?"CRS":"SRS"]=n.getCode(),"STYLES"in this.params_||(r.STYLES=""),1!=i)switch(this.serverType_){case"geoserver":const t=90*i+.5|0;"FORMAT_OPTIONS"in r?r.FORMAT_OPTIONS+=";dpi:"+t:r.FORMAT_OPTIONS="dpi:"+t;break;case"mapserver":r.MAP_RESOLUTION=90*i;break;case"carmentaserver":case"qgis":r.DPI=90*i;break;default:at(!1,8)}r.WIDTH=e[0],r.HEIGHT=e[1];const s=n.getAxisOrientation();let o;return o=this.v13_&&"ne"==s.substr(0,2)?[t[1],t[0],t[3],t[2]]:t,r.BBOX=o.join(","),vc(this.url_,r)}getUrl(){return this.url_}setImageLoadFunction(t){this.image_=null,this.imageLoadFunction_=t,this.changed()}setUrl(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())}updateParams(t){Object.assign(this.params_,t),this.updateV13_(),this.image_=null,this.changed()}updateV13_(){const t=this.params_.VERSION||Sc;this.v13_=pi(t,"1.3")>=0}},_T.source.OGCMapTile=class extends uh{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition});Rg({url:t.url,projection:this.getProjection(),mediaType:t.mediaType,context:t.context||null}).then(this.handleTileSetInfo_.bind(this)).catch(this.handleError_.bind(this))}handleTileSetInfo_(t){this.tileGrid=t.grid,this.setTileUrlFunction(t.urlFunction,t.urlTemplate),this.setState("ready")}handleError_(t){console.error(t),this.setState("error")}},_T.source.OGCVectorTile=class extends Qc{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,format:t.format,overlaps:t.overlaps,projection:t.projection,tileClass:t.tileClass,transition:t.transition,wrapX:t.wrapX,zDirection:t.zDirection,state:"loading"});Rg({url:t.url,projection:this.getProjection(),mediaType:t.mediaType,supportedMediaTypes:t.format.supportedMediaTypes,context:t.context||null}).then(this.handleTileSetInfo_.bind(this)).catch(this.handleError_.bind(this))}handleTileSetInfo_(t){this.tileGrid=t.grid,this.setTileUrlFunction(t.urlFunction,t.urlTemplate),this.setState("ready")}handleError_(t){console.error(t),this.setState("error")}},_T.source.OSM=class extends fh{constructor(t){let e;e=void 0!==(t=t||{}).attributions?t.attributions:[Ec];const i=void 0!==t.crossOrigin?t.crossOrigin:"anonymous",n=void 0!==t.url?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:i,interpolate:t.interpolate,maxZoom:void 0!==t.maxZoom?t.maxZoom:19,opaque:void 0===t.opaque||t.opaque,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:n,wrapX:t.wrapX,zDirection:t.zDirection})}},_T.source.OSM.ATTRIBUTION=Ec,_T.source.Raster=Wc,_T.source.Raster.Processor=Uc,_T.source.Raster.RasterSourceEvent=Vc,_T.source.Raster.newImageData=Gc,_T.source.Source=Zl,_T.source.Stamen=class extends fh{constructor(t){const e=t.layer.indexOf("-"),i=-1==e?t.layer:t.layer.slice(0,e),n=$c[i],r=Hc[t.layer],s=void 0!==t.url?t.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+t.layer+"/{z}/{x}/{y}."+r.extension;super({attributions:qc,cacheSize:t.cacheSize,crossOrigin:"anonymous",interpolate:t.interpolate,maxZoom:null!=t.maxZoom?t.maxZoom:n.maxZoom,minZoom:null!=t.minZoom?t.minZoom:n.minZoom,opaque:r.opaque,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:s,wrapX:t.wrapX,zDirection:t.zDirection})}},_T.source.Tile=nh,_T.source.Tile.TileSourceEvent=rh,_T.source.TileArcGISRest=class extends uh{constructor(t){super({attributions:(t=t||{}).attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.params_=t.params||{},this.hidpi_=void 0===t.hidpi||t.hidpi,this.tmpExtent_=[1/0,1/0,-1/0,-1/0],this.setKey(this.getKeyForParams_())}getKeyForParams_(){let t=0;const e=[];for(const i in this.params_)e[t++]=i+"-"+this.params_[i];return e.join("/")}getParams(){return this.params_}getRequestUrl_(t,e,i,n,r,s){const o=this.urls;if(!o)return;const a=r.getCode().split(/:(?=\d+$)/).pop();let l;if(s.SIZE=e[0]+","+e[1],s.BBOX=i.join(","),s.BBOXSR=a,s.IMAGESR=a,s.DPI=Math.round(s.DPI?s.DPI*n:90*n),1==o.length)l=o[0];else{l=o[li(ol(t),o.length)]}return vc(l.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),s)}getTilePixelRatio(t){return this.hidpi_?t:1}updateParams(t){Object.assign(this.params_,t),this.setKey(this.getKeyForParams_())}tileUrlFunction(t,e,i){let n=this.getTileGrid();if(n||(n=this.getTileGridForProjection(i)),n.getResolutions().length<=t[0])return;1==e||this.hidpi_||(e=1);const r=n.getTileCoordExtent(t,this.tmpExtent_);let s=Va(n.getTileSize(t[0]),this.tmpSize);1!=e&&(s=Xa(s,e,this.tmpSize));const o={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return Object.assign(o,this.params_),this.getRequestUrl_(t,s,r,e,i,o)}},_T.source.TileDebug=class extends fh{constructor(t){super({opaque:!1,projection:(t=t||{}).projection,tileGrid:t.tileGrid,wrapX:void 0===t.wrapX||t.wrapX,zDirection:t.zDirection,url:t.template||"z:{z} x:{x} y:{y}",tileLoadFunction:(t,e)=>{const i=t.getTileCoord()[0],n=Va(this.tileGrid.getTileSize(i)),r=Dr(n[0],n[1]);r.strokeStyle="grey",r.strokeRect(.5,.5,n[0]+.5,n[1]+.5),r.fillStyle="grey",r.strokeStyle="white",r.textAlign="center",r.textBaseline="middle",r.font="24px sans-serif",r.lineWidth=4,r.strokeText(e,n[0]/2,n[1]/2,n[0]),r.fillText(e,n[0]/2,n[1]/2,n[0]),t.setImage(r.canvas)}})}},_T.source.TileImage=uh,_T.source.TileJSON=class extends uh{constructor(t){if(super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:Ui("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.tileJSON_=null,this.tileSize_=t.tileSize,t.url)if(t.jsonp)vl(t.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const e=new XMLHttpRequest;e.addEventListener("load",this.onXHRLoad_.bind(this)),e.addEventListener("error",this.onXHRError_.bind(this)),e.open("GET",t.url),e.send()}else t.tileJSON?this.handleTileJSONResponse(t.tileJSON):at(!1,51)}onXHRLoad_(t){const e=t.target;if(!e.status||e.status>=200&&e.status<300){let t;try{t=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(t)}else this.handleTileJSONError()}onXHRError_(t){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(t){const e=Ui("EPSG:4326"),i=this.getProjection();let n;if(void 0!==t.bounds){const r=qi(e,i);n=Re(t.bounds,r)}const r=ih(i),s=t.minzoom||0,o=Ql({extent:r,maxZoom:t.maxzoom||22,minZoom:s,tileSize:this.tileSize_});if(this.tileGrid=o,this.tileUrlFunction=oh(t.tiles,o),t.attribution&&!this.getAttributions()){const e=void 0!==n?n:r;this.setAttributions((function(i){return we(e,i.extent)?[t.attribution]:null}))}this.tileJSON_=t,this.setState("ready")}handleTileJSONError(){this.setState("error")}},_T.source.TileWMS=class extends uh{constructor(t){t=t||{};const e=Object.assign({},t.params),i=!("TRANSPARENT"in e)||e.TRANSPARENT;super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:!i,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.gutter_=void 0!==t.gutter?t.gutter:0,this.params_=e,this.v13_=!0,this.serverType_=t.serverType,this.hidpi_=void 0===t.hidpi||t.hidpi,this.tmpExtent_=[1/0,1/0,-1/0,-1/0],this.updateV13_(),this.setKey(this.getKeyForParams_())}getFeatureInfoUrl(t,e,i,n){const r=Ui(i),s=this.getProjection();let o=this.getTileGrid();o||(o=this.getTileGridForProjection(r));const a=o.getZForResolution(e,this.zDirection),l=o.getTileCoordForCoordAndZ(t,a);if(o.getResolutions().length<=l[0])return;let h=o.getResolution(l[0]),c=o.getTileCoordExtent(l,this.tmpExtent_),u=Va(o.getTileSize(l[0]),this.tmpSize);const d=this.gutter_;0!==d&&(u=Ua(u,d,this.tmpSize),c=Xt(c,h*d,c)),s&&s!==r&&(h=Gl(s,r,t,h),c=Ji(c,r,s),t=$i(t,r,s));const g={SERVICE:"WMS",VERSION:Sc,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};Object.assign(g,this.params_,n);const f=Math.floor((t[0]-c[0])/h),p=Math.floor((c[3]-t[1])/h);return g[this.v13_?"I":"X"]=f,g[this.v13_?"J":"Y"]=p,this.getRequestUrl_(l,u,c,1,s||r,g)}getLegendUrl(t,e){if(void 0===this.urls[0])return;const i={SERVICE:"WMS",VERSION:Sc,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){const t=this.params_.LAYERS;if(!(!Array.isArray(t)||1===t.length))return;i.LAYER=t}if(void 0!==t){const e=this.getProjection()?this.getProjection().getMetersPerUnit():1,n=28e-5;i.SCALE=t*e/n}return Object.assign(i,e),vc(this.urls[0],i)}getGutter(){return this.gutter_}getParams(){return this.params_}getRequestUrl_(t,e,i,n,r,s){const o=this.urls;if(!o)return;if(s.WIDTH=e[0],s.HEIGHT=e[1],s[this.v13_?"CRS":"SRS"]=r.getCode(),"STYLES"in this.params_||(s.STYLES=""),1!=n)switch(this.serverType_){case"geoserver":const t=90*n+.5|0;"FORMAT_OPTIONS"in s?s.FORMAT_OPTIONS+=";dpi:"+t:s.FORMAT_OPTIONS="dpi:"+t;break;case"mapserver":s.MAP_RESOLUTION=90*n;break;case"carmentaserver":case"qgis":s.DPI=90*n;break;default:at(!1,52)}const a=r.getAxisOrientation(),l=i;if(this.v13_&&"ne"==a.substr(0,2)){let t;t=i[0],l[0]=i[1],l[1]=t,t=i[2],l[2]=i[3],l[3]=t}let h;if(s.BBOX=l.join(","),1==o.length)h=o[0];else{h=o[li(ol(t),o.length)]}return vc(h,s)}getTilePixelRatio(t){return this.hidpi_&&void 0!==this.serverType_?t:1}getKeyForParams_(){let t=0;const e=[];for(const i in this.params_)e[t++]=i+"-"+this.params_[i];return e.join("/")}updateParams(t){Object.assign(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())}updateV13_(){const t=this.params_.VERSION||Sc;this.v13_=pi(t,"1.3")>=0}tileUrlFunction(t,e,i){let n=this.getTileGrid();if(n||(n=this.getTileGridForProjection(i)),n.getResolutions().length<=t[0])return;1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);const r=n.getResolution(t[0]);let s=n.getTileCoordExtent(t,this.tmpExtent_),o=Va(n.getTileSize(t[0]),this.tmpSize);const a=this.gutter_;0!==a&&(o=Ua(o,a,this.tmpSize),s=Xt(s,r*a,s)),1!=e&&(o=Xa(o,e,this.tmpSize));const l={SERVICE:"WMS",VERSION:Sc,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return Object.assign(l,this.params_),this.getRequestUrl_(t,o,s,e,i,l)}},_T.source.UTFGrid=class extends nh{constructor(t){if(super({projection:Ui("EPSG:3857"),state:"loading",zDirection:t.zDirection}),this.preemptive_=void 0===t.preemptive||t.preemptive,this.tileUrlFunction_=lh,this.template_=void 0,this.jsonp_=t.jsonp||!1,t.url)if(this.jsonp_)vl(t.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const e=new XMLHttpRequest;e.addEventListener("load",this.onXHRLoad_.bind(this)),e.addEventListener("error",this.onXHRError_.bind(this)),e.open("GET",t.url),e.send()}else t.tileJSON?this.handleTileJSONResponse(t.tileJSON):at(!1,51)}onXHRLoad_(t){const e=t.target;if(!e.status||e.status>=200&&e.status<300){let t;try{t=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(t)}else this.handleTileJSONError()}onXHRError_(t){this.handleTileJSONError()}getTemplate(){return this.template_}forDataAtCoordinateAndResolution(t,e,i,n){if(this.tileGrid){const r=this.tileGrid.getZForResolution(e,this.zDirection),s=this.tileGrid.getTileCoordForCoordAndZ(t,r);this.getTile(s[0],s[1],s[2],1,this.getProjection()).forDataAtCoordinate(t,i,n)}else!0===n?setTimeout((function(){i(null)}),0):i(null)}handleTileJSONError(){this.setState("error")}handleTileJSONResponse(t){const e=Ui("EPSG:4326"),i=this.getProjection();let n;if(void 0!==t.bounds){const r=qi(e,i);n=Re(t.bounds,r)}const r=ih(i),s=t.minzoom||0,o=Ql({extent:r,maxZoom:t.maxzoom||22,minZoom:s});this.tileGrid=o,this.template_=t.template;const a=t.grids;if(a){if(this.tileUrlFunction_=oh(a,o),void 0!==t.attribution){const e=void 0!==n?n:r;this.setAttributions((function(i){return we(e,i.extent)?[t.attribution]:null}))}this.setState("ready")}else this.setState("error")}getTile(t,e,i,n,r){const s=il(t,e,i);if(this.tileCache.containsKey(s))return this.tileCache.get(s);{const o=[t,e,i],a=this.getTileCoordForTileUrlFunction(o,r),l=this.tileUrlFunction_(a,n,r),h=new Jc(o,void 0!==l?H:tt,void 0!==l?l:"",this.tileGrid.getTileCoordExtent(o),this.preemptive_,this.jsonp_);return this.tileCache.set(s,h),h}}useTile(t,e,i){const n=il(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)}},_T.source.UTFGrid.CustomTile=Jc,_T.source.UrlTile=ch,_T.source.Vector=zh,_T.source.Vector.VectorSourceEvent=Uh,_T.source.VectorTile=Qc,_T.source.VectorTile.defaultLoadFunction=tu,_T.source.WMTS=class extends uh{constructor(t){const e=void 0!==t.requestEncoding?t.requestEncoding:"KVP",i=t.tileGrid;let n=t.urls;void 0===n&&void 0!==t.url&&(n=hh(t.url)),super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,urls:n,wrapX:void 0!==t.wrapX&&t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.version_=void 0!==t.version?t.version:"1.0.0",this.format_=void 0!==t.format?t.format:"image/jpeg",this.dimensions_=void 0!==t.dimensions?t.dimensions:{},this.layer_=t.layer,this.matrixSet_=t.matrixSet,this.style_=t.style,this.requestEncoding_=e,this.setKey(this.getKeyForDimensions_()),n&&n.length>0&&(this.tileUrlFunction=ah(n.map(this.createFromWMTSTemplate.bind(this))))}setUrls(t){this.urls=t;const e=t.join("\n");this.setTileUrlFunction(ah(t.map(this.createFromWMTSTemplate.bind(this))),e)}getDimensions(){return this.dimensions_}getFormat(){return this.format_}getLayer(){return this.layer_}getMatrixSet(){return this.matrixSet_}getRequestEncoding(){return this.requestEncoding_}getStyle(){return this.style_}getVersion(){return this.version_}getKeyForDimensions_(){let t=0;const e=[];for(const i in this.dimensions_)e[t++]=i+"-"+this.dimensions_[i];return e.join("/")}updateDimensions(t){Object.assign(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())}createFromWMTSTemplate(t){const e=this.requestEncoding_,i={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};"KVP"==e&&Object.assign(i,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t="KVP"==e?vc(t,i):t.replace(/\{(\w+?)\}/g,(function(t,e){return e.toLowerCase()in i?i[e.toLowerCase()]:t}));const n=this.tileGrid,r=this.dimensions_;return function(i,s,o){if(i){const s={TileMatrix:n.getMatrixId(i[0]),TileCol:i[1],TileRow:i[2]};Object.assign(s,r);let o=t;return o="KVP"==e?vc(o,s):o.replace(/\{(\w+?)\}/g,(function(t,e){return s[e]})),o}}}},_T.source.WMTS.optionsFromCapabilities=function(t,e){const i=t.Contents.Layer.find((function(t){return t.Identifier==e.layer}));if(!i)return null;const n=t.Contents.TileMatrixSet;let r;r=i.TileMatrixSetLink.length>1?"projection"in e?i.TileMatrixSetLink.findIndex((function(t){const i=n.find((function(e){return e.Identifier==t.TileMatrixSet})).SupportedCRS,r=Ui(i),s=Ui(e.projection);return r&&s?Ki(r,s):i==e.projection})):i.TileMatrixSetLink.findIndex((function(t){return t.TileMatrixSet==e.matrixSet})):0,r<0&&(r=0);const s=i.TileMatrixSetLink[r].TileMatrixSet,o=i.TileMatrixSetLink[r].TileMatrixSetLimits;let a=i.Format[0];"format"in e&&(a=e.format),r=i.Style.findIndex((function(t){return"style"in e?t.Title==e.style:t.isDefault})),r<0&&(r=0);const l=i.Style[r].Identifier,h={};"Dimension"in i&&i.Dimension.forEach((function(t,e,i){const n=t.Identifier;let r=t.Default;void 0===r&&(r=t.Value[0]),h[n]=r}));const c=t.Contents.TileMatrixSet.find((function(t){return t.Identifier==s}));let u;const d=c.SupportedCRS;if(d&&(u=Ui(d)),"projection"in e){const t=Ui(e.projection);t&&(u&&!Ki(t,u)||(u=t))}let g=!1;const f="ne"==u.getAxisOrientation().substr(0,2);let p=c.TileMatrix[0],m={MinTileCol:0,MinTileRow:0,MaxTileCol:p.MatrixWidth-1,MaxTileRow:p.MatrixHeight-1};if(o){m=o[o.length-1];const t=c.TileMatrix.find((t=>t.Identifier===m.TileMatrix||c.Identifier+":"+t.Identifier===m.TileMatrix));t&&(p=t)}const _=28e-5*p.ScaleDenominator/u.getMetersPerUnit(),y=f?[p.TopLeftCorner[1],p.TopLeftCorner[0]]:p.TopLeftCorner,x=p.TileWidth*_,v=p.TileHeight*_;let S=c.BoundingBox;S&&f&&(S=[S[1],S[0],S[3],S[2]]);let w=[y[0]+x*m.MinTileCol,y[1]-v*(1+m.MaxTileRow),y[0]+x*(1+m.MaxTileCol),y[1]-v*m.MinTileRow];if(void 0!==S&&!Yt(S,w)){const t=i.WGS84BoundingBox,e=Ui("EPSG:4326").getExtent();if(w=S,t)g=t[0]===e[0]&&t[2]===e[2];else{const t=Ji(S,c.SupportedCRS,"EPSG:4326");g=t[0]-1e-10<=e[0]&&t[2]+1e-10>=e[2]}}const E=iu(c,w,o),T=[];let C=e.requestEncoding;if(C=void 0!==C?C:"","OperationsMetadata"in t&&"GetTile"in t.OperationsMetadata){const e=t.OperationsMetadata.GetTile.DCP.HTTP.Get;for(let t=0,i=e.length;tl||s>l;)o.push([Math.ceil(r/l),Math.ceil(s/l)]),l+=l;break;case"truncated":let t=r,e=s;for(;t>l||e>l;)o.push([Math.ceil(t/l),Math.ceil(e/l)]),t>>=1,e>>=1;break;default:at(!1,53)}o.push([1,1]),o.reverse();const h=[n],c=[0];for(let t=1,e=o.length;t{const n=t.toString();if(!i.containsKey(n)){const r=e(t);i.set(n,r)}a.push(i.get(n))})),a}},_T.source.wms={},_T.source.wms.DEFAULT_VERSION=Sc,_T.sphere={},_T.sphere.DEFAULT_RADIUS=Li,_T.sphere.getArea=function t(e,i){const n=(i=i||{}).radius||Li,r=i.projection||"EPSG:3857",s=e.getType();"GeometryCollection"!==s&&(e=e.clone().transform(r,"EPSG:4326"));let o,a,l,h,c,u,d=0;switch(s){case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"LinearRing":break;case"Polygon":for(o=e.getCoordinates(),d=Math.abs(Ai(o[0],n)),l=1,h=o.length;l - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls -import Qt5Compat.GraphicalEffects - -import net.jami.Models 1.1 -import net.jami.Adapters 1.1 -import net.jami.Constants 1.1 - -import "../../commoncomponents" - -Popup { - id: root - - width: popupContent.width - height: popupContent.height - - parent: Overlay.overlay - - // center in parent - x: Math.round((parent.width - width) / 2) - y: Math.round((parent.height - height) / 2) - - signal joinClicked - - modal:true - padding: 0 - - visible: false - closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside - Rectangle { - id: container - - anchors.fill: parent - radius: JamiTheme.modalPopupRadius - color: JamiTheme.secondaryBackgroundColor - - ColumnLayout { - id: popupContent - - Layout.alignment: Qt.AlignCenter - - PushButton { - id: btnClose - - Layout.alignment: Qt.AlignRight - width: 30 - height: 30 - imageContainerWidth: 30 - imageContainerHeight : 30 - Layout.margins: 8 - radius : 5 - imageColor: "grey" - normalColor: JamiTheme.transparentColor - source: JamiResources.round_close_24dp_svg - onClicked: { root.visible = false } - } - - Text { - Layout.leftMargin: 20 - Layout.rightMargin: 20 - Layout.fillWidth: true - Layout.alignment: Qt.AlignCenter - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font.pixelSize: JamiTheme.popuptextSize - font.weight: Font.Medium - wrapMode: Text.WordWrap - color: JamiTheme.textColor - text: JamiStrings.stopSharingPopupBody - } - - RowLayout{ - Layout.margins: JamiTheme.popupButtonsMargin - Layout.alignment: Qt.AlignCenter - - MaterialButton { - preferredWidth: text.contentWidth - textLeftPadding: JamiTheme.buttontextPadding - textRightPadding: JamiTheme.buttontextPadding - - color: JamiTheme.buttonTintedBlue - hoveredColor: JamiTheme.buttonTintedBlueHovered - pressedColor: JamiTheme.buttonTintedBluePressed - text: JamiStrings.stopConvSharing.arg(PositionManager.getmapTitle(attachedAccountId, CurrentConversation.id)) - - onClicked: { - PositionManager.stopSharingPosition(attachedAccountId, CurrentConversation.id) - root.close() - } - } - - MaterialButton { - preferredWidth: text.contentWidth - textLeftPadding: JamiTheme.buttontextPadding - textRightPadding: JamiTheme.buttontextPadding - - color: JamiTheme.buttonTintedRed - hoveredColor: JamiTheme.buttonTintedRedHovered - pressedColor: JamiTheme.buttonTintedRedPressed - - text: JamiStrings.stopAllSharings - - onClicked: { - PositionManager.stopSharingPosition() - root.close() - } - } - } - } - } - - background: Rectangle { - color: JamiTheme.transparentColor - } - - Overlay.modal: Rectangle { - color: JamiTheme.transparentColor - // Color animation for overlay when pop up is shown. - ColorAnimation on color { - to: JamiTheme.popupOverlayColor - duration: 500 - } - } - - DropShadow { - z: -1 - width: root.width - height: root.height - horizontalOffset: 3.0 - verticalOffset: 3.0 - radius: container.radius * 4 - color: JamiTheme.shadowColor - source: container - transparentBorder: true - } - - enter: Transition { - NumberAnimation { - properties: "opacity"; from: 0.0; to: 1.0 - duration: JamiTheme.shortFadeDuration - } - } - - exit: Transition { - NumberAnimation { - properties: "opacity"; from: 1.0; to: 0.0 - duration: JamiTheme.shortFadeDuration - } - } -} diff -Nru ring-20230206.0~ds1/src/app/webengine/MediaPreviewBase.qml ring-20230206.0~ds2/src/app/webengine/MediaPreviewBase.qml --- ring-20230206.0~ds1/src/app/webengine/MediaPreviewBase.qml 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/app/webengine/MediaPreviewBase.qml 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2021-2023 Savoir-faire Linux Inc. - * Author: Andreas Traczyk - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import Qt5Compat.GraphicalEffects -import QtWebEngine - -import net.jami.Models 1.1 -import net.jami.Constants 1.1 -import net.jami.Adapters 1.1 - -import "../commoncomponents" - -WebEngineView { - id: wev - property bool isVideo - property string html - readonly property real minSize: 192 - readonly property real maxSize: 256 - readonly property real aspectRatio: 1 / .75 - readonly property real adjustedWidth: Math.min(maxSize, - Math.max(minSize, - innerContent.width - senderMargin)) - anchors.right: isOutgoing ? parent.right : undefined - width: isFullScreen ? parent.width : adjustedWidth - height: isVideo ? - isFullScreen ? - parent.height : - Math.ceil(adjustedWidth / aspectRatio) : - 54 - onContextMenuRequested: function(request) { - request.accepted = true - } - settings.fullScreenSupportEnabled: isVideo - settings.javascriptCanOpenWindows: false - Component.onCompleted: loadHtml(html, 'file://') - layer.enabled: !isFullScreen - layer.effect: OpacityMask { - maskSource: MessageBubble { - out: isOutgoing - type: seq - width: wev.width - height: wev.height - radius: msgRadius - } - } - onFullScreenRequested: function(request) { - if (request.toggleOn) { - layoutManager.pushFullScreenItem( - this, - localMediaCompLoader, - null, - function() { wev.fullScreenCancelled() }) - } else if (!request.toggleOn) { - layoutManager.removeFullScreenItem(this) - } - request.accept() - } -} diff -Nru ring-20230206.0~ds1/src/app/webengine/VideoPreview.qml ring-20230206.0~ds2/src/app/webengine/VideoPreview.qml --- ring-20230206.0~ds1/src/app/webengine/VideoPreview.qml 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/app/webengine/VideoPreview.qml 1970-01-01 00:00:00.000000000 +0000 @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2022-2023 Savoir-faire Linux Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import QtQuick -import QtWebEngine -import Qt5Compat.GraphicalEffects - -import net.jami.Constants 1.1 - -Rectangle { - id: root - color: JamiTheme.secondaryBackgroundColor - anchors.fill: parent - property bool isVideo: false - property string html: "" - - WebEngineView { - id: wev - - anchors.fill: parent - anchors.verticalCenter: root.verticalCenter - backgroundColor: JamiTheme.secondaryBackgroundColor - anchors.topMargin: root.isVideo? 0 : wev.implicitHeight / 2 - settings.fullScreenSupportEnabled: root.isVideo - settings.javascriptCanOpenWindows: false - Component.onCompleted: loadHtml(root.html, 'file://') - onFullScreenRequested: function(request) { - if (request.toggleOn) { - layoutManager.pushFullScreenItem( - this, - root, - null, - function() { wev.fullScreenCancelled() }) - } else if (!request.toggleOn) { - layoutManager.removeFullScreenItem(this) - } - request.accept() - } - } - - layer.enabled: true - layer.effect: OpacityMask { - maskSource: Item { - width: root.width - height: root.height - Rectangle { - anchors.centerIn: parent - width: root.width - height: root.height - radius: JamiTheme.swarmDetailsPageDocumentsMediaRadius - } - } - } -} \ No newline at end of file diff -Nru ring-20230206.0~ds1/src/libclient/web-chatview/.eslintrc.json ring-20230206.0~ds2/src/libclient/web-chatview/.eslintrc.json --- ring-20230206.0~ds1/src/libclient/web-chatview/.eslintrc.json 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/libclient/web-chatview/.eslintrc.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -{ - "env": { - "browser": true - }, - "plugins": ["html"], - "extends": "eslint:recommended", - "parserOptions": { - "ecmaVersion": 6 - }, - "rules": { - "indent": [ - "error", - 4 - ], - "linebreak-style": [ - "error", - "unix" - ], - "quotes": [ - "error", - "double" - ], - "semi": [ - "error", - "never" - ], - "no-inner-declarations": [ - 0 - ] - } -} diff -Nru ring-20230206.0~ds1/src/libclient/web-chatview/linkify.js ring-20230206.0~ds2/src/libclient/web-chatview/linkify.js --- ring-20230206.0~ds1/src/libclient/web-chatview/linkify.js 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/libclient/web-chatview/linkify.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,3501 +0,0 @@ -/* -* Copyright (c) 2021 SoapBox Innovations Inc. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -* THE SOFTWARE. -*/ -var linkify = (function (exports) { - 'use strict'; - - // THIS FILE IS AUTOMATICALLY GENERATED DO NOT EDIT DIRECTLY - // https://data.iana.org/TLD/tlds-alpha-by-domain.txt - var tlds = 'aaa \ -aarp \ -abarth \ -abb \ -abbott \ -abbvie \ -abc \ -able \ -abogado \ -abudhabi \ -ac \ -academy \ -accenture \ -accountant \ -accountants \ -aco \ -actor \ -ad \ -adac \ -ads \ -adult \ -ae \ -aeg \ -aero \ -aetna \ -af \ -afl \ -africa \ -ag \ -agakhan \ -agency \ -ai \ -aig \ -airbus \ -airforce \ -airtel \ -akdn \ -al \ -alfaromeo \ -alibaba \ -alipay \ -allfinanz \ -allstate \ -ally \ -alsace \ -alstom \ -am \ -amazon \ -americanexpress \ -americanfamily \ -amex \ -amfam \ -amica \ -amsterdam \ -analytics \ -android \ -anquan \ -anz \ -ao \ -aol \ -apartments \ -app \ -apple \ -aq \ -aquarelle \ -ar \ -arab \ -aramco \ -archi \ -army \ -arpa \ -art \ -arte \ -as \ -asda \ -asia \ -associates \ -at \ -athleta \ -attorney \ -au \ -auction \ -audi \ -audible \ -audio \ -auspost \ -author \ -auto \ -autos \ -avianca \ -aw \ -aws \ -ax \ -axa \ -az \ -azure \ -ba \ -baby \ -baidu \ -banamex \ -bananarepublic \ -band \ -bank \ -bar \ -barcelona \ -barclaycard \ -barclays \ -barefoot \ -bargains \ -baseball \ -basketball \ -bauhaus \ -bayern \ -bb \ -bbc \ -bbt \ -bbva \ -bcg \ -bcn \ -bd \ -be \ -beats \ -beauty \ -beer \ -bentley \ -berlin \ -best \ -bestbuy \ -bet \ -bf \ -bg \ -bh \ -bharti \ -bi \ -bible \ -bid \ -bike \ -bing \ -bingo \ -bio \ -biz \ -bj \ -black \ -blackfriday \ -blockbuster \ -blog \ -bloomberg \ -blue \ -bm \ -bms \ -bmw \ -bn \ -bnpparibas \ -bo \ -boats \ -boehringer \ -bofa \ -bom \ -bond \ -boo \ -book \ -booking \ -bosch \ -bostik \ -boston \ -bot \ -boutique \ -box \ -br \ -bradesco \ -bridgestone \ -broadway \ -broker \ -brother \ -brussels \ -bs \ -bt \ -bugatti \ -build \ -builders \ -business \ -buy \ -buzz \ -bv \ -bw \ -by \ -bz \ -bzh \ -ca \ -cab \ -cafe \ -cal \ -call \ -calvinklein \ -cam \ -camera \ -camp \ -cancerresearch \ -canon \ -capetown \ -capital \ -capitalone \ -car \ -caravan \ -cards \ -care \ -career \ -careers \ -cars \ -casa \ -case \ -cash \ -casino \ -cat \ -catering \ -catholic \ -cba \ -cbn \ -cbre \ -cbs \ -cc \ -cd \ -center \ -ceo \ -cern \ -cf \ -cfa \ -cfd \ -cg \ -ch \ -chanel \ -channel \ -charity \ -chase \ -chat \ -cheap \ -chintai \ -christmas \ -chrome \ -church \ -ci \ -cipriani \ -circle \ -cisco \ -citadel \ -citi \ -citic \ -city \ -cityeats \ -ck \ -cl \ -claims \ -cleaning \ -click \ -clinic \ -clinique \ -clothing \ -cloud \ -club \ -clubmed \ -cm \ -cn \ -co \ -coach \ -codes \ -coffee \ -college \ -cologne \ -com \ -comcast \ -commbank \ -community \ -company \ -compare \ -computer \ -comsec \ -condos \ -construction \ -consulting \ -contact \ -contractors \ -cooking \ -cookingchannel \ -cool \ -coop \ -corsica \ -country \ -coupon \ -coupons \ -courses \ -cpa \ -cr \ -credit \ -creditcard \ -creditunion \ -cricket \ -crown \ -crs \ -cruise \ -cruises \ -cu \ -cuisinella \ -cv \ -cw \ -cx \ -cy \ -cymru \ -cyou \ -cz \ -dabur \ -dad \ -dance \ -data \ -date \ -dating \ -datsun \ -day \ -dclk \ -dds \ -de \ -deal \ -dealer \ -deals \ -degree \ -delivery \ -dell \ -deloitte \ -delta \ -democrat \ -dental \ -dentist \ -desi \ -design \ -dev \ -dhl \ -diamonds \ -diet \ -digital \ -direct \ -directory \ -discount \ -discover \ -dish \ -diy \ -dj \ -dk \ -dm \ -dnp \ -do \ -docs \ -doctor \ -dog \ -domains \ -dot \ -download \ -drive \ -dtv \ -dubai \ -dunlop \ -dupont \ -durban \ -dvag \ -dvr \ -dz \ -earth \ -eat \ -ec \ -eco \ -edeka \ -edu \ -education \ -ee \ -eg \ -email \ -emerck \ -energy \ -engineer \ -engineering \ -enterprises \ -epson \ -equipment \ -er \ -ericsson \ -erni \ -es \ -esq \ -estate \ -et \ -etisalat \ -eu \ -eurovision \ -eus \ -events \ -exchange \ -expert \ -exposed \ -express \ -extraspace \ -fage \ -fail \ -fairwinds \ -faith \ -family \ -fan \ -fans \ -farm \ -farmers \ -fashion \ -fast \ -fedex \ -feedback \ -ferrari \ -ferrero \ -fi \ -fiat \ -fidelity \ -fido \ -film \ -final \ -finance \ -financial \ -fire \ -firestone \ -firmdale \ -fish \ -fishing \ -fit \ -fitness \ -fj \ -fk \ -flickr \ -flights \ -flir \ -florist \ -flowers \ -fly \ -fm \ -fo \ -foo \ -food \ -foodnetwork \ -football \ -ford \ -forex \ -forsale \ -forum \ -foundation \ -fox \ -fr \ -free \ -fresenius \ -frl \ -frogans \ -frontdoor \ -frontier \ -ftr \ -fujitsu \ -fun \ -fund \ -furniture \ -futbol \ -fyi \ -ga \ -gal \ -gallery \ -gallo \ -gallup \ -game \ -games \ -gap \ -garden \ -gay \ -gb \ -gbiz \ -gd \ -gdn \ -ge \ -gea \ -gent \ -genting \ -george \ -gf \ -gg \ -ggee \ -gh \ -gi \ -gift \ -gifts \ -gives \ -giving \ -gl \ -glass \ -gle \ -global \ -globo \ -gm \ -gmail \ -gmbh \ -gmo \ -gmx \ -gn \ -godaddy \ -gold \ -goldpoint \ -golf \ -goo \ -goodyear \ -goog \ -google \ -gop \ -got \ -gov \ -gp \ -gq \ -gr \ -grainger \ -graphics \ -gratis \ -green \ -gripe \ -grocery \ -group \ -gs \ -gt \ -gu \ -guardian \ -gucci \ -guge \ -guide \ -guitars \ -guru \ -gw \ -gy \ -hair \ -hamburg \ -hangout \ -haus \ -hbo \ -hdfc \ -hdfcbank \ -health \ -healthcare \ -help \ -helsinki \ -here \ -hermes \ -hgtv \ -hiphop \ -hisamitsu \ -hitachi \ -hiv \ -hk \ -hkt \ -hm \ -hn \ -hockey \ -holdings \ -holiday \ -homedepot \ -homegoods \ -homes \ -homesense \ -honda \ -horse \ -hospital \ -host \ -hosting \ -hot \ -hoteles \ -hotels \ -hotmail \ -house \ -how \ -hr \ -hsbc \ -ht \ -hu \ -hughes \ -hyatt \ -hyundai \ -ibm \ -icbc \ -ice \ -icu \ -id \ -ie \ -ieee \ -ifm \ -ikano \ -il \ -im \ -imamat \ -imdb \ -immo \ -immobilien \ -in \ -inc \ -industries \ -infiniti \ -info \ -ing \ -ink \ -institute \ -insurance \ -insure \ -int \ -international \ -intuit \ -investments \ -io \ -ipiranga \ -iq \ -ir \ -irish \ -is \ -ismaili \ -ist \ -istanbul \ -it \ -itau \ -itv \ -jaguar \ -java \ -jcb \ -je \ -jeep \ -jetzt \ -jewelry \ -jio \ -jll \ -jm \ -jmp \ -jnj \ -jo \ -jobs \ -joburg \ -jot \ -joy \ -jp \ -jpmorgan \ -jprs \ -juegos \ -juniper \ -kaufen \ -kddi \ -ke \ -kerryhotels \ -kerrylogistics \ -kerryproperties \ -kfh \ -kg \ -kh \ -ki \ -kia \ -kids \ -kim \ -kinder \ -kindle \ -kitchen \ -kiwi \ -km \ -kn \ -koeln \ -komatsu \ -kosher \ -kp \ -kpmg \ -kpn \ -kr \ -krd \ -kred \ -kuokgroup \ -kw \ -ky \ -kyoto \ -kz \ -la \ -lacaixa \ -lamborghini \ -lamer \ -lancaster \ -lancia \ -land \ -landrover \ -lanxess \ -lasalle \ -lat \ -latino \ -latrobe \ -law \ -lawyer \ -lb \ -lc \ -lds \ -lease \ -leclerc \ -lefrak \ -legal \ -lego \ -lexus \ -lgbt \ -li \ -lidl \ -life \ -lifeinsurance \ -lifestyle \ -lighting \ -like \ -lilly \ -limited \ -limo \ -lincoln \ -linde \ -link \ -lipsy \ -live \ -living \ -lk \ -llc \ -llp \ -loan \ -loans \ -locker \ -locus \ -loft \ -lol \ -london \ -lotte \ -lotto \ -love \ -lpl \ -lplfinancial \ -lr \ -ls \ -lt \ -ltd \ -ltda \ -lu \ -lundbeck \ -luxe \ -luxury \ -lv \ -ly \ -ma \ -macys \ -madrid \ -maif \ -maison \ -makeup \ -man \ -management \ -mango \ -map \ -market \ -marketing \ -markets \ -marriott \ -marshalls \ -maserati \ -mattel \ -mba \ -mc \ -mckinsey \ -md \ -me \ -med \ -media \ -meet \ -melbourne \ -meme \ -memorial \ -men \ -menu \ -merckmsd \ -mg \ -mh \ -miami \ -microsoft \ -mil \ -mini \ -mint \ -mit \ -mitsubishi \ -mk \ -ml \ -mlb \ -mls \ -mm \ -mma \ -mn \ -mo \ -mobi \ -mobile \ -moda \ -moe \ -moi \ -mom \ -monash \ -money \ -monster \ -mormon \ -mortgage \ -moscow \ -moto \ -motorcycles \ -mov \ -movie \ -mp \ -mq \ -mr \ -ms \ -msd \ -mt \ -mtn \ -mtr \ -mu \ -museum \ -music \ -mutual \ -mv \ -mw \ -mx \ -my \ -mz \ -na \ -nab \ -nagoya \ -name \ -natura \ -navy \ -nba \ -nc \ -ne \ -nec \ -net \ -netbank \ -netflix \ -network \ -neustar \ -new \ -news \ -next \ -nextdirect \ -nexus \ -nf \ -nfl \ -ng \ -ngo \ -nhk \ -ni \ -nico \ -nike \ -nikon \ -ninja \ -nissan \ -nissay \ -nl \ -no \ -nokia \ -northwesternmutual \ -norton \ -now \ -nowruz \ -nowtv \ -np \ -nr \ -nra \ -nrw \ -ntt \ -nu \ -nyc \ -nz \ -obi \ -observer \ -office \ -okinawa \ -olayan \ -olayangroup \ -oldnavy \ -ollo \ -om \ -omega \ -one \ -ong \ -onl \ -online \ -ooo \ -open \ -oracle \ -orange \ -org \ -organic \ -origins \ -osaka \ -otsuka \ -ott \ -ovh \ -pa \ -page \ -panasonic \ -paris \ -pars \ -partners \ -parts \ -party \ -passagens \ -pay \ -pccw \ -pe \ -pet \ -pf \ -pfizer \ -pg \ -ph \ -pharmacy \ -phd \ -philips \ -phone \ -photo \ -photography \ -photos \ -physio \ -pics \ -pictet \ -pictures \ -pid \ -pin \ -ping \ -pink \ -pioneer \ -pizza \ -pk \ -pl \ -place \ -play \ -playstation \ -plumbing \ -plus \ -pm \ -pn \ -pnc \ -pohl \ -poker \ -politie \ -porn \ -post \ -pr \ -pramerica \ -praxi \ -press \ -prime \ -pro \ -prod \ -productions \ -prof \ -progressive \ -promo \ -properties \ -property \ -protection \ -pru \ -prudential \ -ps \ -pt \ -pub \ -pw \ -pwc \ -py \ -qa \ -qpon \ -quebec \ -quest \ -racing \ -radio \ -re \ -read \ -realestate \ -realtor \ -realty \ -recipes \ -red \ -redstone \ -redumbrella \ -rehab \ -reise \ -reisen \ -reit \ -reliance \ -ren \ -rent \ -rentals \ -repair \ -report \ -republican \ -rest \ -restaurant \ -review \ -reviews \ -rexroth \ -rich \ -richardli \ -ricoh \ -ril \ -rio \ -rip \ -ro \ -rocher \ -rocks \ -rodeo \ -rogers \ -room \ -rs \ -rsvp \ -ru \ -rugby \ -ruhr \ -run \ -rw \ -rwe \ -ryukyu \ -sa \ -saarland \ -safe \ -safety \ -sakura \ -sale \ -salon \ -samsclub \ -samsung \ -sandvik \ -sandvikcoromant \ -sanofi \ -sap \ -sarl \ -sas \ -save \ -saxo \ -sb \ -sbi \ -sbs \ -sc \ -sca \ -scb \ -schaeffler \ -schmidt \ -scholarships \ -school \ -schule \ -schwarz \ -science \ -scot \ -sd \ -se \ -search \ -seat \ -secure \ -security \ -seek \ -select \ -sener \ -services \ -ses \ -seven \ -sew \ -sex \ -sexy \ -sfr \ -sg \ -sh \ -shangrila \ -sharp \ -shaw \ -shell \ -shia \ -shiksha \ -shoes \ -shop \ -shopping \ -shouji \ -show \ -showtime \ -si \ -silk \ -sina \ -singles \ -site \ -sj \ -sk \ -ski \ -skin \ -sky \ -skype \ -sl \ -sling \ -sm \ -smart \ -smile \ -sn \ -sncf \ -so \ -soccer \ -social \ -softbank \ -software \ -sohu \ -solar \ -solutions \ -song \ -sony \ -soy \ -spa \ -space \ -sport \ -spot \ -sr \ -srl \ -ss \ -st \ -stada \ -staples \ -star \ -statebank \ -statefarm \ -stc \ -stcgroup \ -stockholm \ -storage \ -store \ -stream \ -studio \ -study \ -style \ -su \ -sucks \ -supplies \ -supply \ -support \ -surf \ -surgery \ -suzuki \ -sv \ -swatch \ -swiss \ -sx \ -sy \ -sydney \ -systems \ -sz \ -tab \ -taipei \ -talk \ -taobao \ -target \ -tatamotors \ -tatar \ -tattoo \ -tax \ -taxi \ -tc \ -tci \ -td \ -tdk \ -team \ -tech \ -technology \ -tel \ -temasek \ -tennis \ -teva \ -tf \ -tg \ -th \ -thd \ -theater \ -theatre \ -tiaa \ -tickets \ -tienda \ -tiffany \ -tips \ -tires \ -tirol \ -tj \ -tjmaxx \ -tjx \ -tk \ -tkmaxx \ -tl \ -tm \ -tmall \ -tn \ -to \ -today \ -tokyo \ -tools \ -top \ -toray \ -toshiba \ -total \ -tours \ -town \ -toyota \ -toys \ -tr \ -trade \ -trading \ -training \ -travel \ -travelchannel \ -travelers \ -travelersinsurance \ -trust \ -trv \ -tt \ -tube \ -tui \ -tunes \ -tushu \ -tv \ -tvs \ -tw \ -tz \ -ua \ -ubank \ -ubs \ -ug \ -uk \ -unicom \ -university \ -uno \ -uol \ -ups \ -us \ -uy \ -uz \ -va \ -vacations \ -vana \ -vanguard \ -vc \ -ve \ -vegas \ -ventures \ -verisign \ -vermögensberater \ -vermögensberatung \ -versicherung \ -vet \ -vg \ -vi \ -viajes \ -video \ -vig \ -viking \ -villas \ -vin \ -vip \ -virgin \ -visa \ -vision \ -viva \ -vivo \ -vlaanderen \ -vn \ -vodka \ -volkswagen \ -volvo \ -vote \ -voting \ -voto \ -voyage \ -vu \ -vuelos \ -wales \ -walmart \ -walter \ -wang \ -wanggou \ -watch \ -watches \ -weather \ -weatherchannel \ -webcam \ -weber \ -website \ -wed \ -wedding \ -weibo \ -weir \ -wf \ -whoswho \ -wien \ -wiki \ -williamhill \ -win \ -windows \ -wine \ -winners \ -wme \ -wolterskluwer \ -woodside \ -work \ -works \ -world \ -wow \ -ws \ -wtc \ -wtf \ -xbox \ -xerox \ -xfinity \ -xihuan \ -xin \ -xxx \ -xyz \ -yachts \ -yahoo \ -yamaxun \ -yandex \ -ye \ -yodobashi \ -yoga \ -yokohama \ -you \ -youtube \ -yt \ -yun \ -za \ -zappos \ -zara \ -zero \ -zip \ -zm \ -zone \ -zuerich \ -zw'.split(' '); // Internationalized domain names containing non-ASCII - - var utlds = 'ελ \ -ευ \ -бг \ -бел \ -дети \ -ею \ -католик \ -ком \ -мкд \ -мон \ -москва \ -онлайн \ -орг \ -рус \ -рф \ -сайт \ -срб \ -укр \ -қаз \ -հայ \ -ישראל \ -קום \ -ابوظبي \ -اتصالات \ -ارامكو \ -الاردن \ -البحرين \ -الجزائر \ -السعودية \ -العليان \ -المغرب \ -امارات \ -ایران \ -بارت \ -بازار \ -بيتك \ -بھارت \ -تونس \ -سودان \ -سورية \ -شبكة \ -عراق \ -عرب \ -عمان \ -فلسطين \ -قطر \ -كاثوليك \ -كوم \ -مصر \ -مليسيا \ -موريتانيا \ -موقع \ -همراه \ -پاکستان \ -ڀارت \ -कॉम \ -नेट \ -भारत \ -भारतम् \ -भारोत \ -संगठन \ -বাংলা \ -ভারত \ -ভাৰত \ -ਭਾਰਤ \ -ભારત \ -ଭାରତ \ -இந்தியா \ -இலங்கை \ -சிங்கப்பூர் \ -భారత్ \ -ಭಾರತ \ -ഭാരതം \ -ලංකා \ -คอม \ -ไทย \ -ລາວ \ -გე \ -みんな \ -アマゾン \ -クラウド \ -グーグル \ -コム \ -ストア \ -セール \ -ファッション \ -ポイント \ -世界 \ -中信 \ -中国 \ -中國 \ -中文网 \ -亚马逊 \ -企业 \ -佛山 \ -信息 \ -健康 \ -八卦 \ -公司 \ -公益 \ -台湾 \ -台灣 \ -商城 \ -商店 \ -商标 \ -嘉里 \ -嘉里大酒店 \ -在线 \ -大拿 \ -天主教 \ -娱乐 \ -家電 \ -广东 \ -微博 \ -慈善 \ -我爱你 \ -手机 \ -招聘 \ -政务 \ -政府 \ -新加坡 \ -新闻 \ -时尚 \ -書籍 \ -机构 \ -淡马锡 \ -游戏 \ -澳門 \ -点看 \ -移动 \ -组织机构 \ -网址 \ -网店 \ -网站 \ -网络 \ -联通 \ -诺基亚 \ -谷歌 \ -购物 \ -通販 \ -集团 \ -電訊盈科 \ -飞利浦 \ -食品 \ -餐厅 \ -香格里拉 \ -香港 \ -닷넷 \ -닷컴 \ -삼성 \ -한국'.split(' '); - - /** - * @template A - * @template B - * @param {A} target - * @param {B} properties - * @return {A & B} - */ - var assign = function assign(target, properties) { - for (var key in properties) { - target[key] = properties[key]; - } - - return target; - }; - - /** - * Finite State Machine generation utilities - */ - /** - * @template T - * @typedef {{ [group: string]: T[] }} Collections - */ - - /** - * @typedef {{ [group: string]: true }} Flags - */ - // Keys in scanner Collections instances - - var numeric = 'numeric'; - var ascii = 'ascii'; - var alpha = 'alpha'; - var asciinumeric = 'asciinumeric'; - var alphanumeric = 'alphanumeric'; - var domain = 'domain'; - var emoji = 'emoji'; - var scheme = 'scheme'; - var slashscheme = 'slashscheme'; - var whitespace = 'whitespace'; - /** - * @template T - * @param {string} name - * @param {Collections} groups to register in - * @returns {T[]} Current list of tokens in the given collection - */ - - function registerGroup(name, groups) { - if (!(name in groups)) { - groups[name] = []; - } - - return groups[name]; - } - /** - * @template T - * @param {T} t token to add - * @param {Collections} groups - * @param {Flags} flags - */ - - - function addToGroups(t, flags, groups) { - if (flags[numeric]) { - flags[asciinumeric] = true; - flags[alphanumeric] = true; - } - - if (flags[ascii]) { - flags[asciinumeric] = true; - flags[alpha] = true; - } - - if (flags[asciinumeric]) { - flags[alphanumeric] = true; - } - - if (flags[alpha]) { - flags[alphanumeric] = true; - } - - if (flags[alphanumeric]) { - flags[domain] = true; - } - - if (flags[emoji]) { - flags[domain] = true; - } - - for (var k in flags) { - var group = registerGroup(k, groups); - - if (group.indexOf(t) < 0) { - group.push(t); - } - } - } - /** - * @template T - * @param {T} t token to check - * @param {Collections} groups - * @returns {Flags} group flags that contain this token - */ - - function flagsForToken(t, groups) { - var result = {}; - - for (var c in groups) { - if (groups[c].indexOf(t) >= 0) { - result[c] = true; - } - } - - return result; - } - /** - * @template T - * @typedef {null | T } Transition - */ - - /** - * Define a basic state machine state. j is the list of character transitions, - * jr is the list of regex-match transitions, jd is the default state to - * transition to t is the accepting token type, if any. If this is the terminal - * state, then it does not emit a token. - * - * The template type T represents the type of the token this state accepts. This - * should be a string (such as of the token exports in `text.js`) or a - * MultiToken subclass (from `multi.js`) - * - * @template T - * @param {T} [token] Token that this state emits - */ - - - function State(token) { - if (token === void 0) { - token = null; - } - - // this.n = null; // DEBUG: State name - - /** @type {{ [input: string]: State }} j */ - this.j = {}; // IMPLEMENTATION 1 - // this.j = []; // IMPLEMENTATION 2 - - /** @type {[RegExp, State][]} jr */ - - this.jr = []; - /** @type {?State} jd */ - - this.jd = null; - /** @type {?T} t */ - - this.t = token; - } - /** - * Scanner token groups - * @type Collections - */ - - State.groups = {}; - State.prototype = { - accepts: function accepts() { - return !!this.t; - }, - - /** - * Follow an existing transition from the given input to the next state. - * Does not mutate. - * @param {string} input character or token type to transition on - * @returns {?State} the next state, if any - */ - go: function go(input) { - var state = this; - var nextState = state.j[input]; - - if (nextState) { - return nextState; - } - - for (var i = 0; i < state.jr.length; i++) { - var regex = state.jr[i][0]; - var _nextState = state.jr[i][1]; // note: might be empty to prevent default jump - - if (_nextState && regex.test(input)) { - return _nextState; - } - } // Nowhere left to jump! Return default, if any - - - return state.jd; - }, - - /** - * Whether the state has a transition for the given input. Set the second - * argument to true to only look for an exact match (and not a default or - * regular-expression-based transition) - * @param {string} input - * @param {boolean} exactOnly - */ - has: function has(input, exactOnly) { - if (exactOnly === void 0) { - exactOnly = false; - } - - return exactOnly ? input in this.j : !!this.go(input); - }, - - /** - * Short for "transition all"; create a transition from the array of items - * in the given list to the same final resulting state. - * @param {string | string[]} inputs Group of inputs to transition on - * @param {Transition | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of token groups - */ - ta: function ta(inputs, next, flags, groups) { - for (var i = 0; i < inputs.length; i++) { - this.tt(inputs[i], next, flags, groups); - } - }, - - /** - * Short for "take regexp transition"; defines a transition for this state - * when it encounters a token which matches the given regular expression - * @param {RegExp} regexp Regular expression transition (populate first) - * @param {T | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of token groups - * @returns {State} taken after the given input - */ - tr: function tr(regexp, next, flags, groups) { - groups = groups || State.groups; - var nextState; - - if (next && next.j) { - nextState = next; - } else { - // Token with maybe token groups - nextState = new State(next); - - if (flags && groups) { - addToGroups(next, flags, groups); - } - } - - this.jr.push([regexp, nextState]); - return nextState; - }, - - /** - * Short for "take transitions", will take as many sequential transitions as - * the length of the given input and returns the - * resulting final state. - * @param {string | string[]} input - * @param {T | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of token groups - * @returns {State} taken after the given input - */ - ts: function ts(input, next, flags, groups) { - var state = this; - var len = input.length; - - if (!len) { - return state; - } - - for (var i = 0; i < len - 1; i++) { - state = state.tt(input[i]); - } - - return state.tt(input[len - 1], next, flags, groups); - }, - - /** - * Short for "take transition", this is a method for building/working with - * state machines. - * - * If a state already exists for the given input, returns it. - * - * If a token is specified, that state will emit that token when reached by - * the linkify engine. - * - * If no state exists, it will be initialized with some default transitions - * that resemble existing default transitions. - * - * If a state is given for the second argument, that state will be - * transitioned to on the given input regardless of what that input - * previously did. - * - * Specify a token group flags to define groups that this token belongs to. - * The token will be added to corresponding entires in the given groups - * object. - * - * @param {string} input character, token type to transition on - * @param {T | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of groups - * @returns {State} taken after the given input - */ - tt: function tt(input, next, flags, groups) { - groups = groups || State.groups; - var state = this; // Check if existing state given, just a basic transition - - if (next && next.j) { - state.j[input] = next; - return next; - } - - var t = next; // Take the transition with the usual default mechanisms and use that as - // a template for creating the next state - - var nextState, - templateState = state.go(input); - - if (templateState) { - nextState = new State(); - assign(nextState.j, templateState.j); - nextState.jr.push.apply(nextState.jr, templateState.jr); - nextState.jd = templateState.jd; - nextState.t = templateState.t; - } else { - nextState = new State(); - } - - if (t) { - // Ensure newly token is in the same groups as the old token - if (groups) { - if (nextState.t && typeof nextState.t === 'string') { - var allFlags = assign(flagsForToken(nextState.t, groups), flags); - addToGroups(t, allFlags, groups); - } else if (flags) { - addToGroups(t, flags, groups); - } - } - - nextState.t = t; // overwrite anything that was previously there - } - - state.j[input] = nextState; - return nextState; - } - }; // Helper functions to improve minification (not exported outside linkifyjs module) - - /** - * @template T - * @param {State} state - * @param {string | string[]} input - * @param {Flags} [flags] - * @param {Collections} [groups] - */ - - var ta = function ta(state, input, next, flags, groups) { - return state.ta(input, next, flags, groups); - }; - /** - * @template T - * @param {State} state - * @param {RegExp} regexp - * @param {T | State} [next] - * @param {Flags} [flags] - * @param {Collections} [groups] - */ - - var tr = function tr(state, regexp, next, flags, groups) { - return state.tr(regexp, next, flags, groups); - }; - /** - * @template T - * @param {State} state - * @param {string | string[]} input - * @param {T | State} [next] - * @param {Flags} [flags] - * @param {Collections} [groups] - */ - - var ts = function ts(state, input, next, flags, groups) { - return state.ts(input, next, flags, groups); - }; - /** - * @template T - * @param {State} state - * @param {string} input - * @param {T | State} [next] - * @param {Collections} [groups] - * @param {Flags} [flags] - */ - - var tt = function tt(state, input, next, flags, groups) { - return state.tt(input, next, flags, groups); - }; - - /****************************************************************************** - Text Tokens - Identifiers for token outputs from the regexp scanner - ******************************************************************************/ - // A valid web domain token - var WORD = 'WORD'; // only contains a-z - - var UWORD = 'UWORD'; // contains letters other than a-z, used for IDN - // Special case of word - - var LOCALHOST = 'LOCALHOST'; // Valid top-level domain, special case of WORD (see tlds.js) - - var TLD = 'TLD'; // Valid IDN TLD, special case of UWORD (see tlds.js) - - var UTLD = 'UTLD'; // The scheme portion of a web URI protocol. Supported types include: `mailto`, - // `file`, and user-defined custom protocols. Limited to schemes that contain - // only letters - - var SCHEME = 'SCHEME'; // Similar to SCHEME, except makes distinction for schemes that must always be - // followed by `://`, not just `:`. Supported types include `http`, `https`, - // `ftp`, `ftps` - - var SLASH_SCHEME = 'SLASH_SCHEME'; // Any sequence of digits 0-9 - - var NUM = 'NUM'; // Any number of consecutive whitespace characters that are not newline - - var WS = 'WS'; // New line (unix style) - - var NL$1 = 'NL'; // \n - // Opening/closing bracket classes - - var OPENBRACE = 'OPENBRACE'; // { - - var OPENBRACKET = 'OPENBRACKET'; // [ - - var OPENANGLEBRACKET = 'OPENANGLEBRACKET'; // < - - var OPENPAREN = 'OPENPAREN'; // ( - - var CLOSEBRACE = 'CLOSEBRACE'; // } - - var CLOSEBRACKET = 'CLOSEBRACKET'; // ] - - var CLOSEANGLEBRACKET = 'CLOSEANGLEBRACKET'; // > - - var CLOSEPAREN = 'CLOSEPAREN'; // ) - // Various symbols - - var AMPERSAND = 'AMPERSAND'; // & - - var APOSTROPHE = 'APOSTROPHE'; // ' - - var ASTERISK = 'ASTERISK'; // * - - var AT = 'AT'; // @ - - var BACKSLASH = 'BACKSLASH'; // \ - - var BACKTICK = 'BACKTICK'; // ` - - var CARET = 'CARET'; // ^ - - var COLON = 'COLON'; // : - - var COMMA = 'COMMA'; // , - - var DOLLAR = 'DOLLAR'; // $ - - var DOT = 'DOT'; // . - - var EQUALS = 'EQUALS'; // = - - var EXCLAMATION = 'EXCLAMATION'; // ! - - var HYPHEN = 'HYPHEN'; // - - - var PERCENT = 'PERCENT'; // % - - var PIPE = 'PIPE'; // | - - var PLUS = 'PLUS'; // + - - var POUND = 'POUND'; // # - - var QUERY = 'QUERY'; // ? - - var QUOTE = 'QUOTE'; // " - - var SEMI = 'SEMI'; // ; - - var SLASH = 'SLASH'; // / - - var TILDE = 'TILDE'; // ~ - - var UNDERSCORE = 'UNDERSCORE'; // _ - // Emoji symbol - - var EMOJI$1 = 'EMOJI'; // Default token - anything that is not one of the above - - var SYM = 'SYM'; - - var tk = /*#__PURE__*/Object.freeze({ - __proto__: null, - WORD: WORD, - UWORD: UWORD, - LOCALHOST: LOCALHOST, - TLD: TLD, - UTLD: UTLD, - SCHEME: SCHEME, - SLASH_SCHEME: SLASH_SCHEME, - NUM: NUM, - WS: WS, - NL: NL$1, - OPENBRACE: OPENBRACE, - OPENBRACKET: OPENBRACKET, - OPENANGLEBRACKET: OPENANGLEBRACKET, - OPENPAREN: OPENPAREN, - CLOSEBRACE: CLOSEBRACE, - CLOSEBRACKET: CLOSEBRACKET, - CLOSEANGLEBRACKET: CLOSEANGLEBRACKET, - CLOSEPAREN: CLOSEPAREN, - AMPERSAND: AMPERSAND, - APOSTROPHE: APOSTROPHE, - ASTERISK: ASTERISK, - AT: AT, - BACKSLASH: BACKSLASH, - BACKTICK: BACKTICK, - CARET: CARET, - COLON: COLON, - COMMA: COMMA, - DOLLAR: DOLLAR, - DOT: DOT, - EQUALS: EQUALS, - EXCLAMATION: EXCLAMATION, - HYPHEN: HYPHEN, - PERCENT: PERCENT, - PIPE: PIPE, - PLUS: PLUS, - POUND: POUND, - QUERY: QUERY, - QUOTE: QUOTE, - SEMI: SEMI, - SLASH: SLASH, - TILDE: TILDE, - UNDERSCORE: UNDERSCORE, - EMOJI: EMOJI$1, - SYM: SYM - }); - - // Note that these two Unicode ones expand into a really big one with Babel - var ASCII_LETTER = /[a-z]/; - var LETTER = /(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/; // Any Unicode character with letter data type - - var EMOJI = /(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/; // Any Unicode emoji character - - var EMOJI_VARIATION$1 = /\ufe0f/; - var DIGIT = /\d/; - var SPACE = /\s/; - - var regexp = /*#__PURE__*/Object.freeze({ - __proto__: null, - ASCII_LETTER: ASCII_LETTER, - LETTER: LETTER, - EMOJI: EMOJI, - EMOJI_VARIATION: EMOJI_VARIATION$1, - DIGIT: DIGIT, - SPACE: SPACE - }); - - /** - The scanner provides an interface that takes a string of text as input, and - outputs an array of tokens instances that can be used for easy URL parsing. - */ - var NL = '\n'; // New line character - - var EMOJI_VARIATION = "\uFE0F"; // Variation selector, follows heart and others - - var EMOJI_JOINER = "\u200D"; // zero-width joiner - - /** - * Scanner output token: - * - `t` is the token name (e.g., 'NUM', 'EMOJI', 'TLD') - * - `v` is the value of the token (e.g., '123', '❤️', 'com') - * - `s` is the start index of the token in the original string - * - `e` is the end index of the token in the original string - * @typedef {{t: string, v: string, s: number, e: number}} Token - */ - - /** - * @template T - * @typedef {{ [collection: string]: T[] }} Collections - */ - - /** - * Initialize the scanner character-based state machine for the given start - * state - * @param {[string, boolean][]} customSchemes List of custom schemes, where each - * item is a length-2 tuple with the first element set to the string scheme, and - * the second element set to `true` if the `://` after the scheme is optional - */ - - function init$2(customSchemes) { - var _tr, _tr2, _tr3, _tr4, _tt, _tr5; - - if (customSchemes === void 0) { - customSchemes = []; - } - - // Frequently used states (name argument removed during minification) - - /** @type Collections */ - var groups = {}; // of tokens - - State.groups = groups; - /** @type State */ - - var Start = new State(); // States for special URL symbols that accept immediately after start - - tt(Start, "'", APOSTROPHE); - tt(Start, '{', OPENBRACE); - tt(Start, '[', OPENBRACKET); - tt(Start, '<', OPENANGLEBRACKET); - tt(Start, '(', OPENPAREN); - tt(Start, '}', CLOSEBRACE); - tt(Start, ']', CLOSEBRACKET); - tt(Start, '>', CLOSEANGLEBRACKET); - tt(Start, ')', CLOSEPAREN); - tt(Start, '&', AMPERSAND); - tt(Start, '*', ASTERISK); - tt(Start, '@', AT); - tt(Start, '`', BACKTICK); - tt(Start, '^', CARET); - tt(Start, ':', COLON); - tt(Start, ',', COMMA); - tt(Start, '$', DOLLAR); - tt(Start, '.', DOT); - tt(Start, '=', EQUALS); - tt(Start, '!', EXCLAMATION); - tt(Start, '-', HYPHEN); - tt(Start, '%', PERCENT); - tt(Start, '|', PIPE); - tt(Start, '+', PLUS); - tt(Start, '#', POUND); - tt(Start, '?', QUERY); - tt(Start, '"', QUOTE); - tt(Start, '/', SLASH); - tt(Start, ';', SEMI); - tt(Start, '~', TILDE); - tt(Start, '_', UNDERSCORE); - tt(Start, '\\', BACKSLASH); - var Num = tr(Start, DIGIT, NUM, (_tr = {}, _tr[numeric] = true, _tr)); - tr(Num, DIGIT, Num); // State which emits a word token - - var Word = tr(Start, ASCII_LETTER, WORD, (_tr2 = {}, _tr2[ascii] = true, _tr2)); - tr(Word, ASCII_LETTER, Word); // Same as previous, but specific to non-fsm.ascii alphabet words - - var UWord = tr(Start, LETTER, UWORD, (_tr3 = {}, _tr3[alpha] = true, _tr3)); - tr(UWord, ASCII_LETTER); // Non-accepting - - tr(UWord, LETTER, UWord); // Whitespace jumps - // Tokens of only non-newline whitespace are arbitrarily long - // If any whitespace except newline, more whitespace! - - var Ws = tr(Start, SPACE, WS, (_tr4 = {}, _tr4[whitespace] = true, _tr4)); - tt(Start, NL, NL$1, (_tt = {}, _tt[whitespace] = true, _tt)); - tt(Ws, NL); // non-accepting state to avoid mixing whitespaces - - tr(Ws, SPACE, Ws); // Emoji tokens. They are not grouped by the scanner except in cases where a - // zero-width joiner is present - - var Emoji = tr(Start, EMOJI, EMOJI$1, (_tr5 = {}, _tr5[emoji] = true, _tr5)); - tr(Emoji, EMOJI, Emoji); - tt(Emoji, EMOJI_VARIATION, Emoji); // tt(Start, EMOJI_VARIATION, Emoji); // This one is sketchy - - var EmojiJoiner = tt(Emoji, EMOJI_JOINER); - tr(EmojiJoiner, EMOJI, Emoji); // tt(EmojiJoiner, EMOJI_VARIATION, Emoji); // also sketchy - // Generates states for top-level domains - // Note that this is most accurate when tlds are in alphabetical order - - var wordjr = [[ASCII_LETTER, Word]]; - var uwordjr = [[ASCII_LETTER, null], [LETTER, UWord]]; - - for (var i = 0; i < tlds.length; i++) { - fastts(Start, tlds[i], TLD, WORD, wordjr); - } - - for (var _i = 0; _i < utlds.length; _i++) { - fastts(Start, utlds[_i], UTLD, UWORD, uwordjr); - } - - addToGroups(TLD, { - tld: true, - ascii: true - }, groups); - addToGroups(UTLD, { - utld: true, - alpha: true - }, groups); // Collect the states generated by different protocols. NOTE: If any new TLDs - // get added that are also protocols, set the token to be the same as the - // protocol to ensure parsing works as expected. - - fastts(Start, 'file', SCHEME, WORD, wordjr); - fastts(Start, 'mailto', SCHEME, WORD, wordjr); - fastts(Start, 'http', SLASH_SCHEME, WORD, wordjr); - fastts(Start, 'https', SLASH_SCHEME, WORD, wordjr); - fastts(Start, 'ftp', SLASH_SCHEME, WORD, wordjr); - fastts(Start, 'ftps', SLASH_SCHEME, WORD, wordjr); - addToGroups(SCHEME, { - scheme: true, - ascii: true - }, groups); - addToGroups(SLASH_SCHEME, { - slashscheme: true, - ascii: true - }, groups); // Register custom schemes. Assumes each scheme is asciinumeric with hyphens - - customSchemes = customSchemes.sort(function (a, b) { - return a[0] > b[0] ? 1 : -1; - }); - - for (var _i2 = 0; _i2 < customSchemes.length; _i2++) { - var _ref, _ref2; - - var sch = customSchemes[_i2][0]; - var optionalSlashSlash = customSchemes[_i2][1]; - var flags = optionalSlashSlash ? (_ref = {}, _ref[scheme] = true, _ref) : (_ref2 = {}, _ref2[slashscheme] = true, _ref2); - - if (sch.indexOf('-') >= 0) { - flags[domain] = true; - } else if (!ASCII_LETTER.test(sch)) { - flags[numeric] = true; // numbers only - } else if (DIGIT.test(sch)) { - flags[asciinumeric] = true; - } else { - flags[ascii] = true; - } - - ts(Start, sch, sch, flags); - } // Localhost token - - - ts(Start, 'localhost', LOCALHOST, { - ascii: true - }); // Set default transition for start state (some symbol) - - Start.jd = new State(SYM); - return { - start: Start, - tokens: assign({ - groups: groups - }, tk) - }; - } - /** - Given a string, returns an array of TOKEN instances representing the - composition of that string. - - @method run - @param {State} start scanner starting state - @param {string} str input string to scan - @return {Token[]} list of tokens, each with a type and value - */ - - function run$1(start, str) { - // State machine is not case sensitive, so input is tokenized in lowercased - // form (still returns regular case). Uses selective `toLowerCase` because - // lowercasing the entire string causes the length and character position to - // vary in some non-English strings with V8-based runtimes. - var iterable = stringToArray(str.replace(/[A-Z]/g, function (c) { - return c.toLowerCase(); - })); - var charCount = iterable.length; // <= len if there are emojis, etc - - var tokens = []; // return value - // cursor through the string itself, accounting for characters that have - // width with length 2 such as emojis - - var cursor = 0; // Cursor through the array-representation of the string - - var charCursor = 0; // Tokenize the string - - while (charCursor < charCount) { - var state = start; - var nextState = null; - var tokenLength = 0; - var latestAccepting = null; - var sinceAccepts = -1; - var charsSinceAccepts = -1; - - while (charCursor < charCount && (nextState = state.go(iterable[charCursor]))) { - state = nextState; // Keep track of the latest accepting state - - if (state.accepts()) { - sinceAccepts = 0; - charsSinceAccepts = 0; - latestAccepting = state; - } else if (sinceAccepts >= 0) { - sinceAccepts += iterable[charCursor].length; - charsSinceAccepts++; - } - - tokenLength += iterable[charCursor].length; - cursor += iterable[charCursor].length; - charCursor++; - } // Roll back to the latest accepting state - - - cursor -= sinceAccepts; - charCursor -= charsSinceAccepts; - tokenLength -= sinceAccepts; // No more jumps, just make a new token from the last accepting one - - tokens.push({ - t: latestAccepting.t, - // token type/name - v: str.slice(cursor - tokenLength, cursor), - // string value - s: cursor - tokenLength, - // start index - e: cursor // end index (excluding) - - }); - } - - return tokens; - } - /** - * Convert a String to an Array of characters, taking into account that some - * characters like emojis take up two string indexes. - * - * Adapted from core-js (MIT license) - * https://github.com/zloirock/core-js/blob/2d69cf5f99ab3ea3463c395df81e5a15b68f49d9/packages/core-js/internals/string-multibyte.js - * - * @function stringToArray - * @param {string} str - * @returns {string[]} - */ - - function stringToArray(str) { - var result = []; - var len = str.length; - var index = 0; - - while (index < len) { - var first = str.charCodeAt(index); - var second = void 0; - var char = first < 0xd800 || first > 0xdbff || index + 1 === len || (second = str.charCodeAt(index + 1)) < 0xdc00 || second > 0xdfff ? str[index] // single character - : str.slice(index, index + 2); // two-index characters - - result.push(char); - index += char.length; - } - - return result; - } - /** - * Fast version of ts function for when transition defaults are well known - * @param {State} state - * @param {string} input - * @param {string} t - * @param {string} defaultt - * @param {[RegExp, State][]} jr - * @returns {State} - */ - - function fastts(state, input, t, defaultt, jr) { - var next; - var len = input.length; - - for (var i = 0; i < len - 1; i++) { - var char = input[i]; - - if (state.j[char]) { - next = state.j[char]; - } else { - next = new State(defaultt); - next.jr = jr.slice(); - state.j[char] = next; - } - - state = next; - } - - next = new State(t); - next.jr = jr.slice(); - state.j[input[len - 1]] = next; - return next; - } - - function _inheritsLoose(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - - _setPrototypeOf(subClass, superClass); - } - - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - - return _setPrototypeOf(o, p); - } - - /** - * An object where each key is a valid DOM Event Name such as `click` or `focus` - * and each value is an event handler function. - * - * https://developer.mozilla.org/en-US/docs/Web/API/Element#events - * @typedef {?{ [event: string]: Function }} EventListeners - */ - - /** - * All formatted properties required to render a link, including `tagName`, - * `attributes`, `content` and `eventListeners`. - * @typedef {{ tagName: any, attributes: {[attr: string]: any}, content: string, - * eventListeners: EventListeners }} IntermediateRepresentation - */ - - /** - * Specify either an object described by the template type `O` or a function. - * - * The function takes a string value (usually the link's href attribute), the - * link type (`'url'`, `'hashtag`', etc.) and an internal token representation - * of the link. It should return an object of the template type `O` - * @template O - * @typedef {O | ((value: string, type: string, token: MultiToken) => O)} OptObj - */ - - /** - * Specify either a function described by template type `F` or an object. - * - * Each key in the object should be a link type (`'url'`, `'hashtag`', etc.). Each - * value should be a function with template type `F` that is called when the - * corresponding link type is encountered. - * @template F - * @typedef {F | { [type: string]: F}} OptFn - */ - - /** - * Specify either a value with template type `V`, a function that returns `V` or - * an object where each value resolves to `V`. - * - * The function takes a string value (usually the link's href attribute), the - * link type (`'url'`, `'hashtag`', etc.) and an internal token representation - * of the link. It should return an object of the template type `V` - * - * For the object, each key should be a link type (`'url'`, `'hashtag`', etc.). - * Each value should either have type `V` or a function that returns V. This - * function similarly takes a string value and a token. - * - * Example valid types for `Opt`: - * - * ```js - * 'hello' - * (value, type, token) => 'world' - * { url: 'hello', email: (value, token) => 'world'} - * ``` - * @template V - * @typedef {V | ((value: string, type: string, token: MultiToken) => V) | { [type: string]: V | ((value: string, token: MultiToken) => V) }} Opt - */ - - /** - * See available options: https://linkify.js.org/docs/options.html - * @typedef {{ - * defaultProtocol?: string, - * events?: OptObj, - * format?: Opt, - * formatHref?: Opt, - * nl2br?: boolean, - * tagName?: Opt, - * target?: Opt, - * rel?: Opt, - * validate?: Opt, - * truncate?: Opt, - * className?: Opt, - * attributes?: OptObj<({ [attr: string]: any })>, - * ignoreTags?: string[], - * render?: OptFn<((ir: IntermediateRepresentation) => any)> - * }} Opts - */ - - /** - * @type Required - */ - - var defaults = { - defaultProtocol: 'http', - events: null, - format: noop, - formatHref: noop, - nl2br: false, - tagName: 'a', - target: null, - rel: null, - validate: true, - truncate: Infinity, - className: null, - attributes: null, - ignoreTags: [], - render: null - }; - /** - * Utility class for linkify interfaces to apply specified - * {@link Opts formatting and rendering options}. - * - * @param {Opts | Options} [opts] Option value overrides. - * @param {(ir: IntermediateRepresentation) => any} [defaultRender] (For - * internal use) default render function that determines how to generate an - * HTML element based on a link token's derived tagName, attributes and HTML. - * Similar to render option - */ - - function Options(opts, defaultRender) { - if (defaultRender === void 0) { - defaultRender = null; - } - - var o = assign({}, defaults); - - if (opts) { - o = assign(o, opts instanceof Options ? opts.o : opts); - } // Ensure all ignored tags are uppercase - - - var ignoredTags = o.ignoreTags; - var uppercaseIgnoredTags = []; - - for (var i = 0; i < ignoredTags.length; i++) { - uppercaseIgnoredTags.push(ignoredTags[i].toUpperCase()); - } - /** @protected */ - - - this.o = o; - - if (defaultRender) { - this.defaultRender = defaultRender; - } - - this.ignoreTags = uppercaseIgnoredTags; - } - Options.prototype = { - o: defaults, - - /** - * @type string[] - */ - ignoreTags: [], - - /** - * @param {IntermediateRepresentation} ir - * @returns {any} - */ - defaultRender: function defaultRender(ir) { - return ir; - }, - - /** - * Returns true or false based on whether a token should be displayed as a - * link based on the user options. - * @param {MultiToken} token - * @returns {boolean} - */ - check: function check(token) { - return this.get('validate', token.toString(), token); - }, - // Private methods - - /** - * Resolve an option's value based on the value of the option and the given - * params. If operator and token are specified and the target option is - * callable, automatically calls the function with the given argument. - * @template {keyof Opts} K - * @param {K} key Name of option to use - * @param {string} [operator] will be passed to the target option if it's a - * function. If not specified, RAW function value gets returned - * @param {MultiToken} [token] The token from linkify.tokenize - * @returns {Opts[K] | any} - */ - get: function get(key, operator, token) { - var isCallable = operator != null; - var option = this.o[key]; - - if (!option) { - return option; - } - - if (typeof option === 'object') { - option = token.t in option ? option[token.t] : defaults[key]; - - if (typeof option === 'function' && isCallable) { - option = option(operator, token); - } - } else if (typeof option === 'function' && isCallable) { - option = option(operator, token.t, token); - } - - return option; - }, - - /** - * @template {keyof Opts} L - * @param {L} key Name of options object to use - * @param {string} [operator] - * @param {MultiToken} [token] - * @returns {Opts[L] | any} - */ - getObj: function getObj(key, operator, token) { - var obj = this.o[key]; - - if (typeof obj === 'function' && operator != null) { - obj = obj(operator, token.t, token); - } - - return obj; - }, - - /** - * Convert the given token to a rendered element that may be added to the - * calling-interface's DOM - * @param {MultiToken} token Token to render to an HTML element - * @returns {any} Render result; e.g., HTML string, DOM element, React - * Component, etc. - */ - render: function render(token) { - var ir = token.render(this); // intermediate representation - - var renderFn = this.get('render', null, token) || this.defaultRender; - return renderFn(ir, token.t, token); - } - }; - - function noop(val) { - return val; - } - - var options = /*#__PURE__*/Object.freeze({ - __proto__: null, - defaults: defaults, - Options: Options, - assign: assign - }); - - /****************************************************************************** - Multi-Tokens - Tokens composed of arrays of TextTokens - ******************************************************************************/ - - /** - * @param {string} value - * @param {Token[]} tokens - */ - - function MultiToken(value, tokens) { - this.t = 'token'; - this.v = value; - this.tk = tokens; - } - /** - * Abstract class used for manufacturing tokens of text tokens. That is rather - * than the value for a token being a small string of text, it's value an array - * of text tokens. - * - * Used for grouping together URLs, emails, hashtags, and other potential - * creations. - * @class MultiToken - * @property {string} t - * @property {string} v - * @property {Token[]} tk - * @abstract - */ - - MultiToken.prototype = { - isLink: false, - - /** - * Return the string this token represents. - * @return {string} - */ - toString: function toString() { - return this.v; - }, - - /** - * What should the value for this token be in the `href` HTML attribute? - * Returns the `.toString` value by default. - * @param {string} [scheme] - * @return {string} - */ - toHref: function toHref(scheme) { - return this.toString(); - }, - - /** - * @param {Options} options Formatting options - * @returns {string} - */ - toFormattedString: function toFormattedString(options) { - var val = this.toString(); - var truncate = options.get('truncate', val, this); - var formatted = options.get('format', val, this); - return truncate && formatted.length > truncate ? formatted.substring(0, truncate) + '…' : formatted; - }, - - /** - * - * @param {Options} options - * @returns {string} - */ - toFormattedHref: function toFormattedHref(options) { - return options.get('formatHref', this.toHref(options.get('defaultProtocol')), this); - }, - - /** - * The start index of this token in the original input string - * @returns {number} - */ - startIndex: function startIndex() { - return this.tk[0].s; - }, - - /** - * The end index of this token in the original input string (up to this - * index but not including it) - * @returns {number} - */ - endIndex: function endIndex() { - return this.tk[this.tk.length - 1].e; - }, - - /** - Returns an object of relevant values for this token, which includes keys - * type - Kind of token ('url', 'email', etc.) - * value - Original text - * href - The value that should be added to the anchor tag's href - attribute - @method toObject - @param {string} [protocol] `'http'` by default - */ - toObject: function toObject(protocol) { - if (protocol === void 0) { - protocol = defaults.defaultProtocol; - } - - return { - type: this.t, - value: this.toString(), - isLink: this.isLink, - href: this.toHref(protocol), - start: this.startIndex(), - end: this.endIndex() - }; - }, - - /** - * - * @param {Options} options Formatting option - */ - toFormattedObject: function toFormattedObject(options) { - return { - type: this.t, - value: this.toFormattedString(options), - isLink: this.isLink, - href: this.toFormattedHref(options), - start: this.startIndex(), - end: this.endIndex() - }; - }, - - /** - * Whether this token should be rendered as a link according to the given options - * @param {Options} options - * @returns {boolean} - */ - validate: function validate(options) { - return options.get('validate', this.toString(), this); - }, - - /** - * Return an object that represents how this link should be rendered. - * @param {Options} options Formattinng options - */ - render: function render(options) { - var token = this; - var href = this.toFormattedHref(options); - var tagName = options.get('tagName', href, token); - var content = this.toFormattedString(options); - var attributes = {}; - var className = options.get('className', href, token); - var target = options.get('target', href, token); - var rel = options.get('rel', href, token); - var attrs = options.getObj('attributes', href, token); - var eventListeners = options.getObj('events', href, token); - attributes.href = href; - - if (className) { - attributes.class = className; - } - - if (target) { - attributes.target = target; - } - - if (rel) { - attributes.rel = rel; - } - - if (attrs) { - assign(attributes, attrs); - } - - return { - tagName: tagName, - attributes: attributes, - content: content, - eventListeners: eventListeners - }; - } - }; // Base token - /** - * Create a new token that can be emitted by the parser state machine - * @param {string} type readable type of the token - * @param {object} props properties to assign or override, including isLink = true or false - * @returns {new (value: string, tokens: Token[]) => MultiToken} new token class - */ - - function createTokenClass(type, props) { - var Token = /*#__PURE__*/function (_MultiToken) { - _inheritsLoose(Token, _MultiToken); - - function Token(value, tokens) { - var _this; - - _this = _MultiToken.call(this, value, tokens) || this; - _this.t = type; - return _this; - } - - return Token; - }(MultiToken); - - for (var p in props) { - Token.prototype[p] = props[p]; - } - - Token.t = type; - return Token; - } - /** - Represents a list of tokens making up a valid email address - */ - - var Email = createTokenClass('email', { - isLink: true, - toHref: function toHref() { - return 'mailto:' + this.toString(); - } - }); - /** - Represents some plain text - */ - - var Text = createTokenClass('text'); - /** - Multi-linebreak token - represents a line break - @class Nl - */ - - var Nl = createTokenClass('nl'); - /** - Represents a list of text tokens making up a valid URL - @class Url - */ - - var Url = createTokenClass('url', { - isLink: true, - - /** - Lowercases relevant parts of the domain and adds the protocol if - required. Note that this will not escape unsafe HTML characters in the - URL. - @param {string} [scheme] default scheme (e.g., 'https') - @return {string} the full href - */ - toHref: function toHref(scheme) { - if (scheme === void 0) { - scheme = defaults.defaultProtocol; - } - - // Check if already has a prefix scheme - return this.hasProtocol() ? this.v : scheme + "://" + this.v; - }, - - /** - * Check whether this URL token has a protocol - * @return {boolean} - */ - hasProtocol: function hasProtocol() { - var tokens = this.tk; - return tokens.length >= 2 && tokens[0].t !== LOCALHOST && tokens[1].t === COLON; - } - }); - - var multi = /*#__PURE__*/Object.freeze({ - __proto__: null, - MultiToken: MultiToken, - Base: MultiToken, - createTokenClass: createTokenClass, - Email: Email, - Text: Text, - Nl: Nl, - Url: Url - }); - - /** - Not exactly parser, more like the second-stage scanner (although we can - theoretically hotswap the code here with a real parser in the future... but - for a little URL-finding utility abstract syntax trees may be a little - overkill). - - URL format: http://en.wikipedia.org/wiki/URI_scheme - Email format: http://en.wikipedia.org/wiki/EmailAddress (links to RFC in - reference) - - @module linkify - @submodule parser - @main run - */ - - var makeState = function makeState(arg) { - return new State(arg); - }; - /** - * Generate the parser multi token-based state machine - * @param {{ groups: Collections }} tokens - */ - - - function init$1(_ref) { - var groups = _ref.groups; - // Types of characters the URL can definitely end in - var qsAccepting = groups.domain.concat([AMPERSAND, ASTERISK, AT, BACKSLASH, BACKTICK, CARET, DOLLAR, EQUALS, HYPHEN, NUM, PERCENT, PIPE, PLUS, POUND, SLASH, SYM, TILDE, UNDERSCORE]); // Types of tokens that can follow a URL and be part of the query string - // but cannot be the very last characters - // Characters that cannot appear in the URL at all should be excluded - - var qsNonAccepting = [APOSTROPHE, CLOSEANGLEBRACKET, CLOSEBRACE, CLOSEBRACKET, CLOSEPAREN, COLON, COMMA, DOT, EXCLAMATION, OPENANGLEBRACKET, OPENBRACE, OPENBRACKET, OPENPAREN, QUERY, QUOTE, SEMI]; // For addresses without the mailto prefix - // Tokens allowed in the localpart of the email - - var localpartAccepting = [AMPERSAND, APOSTROPHE, ASTERISK, BACKSLASH, BACKTICK, CARET, CLOSEBRACE, DOLLAR, EQUALS, HYPHEN, NUM, OPENBRACE, PERCENT, PIPE, PLUS, POUND, QUERY, SLASH, SYM, TILDE, UNDERSCORE]; // The universal starting state. - - /** - * @type State - */ - - var Start = makeState(); - var Localpart = tt(Start, TILDE); // Local part of the email address - - ta(Localpart, localpartAccepting, Localpart); - ta(Localpart, groups.domain, Localpart); - var Domain = makeState(), - Scheme = makeState(), - SlashScheme = makeState(); - ta(Start, groups.domain, Domain); // parsed string ends with a potential domain name (A) - - ta(Start, groups.scheme, Scheme); // e.g., 'mailto' - - ta(Start, groups.slashscheme, SlashScheme); // e.g., 'http' - - ta(Domain, localpartAccepting, Localpart); - ta(Domain, groups.domain, Domain); - var LocalpartAt = tt(Domain, AT); // Local part of the email address plus @ - - tt(Localpart, AT, LocalpartAt); // close to an email address now - - var LocalpartDot = tt(Localpart, DOT); // Local part of the email address plus '.' (localpart cannot end in .) - - ta(LocalpartDot, localpartAccepting, Localpart); - ta(LocalpartDot, groups.domain, Localpart); - var EmailDomain = makeState(); - ta(LocalpartAt, groups.domain, EmailDomain); // parsed string starts with local email info + @ with a potential domain name - - ta(EmailDomain, groups.domain, EmailDomain); - var EmailDomainDot = tt(EmailDomain, DOT); // domain followed by DOT - - ta(EmailDomainDot, groups.domain, EmailDomain); - var Email$1 = makeState(Email); // Possible email address (could have more tlds) - - ta(EmailDomainDot, groups.tld, Email$1); - ta(EmailDomainDot, groups.utld, Email$1); - tt(LocalpartAt, LOCALHOST, Email$1); // Hyphen can jump back to a domain name - - var EmailDomainHyphen = tt(EmailDomain, HYPHEN); // parsed string starts with local email info + @ with a potential domain name - - ta(EmailDomainHyphen, groups.domain, EmailDomain); - ta(Email$1, groups.domain, EmailDomain); - tt(Email$1, DOT, EmailDomainDot); - tt(Email$1, HYPHEN, EmailDomainHyphen); // Final possible email states - - var EmailColon = tt(Email$1, COLON); // URL followed by colon (potential port number here) - - /*const EmailColonPort = */ - - ta(EmailColon, groups.numeric, Email); // URL followed by colon and port numner - // Account for dots and hyphens. Hyphens are usually parts of domain names - // (but not TLDs) - - var DomainHyphen = tt(Domain, HYPHEN); // domain followed by hyphen - - var DomainDot = tt(Domain, DOT); // domain followed by DOT - - ta(DomainHyphen, groups.domain, Domain); - ta(DomainDot, localpartAccepting, Localpart); - ta(DomainDot, groups.domain, Domain); - var DomainDotTld = makeState(Url); // Simplest possible URL with no query string - - ta(DomainDot, groups.tld, DomainDotTld); - ta(DomainDot, groups.utld, DomainDotTld); - ta(DomainDotTld, groups.domain, Domain); - ta(DomainDotTld, localpartAccepting, Localpart); - tt(DomainDotTld, DOT, DomainDot); - tt(DomainDotTld, HYPHEN, DomainHyphen); - tt(DomainDotTld, AT, LocalpartAt); - var DomainDotTldColon = tt(DomainDotTld, COLON); // URL followed by colon (potential port number here) - - var DomainDotTldColonPort = makeState(Url); // TLD followed by a port number - - ta(DomainDotTldColon, groups.numeric, DomainDotTldColonPort); // Long URL with optional port and maybe query string - - var Url$1 = makeState(Url); // URL with extra symbols at the end, followed by an opening bracket - - var UrlNonaccept = makeState(); // URL followed by some symbols (will not be part of the final URL) - // Query strings - - ta(Url$1, qsAccepting, Url$1); - ta(Url$1, qsNonAccepting, UrlNonaccept); - ta(UrlNonaccept, qsAccepting, Url$1); - ta(UrlNonaccept, qsNonAccepting, UrlNonaccept); // Become real URLs after `SLASH` or `COLON NUM SLASH` - // Here works with or without scheme:// prefix - - tt(DomainDotTld, SLASH, Url$1); - tt(DomainDotTldColonPort, SLASH, Url$1); // Note that domains that begin with schemes are treated slighly differently - - var UriPrefix = tt(Scheme, COLON); // e.g., 'mailto:' or 'http://' - - var SlashSchemeColon = tt(SlashScheme, COLON); // e.g., 'http:' - - var SlashSchemeColonSlash = tt(SlashSchemeColon, SLASH); // e.g., 'http:/' - - tt(SlashSchemeColonSlash, SLASH, UriPrefix); // Scheme states can transition to domain states - - ta(Scheme, groups.domain, Domain); - tt(Scheme, DOT, DomainDot); - tt(Scheme, HYPHEN, DomainHyphen); - ta(SlashScheme, groups.domain, Domain); - tt(SlashScheme, DOT, DomainDot); - tt(SlashScheme, HYPHEN, DomainHyphen); // Force URL with scheme prefix followed by anything sane - - ta(UriPrefix, groups.domain, Url$1); - tt(UriPrefix, SLASH, Url$1); // URL, followed by an opening bracket - - var UrlOpenbrace = tt(Url$1, OPENBRACE); // URL followed by { - - var UrlOpenbracket = tt(Url$1, OPENBRACKET); // URL followed by [ - - var UrlOpenanglebracket = tt(Url$1, OPENANGLEBRACKET); // URL followed by < - - var UrlOpenparen = tt(Url$1, OPENPAREN); // URL followed by ( - - tt(UrlNonaccept, OPENBRACE, UrlOpenbrace); - tt(UrlNonaccept, OPENBRACKET, UrlOpenbracket); - tt(UrlNonaccept, OPENANGLEBRACKET, UrlOpenanglebracket); - tt(UrlNonaccept, OPENPAREN, UrlOpenparen); // Closing bracket component. This character WILL be included in the URL - - tt(UrlOpenbrace, CLOSEBRACE, Url$1); - tt(UrlOpenbracket, CLOSEBRACKET, Url$1); - tt(UrlOpenanglebracket, CLOSEANGLEBRACKET, Url$1); - tt(UrlOpenparen, CLOSEPAREN, Url$1); - tt(UrlOpenbrace, CLOSEBRACE, Url$1); // URL that beings with an opening bracket, followed by a symbols. - // Note that the final state can still be `UrlOpenbrace` (if the URL only - // has a single opening bracket for some reason). - - var UrlOpenbraceQ = makeState(Url); // URL followed by { and some symbols that the URL can end it - - var UrlOpenbracketQ = makeState(Url); // URL followed by [ and some symbols that the URL can end it - - var UrlOpenanglebracketQ = makeState(Url); // URL followed by < and some symbols that the URL can end it - - var UrlOpenparenQ = makeState(Url); // URL followed by ( and some symbols that the URL can end it - - ta(UrlOpenbrace, qsAccepting, UrlOpenbraceQ); - ta(UrlOpenbracket, qsAccepting, UrlOpenbracketQ); - ta(UrlOpenanglebracket, qsAccepting, UrlOpenanglebracketQ); - ta(UrlOpenparen, qsAccepting, UrlOpenparenQ); - var UrlOpenbraceSyms = makeState(); // UrlOpenbrace followed by some symbols it cannot end it - - var UrlOpenbracketSyms = makeState(); // UrlOpenbracketQ followed by some symbols it cannot end it - - var UrlOpenanglebracketSyms = makeState(); // UrlOpenanglebracketQ followed by some symbols it cannot end it - - var UrlOpenparenSyms = makeState(); // UrlOpenparenQ followed by some symbols it cannot end it - - ta(UrlOpenbrace, qsNonAccepting); - ta(UrlOpenbracket, qsNonAccepting); - ta(UrlOpenanglebracket, qsNonAccepting); - ta(UrlOpenparen, qsNonAccepting); // URL that begins with an opening bracket, followed by some symbols - - ta(UrlOpenbraceQ, qsAccepting, UrlOpenbraceQ); - ta(UrlOpenbracketQ, qsAccepting, UrlOpenbracketQ); - ta(UrlOpenanglebracketQ, qsAccepting, UrlOpenanglebracketQ); - ta(UrlOpenparenQ, qsAccepting, UrlOpenparenQ); - ta(UrlOpenbraceQ, qsNonAccepting, UrlOpenbraceQ); - ta(UrlOpenbracketQ, qsNonAccepting, UrlOpenbracketQ); - ta(UrlOpenanglebracketQ, qsNonAccepting, UrlOpenanglebracketQ); - ta(UrlOpenparenQ, qsNonAccepting, UrlOpenparenQ); - ta(UrlOpenbraceSyms, qsAccepting, UrlOpenbraceSyms); - ta(UrlOpenbracketSyms, qsAccepting, UrlOpenbracketQ); - ta(UrlOpenanglebracketSyms, qsAccepting, UrlOpenanglebracketQ); - ta(UrlOpenparenSyms, qsAccepting, UrlOpenparenQ); - ta(UrlOpenbraceSyms, qsNonAccepting, UrlOpenbraceSyms); - ta(UrlOpenbracketSyms, qsNonAccepting, UrlOpenbracketSyms); - ta(UrlOpenanglebracketSyms, qsNonAccepting, UrlOpenanglebracketSyms); - ta(UrlOpenparenSyms, qsNonAccepting, UrlOpenparenSyms); // Close brace/bracket to become regular URL - - tt(UrlOpenbracketQ, CLOSEBRACKET, Url$1); - tt(UrlOpenanglebracketQ, CLOSEANGLEBRACKET, Url$1); - tt(UrlOpenparenQ, CLOSEPAREN, Url$1); - tt(UrlOpenbraceQ, CLOSEBRACE, Url$1); - tt(UrlOpenbracketSyms, CLOSEBRACKET, Url$1); - tt(UrlOpenanglebracketSyms, CLOSEANGLEBRACKET, Url$1); - tt(UrlOpenparenSyms, CLOSEPAREN, Url$1); - tt(UrlOpenbraceSyms, CLOSEPAREN, Url$1); - tt(Start, LOCALHOST, DomainDotTld); // localhost is a valid URL state - - tt(Start, NL$1, Nl); // single new line - - return { - start: Start, - tokens: tk - }; - } - /** - * Run the parser state machine on a list of scanned string-based tokens to - * create a list of multi tokens, each of which represents a URL, email address, - * plain text, etc. - * - * @param {State} start parser start state - * @param {string} input the original input used to generate the given tokens - * @param {Token[]} tokens list of scanned tokens - * @returns {MultiToken[]} - */ - - function run(start, input, tokens) { - var len = tokens.length; - var cursor = 0; - var multis = []; - var textTokens = []; - - while (cursor < len) { - var state = start; - var secondState = null; - var nextState = null; - var multiLength = 0; - var latestAccepting = null; - var sinceAccepts = -1; - - while (cursor < len && !(secondState = state.go(tokens[cursor].t))) { - // Starting tokens with nowhere to jump to. - // Consider these to be just plain text - textTokens.push(tokens[cursor++]); - } - - while (cursor < len && (nextState = secondState || state.go(tokens[cursor].t))) { - // Get the next state - secondState = null; - state = nextState; // Keep track of the latest accepting state - - if (state.accepts()) { - sinceAccepts = 0; - latestAccepting = state; - } else if (sinceAccepts >= 0) { - sinceAccepts++; - } - - cursor++; - multiLength++; - } - - if (sinceAccepts < 0) { - // No accepting state was found, part of a regular text token add - // the first text token to the text tokens array and try again from - // the next - cursor -= multiLength; - - if (cursor < len) { - textTokens.push(tokens[cursor]); - cursor++; - } - } else { - // Accepting state! - // First close off the textTokens (if available) - if (textTokens.length > 0) { - multis.push(initMultiToken(Text, input, textTokens)); - textTokens = []; - } // Roll back to the latest accepting state - - - cursor -= sinceAccepts; - multiLength -= sinceAccepts; // Create a new multitoken - - var Multi = latestAccepting.t; - var subtokens = tokens.slice(cursor - multiLength, cursor); - multis.push(initMultiToken(Multi, input, subtokens)); - } - } // Finally close off the textTokens (if available) - - - if (textTokens.length > 0) { - multis.push(initMultiToken(Text, input, textTokens)); - } - - return multis; - } - /** - * Utility function for instantiating a new multitoken with all the relevant - * fields during parsing. - * @param {new (value: string, tokens: Token[]) => MultiToken} Multi class to instantiate - * @param {string} input original input string - * @param {Token[]} tokens consecutive tokens scanned from input string - * @returns {MultiToken} - */ - - function initMultiToken(Multi, input, tokens) { - var startIdx = tokens[0].s; - var endIdx = tokens[tokens.length - 1].e; - var value = input.slice(startIdx, endIdx); - return new Multi(value, tokens); - } - - var warn = typeof console !== 'undefined' && console && console.warn || function () {}; - - var warnAdvice = 'To avoid this warning, please register all custom schemes before invoking linkify the first time.'; // Side-effect initialization state - - var INIT = { - scanner: null, - parser: null, - tokenQueue: [], - pluginQueue: [], - customSchemes: [], - initialized: false - }; - /** - * @typedef {{ - * start: State, - * tokens: { groups: Collections } & typeof tk - * }} ScannerInit - */ - - /** - * @typedef {{ - * start: State, - * tokens: typeof multi - * }} ParserInit - */ - - /** - * @typedef {(arg: { scanner: ScannerInit }) => void} TokenPlugin - */ - - /** - * @typedef {(arg: { scanner: ScannerInit, parser: ParserInit }) => void} Plugin - */ - - /** - * De-register all plugins and reset the internal state-machine. Used for - * testing; not required in practice. - * @private - */ - - function reset() { - State.groups = {}; - INIT.scanner = null; - INIT.parser = null; - INIT.tokenQueue = []; - INIT.pluginQueue = []; - INIT.customSchemes = []; - INIT.initialized = false; - } - /** - * Register a token plugin to allow the scanner to recognize additional token - * types before the parser state machine is constructed from the results. - * @param {string} name of plugin to register - * @param {TokenPlugin} plugin function that accepts the scanner state machine - * and available scanner tokens and collections and extends the state machine to - * recognize additional tokens or groups. - */ - - function registerTokenPlugin(name, plugin) { - if (typeof plugin !== 'function') { - throw new Error("linkifyjs: Invalid token plugin " + plugin + " (expects function)"); - } - - for (var i = 0; i < INIT.tokenQueue.length; i++) { - if (name === INIT.tokenQueue[i][0]) { - warn("linkifyjs: token plugin \"" + name + "\" already registered - will be overwritten"); - INIT.tokenQueue[i] = [name, plugin]; - return; - } - } - - INIT.tokenQueue.push([name, plugin]); - - if (INIT.initialized) { - warn("linkifyjs: already initialized - will not register token plugin \"" + name + "\" until you manually call linkify.init(). " + warnAdvice); - } - } - /** - * Register a linkify plugin - * @param {string} name of plugin to register - * @param {Plugin} plugin function that accepts the parser state machine and - * extends the parser to recognize additional link types - */ - - function registerPlugin(name, plugin) { - if (typeof plugin !== 'function') { - throw new Error("linkifyjs: Invalid plugin " + plugin + " (expects function)"); - } - - for (var i = 0; i < INIT.pluginQueue.length; i++) { - if (name === INIT.pluginQueue[i][0]) { - warn("linkifyjs: plugin \"" + name + "\" already registered - will be overwritten"); - INIT.pluginQueue[i] = [name, plugin]; - return; - } - } - - INIT.pluginQueue.push([name, plugin]); - - if (INIT.initialized) { - warn("linkifyjs: already initialized - will not register plugin \"" + name + "\" until you manually call linkify.init(). " + warnAdvice); - } - } - /** - * Detect URLs with the following additional protocol. Anything with format - * "protocol://..." will be considered a link. If `optionalSlashSlash` is set to - * `true`, anything with format "protocol:..." will be considered a link. - * @param {string} protocol - * @param {boolean} [optionalSlashSlash] - */ - - function registerCustomProtocol(scheme, optionalSlashSlash) { - if (optionalSlashSlash === void 0) { - optionalSlashSlash = false; - } - - if (INIT.initialized) { - warn("linkifyjs: already initialized - will not register custom scheme \"" + scheme + "\" until you manually call linkify.init(). " + warnAdvice); - } - - if (!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(scheme)) { - throw new Error('linkifyjs: incorrect scheme format.\n 1. Must only contain digits, lowercase ASCII letters or "-"\n 2. Cannot start or end with "-"\n 3. "-" cannot repeat'); - } - - INIT.customSchemes.push([scheme, optionalSlashSlash]); - } - /** - * Initialize the linkify state machine. Called automatically the first time - * linkify is called on a string, but may be called manually as well. - */ - - function init() { - // Initialize scanner state machine and plugins - INIT.scanner = init$2(INIT.customSchemes); - - for (var i = 0; i < INIT.tokenQueue.length; i++) { - INIT.tokenQueue[i][1]({ - scanner: INIT.scanner - }); - } // Initialize parser state machine and plugins - - - INIT.parser = init$1(INIT.scanner.tokens); - - for (var _i = 0; _i < INIT.pluginQueue.length; _i++) { - INIT.pluginQueue[_i][1]({ - scanner: INIT.scanner, - parser: INIT.parser - }); - } - - INIT.initialized = true; - } - /** - * Parse a string into tokens that represent linkable and non-linkable sub-components - * @param {string} str - * @return {MultiToken[]} tokens - */ - - function tokenize(str) { - if (!INIT.initialized) { - init(); - } - - return run(INIT.parser.start, str, run$1(INIT.scanner.start, str)); - } - /** - * Find a list of linkable items in the given string. - * @param {string} str string to find links in - * @param {string | Opts} [type] either formatting options or specific type of - * links to find, e.g., 'url' or 'email' - * @param {Opts} [opts] formatting options for final output. Cannot be specified - * if opts already provided in `type` argument - */ - - function find(str, type, opts) { - if (type === void 0) { - type = null; - } - - if (opts === void 0) { - opts = null; - } - - if (type && typeof type === 'object') { - if (opts) { - throw Error("linkifyjs: Invalid link type " + type + "; must be a string"); - } - - opts = type; - type = null; - } - - var options = new Options(opts); - var tokens = tokenize(str); - var filtered = []; - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - - if (token.isLink && (!type || token.t === type)) { - filtered.push(token.toFormattedObject(options)); - } - } - - return filtered; - } - /** - * Is the given string valid linkable text of some sort. Note that this does not - * trim the text for you. - * - * Optionally pass in a second `type` param, which is the type of link to test - * for. - * - * For example, - * - * linkify.test(str, 'email'); - * - * Returns `true` if str is a valid email. - * @param {string} str string to test for links - * @param {string} [type] optional specific link type to look for - * @returns boolean true/false - */ - - function test(str, type) { - if (type === void 0) { - type = null; - } - - var tokens = tokenize(str); - return tokens.length === 1 && tokens[0].isLink && (!type || tokens[0].t === type); - } - - exports.MultiToken = MultiToken; - exports.Options = Options; - exports.State = State; - exports.createTokenClass = createTokenClass; - exports.find = find; - exports.init = init; - exports.multi = multi; - exports.options = options; - exports.regexp = regexp; - exports.registerCustomProtocol = registerCustomProtocol; - exports.registerPlugin = registerPlugin; - exports.registerTokenPlugin = registerTokenPlugin; - exports.reset = reset; - exports.stringToArray = stringToArray; - exports.test = test; - exports.tokenize = tokenize; - - Object.defineProperty(exports, '__esModule', { value: true }); - - return exports; - -})({}); \ No newline at end of file diff -Nru ring-20230206.0~ds1/src/libclient/web-chatview/linkify-string.js ring-20230206.0~ds2/src/libclient/web-chatview/linkify-string.js --- ring-20230206.0~ds1/src/libclient/web-chatview/linkify-string.js 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/libclient/web-chatview/linkify-string.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,100 +0,0 @@ -/* -* Copyright (c) 2021 SoapBox Innovations Inc. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -* THE SOFTWARE. -*/ -var linkifyStr = (function (linkifyjs) { - 'use strict'; - - /** - Convert strings of text into linkable HTML text - */ - - function escapeText(text) { - return text.replace(/&/g, '&').replace(//g, '>'); - } - - function escapeAttr(href) { - return href.replace(/"/g, '"'); - } - - function attributesToString(attributes) { - var result = []; - - for (var attr in attributes) { - var val = attributes[attr] + ''; - result.push(attr + "=\"" + escapeAttr(val) + "\""); - } - - return result.join(' '); - } - - function defaultRender(_ref) { - var tagName = _ref.tagName, - attributes = _ref.attributes, - content = _ref.content; - return "<" + tagName + " " + attributesToString(attributes) + ">" + escapeText(content) + ""; - } - /** - * Convert a plan text string to an HTML string with links. Expects that the - * given strings does not contain any HTML entities. Use the linkify-html - * interface if you need to parse HTML entities. - * - * @param {string} str string to linkify - * @param {import('linkifyjs').Opts} [opts] overridable options - * @returns {string} - */ - - - function linkifyStr(str, opts) { - if (opts === void 0) { - opts = {}; - } - - opts = new linkifyjs.Options(opts, defaultRender); - var tokens = linkifyjs.tokenize(str); - var result = []; - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - - if (token.t === 'nl' && opts.get('nl2br')) { - result.push('
\n'); - } else if (!token.isLink || !opts.check(token)) { - result.push(escapeText(token.toString())); - } else { - result.push(opts.render(token)); - } - } - - return result.join(''); - } - - if (!String.prototype.linkify) { - Object.defineProperty(String.prototype, 'linkify', { - writable: false, - value: function linkify(options) { - return linkifyStr(this, options); - } - }); - } - - return linkifyStr; - -})(linkify); \ No newline at end of file diff -Nru ring-20230206.0~ds1/src/libclient/web-chatview/previewInfo.js ring-20230206.0~ds2/src/libclient/web-chatview/previewInfo.js --- ring-20230206.0~ds1/src/libclient/web-chatview/previewInfo.js 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/libclient/web-chatview/previewInfo.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,126 +0,0 @@ -/* MIT License - -Copyright (c) 2019 Andrej Gajdos - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.*/ - -/** - * Retrieves the title of a webpage which is used to fill out the preview of a hyperlink - * @param doc the DOM of the url that is being previewed - * @returns the title of the given webpage - */ - -function getTitle(doc){ - const og_title = doc.querySelector('meta[property="og:title"]') - if (og_title !== null && og_title.content.length > 0) { - return og_title.content - } - const twitter_title = doc.querySelector('meta[name="twitter:title"]') - if (twitter_title !== null && twitter_title.content.length > 0) { - return twitter_title.content - } - const doc_title = doc.title - if (doc_title !== null && doc_title.length > 0) { - return doc_title - } - if (doc.querySelector("h1") !== null){ - const header_1 = doc.querySelector("h1").innerHTML - if (header_1 !== null && header_1.length > 0) { - return header_1 - } - } - if (doc.querySelector("h2") !== null){ - const header_2 = doc.querySelector("h2").innerHTML - if (header_2 !== null && header_2.length > 0) { - return header_2 - } - } - return null -} - -/** - * Obtains a description of the webpage for the hyperlink preview - * @param doc the DOM of the url that is being previewed - * @returns a description of the webpage - */ -function getDescription(doc){ - const og_description = doc.querySelector('meta[property="og:description"]') - if (og_description !== null && og_description.content.length > 0) { - return og_description.content - } - const twitter_description = doc.querySelector('meta[name="twitter:description"]') - if (twitter_description !== null && twitter_description.content.length > 0) { - return twitter_description.content - } - const meta_description = doc.querySelector('meta[name="description"]') - if (meta_description !== null && meta_description.content.length > 0) { - return meta_description.content - } - var all_paragraphs = doc.querySelectorAll("p") - let first_visible_paragraph = null - for (var i = 0; i < all_paragraphs.length; i++) { - if (all_paragraphs[i].offsetParent !== null && - !all_paragraphs[i].childElementCount !== 0) { - first_visible_paragraph = all_paragraphs[i].textContent - break - } - } - return first_visible_paragraph -} - -/** - * Gets the image that represents a webpage. - * @param doc the DOM of the url that is being previewed - * @returns the image representing the url or null if no such image was found - */ -function getImage(doc) { - const og_image = doc.querySelector('meta[property="og:image"]') - if (og_image !== null && og_image.content.length > 0){ - return og_image.content - } - const image_rel_link = doc.querySelector('link[rel="image_src"]') - if (image_rel_link !== null && image_rel_link.href.length > 0){ - return image_rel_link.href - } - const twitter_img = doc.querySelector('meta[name="twitter:image"]') - if (twitter_img !== null && twitter_img.content.length > 0) { - return twitter_img.content - } - - let imgs = Array.from(doc.getElementsByTagName("img")) - if (imgs.length > 0) { - imgs = imgs.filter(img => { - let add_image = true - if (img.naturalWidth > img.naturalHeight) { - if (img.naturalWidth / img.naturalHeight > 3) { - add_image = false - } - } else { - if (img.naturalHeight / img.naturalWidth > 3) { - add_image = false - } - } - if (img.naturalHeight <= 50 || img.naturalWidth <= 50) { - add_image = false - } - return add_image - }) - } - return null -} diff -Nru ring-20230206.0~ds1/src/libclient/web-chatview/qwebchannel.js ring-20230206.0~ds2/src/libclient/web-chatview/qwebchannel.js --- ring-20230206.0~ds1/src/libclient/web-chatview/qwebchannel.js 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/libclient/web-chatview/qwebchannel.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,427 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Milian Wolff -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWebChannel module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -"use strict"; - -var QWebChannelMessageTypes = { - signal: 1, - propertyUpdate: 2, - init: 3, - idle: 4, - debug: 5, - invokeMethod: 6, - connectToSignal: 7, - disconnectFromSignal: 8, - setProperty: 9, - response: 10, -}; - -var QWebChannel = function(transport, initCallback) -{ - if (typeof transport !== "object" || typeof transport.send !== "function") { - console.error("The QWebChannel expects a transport object with a send function and onmessage callback property." + - " Given is: transport: " + typeof(transport) + ", transport.send: " + typeof(transport.send)); - return; - } - - var channel = this; - this.transport = transport; - - this.send = function(data) - { - if (typeof(data) !== "string") { - data = JSON.stringify(data); - } - channel.transport.send(data); - } - - this.transport.onmessage = function(message) - { - var data = message.data; - if (typeof data === "string") { - data = JSON.parse(data); - } - switch (data.type) { - case QWebChannelMessageTypes.signal: - channel.handleSignal(data); - break; - case QWebChannelMessageTypes.response: - channel.handleResponse(data); - break; - case QWebChannelMessageTypes.propertyUpdate: - channel.handlePropertyUpdate(data); - break; - default: - console.error("invalid message received:", message.data); - break; - } - } - - this.execCallbacks = {}; - this.execId = 0; - this.exec = function(data, callback) - { - if (!callback) { - // if no callback is given, send directly - channel.send(data); - return; - } - if (channel.execId === Number.MAX_VALUE) { - // wrap - channel.execId = Number.MIN_VALUE; - } - if (data.hasOwnProperty("id")) { - console.error("Cannot exec message with property id: " + JSON.stringify(data)); - return; - } - data.id = channel.execId++; - channel.execCallbacks[data.id] = callback; - channel.send(data); - }; - - this.objects = {}; - - this.handleSignal = function(message) - { - var object = channel.objects[message.object]; - if (object) { - object.signalEmitted(message.signal, message.args); - } else { - console.warn("Unhandled signal: " + message.object + "::" + message.signal); - } - } - - this.handleResponse = function(message) - { - if (!message.hasOwnProperty("id")) { - console.error("Invalid response message received: ", JSON.stringify(message)); - return; - } - channel.execCallbacks[message.id](message.data); - delete channel.execCallbacks[message.id]; - } - - this.handlePropertyUpdate = function(message) - { - for (var i in message.data) { - var data = message.data[i]; - var object = channel.objects[data.object]; - if (object) { - object.propertyUpdate(data.signals, data.properties); - } else { - console.warn("Unhandled property update: " + data.object + "::" + data.signal); - } - } - channel.exec({type: QWebChannelMessageTypes.idle}); - } - - this.debug = function(message) - { - channel.send({type: QWebChannelMessageTypes.debug, data: message}); - }; - - channel.exec({type: QWebChannelMessageTypes.init}, function(data) { - for (var objectName in data) { - var object = new QObject(objectName, data[objectName], channel); - } - // now unwrap properties, which might reference other registered objects - for (var objectName in channel.objects) { - channel.objects[objectName].unwrapProperties(); - } - if (initCallback) { - initCallback(channel); - } - channel.exec({type: QWebChannelMessageTypes.idle}); - }); -}; - -function QObject(name, data, webChannel) -{ - this.__id__ = name; - webChannel.objects[name] = this; - - // List of callbacks that get invoked upon signal emission - this.__objectSignals__ = {}; - - // Cache of all properties, updated when a notify signal is emitted - this.__propertyCache__ = {}; - - var object = this; - - // ---------------------------------------------------------------------- - - this.unwrapQObject = function(response) - { - if (response instanceof Array) { - // support list of objects - var ret = new Array(response.length); - for (var i = 0; i < response.length; ++i) { - ret[i] = object.unwrapQObject(response[i]); - } - return ret; - } - if (!response - || !response["__QObject*__"] - || response.id === undefined) { - return response; - } - - var objectId = response.id; - if (webChannel.objects[objectId]) - return webChannel.objects[objectId]; - - if (!response.data) { - console.error("Cannot unwrap unknown QObject " + objectId + " without data."); - return; - } - - var qObject = new QObject( objectId, response.data, webChannel ); - qObject.destroyed.connect(function() { - if (webChannel.objects[objectId] === qObject) { - delete webChannel.objects[objectId]; - // reset the now deleted QObject to an empty {} object - // just assigning {} though would not have the desired effect, but the - // below also ensures all external references will see the empty map - // NOTE: this detour is necessary to workaround QTBUG-40021 - var propertyNames = []; - for (var propertyName in qObject) { - propertyNames.push(propertyName); - } - for (var idx in propertyNames) { - delete qObject[propertyNames[idx]]; - } - } - }); - // here we are already initialized, and thus must directly unwrap the properties - qObject.unwrapProperties(); - return qObject; - } - - this.unwrapProperties = function() - { - for (var propertyIdx in object.__propertyCache__) { - object.__propertyCache__[propertyIdx] = object.unwrapQObject(object.__propertyCache__[propertyIdx]); - } - } - - function addSignal(signalData, isPropertyNotifySignal) - { - var signalName = signalData[0]; - var signalIndex = signalData[1]; - object[signalName] = { - connect: function(callback) { - if (typeof(callback) !== "function") { - console.error("Bad callback given to connect to signal " + signalName); - return; - } - - object.__objectSignals__[signalIndex] = object.__objectSignals__[signalIndex] || []; - object.__objectSignals__[signalIndex].push(callback); - - if (!isPropertyNotifySignal && signalName !== "destroyed") { - // only required for "pure" signals, handled separately for properties in propertyUpdate - // also note that we always get notified about the destroyed signal - webChannel.exec({ - type: QWebChannelMessageTypes.connectToSignal, - object: object.__id__, - signal: signalIndex - }); - } - }, - disconnect: function(callback) { - if (typeof(callback) !== "function") { - console.error("Bad callback given to disconnect from signal " + signalName); - return; - } - object.__objectSignals__[signalIndex] = object.__objectSignals__[signalIndex] || []; - var idx = object.__objectSignals__[signalIndex].indexOf(callback); - if (idx === -1) { - console.error("Cannot find connection of signal " + signalName + " to " + callback.name); - return; - } - object.__objectSignals__[signalIndex].splice(idx, 1); - if (!isPropertyNotifySignal && object.__objectSignals__[signalIndex].length === 0) { - // only required for "pure" signals, handled separately for properties in propertyUpdate - webChannel.exec({ - type: QWebChannelMessageTypes.disconnectFromSignal, - object: object.__id__, - signal: signalIndex - }); - } - } - }; - } - - /** - * Invokes all callbacks for the given signalname. Also works for property notify callbacks. - */ - function invokeSignalCallbacks(signalName, signalArgs) - { - var connections = object.__objectSignals__[signalName]; - if (connections) { - connections.forEach(function(callback) { - callback.apply(callback, signalArgs); - }); - } - } - - this.propertyUpdate = function(signals, propertyMap) - { - // update property cache - for (var propertyIndex in propertyMap) { - var propertyValue = propertyMap[propertyIndex]; - object.__propertyCache__[propertyIndex] = propertyValue; - } - - for (var signalName in signals) { - // Invoke all callbacks, as signalEmitted() does not. This ensures the - // property cache is updated before the callbacks are invoked. - invokeSignalCallbacks(signalName, signals[signalName]); - } - } - - this.signalEmitted = function(signalName, signalArgs) - { - invokeSignalCallbacks(signalName, this.unwrapQObject(signalArgs)); - } - - function addMethod(methodData) - { - var methodName = methodData[0]; - var methodIdx = methodData[1]; - object[methodName] = function() { - var args = []; - var callback; - for (var i = 0; i < arguments.length; ++i) { - var argument = arguments[i]; - if (typeof argument === "function") - callback = argument; - else if (argument instanceof QObject && webChannel.objects[argument.__id__] !== undefined) - args.push({ - "id": argument.__id__ - }); - else - args.push(argument); - } - - webChannel.exec({ - "type": QWebChannelMessageTypes.invokeMethod, - "object": object.__id__, - "method": methodIdx, - "args": args - }, function(response) { - if (response !== undefined) { - var result = object.unwrapQObject(response); - if (callback) { - (callback)(result); - } - } - }); - }; - } - - function bindGetterSetter(propertyInfo) - { - var propertyIndex = propertyInfo[0]; - var propertyName = propertyInfo[1]; - var notifySignalData = propertyInfo[2]; - // initialize property cache with current value - // NOTE: if this is an object, it is not directly unwrapped as it might - // reference other QObject that we do not know yet - object.__propertyCache__[propertyIndex] = propertyInfo[3]; - - if (notifySignalData) { - if (notifySignalData[0] === 1) { - // signal name is optimized away, reconstruct the actual name - notifySignalData[0] = propertyName + "Changed"; - } - addSignal(notifySignalData, true); - } - - Object.defineProperty(object, propertyName, { - configurable: true, - get: function () { - var propertyValue = object.__propertyCache__[propertyIndex]; - if (propertyValue === undefined) { - // This shouldn't happen - console.warn("Undefined value in property cache for property \"" + propertyName + "\" in object " + object.__id__); - } - - return propertyValue; - }, - set: function(value) { - if (value === undefined) { - console.warn("Property setter for " + propertyName + " called with undefined value!"); - return; - } - object.__propertyCache__[propertyIndex] = value; - var valueToSend = value; - if (valueToSend instanceof QObject && webChannel.objects[valueToSend.__id__] !== undefined) - valueToSend = { "id": valueToSend.__id__ }; - webChannel.exec({ - "type": QWebChannelMessageTypes.setProperty, - "object": object.__id__, - "property": propertyIndex, - "value": valueToSend - }); - } - }); - - } - - // ---------------------------------------------------------------------- - - data.methods.forEach(addMethod); - - data.properties.forEach(bindGetterSetter); - - data.signals.forEach(function(signal) { addSignal(signal, false); }); - - for (var name in data.enums) { - object[name] = data.enums[name]; - } -} - -//required for use with nodejs -if (typeof module === 'object') { - module.exports = { - QWebChannel: QWebChannel - }; -} diff -Nru ring-20230206.0~ds1/src/libclient/web-chatview/README ring-20230206.0~ds2/src/libclient/web-chatview/README --- ring-20230206.0~ds1/src/libclient/web-chatview/README 1970-01-01 00:00:01.000000000 +0000 +++ ring-20230206.0~ds2/src/libclient/web-chatview/README 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -# README - chatview - -The chatview runs under a WebKit GTK view. It is written using web technologies -(HTML5/CSS3/JS) and is responsible for displaying everything that deals with the -navbar, the messages, and the message bar. - -## Contributing - syntax - -We have a set of ESLint rules that define clear syntax rules (web/.eslintrc.json). - -You will need the following tools: - -- ESLint (The pluggable linting utility for JavaScript and JSX) - https://eslint.org/ -- ESLint HTML plugin (eslint-plugin-html) - https://www.npmjs.com/package/eslint-plugin-html - -Before pushing a patch, make sure that it passes ESLint: -$ eslint chatview.html - -Most trivial issues can be fixed using -$ eslint chatview.js --fix - -We will not accept patches introducing non-ESLint-compliant code. - -## WebKit GTK - -Everything runs under WebKit GTK, that is if you need to write browser specific -code, you will only need to support WebKit (CSS -webkit- prefix). - -Do not use querySelector if getElementById or getElementByClassName can be used -instead. querySelector doesn't always make the code easier and has very bad -performances.